Files
OpenBB/openbb_terminal/core/plots/table.html
jose-donato 40cfe8148d Interactive tables using react (#4386)
* feat: experimenting tables with react

* feat: adding new interactive tables

* feat: adding more table features

* small changes

* update

* Update backend.py

* Update backend.py

* fix: dark mode?

* feat: lot of table improvements

* fix: my b

* fix: load only when prod

* feat: naive detect links and dates

* handle index and column names

* increased min width

* codespell

* mypy, pylint

* fix: added new chart, export, etc

* testing

* updates

* fix : add PLOT_OPEN_EXPORT,  USE_INTERACTIVE_DF to user dataclass

* bump pywry version, readd removed `plots_backend().start()`

* req files

* Update unit-test.yml

* Update unit-test.yml

* Update unit-test.yml

* updates

* fixing some date things

* update table

* fix formatting with timezones

* fixing some long prints and tables

* Mickey Mouse

Co-authored-by: teh_coderer <tehcoderer@users.noreply.github.com>
Co-authored-by: jose-donato <jose-donato@users.noreply.github.com>

* fix: ?!?!?

* adding limit arg to all print_rich_table

* tests

* lint

* simple by Default on interactive charts

* playing with some css (thks jose)

* Fix #4426

* Edit some structure

* fix sdk generation

* Update backend.py

* fa menu tested and working

* fix #4460

* fix #4460 drop indices

* update tests

* update tests

* Update helper_funcs.py

* tests

* Update unit-test.yml

* Update etf.ipynb

---------

Co-authored-by: teh_coderer <me@tehcoderer.com>
Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com>
Co-authored-by: teh_coderer <tehcoderer@users.noreply.github.com>
Co-authored-by: jose-donato <jose-donato@users.noreply.github.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-03-13 17:50:48 +00:00

3780 lines
4.1 MiB
Vendored
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OpenBB Interactive Tables</title>
<meta name="color-scheme" content="dark" />
<script type="module" crossorigin>
(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const K of document.querySelectorAll('link[rel="modulepreload"]'))W(K);new MutationObserver(K=>{for(const de of K)if(de.type==="childList")for(const z of de.addedNodes)z.tagName==="LINK"&&z.rel==="modulepreload"&&W(z)}).observe(document,{childList:!0,subtree:!0});function w(K){const de={};return K.integrity&&(de.integrity=K.integrity),K.referrerPolicy&&(de.referrerPolicy=K.referrerPolicy),K.crossOrigin==="use-credentials"?de.credentials="include":K.crossOrigin==="anonymous"?de.credentials="omit":de.credentials="same-origin",de}function W(K){if(K.ep)return;K.ep=!0;const de=w(K);fetch(K.href,de)}})();function g4(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Mp={},_8={get exports(){return Mp},set exports(t){Mp=t}},fy={},Ka={},R8={get exports(){return Ka},set exports(t){Ka=t}},bi={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Jp=Symbol.for("react.element"),D8=Symbol.for("react.portal"),I8=Symbol.for("react.fragment"),F8=Symbol.for("react.strict_mode"),k8=Symbol.for("react.profiler"),O8=Symbol.for("react.provider"),z8=Symbol.for("react.context"),N8=Symbol.for("react.forward_ref"),B8=Symbol.for("react.suspense"),U8=Symbol.for("react.memo"),H8=Symbol.for("react.lazy"),rw=Symbol.iterator;function V8(t){return t===null||typeof t!="object"?null:(t=rw&&t[rw]||t["@@iterator"],typeof t=="function"?t:null)}var y4={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m4=Object.assign,x4={};function x0(t,s,w){this.props=t,this.context=s,this.refs=x4,this.updater=w||y4}x0.prototype.isReactComponent={};x0.prototype.setState=function(t,s){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,s,"setState")};x0.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function b4(){}b4.prototype=x0.prototype;function b2(t,s,w){this.props=t,this.context=s,this.refs=x4,this.updater=w||y4}var w2=b2.prototype=new b4;w2.constructor=b2;m4(w2,x0.prototype);w2.isPureReactComponent=!0;var nw=Array.isArray,w4=Object.prototype.hasOwnProperty,T2={current:null},T4={key:!0,ref:!0,__self:!0,__source:!0};function A4(t,s,w){var W,K={},de=null,z=null;if(s!=null)for(W in s.ref!==void 0&&(z=s.ref),s.key!==void 0&&(de=""+s.key),s)w4.call(s,W)&&!T4.hasOwnProperty(W)&&(K[W]=s[W]);var B=arguments.length-2;if(B===1)K.children=w;else if(1<B){for(var e=Array(B),d=0;d<B;d++)e[d]=arguments[d+2];K.children=e}if(t&&t.defaultProps)for(W in B=t.defaultProps,B)K[W]===void 0&&(K[W]=B[W]);return{$$typeof:Jp,type:t,key:de,ref:z,props:K,_owner:T2.current}}function G8(t,s){return{$$typeof:Jp,type:t.type,key:s,ref:t.ref,props:t.props,_owner:t._owner}}function A2(t){return typeof t=="object"&&t!==null&&t.$$typeof===Jp}function W8(t){var s={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(w){return s[w]})}var aw=/\/+/g;function pm(t,s){return typeof t=="object"&&t!==null&&t.key!=null?W8(""+t.key):s.toString(36)}function f1(t,s,w,W,K){var de=typeof t;(de==="undefined"||de==="boolean")&&(t=null);var z=!1;if(t===null)z=!0;else switch(de){case"string":case"number":z=!0;break;case"object":switch(t.$$typeof){case Jp:case D8:z=!0}}if(z)return z=t,K=K(z),t=W===""?"."+pm(z,0):W,nw(K)?(w="",t!=null&&(w=t.replace(aw,"$&/")+"/"),f1(K,s,w,"",function(d){return d})):K!=null&&(A2(K)&&(K=G8(K,w+(!K.key||z&&z.key===K.key?"":(""+K.key).replace(aw,"$&/")+"/")+t)),s.push(K)),1;if(z=0,W=W===""?".":W+":",nw(t))for(var B=0;B<t.length;B++){de=t[B];var e=W+pm(de,B);z+=f1(de,s,w,e,K)}else if(e=V8(t),typeof e=="function")for(t=e.call(t),B=0;!(de=t.next()).done;)de=de.value,e=W+pm(de,B++),z+=f1(de,s,w,e,K);else if(de==="object")throw s=String(t),Error("Objects are not valid as a React child (found: "+(s==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":s)+"). If you meant to render a collection of children, use an array instead.");return z}function kg(t,s,w){if(t==null)return t;var W=[],K=0;return f1(t,W,"","",function(de){return s.call(w,de,K++)}),W}function Y8(t){if(t._status===-1){var s=t._result;s=s(),s.then(function(w){(t._status===0||t._status===-1)&&(t._status=1,t._result=w)},function(w){(t._status===0||t._status===-1)&&(t._status=2,t._result=w)}),t._status===-1&&(t._status=0,t._result=s)}if(t._status===1)return t._result.default;throw t._result}var wl={current:null},c1={transition:null},X8={ReactCurrentDispatcher:wl,ReactCurrentBatchConfig:c1,ReactCurrentOwner:T2};bi.Children={map:kg,forEach:function(t,s,w){kg(t,function(){s.apply(this,arguments)},w)},count:function(t){var s=0;return kg(t,function(){s++}),s},toArray:function(t){return kg(t,function(s){return s})||[]},only:function(t){if(!A2(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};bi.Component=x0;bi.Fragment=I8;bi.Profiler=k8;bi.PureComponent=b2;bi.StrictMode=F8;bi.Suspense=B8;bi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=X8;bi.cloneElement=function(t,s,w){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var W=m4({},t.props),K=t.key,de=t.ref,z=t._owner;if(s!=null){if(s.ref!==void 0&&(de=s.ref,z=T2.current),s.key!==void 0&&(K=""+s.key),t.type&&t.type.defaultProps)var B=t.type.defaultProps;for(e in s)w4.call(s,e)&&!T4.hasOwnProperty(e)&&(W[e]=s[e]===void 0&&B!==void 0?B[e]:s[e])}var e=arguments.length-2;if(e===1)W.children=w;else if(1<e){B=Array(e);for(var d=0;d<e;d++)B[d]=arguments[d+2];W.children=B}return{$$typeof:Jp,type:t.type,key:K,ref:de,props:W,_owner:z}};bi.createContext=function(t){return t={$$typeof:z8,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:O8,_context:t},t.Consumer=t};bi.createElement=A4;bi.createFactory=function(t){var s=A4.bind(null,t);return s.type=t,s};bi.createRef=function(){return{current:null}};bi.forwardRef=function(t){return{$$typeof:N8,render:t}};bi.isValidElement=A2;bi.lazy=function(t){return{$$typeof:H8,_payload:{_status:-1,_result:t},_init:Y8}};bi.memo=function(t,s){return{$$typeof:U8,type:t,compare:s===void 0?null:s}};bi.startTransition=function(t){var s=c1.transition;c1.transition={};try{t()}finally{c1.transition=s}};bi.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};bi.useCallback=function(t,s){return wl.current.useCallback(t,s)};bi.useContext=function(t){return wl.current.useContext(t)};bi.useDebugValue=function(){};bi.useDeferredValue=function(t){return wl.current.useDeferredValue(t)};bi.useEffect=function(t,s){return wl.current.useEffect(t,s)};bi.useId=function(){return wl.current.useId()};bi.useImperativeHandle=function(t,s,w){return wl.current.useImperativeHandle(t,s,w)};bi.useInsertionEffect=function(t,s){return wl.current.useInsertionEffect(t,s)};bi.useLayoutEffect=function(t,s){return wl.current.useLayoutEffect(t,s)};bi.useMemo=function(t,s){return wl.current.useMemo(t,s)};bi.useReducer=function(t,s,w){return wl.current.useReducer(t,s,w)};bi.useRef=function(t){return wl.current.useRef(t)};bi.useState=function(t){return wl.current.useState(t)};bi.useSyncExternalStore=function(t,s,w){return wl.current.useSyncExternalStore(t,s,w)};bi.useTransition=function(){return wl.current.useTransition()};bi.version="18.2.0";(function(t){t.exports=bi})(R8);const Ao=g4(Ka);/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Z8=Ka,j8=Symbol.for("react.element"),K8=Symbol.for("react.fragment"),J8=Object.prototype.hasOwnProperty,$8=Z8.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Q8={key:!0,ref:!0,__self:!0,__source:!0};function S4(t,s,w){var W,K={},de=null,z=null;w!==void 0&&(de=""+w),s.key!==void 0&&(de=""+s.key),s.ref!==void 0&&(z=s.ref);for(W in s)J8.call(s,W)&&!Q8.hasOwnProperty(W)&&(K[W]=s[W]);if(t&&t.defaultProps)for(W in s=t.defaultProps,s)K[W]===void 0&&(K[W]=s[W]);return{$$typeof:j8,type:t,key:de,ref:z,props:K,_owner:$8.current}}fy.Fragment=K8;fy.jsx=S4;fy.jsxs=S4;(function(t){t.exports=fy})(_8);const h1=Mp.Fragment,Oa=Mp.jsx,Ui=Mp.jsxs;var lx={},ux={},q8={get exports(){return ux},set exports(t){ux=t}},vu={},fx={},eC={get exports(){return fx},set exports(t){fx=t}},E4={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(t){function s(S,o){var R=S.length;S.push(o);e:for(;0<R;){var T=R-1>>>1,O=S[T];if(0<K(O,o))S[T]=o,S[R]=O,R=T;else break e}}function w(S){return S.length===0?null:S[0]}function W(S){if(S.length===0)return null;var o=S[0],R=S.pop();if(R!==o){S[0]=R;e:for(var T=0,O=S.length,N=O>>>1;T<N;){var H=2*(T+1)-1,k=S[H],V=H+1,G=S[V];if(0>K(k,R))V<O&&0>K(G,k)?(S[T]=G,S[V]=R,T=V):(S[T]=k,S[H]=R,T=H);else if(V<O&&0>K(G,R))S[T]=G,S[V]=R,T=V;else break e}}return o}function K(S,o){var R=S.sortIndex-o.sortIndex;return R!==0?R:S.id-o.id}if(typeof performance=="object"&&typeof performance.now=="function"){var de=performance;t.unstable_now=function(){return de.now()}}else{var z=Date,B=z.now();t.unstable_now=function(){return z.now()-B}}var e=[],d=[],P=1,a=null,_=3,x=!1,v=!1,y=!1,r=typeof setTimeout=="function"?setTimeout:null,n=typeof clearTimeout=="function"?clearTimeout:null,u=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function i(S){for(var o=w(d);o!==null;){if(o.callback===null)W(d);else if(o.startTime<=S)W(d),o.sortIndex=o.expirationTime,s(e,o);else break;o=w(d)}}function f(S){if(y=!1,i(S),!v)if(w(e)!==null)v=!0,A(g);else{var o=w(d);o!==null&&C(f,o.startTime-S)}}function g(S,o){v=!1,y&&(y=!1,n(p),p=-1),x=!0;var R=_;try{for(i(o),a=w(e);a!==null&&(!(a.expirationTime>o)||S&&!l());){var T=a.callback;if(typeof T=="function"){a.callback=null,_=a.priorityLevel;var O=T(a.expirationTime<=o);o=t.unstable_now(),typeof O=="function"?a.callback=O:a===w(e)&&W(e),i(o)}else W(e);a=w(e)}if(a!==null)var N=!0;else{var H=w(d);H!==null&&C(f,H.startTime-o),N=!1}return N}finally{a=null,_=R,x=!1}}var h=!1,b=null,p=-1,E=5,c=-1;function l(){return!(t.unstable_now()-c<E)}function m(){if(b!==null){var S=t.unstable_now();c=S;var o=!0;try{o=b(!0,S)}finally{o?M():(h=!1,b=null)}}else h=!1}var M;if(typeof u=="function")M=function(){u(m)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,D=L.port2;L.port1.onmessage=m,M=function(){D.postMessage(null)}}else M=function(){r(m,0)};function A(S){b=S,h||(h=!0,M())}function C(S,o){p=r(function(){S(t.unstable_now())},o)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(S){S.callback=null},t.unstable_continueExecution=function(){v||x||(v=!0,A(g))},t.unstable_forceFrameRate=function(S){0>S||125<S?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<S?Math.floor(1e3/S):5},t.unstable_getCurrentPriorityLevel=function(){return _},t.unstable_getFirstCallbackNode=function(){return w(e)},t.unstable_next=function(S){switch(_){case 1:case 2:case 3:var o=3;break;default:o=_}var R=_;_=o;try{return S()}finally{_=R}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(S,o){switch(S){case 1:case 2:case 3:case 4:case 5:break;default:S=3}var R=_;_=S;try{return o()}finally{_=R}},t.unstable_scheduleCallback=function(S,o,R){var T=t.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0<R?T+R:T):R=T,S){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=R+O,S={id:P++,callback:o,priorityLevel:S,startTime:R,expirationTime:O,sortIndex:-1},R>T?(S.sortIndex=R,s(d,S),w(e)===null&&S===w(d)&&(y?(n(p),p=-1):y=!0,C(f,R-T))):(S.sortIndex=O,s(e,S),v||x||(v=!0,A(g))),S},t.unstable_shouldYield=l,t.unstable_wrapCallback=function(S){var o=_;return function(){var R=_;_=o;try{return S.apply(this,arguments)}finally{_=R}}}})(E4);(function(t){t.exports=E4})(eC);/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var M4=Ka,cu=fx;function pa(t){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+t,w=1;w<arguments.length;w++)s+="&args[]="+encodeURIComponent(arguments[w]);return"Minified React error #"+t+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var C4=new Set,Cp={};function nd(t,s){c0(t,s),c0(t+"Capture",s)}function c0(t,s){for(Cp[t]=s,t=0;t<s.length;t++)C4.add(s[t])}var Yc=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cx=Object.prototype.hasOwnProperty,tC=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,iw={},ow={};function rC(t){return cx.call(ow,t)?!0:cx.call(iw,t)?!1:tC.test(t)?ow[t]=!0:(iw[t]=!0,!1)}function nC(t,s,w,W){if(w!==null&&w.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return W?!1:w!==null?!w.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function aC(t,s,w,W){if(s===null||typeof s>"u"||nC(t,s,w,W))return!0;if(W)return!1;if(w!==null)switch(w.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function Tl(t,s,w,W,K,de,z){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=W,this.attributeNamespace=K,this.mustUseProperty=w,this.propertyName=t,this.type=s,this.sanitizeURL=de,this.removeEmptyString=z}var ks={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){ks[t]=new Tl(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var s=t[0];ks[s]=new Tl(s,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){ks[t]=new Tl(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){ks[t]=new Tl(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){ks[t]=new Tl(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){ks[t]=new Tl(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){ks[t]=new Tl(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){ks[t]=new Tl(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){ks[t]=new Tl(t,5,!1,t.toLowerCase(),null,!1,!1)});var S2=/[\-:]([a-z])/g;function E2(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var s=t.replace(S2,E2);ks[s]=new Tl(s,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var s=t.replace(S2,E2);ks[s]=new Tl(s,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var s=t.replace(S2,E2);ks[s]=new Tl(s,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){ks[t]=new Tl(t,1,!1,t.toLowerCase(),null,!1,!1)});ks.xlinkHref=new Tl("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){ks[t]=new Tl(t,1,!1,t.toLowerCase(),null,!0,!0)});function M2(t,s,w,W){var K=ks.hasOwnProperty(s)?ks[s]:null;(K!==null?K.type!==0:W||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(aC(s,w,K,W)&&(w=null),W||K===null?rC(s)&&(w===null?t.removeAttribute(s):t.setAttribute(s,""+w)):K.mustUseProperty?t[K.propertyName]=w===null?K.type===3?!1:"":w:(s=K.attributeName,W=K.attributeNamespace,w===null?t.removeAttribute(s):(K=K.type,w=K===3||K===4&&w===!0?"":""+w,W?t.setAttributeNS(W,s,w):t.setAttribute(s,w))))}var $c=M4.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Og=Symbol.for("react.element"),Vd=Symbol.for("react.portal"),Gd=Symbol.for("react.fragment"),C2=Symbol.for("react.strict_mode"),hx=Symbol.for("react.profiler"),L4=Symbol.for("react.provider"),P4=Symbol.for("react.context"),L2=Symbol.for("react.forward_ref"),vx=Symbol.for("react.suspense"),dx=Symbol.for("react.suspense_list"),P2=Symbol.for("react.memo"),Ih=Symbol.for("react.lazy"),_4=Symbol.for("react.offscreen"),sw=Symbol.iterator;function K0(t){return t===null||typeof t!="object"?null:(t=sw&&t[sw]||t["@@iterator"],typeof t=="function"?t:null)}var Mo=Object.assign,gm;function ip(t){if(gm===void 0)try{throw Error()}catch(w){var s=w.stack.trim().match(/\n( *(at )?)/);gm=s&&s[1]||""}return`
`+gm+t}var ym=!1;function mm(t,s){if(!t||ym)return"";ym=!0;var w=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(d){var W=d}Reflect.construct(t,[],s)}else{try{s.call()}catch(d){W=d}t.call(s.prototype)}else{try{throw Error()}catch(d){W=d}t()}}catch(d){if(d&&W&&typeof d.stack=="string"){for(var K=d.stack.split(`
`),de=W.stack.split(`
`),z=K.length-1,B=de.length-1;1<=z&&0<=B&&K[z]!==de[B];)B--;for(;1<=z&&0<=B;z--,B--)if(K[z]!==de[B]){if(z!==1||B!==1)do if(z--,B--,0>B||K[z]!==de[B]){var e=`
`+K[z].replace(" at new "," at ");return t.displayName&&e.includes("<anonymous>")&&(e=e.replace("<anonymous>",t.displayName)),e}while(1<=z&&0<=B);break}}}finally{ym=!1,Error.prepareStackTrace=w}return(t=t?t.displayName||t.name:"")?ip(t):""}function iC(t){switch(t.tag){case 5:return ip(t.type);case 16:return ip("Lazy");case 13:return ip("Suspense");case 19:return ip("SuspenseList");case 0:case 2:case 15:return t=mm(t.type,!1),t;case 11:return t=mm(t.type.render,!1),t;case 1:return t=mm(t.type,!0),t;default:return""}}function px(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Gd:return"Fragment";case Vd:return"Portal";case hx:return"Profiler";case C2:return"StrictMode";case vx:return"Suspense";case dx:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case P4:return(t.displayName||"Context")+".Consumer";case L4:return(t._context.displayName||"Context")+".Provider";case L2:var s=t.render;return t=t.displayName,t||(t=s.displayName||s.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case P2:return s=t.displayName||null,s!==null?s:px(t.type)||"Memo";case Ih:s=t._payload,t=t._init;try{return px(t(s))}catch{}}return null}function oC(t){var s=t.type;switch(t.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=s.render,t=t.displayName||t.name||"",s.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return px(s);case 8:return s===C2?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Jh(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function R4(t){var s=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function sC(t){var s=R4(t)?"checked":"value",w=Object.getOwnPropertyDescriptor(t.constructor.prototype,s),W=""+t[s];if(!t.hasOwnProperty(s)&&typeof w<"u"&&typeof w.get=="function"&&typeof w.set=="function"){var K=w.get,de=w.set;return Object.defineProperty(t,s,{configurable:!0,get:function(){return K.call(this)},set:function(z){W=""+z,de.call(this,z)}}),Object.defineProperty(t,s,{enumerable:w.enumerable}),{getValue:function(){return W},setValue:function(z){W=""+z},stopTracking:function(){t._valueTracker=null,delete t[s]}}}}function zg(t){t._valueTracker||(t._valueTracker=sC(t))}function D4(t){if(!t)return!1;var s=t._valueTracker;if(!s)return!0;var w=s.getValue(),W="";return t&&(W=R4(t)?t.checked?"true":"false":t.value),t=W,t!==w?(s.setValue(t),!0):!1}function S1(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function gx(t,s){var w=s.checked;return Mo({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:w??t._wrapperState.initialChecked})}function lw(t,s){var w=s.defaultValue==null?"":s.defaultValue,W=s.checked!=null?s.checked:s.defaultChecked;w=Jh(s.value!=null?s.value:w),t._wrapperState={initialChecked:W,initialValue:w,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function I4(t,s){s=s.checked,s!=null&&M2(t,"checked",s,!1)}function yx(t,s){I4(t,s);var w=Jh(s.value),W=s.type;if(w!=null)W==="number"?(w===0&&t.value===""||t.value!=w)&&(t.value=""+w):t.value!==""+w&&(t.value=""+w);else if(W==="submit"||W==="reset"){t.removeAttribute("value");return}s.hasOwnProperty("value")?mx(t,s.type,w):s.hasOwnProperty("defaultValue")&&mx(t,s.type,Jh(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(t.defaultChecked=!!s.defaultChecked)}function uw(t,s,w){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var W=s.type;if(!(W!=="submit"&&W!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+t._wrapperState.initialValue,w||s===t.value||(t.value=s),t.defaultValue=s}w=t.name,w!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,w!==""&&(t.name=w)}function mx(t,s,w){(s!=="number"||S1(t.ownerDocument)!==t)&&(w==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+w&&(t.defaultValue=""+w))}var op=Array.isArray;function t0(t,s,w,W){if(t=t.options,s){s={};for(var K=0;K<w.length;K++)s["$"+w[K]]=!0;for(w=0;w<t.length;w++)K=s.hasOwnProperty("$"+t[w].value),t[w].selected!==K&&(t[w].selected=K),K&&W&&(t[w].defaultSelected=!0)}else{for(w=""+Jh(w),s=null,K=0;K<t.length;K++){if(t[K].value===w){t[K].selected=!0,W&&(t[K].defaultSelected=!0);return}s!==null||t[K].disabled||(s=t[K])}s!==null&&(s.selected=!0)}}function xx(t,s){if(s.dangerouslySetInnerHTML!=null)throw Error(pa(91));return Mo({},s,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function fw(t,s){var w=s.value;if(w==null){if(w=s.children,s=s.defaultValue,w!=null){if(s!=null)throw Error(pa(92));if(op(w)){if(1<w.length)throw Error(pa(93));w=w[0]}s=w}s==null&&(s=""),w=s}t._wrapperState={initialValue:Jh(w)}}function F4(t,s){var w=Jh(s.value),W=Jh(s.defaultValue);w!=null&&(w=""+w,w!==t.value&&(t.value=w),s.defaultValue==null&&t.defaultValue!==w&&(t.defaultValue=w)),W!=null&&(t.defaultValue=""+W)}function cw(t){var s=t.textContent;s===t._wrapperState.initialValue&&s!==""&&s!==null&&(t.value=s)}function k4(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function bx(t,s){return t==null||t==="http://www.w3.org/1999/xhtml"?k4(s):t==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Ng,O4=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,w,W,K){MSApp.execUnsafeLocalFunction(function(){return t(s,w,W,K)})}:t}(function(t,s){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=s;else{for(Ng=Ng||document.createElement("div"),Ng.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Ng.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;s.firstChild;)t.appendChild(s.firstChild)}});function Lp(t,s){if(s){var w=t.firstChild;if(w&&w===t.lastChild&&w.nodeType===3){w.nodeValue=s;return}}t.textContent=s}var fp={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},lC=["Webkit","ms","Moz","O"];Object.keys(fp).forEach(function(t){lC.forEach(function(s){s=s+t.charAt(0).toUpperCase()+t.substring(1),fp[s]=fp[t]})});function z4(t,s,w){return s==null||typeof s=="boolean"||s===""?"":w||typeof s!="number"||s===0||fp.hasOwnProperty(t)&&fp[t]?(""+s).trim():s+"px"}function N4(t,s){t=t.style;for(var w in s)if(s.hasOwnProperty(w)){var W=w.indexOf("--")===0,K=z4(w,s[w],W);w==="float"&&(w="cssFloat"),W?t.setProperty(w,K):t[w]=K}}var uC=Mo({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function wx(t,s){if(s){if(uC[t]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(pa(137,t));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(pa(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(pa(61))}if(s.style!=null&&typeof s.style!="object")throw Error(pa(62))}}function Tx(t,s){if(t.indexOf("-")===-1)return typeof s.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ax=null;function _2(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Sx=null,r0=null,n0=null;function hw(t){if(t=qp(t)){if(typeof Sx!="function")throw Error(pa(280));var s=t.stateNode;s&&(s=py(s),Sx(t.stateNode,t.type,s))}}function B4(t){r0?n0?n0.push(t):n0=[t]:r0=t}function U4(){if(r0){var t=r0,s=n0;if(n0=r0=null,hw(t),s)for(t=0;t<s.length;t++)hw(s[t])}}function H4(t,s){return t(s)}function V4(){}var xm=!1;function G4(t,s,w){if(xm)return t(s,w);xm=!0;try{return H4(t,s,w)}finally{xm=!1,(r0!==null||n0!==null)&&(V4(),U4())}}function Pp(t,s){var w=t.stateNode;if(w===null)return null;var W=py(w);if(W===null)return null;w=W[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(W=!W.disabled)||(t=t.type,W=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!W;break e;default:t=!1}if(t)return null;if(w&&typeof w!="function")throw Error(pa(231,s,typeof w));return w}var Ex=!1;if(Yc)try{var J0={};Object.defineProperty(J0,"passive",{get:function(){Ex=!0}}),window.addEventListener("test",J0,J0),window.removeEventListener("test",J0,J0)}catch{Ex=!1}function fC(t,s,w,W,K,de,z,B,e){var d=Array.prototype.slice.call(arguments,3);try{s.apply(w,d)}catch(P){this.onError(P)}}var cp=!1,E1=null,M1=!1,Mx=null,cC={onError:function(t){cp=!0,E1=t}};function hC(t,s,w,W,K,de,z,B,e){cp=!1,E1=null,fC.apply(cC,arguments)}function vC(t,s,w,W,K,de,z,B,e){if(hC.apply(this,arguments),cp){if(cp){var d=E1;cp=!1,E1=null}else throw Error(pa(198));M1||(M1=!0,Mx=d)}}function ad(t){var s=t,w=t;if(t.alternate)for(;s.return;)s=s.return;else{t=s;do s=t,s.flags&4098&&(w=s.return),t=s.return;while(t)}return s.tag===3?w:null}function W4(t){if(t.tag===13){var s=t.memoizedState;if(s===null&&(t=t.alternate,t!==null&&(s=t.memoizedState)),s!==null)return s.dehydrated}return null}function vw(t){if(ad(t)!==t)throw Error(pa(188))}function dC(t){var s=t.alternate;if(!s){if(s=ad(t),s===null)throw Error(pa(188));return s!==t?null:t}for(var w=t,W=s;;){var K=w.return;if(K===null)break;var de=K.alternate;if(de===null){if(W=K.return,W!==null){w=W;continue}break}if(K.child===de.child){for(de=K.child;de;){if(de===w)return vw(K),t;if(de===W)return vw(K),s;de=de.sibling}throw Error(pa(188))}if(w.return!==W.return)w=K,W=de;else{for(var z=!1,B=K.child;B;){if(B===w){z=!0,w=K,W=de;break}if(B===W){z=!0,W=K,w=de;break}B=B.sibling}if(!z){for(B=de.child;B;){if(B===w){z=!0,w=de,W=K;break}if(B===W){z=!0,W=de,w=K;break}B=B.sibling}if(!z)throw Error(pa(189))}}if(w.alternate!==W)throw Error(pa(190))}if(w.tag!==3)throw Error(pa(188));return w.stateNode.current===w?t:s}function Y4(t){return t=dC(t),t!==null?X4(t):null}function X4(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var s=X4(t);if(s!==null)return s;t=t.sibling}return null}var Z4=cu.unstable_scheduleCallback,dw=cu.unstable_cancelCallback,pC=cu.unstable_shouldYield,gC=cu.unstable_requestPaint,Uo=cu.unstable_now,yC=cu.unstable_getCurrentPriorityLevel,R2=cu.unstable_ImmediatePriority,j4=cu.unstable_UserBlockingPriority,C1=cu.unstable_NormalPriority,mC=cu.unstable_LowPriority,K4=cu.unstable_IdlePriority,cy=null,rc=null;function xC(t){if(rc&&typeof rc.onCommitFiberRoot=="function")try{rc.onCommitFiberRoot(cy,t,void 0,(t.current.flags&128)===128)}catch{}}var Af=Math.clz32?Math.clz32:TC,bC=Math.log,wC=Math.LN2;function TC(t){return t>>>=0,t===0?32:31-(bC(t)/wC|0)|0}var Bg=64,Ug=4194304;function sp(t){switch(t&-t){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: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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function L1(t,s){var w=t.pendingLanes;if(w===0)return 0;var W=0,K=t.suspendedLanes,de=t.pingedLanes,z=w&268435455;if(z!==0){var B=z&~K;B!==0?W=sp(B):(de&=z,de!==0&&(W=sp(de)))}else z=w&~K,z!==0?W=sp(z):de!==0&&(W=sp(de));if(W===0)return 0;if(s!==0&&s!==W&&!(s&K)&&(K=W&-W,de=s&-s,K>=de||K===16&&(de&4194240)!==0))return s;if(W&4&&(W|=w&16),s=t.entangledLanes,s!==0)for(t=t.entanglements,s&=W;0<s;)w=31-Af(s),K=1<<w,W|=t[w],s&=~K;return W}function AC(t,s){switch(t){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64: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 s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function SC(t,s){for(var w=t.suspendedLanes,W=t.pingedLanes,K=t.expirationTimes,de=t.pendingLanes;0<de;){var z=31-Af(de),B=1<<z,e=K[z];e===-1?(!(B&w)||B&W)&&(K[z]=AC(B,s)):e<=s&&(t.expiredLanes|=B),de&=~B}}function Cx(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function J4(){var t=Bg;return Bg<<=1,!(Bg&4194240)&&(Bg=64),t}function bm(t){for(var s=[],w=0;31>w;w++)s.push(t);return s}function $p(t,s,w){t.pendingLanes|=s,s!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,s=31-Af(s),t[s]=w}function EC(t,s){var w=t.pendingLanes&~s;t.pendingLanes=s,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=s,t.mutableReadLanes&=s,t.entangledLanes&=s,s=t.entanglements;var W=t.eventTimes;for(t=t.expirationTimes;0<w;){var K=31-Af(w),de=1<<K;s[K]=0,W[K]=-1,t[K]=-1,w&=~de}}function D2(t,s){var w=t.entangledLanes|=s;for(t=t.entanglements;w;){var W=31-Af(w),K=1<<W;K&s|t[W]&s&&(t[W]|=s),w&=~K}}var Yi=0;function $4(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var Q4,I2,q4,eA,tA,Lx=!1,Hg=[],Vh=null,Gh=null,Wh=null,_p=new Map,Rp=new Map,kh=[],MC="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function pw(t,s){switch(t){case"focusin":case"focusout":Vh=null;break;case"dragenter":case"dragleave":Gh=null;break;case"mouseover":case"mouseout":Wh=null;break;case"pointerover":case"pointerout":_p.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rp.delete(s.pointerId)}}function $0(t,s,w,W,K,de){return t===null||t.nativeEvent!==de?(t={blockedOn:s,domEventName:w,eventSystemFlags:W,nativeEvent:de,targetContainers:[K]},s!==null&&(s=qp(s),s!==null&&I2(s)),t):(t.eventSystemFlags|=W,s=t.targetContainers,K!==null&&s.indexOf(K)===-1&&s.push(K),t)}function CC(t,s,w,W,K){switch(s){case"focusin":return Vh=$0(Vh,t,s,w,W,K),!0;case"dragenter":return Gh=$0(Gh,t,s,w,W,K),!0;case"mouseover":return Wh=$0(Wh,t,s,w,W,K),!0;case"pointerover":var de=K.pointerId;return _p.set(de,$0(_p.get(de)||null,t,s,w,W,K)),!0;case"gotpointercapture":return de=K.pointerId,Rp.set(de,$0(Rp.get(de)||null,t,s,w,W,K)),!0}return!1}function rA(t){var s=Vv(t.target);if(s!==null){var w=ad(s);if(w!==null){if(s=w.tag,s===13){if(s=W4(w),s!==null){t.blockedOn=s,tA(t.priority,function(){q4(w)});return}}else if(s===3&&w.stateNode.current.memoizedState.isDehydrated){t.blockedOn=w.tag===3?w.stateNode.containerInfo:null;return}}}t.blockedOn=null}function v1(t){if(t.blockedOn!==null)return!1;for(var s=t.targetContainers;0<s.length;){var w=Px(t.domEventName,t.eventSystemFlags,s[0],t.nativeEvent);if(w===null){w=t.nativeEvent;var W=new w.constructor(w.type,w);Ax=W,w.target.dispatchEvent(W),Ax=null}else return s=qp(w),s!==null&&I2(s),t.blockedOn=w,!1;s.shift()}return!0}function gw(t,s,w){v1(t)&&w.delete(s)}function LC(){Lx=!1,Vh!==null&&v1(Vh)&&(Vh=null),Gh!==null&&v1(Gh)&&(Gh=null),Wh!==null&&v1(Wh)&&(Wh=null),_p.forEach(gw),Rp.forEach(gw)}function Q0(t,s){t.blockedOn===s&&(t.blockedOn=null,Lx||(Lx=!0,cu.unstable_scheduleCallback(cu.unstable_NormalPriority,LC)))}function Dp(t){function s(K){return Q0(K,t)}if(0<Hg.length){Q0(Hg[0],t);for(var w=1;w<Hg.length;w++){var W=Hg[w];W.blockedOn===t&&(W.blockedOn=null)}}for(Vh!==null&&Q0(Vh,t),Gh!==null&&Q0(Gh,t),Wh!==null&&Q0(Wh,t),_p.forEach(s),Rp.forEach(s),w=0;w<kh.length;w++)W=kh[w],W.blockedOn===t&&(W.blockedOn=null);for(;0<kh.length&&(w=kh[0],w.blockedOn===null);)rA(w),w.blockedOn===null&&kh.shift()}var a0=$c.ReactCurrentBatchConfig,P1=!0;function PC(t,s,w,W){var K=Yi,de=a0.transition;a0.transition=null;try{Yi=1,F2(t,s,w,W)}finally{Yi=K,a0.transition=de}}function _C(t,s,w,W){var K=Yi,de=a0.transition;a0.transition=null;try{Yi=4,F2(t,s,w,W)}finally{Yi=K,a0.transition=de}}function F2(t,s,w,W){if(P1){var K=Px(t,s,w,W);if(K===null)_m(t,s,W,_1,w),pw(t,W);else if(CC(K,t,s,w,W))W.stopPropagation();else if(pw(t,W),s&4&&-1<MC.indexOf(t)){for(;K!==null;){var de=qp(K);if(de!==null&&Q4(de),de=Px(t,s,w,W),de===null&&_m(t,s,W,_1,w),de===K)break;K=de}K!==null&&W.stopPropagation()}else _m(t,s,W,null,w)}}var _1=null;function Px(t,s,w,W){if(_1=null,t=_2(W),t=Vv(t),t!==null)if(s=ad(t),s===null)t=null;else if(w=s.tag,w===13){if(t=W4(s),t!==null)return t;t=null}else if(w===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;t=null}else s!==t&&(t=null);return _1=t,null}function nA(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(yC()){case R2:return 1;case j4:return 4;case C1:case mC:return 16;case K4:return 536870912;default:return 16}default:return 16}}var zh=null,k2=null,d1=null;function aA(){if(d1)return d1;var t,s=k2,w=s.length,W,K="value"in zh?zh.value:zh.textContent,de=K.length;for(t=0;t<w&&s[t]===K[t];t++);var z=w-t;for(W=1;W<=z&&s[w-W]===K[de-W];W++);return d1=K.slice(t,1<W?1-W:void 0)}function p1(t){var s=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&s===13&&(t=13)):t=s,t===10&&(t=13),32<=t||t===13?t:0}function Vg(){return!0}function yw(){return!1}function du(t){function s(w,W,K,de,z){this._reactName=w,this._targetInst=K,this.type=W,this.nativeEvent=de,this.target=z,this.currentTarget=null;for(var B in t)t.hasOwnProperty(B)&&(w=t[B],this[B]=w?w(de):de[B]);return this.isDefaultPrevented=(de.defaultPrevented!=null?de.defaultPrevented:de.returnValue===!1)?Vg:yw,this.isPropagationStopped=yw,this}return Mo(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var w=this.nativeEvent;w&&(w.preventDefault?w.preventDefault():typeof w.returnValue!="unknown"&&(w.returnValue=!1),this.isDefaultPrevented=Vg)},stopPropagation:function(){var w=this.nativeEvent;w&&(w.stopPropagation?w.stopPropagation():typeof w.cancelBubble!="unknown"&&(w.cancelBubble=!0),this.isPropagationStopped=Vg)},persist:function(){},isPersistent:Vg}),s}var b0={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},O2=du(b0),Qp=Mo({},b0,{view:0,detail:0}),RC=du(Qp),wm,Tm,q0,hy=Mo({},Qp,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:z2,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==q0&&(q0&&t.type==="mousemove"?(wm=t.screenX-q0.screenX,Tm=t.screenY-q0.screenY):Tm=wm=0,q0=t),wm)},movementY:function(t){return"movementY"in t?t.movementY:Tm}}),mw=du(hy),DC=Mo({},hy,{dataTransfer:0}),IC=du(DC),FC=Mo({},Qp,{relatedTarget:0}),Am=du(FC),kC=Mo({},b0,{animationName:0,elapsedTime:0,pseudoElement:0}),OC=du(kC),zC=Mo({},b0,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),NC=du(zC),BC=Mo({},b0,{data:0}),xw=du(BC),UC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},HC={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},VC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function GC(t){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(t):(t=VC[t])?!!s[t]:!1}function z2(){return GC}var WC=Mo({},Qp,{key:function(t){if(t.key){var s=UC[t.key]||t.key;if(s!=="Unidentified")return s}return t.type==="keypress"?(t=p1(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?HC[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:z2,charCode:function(t){return t.type==="keypress"?p1(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?p1(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),YC=du(WC),XC=Mo({},hy,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bw=du(XC),ZC=Mo({},Qp,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:z2}),jC=du(ZC),KC=Mo({},b0,{propertyName:0,elapsedTime:0,pseudoElement:0}),JC=du(KC),$C=Mo({},hy,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),QC=du($C),qC=[9,13,27,32],N2=Yc&&"CompositionEvent"in window,hp=null;Yc&&"documentMode"in document&&(hp=document.documentMode);var e7=Yc&&"TextEvent"in window&&!hp,iA=Yc&&(!N2||hp&&8<hp&&11>=hp),ww=String.fromCharCode(32),Tw=!1;function oA(t,s){switch(t){case"keyup":return qC.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sA(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Wd=!1;function t7(t,s){switch(t){case"compositionend":return sA(s);case"keypress":return s.which!==32?null:(Tw=!0,ww);case"textInput":return t=s.data,t===ww&&Tw?null:t;default:return null}}function r7(t,s){if(Wd)return t==="compositionend"||!N2&&oA(t,s)?(t=aA(),d1=k2=zh=null,Wd=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return iA&&s.locale!=="ko"?null:s.data;default:return null}}var n7={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Aw(t){var s=t&&t.nodeName&&t.nodeName.toLowerCase();return s==="input"?!!n7[t.type]:s==="textarea"}function lA(t,s,w,W){B4(W),s=R1(s,"onChange"),0<s.length&&(w=new O2("onChange","change",null,w,W),t.push({event:w,listeners:s}))}var vp=null,Ip=null;function a7(t){xA(t,0)}function vy(t){var s=Zd(t);if(D4(s))return t}function i7(t,s){if(t==="change")return s}var uA=!1;if(Yc){var Sm;if(Yc){var Em="oninput"in document;if(!Em){var Sw=document.createElement("div");Sw.setAttribute("oninput","return;"),Em=typeof Sw.oninput=="function"}Sm=Em}else Sm=!1;uA=Sm&&(!document.documentMode||9<document.documentMode)}function Ew(){vp&&(vp.detachEvent("onpropertychange",fA),Ip=vp=null)}function fA(t){if(t.propertyName==="value"&&vy(Ip)){var s=[];lA(s,Ip,t,_2(t)),G4(a7,s)}}function o7(t,s,w){t==="focusin"?(Ew(),vp=s,Ip=w,vp.attachEvent("onpropertychange",fA)):t==="focusout"&&Ew()}function s7(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return vy(Ip)}function l7(t,s){if(t==="click")return vy(s)}function u7(t,s){if(t==="input"||t==="change")return vy(s)}function f7(t,s){return t===s&&(t!==0||1/t===1/s)||t!==t&&s!==s}var Cf=typeof Object.is=="function"?Object.is:f7;function Fp(t,s){if(Cf(t,s))return!0;if(typeof t!="object"||t===null||typeof s!="object"||s===null)return!1;var w=Object.keys(t),W=Object.keys(s);if(w.length!==W.length)return!1;for(W=0;W<w.length;W++){var K=w[W];if(!cx.call(s,K)||!Cf(t[K],s[K]))return!1}return!0}function Mw(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Cw(t,s){var w=Mw(t);t=0;for(var W;w;){if(w.nodeType===3){if(W=t+w.textContent.length,t<=s&&W>=s)return{node:w,offset:s-t};t=W}e:{for(;w;){if(w.nextSibling){w=w.nextSibling;break e}w=w.parentNode}w=void 0}w=Mw(w)}}function cA(t,s){return t&&s?t===s?!0:t&&t.nodeType===3?!1:s&&s.nodeType===3?cA(t,s.parentNode):"contains"in t?t.contains(s):t.compareDocumentPosition?!!(t.compareDocumentPosition(s)&16):!1:!1}function hA(){for(var t=window,s=S1();s instanceof t.HTMLIFrameElement;){try{var w=typeof s.contentWindow.location.href=="string"}catch{w=!1}if(w)t=s.contentWindow;else break;s=S1(t.document)}return s}function B2(t){var s=t&&t.nodeName&&t.nodeName.toLowerCase();return s&&(s==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||s==="textarea"||t.contentEditable==="true")}function c7(t){var s=hA(),w=t.focusedElem,W=t.selectionRange;if(s!==w&&w&&w.ownerDocument&&cA(w.ownerDocument.documentElement,w)){if(W!==null&&B2(w)){if(s=W.start,t=W.end,t===void 0&&(t=s),"selectionStart"in w)w.selectionStart=s,w.selectionEnd=Math.min(t,w.value.length);else if(t=(s=w.ownerDocument||document)&&s.defaultView||window,t.getSelection){t=t.getSelection();var K=w.textContent.length,de=Math.min(W.start,K);W=W.end===void 0?de:Math.min(W.end,K),!t.extend&&de>W&&(K=W,W=de,de=K),K=Cw(w,de);var z=Cw(w,W);K&&z&&(t.rangeCount!==1||t.anchorNode!==K.node||t.anchorOffset!==K.offset||t.focusNode!==z.node||t.focusOffset!==z.offset)&&(s=s.createRange(),s.setStart(K.node,K.offset),t.removeAllRanges(),de>W?(t.addRange(s),t.extend(z.node,z.offset)):(s.setEnd(z.node,z.offset),t.addRange(s)))}}for(s=[],t=w;t=t.parentNode;)t.nodeType===1&&s.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<s.length;w++)t=s[w],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var h7=Yc&&"documentMode"in document&&11>=document.documentMode,Yd=null,_x=null,dp=null,Rx=!1;function Lw(t,s,w){var W=w.window===w?w.document:w.nodeType===9?w:w.ownerDocument;Rx||Yd==null||Yd!==S1(W)||(W=Yd,"selectionStart"in W&&B2(W)?W={start:W.selectionStart,end:W.selectionEnd}:(W=(W.ownerDocument&&W.ownerDocument.defaultView||window).getSelection(),W={anchorNode:W.anchorNode,anchorOffset:W.anchorOffset,focusNode:W.focusNode,focusOffset:W.focusOffset}),dp&&Fp(dp,W)||(dp=W,W=R1(_x,"onSelect"),0<W.length&&(s=new O2("onSelect","select",null,s,w),t.push({event:s,listeners:W}),s.target=Yd)))}function Gg(t,s){var w={};return w[t.toLowerCase()]=s.toLowerCase(),w["Webkit"+t]="webkit"+s,w["Moz"+t]="moz"+s,w}var Xd={animationend:Gg("Animation","AnimationEnd"),animationiteration:Gg("Animation","AnimationIteration"),animationstart:Gg("Animation","AnimationStart"),transitionend:Gg("Transition","TransitionEnd")},Mm={},vA={};Yc&&(vA=document.createElement("div").style,"AnimationEvent"in window||(delete Xd.animationend.animation,delete Xd.animationiteration.animation,delete Xd.animationstart.animation),"TransitionEvent"in window||delete Xd.transitionend.transition);function dy(t){if(Mm[t])return Mm[t];if(!Xd[t])return t;var s=Xd[t],w;for(w in s)if(s.hasOwnProperty(w)&&w in vA)return Mm[t]=s[w];return t}var dA=dy("animationend"),pA=dy("animationiteration"),gA=dy("animationstart"),yA=dy("transitionend"),mA=new Map,Pw="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function rv(t,s){mA.set(t,s),nd(s,[t])}for(var Cm=0;Cm<Pw.length;Cm++){var Lm=Pw[Cm],v7=Lm.toLowerCase(),d7=Lm[0].toUpperCase()+Lm.slice(1);rv(v7,"on"+d7)}rv(dA,"onAnimationEnd");rv(pA,"onAnimationIteration");rv(gA,"onAnimationStart");rv("dblclick","onDoubleClick");rv("focusin","onFocus");rv("focusout","onBlur");rv(yA,"onTransitionEnd");c0("onMouseEnter",["mouseout","mouseover"]);c0("onMouseLeave",["mouseout","mouseover"]);c0("onPointerEnter",["pointerout","pointerover"]);c0("onPointerLeave",["pointerout","pointerover"]);nd("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));nd("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));nd("onBeforeInput",["compositionend","keypress","textInput","paste"]);nd("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));nd("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));nd("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lp="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),p7=new Set("cancel close invalid load scroll toggle".split(" ").concat(lp));function _w(t,s,w){var W=t.type||"unknown-event";t.currentTarget=w,vC(W,s,void 0,t),t.currentTarget=null}function xA(t,s){s=(s&4)!==0;for(var w=0;w<t.length;w++){var W=t[w],K=W.event;W=W.listeners;e:{var de=void 0;if(s)for(var z=W.length-1;0<=z;z--){var B=W[z],e=B.instance,d=B.currentTarget;if(B=B.listener,e!==de&&K.isPropagationStopped())break e;_w(K,B,d),de=e}else for(z=0;z<W.length;z++){if(B=W[z],e=B.instance,d=B.currentTarget,B=B.listener,e!==de&&K.isPropagationStopped())break e;_w(K,B,d),de=e}}}if(M1)throw t=Mx,M1=!1,Mx=null,t}function oo(t,s){var w=s[Ox];w===void 0&&(w=s[Ox]=new Set);var W=t+"__bubble";w.has(W)||(bA(s,t,2,!1),w.add(W))}function Pm(t,s,w){var W=0;s&&(W|=4),bA(w,t,W,s)}var Wg="_reactListening"+Math.random().toString(36).slice(2);function kp(t){if(!t[Wg]){t[Wg]=!0,C4.forEach(function(w){w!=="selectionchange"&&(p7.has(w)||Pm(w,!1,t),Pm(w,!0,t))});var s=t.nodeType===9?t:t.ownerDocument;s===null||s[Wg]||(s[Wg]=!0,Pm("selectionchange",!1,s))}}function bA(t,s,w,W){switch(nA(s)){case 1:var K=PC;break;case 4:K=_C;break;default:K=F2}w=K.bind(null,s,w,t),K=void 0,!Ex||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(K=!0),W?K!==void 0?t.addEventListener(s,w,{capture:!0,passive:K}):t.addEventListener(s,w,!0):K!==void 0?t.addEventListener(s,w,{passive:K}):t.addEventListener(s,w,!1)}function _m(t,s,w,W,K){var de=W;if(!(s&1)&&!(s&2)&&W!==null)e:for(;;){if(W===null)return;var z=W.tag;if(z===3||z===4){var B=W.stateNode.containerInfo;if(B===K||B.nodeType===8&&B.parentNode===K)break;if(z===4)for(z=W.return;z!==null;){var e=z.tag;if((e===3||e===4)&&(e=z.stateNode.containerInfo,e===K||e.nodeType===8&&e.parentNode===K))return;z=z.return}for(;B!==null;){if(z=Vv(B),z===null)return;if(e=z.tag,e===5||e===6){W=de=z;continue e}B=B.parentNode}}W=W.return}G4(function(){var d=de,P=_2(w),a=[];e:{var _=mA.get(t);if(_!==void 0){var x=O2,v=t;switch(t){case"keypress":if(p1(w)===0)break e;case"keydown":case"keyup":x=YC;break;case"focusin":v="focus",x=Am;break;case"focusout":v="blur",x=Am;break;case"beforeblur":case"afterblur":x=Am;break;case"click":if(w.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":x=mw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":x=IC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":x=jC;break;case dA:case pA:case gA:x=OC;break;case yA:x=JC;break;case"scroll":x=RC;break;case"wheel":x=QC;break;case"copy":case"cut":case"paste":x=NC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":x=bw}var y=(s&4)!==0,r=!y&&t==="scroll",n=y?_!==null?_+"Capture":null:_;y=[];for(var u=d,i;u!==null;){i=u;var f=i.stateNode;if(i.tag===5&&f!==null&&(i=f,n!==null&&(f=Pp(u,n),f!=null&&y.push(Op(u,f,i)))),r)break;u=u.return}0<y.length&&(_=new x(_,v,null,w,P),a.push({event:_,listeners:y}))}}if(!(s&7)){e:{if(_=t==="mouseover"||t==="pointerover",x=t==="mouseout"||t==="pointerout",_&&w!==Ax&&(v=w.relatedTarget||w.fromElement)&&(Vv(v)||v[Xc]))break e;if((x||_)&&(_=P.window===P?P:(_=P.ownerDocument)?_.defaultView||_.parentWindow:window,x?(v=w.relatedTarget||w.toElement,x=d,v=v?Vv(v):null,v!==null&&(r=ad(v),v!==r||v.tag!==5&&v.tag!==6)&&(v=null)):(x=null,v=d),x!==v)){if(y=mw,f="onMouseLeave",n="onMouseEnter",u="mouse",(t==="pointerout"||t==="pointerover")&&(y=bw,f="onPointerLeave",n="onPointerEnter",u="pointer"),r=x==null?_:Zd(x),i=v==null?_:Zd(v),_=new y(f,u+"leave",x,w,P),_.target=r,_.relatedTarget=i,f=null,Vv(P)===d&&(y=new y(n,u+"enter",v,w,P),y.target=i,y.relatedTarget=r,f=y),r=f,x&&v)t:{for(y=x,n=v,u=0,i=y;i;i=Od(i))u++;for(i=0,f=n;f;f=Od(f))i++;for(;0<u-i;)y=Od(y),u--;for(;0<i-u;)n=Od(n),i--;for(;u--;){if(y===n||n!==null&&y===n.alternate)break t;y=Od(y),n=Od(n)}y=null}else y=null;x!==null&&Rw(a,_,x,y,!1),v!==null&&r!==null&&Rw(a,r,v,y,!0)}}e:{if(_=d?Zd(d):window,x=_.nodeName&&_.nodeName.toLowerCase(),x==="select"||x==="input"&&_.type==="file")var g=i7;else if(Aw(_))if(uA)g=u7;else{g=s7;var h=o7}else(x=_.nodeName)&&x.toLowerCase()==="input"&&(_.type==="checkbox"||_.type==="radio")&&(g=l7);if(g&&(g=g(t,d))){lA(a,g,w,P);break e}h&&h(t,_,d),t==="focusout"&&(h=_._wrapperState)&&h.controlled&&_.type==="number"&&mx(_,"number",_.value)}switch(h=d?Zd(d):window,t){case"focusin":(Aw(h)||h.contentEditable==="true")&&(Yd=h,_x=d,dp=null);break;case"focusout":dp=_x=Yd=null;break;case"mousedown":Rx=!0;break;case"contextmenu":case"mouseup":case"dragend":Rx=!1,Lw(a,w,P);break;case"selectionchange":if(h7)break;case"keydown":case"keyup":Lw(a,w,P)}var b;if(N2)e:{switch(t){case"compositionstart":var p="onCompositionStart";break e;case"compositionend":p="onCompositionEnd";break e;case"compositionupdate":p="onCompositionUpdate";break e}p=void 0}else Wd?oA(t,w)&&(p="onCompositionEnd"):t==="keydown"&&w.keyCode===229&&(p="onCompositionStart");p&&(iA&&w.locale!=="ko"&&(Wd||p!=="onCompositionStart"?p==="onCompositionEnd"&&Wd&&(b=aA()):(zh=P,k2="value"in zh?zh.value:zh.textContent,Wd=!0)),h=R1(d,p),0<h.length&&(p=new xw(p,t,null,w,P),a.push({event:p,listeners:h}),b?p.data=b:(b=sA(w),b!==null&&(p.data=b)))),(b=e7?t7(t,w):r7(t,w))&&(d=R1(d,"onBeforeInput"),0<d.length&&(P=new xw("onBeforeInput","beforeinput",null,w,P),a.push({event:P,listeners:d}),P.data=b))}xA(a,s)})}function Op(t,s,w){return{instance:t,listener:s,currentTarget:w}}function R1(t,s){for(var w=s+"Capture",W=[];t!==null;){var K=t,de=K.stateNode;K.tag===5&&de!==null&&(K=de,de=Pp(t,w),de!=null&&W.unshift(Op(t,de,K)),de=Pp(t,s),de!=null&&W.push(Op(t,de,K))),t=t.return}return W}function Od(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Rw(t,s,w,W,K){for(var de=s._reactName,z=[];w!==null&&w!==W;){var B=w,e=B.alternate,d=B.stateNode;if(e!==null&&e===W)break;B.tag===5&&d!==null&&(B=d,K?(e=Pp(w,de),e!=null&&z.unshift(Op(w,e,B))):K||(e=Pp(w,de),e!=null&&z.push(Op(w,e,B)))),w=w.return}z.length!==0&&t.push({event:s,listeners:z})}var g7=/\r\n?/g,y7=/\u0000|\uFFFD/g;function Dw(t){return(typeof t=="string"?t:""+t).replace(g7,`
`).replace(y7,"")}function Yg(t,s,w){if(s=Dw(s),Dw(t)!==s&&w)throw Error(pa(425))}function D1(){}var Dx=null,Ix=null;function Fx(t,s){return t==="textarea"||t==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var kx=typeof setTimeout=="function"?setTimeout:void 0,m7=typeof clearTimeout=="function"?clearTimeout:void 0,Iw=typeof Promise=="function"?Promise:void 0,x7=typeof queueMicrotask=="function"?queueMicrotask:typeof Iw<"u"?function(t){return Iw.resolve(null).then(t).catch(b7)}:kx;function b7(t){setTimeout(function(){throw t})}function Rm(t,s){var w=s,W=0;do{var K=w.nextSibling;if(t.removeChild(w),K&&K.nodeType===8)if(w=K.data,w==="/$"){if(W===0){t.removeChild(K),Dp(s);return}W--}else w!=="$"&&w!=="$?"&&w!=="$!"||W++;w=K}while(w);Dp(s)}function Yh(t){for(;t!=null;t=t.nextSibling){var s=t.nodeType;if(s===1||s===3)break;if(s===8){if(s=t.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return t}function Fw(t){t=t.previousSibling;for(var s=0;t;){if(t.nodeType===8){var w=t.data;if(w==="$"||w==="$!"||w==="$?"){if(s===0)return t;s--}else w==="/$"&&s++}t=t.previousSibling}return null}var w0=Math.random().toString(36).slice(2),tc="__reactFiber$"+w0,zp="__reactProps$"+w0,Xc="__reactContainer$"+w0,Ox="__reactEvents$"+w0,w7="__reactListeners$"+w0,T7="__reactHandles$"+w0;function Vv(t){var s=t[tc];if(s)return s;for(var w=t.parentNode;w;){if(s=w[Xc]||w[tc]){if(w=s.alternate,s.child!==null||w!==null&&w.child!==null)for(t=Fw(t);t!==null;){if(w=t[tc])return w;t=Fw(t)}return s}t=w,w=t.parentNode}return null}function qp(t){return t=t[tc]||t[Xc],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Zd(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(pa(33))}function py(t){return t[zp]||null}var zx=[],jd=-1;function nv(t){return{current:t}}function so(t){0>jd||(t.current=zx[jd],zx[jd]=null,jd--)}function ro(t,s){jd++,zx[jd]=t.current,t.current=s}var $h={},tl=nv($h),Nl=nv(!1),jv=$h;function h0(t,s){var w=t.type.contextTypes;if(!w)return $h;var W=t.stateNode;if(W&&W.__reactInternalMemoizedUnmaskedChildContext===s)return W.__reactInternalMemoizedMaskedChildContext;var K={},de;for(de in w)K[de]=s[de];return W&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=K),K}function Bl(t){return t=t.childContextTypes,t!=null}function I1(){so(Nl),so(tl)}function kw(t,s,w){if(tl.current!==$h)throw Error(pa(168));ro(tl,s),ro(Nl,w)}function wA(t,s,w){var W=t.stateNode;if(s=s.childContextTypes,typeof W.getChildContext!="function")return w;W=W.getChildContext();for(var K in W)if(!(K in s))throw Error(pa(108,oC(t)||"Unknown",K));return Mo({},w,W)}function F1(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||$h,jv=tl.current,ro(tl,t),ro(Nl,Nl.current),!0}function Ow(t,s,w){var W=t.stateNode;if(!W)throw Error(pa(169));w?(t=wA(t,s,jv),W.__reactInternalMemoizedMergedChildContext=t,so(Nl),so(tl),ro(tl,t)):so(Nl),ro(Nl,w)}var zc=null,gy=!1,Dm=!1;function TA(t){zc===null?zc=[t]:zc.push(t)}function A7(t){gy=!0,TA(t)}function av(){if(!Dm&&zc!==null){Dm=!0;var t=0,s=Yi;try{var w=zc;for(Yi=1;t<w.length;t++){var W=w[t];do W=W(!0);while(W!==null)}zc=null,gy=!1}catch(K){throw zc!==null&&(zc=zc.slice(t+1)),Z4(R2,av),K}finally{Yi=s,Dm=!1}}return null}var Kd=[],Jd=0,k1=null,O1=0,Ou=[],zu=0,Kv=null,Nc=1,Bc="";function Ov(t,s){Kd[Jd++]=O1,Kd[Jd++]=k1,k1=t,O1=s}function AA(t,s,w){Ou[zu++]=Nc,Ou[zu++]=Bc,Ou[zu++]=Kv,Kv=t;var W=Nc;t=Bc;var K=32-Af(W)-1;W&=~(1<<K),w+=1;var de=32-Af(s)+K;if(30<de){var z=K-K%5;de=(W&(1<<z)-1).toString(32),W>>=z,K-=z,Nc=1<<32-Af(s)+K|w<<K|W,Bc=de+t}else Nc=1<<de|w<<K|W,Bc=t}function U2(t){t.return!==null&&(Ov(t,1),AA(t,1,0))}function H2(t){for(;t===k1;)k1=Kd[--Jd],Kd[Jd]=null,O1=Kd[--Jd],Kd[Jd]=null;for(;t===Kv;)Kv=Ou[--zu],Ou[zu]=null,Bc=Ou[--zu],Ou[zu]=null,Nc=Ou[--zu],Ou[zu]=null}var fu=null,uu=null,vo=!1,bf=null;function SA(t,s){var w=Bu(5,null,null,0);w.elementType="DELETED",w.stateNode=s,w.return=t,s=t.deletions,s===null?(t.deletions=[w],t.flags|=16):s.push(w)}function zw(t,s){switch(t.tag){case 5:var w=t.type;return s=s.nodeType!==1||w.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(t.stateNode=s,fu=t,uu=Yh(s.firstChild),!0):!1;case 6:return s=t.pendingProps===""||s.nodeType!==3?null:s,s!==null?(t.stateNode=s,fu=t,uu=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(w=Kv!==null?{id:Nc,overflow:Bc}:null,t.memoizedState={dehydrated:s,treeContext:w,retryLane:1073741824},w=Bu(18,null,null,0),w.stateNode=s,w.return=t,t.child=w,fu=t,uu=null,!0):!1;default:return!1}}function Nx(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Bx(t){if(vo){var s=uu;if(s){var w=s;if(!zw(t,s)){if(Nx(t))throw Error(pa(418));s=Yh(w.nextSibling);var W=fu;s&&zw(t,s)?SA(W,w):(t.flags=t.flags&-4097|2,vo=!1,fu=t)}}else{if(Nx(t))throw Error(pa(418));t.flags=t.flags&-4097|2,vo=!1,fu=t}}}function Nw(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;fu=t}function Xg(t){if(t!==fu)return!1;if(!vo)return Nw(t),vo=!0,!1;var s;if((s=t.tag!==3)&&!(s=t.tag!==5)&&(s=t.type,s=s!=="head"&&s!=="body"&&!Fx(t.type,t.memoizedProps)),s&&(s=uu)){if(Nx(t))throw EA(),Error(pa(418));for(;s;)SA(t,s),s=Yh(s.nextSibling)}if(Nw(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(pa(317));e:{for(t=t.nextSibling,s=0;t;){if(t.nodeType===8){var w=t.data;if(w==="/$"){if(s===0){uu=Yh(t.nextSibling);break e}s--}else w!=="$"&&w!=="$!"&&w!=="$?"||s++}t=t.nextSibling}uu=null}}else uu=fu?Yh(t.stateNode.nextSibling):null;return!0}function EA(){for(var t=uu;t;)t=Yh(t.nextSibling)}function v0(){uu=fu=null,vo=!1}function V2(t){bf===null?bf=[t]:bf.push(t)}var S7=$c.ReactCurrentBatchConfig;function mf(t,s){if(t&&t.defaultProps){s=Mo({},s),t=t.defaultProps;for(var w in t)s[w]===void 0&&(s[w]=t[w]);return s}return s}var z1=nv(null),N1=null,$d=null,G2=null;function W2(){G2=$d=N1=null}function Y2(t){var s=z1.current;so(z1),t._currentValue=s}function Ux(t,s,w){for(;t!==null;){var W=t.alternate;if((t.childLanes&s)!==s?(t.childLanes|=s,W!==null&&(W.childLanes|=s)):W!==null&&(W.childLanes&s)!==s&&(W.childLanes|=s),t===w)break;t=t.return}}function i0(t,s){N1=t,G2=$d=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&s&&(zl=!0),t.firstContext=null)}function Hu(t){var s=t._currentValue;if(G2!==t)if(t={context:t,memoizedValue:s,next:null},$d===null){if(N1===null)throw Error(pa(308));$d=t,N1.dependencies={lanes:0,firstContext:t}}else $d=$d.next=t;return s}var Gv=null;function X2(t){Gv===null?Gv=[t]:Gv.push(t)}function MA(t,s,w,W){var K=s.interleaved;return K===null?(w.next=w,X2(s)):(w.next=K.next,K.next=w),s.interleaved=w,Zc(t,W)}function Zc(t,s){t.lanes|=s;var w=t.alternate;for(w!==null&&(w.lanes|=s),w=t,t=t.return;t!==null;)t.childLanes|=s,w=t.alternate,w!==null&&(w.childLanes|=s),w=t,t=t.return;return w.tag===3?w.stateNode:null}var Fh=!1;function Z2(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function CA(t,s){t=t.updateQueue,s.updateQueue===t&&(s.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Hc(t,s){return{eventTime:t,lane:s,tag:0,payload:null,callback:null,next:null}}function Xh(t,s,w){var W=t.updateQueue;if(W===null)return null;if(W=W.shared,_i&2){var K=W.pending;return K===null?s.next=s:(s.next=K.next,K.next=s),W.pending=s,Zc(t,w)}return K=W.interleaved,K===null?(s.next=s,X2(W)):(s.next=K.next,K.next=s),W.interleaved=s,Zc(t,w)}function g1(t,s,w){if(s=s.updateQueue,s!==null&&(s=s.shared,(w&4194240)!==0)){var W=s.lanes;W&=t.pendingLanes,w|=W,s.lanes=w,D2(t,w)}}function Bw(t,s){var w=t.updateQueue,W=t.alternate;if(W!==null&&(W=W.updateQueue,w===W)){var K=null,de=null;if(w=w.firstBaseUpdate,w!==null){do{var z={eventTime:w.eventTime,lane:w.lane,tag:w.tag,payload:w.payload,callback:w.callback,next:null};de===null?K=de=z:de=de.next=z,w=w.next}while(w!==null);de===null?K=de=s:de=de.next=s}else K=de=s;w={baseState:W.baseState,firstBaseUpdate:K,lastBaseUpdate:de,shared:W.shared,effects:W.effects},t.updateQueue=w;return}t=w.lastBaseUpdate,t===null?w.firstBaseUpdate=s:t.next=s,w.lastBaseUpdate=s}function B1(t,s,w,W){var K=t.updateQueue;Fh=!1;var de=K.firstBaseUpdate,z=K.lastBaseUpdate,B=K.shared.pending;if(B!==null){K.shared.pending=null;var e=B,d=e.next;e.next=null,z===null?de=d:z.next=d,z=e;var P=t.alternate;P!==null&&(P=P.updateQueue,B=P.lastBaseUpdate,B!==z&&(B===null?P.firstBaseUpdate=d:B.next=d,P.lastBaseUpdate=e))}if(de!==null){var a=K.baseState;z=0,P=d=e=null,B=de;do{var _=B.lane,x=B.eventTime;if((W&_)===_){P!==null&&(P=P.next={eventTime:x,lane:0,tag:B.tag,payload:B.payload,callback:B.callback,next:null});e:{var v=t,y=B;switch(_=s,x=w,y.tag){case 1:if(v=y.payload,typeof v=="function"){a=v.call(x,a,_);break e}a=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=y.payload,_=typeof v=="function"?v.call(x,a,_):v,_==null)break e;a=Mo({},a,_);break e;case 2:Fh=!0}}B.callback!==null&&B.lane!==0&&(t.flags|=64,_=K.effects,_===null?K.effects=[B]:_.push(B))}else x={eventTime:x,lane:_,tag:B.tag,payload:B.payload,callback:B.callback,next:null},P===null?(d=P=x,e=a):P=P.next=x,z|=_;if(B=B.next,B===null){if(B=K.shared.pending,B===null)break;_=B,B=_.next,_.next=null,K.lastBaseUpdate=_,K.shared.pending=null}}while(1);if(P===null&&(e=a),K.baseState=e,K.firstBaseUpdate=d,K.lastBaseUpdate=P,s=K.shared.interleaved,s!==null){K=s;do z|=K.lane,K=K.next;while(K!==s)}else de===null&&(K.shared.lanes=0);$v|=z,t.lanes=z,t.memoizedState=a}}function Uw(t,s,w){if(t=s.effects,s.effects=null,t!==null)for(s=0;s<t.length;s++){var W=t[s],K=W.callback;if(K!==null){if(W.callback=null,W=w,typeof K!="function")throw Error(pa(191,K));K.call(W)}}}var LA=new M4.Component().refs;function Hx(t,s,w,W){s=t.memoizedState,w=w(W,s),w=w==null?s:Mo({},s,w),t.memoizedState=w,t.lanes===0&&(t.updateQueue.baseState=w)}var yy={isMounted:function(t){return(t=t._reactInternals)?ad(t)===t:!1},enqueueSetState:function(t,s,w){t=t._reactInternals;var W=xl(),K=jh(t),de=Hc(W,K);de.payload=s,w!=null&&(de.callback=w),s=Xh(t,de,K),s!==null&&(Sf(s,t,K,W),g1(s,t,K))},enqueueReplaceState:function(t,s,w){t=t._reactInternals;var W=xl(),K=jh(t),de=Hc(W,K);de.tag=1,de.payload=s,w!=null&&(de.callback=w),s=Xh(t,de,K),s!==null&&(Sf(s,t,K,W),g1(s,t,K))},enqueueForceUpdate:function(t,s){t=t._reactInternals;var w=xl(),W=jh(t),K=Hc(w,W);K.tag=2,s!=null&&(K.callback=s),s=Xh(t,K,W),s!==null&&(Sf(s,t,W,w),g1(s,t,W))}};function Hw(t,s,w,W,K,de,z){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(W,de,z):s.prototype&&s.prototype.isPureReactComponent?!Fp(w,W)||!Fp(K,de):!0}function PA(t,s,w){var W=!1,K=$h,de=s.contextType;return typeof de=="object"&&de!==null?de=Hu(de):(K=Bl(s)?jv:tl.current,W=s.contextTypes,de=(W=W!=null)?h0(t,K):$h),s=new s(w,de),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=yy,t.stateNode=s,s._reactInternals=t,W&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=K,t.__reactInternalMemoizedMaskedChildContext=de),s}function Vw(t,s,w,W){t=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(w,W),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(w,W),s.state!==t&&yy.enqueueReplaceState(s,s.state,null)}function Vx(t,s,w,W){var K=t.stateNode;K.props=w,K.state=t.memoizedState,K.refs=LA,Z2(t);var de=s.contextType;typeof de=="object"&&de!==null?K.context=Hu(de):(de=Bl(s)?jv:tl.current,K.context=h0(t,de)),K.state=t.memoizedState,de=s.getDerivedStateFromProps,typeof de=="function"&&(Hx(t,s,de,w),K.state=t.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof K.getSnapshotBeforeUpdate=="function"||typeof K.UNSAFE_componentWillMount!="function"&&typeof K.componentWillMount!="function"||(s=K.state,typeof K.componentWillMount=="function"&&K.componentWillMount(),typeof K.UNSAFE_componentWillMount=="function"&&K.UNSAFE_componentWillMount(),s!==K.state&&yy.enqueueReplaceState(K,K.state,null),B1(t,w,K,W),K.state=t.memoizedState),typeof K.componentDidMount=="function"&&(t.flags|=4194308)}function ep(t,s,w){if(t=w.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(w._owner){if(w=w._owner,w){if(w.tag!==1)throw Error(pa(309));var W=w.stateNode}if(!W)throw Error(pa(147,t));var K=W,de=""+t;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===de?s.ref:(s=function(z){var B=K.refs;B===LA&&(B=K.refs={}),z===null?delete B[de]:B[de]=z},s._stringRef=de,s)}if(typeof t!="string")throw Error(pa(284));if(!w._owner)throw Error(pa(290,t))}return t}function Zg(t,s){throw t=Object.prototype.toString.call(s),Error(pa(31,t==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":t))}function Gw(t){var s=t._init;return s(t._payload)}function _A(t){function s(n,u){if(t){var i=n.deletions;i===null?(n.deletions=[u],n.flags|=16):i.push(u)}}function w(n,u){if(!t)return null;for(;u!==null;)s(n,u),u=u.sibling;return null}function W(n,u){for(n=new Map;u!==null;)u.key!==null?n.set(u.key,u):n.set(u.index,u),u=u.sibling;return n}function K(n,u){return n=Kh(n,u),n.index=0,n.sibling=null,n}function de(n,u,i){return n.index=i,t?(i=n.alternate,i!==null?(i=i.index,i<u?(n.flags|=2,u):i):(n.flags|=2,u)):(n.flags|=1048576,u)}function z(n){return t&&n.alternate===null&&(n.flags|=2),n}function B(n,u,i,f){return u===null||u.tag!==6?(u=Bm(i,n.mode,f),u.return=n,u):(u=K(u,i),u.return=n,u)}function e(n,u,i,f){var g=i.type;return g===Gd?P(n,u,i.props.children,f,i.key):u!==null&&(u.elementType===g||typeof g=="object"&&g!==null&&g.$$typeof===Ih&&Gw(g)===u.type)?(f=K(u,i.props),f.ref=ep(n,u,i),f.return=n,f):(f=T1(i.type,i.key,i.props,null,n.mode,f),f.ref=ep(n,u,i),f.return=n,f)}function d(n,u,i,f){return u===null||u.tag!==4||u.stateNode.containerInfo!==i.containerInfo||u.stateNode.implementation!==i.implementation?(u=Um(i,n.mode,f),u.return=n,u):(u=K(u,i.children||[]),u.return=n,u)}function P(n,u,i,f,g){return u===null||u.tag!==7?(u=Xv(i,n.mode,f,g),u.return=n,u):(u=K(u,i),u.return=n,u)}function a(n,u,i){if(typeof u=="string"&&u!==""||typeof u=="number")return u=Bm(""+u,n.mode,i),u.return=n,u;if(typeof u=="object"&&u!==null){switch(u.$$typeof){case Og:return i=T1(u.type,u.key,u.props,null,n.mode,i),i.ref=ep(n,null,u),i.return=n,i;case Vd:return u=Um(u,n.mode,i),u.return=n,u;case Ih:var f=u._init;return a(n,f(u._payload),i)}if(op(u)||K0(u))return u=Xv(u,n.mode,i,null),u.return=n,u;Zg(n,u)}return null}function _(n,u,i,f){var g=u!==null?u.key:null;if(typeof i=="string"&&i!==""||typeof i=="number")return g!==null?null:B(n,u,""+i,f);if(typeof i=="object"&&i!==null){switch(i.$$typeof){case Og:return i.key===g?e(n,u,i,f):null;case Vd:return i.key===g?d(n,u,i,f):null;case Ih:return g=i._init,_(n,u,g(i._payload),f)}if(op(i)||K0(i))return g!==null?null:P(n,u,i,f,null);Zg(n,i)}return null}function x(n,u,i,f,g){if(typeof f=="string"&&f!==""||typeof f=="number")return n=n.get(i)||null,B(u,n,""+f,g);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case Og:return n=n.get(f.key===null?i:f.key)||null,e(u,n,f,g);case Vd:return n=n.get(f.key===null?i:f.key)||null,d(u,n,f,g);case Ih:var h=f._init;return x(n,u,i,h(f._payload),g)}if(op(f)||K0(f))return n=n.get(i)||null,P(u,n,f,g,null);Zg(u,f)}return null}function v(n,u,i,f){for(var g=null,h=null,b=u,p=u=0,E=null;b!==null&&p<i.length;p++){b.index>p?(E=b,b=null):E=b.sibling;var c=_(n,b,i[p],f);if(c===null){b===null&&(b=E);break}t&&b&&c.alternate===null&&s(n,b),u=de(c,u,p),h===null?g=c:h.sibling=c,h=c,b=E}if(p===i.length)return w(n,b),vo&&Ov(n,p),g;if(b===null){for(;p<i.length;p++)b=a(n,i[p],f),b!==null&&(u=de(b,u,p),h===null?g=b:h.sibling=b,h=b);return vo&&Ov(n,p),g}for(b=W(n,b);p<i.length;p++)E=x(b,n,p,i[p],f),E!==null&&(t&&E.alternate!==null&&b.delete(E.key===null?p:E.key),u=de(E,u,p),h===null?g=E:h.sibling=E,h=E);return t&&b.forEach(function(l){return s(n,l)}),vo&&Ov(n,p),g}function y(n,u,i,f){var g=K0(i);if(typeof g!="function")throw Error(pa(150));if(i=g.call(i),i==null)throw Error(pa(151));for(var h=g=null,b=u,p=u=0,E=null,c=i.next();b!==null&&!c.done;p++,c=i.next()){b.index>p?(E=b,b=null):E=b.sibling;var l=_(n,b,c.value,f);if(l===null){b===null&&(b=E);break}t&&b&&l.alternate===null&&s(n,b),u=de(l,u,p),h===null?g=l:h.sibling=l,h=l,b=E}if(c.done)return w(n,b),vo&&Ov(n,p),g;if(b===null){for(;!c.done;p++,c=i.next())c=a(n,c.value,f),c!==null&&(u=de(c,u,p),h===null?g=c:h.sibling=c,h=c);return vo&&Ov(n,p),g}for(b=W(n,b);!c.done;p++,c=i.next())c=x(b,n,p,c.value,f),c!==null&&(t&&c.alternate!==null&&b.delete(c.key===null?p:c.key),u=de(c,u,p),h===null?g=c:h.sibling=c,h=c);return t&&b.forEach(function(m){return s(n,m)}),vo&&Ov(n,p),g}function r(n,u,i,f){if(typeof i=="object"&&i!==null&&i.type===Gd&&i.key===null&&(i=i.props.children),typeof i=="object"&&i!==null){switch(i.$$typeof){case Og:e:{for(var g=i.key,h=u;h!==null;){if(h.key===g){if(g=i.type,g===Gd){if(h.tag===7){w(n,h.sibling),u=K(h,i.props.children),u.return=n,n=u;break e}}else if(h.elementType===g||typeof g=="object"&&g!==null&&g.$$typeof===Ih&&Gw(g)===h.type){w(n,h.sibling),u=K(h,i.props),u.ref=ep(n,h,i),u.return=n,n=u;break e}w(n,h);break}else s(n,h);h=h.sibling}i.type===Gd?(u=Xv(i.props.children,n.mode,f,i.key),u.return=n,n=u):(f=T1(i.type,i.key,i.props,null,n.mode,f),f.ref=ep(n,u,i),f.return=n,n=f)}return z(n);case Vd:e:{for(h=i.key;u!==null;){if(u.key===h)if(u.tag===4&&u.stateNode.containerInfo===i.containerInfo&&u.stateNode.implementation===i.implementation){w(n,u.sibling),u=K(u,i.children||[]),u.return=n,n=u;break e}else{w(n,u);break}else s(n,u);u=u.sibling}u=Um(i,n.mode,f),u.return=n,n=u}return z(n);case Ih:return h=i._init,r(n,u,h(i._payload),f)}if(op(i))return v(n,u,i,f);if(K0(i))return y(n,u,i,f);Zg(n,i)}return typeof i=="string"&&i!==""||typeof i=="number"?(i=""+i,u!==null&&u.tag===6?(w(n,u.sibling),u=K(u,i),u.return=n,n=u):(w(n,u),u=Bm(i,n.mode,f),u.return=n,n=u),z(n)):w(n,u)}return r}var d0=_A(!0),RA=_A(!1),eg={},nc=nv(eg),Np=nv(eg),Bp=nv(eg);function Wv(t){if(t===eg)throw Error(pa(174));return t}function j2(t,s){switch(ro(Bp,s),ro(Np,t),ro(nc,eg),t=s.nodeType,t){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:bx(null,"");break;default:t=t===8?s.parentNode:s,s=t.namespaceURI||null,t=t.tagName,s=bx(s,t)}so(nc),ro(nc,s)}function p0(){so(nc),so(Np),so(Bp)}function DA(t){Wv(Bp.current);var s=Wv(nc.current),w=bx(s,t.type);s!==w&&(ro(Np,t),ro(nc,w))}function K2(t){Np.current===t&&(so(nc),so(Np))}var So=nv(0);function U1(t){for(var s=t;s!==null;){if(s.tag===13){var w=s.memoizedState;if(w!==null&&(w=w.dehydrated,w===null||w.data==="$?"||w.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if(s.flags&128)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break;for(;s.sibling===null;){if(s.return===null||s.return===t)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Im=[];function J2(){for(var t=0;t<Im.length;t++)Im[t]._workInProgressVersionPrimary=null;Im.length=0}var y1=$c.ReactCurrentDispatcher,Fm=$c.ReactCurrentBatchConfig,Jv=0,Eo=null,as=null,ds=null,H1=!1,pp=!1,Up=0,E7=0;function Js(){throw Error(pa(321))}function $2(t,s){if(s===null)return!1;for(var w=0;w<s.length&&w<t.length;w++)if(!Cf(t[w],s[w]))return!1;return!0}function Q2(t,s,w,W,K,de){if(Jv=de,Eo=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,y1.current=t===null||t.memoizedState===null?P7:_7,t=w(W,K),pp){de=0;do{if(pp=!1,Up=0,25<=de)throw Error(pa(301));de+=1,ds=as=null,s.updateQueue=null,y1.current=R7,t=w(W,K)}while(pp)}if(y1.current=V1,s=as!==null&&as.next!==null,Jv=0,ds=as=Eo=null,H1=!1,s)throw Error(pa(300));return t}function q2(){var t=Up!==0;return Up=0,t}function ec(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ds===null?Eo.memoizedState=ds=t:ds=ds.next=t,ds}function Vu(){if(as===null){var t=Eo.alternate;t=t!==null?t.memoizedState:null}else t=as.next;var s=ds===null?Eo.memoizedState:ds.next;if(s!==null)ds=s,as=t;else{if(t===null)throw Error(pa(310));as=t,t={memoizedState:as.memoizedState,baseState:as.baseState,baseQueue:as.baseQueue,queue:as.queue,next:null},ds===null?Eo.memoizedState=ds=t:ds=ds.next=t}return ds}function Hp(t,s){return typeof s=="function"?s(t):s}function km(t){var s=Vu(),w=s.queue;if(w===null)throw Error(pa(311));w.lastRenderedReducer=t;var W=as,K=W.baseQueue,de=w.pending;if(de!==null){if(K!==null){var z=K.next;K.next=de.next,de.next=z}W.baseQueue=K=de,w.pending=null}if(K!==null){de=K.next,W=W.baseState;var B=z=null,e=null,d=de;do{var P=d.lane;if((Jv&P)===P)e!==null&&(e=e.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),W=d.hasEagerState?d.eagerState:t(W,d.action);else{var a={lane:P,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};e===null?(B=e=a,z=W):e=e.next=a,Eo.lanes|=P,$v|=P}d=d.next}while(d!==null&&d!==de);e===null?z=W:e.next=B,Cf(W,s.memoizedState)||(zl=!0),s.memoizedState=W,s.baseState=z,s.baseQueue=e,w.lastRenderedState=W}if(t=w.interleaved,t!==null){K=t;do de=K.lane,Eo.lanes|=de,$v|=de,K=K.next;while(K!==t)}else K===null&&(w.lanes=0);return[s.memoizedState,w.dispatch]}function Om(t){var s=Vu(),w=s.queue;if(w===null)throw Error(pa(311));w.lastRenderedReducer=t;var W=w.dispatch,K=w.pending,de=s.memoizedState;if(K!==null){w.pending=null;var z=K=K.next;do de=t(de,z.action),z=z.next;while(z!==K);Cf(de,s.memoizedState)||(zl=!0),s.memoizedState=de,s.baseQueue===null&&(s.baseState=de),w.lastRenderedState=de}return[de,W]}function IA(){}function FA(t,s){var w=Eo,W=Vu(),K=s(),de=!Cf(W.memoizedState,K);if(de&&(W.memoizedState=K,zl=!0),W=W.queue,e3(zA.bind(null,w,W,t),[t]),W.getSnapshot!==s||de||ds!==null&&ds.memoizedState.tag&1){if(w.flags|=2048,Vp(9,OA.bind(null,w,W,K,s),void 0,null),ms===null)throw Error(pa(349));Jv&30||kA(w,s,K)}return K}function kA(t,s,w){t.flags|=16384,t={getSnapshot:s,value:w},s=Eo.updateQueue,s===null?(s={lastEffect:null,stores:null},Eo.updateQueue=s,s.stores=[t]):(w=s.stores,w===null?s.stores=[t]:w.push(t))}function OA(t,s,w,W){s.value=w,s.getSnapshot=W,NA(s)&&BA(t)}function zA(t,s,w){return w(function(){NA(s)&&BA(t)})}function NA(t){var s=t.getSnapshot;t=t.value;try{var w=s();return!Cf(t,w)}catch{return!0}}function BA(t){var s=Zc(t,1);s!==null&&Sf(s,t,1,-1)}function Ww(t){var s=ec();return typeof t=="function"&&(t=t()),s.memoizedState=s.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Hp,lastRenderedState:t},s.queue=t,t=t.dispatch=L7.bind(null,Eo,t),[s.memoizedState,t]}function Vp(t,s,w,W){return t={tag:t,create:s,destroy:w,deps:W,next:null},s=Eo.updateQueue,s===null?(s={lastEffect:null,stores:null},Eo.updateQueue=s,s.lastEffect=t.next=t):(w=s.lastEffect,w===null?s.lastEffect=t.next=t:(W=w.next,w.next=t,t.next=W,s.lastEffect=t)),t}function UA(){return Vu().memoizedState}function m1(t,s,w,W){var K=ec();Eo.flags|=t,K.memoizedState=Vp(1|s,w,void 0,W===void 0?null:W)}function my(t,s,w,W){var K=Vu();W=W===void 0?null:W;var de=void 0;if(as!==null){var z=as.memoizedState;if(de=z.destroy,W!==null&&$2(W,z.deps)){K.memoizedState=Vp(s,w,de,W);return}}Eo.flags|=t,K.memoizedState=Vp(1|s,w,de,W)}function Yw(t,s){return m1(8390656,8,t,s)}function e3(t,s){return my(2048,8,t,s)}function HA(t,s){return my(4,2,t,s)}function VA(t,s){return my(4,4,t,s)}function GA(t,s){if(typeof s=="function")return t=t(),s(t),function(){s(null)};if(s!=null)return t=t(),s.current=t,function(){s.current=null}}function WA(t,s,w){return w=w!=null?w.concat([t]):null,my(4,4,GA.bind(null,s,t),w)}function t3(){}function YA(t,s){var w=Vu();s=s===void 0?null:s;var W=w.memoizedState;return W!==null&&s!==null&&$2(s,W[1])?W[0]:(w.memoizedState=[t,s],t)}function XA(t,s){var w=Vu();s=s===void 0?null:s;var W=w.memoizedState;return W!==null&&s!==null&&$2(s,W[1])?W[0]:(t=t(),w.memoizedState=[t,s],t)}function ZA(t,s,w){return Jv&21?(Cf(w,s)||(w=J4(),Eo.lanes|=w,$v|=w,t.baseState=!0),s):(t.baseState&&(t.baseState=!1,zl=!0),t.memoizedState=w)}function M7(t,s){var w=Yi;Yi=w!==0&&4>w?w:4,t(!0);var W=Fm.transition;Fm.transition={};try{t(!1),s()}finally{Yi=w,Fm.transition=W}}function jA(){return Vu().memoizedState}function C7(t,s,w){var W=jh(t);if(w={lane:W,action:w,hasEagerState:!1,eagerState:null,next:null},KA(t))JA(s,w);else if(w=MA(t,s,w,W),w!==null){var K=xl();Sf(w,t,W,K),$A(w,s,W)}}function L7(t,s,w){var W=jh(t),K={lane:W,action:w,hasEagerState:!1,eagerState:null,next:null};if(KA(t))JA(s,K);else{var de=t.alternate;if(t.lanes===0&&(de===null||de.lanes===0)&&(de=s.lastRenderedReducer,de!==null))try{var z=s.lastRenderedState,B=de(z,w);if(K.hasEagerState=!0,K.eagerState=B,Cf(B,z)){var e=s.interleaved;e===null?(K.next=K,X2(s)):(K.next=e.next,e.next=K),s.interleaved=K;return}}catch{}finally{}w=MA(t,s,K,W),w!==null&&(K=xl(),Sf(w,t,W,K),$A(w,s,W))}}function KA(t){var s=t.alternate;return t===Eo||s!==null&&s===Eo}function JA(t,s){pp=H1=!0;var w=t.pending;w===null?s.next=s:(s.next=w.next,w.next=s),t.pending=s}function $A(t,s,w){if(w&4194240){var W=s.lanes;W&=t.pendingLanes,w|=W,s.lanes=w,D2(t,w)}}var V1={readContext:Hu,useCallback:Js,useContext:Js,useEffect:Js,useImperativeHandle:Js,useInsertionEffect:Js,useLayoutEffect:Js,useMemo:Js,useReducer:Js,useRef:Js,useState:Js,useDebugValue:Js,useDeferredValue:Js,useTransition:Js,useMutableSource:Js,useSyncExternalStore:Js,useId:Js,unstable_isNewReconciler:!1},P7={readContext:Hu,useCallback:function(t,s){return ec().memoizedState=[t,s===void 0?null:s],t},useContext:Hu,useEffect:Yw,useImperativeHandle:function(t,s,w){return w=w!=null?w.concat([t]):null,m1(4194308,4,GA.bind(null,s,t),w)},useLayoutEffect:function(t,s){return m1(4194308,4,t,s)},useInsertionEffect:function(t,s){return m1(4,2,t,s)},useMemo:function(t,s){var w=ec();return s=s===void 0?null:s,t=t(),w.memoizedState=[t,s],t},useReducer:function(t,s,w){var W=ec();return s=w!==void 0?w(s):s,W.memoizedState=W.baseState=s,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:s},W.queue=t,t=t.dispatch=C7.bind(null,Eo,t),[W.memoizedState,t]},useRef:function(t){var s=ec();return t={current:t},s.memoizedState=t},useState:Ww,useDebugValue:t3,useDeferredValue:function(t){return ec().memoizedState=t},useTransition:function(){var t=Ww(!1),s=t[0];return t=M7.bind(null,t[1]),ec().memoizedState=t,[s,t]},useMutableSource:function(){},useSyncExternalStore:function(t,s,w){var W=Eo,K=ec();if(vo){if(w===void 0)throw Error(pa(407));w=w()}else{if(w=s(),ms===null)throw Error(pa(349));Jv&30||kA(W,s,w)}K.memoizedState=w;var de={value:w,getSnapshot:s};return K.queue=de,Yw(zA.bind(null,W,de,t),[t]),W.flags|=2048,Vp(9,OA.bind(null,W,de,w,s),void 0,null),w},useId:function(){var t=ec(),s=ms.identifierPrefix;if(vo){var w=Bc,W=Nc;w=(W&~(1<<32-Af(W)-1)).toString(32)+w,s=":"+s+"R"+w,w=Up++,0<w&&(s+="H"+w.toString(32)),s+=":"}else w=E7++,s=":"+s+"r"+w.toString(32)+":";return t.memoizedState=s},unstable_isNewReconciler:!1},_7={readContext:Hu,useCallback:YA,useContext:Hu,useEffect:e3,useImperativeHandle:WA,useInsertionEffect:HA,useLayoutEffect:VA,useMemo:XA,useReducer:km,useRef:UA,useState:function(){return km(Hp)},useDebugValue:t3,useDeferredValue:function(t){var s=Vu();return ZA(s,as.memoizedState,t)},useTransition:function(){var t=km(Hp)[0],s=Vu().memoizedState;return[t,s]},useMutableSource:IA,useSyncExternalStore:FA,useId:jA,unstable_isNewReconciler:!1},R7={readContext:Hu,useCallback:YA,useContext:Hu,useEffect:e3,useImperativeHandle:WA,useInsertionEffect:HA,useLayoutEffect:VA,useMemo:XA,useReducer:Om,useRef:UA,useState:function(){return Om(Hp)},useDebugValue:t3,useDeferredValue:function(t){var s=Vu();return as===null?s.memoizedState=t:ZA(s,as.memoizedState,t)},useTransition:function(){var t=Om(Hp)[0],s=Vu().memoizedState;return[t,s]},useMutableSource:IA,useSyncExternalStore:FA,useId:jA,unstable_isNewReconciler:!1};function g0(t,s){try{var w="",W=s;do w+=iC(W),W=W.return;while(W);var K=w}catch(de){K=`
Error generating stack: `+de.message+`
`+de.stack}return{value:t,source:s,stack:K,digest:null}}function zm(t,s,w){return{value:t,source:null,stack:w??null,digest:s??null}}function Gx(t,s){try{console.error(s.value)}catch(w){setTimeout(function(){throw w})}}var D7=typeof WeakMap=="function"?WeakMap:Map;function QA(t,s,w){w=Hc(-1,w),w.tag=3,w.payload={element:null};var W=s.value;return w.callback=function(){W1||(W1=!0,qx=W),Gx(t,s)},w}function qA(t,s,w){w=Hc(-1,w),w.tag=3;var W=t.type.getDerivedStateFromError;if(typeof W=="function"){var K=s.value;w.payload=function(){return W(K)},w.callback=function(){Gx(t,s)}}var de=t.stateNode;return de!==null&&typeof de.componentDidCatch=="function"&&(w.callback=function(){Gx(t,s),typeof W!="function"&&(Zh===null?Zh=new Set([this]):Zh.add(this));var z=s.stack;this.componentDidCatch(s.value,{componentStack:z!==null?z:""})}),w}function Xw(t,s,w){var W=t.pingCache;if(W===null){W=t.pingCache=new D7;var K=new Set;W.set(s,K)}else K=W.get(s),K===void 0&&(K=new Set,W.set(s,K));K.has(w)||(K.add(w),t=X7.bind(null,t,s,w),s.then(t,t))}function Zw(t){do{var s;if((s=t.tag===13)&&(s=t.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return t;t=t.return}while(t!==null);return null}function jw(t,s,w,W,K){return t.mode&1?(t.flags|=65536,t.lanes=K,t):(t===s?t.flags|=65536:(t.flags|=128,w.flags|=131072,w.flags&=-52805,w.tag===1&&(w.alternate===null?w.tag=17:(s=Hc(-1,1),s.tag=2,Xh(w,s,1))),w.lanes|=1),t)}var I7=$c.ReactCurrentOwner,zl=!1;function pl(t,s,w,W){s.child=t===null?RA(s,null,w,W):d0(s,t.child,w,W)}function Kw(t,s,w,W,K){w=w.render;var de=s.ref;return i0(s,K),W=Q2(t,s,w,W,de,K),w=q2(),t!==null&&!zl?(s.updateQueue=t.updateQueue,s.flags&=-2053,t.lanes&=~K,jc(t,s,K)):(vo&&w&&U2(s),s.flags|=1,pl(t,s,W,K),s.child)}function Jw(t,s,w,W,K){if(t===null){var de=w.type;return typeof de=="function"&&!u3(de)&&de.defaultProps===void 0&&w.compare===null&&w.defaultProps===void 0?(s.tag=15,s.type=de,e5(t,s,de,W,K)):(t=T1(w.type,null,W,s,s.mode,K),t.ref=s.ref,t.return=s,s.child=t)}if(de=t.child,!(t.lanes&K)){var z=de.memoizedProps;if(w=w.compare,w=w!==null?w:Fp,w(z,W)&&t.ref===s.ref)return jc(t,s,K)}return s.flags|=1,t=Kh(de,W),t.ref=s.ref,t.return=s,s.child=t}function e5(t,s,w,W,K){if(t!==null){var de=t.memoizedProps;if(Fp(de,W)&&t.ref===s.ref)if(zl=!1,s.pendingProps=W=de,(t.lanes&K)!==0)t.flags&131072&&(zl=!0);else return s.lanes=t.lanes,jc(t,s,K)}return Wx(t,s,w,W,K)}function t5(t,s,w){var W=s.pendingProps,K=W.children,de=t!==null?t.memoizedState:null;if(W.mode==="hidden")if(!(s.mode&1))s.memoizedState={baseLanes:0,cachePool:null,transitions:null},ro(qd,iu),iu|=w;else{if(!(w&1073741824))return t=de!==null?de.baseLanes|w:w,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:t,cachePool:null,transitions:null},s.updateQueue=null,ro(qd,iu),iu|=t,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},W=de!==null?de.baseLanes:w,ro(qd,iu),iu|=W}else de!==null?(W=de.baseLanes|w,s.memoizedState=null):W=w,ro(qd,iu),iu|=W;return pl(t,s,K,w),s.child}function r5(t,s){var w=s.ref;(t===null&&w!==null||t!==null&&t.ref!==w)&&(s.flags|=512,s.flags|=2097152)}function Wx(t,s,w,W,K){var de=Bl(w)?jv:tl.current;return de=h0(s,de),i0(s,K),w=Q2(t,s,w,W,de,K),W=q2(),t!==null&&!zl?(s.updateQueue=t.updateQueue,s.flags&=-2053,t.lanes&=~K,jc(t,s,K)):(vo&&W&&U2(s),s.flags|=1,pl(t,s,w,K),s.child)}function $w(t,s,w,W,K){if(Bl(w)){var de=!0;F1(s)}else de=!1;if(i0(s,K),s.stateNode===null)x1(t,s),PA(s,w,W),Vx(s,w,W,K),W=!0;else if(t===null){var z=s.stateNode,B=s.memoizedProps;z.props=B;var e=z.context,d=w.contextType;typeof d=="object"&&d!==null?d=Hu(d):(d=Bl(w)?jv:tl.current,d=h0(s,d));var P=w.getDerivedStateFromProps,a=typeof P=="function"||typeof z.getSnapshotBeforeUpdate=="function";a||typeof z.UNSAFE_componentWillReceiveProps!="function"&&typeof z.componentWillReceiveProps!="function"||(B!==W||e!==d)&&Vw(s,z,W,d),Fh=!1;var _=s.memoizedState;z.state=_,B1(s,W,z,K),e=s.memoizedState,B!==W||_!==e||Nl.current||Fh?(typeof P=="function"&&(Hx(s,w,P,W),e=s.memoizedState),(B=Fh||Hw(s,w,B,W,_,e,d))?(a||typeof z.UNSAFE_componentWillMount!="function"&&typeof z.componentWillMount!="function"||(typeof z.componentWillMount=="function"&&z.componentWillMount(),typeof z.UNSAFE_componentWillMount=="function"&&z.UNSAFE_componentWillMount()),typeof z.componentDidMount=="function"&&(s.flags|=4194308)):(typeof z.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=W,s.memoizedState=e),z.props=W,z.state=e,z.context=d,W=B):(typeof z.componentDidMount=="function"&&(s.flags|=4194308),W=!1)}else{z=s.stateNode,CA(t,s),B=s.memoizedProps,d=s.type===s.elementType?B:mf(s.type,B),z.props=d,a=s.pendingProps,_=z.context,e=w.contextType,typeof e=="object"&&e!==null?e=Hu(e):(e=Bl(w)?jv:tl.current,e=h0(s,e));var x=w.getDerivedStateFromProps;(P=typeof x=="function"||typeof z.getSnapshotBeforeUpdate=="function")||typeof z.UNSAFE_componentWillReceiveProps!="function"&&typeof z.componentWillReceiveProps!="function"||(B!==a||_!==e)&&Vw(s,z,W,e),Fh=!1,_=s.memoizedState,z.state=_,B1(s,W,z,K);var v=s.memoizedState;B!==a||_!==v||Nl.current||Fh?(typeof x=="function"&&(Hx(s,w,x,W),v=s.memoizedState),(d=Fh||Hw(s,w,d,W,_,v,e)||!1)?(P||typeof z.UNSAFE_componentWillUpdate!="function"&&typeof z.componentWillUpdate!="function"||(typeof z.componentWillUpdate=="function"&&z.componentWillUpdate(W,v,e),typeof z.UNSAFE_componentWillUpdate=="function"&&z.UNSAFE_componentWillUpdate(W,v,e)),typeof z.componentDidUpdate=="function"&&(s.flags|=4),typeof z.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof z.componentDidUpdate!="function"||B===t.memoizedProps&&_===t.memoizedState||(s.flags|=4),typeof z.getSnapshotBeforeUpdate!="function"||B===t.memoizedProps&&_===t.memoizedState||(s.flags|=1024),s.memoizedProps=W,s.memoizedState=v),z.props=W,z.state=v,z.context=e,W=d):(typeof z.componentDidUpdate!="function"||B===t.memoizedProps&&_===t.memoizedState||(s.flags|=4),typeof z.getSnapshotBeforeUpdate!="function"||B===t.memoizedProps&&_===t.memoizedState||(s.flags|=1024),W=!1)}return Yx(t,s,w,W,de,K)}function Yx(t,s,w,W,K,de){r5(t,s);var z=(s.flags&128)!==0;if(!W&&!z)return K&&Ow(s,w,!1),jc(t,s,de);W=s.stateNode,I7.current=s;var B=z&&typeof w.getDerivedStateFromError!="function"?null:W.render();return s.flags|=1,t!==null&&z?(s.child=d0(s,t.child,null,de),s.child=d0(s,null,B,de)):pl(t,s,B,de),s.memoizedState=W.state,K&&Ow(s,w,!0),s.child}function n5(t){var s=t.stateNode;s.pendingContext?kw(t,s.pendingContext,s.pendingContext!==s.context):s.context&&kw(t,s.context,!1),j2(t,s.containerInfo)}function Qw(t,s,w,W,K){return v0(),V2(K),s.flags|=256,pl(t,s,w,W),s.child}var Xx={dehydrated:null,treeContext:null,retryLane:0};function Zx(t){return{baseLanes:t,cachePool:null,transitions:null}}function a5(t,s,w){var W=s.pendingProps,K=So.current,de=!1,z=(s.flags&128)!==0,B;if((B=z)||(B=t!==null&&t.memoizedState===null?!1:(K&2)!==0),B?(de=!0,s.flags&=-129):(t===null||t.memoizedState!==null)&&(K|=1),ro(So,K&1),t===null)return Bx(s),t=s.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(s.mode&1?t.data==="$!"?s.lanes=8:s.lanes=1073741824:s.lanes=1,null):(z=W.children,t=W.fallback,de?(W=s.mode,de=s.child,z={mode:"hidden",children:z},!(W&1)&&de!==null?(de.childLanes=0,de.pendingProps=z):de=wy(z,W,0,null),t=Xv(t,W,w,null),de.return=s,t.return=s,de.sibling=t,s.child=de,s.child.memoizedState=Zx(w),s.memoizedState=Xx,t):r3(s,z));if(K=t.memoizedState,K!==null&&(B=K.dehydrated,B!==null))return F7(t,s,z,W,B,K,w);if(de){de=W.fallback,z=s.mode,K=t.child,B=K.sibling;var e={mode:"hidden",children:W.children};return!(z&1)&&s.child!==K?(W=s.child,W.childLanes=0,W.pendingProps=e,s.deletions=null):(W=Kh(K,e),W.subtreeFlags=K.subtreeFlags&14680064),B!==null?de=Kh(B,de):(de=Xv(de,z,w,null),de.flags|=2),de.return=s,W.return=s,W.sibling=de,s.child=W,W=de,de=s.child,z=t.child.memoizedState,z=z===null?Zx(w):{baseLanes:z.baseLanes|w,cachePool:null,transitions:z.transitions},de.memoizedState=z,de.childLanes=t.childLanes&~w,s.memoizedState=Xx,W}return de=t.child,t=de.sibling,W=Kh(de,{mode:"visible",children:W.children}),!(s.mode&1)&&(W.lanes=w),W.return=s,W.sibling=null,t!==null&&(w=s.deletions,w===null?(s.deletions=[t],s.flags|=16):w.push(t)),s.child=W,s.memoizedState=null,W}function r3(t,s){return s=wy({mode:"visible",children:s},t.mode,0,null),s.return=t,t.child=s}function jg(t,s,w,W){return W!==null&&V2(W),d0(s,t.child,null,w),t=r3(s,s.pendingProps.children),t.flags|=2,s.memoizedState=null,t}function F7(t,s,w,W,K,de,z){if(w)return s.flags&256?(s.flags&=-257,W=zm(Error(pa(422))),jg(t,s,z,W)):s.memoizedState!==null?(s.child=t.child,s.flags|=128,null):(de=W.fallback,K=s.mode,W=wy({mode:"visible",children:W.children},K,0,null),de=Xv(de,K,z,null),de.flags|=2,W.return=s,de.return=s,W.sibling=de,s.child=W,s.mode&1&&d0(s,t.child,null,z),s.child.memoizedState=Zx(z),s.memoizedState=Xx,de);if(!(s.mode&1))return jg(t,s,z,null);if(K.data==="$!"){if(W=K.nextSibling&&K.nextSibling.dataset,W)var B=W.dgst;return W=B,de=Error(pa(419)),W=zm(de,W,void 0),jg(t,s,z,W)}if(B=(z&t.childLanes)!==0,zl||B){if(W=ms,W!==null){switch(z&-z){case 4:K=2;break;case 16:K=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:K=32;break;case 536870912:K=268435456;break;default:K=0}K=K&(W.suspendedLanes|z)?0:K,K!==0&&K!==de.retryLane&&(de.retryLane=K,Zc(t,K),Sf(W,t,K,-1))}return l3(),W=zm(Error(pa(421))),jg(t,s,z,W)}return K.data==="$?"?(s.flags|=128,s.child=t.child,s=Z7.bind(null,t),K._reactRetry=s,null):(t=de.treeContext,uu=Yh(K.nextSibling),fu=s,vo=!0,bf=null,t!==null&&(Ou[zu++]=Nc,Ou[zu++]=Bc,Ou[zu++]=Kv,Nc=t.id,Bc=t.overflow,Kv=s),s=r3(s,W.children),s.flags|=4096,s)}function qw(t,s,w){t.lanes|=s;var W=t.alternate;W!==null&&(W.lanes|=s),Ux(t.return,s,w)}function Nm(t,s,w,W,K){var de=t.memoizedState;de===null?t.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:W,tail:w,tailMode:K}:(de.isBackwards=s,de.rendering=null,de.renderingStartTime=0,de.last=W,de.tail=w,de.tailMode=K)}function i5(t,s,w){var W=s.pendingProps,K=W.revealOrder,de=W.tail;if(pl(t,s,W.children,w),W=So.current,W&2)W=W&1|2,s.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=s.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&qw(t,w,s);else if(t.tag===19)qw(t,w,s);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===s)break e;for(;t.sibling===null;){if(t.return===null||t.return===s)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}W&=1}if(ro(So,W),!(s.mode&1))s.memoizedState=null;else switch(K){case"forwards":for(w=s.child,K=null;w!==null;)t=w.alternate,t!==null&&U1(t)===null&&(K=w),w=w.sibling;w=K,w===null?(K=s.child,s.child=null):(K=w.sibling,w.sibling=null),Nm(s,!1,K,w,de);break;case"backwards":for(w=null,K=s.child,s.child=null;K!==null;){if(t=K.alternate,t!==null&&U1(t)===null){s.child=K;break}t=K.sibling,K.sibling=w,w=K,K=t}Nm(s,!0,w,null,de);break;case"together":Nm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function x1(t,s){!(s.mode&1)&&t!==null&&(t.alternate=null,s.alternate=null,s.flags|=2)}function jc(t,s,w){if(t!==null&&(s.dependencies=t.dependencies),$v|=s.lanes,!(w&s.childLanes))return null;if(t!==null&&s.child!==t.child)throw Error(pa(153));if(s.child!==null){for(t=s.child,w=Kh(t,t.pendingProps),s.child=w,w.return=s;t.sibling!==null;)t=t.sibling,w=w.sibling=Kh(t,t.pendingProps),w.return=s;w.sibling=null}return s.child}function k7(t,s,w){switch(s.tag){case 3:n5(s),v0();break;case 5:DA(s);break;case 1:Bl(s.type)&&F1(s);break;case 4:j2(s,s.stateNode.containerInfo);break;case 10:var W=s.type._context,K=s.memoizedProps.value;ro(z1,W._currentValue),W._currentValue=K;break;case 13:if(W=s.memoizedState,W!==null)return W.dehydrated!==null?(ro(So,So.current&1),s.flags|=128,null):w&s.child.childLanes?a5(t,s,w):(ro(So,So.current&1),t=jc(t,s,w),t!==null?t.sibling:null);ro(So,So.current&1);break;case 19:if(W=(w&s.childLanes)!==0,t.flags&128){if(W)return i5(t,s,w);s.flags|=128}if(K=s.memoizedState,K!==null&&(K.rendering=null,K.tail=null,K.lastEffect=null),ro(So,So.current),W)break;return null;case 22:case 23:return s.lanes=0,t5(t,s,w)}return jc(t,s,w)}var o5,jx,s5,l5;o5=function(t,s){for(var w=s.child;w!==null;){if(w.tag===5||w.tag===6)t.appendChild(w.stateNode);else if(w.tag!==4&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===s)break;for(;w.sibling===null;){if(w.return===null||w.return===s)return;w=w.return}w.sibling.return=w.return,w=w.sibling}};jx=function(){};s5=function(t,s,w,W){var K=t.memoizedProps;if(K!==W){t=s.stateNode,Wv(nc.current);var de=null;switch(w){case"input":K=gx(t,K),W=gx(t,W),de=[];break;case"select":K=Mo({},K,{value:void 0}),W=Mo({},W,{value:void 0}),de=[];break;case"textarea":K=xx(t,K),W=xx(t,W),de=[];break;default:typeof K.onClick!="function"&&typeof W.onClick=="function"&&(t.onclick=D1)}wx(w,W);var z;w=null;for(d in K)if(!W.hasOwnProperty(d)&&K.hasOwnProperty(d)&&K[d]!=null)if(d==="style"){var B=K[d];for(z in B)B.hasOwnProperty(z)&&(w||(w={}),w[z]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(Cp.hasOwnProperty(d)?de||(de=[]):(de=de||[]).push(d,null));for(d in W){var e=W[d];if(B=K!=null?K[d]:void 0,W.hasOwnProperty(d)&&e!==B&&(e!=null||B!=null))if(d==="style")if(B){for(z in B)!B.hasOwnProperty(z)||e&&e.hasOwnProperty(z)||(w||(w={}),w[z]="");for(z in e)e.hasOwnProperty(z)&&B[z]!==e[z]&&(w||(w={}),w[z]=e[z])}else w||(de||(de=[]),de.push(d,w)),w=e;else d==="dangerouslySetInnerHTML"?(e=e?e.__html:void 0,B=B?B.__html:void 0,e!=null&&B!==e&&(de=de||[]).push(d,e)):d==="children"?typeof e!="string"&&typeof e!="number"||(de=de||[]).push(d,""+e):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(Cp.hasOwnProperty(d)?(e!=null&&d==="onScroll"&&oo("scroll",t),de||B===e||(de=[])):(de=de||[]).push(d,e))}w&&(de=de||[]).push("style",w);var d=de;(s.updateQueue=d)&&(s.flags|=4)}};l5=function(t,s,w,W){w!==W&&(s.flags|=4)};function tp(t,s){if(!vo)switch(t.tailMode){case"hidden":s=t.tail;for(var w=null;s!==null;)s.alternate!==null&&(w=s),s=s.sibling;w===null?t.tail=null:w.sibling=null;break;case"collapsed":w=t.tail;for(var W=null;w!==null;)w.alternate!==null&&(W=w),w=w.sibling;W===null?s||t.tail===null?t.tail=null:t.tail.sibling=null:W.sibling=null}}function $s(t){var s=t.alternate!==null&&t.alternate.child===t.child,w=0,W=0;if(s)for(var K=t.child;K!==null;)w|=K.lanes|K.childLanes,W|=K.subtreeFlags&14680064,W|=K.flags&14680064,K.return=t,K=K.sibling;else for(K=t.child;K!==null;)w|=K.lanes|K.childLanes,W|=K.subtreeFlags,W|=K.flags,K.return=t,K=K.sibling;return t.subtreeFlags|=W,t.childLanes=w,s}function O7(t,s,w){var W=s.pendingProps;switch(H2(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $s(s),null;case 1:return Bl(s.type)&&I1(),$s(s),null;case 3:return W=s.stateNode,p0(),so(Nl),so(tl),J2(),W.pendingContext&&(W.context=W.pendingContext,W.pendingContext=null),(t===null||t.child===null)&&(Xg(s)?s.flags|=4:t===null||t.memoizedState.isDehydrated&&!(s.flags&256)||(s.flags|=1024,bf!==null&&(r2(bf),bf=null))),jx(t,s),$s(s),null;case 5:K2(s);var K=Wv(Bp.current);if(w=s.type,t!==null&&s.stateNode!=null)s5(t,s,w,W,K),t.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!W){if(s.stateNode===null)throw Error(pa(166));return $s(s),null}if(t=Wv(nc.current),Xg(s)){W=s.stateNode,w=s.type;var de=s.memoizedProps;switch(W[tc]=s,W[zp]=de,t=(s.mode&1)!==0,w){case"dialog":oo("cancel",W),oo("close",W);break;case"iframe":case"object":case"embed":oo("load",W);break;case"video":case"audio":for(K=0;K<lp.length;K++)oo(lp[K],W);break;case"source":oo("error",W);break;case"img":case"image":case"link":oo("error",W),oo("load",W);break;case"details":oo("toggle",W);break;case"input":lw(W,de),oo("invalid",W);break;case"select":W._wrapperState={wasMultiple:!!de.multiple},oo("invalid",W);break;case"textarea":fw(W,de),oo("invalid",W)}wx(w,de),K=null;for(var z in de)if(de.hasOwnProperty(z)){var B=de[z];z==="children"?typeof B=="string"?W.textContent!==B&&(de.suppressHydrationWarning!==!0&&Yg(W.textContent,B,t),K=["children",B]):typeof B=="number"&&W.textContent!==""+B&&(de.suppressHydrationWarning!==!0&&Yg(W.textContent,B,t),K=["children",""+B]):Cp.hasOwnProperty(z)&&B!=null&&z==="onScroll"&&oo("scroll",W)}switch(w){case"input":zg(W),uw(W,de,!0);break;case"textarea":zg(W),cw(W);break;case"select":case"option":break;default:typeof de.onClick=="function"&&(W.onclick=D1)}W=K,s.updateQueue=W,W!==null&&(s.flags|=4)}else{z=K.nodeType===9?K:K.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=k4(w)),t==="http://www.w3.org/1999/xhtml"?w==="script"?(t=z.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof W.is=="string"?t=z.createElement(w,{is:W.is}):(t=z.createElement(w),w==="select"&&(z=t,W.multiple?z.multiple=!0:W.size&&(z.size=W.size))):t=z.createElementNS(t,w),t[tc]=s,t[zp]=W,o5(t,s,!1,!1),s.stateNode=t;e:{switch(z=Tx(w,W),w){case"dialog":oo("cancel",t),oo("close",t),K=W;break;case"iframe":case"object":case"embed":oo("load",t),K=W;break;case"video":case"audio":for(K=0;K<lp.length;K++)oo(lp[K],t);K=W;break;case"source":oo("error",t),K=W;break;case"img":case"image":case"link":oo("error",t),oo("load",t),K=W;break;case"details":oo("toggle",t),K=W;break;case"input":lw(t,W),K=gx(t,W),oo("invalid",t);break;case"option":K=W;break;case"select":t._wrapperState={wasMultiple:!!W.multiple},K=Mo({},W,{value:void 0}),oo("invalid",t);break;case"textarea":fw(t,W),K=xx(t,W),oo("invalid",t);break;default:K=W}wx(w,K),B=K;for(de in B)if(B.hasOwnProperty(de)){var e=B[de];de==="style"?N4(t,e):de==="dangerouslySetInnerHTML"?(e=e?e.__html:void 0,e!=null&&O4(t,e)):de==="children"?typeof e=="string"?(w!=="textarea"||e!=="")&&Lp(t,e):typeof e=="number"&&Lp(t,""+e):de!=="suppressContentEditableWarning"&&de!=="suppressHydrationWarning"&&de!=="autoFocus"&&(Cp.hasOwnProperty(de)?e!=null&&de==="onScroll"&&oo("scroll",t):e!=null&&M2(t,de,e,z))}switch(w){case"input":zg(t),uw(t,W,!1);break;case"textarea":zg(t),cw(t);break;case"option":W.value!=null&&t.setAttribute("value",""+Jh(W.value));break;case"select":t.multiple=!!W.multiple,de=W.value,de!=null?t0(t,!!W.multiple,de,!1):W.defaultValue!=null&&t0(t,!!W.multiple,W.defaultValue,!0);break;default:typeof K.onClick=="function"&&(t.onclick=D1)}switch(w){case"button":case"input":case"select":case"textarea":W=!!W.autoFocus;break e;case"img":W=!0;break e;default:W=!1}}W&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return $s(s),null;case 6:if(t&&s.stateNode!=null)l5(t,s,t.memoizedProps,W);else{if(typeof W!="string"&&s.stateNode===null)throw Error(pa(166));if(w=Wv(Bp.current),Wv(nc.current),Xg(s)){if(W=s.stateNode,w=s.memoizedProps,W[tc]=s,(de=W.nodeValue!==w)&&(t=fu,t!==null))switch(t.tag){case 3:Yg(W.nodeValue,w,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Yg(W.nodeValue,w,(t.mode&1)!==0)}de&&(s.flags|=4)}else W=(w.nodeType===9?w:w.ownerDocument).createTextNode(W),W[tc]=s,s.stateNode=W}return $s(s),null;case 13:if(so(So),W=s.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(vo&&uu!==null&&s.mode&1&&!(s.flags&128))EA(),v0(),s.flags|=98560,de=!1;else if(de=Xg(s),W!==null&&W.dehydrated!==null){if(t===null){if(!de)throw Error(pa(318));if(de=s.memoizedState,de=de!==null?de.dehydrated:null,!de)throw Error(pa(317));de[tc]=s}else v0(),!(s.flags&128)&&(s.memoizedState=null),s.flags|=4;$s(s),de=!1}else bf!==null&&(r2(bf),bf=null),de=!0;if(!de)return s.flags&65536?s:null}return s.flags&128?(s.lanes=w,s):(W=W!==null,W!==(t!==null&&t.memoizedState!==null)&&W&&(s.child.flags|=8192,s.mode&1&&(t===null||So.current&1?is===0&&(is=3):l3())),s.updateQueue!==null&&(s.flags|=4),$s(s),null);case 4:return p0(),jx(t,s),t===null&&kp(s.stateNode.containerInfo),$s(s),null;case 10:return Y2(s.type._context),$s(s),null;case 17:return Bl(s.type)&&I1(),$s(s),null;case 19:if(so(So),de=s.memoizedState,de===null)return $s(s),null;if(W=(s.flags&128)!==0,z=de.rendering,z===null)if(W)tp(de,!1);else{if(is!==0||t!==null&&t.flags&128)for(t=s.child;t!==null;){if(z=U1(t),z!==null){for(s.flags|=128,tp(de,!1),W=z.updateQueue,W!==null&&(s.updateQueue=W,s.flags|=4),s.subtreeFlags=0,W=w,w=s.child;w!==null;)de=w,t=W,de.flags&=14680066,z=de.alternate,z===null?(de.childLanes=0,de.lanes=t,de.child=null,de.subtreeFlags=0,de.memoizedProps=null,de.memoizedState=null,de.updateQueue=null,de.dependencies=null,de.stateNode=null):(de.childLanes=z.childLanes,de.lanes=z.lanes,de.child=z.child,de.subtreeFlags=0,de.deletions=null,de.memoizedProps=z.memoizedProps,de.memoizedState=z.memoizedState,de.updateQueue=z.updateQueue,de.type=z.type,t=z.dependencies,de.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),w=w.sibling;return ro(So,So.current&1|2),s.child}t=t.sibling}de.tail!==null&&Uo()>y0&&(s.flags|=128,W=!0,tp(de,!1),s.lanes=4194304)}else{if(!W)if(t=U1(z),t!==null){if(s.flags|=128,W=!0,w=t.updateQueue,w!==null&&(s.updateQueue=w,s.flags|=4),tp(de,!0),de.tail===null&&de.tailMode==="hidden"&&!z.alternate&&!vo)return $s(s),null}else 2*Uo()-de.renderingStartTime>y0&&w!==1073741824&&(s.flags|=128,W=!0,tp(de,!1),s.lanes=4194304);de.isBackwards?(z.sibling=s.child,s.child=z):(w=de.last,w!==null?w.sibling=z:s.child=z,de.last=z)}return de.tail!==null?(s=de.tail,de.rendering=s,de.tail=s.sibling,de.renderingStartTime=Uo(),s.sibling=null,w=So.current,ro(So,W?w&1|2:w&1),s):($s(s),null);case 22:case 23:return s3(),W=s.memoizedState!==null,t!==null&&t.memoizedState!==null!==W&&(s.flags|=8192),W&&s.mode&1?iu&1073741824&&($s(s),s.subtreeFlags&6&&(s.flags|=8192)):$s(s),null;case 24:return null;case 25:return null}throw Error(pa(156,s.tag))}function z7(t,s){switch(H2(s),s.tag){case 1:return Bl(s.type)&&I1(),t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 3:return p0(),so(Nl),so(tl),J2(),t=s.flags,t&65536&&!(t&128)?(s.flags=t&-65537|128,s):null;case 5:return K2(s),null;case 13:if(so(So),t=s.memoizedState,t!==null&&t.dehydrated!==null){if(s.alternate===null)throw Error(pa(340));v0()}return t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 19:return so(So),null;case 4:return p0(),null;case 10:return Y2(s.type._context),null;case 22:case 23:return s3(),null;case 24:return null;default:return null}}var Kg=!1,Qs=!1,N7=typeof WeakSet=="function"?WeakSet:Set,Na=null;function Qd(t,s){var w=t.ref;if(w!==null)if(typeof w=="function")try{w(null)}catch(W){Ro(t,s,W)}else w.current=null}function Kx(t,s,w){try{w()}catch(W){Ro(t,s,W)}}var eT=!1;function B7(t,s){if(Dx=P1,t=hA(),B2(t)){if("selectionStart"in t)var w={start:t.selectionStart,end:t.selectionEnd};else e:{w=(w=t.ownerDocument)&&w.defaultView||window;var W=w.getSelection&&w.getSelection();if(W&&W.rangeCount!==0){w=W.anchorNode;var K=W.anchorOffset,de=W.focusNode;W=W.focusOffset;try{w.nodeType,de.nodeType}catch{w=null;break e}var z=0,B=-1,e=-1,d=0,P=0,a=t,_=null;t:for(;;){for(var x;a!==w||K!==0&&a.nodeType!==3||(B=z+K),a!==de||W!==0&&a.nodeType!==3||(e=z+W),a.nodeType===3&&(z+=a.nodeValue.length),(x=a.firstChild)!==null;)_=a,a=x;for(;;){if(a===t)break t;if(_===w&&++d===K&&(B=z),_===de&&++P===W&&(e=z),(x=a.nextSibling)!==null)break;a=_,_=a.parentNode}a=x}w=B===-1||e===-1?null:{start:B,end:e}}else w=null}w=w||{start:0,end:0}}else w=null;for(Ix={focusedElem:t,selectionRange:w},P1=!1,Na=s;Na!==null;)if(s=Na,t=s.child,(s.subtreeFlags&1028)!==0&&t!==null)t.return=s,Na=t;else for(;Na!==null;){s=Na;try{var v=s.alternate;if(s.flags&1024)switch(s.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,r=v.memoizedState,n=s.stateNode,u=n.getSnapshotBeforeUpdate(s.elementType===s.type?y:mf(s.type,y),r);n.__reactInternalSnapshotBeforeUpdate=u}break;case 3:var i=s.stateNode.containerInfo;i.nodeType===1?i.textContent="":i.nodeType===9&&i.documentElement&&i.removeChild(i.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(pa(163))}}catch(f){Ro(s,s.return,f)}if(t=s.sibling,t!==null){t.return=s.return,Na=t;break}Na=s.return}return v=eT,eT=!1,v}function gp(t,s,w){var W=s.updateQueue;if(W=W!==null?W.lastEffect:null,W!==null){var K=W=W.next;do{if((K.tag&t)===t){var de=K.destroy;K.destroy=void 0,de!==void 0&&Kx(s,w,de)}K=K.next}while(K!==W)}}function xy(t,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var w=s=s.next;do{if((w.tag&t)===t){var W=w.create;w.destroy=W()}w=w.next}while(w!==s)}}function Jx(t){var s=t.ref;if(s!==null){var w=t.stateNode;switch(t.tag){case 5:t=w;break;default:t=w}typeof s=="function"?s(t):s.current=t}}function u5(t){var s=t.alternate;s!==null&&(t.alternate=null,u5(s)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(s=t.stateNode,s!==null&&(delete s[tc],delete s[zp],delete s[Ox],delete s[w7],delete s[T7])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function f5(t){return t.tag===5||t.tag===3||t.tag===4}function tT(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||f5(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function $x(t,s,w){var W=t.tag;if(W===5||W===6)t=t.stateNode,s?w.nodeType===8?w.parentNode.insertBefore(t,s):w.insertBefore(t,s):(w.nodeType===8?(s=w.parentNode,s.insertBefore(t,w)):(s=w,s.appendChild(t)),w=w._reactRootContainer,w!=null||s.onclick!==null||(s.onclick=D1));else if(W!==4&&(t=t.child,t!==null))for($x(t,s,w),t=t.sibling;t!==null;)$x(t,s,w),t=t.sibling}function Qx(t,s,w){var W=t.tag;if(W===5||W===6)t=t.stateNode,s?w.insertBefore(t,s):w.appendChild(t);else if(W!==4&&(t=t.child,t!==null))for(Qx(t,s,w),t=t.sibling;t!==null;)Qx(t,s,w),t=t.sibling}var Ps=null,xf=!1;function _h(t,s,w){for(w=w.child;w!==null;)c5(t,s,w),w=w.sibling}function c5(t,s,w){if(rc&&typeof rc.onCommitFiberUnmount=="function")try{rc.onCommitFiberUnmount(cy,w)}catch{}switch(w.tag){case 5:Qs||Qd(w,s);case 6:var W=Ps,K=xf;Ps=null,_h(t,s,w),Ps=W,xf=K,Ps!==null&&(xf?(t=Ps,w=w.stateNode,t.nodeType===8?t.parentNode.removeChild(w):t.removeChild(w)):Ps.removeChild(w.stateNode));break;case 18:Ps!==null&&(xf?(t=Ps,w=w.stateNode,t.nodeType===8?Rm(t.parentNode,w):t.nodeType===1&&Rm(t,w),Dp(t)):Rm(Ps,w.stateNode));break;case 4:W=Ps,K=xf,Ps=w.stateNode.containerInfo,xf=!0,_h(t,s,w),Ps=W,xf=K;break;case 0:case 11:case 14:case 15:if(!Qs&&(W=w.updateQueue,W!==null&&(W=W.lastEffect,W!==null))){K=W=W.next;do{var de=K,z=de.destroy;de=de.tag,z!==void 0&&(de&2||de&4)&&Kx(w,s,z),K=K.next}while(K!==W)}_h(t,s,w);break;case 1:if(!Qs&&(Qd(w,s),W=w.stateNode,typeof W.componentWillUnmount=="function"))try{W.props=w.memoizedProps,W.state=w.memoizedState,W.componentWillUnmount()}catch(B){Ro(w,s,B)}_h(t,s,w);break;case 21:_h(t,s,w);break;case 22:w.mode&1?(Qs=(W=Qs)||w.memoizedState!==null,_h(t,s,w),Qs=W):_h(t,s,w);break;default:_h(t,s,w)}}function rT(t){var s=t.updateQueue;if(s!==null){t.updateQueue=null;var w=t.stateNode;w===null&&(w=t.stateNode=new N7),s.forEach(function(W){var K=j7.bind(null,t,W);w.has(W)||(w.add(W),W.then(K,K))})}}function pf(t,s){var w=s.deletions;if(w!==null)for(var W=0;W<w.length;W++){var K=w[W];try{var de=t,z=s,B=z;e:for(;B!==null;){switch(B.tag){case 5:Ps=B.stateNode,xf=!1;break e;case 3:Ps=B.stateNode.containerInfo,xf=!0;break e;case 4:Ps=B.stateNode.containerInfo,xf=!0;break e}B=B.return}if(Ps===null)throw Error(pa(160));c5(de,z,K),Ps=null,xf=!1;var e=K.alternate;e!==null&&(e.return=null),K.return=null}catch(d){Ro(K,s,d)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)h5(s,t),s=s.sibling}function h5(t,s){var w=t.alternate,W=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(pf(s,t),$f(t),W&4){try{gp(3,t,t.return),xy(3,t)}catch(y){Ro(t,t.return,y)}try{gp(5,t,t.return)}catch(y){Ro(t,t.return,y)}}break;case 1:pf(s,t),$f(t),W&512&&w!==null&&Qd(w,w.return);break;case 5:if(pf(s,t),$f(t),W&512&&w!==null&&Qd(w,w.return),t.flags&32){var K=t.stateNode;try{Lp(K,"")}catch(y){Ro(t,t.return,y)}}if(W&4&&(K=t.stateNode,K!=null)){var de=t.memoizedProps,z=w!==null?w.memoizedProps:de,B=t.type,e=t.updateQueue;if(t.updateQueue=null,e!==null)try{B==="input"&&de.type==="radio"&&de.name!=null&&I4(K,de),Tx(B,z);var d=Tx(B,de);for(z=0;z<e.length;z+=2){var P=e[z],a=e[z+1];P==="style"?N4(K,a):P==="dangerouslySetInnerHTML"?O4(K,a):P==="children"?Lp(K,a):M2(K,P,a,d)}switch(B){case"input":yx(K,de);break;case"textarea":F4(K,de);break;case"select":var _=K._wrapperState.wasMultiple;K._wrapperState.wasMultiple=!!de.multiple;var x=de.value;x!=null?t0(K,!!de.multiple,x,!1):_!==!!de.multiple&&(de.defaultValue!=null?t0(K,!!de.multiple,de.defaultValue,!0):t0(K,!!de.multiple,de.multiple?[]:"",!1))}K[zp]=de}catch(y){Ro(t,t.return,y)}}break;case 6:if(pf(s,t),$f(t),W&4){if(t.stateNode===null)throw Error(pa(162));K=t.stateNode,de=t.memoizedProps;try{K.nodeValue=de}catch(y){Ro(t,t.return,y)}}break;case 3:if(pf(s,t),$f(t),W&4&&w!==null&&w.memoizedState.isDehydrated)try{Dp(s.containerInfo)}catch(y){Ro(t,t.return,y)}break;case 4:pf(s,t),$f(t);break;case 13:pf(s,t),$f(t),K=t.child,K.flags&8192&&(de=K.memoizedState!==null,K.stateNode.isHidden=de,!de||K.alternate!==null&&K.alternate.memoizedState!==null||(i3=Uo())),W&4&&rT(t);break;case 22:if(P=w!==null&&w.memoizedState!==null,t.mode&1?(Qs=(d=Qs)||P,pf(s,t),Qs=d):pf(s,t),$f(t),W&8192){if(d=t.memoizedState!==null,(t.stateNode.isHidden=d)&&!P&&t.mode&1)for(Na=t,P=t.child;P!==null;){for(a=Na=P;Na!==null;){switch(_=Na,x=_.child,_.tag){case 0:case 11:case 14:case 15:gp(4,_,_.return);break;case 1:Qd(_,_.return);var v=_.stateNode;if(typeof v.componentWillUnmount=="function"){W=_,w=_.return;try{s=W,v.props=s.memoizedProps,v.state=s.memoizedState,v.componentWillUnmount()}catch(y){Ro(W,w,y)}}break;case 5:Qd(_,_.return);break;case 22:if(_.memoizedState!==null){aT(a);continue}}x!==null?(x.return=_,Na=x):aT(a)}P=P.sibling}e:for(P=null,a=t;;){if(a.tag===5){if(P===null){P=a;try{K=a.stateNode,d?(de=K.style,typeof de.setProperty=="function"?de.setProperty("display","none","important"):de.display="none"):(B=a.stateNode,e=a.memoizedProps.style,z=e!=null&&e.hasOwnProperty("display")?e.display:null,B.style.display=z4("display",z))}catch(y){Ro(t,t.return,y)}}}else if(a.tag===6){if(P===null)try{a.stateNode.nodeValue=d?"":a.memoizedProps}catch(y){Ro(t,t.return,y)}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===t)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;P===a&&(P=null),a=a.return}P===a&&(P=null),a.sibling.return=a.return,a=a.sibling}}break;case 19:pf(s,t),$f(t),W&4&&rT(t);break;case 21:break;default:pf(s,t),$f(t)}}function $f(t){var s=t.flags;if(s&2){try{e:{for(var w=t.return;w!==null;){if(f5(w)){var W=w;break e}w=w.return}throw Error(pa(160))}switch(W.tag){case 5:var K=W.stateNode;W.flags&32&&(Lp(K,""),W.flags&=-33);var de=tT(t);Qx(t,de,K);break;case 3:case 4:var z=W.stateNode.containerInfo,B=tT(t);$x(t,B,z);break;default:throw Error(pa(161))}}catch(e){Ro(t,t.return,e)}t.flags&=-3}s&4096&&(t.flags&=-4097)}function U7(t,s,w){Na=t,v5(t)}function v5(t,s,w){for(var W=(t.mode&1)!==0;Na!==null;){var K=Na,de=K.child;if(K.tag===22&&W){var z=K.memoizedState!==null||Kg;if(!z){var B=K.alternate,e=B!==null&&B.memoizedState!==null||Qs;B=Kg;var d=Qs;if(Kg=z,(Qs=e)&&!d)for(Na=K;Na!==null;)z=Na,e=z.child,z.tag===22&&z.memoizedState!==null?iT(K):e!==null?(e.return=z,Na=e):iT(K);for(;de!==null;)Na=de,v5(de),de=de.sibling;Na=K,Kg=B,Qs=d}nT(t)}else K.subtreeFlags&8772&&de!==null?(de.return=K,Na=de):nT(t)}}function nT(t){for(;Na!==null;){var s=Na;if(s.flags&8772){var w=s.alternate;try{if(s.flags&8772)switch(s.tag){case 0:case 11:case 15:Qs||xy(5,s);break;case 1:var W=s.stateNode;if(s.flags&4&&!Qs)if(w===null)W.componentDidMount();else{var K=s.elementType===s.type?w.memoizedProps:mf(s.type,w.memoizedProps);W.componentDidUpdate(K,w.memoizedState,W.__reactInternalSnapshotBeforeUpdate)}var de=s.updateQueue;de!==null&&Uw(s,de,W);break;case 3:var z=s.updateQueue;if(z!==null){if(w=null,s.child!==null)switch(s.child.tag){case 5:w=s.child.stateNode;break;case 1:w=s.child.stateNode}Uw(s,z,w)}break;case 5:var B=s.stateNode;if(w===null&&s.flags&4){w=B;var e=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":e.autoFocus&&w.focus();break;case"img":e.src&&(w.src=e.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var d=s.alternate;if(d!==null){var P=d.memoizedState;if(P!==null){var a=P.dehydrated;a!==null&&Dp(a)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(pa(163))}Qs||s.flags&512&&Jx(s)}catch(_){Ro(s,s.return,_)}}if(s===t){Na=null;break}if(w=s.sibling,w!==null){w.return=s.return,Na=w;break}Na=s.return}}function aT(t){for(;Na!==null;){var s=Na;if(s===t){Na=null;break}var w=s.sibling;if(w!==null){w.return=s.return,Na=w;break}Na=s.return}}function iT(t){for(;Na!==null;){var s=Na;try{switch(s.tag){case 0:case 11:case 15:var w=s.return;try{xy(4,s)}catch(e){Ro(s,w,e)}break;case 1:var W=s.stateNode;if(typeof W.componentDidMount=="function"){var K=s.return;try{W.componentDidMount()}catch(e){Ro(s,K,e)}}var de=s.return;try{Jx(s)}catch(e){Ro(s,de,e)}break;case 5:var z=s.return;try{Jx(s)}catch(e){Ro(s,z,e)}}}catch(e){Ro(s,s.return,e)}if(s===t){Na=null;break}var B=s.sibling;if(B!==null){B.return=s.return,Na=B;break}Na=s.return}}var H7=Math.ceil,G1=$c.ReactCurrentDispatcher,n3=$c.ReactCurrentOwner,Uu=$c.ReactCurrentBatchConfig,_i=0,ms=null,Ko=null,Is=0,iu=0,qd=nv(0),is=0,Gp=null,$v=0,by=0,a3=0,yp=null,Ol=null,i3=0,y0=1/0,Oc=null,W1=!1,qx=null,Zh=null,Jg=!1,Nh=null,Y1=0,mp=0,e2=null,b1=-1,w1=0;function xl(){return _i&6?Uo():b1!==-1?b1:b1=Uo()}function jh(t){return t.mode&1?_i&2&&Is!==0?Is&-Is:S7.transition!==null?(w1===0&&(w1=J4()),w1):(t=Yi,t!==0||(t=window.event,t=t===void 0?16:nA(t.type)),t):1}function Sf(t,s,w,W){if(50<mp)throw mp=0,e2=null,Error(pa(185));$p(t,w,W),(!(_i&2)||t!==ms)&&(t===ms&&(!(_i&2)&&(by|=w),is===4&&Oh(t,Is)),Ul(t,W),w===1&&_i===0&&!(s.mode&1)&&(y0=Uo()+500,gy&&av()))}function Ul(t,s){var w=t.callbackNode;SC(t,s);var W=L1(t,t===ms?Is:0);if(W===0)w!==null&&dw(w),t.callbackNode=null,t.callbackPriority=0;else if(s=W&-W,t.callbackPriority!==s){if(w!=null&&dw(w),s===1)t.tag===0?A7(oT.bind(null,t)):TA(oT.bind(null,t)),x7(function(){!(_i&6)&&av()}),w=null;else{switch($4(W)){case 1:w=R2;break;case 4:w=j4;break;case 16:w=C1;break;case 536870912:w=K4;break;default:w=C1}w=w5(w,d5.bind(null,t))}t.callbackPriority=s,t.callbackNode=w}}function d5(t,s){if(b1=-1,w1=0,_i&6)throw Error(pa(327));var w=t.callbackNode;if(o0()&&t.callbackNode!==w)return null;var W=L1(t,t===ms?Is:0);if(W===0)return null;if(W&30||W&t.expiredLanes||s)s=X1(t,W);else{s=W;var K=_i;_i|=2;var de=g5();(ms!==t||Is!==s)&&(Oc=null,y0=Uo()+500,Yv(t,s));do try{W7();break}catch(B){p5(t,B)}while(1);W2(),G1.current=de,_i=K,Ko!==null?s=0:(ms=null,Is=0,s=is)}if(s!==0){if(s===2&&(K=Cx(t),K!==0&&(W=K,s=t2(t,K))),s===1)throw w=Gp,Yv(t,0),Oh(t,W),Ul(t,Uo()),w;if(s===6)Oh(t,W);else{if(K=t.current.alternate,!(W&30)&&!V7(K)&&(s=X1(t,W),s===2&&(de=Cx(t),de!==0&&(W=de,s=t2(t,de))),s===1))throw w=Gp,Yv(t,0),Oh(t,W),Ul(t,Uo()),w;switch(t.finishedWork=K,t.finishedLanes=W,s){case 0:case 1:throw Error(pa(345));case 2:zv(t,Ol,Oc);break;case 3:if(Oh(t,W),(W&130023424)===W&&(s=i3+500-Uo(),10<s)){if(L1(t,0)!==0)break;if(K=t.suspendedLanes,(K&W)!==W){xl(),t.pingedLanes|=t.suspendedLanes&K;break}t.timeoutHandle=kx(zv.bind(null,t,Ol,Oc),s);break}zv(t,Ol,Oc);break;case 4:if(Oh(t,W),(W&4194240)===W)break;for(s=t.eventTimes,K=-1;0<W;){var z=31-Af(W);de=1<<z,z=s[z],z>K&&(K=z),W&=~de}if(W=K,W=Uo()-W,W=(120>W?120:480>W?480:1080>W?1080:1920>W?1920:3e3>W?3e3:4320>W?4320:1960*H7(W/1960))-W,10<W){t.timeoutHandle=kx(zv.bind(null,t,Ol,Oc),W);break}zv(t,Ol,Oc);break;case 5:zv(t,Ol,Oc);break;default:throw Error(pa(329))}}}return Ul(t,Uo()),t.callbackNode===w?d5.bind(null,t):null}function t2(t,s){var w=yp;return t.current.memoizedState.isDehydrated&&(Yv(t,s).flags|=256),t=X1(t,s),t!==2&&(s=Ol,Ol=w,s!==null&&r2(s)),t}function r2(t){Ol===null?Ol=t:Ol.push.apply(Ol,t)}function V7(t){for(var s=t;;){if(s.flags&16384){var w=s.updateQueue;if(w!==null&&(w=w.stores,w!==null))for(var W=0;W<w.length;W++){var K=w[W],de=K.getSnapshot;K=K.value;try{if(!Cf(de(),K))return!1}catch{return!1}}}if(w=s.child,s.subtreeFlags&16384&&w!==null)w.return=s,s=w;else{if(s===t)break;for(;s.sibling===null;){if(s.return===null||s.return===t)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Oh(t,s){for(s&=~a3,s&=~by,t.suspendedLanes|=s,t.pingedLanes&=~s,t=t.expirationTimes;0<s;){var w=31-Af(s),W=1<<w;t[w]=-1,s&=~W}}function oT(t){if(_i&6)throw Error(pa(327));o0();var s=L1(t,0);if(!(s&1))return Ul(t,Uo()),null;var w=X1(t,s);if(t.tag!==0&&w===2){var W=Cx(t);W!==0&&(s=W,w=t2(t,W))}if(w===1)throw w=Gp,Yv(t,0),Oh(t,s),Ul(t,Uo()),w;if(w===6)throw Error(pa(345));return t.finishedWork=t.current.alternate,t.finishedLanes=s,zv(t,Ol,Oc),Ul(t,Uo()),null}function o3(t,s){var w=_i;_i|=1;try{return t(s)}finally{_i=w,_i===0&&(y0=Uo()+500,gy&&av())}}function Qv(t){Nh!==null&&Nh.tag===0&&!(_i&6)&&o0();var s=_i;_i|=1;var w=Uu.transition,W=Yi;try{if(Uu.transition=null,Yi=1,t)return t()}finally{Yi=W,Uu.transition=w,_i=s,!(_i&6)&&av()}}function s3(){iu=qd.current,so(qd)}function Yv(t,s){t.finishedWork=null,t.finishedLanes=0;var w=t.timeoutHandle;if(w!==-1&&(t.timeoutHandle=-1,m7(w)),Ko!==null)for(w=Ko.return;w!==null;){var W=w;switch(H2(W),W.tag){case 1:W=W.type.childContextTypes,W!=null&&I1();break;case 3:p0(),so(Nl),so(tl),J2();break;case 5:K2(W);break;case 4:p0();break;case 13:so(So);break;case 19:so(So);break;case 10:Y2(W.type._context);break;case 22:case 23:s3()}w=w.return}if(ms=t,Ko=t=Kh(t.current,null),Is=iu=s,is=0,Gp=null,a3=by=$v=0,Ol=yp=null,Gv!==null){for(s=0;s<Gv.length;s++)if(w=Gv[s],W=w.interleaved,W!==null){w.interleaved=null;var K=W.next,de=w.pending;if(de!==null){var z=de.next;de.next=K,W.next=z}w.pending=W}Gv=null}return t}function p5(t,s){do{var w=Ko;try{if(W2(),y1.current=V1,H1){for(var W=Eo.memoizedState;W!==null;){var K=W.queue;K!==null&&(K.pending=null),W=W.next}H1=!1}if(Jv=0,ds=as=Eo=null,pp=!1,Up=0,n3.current=null,w===null||w.return===null){is=1,Gp=s,Ko=null;break}e:{var de=t,z=w.return,B=w,e=s;if(s=Is,B.flags|=32768,e!==null&&typeof e=="object"&&typeof e.then=="function"){var d=e,P=B,a=P.tag;if(!(P.mode&1)&&(a===0||a===11||a===15)){var _=P.alternate;_?(P.updateQueue=_.updateQueue,P.memoizedState=_.memoizedState,P.lanes=_.lanes):(P.updateQueue=null,P.memoizedState=null)}var x=Zw(z);if(x!==null){x.flags&=-257,jw(x,z,B,de,s),x.mode&1&&Xw(de,d,s),s=x,e=d;var v=s.updateQueue;if(v===null){var y=new Set;y.add(e),s.updateQueue=y}else v.add(e);break e}else{if(!(s&1)){Xw(de,d,s),l3();break e}e=Error(pa(426))}}else if(vo&&B.mode&1){var r=Zw(z);if(r!==null){!(r.flags&65536)&&(r.flags|=256),jw(r,z,B,de,s),V2(g0(e,B));break e}}de=e=g0(e,B),is!==4&&(is=2),yp===null?yp=[de]:yp.push(de),de=z;do{switch(de.tag){case 3:de.flags|=65536,s&=-s,de.lanes|=s;var n=QA(de,e,s);Bw(de,n);break e;case 1:B=e;var u=de.type,i=de.stateNode;if(!(de.flags&128)&&(typeof u.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Zh===null||!Zh.has(i)))){de.flags|=65536,s&=-s,de.lanes|=s;var f=qA(de,B,s);Bw(de,f);break e}}de=de.return}while(de!==null)}m5(w)}catch(g){s=g,Ko===w&&w!==null&&(Ko=w=w.return);continue}break}while(1)}function g5(){var t=G1.current;return G1.current=V1,t===null?V1:t}function l3(){(is===0||is===3||is===2)&&(is=4),ms===null||!($v&268435455)&&!(by&268435455)||Oh(ms,Is)}function X1(t,s){var w=_i;_i|=2;var W=g5();(ms!==t||Is!==s)&&(Oc=null,Yv(t,s));do try{G7();break}catch(K){p5(t,K)}while(1);if(W2(),_i=w,G1.current=W,Ko!==null)throw Error(pa(261));return ms=null,Is=0,is}function G7(){for(;Ko!==null;)y5(Ko)}function W7(){for(;Ko!==null&&!pC();)y5(Ko)}function y5(t){var s=b5(t.alternate,t,iu);t.memoizedProps=t.pendingProps,s===null?m5(t):Ko=s,n3.current=null}function m5(t){var s=t;do{var w=s.alternate;if(t=s.return,s.flags&32768){if(w=z7(w,s),w!==null){w.flags&=32767,Ko=w;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{is=6,Ko=null;return}}else if(w=O7(w,s,iu),w!==null){Ko=w;return}if(s=s.sibling,s!==null){Ko=s;return}Ko=s=t}while(s!==null);is===0&&(is=5)}function zv(t,s,w){var W=Yi,K=Uu.transition;try{Uu.transition=null,Yi=1,Y7(t,s,w,W)}finally{Uu.transition=K,Yi=W}return null}function Y7(t,s,w,W){do o0();while(Nh!==null);if(_i&6)throw Error(pa(327));w=t.finishedWork;var K=t.finishedLanes;if(w===null)return null;if(t.finishedWork=null,t.finishedLanes=0,w===t.current)throw Error(pa(177));t.callbackNode=null,t.callbackPriority=0;var de=w.lanes|w.childLanes;if(EC(t,de),t===ms&&(Ko=ms=null,Is=0),!(w.subtreeFlags&2064)&&!(w.flags&2064)||Jg||(Jg=!0,w5(C1,function(){return o0(),null})),de=(w.flags&15990)!==0,w.subtreeFlags&15990||de){de=Uu.transition,Uu.transition=null;var z=Yi;Yi=1;var B=_i;_i|=4,n3.current=null,B7(t,w),h5(w,t),c7(Ix),P1=!!Dx,Ix=Dx=null,t.current=w,U7(w),gC(),_i=B,Yi=z,Uu.transition=de}else t.current=w;if(Jg&&(Jg=!1,Nh=t,Y1=K),de=t.pendingLanes,de===0&&(Zh=null),xC(w.stateNode),Ul(t,Uo()),s!==null)for(W=t.onRecoverableError,w=0;w<s.length;w++)K=s[w],W(K.value,{componentStack:K.stack,digest:K.digest});if(W1)throw W1=!1,t=qx,qx=null,t;return Y1&1&&t.tag!==0&&o0(),de=t.pendingLanes,de&1?t===e2?mp++:(mp=0,e2=t):mp=0,av(),null}function o0(){if(Nh!==null){var t=$4(Y1),s=Uu.transition,w=Yi;try{if(Uu.transition=null,Yi=16>t?16:t,Nh===null)var W=!1;else{if(t=Nh,Nh=null,Y1=0,_i&6)throw Error(pa(331));var K=_i;for(_i|=4,Na=t.current;Na!==null;){var de=Na,z=de.child;if(Na.flags&16){var B=de.deletions;if(B!==null){for(var e=0;e<B.length;e++){var d=B[e];for(Na=d;Na!==null;){var P=Na;switch(P.tag){case 0:case 11:case 15:gp(8,P,de)}var a=P.child;if(a!==null)a.return=P,Na=a;else for(;Na!==null;){P=Na;var _=P.sibling,x=P.return;if(u5(P),P===d){Na=null;break}if(_!==null){_.return=x,Na=_;break}Na=x}}}var v=de.alternate;if(v!==null){var y=v.child;if(y!==null){v.child=null;do{var r=y.sibling;y.sibling=null,y=r}while(y!==null)}}Na=de}}if(de.subtreeFlags&2064&&z!==null)z.return=de,Na=z;else e:for(;Na!==null;){if(de=Na,de.flags&2048)switch(de.tag){case 0:case 11:case 15:gp(9,de,de.return)}var n=de.sibling;if(n!==null){n.return=de.return,Na=n;break e}Na=de.return}}var u=t.current;for(Na=u;Na!==null;){z=Na;var i=z.child;if(z.subtreeFlags&2064&&i!==null)i.return=z,Na=i;else e:for(z=u;Na!==null;){if(B=Na,B.flags&2048)try{switch(B.tag){case 0:case 11:case 15:xy(9,B)}}catch(g){Ro(B,B.return,g)}if(B===z){Na=null;break e}var f=B.sibling;if(f!==null){f.return=B.return,Na=f;break e}Na=B.return}}if(_i=K,av(),rc&&typeof rc.onPostCommitFiberRoot=="function")try{rc.onPostCommitFiberRoot(cy,t)}catch{}W=!0}return W}finally{Yi=w,Uu.transition=s}}return!1}function sT(t,s,w){s=g0(w,s),s=QA(t,s,1),t=Xh(t,s,1),s=xl(),t!==null&&($p(t,1,s),Ul(t,s))}function Ro(t,s,w){if(t.tag===3)sT(t,t,w);else for(;s!==null;){if(s.tag===3){sT(s,t,w);break}else if(s.tag===1){var W=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof W.componentDidCatch=="function"&&(Zh===null||!Zh.has(W))){t=g0(w,t),t=qA(s,t,1),s=Xh(s,t,1),t=xl(),s!==null&&($p(s,1,t),Ul(s,t));break}}s=s.return}}function X7(t,s,w){var W=t.pingCache;W!==null&&W.delete(s),s=xl(),t.pingedLanes|=t.suspendedLanes&w,ms===t&&(Is&w)===w&&(is===4||is===3&&(Is&130023424)===Is&&500>Uo()-i3?Yv(t,0):a3|=w),Ul(t,s)}function x5(t,s){s===0&&(t.mode&1?(s=Ug,Ug<<=1,!(Ug&130023424)&&(Ug=4194304)):s=1);var w=xl();t=Zc(t,s),t!==null&&($p(t,s,w),Ul(t,w))}function Z7(t){var s=t.memoizedState,w=0;s!==null&&(w=s.retryLane),x5(t,w)}function j7(t,s){var w=0;switch(t.tag){case 13:var W=t.stateNode,K=t.memoizedState;K!==null&&(w=K.retryLane);break;case 19:W=t.stateNode;break;default:throw Error(pa(314))}W!==null&&W.delete(s),x5(t,w)}var b5;b5=function(t,s,w){if(t!==null)if(t.memoizedProps!==s.pendingProps||Nl.current)zl=!0;else{if(!(t.lanes&w)&&!(s.flags&128))return zl=!1,k7(t,s,w);zl=!!(t.flags&131072)}else zl=!1,vo&&s.flags&1048576&&AA(s,O1,s.index);switch(s.lanes=0,s.tag){case 2:var W=s.type;x1(t,s),t=s.pendingProps;var K=h0(s,tl.current);i0(s,w),K=Q2(null,s,W,t,K,w);var de=q2();return s.flags|=1,typeof K=="object"&&K!==null&&typeof K.render=="function"&&K.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Bl(W)?(de=!0,F1(s)):de=!1,s.memoizedState=K.state!==null&&K.state!==void 0?K.state:null,Z2(s),K.updater=yy,s.stateNode=K,K._reactInternals=s,Vx(s,W,t,w),s=Yx(null,s,W,!0,de,w)):(s.tag=0,vo&&de&&U2(s),pl(null,s,K,w),s=s.child),s;case 16:W=s.elementType;e:{switch(x1(t,s),t=s.pendingProps,K=W._init,W=K(W._payload),s.type=W,K=s.tag=J7(W),t=mf(W,t),K){case 0:s=Wx(null,s,W,t,w);break e;case 1:s=$w(null,s,W,t,w);break e;case 11:s=Kw(null,s,W,t,w);break e;case 14:s=Jw(null,s,W,mf(W.type,t),w);break e}throw Error(pa(306,W,""))}return s;case 0:return W=s.type,K=s.pendingProps,K=s.elementType===W?K:mf(W,K),Wx(t,s,W,K,w);case 1:return W=s.type,K=s.pendingProps,K=s.elementType===W?K:mf(W,K),$w(t,s,W,K,w);case 3:e:{if(n5(s),t===null)throw Error(pa(387));W=s.pendingProps,de=s.memoizedState,K=de.element,CA(t,s),B1(s,W,null,w);var z=s.memoizedState;if(W=z.element,de.isDehydrated)if(de={element:W,isDehydrated:!1,cache:z.cache,pendingSuspenseBoundaries:z.pendingSuspenseBoundaries,transitions:z.transitions},s.updateQueue.baseState=de,s.memoizedState=de,s.flags&256){K=g0(Error(pa(423)),s),s=Qw(t,s,W,w,K);break e}else if(W!==K){K=g0(Error(pa(424)),s),s=Qw(t,s,W,w,K);break e}else for(uu=Yh(s.stateNode.containerInfo.firstChild),fu=s,vo=!0,bf=null,w=RA(s,null,W,w),s.child=w;w;)w.flags=w.flags&-3|4096,w=w.sibling;else{if(v0(),W===K){s=jc(t,s,w);break e}pl(t,s,W,w)}s=s.child}return s;case 5:return DA(s),t===null&&Bx(s),W=s.type,K=s.pendingProps,de=t!==null?t.memoizedProps:null,z=K.children,Fx(W,K)?z=null:de!==null&&Fx(W,de)&&(s.flags|=32),r5(t,s),pl(t,s,z,w),s.child;case 6:return t===null&&Bx(s),null;case 13:return a5(t,s,w);case 4:return j2(s,s.stateNode.containerInfo),W=s.pendingProps,t===null?s.child=d0(s,null,W,w):pl(t,s,W,w),s.child;case 11:return W=s.type,K=s.pendingProps,K=s.elementType===W?K:mf(W,K),Kw(t,s,W,K,w);case 7:return pl(t,s,s.pendingProps,w),s.child;case 8:return pl(t,s,s.pendingProps.children,w),s.child;case 12:return pl(t,s,s.pendingProps.children,w),s.child;case 10:e:{if(W=s.type._context,K=s.pendingProps,de=s.memoizedProps,z=K.value,ro(z1,W._currentValue),W._currentValue=z,de!==null)if(Cf(de.value,z)){if(de.children===K.children&&!Nl.current){s=jc(t,s,w);break e}}else for(de=s.child,de!==null&&(de.return=s);de!==null;){var B=de.dependencies;if(B!==null){z=de.child;for(var e=B.firstContext;e!==null;){if(e.context===W){if(de.tag===1){e=Hc(-1,w&-w),e.tag=2;var d=de.updateQueue;if(d!==null){d=d.shared;var P=d.pending;P===null?e.next=e:(e.next=P.next,P.next=e),d.pending=e}}de.lanes|=w,e=de.alternate,e!==null&&(e.lanes|=w),Ux(de.return,w,s),B.lanes|=w;break}e=e.next}}else if(de.tag===10)z=de.type===s.type?null:de.child;else if(de.tag===18){if(z=de.return,z===null)throw Error(pa(341));z.lanes|=w,B=z.alternate,B!==null&&(B.lanes|=w),Ux(z,w,s),z=de.sibling}else z=de.child;if(z!==null)z.return=de;else for(z=de;z!==null;){if(z===s){z=null;break}if(de=z.sibling,de!==null){de.return=z.return,z=de;break}z=z.return}de=z}pl(t,s,K.children,w),s=s.child}return s;case 9:return K=s.type,W=s.pendingProps.children,i0(s,w),K=Hu(K),W=W(K),s.flags|=1,pl(t,s,W,w),s.child;case 14:return W=s.type,K=mf(W,s.pendingProps),K=mf(W.type,K),Jw(t,s,W,K,w);case 15:return e5(t,s,s.type,s.pendingProps,w);case 17:return W=s.type,K=s.pendingProps,K=s.elementType===W?K:mf(W,K),x1(t,s),s.tag=1,Bl(W)?(t=!0,F1(s)):t=!1,i0(s,w),PA(s,W,K),Vx(s,W,K,w),Yx(null,s,W,!0,t,w);case 19:return i5(t,s,w);case 22:return t5(t,s,w)}throw Error(pa(156,s.tag))};function w5(t,s){return Z4(t,s)}function K7(t,s,w,W){this.tag=t,this.key=w,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=W,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bu(t,s,w,W){return new K7(t,s,w,W)}function u3(t){return t=t.prototype,!(!t||!t.isReactComponent)}function J7(t){if(typeof t=="function")return u3(t)?1:0;if(t!=null){if(t=t.$$typeof,t===L2)return 11;if(t===P2)return 14}return 2}function Kh(t,s){var w=t.alternate;return w===null?(w=Bu(t.tag,s,t.key,t.mode),w.elementType=t.elementType,w.type=t.type,w.stateNode=t.stateNode,w.alternate=t,t.alternate=w):(w.pendingProps=s,w.type=t.type,w.flags=0,w.subtreeFlags=0,w.deletions=null),w.flags=t.flags&14680064,w.childLanes=t.childLanes,w.lanes=t.lanes,w.child=t.child,w.memoizedProps=t.memoizedProps,w.memoizedState=t.memoizedState,w.updateQueue=t.updateQueue,s=t.dependencies,w.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},w.sibling=t.sibling,w.index=t.index,w.ref=t.ref,w}function T1(t,s,w,W,K,de){var z=2;if(W=t,typeof t=="function")u3(t)&&(z=1);else if(typeof t=="string")z=5;else e:switch(t){case Gd:return Xv(w.children,K,de,s);case C2:z=8,K|=8;break;case hx:return t=Bu(12,w,s,K|2),t.elementType=hx,t.lanes=de,t;case vx:return t=Bu(13,w,s,K),t.elementType=vx,t.lanes=de,t;case dx:return t=Bu(19,w,s,K),t.elementType=dx,t.lanes=de,t;case _4:return wy(w,K,de,s);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case L4:z=10;break e;case P4:z=9;break e;case L2:z=11;break e;case P2:z=14;break e;case Ih:z=16,W=null;break e}throw Error(pa(130,t==null?t:typeof t,""))}return s=Bu(z,w,s,K),s.elementType=t,s.type=W,s.lanes=de,s}function Xv(t,s,w,W){return t=Bu(7,t,W,s),t.lanes=w,t}function wy(t,s,w,W){return t=Bu(22,t,W,s),t.elementType=_4,t.lanes=w,t.stateNode={isHidden:!1},t}function Bm(t,s,w){return t=Bu(6,t,null,s),t.lanes=w,t}function Um(t,s,w){return s=Bu(4,t.children!==null?t.children:[],t.key,s),s.lanes=w,s.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},s}function $7(t,s,w,W,K){this.tag=s,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bm(0),this.expirationTimes=bm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bm(0),this.identifierPrefix=W,this.onRecoverableError=K,this.mutableSourceEagerHydrationData=null}function f3(t,s,w,W,K,de,z,B,e){return t=new $7(t,s,w,B,e),s===1?(s=1,de===!0&&(s|=8)):s=0,de=Bu(3,null,null,s),t.current=de,de.stateNode=t,de.memoizedState={element:W,isDehydrated:w,cache:null,transitions:null,pendingSuspenseBoundaries:null},Z2(de),t}function Q7(t,s,w){var W=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Vd,key:W==null?null:""+W,children:t,containerInfo:s,implementation:w}}function T5(t){if(!t)return $h;t=t._reactInternals;e:{if(ad(t)!==t||t.tag!==1)throw Error(pa(170));var s=t;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Bl(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(pa(171))}if(t.tag===1){var w=t.type;if(Bl(w))return wA(t,w,s)}return s}function A5(t,s,w,W,K,de,z,B,e){return t=f3(w,W,!0,t,K,de,z,B,e),t.context=T5(null),w=t.current,W=xl(),K=jh(w),de=Hc(W,K),de.callback=s??null,Xh(w,de,K),t.current.lanes=K,$p(t,K,W),Ul(t,W),t}function Ty(t,s,w,W){var K=s.current,de=xl(),z=jh(K);return w=T5(w),s.context===null?s.context=w:s.pendingContext=w,s=Hc(de,z),s.payload={element:t},W=W===void 0?null:W,W!==null&&(s.callback=W),t=Xh(K,s,z),t!==null&&(Sf(t,K,z,de),g1(t,K,z)),z}function Z1(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function lT(t,s){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var w=t.retryLane;t.retryLane=w!==0&&w<s?w:s}}function c3(t,s){lT(t,s),(t=t.alternate)&&lT(t,s)}function q7(){return null}var S5=typeof reportError=="function"?reportError:function(t){console.error(t)};function h3(t){this._internalRoot=t}Ay.prototype.render=h3.prototype.render=function(t){var s=this._internalRoot;if(s===null)throw Error(pa(409));Ty(t,s,null,null)};Ay.prototype.unmount=h3.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var s=t.containerInfo;Qv(function(){Ty(null,t,null,null)}),s[Xc]=null}};function Ay(t){this._internalRoot=t}Ay.prototype.unstable_scheduleHydration=function(t){if(t){var s=eA();t={blockedOn:null,target:t,priority:s};for(var w=0;w<kh.length&&s!==0&&s<kh[w].priority;w++);kh.splice(w,0,t),w===0&&rA(t)}};function v3(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Sy(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function uT(){}function eL(t,s,w,W,K){if(K){if(typeof W=="function"){var de=W;W=function(){var d=Z1(z);de.call(d)}}var z=A5(s,W,t,0,null,!1,!1,"",uT);return t._reactRootContainer=z,t[Xc]=z.current,kp(t.nodeType===8?t.parentNode:t),Qv(),z}for(;K=t.lastChild;)t.removeChild(K);if(typeof W=="function"){var B=W;W=function(){var d=Z1(e);B.call(d)}}var e=f3(t,0,!1,null,null,!1,!1,"",uT);return t._reactRootContainer=e,t[Xc]=e.current,kp(t.nodeType===8?t.parentNode:t),Qv(function(){Ty(s,e,w,W)}),e}function Ey(t,s,w,W,K){var de=w._reactRootContainer;if(de){var z=de;if(typeof K=="function"){var B=K;K=function(){var e=Z1(z);B.call(e)}}Ty(s,z,t,K)}else z=eL(w,s,t,K,W);return Z1(z)}Q4=function(t){switch(t.tag){case 3:var s=t.stateNode;if(s.current.memoizedState.isDehydrated){var w=sp(s.pendingLanes);w!==0&&(D2(s,w|1),Ul(s,Uo()),!(_i&6)&&(y0=Uo()+500,av()))}break;case 13:Qv(function(){var W=Zc(t,1);if(W!==null){var K=xl();Sf(W,t,1,K)}}),c3(t,1)}};I2=function(t){if(t.tag===13){var s=Zc(t,134217728);if(s!==null){var w=xl();Sf(s,t,134217728,w)}c3(t,134217728)}};q4=function(t){if(t.tag===13){var s=jh(t),w=Zc(t,s);if(w!==null){var W=xl();Sf(w,t,s,W)}c3(t,s)}};eA=function(){return Yi};tA=function(t,s){var w=Yi;try{return Yi=t,s()}finally{Yi=w}};Sx=function(t,s,w){switch(s){case"input":if(yx(t,w),s=w.name,w.type==="radio"&&s!=null){for(w=t;w.parentNode;)w=w.parentNode;for(w=w.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<w.length;s++){var W=w[s];if(W!==t&&W.form===t.form){var K=py(W);if(!K)throw Error(pa(90));D4(W),yx(W,K)}}}break;case"textarea":F4(t,w);break;case"select":s=w.value,s!=null&&t0(t,!!w.multiple,s,!1)}};H4=o3;V4=Qv;var tL={usingClientEntryPoint:!1,Events:[qp,Zd,py,B4,U4,o3]},rp={findFiberByHostInstance:Vv,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},rL={bundleType:rp.bundleType,version:rp.version,rendererPackageName:rp.rendererPackageName,rendererConfig:rp.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:$c.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Y4(t),t===null?null:t.stateNode},findFiberByHostInstance:rp.findFiberByHostInstance||q7,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $g=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$g.isDisabled&&$g.supportsFiber)try{cy=$g.inject(rL),rc=$g}catch{}}vu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tL;vu.createPortal=function(t,s){var w=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v3(s))throw Error(pa(200));return Q7(t,s,null,w)};vu.createRoot=function(t,s){if(!v3(t))throw Error(pa(299));var w=!1,W="",K=S5;return s!=null&&(s.unstable_strictMode===!0&&(w=!0),s.identifierPrefix!==void 0&&(W=s.identifierPrefix),s.onRecoverableError!==void 0&&(K=s.onRecoverableError)),s=f3(t,1,!1,null,null,w,!1,W,K),t[Xc]=s.current,kp(t.nodeType===8?t.parentNode:t),new h3(s)};vu.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var s=t._reactInternals;if(s===void 0)throw typeof t.render=="function"?Error(pa(188)):(t=Object.keys(t).join(","),Error(pa(268,t)));return t=Y4(s),t=t===null?null:t.stateNode,t};vu.flushSync=function(t){return Qv(t)};vu.hydrate=function(t,s,w){if(!Sy(s))throw Error(pa(200));return Ey(null,t,s,!0,w)};vu.hydrateRoot=function(t,s,w){if(!v3(t))throw Error(pa(405));var W=w!=null&&w.hydratedSources||null,K=!1,de="",z=S5;if(w!=null&&(w.unstable_strictMode===!0&&(K=!0),w.identifierPrefix!==void 0&&(de=w.identifierPrefix),w.onRecoverableError!==void 0&&(z=w.onRecoverableError)),s=A5(s,null,t,1,w??null,K,!1,de,z),t[Xc]=s.current,kp(t),W)for(t=0;t<W.length;t++)w=W[t],K=w._getVersion,K=K(w._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[w,K]:s.mutableSourceEagerHydrationData.push(w,K);return new Ay(s)};vu.render=function(t,s,w){if(!Sy(s))throw Error(pa(200));return Ey(null,t,s,!1,w)};vu.unmountComponentAtNode=function(t){if(!Sy(t))throw Error(pa(40));return t._reactRootContainer?(Qv(function(){Ey(null,null,t,!1,function(){t._reactRootContainer=null,t[Xc]=null})}),!0):!1};vu.unstable_batchedUpdates=o3;vu.unstable_renderSubtreeIntoContainer=function(t,s,w,W){if(!Sy(w))throw Error(pa(200));if(t==null||t._reactInternals===void 0)throw Error(pa(38));return Ey(t,s,w,!1,W)};vu.version="18.2.0-next-9e3b772b8-20220608";(function(t){function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(w){console.error(w)}}s(),t.exports=vu})(q8);var fT=ux;lx.createRoot=fT.createRoot,lx.hydrateRoot=fT.hydrateRoot;/**
* table-core
*
* Copyright (c) TanStack
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Bh(t,s){return typeof t=="function"?t(s):t}function Gu(t,s){return w=>{s.setState(W=>({...W,[t]:Bh(w,W[t])}))}}function j1(t){return t instanceof Function}function nL(t,s){const w=[],W=K=>{K.forEach(de=>{w.push(de);const z=s(de);z!=null&&z.length&&W(z)})};return W(t),w}function ei(t,s,w){let W=[],K;return()=>{let de;w.key&&w.debug&&(de=Date.now());const z=t();if(!(z.length!==W.length||z.some((d,P)=>W[P]!==d)))return K;W=z;let e;if(w.key&&w.debug&&(e=Date.now()),K=s(...z),w==null||w.onChange==null||w.onChange(K),w.key&&w.debug&&w!=null&&w.debug()){const d=Math.round((Date.now()-de)*100)/100,P=Math.round((Date.now()-e)*100)/100,a=P/16,_=(x,v)=>{for(x=String(x);x.length<v;)x=" "+x;return x};console.info(`%c⏱ ${_(P,5)} /${_(d,5)} ms`,`
font-size: .6rem;
font-weight: bold;
color: hsl(${Math.max(0,Math.min(120-120*a,120))}deg 100% 31%);`,w==null?void 0:w.key)}return K}}function aL(t,s,w,W){var K,de;const B={...t._getDefaultColumnDef(),...s},e=B.accessorKey;let d=(K=(de=B.id)!=null?de:e?e.replace(".","_"):void 0)!=null?K:typeof B.header=="string"?B.header:void 0,P;if(B.accessorFn?P=B.accessorFn:e&&(e.includes(".")?P=_=>{let x=_;for(const y of e.split(".")){var v;x=(v=x)==null?void 0:v[y]}return x}:P=_=>_[B.accessorKey]),!d)throw new Error;let a={id:`${String(d)}`,accessorFn:P,parent:W,depth:w,columnDef:B,columns:[],getFlatColumns:ei(()=>[!0],()=>{var _;return[a,...(_=a.columns)==null?void 0:_.flatMap(x=>x.getFlatColumns())]},{key:"column.getFlatColumns",debug:()=>{var _;return(_=t.options.debugAll)!=null?_:t.options.debugColumns}}),getLeafColumns:ei(()=>[t._getOrderColumnsFn()],_=>{var x;if((x=a.columns)!=null&&x.length){let v=a.columns.flatMap(y=>y.getLeafColumns());return _(v)}return[a]},{key:"column.getLeafColumns",debug:()=>{var _;return(_=t.options.debugAll)!=null?_:t.options.debugColumns}})};return a=t._features.reduce((_,x)=>Object.assign(_,x.createColumn==null?void 0:x.createColumn(a,t)),a),a}function cT(t,s,w){var W;let de={id:(W=w.id)!=null?W:s.id,column:s,index:w.index,isPlaceholder:!!w.isPlaceholder,placeholderId:w.placeholderId,depth:w.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const z=[],B=e=>{e.subHeaders&&e.subHeaders.length&&e.subHeaders.map(B),z.push(e)};return B(de),z},getContext:()=>({table:t,header:de,column:s})};return t._features.forEach(z=>{Object.assign(de,z.createHeader==null?void 0:z.createHeader(de,t))}),de}const iL={createTable:t=>({getHeaderGroups:ei(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(s,w,W,K)=>{var de,z;const B=(de=W==null?void 0:W.map(a=>w.find(_=>_.id===a)).filter(Boolean))!=null?de:[],e=(z=K==null?void 0:K.map(a=>w.find(_=>_.id===a)).filter(Boolean))!=null?z:[],d=w.filter(a=>!(W!=null&&W.includes(a.id))&&!(K!=null&&K.includes(a.id)));return Qg(s,[...B,...d,...e],t)},{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugHeaders}}),getCenterHeaderGroups:ei(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(s,w,W,K)=>(w=w.filter(de=>!(W!=null&&W.includes(de.id))&&!(K!=null&&K.includes(de.id))),Qg(s,w,t,"center")),{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugHeaders}}),getLeftHeaderGroups:ei(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left],(s,w,W)=>{var K;const de=(K=W==null?void 0:W.map(z=>w.find(B=>B.id===z)).filter(Boolean))!=null?K:[];return Qg(s,de,t,"left")},{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugHeaders}}),getRightHeaderGroups:ei(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.right],(s,w,W)=>{var K;const de=(K=W==null?void 0:W.map(z=>w.find(B=>B.id===z)).filter(Boolean))!=null?K:[];return Qg(s,de,t,"right")},{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugHeaders}}),getFooterGroups:ei(()=>[t.getHeaderGroups()],s=>[...s].reverse(),{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugHeaders}}),getLeftFooterGroups:ei(()=>[t.getLeftHeaderGroups()],s=>[...s].reverse(),{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugHeaders}}),getCenterFooterGroups:ei(()=>[t.getCenterHeaderGroups()],s=>[...s].reverse(),{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugHeaders}}),getRightFooterGroups:ei(()=>[t.getRightHeaderGroups()],s=>[...s].reverse(),{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugHeaders}}),getFlatHeaders:ei(()=>[t.getHeaderGroups()],s=>s.map(w=>w.headers).flat(),{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugHeaders}}),getLeftFlatHeaders:ei(()=>[t.getLeftHeaderGroups()],s=>s.map(w=>w.headers).flat(),{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugHeaders}}),getCenterFlatHeaders:ei(()=>[t.getCenterHeaderGroups()],s=>s.map(w=>w.headers).flat(),{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugHeaders}}),getRightFlatHeaders:ei(()=>[t.getRightHeaderGroups()],s=>s.map(w=>w.headers).flat(),{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugHeaders}}),getCenterLeafHeaders:ei(()=>[t.getCenterFlatHeaders()],s=>s.filter(w=>{var W;return!((W=w.subHeaders)!=null&&W.length)}),{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugHeaders}}),getLeftLeafHeaders:ei(()=>[t.getLeftFlatHeaders()],s=>s.filter(w=>{var W;return!((W=w.subHeaders)!=null&&W.length)}),{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugHeaders}}),getRightLeafHeaders:ei(()=>[t.getRightFlatHeaders()],s=>s.filter(w=>{var W;return!((W=w.subHeaders)!=null&&W.length)}),{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugHeaders}}),getLeafHeaders:ei(()=>[t.getLeftHeaderGroups(),t.getCenterHeaderGroups(),t.getRightHeaderGroups()],(s,w,W)=>{var K,de,z,B,e,d;return[...(K=(de=s[0])==null?void 0:de.headers)!=null?K:[],...(z=(B=w[0])==null?void 0:B.headers)!=null?z:[],...(e=(d=W[0])==null?void 0:d.headers)!=null?e:[]].map(P=>P.getLeafHeaders()).flat()},{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugHeaders}})})};function Qg(t,s,w,W){var K,de;let z=0;const B=function(_,x){x===void 0&&(x=1),z=Math.max(z,x),_.filter(v=>v.getIsVisible()).forEach(v=>{var y;(y=v.columns)!=null&&y.length&&B(v.columns,x+1)},0)};B(t);let e=[];const d=(_,x)=>{const v={depth:x,id:[W,`${x}`].filter(Boolean).join("_"),headers:[]},y=[];_.forEach(r=>{const n=[...y].reverse()[0],u=r.column.depth===v.depth;let i,f=!1;if(u&&r.column.parent?i=r.column.parent:(i=r.column,f=!0),n&&(n==null?void 0:n.column)===i)n.subHeaders.push(r);else{const g=cT(w,i,{id:[W,x,i.id,r==null?void 0:r.id].filter(Boolean).join("_"),isPlaceholder:f,placeholderId:f?`${y.filter(h=>h.column===i).length}`:void 0,depth:x,index:y.length});g.subHeaders.push(r),y.push(g)}v.headers.push(r),r.headerGroup=v}),e.push(v),x>0&&d(y,x-1)},P=s.map((_,x)=>cT(w,_,{depth:z,index:x}));d(P,z-1),e.reverse();const a=_=>_.filter(v=>v.column.getIsVisible()).map(v=>{let y=0,r=0,n=[0];v.subHeaders&&v.subHeaders.length?(n=[],a(v.subHeaders).forEach(i=>{let{colSpan:f,rowSpan:g}=i;y+=f,n.push(g)})):y=1;const u=Math.min(...n);return r=r+u,v.colSpan=y,v.rowSpan=r,{colSpan:y,rowSpan:r}});return a((K=(de=e[0])==null?void 0:de.headers)!=null?K:[]),e}const qg={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Hm=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),oL={getDefaultColumnDef:()=>qg,getInitialState:t=>({columnSizing:{},columnSizingInfo:Hm(),...t}),getDefaultOptions:t=>({columnResizeMode:"onEnd",onColumnSizingChange:Gu("columnSizing",t),onColumnSizingInfoChange:Gu("columnSizingInfo",t)}),createColumn:(t,s)=>({getSize:()=>{var w,W,K;const de=s.getState().columnSizing[t.id];return Math.min(Math.max((w=t.columnDef.minSize)!=null?w:qg.minSize,(W=de??t.columnDef.size)!=null?W:qg.size),(K=t.columnDef.maxSize)!=null?K:qg.maxSize)},getStart:w=>{const W=w?w==="left"?s.getLeftVisibleLeafColumns():s.getRightVisibleLeafColumns():s.getVisibleLeafColumns(),K=W.findIndex(de=>de.id===t.id);if(K>0){const de=W[K-1];return de.getStart(w)+de.getSize()}return 0},resetSize:()=>{s.setColumnSizing(w=>{let{[t.id]:W,...K}=w;return K})},getCanResize:()=>{var w,W;return((w=t.columnDef.enableResizing)!=null?w:!0)&&((W=s.options.enableColumnResizing)!=null?W:!0)},getIsResizing:()=>s.getState().columnSizingInfo.isResizingColumn===t.id}),createHeader:(t,s)=>({getSize:()=>{let w=0;const W=K=>{if(K.subHeaders.length)K.subHeaders.forEach(W);else{var de;w+=(de=K.column.getSize())!=null?de:0}};return W(t),w},getStart:()=>{if(t.index>0){const w=t.headerGroup.headers[t.index-1];return w.getStart()+w.getSize()}return 0},getResizeHandler:()=>{const w=s.getColumn(t.column.id),W=w==null?void 0:w.getCanResize();return K=>{if(!w||!W||(K.persist==null||K.persist(),Vm(K)&&K.touches&&K.touches.length>1))return;const de=t.getSize(),z=t?t.getLeafHeaders().map(y=>[y.column.id,y.column.getSize()]):[[w.id,w.getSize()]],B=Vm(K)?Math.round(K.touches[0].clientX):K.clientX,e={},d=(y,r)=>{typeof r=="number"&&(s.setColumnSizingInfo(n=>{var u,i;const f=r-((u=n==null?void 0:n.startOffset)!=null?u:0),g=Math.max(f/((i=n==null?void 0:n.startSize)!=null?i:0),-.999999);return n.columnSizingStart.forEach(h=>{let[b,p]=h;e[b]=Math.round(Math.max(p+p*g,0)*100)/100}),{...n,deltaOffset:f,deltaPercentage:g}}),(s.options.columnResizeMode==="onChange"||y==="end")&&s.setColumnSizing(n=>({...n,...e})))},P=y=>d("move",y),a=y=>{d("end",y),s.setColumnSizingInfo(r=>({...r,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},_={moveHandler:y=>P(y.clientX),upHandler:y=>{document.removeEventListener("mousemove",_.moveHandler),document.removeEventListener("mouseup",_.upHandler),a(y.clientX)}},x={moveHandler:y=>(y.cancelable&&(y.preventDefault(),y.stopPropagation()),P(y.touches[0].clientX),!1),upHandler:y=>{var r;document.removeEventListener("touchmove",x.moveHandler),document.removeEventListener("touchend",x.upHandler),y.cancelable&&(y.preventDefault(),y.stopPropagation()),a((r=y.touches[0])==null?void 0:r.clientX)}},v=sL()?{passive:!1}:!1;Vm(K)?(document.addEventListener("touchmove",x.moveHandler,v),document.addEventListener("touchend",x.upHandler,v)):(document.addEventListener("mousemove",_.moveHandler,v),document.addEventListener("mouseup",_.upHandler,v)),s.setColumnSizingInfo(y=>({...y,startOffset:B,startSize:de,deltaOffset:0,deltaPercentage:0,columnSizingStart:z,isResizingColumn:w.id}))}}}),createTable:t=>({setColumnSizing:s=>t.options.onColumnSizingChange==null?void 0:t.options.onColumnSizingChange(s),setColumnSizingInfo:s=>t.options.onColumnSizingInfoChange==null?void 0:t.options.onColumnSizingInfoChange(s),resetColumnSizing:s=>{var w;t.setColumnSizing(s?{}:(w=t.initialState.columnSizing)!=null?w:{})},resetHeaderSizeInfo:s=>{var w;t.setColumnSizingInfo(s?Hm():(w=t.initialState.columnSizingInfo)!=null?w:Hm())},getTotalSize:()=>{var s,w;return(s=(w=t.getHeaderGroups()[0])==null?void 0:w.headers.reduce((W,K)=>W+K.getSize(),0))!=null?s:0},getLeftTotalSize:()=>{var s,w;return(s=(w=t.getLeftHeaderGroups()[0])==null?void 0:w.headers.reduce((W,K)=>W+K.getSize(),0))!=null?s:0},getCenterTotalSize:()=>{var s,w;return(s=(w=t.getCenterHeaderGroups()[0])==null?void 0:w.headers.reduce((W,K)=>W+K.getSize(),0))!=null?s:0},getRightTotalSize:()=>{var s,w;return(s=(w=t.getRightHeaderGroups()[0])==null?void 0:w.headers.reduce((W,K)=>W+K.getSize(),0))!=null?s:0}})};let e1=null;function sL(){if(typeof e1=="boolean")return e1;let t=!1;try{const s={get passive(){return t=!0,!1}},w=()=>{};window.addEventListener("test",w,s),window.removeEventListener("test",w)}catch{t=!1}return e1=t,e1}function Vm(t){return t.type==="touchstart"}const lL={getInitialState:t=>({expanded:{},...t}),getDefaultOptions:t=>({onExpandedChange:Gu("expanded",t),paginateExpandedRows:!0}),createTable:t=>{let s=!1,w=!1;return{_autoResetExpanded:()=>{var W,K;if(!s){t._queue(()=>{s=!0});return}if((W=(K=t.options.autoResetAll)!=null?K:t.options.autoResetExpanded)!=null?W:!t.options.manualExpanding){if(w)return;w=!0,t._queue(()=>{t.resetExpanded(),w=!1})}},setExpanded:W=>t.options.onExpandedChange==null?void 0:t.options.onExpandedChange(W),toggleAllRowsExpanded:W=>{W??!t.getIsAllRowsExpanded()?t.setExpanded(!0):t.setExpanded({})},resetExpanded:W=>{var K,de;t.setExpanded(W?{}:(K=(de=t.initialState)==null?void 0:de.expanded)!=null?K:{})},getCanSomeRowsExpand:()=>t.getRowModel().flatRows.some(W=>W.getCanExpand()),getToggleAllRowsExpandedHandler:()=>W=>{W.persist==null||W.persist(),t.toggleAllRowsExpanded()},getIsSomeRowsExpanded:()=>{const W=t.getState().expanded;return W===!0||Object.values(W).some(Boolean)},getIsAllRowsExpanded:()=>{const W=t.getState().expanded;return typeof W=="boolean"?W===!0:!(!Object.keys(W).length||t.getRowModel().flatRows.some(K=>!K.getIsExpanded()))},getExpandedDepth:()=>{let W=0;return(t.getState().expanded===!0?Object.keys(t.getRowModel().rowsById):Object.keys(t.getState().expanded)).forEach(de=>{const z=de.split(".");W=Math.max(W,z.length)}),W},getPreExpandedRowModel:()=>t.getSortedRowModel(),getExpandedRowModel:()=>(!t._getExpandedRowModel&&t.options.getExpandedRowModel&&(t._getExpandedRowModel=t.options.getExpandedRowModel(t)),t.options.manualExpanding||!t._getExpandedRowModel?t.getPreExpandedRowModel():t._getExpandedRowModel())}},createRow:(t,s)=>({toggleExpanded:w=>{s.setExpanded(W=>{var K;const de=W===!0?!0:!!(W!=null&&W[t.id]);let z={};if(W===!0?Object.keys(s.getRowModel().rowsById).forEach(B=>{z[B]=!0}):z=W,w=(K=w)!=null?K:!de,!de&&w)return{...z,[t.id]:!0};if(de&&!w){const{[t.id]:B,...e}=z;return e}return W})},getIsExpanded:()=>{var w;const W=s.getState().expanded;return!!((w=s.options.getIsRowExpanded==null?void 0:s.options.getIsRowExpanded(t))!=null?w:W===!0||W!=null&&W[t.id])},getCanExpand:()=>{var w,W,K;return(w=s.options.getRowCanExpand==null?void 0:s.options.getRowCanExpand(t))!=null?w:((W=s.options.enableExpanding)!=null?W:!0)&&!!((K=t.subRows)!=null&&K.length)},getToggleExpandedHandler:()=>{const w=t.getCanExpand();return()=>{w&&t.toggleExpanded()}}})},E5=(t,s,w)=>{var W;const K=w.toLowerCase();return Boolean((W=t.getValue(s))==null?void 0:W.toLowerCase().includes(K))};E5.autoRemove=t=>Ef(t);const M5=(t,s,w)=>{var W;return Boolean((W=t.getValue(s))==null?void 0:W.includes(w))};M5.autoRemove=t=>Ef(t);const C5=(t,s,w)=>{var W;return((W=t.getValue(s))==null?void 0:W.toLowerCase())===w.toLowerCase()};C5.autoRemove=t=>Ef(t);const L5=(t,s,w)=>{var W;return(W=t.getValue(s))==null?void 0:W.includes(w)};L5.autoRemove=t=>Ef(t)||!(t!=null&&t.length);const P5=(t,s,w)=>!w.some(W=>{var K;return!((K=t.getValue(s))!=null&&K.includes(W))});P5.autoRemove=t=>Ef(t)||!(t!=null&&t.length);const _5=(t,s,w)=>w.some(W=>{var K;return(K=t.getValue(s))==null?void 0:K.includes(W)});_5.autoRemove=t=>Ef(t)||!(t!=null&&t.length);const R5=(t,s,w)=>t.getValue(s)===w;R5.autoRemove=t=>Ef(t);const D5=(t,s,w)=>t.getValue(s)==w;D5.autoRemove=t=>Ef(t);const d3=(t,s,w)=>{let[W,K]=w;const de=t.getValue(s);return de>=W&&de<=K};d3.resolveFilterValue=t=>{let[s,w]=t,W=typeof s!="number"?parseFloat(s):s,K=typeof w!="number"?parseFloat(w):w,de=s===null||Number.isNaN(W)?-1/0:W,z=w===null||Number.isNaN(K)?1/0:K;if(de>z){const B=de;de=z,z=B}return[de,z]};d3.autoRemove=t=>Ef(t)||Ef(t[0])&&Ef(t[1]);const kc={includesString:E5,includesStringSensitive:M5,equalsString:C5,arrIncludes:L5,arrIncludesAll:P5,arrIncludesSome:_5,equals:R5,weakEquals:D5,inNumberRange:d3};function Ef(t){return t==null||t===""}const uL={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:t=>({columnFilters:[],globalFilter:void 0,...t}),getDefaultOptions:t=>({onColumnFiltersChange:Gu("columnFilters",t),onGlobalFilterChange:Gu("globalFilter",t),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:s=>{var w,W;const K=(w=t.getCoreRowModel().flatRows[0])==null||(W=w._getAllCellsByColumnId()[s.id])==null?void 0:W.getValue();return typeof K=="string"||typeof K=="number"}}),createColumn:(t,s)=>({getAutoFilterFn:()=>{const w=s.getCoreRowModel().flatRows[0],W=w==null?void 0:w.getValue(t.id);return typeof W=="string"?kc.includesString:typeof W=="number"?kc.inNumberRange:typeof W=="boolean"||W!==null&&typeof W=="object"?kc.equals:Array.isArray(W)?kc.arrIncludes:kc.weakEquals},getFilterFn:()=>{var w,W;return j1(t.columnDef.filterFn)?t.columnDef.filterFn:t.columnDef.filterFn==="auto"?t.getAutoFilterFn():(w=(W=s.options.filterFns)==null?void 0:W[t.columnDef.filterFn])!=null?w:kc[t.columnDef.filterFn]},getCanFilter:()=>{var w,W,K;return((w=t.columnDef.enableColumnFilter)!=null?w:!0)&&((W=s.options.enableColumnFilters)!=null?W:!0)&&((K=s.options.enableFilters)!=null?K:!0)&&!!t.accessorFn},getCanGlobalFilter:()=>{var w,W,K,de;return((w=t.columnDef.enableGlobalFilter)!=null?w:!0)&&((W=s.options.enableGlobalFilter)!=null?W:!0)&&((K=s.options.enableFilters)!=null?K:!0)&&((de=s.options.getColumnCanGlobalFilter==null?void 0:s.options.getColumnCanGlobalFilter(t))!=null?de:!0)&&!!t.accessorFn},getIsFiltered:()=>t.getFilterIndex()>-1,getFilterValue:()=>{var w,W;return(w=s.getState().columnFilters)==null||(W=w.find(K=>K.id===t.id))==null?void 0:W.value},getFilterIndex:()=>{var w,W;return(w=(W=s.getState().columnFilters)==null?void 0:W.findIndex(K=>K.id===t.id))!=null?w:-1},setFilterValue:w=>{s.setColumnFilters(W=>{const K=t.getFilterFn(),de=W==null?void 0:W.find(P=>P.id===t.id),z=Bh(w,de?de.value:void 0);if(hT(K,z,t)){var B;return(B=W==null?void 0:W.filter(P=>P.id!==t.id))!=null?B:[]}const e={id:t.id,value:z};if(de){var d;return(d=W==null?void 0:W.map(P=>P.id===t.id?e:P))!=null?d:[]}return W!=null&&W.length?[...W,e]:[e]})},_getFacetedRowModel:s.options.getFacetedRowModel&&s.options.getFacetedRowModel(s,t.id),getFacetedRowModel:()=>t._getFacetedRowModel?t._getFacetedRowModel():s.getPreFilteredRowModel(),_getFacetedUniqueValues:s.options.getFacetedUniqueValues&&s.options.getFacetedUniqueValues(s,t.id),getFacetedUniqueValues:()=>t._getFacetedUniqueValues?t._getFacetedUniqueValues():new Map,_getFacetedMinMaxValues:s.options.getFacetedMinMaxValues&&s.options.getFacetedMinMaxValues(s,t.id),getFacetedMinMaxValues:()=>{if(t._getFacetedMinMaxValues)return t._getFacetedMinMaxValues()}}),createRow:(t,s)=>({columnFilters:{},columnFiltersMeta:{}}),createTable:t=>({getGlobalAutoFilterFn:()=>kc.includesString,getGlobalFilterFn:()=>{var s,w;const{globalFilterFn:W}=t.options;return j1(W)?W:W==="auto"?t.getGlobalAutoFilterFn():(s=(w=t.options.filterFns)==null?void 0:w[W])!=null?s:kc[W]},setColumnFilters:s=>{const w=t.getAllLeafColumns(),W=K=>{var de;return(de=Bh(s,K))==null?void 0:de.filter(z=>{const B=w.find(e=>e.id===z.id);if(B){const e=B.getFilterFn();if(hT(e,z.value,B))return!1}return!0})};t.options.onColumnFiltersChange==null||t.options.onColumnFiltersChange(W)},setGlobalFilter:s=>{t.options.onGlobalFilterChange==null||t.options.onGlobalFilterChange(s)},resetGlobalFilter:s=>{t.setGlobalFilter(s?void 0:t.initialState.globalFilter)},resetColumnFilters:s=>{var w,W;t.setColumnFilters(s?[]:(w=(W=t.initialState)==null?void 0:W.columnFilters)!=null?w:[])},getPreFilteredRowModel:()=>t.getCoreRowModel(),getFilteredRowModel:()=>(!t._getFilteredRowModel&&t.options.getFilteredRowModel&&(t._getFilteredRowModel=t.options.getFilteredRowModel(t)),t.options.manualFiltering||!t._getFilteredRowModel?t.getPreFilteredRowModel():t._getFilteredRowModel()),_getGlobalFacetedRowModel:t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,"__global__"),getGlobalFacetedRowModel:()=>t.options.manualFiltering||!t._getGlobalFacetedRowModel?t.getPreFilteredRowModel():t._getGlobalFacetedRowModel(),_getGlobalFacetedUniqueValues:t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,"__global__"),getGlobalFacetedUniqueValues:()=>t._getGlobalFacetedUniqueValues?t._getGlobalFacetedUniqueValues():new Map,_getGlobalFacetedMinMaxValues:t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,"__global__"),getGlobalFacetedMinMaxValues:()=>{if(t._getGlobalFacetedMinMaxValues)return t._getGlobalFacetedMinMaxValues()}})};function hT(t,s,w){return(t&&t.autoRemove?t.autoRemove(s,w):!1)||typeof s>"u"||typeof s=="string"&&!s}const fL=(t,s,w)=>w.reduce((W,K)=>{const de=K.getValue(t);return W+(typeof de=="number"?de:0)},0),cL=(t,s,w)=>{let W;return w.forEach(K=>{const de=K.getValue(t);de!=null&&(W>de||W===void 0&&de>=de)&&(W=de)}),W},hL=(t,s,w)=>{let W;return w.forEach(K=>{const de=K.getValue(t);de!=null&&(W<de||W===void 0&&de>=de)&&(W=de)}),W},vL=(t,s,w)=>{let W,K;return w.forEach(de=>{const z=de.getValue(t);z!=null&&(W===void 0?z>=z&&(W=K=z):(W>z&&(W=z),K<z&&(K=z)))}),[W,K]},dL=(t,s)=>{let w=0,W=0;if(s.forEach(K=>{let de=K.getValue(t);de!=null&&(de=+de)>=de&&(++w,W+=de)}),w)return W/w},pL=(t,s)=>{if(!s.length)return;let w=0,W=0;return s.forEach(K=>{let de=K.getValue(t);typeof de=="number"&&(w=Math.min(w,de),W=Math.max(W,de))}),(w+W)/2},gL=(t,s)=>Array.from(new Set(s.map(w=>w.getValue(t))).values()),yL=(t,s)=>new Set(s.map(w=>w.getValue(t))).size,mL=(t,s)=>s.length,Gm={sum:fL,min:cL,max:hL,extent:vL,mean:dL,median:pL,unique:gL,uniqueCount:yL,count:mL},xL={getDefaultColumnDef:()=>({aggregatedCell:t=>{var s,w;return(s=(w=t.getValue())==null||w.toString==null?void 0:w.toString())!=null?s:null},aggregationFn:"auto"}),getInitialState:t=>({grouping:[],...t}),getDefaultOptions:t=>({onGroupingChange:Gu("grouping",t),groupedColumnMode:"reorder"}),createColumn:(t,s)=>({toggleGrouping:()=>{s.setGrouping(w=>w!=null&&w.includes(t.id)?w.filter(W=>W!==t.id):[...w??[],t.id])},getCanGroup:()=>{var w,W,K,de;return(w=(W=(K=(de=t.columnDef.enableGrouping)!=null?de:!0)!=null?K:s.options.enableGrouping)!=null?W:!0)!=null?w:!!t.accessorFn},getIsGrouped:()=>{var w;return(w=s.getState().grouping)==null?void 0:w.includes(t.id)},getGroupedIndex:()=>{var w;return(w=s.getState().grouping)==null?void 0:w.indexOf(t.id)},getToggleGroupingHandler:()=>{const w=t.getCanGroup();return()=>{w&&t.toggleGrouping()}},getAutoAggregationFn:()=>{const w=s.getCoreRowModel().flatRows[0],W=w==null?void 0:w.getValue(t.id);if(typeof W=="number")return Gm.sum;if(Object.prototype.toString.call(W)==="[object Date]")return Gm.extent},getAggregationFn:()=>{var w,W;if(!t)throw new Error;return j1(t.columnDef.aggregationFn)?t.columnDef.aggregationFn:t.columnDef.aggregationFn==="auto"?t.getAutoAggregationFn():(w=(W=s.options.aggregationFns)==null?void 0:W[t.columnDef.aggregationFn])!=null?w:Gm[t.columnDef.aggregationFn]}}),createTable:t=>({setGrouping:s=>t.options.onGroupingChange==null?void 0:t.options.onGroupingChange(s),resetGrouping:s=>{var w,W;t.setGrouping(s?[]:(w=(W=t.initialState)==null?void 0:W.grouping)!=null?w:[])},getPreGroupedRowModel:()=>t.getFilteredRowModel(),getGroupedRowModel:()=>(!t._getGroupedRowModel&&t.options.getGroupedRowModel&&(t._getGroupedRowModel=t.options.getGroupedRowModel(t)),t.options.manualGrouping||!t._getGroupedRowModel?t.getPreGroupedRowModel():t._getGroupedRowModel())}),createRow:t=>({getIsGrouped:()=>!!t.groupingColumnId,_groupingValuesCache:{}}),createCell:(t,s,w,W)=>({getIsGrouped:()=>s.getIsGrouped()&&s.id===w.groupingColumnId,getIsPlaceholder:()=>!t.getIsGrouped()&&s.getIsGrouped(),getIsAggregated:()=>{var K;return!t.getIsGrouped()&&!t.getIsPlaceholder()&&!!((K=w.subRows)!=null&&K.length)}})};function bL(t,s,w){if(!(s!=null&&s.length)||!w)return t;const W=t.filter(de=>!s.includes(de.id));return w==="remove"?W:[...s.map(de=>t.find(z=>z.id===de)).filter(Boolean),...W]}const wL={getInitialState:t=>({columnOrder:[],...t}),getDefaultOptions:t=>({onColumnOrderChange:Gu("columnOrder",t)}),createTable:t=>({setColumnOrder:s=>t.options.onColumnOrderChange==null?void 0:t.options.onColumnOrderChange(s),resetColumnOrder:s=>{var w;t.setColumnOrder(s?[]:(w=t.initialState.columnOrder)!=null?w:[])},_getOrderColumnsFn:ei(()=>[t.getState().columnOrder,t.getState().grouping,t.options.groupedColumnMode],(s,w,W)=>K=>{let de=[];if(!(s!=null&&s.length))de=K;else{const z=[...s],B=[...K];for(;B.length&&z.length;){const e=z.shift(),d=B.findIndex(P=>P.id===e);d>-1&&de.push(B.splice(d,1)[0])}de=[...de,...B]}return bL(de,w,W)},{key:!1})})},n2=0,a2=10,Wm=()=>({pageIndex:n2,pageSize:a2}),TL={getInitialState:t=>({...t,pagination:{...Wm(),...t==null?void 0:t.pagination}}),getDefaultOptions:t=>({onPaginationChange:Gu("pagination",t)}),createTable:t=>{let s=!1,w=!1;return{_autoResetPageIndex:()=>{var W,K;if(!s){t._queue(()=>{s=!0});return}if((W=(K=t.options.autoResetAll)!=null?K:t.options.autoResetPageIndex)!=null?W:!t.options.manualPagination){if(w)return;w=!0,t._queue(()=>{t.resetPageIndex(),w=!1})}},setPagination:W=>{const K=de=>Bh(W,de);return t.options.onPaginationChange==null?void 0:t.options.onPaginationChange(K)},resetPagination:W=>{var K;t.setPagination(W?Wm():(K=t.initialState.pagination)!=null?K:Wm())},setPageIndex:W=>{t.setPagination(K=>{let de=Bh(W,K.pageIndex);const z=typeof t.options.pageCount>"u"||t.options.pageCount===-1?Number.MAX_SAFE_INTEGER:t.options.pageCount-1;return de=Math.max(0,Math.min(de,z)),{...K,pageIndex:de}})},resetPageIndex:W=>{var K,de,z;t.setPageIndex(W?n2:(K=(de=t.initialState)==null||(z=de.pagination)==null?void 0:z.pageIndex)!=null?K:n2)},resetPageSize:W=>{var K,de,z;t.setPageSize(W?a2:(K=(de=t.initialState)==null||(z=de.pagination)==null?void 0:z.pageSize)!=null?K:a2)},setPageSize:W=>{t.setPagination(K=>{const de=Math.max(1,Bh(W,K.pageSize)),z=K.pageSize*K.pageIndex,B=Math.floor(z/de);return{...K,pageIndex:B,pageSize:de}})},setPageCount:W=>t.setPagination(K=>{var de;let z=Bh(W,(de=t.options.pageCount)!=null?de:-1);return typeof z=="number"&&(z=Math.max(-1,z)),{...K,pageCount:z}}),getPageOptions:ei(()=>[t.getPageCount()],W=>{let K=[];return W&&W>0&&(K=[...new Array(W)].fill(null).map((de,z)=>z)),K},{key:!1,debug:()=>{var W;return(W=t.options.debugAll)!=null?W:t.options.debugTable}}),getCanPreviousPage:()=>t.getState().pagination.pageIndex>0,getCanNextPage:()=>{const{pageIndex:W}=t.getState().pagination,K=t.getPageCount();return K===-1?!0:K===0?!1:W<K-1},previousPage:()=>t.setPageIndex(W=>W-1),nextPage:()=>t.setPageIndex(W=>W+1),getPrePaginationRowModel:()=>t.getExpandedRowModel(),getPaginationRowModel:()=>(!t._getPaginationRowModel&&t.options.getPaginationRowModel&&(t._getPaginationRowModel=t.options.getPaginationRowModel(t)),t.options.manualPagination||!t._getPaginationRowModel?t.getPrePaginationRowModel():t._getPaginationRowModel()),getPageCount:()=>{var W;return(W=t.options.pageCount)!=null?W:Math.ceil(t.getPrePaginationRowModel().rows.length/t.getState().pagination.pageSize)}}}},Ym=()=>({left:[],right:[]}),AL={getInitialState:t=>({columnPinning:Ym(),...t}),getDefaultOptions:t=>({onColumnPinningChange:Gu("columnPinning",t)}),createColumn:(t,s)=>({pin:w=>{const W=t.getLeafColumns().map(K=>K.id).filter(Boolean);s.setColumnPinning(K=>{var de,z;if(w==="right"){var B,e;return{left:((B=K==null?void 0:K.left)!=null?B:[]).filter(a=>!(W!=null&&W.includes(a))),right:[...((e=K==null?void 0:K.right)!=null?e:[]).filter(a=>!(W!=null&&W.includes(a))),...W]}}if(w==="left"){var d,P;return{left:[...((d=K==null?void 0:K.left)!=null?d:[]).filter(a=>!(W!=null&&W.includes(a))),...W],right:((P=K==null?void 0:K.right)!=null?P:[]).filter(a=>!(W!=null&&W.includes(a)))}}return{left:((de=K==null?void 0:K.left)!=null?de:[]).filter(a=>!(W!=null&&W.includes(a))),right:((z=K==null?void 0:K.right)!=null?z:[]).filter(a=>!(W!=null&&W.includes(a)))}})},getCanPin:()=>t.getLeafColumns().some(W=>{var K,de;return((K=W.columnDef.enablePinning)!=null?K:!0)&&((de=s.options.enablePinning)!=null?de:!0)}),getIsPinned:()=>{const w=t.getLeafColumns().map(B=>B.id),{left:W,right:K}=s.getState().columnPinning,de=w.some(B=>W==null?void 0:W.includes(B)),z=w.some(B=>K==null?void 0:K.includes(B));return de?"left":z?"right":!1},getPinnedIndex:()=>{var w,W,K;const de=t.getIsPinned();return de?(w=(W=s.getState().columnPinning)==null||(K=W[de])==null?void 0:K.indexOf(t.id))!=null?w:-1:0}}),createRow:(t,s)=>({getCenterVisibleCells:ei(()=>[t._getAllVisibleCells(),s.getState().columnPinning.left,s.getState().columnPinning.right],(w,W,K)=>{const de=[...W??[],...K??[]];return w.filter(z=>!de.includes(z.column.id))},{key:"row.getCenterVisibleCells",debug:()=>{var w;return(w=s.options.debugAll)!=null?w:s.options.debugRows}}),getLeftVisibleCells:ei(()=>[t._getAllVisibleCells(),s.getState().columnPinning.left,,],(w,W)=>(W??[]).map(de=>w.find(z=>z.column.id===de)).filter(Boolean).map(de=>({...de,position:"left"})),{key:"row.getLeftVisibleCells",debug:()=>{var w;return(w=s.options.debugAll)!=null?w:s.options.debugRows}}),getRightVisibleCells:ei(()=>[t._getAllVisibleCells(),s.getState().columnPinning.right],(w,W)=>(W??[]).map(de=>w.find(z=>z.column.id===de)).filter(Boolean).map(de=>({...de,position:"right"})),{key:"row.getRightVisibleCells",debug:()=>{var w;return(w=s.options.debugAll)!=null?w:s.options.debugRows}})}),createTable:t=>({setColumnPinning:s=>t.options.onColumnPinningChange==null?void 0:t.options.onColumnPinningChange(s),resetColumnPinning:s=>{var w,W;return t.setColumnPinning(s?Ym():(w=(W=t.initialState)==null?void 0:W.columnPinning)!=null?w:Ym())},getIsSomeColumnsPinned:s=>{var w;const W=t.getState().columnPinning;if(!s){var K,de;return Boolean(((K=W.left)==null?void 0:K.length)||((de=W.right)==null?void 0:de.length))}return Boolean((w=W[s])==null?void 0:w.length)},getLeftLeafColumns:ei(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left],(s,w)=>(w??[]).map(W=>s.find(K=>K.id===W)).filter(Boolean),{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugColumns}}),getRightLeafColumns:ei(()=>[t.getAllLeafColumns(),t.getState().columnPinning.right],(s,w)=>(w??[]).map(W=>s.find(K=>K.id===W)).filter(Boolean),{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugColumns}}),getCenterLeafColumns:ei(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(s,w,W)=>{const K=[...w??[],...W??[]];return s.filter(de=>!K.includes(de.id))},{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugColumns}})})},SL={getInitialState:t=>({rowSelection:{},...t}),getDefaultOptions:t=>({onRowSelectionChange:Gu("rowSelection",t),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:t=>({setRowSelection:s=>t.options.onRowSelectionChange==null?void 0:t.options.onRowSelectionChange(s),resetRowSelection:s=>{var w;return t.setRowSelection(s?{}:(w=t.initialState.rowSelection)!=null?w:{})},toggleAllRowsSelected:s=>{t.setRowSelection(w=>{s=typeof s<"u"?s:!t.getIsAllRowsSelected();const W={...w},K=t.getPreGroupedRowModel().flatRows;return s?K.forEach(de=>{de.getCanSelect()&&(W[de.id]=!0)}):K.forEach(de=>{delete W[de.id]}),W})},toggleAllPageRowsSelected:s=>t.setRowSelection(w=>{const W=typeof s<"u"?s:!t.getIsAllPageRowsSelected(),K={...w};return t.getRowModel().rows.forEach(de=>{i2(K,de.id,W,t)}),K}),getPreSelectedRowModel:()=>t.getCoreRowModel(),getSelectedRowModel:ei(()=>[t.getState().rowSelection,t.getCoreRowModel()],(s,w)=>Object.keys(s).length?Xm(t,w):{rows:[],flatRows:[],rowsById:{}},{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugTable}}),getFilteredSelectedRowModel:ei(()=>[t.getState().rowSelection,t.getFilteredRowModel()],(s,w)=>Object.keys(s).length?Xm(t,w):{rows:[],flatRows:[],rowsById:{}},{key:"getFilteredSelectedRowModel",debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugTable}}),getGroupedSelectedRowModel:ei(()=>[t.getState().rowSelection,t.getSortedRowModel()],(s,w)=>Object.keys(s).length?Xm(t,w):{rows:[],flatRows:[],rowsById:{}},{key:"getGroupedSelectedRowModel",debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugTable}}),getIsAllRowsSelected:()=>{const s=t.getFilteredRowModel().flatRows,{rowSelection:w}=t.getState();let W=Boolean(s.length&&Object.keys(w).length);return W&&s.some(K=>K.getCanSelect()&&!w[K.id])&&(W=!1),W},getIsAllPageRowsSelected:()=>{const s=t.getPaginationRowModel().flatRows,{rowSelection:w}=t.getState();let W=!!s.length;return W&&s.some(K=>K.getCanSelect()&&!w[K.id])&&(W=!1),W},getIsSomeRowsSelected:()=>{var s;const w=Object.keys((s=t.getState().rowSelection)!=null?s:{}).length;return w>0&&w<t.getFilteredRowModel().flatRows.length},getIsSomePageRowsSelected:()=>{const s=t.getPaginationRowModel().flatRows;return t.getIsAllPageRowsSelected()?!1:s.some(w=>w.getIsSelected()||w.getIsSomeSelected())},getToggleAllRowsSelectedHandler:()=>s=>{t.toggleAllRowsSelected(s.target.checked)},getToggleAllPageRowsSelectedHandler:()=>s=>{t.toggleAllPageRowsSelected(s.target.checked)}}),createRow:(t,s)=>({toggleSelected:w=>{const W=t.getIsSelected();s.setRowSelection(K=>{if(w=typeof w<"u"?w:!W,W===w)return K;const de={...K};return i2(de,t.id,w,s),de})},getIsSelected:()=>{const{rowSelection:w}=s.getState();return p3(t,w)},getIsSomeSelected:()=>{const{rowSelection:w}=s.getState();return vT(t,w)==="some"},getIsAllSubRowsSelected:()=>{const{rowSelection:w}=s.getState();return vT(t,w)==="all"},getCanSelect:()=>{var w;return typeof s.options.enableRowSelection=="function"?s.options.enableRowSelection(t):(w=s.options.enableRowSelection)!=null?w:!0},getCanSelectSubRows:()=>{var w;return typeof s.options.enableSubRowSelection=="function"?s.options.enableSubRowSelection(t):(w=s.options.enableSubRowSelection)!=null?w:!0},getCanMultiSelect:()=>{var w;return typeof s.options.enableMultiRowSelection=="function"?s.options.enableMultiRowSelection(t):(w=s.options.enableMultiRowSelection)!=null?w:!0},getToggleSelectedHandler:()=>{const w=t.getCanSelect();return W=>{var K;w&&t.toggleSelected((K=W.target)==null?void 0:K.checked)}}})},i2=(t,s,w,W)=>{var K;const de=W.getRow(s);w?(de.getCanMultiSelect()||Object.keys(t).forEach(z=>delete t[z]),de.getCanSelect()&&(t[s]=!0)):delete t[s],(K=de.subRows)!=null&&K.length&&de.getCanSelectSubRows()&&de.subRows.forEach(z=>i2(t,z.id,w,W))};function Xm(t,s){const w=t.getState().rowSelection,W=[],K={},de=function(z,B){return z.map(e=>{var d;const P=p3(e,w);if(P&&(W.push(e),K[e.id]=e),(d=e.subRows)!=null&&d.length&&(e={...e,subRows:de(e.subRows)}),P)return e}).filter(Boolean)};return{rows:de(s.rows),flatRows:W,rowsById:K}}function p3(t,s){var w;return(w=s[t.id])!=null?w:!1}function vT(t,s,w){if(t.subRows&&t.subRows.length){let W=!0,K=!1;return t.subRows.forEach(de=>{K&&!W||(p3(de,s)?K=!0:W=!1)}),W?"all":K?"some":!1}return!1}const o2=/([0-9]+)/gm,EL=(t,s,w)=>I5(Qh(t.getValue(w)).toLowerCase(),Qh(s.getValue(w)).toLowerCase()),ML=(t,s,w)=>I5(Qh(t.getValue(w)),Qh(s.getValue(w))),CL=(t,s,w)=>g3(Qh(t.getValue(w)).toLowerCase(),Qh(s.getValue(w)).toLowerCase()),LL=(t,s,w)=>g3(Qh(t.getValue(w)),Qh(s.getValue(w))),PL=(t,s,w)=>{const W=t.getValue(w),K=s.getValue(w);return W>K?1:W<K?-1:0},_L=(t,s,w)=>g3(t.getValue(w),s.getValue(w));function g3(t,s){return t===s?0:t>s?1:-1}function Qh(t){return typeof t=="number"?isNaN(t)||t===1/0||t===-1/0?"":String(t):typeof t=="string"?t:""}function I5(t,s){const w=t.split(o2).filter(Boolean),W=s.split(o2).filter(Boolean);for(;w.length&&W.length;){const K=w.shift(),de=W.shift(),z=parseInt(K,10),B=parseInt(de,10),e=[z,B].sort();if(isNaN(e[0])){if(K>de)return 1;if(de>K)return-1;continue}if(isNaN(e[1]))return isNaN(z)?-1:1;if(z>B)return 1;if(B>z)return-1}return w.length-W.length}const np={alphanumeric:EL,alphanumericCaseSensitive:ML,text:CL,textCaseSensitive:LL,datetime:PL,basic:_L},RL={getInitialState:t=>({sorting:[],...t}),getDefaultColumnDef:()=>({sortingFn:"auto"}),getDefaultOptions:t=>({onSortingChange:Gu("sorting",t),isMultiSortEvent:s=>s.shiftKey}),createColumn:(t,s)=>({getAutoSortingFn:()=>{const w=s.getFilteredRowModel().flatRows.slice(10);let W=!1;for(const K of w){const de=K==null?void 0:K.getValue(t.id);if(Object.prototype.toString.call(de)==="[object Date]")return np.datetime;if(typeof de=="string"&&(W=!0,de.split(o2).length>1))return np.alphanumeric}return W?np.text:np.basic},getAutoSortDir:()=>{const w=s.getFilteredRowModel().flatRows[0];return typeof(w==null?void 0:w.getValue(t.id))=="string"?"asc":"desc"},getSortingFn:()=>{var w,W;if(!t)throw new Error;return j1(t.columnDef.sortingFn)?t.columnDef.sortingFn:t.columnDef.sortingFn==="auto"?t.getAutoSortingFn():(w=(W=s.options.sortingFns)==null?void 0:W[t.columnDef.sortingFn])!=null?w:np[t.columnDef.sortingFn]},toggleSorting:(w,W)=>{const K=t.getNextSortingOrder(),de=typeof w<"u"&&w!==null;s.setSorting(z=>{const B=z==null?void 0:z.find(x=>x.id===t.id),e=z==null?void 0:z.findIndex(x=>x.id===t.id);let d=[],P,a=de?w:K==="desc";if(z!=null&&z.length&&t.getCanMultiSort()&&W?B?P="toggle":P="add":z!=null&&z.length&&e!==z.length-1?P="replace":B?P="toggle":P="replace",P==="toggle"&&(de||K||(P="remove")),P==="add"){var _;d=[...z,{id:t.id,desc:a}],d.splice(0,d.length-((_=s.options.maxMultiSortColCount)!=null?_:Number.MAX_SAFE_INTEGER))}else P==="toggle"?d=z.map(x=>x.id===t.id?{...x,desc:a}:x):P==="remove"?d=z.filter(x=>x.id!==t.id):d=[{id:t.id,desc:a}];return d})},getFirstSortDir:()=>{var w,W;return((w=(W=t.columnDef.sortDescFirst)!=null?W:s.options.sortDescFirst)!=null?w:t.getAutoSortDir()==="desc")?"desc":"asc"},getNextSortingOrder:w=>{var W,K;const de=t.getFirstSortDir(),z=t.getIsSorted();return z?z!==de&&((W=s.options.enableSortingRemoval)==null||W)&&(!(w&&(K=s.options.enableMultiRemove)!=null)||K)?!1:z==="desc"?"asc":"desc":de},getCanSort:()=>{var w,W;return((w=t.columnDef.enableSorting)!=null?w:!0)&&((W=s.options.enableSorting)!=null?W:!0)&&!!t.accessorFn},getCanMultiSort:()=>{var w,W;return(w=(W=t.columnDef.enableMultiSort)!=null?W:s.options.enableMultiSort)!=null?w:!!t.accessorFn},getIsSorted:()=>{var w;const W=(w=s.getState().sorting)==null?void 0:w.find(K=>K.id===t.id);return W?W.desc?"desc":"asc":!1},getSortIndex:()=>{var w,W;return(w=(W=s.getState().sorting)==null?void 0:W.findIndex(K=>K.id===t.id))!=null?w:-1},clearSorting:()=>{s.setSorting(w=>w!=null&&w.length?w.filter(W=>W.id!==t.id):[])},getToggleSortingHandler:()=>{const w=t.getCanSort();return W=>{w&&(W.persist==null||W.persist(),t.toggleSorting==null||t.toggleSorting(void 0,t.getCanMultiSort()?s.options.isMultiSortEvent==null?void 0:s.options.isMultiSortEvent(W):!1))}}}),createTable:t=>({setSorting:s=>t.options.onSortingChange==null?void 0:t.options.onSortingChange(s),resetSorting:s=>{var w,W;t.setSorting(s?[]:(w=(W=t.initialState)==null?void 0:W.sorting)!=null?w:[])},getPreSortedRowModel:()=>t.getGroupedRowModel(),getSortedRowModel:()=>(!t._getSortedRowModel&&t.options.getSortedRowModel&&(t._getSortedRowModel=t.options.getSortedRowModel(t)),t.options.manualSorting||!t._getSortedRowModel?t.getPreSortedRowModel():t._getSortedRowModel())})},DL={getInitialState:t=>({columnVisibility:{},...t}),getDefaultOptions:t=>({onColumnVisibilityChange:Gu("columnVisibility",t)}),createColumn:(t,s)=>({toggleVisibility:w=>{t.getCanHide()&&s.setColumnVisibility(W=>({...W,[t.id]:w??!t.getIsVisible()}))},getIsVisible:()=>{var w,W;return(w=(W=s.getState().columnVisibility)==null?void 0:W[t.id])!=null?w:!0},getCanHide:()=>{var w,W;return((w=t.columnDef.enableHiding)!=null?w:!0)&&((W=s.options.enableHiding)!=null?W:!0)},getToggleVisibilityHandler:()=>w=>{t.toggleVisibility==null||t.toggleVisibility(w.target.checked)}}),createRow:(t,s)=>({_getAllVisibleCells:ei(()=>[t.getAllCells(),s.getState().columnVisibility],w=>w.filter(W=>W.column.getIsVisible()),{key:"row._getAllVisibleCells",debug:()=>{var w;return(w=s.options.debugAll)!=null?w:s.options.debugRows}}),getVisibleCells:ei(()=>[t.getLeftVisibleCells(),t.getCenterVisibleCells(),t.getRightVisibleCells()],(w,W,K)=>[...w,...W,...K],{key:!1,debug:()=>{var w;return(w=s.options.debugAll)!=null?w:s.options.debugRows}})}),createTable:t=>{const s=(w,W)=>ei(()=>[W(),W().filter(K=>K.getIsVisible()).map(K=>K.id).join("_")],K=>K.filter(de=>de.getIsVisible==null?void 0:de.getIsVisible()),{key:w,debug:()=>{var K;return(K=t.options.debugAll)!=null?K:t.options.debugColumns}});return{getVisibleFlatColumns:s("getVisibleFlatColumns",()=>t.getAllFlatColumns()),getVisibleLeafColumns:s("getVisibleLeafColumns",()=>t.getAllLeafColumns()),getLeftVisibleLeafColumns:s("getLeftVisibleLeafColumns",()=>t.getLeftLeafColumns()),getRightVisibleLeafColumns:s("getRightVisibleLeafColumns",()=>t.getRightLeafColumns()),getCenterVisibleLeafColumns:s("getCenterVisibleLeafColumns",()=>t.getCenterLeafColumns()),setColumnVisibility:w=>t.options.onColumnVisibilityChange==null?void 0:t.options.onColumnVisibilityChange(w),resetColumnVisibility:w=>{var W;t.setColumnVisibility(w?{}:(W=t.initialState.columnVisibility)!=null?W:{})},toggleAllColumnsVisible:w=>{var W;w=(W=w)!=null?W:!t.getIsAllColumnsVisible(),t.setColumnVisibility(t.getAllLeafColumns().reduce((K,de)=>({...K,[de.id]:w||!(de.getCanHide!=null&&de.getCanHide())}),{}))},getIsAllColumnsVisible:()=>!t.getAllLeafColumns().some(w=>!(w.getIsVisible!=null&&w.getIsVisible())),getIsSomeColumnsVisible:()=>t.getAllLeafColumns().some(w=>w.getIsVisible==null?void 0:w.getIsVisible()),getToggleAllColumnsVisibilityHandler:()=>w=>{var W;t.toggleAllColumnsVisible((W=w.target)==null?void 0:W.checked)}}}},dT=[iL,DL,wL,AL,uL,RL,xL,lL,TL,SL,oL];function IL(t){var s;(t.debugAll||t.debugTable)&&console.info("Creating Table Instance...");let w={_features:dT};const W=w._features.reduce((P,a)=>Object.assign(P,a.getDefaultOptions==null?void 0:a.getDefaultOptions(w)),{}),K=P=>w.options.mergeOptions?w.options.mergeOptions(W,P):{...W,...P};let z={...{},...(s=t.initialState)!=null?s:{}};w._features.forEach(P=>{var a;z=(a=P.getInitialState==null?void 0:P.getInitialState(z))!=null?a:z});const B=[];let e=!1;const d={_features:dT,options:{...W,...t},initialState:z,_queue:P=>{B.push(P),e||(e=!0,Promise.resolve().then(()=>{for(;B.length;)B.shift()();e=!1}).catch(a=>setTimeout(()=>{throw a})))},reset:()=>{w.setState(w.initialState)},setOptions:P=>{const a=Bh(P,w.options);w.options=K(a)},getState:()=>w.options.state,setState:P=>{w.options.onStateChange==null||w.options.onStateChange(P)},_getRowId:(P,a,_)=>{var x;return(x=w.options.getRowId==null?void 0:w.options.getRowId(P,a,_))!=null?x:`${_?[_.id,a].join("."):a}`},getCoreRowModel:()=>(w._getCoreRowModel||(w._getCoreRowModel=w.options.getCoreRowModel(w)),w._getCoreRowModel()),getRowModel:()=>w.getPaginationRowModel(),getRow:P=>{const a=w.getRowModel().rowsById[P];if(!a)throw new Error;return a},_getDefaultColumnDef:ei(()=>[w.options.defaultColumn],P=>{var a;return P=(a=P)!=null?a:{},{header:_=>{const x=_.header.column.columnDef;return x.accessorKey?x.accessorKey:x.accessorFn?x.id:null},cell:_=>{var x,v;return(x=(v=_.renderValue())==null||v.toString==null?void 0:v.toString())!=null?x:null},...w._features.reduce((_,x)=>Object.assign(_,x.getDefaultColumnDef==null?void 0:x.getDefaultColumnDef()),{}),...P}},{debug:()=>{var P;return(P=w.options.debugAll)!=null?P:w.options.debugColumns},key:!1}),_getColumnDefs:()=>w.options.columns,getAllColumns:ei(()=>[w._getColumnDefs()],P=>{const a=function(_,x,v){return v===void 0&&(v=0),_.map(y=>{const r=aL(w,y,v,x),n=y;return r.columns=n.columns?a(n.columns,r,v+1):[],r})};return a(P)},{key:!1,debug:()=>{var P;return(P=w.options.debugAll)!=null?P:w.options.debugColumns}}),getAllFlatColumns:ei(()=>[w.getAllColumns()],P=>P.flatMap(a=>a.getFlatColumns()),{key:!1,debug:()=>{var P;return(P=w.options.debugAll)!=null?P:w.options.debugColumns}}),_getAllFlatColumnsById:ei(()=>[w.getAllFlatColumns()],P=>P.reduce((a,_)=>(a[_.id]=_,a),{}),{key:!1,debug:()=>{var P;return(P=w.options.debugAll)!=null?P:w.options.debugColumns}}),getAllLeafColumns:ei(()=>[w.getAllColumns(),w._getOrderColumnsFn()],(P,a)=>{let _=P.flatMap(x=>x.getLeafColumns());return a(_)},{key:!1,debug:()=>{var P;return(P=w.options.debugAll)!=null?P:w.options.debugColumns}}),getColumn:P=>w._getAllFlatColumnsById()[P]};return Object.assign(w,d),w._features.forEach(P=>Object.assign(w,P.createTable==null?void 0:P.createTable(w))),w}function FL(t,s,w,W){const K=()=>{var z;return(z=de.getValue())!=null?z:t.options.renderFallbackValue},de={id:`${s.id}_${w.id}`,row:s,column:w,getValue:()=>s.getValue(W),renderValue:K,getContext:ei(()=>[t,w,s,de],(z,B,e,d)=>({table:z,column:B,row:e,cell:d,getValue:d.getValue,renderValue:d.renderValue}),{key:!1,debug:()=>t.options.debugAll})};return t._features.forEach(z=>{Object.assign(de,z.createCell==null?void 0:z.createCell(de,w,s,t))},{}),de}const y3=(t,s,w,W,K,de)=>{let z={id:s,index:W,original:w,depth:K,_valuesCache:{},_uniqueValuesCache:{},getValue:B=>{if(z._valuesCache.hasOwnProperty(B))return z._valuesCache[B];const e=t.getColumn(B);if(e!=null&&e.accessorFn)return z._valuesCache[B]=e.accessorFn(z.original,W),z._valuesCache[B]},getUniqueValues:B=>{if(z._uniqueValuesCache.hasOwnProperty(B))return z._uniqueValuesCache[B];const e=t.getColumn(B);if(e!=null&&e.accessorFn)return e.columnDef.getUniqueValues?(z._uniqueValuesCache[B]=e.columnDef.getUniqueValues(z.original,W),z._uniqueValuesCache[B]):(z._uniqueValuesCache[B]=[z.getValue(B)],z._uniqueValuesCache[B])},renderValue:B=>{var e;return(e=z.getValue(B))!=null?e:t.options.renderFallbackValue},subRows:de??[],getLeafRows:()=>nL(z.subRows,B=>B.subRows),getAllCells:ei(()=>[t.getAllLeafColumns()],B=>B.map(e=>FL(t,z,e,e.id)),{key:!1,debug:()=>{var B;return(B=t.options.debugAll)!=null?B:t.options.debugRows}}),_getAllCellsByColumnId:ei(()=>[z.getAllCells()],B=>B.reduce((e,d)=>(e[d.column.id]=d,e),{}),{key:"row.getAllCellsByColumnId",debug:()=>{var B;return(B=t.options.debugAll)!=null?B:t.options.debugRows}})};for(let B=0;B<t._features.length;B++){const e=t._features[B];Object.assign(z,e==null||e.createRow==null?void 0:e.createRow(z,t))}return z};function kL(){return t=>ei(()=>[t.options.data],s=>{const w={rows:[],flatRows:[],rowsById:{}},W=function(K,de,z){de===void 0&&(de=0);const B=[];for(let d=0;d<K.length;d++){const P=y3(t,t._getRowId(K[d],d,z),K[d],d,de);if(w.flatRows.push(P),w.rowsById[P.id]=P,B.push(P),t.options.getSubRows){var e;P.originalSubRows=t.options.getSubRows(K[d],d),(e=P.originalSubRows)!=null&&e.length&&(P.subRows=W(P.originalSubRows,de+1,P))}}return B};return w.rows=W(s),w},{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugTable},onChange:()=>{t._autoResetPageIndex()}})}function OL(t,s,w){return w.options.filterFromLeafRows?zL(t,s,w):NL(t,s,w)}function zL(t,s,w){var W;const K=[],de={},z=(W=w.options.maxLeafRowFilterDepth)!=null?W:100,B=function(e,d){d===void 0&&(d=0);const P=[];for(let _=0;_<e.length;_++){var a;let x=e[_];const v=y3(w,x.id,x.original,x.index,x.depth);if(v.columnFilters=x.columnFilters,(a=x.subRows)!=null&&a.length&&d<z){if(v.subRows=B(x.subRows,d+1),x=v,s(x)&&!v.subRows.length){P.push(x),de[x.id]=x,de[_]=x;continue}if(s(x)||v.subRows.length){P.push(x),de[x.id]=x,de[_]=x;continue}}else x=v,s(x)&&(P.push(x),de[x.id]=x,de[_]=x)}return P};return{rows:B(t),flatRows:K,rowsById:de}}function NL(t,s,w){var W;const K=[],de={},z=(W=w.options.maxLeafRowFilterDepth)!=null?W:100,B=function(e,d){d===void 0&&(d=0);const P=[];for(let _=0;_<e.length;_++){let x=e[_];if(s(x)){var a;if((a=x.subRows)!=null&&a.length&&d<z){const y=y3(w,x.id,x.original,x.index,x.depth);y.subRows=B(x.subRows,d+1),x=y}P.push(x),K.push(x),de[x.id]=x}}return P};return{rows:B(t),flatRows:K,rowsById:de}}function BL(){return t=>ei(()=>[t.getPreFilteredRowModel(),t.getState().columnFilters,t.getState().globalFilter],(s,w,W)=>{if(!s.rows.length||!(w!=null&&w.length)&&!W){for(let _=0;_<s.flatRows.length;_++)s.flatRows[_].columnFilters={},s.flatRows[_].columnFiltersMeta={};return s}const K=[],de=[];(w??[]).forEach(_=>{var x;const v=t.getColumn(_.id);if(!v)return;const y=v.getFilterFn();y&&K.push({id:_.id,filterFn:y,resolvedValue:(x=y.resolveFilterValue==null?void 0:y.resolveFilterValue(_.value))!=null?x:_.value})});const z=w.map(_=>_.id),B=t.getGlobalFilterFn(),e=t.getAllLeafColumns().filter(_=>_.getCanGlobalFilter());W&&B&&e.length&&(z.push("__global__"),e.forEach(_=>{var x;de.push({id:_.id,filterFn:B,resolvedValue:(x=B.resolveFilterValue==null?void 0:B.resolveFilterValue(W))!=null?x:W})}));let d,P;for(let _=0;_<s.flatRows.length;_++){const x=s.flatRows[_];if(x.columnFilters={},K.length)for(let v=0;v<K.length;v++){d=K[v];const y=d.id;x.columnFilters[y]=d.filterFn(x,y,d.resolvedValue,r=>{x.columnFiltersMeta[y]=r})}if(de.length){for(let v=0;v<de.length;v++){P=de[v];const y=P.id;if(P.filterFn(x,y,P.resolvedValue,r=>{x.columnFiltersMeta[y]=r})){x.columnFilters.__global__=!0;break}}x.columnFilters.__global__!==!0&&(x.columnFilters.__global__=!1)}}const a=_=>{for(let x=0;x<z.length;x++)if(_.columnFilters[z[x]]===!1)return!1;return!0};return OL(s.rows,a,t)},{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugTable},onChange:()=>{t._autoResetPageIndex()}})}function UL(){return t=>ei(()=>[t.getState().sorting,t.getPreSortedRowModel()],(s,w)=>{if(!w.rows.length||!(s!=null&&s.length))return w;const W=t.getState().sorting,K=[],de=W.filter(e=>{var d;return(d=t.getColumn(e.id))==null?void 0:d.getCanSort()}),z={};de.forEach(e=>{const d=t.getColumn(e.id);d&&(z[e.id]={sortUndefined:d.columnDef.sortUndefined,invertSorting:d.columnDef.invertSorting,sortingFn:d.getSortingFn()})});const B=e=>{const d=[...e];return d.sort((P,a)=>{for(let x=0;x<de.length;x+=1){var _;const v=de[x],y=z[v.id],r=(_=v==null?void 0:v.desc)!=null?_:!1;if(y.sortUndefined){const u=P.getValue(v.id),i=a.getValue(v.id),f=typeof u>"u",g=typeof i>"u";if(f||g)return f&&g?0:f?y.sortUndefined:-y.sortUndefined}let n=y.sortingFn(P,a,v.id);if(n!==0)return r&&(n*=-1),y.invertSorting&&(n*=-1),n}return P.index-a.index}),d.forEach(P=>{var a;K.push(P),(a=P.subRows)!=null&&a.length&&(P.subRows=B(P.subRows))}),d};return{rows:B(w.rows),flatRows:K,rowsById:w.rowsById}},{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugTable},onChange:()=>{t._autoResetPageIndex()}})}function HL(t){const s=[],w=W=>{var K;s.push(W),(K=W.subRows)!=null&&K.length&&W.getIsExpanded()&&W.subRows.forEach(w)};return t.rows.forEach(w),{rows:s,flatRows:t.flatRows,rowsById:t.rowsById}}function VL(t){return s=>ei(()=>[s.getState().pagination,s.getPrePaginationRowModel(),s.options.paginateExpandedRows?void 0:s.getState().expanded],(w,W)=>{if(!W.rows.length)return W;const{pageSize:K,pageIndex:de}=w;let{rows:z,flatRows:B,rowsById:e}=W;const d=K*de,P=d+K;z=z.slice(d,P);let a;s.options.paginateExpandedRows?a={rows:z,flatRows:B,rowsById:e}:a=HL({rows:z,flatRows:B,rowsById:e}),a.flatRows=[];const _=x=>{a.flatRows.push(x),x.subRows.length&&x.subRows.forEach(_)};return a.rows.forEach(_),a},{key:!1,debug:()=>{var w;return(w=s.options.debugAll)!=null?w:s.options.debugTable}})}/**
* react-table
*
* Copyright (c) TanStack
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function s2(t,s){return t?GL(t)?Ka.createElement(t,s):t:null}function GL(t){return WL(t)||typeof t=="function"||YL(t)}function WL(t){return typeof t=="function"&&(()=>{const s=Object.getPrototypeOf(t);return s.prototype&&s.prototype.isReactComponent})()}function YL(t){return typeof t=="object"&&typeof t.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(t.$$typeof.description)}function XL(t){const s={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[w]=Ka.useState(()=>({current:IL(s)})),[W,K]=Ka.useState(()=>w.current.initialState);return w.current.setOptions(de=>({...de,...t,state:{...W,...t.state},onStateChange:z=>{K(z),t.onStateChange==null||t.onStateChange(z)}})),w.current}/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var K1={};K1.version="0.18.5";var F5=1252,ZL=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],k5=function(t){ZL.indexOf(t)!=-1&&(F5=t)};function jL(){k5(1252)}var Wp=function(t){k5(t)};function KL(){Wp(1200),jL()}function JL(t){for(var s=[],w=0;w<t.length>>1;++w)s[w]=String.fromCharCode(t.charCodeAt(2*w+1)+(t.charCodeAt(2*w)<<8));return s.join("")}var t1=function(s){return String.fromCharCode(s)},pT=function(s){return String.fromCharCode(s)},Nv,Uh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Yp(t){for(var s="",w=0,W=0,K=0,de=0,z=0,B=0,e=0,d=0;d<t.length;)w=t.charCodeAt(d++),de=w>>2,W=t.charCodeAt(d++),z=(w&3)<<4|W>>4,K=t.charCodeAt(d++),B=(W&15)<<2|K>>6,e=K&63,isNaN(W)?B=e=64:isNaN(K)&&(e=64),s+=Uh.charAt(de)+Uh.charAt(z)+Uh.charAt(B)+Uh.charAt(e);return s}function Kc(t){var s="",w=0,W=0,K=0,de=0,z=0,B=0,e=0;t=t.replace(/[^\w\+\/\=]/g,"");for(var d=0;d<t.length;)de=Uh.indexOf(t.charAt(d++)),z=Uh.indexOf(t.charAt(d++)),w=de<<2|z>>4,s+=String.fromCharCode(w),B=Uh.indexOf(t.charAt(d++)),W=(z&15)<<4|B>>2,B!==64&&(s+=String.fromCharCode(W)),e=Uh.indexOf(t.charAt(d++)),K=(B&3)<<6|e,e!==64&&(s+=String.fromCharCode(K));return s}var zi=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),Qc=function(){if(typeof Buffer<"u"){var t=!Buffer.from;if(!t)try{Buffer.from("foo","utf8")}catch{t=!0}return t?function(s,w){return w?new Buffer(s,w):new Buffer(s)}:Buffer.from.bind(Buffer)}return function(){}}();function qv(t){return zi?Buffer.alloc?Buffer.alloc(t):new Buffer(t):typeof Uint8Array<"u"?new Uint8Array(t):new Array(t)}function gT(t){return zi?Buffer.allocUnsafe?Buffer.allocUnsafe(t):new Buffer(t):typeof Uint8Array<"u"?new Uint8Array(t):new Array(t)}var wf=function(s){return zi?Qc(s,"binary"):s.split("").map(function(w){return w.charCodeAt(0)&255})};function My(t){if(typeof ArrayBuffer>"u")return wf(t);for(var s=new ArrayBuffer(t.length),w=new Uint8Array(s),W=0;W!=t.length;++W)w[W]=t.charCodeAt(W)&255;return s}function tg(t){if(Array.isArray(t))return t.map(function(W){return String.fromCharCode(W)}).join("");for(var s=[],w=0;w<t.length;++w)s[w]=String.fromCharCode(t[w]);return s.join("")}function $L(t){if(typeof Uint8Array>"u")throw new Error("Unsupported");return new Uint8Array(t)}var Rs=zi?function(t){return Buffer.concat(t.map(function(s){return Buffer.isBuffer(s)?s:Qc(s)}))}:function(t){if(typeof Uint8Array<"u"){var s=0,w=0;for(s=0;s<t.length;++s)w+=t[s].length;var W=new Uint8Array(w),K=0;for(s=0,w=0;s<t.length;w+=K,++s)if(K=t[s].length,t[s]instanceof Uint8Array)W.set(t[s],w);else{if(typeof t[s]=="string")throw"wtf";W.set(new Uint8Array(t[s]),w)}return W}return[].concat.apply([],t.map(function(de){return Array.isArray(de)?de:[].slice.call(de)}))};function QL(t){for(var s=[],w=0,W=t.length+250,K=qv(t.length+255),de=0;de<t.length;++de){var z=t.charCodeAt(de);if(z<128)K[w++]=z;else if(z<2048)K[w++]=192|z>>6&31,K[w++]=128|z&63;else if(z>=55296&&z<57344){z=(z&1023)+64;var B=t.charCodeAt(++de)&1023;K[w++]=240|z>>8&7,K[w++]=128|z>>2&63,K[w++]=128|B>>6&15|(z&3)<<4,K[w++]=128|B&63}else K[w++]=224|z>>12&15,K[w++]=128|z>>6&63,K[w++]=128|z&63;w>W&&(s.push(K.slice(0,w)),w=0,K=qv(65535),W=65530)}return s.push(K.slice(0,w)),Rs(s)}var xp=/\u0000/g,r1=/[\u0001-\u0006]/g;function s0(t){for(var s="",w=t.length-1;w>=0;)s+=t.charAt(w--);return s}function Tf(t,s){var w=""+t;return w.length>=s?w:Do("0",s-w.length)+w}function m3(t,s){var w=""+t;return w.length>=s?w:Do(" ",s-w.length)+w}function J1(t,s){var w=""+t;return w.length>=s?w:w+Do(" ",s-w.length)}function qL(t,s){var w=""+Math.round(t);return w.length>=s?w:Do("0",s-w.length)+w}function e9(t,s){var w=""+t;return w.length>=s?w:Do("0",s-w.length)+w}var yT=Math.pow(2,32);function zd(t,s){if(t>yT||t<-yT)return qL(t,s);var w=Math.round(t);return e9(w,s)}function $1(t,s){return s=s||0,t.length>=7+s&&(t.charCodeAt(s)|32)===103&&(t.charCodeAt(s+1)|32)===101&&(t.charCodeAt(s+2)|32)===110&&(t.charCodeAt(s+3)|32)===101&&(t.charCodeAt(s+4)|32)===114&&(t.charCodeAt(s+5)|32)===97&&(t.charCodeAt(s+6)|32)===108}var mT=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],Zm=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function t9(t){return t||(t={}),t[0]="General",t[1]="0",t[2]="0.00",t[3]="#,##0",t[4]="#,##0.00",t[9]="0%",t[10]="0.00%",t[11]="0.00E+00",t[12]="# ?/?",t[13]="# ??/??",t[14]="m/d/yy",t[15]="d-mmm-yy",t[16]="d-mmm",t[17]="mmm-yy",t[18]="h:mm AM/PM",t[19]="h:mm:ss AM/PM",t[20]="h:mm",t[21]="h:mm:ss",t[22]="m/d/yy h:mm",t[37]="#,##0 ;(#,##0)",t[38]="#,##0 ;[Red](#,##0)",t[39]="#,##0.00;(#,##0.00)",t[40]="#,##0.00;[Red](#,##0.00)",t[45]="mm:ss",t[46]="[h]:mm:ss",t[47]="mmss.0",t[48]="##0.0E+0",t[49]="@",t[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',t}var Io={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},xT={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},r9={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function Q1(t,s,w){for(var W=t<0?-1:1,K=t*W,de=0,z=1,B=0,e=1,d=0,P=0,a=Math.floor(K);d<s&&(a=Math.floor(K),B=a*z+de,P=a*d+e,!(K-a<5e-8));)K=1/(K-a),de=z,z=B,e=d,d=P;if(P>s&&(d>s?(P=e,B=de):(P=d,B=z)),!w)return[0,W*B,P];var _=Math.floor(W*B/P);return[_,W*B-_*P,P]}function n1(t,s,w){if(t>2958465||t<0)return null;var W=t|0,K=Math.floor(86400*(t-W)),de=0,z=[],B={D:W,T:K,u:86400*(t-W)-K,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(B.u)<1e-6&&(B.u=0),s&&s.date1904&&(W+=1462),B.u>.9999&&(B.u=0,++K==86400&&(B.T=K=0,++W,++B.D)),W===60)z=w?[1317,10,29]:[1900,2,29],de=3;else if(W===0)z=w?[1317,8,29]:[1900,1,0],de=6;else{W>60&&--W;var e=new Date(1900,0,1);e.setDate(e.getDate()+W-1),z=[e.getFullYear(),e.getMonth()+1,e.getDate()],de=e.getDay(),W<60&&(de=(de+6)%7),w&&(de=u9(e,z))}return B.y=z[0],B.m=z[1],B.d=z[2],B.S=K%60,K=Math.floor(K/60),B.M=K%60,K=Math.floor(K/60),B.H=K,B.q=de,B}var O5=new Date(1899,11,31,0,0,0),n9=O5.getTime(),a9=new Date(1900,2,1,0,0,0);function z5(t,s){var w=t.getTime();return s?w-=1461*24*60*60*1e3:t>=a9&&(w+=24*60*60*1e3),(w-(n9+(t.getTimezoneOffset()-O5.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function x3(t){return t.indexOf(".")==-1?t:t.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function i9(t){return t.indexOf("E")==-1?t:t.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function o9(t){var s=t<0?12:11,w=x3(t.toFixed(12));return w.length<=s||(w=t.toPrecision(10),w.length<=s)?w:t.toExponential(5)}function s9(t){var s=x3(t.toFixed(11));return s.length>(t<0?12:11)||s==="0"||s==="-0"?t.toPrecision(6):s}function l9(t){var s=Math.floor(Math.log(Math.abs(t))*Math.LOG10E),w;return s>=-4&&s<=-1?w=t.toPrecision(10+s):Math.abs(s)<=9?w=o9(t):s===10?w=t.toFixed(10).substr(0,12):w=s9(t),x3(i9(w.toUpperCase()))}function l2(t,s){switch(typeof t){case"string":return t;case"boolean":return t?"TRUE":"FALSE";case"number":return(t|0)===t?t.toString(10):l9(t);case"undefined":return"";case"object":if(t==null)return"";if(t instanceof Date)return qh(14,z5(t,s&&s.date1904),s)}throw new Error("unsupported value in General format: "+t)}function u9(t,s){s[0]-=581;var w=t.getDay();return t<60&&(w=(w+6)%7),w}function f9(t,s,w,W){var K="",de=0,z=0,B=w.y,e,d=0;switch(t){case 98:B=w.y+543;case 121:switch(s.length){case 1:case 2:e=B%100,d=2;break;default:e=B%1e4,d=4;break}break;case 109:switch(s.length){case 1:case 2:e=w.m,d=s.length;break;case 3:return Zm[w.m-1][1];case 5:return Zm[w.m-1][0];default:return Zm[w.m-1][2]}break;case 100:switch(s.length){case 1:case 2:e=w.d,d=s.length;break;case 3:return mT[w.q][0];default:return mT[w.q][1]}break;case 104:switch(s.length){case 1:case 2:e=1+(w.H+11)%12,d=s.length;break;default:throw"bad hour format: "+s}break;case 72:switch(s.length){case 1:case 2:e=w.H,d=s.length;break;default:throw"bad hour format: "+s}break;case 77:switch(s.length){case 1:case 2:e=w.M,d=s.length;break;default:throw"bad minute format: "+s}break;case 115:if(s!="s"&&s!="ss"&&s!=".0"&&s!=".00"&&s!=".000")throw"bad second format: "+s;return w.u===0&&(s=="s"||s=="ss")?Tf(w.S,s.length):(W>=2?z=W===3?1e3:100:z=W===1?10:1,de=Math.round(z*(w.S+w.u)),de>=60*z&&(de=0),s==="s"?de===0?"0":""+de/z:(K=Tf(de,2+W),s==="ss"?K.substr(0,2):"."+K.substr(2,s.length-1)));case 90:switch(s){case"[h]":case"[hh]":e=w.D*24+w.H;break;case"[m]":case"[mm]":e=(w.D*24+w.H)*60+w.M;break;case"[s]":case"[ss]":e=((w.D*24+w.H)*60+w.M)*60+Math.round(w.S+w.u);break;default:throw"bad abstime format: "+s}d=s.length===3?1:2;break;case 101:e=B,d=1;break}var P=d>0?Tf(e,d):"";return P}function Hh(t){var s=3;if(t.length<=s)return t;for(var w=t.length%s,W=t.substr(0,w);w!=t.length;w+=s)W+=(W.length>0?",":"")+t.substr(w,s);return W}var N5=/%/g;function c9(t,s,w){var W=s.replace(N5,""),K=s.length-W.length;return Vc(t,W,w*Math.pow(10,2*K))+Do("%",K)}function h9(t,s,w){for(var W=s.length-1;s.charCodeAt(W-1)===44;)--W;return Vc(t,s.substr(0,W),w/Math.pow(10,3*(s.length-W)))}function B5(t,s){var w,W=t.indexOf("E")-t.indexOf(".")-1;if(t.match(/^#+0.0E\+0$/)){if(s==0)return"0.0E+0";if(s<0)return"-"+B5(t,-s);var K=t.indexOf(".");K===-1&&(K=t.indexOf("E"));var de=Math.floor(Math.log(s)*Math.LOG10E)%K;if(de<0&&(de+=K),w=(s/Math.pow(10,de)).toPrecision(W+1+(K+de)%K),w.indexOf("e")===-1){var z=Math.floor(Math.log(s)*Math.LOG10E);for(w.indexOf(".")===-1?w=w.charAt(0)+"."+w.substr(1)+"E+"+(z-w.length+de):w+="E+"+(z-de);w.substr(0,2)==="0.";)w=w.charAt(0)+w.substr(2,K)+"."+w.substr(2+K),w=w.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");w=w.replace(/\+-/,"-")}w=w.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(B,e,d,P){return e+d+P.substr(0,(K+de)%K)+"."+P.substr(de)+"E"})}else w=s.toExponential(W);return t.match(/E\+00$/)&&w.match(/e[+-]\d$/)&&(w=w.substr(0,w.length-1)+"0"+w.charAt(w.length-1)),t.match(/E\-/)&&w.match(/e\+/)&&(w=w.replace(/e\+/,"e")),w.replace("e","E")}var U5=/# (\?+)( ?)\/( ?)(\d+)/;function v9(t,s,w){var W=parseInt(t[4],10),K=Math.round(s*W),de=Math.floor(K/W),z=K-de*W,B=W;return w+(de===0?"":""+de)+" "+(z===0?Do(" ",t[1].length+1+t[4].length):m3(z,t[1].length)+t[2]+"/"+t[3]+Tf(B,t[4].length))}function d9(t,s,w){return w+(s===0?"":""+s)+Do(" ",t[1].length+2+t[4].length)}var H5=/^#*0*\.([0#]+)/,V5=/\).*[0#]/,G5=/\(###\) ###\\?-####/;function yl(t){for(var s="",w,W=0;W!=t.length;++W)switch(w=t.charCodeAt(W)){case 35:break;case 63:s+=" ";break;case 48:s+="0";break;default:s+=String.fromCharCode(w)}return s}function bT(t,s){var w=Math.pow(10,s);return""+Math.round(t*w)/w}function wT(t,s){var w=t-Math.floor(t),W=Math.pow(10,s);return s<(""+Math.round(w*W)).length?0:Math.round(w*W)}function p9(t,s){return s<(""+Math.round((t-Math.floor(t))*Math.pow(10,s))).length?1:0}function g9(t){return t<2147483647&&t>-2147483648?""+(t>=0?t|0:t-1|0):""+Math.floor(t)}function Fu(t,s,w){if(t.charCodeAt(0)===40&&!s.match(V5)){var W=s.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return w>=0?Fu("n",W,w):"("+Fu("n",W,-w)+")"}if(s.charCodeAt(s.length-1)===44)return h9(t,s,w);if(s.indexOf("%")!==-1)return c9(t,s,w);if(s.indexOf("E")!==-1)return B5(s,w);if(s.charCodeAt(0)===36)return"$"+Fu(t,s.substr(s.charAt(1)==" "?2:1),w);var K,de,z,B,e=Math.abs(w),d=w<0?"-":"";if(s.match(/^00+$/))return d+zd(e,s.length);if(s.match(/^[#?]+$/))return K=zd(w,0),K==="0"&&(K=""),K.length>s.length?K:yl(s.substr(0,s.length-K.length))+K;if(de=s.match(U5))return v9(de,e,d);if(s.match(/^#+0+$/))return d+zd(e,s.length-s.indexOf("0"));if(de=s.match(H5))return K=bT(w,de[1].length).replace(/^([^\.]+)$/,"$1."+yl(de[1])).replace(/\.$/,"."+yl(de[1])).replace(/\.(\d*)$/,function(v,y){return"."+y+Do("0",yl(de[1]).length-y.length)}),s.indexOf("0.")!==-1?K:K.replace(/^0\./,".");if(s=s.replace(/^#+([0.])/,"$1"),de=s.match(/^(0*)\.(#*)$/))return d+bT(e,de[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,de[1].length?"0.":".");if(de=s.match(/^#{1,3},##0(\.?)$/))return d+Hh(zd(e,0));if(de=s.match(/^#,##0\.([#0]*0)$/))return w<0?"-"+Fu(t,s,-w):Hh(""+(Math.floor(w)+p9(w,de[1].length)))+"."+Tf(wT(w,de[1].length),de[1].length);if(de=s.match(/^#,#*,#0/))return Fu(t,s.replace(/^#,#*,/,""),w);if(de=s.match(/^([0#]+)(\\?-([0#]+))+$/))return K=s0(Fu(t,s.replace(/[\\-]/g,""),w)),z=0,s0(s0(s.replace(/\\/g,"")).replace(/[0#]/g,function(v){return z<K.length?K.charAt(z++):v==="0"?"0":""}));if(s.match(G5))return K=Fu(t,"##########",w),"("+K.substr(0,3)+") "+K.substr(3,3)+"-"+K.substr(6);var P="";if(de=s.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return z=Math.min(de[4].length,7),B=Q1(e,Math.pow(10,z)-1,!1),K=""+d,P=Vc("n",de[1],B[1]),P.charAt(P.length-1)==" "&&(P=P.substr(0,P.length-1)+"0"),K+=P+de[2]+"/"+de[3],P=J1(B[2],z),P.length<de[4].length&&(P=yl(de[4].substr(de[4].length-P.length))+P),K+=P,K;if(de=s.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return z=Math.min(Math.max(de[1].length,de[4].length),7),B=Q1(e,Math.pow(10,z)-1,!0),d+(B[0]||(B[1]?"":"0"))+" "+(B[1]?m3(B[1],z)+de[2]+"/"+de[3]+J1(B[2],z):Do(" ",2*z+1+de[2].length+de[3].length));if(de=s.match(/^[#0?]+$/))return K=zd(w,0),s.length<=K.length?K:yl(s.substr(0,s.length-K.length))+K;if(de=s.match(/^([#0?]+)\.([#0]+)$/)){K=""+w.toFixed(Math.min(de[2].length,10)).replace(/([^0])0+$/,"$1"),z=K.indexOf(".");var a=s.indexOf(".")-z,_=s.length-K.length-a;return yl(s.substr(0,a)+K+s.substr(s.length-_))}if(de=s.match(/^00,000\.([#0]*0)$/))return z=wT(w,de[1].length),w<0?"-"+Fu(t,s,-w):Hh(g9(w)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(v){return"00,"+(v.length<3?Tf(0,3-v.length):"")+v})+"."+Tf(z,de[1].length);switch(s){case"###,##0.00":return Fu(t,"#,##0.00",w);case"###,###":case"##,###":case"#,###":var x=Hh(zd(e,0));return x!=="0"?d+x:"";case"###,###.00":return Fu(t,"###,##0.00",w).replace(/^0\./,".");case"#,###.00":return Fu(t,"#,##0.00",w).replace(/^0\./,".")}throw new Error("unsupported format |"+s+"|")}function y9(t,s,w){for(var W=s.length-1;s.charCodeAt(W-1)===44;)--W;return Vc(t,s.substr(0,W),w/Math.pow(10,3*(s.length-W)))}function m9(t,s,w){var W=s.replace(N5,""),K=s.length-W.length;return Vc(t,W,w*Math.pow(10,2*K))+Do("%",K)}function W5(t,s){var w,W=t.indexOf("E")-t.indexOf(".")-1;if(t.match(/^#+0.0E\+0$/)){if(s==0)return"0.0E+0";if(s<0)return"-"+W5(t,-s);var K=t.indexOf(".");K===-1&&(K=t.indexOf("E"));var de=Math.floor(Math.log(s)*Math.LOG10E)%K;if(de<0&&(de+=K),w=(s/Math.pow(10,de)).toPrecision(W+1+(K+de)%K),!w.match(/[Ee]/)){var z=Math.floor(Math.log(s)*Math.LOG10E);w.indexOf(".")===-1?w=w.charAt(0)+"."+w.substr(1)+"E+"+(z-w.length+de):w+="E+"+(z-de),w=w.replace(/\+-/,"-")}w=w.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(B,e,d,P){return e+d+P.substr(0,(K+de)%K)+"."+P.substr(de)+"E"})}else w=s.toExponential(W);return t.match(/E\+00$/)&&w.match(/e[+-]\d$/)&&(w=w.substr(0,w.length-1)+"0"+w.charAt(w.length-1)),t.match(/E\-/)&&w.match(/e\+/)&&(w=w.replace(/e\+/,"e")),w.replace("e","E")}function Qf(t,s,w){if(t.charCodeAt(0)===40&&!s.match(V5)){var W=s.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return w>=0?Qf("n",W,w):"("+Qf("n",W,-w)+")"}if(s.charCodeAt(s.length-1)===44)return y9(t,s,w);if(s.indexOf("%")!==-1)return m9(t,s,w);if(s.indexOf("E")!==-1)return W5(s,w);if(s.charCodeAt(0)===36)return"$"+Qf(t,s.substr(s.charAt(1)==" "?2:1),w);var K,de,z,B,e=Math.abs(w),d=w<0?"-":"";if(s.match(/^00+$/))return d+Tf(e,s.length);if(s.match(/^[#?]+$/))return K=""+w,w===0&&(K=""),K.length>s.length?K:yl(s.substr(0,s.length-K.length))+K;if(de=s.match(U5))return d9(de,e,d);if(s.match(/^#+0+$/))return d+Tf(e,s.length-s.indexOf("0"));if(de=s.match(H5))return K=(""+w).replace(/^([^\.]+)$/,"$1."+yl(de[1])).replace(/\.$/,"."+yl(de[1])),K=K.replace(/\.(\d*)$/,function(v,y){return"."+y+Do("0",yl(de[1]).length-y.length)}),s.indexOf("0.")!==-1?K:K.replace(/^0\./,".");if(s=s.replace(/^#+([0.])/,"$1"),de=s.match(/^(0*)\.(#*)$/))return d+(""+e).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,de[1].length?"0.":".");if(de=s.match(/^#{1,3},##0(\.?)$/))return d+Hh(""+e);if(de=s.match(/^#,##0\.([#0]*0)$/))return w<0?"-"+Qf(t,s,-w):Hh(""+w)+"."+Do("0",de[1].length);if(de=s.match(/^#,#*,#0/))return Qf(t,s.replace(/^#,#*,/,""),w);if(de=s.match(/^([0#]+)(\\?-([0#]+))+$/))return K=s0(Qf(t,s.replace(/[\\-]/g,""),w)),z=0,s0(s0(s.replace(/\\/g,"")).replace(/[0#]/g,function(v){return z<K.length?K.charAt(z++):v==="0"?"0":""}));if(s.match(G5))return K=Qf(t,"##########",w),"("+K.substr(0,3)+") "+K.substr(3,3)+"-"+K.substr(6);var P="";if(de=s.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return z=Math.min(de[4].length,7),B=Q1(e,Math.pow(10,z)-1,!1),K=""+d,P=Vc("n",de[1],B[1]),P.charAt(P.length-1)==" "&&(P=P.substr(0,P.length-1)+"0"),K+=P+de[2]+"/"+de[3],P=J1(B[2],z),P.length<de[4].length&&(P=yl(de[4].substr(de[4].length-P.length))+P),K+=P,K;if(de=s.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return z=Math.min(Math.max(de[1].length,de[4].length),7),B=Q1(e,Math.pow(10,z)-1,!0),d+(B[0]||(B[1]?"":"0"))+" "+(B[1]?m3(B[1],z)+de[2]+"/"+de[3]+J1(B[2],z):Do(" ",2*z+1+de[2].length+de[3].length));if(de=s.match(/^[#0?]+$/))return K=""+w,s.length<=K.length?K:yl(s.substr(0,s.length-K.length))+K;if(de=s.match(/^([#0]+)\.([#0]+)$/)){K=""+w.toFixed(Math.min(de[2].length,10)).replace(/([^0])0+$/,"$1"),z=K.indexOf(".");var a=s.indexOf(".")-z,_=s.length-K.length-a;return yl(s.substr(0,a)+K+s.substr(s.length-_))}if(de=s.match(/^00,000\.([#0]*0)$/))return w<0?"-"+Qf(t,s,-w):Hh(""+w).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(v){return"00,"+(v.length<3?Tf(0,3-v.length):"")+v})+"."+Tf(0,de[1].length);switch(s){case"###,###":case"##,###":case"#,###":var x=Hh(""+e);return x!=="0"?d+x:"";default:if(s.match(/\.[0#?]*$/))return Qf(t,s.slice(0,s.lastIndexOf(".")),w)+yl(s.slice(s.lastIndexOf(".")))}throw new Error("unsupported format |"+s+"|")}function Vc(t,s,w){return(w|0)===w?Qf(t,s,w):Fu(t,s,w)}function x9(t){for(var s=[],w=!1,W=0,K=0;W<t.length;++W)switch(t.charCodeAt(W)){case 34:w=!w;break;case 95:case 42:case 92:++W;break;case 59:s[s.length]=t.substr(K,W-K),K=W+1}if(s[s.length]=t.substr(K),w===!0)throw new Error("Format |"+t+"| unterminated string ");return s}var Y5=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function X5(t){for(var s=0,w="",W="";s<t.length;)switch(w=t.charAt(s)){case"G":$1(t,s)&&(s+=6),s++;break;case'"':for(;t.charCodeAt(++s)!==34&&s<t.length;);++s;break;case"\\":s+=2;break;case"_":s+=2;break;case"@":++s;break;case"B":case"b":if(t.charAt(s+1)==="1"||t.charAt(s+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(t.substr(s,3).toUpperCase()==="A/P"||t.substr(s,5).toUpperCase()==="AM/PM"||t.substr(s,5).toUpperCase()==="上午/下午")return!0;++s;break;case"[":for(W=w;t.charAt(s++)!=="]"&&s<t.length;)W+=t.charAt(s);if(W.match(Y5))return!0;break;case".":case"0":case"#":for(;s<t.length&&("0#?.,E+-%".indexOf(w=t.charAt(++s))>-1||w=="\\"&&t.charAt(s+1)=="-"&&"0#".indexOf(t.charAt(s+2))>-1););break;case"?":for(;t.charAt(++s)===w;);break;case"*":++s,(t.charAt(s)==" "||t.charAt(s)=="*")&&++s;break;case"(":case")":++s;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;s<t.length&&"0123456789".indexOf(t.charAt(++s))>-1;);break;case" ":++s;break;default:++s;break}return!1}function b9(t,s,w,W){for(var K=[],de="",z=0,B="",e="t",d,P,a,_="H";z<t.length;)switch(B=t.charAt(z)){case"G":if(!$1(t,z))throw new Error("unrecognized character "+B+" in "+t);K[K.length]={t:"G",v:"General"},z+=7;break;case'"':for(de="";(a=t.charCodeAt(++z))!==34&&z<t.length;)de+=String.fromCharCode(a);K[K.length]={t:"t",v:de},++z;break;case"\\":var x=t.charAt(++z),v=x==="("||x===")"?x:"t";K[K.length]={t:v,v:x},++z;break;case"_":K[K.length]={t:"t",v:" "},z+=2;break;case"@":K[K.length]={t:"T",v:s},++z;break;case"B":case"b":if(t.charAt(z+1)==="1"||t.charAt(z+1)==="2"){if(d==null&&(d=n1(s,w,t.charAt(z+1)==="2"),d==null))return"";K[K.length]={t:"X",v:t.substr(z,2)},e=B,z+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":B=B.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(s<0||d==null&&(d=n1(s,w),d==null))return"";for(de=B;++z<t.length&&t.charAt(z).toLowerCase()===B;)de+=B;B==="m"&&e.toLowerCase()==="h"&&(B="M"),B==="h"&&(B=_),K[K.length]={t:B,v:de},e=B;break;case"A":case"a":case"上":var y={t:B,v:B};if(d==null&&(d=n1(s,w)),t.substr(z,3).toUpperCase()==="A/P"?(d!=null&&(y.v=d.H>=12?"P":"A"),y.t="T",_="h",z+=3):t.substr(z,5).toUpperCase()==="AM/PM"?(d!=null&&(y.v=d.H>=12?"PM":"AM"),y.t="T",z+=5,_="h"):t.substr(z,5).toUpperCase()==="上午/下午"?(d!=null&&(y.v=d.H>=12?"下午":"上午"),y.t="T",z+=5,_="h"):(y.t="t",++z),d==null&&y.t==="T")return"";K[K.length]=y,e=B;break;case"[":for(de=B;t.charAt(z++)!=="]"&&z<t.length;)de+=t.charAt(z);if(de.slice(-1)!=="]")throw'unterminated "[" block: |'+de+"|";if(de.match(Y5)){if(d==null&&(d=n1(s,w),d==null))return"";K[K.length]={t:"Z",v:de.toLowerCase()},e=de.charAt(1)}else de.indexOf("$")>-1&&(de=(de.match(/\$([^-\[\]]*)/)||[])[1]||"$",X5(t)||(K[K.length]={t:"t",v:de}));break;case".":if(d!=null){for(de=B;++z<t.length&&(B=t.charAt(z))==="0";)de+=B;K[K.length]={t:"s",v:de};break}case"0":case"#":for(de=B;++z<t.length&&"0#?.,E+-%".indexOf(B=t.charAt(z))>-1;)de+=B;K[K.length]={t:"n",v:de};break;case"?":for(de=B;t.charAt(++z)===B;)de+=B;K[K.length]={t:B,v:de},e=B;break;case"*":++z,(t.charAt(z)==" "||t.charAt(z)=="*")&&++z;break;case"(":case")":K[K.length]={t:W===1?"t":B,v:B},++z;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(de=B;z<t.length&&"0123456789".indexOf(t.charAt(++z))>-1;)de+=t.charAt(z);K[K.length]={t:"D",v:de};break;case" ":K[K.length]={t:B,v:B},++z;break;case"$":K[K.length]={t:"t",v:"$"},++z;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(B)===-1)throw new Error("unrecognized character "+B+" in "+t);K[K.length]={t:"t",v:B},++z;break}var r=0,n=0,u;for(z=K.length-1,e="t";z>=0;--z)switch(K[z].t){case"h":case"H":K[z].t=_,e="h",r<1&&(r=1);break;case"s":(u=K[z].v.match(/\.0+$/))&&(n=Math.max(n,u[0].length-1)),r<3&&(r=3);case"d":case"y":case"M":case"e":e=K[z].t;break;case"m":e==="s"&&(K[z].t="M",r<2&&(r=2));break;case"X":break;case"Z":r<1&&K[z].v.match(/[Hh]/)&&(r=1),r<2&&K[z].v.match(/[Mm]/)&&(r=2),r<3&&K[z].v.match(/[Ss]/)&&(r=3)}switch(r){case 0:break;case 1:d.u>=.5&&(d.u=0,++d.S),d.S>=60&&(d.S=0,++d.M),d.M>=60&&(d.M=0,++d.H);break;case 2:d.u>=.5&&(d.u=0,++d.S),d.S>=60&&(d.S=0,++d.M);break}var i="",f;for(z=0;z<K.length;++z)switch(K[z].t){case"t":case"T":case" ":case"D":break;case"X":K[z].v="",K[z].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":K[z].v=f9(K[z].t.charCodeAt(0),K[z].v,d,n),K[z].t="t";break;case"n":case"?":for(f=z+1;K[f]!=null&&((B=K[f].t)==="?"||B==="D"||(B===" "||B==="t")&&K[f+1]!=null&&(K[f+1].t==="?"||K[f+1].t==="t"&&K[f+1].v==="/")||K[z].t==="("&&(B===" "||B==="n"||B===")")||B==="t"&&(K[f].v==="/"||K[f].v===" "&&K[f+1]!=null&&K[f+1].t=="?"));)K[z].v+=K[f].v,K[f]={v:"",t:";"},++f;i+=K[z].v,z=f-1;break;case"G":K[z].t="t",K[z].v=l2(s,w);break}var g="",h,b;if(i.length>0){i.charCodeAt(0)==40?(h=s<0&&i.charCodeAt(0)===45?-s:s,b=Vc("n",i,h)):(h=s<0&&W>1?-s:s,b=Vc("n",i,h),h<0&&K[0]&&K[0].t=="t"&&(b=b.substr(1),K[0].v="-"+K[0].v)),f=b.length-1;var p=K.length;for(z=0;z<K.length;++z)if(K[z]!=null&&K[z].t!="t"&&K[z].v.indexOf(".")>-1){p=z;break}var E=K.length;if(p===K.length&&b.indexOf("E")===-1){for(z=K.length-1;z>=0;--z)K[z]==null||"n?".indexOf(K[z].t)===-1||(f>=K[z].v.length-1?(f-=K[z].v.length,K[z].v=b.substr(f+1,K[z].v.length)):f<0?K[z].v="":(K[z].v=b.substr(0,f+1),f=-1),K[z].t="t",E=z);f>=0&&E<K.length&&(K[E].v=b.substr(0,f+1)+K[E].v)}else if(p!==K.length&&b.indexOf("E")===-1){for(f=b.indexOf(".")-1,z=p;z>=0;--z)if(!(K[z]==null||"n?".indexOf(K[z].t)===-1)){for(P=K[z].v.indexOf(".")>-1&&z===p?K[z].v.indexOf(".")-1:K[z].v.length-1,g=K[z].v.substr(P+1);P>=0;--P)f>=0&&(K[z].v.charAt(P)==="0"||K[z].v.charAt(P)==="#")&&(g=b.charAt(f--)+g);K[z].v=g,K[z].t="t",E=z}for(f>=0&&E<K.length&&(K[E].v=b.substr(0,f+1)+K[E].v),f=b.indexOf(".")+1,z=p;z<K.length;++z)if(!(K[z]==null||"n?(".indexOf(K[z].t)===-1&&z!==p)){for(P=K[z].v.indexOf(".")>-1&&z===p?K[z].v.indexOf(".")+1:0,g=K[z].v.substr(0,P);P<K[z].v.length;++P)f<b.length&&(g+=b.charAt(f++));K[z].v=g,K[z].t="t",E=z}}}for(z=0;z<K.length;++z)K[z]!=null&&"n?".indexOf(K[z].t)>-1&&(h=W>1&&s<0&&z>0&&K[z-1].v==="-"?-s:s,K[z].v=Vc(K[z].t,K[z].v,h),K[z].t="t");var c="";for(z=0;z!==K.length;++z)K[z]!=null&&(c+=K[z].v);return c}var TT=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function AT(t,s){if(s==null)return!1;var w=parseFloat(s[2]);switch(s[1]){case"=":if(t==w)return!0;break;case">":if(t>w)return!0;break;case"<":if(t<w)return!0;break;case"<>":if(t!=w)return!0;break;case">=":if(t>=w)return!0;break;case"<=":if(t<=w)return!0;break}return!1}function w9(t,s){var w=x9(t),W=w.length,K=w[W-1].indexOf("@");if(W<4&&K>-1&&--W,w.length>4)throw new Error("cannot find right format for |"+w.join("|")+"|");if(typeof s!="number")return[4,w.length===4||K>-1?w[w.length-1]:"@"];switch(w.length){case 1:w=K>-1?["General","General","General",w[0]]:[w[0],w[0],w[0],"@"];break;case 2:w=K>-1?[w[0],w[0],w[0],w[1]]:[w[0],w[1],w[0],"@"];break;case 3:w=K>-1?[w[0],w[1],w[0],w[2]]:[w[0],w[1],w[2],"@"];break}var de=s>0?w[0]:s<0?w[1]:w[2];if(w[0].indexOf("[")===-1&&w[1].indexOf("[")===-1)return[W,de];if(w[0].match(/\[[=<>]/)!=null||w[1].match(/\[[=<>]/)!=null){var z=w[0].match(TT),B=w[1].match(TT);return AT(s,z)?[W,w[0]]:AT(s,B)?[W,w[1]]:[W,w[z!=null&&B!=null?2:1]]}return[W,de]}function qh(t,s,w){w==null&&(w={});var W="";switch(typeof t){case"string":t=="m/d/yy"&&w.dateNF?W=w.dateNF:W=t;break;case"number":t==14&&w.dateNF?W=w.dateNF:W=(w.table!=null?w.table:Io)[t],W==null&&(W=w.table&&w.table[xT[t]]||Io[xT[t]]),W==null&&(W=r9[t]||"General");break}if($1(W,0))return l2(s,w);s instanceof Date&&(s=z5(s,w.date1904));var K=w9(W,s);if($1(K[1]))return l2(s,w);if(s===!0)s="TRUE";else if(s===!1)s="FALSE";else if(s===""||s==null)return"";return b9(K[1],s,w,K[0])}function Z5(t,s){if(typeof s!="number"){s=+s||-1;for(var w=0;w<392;++w){if(Io[w]==null){s<0&&(s=w);continue}if(Io[w]==t){s=w;break}}s<0&&(s=391)}return Io[s]=t,s}function Cy(t){for(var s=0;s!=392;++s)t[s]!==void 0&&Z5(t[s],s)}function Ly(){Io=t9()}var j5=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function T9(t){var s=typeof t=="number"?Io[t]:t;return s=s.replace(j5,"(\\d+)"),new RegExp("^"+s+"$")}function A9(t,s,w){var W=-1,K=-1,de=-1,z=-1,B=-1,e=-1;(s.match(j5)||[]).forEach(function(a,_){var x=parseInt(w[_+1],10);switch(a.toLowerCase().charAt(0)){case"y":W=x;break;case"d":de=x;break;case"h":z=x;break;case"s":e=x;break;case"m":z>=0?B=x:K=x;break}}),e>=0&&B==-1&&K>=0&&(B=K,K=-1);var d=(""+(W>=0?W:new Date().getFullYear())).slice(-4)+"-"+("00"+(K>=1?K:1)).slice(-2)+"-"+("00"+(de>=1?de:1)).slice(-2);d.length==7&&(d="0"+d),d.length==8&&(d="20"+d);var P=("00"+(z>=0?z:0)).slice(-2)+":"+("00"+(B>=0?B:0)).slice(-2)+":"+("00"+(e>=0?e:0)).slice(-2);return z==-1&&B==-1&&e==-1?d:W==-1&&K==-1&&de==-1?P:d+"T"+P}var S9=function(){var t={};t.version="1.2.0";function s(){for(var b=0,p=new Array(256),E=0;E!=256;++E)b=E,b=b&1?-306674912^b>>>1:b>>>1,b=b&1?-306674912^b>>>1:b>>>1,b=b&1?-306674912^b>>>1:b>>>1,b=b&1?-306674912^b>>>1:b>>>1,b=b&1?-306674912^b>>>1:b>>>1,b=b&1?-306674912^b>>>1:b>>>1,b=b&1?-306674912^b>>>1:b>>>1,b=b&1?-306674912^b>>>1:b>>>1,p[E]=b;return typeof Int32Array<"u"?new Int32Array(p):p}var w=s();function W(b){var p=0,E=0,c=0,l=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(c=0;c!=256;++c)l[c]=b[c];for(c=0;c!=256;++c)for(E=b[c],p=256+c;p<4096;p+=256)E=l[p]=E>>>8^b[E&255];var m=[];for(c=1;c!=16;++c)m[c-1]=typeof Int32Array<"u"?l.subarray(c*256,c*256+256):l.slice(c*256,c*256+256);return m}var K=W(w),de=K[0],z=K[1],B=K[2],e=K[3],d=K[4],P=K[5],a=K[6],_=K[7],x=K[8],v=K[9],y=K[10],r=K[11],n=K[12],u=K[13],i=K[14];function f(b,p){for(var E=p^-1,c=0,l=b.length;c<l;)E=E>>>8^w[(E^b.charCodeAt(c++))&255];return~E}function g(b,p){for(var E=p^-1,c=b.length-15,l=0;l<c;)E=i[b[l++]^E&255]^u[b[l++]^E>>8&255]^n[b[l++]^E>>16&255]^r[b[l++]^E>>>24]^y[b[l++]]^v[b[l++]]^x[b[l++]]^_[b[l++]]^a[b[l++]]^P[b[l++]]^d[b[l++]]^e[b[l++]]^B[b[l++]]^z[b[l++]]^de[b[l++]]^w[b[l++]];for(c+=15;l<c;)E=E>>>8^w[(E^b[l++])&255];return~E}function h(b,p){for(var E=p^-1,c=0,l=b.length,m=0,M=0;c<l;)m=b.charCodeAt(c++),m<128?E=E>>>8^w[(E^m)&255]:m<2048?(E=E>>>8^w[(E^(192|m>>6&31))&255],E=E>>>8^w[(E^(128|m&63))&255]):m>=55296&&m<57344?(m=(m&1023)+64,M=b.charCodeAt(c++)&1023,E=E>>>8^w[(E^(240|m>>8&7))&255],E=E>>>8^w[(E^(128|m>>2&63))&255],E=E>>>8^w[(E^(128|M>>6&15|(m&3)<<4))&255],E=E>>>8^w[(E^(128|M&63))&255]):(E=E>>>8^w[(E^(224|m>>12&15))&255],E=E>>>8^w[(E^(128|m>>6&63))&255],E=E>>>8^w[(E^(128|m&63))&255]);return~E}return t.table=w,t.bstr=f,t.buf=g,t.str=h,t}(),Ki=function(){var s={};s.version="1.2.1";function w(Ae,Pe){for(var Ge=Ae.split("/"),We=Pe.split("/"),tt=0,ct=0,St=Math.min(Ge.length,We.length);tt<St;++tt){if(ct=Ge[tt].length-We[tt].length)return ct;if(Ge[tt]!=We[tt])return Ge[tt]<We[tt]?-1:1}return Ge.length-We.length}function W(Ae){if(Ae.charAt(Ae.length-1)=="/")return Ae.slice(0,-1).indexOf("/")===-1?Ae:W(Ae.slice(0,-1));var Pe=Ae.lastIndexOf("/");return Pe===-1?Ae:Ae.slice(0,Pe+1)}function K(Ae){if(Ae.charAt(Ae.length-1)=="/")return K(Ae.slice(0,-1));var Pe=Ae.lastIndexOf("/");return Pe===-1?Ae:Ae.slice(Pe+1)}function de(Ae,Pe){typeof Pe=="string"&&(Pe=new Date(Pe));var Ge=Pe.getHours();Ge=Ge<<6|Pe.getMinutes(),Ge=Ge<<5|Pe.getSeconds()>>>1,Ae.write_shift(2,Ge);var We=Pe.getFullYear()-1980;We=We<<4|Pe.getMonth()+1,We=We<<5|Pe.getDate(),Ae.write_shift(2,We)}function z(Ae){var Pe=Ae.read_shift(2)&65535,Ge=Ae.read_shift(2)&65535,We=new Date,tt=Ge&31;Ge>>>=5;var ct=Ge&15;Ge>>>=4,We.setMilliseconds(0),We.setFullYear(Ge+1980),We.setMonth(ct-1),We.setDate(tt);var St=Pe&31;Pe>>>=5;var Pt=Pe&63;return Pe>>>=6,We.setHours(Pe),We.setMinutes(Pt),We.setSeconds(St<<1),We}function B(Ae){ou(Ae,0);for(var Pe={},Ge=0;Ae.l<=Ae.length-4;){var We=Ae.read_shift(2),tt=Ae.read_shift(2),ct=Ae.l+tt,St={};switch(We){case 21589:Ge=Ae.read_shift(1),Ge&1&&(St.mtime=Ae.read_shift(4)),tt>5&&(Ge&2&&(St.atime=Ae.read_shift(4)),Ge&4&&(St.ctime=Ae.read_shift(4))),St.mtime&&(St.mt=new Date(St.mtime*1e3));break}Ae.l=ct,Pe[We]=St}return Pe}var e;function d(){return e||(e={})}function P(Ae,Pe){if(Ae[0]==80&&Ae[1]==75)return it(Ae,Pe);if((Ae[0]|32)==109&&(Ae[1]|32)==105)return rt(Ae,Pe);if(Ae.length<512)throw new Error("CFB file size "+Ae.length+" < 512");var Ge=3,We=512,tt=0,ct=0,St=0,Pt=0,wt=0,Bt=[],Wt=Ae.slice(0,512);ou(Wt,0);var hr=a(Wt);switch(Ge=hr[0],Ge){case 3:We=512;break;case 4:We=4096;break;case 0:if(hr[1]==0)return it(Ae,Pe);default:throw new Error("Major Version: Expected 3 or 4 saw "+Ge)}We!==512&&(Wt=Ae.slice(0,We),ou(Wt,28));var gt=Ae.slice(0,We);_(Wt,Ge);var jt=Wt.read_shift(4,"i");if(Ge===3&&jt!==0)throw new Error("# Directory Sectors: Expected 0 saw "+jt);Wt.l+=4,St=Wt.read_shift(4,"i"),Wt.l+=4,Wt.chk("00100000","Mini Stream Cutoff Size: "),Pt=Wt.read_shift(4,"i"),tt=Wt.read_shift(4,"i"),wt=Wt.read_shift(4,"i"),ct=Wt.read_shift(4,"i");for(var Ut=-1,or=0;or<109&&(Ut=Wt.read_shift(4,"i"),!(Ut<0));++or)Bt[or]=Ut;var ur=x(Ae,We);r(wt,ct,ur,We,Bt);var dt=u(ur,St,Bt,We);dt[St].name="!Directory",tt>0&&Pt!==M&&(dt[Pt].name="!MiniFAT"),dt[Bt[0]].name="!FAT",dt.fat_addrs=Bt,dt.ssz=We;var ut={},yt=[],Lt=[],Rt=[];i(St,dt,ur,yt,tt,ut,Lt,Pt),v(Lt,Rt,yt),yt.shift();var Nt={FileIndex:Lt,FullPaths:Rt};return Pe&&Pe.raw&&(Nt.raw={header:gt,sectors:ur}),Nt}function a(Ae){if(Ae[Ae.l]==80&&Ae[Ae.l+1]==75)return[0,0];Ae.chk(L,"Header Signature: "),Ae.l+=16;var Pe=Ae.read_shift(2,"u");return[Ae.read_shift(2,"u"),Pe]}function _(Ae,Pe){var Ge=9;switch(Ae.l+=2,Ge=Ae.read_shift(2)){case 9:if(Pe!=3)throw new Error("Sector Shift: Expected 9 saw "+Ge);break;case 12:if(Pe!=4)throw new Error("Sector Shift: Expected 12 saw "+Ge);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+Ge)}Ae.chk("0600","Mini Sector Shift: "),Ae.chk("000000000000","Reserved: ")}function x(Ae,Pe){for(var Ge=Math.ceil(Ae.length/Pe)-1,We=[],tt=1;tt<Ge;++tt)We[tt-1]=Ae.slice(tt*Pe,(tt+1)*Pe);return We[Ge-1]=Ae.slice(Ge*Pe),We}function v(Ae,Pe,Ge){for(var We=0,tt=0,ct=0,St=0,Pt=0,wt=Ge.length,Bt=[],Wt=[];We<wt;++We)Bt[We]=Wt[We]=We,Pe[We]=Ge[We];for(;Pt<Wt.length;++Pt)We=Wt[Pt],tt=Ae[We].L,ct=Ae[We].R,St=Ae[We].C,Bt[We]===We&&(tt!==-1&&Bt[tt]!==tt&&(Bt[We]=Bt[tt]),ct!==-1&&Bt[ct]!==ct&&(Bt[We]=Bt[ct])),St!==-1&&(Bt[St]=We),tt!==-1&&We!=Bt[We]&&(Bt[tt]=Bt[We],Wt.lastIndexOf(tt)<Pt&&Wt.push(tt)),ct!==-1&&We!=Bt[We]&&(Bt[ct]=Bt[We],Wt.lastIndexOf(ct)<Pt&&Wt.push(ct));for(We=1;We<wt;++We)Bt[We]===We&&(ct!==-1&&Bt[ct]!==ct?Bt[We]=Bt[ct]:tt!==-1&&Bt[tt]!==tt&&(Bt[We]=Bt[tt]));for(We=1;We<wt;++We)if(Ae[We].type!==0){if(Pt=We,Pt!=Bt[Pt])do Pt=Bt[Pt],Pe[We]=Pe[Pt]+"/"+Pe[We];while(Pt!==0&&Bt[Pt]!==-1&&Pt!=Bt[Pt]);Bt[We]=-1}for(Pe[0]+="/",We=1;We<wt;++We)Ae[We].type!==2&&(Pe[We]+="/")}function y(Ae,Pe,Ge){for(var We=Ae.start,tt=Ae.size,ct=[],St=We;Ge&&tt>0&&St>=0;)ct.push(Pe.slice(St*m,St*m+m)),tt-=m,St=Bv(Ge,St*4);return ct.length===0?Gn(0):Rs(ct).slice(0,Ae.size)}function r(Ae,Pe,Ge,We,tt){var ct=M;if(Ae===M){if(Pe!==0)throw new Error("DIFAT chain shorter than expected")}else if(Ae!==-1){var St=Ge[Ae],Pt=(We>>>2)-1;if(!St)return;for(var wt=0;wt<Pt&&(ct=Bv(St,wt*4))!==M;++wt)tt.push(ct);r(Bv(St,We-4),Pe-1,Ge,We,tt)}}function n(Ae,Pe,Ge,We,tt){var ct=[],St=[];tt||(tt=[]);var Pt=We-1,wt=0,Bt=0;for(wt=Pe;wt>=0;){tt[wt]=!0,ct[ct.length]=wt,St.push(Ae[wt]);var Wt=Ge[Math.floor(wt*4/We)];if(Bt=wt*4&Pt,We<4+Bt)throw new Error("FAT boundary crossed: "+wt+" 4 "+We);if(!Ae[Wt])break;wt=Bv(Ae[Wt],Bt)}return{nodes:ct,data:RT([St])}}function u(Ae,Pe,Ge,We){var tt=Ae.length,ct=[],St=[],Pt=[],wt=[],Bt=We-1,Wt=0,hr=0,gt=0,jt=0;for(Wt=0;Wt<tt;++Wt)if(Pt=[],gt=Wt+Pe,gt>=tt&&(gt-=tt),!St[gt]){wt=[];var Ut=[];for(hr=gt;hr>=0;){Ut[hr]=!0,St[hr]=!0,Pt[Pt.length]=hr,wt.push(Ae[hr]);var or=Ge[Math.floor(hr*4/We)];if(jt=hr*4&Bt,We<4+jt)throw new Error("FAT boundary crossed: "+hr+" 4 "+We);if(!Ae[or]||(hr=Bv(Ae[or],jt),Ut[hr]))break}ct[gt]={nodes:Pt,data:RT([wt])}}return ct}function i(Ae,Pe,Ge,We,tt,ct,St,Pt){for(var wt=0,Bt=We.length?2:0,Wt=Pe[Ae].data,hr=0,gt=0,jt;hr<Wt.length;hr+=128){var Ut=Wt.slice(hr,hr+128);ou(Ut,64),gt=Ut.read_shift(2),jt=S3(Ut,0,gt-Bt),We.push(jt);var or={name:jt,type:Ut.read_shift(1),color:Ut.read_shift(1),L:Ut.read_shift(4,"i"),R:Ut.read_shift(4,"i"),C:Ut.read_shift(4,"i"),clsid:Ut.read_shift(16),state:Ut.read_shift(4,"i"),start:0,size:0},ur=Ut.read_shift(2)+Ut.read_shift(2)+Ut.read_shift(2)+Ut.read_shift(2);ur!==0&&(or.ct=f(Ut,Ut.l-8));var dt=Ut.read_shift(2)+Ut.read_shift(2)+Ut.read_shift(2)+Ut.read_shift(2);dt!==0&&(or.mt=f(Ut,Ut.l-8)),or.start=Ut.read_shift(4,"i"),or.size=Ut.read_shift(4,"i"),or.size<0&&or.start<0&&(or.size=or.type=0,or.start=M,or.name=""),or.type===5?(wt=or.start,tt>0&&wt!==M&&(Pe[wt].name="!StreamData")):or.size>=4096?(or.storage="fat",Pe[or.start]===void 0&&(Pe[or.start]=n(Ge,or.start,Pe.fat_addrs,Pe.ssz)),Pe[or.start].name=or.name,or.content=Pe[or.start].data.slice(0,or.size)):(or.storage="minifat",or.size<0?or.size=0:wt!==M&&or.start!==M&&Pe[wt]&&(or.content=y(or,Pe[wt].data,(Pe[Pt]||{}).data))),or.content&&ou(or.content,0),ct[jt]=or,St.push(or)}}function f(Ae,Pe){return new Date((lu(Ae,Pe+4)/1e7*Math.pow(2,32)+lu(Ae,Pe)/1e7-11644473600)*1e3)}function g(Ae,Pe){return d(),P(e.readFileSync(Ae),Pe)}function h(Ae,Pe){var Ge=Pe&&Pe.type;switch(Ge||zi&&Buffer.isBuffer(Ae)&&(Ge="buffer"),Ge||"base64"){case"file":return g(Ae,Pe);case"base64":return P(wf(Kc(Ae)),Pe);case"binary":return P(wf(Ae),Pe)}return P(Ae,Pe)}function b(Ae,Pe){var Ge=Pe||{},We=Ge.root||"Root Entry";if(Ae.FullPaths||(Ae.FullPaths=[]),Ae.FileIndex||(Ae.FileIndex=[]),Ae.FullPaths.length!==Ae.FileIndex.length)throw new Error("inconsistent CFB structure");Ae.FullPaths.length===0&&(Ae.FullPaths[0]=We+"/",Ae.FileIndex[0]={name:We,type:5}),Ge.CLSID&&(Ae.FileIndex[0].clsid=Ge.CLSID),p(Ae)}function p(Ae){var Pe="Sh33tJ5";if(!Ki.find(Ae,"/"+Pe)){var Ge=Gn(4);Ge[0]=55,Ge[1]=Ge[3]=50,Ge[2]=54,Ae.FileIndex.push({name:Pe,type:2,content:Ge,size:4,L:69,R:69,C:69}),Ae.FullPaths.push(Ae.FullPaths[0]+Pe),E(Ae)}}function E(Ae,Pe){b(Ae);for(var Ge=!1,We=!1,tt=Ae.FullPaths.length-1;tt>=0;--tt){var ct=Ae.FileIndex[tt];switch(ct.type){case 0:We?Ge=!0:(Ae.FileIndex.pop(),Ae.FullPaths.pop());break;case 1:case 2:case 5:We=!0,isNaN(ct.R*ct.L*ct.C)&&(Ge=!0),ct.R>-1&&ct.L>-1&&ct.R==ct.L&&(Ge=!0);break;default:Ge=!0;break}}if(!(!Ge&&!Pe)){var St=new Date(1987,1,19),Pt=0,wt=Object.create?Object.create(null):{},Bt=[];for(tt=0;tt<Ae.FullPaths.length;++tt)wt[Ae.FullPaths[tt]]=!0,Ae.FileIndex[tt].type!==0&&Bt.push([Ae.FullPaths[tt],Ae.FileIndex[tt]]);for(tt=0;tt<Bt.length;++tt){var Wt=W(Bt[tt][0]);We=wt[Wt],We||(Bt.push([Wt,{name:K(Wt).replace("/",""),type:1,clsid:A,ct:St,mt:St,content:null}]),wt[Wt]=!0)}for(Bt.sort(function(jt,Ut){return w(jt[0],Ut[0])}),Ae.FullPaths=[],Ae.FileIndex=[],tt=0;tt<Bt.length;++tt)Ae.FullPaths[tt]=Bt[tt][0],Ae.FileIndex[tt]=Bt[tt][1];for(tt=0;tt<Bt.length;++tt){var hr=Ae.FileIndex[tt],gt=Ae.FullPaths[tt];if(hr.name=K(gt).replace("/",""),hr.L=hr.R=hr.C=-(hr.color=1),hr.size=hr.content?hr.content.length:0,hr.start=0,hr.clsid=hr.clsid||A,tt===0)hr.C=Bt.length>1?1:-1,hr.size=0,hr.type=5;else if(gt.slice(-1)=="/"){for(Pt=tt+1;Pt<Bt.length&&W(Ae.FullPaths[Pt])!=gt;++Pt);for(hr.C=Pt>=Bt.length?-1:Pt,Pt=tt+1;Pt<Bt.length&&W(Ae.FullPaths[Pt])!=W(gt);++Pt);hr.R=Pt>=Bt.length?-1:Pt,hr.type=1}else W(Ae.FullPaths[tt+1]||"")==W(gt)&&(hr.R=tt+1),hr.type=2}}}function c(Ae,Pe){var Ge=Pe||{};if(Ge.fileType=="mad")return lt(Ae,Ge);switch(E(Ae),Ge.fileType){case"zip":return pt(Ae,Ge)}var We=function(jt){for(var Ut=0,or=0,ur=0;ur<jt.FileIndex.length;++ur){var dt=jt.FileIndex[ur];if(dt.content){var ut=dt.content.length;ut>0&&(ut<4096?Ut+=ut+63>>6:or+=ut+511>>9)}}for(var yt=jt.FullPaths.length+3>>2,Lt=Ut+7>>3,Rt=Ut+127>>7,Nt=Lt+or+yt+Rt,Vt=Nt+127>>7,Zt=Vt<=109?0:Math.ceil((Vt-109)/127);Nt+Vt+Zt+127>>7>Vt;)Zt=++Vt<=109?0:Math.ceil((Vt-109)/127);var qt=[1,Zt,Vt,Rt,yt,or,Ut,0];return jt.FileIndex[0].size=Ut<<6,qt[7]=(jt.FileIndex[0].start=qt[0]+qt[1]+qt[2]+qt[3]+qt[4]+qt[5])+(qt[6]+7>>3),qt}(Ae),tt=Gn(We[7]<<9),ct=0,St=0;{for(ct=0;ct<8;++ct)tt.write_shift(1,D[ct]);for(ct=0;ct<8;++ct)tt.write_shift(2,0);for(tt.write_shift(2,62),tt.write_shift(2,3),tt.write_shift(2,65534),tt.write_shift(2,9),tt.write_shift(2,6),ct=0;ct<3;++ct)tt.write_shift(2,0);for(tt.write_shift(4,0),tt.write_shift(4,We[2]),tt.write_shift(4,We[0]+We[1]+We[2]+We[3]-1),tt.write_shift(4,0),tt.write_shift(4,1<<12),tt.write_shift(4,We[3]?We[0]+We[1]+We[2]-1:M),tt.write_shift(4,We[3]),tt.write_shift(-4,We[1]?We[0]-1:M),tt.write_shift(4,We[1]),ct=0;ct<109;++ct)tt.write_shift(-4,ct<We[2]?We[1]+ct:-1)}if(We[1])for(St=0;St<We[1];++St){for(;ct<236+St*127;++ct)tt.write_shift(-4,ct<We[2]?We[1]+ct:-1);tt.write_shift(-4,St===We[1]-1?M:St+1)}var Pt=function(jt){for(St+=jt;ct<St-1;++ct)tt.write_shift(-4,ct+1);jt&&(++ct,tt.write_shift(-4,M))};for(St=ct=0,St+=We[1];ct<St;++ct)tt.write_shift(-4,C.DIFSECT);for(St+=We[2];ct<St;++ct)tt.write_shift(-4,C.FATSECT);Pt(We[3]),Pt(We[4]);for(var wt=0,Bt=0,Wt=Ae.FileIndex[0];wt<Ae.FileIndex.length;++wt)Wt=Ae.FileIndex[wt],Wt.content&&(Bt=Wt.content.length,!(Bt<4096)&&(Wt.start=St,Pt(Bt+511>>9)));for(Pt(We[6]+7>>3);tt.l&511;)tt.write_shift(-4,C.ENDOFCHAIN);for(St=ct=0,wt=0;wt<Ae.FileIndex.length;++wt)Wt=Ae.FileIndex[wt],Wt.content&&(Bt=Wt.content.length,!(!Bt||Bt>=4096)&&(Wt.start=St,Pt(Bt+63>>6)));for(;tt.l&511;)tt.write_shift(-4,C.ENDOFCHAIN);for(ct=0;ct<We[4]<<2;++ct){var hr=Ae.FullPaths[ct];if(!hr||hr.length===0){for(wt=0;wt<17;++wt)tt.write_shift(4,0);for(wt=0;wt<3;++wt)tt.write_shift(4,-1);for(wt=0;wt<12;++wt)tt.write_shift(4,0);continue}Wt=Ae.FileIndex[ct],ct===0&&(Wt.start=Wt.size?Wt.start-1:M);var gt=ct===0&&Ge.root||Wt.name;if(Bt=2*(gt.length+1),tt.write_shift(64,gt,"utf16le"),tt.write_shift(2,Bt),tt.write_shift(1,Wt.type),tt.write_shift(1,Wt.color),tt.write_shift(-4,Wt.L),tt.write_shift(-4,Wt.R),tt.write_shift(-4,Wt.C),Wt.clsid)tt.write_shift(16,Wt.clsid,"hex");else for(wt=0;wt<4;++wt)tt.write_shift(4,0);tt.write_shift(4,Wt.state||0),tt.write_shift(4,0),tt.write_shift(4,0),tt.write_shift(4,0),tt.write_shift(4,0),tt.write_shift(4,Wt.start),tt.write_shift(4,Wt.size),tt.write_shift(4,0)}for(ct=1;ct<Ae.FileIndex.length;++ct)if(Wt=Ae.FileIndex[ct],Wt.size>=4096)if(tt.l=Wt.start+1<<9,zi&&Buffer.isBuffer(Wt.content))Wt.content.copy(tt,tt.l,0,Wt.size),tt.l+=Wt.size+511&-512;else{for(wt=0;wt<Wt.size;++wt)tt.write_shift(1,Wt.content[wt]);for(;wt&511;++wt)tt.write_shift(1,0)}for(ct=1;ct<Ae.FileIndex.length;++ct)if(Wt=Ae.FileIndex[ct],Wt.size>0&&Wt.size<4096)if(zi&&Buffer.isBuffer(Wt.content))Wt.content.copy(tt,tt.l,0,Wt.size),tt.l+=Wt.size+63&-64;else{for(wt=0;wt<Wt.size;++wt)tt.write_shift(1,Wt.content[wt]);for(;wt&63;++wt)tt.write_shift(1,0)}if(zi)tt.l=tt.length;else for(;tt.l<tt.length;)tt.write_shift(1,0);return tt}function l(Ae,Pe){var Ge=Ae.FullPaths.map(function(wt){return wt.toUpperCase()}),We=Ge.map(function(wt){var Bt=wt.split("/");return Bt[Bt.length-(wt.slice(-1)=="/"?2:1)]}),tt=!1;Pe.charCodeAt(0)===47?(tt=!0,Pe=Ge[0].slice(0,-1)+Pe):tt=Pe.indexOf("/")!==-1;var ct=Pe.toUpperCase(),St=tt===!0?Ge.indexOf(ct):We.indexOf(ct);if(St!==-1)return Ae.FileIndex[St];var Pt=!ct.match(r1);for(ct=ct.replace(xp,""),Pt&&(ct=ct.replace(r1,"!")),St=0;St<Ge.length;++St)if((Pt?Ge[St].replace(r1,"!"):Ge[St]).replace(xp,"")==ct||(Pt?We[St].replace(r1,"!"):We[St]).replace(xp,"")==ct)return Ae.FileIndex[St];return null}var m=64,M=-2,L="d0cf11e0a1b11ae1",D=[208,207,17,224,161,177,26,225],A="00000000000000000000000000000000",C={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:M,FREESECT:-1,HEADER_SIGNATURE:L,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:A,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function S(Ae,Pe,Ge){d();var We=c(Ae,Ge);e.writeFileSync(Pe,We)}function o(Ae){for(var Pe=new Array(Ae.length),Ge=0;Ge<Ae.length;++Ge)Pe[Ge]=String.fromCharCode(Ae[Ge]);return Pe.join("")}function R(Ae,Pe){var Ge=c(Ae,Pe);switch(Pe&&Pe.type||"buffer"){case"file":return d(),e.writeFileSync(Pe.filename,Ge),Ge;case"binary":return typeof Ge=="string"?Ge:o(Ge);case"base64":return Yp(typeof Ge=="string"?Ge:o(Ge));case"buffer":if(zi)return Buffer.isBuffer(Ge)?Ge:Qc(Ge);case"array":return typeof Ge=="string"?wf(Ge):Ge}return Ge}var T;function O(Ae){try{var Pe=Ae.InflateRaw,Ge=new Pe;if(Ge._processChunk(new Uint8Array([3,0]),Ge._finishFlushFlag),Ge.bytesRead)T=Ae;else throw new Error("zlib does not expose bytesRead")}catch(We){console.error("cannot use native zlib: "+(We.message||We))}}function N(Ae,Pe){if(!T)return ht(Ae,Pe);var Ge=T.InflateRaw,We=new Ge,tt=We._processChunk(Ae.slice(Ae.l),We._finishFlushFlag);return Ae.l+=We.bytesRead,tt}function H(Ae){return T?T.deflateRawSync(Ae):Be(Ae)}var k=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],V=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],G=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function U(Ae){var Pe=(Ae<<1|Ae<<11)&139536|(Ae<<5|Ae<<15)&558144;return(Pe>>16|Pe>>8|Pe)&255}for(var Y=typeof Uint8Array<"u",ee=Y?new Uint8Array(1<<8):[],re=0;re<1<<8;++re)ee[re]=U(re);function ie(Ae,Pe){var Ge=ee[Ae&255];return Pe<=8?Ge>>>8-Pe:(Ge=Ge<<8|ee[Ae>>8&255],Pe<=16?Ge>>>16-Pe:(Ge=Ge<<8|ee[Ae>>16&255],Ge>>>24-Pe))}function se(Ae,Pe){var Ge=Pe&7,We=Pe>>>3;return(Ae[We]|(Ge<=6?0:Ae[We+1]<<8))>>>Ge&3}function ce(Ae,Pe){var Ge=Pe&7,We=Pe>>>3;return(Ae[We]|(Ge<=5?0:Ae[We+1]<<8))>>>Ge&7}function q(Ae,Pe){var Ge=Pe&7,We=Pe>>>3;return(Ae[We]|(Ge<=4?0:Ae[We+1]<<8))>>>Ge&15}function j(Ae,Pe){var Ge=Pe&7,We=Pe>>>3;return(Ae[We]|(Ge<=3?0:Ae[We+1]<<8))>>>Ge&31}function Z(Ae,Pe){var Ge=Pe&7,We=Pe>>>3;return(Ae[We]|(Ge<=1?0:Ae[We+1]<<8))>>>Ge&127}function Q(Ae,Pe,Ge){var We=Pe&7,tt=Pe>>>3,ct=(1<<Ge)-1,St=Ae[tt]>>>We;return Ge<8-We||(St|=Ae[tt+1]<<8-We,Ge<16-We)||(St|=Ae[tt+2]<<16-We,Ge<24-We)||(St|=Ae[tt+3]<<24-We),St&ct}function ue(Ae,Pe,Ge){var We=Pe&7,tt=Pe>>>3;return We<=5?Ae[tt]|=(Ge&7)<<We:(Ae[tt]|=Ge<<We&255,Ae[tt+1]=(Ge&7)>>8-We),Pe+3}function fe(Ae,Pe,Ge){var We=Pe&7,tt=Pe>>>3;return Ge=(Ge&1)<<We,Ae[tt]|=Ge,Pe+1}function te(Ae,Pe,Ge){var We=Pe&7,tt=Pe>>>3;return Ge<<=We,Ae[tt]|=Ge&255,Ge>>>=8,Ae[tt+1]=Ge,Pe+8}function ne(Ae,Pe,Ge){var We=Pe&7,tt=Pe>>>3;return Ge<<=We,Ae[tt]|=Ge&255,Ge>>>=8,Ae[tt+1]=Ge&255,Ae[tt+2]=Ge>>>8,Pe+16}function ve(Ae,Pe){var Ge=Ae.length,We=2*Ge>Pe?2*Ge:Pe+5,tt=0;if(Ge>=Pe)return Ae;if(zi){var ct=gT(We);if(Ae.copy)Ae.copy(ct);else for(;tt<Ae.length;++tt)ct[tt]=Ae[tt];return ct}else if(Y){var St=new Uint8Array(We);if(St.set)St.set(Ae);else for(;tt<Ge;++tt)St[tt]=Ae[tt];return St}return Ae.length=We,Ae}function le(Ae){for(var Pe=new Array(Ae),Ge=0;Ge<Ae;++Ge)Pe[Ge]=0;return Pe}function xe(Ae,Pe,Ge){var We=1,tt=0,ct=0,St=0,Pt=0,wt=Ae.length,Bt=Y?new Uint16Array(32):le(32);for(ct=0;ct<32;++ct)Bt[ct]=0;for(ct=wt;ct<Ge;++ct)Ae[ct]=0;wt=Ae.length;var Wt=Y?new Uint16Array(wt):le(wt);for(ct=0;ct<wt;++ct)Bt[tt=Ae[ct]]++,We<tt&&(We=tt),Wt[ct]=0;for(Bt[0]=0,ct=1;ct<=We;++ct)Bt[ct+16]=Pt=Pt+Bt[ct-1]<<1;for(ct=0;ct<wt;++ct)Pt=Ae[ct],Pt!=0&&(Wt[ct]=Bt[Pt+16]++);var hr=0;for(ct=0;ct<wt;++ct)if(hr=Ae[ct],hr!=0)for(Pt=ie(Wt[ct],We)>>We-hr,St=(1<<We+4-hr)-1;St>=0;--St)Pe[Pt|St<<hr]=hr&15|ct<<4;return We}var Se=Y?new Uint16Array(512):le(512),Re=Y?new Uint16Array(32):le(32);if(!Y){for(var Ee=0;Ee<512;++Ee)Se[Ee]=0;for(Ee=0;Ee<32;++Ee)Re[Ee]=0}(function(){for(var Ae=[],Pe=0;Pe<32;Pe++)Ae.push(5);xe(Ae,Re,32);var Ge=[];for(Pe=0;Pe<=143;Pe++)Ge.push(8);for(;Pe<=255;Pe++)Ge.push(9);for(;Pe<=279;Pe++)Ge.push(7);for(;Pe<=287;Pe++)Ge.push(8);xe(Ge,Se,288)})();var Oe=function(){for(var Pe=Y?new Uint8Array(32768):[],Ge=0,We=0;Ge<G.length-1;++Ge)for(;We<G[Ge+1];++We)Pe[We]=Ge;for(;We<32768;++We)Pe[We]=29;var tt=Y?new Uint8Array(259):[];for(Ge=0,We=0;Ge<V.length-1;++Ge)for(;We<V[Ge+1];++We)tt[We]=Ge;function ct(Pt,wt){for(var Bt=0;Bt<Pt.length;){var Wt=Math.min(65535,Pt.length-Bt),hr=Bt+Wt==Pt.length;for(wt.write_shift(1,+hr),wt.write_shift(2,Wt),wt.write_shift(2,~Wt&65535);Wt-- >0;)wt[wt.l++]=Pt[Bt++]}return wt.l}function St(Pt,wt){for(var Bt=0,Wt=0,hr=Y?new Uint16Array(32768):[];Wt<Pt.length;){var gt=Math.min(65535,Pt.length-Wt);if(gt<10){for(Bt=ue(wt,Bt,+(Wt+gt==Pt.length)),Bt&7&&(Bt+=8-(Bt&7)),wt.l=Bt/8|0,wt.write_shift(2,gt),wt.write_shift(2,~gt&65535);gt-- >0;)wt[wt.l++]=Pt[Wt++];Bt=wt.l*8;continue}Bt=ue(wt,Bt,+(Wt+gt==Pt.length)+2);for(var jt=0;gt-- >0;){var Ut=Pt[Wt];jt=(jt<<5^Ut)&32767;var or=-1,ur=0;if((or=hr[jt])&&(or|=Wt&-32768,or>Wt&&(or-=32768),or<Wt))for(;Pt[or+ur]==Pt[Wt+ur]&&ur<250;)++ur;if(ur>2){Ut=tt[ur],Ut<=22?Bt=te(wt,Bt,ee[Ut+1]>>1)-1:(te(wt,Bt,3),Bt+=5,te(wt,Bt,ee[Ut-23]>>5),Bt+=3);var dt=Ut<8?0:Ut-4>>2;dt>0&&(ne(wt,Bt,ur-V[Ut]),Bt+=dt),Ut=Pe[Wt-or],Bt=te(wt,Bt,ee[Ut]>>3),Bt-=3;var ut=Ut<4?0:Ut-2>>1;ut>0&&(ne(wt,Bt,Wt-or-G[Ut]),Bt+=ut);for(var yt=0;yt<ur;++yt)hr[jt]=Wt&32767,jt=(jt<<5^Pt[Wt])&32767,++Wt;gt-=ur-1}else Ut<=143?Ut=Ut+48:Bt=fe(wt,Bt,1),Bt=te(wt,Bt,ee[Ut]),hr[jt]=Wt&32767,++Wt}Bt=te(wt,Bt,0)-1}return wt.l=(Bt+7)/8|0,wt.l}return function(wt,Bt){return wt.length<8?ct(wt,Bt):St(wt,Bt)}}();function Be(Ae){var Pe=Gn(50+Math.floor(Ae.length*1.1)),Ge=Oe(Ae,Pe);return Pe.slice(0,Ge)}var Le=Y?new Uint16Array(32768):le(32768),Te=Y?new Uint16Array(32768):le(32768),De=Y?new Uint16Array(128):le(128),Ve=1,Ye=1;function Ne(Ae,Pe){var Ge=j(Ae,Pe)+257;Pe+=5;var We=j(Ae,Pe)+1;Pe+=5;var tt=q(Ae,Pe)+4;Pe+=4;for(var ct=0,St=Y?new Uint8Array(19):le(19),Pt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],wt=1,Bt=Y?new Uint8Array(8):le(8),Wt=Y?new Uint8Array(8):le(8),hr=St.length,gt=0;gt<tt;++gt)St[k[gt]]=ct=ce(Ae,Pe),wt<ct&&(wt=ct),Bt[ct]++,Pe+=3;var jt=0;for(Bt[0]=0,gt=1;gt<=wt;++gt)Wt[gt]=jt=jt+Bt[gt-1]<<1;for(gt=0;gt<hr;++gt)(jt=St[gt])!=0&&(Pt[gt]=Wt[jt]++);var Ut=0;for(gt=0;gt<hr;++gt)if(Ut=St[gt],Ut!=0){jt=ee[Pt[gt]]>>8-Ut;for(var or=(1<<7-Ut)-1;or>=0;--or)De[jt|or<<Ut]=Ut&7|gt<<3}var ur=[];for(wt=1;ur.length<Ge+We;)switch(jt=De[Z(Ae,Pe)],Pe+=jt&7,jt>>>=3){case 16:for(ct=3+se(Ae,Pe),Pe+=2,jt=ur[ur.length-1];ct-- >0;)ur.push(jt);break;case 17:for(ct=3+ce(Ae,Pe),Pe+=3;ct-- >0;)ur.push(0);break;case 18:for(ct=11+Z(Ae,Pe),Pe+=7;ct-- >0;)ur.push(0);break;default:ur.push(jt),wt<jt&&(wt=jt);break}var dt=ur.slice(0,Ge),ut=ur.slice(Ge);for(gt=Ge;gt<286;++gt)dt[gt]=0;for(gt=We;gt<30;++gt)ut[gt]=0;return Ve=xe(dt,Le,286),Ye=xe(ut,Te,30),Pe}function Xe(Ae,Pe){if(Ae[0]==3&&!(Ae[1]&3))return[qv(Pe),2];for(var Ge=0,We=0,tt=gT(Pe||1<<18),ct=0,St=tt.length>>>0,Pt=0,wt=0;!(We&1);){if(We=ce(Ae,Ge),Ge+=3,We>>>1)We>>1==1?(Pt=9,wt=5):(Ge=Ne(Ae,Ge),Pt=Ve,wt=Ye);else{Ge&7&&(Ge+=8-(Ge&7));var Bt=Ae[Ge>>>3]|Ae[(Ge>>>3)+1]<<8;if(Ge+=32,Bt>0)for(!Pe&&St<ct+Bt&&(tt=ve(tt,ct+Bt),St=tt.length);Bt-- >0;)tt[ct++]=Ae[Ge>>>3],Ge+=8;continue}for(;;){!Pe&&St<ct+32767&&(tt=ve(tt,ct+32767),St=tt.length);var Wt=Q(Ae,Ge,Pt),hr=We>>>1==1?Se[Wt]:Le[Wt];if(Ge+=hr&15,hr>>>=4,!(hr>>>8&255))tt[ct++]=hr;else{if(hr==256)break;hr-=257;var gt=hr<8?0:hr-4>>2;gt>5&&(gt=0);var jt=ct+V[hr];gt>0&&(jt+=Q(Ae,Ge,gt),Ge+=gt),Wt=Q(Ae,Ge,wt),hr=We>>>1==1?Re[Wt]:Te[Wt],Ge+=hr&15,hr>>>=4;var Ut=hr<4?0:hr-2>>1,or=G[hr];for(Ut>0&&(or+=Q(Ae,Ge,Ut),Ge+=Ut),!Pe&&St<jt&&(tt=ve(tt,jt+100),St=tt.length);ct<jt;)tt[ct]=tt[ct-or],++ct}}}return Pe?[tt,Ge+7>>>3]:[tt.slice(0,ct),Ge+7>>>3]}function ht(Ae,Pe){var Ge=Ae.slice(Ae.l||0),We=Xe(Ge,Pe);return Ae.l+=We[1],We[0]}function st(Ae,Pe){if(Ae)typeof console<"u"&&console.error(Pe);else throw new Error(Pe)}function it(Ae,Pe){var Ge=Ae;ou(Ge,0);var We=[],tt=[],ct={FileIndex:We,FullPaths:tt};b(ct,{root:Pe.root});for(var St=Ge.length-4;(Ge[St]!=80||Ge[St+1]!=75||Ge[St+2]!=5||Ge[St+3]!=6)&&St>=0;)--St;Ge.l=St+4,Ge.l+=4;var Pt=Ge.read_shift(2);Ge.l+=6;var wt=Ge.read_shift(4);for(Ge.l=wt,St=0;St<Pt;++St){Ge.l+=20;var Bt=Ge.read_shift(4),Wt=Ge.read_shift(4),hr=Ge.read_shift(2),gt=Ge.read_shift(2),jt=Ge.read_shift(2);Ge.l+=8;var Ut=Ge.read_shift(4),or=B(Ge.slice(Ge.l+hr,Ge.l+hr+gt));Ge.l+=hr+gt+jt;var ur=Ge.l;Ge.l=Ut+4,nt(Ge,Bt,Wt,ct,or),Ge.l=ur}return ct}function nt(Ae,Pe,Ge,We,tt){Ae.l+=2;var ct=Ae.read_shift(2),St=Ae.read_shift(2),Pt=z(Ae);if(ct&8257)throw new Error("Unsupported ZIP encryption");for(var wt=Ae.read_shift(4),Bt=Ae.read_shift(4),Wt=Ae.read_shift(4),hr=Ae.read_shift(2),gt=Ae.read_shift(2),jt="",Ut=0;Ut<hr;++Ut)jt+=String.fromCharCode(Ae[Ae.l++]);if(gt){var or=B(Ae.slice(Ae.l,Ae.l+gt));(or[21589]||{}).mt&&(Pt=or[21589].mt),((tt||{})[21589]||{}).mt&&(Pt=tt[21589].mt)}Ae.l+=gt;var ur=Ae.slice(Ae.l,Ae.l+Bt);switch(St){case 8:ur=N(Ae,Wt);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+St)}var dt=!1;ct&8&&(wt=Ae.read_shift(4),wt==134695760&&(wt=Ae.read_shift(4),dt=!0),Bt=Ae.read_shift(4),Wt=Ae.read_shift(4)),Bt!=Pe&&st(dt,"Bad compressed size: "+Pe+" != "+Bt),Wt!=Ge&&st(dt,"Bad uncompressed size: "+Ge+" != "+Wt),Fe(We,jt,ur,{unsafe:!0,mt:Pt})}function pt(Ae,Pe){var Ge=Pe||{},We=[],tt=[],ct=Gn(1),St=Ge.compression?8:0,Pt=0,wt=0,Bt=0,Wt=0,hr=0,gt=Ae.FullPaths[0],jt=gt,Ut=Ae.FileIndex[0],or=[],ur=0;for(wt=1;wt<Ae.FullPaths.length;++wt)if(jt=Ae.FullPaths[wt].slice(gt.length),Ut=Ae.FileIndex[wt],!(!Ut.size||!Ut.content||jt=="Sh33tJ5")){var dt=Wt,ut=Gn(jt.length);for(Bt=0;Bt<jt.length;++Bt)ut.write_shift(1,jt.charCodeAt(Bt)&127);ut=ut.slice(0,ut.l),or[hr]=S9.buf(Ut.content,0);var yt=Ut.content;St==8&&(yt=H(yt)),ct=Gn(30),ct.write_shift(4,67324752),ct.write_shift(2,20),ct.write_shift(2,Pt),ct.write_shift(2,St),Ut.mt?de(ct,Ut.mt):ct.write_shift(4,0),ct.write_shift(-4,or[hr]),ct.write_shift(4,yt.length),ct.write_shift(4,Ut.content.length),ct.write_shift(2,ut.length),ct.write_shift(2,0),Wt+=ct.length,We.push(ct),Wt+=ut.length,We.push(ut),Wt+=yt.length,We.push(yt),ct=Gn(46),ct.write_shift(4,33639248),ct.write_shift(2,0),ct.write_shift(2,20),ct.write_shift(2,Pt),ct.write_shift(2,St),ct.write_shift(4,0),ct.write_shift(-4,or[hr]),ct.write_shift(4,yt.length),ct.write_shift(4,Ut.content.length),ct.write_shift(2,ut.length),ct.write_shift(2,0),ct.write_shift(2,0),ct.write_shift(2,0),ct.write_shift(2,0),ct.write_shift(4,0),ct.write_shift(4,dt),ur+=ct.l,tt.push(ct),ur+=ut.length,tt.push(ut),++hr}return ct=Gn(22),ct.write_shift(4,101010256),ct.write_shift(2,0),ct.write_shift(2,0),ct.write_shift(2,hr),ct.write_shift(2,hr),ct.write_shift(4,ur),ct.write_shift(4,Wt),ct.write_shift(2,0),Rs([Rs(We),Rs(tt),ct])}var Tt={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function Et(Ae,Pe){if(Ae.ctype)return Ae.ctype;var Ge=Ae.name||"",We=Ge.match(/\.([^\.]+)$/);return We&&Tt[We[1]]||Pe&&(We=(Ge=Pe).match(/[\.\\]([^\.\\])+$/),We&&Tt[We[1]])?Tt[We[1]]:"application/octet-stream"}function Dt(Ae){for(var Pe=Yp(Ae),Ge=[],We=0;We<Pe.length;We+=76)Ge.push(Pe.slice(We,We+76));return Ge.join(`\r
`)+`\r
`}function et(Ae){var Pe=Ae.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(Bt){var Wt=Bt.charCodeAt(0).toString(16).toUpperCase();return"="+(Wt.length==1?"0"+Wt:Wt)});Pe=Pe.replace(/ $/mg,"=20").replace(/\t$/mg,"=09"),Pe.charAt(0)==`
`&&(Pe="=0D"+Pe.slice(1)),Pe=Pe.replace(/\r(?!\n)/mg,"=0D").replace(/\n\n/mg,`
=0A`).replace(/([^\r\n])\n/mg,"$1=0A");for(var Ge=[],We=Pe.split(`\r
`),tt=0;tt<We.length;++tt){var ct=We[tt];if(ct.length==0){Ge.push("");continue}for(var St=0;St<ct.length;){var Pt=76,wt=ct.slice(St,St+Pt);wt.charAt(Pt-1)=="="?Pt--:wt.charAt(Pt-2)=="="?Pt-=2:wt.charAt(Pt-3)=="="&&(Pt-=3),wt=ct.slice(St,St+Pt),St+=Pt,St<ct.length&&(wt+="="),Ge.push(wt)}}return Ge.join(`\r
`)}function Ue(Ae){for(var Pe=[],Ge=0;Ge<Ae.length;++Ge){for(var We=Ae[Ge];Ge<=Ae.length&&We.charAt(We.length-1)=="=";)We=We.slice(0,We.length-1)+Ae[++Ge];Pe.push(We)}for(var tt=0;tt<Pe.length;++tt)Pe[tt]=Pe[tt].replace(/[=][0-9A-Fa-f]{2}/g,function(ct){return String.fromCharCode(parseInt(ct.slice(1),16))});return wf(Pe.join(`\r
`))}function ze(Ae,Pe,Ge){for(var We="",tt="",ct="",St,Pt=0;Pt<10;++Pt){var wt=Pe[Pt];if(!wt||wt.match(/^\s*$/))break;var Bt=wt.match(/^(.*?):\s*([^\s].*)$/);if(Bt)switch(Bt[1].toLowerCase()){case"content-location":We=Bt[2].trim();break;case"content-type":ct=Bt[2].trim();break;case"content-transfer-encoding":tt=Bt[2].trim();break}}switch(++Pt,tt.toLowerCase()){case"base64":St=wf(Kc(Pe.slice(Pt).join("")));break;case"quoted-printable":St=Ue(Pe.slice(Pt));break;default:throw new Error("Unsupported Content-Transfer-Encoding "+tt)}var Wt=Fe(Ae,We.slice(Ge.length),St,{unsafe:!0});ct&&(Wt.ctype=ct)}function rt(Ae,Pe){if(o(Ae.slice(0,13)).toLowerCase()!="mime-version:")throw new Error("Unsupported MAD header");var Ge=Pe&&Pe.root||"",We=(zi&&Buffer.isBuffer(Ae)?Ae.toString("binary"):o(Ae)).split(`\r
`),tt=0,ct="";for(tt=0;tt<We.length;++tt)if(ct=We[tt],!!/^Content-Location:/i.test(ct)&&(ct=ct.slice(ct.indexOf("file")),Ge||(Ge=ct.slice(0,ct.lastIndexOf("/")+1)),ct.slice(0,Ge.length)!=Ge))for(;Ge.length>0&&(Ge=Ge.slice(0,Ge.length-1),Ge=Ge.slice(0,Ge.lastIndexOf("/")+1),ct.slice(0,Ge.length)!=Ge););var St=(We[1]||"").match(/boundary="(.*?)"/);if(!St)throw new Error("MAD cannot find boundary");var Pt="--"+(St[1]||""),wt=[],Bt=[],Wt={FileIndex:wt,FullPaths:Bt};b(Wt);var hr,gt=0;for(tt=0;tt<We.length;++tt){var jt=We[tt];jt!==Pt&&jt!==Pt+"--"||(gt++&&ze(Wt,We.slice(hr,tt),Ge),hr=tt)}return Wt}function lt(Ae,Pe){var Ge=Pe||{},We=Ge.boundary||"SheetJS";We="------="+We;for(var tt=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+We.slice(2)+'"',"","",""],ct=Ae.FullPaths[0],St=ct,Pt=Ae.FileIndex[0],wt=1;wt<Ae.FullPaths.length;++wt)if(St=Ae.FullPaths[wt].slice(ct.length),Pt=Ae.FileIndex[wt],!(!Pt.size||!Pt.content||St=="Sh33tJ5")){St=St.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g,function(ur){return"_x"+ur.charCodeAt(0).toString(16)+"_"}).replace(/[\u0080-\uFFFF]/g,function(ur){return"_u"+ur.charCodeAt(0).toString(16)+"_"});for(var Bt=Pt.content,Wt=zi&&Buffer.isBuffer(Bt)?Bt.toString("binary"):o(Bt),hr=0,gt=Math.min(1024,Wt.length),jt=0,Ut=0;Ut<=gt;++Ut)(jt=Wt.charCodeAt(Ut))>=32&&jt<128&&++hr;var or=hr>=gt*4/5;tt.push(We),tt.push("Content-Location: "+(Ge.root||"file:///C:/SheetJS/")+St),tt.push("Content-Transfer-Encoding: "+(or?"quoted-printable":"base64")),tt.push("Content-Type: "+Et(Pt,St)),tt.push(""),tt.push(or?et(Wt):Dt(Wt))}return tt.push(We+`--\r
`),tt.join(`\r
`)}function Qe(Ae){var Pe={};return b(Pe,Ae),Pe}function Fe(Ae,Pe,Ge,We){var tt=We&&We.unsafe;tt||b(Ae);var ct=!tt&&Ki.find(Ae,Pe);if(!ct){var St=Ae.FullPaths[0];Pe.slice(0,St.length)==St?St=Pe:(St.slice(-1)!="/"&&(St+="/"),St=(St+Pe).replace("//","/")),ct={name:K(Pe),type:2},Ae.FileIndex.push(ct),Ae.FullPaths.push(St),tt||Ki.utils.cfb_gc(Ae)}return ct.content=Ge,ct.size=Ge?Ge.length:0,We&&(We.CLSID&&(ct.clsid=We.CLSID),We.mt&&(ct.mt=We.mt),We.ct&&(ct.ct=We.ct)),ct}function Ce(Ae,Pe){b(Ae);var Ge=Ki.find(Ae,Pe);if(Ge){for(var We=0;We<Ae.FileIndex.length;++We)if(Ae.FileIndex[We]==Ge)return Ae.FileIndex.splice(We,1),Ae.FullPaths.splice(We,1),!0}return!1}function pe(Ae,Pe,Ge){b(Ae);var We=Ki.find(Ae,Pe);if(We){for(var tt=0;tt<Ae.FileIndex.length;++tt)if(Ae.FileIndex[tt]==We)return Ae.FileIndex[tt].name=K(Ge),Ae.FullPaths[tt]=Ge,!0}return!1}function we(Ae){E(Ae,!0)}return s.find=l,s.read=h,s.parse=P,s.write=R,s.writeFile=S,s.utils={cfb_new:Qe,cfb_add:Fe,cfb_del:Ce,cfb_mov:pe,cfb_gc:we,ReadShift:wp,CheckField:hS,prep_blob:ou,bconcat:Rs,use_zlib:O,_deflateRaw:Be,_inflateRaw:ht,consts:C},s}();function E9(t){return typeof t=="string"?My(t):Array.isArray(t)?$L(t):t}function rg(t,s,w){if(typeof Deno<"u"){if(w&&typeof s=="string")switch(w){case"utf8":s=new TextEncoder(w).encode(s);break;case"binary":s=My(s);break;default:throw new Error("Unsupported encoding "+w)}return Deno.writeFileSync(t,s)}var W=w=="utf8"?Uc(s):s;if(typeof IE_SaveFile<"u")return IE_SaveFile(W,t);if(typeof Blob<"u"){var K=new Blob([E9(W)],{type:"application/octet-stream"});if(typeof navigator<"u"&&navigator.msSaveBlob)return navigator.msSaveBlob(K,t);if(typeof saveAs<"u")return saveAs(K,t);if(typeof URL<"u"&&typeof document<"u"&&document.createElement&&URL.createObjectURL){var de=URL.createObjectURL(K);if(typeof chrome=="object"&&typeof(chrome.downloads||{}).download=="function")return URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(de)},6e4),chrome.downloads.download({url:de,filename:t,saveAs:!0});var z=document.createElement("a");if(z.download!=null)return z.download=t,z.href=de,document.body.appendChild(z),z.click(),document.body.removeChild(z),URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(de)},6e4),de}}if(typeof $<"u"&&typeof File<"u"&&typeof Folder<"u")try{var B=File(t);return B.open("w"),B.encoding="binary",Array.isArray(s)&&(s=tg(s)),B.write(s),B.close(),s}catch(e){if(!e.message||!e.message.match(/onstruct/))throw e}throw new Error("cannot save file "+t)}function Os(t){for(var s=Object.keys(t),w=[],W=0;W<s.length;++W)Object.prototype.hasOwnProperty.call(t,s[W])&&w.push(s[W]);return w}function ST(t,s){for(var w=[],W=Os(t),K=0;K!==W.length;++K)w[t[W[K]][s]]==null&&(w[t[W[K]][s]]=W[K]);return w}function b3(t){for(var s=[],w=Os(t),W=0;W!==w.length;++W)s[t[w[W]]]=w[W];return s}function Py(t){for(var s=[],w=Os(t),W=0;W!==w.length;++W)s[t[w[W]]]=parseInt(w[W],10);return s}function M9(t){for(var s=[],w=Os(t),W=0;W!==w.length;++W)s[t[w[W]]]==null&&(s[t[w[W]]]=[]),s[t[w[W]]].push(w[W]);return s}var q1=new Date(1899,11,30,0,0,0);function Vl(t,s){var w=t.getTime();s&&(w-=1462*24*60*60*1e3);var W=q1.getTime()+(t.getTimezoneOffset()-q1.getTimezoneOffset())*6e4;return(w-W)/(24*60*60*1e3)}var K5=new Date,C9=q1.getTime()+(K5.getTimezoneOffset()-q1.getTimezoneOffset())*6e4,ET=K5.getTimezoneOffset();function J5(t){var s=new Date;return s.setTime(t*24*60*60*1e3+C9),s.getTimezoneOffset()!==ET&&s.setTime(s.getTime()+(s.getTimezoneOffset()-ET)*6e4),s}var MT=new Date("2017-02-19T19:06:09.000Z"),$5=isNaN(MT.getFullYear())?new Date("2/19/17"):MT,L9=$5.getFullYear()==2017;function bl(t,s){var w=new Date(t);if(L9)return s>0?w.setTime(w.getTime()+w.getTimezoneOffset()*60*1e3):s<0&&w.setTime(w.getTime()-w.getTimezoneOffset()*60*1e3),w;if(t instanceof Date)return t;if($5.getFullYear()==1917&&!isNaN(w.getFullYear())){var W=w.getFullYear();return t.indexOf(""+W)>-1||w.setFullYear(w.getFullYear()+100),w}var K=t.match(/\d+/g)||["2017","2","19","0","0","0"],de=new Date(+K[0],+K[1]-1,+K[2],+K[3]||0,+K[4]||0,+K[5]||0);return t.indexOf("Z")>-1&&(de=new Date(de.getTime()-de.getTimezoneOffset()*60*1e3)),de}function _y(t,s){if(zi&&Buffer.isBuffer(t)){if(s){if(t[0]==255&&t[1]==254)return Uc(t.slice(2).toString("utf16le"));if(t[1]==254&&t[2]==255)return Uc(JL(t.slice(2).toString("binary")))}return t.toString("binary")}if(typeof TextDecoder<"u")try{if(s){if(t[0]==255&&t[1]==254)return Uc(new TextDecoder("utf-16le").decode(t.slice(2)));if(t[0]==254&&t[1]==255)return Uc(new TextDecoder("utf-16be").decode(t.slice(2)))}var w={"€":"€","‚":"‚",ƒ:"ƒ","„":"„","…":"…","†":"†","‡":"‡","ˆ":"ˆ","‰":"‰",Š:"Š","‹":"‹",Œ:"Œ",Ž:"Ž","‘":"‘","’":"’","“":"“","”":"”","•":"•","–":"–","—":"—","˜":"˜","™":"™",š:"š","›":"›",œ:"œ",ž:"ž",Ÿ:"Ÿ"};return Array.isArray(t)&&(t=new Uint8Array(t)),new TextDecoder("latin1").decode(t).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g,function(de){return w[de]||de})}catch{}for(var W=[],K=0;K!=t.length;++K)W.push(String.fromCharCode(t[K]));return W.join("")}function Gl(t){if(typeof JSON<"u"&&!Array.isArray(t))return JSON.parse(JSON.stringify(t));if(typeof t!="object"||t==null)return t;if(t instanceof Date)return new Date(t.getTime());var s={};for(var w in t)Object.prototype.hasOwnProperty.call(t,w)&&(s[w]=Gl(t[w]));return s}function Do(t,s){for(var w="";w.length<s;)w+=t;return w}function Gc(t){var s=Number(t);if(!isNaN(s))return isFinite(s)?s:NaN;if(!/\d/.test(t))return s;var w=1,W=t.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g,function(){return w*=100,""});return!isNaN(s=Number(W))||(W=W.replace(/[(](.*)[)]/,function(K,de){return w=-w,de}),!isNaN(s=Number(W)))?s/w:s}var P9=["january","february","march","april","may","june","july","august","september","october","november","december"];function Xp(t){var s=new Date(t),w=new Date(NaN),W=s.getYear(),K=s.getMonth(),de=s.getDate();if(isNaN(de))return w;var z=t.toLowerCase();if(z.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)){if(z=z.replace(/[^a-z]/g,"").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/,""),z.length>3&&P9.indexOf(z)==-1)return w}else if(z.match(/[a-z]/))return w;return W<0||W>8099?w:(K>0||de>1)&&W!=101?s:t.match(/[^-0-9:,\/\\]/)?w:s}function di(t,s,w){if(t.FullPaths){if(typeof w=="string"){var W;return zi?W=Qc(w):W=QL(w),Ki.utils.cfb_add(t,s,W)}Ki.utils.cfb_add(t,s,w)}else t.file(s,w)}function w3(){return Ki.utils.cfb_new()}var $o=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
`,_9={"&quot;":'"',"&apos;":"'","&gt;":">","&lt;":"<","&amp;":"&"},T3=b3(_9),A3=/[&<>'"]/g,R9=/[\u0000-\u0008\u000b-\u001f]/g;function Wi(t){var s=t+"";return s.replace(A3,function(w){return T3[w]}).replace(R9,function(w){return"_x"+("000"+w.charCodeAt(0).toString(16)).slice(-4)+"_"})}function CT(t){return Wi(t).replace(/ /g,"_x0020_")}var Q5=/[\u0000-\u001f]/g;function D9(t){var s=t+"";return s.replace(A3,function(w){return T3[w]}).replace(/\n/g,"<br/>").replace(Q5,function(w){return"&#x"+("000"+w.charCodeAt(0).toString(16)).slice(-4)+";"})}function I9(t){var s=t+"";return s.replace(A3,function(w){return T3[w]}).replace(Q5,function(w){return"&#x"+w.charCodeAt(0).toString(16).toUpperCase()+";"})}function F9(t){return t.replace(/(\r\n|[\r\n])/g,"&#10;")}function k9(t){switch(t){case 1:case!0:case"1":case"true":case"TRUE":return!0;default:return!1}}function jm(t){for(var s="",w=0,W=0,K=0,de=0,z=0,B=0;w<t.length;){if(W=t.charCodeAt(w++),W<128){s+=String.fromCharCode(W);continue}if(K=t.charCodeAt(w++),W>191&&W<224){z=(W&31)<<6,z|=K&63,s+=String.fromCharCode(z);continue}if(de=t.charCodeAt(w++),W<240){s+=String.fromCharCode((W&15)<<12|(K&63)<<6|de&63);continue}z=t.charCodeAt(w++),B=((W&7)<<18|(K&63)<<12|(de&63)<<6|z&63)-65536,s+=String.fromCharCode(55296+(B>>>10&1023)),s+=String.fromCharCode(56320+(B&1023))}return s}function LT(t){var s=qv(2*t.length),w,W,K=1,de=0,z=0,B;for(W=0;W<t.length;W+=K)K=1,(B=t.charCodeAt(W))<128?w=B:B<224?(w=(B&31)*64+(t.charCodeAt(W+1)&63),K=2):B<240?(w=(B&15)*4096+(t.charCodeAt(W+1)&63)*64+(t.charCodeAt(W+2)&63),K=3):(K=4,w=(B&7)*262144+(t.charCodeAt(W+1)&63)*4096+(t.charCodeAt(W+2)&63)*64+(t.charCodeAt(W+3)&63),w-=65536,z=55296+(w>>>10&1023),w=56320+(w&1023)),z!==0&&(s[de++]=z&255,s[de++]=z>>>8,z=0),s[de++]=w%256,s[de++]=w>>>8;return s.slice(0,de).toString("ucs2")}function PT(t){return Qc(t,"binary").toString("utf8")}var a1="foo bar baz☃🍣",bp=zi&&(PT(a1)==jm(a1)&&PT||LT(a1)==jm(a1)&&LT)||jm,Uc=zi?function(t){return Qc(t,"utf8").toString("binary")}:function(t){for(var s=[],w=0,W=0,K=0;w<t.length;)switch(W=t.charCodeAt(w++),!0){case W<128:s.push(String.fromCharCode(W));break;case W<2048:s.push(String.fromCharCode(192+(W>>6))),s.push(String.fromCharCode(128+(W&63)));break;case(W>=55296&&W<57344):W-=55296,K=t.charCodeAt(w++)-56320+(W<<10),s.push(String.fromCharCode(240+(K>>18&7))),s.push(String.fromCharCode(144+(K>>12&63))),s.push(String.fromCharCode(128+(K>>6&63))),s.push(String.fromCharCode(128+(K&63)));break;default:s.push(String.fromCharCode(224+(W>>12))),s.push(String.fromCharCode(128+(W>>6&63))),s.push(String.fromCharCode(128+(W&63)))}return s.join("")},O9=function(){var t=[["nbsp"," "],["middot","·"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map(function(s){return[new RegExp("&"+s[0]+";","ig"),s[1]]});return function(w){for(var W=w.replace(/^[\t\n\r ]+/,"").replace(/[\t\n\r ]+$/,"").replace(/>\s+/g,">").replace(/\s+</g,"<").replace(/[\t\n\r ]+/g," ").replace(/<\s*[bB][rR]\s*\/?>/g,`
`).replace(/<[^>]*>/g,""),K=0;K<t.length;++K)W=W.replace(t[K][0],t[K][1]);return W}}(),q5=/(^\s|\s$|\n)/;function Ds(t,s){return"<"+t+(s.match(q5)?' xml:space="preserve"':"")+">"+s+"</"+t+">"}function Zp(t){return Os(t).map(function(s){return" "+s+'="'+t[s]+'"'}).join("")}function Sa(t,s,w){return"<"+t+(w!=null?Zp(w):"")+(s!=null?(s.match(q5)?' xml:space="preserve"':"")+">"+s+"</"+t:"/")+">"}function u2(t,s){try{return t.toISOString().replace(/\.\d*/,"")}catch(w){if(s)throw w}return""}function z9(t,s){switch(typeof t){case"string":var w=Sa("vt:lpwstr",Wi(t));return s&&(w=w.replace(/&quot;/g,"_x0022_")),w;case"number":return Sa((t|0)==t?"vt:i4":"vt:r8",Wi(String(t)));case"boolean":return Sa("vt:bool",t?"true":"false")}if(t instanceof Date)return Sa("vt:filetime",u2(t));throw new Error("Unable to serialize "+t)}var ps={CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",CT:"http://schemas.openxmlformats.org/package/2006/content-types",RELS:"http://schemas.openxmlformats.org/package/2006/relationships",TCMNT:"http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",mx:"http://schemas.microsoft.com/office/mac/excel/2008/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",sjs:"http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsd:"http://www.w3.org/2001/XMLSchema"},T0=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"],su={o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel",ss:"urn:schemas-microsoft-com:office:spreadsheet",dt:"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882",mv:"http://macVmlSchemaUri",v:"urn:schemas-microsoft-com:vml",html:"http://www.w3.org/TR/REC-html40"};function N9(t,s){for(var w=1-2*(t[s+7]>>>7),W=((t[s+7]&127)<<4)+(t[s+6]>>>4&15),K=t[s+6]&15,de=5;de>=0;--de)K=K*256+t[s+de];return W==2047?K==0?w*(1/0):NaN:(W==0?W=-1022:(W-=1023,K+=Math.pow(2,52)),w*Math.pow(2,W-52)*K)}function B9(t,s,w){var W=(s<0||1/s==-1/0?1:0)<<7,K=0,de=0,z=W?-s:s;isFinite(z)?z==0?K=de=0:(K=Math.floor(Math.log(z)/Math.LN2),de=z*Math.pow(2,52-K),K<=-1023&&(!isFinite(de)||de<Math.pow(2,52))?K=-1022:(de-=Math.pow(2,52),K+=1023)):(K=2047,de=isNaN(s)?26985:0);for(var B=0;B<=5;++B,de/=256)t[w+B]=de&255;t[w+6]=(K&15)<<4|de&15,t[w+7]=K>>4|W}var _T=function(t){for(var s=[],w=10240,W=0;W<t[0].length;++W)if(t[0][W])for(var K=0,de=t[0][W].length;K<de;K+=w)s.push.apply(s,t[0][W].slice(K,K+w));return s},RT=zi?function(t){return t[0].length>0&&Buffer.isBuffer(t[0][0])?Buffer.concat(t[0].map(function(s){return Buffer.isBuffer(s)?s:Qc(s)})):_T(t)}:_T,DT=function(t,s,w){for(var W=[],K=s;K<w;K+=2)W.push(String.fromCharCode(up(t,K)));return W.join("").replace(xp,"")},S3=zi?function(t,s,w){return Buffer.isBuffer(t)?t.toString("utf16le",s,w).replace(xp,""):DT(t,s,w)}:DT,IT=function(t,s,w){for(var W=[],K=s;K<s+w;++K)W.push(("0"+t[K].toString(16)).slice(-2));return W.join("")},eS=zi?function(t,s,w){return Buffer.isBuffer(t)?t.toString("hex",s,s+w):IT(t,s,w)}:IT,FT=function(t,s,w){for(var W=[],K=s;K<w;K++)W.push(String.fromCharCode(Hd(t,K)));return W.join("")},ng=zi?function(s,w,W){return Buffer.isBuffer(s)?s.toString("utf8",w,W):FT(s,w,W)}:FT,tS=function(t,s){var w=lu(t,s);return w>0?ng(t,s+4,s+4+w-1):""},rS=tS,nS=function(t,s){var w=lu(t,s);return w>0?ng(t,s+4,s+4+w-1):""},aS=nS,iS=function(t,s){var w=2*lu(t,s);return w>0?ng(t,s+4,s+4+w-1):""},oS=iS,sS=function(s,w){var W=lu(s,w);return W>0?S3(s,w+4,w+4+W):""},lS=sS,uS=function(t,s){var w=lu(t,s);return w>0?ng(t,s+4,s+4+w):""},fS=uS,cS=function(t,s){return N9(t,s)},ey=cS,E3=function(s){return Array.isArray(s)||typeof Uint8Array<"u"&&s instanceof Uint8Array};zi&&(rS=function(s,w){if(!Buffer.isBuffer(s))return tS(s,w);var W=s.readUInt32LE(w);return W>0?s.toString("utf8",w+4,w+4+W-1):""},aS=function(s,w){if(!Buffer.isBuffer(s))return nS(s,w);var W=s.readUInt32LE(w);return W>0?s.toString("utf8",w+4,w+4+W-1):""},oS=function(s,w){if(!Buffer.isBuffer(s))return iS(s,w);var W=2*s.readUInt32LE(w);return s.toString("utf16le",w+4,w+4+W-1)},lS=function(s,w){if(!Buffer.isBuffer(s))return sS(s,w);var W=s.readUInt32LE(w);return s.toString("utf16le",w+4,w+4+W)},fS=function(s,w){if(!Buffer.isBuffer(s))return uS(s,w);var W=s.readUInt32LE(w);return s.toString("utf8",w+4,w+4+W)},ey=function(s,w){return Buffer.isBuffer(s)?s.readDoubleLE(w):cS(s,w)},E3=function(s){return Buffer.isBuffer(s)||Array.isArray(s)||typeof Uint8Array<"u"&&s instanceof Uint8Array});var Hd=function(t,s){return t[s]},up=function(t,s){return t[s+1]*(1<<8)+t[s]},U9=function(t,s){var w=t[s+1]*256+t[s];return w<32768?w:(65535-w+1)*-1},lu=function(t,s){return t[s+3]*(1<<24)+(t[s+2]<<16)+(t[s+1]<<8)+t[s]},Bv=function(t,s){return t[s+3]<<24|t[s+2]<<16|t[s+1]<<8|t[s]},H9=function(t,s){return t[s]<<24|t[s+1]<<16|t[s+2]<<8|t[s+3]};function wp(t,s){var w="",W,K,de=[],z,B,e,d;switch(s){case"dbcs":if(d=this.l,zi&&Buffer.isBuffer(this))w=this.slice(this.l,this.l+2*t).toString("utf16le");else for(e=0;e<t;++e)w+=String.fromCharCode(up(this,d)),d+=2;t*=2;break;case"utf8":w=ng(this,this.l,this.l+t);break;case"utf16le":t*=2,w=S3(this,this.l,this.l+t);break;case"wstr":return wp.call(this,t,"dbcs");case"lpstr-ansi":w=rS(this,this.l),t=4+lu(this,this.l);break;case"lpstr-cp":w=aS(this,this.l),t=4+lu(this,this.l);break;case"lpwstr":w=oS(this,this.l),t=4+2*lu(this,this.l);break;case"lpp4":t=4+lu(this,this.l),w=lS(this,this.l),t&2&&(t+=2);break;case"8lpp4":t=4+lu(this,this.l),w=fS(this,this.l),t&3&&(t+=4-(t&3));break;case"cstr":for(t=0,w="";(z=Hd(this,this.l+t++))!==0;)de.push(t1(z));w=de.join("");break;case"_wstr":for(t=0,w="";(z=up(this,this.l+t))!==0;)de.push(t1(z)),t+=2;t+=2,w=de.join("");break;case"dbcs-cont":for(w="",d=this.l,e=0;e<t;++e){if(this.lens&&this.lens.indexOf(d)!==-1)return z=Hd(this,d),this.l=d+1,B=wp.call(this,t-e,z?"dbcs-cont":"sbcs-cont"),de.join("")+B;de.push(t1(up(this,d))),d+=2}w=de.join(""),t*=2;break;case"cpstr":case"sbcs-cont":for(w="",d=this.l,e=0;e!=t;++e){if(this.lens&&this.lens.indexOf(d)!==-1)return z=Hd(this,d),this.l=d+1,B=wp.call(this,t-e,z?"dbcs-cont":"sbcs-cont"),de.join("")+B;de.push(t1(Hd(this,d))),d+=1}w=de.join("");break;default:switch(t){case 1:return W=Hd(this,this.l),this.l++,W;case 2:return W=(s==="i"?U9:up)(this,this.l),this.l+=2,W;case 4:case-4:return s==="i"||!(this[this.l+3]&128)?(W=(t>0?Bv:H9)(this,this.l),this.l+=4,W):(K=lu(this,this.l),this.l+=4,K);case 8:case-8:if(s==="f")return t==8?K=ey(this,this.l):K=ey([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0),this.l+=8,K;t=8;case 16:w=eS(this,this.l,t);break}}return this.l+=t,w}var V9=function(t,s,w){t[w]=s&255,t[w+1]=s>>>8&255,t[w+2]=s>>>16&255,t[w+3]=s>>>24&255},G9=function(t,s,w){t[w]=s&255,t[w+1]=s>>8&255,t[w+2]=s>>16&255,t[w+3]=s>>24&255},W9=function(t,s,w){t[w]=s&255,t[w+1]=s>>>8&255};function Y9(t,s,w){var W=0,K=0;if(w==="dbcs"){for(K=0;K!=s.length;++K)W9(this,s.charCodeAt(K),this.l+2*K);W=2*s.length}else if(w==="sbcs"){for(s=s.replace(/[^\x00-\x7F]/g,"_"),K=0;K!=s.length;++K)this[this.l+K]=s.charCodeAt(K)&255;W=s.length}else if(w==="hex"){for(;K<t;++K)this[this.l++]=parseInt(s.slice(2*K,2*K+2),16)||0;return this}else if(w==="utf16le"){var de=Math.min(this.l+t,this.length);for(K=0;K<Math.min(s.length,t);++K){var z=s.charCodeAt(K);this[this.l++]=z&255,this[this.l++]=z>>8}for(;this.l<de;)this[this.l++]=0;return this}else switch(t){case 1:W=1,this[this.l]=s&255;break;case 2:W=2,this[this.l]=s&255,s>>>=8,this[this.l+1]=s&255;break;case 3:W=3,this[this.l]=s&255,s>>>=8,this[this.l+1]=s&255,s>>>=8,this[this.l+2]=s&255;break;case 4:W=4,V9(this,s,this.l);break;case 8:if(W=8,w==="f"){B9(this,s,this.l);break}case 16:break;case-4:W=4,G9(this,s,this.l);break}return this.l+=W,this}function hS(t,s){var w=eS(this,this.l,t.length>>1);if(w!==t)throw new Error(s+"Expected "+t+" saw "+w);this.l+=t.length>>1}function ou(t,s){t.l=s,t.read_shift=wp,t.chk=hS,t.write_shift=Y9}function ac(t,s){t.l+=s}function Gn(t){var s=qv(t);return ou(s,0),s}function Hl(){var t=[],s=zi?256:2048,w=function(d){var P=Gn(d);return ou(P,0),P},W=w(s),K=function(){W&&(W.length>W.l&&(W=W.slice(0,W.l),W.l=W.length),W.length>0&&t.push(W),W=null)},de=function(d){return W&&d<W.length-W.l?W:(K(),W=w(Math.max(d+1,s)))},z=function(){return K(),Rs(t)},B=function(d){K(),W=d,W.l==null&&(W.l=W.length),de(s)};return{next:de,push:B,end:z,_bufs:t}}function ea(t,s,w,W){var K=+s,de;if(!isNaN(K)){W||(W=NF[K].p||(w||[]).length||0),de=1+(K>=128?1:0)+1,W>=128&&++de,W>=16384&&++de,W>=2097152&&++de;var z=t.next(de);K<=127?z.write_shift(1,K):(z.write_shift(1,(K&127)+128),z.write_shift(1,K>>7));for(var B=0;B!=4;++B)if(W>=128)z.write_shift(1,(W&127)+128),W>>=7;else{z.write_shift(1,W);break}W>0&&E3(w)&&t.push(w)}}function Tp(t,s,w){var W=Gl(t);if(s.s?(W.cRel&&(W.c+=s.s.c),W.rRel&&(W.r+=s.s.r)):(W.cRel&&(W.c+=s.c),W.rRel&&(W.r+=s.r)),!w||w.biff<12){for(;W.c>=256;)W.c-=256;for(;W.r>=65536;)W.r-=65536}return W}function kT(t,s,w){var W=Gl(t);return W.s=Tp(W.s,s.s,w),W.e=Tp(W.e,s.s,w),W}function Ap(t,s){if(t.cRel&&t.c<0)for(t=Gl(t);t.c<0;)t.c+=s>8?16384:256;if(t.rRel&&t.r<0)for(t=Gl(t);t.r<0;)t.r+=s>8?1048576:s>5?65536:16384;var w=Xi(t);return!t.cRel&&t.cRel!=null&&(w=j9(w)),!t.rRel&&t.rRel!=null&&(w=X9(w)),w}function Km(t,s){return t.s.r==0&&!t.s.rRel&&t.e.r==(s.biff>=12?1048575:s.biff>=8?65536:16384)&&!t.e.rRel?(t.s.cRel?"":"$")+qs(t.s.c)+":"+(t.e.cRel?"":"$")+qs(t.e.c):t.s.c==0&&!t.s.cRel&&t.e.c==(s.biff>=12?16383:255)&&!t.e.cRel?(t.s.rRel?"":"$")+Fs(t.s.r)+":"+(t.e.rRel?"":"$")+Fs(t.e.r):Ap(t.s,s.biff)+":"+Ap(t.e,s.biff)}function M3(t){return parseInt(Z9(t),10)-1}function Fs(t){return""+(t+1)}function X9(t){return t.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}function Z9(t){return t.replace(/\$(\d+)$/,"$1")}function C3(t){for(var s=K9(t),w=0,W=0;W!==s.length;++W)w=26*w+s.charCodeAt(W)-64;return w-1}function qs(t){if(t<0)throw new Error("invalid column "+t);var s="";for(++t;t;t=Math.floor((t-1)/26))s=String.fromCharCode((t-1)%26+65)+s;return s}function j9(t){return t.replace(/^([A-Z])/,"$$$1")}function K9(t){return t.replace(/^\$([A-Z])/,"$1")}function J9(t){return t.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(",")}function gs(t){for(var s=0,w=0,W=0;W<t.length;++W){var K=t.charCodeAt(W);K>=48&&K<=57?s=10*s+(K-48):K>=65&&K<=90&&(w=26*w+(K-64))}return{c:w-1,r:s-1}}function Xi(t){for(var s=t.c+1,w="";s;s=(s-1)/26|0)w=String.fromCharCode((s-1)%26+65)+w;return w+(t.r+1)}function hu(t){var s=t.indexOf(":");return s==-1?{s:gs(t),e:gs(t)}:{s:gs(t.slice(0,s)),e:gs(t.slice(s+1))}}function Jo(t,s){return typeof s>"u"||typeof s=="number"?Jo(t.s,t.e):(typeof t!="string"&&(t=Xi(t)),typeof s!="string"&&(s=Xi(s)),t==s?t:t+":"+s)}function lo(t){var s={s:{c:0,r:0},e:{c:0,r:0}},w=0,W=0,K=0,de=t.length;for(w=0;W<de&&!((K=t.charCodeAt(W)-64)<1||K>26);++W)w=26*w+K;for(s.s.c=--w,w=0;W<de&&!((K=t.charCodeAt(W)-48)<0||K>9);++W)w=10*w+K;if(s.s.r=--w,W===de||K!=10)return s.e.c=s.s.c,s.e.r=s.s.r,s;for(++W,w=0;W!=de&&!((K=t.charCodeAt(W)-64)<1||K>26);++W)w=26*w+K;for(s.e.c=--w,w=0;W!=de&&!((K=t.charCodeAt(W)-48)<0||K>9);++W)w=10*w+K;return s.e.r=--w,s}function OT(t,s){var w=t.t=="d"&&s instanceof Date;if(t.z!=null)try{return t.w=qh(t.z,w?Vl(s):s)}catch{}try{return t.w=qh((t.XF||{}).numFmtId||(w?14:0),w?Vl(s):s)}catch{return""+s}}function Jc(t,s,w){return t==null||t.t==null||t.t=="z"?"":t.w!==void 0?t.w:(t.t=="d"&&!t.z&&w&&w.dateNF&&(t.z=w.dateNF),t.t=="e"?ag[t.v]||t.v:s==null?OT(t,t.v):OT(t,s))}function id(t,s){var w=s&&s.sheet?s.sheet:"Sheet1",W={};return W[w]=t,{SheetNames:[w],Sheets:W}}function vS(t,s,w){var W=w||{},K=t?Array.isArray(t):W.dense,de=t||(K?[]:{}),z=0,B=0;if(de&&W.origin!=null){if(typeof W.origin=="number")z=W.origin;else{var e=typeof W.origin=="string"?gs(W.origin):W.origin;z=e.r,B=e.c}de["!ref"]||(de["!ref"]="A1:A1")}var d={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(de["!ref"]){var P=lo(de["!ref"]);d.s.c=P.s.c,d.s.r=P.s.r,d.e.c=Math.max(d.e.c,P.e.c),d.e.r=Math.max(d.e.r,P.e.r),z==-1&&(d.e.r=z=P.e.r+1)}for(var a=0;a!=s.length;++a)if(s[a]){if(!Array.isArray(s[a]))throw new Error("aoa_to_sheet expects an array of arrays");for(var _=0;_!=s[a].length;++_)if(!(typeof s[a][_]>"u")){var x={v:s[a][_]},v=z+a,y=B+_;if(d.s.r>v&&(d.s.r=v),d.s.c>y&&(d.s.c=y),d.e.r<v&&(d.e.r=v),d.e.c<y&&(d.e.c=y),s[a][_]&&typeof s[a][_]=="object"&&!Array.isArray(s[a][_])&&!(s[a][_]instanceof Date))x=s[a][_];else if(Array.isArray(x.v)&&(x.f=s[a][_][1],x.v=x.v[0]),x.v===null)if(x.f)x.t="n";else if(W.nullError)x.t="e",x.v=0;else if(W.sheetStubs)x.t="z";else continue;else typeof x.v=="number"?x.t="n":typeof x.v=="boolean"?x.t="b":x.v instanceof Date?(x.z=W.dateNF||Io[14],W.cellDates?(x.t="d",x.w=qh(x.z,Vl(x.v))):(x.t="n",x.v=Vl(x.v),x.w=qh(x.z,x.v))):x.t="s";if(K)de[v]||(de[v]=[]),de[v][y]&&de[v][y].z&&(x.z=de[v][y].z),de[v][y]=x;else{var r=Xi({c:y,r:v});de[r]&&de[r].z&&(x.z=de[r].z),de[r]=x}}}return d.s.c<1e7&&(de["!ref"]=Jo(d)),de}function A0(t,s){return vS(null,t,s)}function $9(t){return t.read_shift(4,"i")}function Mf(t,s){return s||(s=Gn(4)),s.write_shift(4,t),s}function el(t){var s=t.read_shift(4);return s===0?"":t.read_shift(s,"dbcs")}function ys(t,s){var w=!1;return s==null&&(w=!0,s=Gn(4+2*t.length)),s.write_shift(4,t.length),t.length>0&&s.write_shift(0,t,"dbcs"),w?s.slice(0,s.l):s}function Q9(t){return{ich:t.read_shift(2),ifnt:t.read_shift(2)}}function q9(t,s){return s||(s=Gn(4)),s.write_shift(2,t.ich||0),s.write_shift(2,t.ifnt||0),s}function L3(t,s){var w=t.l,W=t.read_shift(1),K=el(t),de=[],z={t:K,h:K};if(W&1){for(var B=t.read_shift(4),e=0;e!=B;++e)de.push(Q9(t));z.r=de}else z.r=[{ich:0,ifnt:0}];return t.l=w+s,z}function eP(t,s){var w=!1;return s==null&&(w=!0,s=Gn(15+4*t.t.length)),s.write_shift(1,0),ys(t.t,s),w?s.slice(0,s.l):s}var tP=L3;function rP(t,s){var w=!1;return s==null&&(w=!0,s=Gn(23+4*t.t.length)),s.write_shift(1,1),ys(t.t,s),s.write_shift(4,1),q9({ich:0,ifnt:0},s),w?s.slice(0,s.l):s}function Wu(t){var s=t.read_shift(4),w=t.read_shift(2);return w+=t.read_shift(1)<<16,t.l++,{c:s,iStyleRef:w}}function od(t,s){return s==null&&(s=Gn(8)),s.write_shift(-4,t.c),s.write_shift(3,t.iStyleRef||t.s),s.write_shift(1,0),s}function sd(t){var s=t.read_shift(2);return s+=t.read_shift(1)<<16,t.l++,{c:-1,iStyleRef:s}}function ld(t,s){return s==null&&(s=Gn(4)),s.write_shift(3,t.iStyleRef||t.s),s.write_shift(1,0),s}var nP=el,dS=ys;function P3(t){var s=t.read_shift(4);return s===0||s===4294967295?"":t.read_shift(s,"dbcs")}function ty(t,s){var w=!1;return s==null&&(w=!0,s=Gn(127)),s.write_shift(4,t.length>0?t.length:4294967295),t.length>0&&s.write_shift(0,t,"dbcs"),w?s.slice(0,s.l):s}var aP=el,f2=P3,_3=ty;function pS(t){var s=t.slice(t.l,t.l+4),w=s[0]&1,W=s[0]&2;t.l+=4;var K=W===0?ey([0,0,0,0,s[0]&252,s[1],s[2],s[3]],0):Bv(s,0)>>2;return w?K/100:K}function gS(t,s){s==null&&(s=Gn(4));var w=0,W=0,K=t*100;if(t==(t|0)&&t>=-(1<<29)&&t<1<<29?W=1:K==(K|0)&&K>=-(1<<29)&&K<1<<29&&(W=1,w=1),W)s.write_shift(-4,((w?K:t)<<2)+(w+2));else throw new Error("unsupported RkNumber "+t)}function yS(t){var s={s:{},e:{}};return s.s.r=t.read_shift(4),s.e.r=t.read_shift(4),s.s.c=t.read_shift(4),s.e.c=t.read_shift(4),s}function iP(t,s){return s||(s=Gn(16)),s.write_shift(4,t.s.r),s.write_shift(4,t.e.r),s.write_shift(4,t.s.c),s.write_shift(4,t.e.c),s}var ud=yS,S0=iP;function E0(t){if(t.length-t.l<8)throw"XLS Xnum Buffer underflow";return t.read_shift(8,"f")}function ed(t,s){return(s||Gn(8)).write_shift(8,t,"f")}function oP(t){var s={},w=t.read_shift(1),W=w>>>1,K=t.read_shift(1),de=t.read_shift(2,"i"),z=t.read_shift(1),B=t.read_shift(1),e=t.read_shift(1);switch(t.l++,W){case 0:s.auto=1;break;case 1:s.index=K;var d=pP[K];d&&(s.rgb=ZT(d));break;case 2:s.rgb=ZT([z,B,e]);break;case 3:s.theme=K;break}return de!=0&&(s.tint=de>0?de/32767:de/32768),s}function ry(t,s){if(s||(s=Gn(8)),!t||t.auto)return s.write_shift(4,0),s.write_shift(4,0),s;t.index!=null?(s.write_shift(1,2),s.write_shift(1,t.index)):t.theme!=null?(s.write_shift(1,6),s.write_shift(1,t.theme)):(s.write_shift(1,5),s.write_shift(1,0));var w=t.tint||0;if(w>0?w*=32767:w<0&&(w*=32768),s.write_shift(2,w),!t.rgb||t.theme!=null)s.write_shift(2,0),s.write_shift(1,0),s.write_shift(1,0);else{var W=t.rgb||"FFFFFF";typeof W=="number"&&(W=("000000"+W.toString(16)).slice(-6)),s.write_shift(1,parseInt(W.slice(0,2),16)),s.write_shift(1,parseInt(W.slice(2,4),16)),s.write_shift(1,parseInt(W.slice(4,6),16)),s.write_shift(1,255)}return s}function sP(t){var s=t.read_shift(1);t.l++;var w={fBold:s&1,fItalic:s&2,fUnderline:s&4,fStrikeout:s&8,fOutline:s&16,fShadow:s&32,fCondense:s&64,fExtend:s&128};return w}function lP(t,s){s||(s=Gn(2));var w=(t.italic?2:0)|(t.strike?8:0)|(t.outline?16:0)|(t.shadow?32:0)|(t.condense?64:0)|(t.extend?128:0);return s.write_shift(1,w),s.write_shift(1,0),s}var mS=2,au=3,i1=11,ny=19,o1=64,uP=65,fP=71,cP=4108,hP=4126,_s=80,zT={1:{n:"CodePage",t:mS},2:{n:"Category",t:_s},3:{n:"PresentationFormat",t:_s},4:{n:"ByteCount",t:au},5:{n:"LineCount",t:au},6:{n:"ParagraphCount",t:au},7:{n:"SlideCount",t:au},8:{n:"NoteCount",t:au},9:{n:"HiddenCount",t:au},10:{n:"MultimediaClipCount",t:au},11:{n:"ScaleCrop",t:i1},12:{n:"HeadingPairs",t:cP},13:{n:"TitlesOfParts",t:hP},14:{n:"Manager",t:_s},15:{n:"Company",t:_s},16:{n:"LinksUpToDate",t:i1},17:{n:"CharacterCount",t:au},19:{n:"SharedDoc",t:i1},22:{n:"HyperlinksChanged",t:i1},23:{n:"AppVersion",t:au,p:"version"},24:{n:"DigSig",t:uP},26:{n:"ContentType",t:_s},27:{n:"ContentStatus",t:_s},28:{n:"Language",t:_s},29:{n:"Version",t:_s},255:{},2147483648:{n:"Locale",t:ny},2147483651:{n:"Behavior",t:ny},1919054434:{}},NT={1:{n:"CodePage",t:mS},2:{n:"Title",t:_s},3:{n:"Subject",t:_s},4:{n:"Author",t:_s},5:{n:"Keywords",t:_s},6:{n:"Comments",t:_s},7:{n:"Template",t:_s},8:{n:"LastAuthor",t:_s},9:{n:"RevNumber",t:_s},10:{n:"EditTime",t:o1},11:{n:"LastPrinted",t:o1},12:{n:"CreatedDate",t:o1},13:{n:"ModifiedDate",t:o1},14:{n:"PageCount",t:au},15:{n:"WordCount",t:au},16:{n:"CharCount",t:au},17:{n:"Thumbnail",t:fP},18:{n:"Application",t:_s},19:{n:"DocSecurity",t:au},255:{},2147483648:{n:"Locale",t:ny},2147483651:{n:"Behavior",t:ny},1919054434:{}};function vP(t){return t.map(function(s){return[s>>16&255,s>>8&255,s&255]})}var dP=vP([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),pP=Gl(dP),ag={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},gP={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.sheet.macroEnabled.main+xml":"workbooks","application/vnd.ms-excel.sheet.binary.macroEnabled.main":"workbooks","application/vnd.ms-excel.addin.macroEnabled.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":"sheets","application/vnd.ms-excel.worksheet":"sheets","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"charts","application/vnd.ms-excel.chartsheet":"charts","application/vnd.ms-excel.macrosheet+xml":"macros","application/vnd.ms-excel.macrosheet":"macros","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"dialogs","application/vnd.ms-excel.dialogsheet":"dialogs","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":"strs","application/vnd.ms-excel.sharedStrings":"strs","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":"styles","application/vnd.ms-excel.styles":"styles","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.comments":"comments","application/vnd.ms-excel.threadedcomments+xml":"threadedcomments","application/vnd.ms-excel.person+xml":"people","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"},s1={workbooks:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.main+xml",xlsb:"application/vnd.ms-excel.sheet.binary.macroEnabled.main",xlam:"application/vnd.ms-excel.addin.macroEnabled.main+xml",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml"},strs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",xlsb:"application/vnd.ms-excel.sharedStrings"},comments:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",xlsb:"application/vnd.ms-excel.comments"},sheets:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",xlsb:"application/vnd.ms-excel.worksheet"},charts:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml",xlsb:"application/vnd.ms-excel.chartsheet"},dialogs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml",xlsb:"application/vnd.ms-excel.dialogsheet"},macros:{xlsx:"application/vnd.ms-excel.macrosheet+xml",xlsb:"application/vnd.ms-excel.macrosheet"},metadata:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",xlsb:"application/vnd.ms-excel.sheetMetadata"},styles:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",xlsb:"application/vnd.ms-excel.styles"}};function xS(){return{workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""}}function bS(t,s){var w=M9(gP),W=[],K;W[W.length]=$o,W[W.length]=Sa("Types",null,{xmlns:ps.CT,"xmlns:xsd":ps.xsd,"xmlns:xsi":ps.xsi}),W=W.concat([["xml","application/xml"],["bin","application/vnd.ms-excel.sheet.binary.macroEnabled.main"],["vml","application/vnd.openxmlformats-officedocument.vmlDrawing"],["data","application/vnd.openxmlformats-officedocument.model+data"],["bmp","image/bmp"],["png","image/png"],["gif","image/gif"],["emf","image/x-emf"],["wmf","image/x-wmf"],["jpg","image/jpeg"],["jpeg","image/jpeg"],["tif","image/tiff"],["tiff","image/tiff"],["pdf","application/pdf"],["rels","application/vnd.openxmlformats-package.relationships+xml"]].map(function(e){return Sa("Default",null,{Extension:e[0],ContentType:e[1]})}));var de=function(e){t[e]&&t[e].length>0&&(K=t[e][0],W[W.length]=Sa("Override",null,{PartName:(K[0]=="/"?"":"/")+K,ContentType:s1[e][s.bookType]||s1[e].xlsx}))},z=function(e){(t[e]||[]).forEach(function(d){W[W.length]=Sa("Override",null,{PartName:(d[0]=="/"?"":"/")+d,ContentType:s1[e][s.bookType]||s1[e].xlsx})})},B=function(e){(t[e]||[]).forEach(function(d){W[W.length]=Sa("Override",null,{PartName:(d[0]=="/"?"":"/")+d,ContentType:w[e][0]})})};return de("workbooks"),z("sheets"),z("charts"),B("themes"),["strs","styles"].forEach(de),["coreprops","extprops","custprops"].forEach(B),B("vba"),B("comments"),B("threadedcomments"),B("drawings"),z("metadata"),B("people"),W.length>2&&(W[W.length]="</Types>",W[1]=W[1].replace("/>",">")),W.join("")}var Ii={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",SHEET:"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",XLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",CXML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",CXMLP:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",CMNT:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",SST:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",STY:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",THEME:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",CHART:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",CHARTEX:"http://schemas.microsoft.com/office/2014/relationships/chartEx",CS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet",WS:["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],DS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet",MS:"http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",IMG:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",DRAW:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",XLMETA:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",TCMNT:"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",PEOPLE:"http://schemas.microsoft.com/office/2017/10/relationships/person",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function wS(t){var s=t.lastIndexOf("/");return t.slice(0,s+1)+"_rels/"+t.slice(s+1)+".rels"}function l0(t){var s=[$o,Sa("Relationships",null,{xmlns:ps.RELS})];return Os(t["!id"]).forEach(function(w){s[s.length]=Sa("Relationship",null,t["!id"][w])}),s.length>2&&(s[s.length]="</Relationships>",s[1]=s[1].replace("/>",">")),s.join("")}function Gi(t,s,w,W,K,de){if(K||(K={}),t["!id"]||(t["!id"]={}),t["!idx"]||(t["!idx"]=1),s<0)for(s=t["!idx"];t["!id"]["rId"+s];++s);if(t["!idx"]=s+1,K.Id="rId"+s,K.Type=W,K.Target=w,de?K.TargetMode=de:[Ii.HLINK,Ii.XPATH,Ii.XMISS].indexOf(K.Type)>-1&&(K.TargetMode="External"),t["!id"][K.Id])throw new Error("Cannot rewrite rId "+s);return t["!id"][K.Id]=K,t[("/"+K.Target).replace("//","/")]=K,s}function yP(t){var s=[$o];s.push(`<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0" manifest:version="1.2">
`),s.push(` <manifest:file-entry manifest:full-path="/" manifest:version="1.2" manifest:media-type="application/vnd.oasis.opendocument.spreadsheet"/>
`);for(var w=0;w<t.length;++w)s.push(' <manifest:file-entry manifest:full-path="'+t[w][0]+'" manifest:media-type="'+t[w][1]+`"/>
`);return s.push("</manifest:manifest>"),s.join("")}function BT(t,s,w){return[' <rdf:Description rdf:about="'+t+`">
`,' <rdf:type rdf:resource="http://docs.oasis-open.org/ns/office/1.2/meta/'+(w||"odf")+"#"+s+`"/>
`,` </rdf:Description>
`].join("")}function mP(t,s){return[' <rdf:Description rdf:about="'+t+`">
`,' <ns0:hasPart xmlns:ns0="http://docs.oasis-open.org/ns/office/1.2/meta/pkg#" rdf:resource="'+s+`"/>
`,` </rdf:Description>
`].join("")}function xP(t){var s=[$o];s.push(`<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
`);for(var w=0;w!=t.length;++w)s.push(BT(t[w][0],t[w][1])),s.push(mP("",t[w][0]));return s.push(BT("","Document","pkg")),s.push("</rdf:RDF>"),s.join("")}function TS(){return'<office:document-meta xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xlink="http://www.w3.org/1999/xlink" office:version="1.2"><office:meta><meta:generator>SheetJS '+K1.version+"</meta:generator></office:meta></office:document-meta>"}var Zv=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]];function Jm(t,s,w,W,K){K[t]!=null||s==null||s===""||(K[t]=s,s=Wi(s),W[W.length]=w?Sa(t,s,w):Ds(t,s))}function AS(t,s){var w=s||{},W=[$o,Sa("cp:coreProperties",null,{"xmlns:cp":ps.CORE_PROPS,"xmlns:dc":ps.dc,"xmlns:dcterms":ps.dcterms,"xmlns:dcmitype":ps.dcmitype,"xmlns:xsi":ps.xsi})],K={};if(!t&&!w.Props)return W.join("");t&&(t.CreatedDate!=null&&Jm("dcterms:created",typeof t.CreatedDate=="string"?t.CreatedDate:u2(t.CreatedDate,w.WTF),{"xsi:type":"dcterms:W3CDTF"},W,K),t.ModifiedDate!=null&&Jm("dcterms:modified",typeof t.ModifiedDate=="string"?t.ModifiedDate:u2(t.ModifiedDate,w.WTF),{"xsi:type":"dcterms:W3CDTF"},W,K));for(var de=0;de!=Zv.length;++de){var z=Zv[de],B=w.Props&&w.Props[z[1]]!=null?w.Props[z[1]]:t?t[z[1]]:null;B===!0?B="1":B===!1?B="0":typeof B=="number"&&(B=String(B)),B!=null&&Jm(z[0],B,null,W,K)}return W.length>2&&(W[W.length]="</cp:coreProperties>",W[1]=W[1].replace("/>",">")),W.join("")}var u0=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]],SS=["Worksheets","SheetNames","NamedRanges","DefinedNames","Chartsheets","ChartNames"];function ES(t){var s=[],w=Sa;return t||(t={}),t.Application="SheetJS",s[s.length]=$o,s[s.length]=Sa("Properties",null,{xmlns:ps.EXT_PROPS,"xmlns:vt":ps.vt}),u0.forEach(function(W){if(t[W[1]]!==void 0){var K;switch(W[2]){case"string":K=Wi(String(t[W[1]]));break;case"bool":K=t[W[1]]?"true":"false";break}K!==void 0&&(s[s.length]=w(W[0],K))}}),s[s.length]=w("HeadingPairs",w("vt:vector",w("vt:variant","<vt:lpstr>Worksheets</vt:lpstr>")+w("vt:variant",w("vt:i4",String(t.Worksheets))),{size:2,baseType:"variant"})),s[s.length]=w("TitlesOfParts",w("vt:vector",t.SheetNames.map(function(W){return"<vt:lpstr>"+Wi(W)+"</vt:lpstr>"}).join(""),{size:t.Worksheets,baseType:"lpstr"})),s.length>2&&(s[s.length]="</Properties>",s[1]=s[1].replace("/>",">")),s.join("")}function MS(t){var s=[$o,Sa("Properties",null,{xmlns:ps.CUST_PROPS,"xmlns:vt":ps.vt})];if(!t)return s.join("");var w=1;return Os(t).forEach(function(K){++w,s[s.length]=Sa("property",z9(t[K],!0),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:w,name:Wi(K)})}),s.length>2&&(s[s.length]="</Properties>",s[1]=s[1].replace("/>",">")),s.join("")}var UT={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"};function bP(t,s){var w=[];return Os(UT).map(function(W){for(var K=0;K<Zv.length;++K)if(Zv[K][1]==W)return Zv[K];for(K=0;K<u0.length;++K)if(u0[K][1]==W)return u0[K];throw W}).forEach(function(W){if(t[W[1]]!=null){var K=s&&s.Props&&s.Props[W[1]]!=null?s.Props[W[1]]:t[W[1]];switch(W[2]){case"date":K=new Date(K).toISOString().replace(/\.\d*Z/,"Z");break}typeof K=="number"?K=String(K):K===!0||K===!1?K=K?"1":"0":K instanceof Date&&(K=new Date(K).toISOString().replace(/\.\d*Z/,"")),w.push(Ds(UT[W[1]]||W[1],K))}}),Sa("DocumentProperties",w.join(""),{xmlns:su.o})}function wP(t,s){var w=["Worksheets","SheetNames"],W="CustomDocumentProperties",K=[];return t&&Os(t).forEach(function(de){if(Object.prototype.hasOwnProperty.call(t,de)){for(var z=0;z<Zv.length;++z)if(de==Zv[z][1])return;for(z=0;z<u0.length;++z)if(de==u0[z][1])return;for(z=0;z<w.length;++z)if(de==w[z])return;var B=t[de],e="string";typeof B=="number"?(e="float",B=String(B)):B===!0||B===!1?(e="boolean",B=B?"1":"0"):B=String(B),K.push(Sa(CT(de),B,{"dt:dt":e}))}}),s&&Os(s).forEach(function(de){if(Object.prototype.hasOwnProperty.call(s,de)&&!(t&&Object.prototype.hasOwnProperty.call(t,de))){var z=s[de],B="string";typeof z=="number"?(B="float",z=String(z)):z===!0||z===!1?(B="boolean",z=z?"1":"0"):z instanceof Date?(B="dateTime.tz",z=z.toISOString()):z=String(z),K.push(Sa(CT(de),z,{"dt:dt":B}))}}),"<"+W+' xmlns="'+su.o+'">'+K.join("")+"</"+W+">"}function TP(t){var s=typeof t=="string"?new Date(Date.parse(t)):t,w=s.getTime()/1e3+11644473600,W=w%Math.pow(2,32),K=(w-W)/Math.pow(2,32);W*=1e7,K*=1e7;var de=W/Math.pow(2,32)|0;de>0&&(W=W%Math.pow(2,32),K+=de);var z=Gn(8);return z.write_shift(4,W),z.write_shift(4,K),z}function HT(t,s){var w=Gn(4),W=Gn(4);switch(w.write_shift(4,t==80?31:t),t){case 3:W.write_shift(-4,s);break;case 5:W=Gn(8),W.write_shift(8,s,"f");break;case 11:W.write_shift(4,s?1:0);break;case 64:W=TP(s);break;case 31:case 80:for(W=Gn(4+2*(s.length+1)+(s.length%2?0:2)),W.write_shift(4,s.length+1),W.write_shift(0,s,"dbcs");W.l!=W.length;)W.write_shift(1,0);break;default:throw new Error("TypedPropertyValue unrecognized type "+t+" "+s)}return Rs([w,W])}var CS=["CodePage","Thumbnail","_PID_LINKBASE","_PID_HLINKS","SystemIdentifier","FMTID"];function AP(t){switch(typeof t){case"boolean":return 11;case"number":return(t|0)==t?3:5;case"string":return 31;case"object":if(t instanceof Date)return 64;break}return-1}function VT(t,s,w){var W=Gn(8),K=[],de=[],z=8,B=0,e=Gn(8),d=Gn(8);if(e.write_shift(4,2),e.write_shift(4,1200),d.write_shift(4,1),de.push(e),K.push(d),z+=8+e.length,!s){d=Gn(8),d.write_shift(4,0),K.unshift(d);var P=[Gn(4)];for(P[0].write_shift(4,t.length),B=0;B<t.length;++B){var a=t[B][0];for(e=Gn(4+4+2*(a.length+1)+(a.length%2?0:2)),e.write_shift(4,B+2),e.write_shift(4,a.length+1),e.write_shift(0,a,"dbcs");e.l!=e.length;)e.write_shift(1,0);P.push(e)}e=Rs(P),de.unshift(e),z+=8+e.length}for(B=0;B<t.length;++B)if(!(s&&!s[t[B][0]])&&!(CS.indexOf(t[B][0])>-1||SS.indexOf(t[B][0])>-1)&&t[B][1]!=null){var _=t[B][1],x=0;if(s){x=+s[t[B][0]];var v=w[x];if(v.p=="version"&&typeof _=="string"){var y=_.split(".");_=(+y[0]<<16)+(+y[1]||0)}e=HT(v.t,_)}else{var r=AP(_);r==-1&&(r=31,_=String(_)),e=HT(r,_)}de.push(e),d=Gn(8),d.write_shift(4,s?x:2+B),K.push(d),z+=8+e.length}var n=8*(de.length+1);for(B=0;B<de.length;++B)K[B].write_shift(4,n),n+=de[B].length;return W.write_shift(4,z),W.write_shift(4,de.length),Rs([W].concat(K).concat(de))}function GT(t,s,w,W,K,de){var z=Gn(K?68:48),B=[z];z.write_shift(2,65534),z.write_shift(2,0),z.write_shift(4,842412599),z.write_shift(16,Ki.utils.consts.HEADER_CLSID,"hex"),z.write_shift(4,K?2:1),z.write_shift(16,s,"hex"),z.write_shift(4,K?68:48);var e=VT(t,w,W);if(B.push(e),K){var d=VT(K,null,null);z.write_shift(16,de,"hex"),z.write_shift(4,68+e.length),B.push(d)}return Rs(B)}function SP(t,s){s||(s=Gn(t));for(var w=0;w<t;++w)s.write_shift(1,0);return s}function EP(t,s){return t.read_shift(s)===1}function ml(t,s){return s||(s=Gn(2)),s.write_shift(2,+!!t),s}function LS(t){return t.read_shift(2,"u")}function ku(t,s){return s||(s=Gn(2)),s.write_shift(2,t),s}function PS(t,s,w){return w||(w=Gn(2)),w.write_shift(1,s=="e"?+t:+!!t),w.write_shift(1,s=="e"?1:0),w}function _S(t,s,w){var W=t.read_shift(w&&w.biff>=12?2:1),K="sbcs-cont";if(w&&w.biff>=8,!w||w.biff==8){var de=t.read_shift(1);de&&(K="dbcs-cont")}else w.biff==12&&(K="wstr");w.biff>=2&&w.biff<=5&&(K="cpstr");var z=W?t.read_shift(W,K):"";return z}function MP(t){var s=t.t||"",w=Gn(3+0);w.write_shift(2,s.length),w.write_shift(1,1);var W=Gn(2*s.length);W.write_shift(2*s.length,s,"utf16le");var K=[w,W];return Rs(K)}function CP(t,s,w){var W;if(w){if(w.biff>=2&&w.biff<=5)return t.read_shift(s,"cpstr");if(w.biff>=12)return t.read_shift(s,"dbcs-cont")}var K=t.read_shift(1);return K===0?W=t.read_shift(s,"sbcs-cont"):W=t.read_shift(s,"dbcs-cont"),W}function LP(t,s,w){var W=t.read_shift(w&&w.biff==2?1:2);return W===0?(t.l++,""):CP(t,W,w)}function PP(t,s,w){if(w.biff>5)return LP(t,s,w);var W=t.read_shift(1);return W===0?(t.l++,""):t.read_shift(W,w.biff<=4||!t.lens?"cpstr":"sbcs-cont")}function RS(t,s,w){return w||(w=Gn(3+2*t.length)),w.write_shift(2,t.length),w.write_shift(1,1),w.write_shift(31,t,"utf16le"),w}function WT(t,s){s||(s=Gn(6+t.length*2)),s.write_shift(4,1+t.length);for(var w=0;w<t.length;++w)s.write_shift(2,t.charCodeAt(w));return s.write_shift(2,0),s}function _P(t){var s=Gn(512),w=0,W=t.Target;W.slice(0,7)=="file://"&&(W=W.slice(7));var K=W.indexOf("#"),de=K>-1?31:23;switch(W.charAt(0)){case"#":de=28;break;case".":de&=-3;break}s.write_shift(4,2),s.write_shift(4,de);var z=[8,6815827,6619237,4849780,83];for(w=0;w<z.length;++w)s.write_shift(4,z[w]);if(de==28)W=W.slice(1),WT(W,s);else if(de&2){for(z="e0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "),w=0;w<z.length;++w)s.write_shift(1,parseInt(z[w],16));var B=K>-1?W.slice(0,K):W;for(s.write_shift(4,2*(B.length+1)),w=0;w<B.length;++w)s.write_shift(2,B.charCodeAt(w));s.write_shift(2,0),de&8&&WT(K>-1?W.slice(K+1):"",s)}else{for(z="03 03 00 00 00 00 00 00 c0 00 00 00 00 00 00 46".split(" "),w=0;w<z.length;++w)s.write_shift(1,parseInt(z[w],16));for(var e=0;W.slice(e*3,e*3+3)=="../"||W.slice(e*3,e*3+3)=="..\\";)++e;for(s.write_shift(2,e),s.write_shift(4,W.length-3*e+1),w=0;w<W.length-3*e;++w)s.write_shift(1,W.charCodeAt(w+3*e)&255);for(s.write_shift(1,0),s.write_shift(2,65535),s.write_shift(2,57005),w=0;w<6;++w)s.write_shift(4,0)}return s.slice(0,s.l)}function td(t,s,w,W){return W||(W=Gn(6)),W.write_shift(2,t),W.write_shift(2,s),W.write_shift(2,w||0),W}function RP(t,s,w){var W=w.biff>8?4:2,K=t.read_shift(W),de=t.read_shift(W,"i"),z=t.read_shift(W,"i");return[K,de,z]}function DP(t){var s=t.read_shift(2),w=t.read_shift(2),W=t.read_shift(2),K=t.read_shift(2);return{s:{c:W,r:s},e:{c:K,r:w}}}function DS(t,s){return s||(s=Gn(8)),s.write_shift(2,t.s.r),s.write_shift(2,t.e.r),s.write_shift(2,t.s.c),s.write_shift(2,t.e.c),s}function R3(t,s,w){var W=1536,K=16;switch(w.bookType){case"biff8":break;case"biff5":W=1280,K=8;break;case"biff4":W=4,K=6;break;case"biff3":W=3,K=6;break;case"biff2":W=2,K=4;break;case"xla":break;default:throw new Error("unsupported BIFF version")}var de=Gn(K);return de.write_shift(2,W),de.write_shift(2,s),K>4&&de.write_shift(2,29282),K>6&&de.write_shift(2,1997),K>8&&(de.write_shift(2,49161),de.write_shift(2,1),de.write_shift(2,1798),de.write_shift(2,0)),de}function IP(t,s){var w=!s||s.biff==8,W=Gn(w?112:54);for(W.write_shift(s.biff==8?2:1,7),w&&W.write_shift(1,0),W.write_shift(4,859007059),W.write_shift(4,5458548|(w?0:536870912));W.l<W.length;)W.write_shift(1,w?0:32);return W}function FP(t,s){var w=!s||s.biff>=8?2:1,W=Gn(8+w*t.name.length);W.write_shift(4,t.pos),W.write_shift(1,t.hs||0),W.write_shift(1,t.dt),W.write_shift(1,t.name.length),s.biff>=8&&W.write_shift(1,1),W.write_shift(w*t.name.length,t.name,s.biff<8?"sbcs":"utf16le");var K=W.slice(0,W.l);return K.l=W.l,K}function kP(t,s){var w=Gn(8);w.write_shift(4,t.Count),w.write_shift(4,t.Unique);for(var W=[],K=0;K<t.length;++K)W[K]=MP(t[K]);var de=Rs([w].concat(W));return de.parts=[w.length].concat(W.map(function(z){return z.length})),de}function OP(){var t=Gn(18);return t.write_shift(2,0),t.write_shift(2,0),t.write_shift(2,29280),t.write_shift(2,17600),t.write_shift(2,56),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(2,1),t.write_shift(2,500),t}function zP(t){var s=Gn(18),w=1718;return t&&t.RTL&&(w|=64),s.write_shift(2,w),s.write_shift(4,0),s.write_shift(4,64),s.write_shift(4,0),s.write_shift(4,0),s}function NP(t,s){var w=t.name||"Arial",W=s&&s.biff==5,K=W?15+w.length:16+2*w.length,de=Gn(K);return de.write_shift(2,(t.sz||12)*20),de.write_shift(4,0),de.write_shift(2,400),de.write_shift(4,0),de.write_shift(2,0),de.write_shift(1,w.length),W||de.write_shift(1,1),de.write_shift((W?1:2)*w.length,w,W?"sbcs":"utf16le"),de}function BP(t,s,w,W){var K=Gn(10);return td(t,s,W,K),K.write_shift(4,w),K}function UP(t,s,w,W,K){var de=!K||K.biff==8,z=Gn(6+2+ +de+(1+de)*w.length);return td(t,s,W,z),z.write_shift(2,w.length),de&&z.write_shift(1,1),z.write_shift((1+de)*w.length,w,de?"utf16le":"sbcs"),z}function HP(t,s,w,W){var K=w&&w.biff==5;W||(W=Gn(K?3+s.length:5+2*s.length)),W.write_shift(2,t),W.write_shift(K?1:2,s.length),K||W.write_shift(1,1),W.write_shift((K?1:2)*s.length,s,K?"sbcs":"utf16le");var de=W.length>W.l?W.slice(0,W.l):W;return de.l==null&&(de.l=de.length),de}function VP(t,s){var w=s.biff==8||!s.biff?4:2,W=Gn(2*w+6);return W.write_shift(w,t.s.r),W.write_shift(w,t.e.r+1),W.write_shift(2,t.s.c),W.write_shift(2,t.e.c+1),W.write_shift(2,0),W}function YT(t,s,w,W){var K=w&&w.biff==5;W||(W=Gn(K?16:20)),W.write_shift(2,0),t.style?(W.write_shift(2,t.numFmtId||0),W.write_shift(2,65524)):(W.write_shift(2,t.numFmtId||0),W.write_shift(2,s<<4));var de=0;return t.numFmtId>0&&K&&(de|=1024),W.write_shift(4,de),W.write_shift(4,0),K||W.write_shift(4,0),W.write_shift(2,0),W}function GP(t){var s=Gn(8);return s.write_shift(4,0),s.write_shift(2,t[0]?t[0]+1:0),s.write_shift(2,t[1]?t[1]+1:0),s}function WP(t,s,w,W,K,de){var z=Gn(8);return td(t,s,W,z),PS(w,de,z),z}function YP(t,s,w,W){var K=Gn(14);return td(t,s,W,K),ed(w,K),K}function XP(t,s,w){if(w.biff<8)return ZP(t,s,w);for(var W=[],K=t.l+s,de=t.read_shift(w.biff>8?4:2);de--!==0;)W.push(RP(t,w.biff>8?12:6,w));if(t.l!=K)throw new Error("Bad ExternSheet: "+t.l+" != "+K);return W}function ZP(t,s,w){t[t.l+1]==3&&t[t.l]++;var W=_S(t,s,w);return W.charCodeAt(0)==3?W.slice(1):W}function jP(t){var s=Gn(2+t.length*8);s.write_shift(2,t.length);for(var w=0;w<t.length;++w)DS(t[w],s);return s}function KP(t){var s=Gn(24),w=gs(t[0]);s.write_shift(2,w.r),s.write_shift(2,w.r),s.write_shift(2,w.c),s.write_shift(2,w.c);for(var W="d0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "),K=0;K<16;++K)s.write_shift(1,parseInt(W[K],16));return Rs([s,_P(t[1])])}function JP(t){var s=t[1].Tooltip,w=Gn(10+2*(s.length+1));w.write_shift(2,2048);var W=gs(t[0]);w.write_shift(2,W.r),w.write_shift(2,W.r),w.write_shift(2,W.c),w.write_shift(2,W.c);for(var K=0;K<s.length;++K)w.write_shift(2,s.charCodeAt(K));return w.write_shift(2,0),w}function $P(t){return t||(t=Gn(4)),t.write_shift(2,1),t.write_shift(2,1),t}function QP(t,s,w){if(!w.cellStyles)return ac(t,s);var W=w&&w.biff>=12?4:2,K=t.read_shift(W),de=t.read_shift(W),z=t.read_shift(W),B=t.read_shift(W),e=t.read_shift(2);W==2&&(t.l+=2);var d={s:K,e:de,w:z,ixfe:B,flags:e};return(w.biff>=5||!w.biff)&&(d.level=e>>8&7),d}function qP(t,s){var w=Gn(12);w.write_shift(2,s),w.write_shift(2,s),w.write_shift(2,t.width*256),w.write_shift(2,0);var W=0;return t.hidden&&(W|=1),w.write_shift(1,W),W=t.level||0,w.write_shift(1,W),w.write_shift(2,0),w}function e_(t){for(var s=Gn(2*t),w=0;w<t;++w)s.write_shift(2,w+1);return s}function t_(t,s,w){var W=Gn(15);return og(W,t,s),W.write_shift(8,w,"f"),W}function r_(t,s,w){var W=Gn(9);return og(W,t,s),W.write_shift(2,w),W}var n_=function(){var t={1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127,8:865,9:437,10:850,11:437,13:437,14:850,15:437,16:850,17:437,18:850,19:932,20:850,21:437,22:850,23:865,24:437,25:437,26:850,27:437,28:863,29:850,31:852,34:852,35:852,36:860,37:850,38:866,55:850,64:852,77:936,78:949,79:950,80:874,87:1252,88:1252,89:1252,108:863,134:737,135:852,136:857,204:1257,255:16969},s=b3({1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127});function w(B,e){var d=[],P=qv(1);switch(e.type){case"base64":P=wf(Kc(B));break;case"binary":P=wf(B);break;case"buffer":case"array":P=B;break}ou(P,0);var a=P.read_shift(1),_=!!(a&136),x=!1,v=!1;switch(a){case 2:break;case 3:break;case 48:x=!0,_=!0;break;case 49:x=!0,_=!0;break;case 131:break;case 139:break;case 140:v=!0;break;case 245:break;default:throw new Error("DBF Unsupported Version: "+a.toString(16))}var y=0,r=521;a==2&&(y=P.read_shift(2)),P.l+=3,a!=2&&(y=P.read_shift(4)),y>1048576&&(y=1e6),a!=2&&(r=P.read_shift(2));var n=P.read_shift(2),u=e.codepage||1252;a!=2&&(P.l+=16,P.read_shift(1),P[P.l]!==0&&(u=t[P[P.l]]),P.l+=1,P.l+=2),v&&(P.l+=36);for(var i=[],f={},g=Math.min(P.length,a==2?521:r-10-(x?264:0)),h=v?32:11;P.l<g&&P[P.l]!=13;)switch(f={},f.name=Nv.utils.decode(u,P.slice(P.l,P.l+h)).replace(/[\u0000\r\n].*$/g,""),P.l+=h,f.type=String.fromCharCode(P.read_shift(1)),a!=2&&!v&&(f.offset=P.read_shift(4)),f.len=P.read_shift(1),a==2&&(f.offset=P.read_shift(2)),f.dec=P.read_shift(1),f.name.length&&i.push(f),a!=2&&(P.l+=v?13:14),f.type){case"B":(!x||f.len!=8)&&e.WTF&&console.log("Skipping "+f.name+":"+f.type);break;case"G":case"P":e.WTF&&console.log("Skipping "+f.name+":"+f.type);break;case"+":case"0":case"@":case"C":case"D":case"F":case"I":case"L":case"M":case"N":case"O":case"T":case"Y":break;default:throw new Error("Unknown Field Type: "+f.type)}if(P[P.l]!==13&&(P.l=r-1),P.read_shift(1)!==13)throw new Error("DBF Terminator not found "+P.l+" "+P[P.l]);P.l=r;var b=0,p=0;for(d[0]=[],p=0;p!=i.length;++p)d[0][p]=i[p].name;for(;y-- >0;){if(P[P.l]===42){P.l+=n;continue}for(++P.l,d[++b]=[],p=0,p=0;p!=i.length;++p){var E=P.slice(P.l,P.l+i[p].len);P.l+=i[p].len,ou(E,0);var c=Nv.utils.decode(u,E);switch(i[p].type){case"C":c.trim().length&&(d[b][p]=c.replace(/\s+$/,""));break;case"D":c.length===8?d[b][p]=new Date(+c.slice(0,4),+c.slice(4,6)-1,+c.slice(6,8)):d[b][p]=c;break;case"F":d[b][p]=parseFloat(c.trim());break;case"+":case"I":d[b][p]=v?E.read_shift(-4,"i")^2147483648:E.read_shift(4,"i");break;case"L":switch(c.trim().toUpperCase()){case"Y":case"T":d[b][p]=!0;break;case"N":case"F":d[b][p]=!1;break;case"":case"?":break;default:throw new Error("DBF Unrecognized L:|"+c+"|")}break;case"M":if(!_)throw new Error("DBF Unexpected MEMO for type "+a.toString(16));d[b][p]="##MEMO##"+(v?parseInt(c.trim(),10):E.read_shift(4));break;case"N":c=c.replace(/\u0000/g,"").trim(),c&&c!="."&&(d[b][p]=+c||0);break;case"@":d[b][p]=new Date(E.read_shift(-8,"f")-621356832e5);break;case"T":d[b][p]=new Date((E.read_shift(4)-2440588)*864e5+E.read_shift(4));break;case"Y":d[b][p]=E.read_shift(4,"i")/1e4+E.read_shift(4,"i")/1e4*Math.pow(2,32);break;case"O":d[b][p]=-E.read_shift(-8,"f");break;case"B":if(x&&i[p].len==8){d[b][p]=E.read_shift(8,"f");break}case"G":case"P":E.l+=i[p].len;break;case"0":if(i[p].name==="_NullFlags")break;default:throw new Error("DBF Unsupported data type "+i[p].type)}}}if(a!=2&&P.l<P.length&&P[P.l++]!=26)throw new Error("DBF EOF Marker missing "+(P.l-1)+" of "+P.length+" "+P[P.l-1].toString(16));return e&&e.sheetRows&&(d=d.slice(0,e.sheetRows)),e.DBF=i,d}function W(B,e){var d=e||{};d.dateNF||(d.dateNF="yyyymmdd");var P=A0(w(B,d),d);return P["!cols"]=d.DBF.map(function(a){return{wch:a.len,DBF:a}}),delete d.DBF,P}function K(B,e){try{return id(W(B,e),e)}catch(d){if(e&&e.WTF)throw d}return{SheetNames:[],Sheets:{}}}var de={B:8,C:250,L:1,D:8,"?":0,"":0};function z(B,e){var d=e||{};if(+d.codepage>=0&&Wp(+d.codepage),d.type=="string")throw new Error("Cannot write DBF to JS string");var P=Hl(),a=ly(B,{header:1,raw:!0,cellDates:!0}),_=a[0],x=a.slice(1),v=B["!cols"]||[],y=0,r=0,n=0,u=1;for(y=0;y<_.length;++y){if(((v[y]||{}).DBF||{}).name){_[y]=v[y].DBF.name,++n;continue}if(_[y]!=null){if(++n,typeof _[y]=="number"&&(_[y]=_[y].toString(10)),typeof _[y]!="string")throw new Error("DBF Invalid column name "+_[y]+" |"+typeof _[y]+"|");if(_.indexOf(_[y])!==y){for(r=0;r<1024;++r)if(_.indexOf(_[y]+"_"+r)==-1){_[y]+="_"+r;break}}}}var i=lo(B["!ref"]),f=[],g=[],h=[];for(y=0;y<=i.e.c-i.s.c;++y){var b="",p="",E=0,c=[];for(r=0;r<x.length;++r)x[r][y]!=null&&c.push(x[r][y]);if(c.length==0||_[y]==null){f[y]="?";continue}for(r=0;r<c.length;++r){switch(typeof c[r]){case"number":p="B";break;case"string":p="C";break;case"boolean":p="L";break;case"object":p=c[r]instanceof Date?"D":"C";break;default:p="C"}E=Math.max(E,String(c[r]).length),b=b&&b!=p?"C":p}E>250&&(E=250),p=((v[y]||{}).DBF||{}).type,p=="C"&&v[y].DBF.len>E&&(E=v[y].DBF.len),b=="B"&&p=="N"&&(b="N",h[y]=v[y].DBF.dec,E=v[y].DBF.len),g[y]=b=="C"||p=="N"?E:de[b]||0,u+=g[y],f[y]=b}var l=P.next(32);for(l.write_shift(4,318902576),l.write_shift(4,x.length),l.write_shift(2,296+32*n),l.write_shift(2,u),y=0;y<4;++y)l.write_shift(4,0);for(l.write_shift(4,0|(+s[F5]||3)<<8),y=0,r=0;y<_.length;++y)if(_[y]!=null){var m=P.next(32),M=(_[y].slice(-10)+"\0\0\0\0\0\0\0\0\0\0\0").slice(0,11);m.write_shift(1,M,"sbcs"),m.write_shift(1,f[y]=="?"?"C":f[y],"sbcs"),m.write_shift(4,r),m.write_shift(1,g[y]||de[f[y]]||0),m.write_shift(1,h[y]||0),m.write_shift(1,2),m.write_shift(4,0),m.write_shift(1,0),m.write_shift(4,0),m.write_shift(4,0),r+=g[y]||de[f[y]]||0}var L=P.next(264);for(L.write_shift(4,13),y=0;y<65;++y)L.write_shift(4,0);for(y=0;y<x.length;++y){var D=P.next(u);for(D.write_shift(1,0),r=0;r<_.length;++r)if(_[r]!=null)switch(f[r]){case"L":D.write_shift(1,x[y][r]==null?63:x[y][r]?84:70);break;case"B":D.write_shift(8,x[y][r]||0,"f");break;case"N":var A="0";for(typeof x[y][r]=="number"&&(A=x[y][r].toFixed(h[r]||0)),n=0;n<g[r]-A.length;++n)D.write_shift(1,32);D.write_shift(1,A,"sbcs");break;case"D":x[y][r]?(D.write_shift(4,("0000"+x[y][r].getFullYear()).slice(-4),"sbcs"),D.write_shift(2,("00"+(x[y][r].getMonth()+1)).slice(-2),"sbcs"),D.write_shift(2,("00"+x[y][r].getDate()).slice(-2),"sbcs")):D.write_shift(8,"00000000","sbcs");break;case"C":var C=String(x[y][r]!=null?x[y][r]:"").slice(0,g[r]);for(D.write_shift(1,C,"sbcs"),n=0;n<g[r]-C.length;++n)D.write_shift(1,32);break}}return P.next(1).write_shift(1,26),P.end()}return{to_workbook:K,to_sheet:W,from_sheet:z}}(),a_=function(){var t={AA:"À",BA:"Á",CA:"Â",DA:195,HA:"Ä",JA:197,AE:"È",BE:"É",CE:"Ê",HE:"Ë",AI:"Ì",BI:"Í",CI:"Î",HI:"Ï",AO:"Ò",BO:"Ó",CO:"Ô",DO:213,HO:"Ö",AU:"Ù",BU:"Ú",CU:"Û",HU:"Ü",Aa:"à",Ba:"á",Ca:"â",Da:227,Ha:"ä",Ja:229,Ae:"è",Be:"é",Ce:"ê",He:"ë",Ai:"ì",Bi:"í",Ci:"î",Hi:"ï",Ao:"ò",Bo:"ó",Co:"ô",Do:245,Ho:"ö",Au:"ù",Bu:"ú",Cu:"û",Hu:"ü",KC:"Ç",Kc:"ç",q:"æ",z:"œ",a:"Æ",j:"Œ",DN:209,Dn:241,Hy:255,S:169,c:170,R:174,"B ":180,0:176,1:177,2:178,3:179,5:181,6:182,7:183,Q:185,k:186,b:208,i:216,l:222,s:240,y:248,"!":161,'"':162,"#":163,"(":164,"%":165,"'":167,"H ":168,"+":171,";":187,"<":188,"=":189,">":190,"?":191,"{":223},s=new RegExp("\x1BN("+Os(t).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm"),w=function(_,x){var v=t[x];return typeof v=="number"?pT(v):v},W=function(_,x,v){var y=x.charCodeAt(0)-32<<4|v.charCodeAt(0)-48;return y==59?_:pT(y)};t["|"]=254;function K(_,x){switch(x.type){case"base64":return de(Kc(_),x);case"binary":return de(_,x);case"buffer":return de(zi&&Buffer.isBuffer(_)?_.toString("binary"):tg(_),x);case"array":return de(_y(_),x)}throw new Error("Unrecognized type "+x.type)}function de(_,x){var v=_.split(/[\n\r]+/),y=-1,r=-1,n=0,u=0,i=[],f=[],g=null,h={},b=[],p=[],E=[],c=0,l;for(+x.codepage>=0&&Wp(+x.codepage);n!==v.length;++n){c=0;var m=v[n].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,W).replace(s,w),M=m.replace(/;;/g,"\0").split(";").map(function(k){return k.replace(/\u0000/g,";")}),L=M[0],D;if(m.length>0)switch(L){case"ID":break;case"E":break;case"B":break;case"O":break;case"W":break;case"P":M[1].charAt(0)=="P"&&f.push(m.slice(3).replace(/;;/g,";"));break;case"C":var A=!1,C=!1,S=!1,o=!1,R=-1,T=-1;for(u=1;u<M.length;++u)switch(M[u].charAt(0)){case"A":break;case"X":r=parseInt(M[u].slice(1))-1,C=!0;break;case"Y":for(y=parseInt(M[u].slice(1))-1,C||(r=0),l=i.length;l<=y;++l)i[l]=[];break;case"K":D=M[u].slice(1),D.charAt(0)==='"'?D=D.slice(1,D.length-1):D==="TRUE"?D=!0:D==="FALSE"?D=!1:isNaN(Gc(D))?isNaN(Xp(D).getDate())||(D=bl(D)):(D=Gc(D),g!==null&&X5(g)&&(D=J5(D))),A=!0;break;case"E":o=!0;var O=rR(M[u].slice(1),{r:y,c:r});i[y][r]=[i[y][r],O];break;case"S":S=!0,i[y][r]=[i[y][r],"S5S"];break;case"G":break;case"R":R=parseInt(M[u].slice(1))-1;break;case"C":T=parseInt(M[u].slice(1))-1;break;default:if(x&&x.WTF)throw new Error("SYLK bad record "+m)}if(A&&(i[y][r]&&i[y][r].length==2?i[y][r][0]=D:i[y][r]=D,g=null),S){if(o)throw new Error("SYLK shared formula cannot have own formula");var N=R>-1&&i[R][T];if(!N||!N[1])throw new Error("SYLK shared formula cannot find base");i[y][r][1]=nR(N[1],{r:y-R,c:r-T})}break;case"F":var H=0;for(u=1;u<M.length;++u)switch(M[u].charAt(0)){case"X":r=parseInt(M[u].slice(1))-1,++H;break;case"Y":for(y=parseInt(M[u].slice(1))-1,l=i.length;l<=y;++l)i[l]=[];break;case"M":c=parseInt(M[u].slice(1))/20;break;case"F":break;case"G":break;case"P":g=f[parseInt(M[u].slice(1))];break;case"S":break;case"D":break;case"N":break;case"W":for(E=M[u].slice(1).split(" "),l=parseInt(E[0],10);l<=parseInt(E[1],10);++l)c=parseInt(E[2],10),p[l-1]=c===0?{hidden:!0}:{wch:c},D3(p[l-1]);break;case"C":r=parseInt(M[u].slice(1))-1,p[r]||(p[r]={});break;case"R":y=parseInt(M[u].slice(1))-1,b[y]||(b[y]={}),c>0?(b[y].hpt=c,b[y].hpx=zS(c)):c===0&&(b[y].hidden=!0);break;default:if(x&&x.WTF)throw new Error("SYLK bad record "+m)}H<1&&(g=null);break;default:if(x&&x.WTF)throw new Error("SYLK bad record "+m)}}return b.length>0&&(h["!rows"]=b),p.length>0&&(h["!cols"]=p),x&&x.sheetRows&&(i=i.slice(0,x.sheetRows)),[i,h]}function z(_,x){var v=K(_,x),y=v[0],r=v[1],n=A0(y,x);return Os(r).forEach(function(u){n[u]=r[u]}),n}function B(_,x){return id(z(_,x),x)}function e(_,x,v,y){var r="C;Y"+(v+1)+";X"+(y+1)+";K";switch(_.t){case"n":r+=_.v||0,_.f&&!_.F&&(r+=";E"+F3(_.f,{r:v,c:y}));break;case"b":r+=_.v?"TRUE":"FALSE";break;case"e":r+=_.w||_.v;break;case"d":r+='"'+(_.w||_.v)+'"';break;case"s":r+='"'+_.v.replace(/"/g,"").replace(/;/g,";;")+'"';break}return r}function d(_,x){x.forEach(function(v,y){var r="F;W"+(y+1)+" "+(y+1)+" ";v.hidden?r+="0":(typeof v.width=="number"&&!v.wpx&&(v.wpx=ay(v.width)),typeof v.wpx=="number"&&!v.wch&&(v.wch=iy(v.wpx)),typeof v.wch=="number"&&(r+=Math.round(v.wch))),r.charAt(r.length-1)!=" "&&_.push(r)})}function P(_,x){x.forEach(function(v,y){var r="F;";v.hidden?r+="M0;":v.hpt?r+="M"+20*v.hpt+";":v.hpx&&(r+="M"+20*oy(v.hpx)+";"),r.length>2&&_.push(r+"R"+(y+1))})}function a(_,x){var v=["ID;PWXL;N;E"],y=[],r=lo(_["!ref"]),n,u=Array.isArray(_),i=`\r
`;v.push("P;PGeneral"),v.push("F;P0;DG0G8;M255"),_["!cols"]&&d(v,_["!cols"]),_["!rows"]&&P(v,_["!rows"]),v.push("B;Y"+(r.e.r-r.s.r+1)+";X"+(r.e.c-r.s.c+1)+";D"+[r.s.c,r.s.r,r.e.c,r.e.r].join(" "));for(var f=r.s.r;f<=r.e.r;++f)for(var g=r.s.c;g<=r.e.c;++g){var h=Xi({r:f,c:g});n=u?(_[f]||[])[g]:_[h],!(!n||n.v==null&&(!n.f||n.F))&&y.push(e(n,_,f,g))}return v.join(i)+i+y.join(i)+i+"E"+i}return{to_workbook:B,to_sheet:z,from_sheet:a}}(),i_=function(){function t(de,z){switch(z.type){case"base64":return s(Kc(de),z);case"binary":return s(de,z);case"buffer":return s(zi&&Buffer.isBuffer(de)?de.toString("binary"):tg(de),z);case"array":return s(_y(de),z)}throw new Error("Unrecognized type "+z.type)}function s(de,z){for(var B=de.split(`
`),e=-1,d=-1,P=0,a=[];P!==B.length;++P){if(B[P].trim()==="BOT"){a[++e]=[],d=0;continue}if(!(e<0)){var _=B[P].trim().split(","),x=_[0],v=_[1];++P;for(var y=B[P]||"";(y.match(/["]/g)||[]).length&1&&P<B.length-1;)y+=`
`+B[++P];switch(y=y.trim(),+x){case-1:if(y==="BOT"){a[++e]=[],d=0;continue}else if(y!=="EOD")throw new Error("Unrecognized DIF special command "+y);break;case 0:y==="TRUE"?a[e][d]=!0:y==="FALSE"?a[e][d]=!1:isNaN(Gc(v))?isNaN(Xp(v).getDate())?a[e][d]=v:a[e][d]=bl(v):a[e][d]=Gc(v),++d;break;case 1:y=y.slice(1,y.length-1),y=y.replace(/""/g,'"'),y&&y.match(/^=".*"$/)&&(y=y.slice(2,-1)),a[e][d++]=y!==""?y:null;break}if(y==="EOD")break}}return z&&z.sheetRows&&(a=a.slice(0,z.sheetRows)),a}function w(de,z){return A0(t(de,z),z)}function W(de,z){return id(w(de,z),z)}var K=function(){var de=function(e,d,P,a,_){e.push(d),e.push(P+","+a),e.push('"'+_.replace(/"/g,'""')+'"')},z=function(e,d,P,a){e.push(d+","+P),e.push(d==1?'"'+a.replace(/"/g,'""')+'"':a)};return function(e){var d=[],P=lo(e["!ref"]),a,_=Array.isArray(e);de(d,"TABLE",0,1,"sheetjs"),de(d,"VECTORS",0,P.e.r-P.s.r+1,""),de(d,"TUPLES",0,P.e.c-P.s.c+1,""),de(d,"DATA",0,0,"");for(var x=P.s.r;x<=P.e.r;++x){z(d,-1,0,"BOT");for(var v=P.s.c;v<=P.e.c;++v){var y=Xi({r:x,c:v});if(a=_?(e[x]||[])[v]:e[y],!a){z(d,1,0,"");continue}switch(a.t){case"n":var r=a.w;!r&&a.v!=null&&(r=a.v),r==null?a.f&&!a.F?z(d,1,0,"="+a.f):z(d,1,0,""):z(d,0,r,"V");break;case"b":z(d,0,a.v?1:0,a.v?"TRUE":"FALSE");break;case"s":z(d,1,0,isNaN(a.v)?a.v:'="'+a.v+'"');break;case"d":a.w||(a.w=qh(a.z||Io[14],Vl(bl(a.v)))),z(d,0,a.w,"V");break;default:z(d,1,0,"")}}}z(d,-1,0,"EOD");var n=`\r
`,u=d.join(n);return u}}();return{to_workbook:W,to_sheet:w,from_sheet:K}}(),IS=function(){function t(a){return a.replace(/\\b/g,"\\").replace(/\\c/g,":").replace(/\\n/g,`
`)}function s(a){return a.replace(/\\/g,"\\b").replace(/:/g,"\\c").replace(/\n/g,"\\n")}function w(a,_){for(var x=a.split(`
`),v=-1,y=-1,r=0,n=[];r!==x.length;++r){var u=x[r].trim().split(":");if(u[0]==="cell"){var i=gs(u[1]);if(n.length<=i.r)for(v=n.length;v<=i.r;++v)n[v]||(n[v]=[]);switch(v=i.r,y=i.c,u[2]){case"t":n[v][y]=t(u[3]);break;case"v":n[v][y]=+u[3];break;case"vtf":var f=u[u.length-1];case"vtc":switch(u[3]){case"nl":n[v][y]=!!+u[4];break;default:n[v][y]=+u[4];break}u[2]=="vtf"&&(n[v][y]=[n[v][y],f])}}}return _&&_.sheetRows&&(n=n.slice(0,_.sheetRows)),n}function W(a,_){return A0(w(a,_),_)}function K(a,_){return id(W(a,_),_)}var de=["socialcalc:version:1.5","MIME-Version: 1.0","Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave"].join(`
`),z=["--SocialCalcSpreadsheetControlSave","Content-type: text/plain; charset=UTF-8"].join(`
`)+`
`,B=["# SocialCalc Spreadsheet Control Save","part:sheet"].join(`
`),e="--SocialCalcSpreadsheetControlSave--";function d(a){if(!a||!a["!ref"])return"";for(var _=[],x=[],v,y="",r=hu(a["!ref"]),n=Array.isArray(a),u=r.s.r;u<=r.e.r;++u)for(var i=r.s.c;i<=r.e.c;++i)if(y=Xi({r:u,c:i}),v=n?(a[u]||[])[i]:a[y],!(!v||v.v==null||v.t==="z")){switch(x=["cell",y,"t"],v.t){case"s":case"str":x.push(s(v.v));break;case"n":v.f?(x[2]="vtf",x[3]="n",x[4]=v.v,x[5]=s(v.f)):(x[2]="v",x[3]=v.v);break;case"b":x[2]="vt"+(v.f?"f":"c"),x[3]="nl",x[4]=v.v?"1":"0",x[5]=s(v.f||(v.v?"TRUE":"FALSE"));break;case"d":var f=Vl(bl(v.v));x[2]="vtc",x[3]="nd",x[4]=""+f,x[5]=v.w||qh(v.z||Io[14],f);break;case"e":continue}_.push(x.join(":"))}return _.push("sheet:c:"+(r.e.c-r.s.c+1)+":r:"+(r.e.r-r.s.r+1)+":tvf:1"),_.push("valueformat:1:text-wiki"),_.join(`
`)}function P(a){return[de,z,B,z,d(a),e].join(`
`)}return{to_workbook:K,to_sheet:W,from_sheet:P}}(),o_=function(){function t(P,a,_,x,v){v.raw?a[_][x]=P:P===""||(P==="TRUE"?a[_][x]=!0:P==="FALSE"?a[_][x]=!1:isNaN(Gc(P))?isNaN(Xp(P).getDate())?a[_][x]=P:a[_][x]=bl(P):a[_][x]=Gc(P))}function s(P,a){var _=a||{},x=[];if(!P||P.length===0)return x;for(var v=P.split(/[\r\n]/),y=v.length-1;y>=0&&v[y].length===0;)--y;for(var r=10,n=0,u=0;u<=y;++u)n=v[u].indexOf(" "),n==-1?n=v[u].length:n++,r=Math.max(r,n);for(u=0;u<=y;++u){x[u]=[];var i=0;for(t(v[u].slice(0,r).trim(),x,u,i,_),i=1;i<=(v[u].length-r)/10+1;++i)t(v[u].slice(r+(i-1)*10,r+i*10).trim(),x,u,i,_)}return _.sheetRows&&(x=x.slice(0,_.sheetRows)),x}var w={44:",",9:" ",59:";",124:"|"},W={44:3,9:2,59:1,124:0};function K(P){for(var a={},_=!1,x=0,v=0;x<P.length;++x)(v=P.charCodeAt(x))==34?_=!_:!_&&v in w&&(a[v]=(a[v]||0)+1);v=[];for(x in a)Object.prototype.hasOwnProperty.call(a,x)&&v.push([a[x],x]);if(!v.length){a=W;for(x in a)Object.prototype.hasOwnProperty.call(a,x)&&v.push([a[x],x])}return v.sort(function(y,r){return y[0]-r[0]||W[y[1]]-W[r[1]]}),w[v.pop()[1]]||44}function de(P,a){var _=a||{},x="",v=_.dense?[]:{},y={s:{c:0,r:0},e:{c:0,r:0}};P.slice(0,4)=="sep="?P.charCodeAt(5)==13&&P.charCodeAt(6)==10?(x=P.charAt(4),P=P.slice(7)):P.charCodeAt(5)==13||P.charCodeAt(5)==10?(x=P.charAt(4),P=P.slice(6)):x=K(P.slice(0,1024)):_&&_.FS?x=_.FS:x=K(P.slice(0,1024));var r=0,n=0,u=0,i=0,f=0,g=x.charCodeAt(0),h=!1,b=0,p=P.charCodeAt(0);P=P.replace(/\r\n/mg,`
`);var E=_.dateNF!=null?T9(_.dateNF):null;function c(){var l=P.slice(i,f),m={};if(l.charAt(0)=='"'&&l.charAt(l.length-1)=='"'&&(l=l.slice(1,-1).replace(/""/g,'"')),l.length===0)m.t="z";else if(_.raw)m.t="s",m.v=l;else if(l.trim().length===0)m.t="s",m.v=l;else if(l.charCodeAt(0)==61)l.charCodeAt(1)==34&&l.charCodeAt(l.length-1)==34?(m.t="s",m.v=l.slice(2,-1).replace(/""/g,'"')):aR(l)?(m.t="n",m.f=l.slice(1)):(m.t="s",m.v=l);else if(l=="TRUE")m.t="b",m.v=!0;else if(l=="FALSE")m.t="b",m.v=!1;else if(!isNaN(u=Gc(l)))m.t="n",_.cellText!==!1&&(m.w=l),m.v=u;else if(!isNaN(Xp(l).getDate())||E&&l.match(E)){m.z=_.dateNF||Io[14];var M=0;E&&l.match(E)&&(l=A9(l,_.dateNF,l.match(E)||[]),M=1),_.cellDates?(m.t="d",m.v=bl(l,M)):(m.t="n",m.v=Vl(bl(l,M))),_.cellText!==!1&&(m.w=qh(m.z,m.v instanceof Date?Vl(m.v):m.v)),_.cellNF||delete m.z}else m.t="s",m.v=l;if(m.t=="z"||(_.dense?(v[r]||(v[r]=[]),v[r][n]=m):v[Xi({c:n,r})]=m),i=f+1,p=P.charCodeAt(i),y.e.c<n&&(y.e.c=n),y.e.r<r&&(y.e.r=r),b==g)++n;else if(n=0,++r,_.sheetRows&&_.sheetRows<=r)return!0}e:for(;f<P.length;++f)switch(b=P.charCodeAt(f)){case 34:p===34&&(h=!h);break;case g:case 10:case 13:if(!h&&c())break e;break}return f-i>0&&c(),v["!ref"]=Jo(y),v}function z(P,a){return!(a&&a.PRN)||a.FS||P.slice(0,4)=="sep="||P.indexOf(" ")>=0||P.indexOf(",")>=0||P.indexOf(";")>=0?de(P,a):A0(s(P,a),a)}function B(P,a){var _="",x=a.type=="string"?[0,0,0,0]:mk(P,a);switch(a.type){case"base64":_=Kc(P);break;case"binary":_=P;break;case"buffer":a.codepage==65001?_=P.toString("utf8"):a.codepage&&typeof Nv<"u"?_=Nv.utils.decode(a.codepage,P):_=zi&&Buffer.isBuffer(P)?P.toString("binary"):tg(P);break;case"array":_=_y(P);break;case"string":_=P;break;default:throw new Error("Unrecognized type "+a.type)}return x[0]==239&&x[1]==187&&x[2]==191?_=bp(_.slice(3)):a.type!="string"&&a.type!="buffer"&&a.codepage==65001?_=bp(_):a.type=="binary"&&typeof Nv<"u"&&a.codepage&&(_=Nv.utils.decode(a.codepage,Nv.utils.encode(28591,_))),_.slice(0,19)=="socialcalc:version:"?IS.to_sheet(a.type=="string"?_:bp(_),a):z(_,a)}function e(P,a){return id(B(P,a),a)}function d(P){for(var a=[],_=lo(P["!ref"]),x,v=Array.isArray(P),y=_.s.r;y<=_.e.r;++y){for(var r=[],n=_.s.c;n<=_.e.c;++n){var u=Xi({r:y,c:n});if(x=v?(P[y]||[])[n]:P[u],!x||x.v==null){r.push(" ");continue}for(var i=(x.w||(Jc(x),x.w)||"").slice(0,10);i.length<10;)i+=" ";r.push(i+(n===0?" ":""))}a.push(r.join(""))}return a.join(`
`)}return{to_workbook:e,to_sheet:B,from_sheet:d}}(),XT=function(){function t(O,N,H){if(O){ou(O,O.l||0);for(var k=H.Enum||R;O.l<O.length;){var V=O.read_shift(2),G=k[V]||k[65535],U=O.read_shift(2),Y=O.l+U,ee=G.f&&G.f(O,U,H);if(O.l=Y,N(ee,G,V))return}}}function s(O,N){switch(N.type){case"base64":return w(wf(Kc(O)),N);case"binary":return w(wf(O),N);case"buffer":case"array":return w(O,N)}throw"Unsupported type "+N.type}function w(O,N){if(!O)return O;var H=N||{},k=H.dense?[]:{},V="Sheet1",G="",U=0,Y={},ee=[],re=[],ie={s:{r:0,c:0},e:{r:0,c:0}},se=H.sheetRows||0;if(O[2]==0&&(O[3]==8||O[3]==9)&&O.length>=16&&O[14]==5&&O[15]===108)throw new Error("Unsupported Works 3 for Mac file");if(O[2]==2)H.Enum=R,t(O,function(Z,Q,ue){switch(ue){case 0:H.vers=Z,Z>=4096&&(H.qpro=!0);break;case 6:ie=Z;break;case 204:Z&&(G=Z);break;case 222:G=Z;break;case 15:case 51:H.qpro||(Z[1].v=Z[1].v.slice(1));case 13:case 14:case 16:ue==14&&(Z[2]&112)==112&&(Z[2]&15)>1&&(Z[2]&15)<15&&(Z[1].z=H.dateNF||Io[14],H.cellDates&&(Z[1].t="d",Z[1].v=J5(Z[1].v))),H.qpro&&Z[3]>U&&(k["!ref"]=Jo(ie),Y[V]=k,ee.push(V),k=H.dense?[]:{},ie={s:{r:0,c:0},e:{r:0,c:0}},U=Z[3],V=G||"Sheet"+(U+1),G="");var fe=H.dense?(k[Z[0].r]||[])[Z[0].c]:k[Xi(Z[0])];if(fe){fe.t=Z[1].t,fe.v=Z[1].v,Z[1].z!=null&&(fe.z=Z[1].z),Z[1].f!=null&&(fe.f=Z[1].f);break}H.dense?(k[Z[0].r]||(k[Z[0].r]=[]),k[Z[0].r][Z[0].c]=Z[1]):k[Xi(Z[0])]=Z[1];break}},H);else if(O[2]==26||O[2]==14)H.Enum=T,O[2]==14&&(H.qpro=!0,O.l=0),t(O,function(Z,Q,ue){switch(ue){case 204:V=Z;break;case 22:Z[1].v=Z[1].v.slice(1);case 23:case 24:case 25:case 37:case 39:case 40:if(Z[3]>U&&(k["!ref"]=Jo(ie),Y[V]=k,ee.push(V),k=H.dense?[]:{},ie={s:{r:0,c:0},e:{r:0,c:0}},U=Z[3],V="Sheet"+(U+1)),se>0&&Z[0].r>=se)break;H.dense?(k[Z[0].r]||(k[Z[0].r]=[]),k[Z[0].r][Z[0].c]=Z[1]):k[Xi(Z[0])]=Z[1],ie.e.c<Z[0].c&&(ie.e.c=Z[0].c),ie.e.r<Z[0].r&&(ie.e.r=Z[0].r);break;case 27:Z[14e3]&&(re[Z[14e3][0]]=Z[14e3][1]);break;case 1537:re[Z[0]]=Z[1],Z[0]==U&&(V=Z[1]);break}},H);else throw new Error("Unrecognized LOTUS BOF "+O[2]);if(k["!ref"]=Jo(ie),Y[G||V]=k,ee.push(G||V),!re.length)return{SheetNames:ee,Sheets:Y};for(var ce={},q=[],j=0;j<re.length;++j)Y[ee[j]]?(q.push(re[j]||ee[j]),ce[re[j]]=Y[re[j]]||Y[ee[j]]):(q.push(re[j]),ce[re[j]]={"!ref":"A1"});return{SheetNames:q,Sheets:ce}}function W(O,N){var H=N||{};if(+H.codepage>=0&&Wp(+H.codepage),H.type=="string")throw new Error("Cannot write WK1 to JS string");var k=Hl(),V=lo(O["!ref"]),G=Array.isArray(O),U=[];Ea(k,0,de(1030)),Ea(k,6,e(V));for(var Y=Math.min(V.e.r,8191),ee=V.s.r;ee<=Y;++ee)for(var re=Fs(ee),ie=V.s.c;ie<=V.e.c;++ie){ee===V.s.r&&(U[ie]=qs(ie));var se=U[ie]+re,ce=G?(O[ee]||[])[ie]:O[se];if(!(!ce||ce.t=="z"))if(ce.t=="n")(ce.v|0)==ce.v&&ce.v>=-32768&&ce.v<=32767?Ea(k,13,x(ee,ie,ce.v)):Ea(k,14,y(ee,ie,ce.v));else{var q=Jc(ce);Ea(k,15,a(ee,ie,q.slice(0,239)))}}return Ea(k,1),k.end()}function K(O,N){var H=N||{};if(+H.codepage>=0&&Wp(+H.codepage),H.type=="string")throw new Error("Cannot write WK3 to JS string");var k=Hl();Ea(k,0,z(O));for(var V=0,G=0;V<O.SheetNames.length;++V)(O.Sheets[O.SheetNames[V]]||{})["!ref"]&&Ea(k,27,o(O.SheetNames[V],G++));var U=0;for(V=0;V<O.SheetNames.length;++V){var Y=O.Sheets[O.SheetNames[V]];if(!(!Y||!Y["!ref"])){for(var ee=lo(Y["!ref"]),re=Array.isArray(Y),ie=[],se=Math.min(ee.e.r,8191),ce=ee.s.r;ce<=se;++ce)for(var q=Fs(ce),j=ee.s.c;j<=ee.e.c;++j){ce===ee.s.r&&(ie[j]=qs(j));var Z=ie[j]+q,Q=re?(Y[ce]||[])[j]:Y[Z];if(!(!Q||Q.t=="z"))if(Q.t=="n")Ea(k,23,c(ce,j,U,Q.v));else{var ue=Jc(Q);Ea(k,22,b(ce,j,U,ue.slice(0,239)))}}++U}}return Ea(k,1),k.end()}function de(O){var N=Gn(2);return N.write_shift(2,O),N}function z(O){var N=Gn(26);N.write_shift(2,4096),N.write_shift(2,4),N.write_shift(4,0);for(var H=0,k=0,V=0,G=0;G<O.SheetNames.length;++G){var U=O.SheetNames[G],Y=O.Sheets[U];if(!(!Y||!Y["!ref"])){++V;var ee=hu(Y["!ref"]);H<ee.e.r&&(H=ee.e.r),k<ee.e.c&&(k=ee.e.c)}}return H>8191&&(H=8191),N.write_shift(2,H),N.write_shift(1,V),N.write_shift(1,k),N.write_shift(2,0),N.write_shift(2,0),N.write_shift(1,1),N.write_shift(1,2),N.write_shift(4,0),N.write_shift(4,0),N}function B(O,N,H){var k={s:{c:0,r:0},e:{c:0,r:0}};return N==8&&H.qpro?(k.s.c=O.read_shift(1),O.l++,k.s.r=O.read_shift(2),k.e.c=O.read_shift(1),O.l++,k.e.r=O.read_shift(2),k):(k.s.c=O.read_shift(2),k.s.r=O.read_shift(2),N==12&&H.qpro&&(O.l+=2),k.e.c=O.read_shift(2),k.e.r=O.read_shift(2),N==12&&H.qpro&&(O.l+=2),k.s.c==65535&&(k.s.c=k.e.c=k.s.r=k.e.r=0),k)}function e(O){var N=Gn(8);return N.write_shift(2,O.s.c),N.write_shift(2,O.s.r),N.write_shift(2,O.e.c),N.write_shift(2,O.e.r),N}function d(O,N,H){var k=[{c:0,r:0},{t:"n",v:0},0,0];return H.qpro&&H.vers!=20768?(k[0].c=O.read_shift(1),k[3]=O.read_shift(1),k[0].r=O.read_shift(2),O.l+=2):(k[2]=O.read_shift(1),k[0].c=O.read_shift(2),k[0].r=O.read_shift(2)),k}function P(O,N,H){var k=O.l+N,V=d(O,N,H);if(V[1].t="s",H.vers==20768){O.l++;var G=O.read_shift(1);return V[1].v=O.read_shift(G,"utf8"),V}return H.qpro&&O.l++,V[1].v=O.read_shift(k-O.l,"cstr"),V}function a(O,N,H){var k=Gn(7+H.length);k.write_shift(1,255),k.write_shift(2,N),k.write_shift(2,O),k.write_shift(1,39);for(var V=0;V<k.length;++V){var G=H.charCodeAt(V);k.write_shift(1,G>=128?95:G)}return k.write_shift(1,0),k}function _(O,N,H){var k=d(O,N,H);return k[1].v=O.read_shift(2,"i"),k}function x(O,N,H){var k=Gn(7);return k.write_shift(1,255),k.write_shift(2,N),k.write_shift(2,O),k.write_shift(2,H,"i"),k}function v(O,N,H){var k=d(O,N,H);return k[1].v=O.read_shift(8,"f"),k}function y(O,N,H){var k=Gn(13);return k.write_shift(1,255),k.write_shift(2,N),k.write_shift(2,O),k.write_shift(8,H,"f"),k}function r(O,N,H){var k=O.l+N,V=d(O,N,H);if(V[1].v=O.read_shift(8,"f"),H.qpro)O.l=k;else{var G=O.read_shift(2);f(O.slice(O.l,O.l+G),V),O.l+=G}return V}function n(O,N,H){var k=N&32768;return N&=-32769,N=(k?O:0)+(N>=8192?N-16384:N),(k?"":"$")+(H?qs(N):Fs(N))}var u={51:["FALSE",0],52:["TRUE",0],70:["LEN",1],80:["SUM",69],81:["AVERAGEA",69],82:["COUNTA",69],83:["MINA",69],84:["MAXA",69],111:["T",1]},i=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];function f(O,N){ou(O,0);for(var H=[],k=0,V="",G="",U="",Y="";O.l<O.length;){var ee=O[O.l++];switch(ee){case 0:H.push(O.read_shift(8,"f"));break;case 1:G=n(N[0].c,O.read_shift(2),!0),V=n(N[0].r,O.read_shift(2),!1),H.push(G+V);break;case 2:{var re=n(N[0].c,O.read_shift(2),!0),ie=n(N[0].r,O.read_shift(2),!1);G=n(N[0].c,O.read_shift(2),!0),V=n(N[0].r,O.read_shift(2),!1),H.push(re+ie+":"+G+V)}break;case 3:if(O.l<O.length){console.error("WK1 premature formula end");return}break;case 4:H.push("("+H.pop()+")");break;case 5:H.push(O.read_shift(2));break;case 6:{for(var se="";ee=O[O.l++];)se+=String.fromCharCode(ee);H.push('"'+se.replace(/"/g,'""')+'"')}break;case 8:H.push("-"+H.pop());break;case 23:H.push("+"+H.pop());break;case 22:H.push("NOT("+H.pop()+")");break;case 20:case 21:Y=H.pop(),U=H.pop(),H.push(["AND","OR"][ee-20]+"("+U+","+Y+")");break;default:if(ee<32&&i[ee])Y=H.pop(),U=H.pop(),H.push(U+i[ee]+Y);else if(u[ee]){if(k=u[ee][1],k==69&&(k=O[O.l++]),k>H.length){console.error("WK1 bad formula parse 0x"+ee.toString(16)+":|"+H.join("|")+"|");return}var ce=H.slice(-k);H.length-=k,H.push(u[ee][0]+"("+ce.join(",")+")")}else return ee<=7?console.error("WK1 invalid opcode "+ee.toString(16)):ee<=24?console.error("WK1 unsupported op "+ee.toString(16)):ee<=30?console.error("WK1 invalid opcode "+ee.toString(16)):ee<=115?console.error("WK1 unsupported function opcode "+ee.toString(16)):console.error("WK1 unrecognized opcode "+ee.toString(16))}}H.length==1?N[1].f=""+H[0]:console.error("WK1 bad formula parse |"+H.join("|")+"|")}function g(O){var N=[{c:0,r:0},{t:"n",v:0},0];return N[0].r=O.read_shift(2),N[3]=O[O.l++],N[0].c=O[O.l++],N}function h(O,N){var H=g(O);return H[1].t="s",H[1].v=O.read_shift(N-4,"cstr"),H}function b(O,N,H,k){var V=Gn(6+k.length);V.write_shift(2,O),V.write_shift(1,H),V.write_shift(1,N),V.write_shift(1,39);for(var G=0;G<k.length;++G){var U=k.charCodeAt(G);V.write_shift(1,U>=128?95:U)}return V.write_shift(1,0),V}function p(O,N){var H=g(O);H[1].v=O.read_shift(2);var k=H[1].v>>1;if(H[1].v&1)switch(k&7){case 0:k=(k>>3)*5e3;break;case 1:k=(k>>3)*500;break;case 2:k=(k>>3)/20;break;case 3:k=(k>>3)/200;break;case 4:k=(k>>3)/2e3;break;case 5:k=(k>>3)/2e4;break;case 6:k=(k>>3)/16;break;case 7:k=(k>>3)/64;break}return H[1].v=k,H}function E(O,N){var H=g(O),k=O.read_shift(4),V=O.read_shift(4),G=O.read_shift(2);if(G==65535)return k===0&&V===3221225472?(H[1].t="e",H[1].v=15):k===0&&V===3489660928?(H[1].t="e",H[1].v=42):H[1].v=0,H;var U=G&32768;return G=(G&32767)-16446,H[1].v=(1-U*2)*(V*Math.pow(2,G+32)+k*Math.pow(2,G)),H}function c(O,N,H,k){var V=Gn(14);if(V.write_shift(2,O),V.write_shift(1,H),V.write_shift(1,N),k==0)return V.write_shift(4,0),V.write_shift(4,0),V.write_shift(2,65535),V;var G=0,U=0,Y=0,ee=0;return k<0&&(G=1,k=-k),U=Math.log2(k)|0,k/=Math.pow(2,U-31),ee=k>>>0,ee&2147483648||(k/=2,++U,ee=k>>>0),k-=ee,ee|=2147483648,ee>>>=0,k*=Math.pow(2,32),Y=k>>>0,V.write_shift(4,Y),V.write_shift(4,ee),U+=16383+(G?32768:0),V.write_shift(2,U),V}function l(O,N){var H=E(O);return O.l+=N-14,H}function m(O,N){var H=g(O),k=O.read_shift(4);return H[1].v=k>>6,H}function M(O,N){var H=g(O),k=O.read_shift(8,"f");return H[1].v=k,H}function L(O,N){var H=M(O);return O.l+=N-10,H}function D(O,N){return O[O.l+N-1]==0?O.read_shift(N,"cstr"):""}function A(O,N){var H=O[O.l++];H>N-1&&(H=N-1);for(var k="";k.length<H;)k+=String.fromCharCode(O[O.l++]);return k}function C(O,N,H){if(!(!H.qpro||N<21)){var k=O.read_shift(1);O.l+=17,O.l+=1,O.l+=2;var V=O.read_shift(N-21,"cstr");return[k,V]}}function S(O,N){for(var H={},k=O.l+N;O.l<k;){var V=O.read_shift(2);if(V==14e3){for(H[V]=[0,""],H[V][0]=O.read_shift(2);O[O.l];)H[V][1]+=String.fromCharCode(O[O.l]),O.l++;O.l++}}return H}function o(O,N){var H=Gn(5+O.length);H.write_shift(2,14e3),H.write_shift(2,N);for(var k=0;k<O.length;++k){var V=O.charCodeAt(k);H[H.l++]=V>127?95:V}return H[H.l++]=0,H}var R={0:{n:"BOF",f:LS},1:{n:"EOF"},2:{n:"CALCMODE"},3:{n:"CALCORDER"},4:{n:"SPLIT"},5:{n:"SYNC"},6:{n:"RANGE",f:B},7:{n:"WINDOW1"},8:{n:"COLW1"},9:{n:"WINTWO"},10:{n:"COLW2"},11:{n:"NAME"},12:{n:"BLANK"},13:{n:"INTEGER",f:_},14:{n:"NUMBER",f:v},15:{n:"LABEL",f:P},16:{n:"FORMULA",f:r},24:{n:"TABLE"},25:{n:"ORANGE"},26:{n:"PRANGE"},27:{n:"SRANGE"},28:{n:"FRANGE"},29:{n:"KRANGE1"},32:{n:"HRANGE"},35:{n:"KRANGE2"},36:{n:"PROTEC"},37:{n:"FOOTER"},38:{n:"HEADER"},39:{n:"SETUP"},40:{n:"MARGINS"},41:{n:"LABELFMT"},42:{n:"TITLES"},43:{n:"SHEETJS"},45:{n:"GRAPH"},46:{n:"NGRAPH"},47:{n:"CALCCOUNT"},48:{n:"UNFORMATTED"},49:{n:"CURSORW12"},50:{n:"WINDOW"},51:{n:"STRING",f:P},55:{n:"PASSWORD"},56:{n:"LOCKED"},60:{n:"QUERY"},61:{n:"QUERYNAME"},62:{n:"PRINT"},63:{n:"PRINTNAME"},64:{n:"GRAPH2"},65:{n:"GRAPHNAME"},66:{n:"ZOOM"},67:{n:"SYMSPLIT"},68:{n:"NSROWS"},69:{n:"NSCOLS"},70:{n:"RULER"},71:{n:"NNAME"},72:{n:"ACOMM"},73:{n:"AMACRO"},74:{n:"PARSE"},102:{n:"PRANGES??"},103:{n:"RRANGES??"},104:{n:"FNAME??"},105:{n:"MRANGES??"},204:{n:"SHEETNAMECS",f:D},222:{n:"SHEETNAMELP",f:A},65535:{n:""}},T={0:{n:"BOF"},1:{n:"EOF"},2:{n:"PASSWORD"},3:{n:"CALCSET"},4:{n:"WINDOWSET"},5:{n:"SHEETCELLPTR"},6:{n:"SHEETLAYOUT"},7:{n:"COLUMNWIDTH"},8:{n:"HIDDENCOLUMN"},9:{n:"USERRANGE"},10:{n:"SYSTEMRANGE"},11:{n:"ZEROFORCE"},12:{n:"SORTKEYDIR"},13:{n:"FILESEAL"},14:{n:"DATAFILLNUMS"},15:{n:"PRINTMAIN"},16:{n:"PRINTSTRING"},17:{n:"GRAPHMAIN"},18:{n:"GRAPHSTRING"},19:{n:"??"},20:{n:"ERRCELL"},21:{n:"NACELL"},22:{n:"LABEL16",f:h},23:{n:"NUMBER17",f:E},24:{n:"NUMBER18",f:p},25:{n:"FORMULA19",f:l},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:S},28:{n:"DTLABELMISC"},29:{n:"DTLABELCELL"},30:{n:"GRAPHWINDOW"},31:{n:"CPA"},32:{n:"LPLAUTO"},33:{n:"QUERY"},34:{n:"HIDDENSHEET"},35:{n:"??"},37:{n:"NUMBER25",f:m},38:{n:"??"},39:{n:"NUMBER27",f:M},40:{n:"FORMULA28",f:L},142:{n:"??"},147:{n:"??"},150:{n:"??"},151:{n:"??"},152:{n:"??"},153:{n:"??"},154:{n:"??"},155:{n:"??"},156:{n:"??"},163:{n:"??"},174:{n:"??"},175:{n:"??"},176:{n:"??"},177:{n:"??"},184:{n:"??"},185:{n:"??"},186:{n:"??"},187:{n:"??"},188:{n:"??"},195:{n:"??"},201:{n:"??"},204:{n:"SHEETNAMECS",f:D},205:{n:"??"},206:{n:"??"},207:{n:"??"},208:{n:"??"},256:{n:"??"},259:{n:"??"},260:{n:"??"},261:{n:"??"},262:{n:"??"},263:{n:"??"},265:{n:"??"},266:{n:"??"},267:{n:"??"},268:{n:"??"},270:{n:"??"},271:{n:"??"},384:{n:"??"},389:{n:"??"},390:{n:"??"},393:{n:"??"},396:{n:"??"},512:{n:"??"},514:{n:"??"},513:{n:"??"},516:{n:"??"},517:{n:"??"},640:{n:"??"},641:{n:"??"},642:{n:"??"},643:{n:"??"},644:{n:"??"},645:{n:"??"},646:{n:"??"},647:{n:"??"},648:{n:"??"},658:{n:"??"},659:{n:"??"},660:{n:"??"},661:{n:"??"},662:{n:"??"},665:{n:"??"},666:{n:"??"},768:{n:"??"},772:{n:"??"},1537:{n:"SHEETINFOQP",f:C},1600:{n:"??"},1602:{n:"??"},1793:{n:"??"},1794:{n:"??"},1795:{n:"??"},1796:{n:"??"},1920:{n:"??"},2048:{n:"??"},2049:{n:"??"},2052:{n:"??"},2688:{n:"??"},10998:{n:"??"},12849:{n:"??"},28233:{n:"??"},28484:{n:"??"},65535:{n:""}};return{sheet_to_wk1:W,book_to_wk3:K,to_workbook:s}}(),s_=/^\s|\s$|[\t\n\r]/;function FS(t,s){if(!s.bookSST)return"";var w=[$o];w[w.length]=Sa("sst",null,{xmlns:T0[0],count:t.Count,uniqueCount:t.Unique});for(var W=0;W!=t.length;++W)if(t[W]!=null){var K=t[W],de="<si>";K.r?de+=K.r:(de+="<t",K.t||(K.t=""),K.t.match(s_)&&(de+=' xml:space="preserve"'),de+=">"+Wi(K.t)+"</t>"),de+="</si>",w[w.length]=de}return w.length>2&&(w[w.length]="</sst>",w[1]=w[1].replace("/>",">")),w.join("")}function l_(t){return[t.read_shift(4),t.read_shift(4)]}function u_(t,s){return s||(s=Gn(8)),s.write_shift(4,t.Count),s.write_shift(4,t.Unique),s}var f_=eP;function c_(t){var s=Hl();ea(s,159,u_(t));for(var w=0;w<t.length;++w)ea(s,19,f_(t[w]));return ea(s,160),s.end()}function h_(t){for(var s=[],w=t.split(""),W=0;W<w.length;++W)s[W]=w[W].charCodeAt(0);return s}function kS(t){var s=0,w,W=h_(t),K=W.length+1,de,z,B,e,d;for(w=qv(K),w[0]=W.length,de=1;de!=K;++de)w[de]=W[de-1];for(de=K-1;de>=0;--de)z=w[de],B=s&16384?1:0,e=s<<1&32767,d=B|e,s=d^z;return s^52811}var v_=function(){function t(K,de){switch(de.type){case"base64":return s(Kc(K),de);case"binary":return s(K,de);case"buffer":return s(zi&&Buffer.isBuffer(K)?K.toString("binary"):tg(K),de);case"array":return s(_y(K),de)}throw new Error("Unrecognized type "+de.type)}function s(K,de){var z=de||{},B=z.dense?[]:{},e=K.match(/\\trowd.*?\\row\b/g);if(!e.length)throw new Error("RTF missing table");var d={s:{c:0,r:0},e:{c:0,r:e.length-1}};return e.forEach(function(P,a){Array.isArray(B)&&(B[a]=[]);for(var _=/\\\w+\b/g,x=0,v,y=-1;v=_.exec(P);){switch(v[0]){case"\\cell":var r=P.slice(x,_.lastIndex-v[0].length);if(r[0]==" "&&(r=r.slice(1)),++y,r.length){var n={v:r,t:"s"};Array.isArray(B)?B[a][y]=n:B[Xi({r:a,c:y})]=n}break}x=_.lastIndex}y>d.e.c&&(d.e.c=y)}),B["!ref"]=Jo(d),B}function w(K,de){return id(t(K,de),de)}function W(K){for(var de=["{\\rtf1\\ansi"],z=lo(K["!ref"]),B,e=Array.isArray(K),d=z.s.r;d<=z.e.r;++d){de.push("\\trowd\\trautofit1");for(var P=z.s.c;P<=z.e.c;++P)de.push("\\cellx"+(P+1));for(de.push("\\pard\\intbl"),P=z.s.c;P<=z.e.c;++P){var a=Xi({r:d,c:P});B=e?(K[d]||[])[P]:K[a],!(!B||B.v==null&&(!B.f||B.F))&&(de.push(" "+(B.w||(Jc(B),B.w))),de.push("\\cell"))}de.push("\\pard\\intbl\\row")}return de.join("")+"}"}return{to_workbook:w,to_sheet:t,from_sheet:W}}();function ZT(t){for(var s=0,w=1;s!=3;++s)w=w*256+(t[s]>255?255:t[s]<0?0:t[s]);return w.toString(16).toUpperCase().slice(1)}var d_=6,Wc=d_;function ay(t){return Math.floor((t+Math.round(128/Wc)/256)*Wc)}function iy(t){return Math.floor((t-5)/Wc*100+.5)/100}function c2(t){return Math.round((t*Wc+5)/Wc*256)/256}function D3(t){t.width?(t.wpx=ay(t.width),t.wch=iy(t.wpx),t.MDW=Wc):t.wpx?(t.wch=iy(t.wpx),t.width=c2(t.wch),t.MDW=Wc):typeof t.wch=="number"&&(t.width=c2(t.wch),t.wpx=ay(t.width),t.MDW=Wc),t.customWidth&&delete t.customWidth}var p_=96,OS=p_;function oy(t){return t*96/OS}function zS(t){return t*OS/96}function g_(t){var s=["<numFmts>"];return[[5,8],[23,26],[41,44],[50,392]].forEach(function(w){for(var W=w[0];W<=w[1];++W)t[W]!=null&&(s[s.length]=Sa("numFmt",null,{numFmtId:W,formatCode:Wi(t[W])}))}),s.length===1?"":(s[s.length]="</numFmts>",s[0]=Sa("numFmts",null,{count:s.length-2}).replace("/>",">"),s.join(""))}function y_(t){var s=[];return s[s.length]=Sa("cellXfs",null),t.forEach(function(w){s[s.length]=Sa("xf",null,w)}),s[s.length]="</cellXfs>",s.length===2?"":(s[0]=Sa("cellXfs",null,{count:s.length-2}).replace("/>",">"),s.join(""))}function NS(t,s){var w=[$o,Sa("styleSheet",null,{xmlns:T0[0],"xmlns:vt":ps.vt})],W;return t.SSF&&(W=g_(t.SSF))!=null&&(w[w.length]=W),w[w.length]='<fonts count="1"><font><sz val="12"/><color theme="1"/><name val="Calibri"/><family val="2"/><scheme val="minor"/></font></fonts>',w[w.length]='<fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills>',w[w.length]='<borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders>',w[w.length]='<cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>',(W=y_(s.cellXfs))&&(w[w.length]=W),w[w.length]='<cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles>',w[w.length]='<dxfs count="0"/>',w[w.length]='<tableStyles count="0" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleMedium4"/>',w.length>2&&(w[w.length]="</styleSheet>",w[1]=w[1].replace("/>",">")),w.join("")}function m_(t,s){var w=t.read_shift(2),W=el(t);return[w,W]}function x_(t,s,w){w||(w=Gn(6+4*s.length)),w.write_shift(2,t),ys(s,w);var W=w.length>w.l?w.slice(0,w.l):w;return w.l==null&&(w.l=w.length),W}function b_(t,s,w){var W={};W.sz=t.read_shift(2)/20;var K=sP(t);K.fItalic&&(W.italic=1),K.fCondense&&(W.condense=1),K.fExtend&&(W.extend=1),K.fShadow&&(W.shadow=1),K.fOutline&&(W.outline=1),K.fStrikeout&&(W.strike=1);var de=t.read_shift(2);switch(de===700&&(W.bold=1),t.read_shift(2)){case 1:W.vertAlign="superscript";break;case 2:W.vertAlign="subscript";break}var z=t.read_shift(1);z!=0&&(W.underline=z);var B=t.read_shift(1);B>0&&(W.family=B);var e=t.read_shift(1);switch(e>0&&(W.charset=e),t.l++,W.color=oP(t),t.read_shift(1)){case 1:W.scheme="major";break;case 2:W.scheme="minor";break}return W.name=el(t),W}function w_(t,s){s||(s=Gn(25+4*32)),s.write_shift(2,t.sz*20),lP(t,s),s.write_shift(2,t.bold?700:400);var w=0;t.vertAlign=="superscript"?w=1:t.vertAlign=="subscript"&&(w=2),s.write_shift(2,w),s.write_shift(1,t.underline||0),s.write_shift(1,t.family||0),s.write_shift(1,t.charset||0),s.write_shift(1,0),ry(t.color,s);var W=0;return t.scheme=="major"&&(W=1),t.scheme=="minor"&&(W=2),s.write_shift(1,W),ys(t.name,s),s.length>s.l?s.slice(0,s.l):s}var T_=["none","solid","mediumGray","darkGray","lightGray","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"],$m,A_=ac;function jT(t,s){s||(s=Gn(4*3+8*7+16*1)),$m||($m=b3(T_));var w=$m[t.patternType];w==null&&(w=40),s.write_shift(4,w);var W=0;if(w!=40)for(ry({auto:1},s),ry({auto:1},s);W<12;++W)s.write_shift(4,0);else{for(;W<4;++W)s.write_shift(4,0);for(;W<12;++W)s.write_shift(4,0)}return s.length>s.l?s.slice(0,s.l):s}function S_(t,s){var w=t.l+s,W=t.read_shift(2),K=t.read_shift(2);return t.l=w,{ixfe:W,numFmtId:K}}function BS(t,s,w){w||(w=Gn(16)),w.write_shift(2,s||0),w.write_shift(2,t.numFmtId||0),w.write_shift(2,0),w.write_shift(2,0),w.write_shift(2,0),w.write_shift(1,0),w.write_shift(1,0);var W=0;return w.write_shift(1,W),w.write_shift(1,0),w.write_shift(1,0),w.write_shift(1,0),w}function ap(t,s){return s||(s=Gn(10)),s.write_shift(1,0),s.write_shift(1,0),s.write_shift(4,0),s.write_shift(4,0),s}var E_=ac;function M_(t,s){return s||(s=Gn(51)),s.write_shift(1,0),ap(null,s),ap(null,s),ap(null,s),ap(null,s),ap(null,s),s.length>s.l?s.slice(0,s.l):s}function C_(t,s){return s||(s=Gn(12+4*10)),s.write_shift(4,t.xfId),s.write_shift(2,1),s.write_shift(1,+t.builtinId),s.write_shift(1,0),ty(t.name||"",s),s.length>s.l?s.slice(0,s.l):s}function L_(t,s,w){var W=Gn(2052);return W.write_shift(4,t),ty(s,W),ty(w,W),W.length>W.l?W.slice(0,W.l):W}function P_(t,s){if(s){var w=0;[[5,8],[23,26],[41,44],[50,392]].forEach(function(W){for(var K=W[0];K<=W[1];++K)s[K]!=null&&++w}),w!=0&&(ea(t,615,Mf(w)),[[5,8],[23,26],[41,44],[50,392]].forEach(function(W){for(var K=W[0];K<=W[1];++K)s[K]!=null&&ea(t,44,x_(K,s[K]))}),ea(t,616))}}function __(t){var s=1;ea(t,611,Mf(s)),ea(t,43,w_({sz:12,color:{theme:1},name:"Calibri",family:2,scheme:"minor"})),ea(t,612)}function R_(t){var s=2;ea(t,603,Mf(s)),ea(t,45,jT({patternType:"none"})),ea(t,45,jT({patternType:"gray125"})),ea(t,604)}function D_(t){var s=1;ea(t,613,Mf(s)),ea(t,46,M_()),ea(t,614)}function I_(t){var s=1;ea(t,626,Mf(s)),ea(t,47,BS({numFmtId:0,fontId:0,fillId:0,borderId:0},65535)),ea(t,627)}function F_(t,s){ea(t,617,Mf(s.length)),s.forEach(function(w){ea(t,47,BS(w,0))}),ea(t,618)}function k_(t){var s=1;ea(t,619,Mf(s)),ea(t,48,C_({xfId:0,builtinId:0,name:"Normal"})),ea(t,620)}function O_(t){var s=0;ea(t,505,Mf(s)),ea(t,506)}function z_(t){var s=0;ea(t,508,L_(s,"TableStyleMedium9","PivotStyleMedium4")),ea(t,509)}function N_(t,s){var w=Hl();return ea(w,278),P_(w,t.SSF),__(w),R_(w),D_(w),I_(w),F_(w,s.cellXfs),k_(w),O_(w),z_(w),ea(w,279),w.end()}function US(t,s){if(s&&s.themeXLSX)return s.themeXLSX;if(t&&typeof t.raw=="string")return t.raw;var w=[$o];return w[w.length]='<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme">',w[w.length]="<a:themeElements>",w[w.length]='<a:clrScheme name="Office">',w[w.length]='<a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1>',w[w.length]='<a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1>',w[w.length]='<a:dk2><a:srgbClr val="1F497D"/></a:dk2>',w[w.length]='<a:lt2><a:srgbClr val="EEECE1"/></a:lt2>',w[w.length]='<a:accent1><a:srgbClr val="4F81BD"/></a:accent1>',w[w.length]='<a:accent2><a:srgbClr val="C0504D"/></a:accent2>',w[w.length]='<a:accent3><a:srgbClr val="9BBB59"/></a:accent3>',w[w.length]='<a:accent4><a:srgbClr val="8064A2"/></a:accent4>',w[w.length]='<a:accent5><a:srgbClr val="4BACC6"/></a:accent5>',w[w.length]='<a:accent6><a:srgbClr val="F79646"/></a:accent6>',w[w.length]='<a:hlink><a:srgbClr val="0000FF"/></a:hlink>',w[w.length]='<a:folHlink><a:srgbClr val="800080"/></a:folHlink>',w[w.length]="</a:clrScheme>",w[w.length]='<a:fontScheme name="Office">',w[w.length]="<a:majorFont>",w[w.length]='<a:latin typeface="Cambria"/>',w[w.length]='<a:ea typeface=""/>',w[w.length]='<a:cs typeface=""/>',w[w.length]='<a:font script="Jpan" typeface="MS Pゴシック"/>',w[w.length]='<a:font script="Hang" typeface="맑은 고딕"/>',w[w.length]='<a:font script="Hans" typeface="宋体"/>',w[w.length]='<a:font script="Hant" typeface="新細明體"/>',w[w.length]='<a:font script="Arab" typeface="Times New Roman"/>',w[w.length]='<a:font script="Hebr" typeface="Times New Roman"/>',w[w.length]='<a:font script="Thai" typeface="Tahoma"/>',w[w.length]='<a:font script="Ethi" typeface="Nyala"/>',w[w.length]='<a:font script="Beng" typeface="Vrinda"/>',w[w.length]='<a:font script="Gujr" typeface="Shruti"/>',w[w.length]='<a:font script="Khmr" typeface="MoolBoran"/>',w[w.length]='<a:font script="Knda" typeface="Tunga"/>',w[w.length]='<a:font script="Guru" typeface="Raavi"/>',w[w.length]='<a:font script="Cans" typeface="Euphemia"/>',w[w.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',w[w.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',w[w.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',w[w.length]='<a:font script="Thaa" typeface="MV Boli"/>',w[w.length]='<a:font script="Deva" typeface="Mangal"/>',w[w.length]='<a:font script="Telu" typeface="Gautami"/>',w[w.length]='<a:font script="Taml" typeface="Latha"/>',w[w.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',w[w.length]='<a:font script="Orya" typeface="Kalinga"/>',w[w.length]='<a:font script="Mlym" typeface="Kartika"/>',w[w.length]='<a:font script="Laoo" typeface="DokChampa"/>',w[w.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',w[w.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',w[w.length]='<a:font script="Viet" typeface="Times New Roman"/>',w[w.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',w[w.length]='<a:font script="Geor" typeface="Sylfaen"/>',w[w.length]="</a:majorFont>",w[w.length]="<a:minorFont>",w[w.length]='<a:latin typeface="Calibri"/>',w[w.length]='<a:ea typeface=""/>',w[w.length]='<a:cs typeface=""/>',w[w.length]='<a:font script="Jpan" typeface="MS Pゴシック"/>',w[w.length]='<a:font script="Hang" typeface="맑은 고딕"/>',w[w.length]='<a:font script="Hans" typeface="宋体"/>',w[w.length]='<a:font script="Hant" typeface="新細明體"/>',w[w.length]='<a:font script="Arab" typeface="Arial"/>',w[w.length]='<a:font script="Hebr" typeface="Arial"/>',w[w.length]='<a:font script="Thai" typeface="Tahoma"/>',w[w.length]='<a:font script="Ethi" typeface="Nyala"/>',w[w.length]='<a:font script="Beng" typeface="Vrinda"/>',w[w.length]='<a:font script="Gujr" typeface="Shruti"/>',w[w.length]='<a:font script="Khmr" typeface="DaunPenh"/>',w[w.length]='<a:font script="Knda" typeface="Tunga"/>',w[w.length]='<a:font script="Guru" typeface="Raavi"/>',w[w.length]='<a:font script="Cans" typeface="Euphemia"/>',w[w.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',w[w.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',w[w.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',w[w.length]='<a:font script="Thaa" typeface="MV Boli"/>',w[w.length]='<a:font script="Deva" typeface="Mangal"/>',w[w.length]='<a:font script="Telu" typeface="Gautami"/>',w[w.length]='<a:font script="Taml" typeface="Latha"/>',w[w.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',w[w.length]='<a:font script="Orya" typeface="Kalinga"/>',w[w.length]='<a:font script="Mlym" typeface="Kartika"/>',w[w.length]='<a:font script="Laoo" typeface="DokChampa"/>',w[w.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',w[w.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',w[w.length]='<a:font script="Viet" typeface="Arial"/>',w[w.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',w[w.length]='<a:font script="Geor" typeface="Sylfaen"/>',w[w.length]="</a:minorFont>",w[w.length]="</a:fontScheme>",w[w.length]='<a:fmtScheme name="Office">',w[w.length]="<a:fillStyleLst>",w[w.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',w[w.length]='<a:gradFill rotWithShape="1">',w[w.length]="<a:gsLst>",w[w.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',w[w.length]='<a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',w[w.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',w[w.length]="</a:gsLst>",w[w.length]='<a:lin ang="16200000" scaled="1"/>',w[w.length]="</a:gradFill>",w[w.length]='<a:gradFill rotWithShape="1">',w[w.length]="<a:gsLst>",w[w.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="100000"/><a:shade val="100000"/><a:satMod val="130000"/></a:schemeClr></a:gs>',w[w.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="50000"/><a:shade val="100000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',w[w.length]="</a:gsLst>",w[w.length]='<a:lin ang="16200000" scaled="0"/>',w[w.length]="</a:gradFill>",w[w.length]="</a:fillStyleLst>",w[w.length]="<a:lnStyleLst>",w[w.length]='<a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"><a:shade val="95000"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln>',w[w.length]='<a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',w[w.length]='<a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',w[w.length]="</a:lnStyleLst>",w[w.length]="<a:effectStyleLst>",w[w.length]="<a:effectStyle>",w[w.length]="<a:effectLst>",w[w.length]='<a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw>',w[w.length]="</a:effectLst>",w[w.length]="</a:effectStyle>",w[w.length]="<a:effectStyle>",w[w.length]="<a:effectLst>",w[w.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',w[w.length]="</a:effectLst>",w[w.length]="</a:effectStyle>",w[w.length]="<a:effectStyle>",w[w.length]="<a:effectLst>",w[w.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',w[w.length]="</a:effectLst>",w[w.length]='<a:scene3d><a:camera prst="orthographicFront"><a:rot lat="0" lon="0" rev="0"/></a:camera><a:lightRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRig></a:scene3d>',w[w.length]='<a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d>',w[w.length]="</a:effectStyle>",w[w.length]="</a:effectStyleLst>",w[w.length]="<a:bgFillStyleLst>",w[w.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',w[w.length]='<a:gradFill rotWithShape="1">',w[w.length]="<a:gsLst>",w[w.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',w[w.length]='<a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',w[w.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs>',w[w.length]="</a:gsLst>",w[w.length]='<a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path>',w[w.length]="</a:gradFill>",w[w.length]='<a:gradFill rotWithShape="1">',w[w.length]="<a:gsLst>",w[w.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',w[w.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs>',w[w.length]="</a:gsLst>",w[w.length]='<a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path>',w[w.length]="</a:gradFill>",w[w.length]="</a:bgFillStyleLst>",w[w.length]="</a:fmtScheme>",w[w.length]="</a:themeElements>",w[w.length]="<a:objectDefaults>",w[w.length]="<a:spDef>",w[w.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="1"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="3"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="2"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="lt1"/></a:fontRef></a:style>',w[w.length]="</a:spDef>",w[w.length]="<a:lnDef>",w[w.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style>',w[w.length]="</a:lnDef>",w[w.length]="</a:objectDefaults>",w[w.length]="<a:extraClrSchemeLst/>",w[w.length]="</a:theme>",w.join("")}function B_(t,s){return{flags:t.read_shift(4),version:t.read_shift(4),name:el(t)}}function U_(t){var s=Gn(12+2*t.name.length);return s.write_shift(4,t.flags),s.write_shift(4,t.version),ys(t.name,s),s.slice(0,s.l)}function H_(t){for(var s=[],w=t.read_shift(4);w-- >0;)s.push([t.read_shift(4),t.read_shift(4)]);return s}function V_(t){var s=Gn(4+8*t.length);s.write_shift(4,t.length);for(var w=0;w<t.length;++w)s.write_shift(4,t[w][0]),s.write_shift(4,t[w][1]);return s}function G_(t,s){var w=Gn(8+2*s.length);return w.write_shift(4,t),ys(s,w),w.slice(0,w.l)}function W_(t){return t.l+=4,t.read_shift(4)!=0}function Y_(t,s){var w=Gn(8);return w.write_shift(4,t),w.write_shift(4,s?1:0),w}function X_(){var t=Hl();return ea(t,332),ea(t,334,Mf(1)),ea(t,335,U_({name:"XLDAPR",version:12e4,flags:3496657072})),ea(t,336),ea(t,339,G_(1,"XLDAPR")),ea(t,52),ea(t,35,Mf(514)),ea(t,4096,Mf(0)),ea(t,4097,ku(1)),ea(t,36),ea(t,53),ea(t,340),ea(t,337,Y_(1,!0)),ea(t,51,V_([[1,0]])),ea(t,338),ea(t,333),t.end()}function HS(){var t=[$o];return t.push(`<metadata xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:xlrd="http://schemas.microsoft.com/office/spreadsheetml/2017/richdata" xmlns:xda="http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray">
<metadataTypes count="1">
<metadataType name="XLDAPR" minSupportedVersion="120000" copy="1" pasteAll="1" pasteValues="1" merge="1" splitFirst="1" rowColShift="1" clearFormats="1" clearComments="1" assign="1" coerce="1" cellMeta="1"/>
</metadataTypes>
<futureMetadata name="XLDAPR" count="1">
<bk>
<extLst>
<ext uri="{bdbb8cdc-fa1e-496e-a857-3c3f30c029c3}">
<xda:dynamicArrayProperties fDynamic="1" fCollapsed="0"/>
</ext>
</extLst>
</bk>
</futureMetadata>
<cellMetadata count="1">
<bk>
<rc t="1" v="0"/>
</bk>
</cellMetadata>
</metadata>`),t.join("")}function Z_(t){var s={};s.i=t.read_shift(4);var w={};w.r=t.read_shift(4),w.c=t.read_shift(4),s.r=Xi(w);var W=t.read_shift(1);return W&2&&(s.l="1"),W&8&&(s.a="1"),s}var e0=1024;function VS(t,s){for(var w=[21600,21600],W=["m0,0l0",w[1],w[0],w[1],w[0],"0xe"].join(","),K=[Sa("xml",null,{"xmlns:v":su.v,"xmlns:o":su.o,"xmlns:x":su.x,"xmlns:mv":su.mv}).replace(/\/>/,">"),Sa("o:shapelayout",Sa("o:idmap",null,{"v:ext":"edit",data:t}),{"v:ext":"edit"}),Sa("v:shapetype",[Sa("v:stroke",null,{joinstyle:"miter"}),Sa("v:path",null,{gradientshapeok:"t","o:connecttype":"rect"})].join(""),{id:"_x0000_t202","o:spt":202,coordsize:w.join(","),path:W})];e0<t*1e3;)e0+=1e3;return s.forEach(function(de){var z=gs(de[0]),B={color2:"#BEFF82",type:"gradient"};B.type=="gradient"&&(B.angle="-180");var e=B.type=="gradient"?Sa("o:fill",null,{type:"gradientUnscaled","v:ext":"view"}):null,d=Sa("v:fill",e,B),P={on:"t",obscured:"t"};++e0,K=K.concat(["<v:shape"+Zp({id:"_x0000_s"+e0,type:"#_x0000_t202",style:"position:absolute; margin-left:80pt;margin-top:5pt;width:104pt;height:64pt;z-index:10"+(de[1].hidden?";visibility:hidden":""),fillcolor:"#ECFAD4",strokecolor:"#edeaa1"})+">",d,Sa("v:shadow",null,P),Sa("v:path",null,{"o:connecttype":"none"}),'<v:textbox><div style="text-align:left"></div></v:textbox>','<x:ClientData ObjectType="Note">',"<x:MoveWithCells/>","<x:SizeWithCells/>",Ds("x:Anchor",[z.c+1,0,z.r+1,0,z.c+3,20,z.r+5,20].join(",")),Ds("x:AutoFill","False"),Ds("x:Row",String(z.r)),Ds("x:Column",String(z.c)),de[1].hidden?"":"<x:Visible/>","</x:ClientData>","</v:shape>"])}),K.push("</xml>"),K.join("")}function GS(t){var s=[$o,Sa("comments",null,{xmlns:T0[0]})],w=[];return s.push("<authors>"),t.forEach(function(W){W[1].forEach(function(K){var de=Wi(K.a);w.indexOf(de)==-1&&(w.push(de),s.push("<author>"+de+"</author>")),K.T&&K.ID&&w.indexOf("tc="+K.ID)==-1&&(w.push("tc="+K.ID),s.push("<author>tc="+K.ID+"</author>"))})}),w.length==0&&(w.push("SheetJ5"),s.push("<author>SheetJ5</author>")),s.push("</authors>"),s.push("<commentList>"),t.forEach(function(W){var K=0,de=[];if(W[1][0]&&W[1][0].T&&W[1][0].ID?K=w.indexOf("tc="+W[1][0].ID):W[1].forEach(function(e){e.a&&(K=w.indexOf(Wi(e.a))),de.push(e.t||"")}),s.push('<comment ref="'+W[0]+'" authorId="'+K+'"><text>'),de.length<=1)s.push(Ds("t",Wi(de[0]||"")));else{for(var z=`Comment:
`+de[0]+`
`,B=1;B<de.length;++B)z+=`Reply:
`+de[B]+`
`;s.push(Ds("t",Wi(z)))}s.push("</text></comment>")}),s.push("</commentList>"),s.length>2&&(s[s.length]="</comments>",s[1]=s[1].replace("/>",">")),s.join("")}function j_(t,s,w){var W=[$o,Sa("ThreadedComments",null,{xmlns:ps.TCMNT}).replace(/[\/]>/,">")];return t.forEach(function(K){var de="";(K[1]||[]).forEach(function(z,B){if(!z.T){delete z.ID;return}z.a&&s.indexOf(z.a)==-1&&s.push(z.a);var e={ref:K[0],id:"{54EE7951-7262-4200-6969-"+("000000000000"+w.tcid++).slice(-12)+"}"};B==0?de=e.id:e.parentId=de,z.ID=e.id,z.a&&(e.personId="{54EE7950-7262-4200-6969-"+("000000000000"+s.indexOf(z.a)).slice(-12)+"}"),W.push(Sa("threadedComment",Ds("text",z.t||""),e))})}),W.push("</ThreadedComments>"),W.join("")}function K_(t){var s=[$o,Sa("personList",null,{xmlns:ps.TCMNT,"xmlns:x":T0[0]}).replace(/[\/]>/,">")];return t.forEach(function(w,W){s.push(Sa("person",null,{displayName:w,id:"{54EE7950-7262-4200-6969-"+("000000000000"+W).slice(-12)+"}",userId:w,providerId:"None"}))}),s.push("</personList>"),s.join("")}function J_(t){var s={};s.iauthor=t.read_shift(4);var w=ud(t);return s.rfx=w.s,s.ref=Xi(w.s),t.l+=16,s}function $_(t,s){return s==null&&(s=Gn(36)),s.write_shift(4,t[1].iauthor),S0(t[0],s),s.write_shift(4,0),s.write_shift(4,0),s.write_shift(4,0),s.write_shift(4,0),s}var Q_=el;function q_(t){return ys(t.slice(0,54))}function eR(t){var s=Hl(),w=[];return ea(s,628),ea(s,630),t.forEach(function(W){W[1].forEach(function(K){w.indexOf(K.a)>-1||(w.push(K.a.slice(0,54)),ea(s,632,q_(K.a)))})}),ea(s,631),ea(s,633),t.forEach(function(W){W[1].forEach(function(K){K.iauthor=w.indexOf(K.a);var de={s:gs(W[0]),e:gs(W[0])};ea(s,635,$_([de,K])),K.t&&K.t.length>0&&ea(s,637,rP(K)),ea(s,636),delete K.iauthor})}),ea(s,634),ea(s,629),s.end()}function tR(t,s){s.FullPaths.forEach(function(w,W){if(W!=0){var K=w.replace(/[^\/]*[\/]/,"/_VBA_PROJECT_CUR/");K.slice(-1)!=="/"&&Ki.utils.cfb_add(t,K,s.FileIndex[W].content)}})}var WS=["xlsb","xlsm","xlam","biff8","xla"],rR=function(){var t=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,s={r:0,c:0};function w(W,K,de,z){var B=!1,e=!1;de.length==0?e=!0:de.charAt(0)=="["&&(e=!0,de=de.slice(1,-1)),z.length==0?B=!0:z.charAt(0)=="["&&(B=!0,z=z.slice(1,-1));var d=de.length>0?parseInt(de,10)|0:0,P=z.length>0?parseInt(z,10)|0:0;return B?P+=s.c:--P,e?d+=s.r:--d,K+(B?"":"$")+qs(P)+(e?"":"$")+Fs(d)}return function(K,de){return s=de,K.replace(t,w)}}(),I3=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g,F3=function(){return function(s,w){return s.replace(I3,function(W,K,de,z,B,e){var d=C3(z)-(de?0:w.c),P=M3(e)-(B?0:w.r),a=P==0?"":B?P+1:"["+P+"]",_=d==0?"":de?d+1:"["+d+"]";return K+"R"+a+"C"+_})}}();function nR(t,s){return t.replace(I3,function(w,W,K,de,z,B){return W+(K=="$"?K+de:qs(C3(de)+s.c))+(z=="$"?z+B:Fs(M3(B)+s.r))})}function aR(t){return t.length!=1}function jo(t){t.l+=1}function ev(t,s){var w=t.read_shift(s==1?1:2);return[w&16383,w>>14&1,w>>15&1]}function YS(t,s,w){var W=2;if(w){if(w.biff>=2&&w.biff<=5)return XS(t);w.biff==12&&(W=4)}var K=t.read_shift(W),de=t.read_shift(W),z=ev(t,2),B=ev(t,2);return{s:{r:K,c:z[0],cRel:z[1],rRel:z[2]},e:{r:de,c:B[0],cRel:B[1],rRel:B[2]}}}function XS(t){var s=ev(t,2),w=ev(t,2),W=t.read_shift(1),K=t.read_shift(1);return{s:{r:s[0],c:W,cRel:s[1],rRel:s[2]},e:{r:w[0],c:K,cRel:w[1],rRel:w[2]}}}function iR(t,s,w){if(w.biff<8)return XS(t);var W=t.read_shift(w.biff==12?4:2),K=t.read_shift(w.biff==12?4:2),de=ev(t,2),z=ev(t,2);return{s:{r:W,c:de[0],cRel:de[1],rRel:de[2]},e:{r:K,c:z[0],cRel:z[1],rRel:z[2]}}}function ZS(t,s,w){if(w&&w.biff>=2&&w.biff<=5)return oR(t);var W=t.read_shift(w&&w.biff==12?4:2),K=ev(t,2);return{r:W,c:K[0],cRel:K[1],rRel:K[2]}}function oR(t){var s=ev(t,2),w=t.read_shift(1);return{r:s[0],c:w,cRel:s[1],rRel:s[2]}}function sR(t){var s=t.read_shift(2),w=t.read_shift(2);return{r:s,c:w&255,fQuoted:!!(w&16384),cRel:w>>15,rRel:w>>15}}function lR(t,s,w){var W=w&&w.biff?w.biff:8;if(W>=2&&W<=5)return uR(t);var K=t.read_shift(W>=12?4:2),de=t.read_shift(2),z=(de&16384)>>14,B=(de&32768)>>15;if(de&=16383,B==1)for(;K>524287;)K-=1048576;if(z==1)for(;de>8191;)de=de-16384;return{r:K,c:de,cRel:z,rRel:B}}function uR(t){var s=t.read_shift(2),w=t.read_shift(1),W=(s&32768)>>15,K=(s&16384)>>14;return s&=16383,W==1&&s>=8192&&(s=s-16384),K==1&&w>=128&&(w=w-256),{r:s,c:w,cRel:K,rRel:W}}function fR(t,s,w){var W=(t[t.l++]&96)>>5,K=YS(t,w.biff>=2&&w.biff<=5?6:8,w);return[W,K]}function cR(t,s,w){var W=(t[t.l++]&96)>>5,K=t.read_shift(2,"i"),de=8;if(w)switch(w.biff){case 5:t.l+=12,de=6;break;case 12:de=12;break}var z=YS(t,de,w);return[W,K,z]}function hR(t,s,w){var W=(t[t.l++]&96)>>5;return t.l+=w&&w.biff>8?12:w.biff<8?6:8,[W]}function vR(t,s,w){var W=(t[t.l++]&96)>>5,K=t.read_shift(2),de=8;if(w)switch(w.biff){case 5:t.l+=12,de=6;break;case 12:de=12;break}return t.l+=de,[W,K]}function dR(t,s,w){var W=(t[t.l++]&96)>>5,K=iR(t,s-1,w);return[W,K]}function pR(t,s,w){var W=(t[t.l++]&96)>>5;return t.l+=w.biff==2?6:w.biff==12?14:7,[W]}function KT(t){var s=t[t.l+1]&1,w=1;return t.l+=4,[s,w]}function gR(t,s,w){t.l+=2;for(var W=t.read_shift(w&&w.biff==2?1:2),K=[],de=0;de<=W;++de)K.push(t.read_shift(w&&w.biff==2?1:2));return K}function yR(t,s,w){var W=t[t.l+1]&255?1:0;return t.l+=2,[W,t.read_shift(w&&w.biff==2?1:2)]}function mR(t,s,w){var W=t[t.l+1]&255?1:0;return t.l+=2,[W,t.read_shift(w&&w.biff==2?1:2)]}function xR(t){var s=t[t.l+1]&255?1:0;return t.l+=2,[s,t.read_shift(2)]}function bR(t,s,w){var W=t[t.l+1]&255?1:0;return t.l+=w&&w.biff==2?3:4,[W]}function jS(t){var s=t.read_shift(1),w=t.read_shift(1);return[s,w]}function wR(t){return t.read_shift(2),jS(t)}function TR(t){return t.read_shift(2),jS(t)}function AR(t,s,w){var W=(t[t.l]&96)>>5;t.l+=1;var K=ZS(t,0,w);return[W,K]}function SR(t,s,w){var W=(t[t.l]&96)>>5;t.l+=1;var K=lR(t,0,w);return[W,K]}function ER(t,s,w){var W=(t[t.l]&96)>>5;t.l+=1;var K=t.read_shift(2);w&&w.biff==5&&(t.l+=12);var de=ZS(t,0,w);return[W,K,de]}function MR(t,s,w){var W=(t[t.l]&96)>>5;t.l+=1;var K=t.read_shift(w&&w.biff<=3?1:2);return[MD[K],$S[K],W]}function CR(t,s,w){var W=t[t.l++],K=t.read_shift(1),de=w&&w.biff<=3?[W==88?-1:0,t.read_shift(1)]:LR(t);return[K,(de[0]===0?$S:ED)[de[1]]]}function LR(t){return[t[t.l+1]>>7,t.read_shift(2)&32767]}function PR(t,s,w){t.l+=w&&w.biff==2?3:4}function _R(t,s,w){if(t.l++,w&&w.biff==12)return[t.read_shift(4,"i"),0];var W=t.read_shift(2),K=t.read_shift(w&&w.biff==2?1:2);return[W,K]}function RR(t){return t.l++,ag[t.read_shift(1)]}function DR(t){return t.l++,t.read_shift(2)}function IR(t){return t.l++,t.read_shift(1)!==0}function FR(t){return t.l++,E0(t)}function kR(t,s,w){return t.l++,_S(t,s-1,w)}function OR(t,s){var w=[t.read_shift(1)];if(s==12)switch(w[0]){case 2:w[0]=4;break;case 4:w[0]=16;break;case 0:w[0]=1;break;case 1:w[0]=2;break}switch(w[0]){case 4:w[1]=EP(t,1)?"TRUE":"FALSE",s!=12&&(t.l+=7);break;case 37:case 16:w[1]=ag[t[t.l]],t.l+=s==12?4:8;break;case 0:t.l+=8;break;case 1:w[1]=E0(t);break;case 2:w[1]=PP(t,0,{biff:s>0&&s<8?2:s});break;default:throw new Error("Bad SerAr: "+w[0])}return w}function zR(t,s,w){for(var W=t.read_shift(w.biff==12?4:2),K=[],de=0;de!=W;++de)K.push((w.biff==12?ud:DP)(t));return K}function NR(t,s,w){var W=0,K=0;w.biff==12?(W=t.read_shift(4),K=t.read_shift(4)):(K=1+t.read_shift(1),W=1+t.read_shift(2)),w.biff>=2&&w.biff<8&&(--W,--K==0&&(K=256));for(var de=0,z=[];de!=W&&(z[de]=[]);++de)for(var B=0;B!=K;++B)z[de][B]=OR(t,w.biff);return z}function BR(t,s,w){var W=t.read_shift(1)>>>5&3,K=!w||w.biff>=8?4:2,de=t.read_shift(K);switch(w.biff){case 2:t.l+=5;break;case 3:case 4:t.l+=8;break;case 5:t.l+=12;break}return[W,0,de]}function UR(t,s,w){if(w.biff==5)return HR(t);var W=t.read_shift(1)>>>5&3,K=t.read_shift(2),de=t.read_shift(4);return[W,K,de]}function HR(t){var s=t.read_shift(1)>>>5&3,w=t.read_shift(2,"i");t.l+=8;var W=t.read_shift(2);return t.l+=12,[s,w,W]}function VR(t,s,w){var W=t.read_shift(1)>>>5&3;t.l+=w&&w.biff==2?3:4;var K=t.read_shift(w&&w.biff==2?1:2);return[W,K]}function GR(t,s,w){var W=t.read_shift(1)>>>5&3,K=t.read_shift(w&&w.biff==2?1:2);return[W,K]}function WR(t,s,w){var W=t.read_shift(1)>>>5&3;return t.l+=4,w.biff<8&&t.l--,w.biff==12&&(t.l+=2),[W]}function YR(t,s,w){var W=(t[t.l++]&96)>>5,K=t.read_shift(2),de=4;if(w)switch(w.biff){case 5:de=15;break;case 12:de=6;break}return t.l+=de,[W,K]}var XR=ac,ZR=ac,jR=ac;function ig(t,s,w){return t.l+=2,[sR(t)]}function k3(t){return t.l+=6,[]}var KR=ig,JR=k3,$R=k3,QR=ig;function KS(t){return t.l+=2,[LS(t),t.read_shift(2)&1]}var qR=ig,eD=KS,tD=k3,rD=ig,nD=ig,aD=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"];function iD(t){t.l+=2;var s=t.read_shift(2),w=t.read_shift(2),W=t.read_shift(4),K=t.read_shift(2),de=t.read_shift(2),z=aD[w>>2&31];return{ixti:s,coltype:w&3,rt:z,idx:W,c:K,C:de}}function oD(t){return t.l+=2,[t.read_shift(4)]}function sD(t,s,w){return t.l+=5,t.l+=2,t.l+=w.biff==2?1:4,["PTGSHEET"]}function lD(t,s,w){return t.l+=w.biff==2?4:5,["PTGENDSHEET"]}function uD(t){var s=t.read_shift(1)>>>5&3,w=t.read_shift(2);return[s,w]}function fD(t){var s=t.read_shift(1)>>>5&3,w=t.read_shift(2);return[s,w]}function cD(t){return t.l+=4,[0,0]}var JT={1:{n:"PtgExp",f:_R},2:{n:"PtgTbl",f:jR},3:{n:"PtgAdd",f:jo},4:{n:"PtgSub",f:jo},5:{n:"PtgMul",f:jo},6:{n:"PtgDiv",f:jo},7:{n:"PtgPower",f:jo},8:{n:"PtgConcat",f:jo},9:{n:"PtgLt",f:jo},10:{n:"PtgLe",f:jo},11:{n:"PtgEq",f:jo},12:{n:"PtgGe",f:jo},13:{n:"PtgGt",f:jo},14:{n:"PtgNe",f:jo},15:{n:"PtgIsect",f:jo},16:{n:"PtgUnion",f:jo},17:{n:"PtgRange",f:jo},18:{n:"PtgUplus",f:jo},19:{n:"PtgUminus",f:jo},20:{n:"PtgPercent",f:jo},21:{n:"PtgParen",f:jo},22:{n:"PtgMissArg",f:jo},23:{n:"PtgStr",f:kR},26:{n:"PtgSheet",f:sD},27:{n:"PtgEndSheet",f:lD},28:{n:"PtgErr",f:RR},29:{n:"PtgBool",f:IR},30:{n:"PtgInt",f:DR},31:{n:"PtgNum",f:FR},32:{n:"PtgArray",f:pR},33:{n:"PtgFunc",f:MR},34:{n:"PtgFuncVar",f:CR},35:{n:"PtgName",f:BR},36:{n:"PtgRef",f:AR},37:{n:"PtgArea",f:fR},38:{n:"PtgMemArea",f:VR},39:{n:"PtgMemErr",f:XR},40:{n:"PtgMemNoMem",f:ZR},41:{n:"PtgMemFunc",f:GR},42:{n:"PtgRefErr",f:WR},43:{n:"PtgAreaErr",f:hR},44:{n:"PtgRefN",f:SR},45:{n:"PtgAreaN",f:dR},46:{n:"PtgMemAreaN",f:uD},47:{n:"PtgMemNoMemN",f:fD},57:{n:"PtgNameX",f:UR},58:{n:"PtgRef3d",f:ER},59:{n:"PtgArea3d",f:cR},60:{n:"PtgRefErr3d",f:YR},61:{n:"PtgAreaErr3d",f:vR},255:{}},hD={64:32,96:32,65:33,97:33,66:34,98:34,67:35,99:35,68:36,100:36,69:37,101:37,70:38,102:38,71:39,103:39,72:40,104:40,73:41,105:41,74:42,106:42,75:43,107:43,76:44,108:44,77:45,109:45,78:46,110:46,79:47,111:47,88:34,120:34,89:57,121:57,90:58,122:58,91:59,123:59,92:60,124:60,93:61,125:61},vD={1:{n:"PtgElfLel",f:KS},2:{n:"PtgElfRw",f:rD},3:{n:"PtgElfCol",f:KR},6:{n:"PtgElfRwV",f:nD},7:{n:"PtgElfColV",f:QR},10:{n:"PtgElfRadical",f:qR},11:{n:"PtgElfRadicalS",f:tD},13:{n:"PtgElfColS",f:JR},15:{n:"PtgElfColSV",f:$R},16:{n:"PtgElfRadicalLel",f:eD},25:{n:"PtgList",f:iD},29:{n:"PtgSxName",f:oD},255:{}},dD={0:{n:"PtgAttrNoop",f:cD},1:{n:"PtgAttrSemi",f:bR},2:{n:"PtgAttrIf",f:mR},4:{n:"PtgAttrChoose",f:gR},8:{n:"PtgAttrGoto",f:yR},16:{n:"PtgAttrSum",f:PR},32:{n:"PtgAttrBaxcel",f:KT},33:{n:"PtgAttrBaxcel",f:KT},64:{n:"PtgAttrSpace",f:wR},65:{n:"PtgAttrSpaceSemi",f:TR},128:{n:"PtgAttrIfError",f:xR},255:{}};function pD(t,s,w,W){if(W.biff<8)return ac(t,s);for(var K=t.l+s,de=[],z=0;z!==w.length;++z)switch(w[z][0]){case"PtgArray":w[z][1]=NR(t,0,W),de.push(w[z][1]);break;case"PtgMemArea":w[z][2]=zR(t,w[z][1],W),de.push(w[z][2]);break;case"PtgExp":W&&W.biff==12&&(w[z][1][1]=t.read_shift(4),de.push(w[z][1]));break;case"PtgList":case"PtgElfRadicalS":case"PtgElfColS":case"PtgElfColSV":throw"Unsupported "+w[z][0]}return s=K-t.l,s!==0&&de.push(ac(t,s)),de}function gD(t,s,w){for(var W=t.l+s,K,de,z=[];W!=t.l;)s=W-t.l,de=t[t.l],K=JT[de]||JT[hD[de]],(de===24||de===25)&&(K=(de===24?vD:dD)[t[t.l+1]]),!K||!K.f?ac(t,s):z.push([K.n,K.f(t,s,w)]);return z}function yD(t){for(var s=[],w=0;w<t.length;++w){for(var W=t[w],K=[],de=0;de<W.length;++de){var z=W[de];if(z)switch(z[0]){case 2:K.push('"'+z[1].replace(/"/g,'""')+'"');break;default:K.push(z[1])}else K.push("")}s.push(K.join(","))}return s.join(";")}var mD={PtgAdd:"+",PtgConcat:"&",PtgDiv:"/",PtgEq:"=",PtgGe:">=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function xD(t,s){if(!t&&!(s&&s.biff<=5&&s.biff>=2))throw new Error("empty sheet name");return/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(t)?"'"+t+"'":t}function JS(t,s,w){if(!t)return"SH33TJSERR0";if(w.biff>8&&(!t.XTI||!t.XTI[s]))return t.SheetNames[s];if(!t.XTI)return"SH33TJSERR6";var W=t.XTI[s];if(w.biff<8)return s>1e4&&(s-=65536),s<0&&(s=-s),s==0?"":t.XTI[s-1];if(!W)return"SH33TJSERR1";var K="";if(w.biff>8)switch(t[W[0]][0]){case 357:return K=W[1]==-1?"#REF":t.SheetNames[W[1]],W[1]==W[2]?K:K+":"+t.SheetNames[W[2]];case 358:return w.SID!=null?t.SheetNames[w.SID]:"SH33TJSSAME"+t[W[0]][0];case 355:default:return"SH33TJSSRC"+t[W[0]][0]}switch(t[W[0]][0][0]){case 1025:return K=W[1]==-1?"#REF":t.SheetNames[W[1]]||"SH33TJSERR3",W[1]==W[2]?K:K+":"+t.SheetNames[W[2]];case 14849:return t[W[0]].slice(1).map(function(de){return de.Name}).join(";;");default:return t[W[0]][0][3]?(K=W[1]==-1?"#REF":t[W[0]][0][3][W[1]]||"SH33TJSERR4",W[1]==W[2]?K:K+":"+t[W[0]][0][3][W[2]]):"SH33TJSERR2"}}function $T(t,s,w){var W=JS(t,s,w);return W=="#REF"?W:xD(W,w)}function m0(t,s,w,W,K){var de=K&&K.biff||8,z={s:{c:0,r:0},e:{c:0,r:0}},B=[],e,d,P,a=0,_=0,x,v="";if(!t[0]||!t[0][0])return"";for(var y=-1,r="",n=0,u=t[0].length;n<u;++n){var i=t[0][n];switch(i[0]){case"PtgUminus":B.push("-"+B.pop());break;case"PtgUplus":B.push("+"+B.pop());break;case"PtgPercent":B.push(B.pop()+"%");break;case"PtgAdd":case"PtgConcat":case"PtgDiv":case"PtgEq":case"PtgGe":case"PtgGt":case"PtgLe":case"PtgLt":case"PtgMul":case"PtgNe":case"PtgPower":case"PtgSub":if(e=B.pop(),d=B.pop(),y>=0){switch(t[0][y][1][0]){case 0:r=Do(" ",t[0][y][1][1]);break;case 1:r=Do("\r",t[0][y][1][1]);break;default:if(r="",K.WTF)throw new Error("Unexpected PtgAttrSpaceType "+t[0][y][1][0])}d=d+r,y=-1}B.push(d+mD[i[0]]+e);break;case"PtgIsect":e=B.pop(),d=B.pop(),B.push(d+" "+e);break;case"PtgUnion":e=B.pop(),d=B.pop(),B.push(d+","+e);break;case"PtgRange":e=B.pop(),d=B.pop(),B.push(d+":"+e);break;case"PtgAttrChoose":break;case"PtgAttrGoto":break;case"PtgAttrIf":break;case"PtgAttrIfError":break;case"PtgRef":P=Tp(i[1][1],z,K),B.push(Ap(P,de));break;case"PtgRefN":P=w?Tp(i[1][1],w,K):i[1][1],B.push(Ap(P,de));break;case"PtgRef3d":a=i[1][1],P=Tp(i[1][2],z,K),v=$T(W,a,K),B.push(v+"!"+Ap(P,de));break;case"PtgFunc":case"PtgFuncVar":var f=i[1][0],g=i[1][1];f||(f=0),f&=127;var h=f==0?[]:B.slice(-f);B.length-=f,g==="User"&&(g=h.shift()),B.push(g+"("+h.join(",")+")");break;case"PtgBool":B.push(i[1]?"TRUE":"FALSE");break;case"PtgInt":B.push(i[1]);break;case"PtgNum":B.push(String(i[1]));break;case"PtgStr":B.push('"'+i[1].replace(/"/g,'""')+'"');break;case"PtgErr":B.push(i[1]);break;case"PtgAreaN":x=kT(i[1][1],w?{s:w}:z,K),B.push(Km(x,K));break;case"PtgArea":x=kT(i[1][1],z,K),B.push(Km(x,K));break;case"PtgArea3d":a=i[1][1],x=i[1][2],v=$T(W,a,K),B.push(v+"!"+Km(x,K));break;case"PtgAttrSum":B.push("SUM("+B.pop()+")");break;case"PtgAttrBaxcel":case"PtgAttrSemi":break;case"PtgName":_=i[1][2];var b=(W.names||[])[_-1]||(W[0]||[])[_],p=b?b.Name:"SH33TJSNAME"+String(_);p&&p.slice(0,6)=="_xlfn."&&!K.xlfn&&(p=p.slice(6)),B.push(p);break;case"PtgNameX":var E=i[1][1];_=i[1][2];var c;if(K.biff<=5)E<0&&(E=-E),W[E]&&(c=W[E][_]);else{var l="";if(((W[E]||[])[0]||[])[0]==14849||(((W[E]||[])[0]||[])[0]==1025?W[E][_]&&W[E][_].itab>0&&(l=W.SheetNames[W[E][_].itab-1]+"!"):l=W.SheetNames[_-1]+"!"),W[E]&&W[E][_])l+=W[E][_].Name;else if(W[0]&&W[0][_])l+=W[0][_].Name;else{var m=(JS(W,E,K)||"").split(";;");m[_-1]?l=m[_-1]:l+="SH33TJSERRX"}B.push(l);break}c||(c={Name:"SH33TJSERRY"}),B.push(c.Name);break;case"PtgParen":var M="(",L=")";if(y>=0){switch(r="",t[0][y][1][0]){case 2:M=Do(" ",t[0][y][1][1])+M;break;case 3:M=Do("\r",t[0][y][1][1])+M;break;case 4:L=Do(" ",t[0][y][1][1])+L;break;case 5:L=Do("\r",t[0][y][1][1])+L;break;default:if(K.WTF)throw new Error("Unexpected PtgAttrSpaceType "+t[0][y][1][0])}y=-1}B.push(M+B.pop()+L);break;case"PtgRefErr":B.push("#REF!");break;case"PtgRefErr3d":B.push("#REF!");break;case"PtgExp":P={c:i[1][1],r:i[1][0]};var D={c:w.c,r:w.r};if(W.sharedf[Xi(P)]){var A=W.sharedf[Xi(P)];B.push(m0(A,z,D,W,K))}else{var C=!1;for(e=0;e!=W.arrayf.length;++e)if(d=W.arrayf[e],!(P.c<d[0].s.c||P.c>d[0].e.c)&&!(P.r<d[0].s.r||P.r>d[0].e.r)){B.push(m0(d[1],z,D,W,K)),C=!0;break}C||B.push(i[1])}break;case"PtgArray":B.push("{"+yD(i[1])+"}");break;case"PtgMemArea":break;case"PtgAttrSpace":case"PtgAttrSpaceSemi":y=n;break;case"PtgTbl":break;case"PtgMemErr":break;case"PtgMissArg":B.push("");break;case"PtgAreaErr":B.push("#REF!");break;case"PtgAreaErr3d":B.push("#REF!");break;case"PtgList":B.push("Table"+i[1].idx+"[#"+i[1].rt+"]");break;case"PtgMemAreaN":case"PtgMemNoMemN":case"PtgAttrNoop":case"PtgSheet":case"PtgEndSheet":break;case"PtgMemFunc":break;case"PtgMemNoMem":break;case"PtgElfCol":case"PtgElfColS":case"PtgElfColSV":case"PtgElfColV":case"PtgElfLel":case"PtgElfRadical":case"PtgElfRadicalLel":case"PtgElfRadicalS":case"PtgElfRw":case"PtgElfRwV":throw new Error("Unsupported ELFs");case"PtgSxName":throw new Error("Unrecognized Formula Token: "+String(i));default:throw new Error("Unrecognized Formula Token: "+String(i))}var S=["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"];if(K.biff!=3&&y>=0&&S.indexOf(t[0][n][0])==-1){i=t[0][y];var o=!0;switch(i[1][0]){case 4:o=!1;case 0:r=Do(" ",i[1][1]);break;case 5:o=!1;case 1:r=Do("\r",i[1][1]);break;default:if(r="",K.WTF)throw new Error("Unexpected PtgAttrSpaceType "+i[1][0])}B.push((o?r:"")+B.pop()+(o?"":r)),y=-1}}if(B.length>1&&K.WTF)throw new Error("bad formula stack");return B[0]}function bD(t){if(t==null){var s=Gn(8);return s.write_shift(1,3),s.write_shift(1,0),s.write_shift(2,0),s.write_shift(2,0),s.write_shift(2,65535),s}else if(typeof t=="number")return ed(t);return ed(0)}function wD(t,s,w,W,K){var de=td(s,w,K),z=bD(t.v),B=Gn(6),e=33;B.write_shift(2,e),B.write_shift(4,0);for(var d=Gn(t.bf.length),P=0;P<t.bf.length;++P)d[P]=t.bf[P];var a=Rs([de,z,B,d]);return a}function Ry(t,s,w){var W=t.read_shift(4),K=gD(t,W,w),de=t.read_shift(4),z=de>0?pD(t,de,K,w):null;return[K,z]}var TD=Ry,Dy=Ry,AD=Ry,SD=Ry,ED={0:"BEEP",1:"OPEN",2:"OPEN.LINKS",3:"CLOSE.ALL",4:"SAVE",5:"SAVE.AS",6:"FILE.DELETE",7:"PAGE.SETUP",8:"PRINT",9:"PRINTER.SETUP",10:"QUIT",11:"NEW.WINDOW",12:"ARRANGE.ALL",13:"WINDOW.SIZE",14:"WINDOW.MOVE",15:"FULL",16:"CLOSE",17:"RUN",22:"SET.PRINT.AREA",23:"SET.PRINT.TITLES",24:"SET.PAGE.BREAK",25:"REMOVE.PAGE.BREAK",26:"FONT",27:"DISPLAY",28:"PROTECT.DOCUMENT",29:"PRECISION",30:"A1.R1C1",31:"CALCULATE.NOW",32:"CALCULATION",34:"DATA.FIND",35:"EXTRACT",36:"DATA.DELETE",37:"SET.DATABASE",38:"SET.CRITERIA",39:"SORT",40:"DATA.SERIES",41:"TABLE",42:"FORMAT.NUMBER",43:"ALIGNMENT",44:"STYLE",45:"BORDER",46:"CELL.PROTECTION",47:"COLUMN.WIDTH",48:"UNDO",49:"CUT",50:"COPY",51:"PASTE",52:"CLEAR",53:"PASTE.SPECIAL",54:"EDIT.DELETE",55:"INSERT",56:"FILL.RIGHT",57:"FILL.DOWN",61:"DEFINE.NAME",62:"CREATE.NAMES",63:"FORMULA.GOTO",64:"FORMULA.FIND",65:"SELECT.LAST.CELL",66:"SHOW.ACTIVE.CELL",67:"GALLERY.AREA",68:"GALLERY.BAR",69:"GALLERY.COLUMN",70:"GALLERY.LINE",71:"GALLERY.PIE",72:"GALLERY.SCATTER",73:"COMBINATION",74:"PREFERRED",75:"ADD.OVERLAY",76:"GRIDLINES",77:"SET.PREFERRED",78:"AXES",79:"LEGEND",80:"ATTACH.TEXT",81:"ADD.ARROW",82:"SELECT.CHART",83:"SELECT.PLOT.AREA",84:"PATTERNS",85:"MAIN.CHART",86:"OVERLAY",87:"SCALE",88:"FORMAT.LEGEND",89:"FORMAT.TEXT",90:"EDIT.REPEAT",91:"PARSE",92:"JUSTIFY",93:"HIDE",94:"UNHIDE",95:"WORKSPACE",96:"FORMULA",97:"FORMULA.FILL",98:"FORMULA.ARRAY",99:"DATA.FIND.NEXT",100:"DATA.FIND.PREV",101:"FORMULA.FIND.NEXT",102:"FORMULA.FIND.PREV",103:"ACTIVATE",104:"ACTIVATE.NEXT",105:"ACTIVATE.PREV",106:"UNLOCKED.NEXT",107:"UNLOCKED.PREV",108:"COPY.PICTURE",109:"SELECT",110:"DELETE.NAME",111:"DELETE.FORMAT",112:"VLINE",113:"HLINE",114:"VPAGE",115:"HPAGE",116:"VSCROLL",117:"HSCROLL",118:"ALERT",119:"NEW",120:"CANCEL.COPY",121:"SHOW.CLIPBOARD",122:"MESSAGE",124:"PASTE.LINK",125:"APP.ACTIVATE",126:"DELETE.ARROW",127:"ROW.HEIGHT",128:"FORMAT.MOVE",129:"FORMAT.SIZE",130:"FORMULA.REPLACE",131:"SEND.KEYS",132:"SELECT.SPECIAL",133:"APPLY.NAMES",134:"REPLACE.FONT",135:"FREEZE.PANES",136:"SHOW.INFO",137:"SPLIT",138:"ON.WINDOW",139:"ON.DATA",140:"DISABLE.INPUT",142:"OUTLINE",143:"LIST.NAMES",144:"FILE.CLOSE",145:"SAVE.WORKBOOK",146:"DATA.FORM",147:"COPY.CHART",148:"ON.TIME",149:"WAIT",150:"FORMAT.FONT",151:"FILL.UP",152:"FILL.LEFT",153:"DELETE.OVERLAY",155:"SHORT.MENUS",159:"SET.UPDATE.STATUS",161:"COLOR.PALETTE",162:"DELETE.STYLE",163:"WINDOW.RESTORE",164:"WINDOW.MAXIMIZE",166:"CHANGE.LINK",167:"CALCULATE.DOCUMENT",168:"ON.KEY",169:"APP.RESTORE",170:"APP.MOVE",171:"APP.SIZE",172:"APP.MINIMIZE",173:"APP.MAXIMIZE",174:"BRING.TO.FRONT",175:"SEND.TO.BACK",185:"MAIN.CHART.TYPE",186:"OVERLAY.CHART.TYPE",187:"SELECT.END",188:"OPEN.MAIL",189:"SEND.MAIL",190:"STANDARD.FONT",191:"CONSOLIDATE",192:"SORT.SPECIAL",193:"GALLERY.3D.AREA",194:"GALLERY.3D.COLUMN",195:"GALLERY.3D.LINE",196:"GALLERY.3D.PIE",197:"VIEW.3D",198:"GOAL.SEEK",199:"WORKGROUP",200:"FILL.GROUP",201:"UPDATE.LINK",202:"PROMOTE",203:"DEMOTE",204:"SHOW.DETAIL",206:"UNGROUP",207:"OBJECT.PROPERTIES",208:"SAVE.NEW.OBJECT",209:"SHARE",210:"SHARE.NAME",211:"DUPLICATE",212:"APPLY.STYLE",213:"ASSIGN.TO.OBJECT",214:"OBJECT.PROTECTION",215:"HIDE.OBJECT",216:"SET.EXTRACT",217:"CREATE.PUBLISHER",218:"SUBSCRIBE.TO",219:"ATTRIBUTES",220:"SHOW.TOOLBAR",222:"PRINT.PREVIEW",223:"EDIT.COLOR",224:"SHOW.LEVELS",225:"FORMAT.MAIN",226:"FORMAT.OVERLAY",227:"ON.RECALC",228:"EDIT.SERIES",229:"DEFINE.STYLE",240:"LINE.PRINT",243:"ENTER.DATA",249:"GALLERY.RADAR",250:"MERGE.STYLES",251:"EDITION.OPTIONS",252:"PASTE.PICTURE",253:"PASTE.PICTURE.LINK",254:"SPELLING",256:"ZOOM",259:"INSERT.OBJECT",260:"WINDOW.MINIMIZE",265:"SOUND.NOTE",266:"SOUND.PLAY",267:"FORMAT.SHAPE",268:"EXTEND.POLYGON",269:"FORMAT.AUTO",272:"GALLERY.3D.BAR",273:"GALLERY.3D.SURFACE",274:"FILL.AUTO",276:"CUSTOMIZE.TOOLBAR",277:"ADD.TOOL",278:"EDIT.OBJECT",279:"ON.DOUBLECLICK",280:"ON.ENTRY",281:"WORKBOOK.ADD",282:"WORKBOOK.MOVE",283:"WORKBOOK.COPY",284:"WORKBOOK.OPTIONS",285:"SAVE.WORKSPACE",288:"CHART.WIZARD",289:"DELETE.TOOL",290:"MOVE.TOOL",291:"WORKBOOK.SELECT",292:"WORKBOOK.ACTIVATE",293:"ASSIGN.TO.TOOL",295:"COPY.TOOL",296:"RESET.TOOL",297:"CONSTRAIN.NUMERIC",298:"PASTE.TOOL",302:"WORKBOOK.NEW",305:"SCENARIO.CELLS",306:"SCENARIO.DELETE",307:"SCENARIO.ADD",308:"SCENARIO.EDIT",309:"SCENARIO.SHOW",310:"SCENARIO.SHOW.NEXT",311:"SCENARIO.SUMMARY",312:"PIVOT.TABLE.WIZARD",313:"PIVOT.FIELD.PROPERTIES",314:"PIVOT.FIELD",315:"PIVOT.ITEM",316:"PIVOT.ADD.FIELDS",318:"OPTIONS.CALCULATION",319:"OPTIONS.EDIT",320:"OPTIONS.VIEW",321:"ADDIN.MANAGER",322:"MENU.EDITOR",323:"ATTACH.TOOLBARS",324:"VBAActivate",325:"OPTIONS.CHART",328:"VBA.INSERT.FILE",330:"VBA.PROCEDURE.DEFINITION",336:"ROUTING.SLIP",338:"ROUTE.DOCUMENT",339:"MAIL.LOGON",342:"INSERT.PICTURE",343:"EDIT.TOOL",344:"GALLERY.DOUGHNUT",350:"CHART.TREND",352:"PIVOT.ITEM.PROPERTIES",354:"WORKBOOK.INSERT",355:"OPTIONS.TRANSITION",356:"OPTIONS.GENERAL",370:"FILTER.ADVANCED",373:"MAIL.ADD.MAILER",374:"MAIL.DELETE.MAILER",375:"MAIL.REPLY",376:"MAIL.REPLY.ALL",377:"MAIL.FORWARD",378:"MAIL.NEXT.LETTER",379:"DATA.LABEL",380:"INSERT.TITLE",381:"FONT.PROPERTIES",382:"MACRO.OPTIONS",383:"WORKBOOK.HIDE",384:"WORKBOOK.UNHIDE",385:"WORKBOOK.DELETE",386:"WORKBOOK.NAME",388:"GALLERY.CUSTOM",390:"ADD.CHART.AUTOFORMAT",391:"DELETE.CHART.AUTOFORMAT",392:"CHART.ADD.DATA",393:"AUTO.OUTLINE",394:"TAB.ORDER",395:"SHOW.DIALOG",396:"SELECT.ALL",397:"UNGROUP.SHEETS",398:"SUBTOTAL.CREATE",399:"SUBTOTAL.REMOVE",400:"RENAME.OBJECT",412:"WORKBOOK.SCROLL",413:"WORKBOOK.NEXT",414:"WORKBOOK.PREV",415:"WORKBOOK.TAB.SPLIT",416:"FULL.SCREEN",417:"WORKBOOK.PROTECT",420:"SCROLLBAR.PROPERTIES",421:"PIVOT.SHOW.PAGES",422:"TEXT.TO.COLUMNS",423:"FORMAT.CHARTTYPE",424:"LINK.FORMAT",425:"TRACER.DISPLAY",430:"TRACER.NAVIGATE",431:"TRACER.CLEAR",432:"TRACER.ERROR",433:"PIVOT.FIELD.GROUP",434:"PIVOT.FIELD.UNGROUP",435:"CHECKBOX.PROPERTIES",436:"LABEL.PROPERTIES",437:"LISTBOX.PROPERTIES",438:"EDITBOX.PROPERTIES",439:"PIVOT.REFRESH",440:"LINK.COMBO",441:"OPEN.TEXT",442:"HIDE.DIALOG",443:"SET.DIALOG.FOCUS",444:"ENABLE.OBJECT",445:"PUSHBUTTON.PROPERTIES",446:"SET.DIALOG.DEFAULT",447:"FILTER",448:"FILTER.SHOW.ALL",449:"CLEAR.OUTLINE",450:"FUNCTION.WIZARD",451:"ADD.LIST.ITEM",452:"SET.LIST.ITEM",453:"REMOVE.LIST.ITEM",454:"SELECT.LIST.ITEM",455:"SET.CONTROL.VALUE",456:"SAVE.COPY.AS",458:"OPTIONS.LISTS.ADD",459:"OPTIONS.LISTS.DELETE",460:"SERIES.AXES",461:"SERIES.X",462:"SERIES.Y",463:"ERRORBAR.X",464:"ERRORBAR.Y",465:"FORMAT.CHART",466:"SERIES.ORDER",467:"MAIL.LOGOFF",468:"CLEAR.ROUTING.SLIP",469:"APP.ACTIVATE.MICROSOFT",470:"MAIL.EDIT.MAILER",471:"ON.SHEET",472:"STANDARD.WIDTH",473:"SCENARIO.MERGE",474:"SUMMARY.INFO",475:"FIND.FILE",476:"ACTIVE.CELL.FONT",477:"ENABLE.TIPWIZARD",478:"VBA.MAKE.ADDIN",480:"INSERTDATATABLE",481:"WORKGROUP.OPTIONS",482:"MAIL.SEND.MAILER",485:"AUTOCORRECT",489:"POST.DOCUMENT",491:"PICKLIST",493:"VIEW.SHOW",494:"VIEW.DEFINE",495:"VIEW.DELETE",509:"SHEET.BACKGROUND",510:"INSERT.MAP.OBJECT",511:"OPTIONS.MENONO",517:"MSOCHECKS",518:"NORMAL",519:"LAYOUT",520:"RM.PRINT.AREA",521:"CLEAR.PRINT.AREA",522:"ADD.PRINT.AREA",523:"MOVE.BRK",545:"HIDECURR.NOTE",546:"HIDEALL.NOTES",547:"DELETE.NOTE",548:"TRAVERSE.NOTES",549:"ACTIVATE.NOTES",620:"PROTECT.REVISIONS",621:"UNPROTECT.REVISIONS",647:"OPTIONS.ME",653:"WEB.PUBLISH",667:"NEWWEBQUERY",673:"PIVOT.TABLE.CHART",753:"OPTIONS.SAVE",755:"OPTIONS.SPELL",808:"HIDEALL.INKANNOTS"},$S={0:"COUNT",1:"IF",2:"ISNA",3:"ISERROR",4:"SUM",5:"AVERAGE",6:"MIN",7:"MAX",8:"ROW",9:"COLUMN",10:"NA",11:"NPV",12:"STDEV",13:"DOLLAR",14:"FIXED",15:"SIN",16:"COS",17:"TAN",18:"ATAN",19:"PI",20:"SQRT",21:"EXP",22:"LN",23:"LOG10",24:"ABS",25:"INT",26:"SIGN",27:"ROUND",28:"LOOKUP",29:"INDEX",30:"REPT",31:"MID",32:"LEN",33:"VALUE",34:"TRUE",35:"FALSE",36:"AND",37:"OR",38:"NOT",39:"MOD",40:"DCOUNT",41:"DSUM",42:"DAVERAGE",43:"DMIN",44:"DMAX",45:"DSTDEV",46:"VAR",47:"DVAR",48:"TEXT",49:"LINEST",50:"TREND",51:"LOGEST",52:"GROWTH",53:"GOTO",54:"HALT",55:"RETURN",56:"PV",57:"FV",58:"NPER",59:"PMT",60:"RATE",61:"MIRR",62:"IRR",63:"RAND",64:"MATCH",65:"DATE",66:"TIME",67:"DAY",68:"MONTH",69:"YEAR",70:"WEEKDAY",71:"HOUR",72:"MINUTE",73:"SECOND",74:"NOW",75:"AREAS",76:"ROWS",77:"COLUMNS",78:"OFFSET",79:"ABSREF",80:"RELREF",81:"ARGUMENT",82:"SEARCH",83:"TRANSPOSE",84:"ERROR",85:"STEP",86:"TYPE",87:"ECHO",88:"SET.NAME",89:"CALLER",90:"DEREF",91:"WINDOWS",92:"SERIES",93:"DOCUMENTS",94:"ACTIVE.CELL",95:"SELECTION",96:"RESULT",97:"ATAN2",98:"ASIN",99:"ACOS",100:"CHOOSE",101:"HLOOKUP",102:"VLOOKUP",103:"LINKS",104:"INPUT",105:"ISREF",106:"GET.FORMULA",107:"GET.NAME",108:"SET.VALUE",109:"LOG",110:"EXEC",111:"CHAR",112:"LOWER",113:"UPPER",114:"PROPER",115:"LEFT",116:"RIGHT",117:"EXACT",118:"TRIM",119:"REPLACE",120:"SUBSTITUTE",121:"CODE",122:"NAMES",123:"DIRECTORY",124:"FIND",125:"CELL",126:"ISERR",127:"ISTEXT",128:"ISNUMBER",129:"ISBLANK",130:"T",131:"N",132:"FOPEN",133:"FCLOSE",134:"FSIZE",135:"FREADLN",136:"FREAD",137:"FWRITELN",138:"FWRITE",139:"FPOS",140:"DATEVALUE",141:"TIMEVALUE",142:"SLN",143:"SYD",144:"DDB",145:"GET.DEF",146:"REFTEXT",147:"TEXTREF",148:"INDIRECT",149:"REGISTER",150:"CALL",151:"ADD.BAR",152:"ADD.MENU",153:"ADD.COMMAND",154:"ENABLE.COMMAND",155:"CHECK.COMMAND",156:"RENAME.COMMAND",157:"SHOW.BAR",158:"DELETE.MENU",159:"DELETE.COMMAND",160:"GET.CHART.ITEM",161:"DIALOG.BOX",162:"CLEAN",163:"MDETERM",164:"MINVERSE",165:"MMULT",166:"FILES",167:"IPMT",168:"PPMT",169:"COUNTA",170:"CANCEL.KEY",171:"FOR",172:"WHILE",173:"BREAK",174:"NEXT",175:"INITIATE",176:"REQUEST",177:"POKE",178:"EXECUTE",179:"TERMINATE",180:"RESTART",181:"HELP",182:"GET.BAR",183:"PRODUCT",184:"FACT",185:"GET.CELL",186:"GET.WORKSPACE",187:"GET.WINDOW",188:"GET.DOCUMENT",189:"DPRODUCT",190:"ISNONTEXT",191:"GET.NOTE",192:"NOTE",193:"STDEVP",194:"VARP",195:"DSTDEVP",196:"DVARP",197:"TRUNC",198:"ISLOGICAL",199:"DCOUNTA",200:"DELETE.BAR",201:"UNREGISTER",204:"USDOLLAR",205:"FINDB",206:"SEARCHB",207:"REPLACEB",208:"LEFTB",209:"RIGHTB",210:"MIDB",211:"LENB",212:"ROUNDUP",213:"ROUNDDOWN",214:"ASC",215:"DBCS",216:"RANK",219:"ADDRESS",220:"DAYS360",221:"TODAY",222:"VDB",223:"ELSE",224:"ELSE.IF",225:"END.IF",226:"FOR.CELL",227:"MEDIAN",228:"SUMPRODUCT",229:"SINH",230:"COSH",231:"TANH",232:"ASINH",233:"ACOSH",234:"ATANH",235:"DGET",236:"CREATE.OBJECT",237:"VOLATILE",238:"LAST.ERROR",239:"CUSTOM.UNDO",240:"CUSTOM.REPEAT",241:"FORMULA.CONVERT",242:"GET.LINK.INFO",243:"TEXT.BOX",244:"INFO",245:"GROUP",246:"GET.OBJECT",247:"DB",248:"PAUSE",251:"RESUME",252:"FREQUENCY",253:"ADD.TOOLBAR",254:"DELETE.TOOLBAR",255:"User",256:"RESET.TOOLBAR",257:"EVALUATE",258:"GET.TOOLBAR",259:"GET.TOOL",260:"SPELLING.CHECK",261:"ERROR.TYPE",262:"APP.TITLE",263:"WINDOW.TITLE",264:"SAVE.TOOLBAR",265:"ENABLE.TOOL",266:"PRESS.TOOL",267:"REGISTER.ID",268:"GET.WORKBOOK",269:"AVEDEV",270:"BETADIST",271:"GAMMALN",272:"BETAINV",273:"BINOMDIST",274:"CHIDIST",275:"CHIINV",276:"COMBIN",277:"CONFIDENCE",278:"CRITBINOM",279:"EVEN",280:"EXPONDIST",281:"FDIST",282:"FINV",283:"FISHER",284:"FISHERINV",285:"FLOOR",286:"GAMMADIST",287:"GAMMAINV",288:"CEILING",289:"HYPGEOMDIST",290:"LOGNORMDIST",291:"LOGINV",292:"NEGBINOMDIST",293:"NORMDIST",294:"NORMSDIST",295:"NORMINV",296:"NORMSINV",297:"STANDARDIZE",298:"ODD",299:"PERMUT",300:"POISSON",301:"TDIST",302:"WEIBULL",303:"SUMXMY2",304:"SUMX2MY2",305:"SUMX2PY2",306:"CHITEST",307:"CORREL",308:"COVAR",309:"FORECAST",310:"FTEST",311:"INTERCEPT",312:"PEARSON",313:"RSQ",314:"STEYX",315:"SLOPE",316:"TTEST",317:"PROB",318:"DEVSQ",319:"GEOMEAN",320:"HARMEAN",321:"SUMSQ",322:"KURT",323:"SKEW",324:"ZTEST",325:"LARGE",326:"SMALL",327:"QUARTILE",328:"PERCENTILE",329:"PERCENTRANK",330:"MODE",331:"TRIMMEAN",332:"TINV",334:"MOVIE.COMMAND",335:"GET.MOVIE",336:"CONCATENATE",337:"POWER",338:"PIVOT.ADD.DATA",339:"GET.PIVOT.TABLE",340:"GET.PIVOT.FIELD",341:"GET.PIVOT.ITEM",342:"RADIANS",343:"DEGREES",344:"SUBTOTAL",345:"SUMIF",346:"COUNTIF",347:"COUNTBLANK",348:"SCENARIO.GET",349:"OPTIONS.LISTS.GET",350:"ISPMT",351:"DATEDIF",352:"DATESTRING",353:"NUMBERSTRING",354:"ROMAN",355:"OPEN.DIALOG",356:"SAVE.DIALOG",357:"VIEW.GET",358:"GETPIVOTDATA",359:"HYPERLINK",360:"PHONETIC",361:"AVERAGEA",362:"MAXA",363:"MINA",364:"STDEVPA",365:"VARPA",366:"STDEVA",367:"VARA",368:"BAHTTEXT",369:"THAIDAYOFWEEK",370:"THAIDIGIT",371:"THAIMONTHOFYEAR",372:"THAINUMSOUND",373:"THAINUMSTRING",374:"THAISTRINGLENGTH",375:"ISTHAIDIGIT",376:"ROUNDBAHTDOWN",377:"ROUNDBAHTUP",378:"THAIYEAR",379:"RTD",380:"CUBEVALUE",381:"CUBEMEMBER",382:"CUBEMEMBERPROPERTY",383:"CUBERANKEDMEMBER",384:"HEX2BIN",385:"HEX2DEC",386:"HEX2OCT",387:"DEC2BIN",388:"DEC2HEX",389:"DEC2OCT",390:"OCT2BIN",391:"OCT2HEX",392:"OCT2DEC",393:"BIN2DEC",394:"BIN2OCT",395:"BIN2HEX",396:"IMSUB",397:"IMDIV",398:"IMPOWER",399:"IMABS",400:"IMSQRT",401:"IMLN",402:"IMLOG2",403:"IMLOG10",404:"IMSIN",405:"IMCOS",406:"IMEXP",407:"IMARGUMENT",408:"IMCONJUGATE",409:"IMAGINARY",410:"IMREAL",411:"COMPLEX",412:"IMSUM",413:"IMPRODUCT",414:"SERIESSUM",415:"FACTDOUBLE",416:"SQRTPI",417:"QUOTIENT",418:"DELTA",419:"GESTEP",420:"ISEVEN",421:"ISODD",422:"MROUND",423:"ERF",424:"ERFC",425:"BESSELJ",426:"BESSELK",427:"BESSELY",428:"BESSELI",429:"XIRR",430:"XNPV",431:"PRICEMAT",432:"YIELDMAT",433:"INTRATE",434:"RECEIVED",435:"DISC",436:"PRICEDISC",437:"YIELDDISC",438:"TBILLEQ",439:"TBILLPRICE",440:"TBILLYIELD",441:"PRICE",442:"YIELD",443:"DOLLARDE",444:"DOLLARFR",445:"NOMINAL",446:"EFFECT",447:"CUMPRINC",448:"CUMIPMT",449:"EDATE",450:"EOMONTH",451:"YEARFRAC",452:"COUPDAYBS",453:"COUPDAYS",454:"COUPDAYSNC",455:"COUPNCD",456:"COUPNUM",457:"COUPPCD",458:"DURATION",459:"MDURATION",460:"ODDLPRICE",461:"ODDLYIELD",462:"ODDFPRICE",463:"ODDFYIELD",464:"RANDBETWEEN",465:"WEEKNUM",466:"AMORDEGRC",467:"AMORLINC",468:"CONVERT",724:"SHEETJS",469:"ACCRINT",470:"ACCRINTM",471:"WORKDAY",472:"NETWORKDAYS",473:"GCD",474:"MULTINOMIAL",475:"LCM",476:"FVSCHEDULE",477:"CUBEKPIMEMBER",478:"CUBESET",479:"CUBESETCOUNT",480:"IFERROR",481:"COUNTIFS",482:"SUMIFS",483:"AVERAGEIF",484:"AVERAGEIFS"},MD={2:1,3:1,10:0,15:1,16:1,17:1,18:1,19:0,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:2,30:2,31:3,32:1,33:1,34:0,35:0,38:1,39:2,40:3,41:3,42:3,43:3,44:3,45:3,47:3,48:2,53:1,61:3,63:0,65:3,66:3,67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:0,75:1,76:1,77:1,79:2,80:2,83:1,85:0,86:1,89:0,90:1,94:0,95:0,97:2,98:1,99:1,101:3,102:3,105:1,106:1,108:2,111:1,112:1,113:1,114:1,117:2,118:1,119:4,121:1,126:1,127:1,128:1,129:1,130:1,131:1,133:1,134:1,135:1,136:2,137:2,138:2,140:1,141:1,142:3,143:4,144:4,161:1,162:1,163:1,164:1,165:2,172:1,175:2,176:2,177:3,178:2,179:1,184:1,186:1,189:3,190:1,195:3,196:3,197:1,198:1,199:3,201:1,207:4,210:3,211:1,212:2,213:2,214:1,215:1,225:0,229:1,230:1,231:1,232:1,233:1,234:1,235:3,244:1,247:4,252:2,257:1,261:1,271:1,273:4,274:2,275:2,276:2,277:3,278:3,279:1,280:3,281:3,282:3,283:1,284:1,285:2,286:4,287:3,288:2,289:4,290:3,291:3,292:3,293:4,294:1,295:3,296:1,297:3,298:1,299:2,300:3,301:3,302:4,303:2,304:2,305:2,306:2,307:2,308:2,309:3,310:2,311:2,312:2,313:2,314:2,315:2,316:4,325:2,326:2,327:2,328:2,331:2,332:2,337:2,342:1,343:1,346:2,347:1,350:4,351:3,352:1,353:2,360:1,368:1,369:1,370:1,371:1,372:1,373:1,374:1,375:1,376:1,377:1,378:1,382:3,385:1,392:1,393:1,396:2,397:2,398:2,399:1,400:1,401:1,402:1,403:1,404:1,405:1,406:1,407:1,408:1,409:1,410:1,414:4,415:1,416:1,417:2,420:1,421:1,422:2,424:1,425:2,426:2,427:2,428:2,430:3,438:3,439:3,440:3,443:2,444:2,445:2,446:2,447:6,448:6,449:2,450:2,464:2,468:3,476:2,479:1,480:2,65535:0};function CD(t){var s="of:="+t.replace(I3,"$1[.$2$3$4$5]").replace(/\]:\[/g,":");return s.replace(/;/g,"|").replace(/,/g,";")}function LD(t){return t.replace(/\./,"!")}var Sp=typeof Map<"u";function O3(t,s,w){var W=0,K=t.length;if(w){if(Sp?w.has(s):Object.prototype.hasOwnProperty.call(w,s)){for(var de=Sp?w.get(s):w[s];W<de.length;++W)if(t[de[W]].t===s)return t.Count++,de[W]}}else for(;W<K;++W)if(t[W].t===s)return t.Count++,W;return t[K]={t:s},t.Count++,t.Unique++,w&&(Sp?(w.has(s)||w.set(s,[]),w.get(s).push(K)):(Object.prototype.hasOwnProperty.call(w,s)||(w[s]=[]),w[s].push(K))),K}function Iy(t,s){var w={min:t+1,max:t+1},W=-1;return s.MDW&&(Wc=s.MDW),s.width!=null?w.customWidth=1:s.wpx!=null?W=iy(s.wpx):s.wch!=null&&(W=s.wch),W>-1?(w.width=c2(W),w.customWidth=1):s.width!=null&&(w.width=s.width),s.hidden&&(w.hidden=!0),s.level!=null&&(w.outlineLevel=w.level=s.level),w}function QS(t,s){if(t){var w=[.7,.7,.75,.75,.3,.3];s=="xlml"&&(w=[1,1,1,1,.5,.5]),t.left==null&&(t.left=w[0]),t.right==null&&(t.right=w[1]),t.top==null&&(t.top=w[2]),t.bottom==null&&(t.bottom=w[3]),t.header==null&&(t.header=w[4]),t.footer==null&&(t.footer=w[5])}}function iv(t,s,w){var W=w.revssf[s.z!=null?s.z:"General"],K=60,de=t.length;if(W==null&&w.ssf){for(;K<392;++K)if(w.ssf[K]==null){Z5(s.z,K),w.ssf[K]=s.z,w.revssf[s.z]=W=K;break}}for(K=0;K!=de;++K)if(t[K].numFmtId===W)return K;return t[de]={numFmtId:W,fontId:0,fillId:0,borderId:0,xfId:0,applyNumberFormat:1},de}function PD(t,s,w){if(t&&t["!ref"]){var W=lo(t["!ref"]);if(W.e.c<W.s.c||W.e.r<W.s.r)throw new Error("Bad range ("+w+"): "+t["!ref"])}}function _D(t){if(t.length===0)return"";for(var s='<mergeCells count="'+t.length+'">',w=0;w!=t.length;++w)s+='<mergeCell ref="'+Jo(t[w])+'"/>';return s+"</mergeCells>"}function RD(t,s,w,W,K){var de=!1,z={},B=null;if(W.bookType!=="xlsx"&&s.vbaraw){var e=s.SheetNames[w];try{s.Workbook&&(e=s.Workbook.Sheets[w].CodeName||e)}catch{}de=!0,z.codeName=Uc(Wi(e))}if(t&&t["!outline"]){var d={summaryBelow:1,summaryRight:1};t["!outline"].above&&(d.summaryBelow=0),t["!outline"].left&&(d.summaryRight=0),B=(B||"")+Sa("outlinePr",null,d)}!de&&!B||(K[K.length]=Sa("sheetPr",B,z))}var DD=["objects","scenarios","selectLockedCells","selectUnlockedCells"],ID=["formatColumns","formatRows","formatCells","insertColumns","insertRows","insertHyperlinks","deleteColumns","deleteRows","sort","autoFilter","pivotTables"];function FD(t){var s={sheet:1};return DD.forEach(function(w){t[w]!=null&&t[w]&&(s[w]="1")}),ID.forEach(function(w){t[w]!=null&&!t[w]&&(s[w]="0")}),t.password&&(s.password=kS(t.password).toString(16).toUpperCase()),Sa("sheetProtection",null,s)}function kD(t){return QS(t),Sa("pageMargins",null,t)}function OD(t,s){for(var w=["<cols>"],W,K=0;K!=s.length;++K)(W=s[K])&&(w[w.length]=Sa("col",null,Iy(K,W)));return w[w.length]="</cols>",w.join("")}function zD(t,s,w,W){var K=typeof t.ref=="string"?t.ref:Jo(t.ref);w.Workbook||(w.Workbook={Sheets:[]}),w.Workbook.Names||(w.Workbook.Names=[]);var de=w.Workbook.Names,z=hu(K);z.s.r==z.e.r&&(z.e.r=hu(s["!ref"]).e.r,K=Jo(z));for(var B=0;B<de.length;++B){var e=de[B];if(e.Name=="_xlnm._FilterDatabase"&&e.Sheet==W){e.Ref="'"+w.SheetNames[W]+"'!"+K;break}}return B==de.length&&de.push({Name:"_xlnm._FilterDatabase",Sheet:W,Ref:"'"+w.SheetNames[W]+"'!"+K}),Sa("autoFilter",null,{ref:K})}function ND(t,s,w,W){var K={workbookViewId:"0"};return(((W||{}).Workbook||{}).Views||[])[0]&&(K.rightToLeft=W.Workbook.Views[0].RTL?"1":"0"),Sa("sheetViews",Sa("sheetView",null,K),{})}function BD(t,s,w,W){if(t.c&&w["!comments"].push([s,t.c]),t.v===void 0&&typeof t.f!="string"||t.t==="z"&&!t.f)return"";var K="",de=t.t,z=t.v;if(t.t!=="z")switch(t.t){case"b":K=t.v?"1":"0";break;case"n":K=""+t.v;break;case"e":K=ag[t.v];break;case"d":W&&W.cellDates?K=bl(t.v,-1).toISOString():(t=Gl(t),t.t="n",K=""+(t.v=Vl(bl(t.v)))),typeof t.z>"u"&&(t.z=Io[14]);break;default:K=t.v;break}var B=Ds("v",Wi(K)),e={r:s},d=iv(W.cellXfs,t,W);switch(d!==0&&(e.s=d),t.t){case"n":break;case"d":e.t="d";break;case"b":e.t="b";break;case"e":e.t="e";break;case"z":break;default:if(t.v==null){delete t.t;break}if(t.v.length>32767)throw new Error("Text length must not exceed 32767 characters");if(W&&W.bookSST){B=Ds("v",""+O3(W.Strings,t.v,W.revStrings)),e.t="s";break}e.t="str";break}if(t.t!=de&&(t.t=de,t.v=z),typeof t.f=="string"&&t.f){var P=t.F&&t.F.slice(0,s.length)==s?{t:"array",ref:t.F}:null;B=Sa("f",Wi(t.f),P)+(t.v!=null?B:"")}return t.l&&w["!links"].push([s,t.l]),t.D&&(e.cm=1),Sa("c",B,e)}function UD(t,s,w,W){var K=[],de=[],z=lo(t["!ref"]),B="",e,d="",P=[],a=0,_=0,x=t["!rows"],v=Array.isArray(t),y={r:d},r,n=-1;for(_=z.s.c;_<=z.e.c;++_)P[_]=qs(_);for(a=z.s.r;a<=z.e.r;++a){for(de=[],d=Fs(a),_=z.s.c;_<=z.e.c;++_){e=P[_]+d;var u=v?(t[a]||[])[_]:t[e];u!==void 0&&(B=BD(u,e,t,s))!=null&&de.push(B)}(de.length>0||x&&x[a])&&(y={r:d},x&&x[a]&&(r=x[a],r.hidden&&(y.hidden=1),n=-1,r.hpx?n=oy(r.hpx):r.hpt&&(n=r.hpt),n>-1&&(y.ht=n,y.customHeight=1),r.level&&(y.outlineLevel=r.level)),K[K.length]=Sa("row",de.join(""),y))}if(x)for(;a<x.length;++a)x&&x[a]&&(y={r:a+1},r=x[a],r.hidden&&(y.hidden=1),n=-1,r.hpx?n=oy(r.hpx):r.hpt&&(n=r.hpt),n>-1&&(y.ht=n,y.customHeight=1),r.level&&(y.outlineLevel=r.level),K[K.length]=Sa("row","",y));return K.join("")}function qS(t,s,w,W){var K=[$o,Sa("worksheet",null,{xmlns:T0[0],"xmlns:r":ps.r})],de=w.SheetNames[t],z=0,B="",e=w.Sheets[de];e==null&&(e={});var d=e["!ref"]||"A1",P=lo(d);if(P.e.c>16383||P.e.r>1048575){if(s.WTF)throw new Error("Range "+d+" exceeds format limit A1:XFD1048576");P.e.c=Math.min(P.e.c,16383),P.e.r=Math.min(P.e.c,1048575),d=Jo(P)}W||(W={}),e["!comments"]=[];var a=[];RD(e,w,t,s,K),K[K.length]=Sa("dimension",null,{ref:d}),K[K.length]=ND(e,s,t,w),s.sheetFormat&&(K[K.length]=Sa("sheetFormatPr",null,{defaultRowHeight:s.sheetFormat.defaultRowHeight||"16",baseColWidth:s.sheetFormat.baseColWidth||"10",outlineLevelRow:s.sheetFormat.outlineLevelRow||"7"})),e["!cols"]!=null&&e["!cols"].length>0&&(K[K.length]=OD(e,e["!cols"])),K[z=K.length]="<sheetData/>",e["!links"]=[],e["!ref"]!=null&&(B=UD(e,s),B.length>0&&(K[K.length]=B)),K.length>z+1&&(K[K.length]="</sheetData>",K[z]=K[z].replace("/>",">")),e["!protect"]&&(K[K.length]=FD(e["!protect"])),e["!autofilter"]!=null&&(K[K.length]=zD(e["!autofilter"],e,w,t)),e["!merges"]!=null&&e["!merges"].length>0&&(K[K.length]=_D(e["!merges"]));var _=-1,x,v=-1;return e["!links"].length>0&&(K[K.length]="<hyperlinks>",e["!links"].forEach(function(y){y[1].Target&&(x={ref:y[0]},y[1].Target.charAt(0)!="#"&&(v=Gi(W,-1,Wi(y[1].Target).replace(/#.*$/,""),Ii.HLINK),x["r:id"]="rId"+v),(_=y[1].Target.indexOf("#"))>-1&&(x.location=Wi(y[1].Target.slice(_+1))),y[1].Tooltip&&(x.tooltip=Wi(y[1].Tooltip)),K[K.length]=Sa("hyperlink",null,x))}),K[K.length]="</hyperlinks>"),delete e["!links"],e["!margins"]!=null&&(K[K.length]=kD(e["!margins"])),(!s||s.ignoreEC||s.ignoreEC==null)&&(K[K.length]=Ds("ignoredErrors",Sa("ignoredError",null,{numberStoredAsText:1,sqref:d}))),a.length>0&&(v=Gi(W,-1,"../drawings/drawing"+(t+1)+".xml",Ii.DRAW),K[K.length]=Sa("drawing",null,{"r:id":"rId"+v}),e["!drawing"]=a),e["!comments"].length>0&&(v=Gi(W,-1,"../drawings/vmlDrawing"+(t+1)+".vml",Ii.VML),K[K.length]=Sa("legacyDrawing",null,{"r:id":"rId"+v}),e["!legacy"]=v),K.length>1&&(K[K.length]="</worksheet>",K[1]=K[1].replace("/>",">")),K.join("")}function HD(t,s){var w={},W=t.l+s;w.r=t.read_shift(4),t.l+=4;var K=t.read_shift(2);t.l+=1;var de=t.read_shift(1);return t.l=W,de&7&&(w.level=de&7),de&16&&(w.hidden=!0),de&32&&(w.hpt=K/20),w}function VD(t,s,w){var W=Gn(145),K=(w["!rows"]||[])[t]||{};W.write_shift(4,t),W.write_shift(4,0);var de=320;K.hpx?de=oy(K.hpx)*20:K.hpt&&(de=K.hpt*20),W.write_shift(2,de),W.write_shift(1,0);var z=0;K.level&&(z|=K.level),K.hidden&&(z|=16),(K.hpx||K.hpt)&&(z|=32),W.write_shift(1,z),W.write_shift(1,0);var B=0,e=W.l;W.l+=4;for(var d={r:t,c:0},P=0;P<16;++P)if(!(s.s.c>P+1<<10||s.e.c<P<<10)){for(var a=-1,_=-1,x=P<<10;x<P+1<<10;++x){d.c=x;var v=Array.isArray(w)?(w[d.r]||[])[d.c]:w[Xi(d)];v&&(a<0&&(a=x),_=x)}a<0||(++B,W.write_shift(4,a),W.write_shift(4,_))}var y=W.l;return W.l=e,W.write_shift(4,B),W.l=y,W.length>W.l?W.slice(0,W.l):W}function GD(t,s,w,W){var K=VD(W,w,s);(K.length>17||(s["!rows"]||[])[W])&&ea(t,0,K)}var WD=ud,YD=S0;function XD(){}function ZD(t,s){var w={},W=t[t.l];return++t.l,w.above=!(W&64),w.left=!(W&128),t.l+=18,w.name=nP(t),w}function jD(t,s,w){w==null&&(w=Gn(84+4*t.length));var W=192;s&&(s.above&&(W&=-65),s.left&&(W&=-129)),w.write_shift(1,W);for(var K=1;K<3;++K)w.write_shift(1,0);return ry({auto:1},w),w.write_shift(-4,-1),w.write_shift(-4,-1),dS(t,w),w.slice(0,w.l)}function KD(t){var s=Wu(t);return[s]}function JD(t,s,w){return w==null&&(w=Gn(8)),od(s,w)}function $D(t){var s=sd(t);return[s]}function QD(t,s,w){return w==null&&(w=Gn(4)),ld(s,w)}function qD(t){var s=Wu(t),w=t.read_shift(1);return[s,w,"b"]}function eI(t,s,w){return w==null&&(w=Gn(9)),od(s,w),w.write_shift(1,t.v?1:0),w}function tI(t){var s=sd(t),w=t.read_shift(1);return[s,w,"b"]}function rI(t,s,w){return w==null&&(w=Gn(5)),ld(s,w),w.write_shift(1,t.v?1:0),w}function nI(t){var s=Wu(t),w=t.read_shift(1);return[s,w,"e"]}function aI(t,s,w){return w==null&&(w=Gn(9)),od(s,w),w.write_shift(1,t.v),w}function iI(t){var s=sd(t),w=t.read_shift(1);return[s,w,"e"]}function oI(t,s,w){return w==null&&(w=Gn(8)),ld(s,w),w.write_shift(1,t.v),w.write_shift(2,0),w.write_shift(1,0),w}function sI(t){var s=Wu(t),w=t.read_shift(4);return[s,w,"s"]}function lI(t,s,w){return w==null&&(w=Gn(12)),od(s,w),w.write_shift(4,s.v),w}function uI(t){var s=sd(t),w=t.read_shift(4);return[s,w,"s"]}function fI(t,s,w){return w==null&&(w=Gn(8)),ld(s,w),w.write_shift(4,s.v),w}function cI(t){var s=Wu(t),w=E0(t);return[s,w,"n"]}function hI(t,s,w){return w==null&&(w=Gn(16)),od(s,w),ed(t.v,w),w}function vI(t){var s=sd(t),w=E0(t);return[s,w,"n"]}function dI(t,s,w){return w==null&&(w=Gn(12)),ld(s,w),ed(t.v,w),w}function pI(t){var s=Wu(t),w=pS(t);return[s,w,"n"]}function gI(t,s,w){return w==null&&(w=Gn(12)),od(s,w),gS(t.v,w),w}function yI(t){var s=sd(t),w=pS(t);return[s,w,"n"]}function mI(t,s,w){return w==null&&(w=Gn(8)),ld(s,w),gS(t.v,w),w}function xI(t){var s=Wu(t),w=L3(t);return[s,w,"is"]}function bI(t){var s=Wu(t),w=el(t);return[s,w,"str"]}function wI(t,s,w){return w==null&&(w=Gn(12+4*t.v.length)),od(s,w),ys(t.v,w),w.length>w.l?w.slice(0,w.l):w}function TI(t){var s=sd(t),w=el(t);return[s,w,"str"]}function AI(t,s,w){return w==null&&(w=Gn(8+4*t.v.length)),ld(s,w),ys(t.v,w),w.length>w.l?w.slice(0,w.l):w}function SI(t,s,w){var W=t.l+s,K=Wu(t);K.r=w["!row"];var de=t.read_shift(1),z=[K,de,"b"];if(w.cellFormula){t.l+=2;var B=Dy(t,W-t.l,w);z[3]=m0(B,null,K,w.supbooks,w)}else t.l=W;return z}function EI(t,s,w){var W=t.l+s,K=Wu(t);K.r=w["!row"];var de=t.read_shift(1),z=[K,de,"e"];if(w.cellFormula){t.l+=2;var B=Dy(t,W-t.l,w);z[3]=m0(B,null,K,w.supbooks,w)}else t.l=W;return z}function MI(t,s,w){var W=t.l+s,K=Wu(t);K.r=w["!row"];var de=E0(t),z=[K,de,"n"];if(w.cellFormula){t.l+=2;var B=Dy(t,W-t.l,w);z[3]=m0(B,null,K,w.supbooks,w)}else t.l=W;return z}function CI(t,s,w){var W=t.l+s,K=Wu(t);K.r=w["!row"];var de=el(t),z=[K,de,"str"];if(w.cellFormula){t.l+=2;var B=Dy(t,W-t.l,w);z[3]=m0(B,null,K,w.supbooks,w)}else t.l=W;return z}var LI=ud,PI=S0;function _I(t,s){return s==null&&(s=Gn(4)),s.write_shift(4,t),s}function RI(t,s){var w=t.l+s,W=ud(t),K=P3(t),de=el(t),z=el(t),B=el(t);t.l=w;var e={rfx:W,relId:K,loc:de,display:B};return z&&(e.Tooltip=z),e}function DI(t,s){var w=Gn(50+4*(t[1].Target.length+(t[1].Tooltip||"").length));S0({s:gs(t[0]),e:gs(t[0])},w),_3("rId"+s,w);var W=t[1].Target.indexOf("#"),K=W==-1?"":t[1].Target.slice(W+1);return ys(K||"",w),ys(t[1].Tooltip||"",w),ys("",w),w.slice(0,w.l)}function II(){}function FI(t,s,w){var W=t.l+s,K=yS(t),de=t.read_shift(1),z=[K];if(z[2]=de,w.cellFormula){var B=TD(t,W-t.l,w);z[1]=B}else t.l=W;return z}function kI(t,s,w){var W=t.l+s,K=ud(t),de=[K];if(w.cellFormula){var z=SD(t,W-t.l,w);de[1]=z,t.l=W}else t.l=W;return de}function OI(t,s,w){w==null&&(w=Gn(18));var W=Iy(t,s);w.write_shift(-4,t),w.write_shift(-4,t),w.write_shift(4,(W.width||10)*256),w.write_shift(4,0);var K=0;return s.hidden&&(K|=1),typeof W.width=="number"&&(K|=2),s.level&&(K|=s.level<<8),w.write_shift(2,K),w}var eE=["left","right","top","bottom","header","footer"];function zI(t){var s={};return eE.forEach(function(w){s[w]=E0(t)}),s}function NI(t,s){return s==null&&(s=Gn(6*8)),QS(t),eE.forEach(function(w){ed(t[w],s)}),s}function BI(t){var s=t.read_shift(2);return t.l+=28,{RTL:s&32}}function UI(t,s,w){w==null&&(w=Gn(30));var W=924;return(((s||{}).Views||[])[0]||{}).RTL&&(W|=32),w.write_shift(2,W),w.write_shift(4,0),w.write_shift(4,0),w.write_shift(4,0),w.write_shift(1,0),w.write_shift(1,0),w.write_shift(2,0),w.write_shift(2,100),w.write_shift(2,0),w.write_shift(2,0),w.write_shift(2,0),w.write_shift(4,0),w}function HI(t){var s=Gn(24);return s.write_shift(4,4),s.write_shift(4,1),S0(t,s),s}function VI(t,s){return s==null&&(s=Gn(16*4+2)),s.write_shift(2,t.password?kS(t.password):0),s.write_shift(4,1),[["objects",!1],["scenarios",!1],["formatCells",!0],["formatColumns",!0],["formatRows",!0],["insertColumns",!0],["insertRows",!0],["insertHyperlinks",!0],["deleteColumns",!0],["deleteRows",!0],["selectLockedCells",!1],["sort",!0],["autoFilter",!0],["pivotTables",!0],["selectUnlockedCells",!1]].forEach(function(w){w[1]?s.write_shift(4,t[w[0]]!=null&&!t[w[0]]?1:0):s.write_shift(4,t[w[0]]!=null&&t[w[0]]?0:1)}),s}function GI(){}function WI(){}function YI(t,s,w,W,K,de,z){if(s.v===void 0)return!1;var B="";switch(s.t){case"b":B=s.v?"1":"0";break;case"d":s=Gl(s),s.z=s.z||Io[14],s.v=Vl(bl(s.v)),s.t="n";break;case"n":case"e":B=""+s.v;break;default:B=s.v;break}var e={r:w,c:W};switch(e.s=iv(K.cellXfs,s,K),s.l&&de["!links"].push([Xi(e),s.l]),s.c&&de["!comments"].push([Xi(e),s.c]),s.t){case"s":case"str":return K.bookSST?(B=O3(K.Strings,s.v,K.revStrings),e.t="s",e.v=B,z?ea(t,18,fI(s,e)):ea(t,7,lI(s,e))):(e.t="str",z?ea(t,17,AI(s,e)):ea(t,6,wI(s,e))),!0;case"n":return s.v==(s.v|0)&&s.v>-1e3&&s.v<1e3?z?ea(t,13,mI(s,e)):ea(t,2,gI(s,e)):z?ea(t,16,dI(s,e)):ea(t,5,hI(s,e)),!0;case"b":return e.t="b",z?ea(t,15,rI(s,e)):ea(t,4,eI(s,e)),!0;case"e":return e.t="e",z?ea(t,14,oI(s,e)):ea(t,3,aI(s,e)),!0}return z?ea(t,12,QD(s,e)):ea(t,1,JD(s,e)),!0}function XI(t,s,w,W){var K=lo(s["!ref"]||"A1"),de,z="",B=[];ea(t,145);var e=Array.isArray(s),d=K.e.r;s["!rows"]&&(d=Math.max(K.e.r,s["!rows"].length-1));for(var P=K.s.r;P<=d;++P){z=Fs(P),GD(t,s,K,P);var a=!1;if(P<=K.e.r)for(var _=K.s.c;_<=K.e.c;++_){P===K.s.r&&(B[_]=qs(_)),de=B[_]+z;var x=e?(s[P]||[])[_]:s[de];if(!x){a=!1;continue}a=YI(t,x,P,_,W,s,a)}}ea(t,146)}function ZI(t,s){!s||!s["!merges"]||(ea(t,177,_I(s["!merges"].length)),s["!merges"].forEach(function(w){ea(t,176,PI(w))}),ea(t,178))}function jI(t,s){!s||!s["!cols"]||(ea(t,390),s["!cols"].forEach(function(w,W){w&&ea(t,60,OI(W,w))}),ea(t,391))}function KI(t,s){!s||!s["!ref"]||(ea(t,648),ea(t,649,HI(lo(s["!ref"]))),ea(t,650))}function JI(t,s,w){s["!links"].forEach(function(W){if(W[1].Target){var K=Gi(w,-1,W[1].Target.replace(/#.*$/,""),Ii.HLINK);ea(t,494,DI(W,K))}}),delete s["!links"]}function $I(t,s,w,W){if(s["!comments"].length>0){var K=Gi(W,-1,"../drawings/vmlDrawing"+(w+1)+".vml",Ii.VML);ea(t,551,_3("rId"+K)),s["!legacy"]=K}}function QI(t,s,w,W){if(s["!autofilter"]){var K=s["!autofilter"],de=typeof K.ref=="string"?K.ref:Jo(K.ref);w.Workbook||(w.Workbook={Sheets:[]}),w.Workbook.Names||(w.Workbook.Names=[]);var z=w.Workbook.Names,B=hu(de);B.s.r==B.e.r&&(B.e.r=hu(s["!ref"]).e.r,de=Jo(B));for(var e=0;e<z.length;++e){var d=z[e];if(d.Name=="_xlnm._FilterDatabase"&&d.Sheet==W){d.Ref="'"+w.SheetNames[W]+"'!"+de;break}}e==z.length&&z.push({Name:"_xlnm._FilterDatabase",Sheet:W,Ref:"'"+w.SheetNames[W]+"'!"+de}),ea(t,161,S0(lo(de))),ea(t,162)}}function qI(t,s,w){ea(t,133),ea(t,137,UI(s,w)),ea(t,138),ea(t,134)}function eF(t,s){s["!protect"]&&ea(t,535,VI(s["!protect"]))}function tF(t,s,w,W){var K=Hl(),de=w.SheetNames[t],z=w.Sheets[de]||{},B=de;try{w&&w.Workbook&&(B=w.Workbook.Sheets[t].CodeName||B)}catch{}var e=lo(z["!ref"]||"A1");if(e.e.c>16383||e.e.r>1048575){if(s.WTF)throw new Error("Range "+(z["!ref"]||"A1")+" exceeds format limit A1:XFD1048576");e.e.c=Math.min(e.e.c,16383),e.e.r=Math.min(e.e.c,1048575)}return z["!links"]=[],z["!comments"]=[],ea(K,129),(w.vbaraw||z["!outline"])&&ea(K,147,jD(B,z["!outline"])),ea(K,148,YD(e)),qI(K,z,w.Workbook),jI(K,z),XI(K,z,t,s),eF(K,z),QI(K,z,w,t),ZI(K,z),JI(K,z,W),z["!margins"]&&ea(K,476,NI(z["!margins"])),(!s||s.ignoreEC||s.ignoreEC==null)&&KI(K,z),$I(K,z,t,W),ea(K,130),K.end()}function rF(t,s){t.l+=10;var w=el(t);return{name:w}}var nF=[["allowRefreshQuery",!1,"bool"],["autoCompressPictures",!0,"bool"],["backupFile",!1,"bool"],["checkCompatibility",!1,"bool"],["CodeName",""],["date1904",!1,"bool"],["defaultThemeVersion",0,"int"],["filterPrivacy",!1,"bool"],["hidePivotFieldList",!1,"bool"],["promptedSolutions",!1,"bool"],["publishItems",!1,"bool"],["refreshAllConnections",!1,"bool"],["saveExternalLinkValues",!0,"bool"],["showBorderUnselectedTables",!0,"bool"],["showInkAnnotation",!0,"bool"],["showObjects","all"],["showPivotChartFilter",!1,"bool"],["updateLinks","userSet"]];function aF(t){return!t.Workbook||!t.Workbook.WBProps?"false":k9(t.Workbook.WBProps.date1904)?"true":"false"}var iF="][*?/\\".split("");function tE(t,s){if(t.length>31){if(s)return!1;throw new Error("Sheet names cannot exceed 31 chars")}var w=!0;return iF.forEach(function(W){if(t.indexOf(W)!=-1){if(!s)throw new Error("Sheet name cannot contain : \\ / ? * [ ]");w=!1}}),w}function oF(t,s,w){t.forEach(function(W,K){tE(W);for(var de=0;de<K;++de)if(W==t[de])throw new Error("Duplicate Sheet Name: "+W);if(w){var z=s&&s[K]&&s[K].CodeName||W;if(z.charCodeAt(0)==95&&z.length>22)throw new Error("Bad Code Name: Worksheet"+z)}})}function sF(t){if(!t||!t.SheetNames||!t.Sheets)throw new Error("Invalid Workbook");if(!t.SheetNames.length)throw new Error("Workbook is empty");var s=t.Workbook&&t.Workbook.Sheets||[];oF(t.SheetNames,s,!!t.vbaraw);for(var w=0;w<t.SheetNames.length;++w)PD(t.Sheets[t.SheetNames[w]],t.SheetNames[w],w)}function rE(t){var s=[$o];s[s.length]=Sa("workbook",null,{xmlns:T0[0],"xmlns:r":ps.r});var w=t.Workbook&&(t.Workbook.Names||[]).length>0,W={codeName:"ThisWorkbook"};t.Workbook&&t.Workbook.WBProps&&(nF.forEach(function(B){t.Workbook.WBProps[B[0]]!=null&&t.Workbook.WBProps[B[0]]!=B[1]&&(W[B[0]]=t.Workbook.WBProps[B[0]])}),t.Workbook.WBProps.CodeName&&(W.codeName=t.Workbook.WBProps.CodeName,delete W.CodeName)),s[s.length]=Sa("workbookPr",null,W);var K=t.Workbook&&t.Workbook.Sheets||[],de=0;if(K&&K[0]&&K[0].Hidden){for(s[s.length]="<bookViews>",de=0;de!=t.SheetNames.length&&!(!K[de]||!K[de].Hidden);++de);de==t.SheetNames.length&&(de=0),s[s.length]='<workbookView firstSheet="'+de+'" activeTab="'+de+'"/>',s[s.length]="</bookViews>"}for(s[s.length]="<sheets>",de=0;de!=t.SheetNames.length;++de){var z={name:Wi(t.SheetNames[de].slice(0,31))};if(z.sheetId=""+(de+1),z["r:id"]="rId"+(de+1),K[de])switch(K[de].Hidden){case 1:z.state="hidden";break;case 2:z.state="veryHidden";break}s[s.length]=Sa("sheet",null,z)}return s[s.length]="</sheets>",w&&(s[s.length]="<definedNames>",t.Workbook&&t.Workbook.Names&&t.Workbook.Names.forEach(function(B){var e={name:B.Name};B.Comment&&(e.comment=B.Comment),B.Sheet!=null&&(e.localSheetId=""+B.Sheet),B.Hidden&&(e.hidden="1"),B.Ref&&(s[s.length]=Sa("definedName",Wi(B.Ref),e))}),s[s.length]="</definedNames>"),s.length>2&&(s[s.length]="</workbook>",s[1]=s[1].replace("/>",">")),s.join("")}function lF(t,s){var w={};return w.Hidden=t.read_shift(4),w.iTabID=t.read_shift(4),w.strRelID=f2(t),w.name=el(t),w}function uF(t,s){return s||(s=Gn(127)),s.write_shift(4,t.Hidden),s.write_shift(4,t.iTabID),_3(t.strRelID,s),ys(t.name.slice(0,31),s),s.length>s.l?s.slice(0,s.l):s}function fF(t,s){var w={},W=t.read_shift(4);w.defaultThemeVersion=t.read_shift(4);var K=s>8?el(t):"";return K.length>0&&(w.CodeName=K),w.autoCompressPictures=!!(W&65536),w.backupFile=!!(W&64),w.checkCompatibility=!!(W&4096),w.date1904=!!(W&1),w.filterPrivacy=!!(W&8),w.hidePivotFieldList=!!(W&1024),w.promptedSolutions=!!(W&16),w.publishItems=!!(W&2048),w.refreshAllConnections=!!(W&262144),w.saveExternalLinkValues=!!(W&128),w.showBorderUnselectedTables=!!(W&4),w.showInkAnnotation=!!(W&32),w.showObjects=["all","placeholders","none"][W>>13&3],w.showPivotChartFilter=!!(W&32768),w.updateLinks=["userSet","never","always"][W>>8&3],w}function cF(t,s){s||(s=Gn(72));var w=0;return t&&t.filterPrivacy&&(w|=8),s.write_shift(4,w),s.write_shift(4,0),dS(t&&t.CodeName||"ThisWorkbook",s),s.slice(0,s.l)}function hF(t,s,w){var W=t.l+s;t.l+=4,t.l+=1;var K=t.read_shift(4),de=aP(t),z=AD(t,0,w),B=P3(t);t.l=W;var e={Name:de,Ptg:z};return K<268435455&&(e.Sheet=K),B&&(e.Comment=B),e}function vF(t,s){ea(t,143);for(var w=0;w!=s.SheetNames.length;++w){var W=s.Workbook&&s.Workbook.Sheets&&s.Workbook.Sheets[w]&&s.Workbook.Sheets[w].Hidden||0,K={Hidden:W,iTabID:w+1,strRelID:"rId"+(w+1),name:s.SheetNames[w]};ea(t,156,uF(K))}ea(t,144)}function dF(t,s){s||(s=Gn(127));for(var w=0;w!=4;++w)s.write_shift(4,0);return ys("SheetJS",s),ys(K1.version,s),ys(K1.version,s),ys("7262",s),s.length>s.l?s.slice(0,s.l):s}function pF(t,s){s||(s=Gn(29)),s.write_shift(-4,0),s.write_shift(-4,460),s.write_shift(4,28800),s.write_shift(4,17600),s.write_shift(4,500),s.write_shift(4,t),s.write_shift(4,t);var w=120;return s.write_shift(1,w),s.length>s.l?s.slice(0,s.l):s}function gF(t,s){if(!(!s.Workbook||!s.Workbook.Sheets)){for(var w=s.Workbook.Sheets,W=0,K=-1,de=-1;W<w.length;++W)!w[W]||!w[W].Hidden&&K==-1?K=W:w[W].Hidden==1&&de==-1&&(de=W);de>K||(ea(t,135),ea(t,158,pF(K)),ea(t,136))}}function yF(t,s){var w=Hl();return ea(w,131),ea(w,128,dF()),ea(w,153,cF(t.Workbook&&t.Workbook.WBProps||null)),gF(w,t),vF(w,t),ea(w,132),w.end()}function mF(t,s,w){return(s.slice(-4)===".bin"?yF:rE)(t)}function xF(t,s,w,W,K){return(s.slice(-4)===".bin"?tF:qS)(t,w,W,K)}function bF(t,s,w){return(s.slice(-4)===".bin"?N_:NS)(t,w)}function wF(t,s,w){return(s.slice(-4)===".bin"?c_:FS)(t,w)}function TF(t,s,w){return(s.slice(-4)===".bin"?eR:GS)(t)}function AF(t){return(t.slice(-4)===".bin"?X_:HS)()}function SF(t,s){var w=[];return t.Props&&w.push(bP(t.Props,s)),t.Custprops&&w.push(wP(t.Props,t.Custprops)),w.join("")}function EF(){return""}function MF(t,s){var w=['<Style ss:ID="Default" ss:Name="Normal"><NumberFormat/></Style>'];return s.cellXfs.forEach(function(W,K){var de=[];de.push(Sa("NumberFormat",null,{"ss:Format":Wi(Io[W.numFmtId])}));var z={"ss:ID":"s"+(21+K)};w.push(Sa("Style",de.join(""),z))}),Sa("Styles",w.join(""))}function nE(t){return Sa("NamedRange",null,{"ss:Name":t.Name,"ss:RefersTo":"="+F3(t.Ref,{r:0,c:0})})}function CF(t){if(!((t||{}).Workbook||{}).Names)return"";for(var s=t.Workbook.Names,w=[],W=0;W<s.length;++W){var K=s[W];K.Sheet==null&&(K.Name.match(/^_xlfn\./)||w.push(nE(K)))}return Sa("Names",w.join(""))}function LF(t,s,w,W){if(!t||!((W||{}).Workbook||{}).Names)return"";for(var K=W.Workbook.Names,de=[],z=0;z<K.length;++z){var B=K[z];B.Sheet==w&&(B.Name.match(/^_xlfn\./)||de.push(nE(B)))}return de.join("")}function PF(t,s,w,W){if(!t)return"";var K=[];if(t["!margins"]&&(K.push("<PageSetup>"),t["!margins"].header&&K.push(Sa("Header",null,{"x:Margin":t["!margins"].header})),t["!margins"].footer&&K.push(Sa("Footer",null,{"x:Margin":t["!margins"].footer})),K.push(Sa("PageMargins",null,{"x:Bottom":t["!margins"].bottom||"0.75","x:Left":t["!margins"].left||"0.7","x:Right":t["!margins"].right||"0.7","x:Top":t["!margins"].top||"0.75"})),K.push("</PageSetup>")),W&&W.Workbook&&W.Workbook.Sheets&&W.Workbook.Sheets[w])if(W.Workbook.Sheets[w].Hidden)K.push(Sa("Visible",W.Workbook.Sheets[w].Hidden==1?"SheetHidden":"SheetVeryHidden",{}));else{for(var de=0;de<w&&!(W.Workbook.Sheets[de]&&!W.Workbook.Sheets[de].Hidden);++de);de==w&&K.push("<Selected/>")}return((((W||{}).Workbook||{}).Views||[])[0]||{}).RTL&&K.push("<DisplayRightToLeft/>"),t["!protect"]&&(K.push(Ds("ProtectContents","True")),t["!protect"].objects&&K.push(Ds("ProtectObjects","True")),t["!protect"].scenarios&&K.push(Ds("ProtectScenarios","True")),t["!protect"].selectLockedCells!=null&&!t["!protect"].selectLockedCells?K.push(Ds("EnableSelection","NoSelection")):t["!protect"].selectUnlockedCells!=null&&!t["!protect"].selectUnlockedCells&&K.push(Ds("EnableSelection","UnlockedCells")),[["formatCells","AllowFormatCells"],["formatColumns","AllowSizeCols"],["formatRows","AllowSizeRows"],["insertColumns","AllowInsertCols"],["insertRows","AllowInsertRows"],["insertHyperlinks","AllowInsertHyperlinks"],["deleteColumns","AllowDeleteCols"],["deleteRows","AllowDeleteRows"],["sort","AllowSort"],["autoFilter","AllowFilter"],["pivotTables","AllowUsePivotTables"]].forEach(function(z){t["!protect"][z[0]]&&K.push("<"+z[1]+"/>")})),K.length==0?"":Sa("WorksheetOptions",K.join(""),{xmlns:su.x})}function _F(t){return t.map(function(s){var w=F9(s.t||""),W=Sa("ss:Data",w,{xmlns:"http://www.w3.org/TR/REC-html40"});return Sa("Comment",W,{"ss:Author":s.a})}).join("")}function RF(t,s,w,W,K,de,z){if(!t||t.v==null&&t.f==null)return"";var B={};if(t.f&&(B["ss:Formula"]="="+Wi(F3(t.f,z))),t.F&&t.F.slice(0,s.length)==s){var e=gs(t.F.slice(s.length+1));B["ss:ArrayRange"]="RC:R"+(e.r==z.r?"":"["+(e.r-z.r)+"]")+"C"+(e.c==z.c?"":"["+(e.c-z.c)+"]")}if(t.l&&t.l.Target&&(B["ss:HRef"]=Wi(t.l.Target),t.l.Tooltip&&(B["x:HRefScreenTip"]=Wi(t.l.Tooltip))),w["!merges"])for(var d=w["!merges"],P=0;P!=d.length;++P)d[P].s.c!=z.c||d[P].s.r!=z.r||(d[P].e.c>d[P].s.c&&(B["ss:MergeAcross"]=d[P].e.c-d[P].s.c),d[P].e.r>d[P].s.r&&(B["ss:MergeDown"]=d[P].e.r-d[P].s.r));var a="",_="";switch(t.t){case"z":if(!W.sheetStubs)return"";break;case"n":a="Number",_=String(t.v);break;case"b":a="Boolean",_=t.v?"1":"0";break;case"e":a="Error",_=ag[t.v];break;case"d":a="DateTime",_=new Date(t.v).toISOString(),t.z==null&&(t.z=t.z||Io[14]);break;case"s":a="String",_=I9(t.v||"");break}var x=iv(W.cellXfs,t,W);B["ss:StyleID"]="s"+(21+x),B["ss:Index"]=z.c+1;var v=t.v!=null?_:"",y=t.t=="z"?"":'<Data ss:Type="'+a+'">'+v+"</Data>";return(t.c||[]).length>0&&(y+=_F(t.c)),Sa("Cell",y,B)}function DF(t,s){var w='<Row ss:Index="'+(t+1)+'"';return s&&(s.hpt&&!s.hpx&&(s.hpx=zS(s.hpt)),s.hpx&&(w+=' ss:AutoFitHeight="0" ss:Height="'+s.hpx+'"'),s.hidden&&(w+=' ss:Hidden="1"')),w+">"}function IF(t,s,w,W){if(!t["!ref"])return"";var K=lo(t["!ref"]),de=t["!merges"]||[],z=0,B=[];t["!cols"]&&t["!cols"].forEach(function(r,n){D3(r);var u=!!r.width,i=Iy(n,r),f={"ss:Index":n+1};u&&(f["ss:Width"]=ay(i.width)),r.hidden&&(f["ss:Hidden"]="1"),B.push(Sa("Column",null,f))});for(var e=Array.isArray(t),d=K.s.r;d<=K.e.r;++d){for(var P=[DF(d,(t["!rows"]||[])[d])],a=K.s.c;a<=K.e.c;++a){var _=!1;for(z=0;z!=de.length;++z)if(!(de[z].s.c>a)&&!(de[z].s.r>d)&&!(de[z].e.c<a)&&!(de[z].e.r<d)){(de[z].s.c!=a||de[z].s.r!=d)&&(_=!0);break}if(!_){var x={r:d,c:a},v=Xi(x),y=e?(t[d]||[])[a]:t[v];P.push(RF(y,v,t,s,w,W,x))}}P.push("</Row>"),P.length>2&&B.push(P.join(""))}return B.join("")}function FF(t,s,w){var W=[],K=w.SheetNames[t],de=w.Sheets[K],z=de?LF(de,s,t,w):"";return z.length>0&&W.push("<Names>"+z+"</Names>"),z=de?IF(de,s,t,w):"",z.length>0&&W.push("<Table>"+z+"</Table>"),W.push(PF(de,s,t,w)),W.join("")}function kF(t,s){s||(s={}),t.SSF||(t.SSF=Gl(Io)),t.SSF&&(Ly(),Cy(t.SSF),s.revssf=Py(t.SSF),s.revssf[t.SSF[65535]]=0,s.ssf=t.SSF,s.cellXfs=[],iv(s.cellXfs,{},{revssf:{General:0}}));var w=[];w.push(SF(t,s)),w.push(EF()),w.push(""),w.push("");for(var W=0;W<t.SheetNames.length;++W)w.push(Sa("Worksheet",FF(W,s,t),{"ss:Name":Wi(t.SheetNames[W])}));return w[2]=MF(t,s),w[3]=CF(t),$o+Sa("Workbook",w.join(""),{xmlns:su.ss,"xmlns:o":su.o,"xmlns:x":su.x,"xmlns:ss":su.ss,"xmlns:dt":su.dt,"xmlns:html":su.html})}var Qm={SI:"e0859ff2f94f6810ab9108002b27b3d9",DSI:"02d5cdd59c2e1b10939708002b2cf9ae",UDI:"05d5cdd59c2e1b10939708002b2cf9ae"};function OF(t,s){var w=[],W=[],K=[],de=0,z,B=ST(zT,"n"),e=ST(NT,"n");if(t.Props)for(z=Os(t.Props),de=0;de<z.length;++de)(Object.prototype.hasOwnProperty.call(B,z[de])?w:Object.prototype.hasOwnProperty.call(e,z[de])?W:K).push([z[de],t.Props[z[de]]]);if(t.Custprops)for(z=Os(t.Custprops),de=0;de<z.length;++de)Object.prototype.hasOwnProperty.call(t.Props||{},z[de])||(Object.prototype.hasOwnProperty.call(B,z[de])?w:Object.prototype.hasOwnProperty.call(e,z[de])?W:K).push([z[de],t.Custprops[z[de]]]);var d=[];for(de=0;de<K.length;++de)CS.indexOf(K[de][0])>-1||SS.indexOf(K[de][0])>-1||K[de][1]!=null&&d.push(K[de]);W.length&&Ki.utils.cfb_add(s,"/SummaryInformation",GT(W,Qm.SI,e,NT)),(w.length||d.length)&&Ki.utils.cfb_add(s,"/DocumentSummaryInformation",GT(w,Qm.DSI,B,zT,d.length?d:null,Qm.UDI))}function zF(t,s){var w=s||{},W=Ki.utils.cfb_new({root:"R"}),K="/Workbook";switch(w.bookType||"xls"){case"xls":w.bookType="biff8";case"xla":w.bookType||(w.bookType="xla");case"biff8":K="/Workbook",w.biff=8;break;case"biff5":K="/Book",w.biff=5;break;default:throw new Error("invalid type "+w.bookType+" for XLS CFB")}return Ki.utils.cfb_add(W,K,aE(t,w)),w.biff==8&&(t.Props||t.Custprops)&&OF(t,W),w.biff==8&&t.vbaraw&&tR(W,Ki.read(t.vbaraw,{type:typeof t.vbaraw=="string"?"binary":"buffer"})),W}var NF={0:{f:HD},1:{f:KD},2:{f:pI},3:{f:nI},4:{f:qD},5:{f:cI},6:{f:bI},7:{f:sI},8:{f:CI},9:{f:MI},10:{f:SI},11:{f:EI},12:{f:$D},13:{f:yI},14:{f:iI},15:{f:tI},16:{f:vI},17:{f:TI},18:{f:uI},19:{f:L3},20:{},21:{},22:{},23:{},24:{},25:{},26:{},27:{},28:{},29:{},30:{},31:{},32:{},33:{},34:{},35:{T:1},36:{T:-1},37:{T:1},38:{T:-1},39:{f:hF},40:{},42:{},43:{f:b_},44:{f:m_},45:{f:A_},46:{f:E_},47:{f:S_},48:{},49:{f:$9},50:{},51:{f:H_},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:QP},62:{f:xI},63:{f:Z_},64:{f:GI},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:ac,p:0},132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:BI},138:{T:-1},139:{T:1},140:{T:-1},141:{T:1},142:{T:-1},143:{T:1},144:{T:-1},145:{T:1},146:{T:-1},147:{f:ZD},148:{f:WD,p:16},151:{f:II},152:{},153:{f:fF},154:{},155:{},156:{f:lF},157:{},158:{},159:{T:1,f:l_},160:{T:-1},161:{T:1,f:ud},162:{T:-1},163:{T:1},164:{T:-1},165:{T:1},166:{T:-1},167:{},168:{},169:{},170:{},171:{},172:{T:1},173:{T:-1},174:{},175:{},176:{f:LI},177:{T:1},178:{T:-1},179:{T:1},180:{T:-1},181:{T:1},182:{T:-1},183:{T:1},184:{T:-1},185:{T:1},186:{T:-1},187:{T:1},188:{T:-1},189:{T:1},190:{T:-1},191:{T:1},192:{T:-1},193:{T:1},194:{T:-1},195:{T:1},196:{T:-1},197:{T:1},198:{T:-1},199:{T:1},200:{T:-1},201:{T:1},202:{T:-1},203:{T:1},204:{T:-1},205:{T:1},206:{T:-1},207:{T:1},208:{T:-1},209:{T:1},210:{T:-1},211:{T:1},212:{T:-1},213:{T:1},214:{T:-1},215:{T:1},216:{T:-1},217:{T:1},218:{T:-1},219:{T:1},220:{T:-1},221:{T:1},222:{T:-1},223:{T:1},224:{T:-1},225:{T:1},226:{T:-1},227:{T:1},228:{T:-1},229:{T:1},230:{T:-1},231:{T:1},232:{T:-1},233:{T:1},234:{T:-1},235:{T:1},236:{T:-1},237:{T:1},238:{T:-1},239:{T:1},240:{T:-1},241:{T:1},242:{T:-1},243:{T:1},244:{T:-1},245:{T:1},246:{T:-1},247:{T:1},248:{T:-1},249:{T:1},250:{T:-1},251:{T:1},252:{T:-1},253:{T:1},254:{T:-1},255:{T:1},256:{T:-1},257:{T:1},258:{T:-1},259:{T:1},260:{T:-1},261:{T:1},262:{T:-1},263:{T:1},264:{T:-1},265:{T:1},266:{T:-1},267:{T:1},268:{T:-1},269:{T:1},270:{T:-1},271:{T:1},272:{T:-1},273:{T:1},274:{T:-1},275:{T:1},276:{T:-1},277:{},278:{T:1},279:{T:-1},280:{T:1},281:{T:-1},282:{T:1},283:{T:1},284:{T:-1},285:{T:1},286:{T:-1},287:{T:1},288:{T:-1},289:{T:1},290:{T:-1},291:{T:1},292:{T:-1},293:{T:1},294:{T:-1},295:{T:1},296:{T:-1},297:{T:1},298:{T:-1},299:{T:1},300:{T:-1},301:{T:1},302:{T:-1},303:{T:1},304:{T:-1},305:{T:1},306:{T:-1},307:{T:1},308:{T:-1},309:{T:1},310:{T:-1},311:{T:1},312:{T:-1},313:{T:-1},314:{T:1},315:{T:-1},316:{T:1},317:{T:-1},318:{T:1},319:{T:-1},320:{T:1},321:{T:-1},322:{T:1},323:{T:-1},324:{T:1},325:{T:-1},326:{T:1},327:{T:-1},328:{T:1},329:{T:-1},330:{T:1},331:{T:-1},332:{T:1},333:{T:-1},334:{T:1},335:{f:B_},336:{T:-1},337:{f:W_,T:1},338:{T:-1},339:{T:1},340:{T:-1},341:{T:1},342:{T:-1},343:{T:1},344:{T:-1},345:{T:1},346:{T:-1},347:{T:1},348:{T:-1},349:{T:1},350:{T:-1},351:{},352:{},353:{T:1},354:{T:-1},355:{f:f2},357:{},358:{},359:{},360:{T:1},361:{},362:{f:XP},363:{},364:{},366:{},367:{},368:{},369:{},370:{},371:{},372:{T:1},373:{T:-1},374:{T:1},375:{T:-1},376:{T:1},377:{T:-1},378:{T:1},379:{T:-1},380:{T:1},381:{T:-1},382:{T:1},383:{T:-1},384:{T:1},385:{T:-1},386:{T:1},387:{T:-1},388:{T:1},389:{T:-1},390:{T:1},391:{T:-1},392:{T:1},393:{T:-1},394:{T:1},395:{T:-1},396:{},397:{},398:{},399:{},400:{},401:{T:1},403:{},404:{},405:{},406:{},407:{},408:{},409:{},410:{},411:{},412:{},413:{},414:{},415:{},416:{},417:{},418:{},419:{},420:{},421:{},422:{T:1},423:{T:1},424:{T:-1},425:{T:-1},426:{f:FI},427:{f:kI},428:{},429:{T:1},430:{T:-1},431:{T:1},432:{T:-1},433:{T:1},434:{T:-1},435:{T:1},436:{T:-1},437:{T:1},438:{T:-1},439:{T:1},440:{T:-1},441:{T:1},442:{T:-1},443:{T:1},444:{T:-1},445:{T:1},446:{T:-1},447:{T:1},448:{T:-1},449:{T:1},450:{T:-1},451:{T:1},452:{T:-1},453:{T:1},454:{T:-1},455:{T:1},456:{T:-1},457:{T:1},458:{T:-1},459:{T:1},460:{T:-1},461:{T:1},462:{T:-1},463:{T:1},464:{T:-1},465:{T:1},466:{T:-1},467:{T:1},468:{T:-1},469:{T:1},470:{T:-1},471:{},472:{},473:{T:1},474:{T:-1},475:{},476:{f:zI},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:XD},486:{T:1},487:{T:-1},488:{T:1},489:{T:-1},490:{T:1},491:{T:-1},492:{T:1},493:{T:-1},494:{f:RI},495:{T:1},496:{T:-1},497:{T:1},498:{T:-1},499:{},500:{T:1},501:{T:-1},502:{T:1},503:{T:-1},504:{},505:{T:1},506:{T:-1},507:{},508:{T:1},509:{T:-1},510:{T:1},511:{T:-1},512:{},513:{},514:{T:1},515:{T:-1},516:{T:1},517:{T:-1},518:{T:1},519:{T:-1},520:{T:1},521:{T:-1},522:{},523:{},524:{},525:{},526:{},527:{},528:{T:1},529:{T:-1},530:{T:1},531:{T:-1},532:{T:1},533:{T:-1},534:{},535:{},536:{},537:{},538:{T:1},539:{T:-1},540:{T:1},541:{T:-1},542:{T:1},548:{},549:{},550:{f:f2},551:{},552:{},553:{},554:{T:1},555:{T:-1},556:{T:1},557:{T:-1},558:{T:1},559:{T:-1},560:{T:1},561:{T:-1},562:{},564:{},565:{T:1},566:{T:-1},569:{T:1},570:{T:-1},572:{},573:{T:1},574:{T:-1},577:{},578:{},579:{},580:{},581:{},582:{},583:{},584:{},585:{},586:{},587:{},588:{T:-1},589:{},590:{T:1},591:{T:-1},592:{T:1},593:{T:-1},594:{T:1},595:{T:-1},596:{},597:{T:1},598:{T:-1},599:{T:1},600:{T:-1},601:{T:1},602:{T:-1},603:{T:1},604:{T:-1},605:{T:1},606:{T:-1},607:{},608:{T:1},609:{T:-1},610:{},611:{T:1},612:{T:-1},613:{T:1},614:{T:-1},615:{T:1},616:{T:-1},617:{T:1},618:{T:-1},619:{T:1},620:{T:-1},625:{},626:{T:1},627:{T:-1},628:{T:1},629:{T:-1},630:{T:1},631:{T:-1},632:{f:Q_},633:{T:1},634:{T:-1},635:{T:1,f:J_},636:{T:-1},637:{f:tP},638:{T:1},639:{},640:{T:-1},641:{T:1},642:{T:-1},643:{T:1},644:{},645:{T:-1},646:{T:1},648:{T:1},649:{},650:{T:-1},651:{f:rF},652:{},653:{T:1},654:{T:-1},655:{T:1},656:{T:-1},657:{T:1},658:{T:-1},659:{},660:{T:1},661:{},662:{T:-1},663:{},664:{T:1},665:{},666:{T:-1},667:{},668:{},669:{},671:{T:1},672:{T:-1},673:{T:1},674:{T:-1},675:{},676:{},677:{},678:{},679:{},680:{},681:{},1024:{},1025:{},1026:{T:1},1027:{T:-1},1028:{T:1},1029:{T:-1},1030:{},1031:{T:1},1032:{T:-1},1033:{T:1},1034:{T:-1},1035:{},1036:{},1037:{},1038:{T:1},1039:{T:-1},1040:{},1041:{T:1},1042:{T:-1},1043:{},1044:{},1045:{},1046:{T:1},1047:{T:-1},1048:{T:1},1049:{T:-1},1050:{},1051:{T:1},1052:{T:1},1053:{f:WI},1054:{T:1},1055:{},1056:{T:1},1057:{T:-1},1058:{T:1},1059:{T:-1},1061:{},1062:{T:1},1063:{T:-1},1064:{T:1},1065:{T:-1},1066:{T:1},1067:{T:-1},1068:{T:1},1069:{T:-1},1070:{T:1},1071:{T:-1},1072:{T:1},1073:{T:-1},1075:{T:1},1076:{T:-1},1077:{T:1},1078:{T:-1},1079:{T:1},1080:{T:-1},1081:{T:1},1082:{T:-1},1083:{T:1},1084:{T:-1},1085:{},1086:{T:1},1087:{T:-1},1088:{T:1},1089:{T:-1},1090:{T:1},1091:{T:-1},1092:{T:1},1093:{T:-1},1094:{T:1},1095:{T:-1},1096:{},1097:{T:1},1098:{},1099:{T:-1},1100:{T:1},1101:{T:-1},1102:{},1103:{},1104:{},1105:{},1111:{},1112:{},1113:{T:1},1114:{T:-1},1115:{T:1},1116:{T:-1},1117:{},1118:{T:1},1119:{T:-1},1120:{T:1},1121:{T:-1},1122:{T:1},1123:{T:-1},1124:{T:1},1125:{T:-1},1126:{},1128:{T:1},1129:{T:-1},1130:{},1131:{T:1},1132:{T:-1},1133:{T:1},1134:{T:-1},1135:{T:1},1136:{T:-1},1137:{T:1},1138:{T:-1},1139:{T:1},1140:{T:-1},1141:{},1142:{T:1},1143:{T:-1},1144:{T:1},1145:{T:-1},1146:{},1147:{T:1},1148:{T:-1},1149:{T:1},1150:{T:-1},1152:{T:1},1153:{T:-1},1154:{T:-1},1155:{T:-1},1156:{T:-1},1157:{T:1},1158:{T:-1},1159:{T:1},1160:{T:-1},1161:{T:1},1162:{T:-1},1163:{T:1},1164:{T:-1},1165:{T:1},1166:{T:-1},1167:{T:1},1168:{T:-1},1169:{T:1},1170:{T:-1},1171:{},1172:{T:1},1173:{T:-1},1177:{},1178:{T:1},1180:{},1181:{},1182:{},2048:{T:1},2049:{T:-1},2050:{},2051:{T:1},2052:{T:-1},2053:{},2054:{},2055:{T:1},2056:{T:-1},2057:{T:1},2058:{T:-1},2060:{},2067:{},2068:{T:1},2069:{T:-1},2070:{},2071:{},2072:{T:1},2073:{T:-1},2075:{},2076:{},2077:{T:1},2078:{T:-1},2079:{},2080:{T:1},2081:{T:-1},2082:{},2083:{T:1},2084:{T:-1},2085:{T:1},2086:{T:-1},2087:{T:1},2088:{T:-1},2089:{T:1},2090:{T:-1},2091:{},2092:{},2093:{T:1},2094:{T:-1},2095:{},2096:{T:1},2097:{T:-1},2098:{T:1},2099:{T:-1},2100:{T:1},2101:{T:-1},2102:{},2103:{T:1},2104:{T:-1},2105:{},2106:{T:1},2107:{T:-1},2108:{},2109:{T:1},2110:{T:-1},2111:{T:1},2112:{T:-1},2113:{T:1},2114:{T:-1},2115:{},2116:{},2117:{},2118:{T:1},2119:{T:-1},2120:{},2121:{T:1},2122:{T:-1},2123:{T:1},2124:{T:-1},2125:{},2126:{T:1},2127:{T:-1},2128:{},2129:{T:1},2130:{T:-1},2131:{T:1},2132:{T:-1},2133:{T:1},2134:{},2135:{},2136:{},2137:{T:1},2138:{T:-1},2139:{T:1},2140:{T:-1},2141:{},3072:{},3073:{},4096:{T:1},4097:{T:-1},5002:{T:1},5003:{T:-1},5081:{T:1},5082:{T:-1},5083:{},5084:{T:1},5085:{T:-1},5086:{T:1},5087:{T:-1},5088:{},5089:{},5090:{},5092:{T:1},5093:{T:-1},5094:{},5095:{T:1},5096:{T:-1},5097:{},5099:{},65535:{n:""}};function Ea(t,s,w,W){var K=s;if(!isNaN(K)){var de=W||(w||[]).length||0,z=t.next(4);z.write_shift(2,K),z.write_shift(2,de),de>0&&E3(w)&&t.push(w)}}function BF(t,s,w,W){var K=W||(w||[]).length||0;if(K<=8224)return Ea(t,s,w,K);var de=s;if(!isNaN(de)){for(var z=w.parts||[],B=0,e=0,d=0;d+(z[B]||8224)<=8224;)d+=z[B]||8224,B++;var P=t.next(4);for(P.write_shift(2,de),P.write_shift(2,d),t.push(w.slice(e,e+d)),e+=d;e<K;){for(P=t.next(4),P.write_shift(2,60),d=0;d+(z[B]||8224)<=8224;)d+=z[B]||8224,B++;P.write_shift(2,d),t.push(w.slice(e,e+d)),e+=d}}}function og(t,s,w){return t||(t=Gn(7)),t.write_shift(2,s),t.write_shift(2,w),t.write_shift(2,0),t.write_shift(1,0),t}function UF(t,s,w,W){var K=Gn(9);return og(K,t,s),PS(w,W||"b",K),K}function HF(t,s,w){var W=Gn(8+2*w.length);return og(W,t,s),W.write_shift(1,w.length),W.write_shift(w.length,w,"sbcs"),W.l<W.length?W.slice(0,W.l):W}function VF(t,s,w,W){if(s.v!=null)switch(s.t){case"d":case"n":var K=s.t=="d"?Vl(bl(s.v)):s.v;K==(K|0)&&K>=0&&K<65536?Ea(t,2,r_(w,W,K)):Ea(t,3,t_(w,W,K));return;case"b":case"e":Ea(t,5,UF(w,W,s.v,s.t));return;case"s":case"str":Ea(t,4,HF(w,W,(s.v||"").slice(0,255)));return}Ea(t,1,og(null,w,W))}function GF(t,s,w,W){var K=Array.isArray(s),de=lo(s["!ref"]||"A1"),z,B="",e=[];if(de.e.c>255||de.e.r>16383){if(W.WTF)throw new Error("Range "+(s["!ref"]||"A1")+" exceeds format limit A1:IV16384");de.e.c=Math.min(de.e.c,255),de.e.r=Math.min(de.e.c,16383),z=Jo(de)}for(var d=de.s.r;d<=de.e.r;++d){B=Fs(d);for(var P=de.s.c;P<=de.e.c;++P){d===de.s.r&&(e[P]=qs(P)),z=e[P]+B;var a=K?(s[d]||[])[P]:s[z];a&&VF(t,a,d,P)}}}function WF(t,s){for(var w=s||{},W=Hl(),K=0,de=0;de<t.SheetNames.length;++de)t.SheetNames[de]==w.sheet&&(K=de);if(K==0&&w.sheet&&t.SheetNames[0]!=w.sheet)throw new Error("Sheet not found: "+w.sheet);return Ea(W,w.biff==4?1033:w.biff==3?521:9,R3(t,16,w)),GF(W,t.Sheets[t.SheetNames[K]],K,w),Ea(W,10),W.end()}function YF(t,s,w){Ea(t,49,NP({sz:12,color:{theme:1},name:"Arial",family:2,scheme:"minor"},w))}function XF(t,s,w){s&&[[5,8],[23,26],[41,44],[50,392]].forEach(function(W){for(var K=W[0];K<=W[1];++K)s[K]!=null&&Ea(t,1054,HP(K,s[K],w))})}function ZF(t,s){var w=Gn(19);w.write_shift(4,2151),w.write_shift(4,0),w.write_shift(4,0),w.write_shift(2,3),w.write_shift(1,1),w.write_shift(4,0),Ea(t,2151,w),w=Gn(39),w.write_shift(4,2152),w.write_shift(4,0),w.write_shift(4,0),w.write_shift(2,3),w.write_shift(1,0),w.write_shift(4,0),w.write_shift(2,1),w.write_shift(4,4),w.write_shift(2,0),DS(lo(s["!ref"]||"A1"),w),w.write_shift(4,4),Ea(t,2152,w)}function jF(t,s){for(var w=0;w<16;++w)Ea(t,224,YT({numFmtId:0,style:!0},0,s));s.cellXfs.forEach(function(W){Ea(t,224,YT(W,0,s))})}function KF(t,s){for(var w=0;w<s["!links"].length;++w){var W=s["!links"][w];Ea(t,440,KP(W)),W[1].Tooltip&&Ea(t,2048,JP(W))}delete s["!links"]}function JF(t,s){if(s){var w=0;s.forEach(function(W,K){++w<=256&&W&&Ea(t,125,qP(Iy(K,W),K))})}}function $F(t,s,w,W,K){var de=16+iv(K.cellXfs,s,K);if(s.v==null&&!s.bf){Ea(t,513,td(w,W,de));return}if(s.bf)Ea(t,6,wD(s,w,W,K,de));else switch(s.t){case"d":case"n":var z=s.t=="d"?Vl(bl(s.v)):s.v;Ea(t,515,YP(w,W,z,de));break;case"b":case"e":Ea(t,517,WP(w,W,s.v,de,K,s.t));break;case"s":case"str":if(K.bookSST){var B=O3(K.Strings,s.v,K.revStrings);Ea(t,253,BP(w,W,B,de))}else Ea(t,516,UP(w,W,(s.v||"").slice(0,255),de,K));break;default:Ea(t,513,td(w,W,de))}}function QF(t,s,w){var W=Hl(),K=w.SheetNames[t],de=w.Sheets[K]||{},z=(w||{}).Workbook||{},B=(z.Sheets||[])[t]||{},e=Array.isArray(de),d=s.biff==8,P,a="",_=[],x=lo(de["!ref"]||"A1"),v=d?65536:16384;if(x.e.c>255||x.e.r>=v){if(s.WTF)throw new Error("Range "+(de["!ref"]||"A1")+" exceeds format limit A1:IV16384");x.e.c=Math.min(x.e.c,255),x.e.r=Math.min(x.e.c,v-1)}Ea(W,2057,R3(w,16,s)),Ea(W,13,ku(1)),Ea(W,12,ku(100)),Ea(W,15,ml(!0)),Ea(W,17,ml(!1)),Ea(W,16,ed(.001)),Ea(W,95,ml(!0)),Ea(W,42,ml(!1)),Ea(W,43,ml(!1)),Ea(W,130,ku(1)),Ea(W,128,GP([0,0])),Ea(W,131,ml(!1)),Ea(W,132,ml(!1)),d&&JF(W,de["!cols"]),Ea(W,512,VP(x,s)),d&&(de["!links"]=[]);for(var y=x.s.r;y<=x.e.r;++y){a=Fs(y);for(var r=x.s.c;r<=x.e.c;++r){y===x.s.r&&(_[r]=qs(r)),P=_[r]+a;var n=e?(de[y]||[])[r]:de[P];n&&($F(W,n,y,r,s),d&&n.l&&de["!links"].push([P,n.l]))}}var u=B.CodeName||B.name||K;return d&&Ea(W,574,zP((z.Views||[])[0])),d&&(de["!merges"]||[]).length&&Ea(W,229,jP(de["!merges"])),d&&KF(W,de),Ea(W,442,RS(u)),d&&ZF(W,de),Ea(W,10),W.end()}function qF(t,s,w){var W=Hl(),K=(t||{}).Workbook||{},de=K.Sheets||[],z=K.WBProps||{},B=w.biff==8,e=w.biff==5;if(Ea(W,2057,R3(t,5,w)),w.bookType=="xla"&&Ea(W,135),Ea(W,225,B?ku(1200):null),Ea(W,193,SP(2)),e&&Ea(W,191),e&&Ea(W,192),Ea(W,226),Ea(W,92,IP("SheetJS",w)),Ea(W,66,ku(B?1200:1252)),B&&Ea(W,353,ku(0)),B&&Ea(W,448),Ea(W,317,e_(t.SheetNames.length)),B&&t.vbaraw&&Ea(W,211),B&&t.vbaraw){var d=z.CodeName||"ThisWorkbook";Ea(W,442,RS(d))}Ea(W,156,ku(17)),Ea(W,25,ml(!1)),Ea(W,18,ml(!1)),Ea(W,19,ku(0)),B&&Ea(W,431,ml(!1)),B&&Ea(W,444,ku(0)),Ea(W,61,OP()),Ea(W,64,ml(!1)),Ea(W,141,ku(0)),Ea(W,34,ml(aF(t)=="true")),Ea(W,14,ml(!0)),B&&Ea(W,439,ml(!1)),Ea(W,218,ku(0)),YF(W,t,w),XF(W,t.SSF,w),jF(W,w),B&&Ea(W,352,ml(!1));var P=W.end(),a=Hl();B&&Ea(a,140,$P()),B&&w.Strings&&BF(a,252,kP(w.Strings)),Ea(a,10);var _=a.end(),x=Hl(),v=0,y=0;for(y=0;y<t.SheetNames.length;++y)v+=(B?12:11)+(B?2:1)*t.SheetNames[y].length;var r=P.length+v+_.length;for(y=0;y<t.SheetNames.length;++y){var n=de[y]||{};Ea(x,133,FP({pos:r,hs:n.Hidden||0,dt:0,name:t.SheetNames[y]},w)),r+=s[y].length}var u=x.end();if(v!=u.length)throw new Error("BS8 "+v+" != "+u.length);var i=[];return P.length&&i.push(P),u.length&&i.push(u),_.length&&i.push(_),Rs(i)}function ek(t,s){var w=s||{},W=[];t&&!t.SSF&&(t.SSF=Gl(Io)),t&&t.SSF&&(Ly(),Cy(t.SSF),w.revssf=Py(t.SSF),w.revssf[t.SSF[65535]]=0,w.ssf=t.SSF),w.Strings=[],w.Strings.Count=0,w.Strings.Unique=0,z3(w),w.cellXfs=[],iv(w.cellXfs,{},{revssf:{General:0}}),t.Props||(t.Props={});for(var K=0;K<t.SheetNames.length;++K)W[W.length]=QF(K,w,t);return W.unshift(qF(t,W,w)),Rs(W)}function aE(t,s){for(var w=0;w<=t.SheetNames.length;++w){var W=t.Sheets[t.SheetNames[w]];if(!(!W||!W["!ref"])){var K=hu(W["!ref"]);K.e.c>255&&typeof console<"u"&&console.error&&console.error("Worksheet '"+t.SheetNames[w]+"' extends beyond column IV (255). Data may be lost.")}}var de=s||{};switch(de.biff||2){case 8:case 5:return ek(t,s);case 4:case 3:case 2:return WF(t,s)}throw new Error("invalid type "+de.bookType+" for BIFF")}function tk(t,s,w,W){for(var K=t["!merges"]||[],de=[],z=s.s.c;z<=s.e.c;++z){for(var B=0,e=0,d=0;d<K.length;++d)if(!(K[d].s.r>w||K[d].s.c>z)&&!(K[d].e.r<w||K[d].e.c<z)){if(K[d].s.r<w||K[d].s.c<z){B=-1;break}B=K[d].e.r-K[d].s.r+1,e=K[d].e.c-K[d].s.c+1;break}if(!(B<0)){var P=Xi({r:w,c:z}),a=W.dense?(t[w]||[])[z]:t[P],_=a&&a.v!=null&&(a.h||D9(a.w||(Jc(a),a.w)||""))||"",x={};B>1&&(x.rowspan=B),e>1&&(x.colspan=e),W.editable?_='<span contenteditable="true">'+_+"</span>":a&&(x["data-t"]=a&&a.t||"z",a.v!=null&&(x["data-v"]=a.v),a.z!=null&&(x["data-z"]=a.z),a.l&&(a.l.Target||"#").charAt(0)!="#"&&(_='<a href="'+a.l.Target+'">'+_+"</a>")),x.id=(W.id||"sjs")+"-"+P,de.push(Sa("td",_,x))}}var v="<tr>";return v+de.join("")+"</tr>"}var rk='<html><head><meta charset="utf-8"/><title>SheetJS Table Export</title></head><body>',nk="</body></html>";function ak(t,s,w){var W=[];return W.join("")+"<table"+(w&&w.id?' id="'+w.id+'"':"")+">"}function iE(t,s){var w=s||{},W=w.header!=null?w.header:rk,K=w.footer!=null?w.footer:nk,de=[W],z=hu(t["!ref"]);w.dense=Array.isArray(t),de.push(ak(t,z,w));for(var B=z.s.r;B<=z.e.r;++B)de.push(tk(t,z,B,w));return de.push("</table>"+K),de.join("")}function oE(t,s,w){var W=w||{},K=0,de=0;if(W.origin!=null)if(typeof W.origin=="number")K=W.origin;else{var z=typeof W.origin=="string"?gs(W.origin):W.origin;K=z.r,de=z.c}var B=s.getElementsByTagName("tr"),e=Math.min(W.sheetRows||1e7,B.length),d={s:{r:0,c:0},e:{r:K,c:de}};if(t["!ref"]){var P=hu(t["!ref"]);d.s.r=Math.min(d.s.r,P.s.r),d.s.c=Math.min(d.s.c,P.s.c),d.e.r=Math.max(d.e.r,P.e.r),d.e.c=Math.max(d.e.c,P.e.c),K==-1&&(d.e.r=K=P.e.r+1)}var a=[],_=0,x=t["!rows"]||(t["!rows"]=[]),v=0,y=0,r=0,n=0,u=0,i=0;for(t["!cols"]||(t["!cols"]=[]);v<B.length&&y<e;++v){var f=B[v];if(QT(f)){if(W.display)continue;x[y]={hidden:!0}}var g=f.children;for(r=n=0;r<g.length;++r){var h=g[r];if(!(W.display&&QT(h))){var b=h.hasAttribute("data-v")?h.getAttribute("data-v"):h.hasAttribute("v")?h.getAttribute("v"):O9(h.innerHTML),p=h.getAttribute("data-z")||h.getAttribute("z");for(_=0;_<a.length;++_){var E=a[_];E.s.c==n+de&&E.s.r<y+K&&y+K<=E.e.r&&(n=E.e.c+1-de,_=-1)}i=+h.getAttribute("colspan")||1,((u=+h.getAttribute("rowspan")||1)>1||i>1)&&a.push({s:{r:y+K,c:n+de},e:{r:y+K+(u||1)-1,c:n+de+(i||1)-1}});var c={t:"s",v:b},l=h.getAttribute("data-t")||h.getAttribute("t")||"";b!=null&&(b.length==0?c.t=l||"z":W.raw||b.trim().length==0||l=="s"||(b==="TRUE"?c={t:"b",v:!0}:b==="FALSE"?c={t:"b",v:!1}:isNaN(Gc(b))?isNaN(Xp(b).getDate())||(c={t:"d",v:bl(b)},W.cellDates||(c={t:"n",v:Vl(c.v)}),c.z=W.dateNF||Io[14]):c={t:"n",v:Gc(b)})),c.z===void 0&&p!=null&&(c.z=p);var m="",M=h.getElementsByTagName("A");if(M&&M.length)for(var L=0;L<M.length&&!(M[L].hasAttribute("href")&&(m=M[L].getAttribute("href"),m.charAt(0)!="#"));++L);m&&m.charAt(0)!="#"&&(c.l={Target:m}),W.dense?(t[y+K]||(t[y+K]=[]),t[y+K][n+de]=c):t[Xi({c:n+de,r:y+K})]=c,d.e.c<n+de&&(d.e.c=n+de),n+=i}}++y}return a.length&&(t["!merges"]=(t["!merges"]||[]).concat(a)),d.e.r=Math.max(d.e.r,y-1+K),t["!ref"]=Jo(d),y>=e&&(t["!fullref"]=Jo((d.e.r=B.length-v+y-1+K,d))),t}function sE(t,s){var w=s||{},W=w.dense?[]:{};return oE(W,t,s)}function ik(t,s){return id(sE(t,s),s)}function QT(t){var s="",w=ok(t);return w&&(s=w(t).getPropertyValue("display")),s||(s=t.style&&t.style.display),s==="none"}function ok(t){return t.ownerDocument.defaultView&&typeof t.ownerDocument.defaultView.getComputedStyle=="function"?t.ownerDocument.defaultView.getComputedStyle:typeof getComputedStyle=="function"?getComputedStyle:null}var sk=function(){var t=["<office:master-styles>",'<style:master-page style:name="mp1" style:page-layout-name="mp1">',"<style:header/>",'<style:header-left style:display="false"/>',"<style:footer/>",'<style:footer-left style:display="false"/>',"</style:master-page>","</office:master-styles>"].join(""),s="<office:document-styles "+Zp({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","office:version":"1.2"})+">"+t+"</office:document-styles>";return function(){return $o+s}}(),qT=function(){var t=function(de){return Wi(de).replace(/ +/g,function(z){return'<text:s text:c="'+z.length+'"/>'}).replace(/\t/g,"<text:tab/>").replace(/\n/g,"</text:p><text:p>").replace(/^ /,"<text:s/>").replace(/ $/,"<text:s/>")},s=` <table:table-cell />
`,w=` <table:covered-table-cell/>
`,W=function(de,z,B){var e=[];e.push(' <table:table table:name="'+Wi(z.SheetNames[B])+`" table:style-name="ta1">
`);var d=0,P=0,a=hu(de["!ref"]||"A1"),_=de["!merges"]||[],x=0,v=Array.isArray(de);if(de["!cols"])for(P=0;P<=a.e.c;++P)e.push(" <table:table-column"+(de["!cols"][P]?' table:style-name="co'+de["!cols"][P].ods+'"':"")+`></table:table-column>
`);var y="",r=de["!rows"]||[];for(d=0;d<a.s.r;++d)y=r[d]?' table:style-name="ro'+r[d].ods+'"':"",e.push(" <table:table-row"+y+`></table:table-row>
`);for(;d<=a.e.r;++d){for(y=r[d]?' table:style-name="ro'+r[d].ods+'"':"",e.push(" <table:table-row"+y+`>
`),P=0;P<a.s.c;++P)e.push(s);for(;P<=a.e.c;++P){var n=!1,u={},i="";for(x=0;x!=_.length;++x)if(!(_[x].s.c>P)&&!(_[x].s.r>d)&&!(_[x].e.c<P)&&!(_[x].e.r<d)){(_[x].s.c!=P||_[x].s.r!=d)&&(n=!0),u["table:number-columns-spanned"]=_[x].e.c-_[x].s.c+1,u["table:number-rows-spanned"]=_[x].e.r-_[x].s.r+1;break}if(n){e.push(w);continue}var f=Xi({r:d,c:P}),g=v?(de[d]||[])[P]:de[f];if(g&&g.f&&(u["table:formula"]=Wi(CD(g.f)),g.F&&g.F.slice(0,f.length)==f)){var h=hu(g.F);u["table:number-matrix-columns-spanned"]=h.e.c-h.s.c+1,u["table:number-matrix-rows-spanned"]=h.e.r-h.s.r+1}if(!g){e.push(s);continue}switch(g.t){case"b":i=g.v?"TRUE":"FALSE",u["office:value-type"]="boolean",u["office:boolean-value"]=g.v?"true":"false";break;case"n":i=g.w||String(g.v||0),u["office:value-type"]="float",u["office:value"]=g.v||0;break;case"s":case"str":i=g.v==null?"":g.v,u["office:value-type"]="string";break;case"d":i=g.w||bl(g.v).toISOString(),u["office:value-type"]="date",u["office:date-value"]=bl(g.v).toISOString(),u["table:style-name"]="ce1";break;default:e.push(s);continue}var b=t(i);if(g.l&&g.l.Target){var p=g.l.Target;p=p.charAt(0)=="#"?"#"+LD(p.slice(1)):p,p.charAt(0)!="#"&&!p.match(/^\w+:/)&&(p="../"+p),b=Sa("text:a",b,{"xlink:href":p.replace(/&/g,"&amp;")})}e.push(" "+Sa("table:table-cell",Sa("text:p",b,{}),u)+`
`)}e.push(` </table:table-row>
`)}return e.push(` </table:table>
`),e.join("")},K=function(de,z){de.push(` <office:automatic-styles>
`),de.push(` <number:date-style style:name="N37" number:automatic-order="true">
`),de.push(` <number:month number:style="long"/>
`),de.push(` <number:text>/</number:text>
`),de.push(` <number:day number:style="long"/>
`),de.push(` <number:text>/</number:text>
`),de.push(` <number:year/>
`),de.push(` </number:date-style>
`);var B=0;z.SheetNames.map(function(d){return z.Sheets[d]}).forEach(function(d){if(d&&d["!cols"]){for(var P=0;P<d["!cols"].length;++P)if(d["!cols"][P]){var a=d["!cols"][P];if(a.width==null&&a.wpx==null&&a.wch==null)continue;D3(a),a.ods=B;var _=d["!cols"][P].wpx+"px";de.push(' <style:style style:name="co'+B+`" style:family="table-column">
`),de.push(' <style:table-column-properties fo:break-before="auto" style:column-width="'+_+`"/>
`),de.push(` </style:style>
`),++B}}});var e=0;z.SheetNames.map(function(d){return z.Sheets[d]}).forEach(function(d){if(d&&d["!rows"]){for(var P=0;P<d["!rows"].length;++P)if(d["!rows"][P]){d["!rows"][P].ods=e;var a=d["!rows"][P].hpx+"px";de.push(' <style:style style:name="ro'+e+`" style:family="table-row">
`),de.push(' <style:table-row-properties fo:break-before="auto" style:row-height="'+a+`"/>
`),de.push(` </style:style>
`),++e}}}),de.push(` <style:style style:name="ta1" style:family="table" style:master-page-name="mp1">
`),de.push(` <style:table-properties table:display="true" style:writing-mode="lr-tb"/>
`),de.push(` </style:style>
`),de.push(` <style:style style:name="ce1" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N37"/>
`),de.push(` </office:automatic-styles>
`)};return function(z,B){var e=[$o],d=Zp({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:meta":"urn:oasis:names:tc:opendocument:xmlns:meta:1.0","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:presentation":"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:chart":"urn:oasis:names:tc:opendocument:xmlns:chart:1.0","xmlns:dr3d":"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0","xmlns:math":"http://www.w3.org/1998/Math/MathML","xmlns:form":"urn:oasis:names:tc:opendocument:xmlns:form:1.0","xmlns:script":"urn:oasis:names:tc:opendocument:xmlns:script:1.0","xmlns:ooo":"http://openoffice.org/2004/office","xmlns:ooow":"http://openoffice.org/2004/writer","xmlns:oooc":"http://openoffice.org/2004/calc","xmlns:dom":"http://www.w3.org/2001/xml-events","xmlns:xforms":"http://www.w3.org/2002/xforms","xmlns:xsd":"http://www.w3.org/2001/XMLSchema","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xmlns:sheet":"urn:oasis:names:tc:opendocument:sh33tjs:1.0","xmlns:rpt":"http://openoffice.org/2005/report","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","xmlns:xhtml":"http://www.w3.org/1999/xhtml","xmlns:grddl":"http://www.w3.org/2003/g/data-view#","xmlns:tableooo":"http://openoffice.org/2009/table","xmlns:drawooo":"http://openoffice.org/2010/draw","xmlns:calcext":"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0","xmlns:loext":"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0","xmlns:field":"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0","xmlns:formx":"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0","xmlns:css3t":"http://www.w3.org/TR/css3-text/","office:version":"1.2"}),P=Zp({"xmlns:config":"urn:oasis:names:tc:opendocument:xmlns:config:1.0","office:mimetype":"application/vnd.oasis.opendocument.spreadsheet"});B.bookType=="fods"?(e.push("<office:document"+d+P+`>
`),e.push(TS().replace(/office:document-meta/g,"office:meta"))):e.push("<office:document-content"+d+`>
`),K(e,z),e.push(` <office:body>
`),e.push(` <office:spreadsheet>
`);for(var a=0;a!=z.SheetNames.length;++a)e.push(W(z.Sheets[z.SheetNames[a]],z,a));return e.push(` </office:spreadsheet>
`),e.push(` </office:body>
`),B.bookType=="fods"?e.push("</office:document>"):e.push("</office:document-content>"),e.join("")}}();function lE(t,s){if(s.bookType=="fods")return qT(t,s);var w=w3(),W="",K=[],de=[];return W="mimetype",di(w,W,"application/vnd.oasis.opendocument.spreadsheet"),W="content.xml",di(w,W,qT(t,s)),K.push([W,"text/xml"]),de.push([W,"ContentFile"]),W="styles.xml",di(w,W,sk(t,s)),K.push([W,"text/xml"]),de.push([W,"StylesFile"]),W="meta.xml",di(w,W,$o+TS()),K.push([W,"text/xml"]),de.push([W,"MetadataFile"]),W="manifest.rdf",di(w,W,xP(de)),K.push([W,"application/rdf+xml"]),W="META-INF/manifest.xml",di(w,W,yP(K)),w}/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */function sy(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function lk(t){return typeof TextEncoder<"u"?new TextEncoder().encode(t):wf(Uc(t))}function uk(t,s){e:for(var w=0;w<=t.length-s.length;++w){for(var W=0;W<s.length;++W)if(t[w+W]!=s[W])continue e;return!0}return!1}function tv(t){var s=t.reduce(function(K,de){return K+de.length},0),w=new Uint8Array(s),W=0;return t.forEach(function(K){w.set(K,W),W+=K.length}),w}function fk(t,s,w){var W=Math.floor(w==0?0:Math.LOG10E*Math.log(Math.abs(w)))+6176-20,K=w/Math.pow(10,W-6176);t[s+15]|=W>>7,t[s+14]|=(W&127)<<1;for(var de=0;K>=1;++de,K/=256)t[s+de]=K&255;t[s+15]|=w>=0?0:128}function jp(t,s){var w=s?s[0]:0,W=t[w]&127;e:if(t[w++]>=128&&(W|=(t[w]&127)<<7,t[w++]<128||(W|=(t[w]&127)<<14,t[w++]<128)||(W|=(t[w]&127)<<21,t[w++]<128)||(W+=(t[w]&127)*Math.pow(2,28),++w,t[w++]<128)||(W+=(t[w]&127)*Math.pow(2,35),++w,t[w++]<128)||(W+=(t[w]&127)*Math.pow(2,42),++w,t[w++]<128)))break e;return s&&(s[0]=w),W}function Vi(t){var s=new Uint8Array(7);s[0]=t&127;var w=1;e:if(t>127){if(s[w-1]|=128,s[w]=t>>7&127,++w,t<=16383||(s[w-1]|=128,s[w]=t>>14&127,++w,t<=2097151)||(s[w-1]|=128,s[w]=t>>21&127,++w,t<=268435455)||(s[w-1]|=128,s[w]=t/256>>>21&127,++w,t<=34359738367)||(s[w-1]|=128,s[w]=t/65536>>>21&127,++w,t<=4398046511103))break e;s[w-1]|=128,s[w]=t/16777216>>>21&127,++w}return s.slice(0,w)}function f0(t){var s=0,w=t[s]&127;e:if(t[s++]>=128){if(w|=(t[s]&127)<<7,t[s++]<128||(w|=(t[s]&127)<<14,t[s++]<128)||(w|=(t[s]&127)<<21,t[s++]<128))break e;w|=(t[s]&127)<<28}return w}function ns(t){for(var s=[],w=[0];w[0]<t.length;){var W=w[0],K=jp(t,w),de=K&7;K=Math.floor(K/8);var z=0,B;if(K==0)break;switch(de){case 0:{for(var e=w[0];t[w[0]++]>=128;);B=t.slice(e,w[0])}break;case 5:z=4,B=t.slice(w[0],w[0]+z),w[0]+=z;break;case 1:z=8,B=t.slice(w[0],w[0]+z),w[0]+=z;break;case 2:z=jp(t,w),B=t.slice(w[0],w[0]+z),w[0]+=z;break;case 3:case 4:default:throw new Error("PB Type ".concat(de," for Field ").concat(K," at offset ").concat(W))}var d={data:B,type:de};s[K]==null?s[K]=[d]:s[K].push(d)}return s}function Ls(t){var s=[];return t.forEach(function(w,W){w.forEach(function(K){K.data&&(s.push(Vi(W*8+K.type)),K.type==2&&s.push(Vi(K.data.length)),s.push(K.data))})}),tv(s)}function gf(t){for(var s,w=[],W=[0];W[0]<t.length;){var K=jp(t,W),de=ns(t.slice(W[0],W[0]+K));W[0]+=K;var z={id:f0(de[1][0].data),messages:[]};de[2].forEach(function(B){var e=ns(B.data),d=f0(e[3][0].data);z.messages.push({meta:e,data:t.slice(W[0],W[0]+d)}),W[0]+=d}),(s=de[3])!=null&&s[0]&&(z.merge=f0(de[3][0].data)>>>0>0),w.push(z)}return w}function Nd(t){var s=[];return t.forEach(function(w){var W=[];W[1]=[{data:Vi(w.id),type:0}],W[2]=[],w.merge!=null&&(W[3]=[{data:Vi(+!!w.merge),type:0}]);var K=[];w.messages.forEach(function(z){K.push(z.data),z.meta[3]=[{type:0,data:Vi(z.data.length)}],W[2].push({data:Ls(z.meta),type:2})});var de=Ls(W);s.push(Vi(de.length)),s.push(de),K.forEach(function(z){return s.push(z)})}),tv(s)}function ck(t,s){if(t!=0)throw new Error("Unexpected Snappy chunk type ".concat(t));for(var w=[0],W=jp(s,w),K=[];w[0]<s.length;){var de=s[w[0]]&3;if(de==0){var z=s[w[0]++]>>2;if(z<60)++z;else{var B=z-59;z=s[w[0]],B>1&&(z|=s[w[0]+1]<<8),B>2&&(z|=s[w[0]+2]<<16),B>3&&(z|=s[w[0]+3]<<24),z>>>=0,z++,w[0]+=B}K.push(s.slice(w[0],w[0]+z)),w[0]+=z;continue}else{var e=0,d=0;if(de==1?(d=(s[w[0]]>>2&7)+4,e=(s[w[0]++]&224)<<3,e|=s[w[0]++]):(d=(s[w[0]++]>>2)+1,de==2?(e=s[w[0]]|s[w[0]+1]<<8,w[0]+=2):(e=(s[w[0]]|s[w[0]+1]<<8|s[w[0]+2]<<16|s[w[0]+3]<<24)>>>0,w[0]+=4)),K=[tv(K)],e==0)throw new Error("Invalid offset 0");if(e>K[0].length)throw new Error("Invalid offset beyond length");if(d>=e)for(K.push(K[0].slice(-e)),d-=e;d>=K[K.length-1].length;)K.push(K[K.length-1]),d-=K[K.length-1].length;K.push(K[0].slice(-e,-e+d))}}var P=tv(K);if(P.length!=W)throw new Error("Unexpected length: ".concat(P.length," != ").concat(W));return P}function yf(t){for(var s=[],w=0;w<t.length;){var W=t[w++],K=t[w]|t[w+1]<<8|t[w+2]<<16;w+=3,s.push(ck(W,t.slice(w,w+K))),w+=K}if(w!==t.length)throw new Error("data is not a valid framed stream!");return tv(s)}function Bd(t){for(var s=[],w=0;w<t.length;){var W=Math.min(t.length-w,268435455),K=new Uint8Array(4);s.push(K);var de=Vi(W),z=de.length;s.push(de),W<=60?(z++,s.push(new Uint8Array([W-1<<2]))):W<=256?(z+=2,s.push(new Uint8Array([240,W-1&255]))):W<=65536?(z+=3,s.push(new Uint8Array([244,W-1&255,W-1>>8&255]))):W<=16777216?(z+=4,s.push(new Uint8Array([248,W-1&255,W-1>>8&255,W-1>>16&255]))):W<=4294967296&&(z+=5,s.push(new Uint8Array([252,W-1&255,W-1>>8&255,W-1>>16&255,W-1>>>24&255]))),s.push(t.slice(w,w+W)),z+=W,K[0]=0,K[1]=z&255,K[2]=z>>8&255,K[3]=z>>16&255,w+=W}return tv(s)}function qm(t,s){var w=new Uint8Array(32),W=sy(w),K=12,de=0;switch(w[0]=5,t.t){case"n":w[1]=2,fk(w,K,t.v),de|=1,K+=16;break;case"b":w[1]=6,W.setFloat64(K,t.v?1:0,!0),de|=2,K+=8;break;case"s":if(s.indexOf(t.v)==-1)throw new Error("Value ".concat(t.v," missing from SST!"));w[1]=3,W.setUint32(K,s.indexOf(t.v),!0),de|=8,K+=4;break;default:throw"unsupported cell type "+t.t}return W.setUint32(8,de,!0),w.slice(0,K)}function ex(t,s){var w=new Uint8Array(32),W=sy(w),K=12,de=0;switch(w[0]=3,t.t){case"n":w[2]=2,W.setFloat64(K,t.v,!0),de|=32,K+=8;break;case"b":w[2]=6,W.setFloat64(K,t.v?1:0,!0),de|=32,K+=8;break;case"s":if(s.indexOf(t.v)==-1)throw new Error("Value ".concat(t.v," missing from SST!"));w[2]=3,W.setUint32(K,s.indexOf(t.v),!0),de|=16,K+=4;break;default:throw"unsupported cell type "+t.t}return W.setUint32(4,de,!0),w.slice(0,K)}function Rh(t){var s=ns(t);return jp(s[1][0].data)}function hk(t,s,w){var W,K,de,z;if(!((W=t[6])!=null&&W[0])||!((K=t[7])!=null&&K[0]))throw"Mutation only works on post-BNC storages!";var B=((z=(de=t[8])==null?void 0:de[0])==null?void 0:z.data)&&f0(t[8][0].data)>0||!1;if(B)throw"Math only works with normal offsets";for(var e=0,d=sy(t[7][0].data),P=0,a=[],_=sy(t[4][0].data),x=0,v=[],y=0;y<s.length;++y){if(s[y]==null){d.setUint16(y*2,65535,!0),_.setUint16(y*2,65535);continue}d.setUint16(y*2,P,!0),_.setUint16(y*2,x,!0);var r,n;switch(typeof s[y]){case"string":r=qm({t:"s",v:s[y]},w),n=ex({t:"s",v:s[y]},w);break;case"number":r=qm({t:"n",v:s[y]},w),n=ex({t:"n",v:s[y]},w);break;case"boolean":r=qm({t:"b",v:s[y]},w),n=ex({t:"b",v:s[y]},w);break;default:throw new Error("Unsupported value "+s[y])}a.push(r),P+=r.length,v.push(n),x+=n.length,++e}for(t[2][0].data=Vi(e);y<t[7][0].data.length/2;++y)d.setUint16(y*2,65535,!0),_.setUint16(y*2,65535,!0);return t[6][0].data=tv(a),t[3][0].data=tv(v),e}function vk(t,s){if(!s||!s.numbers)throw new Error("Must pass a `numbers` option -- check the README");var w=t.Sheets[t.SheetNames[0]];t.SheetNames.length>1&&console.error("The Numbers writer currently writes only the first table");var W=hu(w["!ref"]);W.s.r=W.s.c=0;var K=!1;W.e.c>9&&(K=!0,W.e.c=9),W.e.r>49&&(K=!0,W.e.r=49),K&&console.error("The Numbers writer is currently limited to ".concat(Jo(W)));var de=ly(w,{range:W,header:1}),z=["~Sh33tJ5~"];de.forEach(function(N){return N.forEach(function(H){typeof H=="string"&&z.push(H)})});var B={},e=[],d=Ki.read(s.numbers,{type:"base64"});d.FileIndex.map(function(N,H){return[N,d.FullPaths[H]]}).forEach(function(N){var H=N[0],k=N[1];if(H.type==2&&H.name.match(/\.iwa/)){var V=H.content,G=yf(V),U=gf(G);U.forEach(function(Y){e.push(Y.id),B[Y.id]={deps:[],location:k,type:f0(Y.messages[0].meta[1][0].data)}})}}),e.sort(function(N,H){return N-H});var P=e.filter(function(N){return N>1}).map(function(N){return[N,Vi(N)]});d.FileIndex.map(function(N,H){return[N,d.FullPaths[H]]}).forEach(function(N){var H=N[0];if(N[1],!!H.name.match(/\.iwa/)){var k=gf(yf(H.content));k.forEach(function(V){V.messages.forEach(function(G){P.forEach(function(U){V.messages.some(function(Y){return f0(Y.meta[1][0].data)!=11006&&uk(Y.data,U[1])})&&B[U[0]].deps.push(V.id)})})})}});for(var a=Ki.find(d,B[1].location),_=gf(yf(a.content)),x,v=0;v<_.length;++v){var y=_[v];y.id==1&&(x=y)}var r=Rh(ns(x.messages[0].data)[1][0].data);for(a=Ki.find(d,B[r].location),_=gf(yf(a.content)),v=0;v<_.length;++v)y=_[v],y.id==r&&(x=y);for(r=Rh(ns(x.messages[0].data)[2][0].data),a=Ki.find(d,B[r].location),_=gf(yf(a.content)),v=0;v<_.length;++v)y=_[v],y.id==r&&(x=y);for(r=Rh(ns(x.messages[0].data)[2][0].data),a=Ki.find(d,B[r].location),_=gf(yf(a.content)),v=0;v<_.length;++v)y=_[v],y.id==r&&(x=y);var n=ns(x.messages[0].data);{n[6][0].data=Vi(W.e.r+1),n[7][0].data=Vi(W.e.c+1);var u=Rh(n[46][0].data),i=Ki.find(d,B[u].location),f=gf(yf(i.content));{for(var g=0;g<f.length&&f[g].id!=u;++g);if(f[g].id!=u)throw"Bad ColumnRowUIDMapArchive";var h=ns(f[g].messages[0].data);h[1]=[],h[2]=[],h[3]=[];for(var b=0;b<=W.e.c;++b){var p=[];p[1]=p[2]=[{type:0,data:Vi(b+420690)}],h[1].push({type:2,data:Ls(p)}),h[2].push({type:0,data:Vi(b)}),h[3].push({type:0,data:Vi(b)})}h[4]=[],h[5]=[],h[6]=[];for(var E=0;E<=W.e.r;++E)p=[],p[1]=p[2]=[{type:0,data:Vi(E+726270)}],h[4].push({type:2,data:Ls(p)}),h[5].push({type:0,data:Vi(E)}),h[6].push({type:0,data:Vi(E)});f[g].messages[0].data=Ls(h)}i.content=Bd(Nd(f)),i.size=i.content.length,delete n[46];var c=ns(n[4][0].data);{c[7][0].data=Vi(W.e.r+1);var l=ns(c[1][0].data),m=Rh(l[2][0].data);i=Ki.find(d,B[m].location),f=gf(yf(i.content));{if(f[0].id!=m)throw"Bad HeaderStorageBucket";var M=ns(f[0].messages[0].data);for(E=0;E<de.length;++E){var L=ns(M[2][0].data);L[1][0].data=Vi(E),L[4][0].data=Vi(de[E].length),M[2][E]={type:M[2][0].type,data:Ls(L)}}f[0].messages[0].data=Ls(M)}i.content=Bd(Nd(f)),i.size=i.content.length;var D=Rh(c[2][0].data);i=Ki.find(d,B[D].location),f=gf(yf(i.content));{if(f[0].id!=D)throw"Bad HeaderStorageBucket";for(M=ns(f[0].messages[0].data),b=0;b<=W.e.c;++b)L=ns(M[2][0].data),L[1][0].data=Vi(b),L[4][0].data=Vi(W.e.r+1),M[2][b]={type:M[2][0].type,data:Ls(L)};f[0].messages[0].data=Ls(M)}i.content=Bd(Nd(f)),i.size=i.content.length;var A=Rh(c[4][0].data);(function(){for(var N=Ki.find(d,B[A].location),H=gf(yf(N.content)),k,V=0;V<H.length;++V){var G=H[V];G.id==A&&(k=G)}var U=ns(k.messages[0].data);{U[3]=[];var Y=[];z.forEach(function(ie,se){Y[1]=[{type:0,data:Vi(se)}],Y[2]=[{type:0,data:Vi(1)}],Y[3]=[{type:2,data:lk(ie)}],U[3].push({type:2,data:Ls(Y)})})}k.messages[0].data=Ls(U);var ee=Nd(H),re=Bd(ee);N.content=re,N.size=N.content.length})();var C=ns(c[3][0].data);{var S=C[1][0];delete C[2];var o=ns(S.data);{var R=Rh(o[2][0].data);(function(){for(var N=Ki.find(d,B[R].location),H=gf(yf(N.content)),k,V=0;V<H.length;++V){var G=H[V];G.id==R&&(k=G)}var U=ns(k.messages[0].data);{delete U[6],delete C[7];var Y=new Uint8Array(U[5][0].data);U[5]=[];for(var ee=0,re=0;re<=W.e.r;++re){var ie=ns(Y);ee+=hk(ie,de[re],z),ie[1][0].data=Vi(re),U[5].push({data:Ls(ie),type:2})}U[1]=[{type:0,data:Vi(W.e.c+1)}],U[2]=[{type:0,data:Vi(W.e.r+1)}],U[3]=[{type:0,data:Vi(ee)}],U[4]=[{type:0,data:Vi(W.e.r+1)}]}k.messages[0].data=Ls(U);var se=Nd(H),ce=Bd(se);N.content=ce,N.size=N.content.length})()}S.data=Ls(o)}c[3][0].data=Ls(C)}n[4][0].data=Ls(c)}x.messages[0].data=Ls(n);var T=Nd(_),O=Bd(T);return a.content=O,a.size=a.content.length,d}function dk(t){return function(w){for(var W=0;W!=t.length;++W){var K=t[W];w[K[0]]===void 0&&(w[K[0]]=K[1]),K[2]==="n"&&(w[K[0]]=Number(w[K[0]]))}}}function z3(t){dk([["cellDates",!1],["bookSST",!1],["bookType","xlsx"],["compression",!1],["WTF",!1]])(t)}function pk(t,s){return s.bookType=="ods"?lE(t,s):s.bookType=="numbers"?vk(t,s):s.bookType=="xlsb"?gk(t,s):yk(t,s)}function gk(t,s){e0=1024,t&&!t.SSF&&(t.SSF=Gl(Io)),t&&t.SSF&&(Ly(),Cy(t.SSF),s.revssf=Py(t.SSF),s.revssf[t.SSF[65535]]=0,s.ssf=t.SSF),s.rels={},s.wbrels={},s.Strings=[],s.Strings.Count=0,s.Strings.Unique=0,Sp?s.revStrings=new Map:(s.revStrings={},s.revStrings.foo=[],delete s.revStrings.foo);var w=s.bookType=="xlsb"?"bin":"xml",W=WS.indexOf(s.bookType)>-1,K=xS();z3(s=s||{});var de=w3(),z="",B=0;if(s.cellXfs=[],iv(s.cellXfs,{},{revssf:{General:0}}),t.Props||(t.Props={}),z="docProps/core.xml",di(de,z,AS(t.Props,s)),K.coreprops.push(z),Gi(s.rels,2,z,Ii.CORE_PROPS),z="docProps/app.xml",!(t.Props&&t.Props.SheetNames))if(!t.Workbook||!t.Workbook.Sheets)t.Props.SheetNames=t.SheetNames;else{for(var e=[],d=0;d<t.SheetNames.length;++d)(t.Workbook.Sheets[d]||{}).Hidden!=2&&e.push(t.SheetNames[d]);t.Props.SheetNames=e}for(t.Props.Worksheets=t.Props.SheetNames.length,di(de,z,ES(t.Props)),K.extprops.push(z),Gi(s.rels,3,z,Ii.EXT_PROPS),t.Custprops!==t.Props&&Os(t.Custprops||{}).length>0&&(z="docProps/custom.xml",di(de,z,MS(t.Custprops)),K.custprops.push(z),Gi(s.rels,4,z,Ii.CUST_PROPS)),B=1;B<=t.SheetNames.length;++B){var P={"!id":{}},a=t.Sheets[t.SheetNames[B-1]],_=(a||{})["!type"]||"sheet";switch(_){case"chart":default:z="xl/worksheets/sheet"+B+"."+w,di(de,z,xF(B-1,z,s,t,P)),K.sheets.push(z),Gi(s.wbrels,-1,"worksheets/sheet"+B+"."+w,Ii.WS[0])}if(a){var x=a["!comments"],v=!1,y="";x&&x.length>0&&(y="xl/comments"+B+"."+w,di(de,y,TF(x,y)),K.comments.push(y),Gi(P,-1,"../comments"+B+"."+w,Ii.CMNT),v=!0),a["!legacy"]&&v&&di(de,"xl/drawings/vmlDrawing"+B+".vml",VS(B,a["!comments"])),delete a["!comments"],delete a["!legacy"]}P["!id"].rId1&&di(de,wS(z),l0(P))}return s.Strings!=null&&s.Strings.length>0&&(z="xl/sharedStrings."+w,di(de,z,wF(s.Strings,z,s)),K.strs.push(z),Gi(s.wbrels,-1,"sharedStrings."+w,Ii.SST)),z="xl/workbook."+w,di(de,z,mF(t,z)),K.workbooks.push(z),Gi(s.rels,1,z,Ii.WB),z="xl/theme/theme1.xml",di(de,z,US(t.Themes,s)),K.themes.push(z),Gi(s.wbrels,-1,"theme/theme1.xml",Ii.THEME),z="xl/styles."+w,di(de,z,bF(t,z,s)),K.styles.push(z),Gi(s.wbrels,-1,"styles."+w,Ii.STY),t.vbaraw&&W&&(z="xl/vbaProject.bin",di(de,z,t.vbaraw),K.vba.push(z),Gi(s.wbrels,-1,"vbaProject.bin",Ii.VBA)),z="xl/metadata."+w,di(de,z,AF(z)),K.metadata.push(z),Gi(s.wbrels,-1,"metadata."+w,Ii.XLMETA),di(de,"[Content_Types].xml",bS(K,s)),di(de,"_rels/.rels",l0(s.rels)),di(de,"xl/_rels/workbook."+w+".rels",l0(s.wbrels)),delete s.revssf,delete s.ssf,de}function yk(t,s){e0=1024,t&&!t.SSF&&(t.SSF=Gl(Io)),t&&t.SSF&&(Ly(),Cy(t.SSF),s.revssf=Py(t.SSF),s.revssf[t.SSF[65535]]=0,s.ssf=t.SSF),s.rels={},s.wbrels={},s.Strings=[],s.Strings.Count=0,s.Strings.Unique=0,Sp?s.revStrings=new Map:(s.revStrings={},s.revStrings.foo=[],delete s.revStrings.foo);var w="xml",W=WS.indexOf(s.bookType)>-1,K=xS();z3(s=s||{});var de=w3(),z="",B=0;if(s.cellXfs=[],iv(s.cellXfs,{},{revssf:{General:0}}),t.Props||(t.Props={}),z="docProps/core.xml",di(de,z,AS(t.Props,s)),K.coreprops.push(z),Gi(s.rels,2,z,Ii.CORE_PROPS),z="docProps/app.xml",!(t.Props&&t.Props.SheetNames))if(!t.Workbook||!t.Workbook.Sheets)t.Props.SheetNames=t.SheetNames;else{for(var e=[],d=0;d<t.SheetNames.length;++d)(t.Workbook.Sheets[d]||{}).Hidden!=2&&e.push(t.SheetNames[d]);t.Props.SheetNames=e}t.Props.Worksheets=t.Props.SheetNames.length,di(de,z,ES(t.Props)),K.extprops.push(z),Gi(s.rels,3,z,Ii.EXT_PROPS),t.Custprops!==t.Props&&Os(t.Custprops||{}).length>0&&(z="docProps/custom.xml",di(de,z,MS(t.Custprops)),K.custprops.push(z),Gi(s.rels,4,z,Ii.CUST_PROPS));var P=["SheetJ5"];for(s.tcid=0,B=1;B<=t.SheetNames.length;++B){var a={"!id":{}},_=t.Sheets[t.SheetNames[B-1]],x=(_||{})["!type"]||"sheet";switch(x){case"chart":default:z="xl/worksheets/sheet"+B+"."+w,di(de,z,qS(B-1,s,t,a)),K.sheets.push(z),Gi(s.wbrels,-1,"worksheets/sheet"+B+"."+w,Ii.WS[0])}if(_){var v=_["!comments"],y=!1,r="";if(v&&v.length>0){var n=!1;v.forEach(function(u){u[1].forEach(function(i){i.T==!0&&(n=!0)})}),n&&(r="xl/threadedComments/threadedComment"+B+"."+w,di(de,r,j_(v,P,s)),K.threadedcomments.push(r),Gi(a,-1,"../threadedComments/threadedComment"+B+"."+w,Ii.TCMNT)),r="xl/comments"+B+"."+w,di(de,r,GS(v)),K.comments.push(r),Gi(a,-1,"../comments"+B+"."+w,Ii.CMNT),y=!0}_["!legacy"]&&y&&di(de,"xl/drawings/vmlDrawing"+B+".vml",VS(B,_["!comments"])),delete _["!comments"],delete _["!legacy"]}a["!id"].rId1&&di(de,wS(z),l0(a))}return s.Strings!=null&&s.Strings.length>0&&(z="xl/sharedStrings."+w,di(de,z,FS(s.Strings,s)),K.strs.push(z),Gi(s.wbrels,-1,"sharedStrings."+w,Ii.SST)),z="xl/workbook."+w,di(de,z,rE(t)),K.workbooks.push(z),Gi(s.rels,1,z,Ii.WB),z="xl/theme/theme1.xml",di(de,z,US(t.Themes,s)),K.themes.push(z),Gi(s.wbrels,-1,"theme/theme1.xml",Ii.THEME),z="xl/styles."+w,di(de,z,NS(t,s)),K.styles.push(z),Gi(s.wbrels,-1,"styles."+w,Ii.STY),t.vbaraw&&W&&(z="xl/vbaProject.bin",di(de,z,t.vbaraw),K.vba.push(z),Gi(s.wbrels,-1,"vbaProject.bin",Ii.VBA)),z="xl/metadata."+w,di(de,z,HS()),K.metadata.push(z),Gi(s.wbrels,-1,"metadata."+w,Ii.XLMETA),P.length>1&&(z="xl/persons/person.xml",di(de,z,K_(P)),K.people.push(z),Gi(s.wbrels,-1,"persons/person.xml",Ii.PEOPLE)),di(de,"[Content_Types].xml",bS(K,s)),di(de,"_rels/.rels",l0(s.rels)),di(de,"xl/_rels/workbook."+w+".rels",l0(s.wbrels)),delete s.revssf,delete s.ssf,de}function mk(t,s){var w="";switch((s||{}).type||"base64"){case"buffer":return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]];case"base64":w=Kc(t.slice(0,12));break;case"binary":w=t;break;case"array":return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]];default:throw new Error("Unrecognized type "+(s&&s.type||"undefined"))}return[w.charCodeAt(0),w.charCodeAt(1),w.charCodeAt(2),w.charCodeAt(3),w.charCodeAt(4),w.charCodeAt(5),w.charCodeAt(6),w.charCodeAt(7)]}function uE(t,s){switch(s.type){case"base64":case"binary":break;case"buffer":case"array":s.type="";break;case"file":return rg(s.file,Ki.write(t,{type:zi?"buffer":""}));case"string":throw new Error("'string' output type invalid for '"+s.bookType+"' files");default:throw new Error("Unrecognized type "+s.type)}return Ki.write(t,s)}function xk(t,s){var w=Gl(s||{}),W=pk(t,w);return bk(W,w)}function bk(t,s){var w={},W=zi?"nodebuffer":typeof Uint8Array<"u"?"array":"string";if(s.compression&&(w.compression="DEFLATE"),s.password)w.type=W;else switch(s.type){case"base64":w.type="base64";break;case"binary":w.type="string";break;case"string":throw new Error("'string' output type invalid for '"+s.bookType+"' files");case"buffer":case"file":w.type=W;break;default:throw new Error("Unrecognized type "+s.type)}var K=t.FullPaths?Ki.write(t,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[w.type]||w.type,compression:!!s.compression}):t.generate(w);if(typeof Deno<"u"&&typeof K=="string"){if(s.type=="binary"||s.type=="base64")return K;K=new Uint8Array(My(K))}return s.password&&typeof encrypt_agile<"u"?uE(encrypt_agile(K,s.password),s):s.type==="file"?rg(s.file,K):s.type=="string"?bp(K):K}function wk(t,s){var w=s||{},W=zF(t,w);return uE(W,w)}function qf(t,s,w){w||(w="");var W=w+t;switch(s.type){case"base64":return Yp(Uc(W));case"binary":return Uc(W);case"string":return t;case"file":return rg(s.file,W,"utf8");case"buffer":return zi?Qc(W,"utf8"):typeof TextEncoder<"u"?new TextEncoder().encode(W):qf(W,{type:"binary"}).split("").map(function(K){return K.charCodeAt(0)})}throw new Error("Unrecognized type "+s.type)}function Tk(t,s){switch(s.type){case"base64":return Yp(t);case"binary":return t;case"string":return t;case"file":return rg(s.file,t,"binary");case"buffer":return zi?Qc(t,"binary"):t.split("").map(function(w){return w.charCodeAt(0)})}throw new Error("Unrecognized type "+s.type)}function l1(t,s){switch(s.type){case"string":case"base64":case"binary":for(var w="",W=0;W<t.length;++W)w+=String.fromCharCode(t[W]);return s.type=="base64"?Yp(w):s.type=="string"?bp(w):w;case"file":return rg(s.file,t);case"buffer":return t;default:throw new Error("Unrecognized type "+s.type)}}function fE(t,s){KL(),sF(t);var w=Gl(s||{});if(w.cellStyles&&(w.cellNF=!0,w.sheetStubs=!0),w.type=="array"){w.type="binary";var W=fE(t,w);return w.type="array",My(W)}var K=0;if(w.sheet&&(typeof w.sheet=="number"?K=w.sheet:K=t.SheetNames.indexOf(w.sheet),!t.SheetNames[K]))throw new Error("Sheet not found: "+w.sheet+" : "+typeof w.sheet);switch(w.bookType||"xlsb"){case"xml":case"xlml":return qf(kF(t,w),w);case"slk":case"sylk":return qf(a_.from_sheet(t.Sheets[t.SheetNames[K]],w),w);case"htm":case"html":return qf(iE(t.Sheets[t.SheetNames[K]],w),w);case"txt":return Tk(cE(t.Sheets[t.SheetNames[K]],w),w);case"csv":return qf(N3(t.Sheets[t.SheetNames[K]],w),w,"\uFEFF");case"dif":return qf(i_.from_sheet(t.Sheets[t.SheetNames[K]],w),w);case"dbf":return l1(n_.from_sheet(t.Sheets[t.SheetNames[K]],w),w);case"prn":return qf(o_.from_sheet(t.Sheets[t.SheetNames[K]],w),w);case"rtf":return qf(v_.from_sheet(t.Sheets[t.SheetNames[K]],w),w);case"eth":return qf(IS.from_sheet(t.Sheets[t.SheetNames[K]],w),w);case"fods":return qf(lE(t,w),w);case"wk1":return l1(XT.sheet_to_wk1(t.Sheets[t.SheetNames[K]],w),w);case"wk3":return l1(XT.book_to_wk3(t,w),w);case"biff2":w.biff||(w.biff=2);case"biff3":w.biff||(w.biff=3);case"biff4":return w.biff||(w.biff=4),l1(aE(t,w),w);case"biff5":w.biff||(w.biff=5);case"biff8":case"xla":case"xls":return w.biff||(w.biff=8),wk(t,w);case"xlsx":case"xlsm":case"xlam":case"xlsb":case"numbers":case"ods":return xk(t,w);default:throw new Error("Unrecognized bookType |"+w.bookType+"|")}}function Ak(t){if(!t.bookType){var s={xls:"biff8",htm:"html",slk:"sylk",socialcalc:"eth",Sh33tJS:"WTF"},w=t.file.slice(t.file.lastIndexOf(".")).toLowerCase();w.match(/^\.[a-z]+$/)&&(t.bookType=w.slice(1)),t.bookType=s[t.bookType]||t.bookType}}function Sk(t,s,w){var W=w||{};return W.type="file",W.file=s,Ak(W),fE(t,W)}function Ek(t,s,w,W,K,de,z,B){var e=Fs(w),d=B.defval,P=B.raw||!Object.prototype.hasOwnProperty.call(B,"raw"),a=!0,_=K===1?[]:{};if(K!==1)if(Object.defineProperty)try{Object.defineProperty(_,"__rowNum__",{value:w,enumerable:!1})}catch{_.__rowNum__=w}else _.__rowNum__=w;if(!z||t[w])for(var x=s.s.c;x<=s.e.c;++x){var v=z?t[w][x]:t[W[x]+e];if(v===void 0||v.t===void 0){if(d===void 0)continue;de[x]!=null&&(_[de[x]]=d);continue}var y=v.v;switch(v.t){case"z":if(y==null)break;continue;case"e":y=y==0?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+v.t)}if(de[x]!=null){if(y==null)if(v.t=="e"&&y===null)_[de[x]]=null;else if(d!==void 0)_[de[x]]=d;else if(P&&y===null)_[de[x]]=null;else continue;else _[de[x]]=P&&(v.t!=="n"||v.t==="n"&&B.rawNumbers!==!1)?y:Jc(v,y,B);y!=null&&(a=!1)}}return{row:_,isempty:a}}function ly(t,s){if(t==null||t["!ref"]==null)return[];var w={t:"n",v:0},W=0,K=1,de=[],z=0,B="",e={s:{r:0,c:0},e:{r:0,c:0}},d=s||{},P=d.range!=null?d.range:t["!ref"];switch(d.header===1?W=1:d.header==="A"?W=2:Array.isArray(d.header)?W=3:d.header==null&&(W=0),typeof P){case"string":e=lo(P);break;case"number":e=lo(t["!ref"]),e.s.r=P;break;default:e=P}W>0&&(K=0);var a=Fs(e.s.r),_=[],x=[],v=0,y=0,r=Array.isArray(t),n=e.s.r,u=0,i={};r&&!t[n]&&(t[n]=[]);var f=d.skipHidden&&t["!cols"]||[],g=d.skipHidden&&t["!rows"]||[];for(u=e.s.c;u<=e.e.c;++u)if(!(f[u]||{}).hidden)switch(_[u]=qs(u),w=r?t[n][u]:t[_[u]+a],W){case 1:de[u]=u-e.s.c;break;case 2:de[u]=_[u];break;case 3:de[u]=d.header[u-e.s.c];break;default:if(w==null&&(w={w:"__EMPTY",t:"s"}),B=z=Jc(w,null,d),y=i[z]||0,!y)i[z]=1;else{do B=z+"_"+y++;while(i[B]);i[z]=y,i[B]=1}de[u]=B}for(n=e.s.r+K;n<=e.e.r;++n)if(!(g[n]||{}).hidden){var h=Ek(t,e,n,_,W,de,r,d);(h.isempty===!1||(W===1?d.blankrows!==!1:d.blankrows))&&(x[v++]=h.row)}return x.length=v,x}var e4=/"/g;function Mk(t,s,w,W,K,de,z,B){for(var e=!0,d=[],P="",a=Fs(w),_=s.s.c;_<=s.e.c;++_)if(W[_]){var x=B.dense?(t[w]||[])[_]:t[W[_]+a];if(x==null)P="";else if(x.v!=null){e=!1,P=""+(B.rawNumbers&&x.t=="n"?x.v:Jc(x,null,B));for(var v=0,y=0;v!==P.length;++v)if((y=P.charCodeAt(v))===K||y===de||y===34||B.forceQuotes){P='"'+P.replace(e4,'""')+'"';break}P=="ID"&&(P='"ID"')}else x.f!=null&&!x.F?(e=!1,P="="+x.f,P.indexOf(",")>=0&&(P='"'+P.replace(e4,'""')+'"')):P="";d.push(P)}return B.blankrows===!1&&e?null:d.join(z)}function N3(t,s){var w=[],W=s??{};if(t==null||t["!ref"]==null)return"";var K=lo(t["!ref"]),de=W.FS!==void 0?W.FS:",",z=de.charCodeAt(0),B=W.RS!==void 0?W.RS:`
`,e=B.charCodeAt(0),d=new RegExp((de=="|"?"\\|":de)+"+$"),P="",a=[];W.dense=Array.isArray(t);for(var _=W.skipHidden&&t["!cols"]||[],x=W.skipHidden&&t["!rows"]||[],v=K.s.c;v<=K.e.c;++v)(_[v]||{}).hidden||(a[v]=qs(v));for(var y=0,r=K.s.r;r<=K.e.r;++r)(x[r]||{}).hidden||(P=Mk(t,K,r,a,z,e,de,W),P!=null&&(W.strip&&(P=P.replace(d,"")),(P||W.blankrows!==!1)&&w.push((y++?B:"")+P)));return delete W.dense,w.join("")}function cE(t,s){s||(s={}),s.FS=" ",s.RS=`
`;var w=N3(t,s);return w}function Ck(t){var s="",w,W="";if(t==null||t["!ref"]==null)return[];var K=lo(t["!ref"]),de="",z=[],B,e=[],d=Array.isArray(t);for(B=K.s.c;B<=K.e.c;++B)z[B]=qs(B);for(var P=K.s.r;P<=K.e.r;++P)for(de=Fs(P),B=K.s.c;B<=K.e.c;++B)if(s=z[B]+de,w=d?(t[P]||[])[B]:t[s],W="",w!==void 0){if(w.F!=null){if(s=w.F,!w.f)continue;W=w.f,s.indexOf(":")==-1&&(s=s+":"+s)}if(w.f!=null)W=w.f;else{if(w.t=="z")continue;if(w.t=="n"&&w.v!=null)W=""+w.v;else if(w.t=="b")W=w.v?"TRUE":"FALSE";else if(w.w!==void 0)W="'"+w.w;else{if(w.v===void 0)continue;w.t=="s"?W="'"+w.v:W=""+w.v}}e[e.length]=s+"="+W}return e}function hE(t,s,w){var W=w||{},K=+!W.skipHeader,de=t||{},z=0,B=0;if(de&&W.origin!=null)if(typeof W.origin=="number")z=W.origin;else{var e=typeof W.origin=="string"?gs(W.origin):W.origin;z=e.r,B=e.c}var d,P={s:{c:0,r:0},e:{c:B,r:z+s.length-1+K}};if(de["!ref"]){var a=lo(de["!ref"]);P.e.c=Math.max(P.e.c,a.e.c),P.e.r=Math.max(P.e.r,a.e.r),z==-1&&(z=a.e.r+1,P.e.r=z+s.length-1+K)}else z==-1&&(z=0,P.e.r=s.length-1+K);var _=W.header||[],x=0;s.forEach(function(y,r){Os(y).forEach(function(n){(x=_.indexOf(n))==-1&&(_[x=_.length]=n);var u=y[n],i="z",f="",g=Xi({c:B+x,r:z+r+K});d=Kp(de,g),u&&typeof u=="object"&&!(u instanceof Date)?de[g]=u:(typeof u=="number"?i="n":typeof u=="boolean"?i="b":typeof u=="string"?i="s":u instanceof Date?(i="d",W.cellDates||(i="n",u=Vl(u)),f=W.dateNF||Io[14]):u===null&&W.nullError&&(i="e",u=0),d?(d.t=i,d.v=u,delete d.w,delete d.R,f&&(d.z=f)):de[g]=d={t:i,v:u},f&&(d.z=f))})}),P.e.c=Math.max(P.e.c,B+_.length-1);var v=Fs(z);if(K)for(x=0;x<_.length;++x)de[qs(x+B)+v]={t:"s",v:_[x]};return de["!ref"]=Jo(P),de}function Lk(t,s){return hE(null,t,s)}function Kp(t,s,w){if(typeof s=="string"){if(Array.isArray(t)){var W=gs(s);return t[W.r]||(t[W.r]=[]),t[W.r][W.c]||(t[W.r][W.c]={t:"z"})}return t[s]||(t[s]={t:"z"})}return typeof s!="number"?Kp(t,Xi(s)):Kp(t,Xi({r:s,c:w||0}))}function Pk(t,s){if(typeof s=="number"){if(s>=0&&t.SheetNames.length>s)return s;throw new Error("Cannot find sheet # "+s)}else if(typeof s=="string"){var w=t.SheetNames.indexOf(s);if(w>-1)return w;throw new Error("Cannot find sheet name |"+s+"|")}else throw new Error("Cannot find sheet |"+s+"|")}function _k(){return{SheetNames:[],Sheets:{}}}function Rk(t,s,w,W){var K=1;if(!w)for(;K<=65535&&t.SheetNames.indexOf(w="Sheet"+K)!=-1;++K,w=void 0);if(!w||t.SheetNames.length>=65535)throw new Error("Too many worksheets");if(W&&t.SheetNames.indexOf(w)>=0){var de=w.match(/(^.*?)(\d+)$/);K=de&&+de[2]||0;var z=de&&de[1]||w;for(++K;K<=65535&&t.SheetNames.indexOf(w=z+K)!=-1;++K);}if(tE(w),t.SheetNames.indexOf(w)>=0)throw new Error("Worksheet with name |"+w+"| already exists!");return t.SheetNames.push(w),t.Sheets[w]=s,w}function Dk(t,s,w){t.Workbook||(t.Workbook={}),t.Workbook.Sheets||(t.Workbook.Sheets=[]);var W=Pk(t,s);switch(t.Workbook.Sheets[W]||(t.Workbook.Sheets[W]={}),w){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+w)}t.Workbook.Sheets[W].Hidden=w}function Ik(t,s){return t.z=s,t}function vE(t,s,w){return s?(t.l={Target:s},w&&(t.l.Tooltip=w)):delete t.l,t}function Fk(t,s,w){return vE(t,"#"+s,w)}function kk(t,s,w){t.c||(t.c=[]),t.c.push({t:s,a:w||"SheetJS"})}function Ok(t,s,w,W){for(var K=typeof s!="string"?s:lo(s),de=typeof s=="string"?s:Jo(s),z=K.s.r;z<=K.e.r;++z)for(var B=K.s.c;B<=K.e.c;++B){var e=Kp(t,z,B);e.t="n",e.F=de,delete e.v,z==K.s.r&&B==K.s.c&&(e.f=w,W&&(e.D=!0))}return t}var tx={encode_col:qs,encode_row:Fs,encode_cell:Xi,encode_range:Jo,decode_col:C3,decode_row:M3,split_cell:J9,decode_cell:gs,decode_range:hu,format_cell:Jc,sheet_add_aoa:vS,sheet_add_json:hE,sheet_add_dom:oE,aoa_to_sheet:A0,json_to_sheet:Lk,table_to_sheet:sE,table_to_book:ik,sheet_to_csv:N3,sheet_to_txt:cE,sheet_to_json:ly,sheet_to_html:iE,sheet_to_formulae:Ck,sheet_to_row_object_array:ly,sheet_get_cell:Kp,book_new:_k,book_append_sheet:Rk,book_set_sheet_visibility:Dk,cell_set_number_format:Ik,cell_set_hyperlink:vE,cell_set_internal_link:Fk,cell_add_comment:kk,sheet_set_array_formula:Ok,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};const dE=Ka.createContext({dragDropManager:void 0});function Iu(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var t4=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),rx=function(){return Math.random().toString(36).substring(7).split("").join(".")},r4={INIT:"@@redux/INIT"+rx(),REPLACE:"@@redux/REPLACE"+rx(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+rx()}};function zk(t){if(typeof t!="object"||t===null)return!1;for(var s=t;Object.getPrototypeOf(s)!==null;)s=Object.getPrototypeOf(s);return Object.getPrototypeOf(t)===s}function pE(t,s,w){var W;if(typeof s=="function"&&typeof w=="function"||typeof w=="function"&&typeof arguments[3]=="function")throw new Error(Iu(0));if(typeof s=="function"&&typeof w>"u"&&(w=s,s=void 0),typeof w<"u"){if(typeof w!="function")throw new Error(Iu(1));return w(pE)(t,s)}if(typeof t!="function")throw new Error(Iu(2));var K=t,de=s,z=[],B=z,e=!1;function d(){B===z&&(B=z.slice())}function P(){if(e)throw new Error(Iu(3));return de}function a(y){if(typeof y!="function")throw new Error(Iu(4));if(e)throw new Error(Iu(5));var r=!0;return d(),B.push(y),function(){if(r){if(e)throw new Error(Iu(6));r=!1,d();var u=B.indexOf(y);B.splice(u,1),z=null}}}function _(y){if(!zk(y))throw new Error(Iu(7));if(typeof y.type>"u")throw new Error(Iu(8));if(e)throw new Error(Iu(9));try{e=!0,de=K(de,y)}finally{e=!1}for(var r=z=B,n=0;n<r.length;n++){var u=r[n];u()}return y}function x(y){if(typeof y!="function")throw new Error(Iu(10));K=y,_({type:r4.REPLACE})}function v(){var y,r=a;return y={subscribe:function(u){if(typeof u!="object"||u===null)throw new Error(Iu(11));function i(){u.next&&u.next(P())}i();var f=r(i);return{unsubscribe:f}}},y[t4]=function(){return this},y}return _({type:r4.INIT}),W={dispatch:_,subscribe:a,getState:P,replaceReducer:x},W[t4]=v,W}function ii(t,s,...w){if(Nk()&&s===void 0)throw new Error("invariant requires an error message argument");if(!t){let W;if(s===void 0)W=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let K=0;W=new Error(s.replace(/%s/g,function(){return w[K++]})),W.name="Invariant Violation"}throw W.framesToPop=1,W}}function Nk(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function Bk(t,s,w){return s.split(".").reduce((W,K)=>W&&W[K]?W[K]:w||null,t)}function Uk(t,s){return t.filter(w=>w!==s)}function gE(t){return typeof t=="object"}function Hk(t,s){const w=new Map,W=de=>{w.set(de,w.has(de)?w.get(de)+1:1)};t.forEach(W),s.forEach(W);const K=[];return w.forEach((de,z)=>{de===1&&K.push(z)}),K}function Vk(t,s){return t.filter(w=>s.indexOf(w)>-1)}const B3="dnd-core/INIT_COORDS",Fy="dnd-core/BEGIN_DRAG",U3="dnd-core/PUBLISH_DRAG_SOURCE",ky="dnd-core/HOVER",Oy="dnd-core/DROP",zy="dnd-core/END_DRAG";function n4(t,s){return{type:B3,payload:{sourceClientOffset:s||null,clientOffset:t||null}}}const Gk={type:B3,payload:{clientOffset:null,sourceClientOffset:null}};function Wk(t){return function(w=[],W={publishSource:!0}){const{publishSource:K=!0,clientOffset:de,getSourceClientOffset:z}=W,B=t.getMonitor(),e=t.getRegistry();t.dispatch(n4(de)),Yk(w,B,e);const d=jk(w,B);if(d==null){t.dispatch(Gk);return}let P=null;if(de){if(!z)throw new Error("getSourceClientOffset must be defined");Xk(z),P=z(d)}t.dispatch(n4(de,P));const _=e.getSource(d).beginDrag(B,d);if(_==null)return;Zk(_),e.pinSource(d);const x=e.getSourceType(d);return{type:Fy,payload:{itemType:x,item:_,sourceId:d,clientOffset:de||null,sourceClientOffset:P||null,isSourcePublic:!!K}}}}function Yk(t,s,w){ii(!s.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(W){ii(w.getSource(W),"Expected sourceIds to be registered.")})}function Xk(t){ii(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Zk(t){ii(gE(t),"Item must be an object.")}function jk(t,s){let w=null;for(let W=t.length-1;W>=0;W--)if(s.canDragSource(t[W])){w=t[W];break}return w}function Kk(t,s,w){return s in t?Object.defineProperty(t,s,{value:w,enumerable:!0,configurable:!0,writable:!0}):t[s]=w,t}function Jk(t){for(var s=1;s<arguments.length;s++){var w=arguments[s]!=null?arguments[s]:{},W=Object.keys(w);typeof Object.getOwnPropertySymbols=="function"&&(W=W.concat(Object.getOwnPropertySymbols(w).filter(function(K){return Object.getOwnPropertyDescriptor(w,K).enumerable}))),W.forEach(function(K){Kk(t,K,w[K])})}return t}function $k(t){return function(w={}){const W=t.getMonitor(),K=t.getRegistry();Qk(W),tO(W).forEach((z,B)=>{const e=qk(z,B,K,W),d={type:Oy,payload:{dropResult:Jk({},w,e)}};t.dispatch(d)})}}function Qk(t){ii(t.isDragging(),"Cannot call drop while not dragging."),ii(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function qk(t,s,w,W){const K=w.getTarget(t);let de=K?K.drop(W,t):void 0;return eO(de),typeof de>"u"&&(de=s===0?{}:W.getDropResult()),de}function eO(t){ii(typeof t>"u"||gE(t),"Drop result must either be an object or undefined.")}function tO(t){const s=t.getTargetIds().filter(t.canDropOnTarget,t);return s.reverse(),s}function rO(t){return function(){const w=t.getMonitor(),W=t.getRegistry();nO(w);const K=w.getSourceId();return K!=null&&(W.getSource(K,!0).endDrag(w,K),W.unpinSource()),{type:zy}}}function nO(t){ii(t.isDragging(),"Cannot call endDrag while not dragging.")}function h2(t,s){return s===null?t===null:Array.isArray(t)?t.some(w=>w===s):t===s}function aO(t){return function(w,{clientOffset:W}={}){iO(w);const K=w.slice(0),de=t.getMonitor(),z=t.getRegistry(),B=de.getItemType();return sO(K,z,B),oO(K,de,z),lO(K,de,z),{type:ky,payload:{targetIds:K,clientOffset:W||null}}}}function iO(t){ii(Array.isArray(t),"Expected targetIds to be an array.")}function oO(t,s,w){ii(s.isDragging(),"Cannot call hover while not dragging."),ii(!s.didDrop(),"Cannot call hover after drop.");for(let W=0;W<t.length;W++){const K=t[W];ii(t.lastIndexOf(K)===W,"Expected targetIds to be unique in the passed array.");const de=w.getTarget(K);ii(de,"Expected targetIds to be registered.")}}function sO(t,s,w){for(let W=t.length-1;W>=0;W--){const K=t[W],de=s.getTargetType(K);h2(de,w)||t.splice(W,1)}}function lO(t,s,w){t.forEach(function(W){w.getTarget(W).hover(s,W)})}function uO(t){return function(){if(t.getMonitor().isDragging())return{type:U3}}}function fO(t){return{beginDrag:Wk(t),publishDragSource:uO(t),hover:aO(t),drop:$k(t),endDrag:rO(t)}}class cO{receiveBackend(s){this.backend=s}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const s=this,{dispatch:w}=this.store;function W(de){return(...z)=>{const B=de.apply(s,z);typeof B<"u"&&w(B)}}const K=fO(this);return Object.keys(K).reduce((de,z)=>{const B=K[z];return de[z]=W(B),de},{})}dispatch(s){this.store.dispatch(s)}constructor(s,w){this.isSetUp=!1,this.handleRefCountChange=()=>{const W=this.store.getState().refCount>0;this.backend&&(W&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!W&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=s,this.monitor=w,s.subscribe(this.handleRefCountChange)}}function hO(t,s){return{x:t.x+s.x,y:t.y+s.y}}function yE(t,s){return{x:t.x-s.x,y:t.y-s.y}}function vO(t){const{clientOffset:s,initialClientOffset:w,initialSourceClientOffset:W}=t;return!s||!w||!W?null:yE(hO(s,W),w)}function dO(t){const{clientOffset:s,initialClientOffset:w}=t;return!s||!w?null:yE(s,w)}const Ep=[],H3=[];Ep.__IS_NONE__=!0;H3.__IS_ALL__=!0;function pO(t,s){return t===Ep?!1:t===H3||typeof s>"u"?!0:Vk(s,t).length>0}class gO{subscribeToStateChange(s,w={}){const{handlerIds:W}=w;ii(typeof s=="function","listener must be a function."),ii(typeof W>"u"||Array.isArray(W),"handlerIds, when specified, must be an array of strings.");let K=this.store.getState().stateId;const de=()=>{const z=this.store.getState(),B=z.stateId;try{B===K||B===K+1&&!pO(z.dirtyHandlerIds,W)||s()}finally{K=B}};return this.store.subscribe(de)}subscribeToOffsetChange(s){ii(typeof s=="function","listener must be a function.");let w=this.store.getState().dragOffset;const W=()=>{const K=this.store.getState().dragOffset;K!==w&&(w=K,s())};return this.store.subscribe(W)}canDragSource(s){if(!s)return!1;const w=this.registry.getSource(s);return ii(w,`Expected to find a valid source. sourceId=${s}`),this.isDragging()?!1:w.canDrag(this,s)}canDropOnTarget(s){if(!s)return!1;const w=this.registry.getTarget(s);if(ii(w,`Expected to find a valid target. targetId=${s}`),!this.isDragging()||this.didDrop())return!1;const W=this.registry.getTargetType(s),K=this.getItemType();return h2(W,K)&&w.canDrop(this,s)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(s){if(!s)return!1;const w=this.registry.getSource(s,!0);if(ii(w,`Expected to find a valid source. sourceId=${s}`),!this.isDragging()||!this.isSourcePublic())return!1;const W=this.registry.getSourceType(s),K=this.getItemType();return W!==K?!1:w.isDragging(this,s)}isOverTarget(s,w={shallow:!1}){if(!s)return!1;const{shallow:W}=w;if(!this.isDragging())return!1;const K=this.registry.getTargetType(s),de=this.getItemType();if(de&&!h2(K,de))return!1;const z=this.getTargetIds();if(!z.length)return!1;const B=z.indexOf(s);return W?B===z.length-1:B>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return vO(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return dO(this.store.getState().dragOffset)}constructor(s,w){this.store=s,this.registry=w}}const a4=typeof global<"u"?global:self,mE=a4.MutationObserver||a4.WebKitMutationObserver;function xE(t){return function(){const w=setTimeout(K,0),W=setInterval(K,50);function K(){clearTimeout(w),clearInterval(W),t()}}}function yO(t){let s=1;const w=new mE(t),W=document.createTextNode("");return w.observe(W,{characterData:!0}),function(){s=-s,W.data=s}}const mO=typeof mE=="function"?yO:xE;class xO{enqueueTask(s){const{queue:w,requestFlush:W}=this;w.length||(W(),this.flushing=!0),w[w.length]=s}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:s}=this;for(;this.index<s.length;){const w=this.index;if(this.index++,s[w].call(),this.index>this.capacity){for(let W=0,K=s.length-this.index;W<K;W++)s[W]=s[W+this.index];s.length-=this.index,this.index=0}}s.length=0,this.index=0,this.flushing=!1},this.registerPendingError=s=>{this.pendingErrors.push(s),this.requestErrorThrow()},this.requestFlush=mO(this.flush),this.requestErrorThrow=xE(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class bO{call(){try{this.task&&this.task()}catch(s){this.onError(s)}finally{this.task=null,this.release(this)}}constructor(s,w){this.onError=s,this.release=w,this.task=null}}class wO{create(s){const w=this.freeTasks,W=w.length?w.pop():new bO(this.onError,K=>w[w.length]=K);return W.task=s,W}constructor(s){this.onError=s,this.freeTasks=[]}}const bE=new xO,TO=new wO(bE.registerPendingError);function AO(t){bE.enqueueTask(TO.create(t))}const V3="dnd-core/ADD_SOURCE",G3="dnd-core/ADD_TARGET",W3="dnd-core/REMOVE_SOURCE",Ny="dnd-core/REMOVE_TARGET";function SO(t){return{type:V3,payload:{sourceId:t}}}function EO(t){return{type:G3,payload:{targetId:t}}}function MO(t){return{type:W3,payload:{sourceId:t}}}function CO(t){return{type:Ny,payload:{targetId:t}}}function LO(t){ii(typeof t.canDrag=="function","Expected canDrag to be a function."),ii(typeof t.beginDrag=="function","Expected beginDrag to be a function."),ii(typeof t.endDrag=="function","Expected endDrag to be a function.")}function PO(t){ii(typeof t.canDrop=="function","Expected canDrop to be a function."),ii(typeof t.hover=="function","Expected hover to be a function."),ii(typeof t.drop=="function","Expected beginDrag to be a function.")}function v2(t,s){if(s&&Array.isArray(t)){t.forEach(w=>v2(w,!1));return}ii(typeof t=="string"||typeof t=="symbol",s?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var Nu;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(Nu||(Nu={}));let _O=0;function RO(){return _O++}function DO(t){const s=RO().toString();switch(t){case Nu.SOURCE:return`S${s}`;case Nu.TARGET:return`T${s}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function i4(t){switch(t[0]){case"S":return Nu.SOURCE;case"T":return Nu.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function o4(t,s){const w=t.entries();let W=!1;do{const{done:K,value:[,de]}=w.next();if(de===s)return!0;W=!!K}while(!W);return!1}class IO{addSource(s,w){v2(s),LO(w);const W=this.addHandler(Nu.SOURCE,s,w);return this.store.dispatch(SO(W)),W}addTarget(s,w){v2(s,!0),PO(w);const W=this.addHandler(Nu.TARGET,s,w);return this.store.dispatch(EO(W)),W}containsHandler(s){return o4(this.dragSources,s)||o4(this.dropTargets,s)}getSource(s,w=!1){return ii(this.isSourceId(s),"Expected a valid source ID."),w&&s===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(s)}getTarget(s){return ii(this.isTargetId(s),"Expected a valid target ID."),this.dropTargets.get(s)}getSourceType(s){return ii(this.isSourceId(s),"Expected a valid source ID."),this.types.get(s)}getTargetType(s){return ii(this.isTargetId(s),"Expected a valid target ID."),this.types.get(s)}isSourceId(s){return i4(s)===Nu.SOURCE}isTargetId(s){return i4(s)===Nu.TARGET}removeSource(s){ii(this.getSource(s),"Expected an existing source."),this.store.dispatch(MO(s)),AO(()=>{this.dragSources.delete(s),this.types.delete(s)})}removeTarget(s){ii(this.getTarget(s),"Expected an existing target."),this.store.dispatch(CO(s)),this.dropTargets.delete(s),this.types.delete(s)}pinSource(s){const w=this.getSource(s);ii(w,"Expected an existing source."),this.pinnedSourceId=s,this.pinnedSource=w}unpinSource(){ii(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(s,w,W){const K=DO(s);return this.types.set(K,w),s===Nu.SOURCE?this.dragSources.set(K,W):s===Nu.TARGET&&this.dropTargets.set(K,W),K}constructor(s){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=s}}const FO=(t,s)=>t===s;function kO(t,s){return!t&&!s?!0:!t||!s?!1:t.x===s.x&&t.y===s.y}function OO(t,s,w=FO){if(t.length!==s.length)return!1;for(let W=0;W<t.length;++W)if(!w(t[W],s[W]))return!1;return!0}function zO(t=Ep,s){switch(s.type){case ky:break;case V3:case G3:case Ny:case W3:return Ep;case Fy:case U3:case zy:case Oy:default:return H3}const{targetIds:w=[],prevTargetIds:W=[]}=s.payload,K=Hk(w,W);if(!(K.length>0||!OO(w,W)))return Ep;const z=W[W.length-1],B=w[w.length-1];return z!==B&&(z&&K.push(z),B&&K.push(B)),K}function NO(t,s,w){return s in t?Object.defineProperty(t,s,{value:w,enumerable:!0,configurable:!0,writable:!0}):t[s]=w,t}function BO(t){for(var s=1;s<arguments.length;s++){var w=arguments[s]!=null?arguments[s]:{},W=Object.keys(w);typeof Object.getOwnPropertySymbols=="function"&&(W=W.concat(Object.getOwnPropertySymbols(w).filter(function(K){return Object.getOwnPropertyDescriptor(w,K).enumerable}))),W.forEach(function(K){NO(t,K,w[K])})}return t}const s4={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function UO(t=s4,s){const{payload:w}=s;switch(s.type){case B3:case Fy:return{initialSourceClientOffset:w.sourceClientOffset,initialClientOffset:w.clientOffset,clientOffset:w.clientOffset};case ky:return kO(t.clientOffset,w.clientOffset)?t:BO({},t,{clientOffset:w.clientOffset});case zy:case Oy:return s4;default:return t}}function HO(t,s,w){return s in t?Object.defineProperty(t,s,{value:w,enumerable:!0,configurable:!0,writable:!0}):t[s]=w,t}function Ud(t){for(var s=1;s<arguments.length;s++){var w=arguments[s]!=null?arguments[s]:{},W=Object.keys(w);typeof Object.getOwnPropertySymbols=="function"&&(W=W.concat(Object.getOwnPropertySymbols(w).filter(function(K){return Object.getOwnPropertyDescriptor(w,K).enumerable}))),W.forEach(function(K){HO(t,K,w[K])})}return t}const VO={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function GO(t=VO,s){const{payload:w}=s;switch(s.type){case Fy:return Ud({},t,{itemType:w.itemType,item:w.item,sourceId:w.sourceId,isSourcePublic:w.isSourcePublic,dropResult:null,didDrop:!1});case U3:return Ud({},t,{isSourcePublic:!0});case ky:return Ud({},t,{targetIds:w.targetIds});case Ny:return t.targetIds.indexOf(w.targetId)===-1?t:Ud({},t,{targetIds:Uk(t.targetIds,w.targetId)});case Oy:return Ud({},t,{dropResult:w.dropResult,didDrop:!0,targetIds:[]});case zy:return Ud({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function WO(t=0,s){switch(s.type){case V3:case G3:return t+1;case W3:case Ny:return t-1;default:return t}}function YO(t=0){return t+1}function XO(t,s,w){return s in t?Object.defineProperty(t,s,{value:w,enumerable:!0,configurable:!0,writable:!0}):t[s]=w,t}function ZO(t){for(var s=1;s<arguments.length;s++){var w=arguments[s]!=null?arguments[s]:{},W=Object.keys(w);typeof Object.getOwnPropertySymbols=="function"&&(W=W.concat(Object.getOwnPropertySymbols(w).filter(function(K){return Object.getOwnPropertyDescriptor(w,K).enumerable}))),W.forEach(function(K){XO(t,K,w[K])})}return t}function jO(t={},s){return{dirtyHandlerIds:zO(t.dirtyHandlerIds,{type:s.type,payload:ZO({},s.payload,{prevTargetIds:Bk(t,"dragOperation.targetIds",[])})}),dragOffset:UO(t.dragOffset,s),refCount:WO(t.refCount,s),dragOperation:GO(t.dragOperation,s),stateId:YO(t.stateId)}}function KO(t,s=void 0,w={},W=!1){const K=JO(W),de=new gO(K,new IO(K)),z=new cO(K,de),B=t(z,s,w);return z.receiveBackend(B),z}function JO(t){const s=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return pE(jO,t&&s&&s({name:"dnd-core",instanceId:"dnd-core"}))}function $O(t,s){if(t==null)return{};var w=QO(t,s),W,K;if(Object.getOwnPropertySymbols){var de=Object.getOwnPropertySymbols(t);for(K=0;K<de.length;K++)W=de[K],!(s.indexOf(W)>=0)&&Object.prototype.propertyIsEnumerable.call(t,W)&&(w[W]=t[W])}return w}function QO(t,s){if(t==null)return{};var w={},W=Object.keys(t),K,de;for(de=0;de<W.length;de++)K=W[de],!(s.indexOf(K)>=0)&&(w[K]=t[K]);return w}let l4=0;const A1=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var qO=Ka.memo(function(s){var{children:w}=s,W=$O(s,["children"]);const[K,de]=ez(W);return Ka.useEffect(()=>{if(de){const z=wE();return++l4,()=>{--l4===0&&(z[A1]=null)}}},[]),Oa(dE.Provider,{value:K,children:w})});function ez(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const s=tz(t.backend,t.context,t.options,t.debugMode),w=!t.context;return[s,w]}function tz(t,s=wE(),w,W){const K=s;return K[A1]||(K[A1]={dragDropManager:KO(t,s,w,W)}),K[A1]}function wE(){return typeof global<"u"?global:window}var rz=function t(s,w){if(s===w)return!0;if(s&&w&&typeof s=="object"&&typeof w=="object"){if(s.constructor!==w.constructor)return!1;var W,K,de;if(Array.isArray(s)){if(W=s.length,W!=w.length)return!1;for(K=W;K--!==0;)if(!t(s[K],w[K]))return!1;return!0}if(s.constructor===RegExp)return s.source===w.source&&s.flags===w.flags;if(s.valueOf!==Object.prototype.valueOf)return s.valueOf()===w.valueOf();if(s.toString!==Object.prototype.toString)return s.toString()===w.toString();if(de=Object.keys(s),W=de.length,W!==Object.keys(w).length)return!1;for(K=W;K--!==0;)if(!Object.prototype.hasOwnProperty.call(w,de[K]))return!1;for(K=W;K--!==0;){var z=de[K];if(!t(s[z],w[z]))return!1}return!0}return s!==s&&w!==w};const rd=typeof window<"u"?Ka.useLayoutEffect:Ka.useEffect;function nz(t,s,w){const[W,K]=Ka.useState(()=>s(t)),de=Ka.useCallback(()=>{const z=s(t);rz(W,z)||(K(z),w&&w())},[W,t,w]);return rd(de),[W,de]}function az(t,s,w){const[W,K]=nz(t,s,w);return rd(function(){const z=t.getHandlerId();if(z!=null)return t.subscribeToStateChange(K,{handlerIds:[z]})},[t,K]),W}function TE(t,s,w){return az(s,t||(()=>({})),()=>w.reconnect())}function AE(t,s){const w=[...s||[]];return s==null&&typeof t!="function"&&w.push(t),Ka.useMemo(()=>typeof t=="function"?t():t,w)}function iz(t){return Ka.useMemo(()=>t.hooks.dragSource(),[t])}function oz(t){return Ka.useMemo(()=>t.hooks.dragPreview(),[t])}let nx=!1,ax=!1;class sz{receiveHandlerId(s){this.sourceId=s}getHandlerId(){return this.sourceId}canDrag(){ii(!nx,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return nx=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{nx=!1}}isDragging(){if(!this.sourceId)return!1;ii(!ax,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return ax=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{ax=!1}}subscribeToStateChange(s,w){return this.internalMonitor.subscribeToStateChange(s,w)}isDraggingSource(s){return this.internalMonitor.isDraggingSource(s)}isOverTarget(s,w){return this.internalMonitor.isOverTarget(s,w)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(s){return this.internalMonitor.subscribeToOffsetChange(s)}canDragSource(s){return this.internalMonitor.canDragSource(s)}canDropOnTarget(s){return this.internalMonitor.canDropOnTarget(s)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(s){this.sourceId=null,this.internalMonitor=s.getMonitor()}}let ix=!1;class lz{receiveHandlerId(s){this.targetId=s}getHandlerId(){return this.targetId}subscribeToStateChange(s,w){return this.internalMonitor.subscribeToStateChange(s,w)}canDrop(){if(!this.targetId)return!1;ii(!ix,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return ix=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{ix=!1}}isOver(s){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,s):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(s){this.targetId=null,this.internalMonitor=s.getMonitor()}}function uz(t,s,w){const W=w.getRegistry(),K=W.addTarget(t,s);return[K,()=>W.removeTarget(K)]}function fz(t,s,w){const W=w.getRegistry(),K=W.addSource(t,s);return[K,()=>W.removeSource(K)]}function d2(t,s,w,W){let K=w?w.call(W,t,s):void 0;if(K!==void 0)return!!K;if(t===s)return!0;if(typeof t!="object"||!t||typeof s!="object"||!s)return!1;const de=Object.keys(t),z=Object.keys(s);if(de.length!==z.length)return!1;const B=Object.prototype.hasOwnProperty.bind(s);for(let e=0;e<de.length;e++){const d=de[e];if(!B(d))return!1;const P=t[d],a=s[d];if(K=w?w.call(W,P,a,d):void 0,K===!1||K===void 0&&P!==a)return!1}return!0}function p2(t){return t!==null&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function cz(t){if(typeof t.type=="string")return;const s=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${s} into a <div>, or turn it into a drag source or a drop target itself.`)}function hz(t){return(s=null,w=null)=>{if(!Ka.isValidElement(s)){const de=s;return t(de,w),de}const W=s;return cz(W),vz(W,w?de=>t(de,w):t)}}function SE(t){const s={};return Object.keys(t).forEach(w=>{const W=t[w];if(w.endsWith("Ref"))s[w]=t[w];else{const K=hz(W);s[w]=()=>K}}),s}function u4(t,s){typeof t=="function"?t(s):t.current=s}function vz(t,s){const w=t.ref;return ii(typeof w!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),w?Ka.cloneElement(t,{ref:W=>{u4(w,W),u4(s,W)}}):Ka.cloneElement(t,{ref:s})}class dz{receiveHandlerId(s){this.handlerId!==s&&(this.handlerId=s,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(s){this.dragSourceOptionsInternal=s}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(s){this.dragPreviewOptionsInternal=s}reconnect(){const s=this.reconnectDragSource();this.reconnectDragPreview(s)}reconnectDragSource(){const s=this.dragSource,w=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return w&&this.disconnectDragSource(),this.handlerId?s?(w&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=s,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,s,this.dragSourceOptions)),w):(this.lastConnectedDragSource=s,w):w}reconnectDragPreview(s=!1){const w=this.dragPreview,W=s||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(W&&this.disconnectDragPreview(),!!this.handlerId){if(!w){this.lastConnectedDragPreview=w;return}W&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=w,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,w,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!d2(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!d2(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(s){this.hooks=SE({dragSource:(w,W)=>{this.clearDragSource(),this.dragSourceOptions=W||null,p2(w)?this.dragSourceRef=w:this.dragSourceNode=w,this.reconnectDragSource()},dragPreview:(w,W)=>{this.clearDragPreview(),this.dragPreviewOptions=W||null,p2(w)?this.dragPreviewRef=w:this.dragPreviewNode=w,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=s}}class pz{get connectTarget(){return this.dropTarget}reconnect(){const s=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();s&&this.disconnectDropTarget();const w=this.dropTarget;if(this.handlerId){if(!w){this.lastConnectedDropTarget=w;return}s&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=w,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,w,this.dropTargetOptions))}}receiveHandlerId(s){s!==this.handlerId&&(this.handlerId=s,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(s){this.dropTargetOptionsInternal=s}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!d2(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(s){this.hooks=SE({dropTarget:(w,W)=>{this.clearDropTarget(),this.dropTargetOptions=W,p2(w)?this.dropTargetRef=w:this.dropTargetNode=w,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=s}}function M0(){const{dragDropManager:t}=Ka.useContext(dE);return ii(t!=null,"Expected drag drop context"),t}function gz(t,s){const w=M0(),W=Ka.useMemo(()=>new dz(w.getBackend()),[w]);return rd(()=>(W.dragSourceOptions=t||null,W.reconnect(),()=>W.disconnectDragSource()),[W,t]),rd(()=>(W.dragPreviewOptions=s||null,W.reconnect(),()=>W.disconnectDragPreview()),[W,s]),W}function yz(){const t=M0();return Ka.useMemo(()=>new sz(t),[t])}class mz{beginDrag(){const s=this.spec,w=this.monitor;let W=null;return typeof s.item=="object"?W=s.item:typeof s.item=="function"?W=s.item(w):W={},W??null}canDrag(){const s=this.spec,w=this.monitor;return typeof s.canDrag=="boolean"?s.canDrag:typeof s.canDrag=="function"?s.canDrag(w):!0}isDragging(s,w){const W=this.spec,K=this.monitor,{isDragging:de}=W;return de?de(K):w===s.getSourceId()}endDrag(){const s=this.spec,w=this.monitor,W=this.connector,{end:K}=s;K&&K(w.getItem(),w),W.reconnect()}constructor(s,w,W){this.spec=s,this.monitor=w,this.connector=W}}function xz(t,s,w){const W=Ka.useMemo(()=>new mz(t,s,w),[s,w]);return Ka.useEffect(()=>{W.spec=t},[t]),W}function bz(t){return Ka.useMemo(()=>{const s=t.type;return ii(s!=null,"spec.type must be defined"),s},[t])}function wz(t,s,w){const W=M0(),K=xz(t,s,w),de=bz(t);rd(function(){if(de!=null){const[B,e]=fz(de,K,W);return s.receiveHandlerId(B),w.receiveHandlerId(B),e}},[W,s,w,K,de])}function Tz(t,s){const w=AE(t,s);ii(!w.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const W=yz(),K=gz(w.options,w.previewOptions);return wz(w,W,K),[TE(w.collect,W,K),iz(K),oz(K)]}function Az(t){return Ka.useMemo(()=>t.hooks.dropTarget(),[t])}function Sz(t){const s=M0(),w=Ka.useMemo(()=>new pz(s.getBackend()),[s]);return rd(()=>(w.dropTargetOptions=t||null,w.reconnect(),()=>w.disconnectDropTarget()),[t]),w}function Ez(){const t=M0();return Ka.useMemo(()=>new lz(t),[t])}function Mz(t){const{accept:s}=t;return Ka.useMemo(()=>(ii(t.accept!=null,"accept must be defined"),Array.isArray(s)?s:[s]),[s])}class Cz{canDrop(){const s=this.spec,w=this.monitor;return s.canDrop?s.canDrop(w.getItem(),w):!0}hover(){const s=this.spec,w=this.monitor;s.hover&&s.hover(w.getItem(),w)}drop(){const s=this.spec,w=this.monitor;if(s.drop)return s.drop(w.getItem(),w)}constructor(s,w){this.spec=s,this.monitor=w}}function Lz(t,s){const w=Ka.useMemo(()=>new Cz(t,s),[s]);return Ka.useEffect(()=>{w.spec=t},[t]),w}function Pz(t,s,w){const W=M0(),K=Lz(t,s),de=Mz(t);rd(function(){const[B,e]=uz(de,K,W);return s.receiveHandlerId(B),w.receiveHandlerId(B),e},[W,s,K,w,de.map(z=>z.toString()).join("|")])}function _z(t,s){const w=AE(t,s),W=Ez(),K=Sz(w.options);return Pz(w,W,K),[TE(w.collect,W,K),Az(K)]}function EE(t){var s,w,W="";if(typeof t=="string"||typeof t=="number")W+=t;else if(typeof t=="object")if(Array.isArray(t))for(s=0;s<t.length;s++)t[s]&&(w=EE(t[s]))&&(W&&(W+=" "),W+=w);else for(s in t)t[s]&&(W&&(W+=" "),W+=s);return W}function Uv(){for(var t,s,w=0,W="";w<arguments.length;)(t=arguments[w++])&&(s=EE(t))&&(W&&(W+=" "),W+=s);return W}function Hv(){return Hv=Object.assign||function(t){for(var s=1;s<arguments.length;s++){var w=arguments[s];for(var W in w)Object.prototype.hasOwnProperty.call(w,W)&&(t[W]=w[W])}return t},Hv.apply(this,arguments)}function Rz(t,s){if(t==null)return{};var w={},W=Object.keys(t),K,de;for(de=0;de<W.length;de++)K=W[de],!(s.indexOf(K)>=0)&&(w[K]=t[K]);return w}var Dz=["bottom","height","left","right","top","width"],Iz=function(s,w){return s===void 0&&(s={}),w===void 0&&(w={}),Dz.some(function(W){return s[W]!==w[W]})},Dh=new Map,ME,Fz=function t(){var s=[];Dh.forEach(function(w,W){var K=W.getBoundingClientRect();Iz(K,w.rect)&&(w.rect=K,s.push(w))}),s.forEach(function(w){w.callbacks.forEach(function(W){return W(w.rect)})}),ME=window.requestAnimationFrame(t)};function kz(t,s){return{observe:function(){var W=Dh.size===0;Dh.has(t)?Dh.get(t).callbacks.push(s):Dh.set(t,{rect:void 0,hasRectChanged:!1,callbacks:[s]}),W&&Fz()},unobserve:function(){var W=Dh.get(t);if(W){var K=W.callbacks.indexOf(s);K>=0&&W.callbacks.splice(K,1),W.callbacks.length||Dh.delete(t),Dh.size||cancelAnimationFrame(ME)}}}}var uy=typeof window<"u"?Ao.useLayoutEffect:Ao.useEffect;function Oz(t,s){s===void 0&&(s={width:0,height:0});var w=Ao.useState(t.current),W=w[0],K=w[1],de=Ao.useReducer(zz,s),z=de[0],B=de[1],e=Ao.useRef(!1);return uy(function(){t.current!==W&&K(t.current)}),uy(function(){if(W&&!e.current){e.current=!0;var d=W.getBoundingClientRect();B({rect:d})}},[W]),Ao.useEffect(function(){if(W){var d=kz(W,function(P){B({rect:P})});return d.observe(),function(){d.unobserve()}}},[W]),z}function zz(t,s){var w=s.rect;return t.height!==w.height||t.width!==w.width?w:t}var Nz=function(){return 50},Bz=function(s){return s},Uz=function(s,w){var W=w?"offsetWidth":"offsetHeight";return s[W]},Hz=function(s){for(var w=Math.max(s.start-s.overscan,0),W=Math.min(s.end+s.overscan,s.size-1),K=[],de=w;de<=W;de++)K.push(de);return K};function Vz(t){var s,w=t.size,W=w===void 0?0:w,K=t.estimateSize,de=K===void 0?Nz:K,z=t.overscan,B=z===void 0?1:z,e=t.paddingStart,d=e===void 0?0:e,P=t.paddingEnd,a=P===void 0?0:P,_=t.parentRef,x=t.horizontal,v=t.scrollToFn,y=t.useObserver,r=t.initialRect,n=t.onScrollElement,u=t.scrollOffsetFn,i=t.keyExtractor,f=i===void 0?Bz:i,g=t.measureSize,h=g===void 0?Uz:g,b=t.rangeExtractor,p=b===void 0?Hz:b,E=x?"width":"height",c=x?"scrollLeft":"scrollTop",l=Ao.useRef({scrollOffset:0,measurements:[]}),m=Ao.useState(0),M=m[0],L=m[1];l.current.scrollOffset=M;var D=y||Oz,A=D(_,r),C=A[E];l.current.outerSize=C;var S=Ao.useCallback(function(ue){_.current&&(_.current[c]=ue)},[_,c]),o=v||S;v=Ao.useCallback(function(ue){o(ue,S)},[S,o]);var R=Ao.useState({}),T=R[0],O=R[1],N=Ao.useCallback(function(){return O({})},[]),H=Ao.useRef([]),k=Ao.useMemo(function(){var ue=H.current.length>0?Math.min.apply(Math,H.current):0;H.current=[];for(var fe=l.current.measurements.slice(0,ue),te=ue;te<W;te++){var ne=f(te),ve=T[ne],le=fe[te-1]?fe[te-1].end:d,xe=typeof ve=="number"?ve:de(te),Se=le+xe;fe[te]={index:te,start:le,size:xe,end:Se,key:ne}}return fe},[de,T,d,W,f]),V=(((s=k[W-1])==null?void 0:s.end)||d)+a;l.current.measurements=k,l.current.totalSize=V;var G=n?n.current:_.current,U=Ao.useRef(u);U.current=u,uy(function(){if(!G){L(0);return}var ue=function(te){var ne=U.current?U.current(te):G[c];L(ne)};return ue(),G.addEventListener("scroll",ue,{capture:!1,passive:!0}),function(){G.removeEventListener("scroll",ue)}},[G,c]);var Y=Wz(l.current),ee=Y.start,re=Y.end,ie=Ao.useMemo(function(){return p({start:ee,end:re,overscan:B,size:k.length})},[ee,re,B,k.length,p]),se=Ao.useRef(h);se.current=h;var ce=Ao.useMemo(function(){for(var ue=[],fe=function(le,xe){var Se=ie[le],Re=k[Se],Ee=Hv(Hv({},Re),{},{measureRef:function(Be){if(Be){var Le=se.current(Be,x);if(Le!==Ee.size){var Te=l.current.scrollOffset;Ee.start<Te&&S(Te+(Le-Ee.size)),H.current.push(Se),O(function(De){var Ve;return Hv(Hv({},De),{},(Ve={},Ve[Ee.key]=Le,Ve))})}}}});ue.push(Ee)},te=0,ne=ie.length;te<ne;te++)fe(te);return ue},[ie,S,x,k]),q=Ao.useRef(!1);uy(function(){q.current&&O({}),q.current=!0},[de]);var j=Ao.useCallback(function(ue,fe){var te=fe===void 0?{}:fe,ne=te.align,ve=ne===void 0?"start":ne,le=l.current,xe=le.scrollOffset,Se=le.outerSize;ve==="auto"&&(ue<=xe?ve="start":ue>=xe+Se?ve="end":ve="start"),ve==="start"?v(ue):ve==="end"?v(ue-Se):ve==="center"&&v(ue-Se/2)},[v]),Z=Ao.useCallback(function(ue,fe){var te=fe===void 0?{}:fe,ne=te.align,ve=ne===void 0?"auto":ne,le=Rz(te,["align"]),xe=l.current,Se=xe.measurements,Re=xe.scrollOffset,Ee=xe.outerSize,Oe=Se[Math.max(0,Math.min(ue,W-1))];if(Oe){if(ve==="auto")if(Oe.end>=Re+Ee)ve="end";else if(Oe.start<=Re)ve="start";else return;var Be=ve==="center"?Oe.start+Oe.size/2:ve==="end"?Oe.end:Oe.start;j(Be,Hv({align:ve},le))}},[j,W]),Q=Ao.useCallback(function(){for(var ue=arguments.length,fe=new Array(ue),te=0;te<ue;te++)fe[te]=arguments[te];Z.apply(void 0,fe),requestAnimationFrame(function(){Z.apply(void 0,fe)})},[Z]);return{virtualItems:ce,totalSize:V,scrollToOffset:j,scrollToIndex:Q,measure:N}}var Gz=function(s,w,W,K){for(;s<=w;){var de=(s+w)/2|0,z=W(de);if(z<K)s=de+1;else if(z>K)w=de-1;else return de}return s>0?s-1:0};function Wz(t){for(var s=t.measurements,w=t.outerSize,W=t.scrollOffset,K=s.length-1,de=function(d){return s[d].start},z=Gz(0,K,de,W),B=z;B<K&&s[B].end<W+w;)B++;return{start:z,end:B}}var g2={},Yz={get exports(){return g2},set exports(t){g2=t}};(function(t){(function(s){var w=i(),W=f(),K=g(),de=h(),z={imagePlaceholder:void 0,cacheBust:!1},B={toSvg:e,toPng:P,toJpeg:a,toBlob:_,toPixelData:d,impl:{fontFaces:K,images:de,util:w,inliner:W,options:{}}};t.exports=B;function e(b,p){return p=p||{},x(p),Promise.resolve(b).then(function(c){return y(c,p.filter,!0)}).then(r).then(n).then(E).then(function(c){return u(c,p.width||w.width(b),p.height||w.height(b))});function E(c){return p.bgcolor&&(c.style.backgroundColor=p.bgcolor),p.width&&(c.style.width=p.width+"px"),p.height&&(c.style.height=p.height+"px"),p.style&&Object.keys(p.style).forEach(function(l){c.style[l]=p.style[l]}),c}}function d(b,p){return v(b,p||{}).then(function(E){return E.getContext("2d").getImageData(0,0,w.width(b),w.height(b)).data})}function P(b,p){return v(b,p||{}).then(function(E){return E.toDataURL()})}function a(b,p){return p=p||{},v(b,p).then(function(E){return E.toDataURL("image/jpeg",p.quality||1)})}function _(b,p){return v(b,p||{}).then(w.canvasToBlob)}function x(b){typeof b.imagePlaceholder>"u"?B.impl.options.imagePlaceholder=z.imagePlaceholder:B.impl.options.imagePlaceholder=b.imagePlaceholder,typeof b.cacheBust>"u"?B.impl.options.cacheBust=z.cacheBust:B.impl.options.cacheBust=b.cacheBust}function v(b,p){return e(b,p).then(w.makeImage).then(w.delay(100)).then(function(c){var l=E(b);return l.getContext("2d").drawImage(c,0,0),l});function E(c){var l=document.createElement("canvas");if(l.width=p.width||w.width(c),l.height=p.height||w.height(c),p.bgcolor){var m=l.getContext("2d");m.fillStyle=p.bgcolor,m.fillRect(0,0,l.width,l.height)}return l}}function y(b,p,E){if(!E&&p&&!p(b))return Promise.resolve();return Promise.resolve(b).then(c).then(function(M){return l(b,M,p)}).then(function(M){return m(b,M)});function c(M){return M instanceof HTMLCanvasElement?w.makeImage(M.toDataURL()):M.cloneNode(!1)}function l(M,L,D){var A=M.childNodes;if(A.length===0)return Promise.resolve(L);return C(L,w.asArray(A),D).then(function(){return L});function C(S,o,R){var T=Promise.resolve();return o.forEach(function(O){T=T.then(function(){return y(O,R)}).then(function(N){N&&S.appendChild(N)})}),T}}function m(M,L){if(!(L instanceof Element))return L;return Promise.resolve().then(D).then(A).then(C).then(S).then(function(){return L});function D(){o(window.getComputedStyle(M),L.style);function o(R,T){R.cssText?T.cssText=R.cssText:O(R,T);function O(N,H){w.asArray(N).forEach(function(k){H.setProperty(k,N.getPropertyValue(k),N.getPropertyPriority(k))})}}}function A(){[":before",":after"].forEach(function(R){o(R)});function o(R){var T=window.getComputedStyle(M,R),O=T.getPropertyValue("content");if(O===""||O==="none")return;var N=w.uid();L.className=L.className+" "+N;var H=document.createElement("style");H.appendChild(k(N,R,T)),L.appendChild(H);function k(V,G,U){var Y="."+V+":"+G,ee=U.cssText?re(U):ie(U);return document.createTextNode(Y+"{"+ee+"}");function re(se){var ce=se.getPropertyValue("content");return se.cssText+" content: "+ce+";"}function ie(se){return w.asArray(se).map(ce).join("; ")+";";function ce(q){return q+": "+se.getPropertyValue(q)+(se.getPropertyPriority(q)?" !important":"")}}}}}function C(){M instanceof HTMLTextAreaElement&&(L.innerHTML=M.value),M instanceof HTMLInputElement&&L.setAttribute("value",M.value)}function S(){L instanceof SVGElement&&(L.setAttribute("xmlns","http://www.w3.org/2000/svg"),L instanceof SVGRectElement&&["width","height"].forEach(function(o){var R=L.getAttribute(o);R&&L.style.setProperty(o,R)}))}}}function r(b){return K.resolveAll().then(function(p){var E=document.createElement("style");return b.appendChild(E),E.appendChild(document.createTextNode(p)),b})}function n(b){return de.inlineAll(b).then(function(){return b})}function u(b,p,E){return Promise.resolve(b).then(function(c){return c.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(c)}).then(w.escapeXhtml).then(function(c){return'<foreignObject x="0" y="0" width="100%" height="100%">'+c+"</foreignObject>"}).then(function(c){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+p+'" height="'+E+'">'+c+"</svg>"}).then(function(c){return"data:image/svg+xml;charset=utf-8,"+c})}function i(){return{escape:S,parseExtension:p,mimeType:E,dataAsUrl:C,isDataUrl:c,canvasToBlob:m,resolveUrl:M,getAndEncode:A,uid:L(),delay:o,asArray:R,escapeXhtml:T,makeImage:D,width:O,height:N};function b(){var k="application/font-woff",V="image/jpeg";return{woff:k,woff2:k,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:V,jpeg:V,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"}}function p(k){var V=/\.([^\.\/]*?)$/g.exec(k);return V?V[1]:""}function E(k){var V=p(k).toLowerCase();return b()[V]||""}function c(k){return k.search(/^(data:)/)!==-1}function l(k){return new Promise(function(V){for(var G=window.atob(k.toDataURL().split(",")[1]),U=G.length,Y=new Uint8Array(U),ee=0;ee<U;ee++)Y[ee]=G.charCodeAt(ee);V(new Blob([Y],{type:"image/png"}))})}function m(k){return k.toBlob?new Promise(function(V){k.toBlob(V)}):l(k)}function M(k,V){var G=document.implementation.createHTMLDocument(),U=G.createElement("base");G.head.appendChild(U);var Y=G.createElement("a");return G.body.appendChild(Y),U.href=V,Y.href=k,Y.href}function L(){var k=0;return function(){return"u"+V()+k++;function V(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}}}function D(k){return new Promise(function(V,G){var U=new Image;U.onload=function(){V(U)},U.onerror=G,U.src=k})}function A(k){var V=3e4;return B.impl.options.cacheBust&&(k+=(/\?/.test(k)?"&":"?")+new Date().getTime()),new Promise(function(G){var U=new XMLHttpRequest;U.onreadystatechange=re,U.ontimeout=ie,U.responseType="blob",U.timeout=V,U.open("GET",k,!0),U.send();var Y;if(B.impl.options.imagePlaceholder){var ee=B.impl.options.imagePlaceholder.split(/,/);ee&&ee[1]&&(Y=ee[1])}function re(){if(U.readyState===4){if(U.status!==200){Y?G(Y):se("cannot fetch resource: "+k+", status: "+U.status);return}var ce=new FileReader;ce.onloadend=function(){var q=ce.result.split(/,/)[1];G(q)},ce.readAsDataURL(U.response)}}function ie(){Y?G(Y):se("timeout of "+V+"ms occured while fetching resource: "+k)}function se(ce){console.error(ce),G("")}})}function C(k,V){return"data:"+V+";base64,"+k}function S(k){return k.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")}function o(k){return function(V){return new Promise(function(G){setTimeout(function(){G(V)},k)})}}function R(k){for(var V=[],G=k.length,U=0;U<G;U++)V.push(k[U]);return V}function T(k){return k.replace(/#/g,"%23").replace(/\n/g,"%0A")}function O(k){var V=H(k,"border-left-width"),G=H(k,"border-right-width");return k.scrollWidth+V+G}function N(k){var V=H(k,"border-top-width"),G=H(k,"border-bottom-width");return k.scrollHeight+V+G}function H(k,V){var G=window.getComputedStyle(k).getPropertyValue(V);return parseFloat(G.replace("px",""))}}function f(){var b=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:l,shouldProcess:p,impl:{readUrls:E,inline:c}};function p(m){return m.search(b)!==-1}function E(m){for(var M=[],L;(L=b.exec(m))!==null;)M.push(L[1]);return M.filter(function(D){return!w.isDataUrl(D)})}function c(m,M,L,D){return Promise.resolve(M).then(function(C){return L?w.resolveUrl(C,L):C}).then(D||w.getAndEncode).then(function(C){return w.dataAsUrl(C,w.mimeType(M))}).then(function(C){return m.replace(A(M),"$1"+C+"$3")});function A(C){return new RegExp(`(url\\(['"]?)(`+w.escape(C)+`)(['"]?\\))`,"g")}}function l(m,M,L){if(D())return Promise.resolve(m);return Promise.resolve(m).then(E).then(function(A){var C=Promise.resolve(m);return A.forEach(function(S){C=C.then(function(o){return c(o,S,M,L)})}),C});function D(){return!p(m)}}}function g(){return{resolveAll:b,impl:{readAll:p}};function b(){return p().then(function(E){return Promise.all(E.map(function(c){return c.resolve()}))}).then(function(E){return E.join(`
`)})}function p(){return Promise.resolve(w.asArray(document.styleSheets)).then(c).then(E).then(function(m){return m.map(l)});function E(m){return m.filter(function(M){return M.type===CSSRule.FONT_FACE_RULE}).filter(function(M){return W.shouldProcess(M.style.getPropertyValue("src"))})}function c(m){var M=[];return m.forEach(function(L){try{w.asArray(L.cssRules||[]).forEach(M.push.bind(M))}catch(D){console.log("Error while reading CSS rules from "+L.href,D.toString())}}),M}function l(m){return{resolve:function(){var L=(m.parentStyleSheet||{}).href;return W.inlineAll(m.cssText,L)},src:function(){return m.style.getPropertyValue("src")}}}}}function h(){return{inlineAll:p,impl:{newImage:b}};function b(E){return{inline:c};function c(l){return w.isDataUrl(E.src)?Promise.resolve():Promise.resolve(E.src).then(l||w.getAndEncode).then(function(m){return w.dataAsUrl(m,w.mimeType(E.src))}).then(function(m){return new Promise(function(M,L){E.onload=M,E.onerror=L,E.src=m})})}}function p(E){if(!(E instanceof Element))return Promise.resolve(E);return c(E).then(function(){return E instanceof HTMLImageElement?b(E).inline():Promise.all(w.asArray(E.childNodes).map(function(l){return p(l)}))});function c(l){var m=l.style.getPropertyValue("background");return m?W.inlineAll(m).then(function(M){l.style.setProperty("background",M,l.style.getPropertyPriority("background"))}).then(function(){return l}):Promise.resolve(l)}}}})()})(Yz);const Xz=g2;var CE={},LE={},y2={},Zz={get exports(){return y2},set exports(t){y2=t}},jz="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Kz=jz,Jz=Kz;function PE(){}function _E(){}_E.resetWarningCache=PE;var $z=function(){function t(W,K,de,z,B,e){if(e!==Jz){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}t.isRequired=t;function s(){return t}var w={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:s,element:t,elementType:t,instanceOf:s,node:t,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:_E,resetWarningCache:PE};return w.PropTypes=w,w};Zz.exports=$z();(function(t){function s(g){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},s(g)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var w=z(Ka),W=K(y2);function K(g){return g&&g.__esModule?g:{default:g}}function de(g){if(typeof WeakMap!="function")return null;var h=new WeakMap,b=new WeakMap;return(de=function(E){return E?b:h})(g)}function z(g,h){if(!h&&g&&g.__esModule)return g;if(g===null||s(g)!=="object"&&typeof g!="function")return{default:g};var b=de(h);if(b&&b.has(g))return b.get(g);var p={},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var c in g)if(c!=="default"&&Object.prototype.hasOwnProperty.call(g,c)){var l=E?Object.getOwnPropertyDescriptor(g,c):null;l&&(l.get||l.set)?Object.defineProperty(p,c,l):p[c]=g[c]}return p.default=g,b&&b.set(g,p),p}function B(g,h){if(!(g instanceof h))throw new TypeError("Cannot call a class as a function")}function e(g,h){for(var b=0;b<h.length;b++){var p=h[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(g,p.key,p)}}function d(g,h,b){return h&&e(g.prototype,h),b&&e(g,b),Object.defineProperty(g,"prototype",{writable:!1}),g}function P(g,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(h&&h.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),Object.defineProperty(g,"prototype",{writable:!1}),h&&a(g,h)}function a(g,h){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,E){return p.__proto__=E,p},a(g,h)}function _(g){var h=y();return function(){var p=r(g),E;if(h){var c=r(this).constructor;E=Reflect.construct(p,arguments,c)}else E=p.apply(this,arguments);return x(this,E)}}function x(g,h){if(h&&(s(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v(g)}function v(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}function y(){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 r(g){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(b){return b.__proto__||Object.getPrototypeOf(b)},r(g)}var n=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover","WebGlContextLost"],u=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],i=typeof window<"u";function f(g){var h=function(b){P(E,b);var p=_(E);function E(c){var l;return B(this,E),l=p.call(this,c),l.p=Promise.resolve(),l.resizeHandler=null,l.handlers={},l.syncWindowResize=l.syncWindowResize.bind(v(l)),l.syncEventHandlers=l.syncEventHandlers.bind(v(l)),l.attachUpdateEvents=l.attachUpdateEvents.bind(v(l)),l.getRef=l.getRef.bind(v(l)),l.handleUpdate=l.handleUpdate.bind(v(l)),l.figureCallback=l.figureCallback.bind(v(l)),l.updatePlotly=l.updatePlotly.bind(v(l)),l}return d(E,[{key:"updatePlotly",value:function(l,m,M){var L=this;this.p=this.p.then(function(){if(!L.unmounting){if(!L.el)throw new Error("Missing element reference");return g.react(L.el,{data:L.props.data,layout:L.props.layout,config:L.props.config,frames:L.props.frames})}}).then(function(){L.unmounting||(L.syncWindowResize(l),L.syncEventHandlers(),L.figureCallback(m),M&&L.attachUpdateEvents())}).catch(function(D){L.props.onError&&L.props.onError(D)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(l){this.unmounting=!1;var m=l.frames&&l.frames.length?l.frames.length:0,M=this.props.frames&&this.props.frames.length?this.props.frames.length:0,L=!(l.layout===this.props.layout&&l.data===this.props.data&&l.config===this.props.config&&M===m),D=l.revision!==void 0,A=l.revision!==this.props.revision;!L&&(!D||D&&!A)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&i&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),g.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var l=this;!this.el||!this.el.removeListener||u.forEach(function(m){l.el.on(m,l.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var l=this;!this.el||!this.el.removeListener||u.forEach(function(m){l.el.removeListener(m,l.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(l){if(typeof l=="function"){var m=this.el,M=m.data,L=m.layout,D=this.el._transitionData?this.el._transitionData._frames:null,A={data:M,layout:L,frames:D};l(A,this.el)}}},{key:"syncWindowResize",value:function(l){var m=this;i&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return g.Plots.resize(m.el)},window.addEventListener("resize",this.resizeHandler),l&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(l){this.el=l,this.props.debug&&i&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var l=this;n.forEach(function(m){var M=l.props["on"+m],L=l.handlers[m],D=Boolean(L);M&&!D?l.addEventHandler(m,M):!M&&D?l.removeEventHandler(m):M&&D&&M!==L&&(l.removeEventHandler(m),l.addEventHandler(m,M))})}},{key:"addEventHandler",value:function(l,m){this.handlers[l]=m,this.el.on(this.getPlotlyEventName(l),this.handlers[l])}},{key:"removeEventHandler",value:function(l){this.el.removeListener(this.getPlotlyEventName(l),this.handlers[l]),delete this.handlers[l]}},{key:"getPlotlyEventName",value:function(l){return"plotly_"+l.toLowerCase()}},{key:"render",value:function(){return w.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),E}(w.Component);return h.propTypes={data:W.default.arrayOf(W.default.object),config:W.default.object,layout:W.default.object,frames:W.default.arrayOf(W.default.object),revision:W.default.number,onInitialized:W.default.func,onPurge:W.default.func,onError:W.default.func,onUpdate:W.default.func,debug:W.default.bool,style:W.default.object,className:W.default.string,useResizeHandler:W.default.bool,divId:W.default.string},n.forEach(function(b){h.propTypes["on"+b]=W.default.func}),h.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},h}})(LE);var m2={},Qz={get exports(){return m2},set exports(t){m2=t}};(function(t,s){(function(W,K){t.exports=K()})(self,function(){return function(){var w={98847:function(z,B,e){var d=e(71828),P={"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 a in P){var _=a.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");d.addStyleRule(_,P[a])}},98222:function(z,B,e){z.exports=e(82887)},27206:function(z,B,e){z.exports=e(60822)},59893:function(z,B,e){z.exports=e(23381)},5224:function(z,B,e){z.exports=e(83832)},59509:function(z,B,e){z.exports=e(72201)},75557:function(z,B,e){z.exports=e(91815)},40338:function(z,B,e){z.exports=e(21462)},35080:function(z,B,e){z.exports=e(51319)},61396:function(z,B,e){z.exports=e(57516)},40549:function(z,B,e){z.exports=e(98128)},49866:function(z,B,e){z.exports=e(99442)},36089:function(z,B,e){z.exports=e(93740)},19548:function(z,B,e){z.exports=e(8729)},35831:function(z,B,e){z.exports=e(93814)},61039:function(z,B,e){z.exports=e(14382)},97040:function(z,B,e){z.exports=e(51759)},77986:function(z,B,e){z.exports=e(10421)},24296:function(z,B,e){z.exports=e(43102)},58872:function(z,B,e){z.exports=e(92165)},29626:function(z,B,e){z.exports=e(3325)},65591:function(z,B,e){z.exports=e(36071)},69738:function(z,B,e){z.exports=e(43905)},92650:function(z,B,e){z.exports=e(35902)},35630:function(z,B,e){z.exports=e(69816)},73434:function(z,B,e){z.exports=e(94507)},27909:function(z,B,e){var d=e(19548);d.register([e(27206),e(5224),e(58872),e(65591),e(69738),e(92650),e(49866),e(25743),e(6197),e(97040),e(85461),e(73434),e(54201),e(81299),e(47645),e(35630),e(77986),e(83043),e(93005),e(96881),e(4534),e(50581),e(40549),e(77900),e(47582),e(35080),e(21641),e(17280),e(5861),e(29626),e(10021),e(65317),e(96268),e(61396),e(35831),e(16122),e(46163),e(40344),e(40338),e(48131),e(36089),e(55334),e(75557),e(19440),e(99488),e(59893),e(97393),e(98222),e(61039),e(24296),e(66398),e(59509)]),z.exports=d},46163:function(z,B,e){z.exports=e(15154)},96881:function(z,B,e){z.exports=e(64943)},50581:function(z,B,e){z.exports=e(21164)},55334:function(z,B,e){z.exports=e(54186)},65317:function(z,B,e){z.exports=e(94873)},10021:function(z,B,e){z.exports=e(67618)},54201:function(z,B,e){z.exports=e(58810)},5861:function(z,B,e){z.exports=e(20593)},16122:function(z,B,e){z.exports=e(29396)},83043:function(z,B,e){z.exports=e(13551)},48131:function(z,B,e){z.exports=e(46858)},47582:function(z,B,e){z.exports=e(17988)},21641:function(z,B,e){z.exports=e(68868)},96268:function(z,B,e){z.exports=e(20467)},19440:function(z,B,e){z.exports=e(91271)},99488:function(z,B,e){z.exports=e(21461)},97393:function(z,B,e){z.exports=e(85956)},25743:function(z,B,e){z.exports=e(52979)},66398:function(z,B,e){z.exports=e(32275)},17280:function(z,B,e){z.exports=e(6419)},77900:function(z,B,e){z.exports=e(61510)},81299:function(z,B,e){z.exports=e(87619)},93005:function(z,B,e){z.exports=e(93601)},40344:function(z,B,e){z.exports=e(96595)},47645:function(z,B,e){z.exports=e(70954)},6197:function(z,B,e){z.exports=e(47462)},4534:function(z,B,e){z.exports=e(17659)},85461:function(z,B,e){z.exports=e(19990)},82884:function(z){z.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},50215:function(z,B,e){var d=e(82884),P=e(41940),a=e(85555),_=e(44467).templatedArray;e(24695),z.exports=_("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:P({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:d.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:d.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",a.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",a.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:P({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},3749:function(z,B,e){var d=e(71828),P=e(89298),a=e(92605).draw;z.exports=function(y){var r=y._fullLayout,n=d.filterVisible(r.annotations);if(n.length&&y._fullData.length)return d.syncOrAsync([a,_],y)};function _(v){var y=v._fullLayout;d.filterVisible(y.annotations).forEach(function(r){var n=P.getFromId(v,r.xref),u=P.getFromId(v,r.yref),i=P.getRefType(r.xref),f=P.getRefType(r.yref);r._extremes={},i==="range"&&x(r,n),f==="range"&&x(r,u)})}function x(v,y){var r=y._id,n=r.charAt(0),u=v[n],i=v["a"+n],f=v[n+"ref"],g=v["a"+n+"ref"],h=v["_"+n+"padplus"],b=v["_"+n+"padminus"],p={x:1,y:-1}[n]*v[n+"shift"],E=3*v.arrowsize*v.arrowwidth||0,c=E+p,l=E-p,m=3*v.startarrowsize*v.arrowwidth||0,M=m+p,L=m-p,D;if(g===f){var A=P.findExtremes(y,[y.r2c(u)],{ppadplus:c,ppadminus:l}),C=P.findExtremes(y,[y.r2c(i)],{ppadplus:Math.max(h,M),ppadminus:Math.max(b,L)});D={min:[A.min[0],C.min[0]],max:[A.max[0],C.max[0]]}}else M=i?M+i:M,L=i?L-i:L,D=P.findExtremes(y,[y.r2c(u)],{ppadplus:Math.max(h,c,M),ppadminus:Math.max(b,l,L)});v._extremes[r]=D}},44317:function(z,B,e){var d=e(71828),P=e(73972),a=e(44467).arrayEditor;z.exports={hasClickToShow:_,onClick:x};function _(r,n){var u=v(r,n);return u.on.length>0||u.explicitOff.length>0}function x(r,n){var u=v(r,n),i=u.on,f=u.off.concat(u.explicitOff),g={},h=r._fullLayout.annotations,b,p;if(i.length||f.length){for(b=0;b<i.length;b++)p=a(r.layout,"annotations",h[i[b]]),p.modifyItem("visible",!0),d.extendFlat(g,p.getUpdateObj());for(b=0;b<f.length;b++)p=a(r.layout,"annotations",h[f[b]]),p.modifyItem("visible",!1),d.extendFlat(g,p.getUpdateObj());return P.call("update",r,{},g)}}function v(r,n){var u=r._fullLayout.annotations,i=[],f=[],g=[],h=(n||[]).length,b,p,E,c,l,m,M,L;for(b=0;b<u.length;b++)if(E=u[b],c=E.clicktoshow,c){for(p=0;p<h;p++)if(l=n[p],m=l.xaxis,M=l.yaxis,m._id===E.xref&&M._id===E.yref&&m.d2r(l.x)===y(E._xclick,m)&&M.d2r(l.y)===y(E._yclick,M)){E.visible?c==="onout"?L=f:L=g:L=i,L.push(b);break}p===h&&E.visible&&c==="onout"&&f.push(b)}return{on:i,off:f,explicitOff:g}}function y(r,n){return n.type==="log"?n.l2r(r):n.d2r(r)}},25625:function(z,B,e){var d=e(71828),P=e(7901);z.exports=function(_,x,v,y){y("opacity");var r=y("bgcolor"),n=y("bordercolor"),u=P.opacity(n);y("borderpad");var i=y("borderwidth"),f=y("showarrow");y("text",f?" ":v._dfltTitle.annotation),y("textangle"),d.coerceFont(y,"font",v.font),y("width"),y("align");var g=y("height");if(g&&y("valign"),f){var h=y("arrowside"),b,p;h.indexOf("end")!==-1&&(b=y("arrowhead"),p=y("arrowsize")),h.indexOf("start")!==-1&&(y("startarrowhead",b),y("startarrowsize",p)),y("arrowcolor",u?x.bordercolor:P.defaultLine),y("arrowwidth",(u&&i||1)*2),y("standoff"),y("startstandoff")}var E=y("hovertext"),c=v.hoverlabel||{};if(E){var l=y("hoverlabel.bgcolor",c.bgcolor||(P.opacity(r)?P.rgb(r):P.defaultLine)),m=y("hoverlabel.bordercolor",c.bordercolor||P.contrast(l));d.coerceFont(y,"hoverlabel.font",{family:c.font.family,size:c.font.size,color:c.font.color||m})}y("captureevents",!!E)}},94128:function(z,B,e){var d=e(92770),P=e(58163);z.exports=function(_,x,v,y){x=x||{};var r=v==="log"&&x.type==="linear",n=v==="linear"&&x.type==="log";if(!(r||n))return;var u=_._fullLayout.annotations,i=x._id.charAt(0),f,g;function h(p){var E=f[p],c=null;r?c=P(E,x.range):c=Math.pow(10,E),d(c)||(c=null),y(g+p,c)}for(var b=0;b<u.length;b++)f=u[b],g="annotations["+b+"].",f[i+"ref"]===x._id&&h(i),f["a"+i+"ref"]===x._id&&h("a"+i)}},84046:function(z,B,e){var d=e(71828),P=e(89298),a=e(85501),_=e(25625),x=e(50215);z.exports=function(r,n){a(r,n,{name:"annotations",handleItemDefaults:v})};function v(y,r,n){function u(S,o){return d.coerce(y,r,x,S,o)}var i=u("visible"),f=u("clicktoshow");if(i||f){_(y,r,n,u);for(var g=r.showarrow,h=["x","y"],b=[-10,-30],p={_fullLayout:n},E=0;E<2;E++){var c=h[E],l=P.coerceRef(y,r,p,c,"","paper");if(l!=="paper"){var m=P.getFromId(p,l);m._annIndices.push(r._index)}if(P.coercePosition(r,p,u,l,c,.5),g){var M="a"+c,L=P.coerceRef(y,r,p,M,"pixel",["pixel","paper"]);L!=="pixel"&&L!==l&&(L=r[M]="pixel");var D=L==="pixel"?b[E]:.4;P.coercePosition(r,p,u,L,M,D)}u(c+"anchor"),u(c+"shift")}if(d.noneOrAll(y,r,["x","y"]),g&&d.noneOrAll(y,r,["ax","ay"]),f){var A=u("xclick"),C=u("yclick");r._xclick=A===void 0?r.x:P.cleanPosition(A,p,r.xref),r._yclick=C===void 0?r.y:P.cleanPosition(C,p,r.yref)}}}},92605:function(z,B,e){var d=e(39898),P=e(73972),a=e(74875),_=e(71828),x=_.strTranslate,v=e(89298),y=e(7901),r=e(91424),n=e(30211),u=e(63893),i=e(6964),f=e(28569),g=e(44467).arrayEditor,h=e(13011);z.exports={draw:b,drawOne:p,drawRaw:c};function b(l){var m=l._fullLayout;m._infolayer.selectAll(".annotation").remove();for(var M=0;M<m.annotations.length;M++)m.annotations[M].visible&&p(l,M);return a.previousPromises(l)}function p(l,m){var M=l._fullLayout,L=M.annotations[m]||{},D=v.getFromId(l,L.xref),A=v.getFromId(l,L.yref);D&&D.setScale(),A&&A.setScale(),c(l,L,m,!1,D,A)}function E(l,m,M,L,D){var A=D[M],C=D[M+"ref"],S=M.indexOf("y")!==-1,o=v.getRefType(C)==="domain",R=S?L.h:L.w;return l?o?A+(S?-m:m)/l._length:l.p2r(l.r2p(A)+m):A+(S?-m:m)/R}function c(l,m,M,L,D,A){var C=l._fullLayout,S=l._fullLayout._size,o=l._context.edits,R,T;L?(R="annotation-"+L,T=L+".annotations"):(R="annotation",T="annotations");var O=g(l.layout,T,m),N=O.modifyBase,H=O.modifyItem,k=O.getUpdateObj;C._infolayer.selectAll("."+R+'[data-index="'+M+'"]').remove();var V="clip"+C._uid+"_ann"+M;if(!m._input||m.visible===!1){d.selectAll("#"+V).remove();return}var G={x:{},y:{}},U=+m.textangle||0,Y=C._infolayer.append("g").classed(R,!0).attr("data-index",String(M)).style("opacity",m.opacity),ee=Y.append("g").classed("annotation-text-g",!0),re=o[m.showarrow?"annotationTail":"annotationPosition"],ie=m.captureevents||o.annotationText||re;function se(Se){var Re={index:M,annotation:m._input,fullAnnotation:m,event:Se};return L&&(Re.subplotId=L),Re}var ce=ee.append("g").style("pointer-events",ie?"all":null).call(i,"pointer").on("click",function(){l._dragging=!1,l.emit("plotly_clickannotation",se(d.event))});m.hovertext&&ce.on("mouseover",function(){var Se=m.hoverlabel,Re=Se.font,Ee=this.getBoundingClientRect(),Oe=l.getBoundingClientRect();n.loneHover({x0:Ee.left-Oe.left,x1:Ee.right-Oe.left,y:(Ee.top+Ee.bottom)/2-Oe.top,text:m.hovertext,color:Se.bgcolor,borderColor:Se.bordercolor,fontFamily:Re.family,fontSize:Re.size,fontColor:Re.color},{container:C._hoverlayer.node(),outerContainer:C._paper.node(),gd:l})}).on("mouseout",function(){n.loneUnhover(C._hoverlayer.node())});var q=m.borderwidth,j=m.borderpad,Z=q+j,Q=ce.append("rect").attr("class","bg").style("stroke-width",q+"px").call(y.stroke,m.bordercolor).call(y.fill,m.bgcolor),ue=m.width||m.height,fe=C._topclips.selectAll("#"+V).data(ue?[0]:[]);fe.enter().append("clipPath").classed("annclip",!0).attr("id",V).append("rect"),fe.exit().remove();var te=m.font,ne=C._meta?_.templateString(m.text,C._meta):m.text,ve=ce.append("text").classed("annotation-text",!0).text(ne);function le(Se){return Se.call(r.font,te).attr({"text-anchor":{left:"start",right:"end"}[m.align]||"middle"}),u.convertToTspans(Se,l,xe),Se}function xe(){var Se=ve.selectAll("a");if(Se.size()===1&&Se.text()===ve.text()){var Re=ce.insert("a",":first-child").attr({"xlink:xlink:href":Se.attr("xlink:href"),"xlink:xlink:show":Se.attr("xlink:show")}).style({cursor:"pointer"});Re.node().appendChild(Q.node())}var Ee=ce.select(".annotation-text-math-group"),Oe=!Ee.empty(),Be=r.bBox((Oe?Ee:ve).node()),Le=Be.width,Te=Be.height,De=m.width||Le,Ve=m.height||Te,Ye=Math.round(De+2*Z),Ne=Math.round(Ve+2*Z);function Xe(or,ur){return ur==="auto"&&(or<.3333333333333333?ur="left":or>.6666666666666666?ur="right":ur="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[ur]}for(var ht=!1,st=["x","y"],it=0;it<st.length;it++){var nt=st[it],pt=m[nt+"ref"]||nt,Tt=m["a"+nt+"ref"],Et={x:D,y:A}[nt],Dt=(U+(nt==="x"?0:-90))*Math.PI/180,et=Ye*Math.cos(Dt),Ue=Ne*Math.sin(Dt),ze=Math.abs(et)+Math.abs(Ue),rt=m[nt+"anchor"],lt=m[nt+"shift"]*(nt==="x"?1:-1),Qe=G[nt],Fe,Ce,pe,we,Ae,Pe=v.getRefType(pt);if(Et&&Pe!=="domain"){var Ge=Et.r2fraction(m[nt]);(Ge<0||Ge>1)&&(Tt===pt?(Ge=Et.r2fraction(m["a"+nt]),(Ge<0||Ge>1)&&(ht=!0)):ht=!0),Fe=Et._offset+Et.r2p(m[nt]),we=.5}else{var We=Pe==="domain";nt==="x"?(pe=m[nt],Fe=We?Et._offset+Et._length*pe:Fe=S.l+S.w*pe):(pe=1-m[nt],Fe=We?Et._offset+Et._length*pe:Fe=S.t+S.h*pe),we=m.showarrow?.5:pe}if(m.showarrow){Qe.head=Fe;var tt=m["a"+nt];if(Ae=et*Xe(.5,m.xanchor)-Ue*Xe(.5,m.yanchor),Tt===pt){var ct=v.getRefType(Tt);ct==="domain"?(nt==="y"&&(tt=1-tt),Qe.tail=Et._offset+Et._length*tt):ct==="paper"?nt==="y"?(tt=1-tt,Qe.tail=S.t+S.h*tt):Qe.tail=S.l+S.w*tt:Qe.tail=Et._offset+Et.r2p(tt),Ce=Ae}else Qe.tail=Fe+tt,Ce=Ae+tt;Qe.text=Qe.tail+Ae;var St=C[nt==="x"?"width":"height"];if(pt==="paper"&&(Qe.head=_.constrain(Qe.head,1,St-1)),Tt==="pixel"){var Pt=-Math.max(Qe.tail-3,Qe.text),wt=Math.min(Qe.tail+3,Qe.text)-St;Pt>0?(Qe.tail+=Pt,Qe.text+=Pt):wt>0&&(Qe.tail-=wt,Qe.text-=wt)}Qe.tail+=lt,Qe.head+=lt}else Ae=ze*Xe(we,rt),Ce=Ae,Qe.text=Fe+Ae;Qe.text+=lt,Ae+=lt,Ce+=lt,m["_"+nt+"padplus"]=ze/2+Ce,m["_"+nt+"padminus"]=ze/2-Ce,m["_"+nt+"size"]=ze,m["_"+nt+"shift"]=Ae}if(ht){ce.remove();return}var Bt=0,Wt=0;if(m.align!=="left"&&(Bt=(De-Le)*(m.align==="center"?.5:1)),m.valign!=="top"&&(Wt=(Ve-Te)*(m.valign==="middle"?.5:1)),Oe)Ee.select("svg").attr({x:Z+Bt-1,y:Z+Wt}).call(r.setClipUrl,ue?V:null,l);else{var hr=Z+Wt-Be.top,gt=Z+Bt-Be.left;ve.call(u.positionText,gt,hr).call(r.setClipUrl,ue?V:null,l)}fe.select("rect").call(r.setRect,Z,Z,De,Ve),Q.call(r.setRect,q/2,q/2,Ye-q,Ne-q),ce.call(r.setTranslate,Math.round(G.x.text-Ye/2),Math.round(G.y.text-Ne/2)),ee.attr({transform:"rotate("+U+","+G.x.text+","+G.y.text+")"});var jt=function(or,ur){Y.selectAll(".annotation-arrow-g").remove();var dt=G.x.head,ut=G.y.head,yt=G.x.tail+or,Lt=G.y.tail+ur,Rt=G.x.text+or,Nt=G.y.text+ur,Vt=_.rotationXYMatrix(U,Rt,Nt),Zt=_.apply2DTransform(Vt),qt=_.apply2DTransform2(Vt),Jt=+Q.attr("width"),nr=+Q.attr("height"),Mr=Rt-.5*Jt,Ke=Mr+Jt,Ze=Nt-.5*nr,zt=Ze+nr,kt=[[Mr,Ze,Mr,zt],[Mr,zt,Ke,zt],[Ke,zt,Ke,Ze],[Ke,Ze,Mr,Ze]].map(qt);if(!kt.reduce(function(Nr,Sn){return Nr^!!_.segmentsIntersect(dt,ut,dt+1e6,ut+1e6,Sn[0],Sn[1],Sn[2],Sn[3])},!1)){kt.forEach(function(Nr){var Sn=_.segmentsIntersect(yt,Lt,dt,ut,Nr[0],Nr[1],Nr[2],Nr[3]);Sn&&(yt=Sn.x,Lt=Sn.y)});var Qt=m.arrowwidth,cr=m.arrowcolor,fr=m.arrowside,ir=Y.append("g").style({opacity:y.opacity(cr)}).classed("annotation-arrow-g",!0),Yt=ir.append("path").attr("d","M"+yt+","+Lt+"L"+dt+","+ut).style("stroke-width",Qt+"px").call(y.stroke,y.rgb(cr));if(h(Yt,fr,m),o.annotationPosition&&Yt.node().parentNode&&!L){var gr=dt,yr=ut;if(m.standoff){var Tr=Math.sqrt(Math.pow(dt-yt,2)+Math.pow(ut-Lt,2));gr+=m.standoff*(yt-dt)/Tr,yr+=m.standoff*(Lt-ut)/Tr}var pr=ir.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(yt-gr)+","+(Lt-yr),transform:x(gr,yr)}).style("stroke-width",Qt+6+"px").call(y.stroke,"rgba(0,0,0,0)").call(y.fill,"rgba(0,0,0,0)"),Kr,Or;f.init({element:pr.node(),gd:l,prepFn:function(){var Nr=r.getTranslate(ce);Kr=Nr.x,Or=Nr.y,D&&D.autorange&&N(D._name+".autorange",!0),A&&A.autorange&&N(A._name+".autorange",!0)},moveFn:function(Nr,Sn){var Jr=Zt(Kr,Or),xn=Jr[0]+Nr,Dn=Jr[1]+Sn;ce.call(r.setTranslate,xn,Dn),H("x",E(D,Nr,"x",S,m)),H("y",E(A,Sn,"y",S,m)),m.axref===m.xref&&H("ax",E(D,Nr,"ax",S,m)),m.ayref===m.yref&&H("ay",E(A,Sn,"ay",S,m)),ir.attr("transform",x(Nr,Sn)),ee.attr({transform:"rotate("+U+","+xn+","+Dn+")"})},doneFn:function(){P.call("_guiRelayout",l,k());var Nr=document.querySelector(".js-notes-box-panel");Nr&&Nr.redraw(Nr.selectedObj)}})}}};if(m.showarrow&&jt(0,0),re){var Ut;f.init({element:ce.node(),gd:l,prepFn:function(){Ut=ee.attr("transform")},moveFn:function(or,ur){var dt="pointer";if(m.showarrow)m.axref===m.xref?H("ax",E(D,or,"ax",S,m)):H("ax",m.ax+or),m.ayref===m.yref?H("ay",E(A,ur,"ay",S.w,m)):H("ay",m.ay+ur),jt(or,ur);else{if(L)return;var ut,yt;if(D)ut=E(D,or,"x",S,m);else{var Lt=m._xsize/S.w,Rt=m.x+(m._xshift-m.xshift)/S.w-Lt/2;ut=f.align(Rt+or/S.w,Lt,0,1,m.xanchor)}if(A)yt=E(A,ur,"y",S,m);else{var Nt=m._ysize/S.h,Vt=m.y-(m._yshift+m.yshift)/S.h-Nt/2;yt=f.align(Vt-ur/S.h,Nt,0,1,m.yanchor)}H("x",ut),H("y",yt),(!D||!A)&&(dt=f.getCursor(D?.5:ut,A?.5:yt,m.xanchor,m.yanchor))}ee.attr({transform:x(or,ur)+Ut}),i(ce,dt)},clickFn:function(or,ur){m.captureevents&&l.emit("plotly_clickannotation",se(ur))},doneFn:function(){i(ce),P.call("_guiRelayout",l,k());var or=document.querySelector(".js-notes-box-panel");or&&or.redraw(or.selectedObj)}})}}o.annotationText?ve.call(u.makeEditable,{delegate:ce,gd:l}).call(le).on("edit",function(Se){m.text=Se,this.call(le),H("text",Se),D&&D.autorange&&N(D._name+".autorange",!0),A&&A.autorange&&N(A._name+".autorange",!0),P.call("_guiRelayout",l,k())}):ve.call(le)}},13011:function(z,B,e){var d=e(39898),P=e(7901),a=e(82884),_=e(71828),x=_.strScale,v=_.strRotate,y=_.strTranslate;z.exports=function(n,u,i){var f=n.node(),g=a[i.arrowhead||0],h=a[i.startarrowhead||0],b=(i.arrowwidth||1)*(i.arrowsize||1),p=(i.arrowwidth||1)*(i.startarrowsize||1),E=u.indexOf("start")>=0,c=u.indexOf("end")>=0,l=g.backoff*b+i.standoff,m=h.backoff*p+i.startstandoff,M,L,D,A;if(f.nodeName==="line"){M={x:+n.attr("x1"),y:+n.attr("y1")},L={x:+n.attr("x2"),y:+n.attr("y2")};var C=M.x-L.x,S=M.y-L.y;if(D=Math.atan2(S,C),A=D+Math.PI,l&&m&&l+m>Math.sqrt(C*C+S*S)){ee();return}if(l){if(l*l>C*C+S*S){ee();return}var o=l*Math.cos(D),R=l*Math.sin(D);L.x+=o,L.y+=R,n.attr({x2:L.x,y2:L.y})}if(m){if(m*m>C*C+S*S){ee();return}var T=m*Math.cos(D),O=m*Math.sin(D);M.x-=T,M.y-=O,n.attr({x1:M.x,y1:M.y})}}else if(f.nodeName==="path"){var N=f.getTotalLength(),H="";if(N<l+m){ee();return}var k=f.getPointAtLength(0),V=f.getPointAtLength(.1);D=Math.atan2(k.y-V.y,k.x-V.x),M=f.getPointAtLength(Math.min(m,N)),H="0px,"+m+"px,";var G=f.getPointAtLength(N),U=f.getPointAtLength(N-.1);A=Math.atan2(G.y-U.y,G.x-U.x),L=f.getPointAtLength(Math.max(0,N-l));var Y=H?m+l:l;H+=N-Y+"px,"+N+"px",n.style("stroke-dasharray",H)}function ee(){n.style("stroke-dasharray","0px,100px")}function re(ie,se,ce,q){ie.path&&(ie.noRotate&&(ce=0),d.select(f.parentNode).append("path").attr({class:n.attr("class"),d:ie.path,transform:y(se.x,se.y)+v(ce*180/Math.PI)+x(q)}).style({fill:P.rgb(i.arrowcolor),"stroke-width":0}))}E&&re(h,M,D,p),c&&re(g,L,A,b)}},32745:function(z,B,e){var d=e(92605),P=e(44317);z.exports={moduleType:"component",name:"annotations",layoutAttributes:e(50215),supplyLayoutDefaults:e(84046),includeBasePlot:e(76325)("annotations"),calcAutorange:e(3749),draw:d.draw,drawOne:d.drawOne,drawRaw:d.drawRaw,hasClickToShow:P.hasClickToShow,onClick:P.onClick,convertCoords:e(94128)}},26997:function(z,B,e){var d=e(50215),P=e(30962).overrideAll,a=e(44467).templatedArray;z.exports=P(a("annotation",{visible:d.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:d.xanchor,xshift:d.xshift,yanchor:d.yanchor,yshift:d.yshift,text:d.text,textangle:d.textangle,font:d.font,width:d.width,height:d.height,opacity:d.opacity,align:d.align,valign:d.valign,bgcolor:d.bgcolor,bordercolor:d.bordercolor,borderpad:d.borderpad,borderwidth:d.borderwidth,showarrow:d.showarrow,arrowcolor:d.arrowcolor,arrowhead:d.arrowhead,startarrowhead:d.startarrowhead,arrowside:d.arrowside,arrowsize:d.arrowsize,startarrowsize:d.startarrowsize,arrowwidth:d.arrowwidth,standoff:d.standoff,startstandoff:d.startstandoff,hovertext:d.hovertext,hoverlabel:d.hoverlabel,captureevents:d.captureevents}),"calc","from-root")},5485:function(z,B,e){var d=e(71828),P=e(89298);z.exports=function(x){for(var v=x.fullSceneLayout,y=v.annotations,r=0;r<y.length;r++)a(y[r],x);x.fullLayout._infolayer.selectAll(".annotation-"+x.id).remove()};function a(_,x){var v=x.fullSceneLayout,y=v.domain,r=x.fullLayout._size,n={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};_._xa={},d.extendFlat(_._xa,n),P.setConvert(_._xa),_._xa._offset=r.l+y.x[0]*r.w,_._xa.l2p=function(){return .5*(1+_._pdata[0]/_._pdata[3])*r.w*(y.x[1]-y.x[0])},_._ya={},d.extendFlat(_._ya,n),P.setConvert(_._ya),_._ya._offset=r.t+(1-y.y[1])*r.h,_._ya.l2p=function(){return .5*(1-_._pdata[1]/_._pdata[3])*r.h*(y.y[1]-y.y[0])}}},20226:function(z,B,e){var d=e(71828),P=e(89298),a=e(85501),_=e(25625),x=e(26997);z.exports=function(r,n,u){a(r,n,{name:"annotations",handleItemDefaults:v,fullLayout:u.fullLayout})};function v(y,r,n,u){function i(h,b){return d.coerce(y,r,x,h,b)}function f(h){var b=h+"axis",p={_fullLayout:{}};return p._fullLayout[b]=n[b],P.coercePosition(r,p,i,h,h,.5)}var g=i("visible");g&&(_(y,r,u.fullLayout,i),f("x"),f("y"),f("z"),d.noneOrAll(y,r,["x","y","z"]),r.xref="x",r.yref="y",r.zref="z",i("xanchor"),i("yanchor"),i("xshift"),i("yshift"),r.showarrow&&(r.axref="pixel",r.ayref="pixel",i("ax",-10),i("ay",-30),d.noneOrAll(y,r,["ax","ay"])))}},82188:function(z,B,e){var d=e(92605).drawRaw,P=e(63538),a=["x","y","z"];z.exports=function(x){for(var v=x.fullSceneLayout,y=x.dataScale,r=v.annotations,n=0;n<r.length;n++){for(var u=r[n],i=!1,f=0;f<3;f++){var g=a[f],h=u[g],b=v[g+"axis"],p=b.r2fraction(h);if(p<0||p>1){i=!0;break}}i?x.fullLayout._infolayer.select(".annotation-"+x.id+'[data-index="'+n+'"]').remove():(u._pdata=P(x.glplot.cameraParams,[v.xaxis.r2l(u.x)*y[0],v.yaxis.r2l(u.y)*y[1],v.zaxis.r2l(u.z)*y[2]]),d(x.graphDiv,u,n,x.id,u._xa,u._ya))}}},2468:function(z,B,e){var d=e(73972),P=e(71828);z.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:e(26997)}}},layoutAttributes:e(26997),handleDefaults:e(20226),includeBasePlot:a,convert:e(5485),draw:e(82188)};function a(_,x){var v=d.subplotsRegistry.gl3d;if(v)for(var y=v.attrRegex,r=Object.keys(_),n=0;n<r.length;n++){var u=r[n];y.test(u)&&(_[u].annotations||[]).length&&(P.pushUnique(x._basePlotModules,v),P.pushUnique(x._subplots.gl3d,u))}}},7561:function(z,B,e){z.exports=e(63489),e(94338),e(3961),e(38751),e(86825),e(37715),e(99384),e(43805),e(88874),e(83290),e(29108),e(55422),e(94320),e(31320),e(51367),e(21457)},72201:function(z,B,e){var d=e(7561),P=e(71828),a=e(50606),_=a.EPOCHJD,x=a.ONEDAY,v={valType:"enumerated",values:P.sortObjectKeys(d.calendars),editType:"calc",dflt:"gregorian"},y=function(D,A,C,S){var o={};return o[C]=v,P.coerce(D,A,o,C,S)},r=function(D,A,C,S){for(var o=0;o<C.length;o++)y(D,A,C[o]+"calendar",S.calendar)},n={chinese:"2000-01-01",coptic:"2000-01-01",discworld:"2000-01-01",ethiopian:"2000-01-01",hebrew:"5000-01-01",islamic:"1000-01-01",julian:"2000-01-01",mayan:"5000-01-01",nanakshahi:"1000-01-01",nepali:"2000-01-01",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-01",thai:"2000-01-01",ummalqura:"1400-01-01"},u={chinese:"2000-01-02",coptic:"2000-01-03",discworld:"2000-01-03",ethiopian:"2000-01-05",hebrew:"5000-01-01",islamic:"1000-01-02",julian:"2000-01-03",mayan:"5000-01-01",nanakshahi:"1000-01-05",nepali:"2000-01-05",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-04",thai:"2000-01-04",ummalqura:"1400-01-06"},i={chinese:["2000-01-01","2001-01-01"],coptic:["1700-01-01","1701-01-01"],discworld:["1800-01-01","1801-01-01"],ethiopian:["2000-01-01","2001-01-01"],hebrew:["5700-01-01","5701-01-01"],islamic:["1400-01-01","1401-01-01"],julian:["2000-01-01","2001-01-01"],mayan:["5200-01-01","5201-01-01"],nanakshahi:["0500-01-01","0501-01-01"],nepali:["2000-01-01","2001-01-01"],persian:["1400-01-01","1401-01-01"],jalali:["1400-01-01","1401-01-01"],taiwan:["0100-01-01","0101-01-01"],thai:["2500-01-01","2501-01-01"],ummalqura:["1400-01-01","1401-01-01"]},f="##",g={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:f,w:f,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}};function h(D,A,C){for(var S=Math.floor((A+.05)/x)+_,o=p(C).fromJD(S),R=0,T,O,N,H,k;(R=D.indexOf("%",R))!==-1;)T=D.charAt(R+1),T==="0"||T==="-"||T==="_"?(N=3,O=D.charAt(R+2),T==="_"&&(T="-")):(O=T,T="0",N=2),H=g[O],H?(H===f?k=f:k=o.formatDate(H[T]),D=D.substr(0,R)+k+D.substr(R+N),R+=k.length):R+=N;return D}var b={};function p(D){var A=b[D];return A||(A=b[D]=d.instance(D),A)}function E(D){return P.extendFlat({},v,{description:D})}function c(D){return"Sets the calendar system to use with `"+D+"` date data."}var l={xcalendar:E(c("x"))},m=P.extendFlat({},l,{ycalendar:E(c("y"))}),M=P.extendFlat({},m,{zcalendar:E(c("z"))}),L=E(["Sets the calendar system to use for `range` and `tick0`","if this is a date axis. This does not set the calendar for","interpreting data on this axis, that's specified in the trace","or via the global `layout.calendar`"].join(" "));z.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:m,bar:m,box:m,heatmap:m,contour:m,histogram:m,histogram2d:m,histogram2dcontour:m,scatter3d:M,surface:M,mesh3d:M,scattergl:m,ohlc:l,candlestick:l},layout:{calendar:E(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:L},yaxis:{calendar:L},scene:{xaxis:{calendar:L},yaxis:{calendar:L},zaxis:{calendar:L}},polar:{radialaxis:{calendar:L}}},transforms:{filter:{valuecalendar:E(["WARNING: All transforms are deprecated and may be removed from the API in next major version.","Sets the calendar system to use for `value`, if it is a date."].join(" ")),targetcalendar:E(["WARNING: All transforms are deprecated and may be removed from the API in next major version.","Sets the calendar system to use for `target`, if it is an","array of dates. If `target` is a string (eg *x*) we use the","corresponding trace attribute (eg `xcalendar`) if it exists,","even if `targetcalendar` is provided."].join(" "))}}},layoutAttributes:v,handleDefaults:y,handleTraceDefaults:r,CANONICAL_SUNDAY:u,CANONICAL_TICK:n,DFLTRANGE:i,getCal:p,worldCalFmt:h}},22399:function(z,B){B.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],B.defaultLine="#444",B.lightLine="#eee",B.background="#fff",B.borderLine="#BEC8D9",B.lightFraction=90.9090909090909},7901:function(z,B,e){var d=e(84267),P=e(92770),a=e(73627).isTypedArray,_=z.exports={},x=e(22399);_.defaults=x.defaults;var v=_.defaultLine=x.defaultLine;_.lightLine=x.lightLine;var y=_.background=x.background;_.tinyRGB=function(n){var u=n.toRgb();return"rgb("+Math.round(u.r)+", "+Math.round(u.g)+", "+Math.round(u.b)+")"},_.rgb=function(n){return _.tinyRGB(d(n))},_.opacity=function(n){return n?d(n).getAlpha():0},_.addOpacity=function(n,u){var i=d(n).toRgb();return"rgba("+Math.round(i.r)+", "+Math.round(i.g)+", "+Math.round(i.b)+", "+u+")"},_.combine=function(n,u){var i=d(n).toRgb();if(i.a===1)return d(n).toRgbString();var f=d(u||y).toRgb(),g=f.a===1?f:{r:255*(1-f.a)+f.r*f.a,g:255*(1-f.a)+f.g*f.a,b:255*(1-f.a)+f.b*f.a},h={r:g.r*(1-i.a)+i.r*i.a,g:g.g*(1-i.a)+i.g*i.a,b:g.b*(1-i.a)+i.b*i.a};return d(h).toRgbString()},_.contrast=function(n,u,i){var f=d(n);f.getAlpha()!==1&&(f=d(_.combine(n,y)));var g=f.isDark()?u?f.lighten(u):y:i?f.darken(i):v;return g.toString()},_.stroke=function(n,u){var i=d(u);n.style({stroke:_.tinyRGB(i),"stroke-opacity":i.getAlpha()})},_.fill=function(n,u){var i=d(u);n.style({fill:_.tinyRGB(i),"fill-opacity":i.getAlpha()})},_.clean=function(n){if(!(!n||typeof n!="object")){var u=Object.keys(n),i,f,g,h;for(i=0;i<u.length;i++)if(g=u[i],h=n[g],g.substr(g.length-5)==="color")if(Array.isArray(h))for(f=0;f<h.length;f++)h[f]=r(h[f]);else n[g]=r(h);else if(g.substr(g.length-10)==="colorscale"&&Array.isArray(h))for(f=0;f<h.length;f++)Array.isArray(h[f])&&(h[f][1]=r(h[f][1]));else if(Array.isArray(h)){var b=h[0];if(!Array.isArray(b)&&b&&typeof b=="object")for(f=0;f<h.length;f++)_.clean(h[f])}else h&&typeof h=="object"&&!a(h)&&_.clean(h)}};function r(n){if(P(n)||typeof n!="string")return n;var u=n.trim();if(u.substr(0,3)!=="rgb")return n;var i=u.match(/^rgba?\s*\(([^()]*)\)$/);if(!i)return n;var f=i[1].trim().split(/\s*[\s,]\s*/),g=u.charAt(3)==="a"&&f.length===4;if(!g&&f.length!==3)return n;for(var h=0;h<f.length;h++){if(!f[h].length||(f[h]=Number(f[h]),!(f[h]>=0)))return n;if(h===3)f[h]>1&&(f[h]=1);else if(f[h]>=1)return n}var b=Math.round(f[0]*255)+", "+Math.round(f[1]*255)+", "+Math.round(f[2]*255);return g?"rgba("+b+", "+f[3]+")":"rgb("+b+")"}},63583:function(z,B,e){var d=e(13838),P=e(41940),a=e(1426).extendFlat,_=e(30962).overrideAll;z.exports=_({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number",min:-2,max:3},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:d.linecolor,outlinewidth:d.linewidth,bordercolor:d.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:d.minor.tickmode,nticks:d.nticks,tick0:d.tick0,dtick:d.dtick,tickvals:d.tickvals,ticktext:d.ticktext,ticks:a({},d.ticks,{dflt:""}),ticklabeloverflow:a({},d.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:d.ticklen,tickwidth:d.tickwidth,tickcolor:d.tickcolor,ticklabelstep:d.ticklabelstep,showticklabels:d.showticklabels,tickfont:P({}),tickangle:d.tickangle,tickformat:d.tickformat,tickformatstops:d.tickformatstops,tickprefix:d.tickprefix,showtickprefix:d.showtickprefix,ticksuffix:d.ticksuffix,showticksuffix:d.showticksuffix,separatethousands:d.separatethousands,exponentformat:d.exponentformat,minexponent:d.minexponent,showexponent:d.showexponent,title:{text:{valType:"string"},font:P({}),side:{valType:"enumerated",values:["right","top","bottom"]}},_deprecated:{title:{valType:"string"},titlefont:P({}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top"}}},"colorbars","from-root")},30939:function(z){z.exports={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"}}},62499:function(z,B,e){var d=e(71828),P=e(44467),a=e(26218),_=e(38701),x=e(96115),v=e(89426),y=e(63583);z.exports=function(n,u,i){var f=P.newContainer(u,"colorbar"),g=n.colorbar||{};function h(o,R){return d.coerce(g,f,y,o,R)}var b=i.margin||{t:0,b:0,l:0,r:0},p=i.width-b.l-b.r,E=i.height-b.t-b.b,c=h("orientation"),l=c==="v",m=h("thicknessmode");h("thickness",m==="fraction"?30/(l?p:E):30);var M=h("lenmode");h("len",M==="fraction"?1:l?E:p),h("x",l?1.02:.5),h("xanchor",l?"left":"center"),h("xpad"),h("y",l?.5:1.02),h("yanchor",l?"middle":"bottom"),h("ypad"),d.noneOrAll(g,f,["x","y"]),h("outlinecolor"),h("outlinewidth"),h("bordercolor"),h("borderwidth"),h("bgcolor");var L=d.coerce(g,f,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:l?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");h("ticklabeloverflow",L.indexOf("inside")!==-1?"hide past domain":"hide past div"),a(g,f,h,"linear");var D=i.font,A={outerTicks:!1,font:D};L.indexOf("inside")!==-1&&(A.bgColor="black"),v(g,f,h,"linear",A),x(g,f,h,"linear",A),_(g,f,h,"linear",A),h("title.text",i._dfltTitle.colorbar);var C=f.tickfont,S=d.extendFlat({},C,{color:D.color,size:d.bigFont(C.size)});d.coerceFont(h,"title.font",S),h("title.side",l?"top":"right")}},98981:function(z,B,e){var d=e(39898),P=e(84267),a=e(74875),_=e(73972),x=e(89298),v=e(28569),y=e(71828),r=y.strTranslate,n=e(1426).extendFlat,u=e(6964),i=e(91424),f=e(7901),g=e(92998),h=e(63893),b=e(52075).flipScale,p=e(71453),E=e(52830),c=e(13838),l=e(18783),m=l.LINE_SPACING,M=l.FROM_TL,L=l.FROM_BR,D=e(30939).cn;function A(O){var N=O._fullLayout,H=N._infolayer.selectAll("g."+D.colorbar).data(C(O),function(k){return k._id});H.enter().append("g").attr("class",function(k){return k._id}).classed(D.colorbar,!0),H.each(function(k){var V=d.select(this);y.ensureSingle(V,"rect",D.cbbg),y.ensureSingle(V,"g",D.cbfills),y.ensureSingle(V,"g",D.cblines),y.ensureSingle(V,"g",D.cbaxis,function(U){U.classed(D.crisp,!0)}),y.ensureSingle(V,"g",D.cbtitleunshift,function(U){U.append("g").classed(D.cbtitle,!0)}),y.ensureSingle(V,"rect",D.cboutline);var G=S(V,k,O);G&&G.then&&(O._promises||[]).push(G),O._context.edits.colorbarPosition&&o(V,k,O)}),H.exit().each(function(k){a.autoMargin(O,k._id)}).remove(),H.order()}function C(O){var N=O._fullLayout,H=O.calcdata,k=[],V,G,U,Y;function ee(te){return n(te,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function re(){typeof Y.calc=="function"?Y.calc(O,U,V):(V._fillgradient=G.reversescale?b(G.colorscale):G.colorscale,V._zrange=[G[Y.min],G[Y.max]])}for(var ie=0;ie<H.length;ie++){var se=H[ie];U=se[0].trace;var ce=U._module.colorbar;if(U.visible===!0&&ce)for(var q=Array.isArray(ce),j=q?ce:[ce],Z=0;Z<j.length;Z++){Y=j[Z];var Q=Y.container;G=Q?U[Q]:U,G&&G.showscale&&(V=ee(G.colorbar),V._id="cb"+U.uid+(q&&Q?"-"+Q:""),V._traceIndex=U.index,V._propPrefix=(Q?Q+".":"")+"colorbar.",V._meta=U._meta,re(),k.push(V))}}for(var ue in N._colorAxes)if(G=N[ue],G.showscale){var fe=N._colorAxes[ue];V=ee(G.colorbar),V._id="cb"+ue,V._propPrefix=ue+".colorbar.",V._meta=N._meta,Y={min:"cmin",max:"cmax"},fe[0]!=="heatmap"&&(U=fe[1],Y.calc=U._module.colorbar.calc),re(),k.push(V)}return k}function S(O,N,H){var k=N.orientation==="v",V=N.len,G=N.lenmode,U=N.thickness,Y=N.thicknessmode,ee=N.outlinewidth,re=N.borderwidth,ie=N.bgcolor,se=N.xanchor,ce=N.yanchor,q=N.xpad,j=N.ypad,Z=N.x,Q=k?N.y:1-N.y,ue=H._fullLayout,fe=ue._size,te=N._fillcolor,ne=N._line,ve=N.title,le=ve.side,xe=N._zrange||d.extent((typeof te=="function"?te:ne.color).domain()),Se=typeof ne.color=="function"?ne.color:function(){return ne.color},Re=typeof te=="function"?te:function(){return te},Ee=N._levels,Oe=R(H,N,xe),Be=Oe.fill,Le=Oe.line,Te=Math.round(U*(Y==="fraction"?k?fe.w:fe.h:1)),De=Te/(k?fe.w:fe.h),Ve=Math.round(V*(G==="fraction"?k?fe.h:fe.w:1)),Ye=Ve/(k?fe.h:fe.w),Ne=Math.round(k?Z*fe.w+q:Q*fe.h+j),Xe={center:.5,right:1}[se]||0,ht={top:1,middle:.5}[ce]||0,st=k?Z-Xe*De:Q-ht*De,it=k?Q-ht*Ye:Z-Xe*Ye,nt=Math.round(k?fe.h*(1-it):fe.w*it);N._lenFrac=Ye,N._thickFrac=De,N._uFrac=st,N._vFrac=it;var pt=N._axis=T(H,N,xe);pt.position=De+(k?Z+q/fe.w:Q+j/fe.h);var Tt=["top","bottom"].indexOf(le)!==-1;if(k&&Tt&&(pt.title.side=le,pt.titlex=Z+q/fe.w,pt.titley=it+(ve.side==="top"?Ye-j/fe.h:j/fe.h)),!k&&!Tt&&(pt.title.side=le,pt.titley=Q+j/fe.h,pt.titlex=it+q/fe.w),ne.color&&N.tickmode==="auto"){pt.tickmode="linear",pt.tick0=Ee.start;var Et=Ee.size,Dt=y.constrain(Ve/50,4,15)+1,et=(xe[1]-xe[0])/((N.nticks||Dt)*Et);if(et>1){var Ue=Math.pow(10,Math.floor(Math.log(et)/Math.LN10));Et*=Ue*y.roundUp(et/Ue,[2,5,10]),(Math.abs(Ee.start)/Ee.size+1e-6)%1<2e-6&&(pt.tick0=0)}pt.dtick=Et}pt.domain=k?[it+j/fe.h,it+Ye-j/fe.h]:[it+q/fe.w,it+Ye-q/fe.w],pt.setScale(),O.attr("transform",r(Math.round(fe.l),Math.round(fe.t)));var ze=O.select("."+D.cbtitleunshift).attr("transform",r(-Math.round(fe.l),-Math.round(fe.t))),rt=pt.ticklabelposition,lt=pt.title.font.size,Qe=O.select("."+D.cbaxis),Fe,Ce=0,pe=0;function we(tt,ct){var St={propContainer:pt,propName:N._propPrefix+"title",traceIndex:N._traceIndex,_meta:N._meta,placeholder:ue._dfltTitle.colorbar,containerGroup:O.select("."+D.cbtitle)},Pt=tt.charAt(0)==="h"?tt.substr(1):"h"+tt;O.selectAll("."+Pt+",."+Pt+"-math-group").remove(),g.draw(H,tt,n(St,ct||{}))}function Ae(){if(k&&Tt||!k&&!Tt){var tt,ct;le==="top"&&(tt=q+fe.l+fe.w*Z,ct=j+fe.t+fe.h*(1-it-Ye)+3+lt*.75),le==="bottom"&&(tt=q+fe.l+fe.w*Z,ct=j+fe.t+fe.h*(1-it)-3-lt*.25),le==="right"&&(ct=j+fe.t+fe.h*Q+3+lt*.75,tt=q+fe.l+fe.w*it),we(pt._id+"title",{attributes:{x:tt,y:ct,"text-anchor":k?"start":"middle"}})}}function Pe(){if(k&&!Tt||!k&&Tt){var tt=pt.position||0,ct=pt._offset+pt._length/2,St,Pt;if(le==="right")Pt=ct,St=fe.l+fe.w*tt+10+lt*(pt.showticklabels?1:.5);else if(St=ct,le==="bottom"&&(Pt=fe.t+fe.h*tt+10+(rt.indexOf("inside")===-1?pt.tickfont.size:0)+(pt.ticks!=="intside"&&N.ticklen||0)),le==="top"){var wt=ve.text.split("<br>").length;Pt=fe.t+fe.h*tt+10-Te-m*lt*wt}we((k?"h":"v")+pt._id+"title",{avoid:{selection:d.select(H).selectAll("g."+pt._id+"tick"),side:le,offsetTop:k?0:fe.t,offsetLeft:k?fe.l:0,maxShift:k?ue.width:ue.height},attributes:{x:St,y:Pt,"text-anchor":"middle"},transform:{rotate:k?-90:0,offset:0}})}}function Ge(){if(!k&&!Tt||k&&Tt){var tt=O.select("."+D.cbtitle),ct=tt.select("text"),St=[-ee/2,ee/2],Pt=tt.select(".h"+pt._id+"title-math-group").node(),wt=15.6;ct.node()&&(wt=parseInt(ct.node().style.fontSize,10)*m);var Bt;if(Pt?(Bt=i.bBox(Pt),pe=Bt.width,Ce=Bt.height,Ce>wt&&(St[1]-=(Ce-wt)/2)):ct.node()&&!ct.classed(D.jsPlaceholder)&&(Bt=i.bBox(ct.node()),pe=Bt.width,Ce=Bt.height),k){if(Ce){if(Ce+=5,le==="top")pt.domain[1]-=Ce/fe.h,St[1]*=-1;else{pt.domain[0]+=Ce/fe.h;var Wt=h.lineCount(ct);St[1]+=(1-Wt)*wt}tt.attr("transform",r(St[0],St[1])),pt.setScale()}}else pe&&(le==="right"&&(pt.domain[0]+=(pe+lt/2)/fe.w),tt.attr("transform",r(St[0],St[1])),pt.setScale())}O.selectAll("."+D.cbfills+",."+D.cblines).attr("transform",k?r(0,Math.round(fe.h*(1-pt.domain[1]))):r(Math.round(fe.w*pt.domain[0]),0)),Qe.attr("transform",k?r(0,Math.round(-fe.t)):r(Math.round(-fe.l),0));var hr=O.select("."+D.cbfills).selectAll("rect."+D.cbfill).attr("style","").data(Be);hr.enter().append("rect").classed(D.cbfill,!0).style("stroke","none"),hr.exit().remove();var gt=xe.map(pt.c2p).map(Math.round).sort(function(dt,ut){return dt-ut});hr.each(function(dt,ut){var yt=[ut===0?xe[0]:(Be[ut]+Be[ut-1])/2,ut===Be.length-1?xe[1]:(Be[ut]+Be[ut+1])/2].map(pt.c2p).map(Math.round);k&&(yt[1]=y.constrain(yt[1]+(yt[1]>yt[0])?1:-1,gt[0],gt[1]));var Lt=d.select(this).attr(k?"x":"y",Ne).attr(k?"y":"x",d.min(yt)).attr(k?"width":"height",Math.max(Te,2)).attr(k?"height":"width",Math.max(d.max(yt)-d.min(yt),2));if(N._fillgradient)i.gradient(Lt,H,N._id,k?"vertical":"horizontalreversed",N._fillgradient,"fill");else{var Rt=Re(dt).replace("e-","");Lt.attr("fill",P(Rt).toHexString())}});var jt=O.select("."+D.cblines).selectAll("path."+D.cbline).data(ne.color&&ne.width?Le:[]);jt.enter().append("path").classed(D.cbline,!0),jt.exit().remove(),jt.each(function(dt){var ut=Ne,yt=Math.round(pt.c2p(dt))+ne.width/2%1;d.select(this).attr("d","M"+(k?ut+","+yt:yt+","+ut)+(k?"h":"v")+Te).call(i.lineGroupStyle,ne.width,Se(dt),ne.dash)}),Qe.selectAll("g."+pt._id+"tick,path").remove();var Ut=Ne+Te+(ee||0)/2-(N.ticks==="outside"?1:0),or=x.calcTicks(pt),ur=x.getTickSigns(pt)[2];return x.drawTicks(H,pt,{vals:pt.ticks==="inside"?x.clipEnds(pt,or):or,layer:Qe,path:x.makeTickPath(pt,Ut,ur),transFn:x.makeTransTickFn(pt)}),x.drawLabels(H,pt,{vals:or,layer:Qe,transFn:x.makeTransTickLabelFn(pt),labelFns:x.makeLabelFns(pt,Ut)})}function We(){var tt,ct=Te+ee/2;rt.indexOf("inside")===-1&&(tt=i.bBox(Qe.node()),ct+=k?tt.width:tt.height),Fe=ze.select("text");var St=0,Pt=k&&le==="top",wt=!k&&le==="right",Bt=0;if(Fe.node()&&!Fe.classed(D.jsPlaceholder)){var Wt,hr=ze.select(".h"+pt._id+"title-math-group").node();hr&&(k&&Tt||!k&&!Tt)?(tt=i.bBox(hr),St=tt.width,Wt=tt.height):(tt=i.bBox(ze.node()),St=tt.right-fe.l-(k?Ne:nt),Wt=tt.bottom-fe.t-(k?nt:Ne),!k&&le==="top"&&(ct+=tt.height,Bt=tt.height)),wt&&(Fe.attr("transform",r(St/2+lt/2,0)),St*=2),ct=Math.max(ct,k?St:Wt)}var gt=(k?q:j)*2+ct+re+ee/2,jt=0;!k&&ve.text&&ce==="bottom"&&Q<=0&&(jt=gt/2,gt+=jt,Bt+=jt),ue._hColorbarMoveTitle=jt,ue._hColorbarMoveCBTitle=Bt;var Ut=re+ee;O.select("."+D.cbbg).attr("x",(k?Ne:nt)-Ut/2-(k?q:0)).attr("y",(k?nt:Ne)-(k?Ve:j+Bt-jt)).attr(k?"width":"height",Math.max(gt-jt,2)).attr(k?"height":"width",Math.max(Ve+Ut,2)).call(f.fill,ie).call(f.stroke,N.bordercolor).style("stroke-width",re);var or=wt?Math.max(St-10,0):0;if(O.selectAll("."+D.cboutline).attr("x",(k?Ne:nt+q)+or).attr("y",(k?nt+j-Ve:Ne)+(Pt?Ce:0)).attr(k?"width":"height",Math.max(Te,2)).attr(k?"height":"width",Math.max(Ve-(k?2*j+Ce:2*q+or),2)).call(f.stroke,N.outlinecolor).style({fill:"none","stroke-width":ee}),O.attr("transform",r(fe.l-(k?Xe*gt:0),fe.t-(k?0:(1-ht)*gt-Bt))),!k&&(re||P(ie).getAlpha()&&!P.equals(ue.paper_bgcolor,ie))){var ur=Qe.selectAll("text"),dt=ur[0].length,ut=O.select("."+D.cbbg).node(),yt=i.bBox(ut),Lt=i.getTranslate(O),Rt=2;ur.each(function(Mr,Ke){var Ze=0,zt=dt-1;if(Ke===Ze||Ke===zt){var kt=i.bBox(this),Qt=i.getTranslate(this),cr;if(Ke===zt){var fr=kt.right+Qt.x,ir=yt.right+Lt.x+nt-re-Rt+Z;cr=ir-fr,cr>0&&(cr=0)}else if(Ke===Ze){var Yt=kt.left+Qt.x,gr=yt.left+Lt.x+nt+re+Rt;cr=gr-Yt,cr<0&&(cr=0)}cr&&(dt<3?this.setAttribute("transform","translate("+cr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Nt={},Vt=M[se],Zt=L[se],qt=M[ce],Jt=L[ce],nr=gt-Te;k?(G==="pixels"?(Nt.y=Q,Nt.t=Ve*qt,Nt.b=Ve*Jt):(Nt.t=Nt.b=0,Nt.yt=Q+V*qt,Nt.yb=Q-V*Jt),Y==="pixels"?(Nt.x=Z,Nt.l=gt*Vt,Nt.r=gt*Zt):(Nt.l=nr*Vt,Nt.r=nr*Zt,Nt.xl=Z-U*Vt,Nt.xr=Z+U*Zt)):(G==="pixels"?(Nt.x=Z,Nt.l=Ve*Vt,Nt.r=Ve*Zt):(Nt.l=Nt.r=0,Nt.xl=Z+V*Vt,Nt.xr=Z-V*Zt),Y==="pixels"?(Nt.y=1-Q,Nt.t=gt*qt,Nt.b=gt*Jt):(Nt.t=nr*qt,Nt.b=nr*Jt,Nt.yt=Q-U*qt,Nt.yb=Q+U*Jt)),a.autoMargin(H,N._id,Nt)}return y.syncOrAsync([a.previousPromises,Ae,Ge,Pe,a.previousPromises,We],H)}function o(O,N,H){var k=N.orientation==="v",V=H._fullLayout,G=V._size,U,Y,ee;v.init({element:O.node(),gd:H,prepFn:function(){U=O.attr("transform"),u(O)},moveFn:function(re,ie){O.attr("transform",U+r(re,ie)),Y=v.align((k?N._uFrac:N._vFrac)+re/G.w,k?N._thickFrac:N._lenFrac,0,1,N.xanchor),ee=v.align((k?N._vFrac:1-N._uFrac)-ie/G.h,k?N._lenFrac:N._thickFrac,0,1,N.yanchor);var se=v.getCursor(Y,ee,N.xanchor,N.yanchor);u(O,se)},doneFn:function(){if(u(O),Y!==void 0&&ee!==void 0){var re={};re[N._propPrefix+"x"]=Y,re[N._propPrefix+"y"]=ee,N._traceIndex!==void 0?_.call("_guiRestyle",H,re,N._traceIndex):_.call("_guiRelayout",H,re)}}})}function R(O,N,H){var k=N._levels,V=[],G=[],U,Y,ee=k.end+k.size/100,re=k.size,ie=1.001*H[0]-.001*H[1],se=1.001*H[1]-.001*H[0];for(Y=0;Y<1e5&&(U=k.start+Y*re,!(re>0?U>=ee:U<=ee));Y++)U>ie&&U<se&&V.push(U);if(N._fillgradient)G=[0];else if(typeof N._fillcolor=="function"){var ce=N._filllevels;if(ce)for(ee=ce.end+ce.size/100,re=ce.size,Y=0;Y<1e5&&(U=ce.start+Y*re,!(re>0?U>=ee:U<=ee));Y++)U>H[0]&&U<H[1]&&G.push(U);else G=V.map(function(q){return q-k.size/2}),G.push(G[G.length-1]+k.size)}else N._fillcolor&&typeof N._fillcolor=="string"&&(G=[0]);return k.size<0&&(V.reverse(),G.reverse()),{line:V,fill:G}}function T(O,N,H){var k=O._fullLayout,V=N.orientation==="v",G={type:"linear",range:H,tickmode:N.tickmode,nticks:N.nticks,tick0:N.tick0,dtick:N.dtick,tickvals:N.tickvals,ticktext:N.ticktext,ticks:N.ticks,ticklen:N.ticklen,tickwidth:N.tickwidth,tickcolor:N.tickcolor,showticklabels:N.showticklabels,ticklabelposition:N.ticklabelposition,ticklabeloverflow:N.ticklabeloverflow,ticklabelstep:N.ticklabelstep,tickfont:N.tickfont,tickangle:N.tickangle,tickformat:N.tickformat,exponentformat:N.exponentformat,minexponent:N.minexponent,separatethousands:N.separatethousands,showexponent:N.showexponent,showtickprefix:N.showtickprefix,tickprefix:N.tickprefix,showticksuffix:N.showticksuffix,ticksuffix:N.ticksuffix,title:N.title,showline:!0,anchor:"free",side:V?"right":"bottom",position:1},U=V?"y":"x",Y={type:"linear",_id:U+N._id},ee={letter:U,font:k.font,noHover:!0,noTickson:!0,noTicklabelmode:!0,calendar:k.calendar};function re(ie,se){return y.coerce(G,Y,c,ie,se)}return p(G,Y,re,ee,k),E(G,Y,re,ee),Y}z.exports={draw:A}},76228:function(z,B,e){var d=e(71828);z.exports=function(a){return d.isPlainObject(a.colorbar)}},12311:function(z,B,e){z.exports={moduleType:"component",name:"colorbar",attributes:e(63583),supplyDefaults:e(62499),draw:e(98981).draw,hasColorbar:e(76228)}},50693:function(z,B,e){var d=e(63583),P=e(30587).counter,a=e(78607),_=e(63282).scales;a(_),z.exports=function(v,y){v=v||"",y=y||{};var r=y.cLetter||"c";"onlyIfNumerical"in y?y.onlyIfNumerical:Boolean(v);var n="noScale"in y?y.noScale:v==="marker.line",u="showScaleDflt"in y?y.showScaleDflt:r==="z",i=typeof y.colorscaleDflt=="string"?_[y.colorscaleDflt]:null,f=y.editTypeOverride||"",g;"colorAttr"in y?(g=y.colorAttr,y.colorAttr):g={z:"z",c:"color"}[r];var h=r+"auto",b=r+"min",p=r+"max",E=r+"mid",c={};c[b]=c[p]=void 0;var l={};l[h]=!1;var m={};return g==="color"&&(m.color={valType:"color",arrayOk:!0,editType:f||"style"},y.anim&&(m.color.anim=!0)),m[h]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:c},m[b]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:l},m[p]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:l},m[E]={valType:"number",dflt:null,editType:"calc",impliedEdits:c},m.colorscale={valType:"colorscale",editType:"calc",dflt:i,impliedEdits:{autocolorscale:!1}},m.autocolorscale={valType:"boolean",dflt:y.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},m.reversescale={valType:"boolean",dflt:!1,editType:"plot"},n||(m.showscale={valType:"boolean",dflt:u,editType:"calc"},m.colorbar=d),y.noColorAxis||(m.coloraxis={valType:"subplotid",regex:P("coloraxis"),dflt:null,editType:"calc"}),m}},78803:function(z,B,e){var d=e(92770),P=e(71828),a=e(52075).extractOpts;z.exports=function(x,v,y){var r=x._fullLayout,n=y.vals,u=y.containerStr,i=u?P.nestedProperty(v,u).get():v,f=a(i),g=f.auto!==!1,h=f.min,b=f.max,p=f.mid,E=function(){return P.aggNums(Math.min,null,n)},c=function(){return P.aggNums(Math.max,null,n)};if(h===void 0?h=E():g&&(i._colorAx&&d(h)?h=Math.min(h,E()):h=E()),b===void 0?b=c():g&&(i._colorAx&&d(b)?b=Math.max(b,c()):b=c()),g&&p!==void 0&&(b-p>p-h?h=p-(b-p):b-p<p-h&&(b=p+(p-h))),h===b&&(h-=.5,b+=.5),f._sync("min",h),f._sync("max",b),f.autocolorscale){var l;h*b<0?l=r.colorscale.diverging:h>=0?l=r.colorscale.sequential:l=r.colorscale.sequentialminus,f._sync("colorscale",l)}}},33046:function(z,B,e){var d=e(71828),P=e(52075).hasColorscale,a=e(52075).extractOpts;z.exports=function(x,v){function y(h,b){var p=h["_"+b];p!==void 0&&(h[b]=p)}function r(h,b){var p=b.container?d.nestedProperty(h,b.container).get():h;if(p)if(p.coloraxis)p._colorAx=v[p.coloraxis];else{var E=a(p),c=E.auto;(c||E.min===void 0)&&y(p,b.min),(c||E.max===void 0)&&y(p,b.max),E.autocolorscale&&y(p,"colorscale")}}for(var n=0;n<x.length;n++){var u=x[n],i=u._module.colorbar;if(i)if(Array.isArray(i))for(var f=0;f<i.length;f++)r(u,i[f]);else r(u,i);P(u,"marker.line")&&r(u,{container:"marker.line",min:"cmin",max:"cmax"})}for(var g in v._colorAxes)r(v[g],{min:"cmin",max:"cmax"})}},1586:function(z,B,e){var d=e(92770),P=e(71828),a=e(76228),_=e(62499),x=e(63282).isValid,v=e(73972).traceIs;function y(r,n){var u=n.slice(0,n.length-1);return n?P.nestedProperty(r,u).get()||{}:r}z.exports=function r(n,u,i,f,g){var h=g.prefix,b=g.cLetter,p="_module"in u,E=y(n,h),c=y(u,h),l=y(u._template||{},h)||{},m=function(){return delete n.coloraxis,delete u.coloraxis,r(n,u,i,f,g)};if(p){var M=i._colorAxes||{},L=f(h+"coloraxis");if(L){var D=v(u,"contour")&&P.nestedProperty(u,"contours.coloring").get()||"heatmap",A=M[L];A?(A[2].push(m),A[0]!==D&&(A[0]=!1,P.warn(["Ignoring coloraxis:",L,"setting","as it is linked to incompatible colorscales."].join(" ")))):M[L]=[D,u,[m]];return}}var C=E[b+"min"],S=E[b+"max"],o=d(C)&&d(S)&&C<S,R=f(h+b+"auto",!o);R?f(h+b+"mid"):(f(h+b+"min"),f(h+b+"max"));var T=E.colorscale,O=l.colorscale,N;if(T!==void 0&&(N=!x(T)),O!==void 0&&(N=!x(O)),f(h+"autocolorscale",N),f(h+"colorscale"),f(h+"reversescale"),h!=="marker.line."){var H;h&&p&&(H=a(E));var k=f(h+"showscale",H);k&&(h&&l&&(c._template=l),_(E,c,i))}}},52075:function(z,B,e){var d=e(39898),P=e(84267),a=e(92770),_=e(71828),x=e(7901),v=e(63282).isValid;function y(p,E,c){var l=E?_.nestedProperty(p,E).get()||{}:p,m=l[c||"color"],M=!1;if(_.isArrayOrTypedArray(m)){for(var L=0;L<m.length;L++)if(a(m[L])){M=!0;break}}return _.isPlainObject(l)&&(M||l.showscale===!0||a(l.cmin)&&a(l.cmax)||v(l.colorscale)||_.isPlainObject(l.colorbar))}var r=["showscale","autocolorscale","colorscale","reversescale","colorbar"],n=["min","max","mid","auto"];function u(p){var E=p._colorAx,c=E||p,l={},m,M,L;for(M=0;M<r.length;M++)L=r[M],l[L]=c[L];if(E)for(m="c",M=0;M<n.length;M++)L=n[M],l[L]=c["c"+L];else{var D;for(M=0;M<n.length;M++){if(L=n[M],D="c"+L,D in c){l[L]=c[D];continue}D="z"+L,D in c&&(l[L]=c[D])}m=D.charAt(0)}return l._sync=function(A,C){var S=n.indexOf(A)!==-1?m+A:A;c[S]=c["_"+S]=C},l}function i(p){for(var E=u(p),c=E.min,l=E.max,m=E.reversescale?f(E.colorscale):E.colorscale,M=m.length,L=new Array(M),D=new Array(M),A=0;A<M;A++){var C=m[A];L[A]=c+C[0]*(l-c),D[A]=C[1]}return{domain:L,range:D}}function f(p){for(var E=p.length,c=new Array(E),l=E-1,m=0;l>=0;l--,m++){var M=p[l];c[m]=[1-M[0],M[1]]}return c}function g(p,E){E=E||{};for(var c=p.domain,l=p.range,m=l.length,M=new Array(m),L=0;L<m;L++){var D=P(l[L]).toRgb();M[L]=[D.r,D.g,D.b,D.a]}var A=d.scale.linear().domain(c).range(M).clamp(!0),C=E.noNumericCheck,S=E.returnArray,o;return C&&S?o=A:C?o=function(R){return b(A(R))}:S?o=function(R){return a(R)?A(R):P(R).isValid()?R:x.defaultLine}:o=function(R){return a(R)?b(A(R)):P(R).isValid()?R:x.defaultLine},o.domain=A.domain,o.range=function(){return l},o}function h(p,E){return g(i(p),E)}function b(p){var E={r:p[0],g:p[1],b:p[2],a:p[3]};return P(E).toRgbString()}z.exports={hasColorscale:y,extractOpts:u,extractScale:i,flipScale:f,makeColorScaleFunc:g,makeColorScaleFuncFromTrace:h}},21081:function(z,B,e){var d=e(63282),P=e(52075);z.exports={moduleType:"component",name:"colorscale",attributes:e(50693),layoutAttributes:e(72673),supplyLayoutDefaults:e(30959),handleDefaults:e(1586),crossTraceDefaults:e(33046),calc:e(78803),scales:d.scales,defaultScale:d.defaultScale,getScale:d.get,isValidScale:d.isValid,hasColorscale:P.hasColorscale,extractOpts:P.extractOpts,extractScale:P.extractScale,flipScale:P.flipScale,makeColorScaleFunc:P.makeColorScaleFunc,makeColorScaleFuncFromTrace:P.makeColorScaleFuncFromTrace}},72673:function(z,B,e){var d=e(1426).extendFlat,P=e(50693),a=e(63282).scales;z.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:a.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:a.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:a.RdBu,editType:"calc"}},coloraxis:d({_isSubplotObj:!0,editType:"calc"},P("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}},30959:function(z,B,e){var d=e(71828),P=e(44467),a=e(72673),_=e(1586);z.exports=function(v,y){function r(p,E){return d.coerce(v,y,a,p,E)}r("colorscale.sequential"),r("colorscale.sequentialminus"),r("colorscale.diverging");var n=y._colorAxes,u,i;function f(p,E){return d.coerce(u,i,a.coloraxis,p,E)}for(var g in n){var h=n[g];if(h[0])u=v[g]||{},i=P.newContainer(y,g,"coloraxis"),i._name=g,_(u,i,y,f,{prefix:"",cLetter:"c"});else{for(var b=0;b<h[2].length;b++)h[2][b]();delete y._colorAxes[g]}}}},63282:function(z,B,e){var d=e(84267),P={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},a=P.RdBu;function _(y,r){if(r||(r=a),!y)return r;function n(){try{y=P[y]||JSON.parse(y)}catch{y=r}}return typeof y=="string"&&(n(),typeof y=="string"&&n()),x(y)?y:r}function x(y){var r=0;if(!Array.isArray(y)||y.length<2||!y[0]||!y[y.length-1]||+y[0][0]!=0||+y[y.length-1][0]!=1)return!1;for(var n=0;n<y.length;n++){var u=y[n];if(u.length!==2||+u[0]<r||!d(u[1]).isValid())return!1;r=+u[0]}return!0}function v(y){return P[y]!==void 0?!0:x(y)}z.exports={scales:P,defaultScale:a,get:_,isValid:v}},92807:function(z){z.exports=function(e,d,P,a,_){var x=(e-P)/(a-P),v=x+d/(a-P),y=(x+v)/2;return _==="left"||_==="bottom"?x:_==="center"||_==="middle"?y:_==="right"||_==="top"?v:x<.6666666666666666-y?x:v>1.3333333333333333-y?v:y}},70461:function(z,B,e){var d=e(71828),P=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];z.exports=function(_,x,v,y){return v==="left"?_=0:v==="center"?_=1:v==="right"?_=2:_=d.constrain(Math.floor(_*3),0,2),y==="bottom"?x=0:y==="middle"?x=1:y==="top"?x=2:x=d.constrain(Math.floor(x*3),0,2),P[x][_]}},64505:function(z,B){B.selectMode=function(e){return e==="lasso"||e==="select"},B.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"},B.openMode=function(e){return e==="drawline"||e==="drawopenpath"},B.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"},B.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"},B.selectingOrDrawing=function(e){return B.freeMode(e)||B.rectMode(e)}},28569:function(z,B,e){var d=e(48956),P=e(57035),a=e(38520),_=e(71828).removeElement,x=e(85555),v=z.exports={};v.align=e(92807),v.getCursor=e(70461);var y=e(26041);v.unhover=y.wrapped,v.unhoverRaw=y.raw,v.init=function(i){var f=i.gd,g=1,h=f._context.doubleClickDelay,b=i.element,p,E,c,l,m,M,L,D;f._mouseDownTime||(f._mouseDownTime=0),b.style.pointerEvents="all",b.onmousedown=S,a?(b._ontouchstart&&b.removeEventListener("touchstart",b._ontouchstart),b._ontouchstart=S,b.addEventListener("touchstart",S,{passive:!1})):b.ontouchstart=S;function A(T,O,N){return Math.abs(T)<N&&(T=0),Math.abs(O)<N&&(O=0),[T,O]}var C=i.clampFn||A;function S(T){f._dragged=!1,f._dragging=!0;var O=n(T);p=O[0],E=O[1],L=T.target,M=T,D=T.buttons===2||T.ctrlKey,typeof T.clientX>"u"&&typeof T.clientY>"u"&&(T.clientX=p,T.clientY=E),c=new Date().getTime(),c-f._mouseDownTime<h?g+=1:(g=1,f._mouseDownTime=c),i.prepFn&&i.prepFn(T,p,E),P&&!D?(m=r(),m.style.cursor=window.getComputedStyle(b).cursor):P||(m=document,l=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(b).cursor),document.addEventListener("mouseup",R),document.addEventListener("touchend",R),i.dragmode!==!1&&(T.preventDefault(),document.addEventListener("mousemove",o),document.addEventListener("touchmove",o,{passive:!1}))}function o(T){T.preventDefault();var O=n(T),N=i.minDrag||x.MINDRAG,H=C(O[0]-p,O[1]-E,N),k=H[0],V=H[1];(k||V)&&(f._dragged=!0,v.unhover(f,T)),f._dragged&&i.moveFn&&!D&&(f._dragdata={element:b,dx:k,dy:V},i.moveFn(k,V))}function R(T){if(delete f._dragdata,i.dragmode!==!1&&(T.preventDefault(),document.removeEventListener("mousemove",o),document.removeEventListener("touchmove",o)),document.removeEventListener("mouseup",R),document.removeEventListener("touchend",R),P?_(m):l&&(m.documentElement.style.cursor=l,l=null),!f._dragging){f._dragged=!1;return}if(f._dragging=!1,new Date().getTime()-f._mouseDownTime>h&&(g=Math.max(g-1,1)),f._dragged)i.doneFn&&i.doneFn();else if(i.clickFn&&i.clickFn(g,M),!D){var O;try{O=new MouseEvent("click",T)}catch{var N=n(T);O=document.createEvent("MouseEvents"),O.initMouseEvent("click",T.bubbles,T.cancelable,T.view,T.detail,T.screenX,T.screenY,N[0],N[1],T.ctrlKey,T.altKey,T.shiftKey,T.metaKey,T.button,T.relatedTarget)}L.dispatchEvent(O)}f._dragging=!1,f._dragged=!1}};function r(){var u=document.createElement("div");u.className="dragcover";var i=u.style;return i.position="fixed",i.left=0,i.right=0,i.top=0,i.bottom=0,i.zIndex=999999999,i.background="none",document.body.appendChild(u),u}v.coverSlip=r;function n(u){return d(u.changedTouches?u.changedTouches[0]:u,document.body)}},26041:function(z,B,e){var d=e(11086),P=e(79990),a=e(24401).getGraphDiv,_=e(26675),x=z.exports={};x.wrapped=function(v,y,r){v=a(v),v._fullLayout&&P.clear(v._fullLayout._uid+_.HOVERID),x.raw(v,y,r)},x.raw=function(y,r){var n=y._fullLayout,u=y._hoverdata;r||(r={}),!(r.target&&!y._dragged&&d.triggerHandler(y,"plotly_beforehover",r)===!1)&&(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),y._hoverdata=void 0,r.target&&u&&y.emit("plotly_unhover",{event:r,points:u}))}},79952:function(z,B){B.P={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},B.u={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},91424:function(z,B,e){var d=e(39898),P=e(71828),a=P.numberFormat,_=e(92770),x=e(84267),v=e(73972),y=e(7901),r=e(21081),n=P.strTranslate,u=e(63893),i=e(77922),f=e(18783),g=f.LINE_SPACING,h=e(37822).DESELECTDIM,b=e(34098),p=e(39984),E=e(23469).appendArrayPointValue,c=z.exports={};c.font=function(Le,Te,De,Ve){P.isPlainObject(Te)&&(Ve=Te.color,De=Te.size,Te=Te.family),Te&&Le.style("font-family",Te),De+1&&Le.style("font-size",De+"px"),Ve&&Le.call(y.fill,Ve)},c.setPosition=function(Le,Te,De){Le.attr("x",Te).attr("y",De)},c.setSize=function(Le,Te,De){Le.attr("width",Te).attr("height",De)},c.setRect=function(Le,Te,De,Ve,Ye){Le.call(c.setPosition,Te,De).call(c.setSize,Ve,Ye)},c.translatePoint=function(Le,Te,De,Ve){var Ye=De.c2p(Le.x),Ne=Ve.c2p(Le.y);if(_(Ye)&&_(Ne)&&Te.node())Te.node().nodeName==="text"?Te.attr("x",Ye).attr("y",Ne):Te.attr("transform",n(Ye,Ne));else return!1;return!0},c.translatePoints=function(Le,Te,De){Le.each(function(Ve){var Ye=d.select(this);c.translatePoint(Ve,Ye,Te,De)})},c.hideOutsideRangePoint=function(Le,Te,De,Ve,Ye,Ne){Te.attr("display",De.isPtWithinRange(Le,Ye)&&Ve.isPtWithinRange(Le,Ne)?null:"none")},c.hideOutsideRangePoints=function(Le,Te){if(Te._hasClipOnAxisFalse){var De=Te.xaxis,Ve=Te.yaxis;Le.each(function(Ye){var Ne=Ye[0].trace,Xe=Ne.xcalendar,ht=Ne.ycalendar,st=v.traceIs(Ne,"bar-like")?".bartext":".point,.textpoint";Le.selectAll(st).each(function(it){c.hideOutsideRangePoint(it,d.select(this),De,Ve,Xe,ht)})})}},c.crispRound=function(Le,Te,De){return!Te||!_(Te)?De||0:Le._context.staticPlot?Te:Te<1?1:Math.round(Te)},c.singleLineStyle=function(Le,Te,De,Ve,Ye){Te.style("fill","none");var Ne=(((Le||[])[0]||{}).trace||{}).line||{},Xe=De||Ne.width||0,ht=Ye||Ne.dash||"";y.stroke(Te,Ve||Ne.color),c.dashLine(Te,ht,Xe)},c.lineGroupStyle=function(Le,Te,De,Ve){Le.style("fill","none").each(function(Ye){var Ne=(((Ye||[])[0]||{}).trace||{}).line||{},Xe=Te||Ne.width||0,ht=Ve||Ne.dash||"";d.select(this).call(y.stroke,De||Ne.color).call(c.dashLine,ht,Xe)})},c.dashLine=function(Le,Te,De){De=+De||0,Te=c.dashStyle(Te,De),Le.style({"stroke-dasharray":Te,"stroke-width":De+"px"})},c.dashStyle=function(Le,Te){Te=+Te||1;var De=Math.max(Te,3);return Le==="solid"?Le="":Le==="dot"?Le=De+"px,"+De+"px":Le==="dash"?Le=3*De+"px,"+3*De+"px":Le==="longdash"?Le=5*De+"px,"+5*De+"px":Le==="dashdot"?Le=3*De+"px,"+De+"px,"+De+"px,"+De+"px":Le==="longdashdot"&&(Le=5*De+"px,"+2*De+"px,"+De+"px,"+2*De+"px"),Le};function l(Le,Te,De){var Ve=Te.fillpattern,Ye=Ve&&c.getPatternAttr(Ve.shape,0,"");if(Ye){var Ne=c.getPatternAttr(Ve.bgcolor,0,null),Xe=c.getPatternAttr(Ve.fgcolor,0,null),ht=Ve.fgopacity,st=c.getPatternAttr(Ve.size,0,8),it=c.getPatternAttr(Ve.solidity,0,.3),nt=Te.uid;c.pattern(Le,"point",De,nt,Ye,st,it,void 0,Ve.fillmode,Ne,Xe,ht)}else Te.fillcolor&&Le.call(y.fill,Te.fillcolor)}c.singleFillStyle=function(Le,Te){var De=d.select(Le.node()),Ve=De.data(),Ye=((Ve[0]||[])[0]||{}).trace||{};l(Le,Ye,Te)},c.fillGroupStyle=function(Le,Te){Le.style("stroke-width",0).each(function(De){var Ve=d.select(this);De[0].trace&&l(Ve,De[0].trace,Te)})};var m=e(90998);c.symbolNames=[],c.symbolFuncs=[],c.symbolBackOffs=[],c.symbolNeedLines={},c.symbolNoDot={},c.symbolNoFill={},c.symbolList=[],Object.keys(m).forEach(function(Le){var Te=m[Le],De=Te.n;c.symbolList.push(De,String(De),Le,De+100,String(De+100),Le+"-open"),c.symbolNames[De]=Le,c.symbolFuncs[De]=Te.f,c.symbolBackOffs[De]=Te.backoff||0,Te.needLine&&(c.symbolNeedLines[De]=!0),Te.noDot?c.symbolNoDot[De]=!0:c.symbolList.push(De+200,String(De+200),Le+"-dot",De+300,String(De+300),Le+"-open-dot"),Te.noFill&&(c.symbolNoFill[De]=!0)});var M=c.symbolNames.length,L="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";c.symbolNumber=function(Le){if(_(Le))Le=+Le;else if(typeof Le=="string"){var Te=0;Le.indexOf("-open")>0&&(Te=100,Le=Le.replace("-open","")),Le.indexOf("-dot")>0&&(Te+=200,Le=Le.replace("-dot","")),Le=c.symbolNames.indexOf(Le),Le>=0&&(Le+=Te)}return Le%100>=M||Le>=400?0:Math.floor(Math.max(Le,0))};function D(Le,Te,De,Ve){var Ye=Le%100;return c.symbolFuncs[Ye](Te,De,Ve)+(Le>=200?L:"")}var A={x1:1,x2:0,y1:0,y2:0},C={x1:0,x2:0,y1:1,y2:0},S=a("~f"),o={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:A},horizontalreversed:{node:"linearGradient",attrs:A,reversed:!0},vertical:{node:"linearGradient",attrs:C},verticalreversed:{node:"linearGradient",attrs:C,reversed:!0}};c.gradient=function(Le,Te,De,Ve,Ye,Ne){for(var Xe=Ye.length,ht=o[Ve],st=new Array(Xe),it=0;it<Xe;it++)ht.reversed?st[Xe-1-it]=[S((1-Ye[it][0])*100),Ye[it][1]]:st[it]=[S(Ye[it][0]*100),Ye[it][1]];var nt=Te._fullLayout,pt="g"+nt._uid+"-"+De,Tt=nt._defs.select(".gradients").selectAll("#"+pt).data([Ve+st.join(";")],P.identity);Tt.exit().remove(),Tt.enter().append(ht.node).each(function(){var Et=d.select(this);ht.attrs&&Et.attr(ht.attrs),Et.attr("id",pt);var Dt=Et.selectAll("stop").data(st);Dt.exit().remove(),Dt.enter().append("stop"),Dt.each(function(et){var Ue=x(et[1]);d.select(this).attr({offset:et[0]+"%","stop-color":y.tinyRGB(Ue),"stop-opacity":Ue.getAlpha()})})}),Le.style(Ne,j(pt,Te)).style(Ne+"-opacity",null),Le.classed("gradient_filled",!0)},c.pattern=function(Le,Te,De,Ve,Ye,Ne,Xe,ht,st,it,nt,pt){var Tt=Te==="legend";ht&&(st==="overlay"?(it=ht,nt=y.contrast(it)):(it=void 0,nt=ht));var Et=De._fullLayout,Dt="p"+Et._uid+"-"+Ve,et,Ue,ze=function(tt,ct,St,Pt,wt){return Pt+(wt-Pt)*(tt-ct)/(St-ct)},rt,lt,Qe,Fe,Ce={},pe=x(nt),we=y.tinyRGB(pe),Ae=pe.getAlpha(),Pe=pt*Ae;switch(Ye){case"/":et=Ne*Math.sqrt(2),Ue=Ne*Math.sqrt(2),rt="M-"+et/4+","+Ue/4+"l"+et/2+",-"+Ue/2+"M0,"+Ue+"L"+et+",0M"+et/4*3+","+Ue/4*5+"l"+et/2+",-"+Ue/2,lt=Xe*Ne,Fe="path",Ce={d:rt,opacity:Pe,stroke:we,"stroke-width":lt+"px"};break;case"\\":et=Ne*Math.sqrt(2),Ue=Ne*Math.sqrt(2),rt="M"+et/4*3+",-"+Ue/4+"l"+et/2+","+Ue/2+"M0,0L"+et+","+Ue+"M-"+et/4+","+Ue/4*3+"l"+et/2+","+Ue/2,lt=Xe*Ne,Fe="path",Ce={d:rt,opacity:Pe,stroke:we,"stroke-width":lt+"px"};break;case"x":et=Ne*Math.sqrt(2),Ue=Ne*Math.sqrt(2),rt="M-"+et/4+","+Ue/4+"l"+et/2+",-"+Ue/2+"M0,"+Ue+"L"+et+",0M"+et/4*3+","+Ue/4*5+"l"+et/2+",-"+Ue/2+"M"+et/4*3+",-"+Ue/4+"l"+et/2+","+Ue/2+"M0,0L"+et+","+Ue+"M-"+et/4+","+Ue/4*3+"l"+et/2+","+Ue/2,lt=Ne-Ne*Math.sqrt(1-Xe),Fe="path",Ce={d:rt,opacity:Pe,stroke:we,"stroke-width":lt+"px"};break;case"|":et=Ne,Ue=Ne,Fe="path",rt="M"+et/2+",0L"+et/2+","+Ue,lt=Xe*Ne,Fe="path",Ce={d:rt,opacity:Pe,stroke:we,"stroke-width":lt+"px"};break;case"-":et=Ne,Ue=Ne,Fe="path",rt="M0,"+Ue/2+"L"+et+","+Ue/2,lt=Xe*Ne,Fe="path",Ce={d:rt,opacity:Pe,stroke:we,"stroke-width":lt+"px"};break;case"+":et=Ne,Ue=Ne,Fe="path",rt="M"+et/2+",0L"+et/2+","+Ue+"M0,"+Ue/2+"L"+et+","+Ue/2,lt=Ne-Ne*Math.sqrt(1-Xe),Fe="path",Ce={d:rt,opacity:Pe,stroke:we,"stroke-width":lt+"px"};break;case".":et=Ne,Ue=Ne,Xe<Math.PI/4?Qe=Math.sqrt(Xe*Ne*Ne/Math.PI):Qe=ze(Xe,Math.PI/4,1,Ne/2,Ne/Math.sqrt(2)),Fe="circle",Ce={cx:et/2,cy:Ue/2,r:Qe,opacity:Pe,fill:we};break}var Ge=[Ye||"noSh",it||"noBg",nt||"noFg",Ne,Xe].join(";"),We=Et._defs.select(".patterns").selectAll("#"+Dt).data([Ge],P.identity);We.exit().remove(),We.enter().append("pattern").each(function(){var tt=d.select(this);if(tt.attr({id:Dt,width:et+"px",height:Ue+"px",patternUnits:"userSpaceOnUse",patternTransform:Tt?"scale(0.8)":""}),it){var ct=x(it),St=y.tinyRGB(ct),Pt=ct.getAlpha(),wt=tt.selectAll("rect").data([0]);wt.exit().remove(),wt.enter().append("rect").attr({width:et+"px",height:Ue+"px",fill:St,"fill-opacity":Pt})}var Bt=tt.selectAll(Fe).data([0]);Bt.exit().remove(),Bt.enter().append(Fe).attr(Ce)}),Le.style("fill",j(Dt,De)).style("fill-opacity",null),Le.classed("pattern_filled",!0)},c.initGradients=function(Le){var Te=Le._fullLayout,De=P.ensureSingle(Te._defs,"g","gradients");De.selectAll("linearGradient,radialGradient").remove(),d.select(Le).selectAll(".gradient_filled").classed("gradient_filled",!1)},c.initPatterns=function(Le){var Te=Le._fullLayout,De=P.ensureSingle(Te._defs,"g","patterns");De.selectAll("pattern").remove(),d.select(Le).selectAll(".pattern_filled").classed("pattern_filled",!1)},c.getPatternAttr=function(Le,Te,De){return Le&&P.isArrayOrTypedArray(Le)?Te<Le.length?Le[Te]:De:Le},c.pointStyle=function(Le,Te,De){if(Le.size()){var Ve=c.makePointStyleFns(Te);Le.each(function(Ye){c.singlePointStyle(Ye,d.select(this),Te,Ve,De)})}},c.singlePointStyle=function(Le,Te,De,Ve,Ye){var Ne=De.marker,Xe=Ne.line;if(Te.style("opacity",Ve.selectedOpacityFn?Ve.selectedOpacityFn(Le):Le.mo===void 0?Ne.opacity:Le.mo),Ve.ms2mrc){var ht;Le.ms==="various"||Ne.size==="various"?ht=3:ht=Ve.ms2mrc(Le.ms),Le.mrc=ht,Ve.selectedSizeFn&&(ht=Le.mrc=Ve.selectedSizeFn(Le));var st=c.symbolNumber(Le.mx||Ne.symbol)||0;Le.om=st%200>=100;var it=Be(Le,De),nt=ue(Le,De);Te.attr("d",D(st,ht,it,nt))}var pt=!1,Tt,Et,Dt;if(Le.so)Dt=Xe.outlierwidth,Et=Xe.outliercolor,Tt=Ne.outliercolor;else{var et=(Xe||{}).width;Dt=(Le.mlw+1||et+1||(Le.trace?(Le.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in Le?Et=Le.mlcc=Ve.lineScale(Le.mlc):P.isArrayOrTypedArray(Xe.color)?Et=y.defaultLine:Et=Xe.color,P.isArrayOrTypedArray(Ne.color)&&(Tt=y.defaultLine,pt=!0),"mc"in Le?Tt=Le.mcc=Ve.markerScale(Le.mc):Tt=Ne.color||"rgba(0,0,0,0)",Ve.selectedColorFn&&(Tt=Ve.selectedColorFn(Le))}if(Le.om)Te.call(y.stroke,Tt).style({"stroke-width":(Dt||1)+"px",fill:"none"});else{Te.style("stroke-width",(Le.isBlank?0:Dt)+"px");var Ue=Ne.gradient,ze=Le.mgt;ze?pt=!0:ze=Ue&&Ue.type,P.isArrayOrTypedArray(ze)&&(ze=ze[0],o[ze]||(ze=0));var rt=Ne.pattern,lt=rt&&c.getPatternAttr(rt.shape,Le.i,"");if(ze&&ze!=="none"){var Qe=Le.mgc;Qe?pt=!0:Qe=Ue.color;var Fe=De.uid;pt&&(Fe+="-"+Le.i),c.gradient(Te,Ye,Fe,ze,[[0,Qe],[1,Tt]],"fill")}else if(lt){var Ce=c.getPatternAttr(rt.bgcolor,Le.i,null),pe=c.getPatternAttr(rt.fgcolor,Le.i,null),we=rt.fgopacity,Ae=c.getPatternAttr(rt.size,Le.i,8),Pe=c.getPatternAttr(rt.solidity,Le.i,.3),Ge=Le.mcc||P.isArrayOrTypedArray(rt.shape)||P.isArrayOrTypedArray(rt.bgcolor)||P.isArrayOrTypedArray(rt.size)||P.isArrayOrTypedArray(rt.solidity),We=De.uid;Ge&&(We+="-"+Le.i),c.pattern(Te,"point",Ye,We,lt,Ae,Pe,Le.mcc,rt.fillmode,Ce,pe,we)}else y.fill(Te,Tt);Dt&&y.stroke(Te,Et)}},c.makePointStyleFns=function(Le){var Te={},De=Le.marker;return Te.markerScale=c.tryColorscale(De,""),Te.lineScale=c.tryColorscale(De,"line"),v.traceIs(Le,"symbols")&&(Te.ms2mrc=b.isBubble(Le)?p(Le):function(){return(De.size||6)/2}),Le.selectedpoints&&P.extendFlat(Te,c.makeSelectedPointStyleFns(Le)),Te},c.makeSelectedPointStyleFns=function(Le){var Te={},De=Le.selected||{},Ve=Le.unselected||{},Ye=Le.marker||{},Ne=De.marker||{},Xe=Ve.marker||{},ht=Ye.opacity,st=Ne.opacity,it=Xe.opacity,nt=st!==void 0,pt=it!==void 0;(P.isArrayOrTypedArray(ht)||nt||pt)&&(Te.selectedOpacityFn=function(Qe){var Fe=Qe.mo===void 0?Ye.opacity:Qe.mo;return Qe.selected?nt?st:Fe:pt?it:h*Fe});var Tt=Ye.color,Et=Ne.color,Dt=Xe.color;(Et||Dt)&&(Te.selectedColorFn=function(Qe){var Fe=Qe.mcc||Tt;return Qe.selected?Et||Fe:Dt||Fe});var et=Ye.size,Ue=Ne.size,ze=Xe.size,rt=Ue!==void 0,lt=ze!==void 0;return v.traceIs(Le,"symbols")&&(rt||lt)&&(Te.selectedSizeFn=function(Qe){var Fe=Qe.mrc||et/2;return Qe.selected?rt?Ue/2:Fe:lt?ze/2:Fe}),Te},c.makeSelectedTextStyleFns=function(Le){var Te={},De=Le.selected||{},Ve=Le.unselected||{},Ye=Le.textfont||{},Ne=De.textfont||{},Xe=Ve.textfont||{},ht=Ye.color,st=Ne.color,it=Xe.color;return Te.selectedTextColorFn=function(nt){var pt=nt.tc||ht;return nt.selected?st||pt:it||(st?pt:y.addOpacity(pt,h))},Te},c.selectedPointStyle=function(Le,Te){if(!(!Le.size()||!Te.selectedpoints)){var De=c.makeSelectedPointStyleFns(Te),Ve=Te.marker||{},Ye=[];De.selectedOpacityFn&&Ye.push(function(Ne,Xe){Ne.style("opacity",De.selectedOpacityFn(Xe))}),De.selectedColorFn&&Ye.push(function(Ne,Xe){y.fill(Ne,De.selectedColorFn(Xe))}),De.selectedSizeFn&&Ye.push(function(Ne,Xe){var ht=Xe.mx||Ve.symbol||0,st=De.selectedSizeFn(Xe);Ne.attr("d",D(c.symbolNumber(ht),st,Be(Xe,Te),ue(Xe,Te))),Xe.mrc2=st}),Ye.length&&Le.each(function(Ne){for(var Xe=d.select(this),ht=0;ht<Ye.length;ht++)Ye[ht](Xe,Ne)})}},c.tryColorscale=function(Le,Te){var De=Te?P.nestedProperty(Le,Te).get():Le;if(De){var Ve=De.color;if((De.colorscale||De._colorAx)&&P.isArrayOrTypedArray(Ve))return r.makeColorScaleFuncFromTrace(De)}return P.identity};var R={start:1,end:-1,middle:0,bottom:1,top:-1};function T(Le,Te,De,Ve,Ye){var Ne=d.select(Le.node().parentNode),Xe=Te.indexOf("top")!==-1?"top":Te.indexOf("bottom")!==-1?"bottom":"middle",ht=Te.indexOf("left")!==-1?"end":Te.indexOf("right")!==-1?"start":"middle",st=Ve?Ve/.8+1:0,it=(u.lineCount(Le)-1)*g+1,nt=R[ht]*st,pt=De*.75+R[Xe]*st+(R[Xe]-1)*it*De/2;Le.attr("text-anchor",ht),Ye||Ne.attr("transform",n(nt,pt))}function O(Le,Te){var De=Le.ts||Te.textfont.size;return _(De)&&De>0?De:0}c.textPointStyle=function(Le,Te,De){if(Le.size()){var Ve;if(Te.selectedpoints){var Ye=c.makeSelectedTextStyleFns(Te);Ve=Ye.selectedTextColorFn}var Ne=Te.texttemplate,Xe=De._fullLayout;Le.each(function(ht){var st=d.select(this),it=Ne?P.extractOption(ht,Te,"txt","texttemplate"):P.extractOption(ht,Te,"tx","text");if(!it&&it!==0){st.remove();return}if(Ne){var nt=Te._module.formatLabels,pt=nt?nt(ht,Te,Xe):{},Tt={};E(Tt,Te,ht.i);var Et=Te._meta||{};it=P.texttemplateString(it,pt,Xe._d3locale,Tt,ht,Et)}var Dt=ht.tp||Te.textposition,et=O(ht,Te),Ue=Ve?Ve(ht):ht.tc||Te.textfont.color;st.call(c.font,ht.tf||Te.textfont.family,et,Ue).text(it).call(u.convertToTspans,De).call(T,Dt,et,ht.mrc)})}},c.selectedTextStyle=function(Le,Te){if(!(!Le.size()||!Te.selectedpoints)){var De=c.makeSelectedTextStyleFns(Te);Le.each(function(Ve){var Ye=d.select(this),Ne=De.selectedTextColorFn(Ve),Xe=Ve.tp||Te.textposition,ht=O(Ve,Te);y.fill(Ye,Ne);var st=v.traceIs(Te,"bar-like");T(Ye,Xe,ht,Ve.mrc2||Ve.mrc,st)})}};var N=.5;c.smoothopen=function(Le,Te){if(Le.length<3)return"M"+Le.join("L");var De="M"+Le[0],Ve=[],Ye;for(Ye=1;Ye<Le.length-1;Ye++)Ve.push(Y(Le[Ye-1],Le[Ye],Le[Ye+1],Te));for(De+="Q"+Ve[0][0]+" "+Le[1],Ye=2;Ye<Le.length-1;Ye++)De+="C"+Ve[Ye-2][1]+" "+Ve[Ye-1][0]+" "+Le[Ye];return De+="Q"+Ve[Le.length-3][1]+" "+Le[Le.length-1],De},c.smoothclosed=function(Le,Te){if(Le.length<3)return"M"+Le.join("L")+"Z";var De="M"+Le[0],Ve=Le.length-1,Ye=[Y(Le[Ve],Le[0],Le[1],Te)],Ne;for(Ne=1;Ne<Ve;Ne++)Ye.push(Y(Le[Ne-1],Le[Ne],Le[Ne+1],Te));for(Ye.push(Y(Le[Ve-1],Le[Ve],Le[0],Te)),Ne=1;Ne<=Ve;Ne++)De+="C"+Ye[Ne-1][1]+" "+Ye[Ne][0]+" "+Le[Ne];return De+="C"+Ye[Ve][1]+" "+Ye[0][0]+" "+Le[0]+"Z",De};var H,k;function V(Le,Te,De){return De&&(Le=ie(Le)),Te?U(Le[1]):G(Le[0])}function G(Le){var Te=d.round(Le,2);return H=Te,Te}function U(Le){var Te=d.round(Le,2);return k=Te,Te}function Y(Le,Te,De,Ve){var Ye=Le[0]-Te[0],Ne=Le[1]-Te[1],Xe=De[0]-Te[0],ht=De[1]-Te[1],st=Math.pow(Ye*Ye+Ne*Ne,N/2),it=Math.pow(Xe*Xe+ht*ht,N/2),nt=(it*it*Ye-st*st*Xe)*Ve,pt=(it*it*Ne-st*st*ht)*Ve,Tt=3*it*(st+it),Et=3*st*(st+it);return[[G(Te[0]+(Tt&&nt/Tt)),U(Te[1]+(Tt&&pt/Tt))],[G(Te[0]-(Et&&nt/Et)),U(Te[1]-(Et&&pt/Et))]]}var ee={hv:function(Le,Te,De){return"H"+G(Te[0])+"V"+V(Te,1,De)},vh:function(Le,Te,De){return"V"+U(Te[1])+"H"+V(Te,0,De)},hvh:function(Le,Te,De){return"H"+G((Le[0]+Te[0])/2)+"V"+U(Te[1])+"H"+V(Te,0,De)},vhv:function(Le,Te,De){return"V"+U((Le[1]+Te[1])/2)+"H"+G(Te[0])+"V"+V(Te,1,De)}},re=function(Le,Te,De){return"L"+V(Te,0,De)+","+V(Te,1,De)};c.steps=function(Le){var Te=ee[Le]||re;return function(De){for(var Ve="M"+G(De[0][0])+","+U(De[0][1]),Ye=De.length,Ne=1;Ne<Ye;Ne++)Ve+=Te(De[Ne-1],De[Ne],Ne===Ye-1);return Ve}};function ie(Le,Te){var De=Le.backoff,Ve=Le.trace,Ye=Le.d,Ne=Le.i;if(De&&Ve&&Ve.marker&&Ve.marker.angle%360===0&&Ve.line&&Ve.line.shape!=="spline"){var Xe=P.isArrayOrTypedArray(De),ht=Le,st=Te?Te[0]:H||0,it=Te?Te[1]:k||0,nt=ht[0],pt=ht[1],Tt=nt-st,Et=pt-it,Dt=Math.atan2(Et,Tt),et=Xe?De[Ne]:De;if(et==="auto"){var Ue=ht.i;Ve.type==="scatter"&&Ue--;var ze=ht.marker,rt=ze.symbol;P.isArrayOrTypedArray(rt)&&(rt=rt[Ue]);var lt=ze.size;P.isArrayOrTypedArray(lt)&&(lt=lt[Ue]),et=ze?c.symbolBackOffs[c.symbolNumber(rt)]*lt:0,et+=c.getMarkerStandoff(Ye[Ue],Ve)||0}var Qe=nt-et*Math.cos(Dt),Fe=pt-et*Math.sin(Dt);(Qe<=nt&&Qe>=st||Qe>=nt&&Qe<=st)&&(Fe<=pt&&Fe>=it||Fe>=pt&&Fe<=it)&&(Le=[Qe,Fe])}return Le}c.applyBackoff=ie,c.makeTester=function(){var Le=P.ensureSingleById(d.select("body"),"svg","js-plotly-tester",function(De){De.attr(i.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),Te=P.ensureSingle(Le,"path","js-reference-point",function(De){De.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});c.tester=Le,c.testref=Te},c.savedBBoxes={};var se=0,ce=1e4;c.bBox=function(Le,Te,De){De||(De=q(Le));var Ve;if(De){if(Ve=c.savedBBoxes[De],Ve)return P.extendFlat({},Ve)}else if(Le.childNodes.length===1){var Ye=Le.childNodes[0];if(De=q(Ye),De){var Ne=+Ye.getAttribute("x")||0,Xe=+Ye.getAttribute("y")||0,ht=Ye.getAttribute("transform");if(!ht){var st=c.bBox(Ye,!1,De);return Ne&&(st.left+=Ne,st.right+=Ne),Xe&&(st.top+=Xe,st.bottom+=Xe),st}if(De+="~"+Ne+"~"+Xe+"~"+ht,Ve=c.savedBBoxes[De],Ve)return P.extendFlat({},Ve)}}var it,nt;Te?it=Le:(nt=c.tester.node(),it=Le.cloneNode(!0),nt.appendChild(it)),d.select(it).attr("transform",null).call(u.positionText,0,0);var pt=it.getBoundingClientRect(),Tt=c.testref.node().getBoundingClientRect();Te||nt.removeChild(it);var Et={height:pt.height,width:pt.width,left:pt.left-Tt.left,top:pt.top-Tt.top,right:pt.right-Tt.left,bottom:pt.bottom-Tt.top};return se>=ce&&(c.savedBBoxes={},se=0),De&&(c.savedBBoxes[De]=Et),se++,P.extendFlat({},Et)};function q(Le){var Te=Le.getAttribute("data-unformatted");if(Te!==null)return Te+Le.getAttribute("data-math")+Le.getAttribute("text-anchor")+Le.getAttribute("style")}c.setClipUrl=function(Le,Te,De){Le.attr("clip-path",j(Te,De))};function j(Le,Te){if(!Le)return null;var De=Te._context,Ve=De._exportedPlot?"":De._baseUrl||"";return Ve?"url('"+Ve+"#"+Le+"')":"url(#"+Le+")"}c.getTranslate=function(Le){var Te=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,De=Le.attr?"attr":"getAttribute",Ve=Le[De]("transform")||"",Ye=Ve.replace(Te,function(Ne,Xe,ht){return[Xe,ht].join(" ")}).split(" ");return{x:+Ye[0]||0,y:+Ye[1]||0}},c.setTranslate=function(Le,Te,De){var Ve=/(\btranslate\(.*?\);?)/,Ye=Le.attr?"attr":"getAttribute",Ne=Le.attr?"attr":"setAttribute",Xe=Le[Ye]("transform")||"";return Te=Te||0,De=De||0,Xe=Xe.replace(Ve,"").trim(),Xe+=n(Te,De),Xe=Xe.trim(),Le[Ne]("transform",Xe),Xe},c.getScale=function(Le){var Te=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,De=Le.attr?"attr":"getAttribute",Ve=Le[De]("transform")||"",Ye=Ve.replace(Te,function(Ne,Xe,ht){return[Xe,ht].join(" ")}).split(" ");return{x:+Ye[0]||1,y:+Ye[1]||1}},c.setScale=function(Le,Te,De){var Ve=/(\bscale\(.*?\);?)/,Ye=Le.attr?"attr":"getAttribute",Ne=Le.attr?"attr":"setAttribute",Xe=Le[Ye]("transform")||"";return Te=Te||1,De=De||1,Xe=Xe.replace(Ve,"").trim(),Xe+="scale("+Te+","+De+")",Xe=Xe.trim(),Le[Ne]("transform",Xe),Xe};var Z=/\s*sc.*/;c.setPointGroupScale=function(Le,Te,De){if(Te=Te||1,De=De||1,!!Le){var Ve=Te===1&&De===1?"":"scale("+Te+","+De+")";Le.each(function(){var Ye=(this.getAttribute("transform")||"").replace(Z,"");Ye+=Ve,Ye=Ye.trim(),this.setAttribute("transform",Ye)})}};var Q=/translate\([^)]*\)\s*$/;c.setTextPointsScale=function(Le,Te,De){Le&&Le.each(function(){var Ve,Ye=d.select(this),Ne=Ye.select("text");if(Ne.node()){var Xe=parseFloat(Ne.attr("x")||0),ht=parseFloat(Ne.attr("y")||0),st=(Ye.attr("transform")||"").match(Q);Te===1&&De===1?Ve=[]:Ve=[n(Xe,ht),"scale("+Te+","+De+")",n(-Xe,-ht)],st&&Ve.push(st),Ye.attr("transform",Ve.join(""))}})};function ue(Le,Te){var De;return Le&&(De=Le.mf),De===void 0&&(De=Te.marker&&Te.marker.standoff||0),!Te._geo&&!Te._xA?-De:De}c.getMarkerStandoff=ue;var fe=Math.atan2,te=Math.cos,ne=Math.sin;function ve(Le,Te){var De=Te[0],Ve=Te[1];return[De*te(Le)-Ve*ne(Le),De*ne(Le)+Ve*te(Le)]}var le,xe,Se,Re,Ee,Oe;function Be(Le,Te){var De=Le.ma;De===void 0&&(De=Te.marker.angle||0);var Ve,Ye,Ne=Te.marker.angleref;if(Ne==="previous"||Ne==="north"){if(Te._geo){var Xe=Te._geo.project(Le.lonlat);Ve=Xe[0],Ye=Xe[1]}else{var ht=Te._xA,st=Te._yA;if(ht&&st)Ve=ht.c2p(Le.x),Ye=st.c2p(Le.y);else return 90}if(Te._geo){var it=Le.lonlat[0],nt=Le.lonlat[1],pt=Te._geo.project([it,nt+1e-5]),Tt=Te._geo.project([it+1e-5,nt]),Et=fe(Tt[1]-Ye,Tt[0]-Ve),Dt=fe(pt[1]-Ye,pt[0]-Ve),et;if(Ne==="north")et=De/180*Math.PI;else if(Ne==="previous"){var Ue=it/180*Math.PI,ze=nt/180*Math.PI,rt=le/180*Math.PI,lt=xe/180*Math.PI,Qe=rt-Ue,Fe=te(lt)*ne(Qe),Ce=ne(lt)*te(ze)-te(lt)*ne(ze)*te(Qe);et=-fe(Fe,Ce)-Math.PI,le=it,xe=nt}var pe=ve(Et,[te(et),0]),we=ve(Dt,[ne(et),0]);De=fe(pe[1]+we[1],pe[0]+we[0])/Math.PI*180,Ne==="previous"&&!(Oe===Te.uid&&Le.i===Ee+1)&&(De=null)}if(Ne==="previous"&&!Te._geo)if(Oe===Te.uid&&Le.i===Ee+1&&_(Ve)&&_(Ye)){var Ae=Ve-Se,Pe=Ye-Re,Ge=Te.line&&Te.line.shape||"",We=Ge.slice(Ge.length-1);We==="h"&&(Pe=0),We==="v"&&(Ae=0),De+=fe(Pe,Ae)/Math.PI*180+90}else De=null}return Se=Ve,Re=Ye,Ee=Le.i,Oe=Te.uid,De}c.getMarkerAngle=Be},90998:function(z,B,e){var d=e(95616),P=e(39898).round,a="M0,0Z",_=Math.sqrt(2),x=Math.sqrt(3),v=Math.PI,y=Math.cos,r=Math.sin;z.exports={circle:{n:0,f:function(b,p,E){if(n(p))return a;var c=P(b,2),l="M"+c+",0A"+c+","+c+" 0 1,1 0,-"+c+"A"+c+","+c+" 0 0,1 "+c+",0Z";return E?h(p,E,l):l}},square:{n:1,f:function(b,p,E){if(n(p))return a;var c=P(b,2);return h(p,E,"M"+c+","+c+"H-"+c+"V-"+c+"H"+c+"Z")}},diamond:{n:2,f:function(b,p,E){if(n(p))return a;var c=P(b*1.3,2);return h(p,E,"M"+c+",0L0,"+c+"L-"+c+",0L0,-"+c+"Z")}},cross:{n:3,f:function(b,p,E){if(n(p))return a;var c=P(b*.4,2),l=P(b*1.2,2);return h(p,E,"M"+l+","+c+"H"+c+"V"+l+"H-"+c+"V"+c+"H-"+l+"V-"+c+"H-"+c+"V-"+l+"H"+c+"V-"+c+"H"+l+"Z")}},x:{n:4,f:function(b,p,E){if(n(p))return a;var c=P(b*.8/_,2),l="l"+c+","+c,m="l"+c+",-"+c,M="l-"+c+",-"+c,L="l-"+c+","+c;return h(p,E,"M0,"+c+l+m+M+m+M+L+M+L+l+L+l+"Z")}},"triangle-up":{n:5,f:function(b,p,E){if(n(p))return a;var c=P(b*2/x,2),l=P(b/2,2),m=P(b,2);return h(p,E,"M-"+c+","+l+"H"+c+"L0,-"+m+"Z")}},"triangle-down":{n:6,f:function(b,p,E){if(n(p))return a;var c=P(b*2/x,2),l=P(b/2,2),m=P(b,2);return h(p,E,"M-"+c+",-"+l+"H"+c+"L0,"+m+"Z")}},"triangle-left":{n:7,f:function(b,p,E){if(n(p))return a;var c=P(b*2/x,2),l=P(b/2,2),m=P(b,2);return h(p,E,"M"+l+",-"+c+"V"+c+"L-"+m+",0Z")}},"triangle-right":{n:8,f:function(b,p,E){if(n(p))return a;var c=P(b*2/x,2),l=P(b/2,2),m=P(b,2);return h(p,E,"M-"+l+",-"+c+"V"+c+"L"+m+",0Z")}},"triangle-ne":{n:9,f:function(b,p,E){if(n(p))return a;var c=P(b*.6,2),l=P(b*1.2,2);return h(p,E,"M-"+l+",-"+c+"H"+c+"V"+l+"Z")}},"triangle-se":{n:10,f:function(b,p,E){if(n(p))return a;var c=P(b*.6,2),l=P(b*1.2,2);return h(p,E,"M"+c+",-"+l+"V"+c+"H-"+l+"Z")}},"triangle-sw":{n:11,f:function(b,p,E){if(n(p))return a;var c=P(b*.6,2),l=P(b*1.2,2);return h(p,E,"M"+l+","+c+"H-"+c+"V-"+l+"Z")}},"triangle-nw":{n:12,f:function(b,p,E){if(n(p))return a;var c=P(b*.6,2),l=P(b*1.2,2);return h(p,E,"M-"+c+","+l+"V-"+c+"H"+l+"Z")}},pentagon:{n:13,f:function(b,p,E){if(n(p))return a;var c=P(b*.951,2),l=P(b*.588,2),m=P(-b,2),M=P(b*-.309,2),L=P(b*.809,2);return h(p,E,"M"+c+","+M+"L"+l+","+L+"H-"+l+"L-"+c+","+M+"L0,"+m+"Z")}},hexagon:{n:14,f:function(b,p,E){if(n(p))return a;var c=P(b,2),l=P(b/2,2),m=P(b*x/2,2);return h(p,E,"M"+m+",-"+l+"V"+l+"L0,"+c+"L-"+m+","+l+"V-"+l+"L0,-"+c+"Z")}},hexagon2:{n:15,f:function(b,p,E){if(n(p))return a;var c=P(b,2),l=P(b/2,2),m=P(b*x/2,2);return h(p,E,"M-"+l+","+m+"H"+l+"L"+c+",0L"+l+",-"+m+"H-"+l+"L-"+c+",0Z")}},octagon:{n:16,f:function(b,p,E){if(n(p))return a;var c=P(b*.924,2),l=P(b*.383,2);return h(p,E,"M-"+l+",-"+c+"H"+l+"L"+c+",-"+l+"V"+l+"L"+l+","+c+"H-"+l+"L-"+c+","+l+"V-"+l+"Z")}},star:{n:17,f:function(b,p,E){if(n(p))return a;var c=b*1.4,l=P(c*.225,2),m=P(c*.951,2),M=P(c*.363,2),L=P(c*.588,2),D=P(-c,2),A=P(c*-.309,2),C=P(c*.118,2),S=P(c*.809,2),o=P(c*.382,2);return h(p,E,"M"+l+","+A+"H"+m+"L"+M+","+C+"L"+L+","+S+"L0,"+o+"L-"+L+","+S+"L-"+M+","+C+"L-"+m+","+A+"H-"+l+"L0,"+D+"Z")}},hexagram:{n:18,f:function(b,p,E){if(n(p))return a;var c=P(b*.66,2),l=P(b*.38,2),m=P(b*.76,2);return h(p,E,"M-"+m+",0l-"+l+",-"+c+"h"+m+"l"+l+",-"+c+"l"+l+","+c+"h"+m+"l-"+l+","+c+"l"+l+","+c+"h-"+m+"l-"+l+","+c+"l-"+l+",-"+c+"h-"+m+"Z")}},"star-triangle-up":{n:19,f:function(b,p,E){if(n(p))return a;var c=P(b*x*.8,2),l=P(b*.8,2),m=P(b*1.6,2),M=P(b*4,2),L="A "+M+","+M+" 0 0 1 ";return h(p,E,"M-"+c+","+l+L+c+","+l+L+"0,-"+m+L+"-"+c+","+l+"Z")}},"star-triangle-down":{n:20,f:function(b,p,E){if(n(p))return a;var c=P(b*x*.8,2),l=P(b*.8,2),m=P(b*1.6,2),M=P(b*4,2),L="A "+M+","+M+" 0 0 1 ";return h(p,E,"M"+c+",-"+l+L+"-"+c+",-"+l+L+"0,"+m+L+c+",-"+l+"Z")}},"star-square":{n:21,f:function(b,p,E){if(n(p))return a;var c=P(b*1.1,2),l=P(b*2,2),m="A "+l+","+l+" 0 0 1 ";return h(p,E,"M-"+c+",-"+c+m+"-"+c+","+c+m+c+","+c+m+c+",-"+c+m+"-"+c+",-"+c+"Z")}},"star-diamond":{n:22,f:function(b,p,E){if(n(p))return a;var c=P(b*1.4,2),l=P(b*1.9,2),m="A "+l+","+l+" 0 0 1 ";return h(p,E,"M-"+c+",0"+m+"0,"+c+m+c+",0"+m+"0,-"+c+m+"-"+c+",0Z")}},"diamond-tall":{n:23,f:function(b,p,E){if(n(p))return a;var c=P(b*.7,2),l=P(b*1.4,2);return h(p,E,"M0,"+l+"L"+c+",0L0,-"+l+"L-"+c+",0Z")}},"diamond-wide":{n:24,f:function(b,p,E){if(n(p))return a;var c=P(b*1.4,2),l=P(b*.7,2);return h(p,E,"M0,"+l+"L"+c+",0L0,-"+l+"L-"+c+",0Z")}},hourglass:{n:25,f:function(b,p,E){if(n(p))return a;var c=P(b,2);return h(p,E,"M"+c+","+c+"H-"+c+"L"+c+",-"+c+"H-"+c+"Z")},noDot:!0},bowtie:{n:26,f:function(b,p,E){if(n(p))return a;var c=P(b,2);return h(p,E,"M"+c+","+c+"V-"+c+"L-"+c+","+c+"V-"+c+"Z")},noDot:!0},"circle-cross":{n:27,f:function(b,p,E){if(n(p))return a;var c=P(b,2);return h(p,E,"M0,"+c+"V-"+c+"M"+c+",0H-"+c+"M"+c+",0A"+c+","+c+" 0 1,1 0,-"+c+"A"+c+","+c+" 0 0,1 "+c+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(b,p,E){if(n(p))return a;var c=P(b,2),l=P(b/_,2);return h(p,E,"M"+l+","+l+"L-"+l+",-"+l+"M"+l+",-"+l+"L-"+l+","+l+"M"+c+",0A"+c+","+c+" 0 1,1 0,-"+c+"A"+c+","+c+" 0 0,1 "+c+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(b,p,E){if(n(p))return a;var c=P(b,2);return h(p,E,"M0,"+c+"V-"+c+"M"+c+",0H-"+c+"M"+c+","+c+"H-"+c+"V-"+c+"H"+c+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(b,p,E){if(n(p))return a;var c=P(b,2);return h(p,E,"M"+c+","+c+"L-"+c+",-"+c+"M"+c+",-"+c+"L-"+c+","+c+"M"+c+","+c+"H-"+c+"V-"+c+"H"+c+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(b,p,E){if(n(p))return a;var c=P(b*1.3,2);return h(p,E,"M"+c+",0L0,"+c+"L-"+c+",0L0,-"+c+"ZM0,-"+c+"V"+c+"M-"+c+",0H"+c)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(b,p,E){if(n(p))return a;var c=P(b*1.3,2),l=P(b*.65,2);return h(p,E,"M"+c+",0L0,"+c+"L-"+c+",0L0,-"+c+"ZM-"+l+",-"+l+"L"+l+","+l+"M-"+l+","+l+"L"+l+",-"+l)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(b,p,E){if(n(p))return a;var c=P(b*1.4,2);return h(p,E,"M0,"+c+"V-"+c+"M"+c+",0H-"+c)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(b,p,E){if(n(p))return a;var c=P(b,2);return h(p,E,"M"+c+","+c+"L-"+c+",-"+c+"M"+c+",-"+c+"L-"+c+","+c)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(b,p,E){if(n(p))return a;var c=P(b*1.2,2),l=P(b*.85,2);return h(p,E,"M0,"+c+"V-"+c+"M"+c+",0H-"+c+"M"+l+","+l+"L-"+l+",-"+l+"M"+l+",-"+l+"L-"+l+","+l)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(b,p,E){if(n(p))return a;var c=P(b/2,2),l=P(b,2);return h(p,E,"M"+c+","+l+"V-"+l+"M"+(c-l)+",-"+l+"V"+l+"M"+l+","+c+"H-"+l+"M-"+l+","+(c-l)+"H"+l)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(b,p,E){if(n(p))return a;var c=P(b*1.2,2),l=P(b*1.6,2),m=P(b*.8,2);return h(p,E,"M-"+c+","+m+"L0,0M"+c+","+m+"L0,0M0,-"+l+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(b,p,E){if(n(p))return a;var c=P(b*1.2,2),l=P(b*1.6,2),m=P(b*.8,2);return h(p,E,"M-"+c+",-"+m+"L0,0M"+c+",-"+m+"L0,0M0,"+l+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(b,p,E){if(n(p))return a;var c=P(b*1.2,2),l=P(b*1.6,2),m=P(b*.8,2);return h(p,E,"M"+m+","+c+"L0,0M"+m+",-"+c+"L0,0M-"+l+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(b,p,E){if(n(p))return a;var c=P(b*1.2,2),l=P(b*1.6,2),m=P(b*.8,2);return h(p,E,"M-"+m+","+c+"L0,0M-"+m+",-"+c+"L0,0M"+l+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(b,p,E){if(n(p))return a;var c=P(b*1.4,2);return h(p,E,"M"+c+",0H-"+c)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(b,p,E){if(n(p))return a;var c=P(b*1.4,2);return h(p,E,"M0,"+c+"V-"+c)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(b,p,E){if(n(p))return a;var c=P(b,2);return h(p,E,"M"+c+",-"+c+"L-"+c+","+c)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(b,p,E){if(n(p))return a;var c=P(b,2);return h(p,E,"M"+c+","+c+"L-"+c+",-"+c)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(b,p,E){if(n(p))return a;var c=P(b,2),l=P(b*2,2);return h(p,E,"M0,0L-"+c+","+l+"H"+c+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(b,p,E){if(n(p))return a;var c=P(b,2),l=P(b*2,2);return h(p,E,"M0,0L-"+c+",-"+l+"H"+c+"Z")},noDot:!0},"arrow-left":{n:47,f:function(b,p,E){if(n(p))return a;var c=P(b*2,2),l=P(b,2);return h(p,E,"M0,0L"+c+",-"+l+"V"+l+"Z")},noDot:!0},"arrow-right":{n:48,f:function(b,p,E){if(n(p))return a;var c=P(b*2,2),l=P(b,2);return h(p,E,"M0,0L-"+c+",-"+l+"V"+l+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(b,p,E){if(n(p))return a;var c=P(b,2),l=P(b*2,2);return h(p,E,"M-"+c+",0H"+c+"M0,0L-"+c+","+l+"H"+c+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(b,p,E){if(n(p))return a;var c=P(b,2),l=P(b*2,2);return h(p,E,"M-"+c+",0H"+c+"M0,0L-"+c+",-"+l+"H"+c+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(b,p,E){if(n(p))return a;var c=P(b*2,2),l=P(b,2);return h(p,E,"M0,-"+l+"V"+l+"M0,0L"+c+",-"+l+"V"+l+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(b,p,E){if(n(p))return a;var c=P(b*2,2),l=P(b,2);return h(p,E,"M0,-"+l+"V"+l+"M0,0L-"+c+",-"+l+"V"+l+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(b,p,E){if(n(p))return a;var c=v/2.5,l=2*b*y(c),m=2*b*r(c);return h(p,E,"M0,0L"+-l+","+m+"L"+l+","+m+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(b,p,E){if(n(p))return a;var c=v/4,l=2*b*y(c),m=2*b*r(c);return h(p,E,"M0,0L"+-l+","+m+"A "+2*b+","+2*b+" 0 0 1 "+l+","+m+"Z")},backoff:.4,noDot:!0}};function n(b){return b===null}var u,i,f,g;function h(b,p,E){if((!b||b%360===0)&&!p)return E;if(f===b&&g===p&&u===E)return i;f=b,g=p,u=E;function c(N,H){var k=y(N),V=r(N),G=H[0],U=H[1]+(p||0);return[G*k-U*V,G*V+U*k]}for(var l=b/180*v,m=0,M=0,L=d(E),D="",A=0;A<L.length;A++){var C=L[A],S=C[0],o=m,R=M;if(S==="M"||S==="L")m=+C[1],M=+C[2];else if(S==="m"||S==="l")m+=+C[1],M+=+C[2];else if(S==="H")m=+C[1];else if(S==="h")m+=+C[1];else if(S==="V")M=+C[1];else if(S==="v")M+=+C[1];else if(S==="A"){m=+C[1],M=+C[2];var T=c(l,[+C[6],+C[7]]);C[6]=T[0],C[7]=T[1],C[3]=+C[3]+b}(S==="H"||S==="V")&&(S="L"),(S==="h"||S==="v")&&(S="l"),(S==="m"||S==="l")&&(m-=o,M-=R);var O=c(l,[m,M]);(S==="H"||S==="V")&&(S="L"),(S==="M"||S==="L"||S==="m"||S==="l")&&(C[1]=O[0],C[2]=O[1]),C[0]=S,D+=C[0]+C.slice(1).join(",")}return i=D,D}},25673:function(z){z.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style"}}}},84532:function(z,B,e){var d=e(92770),P=e(73972),a=e(89298),_=e(71828),x=e(45827);z.exports=function(r){for(var n=r.calcdata,u=0;u<n.length;u++){var i=n[u],f=i[0].trace;if(f.visible===!0&&P.traceIs(f,"errorBarsOK")){var g=a.getFromId(r,f.xaxis),h=a.getFromId(r,f.yaxis);v(i,f,g,"x"),v(i,f,h,"y")}}};function v(y,r,n,u){var i=r["error_"+u]||{},f=i.visible&&["linear","log"].indexOf(n.type)!==-1,g=[];if(f){for(var h=x(i),b=0;b<y.length;b++){var p=y[b],E=p.i;if(E===void 0)E=b;else if(E===null)continue;var c=p[u];if(d(n.c2l(c))){var l=h(c,E);if(d(l[0])&&d(l[1])){var m=p[u+"s"]=c-l[0],M=p[u+"h"]=c+l[1];g.push(m,M)}}}var L=n._id,D=r._extremes[L],A=a.findExtremes(n,g,_.extendFlat({tozero:D.opts.tozero},{padded:!0}));D.min=D.min.concat(A.min),D.max=D.max.concat(A.max)}}},45827:function(z){z.exports=function(d){var P=d.type,a=d.symmetric;if(P==="data"){var _=d.array||[];if(a)return function(n,u){var i=+_[u];return[i,i]};var x=d.arrayminus||[];return function(n,u){var i=+_[u],f=+x[u];return!isNaN(i)||!isNaN(f)?[f||0,i||0]:[NaN,NaN]}}else{var v=B(P,d.value),y=B(P,d.valueminus);return a||d.valueminus===void 0?function(n){var u=v(n);return[u,u]}:function(n){return[y(n),v(n)]}}};function B(e,d){if(e==="percent")return function(P){return Math.abs(P*d/100)};if(e==="constant")return function(){return Math.abs(d)};if(e==="sqrt")return function(P){return Math.sqrt(Math.abs(P))}}},97587:function(z,B,e){var d=e(92770),P=e(73972),a=e(71828),_=e(44467),x=e(25673);z.exports=function(v,y,r,n){var u="error_"+n.axis,i=_.newContainer(y,u),f=v[u]||{};function g(m,M){return a.coerce(f,i,x,m,M)}var h=f.array!==void 0||f.value!==void 0||f.type==="sqrt",b=g("visible",h);if(b!==!1){var p=g("type","array"in f?"data":"percent"),E=!0;p!=="sqrt"&&(E=g("symmetric",!((p==="data"?"arrayminus":"valueminus")in f))),p==="data"?(g("array"),g("traceref"),E||(g("arrayminus"),g("tracerefminus"))):(p==="percent"||p==="constant")&&(g("value"),E||g("valueminus"));var c="copy_"+n.inherit+"style";if(n.inherit){var l=y["error_"+n.inherit];(l||{}).visible&&g(c,!(f.color||d(f.thickness)||d(f.width)))}(!n.inherit||!i[c])&&(g("color",r),g("thickness"),g("width",P.traceIs(y,"gl3d")?0:4))}}},37369:function(z,B,e){var d=e(71828),P=e(30962).overrideAll,a=e(25673),_={error_x:d.extendFlat({},a),error_y:d.extendFlat({},a)};delete _.error_x.copy_zstyle,delete _.error_y.copy_zstyle,delete _.error_y.copy_ystyle;var x={error_x:d.extendFlat({},a),error_y:d.extendFlat({},a),error_z:d.extendFlat({},a)};delete x.error_x.copy_ystyle,delete x.error_y.copy_ystyle,delete x.error_z.copy_ystyle,delete x.error_z.copy_zstyle,z.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:_,bar:_,histogram:_,scatter3d:P(x,"calc","nested"),scattergl:P(_,"calc","nested")}},supplyDefaults:e(97587),calc:e(84532),makeComputeError:e(45827),plot:e(19398),style:e(62662),hoverInfo:v};function v(y,r,n){(r.error_y||{}).visible&&(n.yerr=y.yh-y.y,r.error_y.symmetric||(n.yerrneg=y.y-y.ys)),(r.error_x||{}).visible&&(n.xerr=y.xh-y.x,r.error_x.symmetric||(n.xerrneg=y.x-y.xs))}},19398:function(z,B,e){var d=e(39898),P=e(92770),a=e(91424),_=e(34098);z.exports=function(y,r,n,u){var i,f=n.xaxis,g=n.yaxis,h=u&&u.duration>0,b=y._context.staticPlot;r.each(function(p){var E=p[0].trace,c=E.error_x||{},l=E.error_y||{},m;E.ids&&(m=function(A){return A.id});var M=_.hasMarkers(E)&&E.marker.maxdisplayed>0;!l.visible&&!c.visible&&(p=[]);var L=d.select(this).selectAll("g.errorbar").data(p,m);if(L.exit().remove(),!!p.length){c.visible||L.selectAll("path.xerror").remove(),l.visible||L.selectAll("path.yerror").remove(),L.style("opacity",1);var D=L.enter().append("g").classed("errorbar",!0);h&&D.style("opacity",0).transition().duration(u.duration).style("opacity",1),a.setClipUrl(L,n.layerClipId,y),L.each(function(A){var C=d.select(this),S=x(A,f,g);if(!(M&&!A.vis)){var o,R=C.select("path.yerror");if(l.visible&&P(S.x)&&P(S.yh)&&P(S.ys)){var T=l.width;o="M"+(S.x-T)+","+S.yh+"h"+2*T+"m-"+T+",0V"+S.ys,S.noYS||(o+="m-"+T+",0h"+2*T),i=!R.size(),i?R=C.append("path").style("vector-effect",b?"none":"non-scaling-stroke").classed("yerror",!0):h&&(R=R.transition().duration(u.duration).ease(u.easing)),R.attr("d",o)}else R.remove();var O=C.select("path.xerror");if(c.visible&&P(S.y)&&P(S.xh)&&P(S.xs)){var N=(c.copy_ystyle?l:c).width;o="M"+S.xh+","+(S.y-N)+"v"+2*N+"m0,-"+N+"H"+S.xs,S.noXS||(o+="m0,-"+N+"v"+2*N),i=!O.size(),i?O=C.append("path").style("vector-effect",b?"none":"non-scaling-stroke").classed("xerror",!0):h&&(O=O.transition().duration(u.duration).ease(u.easing)),O.attr("d",o)}else O.remove()}})}})};function x(v,y,r){var n={x:y.c2p(v.x),y:r.c2p(v.y)};return v.yh!==void 0&&(n.yh=r.c2p(v.yh),n.ys=r.c2p(v.ys),P(n.ys)||(n.noYS=!0,n.ys=r.c2p(v.ys,!0))),v.xh!==void 0&&(n.xh=y.c2p(v.xh),n.xs=y.c2p(v.xs),P(n.xs)||(n.noXS=!0,n.xs=y.c2p(v.xs,!0))),n}},62662:function(z,B,e){var d=e(39898),P=e(7901);z.exports=function(_){_.each(function(x){var v=x[0].trace,y=v.error_y||{},r=v.error_x||{},n=d.select(this);n.selectAll("path.yerror").style("stroke-width",y.thickness+"px").call(P.stroke,y.color),r.copy_ystyle&&(r=y),n.selectAll("path.xerror").style("stroke-width",r.thickness+"px").call(P.stroke,r.color)})}},77914:function(z,B,e){var d=e(41940),P=e(528).hoverlabel,a=e(1426).extendFlat;z.exports={hoverlabel:{bgcolor:a({},P.bgcolor,{arrayOk:!0}),bordercolor:a({},P.bordercolor,{arrayOk:!0}),font:d({arrayOk:!0,editType:"none"}),align:a({},P.align,{arrayOk:!0}),namelength:a({},P.namelength,{arrayOk:!0}),editType:"none"}}},30732:function(z,B,e){var d=e(71828),P=e(73972);z.exports=function(x){var v=x.calcdata,y=x._fullLayout;function r(g){return function(h){return d.coerceHoverinfo({hoverinfo:h},{_module:g._module},y)}}for(var n=0;n<v.length;n++){var u=v[n],i=u[0].trace;if(!P.traceIs(i,"pie-like")){var f=P.traceIs(i,"2dMap")?a:d.fillArray;f(i.hoverinfo,u,"hi",r(i)),i.hovertemplate&&f(i.hovertemplate,u,"ht"),i.hoverlabel&&(f(i.hoverlabel.bgcolor,u,"hbg"),f(i.hoverlabel.bordercolor,u,"hbc"),f(i.hoverlabel.font.size,u,"hts"),f(i.hoverlabel.font.color,u,"htc"),f(i.hoverlabel.font.family,u,"htf"),f(i.hoverlabel.namelength,u,"hnl"),f(i.hoverlabel.align,u,"hta"))}}};function a(_,x,v,y){y=y||d.identity,Array.isArray(_)&&(x[0][v]=y(_))}},75914:function(z,B,e){var d=e(73972),P=e(88335).hover;z.exports=function(_,x,v){var y=d.getComponentMethod("annotations","onClick")(_,_._hoverdata);v!==void 0&&P(_,x,v,!0);function r(){_.emit("plotly_click",{points:_._hoverdata,event:x})}_._hoverdata&&x&&x.target&&(y&&y.then?y.then(r):r(),x.stopImmediatePropagation&&x.stopImmediatePropagation())}},26675:function(z){z.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},54268:function(z,B,e){var d=e(71828),P=e(77914),a=e(38048);z.exports=function(x,v,y,r){function n(i,f){return d.coerce(x,v,P,i,f)}var u=d.extendFlat({},r.hoverlabel);v.hovertemplate&&(u.namelength=-1),a(x,v,n,u)}},23469:function(z,B,e){var d=e(71828);B.getSubplot=function(y){return y.subplot||y.xaxis+y.yaxis||y.geo},B.isTraceInSubplots=function(y,r){if(y.type==="splom"){for(var n=y.xaxes||[],u=y.yaxes||[],i=0;i<n.length;i++)for(var f=0;f<u.length;f++)if(r.indexOf(n[i]+u[f])!==-1)return!0;return!1}return r.indexOf(B.getSubplot(y))!==-1},B.flat=function(y,r){for(var n=new Array(y.length),u=0;u<y.length;u++)n[u]=r;return n},B.p2c=function(y,r){for(var n=new Array(y.length),u=0;u<y.length;u++)n[u]=y[u].p2c(r);return n},B.getDistanceFunction=function(y,r,n,u){return y==="closest"?u||B.quadrature(r,n):y.charAt(0)==="x"?r:n},B.getClosest=function(y,r,n){if(n.index!==!1)n.index>=0&&n.index<y.length?n.distance=0:n.index=!1;else for(var u=0;u<y.length;u++){var i=r(y[u]);i<=n.distance&&(n.index=u,n.distance=i)}return n},B.inbox=function(y,r,n){return y*r<0||y===0?n:1/0},B.quadrature=function(y,r){return function(n){var u=y(n),i=r(n);return Math.sqrt(u*u+i*i)}},B.makeEventData=function(y,r,n){var u="index"in y?y.index:y.pointNumber,i={data:r._input,fullData:r,curveNumber:r.index,pointNumber:u};if(r._indexToPoints){var f=r._indexToPoints[u];f.length===1?i.pointIndex=f[0]:i.pointIndices=f}else i.pointIndex=u;return r._module.eventData?i=r._module.eventData(i,y,r,n,u):("xVal"in y?i.x=y.xVal:"x"in y&&(i.x=y.x),"yVal"in y?i.y=y.yVal:"y"in y&&(i.y=y.y),y.xa&&(i.xaxis=y.xa),y.ya&&(i.yaxis=y.ya),y.zLabelVal!==void 0&&(i.z=y.zLabelVal)),B.appendArrayPointValue(i,r,u),i},B.appendArrayPointValue=function(y,r,n){var u=r._arrayAttrs;if(u)for(var i=0;i<u.length;i++){var f=u[i],g=a(f);if(y[g]===void 0){var h=d.nestedProperty(r,f).get(),b=_(h,n);b!==void 0&&(y[g]=b)}}},B.appendArrayMultiPointValues=function(y,r,n){var u=r._arrayAttrs;if(u)for(var i=0;i<u.length;i++){var f=u[i],g=a(f);if(y[g]===void 0){for(var h=d.nestedProperty(r,f).get(),b=new Array(n.length),p=0;p<n.length;p++)b[p]=_(h,n[p]);y[g]=b}}};var P={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function a(y){return P[y]||y}function _(y,r){if(Array.isArray(r)){if(Array.isArray(y)&&Array.isArray(y[r[0]]))return y[r[0]][r[1]]}else return y[r]}var x={x:!0,y:!0},v={"x unified":!0,"y unified":!0};B.isUnifiedHover=function(y){return typeof y!="string"?!1:!!v[y]},B.isXYhover=function(y){return typeof y!="string"?!1:!!x[y]}},88335:function(z,B,e){var d=e(39898),P=e(92770),a=e(84267),_=e(71828),x=_.strTranslate,v=_.strRotate,y=e(11086),r=e(63893),n=e(39918),u=e(91424),i=e(7901),f=e(28569),g=e(89298),h=e(73972),b=e(23469),p=e(26675),E=e(99017),c=e(43969),l=p.YANGLE,m=Math.PI*l/180,M=1/Math.sin(m),L=Math.cos(m),D=Math.sin(m),A=p.HOVERARROWSIZE,C=p.HOVERTEXTPAD,S={box:!0,ohlc:!0,violin:!0,candlestick:!0},o={scatter:!0,scattergl:!0,splom:!0};B.hover=function(Q,ue,fe,te){Q=_.getGraphDiv(Q);var ne=ue.target;_.throttle(Q._fullLayout._uid+p.HOVERID,p.HOVERMINTIME,function(){R(Q,ue,fe,te,ne)})},B.loneHover=function(Q,ue){var fe=!0;Array.isArray(Q)||(fe=!1,Q=[Q]);var te=ue.gd,ne=ce(te),ve=q(te),le=Q.map(function(Te){var De=Te._x0||Te.x0||Te.x||0,Ve=Te._x1||Te.x1||Te.x||0,Ye=Te._y0||Te.y0||Te.y||0,Ne=Te._y1||Te.y1||Te.y||0,Xe=Te.eventData;if(Xe){var ht=Math.min(De,Ve),st=Math.max(De,Ve),it=Math.min(Ye,Ne),nt=Math.max(Ye,Ne),pt=Te.trace;if(h.traceIs(pt,"gl3d")){var Tt=te._fullLayout[pt.scene]._scene.container,Et=Tt.offsetLeft,Dt=Tt.offsetTop;ht+=Et,st+=Et,it+=Dt,nt+=Dt}Xe.bbox={x0:ht+ve,x1:st+ve,y0:it+ne,y1:nt+ne},ue.inOut_bbox&&ue.inOut_bbox.push(Xe.bbox)}else Xe=!1;return{color:Te.color||i.defaultLine,x0:Te.x0||Te.x||0,x1:Te.x1||Te.x||0,y0:Te.y0||Te.y||0,y1:Te.y1||Te.y||0,xLabel:Te.xLabel,yLabel:Te.yLabel,zLabel:Te.zLabel,text:Te.text,name:Te.name,idealAlign:Te.idealAlign,borderColor:Te.borderColor,fontFamily:Te.fontFamily,fontSize:Te.fontSize,fontColor:Te.fontColor,nameLength:Te.nameLength,textAlign:Te.textAlign,trace:Te.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:Te.hovertemplate||!1,hovertemplateLabels:Te.hovertemplateLabels||!1,eventData:Xe}}),xe=!1,Se=N(le,{gd:te,hovermode:"closest",rotateLabels:xe,bgColor:ue.bgColor||i.background,container:d.select(ue.container),outerContainer:ue.outerContainer||ue.container}),Re=5,Ee=0,Oe=0;Se.sort(function(Te,De){return Te.y0-De.y0}).each(function(Te,De){var Ve=Te.y0-Te.by/2;Ve-Re<Ee?Te.offset=Ee-Ve+Re:Te.offset=0,Ee=Ve+Te.by+Te.offset,De===ue.anchorIndex&&(Oe=Te.offset)}).each(function(Te){Te.offset-=Oe});var Be=te._fullLayout._invScaleX,Le=te._fullLayout._invScaleY;return V(Se,xe,Be,Le),fe?Se:Se.node()};function R(Z,Q,ue,fe,te){ue||(ue="xy");var ne=Array.isArray(ue)?ue:[ue],ve=Z._fullLayout,le=ve._plots||[],xe=le[ue],Se=ve._has("cartesian");if(xe){var Re=xe.overlays.map(function(xn){return xn.id});ne=ne.concat(Re)}for(var Ee=ne.length,Oe=new Array(Ee),Be=new Array(Ee),Le=!1,Te=0;Te<Ee;Te++){var De=ne[Te];if(le[De])Le=!0,Oe[Te]=le[De].xaxis,Be[Te]=le[De].yaxis;else if(ve[De]&&ve[De]._subplot){var Ve=ve[De]._subplot;Oe[Te]=Ve.xaxis,Be[Te]=Ve.yaxis}else{_.warn("Unrecognized subplot: "+De);return}}var Ye=Q.hovermode||ve.hovermode;if(Ye&&!Le&&(Ye="closest"),["x","y","closest","x unified","y unified"].indexOf(Ye)===-1||!Z.calcdata||Z.querySelector(".zoombox")||Z._dragging)return f.unhoverRaw(Z,Q);var Ne=ve.hoverdistance;Ne===-1&&(Ne=1/0);var Xe=ve.spikedistance;Xe===-1&&(Xe=1/0);var ht=[],st=[],it,nt,pt,Tt,Et,Dt,et,Ue,ze,rt,lt,Qe,Fe,Ce={hLinePoint:null,vLinePoint:null},pe=!1;if(Array.isArray(Q))for(Ye="array",pt=0;pt<Q.length;pt++)Et=Z.calcdata[Q[pt].curveNumber||0],Et&&(Dt=Et[0].trace,Et[0].trace.hoverinfo!=="skip"&&(st.push(Et),Dt.orientation==="h"&&(pe=!0)));else{for(Tt=0;Tt<Z.calcdata.length;Tt++)Et=Z.calcdata[Tt],Dt=Et[0].trace,Dt.hoverinfo!=="skip"&&b.isTraceInSubplots(Dt,ne)&&(st.push(Et),Dt.orientation==="h"&&(pe=!0));var we=!te,Ae,Pe;if(we)"xpx"in Q?Ae=Q.xpx:Ae=Oe[0]._length/2,"ypx"in Q?Pe=Q.ypx:Pe=Be[0]._length/2;else{if(y.triggerHandler(Z,"plotly_beforehover",Q)===!1)return;var Ge=te.getBoundingClientRect();Ae=Q.clientX-Ge.left,Pe=Q.clientY-Ge.top,ve._calcInverseTransform(Z);var We=_.apply3DTransform(ve._invTransform)(Ae,Pe);if(Ae=We[0],Pe=We[1],Ae<0||Ae>Oe[0]._length||Pe<0||Pe>Be[0]._length)return f.unhoverRaw(Z,Q)}if(Q.pointerX=Ae+Oe[0]._offset,Q.pointerY=Pe+Be[0]._offset,"xval"in Q?it=b.flat(ne,Q.xval):it=b.p2c(Oe,Ae),"yval"in Q?nt=b.flat(ne,Q.yval):nt=b.p2c(Be,Pe),!P(it[0])||!P(nt[0]))return _.warn("Fx.hover failed",Q,Z),f.unhoverRaw(Z,Q)}var tt=1/0;function ct(xn,Dn){for(Tt=0;Tt<st.length;Tt++)if(Et=st[Tt],!(!Et||!Et[0]||!Et[0].trace)&&(Dt=Et[0].trace,!(Dt.visible!==!0||Dt._length===0)&&["carpet","contourcarpet"].indexOf(Dt._module.name)===-1)){if(Dt.type==="splom"?(Ue=0,et=ne[Ue]):(et=b.getSubplot(Dt),Ue=ne.indexOf(et)),ze=Ye,b.isUnifiedHover(ze)&&(ze=ze.charAt(0)),Qe={cd:Et,trace:Dt,xa:Oe[Ue],ya:Be[Ue],maxHoverDistance:Ne,maxSpikeDistance:Xe,index:!1,distance:Math.min(tt,Ne),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:i.defaultLine,name:Dt.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},ve[et]&&(Qe.subplot=ve[et]._subplot),ve._splomScenes&&ve._splomScenes[Dt.uid]&&(Qe.scene=ve._splomScenes[Dt.uid]),Fe=ht.length,ze==="array"){var mr=Q[Tt];"pointNumber"in mr?(Qe.index=mr.pointNumber,ze="closest"):(ze="","xval"in mr&&(rt=mr.xval,ze="x"),"yval"in mr&&(lt=mr.yval,ze=ze?"closest":"y"))}else xn!==void 0&&Dn!==void 0?(rt=xn,lt=Dn):(rt=it[Ue],lt=nt[Ue]);if(Ne!==0)if(Dt._module&&Dt._module.hoverPoints){var Ar=Dt._module.hoverPoints(Qe,rt,lt,ze,{finiteRange:!0,hoverLayer:ve._hoverlayer});if(Ar)for(var zr,Br=0;Br<Ar.length;Br++)zr=Ar[Br],P(zr.x0)&&P(zr.y0)&&ht.push(G(zr,Ye))}else _.log("Unrecognized trace type in hover:",Dt);if(Ye==="closest"&&ht.length>Fe&&(ht.splice(0,Fe),tt=ht[0].distance),Se&&Xe!==0&&ht.length===0){Qe.distance=Xe,Qe.index=!1;var on=Dt._module.hoverPoints(Qe,rt,lt,"closest",{hoverLayer:ve._hoverlayer});if(on&&(on=on.filter(function(ta){return ta.spikeDistance<=Xe})),on&&on.length){var mn,Tn=on.filter(function(ta){return ta.xa.showspikes&&ta.xa.spikesnap!=="hovered data"});if(Tn.length){var An=Tn[0];P(An.x0)&&P(An.y0)&&(mn=Pt(An),(!Ce.vLinePoint||Ce.vLinePoint.spikeDistance>mn.spikeDistance)&&(Ce.vLinePoint=mn))}var Fn=on.filter(function(ta){return ta.ya.showspikes&&ta.ya.spikesnap!=="hovered data"});if(Fn.length){var Jn=Fn[0];P(Jn.x0)&&P(Jn.y0)&&(mn=Pt(Jn),(!Ce.hLinePoint||Ce.hLinePoint.spikeDistance>mn.spikeDistance)&&(Ce.hLinePoint=mn))}}}}}ct();function St(xn,Dn,mr){for(var Ar=null,zr=1/0,Br,on=0;on<xn.length;on++)Br=xn[on].spikeDistance,mr&&on===0&&(Br=-1/0),Br<=zr&&Br<=Dn&&(Ar=xn[on],zr=Br);return Ar}function Pt(xn){return xn?{xa:xn.xa,ya:xn.ya,x:xn.xSpike!==void 0?xn.xSpike:(xn.x0+xn.x1)/2,y:xn.ySpike!==void 0?xn.ySpike:(xn.y0+xn.y1)/2,distance:xn.distance,spikeDistance:xn.spikeDistance,curveNumber:xn.trace.index,color:xn.color,pointNumber:xn.index}:null}var wt={fullLayout:ve,container:ve._hoverlayer,event:Q},Bt=Z._spikepoints,Wt={vLinePoint:Ce.vLinePoint,hLinePoint:Ce.hLinePoint};Z._spikepoints=Wt;var hr=function(){ht.sort(function(xn,Dn){return xn.distance-Dn.distance}),ht=ie(ht,Ye)};hr();var gt=Ye.charAt(0),jt=(gt==="x"||gt==="y")&&ht[0]&&o[ht[0].trace.type];if(Se&&Xe!==0&&ht.length!==0){var Ut=ht.filter(function(xn){return xn.ya.showspikes}),or=St(Ut,Xe,jt);Ce.hLinePoint=Pt(or);var ur=ht.filter(function(xn){return xn.xa.showspikes}),dt=St(ur,Xe,jt);Ce.vLinePoint=Pt(dt)}if(ht.length===0){var ut=f.unhoverRaw(Z,Q);return Se&&(Ce.hLinePoint!==null||Ce.vLinePoint!==null)&&ee(Bt)&&U(Z,Ce,wt),ut}if(Se&&ee(Bt)&&U(Z,Ce,wt),b.isXYhover(ze)&&ht[0].length!==0&&ht[0].trace.type!=="splom"){var yt=ht[0];S[yt.trace.type]?ht=ht.filter(function(xn){return xn.trace.index===yt.trace.index}):ht=[yt];var Lt=ht.length,Rt=se("x",yt,ve),Nt=se("y",yt,ve);ct(Rt,Nt);var Vt=[],Zt={},qt=0,Jt=function(xn){var Dn=S[xn.trace.type]?T(xn):xn.trace.index;if(!Zt[Dn])qt++,Zt[Dn]=qt,Vt.push(xn);else{var mr=Zt[Dn]-1,Ar=Vt[mr];mr>0&&Math.abs(xn.distance)<Math.abs(Ar.distance)&&(Vt[mr]=xn)}},nr;for(nr=0;nr<Lt;nr++)Jt(ht[nr]);for(nr=ht.length-1;nr>Lt-1;nr--)Jt(ht[nr]);ht=Vt,hr()}var Mr=Z._hoverdata,Ke=[],Ze=ce(Z),zt=q(Z);for(pt=0;pt<ht.length;pt++){var kt=ht[pt],Qt=b.makeEventData(kt,kt.trace,kt.cd);if(kt.hovertemplate!==!1){var cr=!1;kt.cd[kt.index]&&kt.cd[kt.index].ht&&(cr=kt.cd[kt.index].ht),kt.hovertemplate=cr||kt.trace.hovertemplate||!1}if(kt.xa&&kt.ya){var fr=kt.x0+kt.xa._offset,ir=kt.x1+kt.xa._offset,Yt=kt.y0+kt.ya._offset,gr=kt.y1+kt.ya._offset,yr=Math.min(fr,ir),Tr=Math.max(fr,ir),pr=Math.min(Yt,gr),Kr=Math.max(Yt,gr);Qt.bbox={x0:yr+zt,x1:Tr+zt,y0:pr+Ze,y1:Kr+Ze}}kt.eventData=[Qt],Ke.push(Qt)}Z._hoverdata=Ke;var Or=Ye==="y"&&(st.length>1||ht.length>1)||Ye==="closest"&&pe&&ht.length>1,Nr=i.combine(ve.plot_bgcolor||i.background,ve.paper_bgcolor),Sn=N(ht,{gd:Z,hovermode:Ye,rotateLabels:Or,bgColor:Nr,container:ve._hoverlayer,outerContainer:ve._paper.node(),commonLabelOpts:ve.hoverlabel,hoverdistance:ve.hoverdistance});if(b.isUnifiedHover(Ye)||(k(Sn,Or?"xa":"ya",ve),V(Sn,Or,ve._invScaleX,ve._invScaleY)),te&&te.tagName){var Jr=h.getComponentMethod("annotations","hasClickToShow")(Z,Ke);n(d.select(te),Jr?"pointer":"")}!te||fe||!Y(Z,Q,Mr)||(Mr&&Z.emit("plotly_unhover",{event:Q,points:Mr}),Z.emit("plotly_hover",{event:Q,points:Z._hoverdata,xaxes:Oe,yaxes:Be,xvals:it,yvals:nt}))}function T(Z){return[Z.trace.index,Z.index,Z.x0,Z.y0,Z.name,Z.attr,Z.xa?Z.xa._id:"",Z.ya?Z.ya._id:""].join(",")}var O=/<extra>([\s\S]*)<\/extra>/;function N(Z,Q){var ue=Q.gd,fe=ue._fullLayout,te=Q.hovermode,ne=Q.rotateLabels,ve=Q.bgColor,le=Q.container,xe=Q.outerContainer,Se=Q.commonLabelOpts||{};if(Z.length===0)return[[]];var Re=Q.fontFamily||p.HOVERFONT,Ee=Q.fontSize||p.HOVERFONTSIZE,Oe=Z[0],Be=Oe.xa,Le=Oe.ya,Te=te.charAt(0),De=Te+"Label",Ve=Oe[De];if(Ve===void 0&&Be.type==="multicategory")for(var Ye=0;Ye<Z.length&&(Ve=Z[Ye][De],Ve===void 0);Ye++);var Ne=j(ue,xe),Xe=Ne.top,ht=Ne.width,st=Ne.height,it=Ve!==void 0&&Oe.distance<=Q.hoverdistance&&(te==="x"||te==="y");if(it){var nt=!0,pt,Tt;for(pt=0;pt<Z.length;pt++)if(nt&&Z[pt].zLabel===void 0&&(nt=!1),Tt=Z[pt].hoverinfo||Z[pt].trace.hoverinfo,Tt){var Et=Array.isArray(Tt)?Tt:Tt.split("+");if(Et.indexOf("all")===-1&&Et.indexOf(te)===-1){it=!1;break}}nt&&(it=!1)}var Dt=le.selectAll("g.axistext").data(it?[0]:[]);if(Dt.enter().append("g").classed("axistext",!0),Dt.exit().remove(),Dt.each(function(){var yt=d.select(this),Lt=_.ensureSingle(yt,"path","",function(Tr){Tr.style({"stroke-width":"1px"})}),Rt=_.ensureSingle(yt,"text","",function(Tr){Tr.attr("data-notex",1)}),Nt=Se.bgcolor||i.defaultLine,Vt=Se.bordercolor||i.contrast(Nt),Zt=i.contrast(Nt),qt={family:Se.font.family||Re,size:Se.font.size||Ee,color:Se.font.color||Zt};Lt.style({fill:Nt,stroke:Vt}),Rt.text(Ve).call(u.font,qt).call(r.positionText,0,0).call(r.convertToTspans,ue),yt.attr("transform","");var Jt=j(ue,Rt.node()),nr,Mr;if(te==="x"){var Ke=Be.side==="top"?"-":"";Rt.attr("text-anchor","middle").call(r.positionText,0,Be.side==="top"?Xe-Jt.bottom-A-C:Xe-Jt.top+A+C),nr=Be._offset+(Oe.x0+Oe.x1)/2,Mr=Le._offset+(Be.side==="top"?0:Le._length);var Ze=Jt.width/2+C;nr<Ze?(nr=Ze,Lt.attr("d","M-"+(Ze-A)+",0L-"+(Ze-A*2)+","+Ke+A+"H"+(C+Jt.width/2)+"v"+Ke+(C*2+Jt.height)+"H-"+Ze+"V"+Ke+A+"Z")):nr>fe.width-Ze?(nr=fe.width-Ze,Lt.attr("d","M"+(Ze-A)+",0L"+Ze+","+Ke+A+"v"+Ke+(C*2+Jt.height)+"H-"+Ze+"V"+Ke+A+"H"+(Ze-A*2)+"Z")):Lt.attr("d","M0,0L"+A+","+Ke+A+"H"+(C+Jt.width/2)+"v"+Ke+(C*2+Jt.height)+"H-"+(C+Jt.width/2)+"V"+Ke+A+"H-"+A+"Z")}else{var zt,kt,Qt;Le.side==="right"?(zt="start",kt=1,Qt="",nr=Be._offset+Be._length):(zt="end",kt=-1,Qt="-",nr=Be._offset),Mr=Le._offset+(Oe.y0+Oe.y1)/2,Rt.attr("text-anchor",zt),Lt.attr("d","M0,0L"+Qt+A+","+A+"V"+(C+Jt.height/2)+"h"+Qt+(C*2+Jt.width)+"V-"+(C+Jt.height/2)+"H"+Qt+A+"V-"+A+"Z");var cr=Jt.height/2,fr=Xe-Jt.top-cr,ir="clip"+fe._uid+"commonlabel"+Le._id,Yt;if(nr<Jt.width+2*C+A){Yt="M-"+(A+C)+"-"+cr+"h-"+(Jt.width-C)+"V"+cr+"h"+(Jt.width-C)+"Z";var gr=Jt.width-nr+C;r.positionText(Rt,gr,fr),zt==="end"&&Rt.selectAll("tspan").each(function(){var Tr=d.select(this),pr=u.tester.append("text").text(Tr.text()).call(u.font,qt),Kr=j(ue,pr.node());Math.round(Kr.width)<Math.round(Jt.width)&&Tr.attr("x",gr-Kr.width),pr.remove()})}else r.positionText(Rt,kt*(C+A),fr),Yt=null;var yr=fe._topclips.selectAll("#"+ir).data(Yt?[0]:[]);yr.enter().append("clipPath").attr("id",ir).append("path"),yr.exit().remove(),yr.select("path").attr("d",Yt),u.setClipUrl(Rt,Yt?ir:null,ue)}yt.attr("transform",x(nr,Mr))}),b.isUnifiedHover(te)){le.selectAll("g.hovertext").remove();var et=Z.filter(function(yt){return yt.hoverinfo!=="none"});if(et.length===0)return;var Ue=fe.hoverlabel,ze=Ue.font,rt={showlegend:!0,legend:{title:{text:Ve,font:ze},font:ze,bgcolor:Ue.bgcolor,bordercolor:Ue.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:fe.legend?fe.legend.traceorder:void 0,orientation:"v"}},lt={font:ze};E(rt,lt,ue._fullData);var Qe=lt.legend;Qe.entries=[];for(var Fe=0;Fe<et.length;Fe++){var Ce=et[Fe];if(Ce.hoverinfo!=="none"){var pe=H(Ce,!0,te,fe,Ve),we=pe[0],Ae=pe[1];Ce.name=Ae,Ae!==""?Ce.text=Ae+" : "+we:Ce.text=we;var Pe=Ce.cd[Ce.index];Pe&&(Pe.mc&&(Ce.mc=Pe.mc),Pe.mcc&&(Ce.mc=Pe.mcc),Pe.mlc&&(Ce.mlc=Pe.mlc),Pe.mlcc&&(Ce.mlc=Pe.mlcc),Pe.mlw&&(Ce.mlw=Pe.mlw),Pe.mrc&&(Ce.mrc=Pe.mrc),Pe.dir&&(Ce.dir=Pe.dir)),Ce._distinct=!0,Qe.entries.push([Ce])}}Qe.entries.sort(function(yt,Lt){return yt[0].trace.index-Lt[0].trace.index}),Qe.layer=le,Qe._inHover=!0,Qe._groupTitleFont=Ue.grouptitlefont,c(ue,Qe);var Ge=le.select("g.legend"),We=j(ue,Ge.node()),tt=We.width+2*C,ct=We.height+2*C,St=et[0],Pt=(St.x0+St.x1)/2,wt=(St.y0+St.y1)/2,Bt=!(h.traceIs(St.trace,"bar-like")||h.traceIs(St.trace,"box-violin")),Wt,hr;Te==="y"?Bt?(hr=wt-C,Wt=wt+C):(hr=Math.min.apply(null,et.map(function(yt){return Math.min(yt.y0,yt.y1)})),Wt=Math.max.apply(null,et.map(function(yt){return Math.max(yt.y0,yt.y1)}))):hr=Wt=_.mean(et.map(function(yt){return(yt.y0+yt.y1)/2}))-ct/2;var gt,jt;Te==="x"?Bt?(gt=Pt+C,jt=Pt-C):(gt=Math.max.apply(null,et.map(function(yt){return Math.max(yt.x0,yt.x1)})),jt=Math.min.apply(null,et.map(function(yt){return Math.min(yt.x0,yt.x1)}))):gt=jt=_.mean(et.map(function(yt){return(yt.x0+yt.x1)/2}))-tt/2;var Ut=Be._offset,or=Le._offset;Wt+=or,gt+=Ut,jt+=Ut-tt,hr+=or-ct;var ur,dt;return gt+tt<ht&&gt>=0?ur=gt:jt+tt<ht&&jt>=0?ur=jt:Ut+tt<ht?ur=Ut:gt-Pt<Pt-jt+tt?ur=ht-tt:ur=0,ur+=C,Wt+ct<st&&Wt>=0?dt=Wt:hr+ct<st&&hr>=0?dt=hr:or+ct<st?dt=or:Wt-wt<wt-hr+ct?dt=st-ct:dt=0,dt+=C,Ge.attr("transform",x(ur-1,dt-1)),Ge}var ut=le.selectAll("g.hovertext").data(Z,function(yt){return T(yt)});return ut.enter().append("g").classed("hovertext",!0).each(function(){var yt=d.select(this);yt.append("rect").call(i.fill,i.addOpacity(ve,.8)),yt.append("text").classed("name",!0),yt.append("path").style("stroke-width","1px"),yt.append("text").classed("nums",!0).call(u.font,Re,Ee)}),ut.exit().remove(),ut.each(function(yt){var Lt=d.select(this).attr("transform",""),Rt=yt.color;Array.isArray(Rt)&&(Rt=Rt[yt.eventData[0].pointNumber]);var Nt=yt.bgcolor||Rt,Vt=i.combine(i.opacity(Nt)?Nt:i.defaultLine,ve),Zt=i.combine(i.opacity(Rt)?Rt:i.defaultLine,ve),qt=yt.borderColor||i.contrast(Vt),Jt=H(yt,it,te,fe,Ve,Lt),nr=Jt[0],Mr=Jt[1],Ke=Lt.select("text.nums").call(u.font,yt.fontFamily||Re,yt.fontSize||Ee,yt.fontColor||qt).text(nr).attr("data-notex",1).call(r.positionText,0,0).call(r.convertToTspans,ue),Ze=Lt.select("text.name"),zt=0,kt=0;if(Mr&&Mr!==nr){Ze.call(u.font,yt.fontFamily||Re,yt.fontSize||Ee,Zt).text(Mr).attr("data-notex",1).call(r.positionText,0,0).call(r.convertToTspans,ue);var Qt=j(ue,Ze.node());zt=Qt.width+2*C,kt=Qt.height+2*C}else Ze.remove(),Lt.select("rect").remove();Lt.select("path").style({fill:Vt,stroke:qt});var cr=yt.xa._offset+(yt.x0+yt.x1)/2,fr=yt.ya._offset+(yt.y0+yt.y1)/2,ir=Math.abs(yt.x1-yt.x0),Yt=Math.abs(yt.y1-yt.y0),gr=j(ue,Ke.node()),yr=gr.width/fe._invScaleX,Tr=gr.height/fe._invScaleY;yt.ty0=(Xe-gr.top)/fe._invScaleY,yt.bx=yr+2*C,yt.by=Math.max(Tr+2*C,kt),yt.anchor="start",yt.txwidth=yr,yt.tx2width=zt,yt.offset=0;var pr=(yr+A+C+zt)*fe._invScaleX,Kr,Or;if(ne)yt.pos=cr,Kr=fr+Yt/2+pr<=st,Or=fr-Yt/2-pr>=0,(yt.idealAlign==="top"||!Kr)&&Or?(fr-=Yt/2,yt.anchor="end"):Kr?(fr+=Yt/2,yt.anchor="start"):yt.anchor="middle";else if(yt.pos=fr,Kr=cr+ir/2+pr<=ht,Or=cr-ir/2-pr>=0,(yt.idealAlign==="left"||!Kr)&&Or)cr-=ir/2,yt.anchor="end";else if(Kr)cr+=ir/2,yt.anchor="start";else{yt.anchor="middle";var Nr=pr/2,Sn=cr+Nr-ht,Jr=cr-Nr;Sn>0&&(cr-=Sn),Jr<0&&(cr+=-Jr)}Ke.attr("text-anchor",yt.anchor),zt&&Ze.attr("text-anchor",yt.anchor),Lt.attr("transform",x(cr,fr)+(ne?v(l):""))}),ut}function H(Z,Q,ue,fe,te,ne){var ve="",le="";Z.nameOverride!==void 0&&(Z.name=Z.nameOverride),Z.name&&(Z.trace._meta&&(Z.name=_.templateString(Z.name,Z.trace._meta)),ve=re(Z.name,Z.nameLength));var xe=ue.charAt(0),Se=xe==="x"?"y":"x";Z.zLabel!==void 0?(Z.xLabel!==void 0&&(le+="x: "+Z.xLabel+"<br>"),Z.yLabel!==void 0&&(le+="y: "+Z.yLabel+"<br>"),Z.trace.type!=="choropleth"&&Z.trace.type!=="choroplethmapbox"&&(le+=(le?"z: ":"")+Z.zLabel)):Q&&Z[xe+"Label"]===te?le=Z[Se+"Label"]||"":Z.xLabel===void 0?Z.yLabel!==void 0&&Z.trace.type!=="scattercarpet"&&(le=Z.yLabel):Z.yLabel===void 0?le=Z.xLabel:le="("+Z.xLabel+", "+Z.yLabel+")",(Z.text||Z.text===0)&&!Array.isArray(Z.text)&&(le+=(le?"<br>":"")+Z.text),Z.extraText!==void 0&&(le+=(le?"<br>":"")+Z.extraText),ne&&le===""&&!Z.hovertemplate&&(ve===""&&ne.remove(),le=ve);var Re=Z.hovertemplate||!1;if(Re){var Ee=Z.hovertemplateLabels||Z;Z[xe+"Label"]!==te&&(Ee[xe+"other"]=Ee[xe+"Val"],Ee[xe+"otherLabel"]=Ee[xe+"Label"]),le=_.hovertemplateString(Re,Ee,fe._d3locale,Z.eventData[0]||{},Z.trace._meta),le=le.replace(O,function(Oe,Be){return ve=re(Be,Z.nameLength),""})}return[le,ve]}function k(Z,Q,ue){var fe=0,te=1,ne=Z.size(),ve=new Array(ne),le=0;Z.each(function(it){var nt=it[Q],pt=nt._id.charAt(0)==="x",Tt=nt.range;le===0&&Tt&&Tt[0]>Tt[1]!==pt&&(te=-1),ve[le++]=[{datum:it,traceIndex:it.trace.index,dp:0,pos:it.pos,posref:it.posref,size:it.by*(pt?M:1)/2,pmin:0,pmax:pt?ue.width:ue.height}]}),ve.sort(function(it,nt){return it[0].posref-nt[0].posref||te*(nt[0].traceIndex-it[0].traceIndex)});var xe,Se,Re,Ee,Oe,Be,Le;function Te(it){var nt=it[0],pt=it[it.length-1];if(Se=nt.pmin-nt.pos-nt.dp+nt.size,Re=pt.pos+pt.dp+pt.size-nt.pmax,Se>.01){for(Oe=it.length-1;Oe>=0;Oe--)it[Oe].dp+=Se;xe=!1}if(!(Re<.01)){if(Se<-.01){for(Oe=it.length-1;Oe>=0;Oe--)it[Oe].dp-=Re;xe=!1}if(xe){var Tt=0;for(Ee=0;Ee<it.length;Ee++)Be=it[Ee],Be.pos+Be.dp+Be.size>nt.pmax&&Tt++;for(Ee=it.length-1;Ee>=0&&!(Tt<=0);Ee--)Be=it[Ee],Be.pos>nt.pmax-1&&(Be.del=!0,Tt--);for(Ee=0;Ee<it.length&&!(Tt<=0);Ee++)if(Be=it[Ee],Be.pos<nt.pmin+1)for(Be.del=!0,Tt--,Re=Be.size*2,Oe=it.length-1;Oe>=0;Oe--)it[Oe].dp-=Re;for(Ee=it.length-1;Ee>=0&&!(Tt<=0);Ee--)Be=it[Ee],Be.pos+Be.dp+Be.size>nt.pmax&&(Be.del=!0,Tt--)}}}for(;!xe&&fe<=ne;){for(fe++,xe=!0,Ee=0;Ee<ve.length-1;){var De=ve[Ee],Ve=ve[Ee+1],Ye=De[De.length-1],Ne=Ve[0];if(Se=Ye.pos+Ye.dp+Ye.size-Ne.pos-Ne.dp+Ne.size,Se>.01&&Ye.pmin===Ne.pmin&&Ye.pmax===Ne.pmax){for(Oe=Ve.length-1;Oe>=0;Oe--)Ve[Oe].dp+=Se;for(De.push.apply(De,Ve),ve.splice(Ee+1,1),Le=0,Oe=De.length-1;Oe>=0;Oe--)Le+=De[Oe].dp;for(Re=Le/De.length,Oe=De.length-1;Oe>=0;Oe--)De[Oe].dp-=Re;xe=!1}else Ee++}ve.forEach(Te)}for(Ee=ve.length-1;Ee>=0;Ee--){var Xe=ve[Ee];for(Oe=Xe.length-1;Oe>=0;Oe--){var ht=Xe[Oe],st=ht.datum;st.offset=ht.dp,st.del=ht.del}}}function V(Z,Q,ue,fe){var te=function(ve){return ve*ue},ne=function(ve){return ve*fe};Z.each(function(ve){var le=d.select(this);if(ve.del)return le.remove();var xe=le.select("text.nums"),Se=ve.anchor,Re=Se==="end"?-1:1,Ee={start:1,end:-1,middle:0}[Se],Oe=Ee*(A+C),Be=Oe+Ee*(ve.txwidth+C),Le=0,Te=ve.offset,De=Se==="middle";De&&(Oe-=ve.tx2width/2,Be+=ve.txwidth/2+C),Q&&(Te*=-D,Le=ve.offset*L),le.select("path").attr("d",De?"M-"+te(ve.bx/2+ve.tx2width/2)+","+ne(Te-ve.by/2)+"h"+te(ve.bx)+"v"+ne(ve.by)+"h-"+te(ve.bx)+"Z":"M0,0L"+te(Re*A+Le)+","+ne(A+Te)+"v"+ne(ve.by/2-A)+"h"+te(Re*ve.bx)+"v-"+ne(ve.by)+"H"+te(Re*A+Le)+"V"+ne(Te-A)+"Z");var Ve=Le+Oe,Ye=Te+ve.ty0-ve.by/2+C,Ne=ve.textAlign||"auto";Ne!=="auto"&&(Ne==="left"&&Se!=="start"?(xe.attr("text-anchor","start"),Ve=De?-ve.bx/2-ve.tx2width/2+C:-ve.bx-C):Ne==="right"&&Se!=="end"&&(xe.attr("text-anchor","end"),Ve=De?ve.bx/2-ve.tx2width/2-C:ve.bx+C)),xe.call(r.positionText,te(Ve),ne(Ye)),ve.tx2width&&(le.select("text.name").call(r.positionText,te(Be+Ee*C+Le),ne(Te+ve.ty0-ve.by/2+C)),le.select("rect").call(u.setRect,te(Be+(Ee-1)*ve.tx2width/2+Le),ne(Te-ve.by/2-1),te(ve.tx2width),ne(ve.by+2)))})}function G(Z,Q){var ue=Z.index,fe=Z.trace||{},te=Z.cd[0],ne=Z.cd[ue]||{};function ve(Oe){return Oe||P(Oe)&&Oe===0}var le=Array.isArray(ue)?function(Oe,Be){var Le=_.castOption(te,ue,Oe);return ve(Le)?Le:_.extractOption({},fe,"",Be)}:function(Oe,Be){return _.extractOption(ne,fe,Oe,Be)};function xe(Oe,Be,Le){var Te=le(Be,Le);ve(Te)&&(Z[Oe]=Te)}if(xe("hoverinfo","hi","hoverinfo"),xe("bgcolor","hbg","hoverlabel.bgcolor"),xe("borderColor","hbc","hoverlabel.bordercolor"),xe("fontFamily","htf","hoverlabel.font.family"),xe("fontSize","hts","hoverlabel.font.size"),xe("fontColor","htc","hoverlabel.font.color"),xe("nameLength","hnl","hoverlabel.namelength"),xe("textAlign","hta","hoverlabel.align"),Z.posref=Q==="y"||Q==="closest"&&fe.orientation==="h"?Z.xa._offset+(Z.x0+Z.x1)/2:Z.ya._offset+(Z.y0+Z.y1)/2,Z.x0=_.constrain(Z.x0,0,Z.xa._length),Z.x1=_.constrain(Z.x1,0,Z.xa._length),Z.y0=_.constrain(Z.y0,0,Z.ya._length),Z.y1=_.constrain(Z.y1,0,Z.ya._length),Z.xLabelVal!==void 0&&(Z.xLabel="xLabel"in Z?Z.xLabel:g.hoverLabelText(Z.xa,Z.xLabelVal,fe.xhoverformat),Z.xVal=Z.xa.c2d(Z.xLabelVal)),Z.yLabelVal!==void 0&&(Z.yLabel="yLabel"in Z?Z.yLabel:g.hoverLabelText(Z.ya,Z.yLabelVal,fe.yhoverformat),Z.yVal=Z.ya.c2d(Z.yLabelVal)),Z.zLabelVal!==void 0&&Z.zLabel===void 0&&(Z.zLabel=String(Z.zLabelVal)),!isNaN(Z.xerr)&&!(Z.xa.type==="log"&&Z.xerr<=0)){var Se=g.tickText(Z.xa,Z.xa.c2l(Z.xerr),"hover").text;Z.xerrneg!==void 0?Z.xLabel+=" +"+Se+" / -"+g.tickText(Z.xa,Z.xa.c2l(Z.xerrneg),"hover").text:Z.xLabel+=" ± "+Se,Q==="x"&&(Z.distance+=1)}if(!isNaN(Z.yerr)&&!(Z.ya.type==="log"&&Z.yerr<=0)){var Re=g.tickText(Z.ya,Z.ya.c2l(Z.yerr),"hover").text;Z.yerrneg!==void 0?Z.yLabel+=" +"+Re+" / -"+g.tickText(Z.ya,Z.ya.c2l(Z.yerrneg),"hover").text:Z.yLabel+=" ± "+Re,Q==="y"&&(Z.distance+=1)}var Ee=Z.hoverinfo||Z.trace.hoverinfo;return Ee&&Ee!=="all"&&(Ee=Array.isArray(Ee)?Ee:Ee.split("+"),Ee.indexOf("x")===-1&&(Z.xLabel=void 0),Ee.indexOf("y")===-1&&(Z.yLabel=void 0),Ee.indexOf("z")===-1&&(Z.zLabel=void 0),Ee.indexOf("text")===-1&&(Z.text=void 0),Ee.indexOf("name")===-1&&(Z.name=void 0)),Z}function U(Z,Q,ue){var fe=ue.container,te=ue.fullLayout,ne=te._size,ve=ue.event,le=!!Q.hLinePoint,xe=!!Q.vLinePoint,Se,Re;if(fe.selectAll(".spikeline").remove(),!!(xe||le)){var Ee=i.combine(te.plot_bgcolor,te.paper_bgcolor);if(le){var Oe=Q.hLinePoint,Be,Le;Se=Oe&&Oe.xa,Re=Oe&&Oe.ya;var Te=Re.spikesnap;Te==="cursor"?(Be=ve.pointerX,Le=ve.pointerY):(Be=Se._offset+Oe.x,Le=Re._offset+Oe.y);var De=a.readability(Oe.color,Ee)<1.5?i.contrast(Ee):Oe.color,Ve=Re.spikemode,Ye=Re.spikethickness,Ne=Re.spikecolor||De,Xe=g.getPxPosition(Z,Re),ht,st;if(Ve.indexOf("toaxis")!==-1||Ve.indexOf("across")!==-1){if(Ve.indexOf("toaxis")!==-1&&(ht=Xe,st=Be),Ve.indexOf("across")!==-1){var it=Re._counterDomainMin,nt=Re._counterDomainMax;Re.anchor==="free"&&(it=Math.min(it,Re.position),nt=Math.max(nt,Re.position)),ht=ne.l+it*ne.w,st=ne.l+nt*ne.w}fe.insert("line",":first-child").attr({x1:ht,x2:st,y1:Le,y2:Le,"stroke-width":Ye,stroke:Ne,"stroke-dasharray":u.dashStyle(Re.spikedash,Ye)}).classed("spikeline",!0).classed("crisp",!0),fe.insert("line",":first-child").attr({x1:ht,x2:st,y1:Le,y2:Le,"stroke-width":Ye+2,stroke:Ee}).classed("spikeline",!0).classed("crisp",!0)}Ve.indexOf("marker")!==-1&&fe.insert("circle",":first-child").attr({cx:Xe+(Re.side!=="right"?Ye:-Ye),cy:Le,r:Ye,fill:Ne}).classed("spikeline",!0)}if(xe){var pt=Q.vLinePoint,Tt,Et;Se=pt&&pt.xa,Re=pt&&pt.ya;var Dt=Se.spikesnap;Dt==="cursor"?(Tt=ve.pointerX,Et=ve.pointerY):(Tt=Se._offset+pt.x,Et=Re._offset+pt.y);var et=a.readability(pt.color,Ee)<1.5?i.contrast(Ee):pt.color,Ue=Se.spikemode,ze=Se.spikethickness,rt=Se.spikecolor||et,lt=g.getPxPosition(Z,Se),Qe,Fe;if(Ue.indexOf("toaxis")!==-1||Ue.indexOf("across")!==-1){if(Ue.indexOf("toaxis")!==-1&&(Qe=lt,Fe=Et),Ue.indexOf("across")!==-1){var Ce=Se._counterDomainMin,pe=Se._counterDomainMax;Se.anchor==="free"&&(Ce=Math.min(Ce,Se.position),pe=Math.max(pe,Se.position)),Qe=ne.t+(1-pe)*ne.h,Fe=ne.t+(1-Ce)*ne.h}fe.insert("line",":first-child").attr({x1:Tt,x2:Tt,y1:Qe,y2:Fe,"stroke-width":ze,stroke:rt,"stroke-dasharray":u.dashStyle(Se.spikedash,ze)}).classed("spikeline",!0).classed("crisp",!0),fe.insert("line",":first-child").attr({x1:Tt,x2:Tt,y1:Qe,y2:Fe,"stroke-width":ze+2,stroke:Ee}).classed("spikeline",!0).classed("crisp",!0)}Ue.indexOf("marker")!==-1&&fe.insert("circle",":first-child").attr({cx:Tt,cy:lt-(Se.side!=="top"?ze:-ze),r:ze,fill:rt}).classed("spikeline",!0)}}}function Y(Z,Q,ue){if(!ue||ue.length!==Z._hoverdata.length)return!0;for(var fe=ue.length-1;fe>=0;fe--){var te=ue[fe],ne=Z._hoverdata[fe];if(te.curveNumber!==ne.curveNumber||String(te.pointNumber)!==String(ne.pointNumber)||String(te.pointNumbers)!==String(ne.pointNumbers))return!0}return!1}function ee(Z,Q){return!Q||Q.vLinePoint!==Z._spikepoints.vLinePoint||Q.hLinePoint!==Z._spikepoints.hLinePoint}function re(Z,Q){return r.plainText(Z||"",{len:Q,allowedTags:["br","sub","sup","b","i","em"]})}function ie(Z,Q){for(var ue=Q.charAt(0),fe=[],te=[],ne=[],ve=0;ve<Z.length;ve++){var le=Z[ve];h.traceIs(le.trace,"bar-like")||h.traceIs(le.trace,"box-violin")?ne.push(le):le.trace[ue+"period"]?te.push(le):fe.push(le)}return fe.concat(te).concat(ne)}function se(Z,Q,ue){var fe=Q[Z+"a"],te=Q[Z+"Val"],ne=Q.cd[0];if(fe.type==="category"||fe.type==="multicategory")te=fe._categoriesMap[te];else if(fe.type==="date"){var ve=Q.trace[Z+"periodalignment"];if(ve){var le=Q.cd[Q.index],xe=le[Z+"Start"];xe===void 0&&(xe=le[Z]);var Se=le[Z+"End"];Se===void 0&&(Se=le[Z]);var Re=Se-xe;ve==="end"?te+=Re:ve==="middle"&&(te+=Re/2)}te=fe.d2c(te)}return ne&&ne.t&&ne.t.posLetter===fe._id&&(ue.boxmode==="group"||ue.violinmode==="group")&&(te+=ne.t.dPos),te}function ce(Z){return Z.offsetTop+Z.clientTop}function q(Z){return Z.offsetLeft+Z.clientLeft}function j(Z,Q){var ue=Z._fullLayout,fe=Q.getBoundingClientRect(),te=fe.left,ne=fe.top,ve=te+fe.width,le=ne+fe.height,xe=_.apply3DTransform(ue._invTransform)(te,ne),Se=_.apply3DTransform(ue._invTransform)(ve,le),Re=xe[0],Ee=xe[1],Oe=Se[0],Be=Se[1];return{x:Re,y:Ee,width:Oe-Re,height:Be-Ee,top:Math.min(Ee,Be),left:Math.min(Re,Oe),right:Math.max(Re,Oe),bottom:Math.max(Ee,Be)}}},38048:function(z,B,e){var d=e(71828),P=e(7901),a=e(23469).isUnifiedHover;z.exports=function(x,v,y,r){r=r||{};var n=v.legend;function u(i){r.font[i]||(r.font[i]=n?v.legend.font[i]:v.font[i])}v&&a(v.hovermode)&&(r.font||(r.font={}),u("size"),u("family"),u("color"),n?(r.bgcolor||(r.bgcolor=P.combine(v.legend.bgcolor,v.paper_bgcolor)),r.bordercolor||(r.bordercolor=v.legend.bordercolor)):r.bgcolor||(r.bgcolor=v.paper_bgcolor)),y("hoverlabel.bgcolor",r.bgcolor),y("hoverlabel.bordercolor",r.bordercolor),y("hoverlabel.namelength",r.namelength),d.coerceFont(y,"hoverlabel.font",r.font),y("hoverlabel.align",r.align)}},98212:function(z,B,e){var d=e(71828),P=e(528);z.exports=function(_,x){function v(y,r){return x[y]!==void 0?x[y]:d.coerce(_,x,P,y,r)}return v("clickmode"),v("hovermode")}},30211:function(z,B,e){var d=e(39898),P=e(71828),a=e(28569),_=e(23469),x=e(528),v=e(88335);z.exports={moduleType:"component",name:"fx",constants:e(26675),schema:{layout:x},attributes:e(77914),layoutAttributes:x,supplyLayoutGlobalDefaults:e(22774),supplyDefaults:e(54268),supplyLayoutDefaults:e(34938),calc:e(30732),getDistanceFunction:_.getDistanceFunction,getClosest:_.getClosest,inbox:_.inbox,quadrature:_.quadrature,appendArrayPointValue:_.appendArrayPointValue,castHoverOption:r,castHoverinfo:n,hover:v.hover,unhover:a.unhover,loneHover:v.loneHover,loneUnhover:y,click:e(75914)};function y(u){var i=P.isD3Selection(u)?u:d.select(u);i.selectAll("g.hovertext").remove(),i.selectAll(".spikeline").remove()}function r(u,i,f){return P.castOption(u,i,"hoverlabel."+f)}function n(u,i,f){function g(h){return P.coerceHoverinfo({hoverinfo:h},{_module:u._module},i)}return P.castOption(u,f,"hoverinfo",g)}},528:function(z,B,e){var d=e(26675),P=e(41940),a=P({editType:"none"});a.family.dflt=d.HOVERFONT,a.size.dflt=d.HOVERFONTSIZE,z.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:a,grouptitlefont:P({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},34938:function(z,B,e){var d=e(71828),P=e(528),a=e(98212),_=e(38048);z.exports=function(v,y){function r(h,b){return d.coerce(v,y,P,h,b)}var n=a(v,y);n&&(r("hoverdistance"),r("spikedistance"));var u=r("dragmode");u==="select"&&r("selectdirection");var i=y._has("mapbox"),f=y._has("geo"),g=y._basePlotModules.length;y.dragmode==="zoom"&&((i||f)&&g===1||i&&f&&g===2)&&(y.dragmode="pan"),_(v,y,r),d.coerceFont(r,"hoverlabel.grouptitlefont",y.hoverlabel.font)}},22774:function(z,B,e){var d=e(71828),P=e(38048),a=e(528);z.exports=function(x,v){function y(r,n){return d.coerce(x,v,a,r,n)}P(x,v,y)}},83312:function(z,B,e){var d=e(71828),P=e(30587).counter,a=e(27670).Y,_=e(85555).idRegex,x=e(44467),v={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[P("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[_.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[_.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:a({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function y(f,g,h){var b=g[h+"axes"],p=Object.keys((f._splomAxes||{})[h]||{});if(Array.isArray(b))return b;if(p.length)return p}function r(f,g){var h=f.grid||{},b=y(g,h,"x"),p=y(g,h,"y");if(!f.grid&&!b&&!p)return;var E=Array.isArray(h.subplots)&&Array.isArray(h.subplots[0]),c=Array.isArray(b),l=Array.isArray(p),m=c&&b!==h.xaxes&&l&&p!==h.yaxes,M,L;E?(M=h.subplots.length,L=h.subplots[0].length):(l&&(M=p.length),c&&(L=b.length));var D=x.newContainer(g,"grid");function A(V,G){return d.coerce(h,D,v,V,G)}var C=A("rows",M),S=A("columns",L);if(!(C*S>1)){delete g.grid;return}if(!E&&!c&&!l){var o=A("pattern")==="independent";o&&(E=!0)}D._hasSubplotGrid=E;var R=A("roworder"),T=R==="top to bottom",O=E?.2:.1,N=E?.3:.1,H,k;m&&g._splomGridDflt&&(H=g._splomGridDflt.xside,k=g._splomGridDflt.yside),D._domains={x:n("x",A,O,H,S),y:n("y",A,N,k,C,T)}}function n(f,g,h,b,p,E){var c=g(f+"gap",h),l=g("domain."+f);g(f+"side",b);for(var m=new Array(p),M=l[0],L=(l[1]-M)/(p-c),D=L*(1-c),A=0;A<p;A++){var C=M+L*A;m[E?p-1-A:A]=[C,C+D]}return m}function u(f,g){var h=g.grid;if(!(!h||!h._domains)){var b=f.grid||{},p=g._subplots,E=h._hasSubplotGrid,c=h.rows,l=h.columns,m=h.pattern==="independent",M,L,D,A,C,S,o,R=h._axisMap={};if(E){var T=b.subplots||[];S=h.subplots=new Array(c);var O=1;for(M=0;M<c;M++){var N=S[M]=new Array(l),H=T[M]||[];for(L=0;L<l;L++)if(m?(C=O===1?"xy":"x"+O+"y"+O,O++):C=H[L],N[L]="",p.cartesian.indexOf(C)!==-1){if(o=C.indexOf("y"),D=C.slice(0,o),A=C.slice(o),R[D]!==void 0&&R[D]!==L||R[A]!==void 0&&R[A]!==M)continue;N[L]=C,R[D]=L,R[A]=M}}}else{var k=y(g,b,"x"),V=y(g,b,"y");h.xaxes=i(k,p.xaxis,l,R,"x"),h.yaxes=i(V,p.yaxis,c,R,"y")}var G=h._anchors={},U=h.roworder==="top to bottom";for(var Y in R){var ee=Y.charAt(0),re=h[ee+"side"],ie,se,ce;if(re.length<8)G[Y]="free";else if(ee==="x"){if(re.charAt(0)==="t"===U?(ie=0,se=1,ce=c):(ie=c-1,se=-1,ce=-1),E){var q=R[Y];for(M=ie;M!==ce;M+=se)if(C=S[M][q],!!C&&(o=C.indexOf("y"),C.slice(0,o)===Y)){G[Y]=C.slice(o);break}}else for(M=ie;M!==ce;M+=se)if(A=h.yaxes[M],p.cartesian.indexOf(Y+A)!==-1){G[Y]=A;break}}else if(re.charAt(0)==="l"?(ie=0,se=1,ce=l):(ie=l-1,se=-1,ce=-1),E){var j=R[Y];for(M=ie;M!==ce;M+=se)if(C=S[j][M],!!C&&(o=C.indexOf("y"),C.slice(o)===Y)){G[Y]=C.slice(0,o);break}}else for(M=ie;M!==ce;M+=se)if(D=h.xaxes[M],p.cartesian.indexOf(D+Y)!==-1){G[Y]=D;break}}}}function i(f,g,h,b,p){var E=new Array(h),c;function l(m,M){g.indexOf(M)!==-1&&b[M]===void 0?(E[m]=M,b[M]=m):E[m]=""}if(Array.isArray(f))for(c=0;c<h;c++)l(c,f[c]);else for(l(0,p),c=1;c<h;c++)l(c,p+(c+1));return E}z.exports={moduleType:"component",name:"grid",schema:{layout:{grid:v}},layoutAttributes:v,sizeDefaults:r,contentDefaults:u}},69819:function(z,B,e){var d=e(85555),P=e(44467).templatedArray;e(24695),z.exports=P("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",d.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",d.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})},75378:function(z,B,e){var d=e(92770),P=e(58163);z.exports=function(_,x,v,y){x=x||{};var r=v==="log"&&x.type==="linear",n=v==="linear"&&x.type==="log";if(r||n){for(var u=_._fullLayout.images,i=x._id.charAt(0),f,g,h=0;h<u.length;h++)if(f=u[h],g="images["+h+"].",f[i+"ref"]===x._id){var b=f[i],p=f["size"+i],E=null,c=null;if(r){E=P(b,x.range);var l=p/Math.pow(10,E)/2;c=2*Math.log(l+Math.sqrt(1+l*l))/Math.LN10}else E=Math.pow(10,b),c=E*(Math.pow(10,p/2)-Math.pow(10,-p/2));d(E)?d(c)||(c=null):(E=null,c=null),y(g+i,E),y(g+"size"+i,c)}}}},81603:function(z,B,e){var d=e(71828),P=e(89298),a=e(85501),_=e(69819),x="images";z.exports=function(r,n){var u={name:x,handleItemDefaults:v};a(r,n,u)};function v(y,r,n){function u(l,m){return d.coerce(y,r,_,l,m)}var i=u("source"),f=u("visible",!!i);if(!f)return r;u("layer"),u("xanchor"),u("yanchor"),u("sizex"),u("sizey"),u("sizing"),u("opacity");for(var g={_fullLayout:n},h=["x","y"],b=0;b<2;b++){var p=h[b],E=P.coerceRef(y,r,g,p,"paper",void 0);if(E!=="paper"){var c=P.getFromId(g,E);c._imgIndices.push(r._index)}P.coercePosition(r,g,u,E,p,0)}return r}},80750:function(z,B,e){var d=e(39898),P=e(91424),a=e(89298),_=e(41675),x=e(77922);z.exports=function(y){var r=y._fullLayout,n=[],u={},i=[],f,g;for(g=0;g<r.images.length;g++){var h=r.images[g];if(h.visible)if(h.layer==="below"&&h.xref!=="paper"&&h.yref!=="paper"){f=_.ref2id(h.xref)+_.ref2id(h.yref);var b=r._plots[f];if(!b){i.push(h);continue}b.mainplot&&(f=b.mainplot.id),u[f]||(u[f]=[]),u[f].push(h)}else h.layer==="above"?n.push(h):i.push(h)}var p={x:{left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-1/2},right:{sizing:"xMax",offset:-1}},y:{top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-1/2},bottom:{sizing:"YMax",offset:-1}}};function E(A){var C=d.select(this);if(this._imgSrc!==A.source)if(C.attr("xmlns",x.svg),A.source&&A.source.slice(0,5)==="data:")C.attr("xlink:href",A.source),this._imgSrc=A.source;else{var S=new Promise(function(o){var R=new Image;this.img=R,R.setAttribute("crossOrigin","anonymous"),R.onerror=T,R.onload=function(){var O=document.createElement("canvas");O.width=this.width,O.height=this.height;var N=O.getContext("2d",{willReadFrequently:!0});N.drawImage(this,0,0);var H=O.toDataURL("image/png");C.attr("xlink:href",H),o()},C.on("error",T),R.src=A.source,this._imgSrc=A.source;function T(){C.remove(),o()}}.bind(this));y._promises.push(S)}}function c(A){var C=d.select(this),S=a.getFromId(y,A.xref),o=a.getFromId(y,A.yref),R=a.getRefType(A.xref)==="domain",T=a.getRefType(A.yref)==="domain",O=r._size,N,H;S!==void 0?N=typeof A.xref=="string"&&R?S._length*A.sizex:Math.abs(S.l2p(A.sizex)-S.l2p(0)):N=A.sizex*O.w,o!==void 0?H=typeof A.yref=="string"&&T?o._length*A.sizey:Math.abs(o.l2p(A.sizey)-o.l2p(0)):H=A.sizey*O.h;var k=N*p.x[A.xanchor].offset,V=H*p.y[A.yanchor].offset,G=p.x[A.xanchor].sizing+p.y[A.yanchor].sizing,U,Y;switch(S!==void 0?U=typeof A.xref=="string"&&R?S._length*A.x+S._offset:S.r2p(A.x)+S._offset:U=A.x*O.w+O.l,U+=k,o!==void 0?Y=typeof A.yref=="string"&&T?o._length*(1-A.y)+o._offset:o.r2p(A.y)+o._offset:Y=O.h-A.y*O.h+O.t,Y+=V,A.sizing){case"fill":G+=" slice";break;case"stretch":G="none";break}C.attr({x:U,y:Y,width:N,height:H,preserveAspectRatio:G,opacity:A.opacity});var ee=S&&a.getRefType(A.xref)!=="domain"?S._id:"",re=o&&a.getRefType(A.yref)!=="domain"?o._id:"",ie=ee+re;P.setClipUrl(C,ie?"clip"+r._uid+ie:null,y)}var l=r._imageLowerLayer.selectAll("image").data(i),m=r._imageUpperLayer.selectAll("image").data(n);l.enter().append("image"),m.enter().append("image"),l.exit().remove(),m.exit().remove(),l.each(function(A){E.bind(this)(A),c.bind(this)(A)}),m.each(function(A){E.bind(this)(A),c.bind(this)(A)});var M=Object.keys(r._plots);for(g=0;g<M.length;g++){f=M[g];var L=r._plots[f];if(L.imagelayer){var D=L.imagelayer.selectAll("image").data(u[f]||[]);D.enter().append("image"),D.exit().remove(),D.each(function(A){E.bind(this)(A),c.bind(this)(A)})}}}},68804:function(z,B,e){z.exports={moduleType:"component",name:"images",layoutAttributes:e(69819),supplyLayoutDefaults:e(81603),includeBasePlot:e(76325)("images"),draw:e(80750),convertCoords:e(75378)}},33030:function(z,B,e){var d=e(41940),P=e(22399);z.exports={bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:P.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:d({editType:"legend"}),grouptitlefont:d({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},x:{valType:"number",min:-2,max:3,editType:"legend"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",min:-2,max:3,editType:"legend"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:d({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left"],editType:"legend"},editType:"legend"},editType:"legend"}},14928:function(z){z.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}},99017:function(z,B,e){var d=e(73972),P=e(71828),a=e(44467),_=e(9012),x=e(33030),v=e(10820),y=e(10130);z.exports=function(n,u,i){var f=n.legend||{},g=a.newContainer(u,"legend");function h(H,k){return P.coerce(f,g,x,H,k)}for(var b,p=function(H,k){var V=b._input,G=b;return P.coerce(V,G,_,H,k)},E=u.font||{},c=P.coerceFont(h,"grouptitlefont",P.extendFlat({},E,{size:Math.round(E.size*1.1)})),l=0,m=!1,M="normal",L=0;L<i.length;L++)b=i[L],b.visible&&((b.showlegend||b._dfltShowLegend&&!(b._module&&b._module.attributes&&b._module.attributes.showlegend&&b._module.attributes.showlegend.dflt===!1))&&(l++,b.showlegend&&(m=!0,(d.traceIs(b,"pie-like")||b._input.showlegend===!0)&&l++),P.coerceFont(p,"legendgrouptitle.font",c)),(d.traceIs(b,"bar")&&u.barmode==="stack"||["tonextx","tonexty"].indexOf(b.fill)!==-1)&&(M=y.isGrouped({traceorder:M})?"grouped+reversed":"reversed"),b.legendgroup!==void 0&&b.legendgroup!==""&&(M=y.isReversed({traceorder:M})?"reversed+grouped":"grouped"));var D=P.coerce(n,u,v,"showlegend",m&&l>1);if(D===!1&&(u.legend=void 0),!(D===!1&&!f.uirevision)&&(h("uirevision",u.uirevision),D!==!1)){h("bgcolor",u.paper_bgcolor),h("bordercolor"),h("borderwidth");var A=P.coerceFont(h,"font",u.font),C=h("orientation"),S=C==="h",o,R,T;S?(o=0,d.getComponentMethod("rangeslider","isVisible")(n.xaxis)?(R=1.1,T="bottom"):(R=-.1,T="top")):(o=1.02,R=1,T="auto"),h("traceorder",M),y.isGrouped(u.legend)&&h("tracegroupgap"),h("entrywidth"),h("entrywidthmode"),h("itemsizing"),h("itemwidth"),h("itemclick"),h("itemdoubleclick"),h("groupclick"),h("x",o),h("xanchor"),h("y",R),h("yanchor",T),h("valign"),P.noneOrAll(f,g,["x","y"]);var O=h("title.text");if(O){h("title.side",S?"left":"top");var N=P.extendFlat({},A,{size:P.bigFont(A.size)});P.coerceFont(h,"title.font",N)}}}},43969:function(z,B,e){var d=e(39898),P=e(71828),a=e(74875),_=e(73972),x=e(11086),v=e(28569),y=e(91424),r=e(7901),n=e(63893),u=e(85167),i=e(14928),f=e(18783),g=f.LINE_SPACING,h=f.FROM_TL,b=f.FROM_BR,p=e(82424),E=e(53630),c=e(10130),l=1;z.exports=function(V,G){return G||(G=V._fullLayout.legend||{}),m(V,G)};function m(k,V){var G=k._fullLayout,U="legend"+G._uid,Y,ee=V._inHover;if(ee?(Y=V.layer,U+="-hover"):Y=G._infolayer,!!Y){k._legendMouseDownTime||(k._legendMouseDownTime=0);var re;if(ee){if(!V.entries)return;re=p(V.entries,V)}else{if(!k.calcdata)return;re=G.showlegend&&p(k.calcdata,V)}var ie=G.hiddenlabels||[];if(!ee&&(!G.showlegend||!re.length))return Y.selectAll(".legend").remove(),G._topdefs.select("#"+U).remove(),a.autoMargin(k,"legend");var se=P.ensureSingle(Y,"g","legend",function(ne){ee||ne.attr("pointer-events","all")}),ce=P.ensureSingleById(G._topdefs,"clipPath",U,function(ne){ne.append("rect")}),q=P.ensureSingle(se,"rect","bg",function(ne){ne.attr("shape-rendering","crispEdges")});q.call(r.stroke,V.bordercolor).call(r.fill,V.bgcolor).style("stroke-width",V.borderwidth+"px");var j=P.ensureSingle(se,"g","scrollbox"),Z=V.title;if(V._titleWidth=0,V._titleHeight=0,Z.text){var Q=P.ensureSingle(j,"text","legendtitletext");Q.attr("text-anchor","start").call(y.font,Z.font).text(Z.text),S(Q,j,k,V,l)}else j.selectAll(".legendtitletext").remove();var ue=P.ensureSingle(se,"rect","scrollbar",function(ne){ne.attr(i.scrollBarEnterAttrs).call(r.fill,i.scrollBarColor)}),fe=j.selectAll("g.groups").data(re);fe.enter().append("g").attr("class","groups"),fe.exit().remove();var te=fe.selectAll("g.traces").data(P.identity);te.enter().append("g").attr("class","traces"),te.exit().remove(),te.style("opacity",function(ne){var ve=ne[0].trace;return _.traceIs(ve,"pie-like")?ie.indexOf(ne[0].label)!==-1?.5:1:ve.visible==="legendonly"?.5:1}).each(function(){d.select(this).call(D,k,V)}).call(E,k,V).each(function(){ee||d.select(this).call(C,k)}),P.syncOrAsync([a.previousPromises,function(){return T(k,fe,te,V)},function(){var ne=G._size,ve=V.borderwidth;if(!ee){var le=O(k);if(le)return;var xe=ne.l+ne.w*V.x-h[N(V)]*V._width,Se=ne.t+ne.h*(1-V.y)-h[H(V)]*V._effHeight;if(G.margin.autoexpand){var Re=xe,Ee=Se;xe=P.constrain(xe,0,G.width-V._width),Se=P.constrain(Se,0,G.height-V._effHeight),xe!==Re&&P.log("Constrain legend.x to make legend fit inside graph"),Se!==Ee&&P.log("Constrain legend.y to make legend fit inside graph")}y.setTranslate(se,xe,Se)}if(ue.on(".drag",null),se.on("wheel",null),ee||V._height<=V._maxHeight||k._context.staticPlot){var Oe=V._effHeight;ee&&(Oe=V._height),q.attr({width:V._width-ve,height:Oe-ve,x:ve/2,y:ve/2}),y.setTranslate(j,0,0),ce.select("rect").attr({width:V._width-2*ve,height:Oe-2*ve,x:ve,y:ve}),y.setClipUrl(j,U,k),y.setRect(ue,0,0,0,0),delete V._scrollY}else{var Be=Math.max(i.scrollBarMinHeight,V._effHeight*V._effHeight/V._height),Le=V._effHeight-Be-2*i.scrollBarMargin,Te=V._height-V._effHeight,De=Le/Te,Ve=Math.min(V._scrollY||0,Te);q.attr({width:V._width-2*ve+i.scrollBarWidth+i.scrollBarMargin,height:V._effHeight-ve,x:ve/2,y:ve/2}),ce.select("rect").attr({width:V._width-2*ve+i.scrollBarWidth+i.scrollBarMargin,height:V._effHeight-2*ve,x:ve,y:ve+Ve}),y.setClipUrl(j,U,k),pt(Ve,Be,De),se.on("wheel",function(){Ve=P.constrain(V._scrollY+d.event.deltaY/Le*Te,0,Te),pt(Ve,Be,De),Ve!==0&&Ve!==Te&&d.event.preventDefault()});var Ye,Ne,Xe,ht=function(Ue,ze,rt){var lt=(rt-ze)/De+Ue;return P.constrain(lt,0,Te)},st=function(Ue,ze,rt){var lt=(ze-rt)/De+Ue;return P.constrain(lt,0,Te)},it=d.behavior.drag().on("dragstart",function(){var Ue=d.event.sourceEvent;Ue.type==="touchstart"?Ye=Ue.changedTouches[0].clientY:Ye=Ue.clientY,Xe=Ve}).on("drag",function(){var Ue=d.event.sourceEvent;Ue.buttons===2||Ue.ctrlKey||(Ue.type==="touchmove"?Ne=Ue.changedTouches[0].clientY:Ne=Ue.clientY,Ve=ht(Xe,Ye,Ne),pt(Ve,Be,De))});ue.call(it);var nt=d.behavior.drag().on("dragstart",function(){var Ue=d.event.sourceEvent;Ue.type==="touchstart"&&(Ye=Ue.changedTouches[0].clientY,Xe=Ve)}).on("drag",function(){var Ue=d.event.sourceEvent;Ue.type==="touchmove"&&(Ne=Ue.changedTouches[0].clientY,Ve=st(Xe,Ye,Ne),pt(Ve,Be,De))});j.call(nt)}function pt(Ue,ze,rt){V._scrollY=k._fullLayout.legend._scrollY=Ue,y.setTranslate(j,0,-Ue),y.setRect(ue,V._width,i.scrollBarMargin+Ue*rt,i.scrollBarWidth,ze),ce.select("rect").attr("y",ve+Ue)}if(k._context.edits.legendPosition){var Tt,Et,Dt,et;se.classed("cursor-move",!0),v.init({element:se.node(),gd:k,prepFn:function(){var Ue=y.getTranslate(se);Dt=Ue.x,et=Ue.y},moveFn:function(Ue,ze){var rt=Dt+Ue,lt=et+ze;y.setTranslate(se,rt,lt),Tt=v.align(rt,0,ne.l,ne.l+ne.w,V.xanchor),Et=v.align(lt,0,ne.t+ne.h,ne.t,V.yanchor)},doneFn:function(){Tt!==void 0&&Et!==void 0&&_.call("_guiRelayout",k,{"legend.x":Tt,"legend.y":Et})},clickFn:function(Ue,ze){var rt=Y.selectAll("g.traces").filter(function(){var lt=this.getBoundingClientRect();return ze.clientX>=lt.left&&ze.clientX<=lt.right&&ze.clientY>=lt.top&&ze.clientY<=lt.bottom});rt.size()>0&&L(k,se,rt,Ue,ze)}})}}],k)}}function M(k,V,G){var U=k[0],Y=U.width,ee=V.entrywidthmode,re=U.trace.legendwidth||V.entrywidth;return ee==="fraction"?V._maxWidth*re:G+(re||Y)}function L(k,V,G,U,Y){var ee=G.data()[0][0].trace,re={event:Y,node:G.node(),curveNumber:ee.index,expandedIndex:ee._expandedIndex,data:k.data,layout:k.layout,frames:k._transitionData._frames,config:k._context,fullData:k._fullData,fullLayout:k._fullLayout};ee._group&&(re.group=ee._group),_.traceIs(ee,"pie-like")&&(re.label=G.datum()[0].label);var ie=x.triggerHandler(k,"plotly_legendclick",re);if(ie!==!1){if(U===1)V._clickTimeout=setTimeout(function(){k._fullLayout&&u(G,k,U)},k._context.doubleClickDelay);else if(U===2){V._clickTimeout&&clearTimeout(V._clickTimeout),k._legendMouseDownTime=0;var se=x.triggerHandler(k,"plotly_legenddoubleclick",re);se!==!1&&u(G,k,U)}}}function D(k,V,G){var U=k.data()[0][0],Y=U.trace,ee=_.traceIs(Y,"pie-like"),re=!G._inHover&&V._context.edits.legendText&&!ee,ie=G._maxNameLength,se,ce;U.groupTitle?(se=U.groupTitle.text,ce=U.groupTitle.font):(ce=G.font,G.entries?se=U.text:(se=ee?U.label:Y.name,Y._meta&&(se=P.templateString(se,Y._meta))));var q=P.ensureSingle(k,"text","legendtext");q.attr("text-anchor","start").call(y.font,ce).text(re?A(se,ie):se);var j=G.itemwidth+i.itemGap*2;n.positionText(q,j,0),re?q.call(n.makeEditable,{gd:V,text:se}).call(S,k,V,G).on("edit",function(Z){this.text(A(Z,ie)).call(S,k,V,G);var Q=U.trace._fullInput||{},ue={};if(_.hasTransform(Q,"groupby")){var fe=_.getTransformIndices(Q,"groupby"),te=fe[fe.length-1],ne=P.keyedContainer(Q,"transforms["+te+"].styles","target","value.name");ne.set(U.trace._group,Z),ue=ne.constructUpdate()}else ue.name=Z;return _.call("_guiRestyle",V,ue,Y.index)}):S(q,k,V,G)}function A(k,V){var G=Math.max(4,V);if(k&&k.trim().length>=G/2)return k;k=k||"";for(var U=G-k.length;U>0;U--)k+=" ";return k}function C(k,V){var G=V._context.doubleClickDelay,U,Y=1,ee=P.ensureSingle(k,"rect","legendtoggle",function(re){V._context.staticPlot||re.style("cursor","pointer").attr("pointer-events","all"),re.call(r.fill,"rgba(0,0,0,0)")});V._context.staticPlot||(ee.on("mousedown",function(){U=new Date().getTime(),U-V._legendMouseDownTime<G?Y+=1:(Y=1,V._legendMouseDownTime=U)}),ee.on("mouseup",function(){if(!(V._dragged||V._editing)){var re=V._fullLayout.legend;new Date().getTime()-V._legendMouseDownTime>G&&(Y=Math.max(Y-1,1)),L(V,re,k,Y,d.event)}}))}function S(k,V,G,U,Y){U._inHover&&k.attr("data-notex",!0),n.convertToTspans(k,G,function(){o(V,G,U,Y)})}function o(k,V,G,U){var Y=k.data()[0][0];if(!G._inHover&&Y&&!Y.trace.showlegend){k.remove();return}var ee=k.select("g[class*=math-group]"),re=ee.node();G||(G=V._fullLayout.legend);var ie=G.borderwidth,se;U===l?se=G.title.font:Y.groupTitle?se=Y.groupTitle.font:se=G.font;var ce=se.size*g,q,j;if(re){var Z=y.bBox(re);q=Z.height,j=Z.width,U===l?y.setTranslate(ee,ie,ie+q*.75):y.setTranslate(ee,0,q*.25)}else{var Q=k.select(U===l?".legendtitletext":".legendtext"),ue=n.lineCount(Q),fe=Q.node();if(q=ce*ue,j=fe?y.bBox(fe).width:0,U===l)G.title.side==="left"&&(j+=i.itemGap*2),n.positionText(Q,ie+i.titlePad,ie+ce);else{var te=i.itemGap*2+G.itemwidth;Y.groupTitle&&(te=i.itemGap,j-=G.itemwidth),n.positionText(Q,te,-ce*((ue-1)/2-.3))}}U===l?(G._titleWidth=j,G._titleHeight=q):(Y.lineHeight=ce,Y.height=Math.max(q,16)+3,Y.width=j)}function R(k){var V=0,G=0,U=k.title.side;return U&&(U.indexOf("left")!==-1&&(V=k._titleWidth),U.indexOf("top")!==-1&&(G=k._titleHeight)),[V,G]}function T(k,V,G,U){var Y=k._fullLayout;U||(U=Y.legend);var ee=Y._size,re=c.isVertical(U),ie=c.isGrouped(U),se=U.entrywidthmode==="fraction",ce=U.borderwidth,q=2*ce,j=i.itemGap,Z=U.itemwidth+j*2,Q=2*(ce+j),ue=H(U),fe=U.y<0||U.y===0&&ue==="top",te=U.y>1||U.y===1&&ue==="bottom",ne=U.tracegroupgap,ve={};U._maxHeight=Math.max(fe||te?Y.height/2:ee.h,30);var le=0;U._width=0,U._height=0;var xe=R(U);if(re)G.each(function(Dt){var et=Dt[0].height;y.setTranslate(this,ce+xe[0],ce+xe[1]+U._height+et/2+j),U._height+=et,U._width=Math.max(U._width,Dt[0].width)}),le=Z+U._width,U._width+=j+Z+q,U._height+=Q,ie&&(V.each(function(Dt,et){y.setTranslate(this,0,et*U.tracegroupgap)}),U._height+=(U._lgroupsLength-1)*U.tracegroupgap);else{var Se=N(U),Re=U.x<0||U.x===0&&Se==="right",Ee=U.x>1||U.x===1&&Se==="left",Oe=te||fe,Be=Y.width/2;U._maxWidth=Math.max(Re?Oe&&Se==="left"?ee.l+ee.w:Be:Ee?Oe&&Se==="right"?ee.r+ee.w:Be:ee.w,2*Z);var Le=0,Te=0;G.each(function(Dt){var et=M(Dt,U,Z);Le=Math.max(Le,et),Te+=et}),le=null;var De=0;if(ie){var Ve=0,Ye=0,Ne=0;V.each(function(){var Dt=0,et=0;d.select(this).selectAll("g.traces").each(function(ze){var rt=M(ze,U,Z),lt=ze[0].height;y.setTranslate(this,xe[0],xe[1]+ce+j+lt/2+et),et+=lt,Dt=Math.max(Dt,rt),ve[ze[0].trace.legendgroup]=Dt});var Ue=Dt+j;Ye>0&&Ue+ce+Ye>U._maxWidth?(De=Math.max(De,Ye),Ye=0,Ne+=Ve+ne,Ve=et):Ve=Math.max(Ve,et),y.setTranslate(this,Ye,Ne),Ye+=Ue}),U._width=Math.max(De,Ye)+ce,U._height=Ne+Ve+Q}else{var Xe=G.size(),ht=Te+q+(Xe-1)*j<U._maxWidth,st=0,it=0,nt=0,pt=0;G.each(function(Dt){var et=Dt[0].height,Ue=M(Dt,U,Z),ze=ht?Ue:Le;se||(ze+=j),ze+ce+it-j>=U._maxWidth&&(De=Math.max(De,pt),it=0,nt+=st,U._height+=st,st=0),y.setTranslate(this,xe[0]+ce+it,xe[1]+ce+nt+et/2+j),pt=it+Ue+j,it+=ze,st=Math.max(st,et)}),ht?(U._width=it+q,U._height=st+Q):(U._width=Math.max(De,pt)+q,U._height+=st+Q)}}U._width=Math.ceil(Math.max(U._width+xe[0],U._titleWidth+2*(ce+i.titlePad))),U._height=Math.ceil(Math.max(U._height+xe[1],U._titleHeight+2*(ce+i.itemGap))),U._effHeight=Math.min(U._height,U._maxHeight);var Tt=k._context.edits,Et=Tt.legendText||Tt.legendPosition;G.each(function(Dt){var et=d.select(this).select(".legendtoggle"),Ue=Dt[0].height,ze=Dt[0].trace.legendgroup,rt=M(Dt,U,Z);ie&&ze!==""&&(rt=ve[ze]);var lt=Et?Z:le||rt;!re&&!se&&(lt+=j/2),y.setRect(et,0,-Ue/2,lt,Ue)})}function O(k){var V=k._fullLayout,G=V.legend,U=N(G),Y=H(G);return a.autoMargin(k,"legend",{x:G.x,y:G.y,l:G._width*h[U],r:G._width*b[U],b:G._effHeight*b[Y],t:G._effHeight*h[Y]})}function N(k){return P.isRightAnchor(k)?"right":P.isCenterAnchor(k)?"center":"left"}function H(k){return P.isBottomAnchor(k)?"bottom":P.isMiddleAnchor(k)?"middle":"top"}},82424:function(z,B,e){var d=e(73972),P=e(10130);z.exports=function(_,x){var v=x._inHover,y=P.isGrouped(x),r=P.isReversed(x),n={},u=[],i=!1,f={},g=0,h=0,b,p;function E(V,G){if(V===""||!P.isGrouped(x)){var U="~~i"+g;u.push(U),n[U]=[G],g++}else u.indexOf(V)===-1?(u.push(V),i=!0,n[V]=[G]):n[V].push(G)}for(b=0;b<_.length;b++){var c=_[b],l=c[0],m=l.trace,M=m.legendgroup;if(!(!v&&(!m.visible||!m.showlegend)))if(d.traceIs(m,"pie-like"))for(f[M]||(f[M]={}),p=0;p<c.length;p++){var L=c[p].label;f[M][L]||(E(M,{label:L,color:c[p].color,i:c[p].i,trace:m,pts:c[p].pts}),f[M][L]=!0,h=Math.max(h,(L||"").length))}else E(M,l),h=Math.max(h,(m.name||"").length)}if(!u.length)return[];var D=!i||!y,A=[];for(b=0;b<u.length;b++){var C=n[u[b]];D?A.push(C[0]):A.push(C)}for(D&&(A=[A]),b=0;b<A.length;b++){var S=1/0;for(p=0;p<A[b].length;p++){var o=A[b][p].trace.legendrank;S>o&&(S=o)}A[b][0]._groupMinRank=S,A[b][0]._preGroupSort=b}var R=function(V,G){return V[0]._groupMinRank-G[0]._groupMinRank||V[0]._preGroupSort-G[0]._preGroupSort},T=function(V,G){return V.trace.legendrank-G.trace.legendrank||V._preSort-G._preSort};for(A.forEach(function(V,G){V[0]._preGroupSort=G}),A.sort(R),b=0;b<A.length;b++){A[b].forEach(function(V,G){V._preSort=G}),A[b].sort(T);var O=A[b][0].trace,N=null;for(p=0;p<A[b].length;p++){var H=A[b][p].trace.legendgrouptitle;if(H&&H.text){N=H,v&&(H.font=x._groupTitleFont);break}}if(r&&A[b].reverse(),N){var k=!1;for(p=0;p<A[b].length;p++)if(d.traceIs(A[b][p].trace,"pie-like")){k=!0;break}A[b].unshift({i:-1,groupTitle:N,noClick:k,trace:{showlegend:O.showlegend,legendgroup:O.legendgroup,visible:x.groupclick==="toggleitem"?!0:O.visible}})}for(p=0;p<A[b].length;p++)A[b][p]=[A[b][p]]}return x._lgroupsLength=A.length,x._maxNameLength=h,A}},85167:function(z,B,e){var d=e(71828),P=e(73972),a=!0;z.exports=function(x,v,y){var r=v._fullLayout;if(v._dragged||v._editing)return;var n=r.legend.itemclick,u=r.legend.itemdoubleclick,i=r.legend.groupclick;y===1&&n==="toggle"&&u==="toggleothers"&&a&&v.data&&v._context.showTips&&d.notifier(d._(v,"Double-click on legend to isolate one trace"),"long"),a=!1;var f;if(y===1?f=n:y===2&&(f=u),!f)return;var g=i==="togglegroup",h=r.hiddenlabels?r.hiddenlabels.slice():[],b=x.data()[0][0];if(b.groupTitle&&b.noClick)return;var p=v._fullData,E=b.trace,c=E.legendgroup,l,m,M,L,D,A,C={},S=[],o=[],R=[];function T(j,Z,Q){var ue=S.indexOf(j),fe=C[Z];return fe||(fe=C[Z]=[]),S.indexOf(j)===-1&&(S.push(j),ue=S.length-1),fe[ue]=Q,ue}function O(j,Z){if(!(b.groupTitle&&!g)){var Q=j._fullInput;if(P.hasTransform(Q,"groupby")){var ue=o[Q.index];if(!ue){var fe=P.getTransformIndices(Q,"groupby"),te=fe[fe.length-1];ue=d.keyedContainer(Q,"transforms["+te+"].styles","target","value.visible"),o[Q.index]=ue}var ne=ue.get(j._group);ne===void 0&&(ne=!0),ne!==!1&&ue.set(j._group,Z),R[Q.index]=T(Q.index,"visible",Q.visible!==!1)}else{var ve=Q.visible===!1?!1:Z;T(Q.index,"visible",ve)}}}if(P.traceIs(E,"pie-like")){var N=b.label,H=h.indexOf(N);f==="toggle"?H===-1?h.push(N):h.splice(H,1):f==="toggleothers"&&(h=[],v.calcdata[0].forEach(function(j){N!==j.label&&h.push(j.label)}),v._fullLayout.hiddenlabels&&v._fullLayout.hiddenlabels.length===h.length&&H===-1&&(h=[])),P.call("_guiRelayout",v,"hiddenlabels",h)}else{var k=c&&c.length,V=[],G;if(k)for(l=0;l<p.length;l++)G=p[l],G.visible&&G.legendgroup===c&&V.push(l);if(f==="toggle"){var U;switch(E.visible){case!0:U="legendonly";break;case!1:U=!1;break;case"legendonly":U=!0;break}if(k)if(g)for(l=0;l<p.length;l++)p[l].visible!==!1&&p[l].legendgroup===c&&O(p[l],U);else O(E,U);else O(E,U)}else if(f==="toggleothers"){var Y,ee,re,ie,se=!0;for(l=0;l<p.length;l++)if(Y=p[l]===E,re=p[l].showlegend!==!0,!(Y||re)&&(ee=k&&p[l].legendgroup===c,!ee&&p[l].visible===!0&&!P.traceIs(p[l],"notLegendIsolatable"))){se=!1;break}for(l=0;l<p.length;l++)if(p[l].visible!==!1&&!P.traceIs(p[l],"notLegendIsolatable"))switch(E.visible){case"legendonly":O(p[l],!0);break;case!0:ie=se?!0:"legendonly",Y=p[l]===E,re=p[l].showlegend!==!0&&!p[l].legendgroup,ee=Y||k&&p[l].legendgroup===c,O(p[l],ee||re?!0:ie);break}}for(l=0;l<o.length;l++)if(M=o[l],!!M){var ce=M.constructUpdate(),q=Object.keys(ce);for(m=0;m<q.length;m++)L=q[m],A=C[L]=C[L]||[],A[R[l]]=ce[L]}for(D=Object.keys(C),l=0;l<D.length;l++)for(L=D[l],m=0;m<S.length;m++)C[L].hasOwnProperty(m)||(C[L][m]=void 0);P.call("_guiRestyle",v,C,S)}}},10130:function(z,B){B.isGrouped=function(d){return(d.traceorder||"").indexOf("grouped")!==-1},B.isVertical=function(d){return d.orientation!=="h"},B.isReversed=function(d){return(d.traceorder||"").indexOf("reversed")!==-1}},2199:function(z,B,e){z.exports={moduleType:"component",name:"legend",layoutAttributes:e(33030),supplyLayoutDefaults:e(99017),draw:e(43969),style:e(53630)}},53630:function(z,B,e){var d=e(39898),P=e(73972),a=e(71828),_=a.strTranslate,x=e(91424),v=e(7901),y=e(52075).extractOpts,r=e(34098),n=e(63463),u=e(53581).castOption,i=e(14928),f=12,g=5,h=2,b=10,p=5;z.exports=function(M,L,D){var A=L._fullLayout;D||(D=A.legend);var C=D.itemsizing==="constant",S=D.itemwidth,o=(S+i.itemGap*2)/2,R=_(o,0),T=function(q,j,Z,Q){var ue;if(q+1)ue=q;else if(j&&j.width>0)ue=j.width;else return 0;return C?Q:Math.min(ue,Z)};M.each(function(q){var j=d.select(this),Z=a.ensureSingle(j,"g","layers");Z.style("opacity",q[0].trace.opacity);var Q=D.valign,ue=q[0].lineHeight,fe=q[0].height;if(Q==="middle"||!ue||!fe)Z.attr("transform",null);else{var te={top:1,bottom:-1}[Q],ne=te*(.5*(ue-fe+3));Z.attr("transform",_(0,ne))}var ve=Z.selectAll("g.legendfill").data([q]);ve.enter().append("g").classed("legendfill",!0);var le=Z.selectAll("g.legendlines").data([q]);le.enter().append("g").classed("legendlines",!0);var xe=Z.selectAll("g.legendsymbols").data([q]);xe.enter().append("g").classed("legendsymbols",!0),xe.selectAll("g.legendpoints").data([q]).enter().append("g").classed("legendpoints",!0)}).each(ce).each(H).each(V).each(k).each(U).each(ie).each(re).each(O).each(N).each(Y).each(ee);function O(q){var j=c(q),Z=j.showFill,Q=j.showLine,ue=j.showGradientLine,fe=j.showGradientFill,te=j.anyFill,ne=j.anyLine,ve=q[0],le=ve.trace,xe,Se,Re=y(le),Ee=Re.colorscale,Oe=Re.reversescale,Be=function(Xe){if(Xe.size())if(Z)x.fillGroupStyle(Xe,L);else{var ht="legendfill-"+le.uid;x.gradient(Xe,L,ht,E(Oe),Ee,"fill")}},Le=function(Xe){if(Xe.size()){var ht="legendline-"+le.uid;x.lineGroupStyle(Xe),x.gradient(Xe,L,ht,E(Oe),Ee,"stroke")}},Te=r.hasMarkers(le)||!te?"M5,0":ne?"M5,-2":"M5,-3",De=d.select(this),Ve=De.select(".legendfill").selectAll("path").data(Z||fe?[q]:[]);if(Ve.enter().append("path").classed("js-fill",!0),Ve.exit().remove(),Ve.attr("d",Te+"h"+S+"v6h-"+S+"z").call(Be),Q||ue){var Ye=T(void 0,le.line,b,g);Se=a.minExtend(le,{line:{width:Ye}}),xe=[a.minExtend(ve,{trace:Se})]}var Ne=De.select(".legendlines").selectAll("path").data(Q||ue?[xe]:[]);Ne.enter().append("path").classed("js-line",!0),Ne.exit().remove(),Ne.attr("d",Te+(ue?"l"+S+",0.0001":"h"+S)).call(Q?x.lineGroupStyle:Le)}function N(q){var j=c(q),Z=j.anyFill,Q=j.anyLine,ue=j.showLine,fe=j.showMarker,te=q[0],ne=te.trace,ve=!fe&&!Q&&!Z&&r.hasText(ne),le,xe;function Se(Ve,Ye,Ne,Xe){var ht=a.nestedProperty(ne,Ve).get(),st=a.isArrayOrTypedArray(ht)&&Ye?Ye(ht):ht;if(C&&st&&Xe!==void 0&&(st=Xe),Ne){if(st<Ne[0])return Ne[0];if(st>Ne[1])return Ne[1]}return st}function Re(Ve){return te._distinct&&te.index&&Ve[te.index]?Ve[te.index]:Ve[0]}if(fe||ve||ue){var Ee={},Oe={};if(fe){Ee.mc=Se("marker.color",Re),Ee.mx=Se("marker.symbol",Re),Ee.mo=Se("marker.opacity",a.mean,[.2,1]),Ee.mlc=Se("marker.line.color",Re),Ee.mlw=Se("marker.line.width",a.mean,[0,5],h),Oe.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var Be=Se("marker.size",a.mean,[2,16],f);Ee.ms=Be,Oe.marker.size=Be}ue&&(Oe.line={width:Se("line.width",Re,[0,10],g)}),ve&&(Ee.tx="Aa",Ee.tp=Se("textposition",Re),Ee.ts=10,Ee.tc=Se("textfont.color",Re),Ee.tf=Se("textfont.family",Re)),le=[a.minExtend(te,Ee)],xe=a.minExtend(ne,Oe),xe.selectedpoints=null,xe.texttemplate=null}var Le=d.select(this).select("g.legendpoints"),Te=Le.selectAll("path.scatterpts").data(fe?le:[]);Te.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",R),Te.exit().remove(),Te.call(x.pointStyle,xe,L),fe&&(le[0].mrc=3);var De=Le.selectAll("g.pointtext").data(ve?le:[]);De.enter().append("g").classed("pointtext",!0).append("text").attr("transform",R),De.exit().remove(),De.selectAll("text").call(x.textPointStyle,xe,L)}function H(q){var j=q[0].trace,Z=j.type==="waterfall";if(q[0]._distinct&&Z){var Q=q[0].trace[q[0].dir].marker;return q[0].mc=Q.color,q[0].mlw=Q.line.width,q[0].mlc=Q.line.color,G(q,this,"waterfall")}var ue=[];j.visible&&Z&&(ue=q[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 fe=d.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(ue);fe.enter().append("path").classed("legendwaterfall",!0).attr("transform",R).style("stroke-miterlimit",1),fe.exit().remove(),fe.each(function(te){var ne=d.select(this),ve=j[te[0]].marker,le=T(void 0,ve.line,p,h);ne.attr("d",te[1]).style("stroke-width",le+"px").call(v.fill,ve.color),le&&ne.call(v.stroke,ve.line.color)})}function k(q){G(q,this)}function V(q){G(q,this,"funnel")}function G(q,j,Z){var Q=q[0].trace,ue=Q.marker||{},fe=ue.line||{},te=Z?Q.visible&&Q.type===Z:P.traceIs(Q,"bar"),ne=d.select(j).select("g.legendpoints").selectAll("path.legend"+Z).data(te?[q]:[]);ne.enter().append("path").classed("legend"+Z,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",R),ne.exit().remove(),ne.each(function(ve){var le=d.select(this),xe=ve[0],Se=T(xe.mlw,ue.line,p,h);le.style("stroke-width",Se+"px");var Re=xe.mcc;if(!D._inHover&&"mc"in xe){var Ee=y(ue),Oe=Ee.mid;Oe===void 0&&(Oe=(Ee.max+Ee.min)/2),Re=x.tryColorscale(ue,"")(Oe)}var Be=Re||xe.mc||ue.color,Le=ue.pattern,Te=Le&&x.getPatternAttr(Le.shape,0,"");if(Te){var De=x.getPatternAttr(Le.bgcolor,0,null),Ve=x.getPatternAttr(Le.fgcolor,0,null),Ye=Le.fgopacity,Ne=l(Le.size,8,10),Xe=l(Le.solidity,.5,1),ht="legend-"+Q.uid;le.call(x.pattern,"legend",L,ht,Te,Ne,Xe,Re,Le.fillmode,De,Ve,Ye)}else le.call(v.fill,Be);Se&&v.stroke(le,xe.mlc||fe.color)})}function U(q){var j=q[0].trace,Z=d.select(this).select("g.legendpoints").selectAll("path.legendbox").data(j.visible&&P.traceIs(j,"box-violin")?[q]:[]);Z.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",R),Z.exit().remove(),Z.each(function(){var Q=d.select(this);if((j.boxpoints==="all"||j.points==="all")&&v.opacity(j.fillcolor)===0&&v.opacity((j.line||{}).color)===0){var ue=a.minExtend(j,{marker:{size:C?f:a.constrain(j.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});Z.call(x.pointStyle,ue,L)}else{var fe=T(void 0,j.line,p,h);Q.style("stroke-width",fe+"px").call(v.fill,j.fillcolor),fe&&v.stroke(Q,j.line.color)}})}function Y(q){var j=q[0].trace,Z=d.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(j.visible&&j.type==="candlestick"?[q,q]:[]);Z.enter().append("path").classed("legendcandle",!0).attr("d",function(Q,ue){return ue?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",R).style("stroke-miterlimit",1),Z.exit().remove(),Z.each(function(Q,ue){var fe=d.select(this),te=j[ue?"increasing":"decreasing"],ne=T(void 0,te.line,p,h);fe.style("stroke-width",ne+"px").call(v.fill,te.fillcolor),ne&&v.stroke(fe,te.line.color)})}function ee(q){var j=q[0].trace,Z=d.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(j.visible&&j.type==="ohlc"?[q,q]:[]);Z.enter().append("path").classed("legendohlc",!0).attr("d",function(Q,ue){return ue?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",R).style("stroke-miterlimit",1),Z.exit().remove(),Z.each(function(Q,ue){var fe=d.select(this),te=j[ue?"increasing":"decreasing"],ne=T(void 0,te.line,p,h);fe.style("fill","none").call(x.dashLine,te.line.dash,ne),ne&&v.stroke(fe,te.line.color)})}function re(q){se(q,this,"pie")}function ie(q){se(q,this,"funnelarea")}function se(q,j,Z){var Q=q[0],ue=Q.trace,fe=Z?ue.visible&&ue.type===Z:P.traceIs(ue,Z),te=d.select(j).select("g.legendpoints").selectAll("path.legend"+Z).data(fe?[q]:[]);if(te.enter().append("path").classed("legend"+Z,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",R),te.exit().remove(),te.size()){var ne=(ue.marker||{}).line,ve=T(u(ne.width,Q.pts),ne,p,h),le=a.minExtend(ue,{marker:{line:{width:ve}}});le.marker.line.color=ne.color;var xe=a.minExtend(Q,{trace:le});n(te,xe,le)}}function ce(q){var j=q[0].trace,Z,Q=[];if(j.visible)switch(j.type){case"histogram2d":case"heatmap":Q=[["M-15,-2V4H15V-2Z"]],Z=!0;break;case"choropleth":case"choroplethmapbox":Q=[["M-6,-6V6H6V-6Z"]],Z=!0;break;case"densitymapbox":Q=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],Z="radial";break;case"cone":Q=[["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"]],Z=!1;break;case"streamtube":Q=[["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"]],Z=!1;break;case"surface":Q=[["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"]],Z=!0;break;case"mesh3d":Q=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],Z=!1;break;case"volume":Q=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],Z=!0;break;case"isosurface":Q=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],Z=!1;break}var ue=d.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(Q);ue.enter().append("path").classed("legend3dandfriends",!0).attr("transform",R).style("stroke-miterlimit",1),ue.exit().remove(),ue.each(function(fe,te){var ne=d.select(this),ve=y(j),le=ve.colorscale,xe=ve.reversescale,Se=function(Be){if(Be.size()){var Le="legendfill-"+j.uid;x.gradient(Be,L,Le,E(xe,Z==="radial"),le,"fill")}},Re;if(le){if(!Z){var Oe=le.length;Re=te===0?le[xe?Oe-1:0][1]:te===1?le[xe?0:Oe-1][1]:le[Math.floor((Oe-1)/2)][1]}}else{var Ee=j.vertexcolor||j.facecolor||j.color;Re=a.isArrayOrTypedArray(Ee)?Ee[te]||Ee[0]:Ee}ne.attr("d",fe[0]),Re?ne.call(v.fill,Re):ne.call(Se)})}};function E(m,M){var L=M?"radial":"horizontal";return L+(m?"":"reversed")}function c(m){var M=m[0].trace,L=M.contours,D=r.hasLines(M),A=r.hasMarkers(M),C=M.visible&&M.fill&&M.fill!=="none",S=!1,o=!1;if(L){var R=L.coloring;R==="lines"?S=!0:D=R==="none"||R==="heatmap"||L.showlines,L.type==="constraint"?C=L._operation!=="=":(R==="fill"||R==="heatmap")&&(o=!0)}return{showMarker:A,showLine:D,showFill:C,showGradientLine:S,showGradientFill:o,anyLine:D||S,anyFill:C||o}}function l(m,M,L){return m&&a.isArrayOrTypedArray(m)?M:m>L?L:m}},42068:function(z,B,e){e(93348),z.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},26023:function(z,B,e){var d=e(73972),P=e(74875),a=e(41675),_=e(24255),x=e(34031).eraseActiveShape,v=e(71828),y=v._,r=z.exports={};r.toImage={name:"toImage",title:function(m){var M=m._context.toImageButtonOptions||{},L=M.format||"png";return L==="png"?y(m,"Download plot as a png"):y(m,"Download plot")},icon:_.camera,click:function(m){var M=m._context.toImageButtonOptions,L={format:M.format||"png"};v.notifier(y(m,"Taking snapshot - this may take a few seconds"),"long"),L.format!=="svg"&&v.isIE()&&(v.notifier(y(m,"IE only supports svg. Changing format to svg."),"long"),L.format="svg"),["filename","width","height","scale"].forEach(function(D){D in M&&(L[D]=M[D])}),d.call("downloadImage",m,L).then(function(D){v.notifier(y(m,"Snapshot succeeded")+" - "+D,"long")}).catch(function(){v.notifier(y(m,"Sorry, there was a problem downloading your snapshot!"),"long")})}},r.sendDataToCloud={name:"sendDataToCloud",title:function(m){return y(m,"Edit in Chart Studio")},icon:_.disk,click:function(m){P.sendDataToCloud(m)}},r.editInChartStudio={name:"editInChartStudio",title:function(m){return y(m,"Edit in Chart Studio")},icon:_.pencil,click:function(m){P.sendDataToCloud(m)}},r.zoom2d={name:"zoom2d",_cat:"zoom",title:function(m){return y(m,"Zoom")},attr:"dragmode",val:"zoom",icon:_.zoombox,click:n},r.pan2d={name:"pan2d",_cat:"pan",title:function(m){return y(m,"Pan")},attr:"dragmode",val:"pan",icon:_.pan,click:n},r.select2d={name:"select2d",_cat:"select",title:function(m){return y(m,"Box Select")},attr:"dragmode",val:"select",icon:_.selectbox,click:n},r.lasso2d={name:"lasso2d",_cat:"lasso",title:function(m){return y(m,"Lasso Select")},attr:"dragmode",val:"lasso",icon:_.lasso,click:n},r.drawclosedpath={name:"drawclosedpath",title:function(m){return y(m,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:_.drawclosedpath,click:n},r.drawopenpath={name:"drawopenpath",title:function(m){return y(m,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:_.drawopenpath,click:n},r.drawline={name:"drawline",title:function(m){return y(m,"Draw line")},attr:"dragmode",val:"drawline",icon:_.drawline,click:n},r.drawrect={name:"drawrect",title:function(m){return y(m,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:_.drawrect,click:n},r.drawcircle={name:"drawcircle",title:function(m){return y(m,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:_.drawcircle,click:n},r.eraseshape={name:"eraseshape",title:function(m){return y(m,"Erase active shape")},icon:_.eraseshape,click:x},r.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(m){return y(m,"Zoom in")},attr:"zoom",val:"in",icon:_.zoom_plus,click:n},r.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(m){return y(m,"Zoom out")},attr:"zoom",val:"out",icon:_.zoom_minus,click:n},r.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(m){return y(m,"Autoscale")},attr:"zoom",val:"auto",icon:_.autoscale,click:n},r.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(m){return y(m,"Reset axes")},attr:"zoom",val:"reset",icon:_.home,click:n},r.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(m){return y(m,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:_.tooltip_basic,gravity:"ne",click:n},r.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(m){return y(m,"Compare data on hover")},attr:"hovermode",val:function(m){return m._fullLayout._isHoriz?"y":"x"},icon:_.tooltip_compare,gravity:"ne",click:n};function n(m,M){var L=M.currentTarget,D=L.getAttribute("data-attr"),A=L.getAttribute("data-val")||!0,C=m._fullLayout,S={},o=a.list(m,null,!0),R=C._cartesianSpikesEnabled,T,O;if(D==="zoom"){var N=A==="in"?.5:2,H=(1+N)/2,k=(1-N)/2,V;for(O=0;O<o.length;O++)if(T=o[O],!T.fixedrange)if(V=T._name,A==="auto")S[V+".autorange"]=!0;else if(A==="reset"){if(T._rangeInitial===void 0)S[V+".autorange"]=!0;else{var G=T._rangeInitial.slice();S[V+".range[0]"]=G[0],S[V+".range[1]"]=G[1]}T._showSpikeInitial!==void 0&&(S[V+".showspikes"]=T._showSpikeInitial,R==="on"&&!T._showSpikeInitial&&(R="off"))}else{var U=[T.r2l(T.range[0]),T.r2l(T.range[1])],Y=[H*U[0]+k*U[1],H*U[1]+k*U[0]];S[V+".range[0]"]=T.l2r(Y[0]),S[V+".range[1]"]=T.l2r(Y[1])}}else D==="hovermode"&&(A==="x"||A==="y")&&(A=C._isHoriz?"y":"x",L.setAttribute("data-val",A)),S[D]=A;C._cartesianSpikesEnabled=R,d.call("_guiRelayout",m,S)}r.zoom3d={name:"zoom3d",_cat:"zoom",title:function(m){return y(m,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:_.zoombox,click:u},r.pan3d={name:"pan3d",_cat:"pan",title:function(m){return y(m,"Pan")},attr:"scene.dragmode",val:"pan",icon:_.pan,click:u},r.orbitRotation={name:"orbitRotation",title:function(m){return y(m,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:_["3d_rotate"],click:u},r.tableRotation={name:"tableRotation",title:function(m){return y(m,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:_["z-axis"],click:u};function u(m,M){for(var L=M.currentTarget,D=L.getAttribute("data-attr"),A=L.getAttribute("data-val")||!0,C=m._fullLayout._subplots.gl3d||[],S={},o=D.split("."),R=0;R<C.length;R++)S[C[R]+"."+o[1]]=A;var T=A==="pan"?A:"zoom";S.dragmode=T,d.call("_guiRelayout",m,S)}r.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(m){return y(m,"Reset camera to default")},attr:"resetDefault",icon:_.home,click:i},r.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(m){return y(m,"Reset camera to last save")},attr:"resetLastSave",icon:_.movie,click:i};function i(m,M){for(var L=M.currentTarget,D=L.getAttribute("data-attr"),A=D==="resetLastSave",C=D==="resetDefault",S=m._fullLayout,o=S._subplots.gl3d||[],R={},T=0;T<o.length;T++){var O=o[T],N=O+".camera",H=O+".aspectratio",k=O+".aspectmode",V=S[O]._scene,G;A?(R[N+".up"]=V.viewInitial.up,R[N+".eye"]=V.viewInitial.eye,R[N+".center"]=V.viewInitial.center,G=!0):C&&(R[N+".up"]=null,R[N+".eye"]=null,R[N+".center"]=null,G=!0),G&&(R[H+".x"]=V.viewInitial.aspectratio.x,R[H+".y"]=V.viewInitial.aspectratio.y,R[H+".z"]=V.viewInitial.aspectratio.z,R[k]=V.viewInitial.aspectmode)}d.call("_guiRelayout",m,R)}r.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(m){return y(m,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:_.tooltip_basic,gravity:"ne",click:g};function f(m,M){var L=M.currentTarget,D=L._previousVal,A=m._fullLayout,C=A._subplots.gl3d||[],S=["xaxis","yaxis","zaxis"],o={},R={};if(D)R=D,L._previousVal=null;else{for(var T=0;T<C.length;T++){var O=C[T],N=A[O],H=O+".hovermode";o[H]=N.hovermode,R[H]=!1;for(var k=0;k<3;k++){var V=S[k],G=O+"."+V+".showspikes";R[G]=!1,o[G]=N[V].showspikes}}L._previousVal=o}return R}function g(m,M){var L=f(m,M);d.call("_guiRelayout",m,L)}r.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(m){return y(m,"Zoom in")},attr:"zoom",val:"in",icon:_.zoom_plus,click:h},r.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(m){return y(m,"Zoom out")},attr:"zoom",val:"out",icon:_.zoom_minus,click:h},r.resetGeo={name:"resetGeo",_cat:"reset",title:function(m){return y(m,"Reset")},attr:"reset",val:null,icon:_.autoscale,click:h},r.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(m){return y(m,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:_.tooltip_basic,gravity:"ne",click:p};function h(m,M){for(var L=M.currentTarget,D=L.getAttribute("data-attr"),A=L.getAttribute("data-val")||!0,C=m._fullLayout,S=C._subplots.geo||[],o=0;o<S.length;o++){var R=S[o],T=C[R];if(D==="zoom"){var O=T.projection.scale,N=A==="in"?2*O:.5*O;d.call("_guiRelayout",m,R+".projection.scale",N)}}D==="reset"&&l(m,"geo")}r.hoverClosestGl2d={name:"hoverClosestGl2d",_cat:"hoverclosest",title:function(m){return y(m,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:_.tooltip_basic,gravity:"ne",click:p},r.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(m){return y(m,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:_.tooltip_basic,gravity:"ne",click:p};function b(m){var M=m._fullLayout;return M.hovermode?!1:M._has("cartesian")?M._isHoriz?"y":"x":"closest"}function p(m){var M=b(m);d.call("_guiRelayout",m,"hovermode",M)}r.resetViewSankey={name:"resetSankeyGroup",title:function(m){return y(m,"Reset view")},icon:_.home,click:function(m){for(var M={"node.groups":[],"node.x":[],"node.y":[]},L=0;L<m._fullData.length;L++){var D=m._fullData[L]._viewInitial;M["node.groups"].push(D.node.groups.slice()),M["node.x"].push(D.node.x.slice()),M["node.y"].push(D.node.y.slice())}d.call("restyle",m,M)}},r.toggleHover={name:"toggleHover",title:function(m){return y(m,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:_.tooltip_basic,gravity:"ne",click:function(m,M){var L=f(m,M);L.hovermode=b(m),d.call("_guiRelayout",m,L)}},r.resetViews={name:"resetViews",title:function(m){return y(m,"Reset views")},icon:_.home,click:function(m,M){var L=M.currentTarget;L.setAttribute("data-attr","zoom"),L.setAttribute("data-val","reset"),n(m,M),L.setAttribute("data-attr","resetLastSave"),i(m,M),l(m,"geo"),l(m,"mapbox")}},r.toggleSpikelines={name:"toggleSpikelines",title:function(m){return y(m,"Toggle Spike Lines")},icon:_.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(m){var M=m._fullLayout,L=M._cartesianSpikesEnabled;M._cartesianSpikesEnabled=L==="on"?"off":"on",d.call("_guiRelayout",m,E(m))}};function E(m){for(var M=m._fullLayout,L=M._cartesianSpikesEnabled==="on",D=a.list(m,null,!0),A={},C=0;C<D.length;C++){var S=D[C];A[S._name+".showspikes"]=L?!0:S._showSpikeInitial}return A}r.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(m){return y(m,"Reset view")},attr:"reset",icon:_.home,click:function(m){l(m,"mapbox")}},r.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(m){return y(m,"Zoom in")},attr:"zoom",val:"in",icon:_.zoom_plus,click:c},r.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(m){return y(m,"Zoom out")},attr:"zoom",val:"out",icon:_.zoom_minus,click:c};function c(m,M){for(var L=M.currentTarget,D=L.getAttribute("data-val"),A=m._fullLayout,C=A._subplots.mapbox||[],S=1.05,o={},R=0;R<C.length;R++){var T=C[R],O=A[T].zoom,N=D==="in"?S*O:O/S;o[T+".zoom"]=N}d.call("_guiRelayout",m,o)}function l(m,M){for(var L=m._fullLayout,D=L._subplots[M]||[],A={},C=0;C<D.length;C++)for(var S=D[C],o=L[S]._subplot,R=o.viewInitial,T=Object.keys(R),O=0;O<T.length;O++){var N=T[O];A[S+"."+N]=R[N]}d.call("_guiRelayout",m,A)}},93348:function(z,B,e){var d=e(26023),P=Object.keys(d),a=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],_=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(a),x=[],v=function(y){if(_.indexOf(y._cat||y.name)===-1){var r=y.name,n=(y._cat||y.name).toLowerCase();x.indexOf(r)===-1&&x.push(r),x.indexOf(n)===-1&&x.push(n)}};P.forEach(function(y){v(d[y])}),x.sort(),z.exports={DRAW_MODES:a,backButtons:_,foreButtons:x}},35750:function(z,B,e){var d=e(71828),P=e(7901),a=e(44467),_=e(42068);z.exports=function(v,y){var r=v.modebar||{},n=a.newContainer(y,"modebar");function u(f,g){return d.coerce(r,n,_,f,g)}u("orientation"),u("bgcolor",P.addOpacity(y.paper_bgcolor,.5));var i=P.contrast(P.rgb(y.modebar.bgcolor));u("color",P.addOpacity(i,.3)),u("activecolor",P.addOpacity(i,.7)),u("uirevision",y.uirevision),u("add"),u("remove")}},64168:function(z,B,e){z.exports={moduleType:"component",name:"modebar",layoutAttributes:e(42068),supplyLayoutDefaults:e(35750),manage:e(14192)}},14192:function(z,B,e){var d=e(41675),P=e(34098),a=e(73972),_=e(23469).isUnifiedHover,x=e(37676),v=e(26023),y=e(93348).DRAW_MODES,r=e(71828).extendDeep;z.exports=function(p){var E=p._fullLayout,c=p._context,l=E._modeBar;if(!c.displayModeBar&&!c.watermark){l&&(l.destroy(),delete E._modeBar);return}if(!Array.isArray(c.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(c.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var m=c.modeBarButtons,M;Array.isArray(m)&&m.length?M=h(m):!c.displayModeBar&&c.watermark?M=[]:M=n(p),l?l.update(p,M):E._modeBar=x(p,M)};function n(b){var p=b._fullLayout,E=b._fullData,c=b._context;function l(te,ne){if(typeof ne=="string"){if(ne.toLowerCase()===te.toLowerCase())return!0}else{var ve=ne.name,le=ne._cat||ne.name;if(ve===te||le===te.toLowerCase())return!0}return!1}var m=p.modebar.add;typeof m=="string"&&(m=[m]);var M=p.modebar.remove;typeof M=="string"&&(M=[M]);var L=c.modeBarButtonsToAdd.concat(m.filter(function(te){for(var ne=0;ne<c.modeBarButtonsToRemove.length;ne++)if(l(te,c.modeBarButtonsToRemove[ne]))return!1;return!0})),D=c.modeBarButtonsToRemove.concat(M.filter(function(te){for(var ne=0;ne<c.modeBarButtonsToAdd.length;ne++)if(l(te,c.modeBarButtonsToAdd[ne]))return!1;return!0})),A=p._has("cartesian"),C=p._has("gl3d"),S=p._has("geo"),o=p._has("pie"),R=p._has("funnelarea"),T=p._has("gl2d"),O=p._has("ternary"),N=p._has("mapbox"),H=p._has("polar"),k=p._has("smith"),V=p._has("sankey"),G=u(p),U=_(p.hovermode),Y=[];function ee(te){if(te.length){for(var ne=[],ve=0;ve<te.length;ve++){for(var le=te[ve],xe=v[le],Se=xe.name.toLowerCase(),Re=(xe._cat||xe.name).toLowerCase(),Ee=!1,Oe=0;Oe<D.length;Oe++){var Be=D[Oe].toLowerCase();if(Be===Se||Be===Re){Ee=!0;break}}Ee||ne.push(v[le])}Y.push(ne)}}var re=["toImage"];c.showEditInChartStudio?re.push("editInChartStudio"):c.showSendToCloud&&re.push("sendDataToCloud"),ee(re);var ie=[],se=[],ce=[],q=[];(A||T||o||R||O)+S+C+N+H+k>1?(se=["toggleHover"],ce=["resetViews"]):S?(ie=["zoomInGeo","zoomOutGeo"],se=["hoverClosestGeo"],ce=["resetGeo"]):C?(se=["hoverClosest3d"],ce=["resetCameraDefault3d","resetCameraLastSave3d"]):N?(ie=["zoomInMapbox","zoomOutMapbox"],se=["toggleHover"],ce=["resetViewMapbox"]):T?se=["hoverClosestGl2d"]:o?se=["hoverClosestPie"]:V?(se=["hoverClosestCartesian","hoverCompareCartesian"],ce=["resetViewSankey"]):se=["toggleHover"],A&&(se=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(f(E)||U)&&(se=[]),(A||T)&&!G&&(ie=["zoomIn2d","zoomOut2d","autoScale2d"],ce[0]!=="resetViews"&&(ce=["resetScale2d"])),C?q=["zoom3d","pan3d","orbitRotation","tableRotation"]:(A||T)&&!G||O?q=["zoom2d","pan2d"]:N||S?q=["pan2d"]:H&&(q=["zoom2d"]),i(E)&&q.push("select2d","lasso2d");var j=[],Z=function(te){j.indexOf(te)===-1&&se.indexOf(te)!==-1&&j.push(te)};if(Array.isArray(L)){for(var Q=[],ue=0;ue<L.length;ue++){var fe=L[ue];typeof fe=="string"?(fe=fe.toLowerCase(),y.indexOf(fe)!==-1?(p._has("mapbox")||p._has("cartesian"))&&q.push(fe):fe==="togglespikelines"?Z("toggleSpikelines"):fe==="togglehover"?Z("toggleHover"):fe==="hovercompare"?Z("hoverCompareCartesian"):fe==="hoverclosest"?(Z("hoverClosestCartesian"),Z("hoverClosestGeo"),Z("hoverClosest3d"),Z("hoverClosestGl2d"),Z("hoverClosestPie")):fe==="v1hovermode"&&(Z("toggleHover"),Z("hoverClosestCartesian"),Z("hoverCompareCartesian"),Z("hoverClosestGeo"),Z("hoverClosest3d"),Z("hoverClosestGl2d"),Z("hoverClosestPie"))):Q.push(fe)}L=Q}return ee(q),ee(ie.concat(ce)),ee(j),g(Y,L)}function u(b){for(var p=d.list({_fullLayout:b},null,!0),E=0;E<p.length;E++)if(!p[E].fixedrange)return!1;return!0}function i(b){for(var p=!1,E=0;E<b.length&&!p;E++){var c=b[E];!c._module||!c._module.selectPoints||(a.traceIs(c,"scatter-like")?(P.hasMarkers(c)||P.hasText(c))&&(p=!0):a.traceIs(c,"box-violin")?(c.boxpoints==="all"||c.points==="all")&&(p=!0):p=!0)}return p}function f(b){for(var p=0;p<b.length;p++)if(!a.traceIs(b[p],"noHover"))return!1;return!0}function g(b,p){if(p.length)if(Array.isArray(p[0]))for(var E=0;E<p.length;E++)b.push(p[E]);else b.push(p);return b}function h(b){for(var p=r([],b),E=0;E<p.length;E++)for(var c=p[E],l=0;l<c.length;l++){var m=c[l];if(typeof m=="string")if(v[m]!==void 0)p[E][l]=v[m];else throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "))}return p}},37676:function(z,B,e){var d=e(39898),P=e(92770),a=e(71828),_=e(24255),x=e(11506).version,v=new DOMParser;function y(i){this.container=i.container,this.element=document.createElement("div"),this.update(i.graphInfo,i.buttons),this.container.appendChild(this.element)}var r=y.prototype;r.update=function(i,f){this.graphInfo=i;var g=this.graphInfo._context,h=this.graphInfo._fullLayout,b="modebar-"+h._uid;this.element.setAttribute("id",b),this._uid=b,this.element.className="modebar",g.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),h.modebar.orientation==="v"&&(this.element.className+=" vertical",f=f.reverse());var p=h.modebar,E=g.displayModeBar==="hover"?".js-plotly-plot .plotly:hover ":"";a.deleteRelatedStyleRule(b),a.addRelatedStyleRule(b,E+"#"+b+" .modebar-group","background-color: "+p.bgcolor),a.addRelatedStyleRule(b,"#"+b+" .modebar-btn .icon path","fill: "+p.color),a.addRelatedStyleRule(b,"#"+b+" .modebar-btn:hover .icon path","fill: "+p.activecolor),a.addRelatedStyleRule(b,"#"+b+" .modebar-btn.active .icon path","fill: "+p.activecolor);var c=!this.hasButtons(f),l=this.hasLogo!==g.displaylogo,m=this.locale!==g.locale;if(this.locale=g.locale,(c||l||m)&&(this.removeAllButtons(),this.updateButtons(f),g.watermark||g.displaylogo)){var M=this.getLogo();g.watermark&&(M.className=M.className+" watermark"),h.modebar.orientation==="v"?this.element.insertBefore(M,this.element.childNodes[0]):this.element.appendChild(M),this.hasLogo=!0}this.updateActiveButton()},r.updateButtons=function(i){var f=this;this.buttons=i,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(g){var h=f.createGroup();g.forEach(function(b){var p=b.name;if(!p)throw new Error("must provide button 'name' in button config");if(f.buttonsNames.indexOf(p)!==-1)throw new Error("button name '"+p+"' is taken");f.buttonsNames.push(p);var E=f.createButton(b);f.buttonElements.push(E),h.appendChild(E)}),f.element.appendChild(h)})},r.createGroup=function(){var i=document.createElement("div");return i.className="modebar-group",i},r.createButton=function(i){var f=this,g=document.createElement("a");g.setAttribute("rel","tooltip"),g.className="modebar-btn";var h=i.title;h===void 0?h=i.name:typeof h=="function"&&(h=h(this.graphInfo)),(h||h===0)&&g.setAttribute("data-title",h),i.attr!==void 0&&g.setAttribute("data-attr",i.attr);var b=i.val;b!==void 0&&(typeof b=="function"&&(b=b(this.graphInfo)),g.setAttribute("data-val",b));var p=i.click;if(typeof p!="function")throw new Error("must provide button 'click' function in button config");g.addEventListener("click",function(c){i.click(f.graphInfo,c),f.updateActiveButton(c.currentTarget)}),g.setAttribute("data-toggle",i.toggle||!1),i.toggle&&d.select(g).classed("active",!0);var E=i.icon;return typeof E=="function"?g.appendChild(E()):g.appendChild(this.createIcon(E||_.question)),g.setAttribute("data-gravity",i.gravity||"n"),g},r.createIcon=function(i){var f=P(i.height)?Number(i.height):i.ascent-i.descent,g="http://www.w3.org/2000/svg",h;if(i.path){h=document.createElementNS(g,"svg"),h.setAttribute("viewBox",[0,0,i.width,f].join(" ")),h.setAttribute("class","icon");var b=document.createElementNS(g,"path");b.setAttribute("d",i.path),i.transform?b.setAttribute("transform",i.transform):i.ascent!==void 0&&b.setAttribute("transform","matrix(1 0 0 -1 0 "+i.ascent+")"),h.appendChild(b)}if(i.svg){var p=v.parseFromString(i.svg,"application/xml");h=p.childNodes[0]}return h.setAttribute("height","1em"),h.setAttribute("width","1em"),h},r.updateActiveButton=function(i){var f=this.graphInfo._fullLayout,g=i!==void 0?i.getAttribute("data-attr"):null;this.buttonElements.forEach(function(h){var b=h.getAttribute("data-val")||!0,p=h.getAttribute("data-attr"),E=h.getAttribute("data-toggle")==="true",c=d.select(h);if(E)p===g&&c.classed("active",!c.classed("active"));else{var l=p===null?p:a.nestedProperty(f,p).get();c.classed("active",l===b)}})},r.hasButtons=function(i){var f=this.buttons;if(!f||i.length!==f.length)return!1;for(var g=0;g<i.length;++g){if(i[g].length!==f[g].length)return!1;for(var h=0;h<i[g].length;h++)if(i[g][h].name!==f[g][h].name)return!1}return!0};function n(i){return i+" (v"+x+")"}r.getLogo=function(){var i=this.createGroup(),f=document.createElement("a");return f.href="https://plotly.com/",f.target="_blank",f.setAttribute("data-title",n(a._(this.graphInfo,"Produced with Plotly.js"))),f.className="modebar-btn plotlyjsicon modebar-btn--logo",f.appendChild(this.createIcon(_.newplotlylogo)),i.appendChild(f),i},r.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},r.destroy=function(){a.removeElement(this.container.querySelector(".modebar")),a.deleteRelatedStyleRule(this._uid)};function u(i,f){var g=i._fullLayout,h=new y({graphInfo:i,container:g._modebardiv.node(),buttons:f});return g._privateplot&&d.select(h.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),h}z.exports=u},37113:function(z,B,e){var d=e(41940),P=e(22399),a=e(44467).templatedArray,_=a("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});z.exports={visible:{valType:"boolean",editType:"plot"},buttons:_,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:d({editType:"plot"}),bgcolor:{valType:"color",dflt:P.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:P.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}},89573:function(z){z.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},28674:function(z,B,e){var d=e(71828),P=e(7901),a=e(44467),_=e(85501),x=e(37113),v=e(89573);z.exports=function(u,i,f,g,h){var b=u.rangeselector||{},p=a.newContainer(i,"rangeselector");function E(L,D){return d.coerce(b,p,x,L,D)}var c=_(b,p,{name:"buttons",handleItemDefaults:y,calendar:h}),l=E("visible",c.length>0);if(l){var m=r(i,f,g);E("x",m[0]),E("y",m[1]),d.noneOrAll(u,i,["x","y"]),E("xanchor"),E("yanchor"),d.coerceFont(E,"font",f.font);var M=E("bgcolor");E("activecolor",P.contrast(M,v.lightAmount,v.darkAmount)),E("bordercolor"),E("borderwidth")}};function y(n,u,i,f){var g=f.calendar;function h(E,c){return d.coerce(n,u,x.buttons,E,c)}var b=h("visible");if(b){var p=h("step");p!=="all"&&(g&&g!=="gregorian"&&(p==="month"||p==="year")?u.stepmode="backward":h("stepmode"),h("count")),h("label")}}function r(n,u,i){for(var f=i.filter(function(p){return u[p].anchor===n._id}),g=0,h=0;h<f.length;h++){var b=u[f[h]].domain;b&&(g=Math.max(b[1],g))}return[n.domain[0],g+v.yPad]}},21598:function(z,B,e){var d=e(39898),P=e(73972),a=e(74875),_=e(7901),x=e(91424),v=e(71828),y=v.strTranslate,r=e(63893),n=e(41675),u=e(18783),i=u.LINE_SPACING,f=u.FROM_TL,g=u.FROM_BR,h=e(89573),b=e(70565);z.exports=function(C){var S=C._fullLayout,o=S._infolayer.selectAll(".rangeselector").data(p(C),E);o.enter().append("g").classed("rangeselector",!0),o.exit().remove(),o.style({cursor:"pointer","pointer-events":"all"}),o.each(function(R){var T=d.select(this),O=R,N=O.rangeselector,H=T.selectAll("g.button").data(v.filterVisible(N.buttons));H.enter().append("g").classed("button",!0),H.exit().remove(),H.each(function(k){var V=d.select(this),G=b(O,k);k._isActive=c(O,k,G),V.call(l,N,k),V.call(M,N,k,C),V.on("click",function(){C._dragged||P.call("_guiRelayout",C,G)}),V.on("mouseover",function(){k._isHovered=!0,V.call(l,N,k)}),V.on("mouseout",function(){k._isHovered=!1,V.call(l,N,k)})}),D(C,H,N,O._name,T)})};function p(A){for(var C=n.list(A,"x",!0),S=[],o=0;o<C.length;o++){var R=C[o];R.rangeselector&&R.rangeselector.visible&&S.push(R)}return S}function E(A){return A._id}function c(A,C,S){if(C.step==="all")return A.autorange===!0;var o=Object.keys(S);return A.range[0]===S[o[0]]&&A.range[1]===S[o[1]]}function l(A,C,S){var o=v.ensureSingle(A,"rect","selector-rect",function(R){R.attr("shape-rendering","crispEdges")});o.attr({rx:h.rx,ry:h.ry}),o.call(_.stroke,C.bordercolor).call(_.fill,m(C,S)).style("stroke-width",C.borderwidth+"px")}function m(A,C){return C._isActive||C._isHovered?A.activecolor:A.bgcolor}function M(A,C,S,o){function R(O){r.convertToTspans(O,o)}var T=v.ensureSingle(A,"text","selector-text",function(O){O.attr("text-anchor","middle")});T.call(x.font,C.font).text(L(S,o._fullLayout._meta)).call(R)}function L(A,C){return A.label?C?v.templateString(A.label,C):A.label:A.step==="all"?"all":A.count+A.step.charAt(0)}function D(A,C,S,o,R){var T=0,O=0,N=S.borderwidth;C.each(function(){var Y=d.select(this),ee=Y.select(".selector-text"),re=S.font.size*i,ie=Math.max(re*r.lineCount(ee),16)+3;O=Math.max(O,ie)}),C.each(function(){var Y=d.select(this),ee=Y.select(".selector-rect"),re=Y.select(".selector-text"),ie=re.node()&&x.bBox(re.node()).width,se=S.font.size*i,ce=r.lineCount(re),q=Math.max(ie+10,h.minButtonWidth);Y.attr("transform",y(N+T,N)),ee.attr({x:0,y:0,width:q,height:O}),r.positionText(re,q/2,O/2-(ce-1)*se/2+3),T+=q+5});var H=A._fullLayout._size,k=H.l+H.w*S.x,V=H.t+H.h*(1-S.y),G="left";v.isRightAnchor(S)&&(k-=T,G="right"),v.isCenterAnchor(S)&&(k-=T/2,G="center");var U="top";v.isBottomAnchor(S)&&(V-=O,U="bottom"),v.isMiddleAnchor(S)&&(V-=O/2,U="middle"),T=Math.ceil(T),O=Math.ceil(O),k=Math.round(k),V=Math.round(V),a.autoMargin(A,o+"-range-selector",{x:S.x,y:S.y,l:T*f[G],r:T*g[G],b:O*g[U],t:O*f[U]}),R.attr("transform",y(k,V))}},70565:function(z,B,e){var d=e(81041),P=e(71828).titleCase;z.exports=function(x,v){var y=x._name,r={};if(v.step==="all")r[y+".autorange"]=!0;else{var n=a(x,v);r[y+".range[0]"]=n[0],r[y+".range[1]"]=n[1]}return r};function a(_,x){var v=_.range,y=new Date(_.r2l(v[1])),r=x.step,n=d["utc"+P(r)],u=x.count,i;switch(x.stepmode){case"backward":i=_.l2r(+n.offset(y,-u));break;case"todate":var f=n.offset(y,-u);i=_.l2r(+n.ceil(f));break}var g=v[1];return[i,g]}},97218:function(z,B,e){z.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:e(37113)}}},layoutAttributes:e(37113),handleDefaults:e(28674),draw:e(21598)}},75148:function(z,B,e){var d=e(22399);z.exports={bgcolor:{valType:"color",dflt:d.background,editType:"plot"},bordercolor:{valType:"color",dflt:d.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}},88443:function(z,B,e){var d=e(41675).list,P=e(71739).getAutoRange,a=e(73251);z.exports=function(x){for(var v=d(x,"x",!0),y=0;y<v.length;y++){var r=v[y],n=r[a.name];n&&n.visible&&n.autorange&&(n._input.autorange=!0,n._input.range=n.range=P(x,r))}}},73251:function(z){z.exports={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}},26377:function(z,B,e){var d=e(71828),P=e(44467),a=e(41675),_=e(75148),x=e(47850);z.exports=function(y,r,n){var u=y[n],i=r[n];if(!(u.rangeslider||r._requestRangeslider[i._id]))return;d.isPlainObject(u.rangeslider)||(u.rangeslider={});var f=u.rangeslider,g=P.newContainer(i,"rangeslider");function h(o,R){return d.coerce(f,g,_,o,R)}var b,p;function E(o,R){return d.coerce(b,p,x,o,R)}var c=h("visible");if(c){h("bgcolor",r.plot_bgcolor),h("bordercolor"),h("borderwidth"),h("thickness"),h("autorange",!i.isValidRange(f.range)),h("range");var l=r._subplots;if(l)for(var m=l.cartesian.filter(function(o){return o.substr(0,o.indexOf("y"))===a.name2id(n)}).map(function(o){return o.substr(o.indexOf("y"),o.length)}),M=d.simpleMap(m,a.id2name),L=0;L<M.length;L++){var D=M[L];b=f[D]||{},p=P.newContainer(g,D,"yaxis");var A=r[D],C;b.range&&A.isValidRange(b.range)&&(C="fixed");var S=E("rangemode",C);S!=="match"&&E("range",A.range.slice())}g._input=f}}},72413:function(z,B,e){var d=e(39898),P=e(73972),a=e(74875),_=e(71828),x=_.strTranslate,v=e(91424),y=e(7901),r=e(92998),n=e(93612),u=e(41675),i=e(28569),f=e(6964),g=e(73251);z.exports=function(A){for(var C=A._fullLayout,S=C._rangeSliderData,o=0;o<S.length;o++){var R=S[o][g.name];R._clipId=R._id+"-"+C._uid}function T(N){return N._name}var O=C._infolayer.selectAll("g."+g.containerClassName).data(S,T);O.exit().each(function(N){var H=N[g.name];C._topdefs.select("#"+H._clipId).remove()}).remove(),S.length!==0&&(O.enter().append("g").classed(g.containerClassName,!0).attr("pointer-events","all"),O.each(function(N){var H=d.select(this),k=N[g.name],V=C[u.id2name(N.anchor)],G=k[u.id2name(N.anchor)];if(k.range){var U=_.simpleMap(k.range,N.r2l),Y=_.simpleMap(N.range,N.r2l),ee;Y[0]<Y[1]?ee=[Math.min(U[0],Y[0]),Math.max(U[1],Y[1])]:ee=[Math.max(U[0],Y[0]),Math.min(U[1],Y[1])],k.range=k._input.range=_.simpleMap(ee,N.l2r)}N.cleanRange("rangeslider.range");var re=C._size,ie=N.domain;k._width=re.w*(ie[1]-ie[0]);var se=Math.round(re.l+re.w*ie[0]),ce=Math.round(re.t+re.h*(1-N._counterDomainMin)+(N.side==="bottom"?N._depth:0)+k._offsetShift+g.extraPad);H.attr("transform",x(se,ce)),k._rl=_.simpleMap(k.range,N.r2l);var q=k._rl[0],j=k._rl[1],Z=j-q;if(k.p2d=function(Re){return Re/k._width*Z+q},k.d2p=function(Re){return(Re-q)/Z*k._width},N.rangebreaks){var Q=N.locateBreaks(q,j);if(Q.length){var ue,fe,te=0;for(ue=0;ue<Q.length;ue++)fe=Q[ue],te+=fe.max-fe.min;var ne=k._width/(j-q-te),ve=[-ne*q];for(ue=0;ue<Q.length;ue++)fe=Q[ue],ve.push(ve[ve.length-1]-ne*(fe.max-fe.min));for(k.d2p=function(Re){for(var Ee=ve[0],Oe=0;Oe<Q.length;Oe++){var Be=Q[Oe];if(Re>=Be.max)Ee=ve[Oe+1];else if(Re<Be.min)break}return Ee+ne*Re},ue=0;ue<Q.length;ue++)fe=Q[ue],fe.pmin=k.d2p(fe.min),fe.pmax=k.d2p(fe.max);k.p2d=function(Re){for(var Ee=ve[0],Oe=0;Oe<Q.length;Oe++){var Be=Q[Oe];if(Re>=Be.pmax)Ee=ve[Oe+1];else if(Re<Be.pmin)break}return(Re-Ee)/ne}}}if(G.rangemode!=="match"){var le=V.r2l(G.range[0]),xe=V.r2l(G.range[1]),Se=xe-le;k.d2pOppAxis=function(Re){return(Re-le)/Se*k._height}}H.call(E,A,N,k).call(c,A,N,k).call(l,A,N,k).call(M,A,N,k,G).call(L,A,N,k).call(D,A,N,k),h(H,A,N,k),p(H,A,N,k,V,G),N.side==="bottom"&&r.draw(A,N._id+"title",{propContainer:N,propName:N._name+".title",placeholder:C._dfltTitle.x,attributes:{x:N._offset+N._length/2,y:ce+k._height+k._offsetShift+10+1.5*N.title.font.size,"text-anchor":"middle"}})}))};function h(A,C,S,o){if(C._context.staticPlot)return;var R=A.select("rect."+g.slideBoxClassName).node(),T=A.select("rect."+g.grabAreaMinClassName).node(),O=A.select("rect."+g.grabAreaMaxClassName).node();function N(){var H=d.event,k=H.target,V=H.clientX||H.touches[0].clientX,G=V-A.node().getBoundingClientRect().left,U=o.d2p(S._rl[0]),Y=o.d2p(S._rl[1]),ee=i.coverSlip();this.addEventListener("touchmove",re),this.addEventListener("touchend",ie),ee.addEventListener("mousemove",re),ee.addEventListener("mouseup",ie);function re(se){var ce=se.clientX||se.touches[0].clientX,q=+ce-V,j,Z,Q;switch(k){case R:Q="ew-resize",j=U+q,Z=Y+q;break;case T:Q="col-resize",j=U+q,Z=Y;break;case O:Q="col-resize",j=U,Z=Y+q;break;default:Q="ew-resize",j=G,Z=G+q;break}if(Z<j){var ue=Z;Z=j,j=ue}o._pixelMin=j,o._pixelMax=Z,f(d.select(ee),Q),b(A,C,S,o)}function ie(){ee.removeEventListener("mousemove",re),ee.removeEventListener("mouseup",ie),this.removeEventListener("touchmove",re),this.removeEventListener("touchend",ie),_.removeElement(ee)}}A.on("mousedown",N),A.on("touchstart",N)}function b(A,C,S,o){function R(N){return S.l2r(_.constrain(N,o._rl[0],o._rl[1]))}var T=R(o.p2d(o._pixelMin)),O=R(o.p2d(o._pixelMax));window.requestAnimationFrame(function(){P.call("_guiRelayout",C,S._name+".range",[T,O])})}function p(A,C,S,o,R,T){var O=g.handleWidth/2;function N(se){return _.constrain(se,0,o._width)}function H(se){return _.constrain(se,0,o._height)}function k(se){return _.constrain(se,-O,o._width+O)}var V=N(o.d2p(S._rl[0])),G=N(o.d2p(S._rl[1]));if(A.select("rect."+g.slideBoxClassName).attr("x",V).attr("width",G-V),A.select("rect."+g.maskMinClassName).attr("width",V),A.select("rect."+g.maskMaxClassName).attr("x",G).attr("width",o._width-G),T.rangemode!=="match"){var U=o._height-H(o.d2pOppAxis(R._rl[1])),Y=o._height-H(o.d2pOppAxis(R._rl[0]));A.select("rect."+g.maskMinOppAxisClassName).attr("x",V).attr("height",U).attr("width",G-V),A.select("rect."+g.maskMaxOppAxisClassName).attr("x",V).attr("y",Y).attr("height",o._height-Y).attr("width",G-V),A.select("rect."+g.slideBoxClassName).attr("y",U).attr("height",Y-U)}var ee=.5,re=Math.round(k(V-O))-ee,ie=Math.round(k(G-O))+ee;A.select("g."+g.grabberMinClassName).attr("transform",x(re,ee)),A.select("g."+g.grabberMaxClassName).attr("transform",x(ie,ee))}function E(A,C,S,o){var R=_.ensureSingle(A,"rect",g.bgClassName,function(H){H.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),T=o.borderwidth%2===0?o.borderwidth:o.borderwidth-1,O=-o._offsetShift,N=v.crispRound(C,o.borderwidth);R.attr({width:o._width+T,height:o._height+T,transform:x(O,O),"stroke-width":N}).call(y.stroke,o.bordercolor).call(y.fill,o.bgcolor)}function c(A,C,S,o){var R=C._fullLayout,T=_.ensureSingleById(R._topdefs,"clipPath",o._clipId,function(O){O.append("rect").attr({x:0,y:0})});T.select("rect").attr({width:o._width,height:o._height})}function l(A,C,S,o){var R=C.calcdata,T=A.selectAll("g."+g.rangePlotClassName).data(S._subplotsWith,_.identity);T.enter().append("g").attr("class",function(N){return g.rangePlotClassName+" "+N}).call(v.setClipUrl,o._clipId,C),T.order(),T.exit().remove();var O;T.each(function(N,H){var k=d.select(this),V=H===0,G=u.getFromId(C,N,"y"),U=G._name,Y=o[U],ee={data:[],layout:{xaxis:{type:S.type,domain:[0,1],range:o.range.slice(),calendar:S.calendar},width:o._width,height:o._height,margin:{t:0,b:0,l:0,r:0}},_context:C._context};S.rangebreaks&&(ee.layout.xaxis.rangebreaks=S.rangebreaks),ee.layout[U]={type:G.type,domain:[0,1],range:Y.rangemode!=="match"?Y.range.slice():G.range.slice(),calendar:G.calendar},G.rangebreaks&&(ee.layout[U].rangebreaks=G.rangebreaks),a.supplyDefaults(ee);var re=ee._fullLayout.xaxis,ie=ee._fullLayout[U];re.clearCalc(),re.setScale(),ie.clearCalc(),ie.setScale();var se={id:N,plotgroup:k,xaxis:re,yaxis:ie,isRangePlot:!0};V?O=se:(se.mainplot="xy",se.mainplotinfo=O),n.rangePlot(C,se,m(R,N))})}function m(A,C){for(var S=[],o=0;o<A.length;o++){var R=A[o],T=R[0].trace;T.xaxis+T.yaxis===C&&S.push(R)}return S}function M(A,C,S,o,R){var T=_.ensureSingle(A,"rect",g.maskMinClassName,function(k){k.attr({x:0,y:0,"shape-rendering":"crispEdges"})});T.attr("height",o._height).call(y.fill,g.maskColor);var O=_.ensureSingle(A,"rect",g.maskMaxClassName,function(k){k.attr({y:0,"shape-rendering":"crispEdges"})});if(O.attr("height",o._height).call(y.fill,g.maskColor),R.rangemode!=="match"){var N=_.ensureSingle(A,"rect",g.maskMinOppAxisClassName,function(k){k.attr({y:0,"shape-rendering":"crispEdges"})});N.attr("width",o._width).call(y.fill,g.maskOppAxisColor);var H=_.ensureSingle(A,"rect",g.maskMaxOppAxisClassName,function(k){k.attr({y:0,"shape-rendering":"crispEdges"})});H.attr("width",o._width).style("border-top",g.maskOppBorder).call(y.fill,g.maskOppAxisColor)}}function L(A,C,S,o){if(!C._context.staticPlot){var R=_.ensureSingle(A,"rect",g.slideBoxClassName,function(T){T.attr({y:0,cursor:g.slideBoxCursor,"shape-rendering":"crispEdges"})});R.attr({height:o._height,fill:g.slideBoxFill})}}function D(A,C,S,o){var R=_.ensureSingle(A,"g",g.grabberMinClassName),T=_.ensureSingle(A,"g",g.grabberMaxClassName),O={x:0,width:g.handleWidth,rx:g.handleRadius,fill:y.background,stroke:y.defaultLine,"stroke-width":g.handleStrokeWidth,"shape-rendering":"crispEdges"},N={y:Math.round(o._height/4),height:Math.round(o._height/2)},H=_.ensureSingle(R,"rect",g.handleMinClassName,function(Y){Y.attr(O)});H.attr(N);var k=_.ensureSingle(T,"rect",g.handleMaxClassName,function(Y){Y.attr(O)});k.attr(N);var V={width:g.grabAreaWidth,x:0,y:0,fill:g.grabAreaFill,cursor:C._context.staticPlot?void 0:g.grabAreaCursor},G=_.ensureSingle(R,"rect",g.grabAreaMinClassName,function(Y){Y.attr(V)});G.attr("height",o._height);var U=_.ensureSingle(T,"rect",g.grabAreaMaxClassName,function(Y){Y.attr(V)});U.attr("height",o._height)}},549:function(z,B,e){var d=e(41675),P=e(63893),a=e(73251),_=e(18783).LINE_SPACING,x=a.name;function v(y){var r=y&&y[x];return r&&r.visible}B.isVisible=v,B.makeData=function(y){var r=d.list({_fullLayout:y},"x",!0),n=y.margin,u=[];if(!y._has("gl2d"))for(var i=0;i<r.length;i++){var f=r[i];if(v(f)){u.push(f);var g=f[x];g._id=x+f._id,g._height=(y.height-n.b-n.t)*g.thickness,g._offsetShift=Math.floor(g.borderwidth/2)}}y._rangeSliderData=u},B.autoMarginOpts=function(y,r){var n=y._fullLayout,u=r[x],i=r._id.charAt(0),f=0,g=0;if(r.side==="bottom"&&(f=r._depth,r.title.text!==n._dfltTitle[i])){g=1.5*r.title.font.size+10+u._offsetShift;var h=(r.title.text.match(P.BR_TAG_ALL)||[]).length;g+=h*r.title.font.size*_}return{x:0,y:r._counterDomainMin,l:0,r:0,t:0,b:u._height+f+Math.max(n.margin.b,g),pad:a.extraPad+u._offsetShift*2}}},13137:function(z,B,e){var d=e(71828),P=e(75148),a=e(47850),_=e(549);z.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:d.extendFlat({},P,{yaxis:a})}}},layoutAttributes:e(75148),handleDefaults:e(26377),calcAutorange:e(88443),draw:e(72413),isVisible:_.isVisible,makeData:_.makeData,autoMarginOpts:_.autoMarginOpts}},47850:function(z){z.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}},8389:function(z,B,e){var d=e(50215),P=e(82196).line,a=e(79952).P,_=e(1426).extendFlat,x=e(30962).overrideAll,v=e(44467).templatedArray;e(24695),z.exports=x(v("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:_({},d.xref,{}),yref:_({},d.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:P.color,width:_({},P.width,{min:1,dflt:1}),dash:_({},a,{dflt:"dot"})}}),"arraydraw","from-root")},34122:function(z){z.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}},59402:function(z,B,e){var d=e(71828),P=e(89298),a=e(85501),_=e(8389),x=e(30477);z.exports=function(r,n){a(r,n,{name:"selections",handleItemDefaults:v});for(var u=n.selections,i=0;i<u.length;i++){var f=u[i];f&&f.path===void 0&&(f.x0===void 0||f.x1===void 0||f.y0===void 0||f.y1===void 0)&&(n.selections[i]=null)}};function v(y,r,n){function u(T,O){return d.coerce(y,r,_,T,O)}var i=u("path"),f=i?"path":"rect",g=u("type",f),h=g!=="path";h&&delete r.path,u("opacity"),u("line.color"),u("line.width"),u("line.dash");for(var b=["x","y"],p=0;p<2;p++){var E=b[p],c={_fullLayout:n},l,m,M,L=P.coerceRef(y,r,c,E);if(l=P.getFromId(c,L),l._selectionIndices.push(r._index),M=x.rangeToShapePosition(l),m=x.shapePositionToRange(l),h){var D=E+"0",A=E+"1",C=y[D],S=y[A];y[D]=m(y[D],!0),y[A]=m(y[A],!0),P.coercePosition(r,c,u,L,D),P.coercePosition(r,c,u,L,A);var o=r[D],R=r[A];o!==void 0&&R!==void 0&&(r[D]=M(o),r[A]=M(R),y[D]=C,y[A]=S)}}h&&d.noneOrAll(y,r,["x0","x1","y0","y1"])}},32485:function(z,B,e){var d=e(60165).readPaths,P=e(42359),a=e(51873).clearOutlineControllers,_=e(7901),x=e(91424),v=e(44467).arrayEditor,y=e(30477),r=y.getPathString;z.exports={draw:n,drawOne:i,activateLastSelection:h};function n(p){var E=p._fullLayout;a(p),E._selectionLayer.selectAll("path").remove();for(var c in E._plots){var l=E._plots[c].selectionLayer;l&&l.selectAll("path").remove()}for(var m=0;m<E.selections.length;m++)i(p,m)}function u(p){return p._context.editSelection}function i(p,E){p._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+E+'"]').remove();var c=y.makeSelectionsOptionsAndPlotinfo(p,E),l=c.options,m=c.plotinfo;if(!l._input)return;M(p._fullLayout._selectionLayer);function M(L){var D=r(p,l),A={"data-index":E,"fill-rule":"evenodd",d:D},C=l.opacity,S="rgba(0,0,0,0)",o=l.line.color||_.contrast(p._fullLayout.plot_bgcolor),R=l.line.width,T=l.line.dash;R||(R=5,T="solid");var O=u(p)&&p._fullLayout._activeSelectionIndex===E;O&&(S=p._fullLayout.activeselection.fillcolor,C=p._fullLayout.activeselection.opacity);for(var N=[],H=1;H>=0;H--){var k=L.append("path").attr(A).style("opacity",H?.1:C).call(_.stroke,o).call(_.fill,S).call(x.dashLine,H?"solid":T,H?4+R:R);if(f(k,p,l),O){var V=v(p.layout,"selections",l);k.style({cursor:"move"});var G={element:k.node(),plotinfo:m,gd:p,editHelpers:V,isActiveSelection:!0},U=d(D,p);P(U,k,G)}else k.style("pointer-events",H?"all":"none");N[H]=k}var Y=N[0],ee=N[1];ee.node().addEventListener("click",function(){return g(p,Y)})}}function f(p,E,c){var l=c.xref+c.yref;x.setClipUrl(p,"clip"+E._fullLayout._uid+l,E)}function g(p,E){if(u(p)){var c=E.node(),l=+c.getAttribute("data-index");if(l>=0){if(l===p._fullLayout._activeSelectionIndex){b(p);return}p._fullLayout._activeSelectionIndex=l,p._fullLayout._deactivateSelection=b,n(p)}}}function h(p){if(u(p)){var E=p._fullLayout.selections.length-1;p._fullLayout._activeSelectionIndex=E,p._fullLayout._deactivateSelection=b,n(p)}}function b(p){if(u(p)){var E=p._fullLayout._activeSelectionIndex;E>=0&&(a(p),delete p._fullLayout._activeSelectionIndex,n(p))}}},53777:function(z,B,e){var d=e(79952).P,P=e(1426).extendFlat;z.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:P({},d,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},90849:function(z){z.exports=function(e,d,P){P("newselection.mode");var a=P("newselection.line.width");a&&(P("newselection.line.color"),P("newselection.line.dash")),P("activeselection.fillcolor"),P("activeselection.opacity")}},35855:function(z,B,e){var d=e(64505),P=d.selectMode,a=e(51873),_=a.clearOutline,x=e(60165),v=x.readPaths,y=x.writePaths,r=x.fixDatesForPaths;z.exports=function(u,i){if(u.length){var f=u[0][0];if(f){var g=f.getAttribute("d"),h=i.gd,b=h._fullLayout.newselection,p=i.plotinfo,E=p.xaxis,c=p.yaxis,l=i.isActiveSelection,m=i.dragmode,M=(h.layout||{}).selections||[];if(!P(m)&&l!==void 0){var L=h._fullLayout._activeSelectionIndex;if(L<M.length)switch(h._fullLayout.selections[L].type){case"rect":m="select";break;case"path":m="lasso";break}}var D=v(g,h,p,l),A={xref:E._id,yref:c._id,opacity:b.opacity,line:{color:b.line.color,width:b.line.width,dash:b.line.dash}},C;D.length===1&&(C=D[0]),C&&C.length===5&&m==="select"?(A.type="rect",A.x0=C[0][1],A.y0=C[0][2],A.x1=C[2][1],A.y1=C[2][2]):(A.type="path",E&&c&&r(D,E,c),A.path=y(D),C=null),_(h);for(var S=i.editHelpers,o=(S||{}).modifyItem,R=[],T=0;T<M.length;T++){var O=h._fullLayout.selections[T];if(!O){R[T]=O;continue}if(R[T]=O._input,l!==void 0&&T===h._fullLayout._activeSelectionIndex){var N=A;switch(O.type){case"rect":o("x0",N.x0),o("x1",N.x1),o("y0",N.y0),o("y1",N.y1);break;case"path":o("path",N.path);break}}}return l===void 0?(R.push(A),R):S?S.getUpdateObj():{}}}}},75549:function(z,B,e){var d=e(71828).strTranslate;function P(v,y){switch(v.type){case"log":return v.p2d(y);case"date":return v.p2r(y,0,v.calendar);default:return v.p2r(y)}}function a(v,y){switch(v.type){case"log":return v.d2p(y);case"date":return v.r2p(y,0,v.calendar);default:return v.r2p(y)}}function _(v){var y=v._id.charAt(0)==="y"?1:0;return function(r){return P(v,r[y])}}function x(v){return d(v.xaxis._offset,v.yaxis._offset)}z.exports={p2r:P,r2p:a,axValue:_,getTransform:x}},47322:function(z,B,e){var d=e(32485),P=e(3937);z.exports={moduleType:"component",name:"selections",layoutAttributes:e(8389),supplyLayoutDefaults:e(59402),supplyDrawNewSelectionDefaults:e(90849),includeBasePlot:e(76325)("selections"),draw:d.draw,drawOne:d.drawOne,reselect:P.reselect,prepSelect:P.prepSelect,clearOutline:P.clearOutline,clearSelectionsCache:P.clearSelectionsCache,selectOnClick:P.selectOnClick}},3937:function(z,B,e){var d=e(52142),P=e(38258),a=e(73972),_=e(91424).dashStyle,x=e(7901),v=e(30211),y=e(23469).makeEventData,r=e(64505),n=r.freeMode,u=r.rectMode,i=r.drawMode,f=r.openMode,g=r.selectMode,h=e(30477),b=e(21459),p=e(42359),E=e(51873).clearOutline,c=e(60165),l=c.handleEllipse,m=c.readPaths,M=e(90551),L=e(35855),D=e(32485).activateLastSelection,A=e(71828),C=A.sorterAsc,S=e(61082),o=e(79990),R=e(41675).getFromId,T=e(33306),O=e(61549).redrawReglTraces,N=e(34122),H=N.MINSELECT,k=S.filter,V=S.tester,G=e(75549),U=G.p2r,Y=G.axValue,ee=G.getTransform;function re(Qe){return Qe.subplot!==void 0}function ie(Qe,Fe,Ce,pe,we){var Ae=!re(pe),Pe=n(we),Ge=u(we),We=f(we),tt=i(we),ct=g(we),St=we==="drawline",Pt=we==="drawcircle",wt=St||Pt,Bt=pe.gd,Wt=Bt._fullLayout,hr=ct&&Wt.newselection.mode==="immediate"&&Ae,gt=Wt._zoomlayer,jt=pe.element.getBoundingClientRect(),Ut=pe.plotinfo,or=ee(Ut),ur=Fe-jt.left,dt=Ce-jt.top;Wt._calcInverseTransform(Bt);var ut=A.apply3DTransform(Wt._invTransform)(ur,dt);ur=ut[0],dt=ut[1];var yt=Wt._invScaleX,Lt=Wt._invScaleY,Rt=ur,Nt=dt,Vt="M"+ur+","+dt,Zt=pe.xaxes[0],qt=pe.yaxes[0],Jt=Zt._length,nr=qt._length,Mr=Qe.altKey&&!(i(we)&&We),Ke,Ze,zt,kt,Qt,cr,fr;Q(Qe,Bt,pe),Pe&&(Ke=k([[ur,dt]],N.BENDPX));var ir=gt.selectAll("path.select-outline-"+Ut.id).data([1]),Yt=tt?Wt.newshape:Wt.newselection,gr=tt&&!We?Yt.fillcolor:"rgba(0,0,0,0)",yr=Yt.line.color||(Ae?x.contrast(Bt._fullLayout.plot_bgcolor):"#7f7f7f");ir.enter().append("path").attr("class","select-outline select-outline-"+Ut.id).style({opacity:tt?Yt.opacity/2:1,"stroke-dasharray":_(Yt.line.dash,Yt.line.width),"stroke-width":Yt.line.width+"px","shape-rendering":"crispEdges"}).call(x.stroke,yr).call(x.fill,gr).attr("fill-rule","evenodd").classed("cursor-move",!!tt).attr("transform",or).attr("d",Vt+"Z");var Tr=gt.append("path").attr("class","zoombox-corners").style({fill:x.background,stroke:x.defaultLine,"stroke-width":1}).attr("transform",or).attr("d","M0,0Z"),pr=Wt._uid+N.SELECTID,Kr=[],Or=ve(Bt,pe.xaxes,pe.yaxes,pe.subplot);hr&&!Qe.shiftKey&&(pe._clearSubplotSelections=function(){if(Ae){var Sn=Zt._id,Jr=qt._id;st(Bt,Sn,Jr,Or);for(var xn=(Bt.layout||{}).selections||[],Dn=[],mr=!1,Ar=0;Ar<xn.length;Ar++){var zr=Wt.selections[Ar];zr.xref!==Sn||zr.yref!==Jr?Dn.push(xn[Ar]):mr=!0}mr&&(Bt._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",Bt,{selections:Dn}))}});var Nr=Ue(pe);pe.moveFn=function(Sn,Jr){pe._clearSubplotSelections&&(pe._clearSubplotSelections(),pe._clearSubplotSelections=void 0),Rt=Math.max(0,Math.min(Jt,yt*Sn+ur)),Nt=Math.max(0,Math.min(nr,Lt*Jr+dt));var xn=Math.abs(Rt-ur),Dn=Math.abs(Nt-dt);if(Ge){var mr,Ar,zr;if(ct){var Br=Wt.selectdirection;switch(Br==="any"?Dn<Math.min(xn*.6,H)?mr="h":xn<Math.min(Dn*.6,H)?mr="v":mr="d":mr=Br,mr){case"h":Ar=Pt?nr/2:0,zr=nr;break;case"v":Ar=Pt?Jt/2:0,zr=Jt;break}}if(tt)switch(Wt.newshape.drawdirection){case"vertical":mr="h",Ar=Pt?nr/2:0,zr=nr;break;case"horizontal":mr="v",Ar=Pt?Jt/2:0,zr=Jt;break;case"ortho":xn<Dn?(mr="h",Ar=dt,zr=Nt):(mr="v",Ar=ur,zr=Rt);break;default:mr="d"}mr==="h"?(kt=wt?l(Pt,[Rt,Ar],[Rt,zr]):[[ur,Ar],[ur,zr],[Rt,zr],[Rt,Ar]],kt.xmin=wt?Rt:Math.min(ur,Rt),kt.xmax=wt?Rt:Math.max(ur,Rt),kt.ymin=Math.min(Ar,zr),kt.ymax=Math.max(Ar,zr),Tr.attr("d","M"+kt.xmin+","+(dt-H)+"h-4v"+2*H+"h4ZM"+(kt.xmax-1)+","+(dt-H)+"h4v"+2*H+"h-4Z")):mr==="v"?(kt=wt?l(Pt,[Ar,Nt],[zr,Nt]):[[Ar,dt],[Ar,Nt],[zr,Nt],[zr,dt]],kt.xmin=Math.min(Ar,zr),kt.xmax=Math.max(Ar,zr),kt.ymin=wt?Nt:Math.min(dt,Nt),kt.ymax=wt?Nt:Math.max(dt,Nt),Tr.attr("d","M"+(ur-H)+","+kt.ymin+"v-4h"+2*H+"v4ZM"+(ur-H)+","+(kt.ymax-1)+"v4h"+2*H+"v-4Z")):mr==="d"&&(kt=wt?l(Pt,[ur,dt],[Rt,Nt]):[[ur,dt],[ur,Nt],[Rt,Nt],[Rt,dt]],kt.xmin=Math.min(ur,Rt),kt.xmax=Math.max(ur,Rt),kt.ymin=Math.min(dt,Nt),kt.ymax=Math.max(dt,Nt),Tr.attr("d","M0,0Z"))}else Pe&&(Ke.addPt([Rt,Nt]),kt=Ke.filtered);if(pe.selectionDefs&&pe.selectionDefs.length?(zt=Te(pe.mergedPolygons,kt,Mr),kt.subtract=Mr,Ze=Z(pe.selectionDefs.concat([kt]))):(zt=[kt],Ze=V(kt)),p(Ve(zt,We),ir,pe),ct){var on=Ne(Bt,!1),mn=on.eventData?on.eventData.points.slice():[];on=Ne(Bt,!1,Ze,Or,pe),Ze=on.selectionTesters,fr=on.eventData;var Tn;Ke?Tn=Ke.filtered:Tn=Et(zt),o.throttle(pr,N.SELECTDELAY,function(){Kr=Ye(Ze,Or);for(var An=Kr.slice(),Fn=0;Fn<mn.length;Fn++){for(var Jn=mn[Fn],ta=!1,sa=0;sa<An.length;sa++)if(An[sa].curveNumber===Jn.curveNumber&&An[sa].pointNumber===Jn.pointNumber){ta=!0;break}ta||An.push(Jn)}An.length&&(fr||(fr={}),fr.points=An),Nr(fr,Tn),ze(Bt,fr)})}},pe.clickFn=function(Sn,Jr){if(Tr.remove(),Bt._fullLayout._activeShapeIndex>=0){Bt._fullLayout._deactivateShape(Bt);return}if(!tt){var xn=Wt.clickmode;o.done(pr).then(function(){if(o.clear(pr),Sn===2){for(ir.remove(),Qt=0;Qt<Or.length;Qt++)cr=Or[Qt],cr._module.selectPoints(cr,!1);if(Be(Bt,Or),te(pe),lt(Bt),Or.length){var Dn=Or[0].xaxis,mr=Or[0].yaxis;if(Dn&&mr){for(var Ar=[],zr=Bt._fullLayout.selections,Br=0;Br<zr.length;Br++){var on=zr[Br];on&&(on.xref!==Dn._id||on.yref!==mr._id)&&Ar.push(on)}Ar.length<zr.length&&(Bt._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",Bt,{selections:Ar}))}}}else xn.indexOf("select")>-1&&se(Jr,Bt,pe.xaxes,pe.yaxes,pe.subplot,pe,ir),xn==="event"&&rt(Bt,void 0);v.click(Bt,Jr)}).catch(A.error)}},pe.doneFn=function(){Tr.remove(),o.done(pr).then(function(){o.clear(pr),!hr&&kt&&pe.selectionDefs&&(kt.subtract=Mr,pe.selectionDefs.push(kt),pe.mergedPolygons.length=0,[].push.apply(pe.mergedPolygons,zt)),(hr||tt)&&te(pe,hr),pe.doneFnCompleted&&pe.doneFnCompleted(Kr),ct&&rt(Bt,fr)}).catch(A.error)}}function se(Qe,Fe,Ce,pe,we,Ae,Pe){var Ge=Fe._hoverdata,We=Fe._fullLayout,tt=We.clickmode,ct=tt.indexOf("event")>-1,St=[],Pt,wt,Bt,Wt,hr,gt,jt,Ut,or,ur;if(xe(Ge)){Q(Qe,Fe,Ae),Pt=ve(Fe,Ce,pe,we);var dt=Se(Ge,Pt),ut=dt.pointNumbers.length>0;if(ut?Ee(Pt,dt):Oe(Pt)&&(jt=Re(dt))){for(Pe&&Pe.remove(),ur=0;ur<Pt.length;ur++)wt=Pt[ur],wt._module.selectPoints(wt,!1);Be(Fe,Pt),te(Ae),ct&&lt(Fe)}else{Ut=Qe.shiftKey&&(jt!==void 0?jt:Re(dt)),Bt=ce(dt.pointNumber,dt.searchInfo,Ut);var yt=Ae.selectionDefs.concat([Bt]);for(Wt=Z(yt),ur=0;ur<Pt.length;ur++)if(hr=Pt[ur]._module.selectPoints(Pt[ur],Wt),gt=De(hr,Pt[ur]),St.length)for(var Lt=0;Lt<gt.length;Lt++)St.push(gt[Lt]);else St=gt;if(or={points:St},Be(Fe,Pt,or),Bt&&Ae&&Ae.selectionDefs.push(Bt),Pe){var Rt=Ae.mergedPolygons,Nt=f(Ae.dragmode);p(Ve(Rt,Nt),Pe,Ae)}ct&&rt(Fe,or)}}}function ce(Qe,Fe,Ce){return{pointNumber:Qe,searchInfo:Fe,subtract:!!Ce}}function q(Qe){return"pointNumber"in Qe&&"searchInfo"in Qe}function j(Qe){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(Fe,Ce,pe,we){var Ae=Qe.searchInfo.cd[0].trace._expandedIndex,Pe=we.cd[0].trace._expandedIndex;return Pe===Ae&&pe===Qe.pointNumber},isRect:!1,degenerate:!1,subtract:!!Qe.subtract}}function Z(Qe){if(!Qe.length)return;for(var Fe=[],Ce=q(Qe[0])?0:Qe[0][0][0],pe=Ce,we=q(Qe[0])?0:Qe[0][0][1],Ae=we,Pe=0;Pe<Qe.length;Pe++)if(q(Qe[Pe]))Fe.push(j(Qe[Pe]));else{var Ge=V(Qe[Pe]);Ge.subtract=!!Qe[Pe].subtract,Fe.push(Ge),Ce=Math.min(Ce,Ge.xmin),pe=Math.max(pe,Ge.xmax),we=Math.min(we,Ge.ymin),Ae=Math.max(Ae,Ge.ymax)}function We(tt,ct,St,Pt){for(var wt=!1,Bt=0;Bt<Fe.length;Bt++)Fe[Bt].contains(tt,ct,St,Pt)&&(wt=!Fe[Bt].subtract);return wt}return{xmin:Ce,xmax:pe,ymin:we,ymax:Ae,pts:[],contains:We,isRect:!1,degenerate:!1}}function Q(Qe,Fe,Ce){var pe=Fe._fullLayout,we=Ce.plotinfo,Ae=Ce.dragmode,Pe=pe._lastSelectedSubplot&&pe._lastSelectedSubplot===we.id,Ge=(Qe.shiftKey||Qe.altKey)&&!(i(Ae)&&f(Ae));Pe&&Ge&&we.selection&&we.selection.selectionDefs&&!Ce.selectionDefs?(Ce.selectionDefs=we.selection.selectionDefs,Ce.mergedPolygons=we.selection.mergedPolygons):(!Ge||!we.selection)&&te(Ce),Pe||(E(Fe),pe._lastSelectedSubplot=we.id)}function ue(Qe){return Qe._fullLayout._activeShapeIndex>=0}function fe(Qe){return Qe._fullLayout._activeSelectionIndex>=0}function te(Qe,Fe){var Ce=Qe.dragmode,pe=Qe.plotinfo,we=Qe.gd;ue(we)&&we._fullLayout._deactivateShape(we),fe(we)&&we._fullLayout._deactivateSelection(we);var Ae=we._fullLayout,Pe=Ae._zoomlayer,Ge=i(Ce),We=g(Ce);if(Ge||We){var tt=Pe.selectAll(".select-outline-"+pe.id);if(tt&&we._fullLayout._outlining){var ct;Ge&&(ct=M(tt,Qe)),ct&&a.call("_guiRelayout",we,{shapes:ct});var St;We&&!re(Qe)&&(St=L(tt,Qe)),St&&(we._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",we,{selections:St}).then(function(){Fe&&D(we)})),we._fullLayout._outlining=!1}}pe.selection={},pe.selection.selectionDefs=Qe.selectionDefs=[],pe.selection.mergedPolygons=Qe.mergedPolygons=[]}function ne(Qe){return Qe._id}function ve(Qe,Fe,Ce,pe){if(!Qe.calcdata)return[];var we=[],Ae=Fe.map(ne),Pe=Ce.map(ne),Ge,We,tt;for(tt=0;tt<Qe.calcdata.length;tt++)if(Ge=Qe.calcdata[tt],We=Ge[0].trace,!(We.visible!==!0||!We._module||!We._module.selectPoints))if(re({subplot:pe})&&(We.subplot===pe||We.geo===pe))we.push(le(We._module,Ge,Fe[0],Ce[0]));else if(We.type==="splom"){if(We._xaxes[Ae[0]]&&We._yaxes[Pe[0]]){var ct=le(We._module,Ge,Fe[0],Ce[0]);ct.scene=Qe._fullLayout._splomScenes[We.uid],we.push(ct)}}else if(We.type==="sankey"){var St=le(We._module,Ge,Fe[0],Ce[0]);we.push(St)}else{if(Ae.indexOf(We.xaxis)===-1||Pe.indexOf(We.yaxis)===-1)continue;we.push(le(We._module,Ge,R(Qe,We.xaxis),R(Qe,We.yaxis)))}return we}function le(Qe,Fe,Ce,pe){return{_module:Qe,cd:Fe,xaxis:Ce,yaxis:pe}}function xe(Qe){return Qe&&Array.isArray(Qe)&&Qe[0].hoverOnBox!==!0}function Se(Qe,Fe){var Ce=Qe[0],pe=-1,we=[],Ae,Pe;for(Pe=0;Pe<Fe.length;Pe++)if(Ae=Fe[Pe],Ce.fullData._expandedIndex===Ae.cd[0].trace._expandedIndex){if(Ce.hoverOnBox===!0)break;Ce.pointNumber!==void 0?pe=Ce.pointNumber:Ce.binNumber!==void 0&&(pe=Ce.binNumber,we=Ce.pointNumbers);break}return{pointNumber:pe,pointNumbers:we,searchInfo:Ae}}function Re(Qe){var Fe=Qe.searchInfo.cd[0].trace,Ce=Qe.pointNumber,pe=Qe.pointNumbers,we=pe.length>0,Ae=we?pe[0]:Ce;return Fe.selectedpoints?Fe.selectedpoints.indexOf(Ae)>-1:!1}function Ee(Qe,Fe){var Ce=[],pe,we,Ae,Pe;for(Pe=0;Pe<Qe.length;Pe++)pe=Qe[Pe],pe.cd[0].trace.selectedpoints&&pe.cd[0].trace.selectedpoints.length>0&&Ce.push(pe);if(Ce.length===1&&(Ae=Ce[0]===Fe.searchInfo,Ae&&(we=Fe.searchInfo.cd[0].trace,we.selectedpoints.length===Fe.pointNumbers.length))){for(Pe=0;Pe<Fe.pointNumbers.length;Pe++)if(we.selectedpoints.indexOf(Fe.pointNumbers[Pe])<0)return!1;return!0}return!1}function Oe(Qe){var Fe=0,Ce,pe,we;for(we=0;we<Qe.length;we++)if(Ce=Qe[we],pe=Ce.cd[0].trace,pe.selectedpoints&&(pe.selectedpoints.length>1||(Fe+=pe.selectedpoints.length,Fe>1)))return!1;return Fe===1}function Be(Qe,Fe,Ce){var pe;for(pe=0;pe<Fe.length;pe++){var we=Fe[pe].cd[0].trace._fullInput,Ae=Qe._fullLayout._tracePreGUI[we.uid]||{};Ae.selectedpoints===void 0&&(Ae.selectedpoints=we._input.selectedpoints||null)}var Pe;if(Ce){var Ge=Ce.points||[];for(pe=0;pe<Fe.length;pe++)Pe=Fe[pe].cd[0].trace,Pe._input.selectedpoints=Pe._fullInput.selectedpoints=[],Pe._fullInput!==Pe&&(Pe.selectedpoints=[]);for(var We=0;We<Ge.length;We++){var tt=Ge[We],ct=tt.data,St=tt.fullData,Pt=tt.pointIndex,wt=tt.pointIndices;wt?([].push.apply(ct.selectedpoints,wt),Pe._fullInput!==Pe&&[].push.apply(St.selectedpoints,wt)):(ct.selectedpoints.push(Pt),Pe._fullInput!==Pe&&St.selectedpoints.push(Pt))}}else for(pe=0;pe<Fe.length;pe++)Pe=Fe[pe].cd[0].trace,delete Pe.selectedpoints,delete Pe._input.selectedpoints,Pe._fullInput!==Pe&&delete Pe._fullInput.selectedpoints;Le(Qe,Fe)}function Le(Qe,Fe){for(var Ce=!1,pe=0;pe<Fe.length;pe++){var we=Fe[pe],Ae=we.cd;a.traceIs(Ae[0].trace,"regl")&&(Ce=!0);var Pe=we._module,Ge=Pe.styleOnSelect||Pe.style;Ge&&(Ge(Qe,Ae,Ae[0].node3),Ae[0].nodeRangePlot3&&Ge(Qe,Ae,Ae[0].nodeRangePlot3))}Ce&&(T(Qe),O(Qe))}function Te(Qe,Fe,Ce){for(var pe=Ce?d.difference:d.union,we=pe({regions:Qe},{regions:[Fe]}),Ae=we.regions.reverse(),Pe=0;Pe<Ae.length;Pe++){var Ge=Ae[Pe];Ge.subtract=pt(Ge,Ae.slice(0,Pe))}return Ae}function De(Qe,Fe){if(Array.isArray(Qe))for(var Ce=Fe.cd,pe=Fe.cd[0].trace,we=0;we<Qe.length;we++)Qe[we]=y(Qe[we],pe,Ce);return Qe}function Ve(Qe,Fe){for(var Ce=[],pe=0;pe<Qe.length;pe++){Ce[pe]=[];for(var we=0;we<Qe[pe].length;we++){Ce[pe][we]=[],Ce[pe][we][0]=we?"L":"M";for(var Ae=0;Ae<Qe[pe][we].length;Ae++)Ce[pe][we].push(Qe[pe][we][Ae])}Fe||Ce[pe].push(["Z",Ce[pe][0][1],Ce[pe][0][2]])}return Ce}function Ye(Qe,Fe){for(var Ce=[],pe,we,Ae=0;Ae<Fe.length;Ae++){var Pe=Fe[Ae];we=Pe._module.selectPoints(Pe,Qe),pe=De(we,Pe),Ce=Ce.concat(pe)}return Ce}function Ne(Qe,Fe,Ce,pe,we){var Ae=!!pe,Pe,Ge,We;we&&(Pe=we.plotinfo,Ge=we.xaxes[0]._id,We=we.yaxes[0]._id);var tt=[],ct=[],St=nt(Qe),Pt=Qe._fullLayout;if(Pe){var wt=Pt._zoomlayer,Bt=Pt.dragmode,Wt=i(Bt),hr=g(Bt);if(Wt||hr){var gt=R(Qe,Ge,"x"),jt=R(Qe,We,"y");if(gt&&jt){var Ut=wt.selectAll(".select-outline-"+Pe.id);if(Ut&&Qe._fullLayout._outlining&&Ut.length){for(var or=Ut[0][0],ur=or.getAttribute("d"),dt=m(ur,Qe,Pe),ut=[],yt=0;yt<dt.length;yt++){for(var Lt=dt[yt],Rt=[],Nt=0;Nt<Lt.length;Nt++)Rt.push([Tt(gt,Lt[Nt][1]),Tt(jt,Lt[Nt][2])]);Rt.xref=Ge,Rt.yref=We,Rt.subtract=pt(Rt,ut),ut.push(Rt)}St=St.concat(ut)}}}}var Vt=Ge&&We?[Ge+We]:Pt._subplots.cartesian;Xe(Qe);for(var Zt={},qt=0;qt<Vt.length;qt++){var Jt=Vt[qt],nr=Jt.indexOf("y"),Mr=Jt.slice(0,nr),Ke=Jt.slice(nr),Ze=Ge&&We?Ce:void 0;if(Ze=it(St,Mr,Ke,Ze),Ze){var zt=pe;if(!Ae){var kt=R(Qe,Mr,"x"),Qt=R(Qe,Ke,"y");zt=ve(Qe,[kt],[Qt],Jt);for(var cr=0;cr<zt.length;cr++){var fr=zt[cr],ir=fr.cd[0],Yt=ir.trace;if(fr._module.name==="scattergl"&&!ir.t.xpx){var gr=Yt.x,yr=Yt.y,Tr=Yt._length;ir.t.xpx=[],ir.t.ypx=[];for(var pr=0;pr<Tr;pr++)ir.t.xpx[pr]=kt.c2p(gr[pr]),ir.t.ypx[pr]=Qt.c2p(yr[pr])}fr._module.name==="splom"&&(Zt[Yt.uid]||(Zt[Yt.uid]=!0))}}var Kr=Ye(Ze,zt);tt=tt.concat(Kr),ct=ct.concat(zt)}}var Or={points:tt};Be(Qe,ct,Or);var Nr=Pt.clickmode,Sn=Nr.indexOf("event")>-1&&Fe;if(!Pe&&Fe){var Jr=nt(Qe,!0);if(Jr.length){var xn=Jr[0].xref,Dn=Jr[0].yref;if(xn&&Dn){var mr=Et(Jr),Ar=et([R(Qe,xn,"x"),R(Qe,Dn,"y")]);Ar(Or,mr)}}Qe._fullLayout._noEmitSelectedAtStart?Qe._fullLayout._noEmitSelectedAtStart=!1:Sn&&rt(Qe,Or),Pt._reselect=!1}if(!Pe&&Pt._deselect){var zr=Pt._deselect;Ge=zr.xref,We=zr.yref,ht(Ge,We,ct)||st(Qe,Ge,We,pe),Sn&&(Or.points.length?rt(Qe,Or):lt(Qe)),Pt._deselect=!1}return{eventData:Or,selectionTesters:Ce}}function Xe(Qe){var Fe=Qe.calcdata;if(Fe)for(var Ce=0;Ce<Fe.length;Ce++){var pe=Fe[Ce][0],we=pe.trace,Ae=Qe._fullLayout._splomScenes;if(Ae){var Pe=Ae[we.uid];Pe&&(Pe.selectBatch=[])}}}function ht(Qe,Fe,Ce){for(var pe=0;pe<Ce.length;pe++){var we=Ce[pe];if(we.xaxis&&we.xaxis._id===Qe&&we.yaxis&&we.yaxis._id===Fe)return!0}return!1}function st(Qe,Fe,Ce,pe){pe=ve(Qe,[R(Qe,Fe,"x")],[R(Qe,Ce,"y")],Fe+Ce);for(var we=0;we<pe.length;we++){var Ae=pe[we];Ae._module.selectPoints(Ae,!1)}Be(Qe,pe)}function it(Qe,Fe,Ce,pe){for(var we,Ae=0;Ae<Qe.length;Ae++){var Pe=Qe[Ae];if(!(Fe!==Pe.xref||Ce!==Pe.yref))if(we){var Ge=!!Pe.subtract;we=Te(we,Pe,Ge),pe=Z(we)}else we=[Pe],pe=V(Pe)}return pe}function nt(Qe,Fe){for(var Ce=[],pe=Qe._fullLayout,we=pe.selections,Ae=we.length,Pe=0;Pe<Ae;Pe++)if(!(Fe&&Pe!==pe._activeSelectionIndex)){var Ge=we[Pe];if(Ge){var We=Ge.xref,tt=Ge.yref,ct=R(Qe,We,"x"),St=R(Qe,tt,"y"),Pt,wt,Bt,Wt,hr;if(Ge.type==="rect"){hr=[];var gt=Tt(ct,Ge.x0),jt=Tt(ct,Ge.x1),Ut=Tt(St,Ge.y0),or=Tt(St,Ge.y1);hr=[[gt,Ut],[gt,or],[jt,or],[jt,Ut]],Pt=Math.min(gt,jt),wt=Math.max(gt,jt),Bt=Math.min(Ut,or),Wt=Math.max(Ut,or),hr.xmin=Pt,hr.xmax=wt,hr.ymin=Bt,hr.ymax=Wt,hr.xref=We,hr.yref=tt,hr.subtract=!1,hr.isRect=!0,Ce.push(hr)}else if(Ge.type==="path")for(var ur=Ge.path.split("Z"),dt=[],ut=0;ut<ur.length;ut++){var yt=ur[ut];if(yt){yt+="Z";var Lt=h.extractPathCoords(yt,b.paramIsX,"raw"),Rt=h.extractPathCoords(yt,b.paramIsY,"raw");Pt=1/0,wt=-1/0,Bt=1/0,Wt=-1/0,hr=[];for(var Nt=0;Nt<Lt.length;Nt++){var Vt=Tt(ct,Lt[Nt]),Zt=Tt(St,Rt[Nt]);hr.push([Vt,Zt]),Pt=Math.min(Vt,Pt),wt=Math.max(Vt,wt),Bt=Math.min(Zt,Bt),Wt=Math.max(Zt,Wt)}hr.xmin=Pt,hr.xmax=wt,hr.ymin=Bt,hr.ymax=Wt,hr.xref=We,hr.yref=tt,hr.subtract=pt(hr,dt),dt.push(hr),Ce.push(hr)}}}}return Ce}function pt(Qe,Fe){for(var Ce=!1,pe=0;pe<Fe.length;pe++)for(var we=Fe[pe],Ae=0;Ae<Qe.length;Ae++)if(P(Qe[Ae],we)){Ce=!Ce;break}return Ce}function Tt(Qe,Fe){return Qe.type==="date"&&(Fe=Fe.replace("_"," ")),Qe.type==="log"?Qe.c2p(Fe):Qe.r2p(Fe,null,Qe.calendar)}function Et(Qe){for(var Fe=Qe.length,Ce=[],pe=0;pe<Fe;pe++){var we=Qe[pe];Ce=Ce.concat(we),Ce=Ce.concat([we[0]])}return Dt(Ce)}function Dt(Qe){return Qe.isRect=Qe.length===5&&Qe[0][0]===Qe[4][0]&&Qe[0][1]===Qe[4][1]&&Qe[0][0]===Qe[1][0]&&Qe[2][0]===Qe[3][0]&&Qe[0][1]===Qe[3][1]&&Qe[1][1]===Qe[2][1]||Qe[0][1]===Qe[1][1]&&Qe[2][1]===Qe[3][1]&&Qe[0][0]===Qe[3][0]&&Qe[1][0]===Qe[2][0],Qe.isRect&&(Qe.xmin=Math.min(Qe[0][0],Qe[2][0]),Qe.xmax=Math.max(Qe[0][0],Qe[2][0]),Qe.ymin=Math.min(Qe[0][1],Qe[2][1]),Qe.ymax=Math.max(Qe[0][1],Qe[2][1])),Qe}function et(Qe){return function(Fe,Ce){for(var pe,we,Ae=0;Ae<Qe.length;Ae++){var Pe=Qe[Ae],Ge=Pe._id,We=Ge.charAt(0);if(Ce.isRect){pe||(pe={});var tt=Ce[We+"min"],ct=Ce[We+"max"];tt!==void 0&&ct!==void 0&&(pe[Ge]=[U(Pe,tt),U(Pe,ct)].sort(C))}else we||(we={}),we[Ge]=Ce.map(Y(Pe))}pe&&(Fe.range=pe),we&&(Fe.lassoPoints=we)}}function Ue(Qe){var Fe=Qe.plotinfo;return Fe.fillRangeItems||et(Qe.xaxes.concat(Qe.yaxes))}function ze(Qe,Fe){Qe.emit("plotly_selecting",Fe)}function rt(Qe,Fe){Fe&&(Fe.selections=(Qe.layout||{}).selections||[]),Qe.emit("plotly_selected",Fe)}function lt(Qe){Qe.emit("plotly_deselect",null)}z.exports={reselect:Ne,prepSelect:ie,clearOutline:E,clearSelectionsCache:te,selectOnClick:se}},89827:function(z,B,e){var d=e(50215),P=e(82196).line,a=e(79952).P,_=e(1426).extendFlat,x=e(44467).templatedArray;e(24695),z.exports=x("shape",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},xref:_({},d.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},yref:_({},d.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:_({},P.color,{editType:"arraydraw"}),width:_({},P.width,{editType:"calc+arraydraw"}),dash:_({},a,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},editType:"arraydraw"})},5627:function(z,B,e){var d=e(71828),P=e(89298),a=e(21459),_=e(30477);z.exports=function(u){var i=u._fullLayout,f=d.filterVisible(i.shapes);if(!(!f.length||!u._fullData.length))for(var g=0;g<f.length;g++){var h=f[g];h._extremes={};var b,p,E=P.getRefType(h.xref),c=P.getRefType(h.yref);if(h.xref!=="paper"&&E!=="domain"){var l=h.xsizemode==="pixel"?h.xanchor:h.x0,m=h.xsizemode==="pixel"?h.xanchor:h.x1;b=P.getFromId(u,h.xref),p=r(b,l,m,h.path,a.paramIsX),p&&(h._extremes[b._id]=P.findExtremes(b,p,x(h)))}if(h.yref!=="paper"&&c!=="domain"){var M=h.ysizemode==="pixel"?h.yanchor:h.y0,L=h.ysizemode==="pixel"?h.yanchor:h.y1;b=P.getFromId(u,h.yref),p=r(b,M,L,h.path,a.paramIsY),p&&(h._extremes[b._id]=P.findExtremes(b,p,v(h)))}}};function x(n){return y(n.line.width,n.xsizemode,n.x0,n.x1,n.path,!1)}function v(n){return y(n.line.width,n.ysizemode,n.y0,n.y1,n.path,!0)}function y(n,u,i,f,g,h){var b=n/2,p=h;if(u==="pixel"){var E=g?_.extractPathCoords(g,h?a.paramIsY:a.paramIsX):[i,f],c=d.aggNums(Math.max,null,E),l=d.aggNums(Math.min,null,E),m=l<0?Math.abs(l)+b:b,M=c>0?c+b:b;return{ppad:b,ppadplus:p?m:M,ppadminus:p?M:m}}else return{ppad:b}}function r(n,u,i,f,g){var h=n.type==="category"||n.type==="multicategory"?n.r2c:n.d2c;if(u!==void 0)return[h(u),h(i)];if(f){var b=1/0,p=-1/0,E=f.match(a.segmentRE),c,l,m,M,L;for(n.type==="date"&&(h=_.decodeDate(h)),c=0;c<E.length;c++)l=E[c],m=g[l.charAt(0)].drawn,m!==void 0&&(M=E[c].substr(1).match(a.paramRE),!(!M||M.length<m)&&(L=h(M[m]),L<b&&(b=L),L>p&&(p=L)));if(p>=b)return[b,p]}}},21459:function(z){z.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},84726:function(z,B,e){var d=e(71828),P=e(89298),a=e(85501),_=e(89827),x=e(30477);z.exports=function(r,n){a(r,n,{name:"shapes",handleItemDefaults:v})};function v(y,r,n){function u(Y,ee){return d.coerce(y,r,_,Y,ee)}var i=u("visible");if(i){var f=u("path"),g=f?"path":"rect",h=u("type",g),b=h!=="path";b&&delete r.path,u("editable"),u("layer"),u("opacity"),u("fillcolor"),u("fillrule");var p=u("line.width");p&&(u("line.color"),u("line.dash"));for(var E=u("xsizemode"),c=u("ysizemode"),l=["x","y"],m=0;m<2;m++){var M=l[m],L=M+"anchor",D=M==="x"?E:c,A={_fullLayout:n},C,S,o,R=P.coerceRef(y,r,A,M,void 0,"paper"),T=P.getRefType(R);if(T==="range"?(C=P.getFromId(A,R),C._shapeIndices.push(r._index),o=x.rangeToShapePosition(C),S=x.shapePositionToRange(C)):S=o=d.identity,b){var O=.25,N=.75,H=M+"0",k=M+"1",V=y[H],G=y[k];y[H]=S(y[H],!0),y[k]=S(y[k],!0),D==="pixel"?(u(H,0),u(k,10)):(P.coercePosition(r,A,u,R,H,O),P.coercePosition(r,A,u,R,k,N)),r[H]=o(r[H]),r[k]=o(r[k]),y[H]=V,y[k]=G}if(D==="pixel"){var U=y[L];y[L]=S(y[L],!0),P.coercePosition(r,A,u,R,L,.25),r[L]=o(r[L]),y[L]=U}}b&&d.noneOrAll(y,r,["x0","x1","y0","y1"])}}},42359:function(z,B,e){var d=e(71828),P=d.strTranslate,a=e(28569),_=e(64505),x=_.drawMode,v=_.selectMode,y=e(73972),r=e(7901),n=e(89995),u=n.i000,i=n.i090,f=n.i180,g=n.i270,h=e(51873),b=h.clearOutlineControllers,p=e(60165),E=p.pointsOnRectangle,c=p.pointsOnEllipse,l=p.writePaths,m=e(90551),M=e(35855);z.exports=function C(S,o,R,T){T||(T=0);var O=R.gd;function N(){C(S,o,R,T++),c(S[0])&&H({redrawing:!0})}function H(Ee){var Oe={};R.isActiveShape!==void 0&&(R.isActiveShape=!1,Oe=m(o,R)),R.isActiveSelection!==void 0&&(R.isActiveSelection=!1,Oe=M(o,R),O._fullLayout._reselect=!0),Object.keys(Oe).length&&y.call((Ee||{}).redrawing?"relayout":"_guiRelayout",O,Oe)}var k=O._fullLayout,V=k._zoomlayer,G=R.dragmode,U=x(G),Y=v(G);(U||Y)&&(O._fullLayout._outlining=!0),b(O),o.attr("d",l(S));var ee,re,ie,se,ce;if(!T&&(R.isActiveShape||R.isActiveSelection)){ce=L([],S);var q=V.append("g").attr("class","outline-controllers");te(q),Re()}function j(Ee){ie=+Ee.srcElement.getAttribute("data-i"),se=+Ee.srcElement.getAttribute("data-j"),ee[ie][se].moveFn=Z}function Z(Ee,Oe){if(S.length){var Be=ce[ie][se][1],Le=ce[ie][se][2],Te=S[ie],De=Te.length;if(E(Te)){var Ve=Ee,Ye=Oe;if(R.isActiveSelection){var Ne=D(Te,se);Ne[1]===Te[se][1]?Ye=0:Ve=0}for(var Xe=0;Xe<De;Xe++)if(Xe!==se){var ht=Te[Xe];ht[1]===Te[se][1]&&(ht[1]=Be+Ve),ht[2]===Te[se][2]&&(ht[2]=Le+Ye)}if(Te[se][1]=Be+Ve,Te[se][2]=Le+Ye,!E(Te))for(var st=0;st<De;st++)for(var it=0;it<Te[st].length;it++)Te[st][it]=ce[ie][st][it]}else Te[se][1]=Be+Ee,Te[se][2]=Le+Oe;N()}}function Q(){H()}function ue(){if(S.length&&S[ie]&&S[ie].length){for(var Ee=[],Oe=0;Oe<S[ie].length;Oe++)Oe!==se&&Ee.push(S[ie][Oe]);Ee.length>1&&!(Ee.length===2&&Ee[1][0]==="Z")&&(se===0&&(Ee[0][0]="M"),S[ie]=Ee,N(),H())}}function fe(Ee,Oe){if(Ee===2){ie=+Oe.srcElement.getAttribute("data-i"),se=+Oe.srcElement.getAttribute("data-j");var Be=S[ie];!E(Be)&&!c(Be)&&ue()}}function te(Ee){ee=[];for(var Oe=0;Oe<S.length;Oe++){var Be=S[Oe],Le=E(Be),Te=!Le&&c(Be);ee[Oe]=[];for(var De=Be.length,Ve=0;Ve<De;Ve++)if(Be[Ve][0]!=="Z"&&!(Te&&Ve!==u&&Ve!==i&&Ve!==f&&Ve!==g)){var Ye=Le&&R.isActiveSelection,Ne;Ye&&(Ne=D(Be,Ve));var Xe=Be[Ve][1],ht=Be[Ve][2],st=Ee.append(Ye?"rect":"circle").attr("data-i",Oe).attr("data-j",Ve).style({fill:r.background,stroke:r.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(Ye){var it=Ne[1]-Xe,nt=Ne[2]-ht,pt=nt?5:Math.max(Math.min(25,Math.abs(it)-5),5),Tt=it?5:Math.max(Math.min(25,Math.abs(nt)-5),5);st.classed(nt?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",pt).attr("height",Tt).attr("x",Xe-pt/2).attr("y",ht-Tt/2).attr("transform",P(it/2,nt/2))}else st.classed("cursor-grab",!0).attr("r",5).attr("cx",Xe).attr("cy",ht);ee[Oe][Ve]={element:st.node(),gd:O,prepFn:j,doneFn:Q,clickFn:fe},a.init(ee[Oe][Ve])}}}function ne(Ee,Oe){if(S.length)for(var Be=0;Be<S.length;Be++)for(var Le=0;Le<S[Be].length;Le++)for(var Te=0;Te+2<S[Be][Le].length;Te+=2)S[Be][Le][Te+1]=ce[Be][Le][Te+1]+Ee,S[Be][Le][Te+2]=ce[Be][Le][Te+2]+Oe}function ve(Ee,Oe){ne(Ee,Oe),N()}function le(Ee){ie=+Ee.srcElement.getAttribute("data-i"),ie||(ie=0),re[ie].moveFn=ve}function xe(){H()}function Se(Ee){Ee===2&&A(O)}function Re(){if(re=[],!!S.length){var Ee=0;re[Ee]={element:o[0][0],gd:O,prepFn:le,doneFn:xe,clickFn:Se},a.init(re[Ee])}}};function L(C,S){for(var o=0;o<S.length;o++){var R=S[o];C[o]=[];for(var T=0;T<R.length;T++){C[o][T]=[];for(var O=0;O<R[T].length;O++)C[o][T][O]=R[T][O]}}return C}function D(C,S){var o=C[S][1],R=C[S][2],T=C.length,O,N,H;return O=(S+1)%T,N=C[O][1],H=C[O][2],N===o&&H===R&&(O=(S+2)%T,N=C[O][1],H=C[O][2]),[O,N,H]}function A(C){if(v(C._fullLayout.dragmode)){b(C);var S=C._fullLayout._activeSelectionIndex,o=(C.layout||{}).selections||[];if(S<o.length){for(var R=[],T=0;T<o.length;T++)T!==S&&R.push(o[T]);delete C._fullLayout._activeSelectionIndex;var O=C._fullLayout.selections[S];C._fullLayout._deselect={xref:O.xref,yref:O.yref},y.call("_guiRelayout",C,{selections:R})}}}},34031:function(z,B,e){var d=e(73972),P=e(71828),a=e(89298),_=e(60165).readPaths,x=e(42359),v=e(51873).clearOutlineControllers,y=e(7901),r=e(91424),n=e(44467).arrayEditor,u=e(28569),i=e(6964),f=e(21459),g=e(30477),h=g.getPathString;z.exports={draw:b,drawOne:c,eraseActiveShape:A};function b(C){var S=C._fullLayout;S._shapeUpperLayer.selectAll("path").remove(),S._shapeLowerLayer.selectAll("path").remove();for(var o in S._plots){var R=S._plots[o].shapelayer;R&&R.selectAll("path").remove()}for(var T=0;T<S.shapes.length;T++)S.shapes[T].visible&&c(C,T)}function p(C){return!!C._fullLayout._outlining}function E(C){return!C._context.edits.shapePosition}function c(C,S){C._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+S+'"]').remove();var o=g.makeShapesOptionsAndPlotinfo(C,S),R=o.options,T=o.plotinfo;if(!R._input||R.visible===!1)return;if(R.layer!=="below")N(C._fullLayout._shapeUpperLayer);else if(R.xref==="paper"||R.yref==="paper")N(C._fullLayout._shapeLowerLayer);else if(T._hadPlotinfo){var O=T.mainplotinfo||T;N(O.shapelayer)}else N(C._fullLayout._shapeLowerLayer);function N(H){var k=h(C,R),V={"data-index":S,"fill-rule":R.fillrule,d:k},G=R.opacity,U=R.fillcolor,Y=R.line.width?R.line.color:"rgba(0,0,0,0)",ee=R.line.width,re=R.line.dash;!ee&&R.editable===!0&&(ee=5,re="solid");var ie=k[k.length-1]!=="Z",se=E(C)&&R.editable&&C._fullLayout._activeShapeIndex===S;se&&(U=ie?"rgba(0,0,0,0)":C._fullLayout.activeshape.fillcolor,G=C._fullLayout.activeshape.opacity);var ce=H.append("path").attr(V).style("opacity",G).call(y.stroke,Y).call(y.fill,U).call(r.dashLine,re,ee);l(ce,C,R);var q;if((se||C._context.edits.shapePosition)&&(q=n(C.layout,"shapes",R)),se){ce.style({cursor:"move"});var j={element:ce.node(),plotinfo:T,gd:C,editHelpers:q,isActiveShape:!0},Z=_(k,C);x(Z,ce,j)}else C._context.edits.shapePosition?m(C,ce,R,S,H,q):R.editable===!0&&ce.style("pointer-events",ie||y.opacity(U)*G<=.5?"stroke":"all");ce.node().addEventListener("click",function(){return L(C,ce)})}}function l(C,S,o){var R=(o.xref+o.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");r.setClipUrl(C,R?"clip"+S._fullLayout._uid+R:null,S)}function m(C,S,o,R,T,O){var N=10,H=10,k=o.xsizemode==="pixel",V=o.ysizemode==="pixel",G=o.type==="line",U=o.type==="path",Y=O.modifyItem,ee,re,ie,se,ce,q,j,Z,Q,ue,fe,te,ne,ve,le,xe=a.getFromId(C,o.xref),Se=a.getRefType(o.xref),Re=a.getFromId(C,o.yref),Ee=a.getRefType(o.yref),Oe=g.getDataToPixel(C,xe,!1,Se),Be=g.getDataToPixel(C,Re,!0,Ee),Le=g.getPixelToData(C,xe,!1,Se),Te=g.getPixelToData(C,Re,!0,Ee),De=Ne(),Ve={element:De.node(),gd:C,prepFn:st,doneFn:it,clickFn:nt},Ye;u.init(Ve),De.node().onmousemove=ht;function Ne(){return G?Xe():S}function Xe(){var Ue=10,ze=Math.max(o.line.width,Ue),rt=T.append("g").attr("data-index",R);rt.append("path").attr("d",S.attr("d")).style({cursor:"move","stroke-width":ze,"stroke-opacity":"0"});var lt={"fill-opacity":"0"},Qe=Math.max(ze/2,Ue);return rt.append("circle").attr({"data-line-point":"start-point",cx:k?Oe(o.xanchor)+o.x0:Oe(o.x0),cy:V?Be(o.yanchor)-o.y0:Be(o.y0),r:Qe}).style(lt).classed("cursor-grab",!0),rt.append("circle").attr({"data-line-point":"end-point",cx:k?Oe(o.xanchor)+o.x1:Oe(o.x1),cy:V?Be(o.yanchor)-o.y1:Be(o.y1),r:Qe}).style(lt).classed("cursor-grab",!0),rt}function ht(Ue){if(p(C)){Ye=null;return}if(G)Ue.target.tagName==="path"?Ye="move":Ye=Ue.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var ze=Ve.element.getBoundingClientRect(),rt=ze.right-ze.left,lt=ze.bottom-ze.top,Qe=Ue.clientX-ze.left,Fe=Ue.clientY-ze.top,Ce=!U&&rt>N&&lt>H&&!Ue.shiftKey?u.getCursor(Qe/rt,1-Fe/lt):"move";i(S,Ce),Ye=Ce.split("-")[0]}}function st(Ue){p(C)||(k&&(ce=Oe(o.xanchor)),V&&(q=Be(o.yanchor)),o.type==="path"?le=o.path:(ee=k?o.x0:Oe(o.x0),re=V?o.y0:Be(o.y0),ie=k?o.x1:Oe(o.x1),se=V?o.y1:Be(o.y1)),ee<ie?(Q=ee,ne="x0",ue=ie,ve="x1"):(Q=ie,ne="x1",ue=ee,ve="x0"),!V&&re<se||V&&re>se?(j=re,fe="y0",Z=se,te="y1"):(j=se,fe="y1",Z=re,te="y0"),ht(Ue),Et(T,o),et(S,o,C),Ve.moveFn=Ye==="move"?pt:Tt,Ve.altKey=Ue.altKey)}function it(){p(C)||(i(S),Dt(T),l(S,C,o),d.call("_guiRelayout",C,O.getUpdateObj()))}function nt(){p(C)||Dt(T)}function pt(Ue,ze){if(o.type==="path"){var rt=function(Fe){return Fe},lt=rt,Qe=rt;k?Y("xanchor",o.xanchor=Le(ce+Ue)):(lt=function(Ce){return Le(Oe(Ce)+Ue)},xe&&xe.type==="date"&&(lt=g.encodeDate(lt))),V?Y("yanchor",o.yanchor=Te(q+ze)):(Qe=function(Ce){return Te(Be(Ce)+ze)},Re&&Re.type==="date"&&(Qe=g.encodeDate(Qe))),Y("path",o.path=M(le,lt,Qe))}else k?Y("xanchor",o.xanchor=Le(ce+Ue)):(Y("x0",o.x0=Le(ee+Ue)),Y("x1",o.x1=Le(ie+Ue))),V?Y("yanchor",o.yanchor=Te(q+ze)):(Y("y0",o.y0=Te(re+ze)),Y("y1",o.y1=Te(se+ze)));S.attr("d",h(C,o)),Et(T,o)}function Tt(Ue,ze){if(U){var rt=function(Bt){return Bt},lt=rt,Qe=rt;k?Y("xanchor",o.xanchor=Le(ce+Ue)):(lt=function(Wt){return Le(Oe(Wt)+Ue)},xe&&xe.type==="date"&&(lt=g.encodeDate(lt))),V?Y("yanchor",o.yanchor=Te(q+ze)):(Qe=function(Wt){return Te(Be(Wt)+ze)},Re&&Re.type==="date"&&(Qe=g.encodeDate(Qe))),Y("path",o.path=M(le,lt,Qe))}else if(G){if(Ye==="resize-over-start-point"){var Fe=ee+Ue,Ce=V?re-ze:re+ze;Y("x0",o.x0=k?Fe:Le(Fe)),Y("y0",o.y0=V?Ce:Te(Ce))}else if(Ye==="resize-over-end-point"){var pe=ie+Ue,we=V?se-ze:se+ze;Y("x1",o.x1=k?pe:Le(pe)),Y("y1",o.y1=V?we:Te(we))}}else{var Ae=function(Bt){return Ye.indexOf(Bt)!==-1},Pe=Ae("n"),Ge=Ae("s"),We=Ae("w"),tt=Ae("e"),ct=Pe?j+ze:j,St=Ge?Z+ze:Z,Pt=We?Q+Ue:Q,wt=tt?ue+Ue:ue;V&&(Pe&&(ct=j-ze),Ge&&(St=Z-ze)),(!V&&St-ct>H||V&&ct-St>H)&&(Y(fe,o[fe]=V?ct:Te(ct)),Y(te,o[te]=V?St:Te(St))),wt-Pt>N&&(Y(ne,o[ne]=k?Pt:Le(Pt)),Y(ve,o[ve]=k?wt:Le(wt)))}S.attr("d",h(C,o)),Et(T,o)}function Et(Ue,ze){(k||V)&&rt();function rt(){var lt=ze.type!=="path",Qe=Ue.selectAll(".visual-cue").data([0]),Fe=1;Qe.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Fe}).classed("visual-cue",!0);var Ce=Oe(k?ze.xanchor:P.midRange(lt?[ze.x0,ze.x1]:g.extractPathCoords(ze.path,f.paramIsX))),pe=Be(V?ze.yanchor:P.midRange(lt?[ze.y0,ze.y1]:g.extractPathCoords(ze.path,f.paramIsY)));if(Ce=g.roundPositionForSharpStrokeRendering(Ce,Fe),pe=g.roundPositionForSharpStrokeRendering(pe,Fe),k&&V){var we="M"+(Ce-1-Fe)+","+(pe-1-Fe)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Qe.attr("d",we)}else if(k){var Ae="M"+(Ce-1-Fe)+","+(pe-9-Fe)+"v18 h2 v-18 Z";Qe.attr("d",Ae)}else{var Pe="M"+(Ce-9-Fe)+","+(pe-1-Fe)+"h18 v2 h-18 Z";Qe.attr("d",Pe)}}}function Dt(Ue){Ue.selectAll(".visual-cue").remove()}function et(Ue,ze,rt){var lt=ze.xref,Qe=ze.yref,Fe=a.getFromId(rt,lt),Ce=a.getFromId(rt,Qe),pe="";lt!=="paper"&&!Fe.autorange&&(pe+=lt),Qe!=="paper"&&!Ce.autorange&&(pe+=Qe),r.setClipUrl(Ue,pe?"clip"+rt._fullLayout._uid+pe:null,rt)}}function M(C,S,o){return C.replace(f.segmentRE,function(R){var T=0,O=R.charAt(0),N=f.paramIsX[O],H=f.paramIsY[O],k=f.numParams[O],V=R.substr(1).replace(f.paramRE,function(G){return T>=k||(N[T]?G=S(G):H[T]&&(G=o(G)),T++),G});return O+V})}function L(C,S){if(E(C)){var o=S.node(),R=+o.getAttribute("data-index");if(R>=0){if(R===C._fullLayout._activeShapeIndex){D(C);return}C._fullLayout._activeShapeIndex=R,C._fullLayout._deactivateShape=D,b(C)}}}function D(C){if(E(C)){var S=C._fullLayout._activeShapeIndex;S>=0&&(v(C),delete C._fullLayout._activeShapeIndex,b(C))}}function A(C){if(E(C)){v(C);var S=C._fullLayout._activeShapeIndex,o=(C.layout||{}).shapes||[];if(S<o.length){for(var R=[],T=0;T<o.length;T++)T!==S&&R.push(o[T]);delete C._fullLayout._activeShapeIndex,d.call("_guiRelayout",C,{shapes:R})}}}},29241:function(z,B,e){var d=e(79952).P,P=e(1426).extendFlat;z.exports={newshape:{line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:0,dflt:4,editType:"none"},dash:P({},d,{dflt:"solid",editType:"none"}),editType:"none"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"none"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"none"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal",editType:"none"},editType:"none"},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},89995:function(z){var B=32;z.exports={CIRCLE_SIDES:B,i000:0,i090:B/4,i180:B/2,i270:B/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}},45547:function(z,B,e){var d=e(7901);z.exports=function(a,_,x){x("newshape.drawdirection"),x("newshape.layer"),x("newshape.fillcolor"),x("newshape.fillrule"),x("newshape.opacity");var v=x("newshape.line.width");if(v){var y=(a||{}).plot_bgcolor||"#FFF";x("newshape.line.color",d.contrast(y)),x("newshape.line.dash")}x("activeshape.fillcolor"),x("activeshape.opacity")}},60165:function(z,B,e){var d=e(95616),P=e(89995),a=P.CIRCLE_SIDES,_=P.SQRT2,x=e(75549),v=x.p2r,y=x.r2p,r=[0,3,4,5,6,1,2],n=[0,3,4,1,2];B.writePaths=function(f){var g=f.length;if(!g)return"M0,0Z";for(var h="",b=0;b<g;b++)for(var p=f[b].length,E=0;E<p;E++){var c=f[b][E][0];if(c==="Z")h+="Z";else for(var l=f[b][E].length,m=0;m<l;m++){var M=m;c==="Q"||c==="S"?M=n[m]:c==="C"&&(M=r[m]),h+=f[b][E][M],m>0&&m<l-1&&(h+=",")}}return h},B.readPaths=function(f,g,h,b){var p=d(f),E=[],c=-1,l=function(){c++,E[c]=[]},m,M=0,L=0,D,A,C=function(){D=M,A=L};C();for(var S=0;S<p.length;S++){var o=[],R,T,O,N,H=p[S][0],k=H;switch(H){case"M":l(),M=+p[S][1],L=+p[S][2],o.push([k,M,L]),C();break;case"Q":case"S":R=+p[S][1],O=+p[S][2],M=+p[S][3],L=+p[S][4],o.push([k,M,L,R,O]);break;case"C":R=+p[S][1],O=+p[S][2],T=+p[S][3],N=+p[S][4],M=+p[S][5],L=+p[S][6],o.push([k,M,L,R,O,T,N]);break;case"T":case"L":M=+p[S][1],L=+p[S][2],o.push([k,M,L]);break;case"H":k="L",M=+p[S][1],o.push([k,M,L]);break;case"V":k="L",L=+p[S][1],o.push([k,M,L]);break;case"A":k="L";var V=+p[S][1],G=+p[S][2];+p[S][4]||(V=-V,G=-G);var U=M-V,Y=L;for(m=1;m<=a/2;m++){var ee=2*Math.PI*m/a;o.push([k,U+V*Math.cos(ee),Y+G*Math.sin(ee)])}break;case"Z":(M!==D||L!==A)&&(M=D,L=A,o.push([k,M,L]));break}for(var re=(h||{}).domain,ie=g._fullLayout._size,se=h&&h.xsizemode==="pixel",ce=h&&h.ysizemode==="pixel",q=b===!1,j=0;j<o.length;j++){for(m=0;m+2<7;m+=2){var Z=o[j][m+1],Q=o[j][m+2];Z===void 0||Q===void 0||(M=Z,L=Q,h&&(h.xaxis&&h.xaxis.p2r?(q&&(Z-=h.xaxis._offset),se?Z=y(h.xaxis,h.xanchor)+Z:Z=v(h.xaxis,Z)):(q&&(Z-=ie.l),re?Z=re.x[0]+Z/ie.w:Z=Z/ie.w),h.yaxis&&h.yaxis.p2r?(q&&(Q-=h.yaxis._offset),ce?Q=y(h.yaxis,h.yanchor)-Q:Q=v(h.yaxis,Q)):(q&&(Q-=ie.t),re?Q=re.y[1]-Q/ie.h:Q=1-Q/ie.h)),o[j][m+1]=Z,o[j][m+2]=Q)}E[c].push(o[j].slice())}}return E};function u(f,g){return Math.abs(f-g)<=1e-6}function i(f,g){var h=g[1]-f[1],b=g[2]-f[2];return Math.sqrt(h*h+b*b)}B.pointsOnRectangle=function(f){var g=f.length;if(g!==5)return!1;for(var h=1;h<3;h++){var b=f[0][h]-f[1][h],p=f[3][h]-f[2][h];if(!u(b,p))return!1;var E=f[0][h]-f[3][h],c=f[1][h]-f[2][h];if(!u(E,c))return!1}return!u(f[0][1],f[1][1])&&!u(f[0][1],f[3][1])?!1:!!(i(f[0],f[1])*i(f[0],f[3]))},B.pointsOnEllipse=function(f){var g=f.length;if(g!==a+1)return!1;g=a;for(var h=0;h<g;h++){var b=(g*2-h)%g,p=(g/2+b)%g,E=(g/2+h)%g;if(!u(i(f[h],f[E]),i(f[b],f[p])))return!1}return!0},B.handleEllipse=function(f,g,h){if(!f)return[g,h];var b=B.ellipseOver({x0:g[0],y0:g[1],x1:h[0],y1:h[1]}),p=(b.x1+b.x0)/2,E=(b.y1+b.y0)/2,c=(b.x1-b.x0)/2,l=(b.y1-b.y0)/2;c||(c=l=l/_),l||(l=c=c/_);for(var m=[],M=0;M<a;M++){var L=M*2*Math.PI/a;m.push([p+c*Math.cos(L),E+l*Math.sin(L)])}return m},B.ellipseOver=function(f){var g=f.x0,h=f.y0,b=f.x1,p=f.y1,E=b-g,c=p-h;g-=E,h-=c;var l=(g+b)/2,m=(h+p)/2,M=_;return E*=M,c*=M,{x0:l-E,y0:m-c,x1:l+E,y1:m+c}},B.fixDatesForPaths=function(f,g,h){var b=g.type==="date",p=h.type==="date";if(!b&&!p)return f;for(var E=0;E<f.length;E++)for(var c=0;c<f[E].length;c++)for(var l=0;l+2<f[E][c].length;l+=2)b&&(f[E][c][l+1]=f[E][c][l+1].replace(" ","_")),p&&(f[E][c][l+2]=f[E][c][l+2].replace(" ","_"));return f}},90551:function(z,B,e){var d=e(64505),P=d.drawMode,a=d.openMode,_=e(89995),x=_.i000,v=_.i090,y=_.i180,r=_.i270,n=_.cos45,u=_.sin45,i=e(75549),f=i.p2r,g=i.r2p,h=e(51873),b=h.clearOutline,p=e(60165),E=p.readPaths,c=p.writePaths,l=p.ellipseOver,m=p.fixDatesForPaths;z.exports=function(L,D){if(L.length){var A=L[0][0];if(A){var C=A.getAttribute("d"),S=D.gd,o=S._fullLayout.newshape,R=D.plotinfo,T=R.xaxis,O=R.yaxis,N=!!R.domain||!R.xaxis,H=!!R.domain||!R.yaxis,k=D.isActiveShape,V=D.dragmode,G=(S.layout||{}).shapes||[];if(!P(V)&&k!==void 0){var U=S._fullLayout._activeShapeIndex;if(U<G.length)switch(S._fullLayout.shapes[U].type){case"rect":V="drawrect";break;case"circle":V="drawcircle";break;case"line":V="drawline";break;case"path":var Y=G[U].path||"";Y[Y.length-1]==="Z"?V="drawclosedpath":V="drawopenpath";break}}var ee=a(V),re=E(C,S,R,k),ie={editable:!0,xref:N?"paper":T._id,yref:H?"paper":O._id,layer:o.layer,opacity:o.opacity,line:{color:o.line.color,width:o.line.width,dash:o.line.dash}};ee||(ie.fillcolor=o.fillcolor,ie.fillrule=o.fillrule);var se;if(re.length===1&&(se=re[0]),se&&se.length===5&&V==="drawrect")ie.type="rect",ie.x0=se[0][1],ie.y0=se[0][2],ie.x1=se[2][1],ie.y1=se[2][2];else if(se&&V==="drawline")ie.type="line",ie.x0=se[0][1],ie.y0=se[0][2],ie.x1=se[1][1],ie.y1=se[1][2];else if(se&&V==="drawcircle"){ie.type="circle";var ce=se[x][1],q=se[v][1],j=se[y][1],Z=se[r][1],Q=se[x][2],ue=se[v][2],fe=se[y][2],te=se[r][2],ne=R.xaxis&&(R.xaxis.type==="date"||R.xaxis.type==="log"),ve=R.yaxis&&(R.yaxis.type==="date"||R.yaxis.type==="log");ne&&(ce=g(R.xaxis,ce),q=g(R.xaxis,q),j=g(R.xaxis,j),Z=g(R.xaxis,Z)),ve&&(Q=g(R.yaxis,Q),ue=g(R.yaxis,ue),fe=g(R.yaxis,fe),te=g(R.yaxis,te));var le=(q+Z)/2,xe=(Q+fe)/2,Se=(Z-q+j-ce)/2,Re=(te-ue+fe-Q)/2,Ee=l({x0:le,y0:xe,x1:le+Se*n,y1:xe+Re*u});ne&&(Ee.x0=f(R.xaxis,Ee.x0),Ee.x1=f(R.xaxis,Ee.x1)),ve&&(Ee.y0=f(R.yaxis,Ee.y0),Ee.y1=f(R.yaxis,Ee.y1)),ie.x0=Ee.x0,ie.y0=Ee.y0,ie.x1=Ee.x1,ie.y1=Ee.y1}else ie.type="path",T&&O&&m(re,T,O),ie.path=c(re),se=null;b(S);for(var Oe=D.editHelpers,Be=(Oe||{}).modifyItem,Le=[],Te=0;Te<G.length;Te++){var De=S._fullLayout.shapes[Te];if(Le[Te]=De._input,k!==void 0&&Te===S._fullLayout._activeShapeIndex){var Ve=ie;switch(De.type){case"line":case"rect":case"circle":Be("x0",Ve.x0),Be("x1",Ve.x1),Be("y0",Ve.y0),Be("y1",Ve.y1);break;case"path":Be("path",Ve.path);break}}}return k===void 0?(Le.push(ie),Le):Oe?Oe.getUpdateObj():{}}}}},51873:function(z){function B(d){var P=d._fullLayout._zoomlayer;P&&P.selectAll(".outline-controllers").remove()}function e(d){var P=d._fullLayout._zoomlayer;P&&P.selectAll(".select-outline").remove(),d._fullLayout._outlining=!1}z.exports={clearOutlineControllers:B,clearOutline:e}},30477:function(z,B,e){var d=e(21459),P=e(71828),a=e(89298);B.rangeToShapePosition=function(x){return x.type==="log"?x.r2d:function(v){return v}},B.shapePositionToRange=function(x){return x.type==="log"?x.d2r:function(v){return v}},B.decodeDate=function(x){return function(v){return v.replace&&(v=v.replace("_"," ")),x(v)}},B.encodeDate=function(x){return function(v){return x(v).replace(" ","_")}},B.extractPathCoords=function(x,v,y){var r=[],n=x.match(d.segmentRE);return n.forEach(function(u){var i=v[u.charAt(0)].drawn;if(i!==void 0){var f=u.substr(1).match(d.paramRE);if(!(!f||f.length<i)){var g=f[i],h=y?g:P.cleanNumber(g);r.push(h)}}}),r},B.getDataToPixel=function(x,v,y,r){var n=x._fullLayout._size,u;if(v)if(r==="domain")u=function(f){return v._length*(y?1-f:f)+v._offset};else{var i=B.shapePositionToRange(v);u=function(f){return v._offset+v.r2p(i(f,!0))},v.type==="date"&&(u=B.decodeDate(u))}else y?u=function(f){return n.t+n.h*(1-f)}:u=function(f){return n.l+n.w*f};return u},B.getPixelToData=function(x,v,y,r){var n=x._fullLayout._size,u;if(v)if(r==="domain")u=function(f){var g=(f-v._offset)/v._length;return y?1-g:g};else{var i=B.rangeToShapePosition(v);u=function(f){return i(v.p2r(f-v._offset))}}else y?u=function(f){return 1-(f-n.t)/n.h}:u=function(f){return(f-n.l)/n.w};return u},B.roundPositionForSharpStrokeRendering=function(x,v){var y=Math.round(v%2)===1,r=Math.round(x);return y?r+.5:r},B.makeShapesOptionsAndPlotinfo=function(x,v){var y=x._fullLayout.shapes[v]||{},r=x._fullLayout._plots[y.xref+y.yref],n=!!r;return n?r._hadPlotinfo=!0:(r={},y.xref&&y.xref!=="paper"&&(r.xaxis=x._fullLayout[y.xref+"axis"]),y.yref&&y.yref!=="paper"&&(r.yaxis=x._fullLayout[y.yref+"axis"])),r.xsizemode=y.xsizemode,r.ysizemode=y.ysizemode,r.xanchor=y.xanchor,r.yanchor=y.yanchor,{options:y,plotinfo:r}},B.makeSelectionsOptionsAndPlotinfo=function(x,v){var y=x._fullLayout.selections[v]||{},r=x._fullLayout._plots[y.xref+y.yref],n=!!r;return n?r._hadPlotinfo=!0:(r={},y.xref&&(r.xaxis=x._fullLayout[y.xref+"axis"]),y.yref&&(r.yaxis=x._fullLayout[y.yref+"axis"])),{options:y,plotinfo:r}},B.getPathString=function(x,v){var y=v.type,r=a.getRefType(v.xref),n=a.getRefType(v.yref),u=a.getFromId(x,v.xref),i=a.getFromId(x,v.yref),f=x._fullLayout._size,g,h,b,p,E,c,l,m;if(u?r==="domain"?h=function(O){return u._offset+u._length*O}:(g=B.shapePositionToRange(u),h=function(O){return u._offset+u.r2p(g(O,!0))}):h=function(O){return f.l+f.w*O},i?n==="domain"?p=function(O){return i._offset+i._length*(1-O)}:(b=B.shapePositionToRange(i),p=function(O){return i._offset+i.r2p(b(O,!0))}):p=function(O){return f.t+f.h*(1-O)},y==="path")return u&&u.type==="date"&&(h=B.decodeDate(h)),i&&i.type==="date"&&(p=B.decodeDate(p)),_(v,h,p);if(v.xsizemode==="pixel"){var M=h(v.xanchor);E=M+v.x0,c=M+v.x1}else E=h(v.x0),c=h(v.x1);if(v.ysizemode==="pixel"){var L=p(v.yanchor);l=L-v.y0,m=L-v.y1}else l=p(v.y0),m=p(v.y1);if(y==="line")return"M"+E+","+l+"L"+c+","+m;if(y==="rect")return"M"+E+","+l+"H"+c+"V"+m+"H"+E+"Z";var D=(E+c)/2,A=(l+m)/2,C=Math.abs(D-E),S=Math.abs(A-l),o="A"+C+","+S,R=D+C+","+A,T=D+","+(A-S);return"M"+R+o+" 0 1,1 "+T+o+" 0 0,1 "+R+"Z"};function _(x,v,y){var r=x.path,n=x.xsizemode,u=x.ysizemode,i=x.xanchor,f=x.yanchor;return r.replace(d.segmentRE,function(g){var h=0,b=g.charAt(0),p=d.paramIsX[b],E=d.paramIsY[b],c=d.numParams[b],l=g.substr(1).replace(d.paramRE,function(m){return p[h]?n==="pixel"?m=v(i)+Number(m):m=v(m):E[h]&&(u==="pixel"?m=y(f)-Number(m):m=y(m)),h++,h>c&&(m="X"),m});return h>c&&(l=l.replace(/[\s,]*X.*/,""),P.log("Ignoring extra params in segment "+g)),b+l})}},89853:function(z,B,e){var d=e(34031);z.exports={moduleType:"component",name:"shapes",layoutAttributes:e(89827),supplyLayoutDefaults:e(84726),supplyDrawNewShapeDefaults:e(45547),includeBasePlot:e(76325)("shapes"),calcAutorange:e(5627),draw:d.draw,drawOne:d.drawOne}},75067:function(z,B,e){var d=e(41940),P=e(35025),a=e(1426).extendDeepAll,_=e(30962).overrideAll,x=e(85594),v=e(44467).templatedArray,y=e(98292),r=v("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});z.exports=_(v("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:r,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:a(P({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:x.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:d({})},font:d({}),activebgcolor:{valType:"color",dflt:y.gripBgActiveColor},bgcolor:{valType:"color",dflt:y.railBgColor},bordercolor:{valType:"color",dflt:y.railBorderColor},borderwidth:{valType:"number",min:0,dflt:y.railBorderWidth},ticklen:{valType:"number",min:0,dflt:y.tickLength},tickcolor:{valType:"color",dflt:y.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:y.minorTickLength}}),"arraydraw","from-root")},98292:function(z){z.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},12343:function(z,B,e){var d=e(71828),P=e(85501),a=e(75067),_=e(98292),x=_.name,v=a.steps;z.exports=function(u,i){P(u,i,{name:x,handleItemDefaults:y})};function y(n,u,i){function f(m,M){return d.coerce(n,u,a,m,M)}for(var g=P(n,u,{name:"steps",handleItemDefaults:r}),h=0,b=0;b<g.length;b++)g[b].visible&&h++;var p;if(h<2?p=u.visible=!1:p=f("visible"),!!p){u._stepCount=h;var E=u._visibleSteps=d.filterVisible(g),c=f("active");(g[c]||{}).visible||(u.active=E[0]._index),f("x"),f("y"),d.noneOrAll(n,u,["x","y"]),f("xanchor"),f("yanchor"),f("len"),f("lenmode"),f("pad.t"),f("pad.r"),f("pad.b"),f("pad.l"),d.coerceFont(f,"font",i.font);var l=f("currentvalue.visible");l&&(f("currentvalue.xanchor"),f("currentvalue.prefix"),f("currentvalue.suffix"),f("currentvalue.offset"),d.coerceFont(f,"currentvalue.font",u.font)),f("transition.duration"),f("transition.easing"),f("bgcolor"),f("activebgcolor"),f("bordercolor"),f("borderwidth"),f("ticklen"),f("tickwidth"),f("tickcolor"),f("minorticklen")}}function r(n,u){function i(h,b){return d.coerce(n,u,v,h,b)}var f;if(n.method!=="skip"&&!Array.isArray(n.args)?f=u.visible=!1:f=i("visible"),f){i("method"),i("args");var g=i("label","step-"+u._index);i("value",g),i("execute")}}},44504:function(z,B,e){var d=e(39898),P=e(74875),a=e(7901),_=e(91424),x=e(71828),v=x.strTranslate,y=e(63893),r=e(44467).arrayEditor,n=e(98292),u=e(18783),i=u.LINE_SPACING,f=u.FROM_TL,g=u.FROM_BR;z.exports=function(V){var G=V._context.staticPlot,U=V._fullLayout,Y=b(U,V),ee=U._infolayer.selectAll("g."+n.containerClassName).data(Y.length>0?[0]:[]);ee.enter().append("g").classed(n.containerClassName,!0).style("cursor",G?null:"ew-resize");function re(q){q._commandObserver&&(q._commandObserver.remove(),delete q._commandObserver),P.autoMargin(V,h(q))}if(ee.exit().each(function(){d.select(this).selectAll("g."+n.groupClassName).each(re)}).remove(),Y.length!==0){var ie=ee.selectAll("g."+n.groupClassName).data(Y,p);ie.enter().append("g").classed(n.groupClassName,!0),ie.exit().each(re).remove();for(var se=0;se<Y.length;se++){var ce=Y[se];E(V,ce)}ie.each(function(q){var j=d.select(this);o(q),P.manageCommandObserver(V,q,q._visibleSteps,function(Z){var Q=j.data()[0];Q.active!==Z.index&&(Q._dragging||A(V,j,Q,Z.index,!1,!0))}),c(V,d.select(this),q)})}};function h(k){return n.autoMarginIdRoot+k._index}function b(k,V){for(var G=k[n.name],U=[],Y=0;Y<G.length;Y++){var ee=G[Y];ee.visible&&(ee._gd=V,U.push(ee))}return U}function p(k){return k._index}function E(k,V){var G=_.tester.selectAll("g."+n.labelGroupClass).data(V._visibleSteps);G.enter().append("g").classed(n.labelGroupClass,!0);var U=0,Y=0;G.each(function(ue){var fe=d.select(this),te=M(fe,{step:ue},V),ne=te.node();if(ne){var ve=_.bBox(ne);Y=Math.max(Y,ve.height),U=Math.max(U,ve.width)}}),G.remove();var ee=V._dims={};ee.inputAreaWidth=Math.max(n.railWidth,n.gripHeight);var re=k._fullLayout._size;ee.lx=re.l+re.w*V.x,ee.ly=re.t+re.h*(1-V.y),V.lenmode==="fraction"?ee.outerLength=Math.round(re.w*V.len):ee.outerLength=V.len,ee.inputAreaStart=0,ee.inputAreaLength=Math.round(ee.outerLength-V.pad.l-V.pad.r);var ie=ee.inputAreaLength-2*n.stepInset,se=ie/(V._stepCount-1),ce=U+n.labelPadding;if(ee.labelStride=Math.max(1,Math.ceil(ce/se)),ee.labelHeight=Y,ee.currentValueMaxWidth=0,ee.currentValueHeight=0,ee.currentValueTotalHeight=0,ee.currentValueMaxLines=1,V.currentvalue.visible){var q=_.tester.append("g");G.each(function(ue){var fe=l(q,V,ue.label),te=fe.node()&&_.bBox(fe.node())||{width:0,height:0},ne=y.lineCount(fe);ee.currentValueMaxWidth=Math.max(ee.currentValueMaxWidth,Math.ceil(te.width)),ee.currentValueHeight=Math.max(ee.currentValueHeight,Math.ceil(te.height)),ee.currentValueMaxLines=Math.max(ee.currentValueMaxLines,ne)}),ee.currentValueTotalHeight=ee.currentValueHeight+V.currentvalue.offset,q.remove()}ee.height=ee.currentValueTotalHeight+n.tickOffset+V.ticklen+n.labelOffset+ee.labelHeight+V.pad.t+V.pad.b;var j="left";x.isRightAnchor(V)&&(ee.lx-=ee.outerLength,j="right"),x.isCenterAnchor(V)&&(ee.lx-=ee.outerLength/2,j="center");var Z="top";x.isBottomAnchor(V)&&(ee.ly-=ee.height,Z="bottom"),x.isMiddleAnchor(V)&&(ee.ly-=ee.height/2,Z="middle"),ee.outerLength=Math.ceil(ee.outerLength),ee.height=Math.ceil(ee.height),ee.lx=Math.round(ee.lx),ee.ly=Math.round(ee.ly);var Q={y:V.y,b:ee.height*g[Z],t:ee.height*f[Z]};V.lenmode==="fraction"?(Q.l=0,Q.xl=V.x-V.len*f[j],Q.r=0,Q.xr=V.x+V.len*g[j]):(Q.x=V.x,Q.l=ee.outerLength*f[j],Q.r=ee.outerLength*g[j]),P.autoMargin(k,h(V),Q)}function c(k,V,G){(G.steps[G.active]||{}).visible||(G.active=G._visibleSteps[0]._index),V.call(l,G).call(H,G).call(L,G).call(S,G).call(N,k,G).call(m,k,G);var U=G._dims;_.setTranslate(V,U.lx+G.pad.l,U.ly+G.pad.t),V.call(R,G,!1),V.call(l,G)}function l(k,V,G){if(V.currentvalue.visible){var U=V._dims,Y,ee;switch(V.currentvalue.xanchor){case"right":Y=U.inputAreaLength-n.currentValueInset-U.currentValueMaxWidth,ee="left";break;case"center":Y=U.inputAreaLength*.5,ee="middle";break;default:Y=n.currentValueInset,ee="left"}var re=x.ensureSingle(k,"text",n.labelClass,function(Z){Z.attr({"text-anchor":ee,"data-notex":1})}),ie=V.currentvalue.prefix?V.currentvalue.prefix:"";if(typeof G=="string")ie+=G;else{var se=V.steps[V.active].label,ce=V._gd._fullLayout._meta;ce&&(se=x.templateString(se,ce)),ie+=se}V.currentvalue.suffix&&(ie+=V.currentvalue.suffix),re.call(_.font,V.currentvalue.font).text(ie).call(y.convertToTspans,V._gd);var q=y.lineCount(re),j=(U.currentValueMaxLines+1-q)*V.currentvalue.font.size*i;return y.positionText(re,Y,j),re}}function m(k,V,G){var U=x.ensureSingle(k,"rect",n.gripRectClass,function(Y){Y.call(C,V,k,G).style("pointer-events","all")});U.attr({width:n.gripWidth,height:n.gripHeight,rx:n.gripRadius,ry:n.gripRadius}).call(a.stroke,G.bordercolor).call(a.fill,G.bgcolor).style("stroke-width",G.borderwidth+"px")}function M(k,V,G){var U=x.ensureSingle(k,"text",n.labelClass,function(re){re.attr({"text-anchor":"middle","data-notex":1})}),Y=V.step.label,ee=G._gd._fullLayout._meta;return ee&&(Y=x.templateString(Y,ee)),U.call(_.font,G.font).text(Y).call(y.convertToTspans,G._gd),U}function L(k,V){var G=x.ensureSingle(k,"g",n.labelsClass),U=V._dims,Y=G.selectAll("g."+n.labelGroupClass).data(U.labelSteps);Y.enter().append("g").classed(n.labelGroupClass,!0),Y.exit().remove(),Y.each(function(ee){var re=d.select(this);re.call(M,ee,V),_.setTranslate(re,T(V,ee.fraction),n.tickOffset+V.ticklen+V.font.size*i+n.labelOffset+U.currentValueTotalHeight)})}function D(k,V,G,U,Y){var ee=Math.round(U*(G._stepCount-1)),re=G._visibleSteps[ee]._index;re!==G.active&&A(k,V,G,re,!0,Y)}function A(k,V,G,U,Y,ee){var re=G.active;G.active=U,r(k.layout,n.name,G).applyUpdate("active",U);var ie=G.steps[G.active];V.call(R,G,ee),V.call(l,G),k.emit("plotly_sliderchange",{slider:G,step:G.steps[G.active],interaction:Y,previousActive:re}),ie&&ie.method&&Y&&(V._nextMethod?(V._nextMethod.step=ie,V._nextMethod.doCallback=Y,V._nextMethod.doTransition=ee):(V._nextMethod={step:ie,doCallback:Y,doTransition:ee},V._nextMethodRaf=window.requestAnimationFrame(function(){var se=V._nextMethod.step;se.method&&(se.execute&&P.executeAPICommand(k,se.method,se.args),V._nextMethod=null,V._nextMethodRaf=null)})))}function C(k,V,G){if(V._context.staticPlot)return;var U=G.node(),Y=d.select(V);function ee(){return G.data()[0]}function re(){var ie=ee();V.emit("plotly_sliderstart",{slider:ie});var se=G.select("."+n.gripRectClass);d.event.stopPropagation(),d.event.preventDefault(),se.call(a.fill,ie.activebgcolor);var ce=O(ie,d.mouse(U)[0]);D(V,G,ie,ce,!0),ie._dragging=!0;function q(){var Z=ee(),Q=O(Z,d.mouse(U)[0]);D(V,G,Z,Q,!1)}Y.on("mousemove",q),Y.on("touchmove",q);function j(){var Z=ee();Z._dragging=!1,se.call(a.fill,Z.bgcolor),Y.on("mouseup",null),Y.on("mousemove",null),Y.on("touchend",null),Y.on("touchmove",null),V.emit("plotly_sliderend",{slider:Z,step:Z.steps[Z.active]})}Y.on("mouseup",j),Y.on("touchend",j)}k.on("mousedown",re),k.on("touchstart",re)}function S(k,V){var G=k.selectAll("rect."+n.tickRectClass).data(V._visibleSteps),U=V._dims;G.enter().append("rect").classed(n.tickRectClass,!0),G.exit().remove(),G.attr({width:V.tickwidth+"px","shape-rendering":"crispEdges"}),G.each(function(Y,ee){var re=ee%U.labelStride===0,ie=d.select(this);ie.attr({height:re?V.ticklen:V.minorticklen}).call(a.fill,V.tickcolor),_.setTranslate(ie,T(V,ee/(V._stepCount-1))-.5*V.tickwidth,(re?n.tickOffset:n.minorTickOffset)+U.currentValueTotalHeight)})}function o(k){var V=k._dims;V.labelSteps=[];for(var G=k._stepCount,U=0;U<G;U+=V.labelStride)V.labelSteps.push({fraction:U/(G-1),step:k._visibleSteps[U]})}function R(k,V,G){for(var U=k.select("rect."+n.gripRectClass),Y=0,ee=0;ee<V._stepCount;ee++)if(V._visibleSteps[ee]._index===V.active){Y=ee;break}var re=T(V,Y/(V._stepCount-1));if(!V._invokingCommand){var ie=U;G&&V.transition.duration>0&&(ie=ie.transition().duration(V.transition.duration).ease(V.transition.easing)),ie.attr("transform",v(re-n.gripWidth*.5,V._dims.currentValueTotalHeight))}}function T(k,V){var G=k._dims;return G.inputAreaStart+n.stepInset+(G.inputAreaLength-2*n.stepInset)*Math.min(1,Math.max(0,V))}function O(k,V){var G=k._dims;return Math.min(1,Math.max(0,(V-n.stepInset-G.inputAreaStart)/(G.inputAreaLength-2*n.stepInset-2*G.inputAreaStart)))}function N(k,V,G){var U=G._dims,Y=x.ensureSingle(k,"rect",n.railTouchRectClass,function(ee){ee.call(C,V,k,G).style("pointer-events","all")});Y.attr({width:U.inputAreaLength,height:Math.max(U.inputAreaWidth,n.tickOffset+G.ticklen+U.labelHeight)}).call(a.fill,G.bgcolor).attr("opacity",0),_.setTranslate(Y,0,U.currentValueTotalHeight)}function H(k,V){var G=V._dims,U=G.inputAreaLength-n.railInset*2,Y=x.ensureSingle(k,"rect",n.railRectClass);Y.attr({width:U,height:n.railWidth,rx:n.railRadius,ry:n.railRadius,"shape-rendering":"crispEdges"}).call(a.stroke,V.bordercolor).call(a.fill,V.bgcolor).style("stroke-width",V.borderwidth+"px"),_.setTranslate(Y,n.railInset,(G.inputAreaWidth-n.railWidth)*.5+G.currentValueTotalHeight)}},23243:function(z,B,e){var d=e(98292);z.exports={moduleType:"component",name:d.name,layoutAttributes:e(75067),supplyLayoutDefaults:e(12343),draw:e(44504)}},92998:function(z,B,e){var d=e(39898),P=e(92770),a=e(74875),_=e(73972),x=e(71828),v=x.strTranslate,y=e(91424),r=e(7901),n=e(63893),u=e(37822),i=e(18783).OPPOSITE_SIDE,f=/ [XY][0-9]* /;function g(h,b,p){var E=p.propContainer,c=p.propName,l=p.placeholder,m=p.traceIndex,M=p.avoid||{},L=p.attributes,D=p.transform,A=p.containerGroup,C=h._fullLayout,S=1,o=!1,R=E.title,T=(R&&R.text?R.text:"").trim(),O=R&&R.font?R.font:{},N=O.family,H=O.size,k=O.color,V;c==="title.text"?V="titleText":c.indexOf("axis")!==-1?V="axisTitleText":c.indexOf("colorbar"!==-1)&&(V="colorbarTitleText");var G=h._context.edits[V];T===""?S=0:T.replace(f," % ")===l.replace(f," % ")&&(S=.2,o=!0,G||(T="")),p._meta?T=x.templateString(T,p._meta):C._meta&&(T=x.templateString(T,C._meta));var U=T||G,Y;A||(A=x.ensureSingle(C._infolayer,"g","g-"+b),Y=C._hColorbarMoveTitle);var ee=A.selectAll("text").data(U?[0]:[]);if(ee.enter().append("text"),ee.text(T).attr("class",b),ee.exit().remove(),!U)return A;function re(q){x.syncOrAsync([ie,se],q)}function ie(q){var j;return!D&&Y&&(D={}),D?(j="",D.rotate&&(j+="rotate("+[D.rotate,L.x,L.y]+")"),(D.offset||Y)&&(j+=v(0,(D.offset||0)-(Y||0)))):j=null,q.attr("transform",j),q.style({"font-family":N,"font-size":d.round(H,2)+"px",fill:r.rgb(k),opacity:S*r.opacity(k),"font-weight":a.fontWeight}).attr(L).call(n.convertToTspans,h),a.previousPromises(h)}function se(q){var j=d.select(q.node().parentNode);if(M&&M.selection&&M.side&&T){j.attr("transform",null);var Z=i[M.side],Q=M.side==="left"||M.side==="top"?-1:1,ue=P(M.pad)?M.pad:2,fe=y.bBox(j.node()),te={left:0,top:0,right:C.width,bottom:C.height},ne=M.maxShift||Q*(te[M.side]-fe[M.side]),ve=0;if(ne<0)ve=ne;else{var le=M.offsetLeft||0,xe=M.offsetTop||0;fe.left-=le,fe.right-=le,fe.top-=xe,fe.bottom-=xe,M.selection.each(function(){var Re=y.bBox(this);x.bBoxIntersect(fe,Re,ue)&&(ve=Math.max(ve,Q*(Re[M.side]-fe[Z])+ue))}),ve=Math.min(ne,ve),E._titleScoot=Math.abs(ve)}if(ve>0||ne<0){var Se={left:[-ve,0],right:[ve,0],top:[0,-ve],bottom:[0,ve]}[M.side];j.attr("transform",v(Se[0],Se[1]))}}}ee.call(re);function ce(){S=0,o=!0,ee.text(l).on("mouseover.opacity",function(){d.select(this).transition().duration(u.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){d.select(this).transition().duration(u.HIDE_PLACEHOLDER).style("opacity",0)})}return G&&(T?ee.on(".opacity",null):ce(),ee.call(n.makeEditable,{gd:h}).on("edit",function(q){m!==void 0?_.call("_guiRestyle",h,c,q,m):_.call("_guiRelayout",h,c,q)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(re)}).on("input",function(q){this.text(q||" ").call(n.positionText,L.x,L.y)})),ee.classed("js-placeholder",o),A}z.exports={draw:g}},7163:function(z,B,e){var d=e(41940),P=e(22399),a=e(1426).extendFlat,_=e(30962).overrideAll,x=e(35025),v=e(44467).templatedArray,y=v("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});z.exports=_(v("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:y,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:a(x({editType:"arraydraw"}),{}),font:d({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:P.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},75909:function(z){z.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},64897:function(z,B,e){var d=e(71828),P=e(85501),a=e(7163),_=e(75909),x=_.name,v=a.buttons;z.exports=function(u,i){var f={name:x,handleItemDefaults:y};P(u,i,f)};function y(n,u,i){function f(b,p){return d.coerce(n,u,a,b,p)}var g=P(n,u,{name:"buttons",handleItemDefaults:r}),h=f("visible",g.length>0);h&&(f("active"),f("direction"),f("type"),f("showactive"),f("x"),f("y"),d.noneOrAll(n,u,["x","y"]),f("xanchor"),f("yanchor"),f("pad.t"),f("pad.r"),f("pad.b"),f("pad.l"),d.coerceFont(f,"font",i.font),f("bgcolor",i.paper_bgcolor),f("bordercolor"),f("borderwidth"))}function r(n,u){function i(g,h){return d.coerce(n,u,v,g,h)}var f=i("visible",n.method==="skip"||Array.isArray(n.args));f&&(i("method"),i("args"),i("args2"),i("label"),i("execute"))}},13689:function(z,B,e){var d=e(39898),P=e(74875),a=e(7901),_=e(91424),x=e(71828),v=e(63893),y=e(44467).arrayEditor,r=e(18783).LINE_SPACING,n=e(75909),u=e(25849);z.exports=function(O){var N=O._fullLayout,H=x.filterVisible(N[n.name]);function k(se){P.autoMargin(O,S(se))}var V=N._menulayer.selectAll("g."+n.containerClassName).data(H.length>0?[0]:[]);if(V.enter().append("g").classed(n.containerClassName,!0).style("cursor","pointer"),V.exit().each(function(){d.select(this).selectAll("g."+n.headerGroupClassName).each(k)}).remove(),H.length!==0){var G=V.selectAll("g."+n.headerGroupClassName).data(H,i);G.enter().append("g").classed(n.headerGroupClassName,!0);for(var U=x.ensureSingle(V,"g",n.dropdownButtonGroupClassName,function(se){se.style("pointer-events","all")}),Y=0;Y<H.length;Y++){var ee=H[Y];C(O,ee)}var re="updatemenus"+N._uid,ie=new u(O,U,re);G.enter().size()&&(U.node().parentNode.appendChild(U.node()),U.call(R)),G.exit().each(function(se){U.call(R),k(se)}).remove(),G.each(function(se){var ce=d.select(this),q=se.type==="dropdown"?U:null;P.manageCommandObserver(O,se,se.buttons,function(j){h(O,se,se.buttons[j.index],ce,q,ie,j.index,!0)}),se.type==="dropdown"?(b(O,ce,U,ie,se),g(U,se)&&p(O,ce,U,ie,se)):p(O,ce,null,null,se)})}};function i(T){return T._index}function f(T){return+T.attr(n.menuIndexAttrName)==-1}function g(T,O){return+T.attr(n.menuIndexAttrName)===O._index}function h(T,O,N,H,k,V,G,U){O.active=G,y(T.layout,n.name,O).applyUpdate("active",G),O.type==="buttons"?p(T,H,null,null,O):O.type==="dropdown"&&(k.attr(n.menuIndexAttrName,"-1"),b(T,H,k,V,O),U||p(T,H,k,V,O))}function b(T,O,N,H,k){var V=x.ensureSingle(O,"g",n.headerClassName,function(se){se.style("pointer-events","all")}),G=k._dims,U=k.active,Y=k.buttons[U]||n.blankHeaderOpts,ee={y:k.pad.t,yPad:0,x:k.pad.l,xPad:0,index:0},re={width:G.headerWidth,height:G.headerHeight};V.call(l,k,Y,T).call(o,k,ee,re);var ie=x.ensureSingle(O,"text",n.headerArrowClassName,function(se){se.attr("text-anchor","end").call(_.font,k.font).text(n.arrowSymbol[k.direction])});ie.attr({x:G.headerWidth-n.arrowOffsetX+k.pad.l,y:G.headerHeight/2+n.textOffsetY+k.pad.t}),V.on("click",function(){N.call(R,String(g(N,k)?-1:k._index)),p(T,O,N,H,k)}),V.on("mouseover",function(){V.call(D)}),V.on("mouseout",function(){V.call(A,k)}),_.setTranslate(O,G.lx,G.ly)}function p(T,O,N,H,k){N||(N=O,N.attr("pointer-events","all"));var V=!f(N)||k.type==="buttons"?k.buttons:[],G=k.type==="dropdown"?n.dropdownButtonClassName:n.buttonClassName,U=N.selectAll("g."+G).data(x.filterVisible(V)),Y=U.enter().append("g").classed(G,!0),ee=U.exit();k.type==="dropdown"?(Y.attr("opacity","0").transition().attr("opacity","1"),ee.transition().attr("opacity","0").remove()):ee.remove();var re=0,ie=0,se=k._dims,ce=["up","down"].indexOf(k.direction)!==-1;k.type==="dropdown"&&(ce?ie=se.headerHeight+n.gapButtonHeader:re=se.headerWidth+n.gapButtonHeader),k.type==="dropdown"&&k.direction==="up"&&(ie=-n.gapButtonHeader+n.gapButton-se.openHeight),k.type==="dropdown"&&k.direction==="left"&&(re=-n.gapButtonHeader+n.gapButton-se.openWidth);var q={x:se.lx+re+k.pad.l,y:se.ly+ie+k.pad.t,yPad:n.gapButton,xPad:n.gapButton,index:0},j={l:q.x+k.borderwidth,t:q.y+k.borderwidth};U.each(function(Z,Q){var ue=d.select(this);ue.call(l,k,Z,T).call(o,k,q),ue.on("click",function(){d.event.defaultPrevented||(Z.execute&&(Z.args2&&k.active===Q?(h(T,k,Z,O,N,H,-1),P.executeAPICommand(T,Z.method,Z.args2)):(h(T,k,Z,O,N,H,Q),P.executeAPICommand(T,Z.method,Z.args))),T.emit("plotly_buttonclicked",{menu:k,button:Z,active:k.active}))}),ue.on("mouseover",function(){ue.call(D)}),ue.on("mouseout",function(){ue.call(A,k),U.call(L,k)})}),U.call(L,k),ce?(j.w=Math.max(se.openWidth,se.headerWidth),j.h=q.y-j.t):(j.w=q.x-j.l,j.h=Math.max(se.openHeight,se.headerHeight)),j.direction=k.direction,H&&(U.size()?E(T,O,N,H,k,j):c(H))}function E(T,O,N,H,k,V){var G=k.direction,U=G==="up"||G==="down",Y=k._dims,ee=k.active,re,ie,se;if(U)for(ie=0,se=0;se<ee;se++)ie+=Y.heights[se]+n.gapButton;else for(re=0,se=0;se<ee;se++)re+=Y.widths[se]+n.gapButton;H.enable(V,re,ie),H.hbar&&H.hbar.attr("opacity","0").transition().attr("opacity","1"),H.vbar&&H.vbar.attr("opacity","0").transition().attr("opacity","1")}function c(T){var O=!!T.hbar,N=!!T.vbar;O&&T.hbar.transition().attr("opacity","0").each("end",function(){O=!1,N||T.disable()}),N&&T.vbar.transition().attr("opacity","0").each("end",function(){N=!1,O||T.disable()})}function l(T,O,N,H){T.call(m,O).call(M,O,N,H)}function m(T,O){var N=x.ensureSingle(T,"rect",n.itemRectClassName,function(H){H.attr({rx:n.rx,ry:n.ry,"shape-rendering":"crispEdges"})});N.call(a.stroke,O.bordercolor).call(a.fill,O.bgcolor).style("stroke-width",O.borderwidth+"px")}function M(T,O,N,H){var k=x.ensureSingle(T,"text",n.itemTextClassName,function(U){U.attr({"text-anchor":"start","data-notex":1})}),V=N.label,G=H._fullLayout._meta;G&&(V=x.templateString(V,G)),k.call(_.font,O.font).text(V).call(v.convertToTspans,H)}function L(T,O){var N=O.active;T.each(function(H,k){var V=d.select(this);k===N&&O.showactive&&V.select("rect."+n.itemRectClassName).call(a.fill,n.activeColor)})}function D(T){T.select("rect."+n.itemRectClassName).call(a.fill,n.hoverColor)}function A(T,O){T.select("rect."+n.itemRectClassName).call(a.fill,O.bgcolor)}function C(T,O){var N=O._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},H=_.tester.selectAll("g."+n.dropdownButtonClassName).data(x.filterVisible(O.buttons));H.enter().append("g").classed(n.dropdownButtonClassName,!0);var k=["up","down"].indexOf(O.direction)!==-1;H.each(function(re,ie){var se=d.select(this);se.call(l,O,re,T);var ce=se.select("."+n.itemTextClassName),q=ce.node()&&_.bBox(ce.node()).width,j=Math.max(q+n.textPadX,n.minWidth),Z=O.font.size*r,Q=v.lineCount(ce),ue=Math.max(Z*Q,n.minHeight)+n.textOffsetY;ue=Math.ceil(ue),j=Math.ceil(j),N.widths[ie]=j,N.heights[ie]=ue,N.height1=Math.max(N.height1,ue),N.width1=Math.max(N.width1,j),k?(N.totalWidth=Math.max(N.totalWidth,j),N.openWidth=N.totalWidth,N.totalHeight+=ue+n.gapButton,N.openHeight+=ue+n.gapButton):(N.totalWidth+=j+n.gapButton,N.openWidth+=j+n.gapButton,N.totalHeight=Math.max(N.totalHeight,ue),N.openHeight=N.totalHeight)}),k?N.totalHeight-=n.gapButton:N.totalWidth-=n.gapButton,N.headerWidth=N.width1+n.arrowPadX,N.headerHeight=N.height1,O.type==="dropdown"&&(k?(N.width1+=n.arrowPadX,N.totalHeight=N.height1):N.totalWidth=N.width1,N.totalWidth+=n.arrowPadX),H.remove();var V=N.totalWidth+O.pad.l+O.pad.r,G=N.totalHeight+O.pad.t+O.pad.b,U=T._fullLayout._size;N.lx=U.l+U.w*O.x,N.ly=U.t+U.h*(1-O.y);var Y="left";x.isRightAnchor(O)&&(N.lx-=V,Y="right"),x.isCenterAnchor(O)&&(N.lx-=V/2,Y="center");var ee="top";x.isBottomAnchor(O)&&(N.ly-=G,ee="bottom"),x.isMiddleAnchor(O)&&(N.ly-=G/2,ee="middle"),N.totalWidth=Math.ceil(N.totalWidth),N.totalHeight=Math.ceil(N.totalHeight),N.lx=Math.round(N.lx),N.ly=Math.round(N.ly),P.autoMargin(T,S(O),{x:O.x,y:O.y,l:V*({right:1,center:.5}[Y]||0),r:V*({left:1,center:.5}[Y]||0),b:G*({top:1,middle:.5}[ee]||0),t:G*({bottom:1,middle:.5}[ee]||0)})}function S(T){return n.autoMarginIdRoot+T._index}function o(T,O,N,H){H=H||{};var k=T.select("."+n.itemRectClassName),V=T.select("."+n.itemTextClassName),G=O.borderwidth,U=N.index,Y=O._dims;_.setTranslate(T,G+N.x,G+N.y);var ee=["up","down"].indexOf(O.direction)!==-1,re=H.height||(ee?Y.heights[U]:Y.height1);k.attr({x:0,y:0,width:H.width||(ee?Y.width1:Y.widths[U]),height:re});var ie=O.font.size*r,se=v.lineCount(V),ce=(se-1)*ie/2;v.positionText(V,n.textOffsetX,re/2-ce+n.textOffsetY),ee?N.y+=Y.heights[U]+N.yPad:N.x+=Y.widths[U]+N.xPad,N.index++}function R(T,O){T.attr(n.menuIndexAttrName,O||"-1").selectAll("g."+n.dropdownButtonClassName).remove()}},20763:function(z,B,e){var d=e(75909);z.exports={moduleType:"component",name:d.name,layoutAttributes:e(7163),supplyLayoutDefaults:e(64897),draw:e(13689)}},25849:function(z,B,e){z.exports=x;var d=e(39898),P=e(7901),a=e(91424),_=e(71828);function x(v,y,r){this.gd=v,this.container=y,this.id=r,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})}x.barWidth=2,x.barLength=20,x.barRadius=2,x.barPad=1,x.barColor="#808BA4",x.prototype.enable=function(y,r,n){var u=this.gd._fullLayout,i=u.width,f=u.height;this.position=y;var g=this.position.l,h=this.position.w,b=this.position.t,p=this.position.h,E=this.position.direction,c=E==="down",l=E==="left",m=E==="right",M=E==="up",L=h,D=p,A,C,S,o;!c&&!l&&!m&&!M&&(this.position.direction="down",c=!0);var R=c||M;R?(A=g,C=A+L,c?(S=b,o=Math.min(S+D,f),D=o-S):(o=b+D,S=Math.max(o-D,0),D=o-S)):(S=b,o=S+D,l?(C=g+L,A=Math.max(C-L,0),L=C-A):(A=g,C=Math.min(A+L,i),L=C-A)),this._box={l:A,t:S,w:L,h:D};var T=h>L,O=x.barLength+2*x.barPad,N=x.barWidth+2*x.barPad,H=g,k=b+p;k+N>f&&(k=f-N);var V=this.container.selectAll("rect.scrollbar-horizontal").data(T?[0]:[]);V.exit().on(".drag",null).remove(),V.enter().append("rect").classed("scrollbar-horizontal",!0).call(P.fill,x.barColor),T?(this.hbar=V.attr({rx:x.barRadius,ry:x.barRadius,x:H,y:k,width:O,height:N}),this._hbarXMin=H+O/2,this._hbarTranslateMax=L-O):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var G=p>D,U=x.barWidth+2*x.barPad,Y=x.barLength+2*x.barPad,ee=g+h,re=b;ee+U>i&&(ee=i-U);var ie=this.container.selectAll("rect.scrollbar-vertical").data(G?[0]:[]);ie.exit().on(".drag",null).remove(),ie.enter().append("rect").classed("scrollbar-vertical",!0).call(P.fill,x.barColor),G?(this.vbar=ie.attr({rx:x.barRadius,ry:x.barRadius,x:ee,y:re,width:U,height:Y}),this._vbarYMin=re+Y/2,this._vbarTranslateMax=D-Y):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var se=this.id,ce=A-.5,q=G?C+U+.5:C+.5,j=S-.5,Z=T?o+N+.5:o+.5,Q=u._topdefs.selectAll("#"+se).data(T||G?[0]:[]);if(Q.exit().remove(),Q.enter().append("clipPath").attr("id",se).append("rect"),T||G?(this._clipRect=Q.select("rect").attr({x:Math.floor(ce),y:Math.floor(j),width:Math.ceil(q)-Math.floor(ce),height:Math.ceil(Z)-Math.floor(j)}),this.container.call(a.setClipUrl,se,this.gd),this.bg.attr({x:g,y:b,width:h,height:p})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),T||G){var ue=d.behavior.drag().on("dragstart",function(){d.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(ue);var fe=d.behavior.drag().on("dragstart",function(){d.event.sourceEvent.preventDefault(),d.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));T&&this.hbar.on(".drag",null).call(fe),G&&this.vbar.on(".drag",null).call(fe)}this.setTranslate(r,n)},x.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.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)},x.prototype._onBoxDrag=function(){var y=this.translateX,r=this.translateY;this.hbar&&(y-=d.event.dx),this.vbar&&(r-=d.event.dy),this.setTranslate(y,r)},x.prototype._onBoxWheel=function(){var y=this.translateX,r=this.translateY;this.hbar&&(y+=d.event.deltaY),this.vbar&&(r+=d.event.deltaY),this.setTranslate(y,r)},x.prototype._onBarDrag=function(){var y=this.translateX,r=this.translateY;if(this.hbar){var n=y+this._hbarXMin,u=n+this._hbarTranslateMax,i=_.constrain(d.event.x,n,u),f=(i-n)/(u-n),g=this.position.w-this._box.w;y=f*g}if(this.vbar){var h=r+this._vbarYMin,b=h+this._vbarTranslateMax,p=_.constrain(d.event.y,h,b),E=(p-h)/(b-h),c=this.position.h-this._box.h;r=E*c}this.setTranslate(y,r)},x.prototype.setTranslate=function(y,r){var n=this.position.w-this._box.w,u=this.position.h-this._box.h;if(y=_.constrain(y||0,0,n),r=_.constrain(r||0,0,u),this.translateX=y,this.translateY=r,this.container.call(a.setTranslate,this._box.l-this.position.l-y,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+y-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var i=y/n;this.hbar.call(a.setTranslate,y+i*this._hbarTranslateMax,r)}if(this.vbar){var f=r/u;this.vbar.call(a.setTranslate,y,r+f*this._vbarTranslateMax)}}},18783:function(z){z.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},24695:function(z){z.exports={axisRefDescription:function(B,e,d){return["If set to a",B,"axis id (e.g. *"+B+"* or","*"+B+"2*), the `"+B+"` position refers to a",B,"coordinate. If set to *paper*, the `"+B+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+d+"). If set to a",B,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",e,"of the domain of that axis: e.g.,","*"+B+"2 domain* refers to the domain of the second",B," axis and a",B,"position of 0.5 refers to the","point between the",e,"and the",d,"of the domain of the","second",B,"axis."].join(" ")}}},22372:function(z){z.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},31562:function(z){z.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},74808:function(z){z.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},29659:function(z){z.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},87381:function(z){z.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},37822:function(z){z.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},50606:function(z){z.exports={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:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},77922:function(z,B){B.xmlns="http://www.w3.org/2000/xmlns/",B.svg="http://www.w3.org/2000/svg",B.xlink="http://www.w3.org/1999/xlink",B.svgAttrs={xmlns:B.svg,"xmlns:xlink":B.xlink}},8729:function(z,B,e){B.version=e(11506).version,e(7417),e(98847);for(var d=e(73972),P=B.register=d.register,a=e(10641),_=Object.keys(a),x=0;x<_.length;x++){var v=_[x];v.charAt(0)!=="_"&&(B[v]=a[v]),P({moduleType:"apiMethod",name:v,fn:a[v]})}P(e(67368)),P([e(2199),e(30211),e(32745),e(2468),e(47322),e(89853),e(68804),e(20763),e(23243),e(13137),e(97218),e(83312),e(37369),e(21081),e(12311),e(64168)]),P([e(92177),e(37815)]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(P(window.PlotlyLocales),delete window.PlotlyLocales),B.Icons=e(24255);var y=e(30211),r=e(74875);B.Plots={resize:r.resize,graphJson:r.graphJson,sendDataToCloud:r.sendDataToCloud},B.Fx={hover:y.hover,unhover:y.unhover,loneHover:y.loneHover,loneUnhover:y.loneUnhover},B.Snapshot=e(44511),B.PlotSchema=e(86281)},24255:function(z){z.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:["<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'>","<defs>"," <style>"," .cls-0{fill:#000;}"," .cls-1{fill:#FFF;}"," .cls-2{fill:#F26;}"," .cls-3{fill:#D69;}"," .cls-4{fill:#BAC;}"," .cls-5{fill:#9EF;}"," </style>","</defs>"," <title>plotly-logomark</title>"," <g id='symbol'>"," <rect class='cls-0' x='0' y='0' width='132' height='132' rx='18' ry='18'/>"," <circle class='cls-5' cx='102' cy='30' r='6'/>"," <circle class='cls-4' cx='78' cy='30' r='6'/>"," <circle class='cls-4' cx='78' cy='54' r='6'/>"," <circle class='cls-3' cx='54' cy='30' r='6'/>"," <circle class='cls-2' cx='30' cy='30' r='6'/>"," <circle class='cls-2' cx='30' cy='54' r='6'/>"," <path class='cls-1' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/>"," <path class='cls-1' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/>"," <path class='cls-1' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/>"," <path class='cls-1' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/>"," </g>","</svg>"].join("")}}},99863:function(z,B){B.isLeftAnchor=function(d){return d.xanchor==="left"||d.xanchor==="auto"&&d.x<=.3333333333333333},B.isCenterAnchor=function(d){return d.xanchor==="center"||d.xanchor==="auto"&&d.x>.3333333333333333&&d.x<.6666666666666666},B.isRightAnchor=function(d){return d.xanchor==="right"||d.xanchor==="auto"&&d.x>=.6666666666666666},B.isTopAnchor=function(d){return d.yanchor==="top"||d.yanchor==="auto"&&d.y>=.6666666666666666},B.isMiddleAnchor=function(d){return d.yanchor==="middle"||d.yanchor==="auto"&&d.y>.3333333333333333&&d.y<.6666666666666666},B.isBottomAnchor=function(d){return d.yanchor==="bottom"||d.yanchor==="auto"&&d.y<=.3333333333333333}},26348:function(z,B,e){var d=e(64872),P=d.mod,a=d.modHalf,_=Math.PI,x=2*_;function v(E){return E/180*_}function y(E){return E/_*180}function r(E){return Math.abs(E[1]-E[0])>x-1e-14}function n(E,c){return a(c-E,x)}function u(E,c){return Math.abs(n(E,c))}function i(E,c){if(r(c))return!0;var l,m;c[0]<c[1]?(l=c[0],m=c[1]):(l=c[1],m=c[0]),l=P(l,x),m=P(m,x),l>m&&(m+=x);var M=P(E,x),L=M+x;return M>=l&&M<=m||L>=l&&L<=m}function f(E,c,l,m){if(!i(c,m))return!1;var M,L;return l[0]<l[1]?(M=l[0],L=l[1]):(M=l[1],L=l[0]),E>=M&&E<=L}function g(E,c,l,m,M,L,D){M=M||0,L=L||0;var A=r([l,m]),C,S,o,R,T;A?(C=0,S=_,o=x):l<m?(C=l,o=m):(C=m,o=l),E<c?(R=E,T=c):(R=c,T=E);function O(V,G){return[V*Math.cos(G)+M,L-V*Math.sin(G)]}var N=Math.abs(o-C)<=_?0:1;function H(V,G,U){return"A"+[V,V]+" "+[0,N,U]+" "+O(V,G)}var k;return A?R===null?k="M"+O(T,C)+H(T,S,0)+H(T,o,0)+"Z":k="M"+O(R,C)+H(R,S,0)+H(R,o,0)+"ZM"+O(T,C)+H(T,S,1)+H(T,o,1)+"Z":R===null?(k="M"+O(T,C)+H(T,o,0),D&&(k+="L0,0Z")):k="M"+O(R,C)+"L"+O(T,C)+H(T,o,0)+"L"+O(R,o)+H(R,C,1)+"Z",k}function h(E,c,l,m,M){return g(null,E,c,l,m,M,0)}function b(E,c,l,m,M){return g(null,E,c,l,m,M,1)}function p(E,c,l,m,M,L){return g(E,c,l,m,M,L,1)}z.exports={deg2rad:v,rad2deg:y,angleDelta:n,angleDist:u,isFullCircle:r,isAngleInsideSector:i,isPtInsideSector:f,pathArc:h,pathSector:b,pathAnnulus:p}},73627:function(z,B){var e=Array.isArray,d=ArrayBuffer,P=DataView;function a(y){return d.isView(y)&&!(y instanceof P)}B.isTypedArray=a;function _(y){return e(y)||a(y)}B.isArrayOrTypedArray=_;function x(y){return!_(y[0])}B.isArray1D=x,B.ensureArray=function(y,r){return e(y)||(y=[]),y.length=r,y},B.concat=function(){var y=[],r=!0,n=0,u,i,f,g,h,b,p,E;for(f=0;f<arguments.length;f++)g=arguments[f],b=g.length,b&&(i?y.push(g):(i=g,h=b),e(g)?u=!1:(r=!1,n?u!==g.constructor&&(u=!1):u=g.constructor),n+=b);if(!n)return[];if(!y.length)return i;if(r)return i.concat.apply(i,y);if(u){for(p=new u(n),p.set(i),f=0;f<y.length;f++)g=y[f],p.set(g,h),h+=g.length;return p}for(p=new Array(n),E=0;E<i.length;E++)p[E]=i[E];for(f=0;f<y.length;f++){for(g=y[f],E=0;E<g.length;E++)p[h+E]=g[E];h+=E}return p},B.maxRowLength=function(y){return v(y,Math.max,0)},B.minRowLength=function(y){return v(y,Math.min,1/0)};function v(y,r,n){if(_(y))if(_(y[0])){for(var u=n,i=0;i<y.length;i++)u=r(u,y[i].length);return u}else return y.length;return 0}},95218:function(z,B,e){var d=e(92770),P=e(50606).BADNUM,a=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;z.exports=function(x){return typeof x=="string"&&(x=x.replace(a,"")),d(x)?Number(x):P}},33306:function(z){z.exports=function(e){var d=e._fullLayout;d._glcanvas&&d._glcanvas.size()&&d._glcanvas.each(function(P){P.regl&&P.regl.clear({color:!0,depth:!0})})}},86367:function(z){z.exports=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)}},96554:function(z,B,e){var d=e(92770),P=e(84267),a=e(9012),_=e(63282),x=e(7901),v=e(37822).DESELECTDIM,y=e(65487),r=e(30587).counter,n=e(64872).modHalf,u=e(73627).isArrayOrTypedArray;B.valObjectMeta={data_array:{coerceFunction:function(f,g,h){u(f)?g.set(f):h!==void 0&&g.set(h)}},enumerated:{coerceFunction:function(f,g,h,b){b.coerceNumber&&(f=+f),b.values.indexOf(f)===-1?g.set(h):g.set(f)},validateFunction:function(f,g){g.coerceNumber&&(f=+f);for(var h=g.values,b=0;b<h.length;b++){var p=String(h[b]);if(p.charAt(0)==="/"&&p.charAt(p.length-1)==="/"){var E=new RegExp(p.substr(1,p.length-2));if(E.test(f))return!0}else if(f===h[b])return!0}return!1}},boolean:{coerceFunction:function(f,g,h){f===!0||f===!1?g.set(f):g.set(h)}},number:{coerceFunction:function(f,g,h,b){!d(f)||b.min!==void 0&&f<b.min||b.max!==void 0&&f>b.max?g.set(h):g.set(+f)}},integer:{coerceFunction:function(f,g,h,b){f%1||!d(f)||b.min!==void 0&&f<b.min||b.max!==void 0&&f>b.max?g.set(h):g.set(+f)}},string:{coerceFunction:function(f,g,h,b){if(typeof f!="string"){var p=typeof f=="number";b.strict===!0||!p?g.set(h):g.set(String(f))}else b.noBlank&&!f?g.set(h):g.set(f)}},color:{coerceFunction:function(f,g,h){P(f).isValid()?g.set(f):g.set(h)}},colorlist:{coerceFunction:function(f,g,h){function b(p){return P(p).isValid()}!Array.isArray(f)||!f.length?g.set(h):f.every(b)?g.set(f):g.set(h)}},colorscale:{coerceFunction:function(f,g,h){g.set(_.get(f,h))}},angle:{coerceFunction:function(f,g,h){f==="auto"?g.set("auto"):d(f)?g.set(n(+f,360)):g.set(h)}},subplotid:{coerceFunction:function(f,g,h,b){var p=b.regex||r(h);if(typeof f=="string"&&p.test(f)){g.set(f);return}g.set(h)},validateFunction:function(f,g){var h=g.dflt;return f===h?!0:typeof f!="string"?!1:!!r(h).test(f)}},flaglist:{coerceFunction:function(f,g,h,b){if((b.extras||[]).indexOf(f)!==-1){g.set(f);return}if(typeof f!="string"){g.set(h);return}for(var p=f.split("+"),E=0;E<p.length;){var c=p[E];b.flags.indexOf(c)===-1||p.indexOf(c)<E?p.splice(E,1):E++}p.length?g.set(p.join("+")):g.set(h)}},any:{coerceFunction:function(f,g,h){f===void 0?g.set(h):g.set(f)}},info_array:{coerceFunction:function(f,g,h,b){function p(O,N,H){var k,V={set:function(G){k=G}};return H===void 0&&(H=N.dflt),B.valObjectMeta[N.valType].coerceFunction(O,V,H,N),k}var E=b.dimensions===2||b.dimensions==="1-2"&&Array.isArray(f)&&Array.isArray(f[0]);if(!Array.isArray(f)){g.set(h);return}var c=b.items,l=[],m=Array.isArray(c),M=m&&E&&Array.isArray(c[0]),L=E&&m&&!M,D=m&&!L?c.length:f.length,A,C,S,o,R,T;if(h=Array.isArray(h)?h:[],E)for(A=0;A<D;A++)for(l[A]=[],S=Array.isArray(f[A])?f[A]:[],L?R=c.length:m?R=c[A].length:R=S.length,C=0;C<R;C++)L?o=c[C]:m?o=c[A][C]:o=c,T=p(S[C],o,(h[A]||[])[C]),T!==void 0&&(l[A][C]=T);else for(A=0;A<D;A++)T=p(f[A],m?c[A]:c,h[A]),T!==void 0&&(l[A]=T);g.set(l)},validateFunction:function(f,g){if(!Array.isArray(f))return!1;var h=g.items,b=Array.isArray(h),p=g.dimensions===2;if(!g.freeLength&&f.length!==h.length)return!1;for(var E=0;E<f.length;E++)if(p){if(!Array.isArray(f[E])||!g.freeLength&&f[E].length!==h[E].length)return!1;for(var c=0;c<f[E].length;c++)if(!i(f[E][c],b?h[E][c]:h))return!1}else if(!i(f[E],b?h[E]:h))return!1;return!0}}},B.coerce=function(f,g,h,b,p){var E=y(h,b).get(),c=y(f,b),l=y(g,b),m=c.get(),M=g._template;if(m===void 0&&M&&(m=y(M,b).get(),M=0),p===void 0&&(p=E.dflt),E.arrayOk&&u(m))return l.set(m),m;var L=B.valObjectMeta[E.valType].coerceFunction;L(m,l,p,E);var D=l.get();return M&&D===p&&!i(m,E)&&(m=y(M,b).get(),L(m,l,p,E),D=l.get()),D},B.coerce2=function(f,g,h,b,p){var E=y(f,b),c=B.coerce(f,g,h,b,p),l=E.get();return l!=null?c:!1},B.coerceFont=function(f,g,h){var b={};return h=h||{},b.family=f(g+".family",h.family),b.size=f(g+".size",h.size),b.color=f(g+".color",h.color),b},B.coercePattern=function(f,g,h,b){var p=f(g+".shape");if(p){f(g+".solidity"),f(g+".size");var E=f(g+".fillmode"),c=E==="overlay";if(!b){var l=f(g+".bgcolor",c?h:void 0);f(g+".fgcolor",c?x.contrast(l):h)}f(g+".fgopacity",c?.5:1)}},B.coerceHoverinfo=function(f,g,h){var b=g._module.attributes,p=b.hoverinfo?b:a,E=p.hoverinfo,c;if(h._dataLength===1){var l=E.dflt==="all"?E.flags.slice():E.dflt.split("+");l.splice(l.indexOf("name"),1),c=l.join("+")}return B.coerce(f,g,p,"hoverinfo",c)},B.coerceSelectionMarkerOpacity=function(f,g){if(f.marker){var h=f.marker.opacity;if(h!==void 0){var b,p;!u(h)&&!f.selected&&!f.unselected&&(b=h,p=v*h),g("selected.marker.opacity",b),g("unselected.marker.opacity",p)}}};function i(f,g){var h=B.valObjectMeta[g.valType];if(g.arrayOk&&u(f))return!0;if(h.validateFunction)return h.validateFunction(f,g);var b={},p=b,E={set:function(c){p=c}};return h.coerceFunction(f,E,b,g),p!==b}B.validate=i},41631:function(z,B,e){var d=e(84096).i$,P=e(92770),a=e(47769),_=e(64872).mod,x=e(50606),v=x.BADNUM,y=x.ONEDAY,r=x.ONEHOUR,n=x.ONEMIN,u=x.ONESEC,i=x.EPOCHJD,f=e(73972),g=e(84096).g0,h=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,b=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,p=new Date().getFullYear()-70;function E(k){return k&&f.componentsRegistry.calendars&&typeof k=="string"&&k!=="gregorian"}B.dateTick0=function(k,V){var G=c(k,!!V);if(V<2)return G;var U=B.dateTime2ms(G,k);return U+=y*(V-1),B.ms2DateTime(U,0,k)};function c(k,V){return E(k)?V?f.getComponentMethod("calendars","CANONICAL_SUNDAY")[k]:f.getComponentMethod("calendars","CANONICAL_TICK")[k]:V?"2000-01-02":"2000-01-01"}B.dfltRange=function(k){return E(k)?f.getComponentMethod("calendars","DFLTRANGE")[k]:["2000-01-01","2001-01-01"]},B.isJSDate=function(k){return typeof k=="object"&&k!==null&&typeof k.getTime=="function"};var l,m;B.dateTime2ms=function(k,V){if(B.isJSDate(k)){var G=k.getTimezoneOffset()*n,U=(k.getUTCMinutes()-k.getMinutes())*n+(k.getUTCSeconds()-k.getSeconds())*u+(k.getUTCMilliseconds()-k.getMilliseconds());if(U){var Y=3*n;G=G-Y/2+_(U-G+Y/2,Y)}return k=Number(k)-G,k>=l&&k<=m?k:v}if(typeof k!="string"&&typeof k!="number")return v;k=String(k);var ee=E(V),re=k.charAt(0);ee&&(re==="G"||re==="g")&&(k=k.substr(1),V="");var ie=ee&&V.substr(0,7)==="chinese",se=k.match(ie?b:h);if(!se)return v;var ce=se[1],q=se[3]||"1",j=Number(se[5]||1),Z=Number(se[7]||0),Q=Number(se[9]||0),ue=Number(se[11]||0);if(ee){if(ce.length===2)return v;ce=Number(ce);var fe;try{var te=f.getComponentMethod("calendars","getCal")(V);if(ie){var ne=q.charAt(q.length-1)==="i";q=parseInt(q,10),fe=te.newDate(ce,te.toMonthIndex(ce,q,ne),j)}else fe=te.newDate(ce,Number(q),j)}catch{return v}return fe?(fe.toJD()-i)*y+Z*r+Q*n+ue*u:v}ce.length===2?ce=(Number(ce)+2e3-p)%100+p:ce=Number(ce),q-=1;var ve=new Date(Date.UTC(2e3,q,j,Z,Q));return ve.setUTCFullYear(ce),ve.getUTCMonth()!==q||ve.getUTCDate()!==j?v:ve.getTime()+ue*u},l=B.MIN_MS=B.dateTime2ms("-9999"),m=B.MAX_MS=B.dateTime2ms("9999-12-31 23:59:59.9999"),B.isDateTime=function(k,V){return B.dateTime2ms(k,V)!==v};function M(k,V){return String(k+Math.pow(10,V)).substr(1)}var L=90*y,D=3*r,A=5*n;B.ms2DateTime=function(k,V,G){if(typeof k!="number"||!(k>=l&&k<=m))return v;V||(V=0);var U=Math.floor(_(k+.05,1)*10),Y=Math.round(k-U/10),ee,re,ie,se,ce,q;if(E(G)){var j=Math.floor(Y/y)+i,Z=Math.floor(_(k,y));try{ee=f.getComponentMethod("calendars","getCal")(G).fromJD(j).formatDate("yyyy-mm-dd")}catch{ee=g("G%Y-%m-%d")(new Date(Y))}if(ee.charAt(0)==="-")for(;ee.length<11;)ee="-0"+ee.substr(1);else for(;ee.length<10;)ee="0"+ee;re=V<L?Math.floor(Z/r):0,ie=V<L?Math.floor(Z%r/n):0,se=V<D?Math.floor(Z%n/u):0,ce=V<A?Z%u*10+U:0}else q=new Date(Y),ee=g("%Y-%m-%d")(q),re=V<L?q.getUTCHours():0,ie=V<L?q.getUTCMinutes():0,se=V<D?q.getUTCSeconds():0,ce=V<A?q.getUTCMilliseconds()*10+U:0;return C(ee,re,ie,se,ce)},B.ms2DateTimeLocal=function(k){if(!(k>=l+y&&k<=m-y))return v;var V=Math.floor(_(k+.05,1)*10),G=new Date(Math.round(k-V/10)),U=d("%Y-%m-%d")(G),Y=G.getHours(),ee=G.getMinutes(),re=G.getSeconds(),ie=G.getUTCMilliseconds()*10+V;return C(U,Y,ee,re,ie)};function C(k,V,G,U,Y){if((V||G||U||Y)&&(k+=" "+M(V,2)+":"+M(G,2),(U||Y)&&(k+=":"+M(U,2),Y))){for(var ee=4;Y%10===0;)ee-=1,Y/=10;k+="."+M(Y,ee)}return k}B.cleanDate=function(k,V,G){if(k===v)return V;if(B.isJSDate(k)||typeof k=="number"&&isFinite(k)){if(E(G))return a.error("JS Dates and milliseconds are incompatible with world calendars",k),V;if(k=B.ms2DateTimeLocal(+k),!k&&V!==void 0)return V}else if(!B.isDateTime(k,G))return a.error("unrecognized date",k),V;return k};var S=/%\d?f/g,o=/%h/g,R={1:"1",2:"1",3:"2",4:"2"};function T(k,V,G,U){k=k.replace(S,function(ee){var re=Math.min(+ee.charAt(1)||6,6),ie=(V/1e3%1+2).toFixed(re).substr(2).replace(/0+$/,"")||"0";return ie});var Y=new Date(Math.floor(V+.05));if(k=k.replace(o,function(){return R[G("%q")(Y)]}),E(U))try{k=f.getComponentMethod("calendars","worldCalFmt")(k,V,U)}catch{return"Invalid"}return G(k)(Y)}var O=[59,59.9,59.99,59.999,59.9999];function N(k,V){var G=_(k+.05,y),U=M(Math.floor(G/r),2)+":"+M(_(Math.floor(G/n),60),2);if(V!=="M"){P(V)||(V=0);var Y=Math.min(_(k/u,60),O[V]),ee=(100+Y).toFixed(V).substr(1);V>0&&(ee=ee.replace(/0+$/,"").replace(/[\.]$/,"")),U+=":"+ee}return U}B.formatDate=function(k,V,G,U,Y,ee){if(Y=E(Y)&&Y,!V)if(G==="y")V=ee.year;else if(G==="m")V=ee.month;else if(G==="d")V=ee.dayMonth+`
`+ee.year;else return N(k,G)+`
`+T(ee.dayMonthYear,k,U,Y);return T(V,k,U,Y)};var H=3*y;B.incrementMonth=function(k,V,G){G=E(G)&&G;var U=_(k,y);if(k=Math.round(k-U),G)try{var Y=Math.round(k/y)+i,ee=f.getComponentMethod("calendars","getCal")(G),re=ee.fromJD(Y);return V%12?ee.add(re,V,"m"):ee.add(re,V/12,"y"),(re.toJD()-i)*y+U}catch{a.error("invalid ms "+k+" in calendar "+G)}var ie=new Date(k+H);return ie.setUTCMonth(ie.getUTCMonth()+V)+U-H},B.findExactDates=function(k,V){for(var G=0,U=0,Y=0,ee=0,re,ie,se=E(V)&&f.getComponentMethod("calendars","getCal")(V),ce=0;ce<k.length;ce++){if(ie=k[ce],!P(ie)){ee++;continue}if(!(ie%y))if(se)try{re=se.fromJD(ie/y+i),re.day()===1?re.month()===1?G++:U++:Y++}catch{}else re=new Date(ie),re.getUTCDate()===1?re.getUTCMonth()===0?G++:U++:Y++}U+=G,Y+=U;var q=k.length-ee;return{exactYears:G/q,exactMonths:U/q,exactDays:Y/q}}},24401:function(z,B,e){var d=e(39898),P=e(47769),a=e(35657),_=e(79576);function x(p){var E;if(typeof p=="string"){if(E=document.getElementById(p),E===null)throw new Error("No DOM element with id '"+p+"' exists on the page.");return E}else if(p==null)throw new Error("DOM element provided is null or undefined");return p}function v(p){var E=d.select(p);return E.node()instanceof HTMLElement&&E.size()&&E.classed("js-plotly-plot")}function y(p){var E=p&&p.parentNode;E&&E.removeChild(p)}function r(p,E){n("global",p,E)}function n(p,E,c){var l="plotly.js-style-"+p,m=document.getElementById(l);m||(m=document.createElement("style"),m.setAttribute("id",l),m.appendChild(document.createTextNode("")),document.head.appendChild(m));var M=m.sheet;M.insertRule?M.insertRule(E+"{"+c+"}",0):M.addRule?M.addRule(E,c,0):P.warn("addStyleRule failed")}function u(p){var E="plotly.js-style-"+p,c=document.getElementById(E);c&&y(c)}function i(p){var E=g(p),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return E.forEach(function(l){var m=f(l);if(m){var M=a.convertCssMatrix(m);c=_.multiply(c,c,M)}}),c}function f(p){var E=window.getComputedStyle(p,null),c=E.getPropertyValue("-webkit-transform")||E.getPropertyValue("-moz-transform")||E.getPropertyValue("-ms-transform")||E.getPropertyValue("-o-transform")||E.getPropertyValue("transform");return c==="none"?null:c.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(l){return+l})}function g(p){for(var E=[];h(p);)E.push(p),p=p.parentNode;return E}function h(p){return p&&(p instanceof Element||p instanceof HTMLElement)}function b(p,E){return p&&E&&p.top===E.top&&p.left===E.left&&p.right===E.right&&p.bottom===E.bottom}z.exports={getGraphDiv:x,isPlotDiv:v,removeElement:y,addStyleRule:r,addRelatedStyleRule:n,deleteRelatedStyleRule:u,getFullTransformMatrix:i,getElementTransformMatrix:f,getElementAndAncestors:g,equalDomRects:b}},11086:function(z,B,e){var d=e(15398).EventEmitter,P={init:function(a){if(a._ev instanceof d)return a;var _=new d,x=new d;return a._ev=_,a._internalEv=x,a.on=_.on.bind(_),a.once=_.once.bind(_),a.removeListener=_.removeListener.bind(_),a.removeAllListeners=_.removeAllListeners.bind(_),a._internalOn=x.on.bind(x),a._internalOnce=x.once.bind(x),a._removeInternalListener=x.removeListener.bind(x),a._removeAllInternalListeners=x.removeAllListeners.bind(x),a.emit=function(v,y){typeof jQuery<"u"&&jQuery(a).trigger(v,y),_.emit(v,y),x.emit(v,y)},a},triggerHandler:function(a,_,x){var v,y;typeof jQuery<"u"&&(v=jQuery(a).triggerHandler(_,x));var r=a._ev;if(!r)return v;var n=r._events[_];if(!n)return v;function u(f){if(f.listener){if(r.removeListener(_,f.listener),!f.fired)return f.fired=!0,f.listener.apply(r,[x])}else return f.apply(r,[x])}n=Array.isArray(n)?n:[n];var i;for(i=0;i<n.length-1;i++)u(n[i]);return y=u(n[i]),v!==void 0?v:y},purge:function(a){return delete a._ev,delete a.on,delete a.once,delete a.removeListener,delete a.removeAllListeners,delete a.emit,delete a._ev,delete a._internalEv,delete a._internalOn,delete a._internalOnce,delete a._removeInternalListener,delete a._removeAllInternalListeners,a}};z.exports=P},1426:function(z,B,e){var d=e(41965),P=Array.isArray;function a(x,v){var y,r;for(y=0;y<x.length;y++){if(r=x[y],r!==null&&typeof r=="object")return!1;r!==void 0&&(v[y]=r)}return!0}B.extendFlat=function(){return _(arguments,!1,!1,!1)},B.extendDeep=function(){return _(arguments,!0,!1,!1)},B.extendDeepAll=function(){return _(arguments,!0,!0,!1)},B.extendDeepNoArrays=function(){return _(arguments,!0,!1,!0)};function _(x,v,y,r){var n=x[0],u=x.length,i,f,g,h,b,p,E;if(u===2&&P(n)&&P(x[1])&&n.length===0){if(E=a(x[1],n),E)return n;n.splice(0,n.length)}for(var c=1;c<u;c++){i=x[c];for(f in i)g=n[f],h=i[f],r&&P(h)?n[f]=h:v&&h&&(d(h)||(b=P(h)))?(b?(b=!1,p=g&&P(g)?g:[]):p=g&&d(g)?g:{},n[f]=_([p,h],v,y,r)):(typeof h<"u"||y)&&(n[f]=h)}return n}},75744:function(z){z.exports=function(e){for(var d={},P=[],a=0,_=0;_<e.length;_++){var x=e[_];d[x]!==1&&(d[x]=1,P[a++]=x)}return P}},76756:function(z){z.exports=function(a){for(var _=d(a)?e:B,x=[],v=0;v<a.length;v++){var y=a[v];_(y)&&x.push(y)}return x};function B(P){return P.visible===!0}function e(P){var a=P[0].trace;return a.visible===!0&&a._length!==0}function d(P){return Array.isArray(P)&&Array.isArray(P[0])&&P[0][0]&&P[0][0].trace}},41327:function(z,B,e){var d=e(39898),P=e(24138),a=e(30774),_=e(29261),x=e(85268),v=e(23389),y=e(47769),r=e(41965),n=e(65487),u=e(61082),i=Object.keys(P),f={"ISO-3":v,"USA-states":v,"country names":g};function g(M){for(var L=0;L<i.length;L++){var D=i[L],A=new RegExp(P[D]);if(A.test(M.trim().toLowerCase()))return D}return y.log("Unrecognized country name: "+M+"."),!1}function h(M,L,D){if(!L||typeof L!="string")return!1;var A=f[M](L),C,S,o;if(A){if(M==="USA-states")for(C=[],o=0;o<D.length;o++)S=D[o],S.properties&&S.properties.gu&&S.properties.gu==="USA"&&C.push(S);else C=D;for(o=0;o<C.length;o++)if(S=C[o],S.id===A)return S;y.log(["Location with id",A,"does not have a matching topojson feature at this resolution."].join(" "))}return!1}function b(M){var L=M.geometry,D=L.coordinates,A=M.id,C=[],S,o,R,T;function O(N){for(var H=0;H<N.length-1;H++)if(N[H][0]>0&&N[H+1][0]<0)return H;return null}switch(A==="RUS"||A==="FJI"?S=function(N){var H;if(O(N)===null)H=N;else for(H=new Array(N.length),T=0;T<N.length;T++)H[T]=[N[T][0]<0?N[T][0]+360:N[T][0],N[T][1]];C.push(u.tester(H))}:A==="ATA"?S=function(N){var H=O(N);if(H===null)return C.push(u.tester(N));var k=new Array(N.length+1),V=0;for(T=0;T<N.length;T++)T>H?k[V++]=[N[T][0]+360,N[T][1]]:T===H?(k[V++]=N[T],k[V++]=[N[T][0],-90]):k[V++]=N[T];var G=u.tester(k);G.pts.pop(),C.push(G)}:S=function(N){C.push(u.tester(N))},L.type){case"MultiPolygon":for(o=0;o<D.length;o++)for(R=0;R<D[o].length;R++)S(D[o][R]);break;case"Polygon":for(o=0;o<D.length;o++)S(D[o]);break}return C}function p(M){var L=M.geojson,D=window.PlotlyGeoAssets||{},A=typeof L=="string"?D[L]:L;return r(A)?A:(y.error("Oops ... something went wrong when fetching "+L),!1)}function E(M){var L=M[0].trace,D=p(L);if(!D)return!1;var A={},C=[],S;for(S=0;S<L._length;S++){var o=M[S];(o.loc||o.loc===0)&&(A[o.loc]=o)}function R(N){var H=n(N,L.featureidkey||"id").get(),k=A[H];if(k){var V=N.geometry;if(V.type==="Polygon"||V.type==="MultiPolygon"){var G={type:"Feature",id:H,geometry:V,properties:{}};G.properties.ct=c(G),k.fIn=N,k.fOut=G,C.push(G)}else y.log(["Location",k.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete A[H]}switch(D.type){case"FeatureCollection":var T=D.features;for(S=0;S<T.length;S++)R(T[S]);break;case"Feature":R(D);break;default:return y.warn(["Invalid GeoJSON type",(D.type||"none")+".","Traces with locationmode *geojson-id* only support","*FeatureCollection* and *Feature* types."].join(" ")),!1}for(var O in A)y.log(["Location *"+O+"*","does not have a matching feature with id-key","*"+L.featureidkey+"*."].join(" "));return C}function c(M){var L=M.geometry,D;if(L.type==="MultiPolygon")for(var A=L.coordinates,C=0,S=0;S<A.length;S++){var o={type:"Polygon",coordinates:A[S]},R=a.default(o);R>C&&(C=R,D=o)}else D=L;return _.default(D).geometry.coordinates}function l(M){var L=window.PlotlyGeoAssets||{},D=[];function A(T){return new Promise(function(O,N){d.json(T,function(H,k){if(H){delete L[T];var V=H.status===404?'GeoJSON at URL "'+T+'" does not exist.':"Unexpected error while fetching from "+T;return N(new Error(V))}return L[T]=k,O(k)})})}function C(T){return new Promise(function(O,N){var H=0,k=setInterval(function(){if(L[T]&&L[T]!=="pending")return clearInterval(k),O(L[T]);if(H>100)return clearInterval(k),N("Unexpected error while fetching from "+T);H++},50)})}for(var S=0;S<M.length;S++){var o=M[S][0].trace,R=o.geojson;typeof R=="string"&&(L[R]?L[R]==="pending"&&D.push(C(R)):(L[R]="pending",D.push(A(R))))}return D}function m(M){return x.default(M)}z.exports={locationToFeature:h,feature2polygons:b,getTraceGeojson:p,extractTraceFeature:E,fetchTraceGeoData:l,computeBbox:m}},18214:function(z,B,e){var d=e(50606).BADNUM;B.calcTraceToLineCoords=function(P){for(var a=P[0].trace,_=a.connectgaps,x=[],v=[],y=0;y<P.length;y++){var r=P[y],n=r.lonlat;n[0]!==d?v.push(n):!_&&v.length>0&&(x.push(v),v=[])}return v.length>0&&x.push(v),x},B.makeLine=function(P){return P.length===1?{type:"LineString",coordinates:P[0]}:{type:"MultiLineString",coordinates:P}},B.makePolygon=function(P){if(P.length===1)return{type:"Polygon",coordinates:P};for(var a=new Array(P.length),_=0;_<P.length;_++)a[_]=[P[_]];return{type:"MultiPolygon",coordinates:a}},B.makeBlank=function(){return{type:"Point",coordinates:[]}}},87642:function(z,B,e){var d=e(64872).mod;B.segmentsIntersect=P;function P(y,r,n,u,i,f,g,h){var b=n-y,p=i-y,E=g-i,c=u-r,l=f-r,m=h-f,M=b*m-E*c;if(M===0)return null;var L=(p*m-E*l)/M,D=(p*c-b*l)/M;return D<0||D>1||L<0||L>1?null:{x:y+b*L,y:r+c*L}}B.segmentDistance=function(r,n,u,i,f,g,h,b){if(P(r,n,u,i,f,g,h,b))return 0;var p=u-r,E=i-n,c=h-f,l=b-g,m=p*p+E*E,M=c*c+l*l,L=Math.min(a(p,E,m,f-r,g-n),a(p,E,m,h-r,b-n),a(c,l,M,r-f,n-g),a(c,l,M,u-f,i-g));return Math.sqrt(L)};function a(y,r,n,u,i){var f=u*y+i*r;if(f<0)return u*u+i*i;if(f>n){var g=u-y,h=i-r;return g*g+h*h}else{var b=u*r-i*y;return b*b/n}}var _,x,v;B.getTextLocation=function(r,n,u,i){if((r!==x||i!==v)&&(_={},x=r,v=i),_[u])return _[u];var f=r.getPointAtLength(d(u-i/2,n)),g=r.getPointAtLength(d(u+i/2,n)),h=Math.atan((g.y-f.y)/(g.x-f.x)),b=r.getPointAtLength(d(u,n)),p=(b.x*4+f.x+g.x)/6,E=(b.y*4+f.y+g.y)/6,c={x:p,y:E,theta:h};return _[u]=c,c},B.clearLocationCache=function(){x=null},B.getVisibleSegment=function(r,n,u){var i=n.left,f=n.right,g=n.top,h=n.bottom,b=0,p=r.getTotalLength(),E=p,c,l;function m(L){var D=r.getPointAtLength(L);L===0?c=D:L===p&&(l=D);var A=D.x<i?i-D.x:D.x>f?D.x-f:0,C=D.y<g?g-D.y:D.y>h?D.y-h:0;return Math.sqrt(A*A+C*C)}for(var M=m(b);M;){if(b+=M+u,b>E)return;M=m(b)}for(M=m(E);M;){if(E-=M+u,b>E)return;M=m(E)}return{min:b,max:E,len:E-b,total:p,isClosed:b===0&&E===p&&Math.abs(c.x-l.x)<.1&&Math.abs(c.y-l.y)<.1}},B.findPointOnPath=function(r,n,u,i){i=i||{};for(var f=i.pathLength||r.getTotalLength(),g=i.tolerance||.001,h=i.iterationLimit||30,b=r.getPointAtLength(0)[u]>r.getPointAtLength(f)[u]?-1:1,p=0,E=0,c=f,l,m,M;p<h;){if(l=(E+c)/2,m=r.getPointAtLength(l),M=m[u]-n,Math.abs(M)<g)return m;b*M>0?c=l:E=l,p++}return m}},81697:function(z,B,e){var d=e(92770),P=e(84267),a=e(25075),_=e(21081),x=e(22399).defaultLine,v=e(73627).isArrayOrTypedArray,y=a(x),r=1;function n(h,b){var p=h;return p[3]*=b,p}function u(h){if(d(h))return y;var b=a(h);return b.length?b:y}function i(h){return d(h)?h:r}function f(h,b,p){var E=h.color,c=v(E),l=v(b),m=_.extractOpts(h),M=[],L,D,A,C,S;if(m.colorscale!==void 0?L=_.makeColorScaleFuncFromTrace(h):L=u,c?D=function(R,T){return R[T]===void 0?y:a(L(R[T]))}:D=u,l?A=function(R,T){return R[T]===void 0?r:i(R[T])}:A=i,c||l)for(var o=0;o<p;o++)C=D(E,o),S=A(b,o),M[o]=n(C,S);else M=n(a(E),b);return M}function g(h){var b=_.extractOpts(h),p=b.colorscale;return b.reversescale&&(p=_.flipScale(b.colorscale)),p.map(function(E){var c=E[0],l=P(E[1]),m=l.toRgb();return{index:c,rgb:[m.r,m.g,m.b,m.a]}})}z.exports={formatColor:f,parseColorScale:g}},28984:function(z,B,e){var d=e(23389);function P(a){return[a]}z.exports={keyFun:function(a){return a.key},repeat:P,descend:d,wrap:P,unwrap:function(a){return a[0]}}},23389:function(z){z.exports=function(e){return e}},39240:function(z){z.exports=function(e,d){if(!d)return e;var P=1/Math.abs(d),a=P>1?(P*e+P*d)/P:e+d,_=String(a).length;if(_>16){var x=String(d).length,v=String(e).length;if(_>=v+x){var y=parseFloat(a).toPrecision(12);y.indexOf("e+")===-1&&(a=+y)}}return a}},71828:function(z,B,e){var d=e(39898),P=e(84096).g0,a=e(60721).WU,_=e(92770),x=e(50606),v=x.FP_SAFE,y=-v,r=x.BADNUM,n=z.exports={};n.adjustFormat=function(q){return!q||/^\d[.]\df/.test(q)||/[.]\d%/.test(q)?q:q==="0.f"?"~f":/^\d%/.test(q)?"~%":/^\ds/.test(q)?"~s":!/^[~,.0$]/.test(q)&&/[&fps]/.test(q)?"~"+q:q};var u={};n.warnBadFormat=function(ce){var q=String(ce);u[q]||(u[q]=1,n.warn('encountered bad format: "'+q+'"'))},n.noFormat=function(ce){return String(ce)},n.numberFormat=function(ce){var q;try{q=a(n.adjustFormat(ce))}catch{return n.warnBadFormat(ce),n.noFormat}return q},n.nestedProperty=e(65487),n.keyedContainer=e(66636),n.relativeAttr=e(6962),n.isPlainObject=e(41965),n.toLogRange=e(58163),n.relinkPrivateKeys=e(51332);var i=e(73627);n.isTypedArray=i.isTypedArray,n.isArrayOrTypedArray=i.isArrayOrTypedArray,n.isArray1D=i.isArray1D,n.ensureArray=i.ensureArray,n.concat=i.concat,n.maxRowLength=i.maxRowLength,n.minRowLength=i.minRowLength;var f=e(64872);n.mod=f.mod,n.modHalf=f.modHalf;var g=e(96554);n.valObjectMeta=g.valObjectMeta,n.coerce=g.coerce,n.coerce2=g.coerce2,n.coerceFont=g.coerceFont,n.coercePattern=g.coercePattern,n.coerceHoverinfo=g.coerceHoverinfo,n.coerceSelectionMarkerOpacity=g.coerceSelectionMarkerOpacity,n.validate=g.validate;var h=e(41631);n.dateTime2ms=h.dateTime2ms,n.isDateTime=h.isDateTime,n.ms2DateTime=h.ms2DateTime,n.ms2DateTimeLocal=h.ms2DateTimeLocal,n.cleanDate=h.cleanDate,n.isJSDate=h.isJSDate,n.formatDate=h.formatDate,n.incrementMonth=h.incrementMonth,n.dateTick0=h.dateTick0,n.dfltRange=h.dfltRange,n.findExactDates=h.findExactDates,n.MIN_MS=h.MIN_MS,n.MAX_MS=h.MAX_MS;var b=e(65888);n.findBin=b.findBin,n.sorterAsc=b.sorterAsc,n.sorterDes=b.sorterDes,n.distinctVals=b.distinctVals,n.roundUp=b.roundUp,n.sort=b.sort,n.findIndexOfMin=b.findIndexOfMin,n.sortObjectKeys=e(78607);var p=e(80038);n.aggNums=p.aggNums,n.len=p.len,n.mean=p.mean,n.median=p.median,n.midRange=p.midRange,n.variance=p.variance,n.stdev=p.stdev,n.interp=p.interp;var E=e(35657);n.init2dArray=E.init2dArray,n.transposeRagged=E.transposeRagged,n.dot=E.dot,n.translationMatrix=E.translationMatrix,n.rotationMatrix=E.rotationMatrix,n.rotationXYMatrix=E.rotationXYMatrix,n.apply3DTransform=E.apply3DTransform,n.apply2DTransform=E.apply2DTransform,n.apply2DTransform2=E.apply2DTransform2,n.convertCssMatrix=E.convertCssMatrix,n.inverseTransformMatrix=E.inverseTransformMatrix;var c=e(26348);n.deg2rad=c.deg2rad,n.rad2deg=c.rad2deg,n.angleDelta=c.angleDelta,n.angleDist=c.angleDist,n.isFullCircle=c.isFullCircle,n.isAngleInsideSector=c.isAngleInsideSector,n.isPtInsideSector=c.isPtInsideSector,n.pathArc=c.pathArc,n.pathSector=c.pathSector,n.pathAnnulus=c.pathAnnulus;var l=e(99863);n.isLeftAnchor=l.isLeftAnchor,n.isCenterAnchor=l.isCenterAnchor,n.isRightAnchor=l.isRightAnchor,n.isTopAnchor=l.isTopAnchor,n.isMiddleAnchor=l.isMiddleAnchor,n.isBottomAnchor=l.isBottomAnchor;var m=e(87642);n.segmentsIntersect=m.segmentsIntersect,n.segmentDistance=m.segmentDistance,n.getTextLocation=m.getTextLocation,n.clearLocationCache=m.clearLocationCache,n.getVisibleSegment=m.getVisibleSegment,n.findPointOnPath=m.findPointOnPath;var M=e(1426);n.extendFlat=M.extendFlat,n.extendDeep=M.extendDeep,n.extendDeepAll=M.extendDeepAll,n.extendDeepNoArrays=M.extendDeepNoArrays;var L=e(47769);n.log=L.log,n.warn=L.warn,n.error=L.error;var D=e(30587);n.counterRegex=D.counter;var A=e(79990);n.throttle=A.throttle,n.throttleDone=A.done,n.clearThrottle=A.clear;var C=e(24401);n.getGraphDiv=C.getGraphDiv,n.isPlotDiv=C.isPlotDiv,n.removeElement=C.removeElement,n.addStyleRule=C.addStyleRule,n.addRelatedStyleRule=C.addRelatedStyleRule,n.deleteRelatedStyleRule=C.deleteRelatedStyleRule,n.getFullTransformMatrix=C.getFullTransformMatrix,n.getElementTransformMatrix=C.getElementTransformMatrix,n.getElementAndAncestors=C.getElementAndAncestors,n.equalDomRects=C.equalDomRects,n.clearResponsive=e(86367),n.preserveDrawingBuffer=e(45142),n.makeTraceGroups=e(77310),n._=e(15867),n.notifier=e(75046),n.filterUnique=e(75744),n.filterVisible=e(76756),n.pushUnique=e(75138),n.increment=e(39240),n.cleanNumber=e(95218),n.ensureNumber=function(q){return _(q)?(q=Number(q),q>v||q<y?r:q):r},n.isIndex=function(ce,q){return q!==void 0&&ce>=q?!1:_(ce)&&ce>=0&&ce%1===0},n.noop=e(64213),n.identity=e(23389),n.repeat=function(ce,q){for(var j=new Array(q),Z=0;Z<q;Z++)j[Z]=ce;return j},n.swapAttrs=function(ce,q,j,Z){j||(j="x"),Z||(Z="y");for(var Q=0;Q<q.length;Q++){var ue=q[Q],fe=n.nestedProperty(ce,ue.replace("?",j)),te=n.nestedProperty(ce,ue.replace("?",Z)),ne=fe.get();fe.set(te.get()),te.set(ne)}},n.raiseToTop=function(q){q.parentNode.appendChild(q)},n.cancelTransition=function(ce){return ce.transition().duration(0)},n.constrain=function(ce,q,j){return q>j?Math.max(j,Math.min(q,ce)):Math.max(q,Math.min(j,ce))},n.bBoxIntersect=function(ce,q,j){return j=j||0,ce.left<=q.right+j&&q.left<=ce.right+j&&ce.top<=q.bottom+j&&q.top<=ce.bottom+j},n.simpleMap=function(ce,q,j,Z,Q){for(var ue=ce.length,fe=new Array(ue),te=0;te<ue;te++)fe[te]=q(ce[te],j,Z,Q);return fe},n.randstr=function ce(q,j,Z,Q){if(Z||(Z=16),j===void 0&&(j=24),j<=0)return"0";var ue=Math.log(Math.pow(2,j))/Math.log(Z),fe="",te,ne,ve;for(te=2;ue===1/0;te*=2)ue=Math.log(Math.pow(2,j/te))/Math.log(Z)*te;var le=ue-Math.floor(ue);for(te=0;te<Math.floor(ue);te++)ve=Math.floor(Math.random()*Z).toString(Z),fe=ve+fe;le&&(ne=Math.pow(Z,le),ve=Math.floor(Math.random()*ne).toString(Z),fe=ve+fe);var xe=parseInt(fe,Z);return q&&q[fe]||xe!==1/0&&xe>=Math.pow(2,j)?Q>10?(n.warn("randstr failed uniqueness"),fe):ce(q,j,Z,(Q||0)+1):fe},n.OptionControl=function(ce,q){ce||(ce={}),q||(q="opt");var j={};return j.optionList=[],j._newoption=function(Z){Z[q]=ce,j[Z.name]=Z,j.optionList.push(Z)},j["_"+q]=ce,j},n.smooth=function(ce,q){if(q=Math.round(q)||0,q<2)return ce;var j=ce.length,Z=2*j,Q=2*q-1,ue=new Array(Q),fe=new Array(j),te,ne,ve,le;for(te=0;te<Q;te++)ue[te]=(1-Math.cos(Math.PI*(te+1)/q))/(2*q);for(te=0;te<j;te++){for(le=0,ne=0;ne<Q;ne++)ve=te+ne+1-q,ve<-j?ve-=Z*Math.round(ve/Z):ve>=Z&&(ve-=Z*Math.floor(ve/Z)),ve<0?ve=-1-ve:ve>=j&&(ve=Z-1-ve),le+=ce[ve]*ue[ne];fe[te]=le}return fe},n.syncOrAsync=function(ce,q,j){var Z,Q;function ue(){return n.syncOrAsync(ce,q,j)}for(;ce.length;)if(Q=ce.splice(0,1)[0],Z=Q(q),Z&&Z.then)return Z.then(ue);return j&&j(q)},n.stripTrailingSlash=function(ce){return ce.substr(-1)==="/"?ce.substr(0,ce.length-1):ce},n.noneOrAll=function(ce,q,j){if(ce){var Z=!1,Q=!0,ue,fe;for(ue=0;ue<j.length;ue++)fe=ce[j[ue]],fe!=null?Z=!0:Q=!1;if(Z&&!Q)for(ue=0;ue<j.length;ue++)ce[j[ue]]=q[j[ue]]}},n.mergeArray=function(ce,q,j,Z){var Q=typeof Z=="function";if(n.isArrayOrTypedArray(ce))for(var ue=Math.min(ce.length,q.length),fe=0;fe<ue;fe++){var te=ce[fe];q[fe][j]=Q?Z(te):te}},n.mergeArrayCastPositive=function(ce,q,j){return n.mergeArray(ce,q,j,function(Z){var Q=+Z;return isFinite(Q)&&Q>0?Q:0})},n.fillArray=function(ce,q,j,Z){if(Z=Z||n.identity,n.isArrayOrTypedArray(ce))for(var Q=0;Q<q.length;Q++)q[Q][j]=Z(ce[Q])},n.castOption=function(ce,q,j,Z){Z=Z||n.identity;var Q=n.nestedProperty(ce,j).get();return n.isArrayOrTypedArray(Q)?Array.isArray(q)&&n.isArrayOrTypedArray(Q[q[0]])?Z(Q[q[0]][q[1]]):Z(Q[q]):Q},n.extractOption=function(ce,q,j,Z){if(j in ce)return ce[j];var Q=n.nestedProperty(q,Z).get();if(!Array.isArray(Q))return Q};function S(ce){var q={};for(var j in ce)for(var Z=ce[j],Q=0;Q<Z.length;Q++)q[Z[Q]]=+j;return q}n.tagSelected=function(ce,q,j){var Z=q.selectedpoints,Q=q._indexToPoints,ue;Q&&(ue=S(Q));function fe(xe){return xe!==void 0&&xe<ce.length}for(var te=0;te<Z.length;te++){var ne=Z[te];if(n.isIndex(ne)||n.isArrayOrTypedArray(ne)&&n.isIndex(ne[0])&&n.isIndex(ne[1])){var ve=ue?ue[ne]:ne,le=j?j[ve]:ve;fe(le)&&(ce[le].selected=1)}}},n.selIndices2selPoints=function(ce){var q=ce.selectedpoints,j=ce._indexToPoints;if(j){for(var Z=S(j),Q=[],ue=0;ue<q.length;ue++){var fe=q[ue];if(n.isIndex(fe)){var te=Z[fe];n.isIndex(te)&&Q.push(te)}}return Q}else return q},n.getTargetArray=function(ce,q){var j=q.target;if(typeof j=="string"&&j){var Z=n.nestedProperty(ce,j).get();return Array.isArray(Z)?Z:!1}else if(Array.isArray(j))return j;return!1},n.minExtend=function(ce,q){var j={};typeof q!="object"&&(q={});var Z=3,Q=Object.keys(ce),ue,fe,te;for(ue=0;ue<Q.length;ue++)fe=Q[ue],te=ce[fe],!(fe.charAt(0)==="_"||typeof te=="function")&&(fe==="module"?j[fe]=te:Array.isArray(te)?fe==="colorscale"?j[fe]=te.slice():j[fe]=te.slice(0,Z):n.isTypedArray(te)?j[fe]=te.subarray(0,Z):te&&typeof te=="object"?j[fe]=n.minExtend(ce[fe],q[fe]):j[fe]=te);for(Q=Object.keys(q),ue=0;ue<Q.length;ue++)fe=Q[ue],te=q[fe],(typeof te!="object"||!(fe in j)||typeof j[fe]!="object")&&(j[fe]=te);return j},n.titleCase=function(ce){return ce.charAt(0).toUpperCase()+ce.substr(1)},n.containsAny=function(ce,q){for(var j=0;j<q.length;j++)if(ce.indexOf(q[j])!==-1)return!0;return!1},n.isIE=function(){return typeof window.navigator.msSaveBlob<"u"};var o=/Version\/[\d\.]+.*Safari/;n.isSafari=function(){return o.test(window.navigator.userAgent)};var R=/iPad|iPhone|iPod/;n.isIOS=function(){return R.test(window.navigator.userAgent)};var T=/Firefox\/(\d+)\.\d+/;n.getFirefoxVersion=function(){var ce=T.exec(window.navigator.userAgent);if(ce&&ce.length===2){var q=parseInt(ce[1]);if(!isNaN(q))return q}return null},n.isD3Selection=function(ce){return ce instanceof d.selection},n.ensureSingle=function(ce,q,j,Z){var Q=ce.select(q+(j?"."+j:""));if(Q.size())return Q;var ue=ce.append(q);return j&&ue.classed(j,!0),Z&&ue.call(Z),ue},n.ensureSingleById=function(ce,q,j,Z){var Q=ce.select(q+"#"+j);if(Q.size())return Q;var ue=ce.append(q).attr("id",j);return Z&&ue.call(Z),ue},n.objectFromPath=function(ce,q){for(var j=ce.split("."),Z,Q=Z={},ue=0;ue<j.length;ue++){var fe=j[ue],te=null,ne=j[ue].match(/(.*)\[([0-9]+)\]/);ne?(fe=ne[1],te=ne[2],Z=Z[fe]=[],ue===j.length-1?Z[te]=q:Z[te]={},Z=Z[te]):(ue===j.length-1?Z[fe]=q:Z[fe]={},Z=Z[fe])}return Q};var O=/^([^\[\.]+)\.(.+)?/,N=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;n.expandObjectPaths=function(ce){var q,j,Z,Q,ue,fe,te;if(typeof ce=="object"&&!Array.isArray(ce))for(j in ce)ce.hasOwnProperty(j)&&((q=j.match(O))?(Q=ce[j],Z=q[1],delete ce[j],ce[Z]=n.extendDeepNoArrays(ce[Z]||{},n.objectFromPath(j,n.expandObjectPaths(Q))[Z])):(q=j.match(N))?(Q=ce[j],Z=q[1],ue=parseInt(q[2]),delete ce[j],ce[Z]=ce[Z]||[],q[3]==="."?(te=q[4],fe=ce[Z][ue]=ce[Z][ue]||{},n.extendDeepNoArrays(fe,n.objectFromPath(te,n.expandObjectPaths(Q)))):ce[Z][ue]=n.expandObjectPaths(Q)):ce[j]=n.expandObjectPaths(ce[j]));return ce},n.numSeparate=function(ce,q,j){if(j||(j=!1),typeof q!="string"||q.length===0)throw new Error("Separator string required for formatting!");typeof ce=="number"&&(ce=String(ce));var Z=/(\d+)(\d{3})/,Q=q.charAt(0),ue=q.charAt(1),fe=ce.split("."),te=fe[0],ne=fe.length>1?Q+fe[1]:"";if(ue&&(fe.length>1||te.length>4||j))for(;Z.test(te);)te=te.replace(Z,"$1"+ue+"$2");return te+ne},n.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var H=/^\w*$/;n.templateString=function(ce,q){var j={};return ce.replace(n.TEMPLATE_STRING_REGEX,function(Z,Q){var ue;return H.test(Q)?ue=q[Q]:(j[Q]=j[Q]||n.nestedProperty(q,Q).get,ue=j[Q]()),n.isValidTextValue(ue)?ue:""})};var k={max:10,count:0,name:"hovertemplate"};n.hovertemplateString=function(){return U.apply(k,arguments)};var V={max:10,count:0,name:"texttemplate"};n.texttemplateString=function(){return U.apply(V,arguments)};var G=/^[:|\|]/;function U(ce,q,j){var Z=this,Q=arguments;q||(q={});var ue={};return ce.replace(n.TEMPLATE_STRING_REGEX,function(fe,te,ne){var ve=te==="xother"||te==="yother",le=te==="_xother"||te==="_yother",xe=te==="_xother_"||te==="_yother_",Se=te==="xother_"||te==="yother_",Re=ve||le||Se||xe,Ee=te;(le||xe)&&(Ee=Ee.substring(1)),(Se||xe)&&(Ee=Ee.substring(0,Ee.length-1));var Oe;if(Re){if(Oe=q[Ee],Oe===void 0)return""}else{var Be,Le;for(Le=3;Le<Q.length;Le++)if(Be=Q[Le],!!Be){if(Be.hasOwnProperty(Ee)){Oe=Be[Ee];break}if(H.test(Ee)||(Oe=n.nestedProperty(Be,Ee).get(),Oe=ue[Ee]||n.nestedProperty(Be,Ee).get(),Oe&&(ue[Ee]=Oe)),Oe!==void 0)break}}if(Oe===void 0&&Z)return Z.count<Z.max&&(n.warn("Variable '"+Ee+"' in "+Z.name+" could not be found!"),Oe=fe),Z.count===Z.max&&n.warn("Too many "+Z.name+" warnings - additional warnings will be suppressed"),Z.count++,fe;if(ne){var Te;if(ne[0]===":"&&(Te=j?j.numberFormat:n.numberFormat,Oe=Te(ne.replace(G,""))(Oe)),ne[0]==="|"){Te=j?j.timeFormat:P;var De=n.dateTime2ms(Oe);Oe=n.formatDate(De,ne.replace(G,""),!1,Te)}}else{var Ve=Ee+"Label";q.hasOwnProperty(Ve)&&(Oe=q[Ve])}return Re&&(Oe="("+Oe+")",(le||xe)&&(Oe=" "+Oe),(Se||xe)&&(Oe=Oe+" ")),Oe})}var Y=48,ee=57;n.subplotSort=function(ce,q){for(var j=Math.min(ce.length,q.length)+1,Z=0,Q=0,ue=0;ue<j;ue++){var fe=ce.charCodeAt(ue)||0,te=q.charCodeAt(ue)||0,ne=fe>=Y&&fe<=ee,ve=te>=Y&&te<=ee;if(ne&&(Z=10*Z+fe-Y),ve&&(Q=10*Q+te-Y),!ne||!ve){if(Z!==Q)return Z-Q;if(fe!==te)return fe-te}}return Q-Z};var re=2e9;n.seedPseudoRandom=function(){re=2e9},n.pseudoRandom=function(){var ce=re;return re=(69069*re+1)%4294967296,Math.abs(re-ce)<429496729?n.pseudoRandom():re/4294967296},n.fillText=function(ce,q,j){var Z=Array.isArray(j)?function(fe){j.push(fe)}:function(fe){j.text=fe},Q=n.extractOption(ce,q,"htx","hovertext");if(n.isValidTextValue(Q))return Z(Q);var ue=n.extractOption(ce,q,"tx","text");if(n.isValidTextValue(ue))return Z(ue)},n.isValidTextValue=function(ce){return ce||ce===0},n.formatPercent=function(ce,q){q=q||0;for(var j=(Math.round(100*ce*Math.pow(10,q))*Math.pow(.1,q)).toFixed(q)+"%",Z=0;Z<q;Z++)j.indexOf(".")!==-1&&(j=j.replace("0%","%"),j=j.replace(".%","%"));return j},n.isHidden=function(ce){var q=window.getComputedStyle(ce).display;return!q||q==="none"},n.strTranslate=function(ce,q){return ce||q?"translate("+ce+","+q+")":""},n.strRotate=function(ce){return ce?"rotate("+ce+")":""},n.strScale=function(ce){return ce!==1?"scale("+ce+")":""},n.getTextTransform=function(ce){var q=ce.noCenter,j=ce.textX,Z=ce.textY,Q=ce.targetX,ue=ce.targetY,fe=ce.anchorX||0,te=ce.anchorY||0,ne=ce.rotate,ve=ce.scale;return ve?ve>1&&(ve=1):ve=0,n.strTranslate(Q-ve*(j+fe),ue-ve*(Z+te))+n.strScale(ve)+(ne?"rotate("+ne+(q?"":" "+j+" "+Z)+")":"")},n.setTransormAndDisplay=function(ce,q){ce.attr("transform",n.getTextTransform(q)),ce.style("display",q.scale?null:"none")},n.ensureUniformFontSize=function(ce,q){var j=n.extendFlat({},q);return j.size=Math.max(q.size,ce._fullLayout.uniformtext.minsize||0),j},n.join2=function(ce,q,j){var Z=ce.length;return Z>1?ce.slice(0,-1).join(q)+j+ce[Z-1]:ce.join(q)},n.bigFont=function(ce){return Math.round(1.2*ce)};var ie=n.getFirefoxVersion(),se=ie!==null&&ie<86;n.getPositionFromD3Event=function(){return se?[d.event.layerX,d.event.layerY]:[d.event.offsetX,d.event.offsetY]}},41965:function(z){z.exports=function(e){return window&&window.process&&window.process.versions?Object.prototype.toString.call(e)==="[object Object]":Object.prototype.toString.call(e)==="[object Object]"&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")}},66636:function(z,B,e){var d=e(65487),P=/^\w*$/,a=0,_=1,x=2,v=3,y=4;z.exports=function(n,u,i,f){i=i||"name",f=f||"value";var g,h,b,p={};u&&u.length?(b=d(n,u),h=b.get()):h=n,u=u||"";var E={};if(h)for(g=0;g<h.length;g++)E[h[g][i]]=g;var c=P.test(f),l={set:function(m,M){var L=M===null?y:a;if(!h){if(!b||L===y)return;h=[],b.set(h)}var D=E[m];if(D===void 0){if(L===y)return;L=L|v,D=h.length,E[m]=D}else M!==(c?h[D][f]:d(h[D],f).get())&&(L=L|x);var A=h[D]=h[D]||{};return A[i]=m,c?A[f]=M:d(A,f).set(M),M!==null&&(L=L&~y),p[D]=p[D]|L,l},get:function(m){if(h){var M=E[m];if(M!==void 0)return c?h[M][f]:d(h[M],f).get()}},rename:function(m,M){var L=E[m];return L===void 0||(p[L]=p[L]|_,E[M]=L,delete E[m],h[L][i]=M),l},remove:function(m){var M=E[m];if(M===void 0)return l;var L=h[M];if(Object.keys(L).length>2)return p[M]=p[M]|x,l.set(m,null);if(c){for(g=M;g<h.length;g++)p[g]=p[g]|v;for(g=M;g<h.length;g++)E[h[g][i]]--;h.splice(M,1),delete E[m]}else d(L,f).set(null),p[M]=p[M]|x|y;return l},constructUpdate:function(){for(var m,M,L={},D=Object.keys(p),A=0;A<D.length;A++)M=D[A],m=u+"["+M+"]",h[M]?(p[M]&_&&(L[m+"."+i]=h[M][i]),p[M]&x&&(c?L[m+"."+f]=p[M]&y?null:h[M][f]:L[m+"."+f]=p[M]&y?null:d(h[M],f).get())):L[m]=null;return L}};return l}},15867:function(z,B,e){var d=e(73972);z.exports=function(a,_){for(var x=a._context.locale,v=0;v<2;v++){for(var y=a._context.locales,r=0;r<2;r++){var n=(y[x]||{}).dictionary;if(n){var u=n[_];if(u)return u}y=d.localeRegistry}var i=x.split("-")[0];if(i===x)break;x=i}return _}},47769:function(z,B,e){var d=e(72075).dfltConfig,P=e(75046),a=z.exports={};a.log=function(){var _;if(d.logging>1){var x=["LOG:"];for(_=0;_<arguments.length;_++)x.push(arguments[_]);console.trace.apply(console,x)}if(d.notifyOnLogging>1){var v=[];for(_=0;_<arguments.length;_++)v.push(arguments[_]);P(v.join("<br>"),"long")}},a.warn=function(){var _;if(d.logging>0){var x=["WARN:"];for(_=0;_<arguments.length;_++)x.push(arguments[_]);console.trace.apply(console,x)}if(d.notifyOnLogging>0){var v=[];for(_=0;_<arguments.length;_++)v.push(arguments[_]);P(v.join("<br>"),"stick")}},a.error=function(){var _;if(d.logging>0){var x=["ERROR:"];for(_=0;_<arguments.length;_++)x.push(arguments[_]);console.error.apply(console,x)}if(d.notifyOnLogging>0){var v=[];for(_=0;_<arguments.length;_++)v.push(arguments[_]);P(v.join("<br>"),"stick")}}},77310:function(z,B,e){var d=e(39898);z.exports=function(a,_,x){var v=a.selectAll("g."+x.replace(/\s/g,".")).data(_,function(r){return r[0].trace.uid});v.exit().remove(),v.enter().append("g").attr("class",x),v.order();var y=a.classed("rangeplot")?"nodeRangePlot3":"node3";return v.each(function(r){r[0][y]=d.select(this)}),v}},35657:function(z,B,e){var d=e(79576);B.init2dArray=function(P,a){for(var _=new Array(P),x=0;x<P;x++)_[x]=new Array(a);return _},B.transposeRagged=function(P){var a=0,_=P.length,x,v;for(x=0;x<_;x++)a=Math.max(a,P[x].length);var y=new Array(a);for(x=0;x<a;x++)for(y[x]=new Array(_),v=0;v<_;v++)y[x][v]=P[v][x];return y},B.dot=function(P,a){if(!(P.length&&a.length)||P.length!==a.length)return null;var _=P.length,x,v;if(P[0].length)for(x=new Array(_),v=0;v<_;v++)x[v]=B.dot(P[v],a);else if(a[0].length){var y=B.transposeRagged(a);for(x=new Array(y.length),v=0;v<y.length;v++)x[v]=B.dot(P,y[v])}else for(x=0,v=0;v<_;v++)x+=P[v]*a[v];return x},B.translationMatrix=function(P,a){return[[1,0,P],[0,1,a],[0,0,1]]},B.rotationMatrix=function(P){var a=P*Math.PI/180;return[[Math.cos(a),-Math.sin(a),0],[Math.sin(a),Math.cos(a),0],[0,0,1]]},B.rotationXYMatrix=function(P,a,_){return B.dot(B.dot(B.translationMatrix(a,_),B.rotationMatrix(P)),B.translationMatrix(-a,-_))},B.apply3DTransform=function(P){return function(){var a=arguments,_=arguments.length===1?a[0]:[a[0],a[1],a[2]||0];return B.dot(P,[_[0],_[1],_[2],1]).slice(0,3)}},B.apply2DTransform=function(P){return function(){var a=arguments;a.length===3&&(a=a[0]);var _=arguments.length===1?a[0]:[a[0],a[1]];return B.dot(P,[_[0],_[1],1]).slice(0,2)}},B.apply2DTransform2=function(P){var a=B.apply2DTransform(P);return function(_){return a(_.slice(0,2)).concat(a(_.slice(2,4)))}},B.convertCssMatrix=function(P){if(P){var a=P.length;if(a===16)return P;if(a===6)return[P[0],P[1],0,0,P[2],P[3],0,0,0,0,1,0,P[4],P[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},B.inverseTransformMatrix=function(P){var a=[];return d.invert(a,P),[[a[0],a[1],a[2],a[3]],[a[4],a[5],a[6],a[7]],[a[8],a[9],a[10],a[11]],[a[12],a[13],a[14],a[15]]]}},64872:function(z){function B(d,P){var a=d%P;return a<0?a+P:a}function e(d,P){return Math.abs(d)>P/2?d-Math.round(d/P)*P:d}z.exports={mod:B,modHalf:e}},65487:function(z,B,e){var d=e(92770),P=e(73627).isArrayOrTypedArray;z.exports=function(f,g){if(d(g))g=String(g);else if(typeof g!="string"||g.substr(g.length-4)==="[-1]")throw"bad property string";for(var h=0,b=g.split("."),p,E,c;h<b.length;){if(p=String(b[h]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/),p){if(p[1])b[h]=p[1];else if(h===0)b.splice(0,1);else throw"bad property string";for(E=p[2].substr(1,p[2].length-2).split("]["),c=0;c<E.length;c++)h++,b.splice(h,0,Number(E[c]))}h++}return typeof f!="object"?u(f,g,b):{set:v(f,b,g),get:a(f,b),astr:g,parts:b,obj:f}};function a(i,f){return function(){var g=i,h,b,p,E,c;for(E=0;E<f.length-1;E++){if(h=f[E],h===-1){for(b=!0,p=[],c=0;c<g.length;c++)p[c]=a(g[c],f.slice(E+1))(),p[c]!==p[0]&&(b=!1);return b?p[0]:p}if(typeof h=="number"&&!P(g)||(g=g[h],typeof g!="object"||g===null))return}if(!(typeof g!="object"||g===null)&&(p=g[f[E]],p!==null))return p}}var _=/(^|\.)args\[/;function x(i,f){return i===void 0||i===null&&!f.match(_)}function v(i,f,g){return function(h){var b=i,p="",E=x(h,g),c,l;for(l=0;l<f.length-1;l++){if(c=f[l],typeof c=="number"&&!P(b))throw"array index but container is not an array";if(c===-1){if(E=!r(b,f.slice(l+1),h,g),E)break;return}if(!n(b,c,f[l+1],E))break;if(b=b[c],typeof b!="object"||b===null)throw"container is not an object";p=y(p,c)}if(E){if(l===f.length-1&&(delete b[f[l]],Array.isArray(b)&&+f[l]===b.length-1))for(;b.length&&b[b.length-1]===void 0;)b.pop()}else b[f[l]]=h}}function y(i,f){var g=f;return d(f)?g="["+f+"]":i&&(g="."+f),i+g}function r(i,f,g,h){var b=P(g),p=!0,E=g,c=h.replace("-1",0),l=b?!1:x(g,c),m=f[0],M;for(M=0;M<i.length;M++)c=h.replace("-1",M),b&&(E=g[M%g.length],l=x(E,c)),l&&(p=!1),n(i,M,m,l)&&v(i[M],f,h.replace("-1",M))(E);return p}function n(i,f,g,h){if(i[f]===void 0){if(h)return!1;typeof g=="number"?i[f]=[]:i[f]={}}return!0}function u(i,f,g){return{set:function(){throw"bad container"},get:function(){},astr:f,parts:g,obj:i}}},64213:function(z){z.exports=function(){}},75046:function(z,B,e){var d=e(39898),P=e(92770),a=[];z.exports=function(_,x){if(a.indexOf(_)!==-1)return;a.push(_);var v=1e3;P(x)?v=x:x==="long"&&(v=3e3);var y=d.select("body").selectAll(".plotly-notifier").data([0]);y.enter().append("div").classed("plotly-notifier",!0);var r=y.selectAll(".notifier-note").data(a);function n(u){u.duration(700).style("opacity",0).each("end",function(i){var f=a.indexOf(i);f!==-1&&a.splice(f,1),d.select(this).remove()})}r.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(u){var i=d.select(this);i.append("button").classed("notifier-close",!0).html("&times;").on("click",function(){i.transition().call(n)});for(var f=i.append("p"),g=u.split(/<br\s*\/?>/g),h=0;h<g.length;h++)h&&f.append("br"),f.append("span").text(g[h]);x==="stick"?i.transition().duration(350).style("opacity",1):i.transition().duration(700).style("opacity",1).transition().delay(v).call(n)})}},39918:function(z,B,e){var d=e(6964),P="data-savedcursor",a="!!";z.exports=function(x,v){var y=x.attr(P);if(v){if(!y){for(var r=(x.attr("class")||"").split(" "),n=0;n<r.length;n++){var u=r[n];u.indexOf("cursor-")===0&&x.attr(P,u.substr(7)).classed(u,!1)}x.attr(P)||x.attr(P,a)}d(x,v)}else y&&(x.attr(P,null),y===a?d(x):d(x,y))}},61082:function(z,B,e){var d=e(35657).dot,P=e(50606).BADNUM,a=z.exports={};a.tester=function(x){var v=x.slice(),y=v[0][0],r=y,n=v[0][1],u=n,i;for((v[v.length-1][0]!==v[0][0]||v[v.length-1][1]!==v[0][1])&&v.push(v[0]),i=1;i<v.length;i++)y=Math.min(y,v[i][0]),r=Math.max(r,v[i][0]),n=Math.min(n,v[i][1]),u=Math.max(u,v[i][1]);var f=!1,g;v.length===5&&(v[0][0]===v[1][0]?v[2][0]===v[3][0]&&v[0][1]===v[3][1]&&v[1][1]===v[2][1]&&(f=!0,g=function(c){return c[0]===v[0][0]}):v[0][1]===v[1][1]&&v[2][1]===v[3][1]&&v[0][0]===v[3][0]&&v[1][0]===v[2][0]&&(f=!0,g=function(c){return c[1]===v[0][1]}));function h(c,l){var m=c[0],M=c[1];return!(m===P||m<y||m>r||M===P||M<n||M>u||l&&g(c))}function b(c,l){var m=c[0],M=c[1];if(m===P||m<y||m>r||M===P||M<n||M>u)return!1;var L=v.length,D=v[0][0],A=v[0][1],C=0,S,o,R,T,O;for(S=1;S<L;S++)if(o=D,R=A,D=v[S][0],A=v[S][1],T=Math.min(o,D),!(m<T||m>Math.max(o,D)||M>Math.max(R,A)))if(M<Math.min(R,A))m!==T&&C++;else{if(D===o?O=M:O=R+(m-o)*(A-R)/(D-o),M===O)return!(S===1&&l);M<=O&&m!==T&&C++}return C%2===1}var p=!0,E=v[0];for(i=1;i<v.length;i++)if(E[0]!==v[i][0]||E[1]!==v[i][1]){p=!1;break}return{xmin:y,xmax:r,ymin:n,ymax:u,pts:v,contains:f?h:b,isRect:f,degenerate:p}},a.isSegmentBent=function(x,v,y,r){var n=x[v],u=[x[y][0]-n[0],x[y][1]-n[1]],i=d(u,u),f=Math.sqrt(i),g=[-u[1]/f,u[0]/f],h,b,p;for(h=v+1;h<y;h++)if(b=[x[h][0]-n[0],x[h][1]-n[1]],p=d(b,u),p<0||p>i||Math.abs(d(b,g))>r)return!0;return!1},a.filter=function(x,v){var y=[x[0]],r=0,n=0;function u(f){x.push(f);var g=y.length,h=r;y.splice(n+1);for(var b=h+1;b<x.length;b++)(b===x.length-1||a.isSegmentBent(x,h,b+1,v))&&(y.push(x[b]),y.length<g-2&&(r=b,n=y.length-1),h=b)}if(x.length>1){var i=x.pop();u(i)}return{addPt:u,raw:x,filtered:y}}},79749:function(z,B,e){var d=e(58617),P=e(98580);z.exports=function(_,x,v){var y=_._fullLayout,r=!0;return y._glcanvas.each(function(n){if(n.regl){n.regl.preloadCachedCode(v);return}if(!(n.pick&&!y._has("parcoords"))){try{n.regl=P({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:_._context.plotGlPixelRatio||e.g.devicePixelRatio,extensions:x||[],cachedCode:v||{}})}catch{r=!1}n.regl||(r=!1),r&&this.addEventListener("webglcontextlost",function(u){_&&_.emit&&_.emit("plotly_webglcontextlost",{event:u,layer:n.key})},!1)}}),r||d({container:y._glcontainer.node()}),r}},45142:function(z,B,e){var d=e(92770),P=e(35791);z.exports=function(x){var v;if(x&&x.hasOwnProperty("userAgent")?v=x.userAgent:v=a(),typeof v!="string")return!0;var y=P({ua:{headers:{"user-agent":v}},tablet:!0,featureDetect:!1});if(!y)for(var r=v.split(" "),n=1;n<r.length;n++){var u=r[n];if(u.indexOf("Safari")!==-1)for(var i=n-1;i>-1;i--){var f=r[i];if(f.substr(0,8)==="Version/"){var g=f.substr(8).split(".")[0];if(d(g)&&(g=+g),g>=13)return!0}}}return y};function a(){var _;return typeof navigator<"u"&&(_=navigator.userAgent),_&&_.headers&&typeof _.headers["user-agent"]=="string"&&(_=_.headers["user-agent"]),_}},75138:function(z){z.exports=function(e,d){if(d instanceof RegExp){for(var P=d.toString(),a=0;a<e.length;a++)if(e[a]instanceof RegExp&&e[a].toString()===P)return e;e.push(d)}else(d||d===0)&&e.indexOf(d)===-1&&e.push(d);return e}},10847:function(z,B,e){var d=e(71828),P=e(72075).dfltConfig;function a(x,v){for(var y=[],r,n=0;n<v.length;n++)r=v[n],r===x?y[n]=r:typeof r=="object"?y[n]=Array.isArray(r)?d.extendDeep([],r):d.extendDeepAll({},r):y[n]=r;return y}var _={};_.add=function(x,v,y,r,n){var u,i;if(x.undoQueue=x.undoQueue||{index:0,queue:[],sequence:!1},i=x.undoQueue.index,x.autoplay){x.undoQueue.inSequence||(x.autoplay=!1);return}!x.undoQueue.sequence||x.undoQueue.beginSequence?(u={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},x.undoQueue.queue.splice(i,x.undoQueue.queue.length-i,u),x.undoQueue.index+=1):u=x.undoQueue.queue[i-1],x.undoQueue.beginSequence=!1,u&&(u.undo.calls.unshift(v),u.undo.args.unshift(y),u.redo.calls.push(r),u.redo.args.push(n)),x.undoQueue.queue.length>P.queueLength&&(x.undoQueue.queue.shift(),x.undoQueue.index--)},_.startSequence=function(x){x.undoQueue=x.undoQueue||{index:0,queue:[],sequence:!1},x.undoQueue.sequence=!0,x.undoQueue.beginSequence=!0},_.stopSequence=function(x){x.undoQueue=x.undoQueue||{index:0,queue:[],sequence:!1},x.undoQueue.sequence=!1,x.undoQueue.beginSequence=!1},_.undo=function(v){var y,r;if(!(v.undoQueue===void 0||isNaN(v.undoQueue.index)||v.undoQueue.index<=0)){for(v.undoQueue.index--,y=v.undoQueue.queue[v.undoQueue.index],v.undoQueue.inSequence=!0,r=0;r<y.undo.calls.length;r++)_.plotDo(v,y.undo.calls[r],y.undo.args[r]);v.undoQueue.inSequence=!1,v.autoplay=!1}},_.redo=function(v){var y,r;if(!(v.undoQueue===void 0||isNaN(v.undoQueue.index)||v.undoQueue.index>=v.undoQueue.queue.length)){for(y=v.undoQueue.queue[v.undoQueue.index],v.undoQueue.inSequence=!0,r=0;r<y.redo.calls.length;r++)_.plotDo(v,y.redo.calls[r],y.redo.args[r]);v.undoQueue.inSequence=!1,v.autoplay=!1,v.undoQueue.index++}},_.plotDo=function(x,v,y){x.autoplay=!0,y=a(x,y),v.apply(null,y)},z.exports=_},30587:function(z,B){B.counter=function(e,d,P,a){var _=(d||"")+(P?"":"$"),x=a===!1?"":"^";return e==="xy"?new RegExp(x+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+_):new RegExp(x+e+"([2-9]|[1-9][0-9]+)?"+_)}},6962:function(z){var B=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,e=/^[^\.\[\]]+$/;z.exports=function(d,P){for(;P;){var a=d.match(B);if(a)d=a[1];else if(d.match(e))d="";else throw new Error("bad relativeAttr call:"+[d,P]);if(P.charAt(0)==="^")P=P.slice(1);else break}return d&&P.charAt(0)!=="["?d+"."+P:d+P}},51332:function(z,B,e){var d=e(73627).isArrayOrTypedArray,P=e(41965);z.exports=function a(_,x){for(var v in x){var y=x[v],r=_[v];if(r!==y)if(v.charAt(0)==="_"||typeof y=="function"){if(v in _)continue;_[v]=y}else if(d(y)&&d(r)&&P(y[0])){if(v==="customdata"||v==="ids")continue;for(var n=Math.min(y.length,r.length),u=0;u<n;u++)r[u]!==y[u]&&P(y[u])&&P(r[u])&&a(r[u],y[u])}else P(y)&&P(r)&&(a(r,y),Object.keys(r).length||delete _[v])}}},65888:function(z,B,e){var d=e(92770),P=e(47769),a=e(23389),_=e(50606).BADNUM,x=1e-9;B.findBin=function(u,i,f){if(d(i.start))return f?Math.ceil((u-i.start)/i.size-x)-1:Math.floor((u-i.start)/i.size+x);var g=0,h=i.length,b=0,p=h>1?(i[h-1]-i[0])/(h-1):1,E,c;for(p>=0?c=f?v:y:c=f?n:r,u+=p*x*(f?-1:1)*(p>=0?1:-1);g<h&&b++<100;)E=Math.floor((g+h)/2),c(i[E],u)?g=E+1:h=E;return b>90&&P.log("Long binary search..."),g-1};function v(u,i){return u<i}function y(u,i){return u<=i}function r(u,i){return u>i}function n(u,i){return u>=i}B.sorterAsc=function(u,i){return u-i},B.sorterDes=function(u,i){return i-u},B.distinctVals=function(u){var i=u.slice();i.sort(B.sorterAsc);var f;for(f=i.length-1;f>-1&&i[f]===_;f--);for(var g=i[f]-i[0]||1,h=g/(f||1)/1e4,b=[],p,E=0;E<=f;E++){var c=i[E],l=c-p;p===void 0?(b.push(c),p=c):l>h&&(g=Math.min(g,l),b.push(c),p=c)}return{vals:b,minDiff:g}},B.roundUp=function(u,i,f){for(var g=0,h=i.length-1,b,p=0,E=f?0:1,c=f?1:0,l=f?Math.ceil:Math.floor;g<h&&p++<100;)b=l((g+h)/2),i[b]<=u?g=b+E:h=b-c;return i[g]},B.sort=function(u,i){for(var f=0,g=0,h=1;h<u.length;h++){var b=i(u[h],u[h-1]);if(b<0?f=1:b>0&&(g=1),f&&g)return u.sort(i)}return g?u:u.reverse()},B.findIndexOfMin=function(u,i){i=i||a;for(var f=1/0,g,h=0;h<u.length;h++){var b=i(u[h]);b<f&&(f=b,g=h)}return g}},6964:function(z){z.exports=function(e,d){(e.attr("class")||"").split(" ").forEach(function(P){P.indexOf("cursor-")===0&&e.classed(P,!1)}),d&&e.classed("cursor-"+d,!0)}},58617:function(z,B,e){var d=e(7901),P=function(){};z.exports=function(_){for(var x in _)typeof _[x]=="function"&&(_[x]=P);_.destroy=function(){_.container.parentNode.removeChild(_.container)};var v=document.createElement("div");v.className="no-webgl",v.style.cursor="pointer",v.style.fontSize="24px",v.style.color=d.defaults[0],v.style.position="absolute",v.style.left=v.style.top="0px",v.style.width=v.style.height="100%",v.style["background-color"]=d.lightLine,v.style["z-index"]=30;var y=document.createElement("p");return y.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",y.style.position="relative",y.style.top="50%",y.style.left="50%",y.style.height="30%",y.style.width="50%",y.style.margin="-15% 0 0 -25%",v.appendChild(y),_.container.appendChild(v),_.container.style.background="#FFFFFF",_.container.onclick=function(){window.open("https://get.webgl.org")},!1}},78607:function(z){z.exports=function(e){return Object.keys(e).sort()}},80038:function(z,B,e){var d=e(92770),P=e(73627).isArrayOrTypedArray;B.aggNums=function(a,_,x,v){var y,r;if((!v||v>x.length)&&(v=x.length),d(_)||(_=!1),P(x[0])){for(r=new Array(v),y=0;y<v;y++)r[y]=B.aggNums(a,_,x[y]);x=r}for(y=0;y<v;y++)d(_)?d(x[y])&&(_=a(+_,+x[y])):_=x[y];return _},B.len=function(a){return B.aggNums(function(_){return _+1},0,a)},B.mean=function(a,_){return _||(_=B.len(a)),B.aggNums(function(x,v){return x+v},0,a)/_},B.midRange=function(a){if(!(a===void 0||a.length===0))return(B.aggNums(Math.max,null,a)+B.aggNums(Math.min,null,a))/2},B.variance=function(a,_,x){return _||(_=B.len(a)),d(x)||(x=B.mean(a,_)),B.aggNums(function(v,y){return v+Math.pow(y-x,2)},0,a)/_},B.stdev=function(a,_,x){return Math.sqrt(B.variance(a,_,x))},B.median=function(a){var _=a.slice().sort();return B.interp(_,.5)},B.interp=function(a,_){if(!d(_))throw"n should be a finite number";if(_=_*a.length-.5,_<0)return a[0];if(_>a.length-1)return a[a.length-1];var x=_%1;return x*a[Math.ceil(_)]+(1-x)*a[Math.floor(_)]}},78614:function(z,B,e){var d=e(25075);function P(a){return a?d(a):[0,0,0,1]}z.exports=P},63893:function(z,B,e){var d=e(39898),P=e(71828),a=P.strTranslate,_=e(77922),x=e(18783).LINE_SPACING,v=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;B.convertToTspans=function(G,U,Y){var ee=G.text(),re=!G.attr("data-notex")&&U&&U._context.typesetMath&&typeof MathJax<"u"&&ee.match(v),ie=d.select(G.node().parentNode);if(ie.empty())return;var se=G.attr("class")?G.attr("class").split(" ")[0]:"text";se+="-math",ie.selectAll("svg."+se).remove(),ie.selectAll("g."+se+"-group").remove(),G.style("display",null).attr({"data-unformatted":ee,"data-math":"N"});function ce(){ie.empty()||(se=G.attr("class")+"-math",ie.select("svg."+se).remove()),G.text("").style("white-space","pre");var q=N(G.node(),ee);q&&G.style("pointer-events","all"),B.positionText(G),Y&&Y.call(G)}return re?(U&&U._promises||[]).push(new Promise(function(q){G.style("display","none");var j=parseInt(G.node().style.fontSize,10),Z={fontSize:j};i(re[2],Z,function(Q,ue,fe){ie.selectAll("svg."+se).remove(),ie.selectAll("g."+se+"-group").remove();var te=Q&&Q.select("svg");if(!te||!te.node()){ce(),q();return}var ne=ie.append("g").classed(se+"-group",!0).attr({"pointer-events":"none","data-unformatted":ee,"data-math":"Y"});ne.node().appendChild(te.node()),ue&&ue.node()&&te.node().insertBefore(ue.node().cloneNode(!0),te.node().firstChild);var ve=fe.width,le=fe.height;te.attr({class:se,height:le,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var xe=G.node().style.fill||"black",Se=te.select("g");Se.attr({fill:xe,stroke:xe});var Re=Se.node().getBoundingClientRect(),Ee=Re.width,Oe=Re.height;(Ee>ve||Oe>le)&&(te.style("overflow","hidden"),Re=te.node().getBoundingClientRect(),Ee=Re.width,Oe=Re.height);var Be=+G.attr("x"),Le=+G.attr("y"),Te=j||G.node().getBoundingClientRect().height,De=-Te/4;if(se[0]==="y")ne.attr({transform:"rotate("+[-90,Be,Le]+")"+a(-Ee/2,De-Oe/2)});else if(se[0]==="l")Le=De-Oe/2;else if(se[0]==="a"&&se.indexOf("atitle")!==0)Be=0,Le=De;else{var Ve=G.attr("text-anchor");Be=Be-Ee*(Ve==="middle"?.5:Ve==="end"?1:0),Le=Le+De-Oe/2}te.attr({x:Be,y:Le}),Y&&Y.call(G,ne),q(ne)})})):ce(),G};var y=/(<|&lt;|&#60;)/g,r=/(>|&gt;|&#62;)/g;function n(G){return G.replace(y,"\\lt ").replace(r,"\\gt ")}var u=[["$","$"],["\\(","\\)"]];function i(G,U,Y){var ee=parseInt((MathJax.version||"").split(".")[0]);if(ee!==2&&ee!==3){P.warn("No MathJax version:",MathJax.version);return}var re,ie,se,ce,q=function(){return ie=P.extendDeepAll({},MathJax.Hub.config),se=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:u},displayAlign:"left"})},j=function(){ie=P.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=u},Z=function(){if(re=MathJax.Hub.config.menuSettings.renderer,re!=="SVG")return MathJax.Hub.setRenderer("SVG")},Q=function(){re=MathJax.config.startup.output,re!=="svg"&&(MathJax.config.startup.output="svg")},ue=function(){var xe="math-output-"+P.randstr({},64);ce=d.select("body").append("div").attr({id:xe}).style({visibility:"hidden",position:"absolute","font-size":U.fontSize+"px"}).text(n(G));var Se=ce.node();return ee===2?MathJax.Hub.Typeset(Se):MathJax.typeset([Se])},fe=function(){var xe=ce.select(ee===2?".MathJax_SVG":".MathJax"),Se=!xe.empty()&&ce.select("svg").node();if(!Se)P.log("There was an error in the tex syntax.",G),Y();else{var Re=Se.getBoundingClientRect(),Ee;ee===2?Ee=d.select("body").select("#MathJax_SVG_glyphs"):Ee=xe.select("defs"),Y(xe,Ee,Re)}ce.remove()},te=function(){if(re!=="SVG")return MathJax.Hub.setRenderer(re)},ne=function(){re!=="svg"&&(MathJax.config.startup.output=re)},ve=function(){return se!==void 0&&(MathJax.Hub.processSectionDelay=se),MathJax.Hub.Config(ie)},le=function(){MathJax.config=ie};ee===2?MathJax.Hub.Queue(q,Z,ue,fe,te,ve):ee===3&&(j(),Q(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){ue(),fe(),ne(),le()}))}var f={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"},g={sub:"0.3em",sup:"-0.6em"},h={sub:"-0.21em",sup:"0.42em"},b="​",p=["http:","https:","mailto:","",void 0,":"],E=B.NEWLINES=/(\r\n?|\n)/g,c=/(<[^<>]*>)/,l=/<(\/?)([^ >]*)(\s+(.*))?>/i,m=/<br(\s+.*)?>/i;B.BR_TAG_ALL=/<br(\s+.*)?>/gi;var M=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,L=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,D=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,A=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function C(G,U){if(!G)return null;var Y=G.match(U),ee=Y&&(Y[3]||Y[4]);return ee&&T(ee)}var S=/(^|;)\s*color:/;B.plainText=function(G,U){U=U||{};for(var Y=U.len!==void 0&&U.len!==-1?U.len:1/0,ee=U.allowedTags!==void 0?U.allowedTags:["br"],re="...",ie=re.length,se=G.split(c),ce=[],q="",j=0,Z=0;Z<se.length;Z++){var Q=se[Z],ue=Q.match(l),fe=ue&&ue[2].toLowerCase();if(fe)ee.indexOf(fe)!==-1&&(ce.push(Q),q=fe);else{var te=Q.length;if(j+te<Y)ce.push(Q),j+=te;else if(j<Y){var ne=Y-j;q&&(q!=="br"||ne<=ie||te<=ie)&&ce.pop(),Y>ie?ce.push(Q.substr(0,ne-ie)+re):ce.push(Q.substr(0,ne));break}q=""}}return ce.join("")};var o={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},R=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function T(G){return G.replace(R,function(U,Y){var ee;return Y.charAt(0)==="#"?ee=O(Y.charAt(1)==="x"?parseInt(Y.substr(2),16):parseInt(Y.substr(1),10)):ee=o[Y],ee||U})}B.convertEntities=T;function O(G){if(!(G>1114111)){var U=String.fromCodePoint;if(U)return U(G);var Y=String.fromCharCode;return G<=65535?Y(G):Y((G>>10)+55232,G%1024+56320)}}function N(G,U){U=U.replace(E," ");var Y=!1,ee=[],re,ie=-1;function se(){ie++;var Oe=document.createElementNS(_.svg,"tspan");d.select(Oe).attr({class:"line",dy:ie*x+"em"}),G.appendChild(Oe),re=Oe;var Be=ee;if(ee=[{node:Oe}],Be.length>1)for(var Le=1;Le<Be.length;Le++)ce(Be[Le])}function ce(Oe){var Be=Oe.type,Le={},Te;if(Be==="a"){Te="a";var De=Oe.target,Ve=Oe.href,Ye=Oe.popup;Ve&&(Le={"xlink:xlink:show":De==="_blank"||De.charAt(0)!=="_"?"new":"replace",target:De,"xlink:xlink:href":Ve},Ye&&(Le.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+Ye+'");return false;'))}else Te="tspan";Oe.style&&(Le.style=Oe.style);var Ne=document.createElementNS(_.svg,Te);if(Be==="sup"||Be==="sub"){q(re,b),re.appendChild(Ne);var Xe=document.createElementNS(_.svg,"tspan");q(Xe,b),d.select(Xe).attr("dy",h[Be]),Le.dy=g[Be],re.appendChild(Ne),re.appendChild(Xe)}else re.appendChild(Ne);d.select(Ne).attr(Le),re=Oe.node=Ne,ee.push(Oe)}function q(Oe,Be){Oe.appendChild(document.createTextNode(Be))}function j(Oe){if(ee.length===1){P.log("Ignoring unexpected end tag </"+Oe+">.",U);return}var Be=ee.pop();Oe!==Be.type&&P.log("Start tag <"+Be.type+"> doesnt match end tag <"+Oe+">. Pretending it did match.",U),re=ee[ee.length-1].node}var Z=m.test(U);Z?se():(re=G,ee=[{node:G}]);for(var Q=U.split(c),ue=0;ue<Q.length;ue++){var fe=Q[ue],te=fe.match(l),ne=te&&te[2].toLowerCase(),ve=f[ne];if(ne==="br")se();else if(ve===void 0)q(re,T(fe));else if(te[1])j(ne);else{var le=te[4],xe={type:ne},Se=C(le,M);if(Se?(Se=Se.replace(S,"$1 fill:"),ve&&(Se+=";"+ve)):ve&&(Se=ve),Se&&(xe.style=Se),ne==="a"){Y=!0;var Re=C(le,L);if(Re){var Ee=H(Re);Ee&&(xe.href=Ee,xe.target=C(le,D)||"_blank",xe.popup=C(le,A))}}ce(xe)}}return Y}function H(G){var U=encodeURI(decodeURI(G)),Y=document.createElement("a"),ee=document.createElement("a");Y.href=G,ee.href=U;var re=Y.protocol,ie=ee.protocol;return p.indexOf(re)!==-1&&p.indexOf(ie)!==-1?U:""}B.sanitizeHTML=function(U){U=U.replace(E," ");for(var Y=document.createElement("p"),ee=Y,re=[],ie=U.split(c),se=0;se<ie.length;se++){var ce=ie[se],q=ce.match(l),j=q&&q[2].toLowerCase();if(j in f)if(q[1])re.length&&(ee=re.pop());else{var Z=q[4],Q=C(Z,M),ue=Q?{style:Q}:{};if(j==="a"){var fe=C(Z,L);if(fe){var te=H(fe);if(te){ue.href=te;var ne=C(Z,D);ne&&(ue.target=ne)}}}var ve=document.createElement(j);ee.appendChild(ve),d.select(ve).attr(ue),ee=ve,re.push(ve)}else ee.appendChild(document.createTextNode(T(ce)))}var le="innerHTML";return Y[le]},B.lineCount=function(U){return U.selectAll("tspan.line").size()||1},B.positionText=function(U,Y,ee){return U.each(function(){var re=d.select(this);function ie(q,j){return j===void 0?(j=re.attr(q),j===null&&(re.attr(q,0),j=0)):re.attr(q,j),j}var se=ie("x",Y),ce=ie("y",ee);this.nodeName==="text"&&re.selectAll("tspan.line").attr({x:se,y:ce})})};function k(G,U,Y){var ee=Y.horizontalAlign,re=Y.verticalAlign||"top",ie=G.node().getBoundingClientRect(),se=U.node().getBoundingClientRect(),ce,q,j;return re==="bottom"?q=function(){return ie.bottom-ce.height}:re==="middle"?q=function(){return ie.top+(ie.height-ce.height)/2}:q=function(){return ie.top},ee==="right"?j=function(){return ie.right-ce.width}:ee==="center"?j=function(){return ie.left+(ie.width-ce.width)/2}:j=function(){return ie.left},function(){ce=this.node().getBoundingClientRect();var Z=j()-se.left,Q=q()-se.top,ue=Y.gd||{};if(Y.gd){ue._fullLayout._calcInverseTransform(ue);var fe=P.apply3DTransform(ue._fullLayout._invTransform)(Z,Q);Z=fe[0],Q=fe[1]}return this.style({top:Q+"px",left:Z+"px","z-index":1e3}),this}}var V="1px ";B.makeTextShadow=function(G){var U=V,Y=V,ee=V;return U+Y+ee+G+", -"+U+"-"+Y+ee+G+", "+U+"-"+Y+ee+G+", -"+U+Y+ee+G},B.makeEditable=function(G,U){var Y=U.gd,ee=U.delegate,re=d.dispatch("edit","input","cancel"),ie=ee||G;if(G.style({"pointer-events":ee?"none":"all"}),G.size()!==1)throw new Error("boo");function se(){q(),G.style({opacity:0});var j=ie.attr("class"),Z;j?Z="."+j.split(" ")[0]+"-math-group":Z="[class*=-math-group]",Z&&d.select(G.node().parentNode).select(Z).style({opacity:0})}function ce(j){var Z=j.node(),Q=document.createRange();Q.selectNodeContents(Z);var ue=window.getSelection();ue.removeAllRanges(),ue.addRange(Q),Z.focus()}function q(){var j=d.select(Y),Z=j.select(".svg-container"),Q=Z.append("div"),ue=G.node().style,fe=parseFloat(ue.fontSize||12),te=U.text;te===void 0&&(te=G.attr("data-unformatted")),Q.classed("plugin-editable editable",!0).style({position:"absolute","font-family":ue.fontFamily||"Arial","font-size":fe,color:U.fill||ue.fill||"black",opacity:1,"background-color":U.background||"transparent",outline:"#ffffff33 1px solid",margin:[-fe/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(te).call(k(G,Z,U)).on("blur",function(){Y._editing=!1,G.text(this.textContent).style({opacity:1});var ne=d.select(this).attr("class"),ve;ne?ve="."+ne.split(" ")[0]+"-math-group":ve="[class*=-math-group]",ve&&d.select(G.node().parentNode).select(ve).style({opacity:0});var le=this.textContent;d.select(this).transition().duration(0).remove(),d.select(document).on("mouseup",null),re.edit.call(G,le)}).on("focus",function(){var ne=this;Y._editing=!0,d.select(document).on("mouseup",function(){if(d.event.target===ne)return!1;document.activeElement===Q.node()&&Q.node().blur()})}).on("keyup",function(){d.event.which===27?(Y._editing=!1,G.style({opacity:1}),d.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),re.cancel.call(G,this.textContent)):(re.input.call(G,this.textContent),d.select(this).call(k(G,Z,U)))}).on("keydown",function(){d.event.which===13&&this.blur()}).call(ce)}return U.immediate?se():ie.on("click",se),d.rebind(G,re,"on")}},79990:function(z,B){var e={};B.throttle=function(a,_,x){var v=e[a],y=Date.now();if(!v){for(var r in e)e[r].ts<y-6e4&&delete e[r];v=e[a]={ts:0,timer:null}}d(v);function n(){x(),v.ts=Date.now(),v.onDone&&(v.onDone(),v.onDone=null)}if(y>v.ts+_){n();return}v.timer=setTimeout(function(){n(),v.timer=null},_)},B.done=function(P){var a=e[P];return!a||!a.timer?Promise.resolve():new Promise(function(_){var x=a.onDone;a.onDone=function(){x&&x(),_(),a.onDone=null}})},B.clear=function(P){if(P)d(e[P]),delete e[P];else for(var a in e)B.clear(a)};function d(P){P&&P.timer!==null&&(clearTimeout(P.timer),P.timer=null)}},58163:function(z,B,e){var d=e(92770);z.exports=function(a,_){if(a>0)return Math.log(a)/Math.LN10;var x=Math.log(Math.min(_[0],_[1]))/Math.LN10;return d(x)||(x=Math.log(Math.max(_[0],_[1]))/Math.LN10-6),x}},90973:function(z,B,e){var d=z.exports={},P=e(78776).locationmodeToLayer,a=e(96892).zL;d.getTopojsonName=function(_){return[_.scope.replace(/ /g,"-"),"_",_.resolution.toString(),"m"].join("")},d.getTopojsonPath=function(_,x){return _+x+".json"},d.getTopojsonFeatures=function(_,x){var v=P[_.locationmode],y=x.objects[v];return a(x,y).features}},37815:function(z){z.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},92177:function(z){z.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{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"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},14458:function(z,B,e){var d=e(73972);z.exports=function(a){for(var _=d.layoutArrayContainers,x=d.layoutArrayRegexes,v=a.split("[")[0],y,r,n=0;n<x.length;n++)if(r=a.match(x[n]),r&&r.index===0){y=r[0];break}if(y||(y=_[_.indexOf(v)]),!y)return!1;var u=a.substr(y.length);return u?(r=u.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/),r?{array:y,index:Number(r[1]),property:r[3]||""}:!1):{array:y,index:"",property:""}}},30962:function(z,B,e){var d=e(71828),P=d.extendFlat,a=d.isPlainObject,_={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},x={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},v=_.flags.slice().concat(["fullReplot"]),y=x.flags.slice().concat("layoutReplot");z.exports={traces:_,layout:x,traceFlags:function(){return r(v)},layoutFlags:function(){return r(y)},update:function(i,f){var g=f.editType;if(g&&g!=="none")for(var h=g.split("+"),b=0;b<h.length;b++)i[h[b]]=!0},overrideAll:n};function r(i){for(var f={},g=0;g<i.length;g++)f[i[g]]=!1;return f}function n(i,f,g){var h=P({},i);for(var b in h){var p=h[b];a(p)&&(h[b]=u(p,f,g,b))}return g==="from-root"&&(h.editType=f),h}function u(i,f,g,h){if(i.valType){var b=P({},i);if(b.editType=f,Array.isArray(i.items)){b.items=new Array(i.items.length);for(var p=0;p<i.items.length;p++)b.items[p]=u(i.items[p],f)}return b}else return n(i,f,h.charAt(0)==="_"?"nested":"from-root")}},58377:function(z,B,e){var d=e(92770),P=e(27812),a=e(73972),_=e(71828),x=e(74875),v=e(41675),y=e(7901),r=v.cleanId,n=v.getFromTrace,u=a.traceIs;B.clearPromiseQueue=function(m){Array.isArray(m._promises)&&m._promises.length>0&&_.log("Clearing previous rejected promises from queue."),m._promises=[]},B.cleanLayout=function(m){var M,L;m||(m={}),m.xaxis1&&(m.xaxis||(m.xaxis=m.xaxis1),delete m.xaxis1),m.yaxis1&&(m.yaxis||(m.yaxis=m.yaxis1),delete m.yaxis1),m.scene1&&(m.scene||(m.scene=m.scene1),delete m.scene1);var D=(x.subplotsRegistry.cartesian||{}).attrRegex,A=(x.subplotsRegistry.polar||{}).attrRegex,C=(x.subplotsRegistry.ternary||{}).attrRegex,S=(x.subplotsRegistry.gl3d||{}).attrRegex,o=Object.keys(m);for(M=0;M<o.length;M++){var R=o[M];if(D&&D.test(R)){var T=m[R];T.anchor&&T.anchor!=="free"&&(T.anchor=r(T.anchor)),T.overlaying&&(T.overlaying=r(T.overlaying)),T.type||(T.isdate?T.type="date":T.islog?T.type="log":T.isdate===!1&&T.islog===!1&&(T.type="linear")),(T.autorange==="withzero"||T.autorange==="tozero")&&(T.autorange=!0,T.rangemode="tozero"),delete T.islog,delete T.isdate,delete T.categories,p(T,"domain")&&delete T.domain,T.autotick!==void 0&&(T.tickmode===void 0&&(T.tickmode=T.autotick?"auto":"linear"),delete T.autotick),f(T)}else if(A&&A.test(R)){var O=m[R];f(O.radialaxis)}else if(C&&C.test(R)){var N=m[R];f(N.aaxis),f(N.baxis),f(N.caxis)}else if(S&&S.test(R)){var H=m[R],k=H.cameraposition;if(Array.isArray(k)&&k[0].length===4){var V=k[0],G=k[1],U=k[2],Y=P([],V),ee=[];for(L=0;L<3;++L)ee[L]=G[L]+U*Y[2+4*L];H.camera={eye:{x:ee[0],y:ee[1],z:ee[2]},center:{x:G[0],y:G[1],z:G[2]},up:{x:0,y:0,z:1}},delete H.cameraposition}f(H.xaxis),f(H.yaxis),f(H.zaxis)}}var re=Array.isArray(m.annotations)?m.annotations.length:0;for(M=0;M<re;M++){var ie=m.annotations[M];_.isPlainObject(ie)&&(ie.ref&&(ie.ref==="paper"?(ie.xref="paper",ie.yref="paper"):ie.ref==="data"&&(ie.xref="x",ie.yref="y"),delete ie.ref),i(ie,"xref"),i(ie,"yref"))}var se=Array.isArray(m.shapes)?m.shapes.length:0;for(M=0;M<se;M++){var ce=m.shapes[M];_.isPlainObject(ce)&&(i(ce,"xref"),i(ce,"yref"))}var q=Array.isArray(m.images)?m.images.length:0;for(M=0;M<q;M++){var j=m.images[M];_.isPlainObject(j)&&(i(j,"xref"),i(j,"yref"))}var Z=m.legend;return Z&&(Z.x>3?(Z.x=1.02,Z.xanchor="left"):Z.x<-2&&(Z.x=-.02,Z.xanchor="right"),Z.y>3?(Z.y=1.02,Z.yanchor="bottom"):Z.y<-2&&(Z.y=-.02,Z.yanchor="top")),f(m),m.dragmode==="rotate"&&(m.dragmode="orbit"),y.clean(m),m.template&&m.template.layout&&B.cleanLayout(m.template.layout),m};function i(m,M){var L=m[M],D=M.charAt(0);L&&L!=="paper"&&(m[M]=r(L,D,!0))}function f(m){m&&((typeof m.title=="string"||typeof m.title=="number")&&(m.title={text:m.title}),M("titlefont","font"),M("titleposition","position"),M("titleside","side"),M("titleoffset","offset"));function M(L,D){var A=m[L],C=m.title&&m.title[D];A&&!C&&(m.title||(m.title={}),m.title[D]=m[L],delete m[L])}}B.cleanData=function(m){for(var M=0;M<m.length;M++){var L=m[M],D;if(L.type==="histogramy"&&"xbins"in L&&!("ybins"in L)&&(L.ybins=L.xbins,delete L.xbins),L.error_y&&"opacity"in L.error_y){var A=y.defaults,C=L.error_y.color||(u(L,"bar")?y.defaultLine:A[M%A.length]);L.error_y.color=y.addOpacity(y.rgb(C),y.opacity(C)*L.error_y.opacity),delete L.error_y.opacity}if("bardir"in L&&(L.bardir==="h"&&(u(L,"bar")||L.type.substr(0,9)==="histogram")&&(L.orientation="h",B.swapXYData(L)),delete L.bardir),L.type==="histogramy"&&B.swapXYData(L),(L.type==="histogramx"||L.type==="histogramy")&&(L.type="histogram"),"scl"in L&&!("colorscale"in L)&&(L.colorscale=L.scl,delete L.scl),"reversescl"in L&&!("reversescale"in L)&&(L.reversescale=L.reversescl,delete L.reversescl),L.xaxis&&(L.xaxis=r(L.xaxis,"x")),L.yaxis&&(L.yaxis=r(L.yaxis,"y")),u(L,"gl3d")&&L.scene&&(L.scene=x.subplotsRegistry.gl3d.cleanId(L.scene)),!u(L,"pie-like")&&!u(L,"bar-like"))if(Array.isArray(L.textposition))for(D=0;D<L.textposition.length;D++)L.textposition[D]=b(L.textposition[D]);else L.textposition&&(L.textposition=b(L.textposition));var S=a.getModule(L);if(S&&S.colorbar){var o=S.colorbar.container,R=o?L[o]:L;R&&R.colorscale&&(R.colorscale==="YIGnBu"&&(R.colorscale="YlGnBu"),R.colorscale==="YIOrRd"&&(R.colorscale="YlOrRd"))}if(L.type==="surface"&&_.isPlainObject(L.contours)){var T=["x","y","z"];for(D=0;D<T.length;D++){var O=L.contours[T[D]];_.isPlainObject(O)&&(O.highlightColor&&(O.highlightcolor=O.highlightColor,delete O.highlightColor),O.highlightWidth&&(O.highlightwidth=O.highlightWidth,delete O.highlightWidth))}}if(L.type==="candlestick"||L.type==="ohlc"){var N=(L.increasing||{}).showlegend!==!1,H=(L.decreasing||{}).showlegend!==!1,k=g(L.increasing),V=g(L.decreasing);if(k!==!1&&V!==!1){var G=h(k,V,N,H);G&&(L.name=G)}else(k||V)&&!L.name&&(L.name=k||V)}if(Array.isArray(L.transforms)){var U=L.transforms;for(D=0;D<U.length;D++){var Y=U[D];if(_.isPlainObject(Y))switch(Y.type){case"filter":Y.filtersrc&&(Y.target=Y.filtersrc,delete Y.filtersrc),Y.calendar&&(Y.valuecalendar||(Y.valuecalendar=Y.calendar),delete Y.calendar);break;case"groupby":if(Y.styles=Y.styles||Y.style,Y.styles&&!Array.isArray(Y.styles)){var ee=Y.styles,re=Object.keys(ee);Y.styles=[];for(var ie=0;ie<re.length;ie++)Y.styles.push({target:re[ie],value:ee[re[ie]]})}break}}}p(L,"line")&&delete L.line,"marker"in L&&(p(L.marker,"line")&&delete L.marker.line,p(L,"marker")&&delete L.marker),y.clean(L),L.autobinx&&(delete L.autobinx,delete L.xbins),L.autobiny&&(delete L.autobiny,delete L.ybins),f(L),L.colorbar&&f(L.colorbar),L.marker&&L.marker.colorbar&&f(L.marker.colorbar),L.line&&L.line.colorbar&&f(L.line.colorbar),L.aaxis&&f(L.aaxis),L.baxis&&f(L.baxis)}};function g(m){if(!_.isPlainObject(m))return!1;var M=m.name;return delete m.name,delete m.showlegend,(typeof M=="string"||typeof M=="number")&&String(M)}function h(m,M,L,D){if(L&&!D)return m;if(D&&!L||!m.trim())return M;if(!M.trim())return m;var A=Math.min(m.length,M.length),C;for(C=0;C<A&&m.charAt(C)===M.charAt(C);C++);var S=m.substr(0,C);return S.trim()}function b(m){var M="middle",L="center";return typeof m=="string"&&(m.indexOf("top")!==-1?M="top":m.indexOf("bottom")!==-1&&(M="bottom"),m.indexOf("left")!==-1?L="left":m.indexOf("right")!==-1&&(L="right")),M+" "+L}function p(m,M){return M in m&&typeof m[M]=="object"&&Object.keys(m[M]).length===0}B.swapXYData=function(m){var M;if(_.swapAttrs(m,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(m.z)&&Array.isArray(m.z[0])&&(m.transpose?delete m.transpose:m.transpose=!0),m.error_x&&m.error_y){var L=m.error_y,D="copy_ystyle"in L?L.copy_ystyle:!(L.color||L.thickness||L.width);_.swapAttrs(m,["error_?.copy_ystyle"]),D&&_.swapAttrs(m,["error_?.color","error_?.thickness","error_?.width"])}if(typeof m.hoverinfo=="string"){var A=m.hoverinfo.split("+");for(M=0;M<A.length;M++)A[M]==="x"?A[M]="y":A[M]==="y"&&(A[M]="x");m.hoverinfo=A.join("+")}},B.coerceTraceIndices=function(m,M){if(d(M))return[M];if(!Array.isArray(M)||!M.length)return m.data.map(function(A,C){return C});if(Array.isArray(M)){for(var L=[],D=0;D<M.length;D++)_.isIndex(M[D],m.data.length)?L.push(M[D]):_.warn("trace index (",M[D],") is not a number or is out of bounds");return L}return M},B.manageArrayContainers=function(m,M,L){var D=m.obj,A=m.parts,C=A.length,S=A[C-1],o=d(S);if(o&&M===null){var R=A.slice(0,C-1).join("."),T=_.nestedProperty(D,R).get();T.splice(S,1)}else o&&m.get()===void 0&&m.get()===void 0&&(L[m.astr]=null),m.set(M)};var E=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function c(m){var M=m.search(E);if(M>0)return m.substr(0,M)}B.hasParent=function(m,M){for(var L=c(M);L;){if(L in m)return!0;L=c(L)}return!1};var l=["x","y","z"];B.clearAxisTypes=function(m,M,L){for(var D=0;D<M.length;D++)for(var A=m._fullData[D],C=0;C<3;C++){var S=n(m,A,l[C]);if(S&&S.type!=="log"){var o=S._name,R=S._id.substr(1);if(R.substr(0,5)==="scene"){if(L[R]!==void 0)continue;o=R+"."+o}var T=o+".type";L[o]===void 0&&L[T]===void 0&&_.nestedProperty(m.layout,T).set(null)}}}},10641:function(z,B,e){var d=e(72391);B._doPlot=d._doPlot,B.newPlot=d.newPlot,B.restyle=d.restyle,B.relayout=d.relayout,B.redraw=d.redraw,B.update=d.update,B._guiRestyle=d._guiRestyle,B._guiRelayout=d._guiRelayout,B._guiUpdate=d._guiUpdate,B._storeDirectGUIEdit=d._storeDirectGUIEdit,B.react=d.react,B.extendTraces=d.extendTraces,B.prependTraces=d.prependTraces,B.addTraces=d.addTraces,B.deleteTraces=d.deleteTraces,B.moveTraces=d.moveTraces,B.purge=d.purge,B.addFrames=d.addFrames,B.deleteFrames=d.deleteFrames,B.animate=d.animate,B.setPlotConfig=d.setPlotConfig,B.toImage=e(403),B.validate=e(84936),B.downloadImage=e(7239);var P=e(96318);B.makeTemplate=P.makeTemplate,B.validateTemplate=P.validateTemplate},6611:function(z,B,e){var d=e(41965),P=e(64213),a=e(47769),_=e(65888).sorterAsc,x=e(73972);B.containerArrayMatch=e(14458);var v=B.isAddVal=function(n){return n==="add"||d(n)},y=B.isRemoveVal=function(n){return n===null||n==="remove"};B.applyContainerArrayChanges=function(n,u,i,f,g){var h=u.astr,b=x.getComponentMethod(h,"supplyLayoutDefaults"),p=x.getComponentMethod(h,"draw"),E=x.getComponentMethod(h,"drawOne"),c=f.replot||f.recalc||b===P||p===P,l=n.layout,m=n._fullLayout;if(i[""]){Object.keys(i).length>1&&a.warn("Full array edits are incompatible with other edits",h);var M=i[""][""];if(y(M))u.set(null);else if(Array.isArray(M))u.set(M);else return a.warn("Unrecognized full array edit value",h,M),!0;return c?!1:(b(l,m),p(n),!0)}var L=Object.keys(i).map(Number).sort(_),D=u.get(),A=D||[],C=g(m,h).get(),S=[],o=-1,R=A.length,T,O,N,H,k,V,G,U;for(T=0;T<L.length;T++){if(N=L[T],H=i[N],k=Object.keys(H),V=H[""],G=v(V),N<0||N>A.length-(G?0:1)){a.warn("index out of range",h,N);continue}if(V!==void 0)k.length>1&&a.warn("Insertion & removal are incompatible with edits to the same index.",h,N),y(V)?S.push(N):G?(V==="add"&&(V={}),A.splice(N,0,V),C&&C.splice(N,0,{})):a.warn("Unrecognized full object edit value",h,N,V),o===-1&&(o=N);else for(O=0;O<k.length;O++)U=h+"["+N+"].",g(A[N],k[O],U).set(H[k[O]])}for(T=S.length-1;T>=0;T--)A.splice(S[T],1),C&&C.splice(S[T],1);if(A.length?D||u.set(A):u.set(null),c)return!1;if(b(l,m),E!==P){var Y;if(o===-1)Y=L;else{for(R=Math.max(A.length,R),Y=[],T=0;T<L.length&&(N=L[T],!(N>=o));T++)Y.push(N);for(T=o;T<R;T++)Y.push(T)}for(T=0;T<Y.length;T++)E(n,Y[T])}else p(n);return!0}},72391:function(z,B,e){var d=e(39898),P=e(92770),a=e(57035),_=e(71828),x=_.nestedProperty,v=e(11086),y=e(10847),r=e(73972),n=e(86281),u=e(74875),i=e(89298),f=e(91424),g=e(7901),h=e(4305).initInteractions,b=e(77922),p=e(47322).clearOutline,E=e(72075).dfltConfig,c=e(6611),l=e(58377),m=e(61549),M=e(30962),L=e(85555).AX_NAME_PATTERN,D=0,A=5;function C(pe,we,Ae,Pe){var Ge;if(pe=_.getGraphDiv(pe),v.init(pe),_.isPlainObject(we)){var We=we;we=We.data,Ae=We.layout,Pe=We.config,Ge=We.frames}var tt=v.triggerHandler(pe,"plotly_beforeplot",[we,Ae,Pe]);if(tt===!1)return Promise.reject();!we&&!Ae&&!_.isPlotDiv(pe)&&_.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",pe);function ct(){if(Ge)return B.addFrames(pe,Ge)}O(pe,Pe),Ae||(Ae={}),d.select(pe).classed("js-plotly-plot",!0),f.makeTester(),Array.isArray(pe._promises)||(pe._promises=[]);var St=(pe.data||[]).length===0&&Array.isArray(we);Array.isArray(we)&&(l.cleanData(we),St?pe.data=we:pe.data.push.apply(pe.data,we),pe.empty=!1),(!pe.layout||St)&&(pe.layout=l.cleanLayout(Ae)),u.supplyDefaults(pe);var Pt=pe._fullLayout,wt=Pt._has("cartesian");Pt._replotting=!0,(St||Pt._shouldCreateBgLayer)&&(Ce(pe),Pt._shouldCreateBgLayer&&delete Pt._shouldCreateBgLayer),f.initGradients(pe),f.initPatterns(pe),St&&i.saveShowSpikeInitial(pe);var Bt=!pe.calcdata||pe.calcdata.length!==(pe._fullData||[]).length;Bt&&u.doCalcdata(pe);for(var Wt=0;Wt<pe.calcdata.length;Wt++)pe.calcdata[Wt][0].trace=pe._fullData[Wt];pe._context.responsive?pe._responsiveChartHandler||(pe._responsiveChartHandler=function(){_.isHidden(pe)||u.resize(pe)},window.addEventListener("resize",pe._responsiveChartHandler)):_.clearResponsive(pe);var hr=_.extendFlat({},Pt._size),gt=0;function jt(){for(var Nt=Pt._basePlotModules,Vt=0;Vt<Nt.length;Vt++)Nt[Vt].drawFramework&&Nt[Vt].drawFramework(pe);!Pt._glcanvas&&Pt._has("gl")&&(Pt._glcanvas=Pt._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],function(nr){return nr.key}),Pt._glcanvas.enter().append("canvas").attr("class",function(nr){return"gl-canvas gl-canvas-"+nr.key.replace("Layer","")}).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var Zt=pe._context.plotGlPixelRatio;if(Pt._glcanvas){Pt._glcanvas.attr("width",Pt.width*Zt).attr("height",Pt.height*Zt).style("width",Pt.width+"px").style("height",Pt.height+"px");var qt=Pt._glcanvas.data()[0].regl;if(qt&&(Math.floor(Pt.width*Zt)!==qt._gl.drawingBufferWidth||Math.floor(Pt.height*Zt)!==qt._gl.drawingBufferHeight)){var Jt="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(gt)_.error(Jt);else return _.log(Jt+" Clearing graph and plotting again."),u.cleanPlot([],{},pe._fullData,Pt),u.supplyDefaults(pe),Pt=pe._fullLayout,u.doCalcdata(pe),gt++,jt()}}return Pt.modebar.orientation==="h"?Pt._modebardiv.style("height",null).style("width","100%"):Pt._modebardiv.style("width",null).style("height",Pt.height+"px"),u.previousPromises(pe)}function Ut(){if(u.clearAutoMarginIds(pe),m.drawMarginPushers(pe),i.allowAutoMargin(pe),Pt._has("pie"))for(var Nt=pe._fullData,Vt=0;Vt<Nt.length;Vt++){var Zt=Nt[Vt];Zt.type==="pie"&&Zt.automargin&&u.allowAutoMargin(pe,"pie."+Zt.uid+".automargin")}return u.doAutoMargin(pe),u.previousPromises(pe)}function or(){if(u.didMarginChange(hr,Pt._size))return _.syncOrAsync([Ut,m.layoutStyles],pe)}function ur(){if(!Bt){dt();return}return _.syncOrAsync([r.getComponentMethod("shapes","calcAutorange"),r.getComponentMethod("annotations","calcAutorange"),dt],pe)}function dt(){pe._transitioning||(m.doAutoRangeAndConstraints(pe),St&&i.saveRangeInitial(pe),r.getComponentMethod("rangeslider","calcAutorange")(pe))}function ut(){return i.draw(pe,St?"":"redraw")}var yt=[u.previousPromises,ct,jt,Ut,or];wt&&yt.push(ur),yt.push(m.layoutStyles),wt&&yt.push(ut,function(Vt){Vt._fullLayout._insideTickLabelsAutorange&&xe(Vt,Vt._fullLayout._insideTickLabelsAutorange).then(function(){Vt._fullLayout._insideTickLabelsAutorange=void 0})}),yt.push(m.drawData,m.finalDraw,h,u.addLinks,u.rehover,u.redrag,u.reselect,u.doAutoMargin,Lt,u.previousPromises);function Lt(Nt){Nt._fullLayout._insideTickLabelsAutorange&&St&&i.saveRangeInitial(Nt,!0)}var Rt=_.syncOrAsync(yt,pe);return(!Rt||!Rt.then)&&(Rt=Promise.resolve()),Rt.then(function(){return S(pe),pe})}function S(pe){var we=pe._fullLayout;we._redrawFromAutoMarginCount?we._redrawFromAutoMarginCount--:pe.emit("plotly_afterplot")}function o(pe){return _.extendFlat(E,pe)}function R(pe,we){try{pe._fullLayout._paper.style("background",we)}catch(Ae){_.error(Ae)}}function T(pe,we){var Ae=g.combine(we,"white");R(pe,Ae)}function O(pe,we){if(!pe._context){pe._context=_.extendDeep({},E);var Ae=d.select("base");pe._context._baseUrl=Ae.size()&&Ae.attr("href")?window.location.href.split("#")[0]:""}var Pe=pe._context,Ge,We,tt;if(we){for(We=Object.keys(we),Ge=0;Ge<We.length;Ge++)tt=We[Ge],!(tt==="editable"||tt==="edits")&&tt in Pe&&(tt==="setBackground"&&we[tt]==="opaque"?Pe[tt]=T:Pe[tt]=we[tt]);we.plot3dPixelRatio&&!Pe.plotGlPixelRatio&&(Pe.plotGlPixelRatio=Pe.plot3dPixelRatio);var ct=we.editable;if(ct!==void 0)for(Pe.editable=ct,We=Object.keys(Pe.edits),Ge=0;Ge<We.length;Ge++)Pe.edits[We[Ge]]=ct;if(we.edits)for(We=Object.keys(we.edits),Ge=0;Ge<We.length;Ge++)tt=We[Ge],tt in Pe.edits&&(Pe.edits[tt]=we.edits[tt]);Pe._exportedPlot=we._exportedPlot}Pe.staticPlot&&(Pe.editable=!1,Pe.edits={},Pe.autosizable=!1,Pe.scrollZoom=!1,Pe.doubleClick=!1,Pe.showTips=!1,Pe.showLink=!1,Pe.displayModeBar=!1),Pe.displayModeBar==="hover"&&!a&&(Pe.displayModeBar=!0),(Pe.setBackground==="transparent"||typeof Pe.setBackground!="function")&&(Pe.setBackground=R),Pe._hasZeroHeight=Pe._hasZeroHeight||pe.clientHeight===0,Pe._hasZeroWidth=Pe._hasZeroWidth||pe.clientWidth===0;var St=Pe.scrollZoom,Pt=Pe._scrollZoom={};if(St===!0)Pt.cartesian=1,Pt.gl3d=1,Pt.geo=1,Pt.mapbox=1;else if(typeof St=="string"){var wt=St.split("+");for(Ge=0;Ge<wt.length;Ge++)Pt[wt[Ge]]=1}else St!==!1&&(Pt.gl3d=1,Pt.geo=1,Pt.mapbox=1)}function N(pe){if(pe=_.getGraphDiv(pe),!_.isPlotDiv(pe))throw new Error("This element is not a Plotly plot: "+pe);return l.cleanData(pe.data),l.cleanLayout(pe.layout),pe.calcdata=void 0,B._doPlot(pe).then(function(){return pe.emit("plotly_redraw"),pe})}function H(pe,we,Ae,Pe){return pe=_.getGraphDiv(pe),u.cleanPlot([],{},pe._fullData||[],pe._fullLayout||{}),u.purge(pe),B._doPlot(pe,we,Ae,Pe)}function k(pe,we){var Ae=we+1,Pe=[],Ge,We;for(Ge=0;Ge<pe.length;Ge++)We=pe[Ge],We<0?Pe.push(Ae+We):Pe.push(We);return Pe}function V(pe,we,Ae){var Pe,Ge;for(Pe=0;Pe<we.length;Pe++){if(Ge=we[Pe],Ge!==parseInt(Ge,10))throw new Error("all values in "+Ae+" must be integers");if(Ge>=pe.data.length||Ge<-pe.data.length)throw new Error(Ae+" must be valid indices for gd.data.");if(we.indexOf(Ge,Pe+1)>-1||Ge>=0&&we.indexOf(-pe.data.length+Ge)>-1||Ge<0&&we.indexOf(pe.data.length+Ge)>-1)throw new Error("each index in "+Ae+" must be unique.")}}function G(pe,we,Ae){if(!Array.isArray(pe.data))throw new Error("gd.data must be an array.");if(typeof we>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(we)||(we=[we]),V(pe,we,"currentIndices"),typeof Ae<"u"&&!Array.isArray(Ae)&&(Ae=[Ae]),typeof Ae<"u"&&V(pe,Ae,"newIndices"),typeof Ae<"u"&&we.length!==Ae.length)throw new Error("current and new indices must be of equal length.")}function U(pe,we,Ae){var Pe,Ge;if(!Array.isArray(pe.data))throw new Error("gd.data must be an array.");if(typeof we>"u")throw new Error("traces must be defined.");for(Array.isArray(we)||(we=[we]),Pe=0;Pe<we.length;Pe++)if(Ge=we[Pe],typeof Ge!="object"||Array.isArray(Ge)||Ge===null)throw new Error("all values in traces array must be non-array objects");if(typeof Ae<"u"&&!Array.isArray(Ae)&&(Ae=[Ae]),typeof Ae<"u"&&Ae.length!==we.length)throw new Error("if indices is specified, traces.length must equal indices.length")}function Y(pe,we,Ae,Pe){var Ge=_.isPlainObject(Pe);if(!Array.isArray(pe.data))throw new Error("gd.data must be an array");if(!_.isPlainObject(we))throw new Error("update must be a key:value object");if(typeof Ae>"u")throw new Error("indices must be an integer or array of integers");V(pe,Ae,"indices");for(var We in we){if(!Array.isArray(we[We])||we[We].length!==Ae.length)throw new Error("attribute "+We+" must be an array of length equal to indices array length");if(Ge&&(!(We in Pe)||!Array.isArray(Pe[We])||Pe[We].length!==we[We].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 ee(pe,we,Ae,Pe){var Ge=_.isPlainObject(Pe),We=[],tt,ct,St,Pt,wt;Array.isArray(Ae)||(Ae=[Ae]),Ae=k(Ae,pe.data.length-1);for(var Bt in we)for(var Wt=0;Wt<Ae.length;Wt++){if(tt=pe.data[Ae[Wt]],St=x(tt,Bt),ct=St.get(),Pt=we[Bt][Wt],!_.isArrayOrTypedArray(Pt))throw new Error("attribute: "+Bt+" index: "+Wt+" must be an array");if(!_.isArrayOrTypedArray(ct))throw new Error("cannot extend missing or non-array attribute: "+Bt);if(ct.constructor!==Pt.constructor)throw new Error("cannot extend array with an array of a different type: "+Bt);wt=Ge?Pe[Bt][Wt]:Pe,P(wt)||(wt=-1),We.push({prop:St,target:ct,insert:Pt,maxp:Math.floor(wt)})}return We}function re(pe,we,Ae,Pe,Ge){Y(pe,we,Ae,Pe);for(var We=ee(pe,we,Ae,Pe),tt={},ct={},St=0;St<We.length;St++){var Pt=We[St].prop,wt=We[St].maxp,Bt=Ge(We[St].target,We[St].insert,wt);Pt.set(Bt[0]),Array.isArray(tt[Pt.astr])||(tt[Pt.astr]=[]),tt[Pt.astr].push(Bt[1]),Array.isArray(ct[Pt.astr])||(ct[Pt.astr]=[]),ct[Pt.astr].push(We[St].target.length)}return{update:tt,maxPoints:ct}}function ie(pe,we){var Ae=new pe.constructor(pe.length+we.length);return Ae.set(pe),Ae.set(we,pe.length),Ae}function se(pe,we,Ae,Pe){pe=_.getGraphDiv(pe);function Ge(St,Pt,wt){var Bt,Wt;if(_.isTypedArray(St))if(wt<0){var hr=new St.constructor(0),gt=ie(St,Pt);wt<0?(Bt=gt,Wt=hr):(Bt=hr,Wt=gt)}else if(Bt=new St.constructor(wt),Wt=new St.constructor(St.length+Pt.length-wt),wt===Pt.length)Bt.set(Pt),Wt.set(St);else if(wt<Pt.length){var jt=Pt.length-wt;Bt.set(Pt.subarray(jt)),Wt.set(St),Wt.set(Pt.subarray(0,jt),St.length)}else{var Ut=wt-Pt.length,or=St.length-Ut;Bt.set(St.subarray(or)),Bt.set(Pt,Ut),Wt.set(St.subarray(0,or))}else Bt=St.concat(Pt),Wt=wt>=0&&wt<Bt.length?Bt.splice(0,Bt.length-wt):[];return[Bt,Wt]}var We=re(pe,we,Ae,Pe,Ge),tt=B.redraw(pe),ct=[pe,We.update,Ae,We.maxPoints];return y.add(pe,B.prependTraces,ct,se,arguments),tt}function ce(pe,we,Ae,Pe){pe=_.getGraphDiv(pe);function Ge(St,Pt,wt){var Bt,Wt;if(_.isTypedArray(St))if(wt<=0){var hr=new St.constructor(0),gt=ie(Pt,St);wt<0?(Bt=gt,Wt=hr):(Bt=hr,Wt=gt)}else if(Bt=new St.constructor(wt),Wt=new St.constructor(St.length+Pt.length-wt),wt===Pt.length)Bt.set(Pt),Wt.set(St);else if(wt<Pt.length){var jt=Pt.length-wt;Bt.set(Pt.subarray(0,jt)),Wt.set(Pt.subarray(jt)),Wt.set(St,jt)}else{var Ut=wt-Pt.length;Bt.set(Pt),Bt.set(St.subarray(0,Ut),Pt.length),Wt.set(St.subarray(Ut))}else Bt=Pt.concat(St),Wt=wt>=0&&wt<Bt.length?Bt.splice(wt,Bt.length):[];return[Bt,Wt]}var We=re(pe,we,Ae,Pe,Ge),tt=B.redraw(pe),ct=[pe,We.update,Ae,We.maxPoints];return y.add(pe,B.extendTraces,ct,ce,arguments),tt}function q(pe,we,Ae){pe=_.getGraphDiv(pe);var Pe=[],Ge=B.deleteTraces,We=q,tt=[pe,Pe],ct=[pe,we],St,Pt;for(U(pe,we,Ae),Array.isArray(we)||(we=[we]),we=we.map(function(wt){return _.extendFlat({},wt)}),l.cleanData(we),St=0;St<we.length;St++)pe.data.push(we[St]);for(St=0;St<we.length;St++)Pe.push(-we.length+St);if(typeof Ae>"u")return Pt=B.redraw(pe),y.add(pe,Ge,tt,We,ct),Pt;Array.isArray(Ae)||(Ae=[Ae]);try{G(pe,Pe,Ae)}catch(wt){throw pe.data.splice(pe.data.length-we.length,we.length),wt}return y.startSequence(pe),y.add(pe,Ge,tt,We,ct),Pt=B.moveTraces(pe,Pe,Ae),y.stopSequence(pe),Pt}function j(pe,we){pe=_.getGraphDiv(pe);var Ae=[],Pe=B.addTraces,Ge=j,We=[pe,Ae,we],tt=[pe,we],ct,St;if(typeof we>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(we)||(we=[we]),V(pe,we,"indices"),we=k(we,pe.data.length-1),we.sort(_.sorterDes),ct=0;ct<we.length;ct+=1)St=pe.data.splice(we[ct],1)[0],Ae.push(St);var Pt=B.redraw(pe);return y.add(pe,Pe,We,Ge,tt),Pt}function Z(pe,we,Ae){pe=_.getGraphDiv(pe);var Pe=[],Ge=[],We=Z,tt=Z,ct=[pe,Ae,we],St=[pe,we,Ae],Pt;if(G(pe,we,Ae),we=Array.isArray(we)?we:[we],typeof Ae>"u")for(Ae=[],Pt=0;Pt<we.length;Pt++)Ae.push(-we.length+Pt);for(Ae=Array.isArray(Ae)?Ae:[Ae],we=k(we,pe.data.length-1),Ae=k(Ae,pe.data.length-1),Pt=0;Pt<pe.data.length;Pt++)we.indexOf(Pt)===-1&&Pe.push(pe.data[Pt]);for(Pt=0;Pt<we.length;Pt++)Ge.push({newIndex:Ae[Pt],trace:pe.data[we[Pt]]});for(Ge.sort(function(Bt,Wt){return Bt.newIndex-Wt.newIndex}),Pt=0;Pt<Ge.length;Pt+=1)Pe.splice(Ge[Pt].newIndex,0,Ge[Pt].trace);pe.data=Pe;var wt=B.redraw(pe);return y.add(pe,We,ct,tt,St),wt}function Q(pe,we,Ae,Pe){pe=_.getGraphDiv(pe),l.clearPromiseQueue(pe);var Ge={};if(typeof we=="string")Ge[we]=Ae;else if(_.isPlainObject(we))Ge=_.extendFlat({},we),Pe===void 0&&(Pe=Ae);else return _.warn("Restyle fail.",we,Ae,Pe),Promise.reject();Object.keys(Ge).length&&(pe.changed=!0);var We=l.coerceTraceIndices(pe,Pe),tt=ve(pe,Ge,We),ct=tt.flags;ct.calc&&(pe.calcdata=void 0),ct.clearAxisTypes&&l.clearAxisTypes(pe,We,{});var St=[];ct.fullReplot?St.push(B._doPlot):(St.push(u.previousPromises),u.supplyDefaults(pe),ct.markerSize&&(u.doCalcdata(pe),Re(St)),ct.style&&St.push(m.doTraceStyle),ct.colorbars&&St.push(m.doColorBars),St.push(S)),St.push(u.rehover,u.redrag,u.reselect),y.add(pe,Q,[pe,tt.undoit,tt.traces],Q,[pe,tt.redoit,tt.traces]);var Pt=_.syncOrAsync(St,pe);return(!Pt||!Pt.then)&&(Pt=Promise.resolve()),Pt.then(function(){return pe.emit("plotly_restyle",tt.eventData),pe})}function ue(pe){return pe===void 0?null:pe}function fe(pe,we){return we?function(Ae,Pe,Ge){var We=x(Ae,Pe),tt=We.set;return We.set=function(ct){var St=(Ge||"")+Pe;te(St,We.get(),ct,pe),tt(ct)},We}:x}function te(pe,we,Ae,Pe){if(Array.isArray(we)||Array.isArray(Ae))for(var Ge=Array.isArray(we)?we:[],We=Array.isArray(Ae)?Ae:[],tt=Math.max(Ge.length,We.length),ct=0;ct<tt;ct++)te(pe+"["+ct+"]",Ge[ct],We[ct],Pe);else if(_.isPlainObject(we)||_.isPlainObject(Ae)){var St=_.isPlainObject(we)?we:{},Pt=_.isPlainObject(Ae)?Ae:{},wt=_.extendFlat({},St,Pt);for(var Bt in wt)te(pe+"."+Bt,St[Bt],Pt[Bt],Pe)}else Pe[pe]===void 0&&(Pe[pe]=ue(we))}function ne(pe,we,Ae){for(var Pe in Ae){var Ge=x(pe,Pe);te(Pe,Ge.get(),Ae[Pe],we)}}function ve(pe,we,Ae){var Pe=pe._fullLayout,Ge=pe._fullData,We=pe.data,tt=Pe._guiEditing,ct=fe(Pe._preGUI,tt),St=_.extendDeepAll({},we),Pt;le(we);var wt=M.traceFlags(),Bt={},Wt={},hr;function gt(){return Ae.map(function(){})}function jt(Jr){var xn=i.id2name(Jr);hr.indexOf(xn)===-1&&hr.push(xn)}function Ut(Jr){return"LAYOUT"+Jr+".autorange"}function or(Jr){return"LAYOUT"+Jr+".range"}function ur(Jr){for(var xn=Jr;xn<Ge.length;xn++)if(Ge[xn]._input===We[Jr])return Ge[xn]}function dt(Jr,xn,Dn){if(Array.isArray(Jr)){Jr.forEach(function(Br){dt(Br,xn,Dn)});return}if(!(Jr in we||l.hasParent(we,Jr))){var mr;if(Jr.substr(0,6)==="LAYOUT")mr=ct(pe.layout,Jr.replace("LAYOUT",""));else{var Ar=Ae[Dn],zr=Pe._tracePreGUI[ur(Ar)._fullInput.uid];mr=fe(zr,tt)(We[Ar],Jr)}Jr in Wt||(Wt[Jr]=gt()),Wt[Jr][Dn]===void 0&&(Wt[Jr][Dn]=ue(mr.get())),xn!==void 0&&mr.set(xn)}}function ut(Jr){return function(xn){return Ge[xn][Jr]}}function yt(Jr){return function(xn,Dn){return xn===!1?Ge[Ae[Dn]][Jr]:null}}for(var Lt in we){if(l.hasParent(we,Lt))throw new Error("cannot set "+Lt+" and a parent attribute simultaneously");var Rt=we[Lt],Nt,Vt,Zt,qt,Jt,nr;if((Lt==="autobinx"||Lt==="autobiny")&&(Lt=Lt.charAt(Lt.length-1)+"bins",Array.isArray(Rt)?Rt=Rt.map(yt(Lt)):Rt===!1?Rt=Ae.map(ut(Lt)):Rt=null),Bt[Lt]=Rt,Lt.substr(0,6)==="LAYOUT"){Zt=ct(pe.layout,Lt.replace("LAYOUT","")),Wt[Lt]=[ue(Zt.get())],Zt.set(Array.isArray(Rt)?Rt[0]:Rt),wt.calc=!0;continue}for(Wt[Lt]=gt(),Pt=0;Pt<Ae.length;Pt++){Nt=We[Ae[Pt]],Vt=ur(Ae[Pt]);var Mr=Pe._tracePreGUI[Vt._fullInput.uid];if(Zt=fe(Mr,tt)(Nt,Lt),qt=Zt.get(),Jt=Array.isArray(Rt)?Rt[Pt%Rt.length]:Rt,Jt!==void 0){var Ke=Zt.parts[Zt.parts.length-1],Ze=Lt.substr(0,Lt.length-Ke.length-1),zt=Ze?Ze+".":"",kt=Ze?x(Vt,Ze).get():Vt;if(nr=n.getTraceValObject(Vt,Zt.parts),nr&&nr.impliedEdits&&Jt!==null)for(var Qt in nr.impliedEdits)dt(_.relativeAttr(Lt,Qt),nr.impliedEdits[Qt],Pt);else if((Ke==="thicknessmode"||Ke==="lenmode")&&qt!==Jt&&(Jt==="fraction"||Jt==="pixels")&&kt){var cr=Pe._size,fr=kt.orient,ir=fr==="top"||fr==="bottom";if(Ke==="thicknessmode"){var Yt=ir?cr.h:cr.w;dt(zt+"thickness",kt.thickness*(Jt==="fraction"?1/Yt:Yt),Pt)}else{var gr=ir?cr.w:cr.h;dt(zt+"len",kt.len*(Jt==="fraction"?1/gr:gr),Pt)}}else if(Lt==="type"&&(Jt==="pie"!=(qt==="pie")||Jt==="funnelarea"!=(qt==="funnelarea"))){var yr="x",Tr="y";(Jt==="bar"||qt==="bar")&&Nt.orientation==="h"&&(yr="y",Tr="x"),_.swapAttrs(Nt,["?","?src"],"labels",yr),_.swapAttrs(Nt,["d?","?0"],"label",yr),_.swapAttrs(Nt,["?","?src"],"values",Tr),qt==="pie"||qt==="funnelarea"?(x(Nt,"marker.color").set(x(Nt,"marker.colors").get()),Pe._pielayer.selectAll("g.trace").remove()):r.traceIs(Nt,"cartesian")&&x(Nt,"marker.colors").set(x(Nt,"marker.color").get())}Wt[Lt][Pt]=ue(qt);var pr=["swapxy","swapxyaxes","orientation","orientationaxes"];if(pr.indexOf(Lt)!==-1){if(Lt==="orientation"){Zt.set(Jt);var Kr=Nt.x&&!Nt.y?"h":"v";if((Zt.get()||Kr)===Vt.orientation)continue}else Lt==="orientationaxes"&&(Nt.orientation={v:"h",h:"v"}[Vt.orientation]);l.swapXYData(Nt),wt.calc=wt.clearAxisTypes=!0}else u.dataArrayContainers.indexOf(Zt.parts[0])!==-1?(l.manageArrayContainers(Zt,Jt,Wt),wt.calc=!0):(nr?nr.arrayOk&&!r.traceIs(Vt,"regl")&&(_.isArrayOrTypedArray(Jt)||_.isArrayOrTypedArray(qt))?wt.calc=!0:M.update(wt,nr):wt.calc=!0,Zt.set(Jt))}}if(["swapxyaxes","orientationaxes"].indexOf(Lt)!==-1&&i.swap(pe,Ae),Lt==="orientationaxes"){var Or=x(pe.layout,"hovermode"),Nr=Or.get();Nr==="x"?Or.set("y"):Nr==="y"?Or.set("x"):Nr==="x unified"?Or.set("y unified"):Nr==="y unified"&&Or.set("x unified")}if(["orientation","type"].indexOf(Lt)!==-1){for(hr=[],Pt=0;Pt<Ae.length;Pt++){var Sn=We[Ae[Pt]];r.traceIs(Sn,"cartesian")&&(jt(Sn.xaxis||"x"),jt(Sn.yaxis||"y"))}dt(hr.map(Ut),!0,0),dt(hr.map(or),[0,1],0)}}return(wt.calc||wt.plot)&&(wt.fullReplot=!0),{flags:wt,undoit:Wt,redoit:Bt,traces:Ae,eventData:_.extendDeepNoArrays([],[St,Ae])}}function le(pe){var we=_.counterRegex("axis",".title",!1,!1),Ae=/colorbar\.title$/,Pe=Object.keys(pe),Ge,We,tt;for(Ge=0;Ge<Pe.length;Ge++)We=Pe[Ge],tt=pe[We],(We==="title"||we.test(We)||Ae.test(We))&&(typeof tt=="string"||typeof tt=="number")?ct(We,We.replace("title","title.text")):We.indexOf("titlefont")>-1&&We.indexOf("grouptitlefont")===-1?ct(We,We.replace("titlefont","title.font")):We.indexOf("titleposition")>-1?ct(We,We.replace("titleposition","title.position")):We.indexOf("titleside")>-1?ct(We,We.replace("titleside","title.side")):We.indexOf("titleoffset")>-1&&ct(We,We.replace("titleoffset","title.offset"));function ct(St,Pt){pe[Pt]=pe[St],delete pe[St]}}function xe(pe,we,Ae){pe=_.getGraphDiv(pe),l.clearPromiseQueue(pe);var Pe={};if(typeof we=="string")Pe[we]=Ae;else if(_.isPlainObject(we))Pe=_.extendFlat({},we);else return _.warn("Relayout fail.",we,Ae),Promise.reject();Object.keys(Pe).length&&(pe.changed=!0);var Ge=Le(pe,Pe),We=Ge.flags;We.calc&&(pe.calcdata=void 0);var tt=[u.previousPromises];We.layoutReplot?tt.push(m.layoutReplot):Object.keys(Pe).length&&(Se(pe,We,Ge)||u.supplyDefaults(pe),We.legend&&tt.push(m.doLegend),We.layoutstyle&&tt.push(m.layoutStyles),We.axrange&&Re(tt,Ge.rangesAltered),We.ticks&&tt.push(m.doTicksRelayout),We.modebar&&tt.push(m.doModeBar),We.camera&&tt.push(m.doCamera),We.colorbars&&tt.push(m.doColorBars),tt.push(S)),tt.push(u.rehover,u.redrag,u.reselect),y.add(pe,xe,[pe,Ge.undoit],xe,[pe,Ge.redoit]);var ct=_.syncOrAsync(tt,pe);return(!ct||!ct.then)&&(ct=Promise.resolve(pe)),ct.then(function(){return pe.emit("plotly_relayout",Ge.eventData),pe})}function Se(pe,we,Ae){var Pe=pe._fullLayout;if(!we.axrange)return!1;for(var Ge in we)if(Ge!=="axrange"&&we[Ge])return!1;for(var We in Ae.rangesAltered){var tt=i.id2name(We),ct=pe.layout[tt],St=Pe[tt];if(St.autorange=ct.autorange,ct.range&&(St.range=ct.range.slice()),St.cleanRange(),St._matchGroup){for(var Pt in St._matchGroup)if(Pt!==We){var wt=Pe[i.id2name(Pt)];wt.autorange=St.autorange,wt.range=St.range.slice(),wt._input.range=St.range.slice()}}}return!0}function Re(pe,we){var Ae=we?function(Pe){var Ge=[],We=!0;for(var tt in we){var ct=i.getFromId(Pe,tt);if(Ge.push(tt),(ct.ticklabelposition||"").indexOf("inside")!==-1&&ct._anchorAxis&&Ge.push(ct._anchorAxis._id),ct._matchGroup)for(var St in ct._matchGroup)we[St]||Ge.push(St)}return i.draw(Pe,Ge,{skipTitle:We})}:function(Pe){return i.draw(Pe,"redraw")};pe.push(p,m.doAutoRangeAndConstraints,Ae,m.drawData,m.finalDraw)}var Ee=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Oe=/^[xyz]axis[0-9]*\.autorange$/,Be=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Le(pe,we){var Ae=pe.layout,Pe=pe._fullLayout,Ge=Pe._guiEditing,We=fe(Pe._preGUI,Ge),tt=Object.keys(we),ct=i.list(pe),St=_.extendDeepAll({},we),Pt={},wt,Bt,Wt;for(le(we),tt=Object.keys(we),Bt=0;Bt<tt.length;Bt++)if(tt[Bt].indexOf("allaxes")===0){for(Wt=0;Wt<ct.length;Wt++){var hr=ct[Wt]._id.substr(1),gt=hr.indexOf("scene")!==-1?hr+".":"",jt=tt[Bt].replace("allaxes",gt+ct[Wt]._name);we[jt]||(we[jt]=we[tt[Bt]])}delete we[tt[Bt]]}var Ut=M.layoutFlags(),or={},ur={};function dt(Ar,zr){if(Array.isArray(Ar)){Ar.forEach(function(on){dt(on,zr)});return}if(!(Ar in we||l.hasParent(we,Ar))){var Br=We(Ae,Ar);Ar in ur||(ur[Ar]=ue(Br.get())),zr!==void 0&&Br.set(zr)}}var ut={},yt;function Lt(Ar){var zr=i.name2id(Ar.split(".")[0]);return ut[zr]=1,zr}for(var Rt in we){if(l.hasParent(we,Rt))throw new Error("cannot set "+Rt+" and a parent attribute simultaneously");for(var Nt=We(Ae,Rt),Vt=we[Rt],Zt=Nt.parts.length,qt=Zt-1;qt>0&&typeof Nt.parts[qt]!="string";)qt--;var Jt=Nt.parts[qt],nr=Nt.parts[qt-1]+"."+Jt,Mr=Nt.parts.slice(0,qt).join("."),Ke=x(pe.layout,Mr).get(),Ze=x(Pe,Mr).get(),zt=Nt.get();if(Vt!==void 0){or[Rt]=Vt,ur[Rt]=Jt==="reverse"?Vt:ue(zt);var kt=n.getLayoutValObject(Pe,Nt.parts);if(kt&&kt.impliedEdits&&Vt!==null)for(var Qt in kt.impliedEdits)dt(_.relativeAttr(Rt,Qt),kt.impliedEdits[Qt]);if(["width","height"].indexOf(Rt)!==-1)if(Vt){dt("autosize",null);var cr=Rt==="height"?"width":"height";dt(cr,Pe[cr])}else Pe[Rt]=pe._initialAutoSize[Rt];else if(Rt==="autosize")dt("width",Vt?null:Pe.width),dt("height",Vt?null:Pe.height);else if(nr.match(Ee))Lt(nr),x(Pe,Mr+"._inputRange").set(null);else if(nr.match(Oe)){Lt(nr),x(Pe,Mr+"._inputRange").set(null);var fr=x(Pe,Mr).get();fr._inputDomain&&(fr._input.domain=fr._inputDomain.slice())}else nr.match(Be)&&x(Pe,Mr+"._inputDomain").set(null);if(Jt==="type"){yt=Ke;var ir=Ze.type==="linear"&&Vt==="log",Yt=Ze.type==="log"&&Vt==="linear";if(ir||Yt){if(!yt||!yt.range)dt(Mr+".autorange",!0);else if(Ze.autorange)ir&&(yt.range=yt.range[1]>yt.range[0]?[1,2]:[2,1]);else{var gr=yt.range[0],yr=yt.range[1];ir?(gr<=0&&yr<=0&&dt(Mr+".autorange",!0),gr<=0?gr=yr/1e6:yr<=0&&(yr=gr/1e6),dt(Mr+".range[0]",Math.log(gr)/Math.LN10),dt(Mr+".range[1]",Math.log(yr)/Math.LN10)):(dt(Mr+".range[0]",Math.pow(10,gr)),dt(Mr+".range[1]",Math.pow(10,yr)))}Array.isArray(Pe._subplots.polar)&&Pe._subplots.polar.length&&Pe[Nt.parts[0]]&&Nt.parts[1]==="radialaxis"&&delete Pe[Nt.parts[0]]._subplot.viewInitial["radialaxis.range"],r.getComponentMethod("annotations","convertCoords")(pe,Ze,Vt,dt),r.getComponentMethod("images","convertCoords")(pe,Ze,Vt,dt)}else dt(Mr+".autorange",!0),dt(Mr+".range",null);x(Pe,Mr+"._inputRange").set(null)}else if(Jt.match(L)){var Tr=x(Pe,Rt).get(),pr=(Vt||{}).type;(!pr||pr==="-")&&(pr="linear"),r.getComponentMethod("annotations","convertCoords")(pe,Tr,pr,dt),r.getComponentMethod("images","convertCoords")(pe,Tr,pr,dt)}var Kr=c.containerArrayMatch(Rt);if(Kr){wt=Kr.array,Bt=Kr.index;var Or=Kr.property,Nr=kt||{editType:"calc"};Bt!==""&&Or===""&&(c.isAddVal(Vt)?ur[Rt]=null:c.isRemoveVal(Vt)?ur[Rt]=(x(Ae,wt).get()||[])[Bt]:_.warn("unrecognized full object value",we)),M.update(Ut,Nr),Pt[wt]||(Pt[wt]={});var Sn=Pt[wt][Bt];Sn||(Sn=Pt[wt][Bt]={}),Sn[Or]=Vt,delete we[Rt]}else Jt==="reverse"?(Ke.range?Ke.range.reverse():(dt(Mr+".autorange",!0),Ke.range=[1,0]),Ze.autorange?Ut.calc=!0:Ut.plot=!0):(Rt==="dragmode"&&(Vt===!1&&zt!==!1||Vt!==!1&&zt===!1)||Pe._has("scatter-like")&&Pe._has("regl")&&Rt==="dragmode"&&(Vt==="lasso"||Vt==="select")&&!(zt==="lasso"||zt==="select")||Pe._has("gl2d")?Ut.plot=!0:kt?M.update(Ut,kt):Ut.calc=!0,Nt.set(Vt))}}for(wt in Pt){var Jr=c.applyContainerArrayChanges(pe,We(Ae,wt),Pt[wt],Ut,We);Jr||(Ut.plot=!0)}for(var xn in ut){yt=i.getFromId(pe,xn);var Dn=yt&&yt._constraintGroup;if(Dn){Ut.calc=!0;for(var mr in Dn)ut[mr]||(i.getFromId(pe,mr)._constraintShrinkable=!0)}}return(Te(pe)||we.height||we.width)&&(Ut.plot=!0),(Ut.plot||Ut.calc)&&(Ut.layoutReplot=!0),{flags:Ut,rangesAltered:ut,undoit:ur,redoit:or,eventData:St}}function Te(pe){var we=pe._fullLayout,Ae=we.width,Pe=we.height;return pe.layout.autosize&&u.plotAutoSize(pe,pe.layout,we),we.width!==Ae||we.height!==Pe}function De(pe,we,Ae,Pe){pe=_.getGraphDiv(pe),l.clearPromiseQueue(pe),_.isPlainObject(we)||(we={}),_.isPlainObject(Ae)||(Ae={}),Object.keys(we).length&&(pe.changed=!0),Object.keys(Ae).length&&(pe.changed=!0);var Ge=l.coerceTraceIndices(pe,Pe),We=ve(pe,_.extendFlat({},we),Ge),tt=We.flags,ct=Le(pe,_.extendFlat({},Ae)),St=ct.flags;(tt.calc||St.calc)&&(pe.calcdata=void 0),tt.clearAxisTypes&&l.clearAxisTypes(pe,Ge,Ae);var Pt=[];St.layoutReplot?Pt.push(m.layoutReplot):tt.fullReplot?Pt.push(B._doPlot):(Pt.push(u.previousPromises),Se(pe,St,ct)||u.supplyDefaults(pe),tt.style&&Pt.push(m.doTraceStyle),(tt.colorbars||St.colorbars)&&Pt.push(m.doColorBars),St.legend&&Pt.push(m.doLegend),St.layoutstyle&&Pt.push(m.layoutStyles),St.axrange&&Re(Pt,ct.rangesAltered),St.ticks&&Pt.push(m.doTicksRelayout),St.modebar&&Pt.push(m.doModeBar),St.camera&&Pt.push(m.doCamera),Pt.push(S)),Pt.push(u.rehover,u.redrag,u.reselect),y.add(pe,De,[pe,We.undoit,ct.undoit,We.traces],De,[pe,We.redoit,ct.redoit,We.traces]);var wt=_.syncOrAsync(Pt,pe);return(!wt||!wt.then)&&(wt=Promise.resolve(pe)),wt.then(function(){return pe.emit("plotly_update",{data:We.eventData,layout:ct.eventData}),pe})}function Ve(pe){return function(Ae){Ae._fullLayout._guiEditing=!0;var Pe=pe.apply(null,arguments);return Ae._fullLayout._guiEditing=!1,Pe}}var Ye=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],Ne=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function Xe(pe,we){for(var Ae=0;Ae<we.length;Ae++){var Pe=we[Ae],Ge=pe.match(Pe.pattern);if(Ge){var We=Ge[1]||"";return{head:We,tail:pe.substr(We.length+1),attr:Pe.attr}}}}function ht(pe,we){var Ae=x(we,pe).get();if(Ae!==void 0)return Ae;var Pe=pe.split(".");for(Pe.pop();Pe.length>1;)if(Pe.pop(),Ae=x(we,Pe.join(".")+".uirevision").get(),Ae!==void 0)return Ae;return we.uirevision}function st(pe,we){for(var Ae=0;Ae<we.length;Ae++)if(we[Ae]._fullInput.uid===pe)return Ae;return-1}function it(pe,we,Ae){for(var Pe=0;Pe<we.length;Pe++)if(we[Pe].uid===pe)return Pe;return!we[Ae]||we[Ae].uid?-1:Ae}function nt(pe,we){var Ae=_.isPlainObject(pe),Pe=Array.isArray(pe);return Ae||Pe?(Ae&&_.isPlainObject(we)||Pe&&Array.isArray(we))&&JSON.stringify(pe)===JSON.stringify(we):pe===we}function pt(pe,we,Ae,Pe){var Ge=Pe._preGUI,We,tt,ct,St,Pt,wt,Bt,Wt,hr,gt,jt=[],Ut={},or={};for(We in Ge){if(Pt=Xe(We,Ye),Pt){if(hr=Pt.head,gt=Pt.tail,tt=Pt.attr||hr+".uirevision",ct=x(Pe,tt).get(),St=ct&&ht(tt,we),St&&St===ct){if(wt=Ge[We],wt===null&&(wt=void 0),Bt=x(we,We),Wt=Bt.get(),nt(Wt,wt)){Wt===void 0&&gt==="autorange"&&jt.push(hr),Bt.set(ue(x(Pe,We).get()));continue}else if(gt==="autorange"||gt.substr(0,6)==="range["){var ur=Ge[hr+".range[0]"],dt=Ge[hr+".range[1]"],ut=Ge[hr+".autorange"];if(ut||ut===null&&ur===null&&dt===null){if(!(hr in Ut)){var yt=x(we,hr).get();Ut[hr]=yt&&(yt.autorange||yt.autorange!==!1&&(!yt.range||yt.range.length!==2))}if(Ut[hr]){Bt.set(ue(x(Pe,We).get()));continue}}}}}else _.warn("unrecognized GUI edit: "+We);delete Ge[We],Pt&&Pt.tail.substr(0,6)==="range["&&(or[Pt.head]=1)}for(var Lt=0;Lt<jt.length;Lt++){var Rt=jt[Lt];if(or[Rt]){var Nt=x(we,Rt).get();Nt&&delete Nt.autorange}}var Vt=Pe._tracePreGUI;for(var Zt in Vt){var qt=Vt[Zt],Jt=null,nr;for(We in qt){if(!Jt){var Mr=st(Zt,Ae);if(Mr<0){delete Vt[Zt];break}var Ke=Ae[Mr];nr=Ke._fullInput;var Ze=it(Zt,pe,nr.index);if(Ze<0){delete Vt[Zt];break}Jt=pe[Ze]}if(Pt=Xe(We,Ne),Pt){if(Pt.attr?(ct=x(Pe,Pt.attr).get(),St=ct&&ht(Pt.attr,we)):(ct=nr.uirevision,St=Jt.uirevision,St===void 0&&(St=we.uirevision)),St&&St===ct&&(wt=qt[We],wt===null&&(wt=void 0),Bt=x(Jt,We),Wt=Bt.get(),nt(Wt,wt))){Bt.set(ue(x(nr,We).get()));continue}}else _.warn("unrecognized GUI edit: "+We+" in trace uid "+Zt);delete qt[We]}}}function Tt(pe,we,Ae,Pe){var Ge,We;function tt(){return B.addFrames(pe,Ge)}pe=_.getGraphDiv(pe),l.clearPromiseQueue(pe);var ct=pe._fullData,St=pe._fullLayout;if(!_.isPlotDiv(pe)||!ct||!St)We=B.newPlot(pe,we,Ae,Pe);else{if(_.isPlainObject(we)){var Pt=we;we=Pt.data,Ae=Pt.layout,Pe=Pt.config,Ge=Pt.frames}var wt=!1;if(Pe){var Bt=_.extendDeep({},pe._context);pe._context=void 0,O(pe,Pe),wt=Ue(Bt,pe._context)}pe.data=we||[],l.cleanData(pe.data),pe.layout=Ae||{},l.cleanLayout(pe.layout),pt(pe.data,pe.layout,ct,St),u.supplyDefaults(pe,{skipUpdateCalc:!0});var Wt=pe._fullData,hr=pe._fullLayout,gt=hr.datarevision===void 0,jt=hr.transition,Ut=Dt(pe,St,hr,gt,jt),or=Ut.newDataRevision,ur=Et(pe,ct,Wt,gt,jt,or);if(Te(pe)&&(Ut.layoutReplot=!0),ur.calc||Ut.calc){pe.calcdata=void 0;for(var dt=Object.getOwnPropertyNames(hr),ut=0;ut<dt.length;ut++){var yt=dt[ut],Lt=yt.substring(0,5);if(Lt==="xaxis"||Lt==="yaxis"){var Rt=hr[yt]._emptyCategories;Rt&&Rt()}}}else u.supplyDefaultsUpdateCalc(pe.calcdata,Wt);var Nt=[];if(Ge&&(pe._transitionData={},u.createTransitionData(pe),Nt.push(tt)),hr.transition&&!wt&&(ur.anim||Ut.anim))Ut.ticks&&Nt.push(m.doTicksRelayout),u.doCalcdata(pe),m.doAutoRangeAndConstraints(pe),Nt.push(function(){return u.transitionFromReact(pe,ur,Ut,St)});else if(ur.fullReplot||Ut.layoutReplot||wt)pe._fullLayout._skipDefaults=!0,Nt.push(B._doPlot);else{for(var Vt in Ut.arrays){var Zt=Ut.arrays[Vt];if(Zt.length){var qt=r.getComponentMethod(Vt,"drawOne");if(qt!==_.noop)for(var Jt=0;Jt<Zt.length;Jt++)qt(pe,Zt[Jt]);else{var nr=r.getComponentMethod(Vt,"draw");if(nr===_.noop)throw new Error("cannot draw components: "+Vt);nr(pe)}}}Nt.push(u.previousPromises),ur.style&&Nt.push(m.doTraceStyle),(ur.colorbars||Ut.colorbars)&&Nt.push(m.doColorBars),Ut.legend&&Nt.push(m.doLegend),Ut.layoutstyle&&Nt.push(m.layoutStyles),Ut.axrange&&Re(Nt),Ut.ticks&&Nt.push(m.doTicksRelayout),Ut.modebar&&Nt.push(m.doModeBar),Ut.camera&&Nt.push(m.doCamera),Nt.push(S)}Nt.push(u.rehover,u.redrag,u.reselect),We=_.syncOrAsync(Nt,pe),(!We||!We.then)&&(We=Promise.resolve(pe))}return We.then(function(){return pe.emit("plotly_react",{data:we,layout:Ae}),pe})}function Et(pe,we,Ae,Pe,Ge,We){var tt=we.length===Ae.length;if(!Ge&&!tt)return{fullReplot:!0,calc:!0};var ct=M.traceFlags();ct.arrays={},ct.nChanges=0,ct.nChangesAnim=0;var St,Pt;function wt(hr){var gt=n.getTraceValObject(Pt,hr);return!Pt._module.animatable&&gt.anim&&(gt.anim=!1),gt}var Bt={getValObject:wt,flags:ct,immutable:Pe,transition:Ge,newDataRevision:We,gd:pe},Wt={};for(St=0;St<we.length;St++)if(Ae[St]){if(Pt=Ae[St]._fullInput,u.hasMakesDataTransform(Pt)&&(Pt=Ae[St]),Wt[Pt.uid])continue;Wt[Pt.uid]=1,et(we[St]._fullInput,Pt,[],Bt)}return(ct.calc||ct.plot)&&(ct.fullReplot=!0),Ge&&ct.nChanges&&ct.nChangesAnim&&(ct.anim=ct.nChanges===ct.nChangesAnim&&tt?"all":"some"),ct}function Dt(pe,we,Ae,Pe,Ge){var We=M.layoutFlags();We.arrays={},We.rangesAltered={},We.nChanges=0,We.nChangesAnim=0;function tt(St){return n.getLayoutValObject(Ae,St)}var ct={getValObject:tt,flags:We,immutable:Pe,transition:Ge,gd:pe};return et(we,Ae,[],ct),(We.plot||We.calc)&&(We.layoutReplot=!0),Ge&&We.nChanges&&We.nChangesAnim&&(We.anim=We.nChanges===We.nChangesAnim?"all":"some"),We}function et(pe,we,Ae,Pe){var Ge,We,tt,ct=Pe.getValObject,St=Pe.flags,Pt=Pe.immutable,wt=Pe.inArray,Bt=Pe.arrayIndex;function Wt(){var Mr=Ge.editType;if(wt&&Mr.indexOf("arraydraw")!==-1){_.pushUnique(St.arrays[wt],Bt);return}M.update(St,Ge),Mr!=="none"&&St.nChanges++,Pe.transition&&Ge.anim&&St.nChangesAnim++,(Ee.test(tt)||Oe.test(tt))&&(St.rangesAltered[Ae[0]]=1),Be.test(tt)&&x(we,"_inputDomain").set(null),We==="datarevision"&&(St.newDataRevision=1)}function hr(Mr){return Mr.valType==="data_array"||Mr.arrayOk}for(We in pe){if(St.calc&&!Pe.transition)return;var gt=pe[We],jt=we[We],Ut=Ae.concat(We);if(tt=Ut.join("."),!(We.charAt(0)==="_"||typeof gt=="function"||gt===jt)){if((We==="tick0"||We==="dtick")&&Ae[0]!=="geo"){var or=we.tickmode;if(or==="auto"||or==="array"||!or)continue}if(!(We==="range"&&we.autorange)&&!((We==="zmin"||We==="zmax")&&we.type==="contourcarpet")&&(Ge=ct(Ut),!!Ge&&!(Ge._compareAsJSON&&JSON.stringify(gt)===JSON.stringify(jt)))){var ur=Ge.valType,dt,ut=hr(Ge),yt=Array.isArray(gt),Lt=Array.isArray(jt);if(yt&&Lt){var Rt="_input_"+We,Nt=pe[Rt],Vt=we[Rt];if(Array.isArray(Nt)&&Nt===Vt)continue}if(jt===void 0)ut&&yt?St.calc=!0:Wt();else if(Ge._isLinkedToArray){var Zt=[],qt=!1;wt||(St.arrays[We]=Zt);var Jt=Math.min(gt.length,jt.length),nr=Math.max(gt.length,jt.length);if(Jt!==nr)if(Ge.editType==="arraydraw")qt=!0;else{Wt();continue}for(dt=0;dt<Jt;dt++)et(gt[dt],jt[dt],Ut.concat(dt),_.extendFlat({inArray:We,arrayIndex:dt},Pe));if(qt)for(dt=Jt;dt<nr;dt++)Zt.push(dt)}else!ur&&_.isPlainObject(gt)?et(gt,jt,Ut,Pe):ut?yt&&Lt?(Pt&&(St.calc=!0),(Pt||Pe.newDataRevision)&&Wt()):yt!==Lt?St.calc=!0:Wt():yt&&Lt?(gt.length!==jt.length||String(gt)!==String(jt))&&Wt():Wt()}}}for(We in we)if(!(We in pe||We.charAt(0)==="_"||typeof we[We]=="function"))if(Ge=ct(Ae.concat(We)),hr(Ge)&&Array.isArray(we[We])){St.calc=!0;return}else Wt()}function Ue(pe,we){var Ae;for(Ae in pe)if(Ae.charAt(0)!=="_"){var Pe=pe[Ae],Ge=we[Ae];if(Pe!==Ge)if(_.isPlainObject(Pe)&&_.isPlainObject(Ge)){if(Ue(Pe,Ge))return!0}else if(Array.isArray(Pe)&&Array.isArray(Ge)){if(Pe.length!==Ge.length)return!0;for(var We=0;We<Pe.length;We++)if(Pe[We]!==Ge[We])if(_.isPlainObject(Pe[We])&&_.isPlainObject(Ge[We])){if(Ue(Pe[We],Ge[We]))return!0}else return!0}else return!0}}function ze(pe,we,Ae){if(pe=_.getGraphDiv(pe),!_.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 animating it. For more details, see https://plotly.com/javascript/animations/");var Pe=pe._transitionData;Pe._frameQueue||(Pe._frameQueue=[]),Ae=u.supplyAnimationDefaults(Ae);var Ge=Ae.transition,We=Ae.frame;Pe._frameWaitingCnt===void 0&&(Pe._frameWaitingCnt=0);function tt(Pt){return Array.isArray(Ge)?Pt>=Ge.length?Ge[0]:Ge[Pt]:Ge}function ct(Pt){return Array.isArray(We)?Pt>=We.length?We[0]:We[Pt]:We}function St(Pt,wt){var Bt=0;return function(){if(Pt&&++Bt===wt)return Pt()}}return new Promise(function(Pt,wt){function Bt(){if(Pe._frameQueue.length!==0){for(;Pe._frameQueue.length;){var Jt=Pe._frameQueue.pop();Jt.onInterrupt&&Jt.onInterrupt()}pe.emit("plotly_animationinterrupted",[])}}function Wt(Jt){if(Jt.length!==0){for(var nr=0;nr<Jt.length;nr++){var Mr;Jt[nr].type==="byname"?Mr=u.computeFrame(pe,Jt[nr].name):Mr=Jt[nr].data;var Ke=ct(nr),Ze=tt(nr);Ze.duration=Math.min(Ze.duration,Ke.duration);var zt={frame:Mr,name:Jt[nr].name,frameOpts:Ke,transitionOpts:Ze};nr===Jt.length-1&&(zt.onComplete=St(Pt,2),zt.onInterrupt=wt),Pe._frameQueue.push(zt)}Ae.mode==="immediate"&&(Pe._lastFrameAt=-1/0),Pe._animationRaf||jt()}}function hr(){pe.emit("plotly_animated"),window.cancelAnimationFrame(Pe._animationRaf),Pe._animationRaf=null}function gt(){Pe._currentFrame&&Pe._currentFrame.onComplete&&Pe._currentFrame.onComplete();var Jt=Pe._currentFrame=Pe._frameQueue.shift();if(Jt){var nr=Jt.name?Jt.name.toString():null;pe._fullLayout._currentFrame=nr,Pe._lastFrameAt=Date.now(),Pe._timeToNext=Jt.frameOpts.duration,u.transition(pe,Jt.frame.data,Jt.frame.layout,l.coerceTraceIndices(pe,Jt.frame.traces),Jt.frameOpts,Jt.transitionOpts).then(function(){Jt.onComplete&&Jt.onComplete()}),pe.emit("plotly_animatingframe",{name:nr,frame:Jt.frame,animation:{frame:Jt.frameOpts,transition:Jt.transitionOpts}})}else hr()}function jt(){pe.emit("plotly_animating"),Pe._lastFrameAt=-1/0,Pe._timeToNext=0,Pe._runningTransitions=0,Pe._currentFrame=null;var Jt=function(){Pe._animationRaf=window.requestAnimationFrame(Jt),Date.now()-Pe._lastFrameAt>Pe._timeToNext&&gt()};Jt()}var Ut=0;function or(Jt){return Array.isArray(Ge)?Ut>=Ge.length?Jt.transitionOpts=Ge[Ut]:Jt.transitionOpts=Ge[0]:Jt.transitionOpts=Ge,Ut++,Jt}var ur,dt,ut=[],yt=we==null,Lt=Array.isArray(we),Rt=!yt&&!Lt&&_.isPlainObject(we);if(Rt)ut.push({type:"object",data:or(_.extendFlat({},we))});else if(yt||["string","number"].indexOf(typeof we)!==-1)for(ur=0;ur<Pe._frames.length;ur++)dt=Pe._frames[ur],dt&&(yt||String(dt.group)===String(we))&&ut.push({type:"byname",name:String(dt.name),data:or({name:dt.name})});else if(Lt)for(ur=0;ur<we.length;ur++){var Nt=we[ur];["number","string"].indexOf(typeof Nt)!==-1?(Nt=String(Nt),ut.push({type:"byname",name:Nt,data:or({name:Nt})})):_.isPlainObject(Nt)&&ut.push({type:"object",data:or(_.extendFlat({},Nt))})}for(ur=0;ur<ut.length;ur++)if(dt=ut[ur],dt.type==="byname"&&!Pe._frameHash[dt.data.name]){_.warn('animate failure: frame not found: "'+dt.data.name+'"'),wt();return}["next","immediate"].indexOf(Ae.mode)!==-1&&Bt(),Ae.direction==="reverse"&&ut.reverse();var Vt=pe._fullLayout._currentFrame;if(Vt&&Ae.fromcurrent){var Zt=-1;for(ur=0;ur<ut.length;ur++)if(dt=ut[ur],dt.type==="byname"&&dt.name===Vt){Zt=ur;break}if(Zt>0&&Zt<ut.length-1){var qt=[];for(ur=0;ur<ut.length;ur++)dt=ut[ur],(ut[ur].type!=="byname"||ur>Zt)&&qt.push(dt);ut=qt}}ut.length>0?Wt(ut):(pe.emit("plotly_animated"),Pt())})}function rt(pe,we,Ae){if(pe=_.getGraphDiv(pe),we==null)return Promise.resolve();if(!_.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,Ge,We,tt,ct=pe._transitionData._frames,St=pe._transitionData._frameHash;if(!Array.isArray(we))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+we);var Pt=ct.length+we.length*2,wt=[],Bt={};for(Pe=we.length-1;Pe>=0;Pe--)if(_.isPlainObject(we[Pe])){var Wt=we[Pe].name,hr=(St[Wt]||Bt[Wt]||{}).name,gt=we[Pe].name,jt=St[hr]||Bt[hr];hr&&gt&&typeof gt=="number"&&jt&&D<A&&(D++,_.warn('addFrames: overwriting frame "'+(St[hr]||Bt[hr]).name+'" with a frame whose name of type "number" also equates to "'+hr+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),D===A&&_.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),Bt[Wt]={name:Wt},wt.push({frame:u.supplyFrameDefaults(we[Pe]),index:Ae&&Ae[Pe]!==void 0&&Ae[Pe]!==null?Ae[Pe]:Pt+Pe})}wt.sort(function(Rt,Nt){return Rt.index>Nt.index?-1:Rt.index<Nt.index?1:0});var Ut=[],or=[],ur=ct.length;for(Pe=wt.length-1;Pe>=0;Pe--){if(Ge=wt[Pe].frame,typeof Ge.name=="number"&&_.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Ge.name)for(;St[Ge.name="frame "+pe._transitionData._counter++];);if(St[Ge.name]){for(We=0;We<ct.length&&(ct[We]||{}).name!==Ge.name;We++);Ut.push({type:"replace",index:We,value:Ge}),or.unshift({type:"replace",index:We,value:ct[We]})}else tt=Math.max(0,Math.min(wt[Pe].index,ur)),Ut.push({type:"insert",index:tt,value:Ge}),or.unshift({type:"delete",index:tt}),ur++}var dt=u.modifyFrames,ut=u.modifyFrames,yt=[pe,or],Lt=[pe,Ut];return y&&y.add(pe,dt,yt,ut,Lt),u.modifyFrames(pe,Ut)}function lt(pe,we){if(pe=_.getGraphDiv(pe),!_.isPlotDiv(pe))throw new Error("This element is not a Plotly plot: "+pe);var Ae,Pe,Ge=pe._transitionData._frames,We=[],tt=[];if(!we)for(we=[],Ae=0;Ae<Ge.length;Ae++)we.push(Ae);for(we=we.slice(),we.sort(),Ae=we.length-1;Ae>=0;Ae--)Pe=we[Ae],We.push({type:"delete",index:Pe}),tt.unshift({type:"insert",index:Pe,value:Ge[Pe]});var ct=u.modifyFrames,St=u.modifyFrames,Pt=[pe,tt],wt=[pe,We];return y&&y.add(pe,ct,Pt,St,wt),u.modifyFrames(pe,We)}function Qe(pe){pe=_.getGraphDiv(pe);var we=pe._fullLayout||{},Ae=pe._fullData||[];return u.cleanPlot([],{},Ae,we),u.purge(pe),v.purge(pe),we._container&&we._container.remove(),delete pe._context,pe}function Fe(pe){var we=pe._fullLayout,Ae=pe.getBoundingClientRect();if(!_.equalDomRects(Ae,we._lastBBox)){var Pe=we._invTransform=_.inverseTransformMatrix(_.getFullTransformMatrix(pe));we._invScaleX=Math.sqrt(Pe[0][0]*Pe[0][0]+Pe[0][1]*Pe[0][1]+Pe[0][2]*Pe[0][2]),we._invScaleY=Math.sqrt(Pe[1][0]*Pe[1][0]+Pe[1][1]*Pe[1][1]+Pe[1][2]*Pe[1][2]),we._lastBBox=Ae}}function Ce(pe){var we=d.select(pe),Ae=pe._fullLayout;if(Ae._calcInverseTransform=Fe,Ae._calcInverseTransform(pe),Ae._container=we.selectAll(".plot-container").data([0]),Ae._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),Ae._paperdiv=Ae._container.selectAll(".svg-container").data([0]),Ae._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),Ae._glcontainer=Ae._paperdiv.selectAll(".gl-container").data([{}]),Ae._glcontainer.enter().append("div").classed("gl-container",!0),Ae._paperdiv.selectAll(".main-svg").remove(),Ae._paperdiv.select(".modebar-container").remove(),Ae._paper=Ae._paperdiv.insert("svg",":first-child").classed("main-svg",!0),Ae._toppaper=Ae._paperdiv.append("svg").classed("main-svg",!0),Ae._modebardiv=Ae._paperdiv.append("div"),delete Ae._modeBar,Ae._hoverpaper=Ae._paperdiv.append("svg").classed("main-svg",!0),!Ae._uid){var Pe={};d.selectAll("defs").each(function(){this.id&&(Pe[this.id.split("-")[1]]=1)}),Ae._uid=_.randstr(Pe)}Ae._paperdiv.selectAll(".main-svg").attr(b.svgAttrs),Ae._defs=Ae._paper.append("defs").attr("id","defs-"+Ae._uid),Ae._clips=Ae._defs.append("g").classed("clips",!0),Ae._topdefs=Ae._toppaper.append("defs").attr("id","topdefs-"+Ae._uid),Ae._topclips=Ae._topdefs.append("g").classed("clips",!0),Ae._bgLayer=Ae._paper.append("g").classed("bglayer",!0),Ae._draggers=Ae._paper.append("g").classed("draglayer",!0);var Ge=Ae._paper.append("g").classed("layer-below",!0);Ae._imageLowerLayer=Ge.append("g").classed("imagelayer",!0),Ae._shapeLowerLayer=Ge.append("g").classed("shapelayer",!0),Ae._cartesianlayer=Ae._paper.append("g").classed("cartesianlayer",!0),Ae._polarlayer=Ae._paper.append("g").classed("polarlayer",!0),Ae._smithlayer=Ae._paper.append("g").classed("smithlayer",!0),Ae._ternarylayer=Ae._paper.append("g").classed("ternarylayer",!0),Ae._geolayer=Ae._paper.append("g").classed("geolayer",!0),Ae._funnelarealayer=Ae._paper.append("g").classed("funnelarealayer",!0),Ae._pielayer=Ae._paper.append("g").classed("pielayer",!0),Ae._iciclelayer=Ae._paper.append("g").classed("iciclelayer",!0),Ae._treemaplayer=Ae._paper.append("g").classed("treemaplayer",!0),Ae._sunburstlayer=Ae._paper.append("g").classed("sunburstlayer",!0),Ae._indicatorlayer=Ae._toppaper.append("g").classed("indicatorlayer",!0),Ae._glimages=Ae._paper.append("g").classed("glimages",!0);var We=Ae._toppaper.append("g").classed("layer-above",!0);Ae._imageUpperLayer=We.append("g").classed("imagelayer",!0),Ae._shapeUpperLayer=We.append("g").classed("shapelayer",!0),Ae._selectionLayer=Ae._toppaper.append("g").classed("selectionlayer",!0),Ae._infolayer=Ae._toppaper.append("g").classed("infolayer",!0),Ae._menulayer=Ae._toppaper.append("g").classed("menulayer",!0),Ae._zoomlayer=Ae._toppaper.append("g").classed("zoomlayer",!0),Ae._hoverlayer=Ae._hoverpaper.append("g").classed("hoverlayer",!0),Ae._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),pe.emit("plotly_framework")}B.animate=ze,B.addFrames=rt,B.deleteFrames=lt,B.addTraces=q,B.deleteTraces=j,B.extendTraces=se,B.moveTraces=Z,B.prependTraces=ce,B.newPlot=H,B._doPlot=C,B.purge=Qe,B.react=Tt,B.redraw=N,B.relayout=xe,B.restyle=Q,B.setPlotConfig=o,B.update=De,B._guiRelayout=Ve(xe),B._guiRestyle=Ve(Q),B._guiUpdate=Ve(De),B._storeDirectGUIEdit=ne},72075:function(z){var B={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},globalTransforms:{valType:"any",dflt:[]},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},e={};function d(P,a){for(var _ in P){var x=P[_];x.valType?a[_]=x.dflt:(a[_]||(a[_]={}),d(x,a[_]))}}d(B,e),z.exports={configAttributes:B,dfltConfig:e}},86281:function(z,B,e){var d=e(73972),P=e(71828),a=e(9012),_=e(10820),x=e(31391),v=e(85594),y=e(72075).configAttributes,r=e(30962),n=P.extendDeepAll,u=P.isPlainObject,i=P.isArrayOrTypedArray,f=P.nestedProperty,g=P.valObjectMeta,h="_isSubplotObj",b="_isLinkedToArray",p="_arrayAttrRegexps",E="_deprecated",c=[h,b,p,E];B.IS_SUBPLOT_OBJ=h,B.IS_LINKED_TO_ARRAY=b,B.DEPRECATED=E,B.UNDERSCORE_ATTRS=c,B.get=function(){var H={};d.allTypes.forEach(function(V){H[V]=L(V)});var k={};return Object.keys(d.transformsRegistry).forEach(function(V){k[V]=A(V)}),{defs:{valObjects:g,metaKeys:c.concat(["description","role","editType","impliedEdits"]),editType:{traces:r.traces,layout:r.layout},impliedEdits:{}},traces:H,layout:D(),transforms:k,frames:C(),animation:S(v),config:S(y)}},B.crawl=function(H,k,V,G){var U=V||0;G=G||"",Object.keys(H).forEach(function(Y){var ee=H[Y];if(c.indexOf(Y)===-1){var re=(G?G+".":"")+Y;k(ee,Y,H,U,re),!B.isValObject(ee)&&u(ee)&&Y!=="impliedEdits"&&B.crawl(ee,k,U+1,re)}})},B.isValObject=function(H){return H&&H.valType!==void 0},B.findArrayAttributes=function(H){var k=[],V=[],G=[],U,Y;function ee(j,Z,Q,ue){V=V.slice(0,ue).concat([Z]),G=G.slice(0,ue).concat([j&&j._isLinkedToArray]);var fe=j&&(j.valType==="data_array"||j.arrayOk===!0)&&!(V[ue-1]==="colorbar"&&(Z==="ticktext"||Z==="tickvals"));fe&&re(U,0,"")}function re(j,Z,Q){var ue=j[V[Z]],fe=Q+V[Z];if(Z===V.length-1)i(ue)&&k.push(Y+fe);else if(G[Z]){if(Array.isArray(ue))for(var te=0;te<ue.length;te++)u(ue[te])&&re(ue[te],Z+1,fe+"["+te+"].")}else u(ue)&&re(ue,Z+1,fe+".")}U=H,Y="",B.crawl(a,ee),H._module&&H._module.attributes&&B.crawl(H._module.attributes,ee);var ie=H.transforms;if(ie)for(var se=0;se<ie.length;se++){var ce=ie[se],q=ce._module;q&&(Y="transforms["+se+"].",U=ce,B.crawl(q.attributes,ee))}return k},B.getTraceValObject=function(H,k){var V=k[0],G=1,U,Y;if(V==="transforms"){if(k.length===1)return a.transforms;var ee=H.transforms;if(!Array.isArray(ee)||!ee.length)return!1;var re=k[1];if(!M(re)||re>=ee.length)return!1;U=(d.transformsRegistry[ee[re].type]||{}).attributes,Y=U&&U[k[2]],G=3}else{var ie=H._module;if(ie||(ie=(d.modules[H.type||a.type.dflt]||{})._module),!ie)return!1;if(U=ie.attributes,Y=U&&U[V],!Y){var se=ie.basePlotModule;se&&se.attributes&&(Y=se.attributes[V])}Y||(Y=a[V])}return m(Y,k,G)},B.getLayoutValObject=function(H,k){var V=l(H,k[0]);return m(V,k,1)};function l(H,k){var V,G,U,Y,ee=H._basePlotModules;if(ee){var re;for(V=0;V<ee.length;V++){if(U=ee[V],U.attrRegex&&U.attrRegex.test(k)){if(U.layoutAttrOverrides)return U.layoutAttrOverrides;!re&&U.layoutAttributes&&(re=U.layoutAttributes)}var ie=U.baseLayoutAttrOverrides;if(ie&&k in ie)return ie[k]}if(re)return re}var se=H._modules;if(se){for(V=0;V<se.length;V++)if(Y=se[V].layoutAttributes,Y&&k in Y)return Y[k]}for(G in d.componentsRegistry){if(U=d.componentsRegistry[G],U.name==="colorscale"&&k.indexOf("coloraxis")===0)return U.layoutAttributes[k];if(!U.schema&&k===U.name)return U.layoutAttributes}return k in _?_[k]:!1}function m(H,k,V){if(!H)return!1;if(H._isLinkedToArray){if(M(k[V]))V++;else if(V<k.length)return!1}for(;V<k.length;V++){var G=H[k[V]];if(u(G))H=G;else break;if(V===k.length-1)break;if(H._isLinkedToArray){if(V++,!M(k[V]))return!1}else if(H.valType==="info_array"){V++;var U=k[V];if(!M(U))return!1;var Y=H.items;if(Array.isArray(Y)){if(U>=Y.length)return!1;if(H.dimensions===2){if(V++,k.length===V)return H;var ee=k[V];if(!M(ee))return!1;H=Y[U][ee]}else H=Y[U]}else H=Y}}return H}function M(H){return H===Math.round(H)&&H>=0}function L(H){var k,V;k=d.modules[H]._module,V=k.basePlotModule;var G={};G.type=null;var U=n({},a),Y=n({},k.attributes);B.crawl(Y,function(ie,se,ce,q,j){f(U,j).set(void 0),ie===void 0&&f(Y,j).set(void 0)}),n(G,U),d.traceIs(H,"noOpacity")&&delete G.opacity,d.traceIs(H,"showLegend")||(delete G.showlegend,delete G.legendgroup),d.traceIs(H,"noHover")&&(delete G.hoverinfo,delete G.hoverlabel),k.selectPoints||delete G.selectedpoints,n(G,Y),V.attributes&&n(G,V.attributes),G.type=H;var ee={meta:k.meta||{},categories:k.categories||{},animatable:Boolean(k.animatable),type:H,attributes:S(G)};if(k.layoutAttributes){var re={};n(re,k.layoutAttributes),ee.layoutAttributes=S(re)}return k.animatable||B.crawl(ee,function(ie){B.isValObject(ie)&&"anim"in ie&&delete ie.anim}),ee}function D(){var H={},k,V;n(H,_);for(k in d.subplotsRegistry)if(V=d.subplotsRegistry[k],!!V.layoutAttributes)if(Array.isArray(V.attr))for(var G=0;G<V.attr.length;G++)O(H,V,V.attr[G]);else{var U=V.attr==="subplot"?V.name:V.attr;O(H,V,U)}for(k in d.componentsRegistry){V=d.componentsRegistry[k];var Y=V.schema;if(Y&&(Y.subplots||Y.layout)){var ee=Y.subplots;if(ee&&ee.xaxis&&!ee.yaxis)for(var re in ee.xaxis)delete H.yaxis[re];delete H.xaxis.shift,delete H.xaxis.autoshift}else V.name==="colorscale"?n(H,V.layoutAttributes):V.layoutAttributes&&N(H,V.layoutAttributes,V.name)}return{layoutAttributes:S(H)}}function A(H){var k=d.transformsRegistry[H],V=n({},k.attributes);return Object.keys(d.componentsRegistry).forEach(function(G){var U=d.componentsRegistry[G];U.schema&&U.schema.transforms&&U.schema.transforms[H]&&Object.keys(U.schema.transforms[H]).forEach(function(Y){N(V,U.schema.transforms[H][Y],Y)})}),{attributes:S(V)}}function C(){var H={frames:n({},x)};return S(H),H.frames}function S(H){return o(H),R(H),T(H),H}function o(H){function k(G){return{valType:"string",editType:"none"}}function V(G,U,Y){B.isValObject(G)?(G.arrayOk===!0||G.valType==="data_array")&&(Y[U+"src"]=k()):u(G)&&(G.role="object")}B.crawl(H,V)}function R(H){function k(V,G,U){if(V){var Y=V[b];Y&&(delete V[b],U[G]={items:{}},U[G].items[Y]=V,U[G].role="object")}}B.crawl(H,k)}function T(H){function k(V){for(var G in V)if(u(V[G]))k(V[G]);else if(Array.isArray(V[G]))for(var U=0;U<V[G].length;U++)k(V[G][U]);else V[G]instanceof RegExp&&(V[G]=V[G].toString())}k(H)}function O(H,k,V){var G=f(H,V),U=n({},k.layoutAttributes);U[h]=!0,G.set(U)}function N(H,k,V){var G=f(H,V);G.set(n(G.get()||{},k))}},44467:function(z,B,e){var d=e(71828),P=e(9012),a="templateitemname",_={name:{valType:"string",editType:"none"}};_[a]={valType:"string",editType:"calc"},B.templatedArray=function(y,r){return r._isLinkedToArray=y,r.name=_.name,r[a]=_[a],r},B.traceTemplater=function(y){var r={},n,u;for(n in y)u=y[n],Array.isArray(u)&&u.length&&(r[n]=0);function i(f){n=d.coerce(f,{},P,"type");var g={type:n,_template:null};if(n in r){u=y[n];var h=r[n]%u.length;r[n]++,g._template=u[h]}return g}return{newTrace:i}},B.newContainer=function(y,r,n){var u=y._template,i=u&&(u[r]||n&&u[n]);d.isPlainObject(i)||(i=null);var f=y[r]={_template:i};return f},B.arrayTemplater=function(y,r,n){var u=y._template,i=u&&u[v(r)],f=u&&u[r];(!Array.isArray(f)||!f.length)&&(f=[]);var g={};function h(p){var E={name:p.name,_input:p},c=E[a]=p[a];if(!x(c))return E._template=i,E;for(var l=0;l<f.length;l++){var m=f[l];if(m.name===c)return g[c]=1,E._template=m,E}return E[n]=p[n]||!1,E._template=!1,E}function b(){for(var p=[],E=0;E<f.length;E++){var c=f[E],l=c.name;if(x(l)&&!g[l]){var m={_template:c,name:l,_input:{_templateitemname:l}};m[a]=c[a],p.push(m),g[l]=1}}return p}return{newItem:h,defaultItems:b}};function x(y){return y&&typeof y=="string"}function v(y){var r=y.length-1;return y.charAt(r)!=="s"&&d.warn("bad argument to arrayDefaultKey: "+y),y.substr(0,y.length-1)+"defaults"}B.arrayDefaultKey=v,B.arrayEditor=function(y,r,n){var u=(d.nestedProperty(y,r).get()||[]).length,i=n._index,f=i>=u&&(n._input||{})._templateitemname;f&&(i=u);var g=r+"["+i+"]",h;function b(){h={},f&&(h[g]={},h[g][a]=f)}b();function p(m,M){h[m]=M}function E(m,M){f?d.nestedProperty(h[g],m).set(M):h[g+"."+m]=M}function c(){var m=h;return b(),m}function l(m,M){m&&E(m,M);var L=c();for(var D in L)d.nestedProperty(y,D).set(L[D])}return{modifyBase:p,modifyItem:E,getUpdateObj:c,applyUpdate:l}}},61549:function(z,B,e){var d=e(39898),P=e(73972),a=e(74875),_=e(71828),x=e(33306),v=e(7901),y=e(91424),r=e(92998),n=e(64168),u=e(89298),i=e(18783),f=e(99082),g=f.enforce,h=f.clean,b=e(71739).doAutoRange,p="start",E="middle",c="end";B.layoutStyles=function(R){return _.syncOrAsync([a.doAutoMargin,m],R)};function l(R,T,O){for(var N=0;N<O.length;N++){var H=O[N][0],k=O[N][1];if(!(H[0]>=R[1]||H[1]<=R[0])&&k[0]<T[1]&&k[1]>T[0])return!0}return!1}function m(R){var T=R._fullLayout,O=T._size,N=O.p,H=u.list(R,"",!0),k,V,G,U,Y,ee;if(T._paperdiv.style({width:R._context.responsive&&T.autosize&&!R._context._hasZeroWidth&&!R.layout.width?"100%":T.width+"px",height:R._context.responsive&&T.autosize&&!R._context._hasZeroHeight&&!R.layout.height?"100%":T.height+"px"}).selectAll(".main-svg").call(y.setSize,T.width,T.height),R._context.setBackground(R,T.paper_bgcolor),B.drawMainTitle(R),n.manage(R),!T._has("cartesian"))return a.previousPromises(R);function re(Ue,ze,rt){var lt=Ue._lw/2;if(Ue._id.charAt(0)==="x"){if(ze){if(rt==="top")return ze._offset-N-lt}else return O.t+O.h*(1-(Ue.position||0))+lt%1;return ze._offset+ze._length+N+lt}if(ze){if(rt==="right")return ze._offset+ze._length+N+lt}else return O.l+O.w*(Ue.position||0)+lt%1;return ze._offset-N-lt}for(k=0;k<H.length;k++){U=H[k];var ie=U._anchorAxis;U._linepositions={},U._lw=y.crispRound(R,U.linewidth,1),U._mainLinePosition=re(U,ie,U.side),U._mainMirrorPosition=U.mirror&&ie?re(U,ie,i.OPPOSITE_SIDE[U.side]):null}var se=[],ce=[],q=[],j=v.opacity(T.paper_bgcolor)===1&&v.opacity(T.plot_bgcolor)===1&&T.paper_bgcolor===T.plot_bgcolor;for(V in T._plots)if(G=T._plots[V],G.mainplot)G.bg&&G.bg.remove(),G.bg=void 0;else{var Z=G.xaxis.domain,Q=G.yaxis.domain,ue=G.plotgroup;if(l(Z,Q,q)){var fe=ue.node(),te=G.bg=_.ensureSingle(ue,"rect","bg");fe.insertBefore(te.node(),fe.childNodes[0]),ce.push(V)}else ue.select("rect.bg").remove(),q.push([Z,Q]),j||(se.push(V),ce.push(V))}var ne=T._bgLayer.selectAll(".bg").data(se);for(ne.enter().append("rect").classed("bg",!0),ne.exit().remove(),ne.each(function(Ue){T._plots[Ue].bg=d.select(this)}),k=0;k<ce.length;k++)G=T._plots[ce[k]],Y=G.xaxis,ee=G.yaxis,G.bg&&Y._offset!==void 0&&ee._offset!==void 0&&G.bg.call(y.setRect,Y._offset-N,ee._offset-N,Y._length+2*N,ee._length+2*N).call(v.fill,T.plot_bgcolor).style("stroke-width",0);if(!T._hasOnlyLargeSploms)for(V in T._plots){G=T._plots[V],Y=G.xaxis,ee=G.yaxis;var ve=G.clipId="clip"+T._uid+V+"plot",le=_.ensureSingleById(T._clips,"clipPath",ve,function(Ue){Ue.classed("plotclip",!0).append("rect")});G.clipRect=le.select("rect").attr({width:Y._length,height:ee._length}),y.setTranslate(G.plot,Y._offset,ee._offset);var xe,Se;G._hasClipOnAxisFalse?(xe=null,Se=ve):(xe=ve,Se=null),y.setClipUrl(G.plot,xe,R),G.layerClipId=Se}var Re,Ee,Oe,Be,Le,Te,De,Ve,Ye,Ne,Xe,ht,st;function it(Ue){return"M"+Re+","+Ue+"H"+Ee}function nt(Ue){return"M"+Y._offset+","+Ue+"h"+Y._length}function pt(Ue){return"M"+Ue+","+Ve+"V"+De}function Tt(Ue){return ee._shift!==void 0&&(Ue+=ee._shift),"M"+Ue+","+ee._offset+"v"+ee._length}function Et(Ue,ze,rt){if(!Ue.showline||V!==Ue._mainSubplot)return"";if(!Ue._anchorAxis)return rt(Ue._mainLinePosition);var lt=ze(Ue._mainLinePosition);return Ue.mirror&&(lt+=ze(Ue._mainMirrorPosition)),lt}for(V in T._plots){G=T._plots[V],Y=G.xaxis,ee=G.yaxis;var Dt="M0,0";M(Y,V)&&(Le=D(Y,"left",ee,H),Re=Y._offset-(Le?N+Le:0),Te=D(Y,"right",ee,H),Ee=Y._offset+Y._length+(Te?N+Te:0),Oe=re(Y,ee,"bottom"),Be=re(Y,ee,"top"),st=!Y._anchorAxis||V!==Y._mainSubplot,st&&(Y.mirror==="allticks"||Y.mirror==="all")&&(Y._linepositions[V]=[Oe,Be]),Dt=Et(Y,it,nt),st&&Y.showline&&(Y.mirror==="all"||Y.mirror==="allticks")&&(Dt+=it(Oe)+it(Be)),G.xlines.style("stroke-width",Y._lw+"px").call(v.stroke,Y.showline?Y.linecolor:"rgba(0,0,0,0)")),G.xlines.attr("d",Dt);var et="M0,0";M(ee,V)&&(Xe=D(ee,"bottom",Y,H),De=ee._offset+ee._length+(Xe?N:0),ht=D(ee,"top",Y,H),Ve=ee._offset-(ht?N:0),Ye=re(ee,Y,"left"),Ne=re(ee,Y,"right"),st=!ee._anchorAxis||V!==ee._mainSubplot,st&&(ee.mirror==="allticks"||ee.mirror==="all")&&(ee._linepositions[V]=[Ye,Ne]),et=Et(ee,pt,Tt),st&&ee.showline&&(ee.mirror==="all"||ee.mirror==="allticks")&&(et+=pt(Ye)+pt(Ne)),G.ylines.style("stroke-width",ee._lw+"px").call(v.stroke,ee.showline?ee.linecolor:"rgba(0,0,0,0)")),G.ylines.attr("d",et)}return u.makeClipPaths(R),a.previousPromises(R)}function M(R,T){return(R.ticks||R.showline)&&(T===R._mainSubplot||R.mirror==="all"||R.mirror==="allticks")}function L(R,T,O){if(!O.showline||!O._lw)return!1;if(O.mirror==="all"||O.mirror==="allticks")return!0;var N=O._anchorAxis;if(!N)return!1;var H=i.FROM_BL[T];return O.side===T?N.domain[H]===R.domain[H]:O.mirror&&N.domain[1-H]===R.domain[1-H]}function D(R,T,O,N){if(L(R,T,O))return O._lw;for(var H=0;H<N.length;H++){var k=N[H];if(k._mainAxis===O._mainAxis&&L(R,T,k))return k._lw}return 0}B.drawMainTitle=function(R){var T=R._fullLayout,O=S(T),N=o(T);r.draw(R,"gtitle",{propContainer:T,propName:"title.text",placeholder:T._dfltTitle.plot,attributes:{x:A(T,O),y:C(T,N),"text-anchor":O,dy:N}})};function A(R,T){var O=R.title,N=R._size,H=0;switch(T===p?H=O.pad.l:T===c&&(H=-O.pad.r),O.xref){case"paper":return N.l+N.w*O.x+H;case"container":default:return R.width*O.x+H}}function C(R,T){var O=R.title,N=R._size,H=0;if(T==="0em"||!T?H=-O.pad.b:T===i.CAP_SHIFT+"em"&&(H=O.pad.t),O.y==="auto")return N.t/2;switch(O.yref){case"paper":return N.t+N.h-N.h*O.y+H;case"container":default:return R.height-R.height*O.y+H}}function S(R){var T=R.title,O=E;return _.isRightAnchor(T)?O=c:_.isLeftAnchor(T)&&(O=p),O}function o(R){var T=R.title,O="0em";return _.isTopAnchor(T)?O=i.CAP_SHIFT+"em":_.isMiddleAnchor(T)&&(O=i.MID_SHIFT+"em"),O}B.doTraceStyle=function(R){var T=R.calcdata,O=[],N;for(N=0;N<T.length;N++){var H=T[N],k=H[0]||{},V=k.trace||{},G=V._module||{},U=G.arraysToCalcdata;U&&U(H,V);var Y=G.editStyle;Y&&O.push({fn:Y,cd0:k})}if(O.length){for(N=0;N<O.length;N++){var ee=O[N];ee.fn(R,ee.cd0)}x(R),B.redrawReglTraces(R)}return a.style(R),P.getComponentMethod("legend","draw")(R),a.previousPromises(R)},B.doColorBars=function(R){return P.getComponentMethod("colorbar","draw")(R),a.previousPromises(R)},B.layoutReplot=function(R){var T=R.layout;return R.layout=void 0,P.call("_doPlot",R,"",T)},B.doLegend=function(R){return P.getComponentMethod("legend","draw")(R),a.previousPromises(R)},B.doTicksRelayout=function(R){return u.draw(R,"redraw"),R._fullLayout._hasOnlyLargeSploms&&(P.subplotsRegistry.splom.updateGrid(R),x(R),B.redrawReglTraces(R)),B.drawMainTitle(R),a.previousPromises(R)},B.doModeBar=function(R){var T=R._fullLayout;n.manage(R);for(var O=0;O<T._basePlotModules.length;O++){var N=T._basePlotModules[O].updateFx;N&&N(R)}return a.previousPromises(R)},B.doCamera=function(R){for(var T=R._fullLayout,O=T._subplots.gl3d,N=0;N<O.length;N++){var H=T[O[N]],k=H._scene;k.setViewport(H)}},B.drawData=function(R){var T=R._fullLayout;x(R);for(var O=T._basePlotModules,N=0;N<O.length;N++)O[N].plot(R);return B.redrawReglTraces(R),a.style(R),P.getComponentMethod("selections","draw")(R),P.getComponentMethod("shapes","draw")(R),P.getComponentMethod("annotations","draw")(R),P.getComponentMethod("images","draw")(R),T._replotting=!1,a.previousPromises(R)},B.redrawReglTraces=function(R){var T=R._fullLayout;if(T._has("regl")){var O=R._fullData,N=[],H=[],k,V;for(T._hasOnlyLargeSploms&&T._splomGrid.draw(),k=0;k<O.length;k++){var G=O[k];G.visible===!0&&G._length!==0&&(G.type==="splom"?T._splomScenes[G.uid].draw():G.type==="scattergl"?_.pushUnique(N,G.xaxis+G.yaxis):G.type==="scatterpolargl"&&_.pushUnique(H,G.subplot))}for(k=0;k<N.length;k++)V=T._plots[N[k]],V._scene&&V._scene.draw();for(k=0;k<H.length;k++)V=T[H[k]]._subplot,V._scene&&V._scene.draw()}},B.doAutoRangeAndConstraints=function(R){for(var T=u.list(R,"",!0),O,N={},H=0;H<T.length;H++)if(O=T[H],!N[O._id]){N[O._id]=1,h(R,O),b(R,O);var k=O._matchGroup;if(k)for(var V in k){var G=u.getFromId(R,V);b(R,G,O.range),N[V]=1}}g(R)},B.finalDraw=function(R){P.getComponentMethod("rangeslider","draw")(R),P.getComponentMethod("rangeselector","draw")(R)},B.drawMarginPushers=function(R){P.getComponentMethod("legend","draw")(R),P.getComponentMethod("rangeselector","draw")(R),P.getComponentMethod("sliders","draw")(R),P.getComponentMethod("updatemenus","draw")(R),P.getComponentMethod("colorbar","draw")(R)}},96318:function(z,B,e){var d=e(71828),P=d.isPlainObject,a=e(86281),_=e(74875),x=e(9012),v=e(44467),y=e(72075).dfltConfig;B.makeTemplate=function(p){p=d.isPlainObject(p)?p:d.getGraphDiv(p),p=d.extendDeep({_context:y},{data:p.data,layout:p.layout}),_.supplyDefaults(p);var E=p.data||[],c=p.layout||{};c._basePlotModules=p._fullLayout._basePlotModules,c._modules=p._fullLayout._modules;var l={data:{},layout:{}};E.forEach(function(T){var O={};u(T,O,f.bind(null,T));var N=d.coerce(T,{},x,"type"),H=l.data[N];H||(H=l.data[N]=[]),H.push(O)}),u(c,l.layout,i.bind(null,c)),delete l.layout.template;var m=c.template;if(P(m)){var M=m.layout,L,D,A,C,S,o;P(M)&&r(M,l.layout);var R=m.data;if(P(R)){for(D in l.data)if(A=R[D],Array.isArray(A)){for(S=l.data[D],o=S.length,C=A.length,L=0;L<o;L++)r(A[L%C],S[L]);for(L=o;L<C;L++)S.push(d.extendDeep({},A[L]))}for(D in R)D in l.data||(l.data[D]=d.extendDeep([],R[D]))}}return l};function r(p,E){p=d.extendDeep({},p);var c=Object.keys(p).sort(),l,m;function M(S,o,R){if(P(o)&&P(S))r(S,o);else if(Array.isArray(o)&&Array.isArray(S)){var T=v.arrayTemplater({_template:p},R);for(m=0;m<o.length;m++){var O=o[m],N=T.newItem(O)._template;N&&r(N,O)}var H=T.defaultItems();for(m=0;m<H.length;m++)o.push(H[m]._template);for(m=0;m<o.length;m++)delete o[m].templateitemname}}for(l=0;l<c.length;l++){var L=c[l],D=p[L];if(L in E?M(D,E[L],L):E[L]=D,n(L)===L)for(var A in E){var C=n(A);A!==C&&C===L&&!(A in p)&&M(D,E[A],L)}}}function n(p){return p.replace(/[0-9]+$/,"")}function u(p,E,c,l,m){var M=m&&c(m);for(var L in p){var D=p[L],A=g(p,L,l),C=g(p,L,m),S=c(C);if(!S){var o=n(L);o!==L&&(C=g(p,o,m),S=c(C))}if(!(M&&M===S)&&!(!S||S._noTemplating||S.valType==="data_array"||S.arrayOk&&Array.isArray(D)))if(!S.valType&&P(D))u(D,E,c,A,C);else if(S._isLinkedToArray&&Array.isArray(D))for(var R=!1,T=0,O={},N=0;N<D.length;N++){var H=D[N];if(P(H)){var k=H.name;if(k)O[k]||(u(H,E,c,g(D,T,A),g(D,T,C)),T++,O[k]=1);else if(!R){var V=v.arrayDefaultKey(L),G=g(p,V,l),U=g(D,T,A);u(H,E,c,U,g(D,T,C));var Y=d.nestedProperty(E,U),ee=d.nestedProperty(E,G);ee.set(Y.get()),Y.set(null),R=!0}}}else{var re=d.nestedProperty(E,A);re.set(D)}}}function i(p,E){return a.getLayoutValObject(p,d.nestedProperty({},E).parts)}function f(p,E){return a.getTraceValObject(p,d.nestedProperty({},E).parts)}function g(p,E,c){var l;return c?Array.isArray(p)?l=c+"["+E+"]":l=c+"."+E:l=E,l}B.validateTemplate=function(p,E){var c=d.extendDeep({},{_context:y,data:p.data,layout:p.layout}),l=c.layout||{};P(E)||(E=l.template||{});var m=E.layout,M=E.data,L=[];c.layout=l,c.layout.template=E,_.supplyDefaults(c);var D=c._fullLayout,A=c._fullData,C={};function S(G,U){for(var Y in G)if(Y.charAt(0)!=="_"&&P(G[Y])){var ee=n(Y),re=[],ie;for(ie=0;ie<U.length;ie++)re.push(g(G,Y,U[ie])),ee!==Y&&re.push(g(G,ee,U[ie]));for(ie=0;ie<re.length;ie++)C[re[ie]]=1;S(G[Y],re)}}function o(G,U){for(var Y in G)if(Y.indexOf("defaults")===-1&&P(G[Y])){var ee=g(G,Y,U);C[ee]?o(G[Y],ee):L.push({code:"unused",path:ee})}}if(P(m)?(S(D,["layout"]),o(m,"layout")):L.push({code:"layout"}),!P(M))L.push({code:"data"});else{for(var R={},T,O=0;O<A.length;O++){var N=A[O];T=N.type,R[T]=(R[T]||0)+1,N._fullInput._template||L.push({code:"missing",index:N._fullInput.index,traceType:T})}for(T in M){var H=M[T].length,k=R[T]||0;H>k?L.push({code:"unused",traceType:T,templateCount:H,dataCount:k}):k>H&&L.push({code:"reused",traceType:T,templateCount:H,dataCount:k})}}function V(G,U){for(var Y in G)if(Y.charAt(0)!=="_"){var ee=G[Y],re=g(G,Y,U);P(ee)?(Array.isArray(G)&&ee._template===!1&&ee.templateitemname&&L.push({code:"missing",path:re,templateitemname:ee.templateitemname}),V(ee,re)):Array.isArray(ee)&&h(ee)&&V(ee,re)}}if(V({data:A,layout:D},""),L.length)return L.map(b)};function h(p){for(var E=0;E<p.length;E++)if(P(p[E]))return!0}function b(p){var E;switch(p.code){case"data":E="The template has no key data.";break;case"layout":E="The template has no key layout.";break;case"missing":p.path?E="There are no templates for item "+p.path+" with name "+p.templateitemname:E="There are no templates for trace "+p.index+", of type "+p.traceType+".";break;case"unused":p.path?E="The template item at "+p.path+" was not used in constructing the plot.":p.dataCount?E="Some of the templates of type "+p.traceType+" were not used. The template has "+p.templateCount+" traces, the data only has "+p.dataCount+" of this type.":E="The template has "+p.templateCount+" traces of type "+p.traceType+" but there are none in the data.";break;case"reused":E="Some of the templates of type "+p.traceType+" were used more than once. The template has "+p.templateCount+" traces, the data has "+p.dataCount+" of this type.";break}return p.msg=E,p}},403:function(z,B,e){var d=e(92770),P=e(72391),a=e(74875),_=e(71828),x=e(25095),v=e(5900),y=e(70942),r=e(11506).version,n={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};function u(i,f){f=f||{};var g,h,b,p;_.isPlainObject(i)?(g=i.data||[],h=i.layout||{},b=i.config||{},p={}):(i=_.getGraphDiv(i),g=_.extendDeep([],i.data),h=_.extendDeep({},i.layout),b=i._context,p=i._fullLayout||{});function E(k){return!(k in f)||_.validate(f[k],n[k])}if(!E("width")&&f.width!==null||!E("height")&&f.height!==null)throw new Error("Height and width should be pixel values.");if(!E("format"))throw new Error("Export format is not "+_.join2(n.format.values,", "," or ")+".");var c={};function l(k,V){return _.coerce(f,c,n,k,V)}var m=l("format"),M=l("width"),L=l("height"),D=l("scale"),A=l("setBackground"),C=l("imageDataOnly"),S=document.createElement("div");S.style.position="absolute",S.style.left="-5000px",document.body.appendChild(S);var o=_.extendFlat({},h);M?o.width=M:f.width===null&&d(p.width)&&(o.width=p.width),L?o.height=L:f.height===null&&d(p.height)&&(o.height=p.height);var R=_.extendFlat({},b,{_exportedPlot:!0,staticPlot:!0,setBackground:A}),T=x.getRedrawFunc(S);function O(){return new Promise(function(k){setTimeout(k,x.getDelay(S._fullLayout))})}function N(){return new Promise(function(k,V){var G=v(S,m,D),U=S._fullLayout.width,Y=S._fullLayout.height;function ee(){P.purge(S),document.body.removeChild(S)}if(m==="full-json"){var re=a.graphJson(S,!1,"keepdata","object",!0,!0);return re.version=r,re=JSON.stringify(re),ee(),k(C?re:x.encodeJSON(re))}if(ee(),m==="svg")return k(C?G:x.encodeSVG(G));var ie=document.createElement("canvas");ie.id=_.randstr(),y({format:m,width:U,height:Y,scale:D,canvas:ie,svg:G,promise:!0}).then(k).catch(V)})}function H(k){return C?k.replace(x.IMAGE_URL_PREFIX,""):k}return new Promise(function(k,V){P.newPlot(S,g,o,R).then(T).then(O).then(N).then(function(G){k(H(G))}).catch(function(G){V(G)})})}z.exports=u},84936:function(z,B,e){var d=e(71828),P=e(74875),a=e(86281),_=e(72075).dfltConfig,x=d.isPlainObject,v=Array.isArray,y=d.isArrayOrTypedArray;z.exports=function(l,m){l===void 0&&(l=[]),m===void 0&&(m={});var M=a.get(),L=[],D={_context:d.extendFlat({},_)},A,C;v(l)?(D.data=d.extendDeep([],l),A=l):(D.data=[],A=[],L.push(f("array","data"))),x(m)?(D.layout=d.extendDeep({},m),C=m):(D.layout={},C={},arguments.length>1&&L.push(f("object","layout"))),P.supplyDefaults(D);for(var S=D._fullData,o=A.length,R=0;R<o;R++){var T=A[R],O=["data",R];if(!x(T)){L.push(f("object",O));continue}var N=S[R],H=N.type,k=M.traces[H].attributes;k.type={valType:"enumerated",values:[H]},N.visible===!1&&T.visible!==!1&&L.push(f("invisible",O)),r(T,N,k,L,O);var V=T.transforms,G=N.transforms;if(V){v(V)||L.push(f("array",O,["transforms"])),O.push("transforms");for(var U=0;U<V.length;U++){var Y=["transforms",U],ee=V[U].type;if(!x(V[U])){L.push(f("object",O,Y));continue}var re=M.transforms[ee]?M.transforms[ee].attributes:{};re.type={valType:"enumerated",values:Object.keys(M.transforms)},r(V[U],G[U],re,L,O,Y)}}}var ie=D._fullLayout,se=n(M,S);return r(C,ie,se,L,"layout"),L.length===0?void 0:L};function r(c,l,m,M,L,D){D=D||[];for(var A=Object.keys(c),C=0;C<A.length;C++){var S=A[C];if(S!=="transforms"){var o=D.slice();o.push(S);var R=c[S],T=l[S],O=h(m,S),N=(O||{}).valType,H=N==="info_array",k=N==="colorscale",V=(O||{}).items;if(!g(m,S))M.push(f("schema",L,o));else if(x(R)&&x(T)&&N!=="any")r(R,T,O,M,L,o);else if(H&&v(R)){R.length>T.length&&M.push(f("unused",L,o.concat(T.length)));var G=T.length,U=Array.isArray(V);U&&(G=Math.min(G,V.length));var Y,ee,re,ie,se;if(O.dimensions===2)for(ee=0;ee<G;ee++)if(v(R[ee])){R[ee].length>T[ee].length&&M.push(f("unused",L,o.concat(ee,T[ee].length)));var ce=T[ee].length;for(Y=0;Y<(U?Math.min(ce,V[ee].length):ce);Y++)re=U?V[ee][Y]:V,ie=R[ee][Y],se=T[ee][Y],d.validate(ie,re)?se!==ie&&se!==+ie&&M.push(f("dynamic",L,o.concat(ee,Y),ie,se)):M.push(f("value",L,o.concat(ee,Y),ie))}else M.push(f("array",L,o.concat(ee),R[ee]));else for(ee=0;ee<G;ee++)re=U?V[ee]:V,ie=R[ee],se=T[ee],d.validate(ie,re)?se!==ie&&se!==+ie&&M.push(f("dynamic",L,o.concat(ee),ie,se)):M.push(f("value",L,o.concat(ee),ie))}else if(O.items&&!H&&v(R)){var q=V[Object.keys(V)[0]],j=[],Z,Q;for(Z=0;Z<T.length;Z++){var ue=T[Z]._index||Z;if(Q=o.slice(),Q.push(ue),x(R[ue])&&x(T[Z])){j.push(ue);var fe=R[ue],te=T[Z];x(fe)&&fe.visible!==!1&&te.visible===!1?M.push(f("invisible",L,Q)):r(fe,te,q,M,L,Q)}}for(Z=0;Z<R.length;Z++)Q=o.slice(),Q.push(Z),x(R[Z])?j.indexOf(Z)===-1&&M.push(f("unused",L,Q)):M.push(f("object",L,Q,R[Z]))}else!x(R)&&x(T)?M.push(f("object",L,o,R)):!y(R)&&y(T)&&!H&&!k?M.push(f("array",L,o,R)):S in l?d.validate(R,O)?O.valType==="enumerated"&&(O.coerceNumber&&R!==+T||R!==T)&&M.push(f("dynamic",L,o,R,T)):M.push(f("value",L,o,R)):M.push(f("unused",L,o,R))}}return M}function n(c,l){for(var m=c.layout.layoutAttributes,M=0;M<l.length;M++){var L=l[M],D=c.traces[L.type],A=D.layoutAttributes;A&&(L.subplot?d.extendFlat(m[D.attributes.subplot.dflt],A):d.extendFlat(m,A))}return m}var u={object:function(c,l){var m;return c==="layout"&&l===""?m="The layout argument":c[0]==="data"&&l===""?m="Trace "+c[1]+" in the data argument":m=i(c)+"key "+l,m+" must be linked to an object container"},array:function(c,l){var m;return c==="data"?m="The data argument":m=i(c)+"key "+l,m+" must be linked to an array container"},schema:function(c,l){return i(c)+"key "+l+" is not part of the schema"},unused:function(c,l,m){var M=x(m)?"container":"key";return i(c)+M+" "+l+" did not get coerced"},dynamic:function(c,l,m,M){return[i(c)+"key",l,"(set to '"+m+"')","got reset to","'"+M+"'","during defaults."].join(" ")},invisible:function(c,l){return(l?i(c)+"item "+l:"Trace "+c[1])+" got defaulted to be not visible"},value:function(c,l,m){return[i(c)+"key "+l,"is set to an invalid value ("+m+")"].join(" ")}};function i(c){return v(c)?"In data trace "+c[1]+", ":"In "+c+", "}function f(c,l,m,M,L){m=m||"";var D,A;v(l)?(D=l[0],A=l[1]):(D=l,A=null);var C=E(m),S=u[c](l,C,M,L);return d.log(S),{code:c,container:D,trace:A,path:m,astr:C,msg:S}}function g(c,l){var m=p(l),M=m.keyMinusId,L=m.id;return M in c&&c[M]._isSubplotObj&&L?!0:l in c}function h(c,l){if(l in c)return c[l];var m=p(l);return c[m.keyMinusId]}var b=d.counterRegex("([a-z]+)");function p(c){var l=c.match(b);return{keyMinusId:l&&l[1],id:l&&l[2]}}function E(c){if(!v(c))return String(c);for(var l="",m=0;m<c.length;m++){var M=c[m];typeof M=="number"?l=l.substr(0,l.length-1)+"["+M+"]":l+=M,m<c.length-1&&(l+=".")}return l}},85594:function(z){z.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}},85501:function(z,B,e){var d=e(71828),P=e(44467);z.exports=function(_,x,v){var y=v.name,r=v.inclusionAttr||"visible",n=x[y],u=d.isArrayOrTypedArray(_[y])?_[y]:[],i=x[y]=[],f=P.arrayTemplater(x,y,r),g,h;for(g=0;g<u.length;g++){var b=u[g];d.isPlainObject(b)?h=f.newItem(b):(h=f.newItem({}),h[r]=!1),h._index=g,h[r]!==!1&&v.handleItemDefaults(b,h,x,v),i.push(h)}var p=f.defaultItems();for(g=0;g<p.length;g++)h=p[g],h._index=i.length,v.handleItemDefaults({},h,x,v,{}),i.push(h);if(d.isArrayOrTypedArray(n)){var E=Math.min(n.length,i.length);for(g=0;g<E;g++)d.relinkPrivateKeys(i[g],n[g])}return i}},9012:function(z,B,e){var d=e(41940),P=e(77914);z.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:d({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:P.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc"},uirevision:{valType:"any",editType:"none"}}},42973:function(z,B,e){var d=e(92770),P=e(71828),a=P.dateTime2ms,_=P.incrementMonth,x=e(50606),v=x.ONEAVGMONTH;z.exports=function(r,n,u,i){if(n.type!=="date")return{vals:i};var f=r[u+"periodalignment"];if(!f)return{vals:i};var g=r[u+"period"],h;if(d(g)){if(g=+g,g<=0)return{vals:i}}else if(typeof g=="string"&&g.charAt(0)==="M"){var b=+g.substring(1);if(b>0&&Math.round(b)===b)h=b;else return{vals:i}}for(var p=n.calendar,E=f==="start",c=f==="end",l=r[u+"period0"],m=a(l,p)||0,M=[],L=[],D=[],A=i.length,C=0;C<A;C++){var S=i[C],o,R,T;if(h){for(o=Math.round((S-m)/(h*v)),T=_(m,h*o,p);T>S;)T=_(T,-h,p);for(;T<=S;)T=_(T,h,p);R=_(T,-h,p)}else{for(o=Math.round((S-m)/g),T=m+o*g;T>S;)T-=g;for(;T<=S;)T+=g;R=T-g}M[C]=E?R:c?T:(R+T)/2,L[C]=R,D[C]=T}return{vals:M,starts:L,ends:D}}},89502:function(z){z.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},71739:function(z,B,e){var d=e(39898),P=e(92770),a=e(71828),_=e(50606).FP_SAFE,x=e(73972),v=e(91424),y=e(41675),r=y.getFromId,n=y.isLinked;z.exports={getAutoRange:u,makePadFn:f,doAutoRange:p,findExtremes:E,concatExtremes:b};function u(A,C){var S,o,R=[],T=A._fullLayout,O=f(T,C,0),N=f(T,C,1),H=b(A,C),k=H.min,V=H.max;if(k.length===0||V.length===0)return a.simpleMap(C.range,C.r2l);var G=k[0].val,U=V[0].val;for(S=1;S<k.length&&G===U;S++)G=Math.min(G,k[S].val);for(S=1;S<V.length&&G===U;S++)U=Math.max(U,V[S].val);var Y=!1;if(C.range){var ee=a.simpleMap(C.range,C.r2l);Y=ee[1]<ee[0]}C.autorange==="reversed"&&(Y=!0,C.autorange=!0);var re=C.rangemode,ie=re==="tozero",se=re==="nonnegative",ce=C._length,q=ce/10,j=0,Z,Q,ue,fe,te,ne;for(S=0;S<k.length;S++)for(Z=k[S],o=0;o<V.length;o++)Q=V[o],ne=Q.val-Z.val-i(C,Z.val,Q.val),ne>0&&(te=ce-O(Z)-N(Q),te>q?ne/te>j&&(ue=Z,fe=Q,j=ne/te):ne/ce>j&&(ue={val:Z.val,nopad:1},fe={val:Q.val,nopad:1},j=ne/ce));function ve(Ee,Oe){return Math.max(Ee,N(Oe))}if(G===U){var le=G-1,xe=G+1;if(ie)if(G===0)R=[0,1];else{var Se=(G>0?V:k).reduce(ve,0),Re=G/(1-Math.min(.5,Se/ce));R=G>0?[0,Re]:[Re,0]}else se?R=[Math.max(0,le),Math.max(1,xe)]:R=[le,xe]}else ie?(ue.val>=0&&(ue={val:0,nopad:1}),fe.val<=0&&(fe={val:0,nopad:1})):se&&(ue.val-j*O(ue)<0&&(ue={val:0,nopad:1}),fe.val<=0&&(fe={val:1,nopad:1})),j=(fe.val-ue.val-i(C,Z.val,Q.val))/(ce-O(ue)-N(fe)),R=[ue.val-j*O(ue),fe.val+j*N(fe)];return Y&&R.reverse(),a.simpleMap(R,C.l2r||Number)}function i(A,C,S){var o=0;if(A.rangebreaks)for(var R=A.locateBreaks(C,S),T=0;T<R.length;T++){var O=R[T];o+=O.max-O.min}return o}function f(A,C,S){var o=.05*C._length,R=C._anchorAxis||{};if((C.ticklabelposition||"").indexOf("inside")!==-1||(R.ticklabelposition||"").indexOf("inside")!==-1){var T=C.autorange==="reversed";if(!T){var O=a.simpleMap(C.range,C.r2l);T=O[1]<O[0]}T&&(S=!S)}var N=0;return n(A,C._id)||(N=h(A,C,S)),o=Math.max(N,o),C.constrain==="domain"&&C._inputDomain&&(o*=(C._inputDomain[1]-C._inputDomain[0])/(C.domain[1]-C.domain[0])),function(k){return k.nopad?0:k.pad+(k.extrapad?o:N)}}var g=3;function h(A,C,S){var o=0,R=C._id.charAt(0)==="x";for(var T in A._plots){var O=A._plots[T];if(!(C._id!==O.xaxis._id&&C._id!==O.yaxis._id)){var N=(R?O.yaxis:O.xaxis)||{};if((N.ticklabelposition||"").indexOf("inside")!==-1&&(!S&&(N.side==="left"||N.side==="bottom")||S&&(N.side==="top"||N.side==="right"))){if(N._vals){var H=a.deg2rad(N._tickAngles[N._id+"tick"]||0),k=Math.abs(Math.cos(H)),V=Math.abs(Math.sin(H));if(!N._vals[0].bb){var G=N._id+"tick",U=N._selections[G];U.each(function(ce){var q=d.select(this),j=q.select(".text-math-group");j.empty()&&(ce.bb=v.bBox(q.node()))})}for(var Y=0;Y<N._vals.length;Y++){var ee=N._vals[Y],re=ee.bb;if(re){var ie=2*g+re.width,se=2*g+re.height;o=Math.max(o,R?Math.max(ie*k,se*V):Math.max(se*k,ie*V))}}}N.ticks==="inside"&&N.ticklabelposition==="inside"&&(o+=N.ticklen||0)}}}return o}function b(A,C,S){var o=C._id,R=A._fullData,T=A._fullLayout,O=[],N=[],H,k,V;function G(ie,se){for(H=0;H<se.length;H++){var ce=ie[se[H]],q=(ce._extremes||{})[o];if(ce.visible===!0&&q){for(k=0;k<q.min.length;k++)V=q.min[k],c(O,V.val,V.pad,{extrapad:V.extrapad});for(k=0;k<q.max.length;k++)V=q.max[k],l(N,V.val,V.pad,{extrapad:V.extrapad})}}}if(G(R,C._traceIndices),G(T.annotations||[],C._annIndices||[]),G(T.shapes||[],C._shapeIndices||[]),C._matchGroup&&!S){for(var U in C._matchGroup)if(U!==C._id){var Y=r(A,U),ee=b(A,Y,!0),re=C._length/Y._length;for(k=0;k<ee.min.length;k++)V=ee.min[k],c(O,V.val,V.pad*re,{extrapad:V.extrapad});for(k=0;k<ee.max.length;k++)V=ee.max[k],l(N,V.val,V.pad*re,{extrapad:V.extrapad})}}return{min:O,max:N}}function p(A,C,S){if(C.setScale(),C.autorange){C.range=S?S.slice():u(A,C),C._r=C.range.slice(),C._rl=a.simpleMap(C._r,C.r2l);var o=C._input,R={};R[C._attr+".range"]=C.range,R[C._attr+".autorange"]=C.autorange,x.call("_storeDirectGUIEdit",A.layout,A._fullLayout._preGUI,R),o.range=C.range.slice(),o.autorange=C.autorange}var T=C._anchorAxis;if(T&&T.rangeslider){var O=T.rangeslider[C._name];O&&O.rangemode==="auto"&&(O.range=u(A,C)),T._input.rangeslider[C._name]=a.extendFlat({},O)}}function E(A,C,S){S||(S={}),A._m||A.setScale();var o=[],R=[],T=C.length,O=S.padded||!1,N=S.tozero&&(A.type==="linear"||A.type==="-"),H=A.type==="log",k=!1,V=S.vpadLinearized||!1,G,U,Y,ee,re,ie,se,ce,q;function j(le){if(Array.isArray(le))return k=!0,function(Se){return Math.max(Number(le[Se]||0),0)};var xe=Math.max(Number(le||0),0);return function(){return xe}}var Z=j((A._m>0?S.ppadplus:S.ppadminus)||S.ppad||0),Q=j((A._m>0?S.ppadminus:S.ppadplus)||S.ppad||0),ue=j(S.vpadplus||S.vpad),fe=j(S.vpadminus||S.vpad);if(!k){if(ce=1/0,q=-1/0,H)for(G=0;G<T;G++)U=C[G],U<ce&&U>0&&(ce=U),U>q&&U<_&&(q=U);else for(G=0;G<T;G++)U=C[G],U<ce&&U>-_&&(ce=U),U>q&&U<_&&(q=U);C=[ce,q],T=2}var te={tozero:N,extrapad:O};function ne(le){Y=C[le],P(Y)&&(ie=Z(le),se=Q(le),V?(ee=A.c2l(Y)-fe(le),re=A.c2l(Y)+ue(le)):(ce=Y-fe(le),q=Y+ue(le),H&&ce<q/10&&(ce=q/10),ee=A.c2l(ce),re=A.c2l(q)),N&&(ee=Math.min(0,ee),re=Math.max(0,re)),M(ee)&&c(o,ee,se,te),M(re)&&l(R,re,ie,te))}var ve=Math.min(6,T);for(G=0;G<ve;G++)ne(G);for(G=T-1;G>=ve;G--)ne(G);return{min:o,max:R,opts:S}}function c(A,C,S,o){m(A,C,S,o,L)}function l(A,C,S,o){m(A,C,S,o,D)}function m(A,C,S,o,R){for(var T=o.tozero,O=o.extrapad,N=!0,H=0;H<A.length&&N;H++){var k=A[H];if(R(k.val,C)&&k.pad>=S&&(k.extrapad||!O)){N=!1;break}else R(C,k.val)&&k.pad<=S&&(O||!k.extrapad)&&(A.splice(H,1),H--)}if(N){var V=T&&C===0;A.push({val:C,pad:V?0:S,extrapad:V?!1:O})}}function M(A){return P(A)&&Math.abs(A)<_}function L(A,C){return A<=C}function D(A,C){return A>=C}},89298:function(z,B,e){var d=e(39898),P=e(92770),a=e(74875),_=e(73972),x=e(71828),v=x.strTranslate,y=e(63893),r=e(92998),n=e(7901),u=e(91424),i=e(13838),f=e(66287),g=e(50606),h=g.ONEMAXYEAR,b=g.ONEAVGYEAR,p=g.ONEMINYEAR,E=g.ONEMAXQUARTER,c=g.ONEAVGQUARTER,l=g.ONEMINQUARTER,m=g.ONEMAXMONTH,M=g.ONEAVGMONTH,L=g.ONEMINMONTH,D=g.ONEWEEK,A=g.ONEDAY,C=A/2,S=g.ONEHOUR,o=g.ONEMIN,R=g.ONESEC,T=g.MINUS_SIGN,O=g.BADNUM,N={K:"zeroline"},H={K:"gridline",L:"path"},k={K:"minor-gridline",L:"path"},V={K:"tick",L:"path"},G={K:"tick",L:"text"},U={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},Y=e(18783),ee=Y.MID_SHIFT,re=Y.CAP_SHIFT,ie=Y.LINE_SPACING,se=Y.OPPOSITE_SIDE,ce=3,q=z.exports={};q.setConvert=e(21994);var j=e(4322),Z=e(41675),Q=Z.idSort,ue=Z.isLinked;q.id2name=Z.id2name,q.name2id=Z.name2id,q.cleanId=Z.cleanId,q.list=Z.list,q.listIds=Z.listIds,q.getFromId=Z.getFromId,q.getFromTrace=Z.getFromTrace;var fe=e(71739);q.getAutoRange=fe.getAutoRange,q.findExtremes=fe.findExtremes;var te=1e-4;function ne(Ke){var Ze=(Ke[1]-Ke[0])*te;return[Ke[0]-Ze,Ke[1]+Ze]}q.coerceRef=function(Ke,Ze,zt,kt,Qt,cr){var fr=kt.charAt(kt.length-1),ir=zt._fullLayout._subplots[fr+"axis"],Yt=kt+"ref",gr={};return Qt||(Qt=ir[0]||(typeof cr=="string"?cr:cr[0])),cr||(cr=Qt),ir=ir.concat(ir.map(function(yr){return yr+" domain"})),gr[Yt]={valType:"enumerated",values:ir.concat(cr?typeof cr=="string"?[cr]:cr:[]),dflt:Qt},x.coerce(Ke,Ze,gr,Yt)},q.getRefType=function(Ke){return Ke===void 0?Ke:Ke==="paper"?"paper":Ke==="pixel"?"pixel":/( domain)$/.test(Ke)?"domain":"range"},q.coercePosition=function(Ke,Ze,zt,kt,Qt,cr){var fr,ir,Yt=q.getRefType(kt);if(Yt!=="range")fr=x.ensureNumber,ir=zt(Qt,cr);else{var gr=q.getFromId(Ze,kt);cr=gr.fraction2r(cr),ir=zt(Qt,cr),fr=gr.cleanPos}Ke[Qt]=fr(ir)},q.cleanPosition=function(Ke,Ze,zt){var kt=zt==="paper"||zt==="pixel"?x.ensureNumber:q.getFromId(Ze,zt).cleanPos;return kt(Ke)},q.redrawComponents=function(Ke,Ze){Ze=Ze||q.listIds(Ke);var zt=Ke._fullLayout;function kt(Qt,cr,fr,ir){for(var Yt=_.getComponentMethod(Qt,cr),gr={},yr=0;yr<Ze.length;yr++)for(var Tr=zt[q.id2name(Ze[yr])],pr=Tr[fr],Kr=0;Kr<pr.length;Kr++){var Or=pr[Kr];if(!gr[Or]&&(Yt(Ke,Or),gr[Or]=1,ir))return}}kt("annotations","drawOne","_annIndices"),kt("shapes","drawOne","_shapeIndices"),kt("images","draw","_imgIndices",!0),kt("selections","drawOne","_selectionIndices")};var ve=q.getDataConversions=function(Ke,Ze,zt,kt){var Qt,cr=zt==="x"||zt==="y"||zt==="z"?zt:kt;if(Array.isArray(cr)){if(Qt={type:j(kt,void 0,{autotypenumbers:Ke._fullLayout.autotypenumbers}),_categories:[]},q.setConvert(Qt),Qt.type==="category")for(var fr=0;fr<kt.length;fr++)Qt.d2c(kt[fr])}else Qt=q.getFromTrace(Ke,Ze,cr);return Qt?{d2c:Qt.d2c,c2d:Qt.c2d}:cr==="ids"?{d2c:xe,c2d:xe}:{d2c:le,c2d:le}};function le(Ke){return+Ke}function xe(Ke){return String(Ke)}q.getDataToCoordFunc=function(Ke,Ze,zt,kt){return ve(Ke,Ze,zt,kt).d2c},q.counterLetter=function(Ke){var Ze=Ke.charAt(0);if(Ze==="x")return"y";if(Ze==="y")return"x"},q.minDtick=function(Ke,Ze,zt,kt){["log","category","multicategory"].indexOf(Ke.type)!==-1||!kt?Ke._minDtick=0:Ke._minDtick===void 0?(Ke._minDtick=Ze,Ke._forceTick0=zt):Ke._minDtick&&((Ke._minDtick/Ze+1e-6)%1<2e-6&&((zt-Ke._forceTick0)/Ze%1+1.000001)%1<2e-6?(Ke._minDtick=Ze,Ke._forceTick0=zt):((Ze/Ke._minDtick+1e-6)%1>2e-6||((zt-Ke._forceTick0)/Ke._minDtick%1+1.000001)%1>2e-6)&&(Ke._minDtick=0))},q.saveRangeInitial=function(Ke,Ze){for(var zt=q.list(Ke,"",!0),kt=!1,Qt=0;Qt<zt.length;Qt++){var cr=zt[Qt],fr=cr._rangeInitial===void 0,ir=fr||!(cr.range[0]===cr._rangeInitial[0]&&cr.range[1]===cr._rangeInitial[1]);(fr&&cr.autorange===!1||Ze&&ir)&&(cr._rangeInitial=cr.range.slice(),kt=!0)}return kt},q.saveShowSpikeInitial=function(Ke,Ze){for(var zt=q.list(Ke,"",!0),kt=!1,Qt="on",cr=0;cr<zt.length;cr++){var fr=zt[cr],ir=fr._showSpikeInitial===void 0,Yt=ir||fr.showspikes!==fr._showspikes;(ir||Ze&&Yt)&&(fr._showSpikeInitial=fr.showspikes,kt=!0),Qt==="on"&&!fr.showspikes&&(Qt="off")}return Ke._fullLayout._cartesianSpikesEnabled=Qt,kt},q.autoBin=function(Ke,Ze,zt,kt,Qt,cr){var fr=x.aggNums(Math.min,null,Ke),ir=x.aggNums(Math.max,null,Ke);if(Ze.type==="category"||Ze.type==="multicategory")return{start:fr-.5,end:ir+.5,size:Math.max(1,Math.round(cr)||1),_dataSpan:ir-fr};Qt||(Qt=Ze.calendar);var Yt;if(Ze.type==="log"?Yt={type:"linear",range:[fr,ir]}:Yt={type:Ze.type,range:x.simpleMap([fr,ir],Ze.c2r,0,Qt),calendar:Qt},q.setConvert(Yt),cr=cr&&f.dtick(cr,Yt.type),cr)Yt.dtick=cr,Yt.tick0=f.tick0(void 0,Yt.type,Qt);else{var gr;if(zt)gr=(ir-fr)/zt;else{var yr=x.distinctVals(Ke),Tr=Math.pow(10,Math.floor(Math.log(yr.minDiff)/Math.LN10)),pr=Tr*x.roundUp(yr.minDiff/Tr,[.9,1.9,4.9,9.9],!0);gr=Math.max(pr,2*x.stdev(Ke)/Math.pow(Ke.length,kt?.25:.4)),P(gr)||(gr=1)}q.autoTicks(Yt,gr)}var Kr=Yt.dtick,Or=q.tickIncrement(q.tickFirst(Yt),Kr,"reverse",Qt),Nr,Sn;if(typeof Kr=="number")Or=Se(Or,Ke,Yt,fr,ir),Sn=1+Math.floor((ir-Or)/Kr),Nr=Or+Sn*Kr;else for(Yt.dtick.charAt(0)==="M"&&(Or=Re(Or,Ke,Kr,fr,Qt)),Nr=Or,Sn=0;Nr<=ir;)Nr=q.tickIncrement(Nr,Kr,!1,Qt),Sn++;return{start:Ze.c2r(Or,0,Qt),end:Ze.c2r(Nr,0,Qt),size:Kr,_dataSpan:ir-fr}};function Se(Ke,Ze,zt,kt,Qt){var cr=0,fr=0,ir=0,Yt=0;function gr(Kr){return(1+(Kr-Ke)*100/zt.dtick)%100<2}for(var yr=0;yr<Ze.length;yr++)Ze[yr]%1===0?ir++:P(Ze[yr])||Yt++,gr(Ze[yr])&&cr++,gr(Ze[yr]+zt.dtick/2)&&fr++;var Tr=Ze.length-Yt;if(ir===Tr&&zt.type!=="date")zt.dtick<1?Ke=kt-.5*zt.dtick:(Ke-=.5,Ke+zt.dtick<kt&&(Ke+=zt.dtick));else if(fr<Tr*.1&&(cr>Tr*.3||gr(kt)||gr(Qt))){var pr=zt.dtick/2;Ke+=Ke+pr<kt?pr:-pr}return Ke}function Re(Ke,Ze,zt,kt,Qt){var cr=x.findExactDates(Ze,Qt),fr=.8;if(cr.exactDays>fr){var ir=Number(zt.substr(1));cr.exactYears>fr&&ir%12===0?Ke=q.tickIncrement(Ke,"M6","reverse")+A*1.5:cr.exactMonths>fr?Ke=q.tickIncrement(Ke,"M1","reverse")+A*15.5:Ke-=C;var Yt=q.tickIncrement(Ke,zt);if(Yt<=kt)return Yt}return Ke}q.prepMinorTicks=function(Ke,Ze,zt){if(!Ze.minor.dtick){delete Ke.dtick;var kt=Ze.dtick&&P(Ze._tmin),Qt;if(kt){var cr=q.tickIncrement(Ze._tmin,Ze.dtick,!0);Qt=[Ze._tmin,cr*.99+Ze._tmin*.01]}else{var fr=x.simpleMap(Ze.range,Ze.r2l);Qt=[fr[0],.8*fr[0]+.2*fr[1]]}if(Ke.range=x.simpleMap(Qt,Ze.l2r),Ke._isMinor=!0,q.prepTicks(Ke,zt),kt){var ir=P(Ze.dtick),Yt=P(Ke.dtick),gr=ir?Ze.dtick:+Ze.dtick.substring(1),yr=Yt?Ke.dtick:+Ke.dtick.substring(1);ir&&Yt?Ee(gr,yr)?gr===2*D&&yr===2*A&&(Ke.dtick=D):gr===2*D&&yr===3*A?Ke.dtick=D:gr===D&&!(Ze._input.minor||{}).nticks?Ke.dtick=A:Oe(gr/yr,2.5)?Ke.dtick=gr/2:Ke.dtick=gr:String(Ze.dtick).charAt(0)==="M"?Yt?Ke.dtick="M1":Ee(gr,yr)?gr>=12&&yr===2&&(Ke.dtick="M3"):Ke.dtick=Ze.dtick:String(Ke.dtick).charAt(0)==="L"?String(Ze.dtick).charAt(0)==="L"?Ee(gr,yr)||(Ke.dtick=Oe(gr/yr,2.5)?Ze.dtick/2:Ze.dtick):Ke.dtick="D1":Ke.dtick==="D2"&&+Ze.dtick>1&&(Ke.dtick=1)}Ke.range=Ze.range}Ze.minor._tick0Init===void 0&&(Ke.tick0=Ze.tick0)};function Ee(Ke,Ze){return Math.abs((Ke/Ze+.5)%1-.5)<.001}function Oe(Ke,Ze){return Math.abs(Ke/Ze-1)<.001}q.prepTicks=function(Ke,Ze){var zt=x.simpleMap(Ke.range,Ke.r2l,void 0,void 0,Ze);if(Ke.tickmode==="auto"||!Ke.dtick){var kt=Ke.nticks,Qt;kt||(Ke.type==="category"||Ke.type==="multicategory"?(Qt=Ke.tickfont?x.bigFont(Ke.tickfont.size||12):15,kt=Ke._length/Qt):(Qt=Ke._id.charAt(0)==="y"?40:80,kt=x.constrain(Ke._length/Qt,4,9)+1),Ke._name==="radialaxis"&&(kt*=2)),Ke.minor&&Ke.minor.tickmode!=="array"||Ke.tickmode==="array"&&(kt*=100),Ke._roughDTick=Math.abs(zt[1]-zt[0])/kt,q.autoTicks(Ke,Ke._roughDTick),Ke._minDtick>0&&Ke.dtick<Ke._minDtick*2&&(Ke.dtick=Ke._minDtick,Ke.tick0=Ke.l2r(Ke._forceTick0))}Ke.ticklabelmode==="period"&&Le(Ke),Ke.tick0||(Ke.tick0=Ke.type==="date"?"2000-01-01":0),Ke.type==="date"&&Ke.dtick<.1&&(Ke.dtick=.1),Et(Ke)};function Be(Ke){return+Ke.substring(1)}function Le(Ke){var Ze;function zt(){return!(P(Ke.dtick)||Ke.dtick.charAt(0)!=="M")}var kt=zt(),Qt=q.getTickFormat(Ke);if(Qt){var cr=Ke._dtickInit!==Ke.dtick;/%[fLQsSMX]/.test(Qt)||(/%[HI]/.test(Qt)?(Ze=S,cr&&!kt&&Ke.dtick<S&&(Ke.dtick=S)):/%p/.test(Qt)?(Ze=C,cr&&!kt&&Ke.dtick<C&&(Ke.dtick=C)):/%[Aadejuwx]/.test(Qt)?(Ze=A,cr&&!kt&&Ke.dtick<A&&(Ke.dtick=A)):/%[UVW]/.test(Qt)?(Ze=D,cr&&!kt&&Ke.dtick<D&&(Ke.dtick=D)):/%[Bbm]/.test(Qt)?(Ze=M,cr&&(kt?Be(Ke.dtick)<1:Ke.dtick<L)&&(Ke.dtick="M1")):/%[q]/.test(Qt)?(Ze=c,cr&&(kt?Be(Ke.dtick)<3:Ke.dtick<l)&&(Ke.dtick="M3")):/%[Yy]/.test(Qt)&&(Ze=b,cr&&(kt?Be(Ke.dtick)<12:Ke.dtick<p)&&(Ke.dtick="M12")))}kt=zt(),kt&&Ke.tick0===Ke._dowTick0&&(Ke.tick0=Ke._rawTick0),Ke._definedDelta=Ze}function Te(Ke,Ze,zt){for(var kt=0;kt<Ke.length;kt++){var Qt=Ke[kt].value,cr=kt,fr=kt+1;kt<Ke.length-1?(cr=kt,fr=kt+1):kt>0?(cr=kt-1,fr=kt):(cr=kt,fr=kt);var ir=Ke[cr].value,Yt=Ke[fr].value,gr=Math.abs(Yt-ir),yr=zt||gr,Tr=0;yr>=p?gr>=p&&gr<=h?Tr=gr:Tr=b:zt===c&&yr>=l?gr>=l&&gr<=E?Tr=gr:Tr=c:yr>=L?gr>=L&&gr<=m?Tr=gr:Tr=M:zt===D&&yr>=D?Tr=D:yr>=A?Tr=A:zt===C&&yr>=C?Tr=C:zt===S&&yr>=S&&(Tr=S);var pr;Tr>=gr&&(Tr=gr,pr=!0);var Kr=Qt+Tr;if(Ze.rangebreaks&&Tr>0){for(var Or=84,Nr=0,Sn=0;Sn<Or;Sn++){var Jr=(Sn+.5)/Or;Ze.maskBreaks(Qt*(1-Jr)+Jr*Kr)!==O&&Nr++}Tr*=Nr/Or,Tr||(Ke[kt].drop=!0),pr&&gr>D&&(Tr=gr)}(Tr>0||kt===0)&&(Ke[kt].periodX=Qt+Tr/2)}}q.calcTicks=function(Ze,zt){for(var kt=Ze.type,Qt=Ze.calendar,cr=Ze.ticklabelstep,fr=Ze.ticklabelmode==="period",ir=x.simpleMap(Ze.range,Ze.r2l,void 0,void 0,zt),Yt=ir[1]<ir[0],gr=Math.min(ir[0],ir[1]),yr=Math.max(ir[0],ir[1]),Tr=Math.max(1e3,Ze._length||0),pr=[],Kr=[],Or=[],Nr=[],Sn=Ze.minor&&(Ze.minor.ticks||Ze.minor.showgrid),Jr=1;Jr>=(Sn?0:1);Jr--){var xn=!Jr;Jr?(Ze._dtickInit=Ze.dtick,Ze._tick0Init=Ze.tick0):(Ze.minor._dtickInit=Ze.minor.dtick,Ze.minor._tick0Init=Ze.minor.tick0);var Dn=Jr?Ze:x.extendFlat({},Ze,Ze.minor);if(xn?q.prepMinorTicks(Dn,Ze,zt):q.prepTicks(Dn,zt),Dn.tickmode==="array"){Jr?(Or=[],pr=Ye(Ze)):(Nr=[],Kr=Ye(Ze));continue}if(Dn.tickmode==="sync"){Or=[],pr=Ve(Ze);continue}var mr=ne(ir),Ar=mr[0],zr=mr[1],Br=P(Dn.dtick),on=kt==="log"&&!(Br||Dn.dtick.charAt(0)==="L"),mn=q.tickFirst(Dn,zt);if(Jr){if(Ze._tmin=mn,mn<Ar!==Yt)break;(kt==="category"||kt==="multicategory")&&(zr=Yt?Math.max(-.5,zr):Math.min(Ze._categories.length-.5,zr))}var Tn=null,An=mn,Fn;if(Jr){var Jn;Br?Jn=Ze.dtick:kt==="date"?typeof Ze.dtick=="string"&&Ze.dtick.charAt(0)==="M"&&(Jn=M*Ze.dtick.substring(1)):Jn=Ze._roughDTick,Fn=Math.round((Ze.r2l(An)-Ze.r2l(Ze.tick0))/Jn)-1}var ta=Dn.dtick;for(Dn.rangebreaks&&Dn._tick0Init!==Dn.tick0&&(An=Zt(An,Ze),Yt||(An=q.tickIncrement(An,ta,!Yt,Qt))),Jr&&fr&&(An=q.tickIncrement(An,ta,!Yt,Qt),Fn--);Yt?An>=zr:An<=zr;An=q.tickIncrement(An,ta,Yt,Qt)){if(Jr&&Fn++,Dn.rangebreaks&&!Yt){if(An<Ar)continue;if(Dn.maskBreaks(An)===O&&Zt(An,Dn)>=yr)break}if(Or.length>Tr||An===Tn)break;Tn=An;var sa={value:An};Jr?(on&&An!==(An|0)&&(sa.simpleLabel=!0),cr>1&&Fn%cr&&(sa.skipLabel=!0),Or.push(sa)):(sa.minor=!0,Nr.push(sa))}}if(Sn){var ha=Ze.minor.ticks==="inside"&&Ze.ticks==="outside"||Ze.minor.ticks==="outside"&&Ze.ticks==="inside";if(!ha){for(var la=Or.map(function(wn){return wn.value}),Dr=[],sn=0;sn<Nr.length;sn++){var nn=Nr[sn],dn=nn.value;if(la.indexOf(dn)===-1){for(var Un=!1,Ln=0;!Un&&Ln<Or.length;Ln++)1e7+Or[Ln].value===1e7+dn&&(Un=!0);Un||Dr.push(nn)}}Nr=Dr}}fr&&Te(Or,Ze,Ze._definedDelta);var Pn;if(Ze.rangebreaks){var Vn=Ze._id.charAt(0)==="y",aa=1;Ze.tickmode==="auto"&&(aa=Ze.tickfont?Ze.tickfont.size:12);var Da=NaN;for(Pn=Or.length-1;Pn>-1;Pn--){if(Or[Pn].drop){Or.splice(Pn,1);continue}Or[Pn].value=Zt(Or[Pn].value,Ze);var $a=Ze.c2p(Or[Pn].value);(Vn?Da>$a-aa:Da<$a+aa)?Or.splice(Yt?Pn+1:Pn,1):Da=$a}}Vt(Ze)&&Math.abs(ir[1]-ir[0])===360&&Or.pop(),Ze._tmax=(Or[Or.length-1]||{}).value,Ze._prevDateHead="",Ze._inCalcTicks=!0;var $t,Sr=function(wn){wn.text="",Ze._prevDateHead=$t};Or=Or.concat(Nr);var an,cn;for(Pn=0;Pn<Or.length;Pn++){var hn=Or[Pn].minor,_n=Or[Pn].value;hn?Kr.push({x:_n,minor:!0}):($t=Ze._prevDateHead,an=q.tickText(Ze,_n,!1,Or[Pn].simpleLabel),cn=Or[Pn].periodX,cn!==void 0&&(an.periodX=cn,(cn>yr||cn<gr)&&(cn>yr&&(an.periodX=yr),cn<gr&&(an.periodX=gr),Sr(an))),Or[Pn].skipLabel&&Sr(an),pr.push(an))}return pr=pr.concat(Kr),Ze._inCalcTicks=!1,fr&&pr.length&&(pr[0].noTick=!0),pr};function De(Ke,Ze){return Ke.rangebreaks&&(Ze=Ze.filter(function(zt){return Ke.maskBreaks(zt.x)!==O})),Ze}function Ve(Ke){var Ze=Ke._mainAxis,zt=[];if(Ze._vals){for(var kt=0;kt<Ze._vals.length;kt++)if(!Ze._vals[kt].noTick){var Qt=Ze.l2p(Ze._vals[kt].x),cr=Ke.p2l(Qt),fr=q.tickText(Ke,cr);Ze._vals[kt].minor&&(fr.minor=!0,fr.text=""),zt.push(fr)}}return zt=De(Ke,zt),zt}function Ye(Ke){var Ze=x.simpleMap(Ke.range,Ke.r2l),zt=ne(Ze),kt=Math.min(zt[0],zt[1]),Qt=Math.max(zt[0],zt[1]),cr=Ke.type==="category"?Ke.d2l_noadd:Ke.d2l;Ke.type==="log"&&String(Ke.dtick).charAt(0)!=="L"&&(Ke.dtick="L"+Math.pow(10,Math.floor(Math.min(Ke.range[0],Ke.range[1]))-1));for(var fr=[],ir=0;ir<=1;ir++)if(!(ir&&!Ke.minor)){var Yt=ir?Ke.minor.tickvals:Ke.tickvals,gr=ir?[]:Ke.ticktext;if(Yt){Array.isArray(gr)||(gr=[]);for(var yr=0;yr<Yt.length;yr++){var Tr=cr(Yt[yr]);if(Tr>kt&&Tr<Qt){var pr=gr[yr]===void 0?q.tickText(Ke,Tr):Dt(Ke,Tr,String(gr[yr]));ir&&(pr.minor=!0,pr.text=""),fr.push(pr)}}}}return fr=De(Ke,fr),fr}var Ne=[2,5,10],Xe=[1,2,3,6,12],ht=[1,2,5,10,15,30],st=[1,2,3,7,14],it=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],nt=[-.301,0,.301,.699,1],pt=[15,30,45,90,180];function Tt(Ke,Ze,zt){return Ze*x.roundUp(Ke/Ze,zt)}q.autoTicks=function(Ke,Ze,zt){var kt;function Qt(Tr){return Math.pow(Tr,Math.floor(Math.log(Ze)/Math.LN10))}if(Ke.type==="date"){Ke.tick0=x.dateTick0(Ke.calendar,0);var cr=2*Ze;if(cr>b)Ze/=b,kt=Qt(10),Ke.dtick="M"+12*Tt(Ze,kt,Ne);else if(cr>M)Ze/=M,Ke.dtick="M"+Tt(Ze,1,Xe);else if(cr>A){if(Ke.dtick=Tt(Ze,A,Ke._hasDayOfWeekBreaks?[1,2,7,14]:st),!zt){var fr=q.getTickFormat(Ke),ir=Ke.ticklabelmode==="period";ir&&(Ke._rawTick0=Ke.tick0),/%[uVW]/.test(fr)?Ke.tick0=x.dateTick0(Ke.calendar,2):Ke.tick0=x.dateTick0(Ke.calendar,1),ir&&(Ke._dowTick0=Ke.tick0)}}else cr>S?Ke.dtick=Tt(Ze,S,Xe):cr>o?Ke.dtick=Tt(Ze,o,ht):cr>R?Ke.dtick=Tt(Ze,R,ht):(kt=Qt(10),Ke.dtick=Tt(Ze,kt,Ne))}else if(Ke.type==="log"){Ke.tick0=0;var Yt=x.simpleMap(Ke.range,Ke.r2l);if(Ke._isMinor&&(Ze*=1.5),Ze>.7)Ke.dtick=Math.ceil(Ze);else if(Math.abs(Yt[1]-Yt[0])<1){var gr=1.5*Math.abs((Yt[1]-Yt[0])/Ze);Ze=Math.abs(Math.pow(10,Yt[1])-Math.pow(10,Yt[0]))/gr,kt=Qt(10),Ke.dtick="L"+Tt(Ze,kt,Ne)}else Ke.dtick=Ze>.3?"D2":"D1"}else Ke.type==="category"||Ke.type==="multicategory"?(Ke.tick0=0,Ke.dtick=Math.ceil(Math.max(Ze,1))):Vt(Ke)?(Ke.tick0=0,kt=1,Ke.dtick=Tt(Ze,kt,pt)):(Ke.tick0=0,kt=Qt(10),Ke.dtick=Tt(Ze,kt,Ne));if(Ke.dtick===0&&(Ke.dtick=1),!P(Ke.dtick)&&typeof Ke.dtick!="string"){var yr=Ke.dtick;throw Ke.dtick=1,"ax.dtick error: "+String(yr)}};function Et(Ke){var Ze=Ke.dtick;if(Ke._tickexponent=0,!P(Ze)&&typeof Ze!="string"&&(Ze=1),(Ke.type==="category"||Ke.type==="multicategory")&&(Ke._tickround=null),Ke.type==="date"){var zt=Ke.r2l(Ke.tick0),kt=Ke.l2r(zt).replace(/(^-|i)/g,""),Qt=kt.length;if(String(Ze).charAt(0)==="M")Qt>10||kt.substr(5)!=="01-01"?Ke._tickround="d":Ke._tickround=+Ze.substr(1)%12===0?"y":"m";else if(Ze>=A&&Qt<=10||Ze>=A*15)Ke._tickround="d";else if(Ze>=o&&Qt<=16||Ze>=S)Ke._tickround="M";else if(Ze>=R&&Qt<=19||Ze>=o)Ke._tickround="S";else{var cr=Ke.l2r(zt+Ze).replace(/^-/,"").length;Ke._tickround=Math.max(Qt,cr)-20,Ke._tickround<0&&(Ke._tickround=4)}}else if(P(Ze)||Ze.charAt(0)==="L"){var fr=Ke.range.map(Ke.r2d||Number);P(Ze)||(Ze=Number(Ze.substr(1))),Ke._tickround=2-Math.floor(Math.log(Ze)/Math.LN10+.01);var ir=Math.max(Math.abs(fr[0]),Math.abs(fr[1])),Yt=Math.floor(Math.log(ir)/Math.LN10+.01),gr=Ke.minexponent===void 0?3:Ke.minexponent;Math.abs(Yt)>gr&&(pe(Ke.exponentformat)&&!we(Yt)?Ke._tickexponent=3*Math.round((Yt-1)/3):Ke._tickexponent=Yt)}else Ke._tickround=null}q.tickIncrement=function(Ke,Ze,zt,kt){var Qt=zt?-1:1;if(P(Ze))return x.increment(Ke,Qt*Ze);var cr=Ze.charAt(0),fr=Qt*Number(Ze.substr(1));if(cr==="M")return x.incrementMonth(Ke,fr,kt);if(cr==="L")return Math.log(Math.pow(10,Ke)+fr)/Math.LN10;if(cr==="D"){var ir=Ze==="D2"?nt:it,Yt=Ke+Qt*.01,gr=x.roundUp(x.mod(Yt,1),ir,zt);return Math.floor(Yt)+Math.log(d.round(Math.pow(10,gr),1))/Math.LN10}throw"unrecognized dtick "+String(Ze)},q.tickFirst=function(Ke,Ze){var zt=Ke.r2l||Number,kt=x.simpleMap(Ke.range,zt,void 0,void 0,Ze),Qt=kt[1]<kt[0],cr=Qt?Math.floor:Math.ceil,fr=ne(kt)[0],ir=Ke.dtick,Yt=zt(Ke.tick0);if(P(ir)){var gr=cr((fr-Yt)/ir)*ir+Yt;return(Ke.type==="category"||Ke.type==="multicategory")&&(gr=x.constrain(gr,0,Ke._categories.length-1)),gr}var yr=ir.charAt(0),Tr=Number(ir.substr(1));if(yr==="M"){for(var pr=0,Kr=Yt,Or,Nr,Sn;pr<10;){if(Or=q.tickIncrement(Kr,ir,Qt,Ke.calendar),(Or-fr)*(Kr-fr)<=0)return Qt?Math.min(Kr,Or):Math.max(Kr,Or);Nr=(fr-(Kr+Or)/2)/(Or-Kr),Sn=yr+(Math.abs(Math.round(Nr))||1)*Tr,Kr=q.tickIncrement(Kr,Sn,Nr<0?!Qt:Qt,Ke.calendar),pr++}return x.error("tickFirst did not converge",Ke),Kr}else{if(yr==="L")return Math.log(cr((Math.pow(10,fr)-Yt)/Tr)*Tr+Yt)/Math.LN10;if(yr==="D"){var Jr=ir==="D2"?nt:it,xn=x.roundUp(x.mod(fr,1),Jr,Qt);return Math.floor(fr)+Math.log(d.round(Math.pow(10,xn),1))/Math.LN10}else throw"unrecognized dtick "+String(ir)}},q.tickText=function(Ke,Ze,zt,kt){var Qt=Dt(Ke,Ze),cr=Ke.tickmode==="array",fr=zt||cr,ir=Ke.type,Yt=ir==="category"?Ke.d2l_noadd:Ke.d2l,gr;if(cr&&Array.isArray(Ke.ticktext)){var yr=x.simpleMap(Ke.range,Ke.r2l),Tr=(Math.abs(yr[1]-yr[0])-(Ke._lBreaks||0))/1e4;for(gr=0;gr<Ke.ticktext.length&&!(Math.abs(Ze-Yt(Ke.tickvals[gr]))<Tr);gr++);if(gr<Ke.ticktext.length)return Qt.text=String(Ke.ticktext[gr]),Qt}function pr(Nr){if(Nr===void 0)return!0;if(zt)return Nr==="none";var Sn={first:Ke._tmin,last:Ke._tmax}[Nr];return Nr!=="all"&&Ze!==Sn}var Kr=zt?"never":Ke.exponentformat!=="none"&&pr(Ke.showexponent)?"hide":"";if(ir==="date"?et(Ke,Qt,zt,fr):ir==="log"?Ue(Ke,Qt,zt,fr,Kr):ir==="category"?ze(Ke,Qt):ir==="multicategory"?rt(Ke,Qt,zt):Vt(Ke)?Qe(Ke,Qt,zt,fr,Kr):lt(Ke,Qt,zt,fr,Kr),kt||(Ke.tickprefix&&!pr(Ke.showtickprefix)&&(Qt.text=Ke.tickprefix+Qt.text),Ke.ticksuffix&&!pr(Ke.showticksuffix)&&(Qt.text+=Ke.ticksuffix)),Ke.tickson==="boundaries"||Ke.showdividers){var Or=function(Nr){var Sn=Ke.l2p(Nr);return Sn>=0&&Sn<=Ke._length?Nr:null};Qt.xbnd=[Or(Qt.x-.5),Or(Qt.x+Ke.dtick-.5)]}return Qt},q.hoverLabelText=function(Ke,Ze,zt){zt&&(Ke=x.extendFlat({},Ke,{hoverformat:zt}));var kt=Array.isArray(Ze)?Ze[0]:Ze,Qt=Array.isArray(Ze)?Ze[1]:void 0;if(Qt!==void 0&&Qt!==kt)return q.hoverLabelText(Ke,kt,zt)+" - "+q.hoverLabelText(Ke,Qt,zt);var cr=Ke.type==="log"&&kt<=0,fr=q.tickText(Ke,Ke.c2l(cr?-kt:kt),"hover").text;return cr?kt===0?"0":T+fr:fr};function Dt(Ke,Ze,zt){var kt=Ke.tickfont||{};return{x:Ze,dx:0,dy:0,text:zt||"",fontSize:kt.size,font:kt.family,fontColor:kt.color}}function et(Ke,Ze,zt,kt){var Qt=Ke._tickround,cr=zt&&Ke.hoverformat||q.getTickFormat(Ke);kt&&(P(Qt)?Qt=4:Qt={y:"m",m:"d",d:"M",M:"S",S:4}[Qt]);var fr=x.formatDate(Ze.x,cr,Qt,Ke._dateFormat,Ke.calendar,Ke._extraFormat),ir,Yt=fr.indexOf(`
`);if(Yt!==-1&&(ir=fr.substr(Yt+1),fr=fr.substr(0,Yt)),kt&&(fr==="00:00:00"||fr==="00:00"?(fr=ir,ir=""):fr.length===8&&(fr=fr.replace(/:00$/,""))),ir)if(zt)Qt==="d"?fr+=", "+ir:fr=ir+(fr?", "+fr:"");else if(!Ke._inCalcTicks||Ke._prevDateHead!==ir)Ke._prevDateHead=ir,fr+="<br>"+ir;else{var gr=qt(Ke),yr=Ke._trueSide||Ke.side;(!gr&&yr==="top"||gr&&yr==="bottom")&&(fr+="<br> ")}Ze.text=fr}function Ue(Ke,Ze,zt,kt,Qt){var cr=Ke.dtick,fr=Ze.x,ir=Ke.tickformat,Yt=typeof cr=="string"&&cr.charAt(0);if(Qt==="never"&&(Qt=""),kt&&Yt!=="L"&&(cr="L3",Yt="L"),ir||Yt==="L")Ze.text=Ae(Math.pow(10,fr),Ke,Qt,kt);else if(P(cr)||Yt==="D"&&x.mod(fr+.01,1)<.1){var gr=Math.round(fr),yr=Math.abs(gr),Tr=Ke.exponentformat;Tr==="power"||pe(Tr)&&we(gr)?(gr===0?Ze.text=1:gr===1?Ze.text="10":Ze.text="10<sup>"+(gr>1?"":T)+yr+"</sup>",Ze.fontSize*=1.25):(Tr==="e"||Tr==="E")&&yr>2?Ze.text="1"+Tr+(gr>0?"+":T)+yr:(Ze.text=Ae(Math.pow(10,fr),Ke,"","fakehover"),cr==="D1"&&Ke._id.charAt(0)==="y"&&(Ze.dy-=Ze.fontSize/6))}else if(Yt==="D")Ze.text=String(Math.round(Math.pow(10,x.mod(fr,1)))),Ze.fontSize*=.75;else throw"unrecognized dtick "+String(cr);if(Ke.dtick==="D1"){var pr=String(Ze.text).charAt(0);(pr==="0"||pr==="1")&&(Ke._id.charAt(0)==="y"?Ze.dx-=Ze.fontSize/4:(Ze.dy+=Ze.fontSize/2,Ze.dx+=(Ke.range[1]>Ke.range[0]?1:-1)*Ze.fontSize*(fr<0?.5:.25)))}}function ze(Ke,Ze){var zt=Ke._categories[Math.round(Ze.x)];zt===void 0&&(zt=""),Ze.text=String(zt)}function rt(Ke,Ze,zt){var kt=Math.round(Ze.x),Qt=Ke._categories[kt]||[],cr=Qt[1]===void 0?"":String(Qt[1]),fr=Qt[0]===void 0?"":String(Qt[0]);zt?Ze.text=fr+" - "+cr:(Ze.text=cr,Ze.text2=fr)}function lt(Ke,Ze,zt,kt,Qt){Qt==="never"?Qt="":Ke.showexponent==="all"&&Math.abs(Ze.x/Ke.dtick)<1e-6&&(Qt="hide"),Ze.text=Ae(Ze.x,Ke,Qt,kt)}function Qe(Ke,Ze,zt,kt,Qt){if(Ke.thetaunit==="radians"&&!zt){var cr=Ze.x/180;if(cr===0)Ze.text="0";else{var fr=Fe(cr);if(fr[1]>=100)Ze.text=Ae(x.deg2rad(Ze.x),Ke,Qt,kt);else{var ir=Ze.x<0;fr[1]===1?fr[0]===1?Ze.text="π":Ze.text=fr[0]+"π":Ze.text=["<sup>",fr[0],"</sup>","⁄","<sub>",fr[1],"</sub>","π"].join(""),ir&&(Ze.text=T+Ze.text)}}}else Ze.text=Ae(Ze.x,Ke,Qt,kt)}function Fe(Ke){function Ze(ir,Yt){return Math.abs(ir-Yt)<=1e-6}function zt(ir,Yt){return Ze(Yt,0)?ir:zt(Yt,ir%Yt)}function kt(ir){for(var Yt=1;!Ze(Math.round(ir*Yt)/Yt,ir);)Yt*=10;return Yt}var Qt=kt(Ke),cr=Ke*Qt,fr=Math.abs(zt(cr,Qt));return[Math.round(cr/fr),Math.round(Qt/fr)]}var Ce=["f","p","n","μ","m","","k","M","G","T"];function pe(Ke){return Ke==="SI"||Ke==="B"}function we(Ke){return Ke>14||Ke<-15}function Ae(Ke,Ze,zt,kt){var Qt=Ke<0,cr=Ze._tickround,fr=zt||Ze.exponentformat||"B",ir=Ze._tickexponent,Yt=q.getTickFormat(Ze),gr=Ze.separatethousands;if(kt){var yr={exponentformat:fr,minexponent:Ze.minexponent,dtick:Ze.showexponent==="none"?Ze.dtick:P(Ke)&&Math.abs(Ke)||1,range:Ze.showexponent==="none"?Ze.range.map(Ze.r2d):[0,Ke||1]};Et(yr),cr=(Number(yr._tickround)||0)+4,ir=yr._tickexponent,Ze.hoverformat&&(Yt=Ze.hoverformat)}if(Yt)return Ze._numFormat(Yt)(Ke).replace(/-/g,T);var Tr=Math.pow(10,-cr)/2;if(fr==="none"&&(ir=0),Ke=Math.abs(Ke),Ke<Tr)Ke="0",Qt=!1;else{if(Ke+=Tr,ir&&(Ke*=Math.pow(10,-ir),cr+=ir),cr===0)Ke=String(Math.floor(Ke));else if(cr<0){Ke=String(Math.round(Ke)),Ke=Ke.substr(0,Ke.length+cr);for(var pr=cr;pr<0;pr++)Ke+="0"}else{Ke=String(Ke);var Kr=Ke.indexOf(".")+1;Kr&&(Ke=Ke.substr(0,Kr+cr).replace(/\.?0+$/,""))}Ke=x.numSeparate(Ke,Ze._separators,gr)}if(ir&&fr!=="hide"){pe(fr)&&we(ir)&&(fr="power");var Or;ir<0?Or=T+-ir:fr!=="power"?Or="+"+ir:Or=String(ir),fr==="e"||fr==="E"?Ke+=fr+Or:fr==="power"?Ke+="×10<sup>"+Or+"</sup>":fr==="B"&&ir===9?Ke+="B":pe(fr)&&(Ke+=Ce[ir/3+5])}return Qt?T+Ke:Ke}q.getTickFormat=function(Ke){var Ze;function zt(Yt){return typeof Yt!="string"?Yt:Number(Yt.replace("M",""))*M}function kt(Yt,gr){var yr=["L","D"];if(typeof Yt==typeof gr){if(typeof Yt=="number")return Yt-gr;var Tr=yr.indexOf(Yt.charAt(0)),pr=yr.indexOf(gr.charAt(0));return Tr===pr?Number(Yt.replace(/(L|D)/g,""))-Number(gr.replace(/(L|D)/g,"")):Tr-pr}else return typeof Yt=="number"?1:-1}function Qt(Yt,gr,yr){var Tr=yr||function(Or){return Or},pr=gr[0],Kr=gr[1];return(!pr&&typeof pr!="number"||Tr(pr)<=Tr(Yt))&&(!Kr&&typeof Kr!="number"||Tr(Kr)>=Tr(Yt))}function cr(Yt,gr){var yr=gr[0]===null,Tr=gr[1]===null,pr=kt(Yt,gr[0])>=0,Kr=kt(Yt,gr[1])<=0;return(yr||pr)&&(Tr||Kr)}var fr,ir;if(Ke.tickformatstops&&Ke.tickformatstops.length>0)switch(Ke.type){case"date":case"linear":{for(Ze=0;Ze<Ke.tickformatstops.length;Ze++)if(ir=Ke.tickformatstops[Ze],ir.enabled&&Qt(Ke.dtick,ir.dtickrange,zt)){fr=ir;break}break}case"log":{for(Ze=0;Ze<Ke.tickformatstops.length;Ze++)if(ir=Ke.tickformatstops[Ze],ir.enabled&&cr(Ke.dtick,ir.dtickrange)){fr=ir;break}break}}return fr?fr.value:Ke.tickformat},q.getSubplots=function(Ke,Ze){var zt=Ke._fullLayout._subplots,kt=zt.cartesian.concat(zt.gl2d||[]),Qt=Ze?q.findSubplotsWithAxis(kt,Ze):kt;return Qt.sort(function(cr,fr){var ir=cr.substr(1).split("y"),Yt=fr.substr(1).split("y");return ir[0]===Yt[0]?+ir[1]-+Yt[1]:+ir[0]-+Yt[0]}),Qt},q.findSubplotsWithAxis=function(Ke,Ze){for(var zt=new RegExp(Ze._id.charAt(0)==="x"?"^"+Ze._id+"y":Ze._id+"$"),kt=[],Qt=0;Qt<Ke.length;Qt++){var cr=Ke[Qt];zt.test(cr)&&kt.push(cr)}return kt},q.makeClipPaths=function(Ke){var Ze=Ke._fullLayout;if(!Ze._hasOnlyLargeSploms){var zt={_offset:0,_length:Ze.width,_id:""},kt={_offset:0,_length:Ze.height,_id:""},Qt=q.list(Ke,"x",!0),cr=q.list(Ke,"y",!0),fr=[],ir,Yt;for(ir=0;ir<Qt.length;ir++)for(fr.push({x:Qt[ir],y:kt}),Yt=0;Yt<cr.length;Yt++)ir===0&&fr.push({x:zt,y:cr[Yt]}),fr.push({x:Qt[ir],y:cr[Yt]});var gr=Ze._clips.selectAll(".axesclip").data(fr,function(yr){return yr.x._id+yr.y._id});gr.enter().append("clipPath").classed("axesclip",!0).attr("id",function(yr){return"clip"+Ze._uid+yr.x._id+yr.y._id}).append("rect"),gr.exit().remove(),gr.each(function(yr){d.select(this).select("rect").attr({x:yr.x._offset||0,y:yr.y._offset||0,width:yr.x._length||1,height:yr.y._length||1})})}},q.draw=function(Ke,Ze,zt){var kt=Ke._fullLayout;Ze==="redraw"&&kt._paper.selectAll("g.subplot").each(function(Yt){var gr=Yt[0],yr=kt._plots[gr];if(yr){var Tr=yr.xaxis,pr=yr.yaxis;yr.xaxislayer.selectAll("."+Tr._id+"tick").remove(),yr.yaxislayer.selectAll("."+pr._id+"tick").remove(),yr.xaxislayer.selectAll("."+Tr._id+"tick2").remove(),yr.yaxislayer.selectAll("."+pr._id+"tick2").remove(),yr.xaxislayer.selectAll("."+Tr._id+"divider").remove(),yr.yaxislayer.selectAll("."+pr._id+"divider").remove(),yr.minorGridlayer&&yr.minorGridlayer.selectAll("path").remove(),yr.gridlayer&&yr.gridlayer.selectAll("path").remove(),yr.zerolinelayer&&yr.zerolinelayer.selectAll("path").remove(),kt._infolayer.select(".g-"+Tr._id+"title").remove(),kt._infolayer.select(".g-"+pr._id+"title").remove()}});var Qt=!Ze||Ze==="redraw"?q.listIds(Ke):Ze,cr=q.list(Ke),fr=cr.filter(function(Yt){return Yt.autoshift}).map(function(Yt){return Yt.overlaying});Qt.map(function(Yt){var gr=q.getFromId(Ke,Yt);if(gr.tickmode==="sync"&&gr.overlaying){var yr=Qt.findIndex(function(Tr){return Tr===gr.overlaying});yr>=0&&Qt.unshift(Qt.splice(yr,1).shift())}});var ir={false:{left:0,right:0}};return x.syncOrAsync(Qt.map(function(Yt){return function(){if(Yt){var gr=q.getFromId(Ke,Yt);zt||(zt={}),zt.axShifts=ir,zt.overlayingShiftedAx=fr;var yr=q.drawOne(Ke,gr,zt);return gr._shiftPusher&&nr(gr,gr._fullDepth||0,ir,!0),gr._r=gr.range.slice(),gr._rl=x.simpleMap(gr._r,gr.r2l),yr}}}))},q.drawOne=function(Ke,Ze,zt){zt=zt||{};var kt=zt.axShifts||{},Qt=zt.overlayingShiftedAx||[],cr,fr,ir;Ze.setScale();var Yt=Ke._fullLayout,gr=Ze._id,yr=gr.charAt(0),Tr=q.counterLetter(gr),pr=Yt._plots[Ze._mainSubplot];if(!pr)return;if(Ze._shiftPusher=Ze.autoshift||Qt.indexOf(Ze._id)!==-1||Qt.indexOf(Ze.overlaying)!==-1,Ze._shiftPusher&Ze.anchor==="free"){var Kr=Ze.linewidth/2||0;Ze.ticks==="inside"&&(Kr+=Ze.ticklen),nr(Ze,Kr,kt,!0),nr(Ze,Ze.shift||0,kt,!1)}(zt.skipTitle!==!0||Ze._shift===void 0)&&(Ze._shift=Mr(Ze,kt));var Or=pr[yr+"axislayer"],Nr=Ze._mainLinePosition,Sn=Nr+=Ze._shift,Jr=Ze._mainMirrorPosition,xn=Ze._vals=q.calcTicks(Ze),Dn=[Ze.mirror,Sn,Jr].join("_");for(cr=0;cr<xn.length;cr++)xn[cr].axInfo=Dn;Ze._selections={},Ze._tickAngles&&(Ze._prevTickAngles=Ze._tickAngles),Ze._tickAngles={},Ze._depth=null;var mr={};function Ar(kr){var vn=gr+(kr||"tick");return mr[vn]||(mr[vn]=ct(Ze,vn)),mr[vn]}if(Ze.visible){var zr=q.makeTransTickFn(Ze),Br=q.makeTransTickLabelFn(Ze),on,mn,Tn=Ze.ticks==="inside",An=Ze.ticks==="outside";if(Ze.tickson==="boundaries"){var Fn=Ge(Ze,xn);mn=q.clipEnds(Ze,Fn),on=Tn?mn:Fn}else mn=q.clipEnds(Ze,xn),on=Tn&&Ze.ticklabelmode!=="period"?mn:xn;var Jn=Ze._gridVals=mn,ta=tt(Ze,xn);if(!Yt._hasOnlyLargeSploms){var sa=Ze._subplotsWith,ha={};for(cr=0;cr<sa.length;cr++){fr=sa[cr],ir=Yt._plots[fr];var la=ir[Tr+"axis"],Dr=la._mainAxis._id;if(!ha[Dr]){ha[Dr]=1;var sn=yr==="x"?"M0,"+la._offset+"v"+la._length:"M"+la._offset+",0h"+la._length;q.drawGrid(Ke,Ze,{vals:Jn,counterAxis:la,layer:ir.gridlayer.select("."+gr),minorLayer:ir.minorGridlayer.select("."+gr),path:sn,transFn:zr}),q.drawZeroLine(Ke,Ze,{counterAxis:la,layer:ir.zerolinelayer,path:sn,transFn:zr})}}}var nn,dn=q.getTickSigns(Ze),Un=q.getTickSigns(Ze,"minor");if(Ze.ticks||Ze.minor&&Ze.minor.ticks){var Ln=q.makeTickPath(Ze,Sn,dn[2]),Pn=q.makeTickPath(Ze,Sn,Un[2],{minor:!0}),Vn,aa,Da,$a;if(Ze._anchorAxis&&Ze.mirror&&Ze.mirror!==!0?(Vn=q.makeTickPath(Ze,Jr,dn[3]),aa=q.makeTickPath(Ze,Jr,Un[3],{minor:!0}),Da=Ln+Vn,$a=Pn+aa):(Vn="",aa="",Da=Ln,$a=Pn),Ze.showdividers&&An&&Ze.tickson==="boundaries"){var $t={};for(cr=0;cr<ta.length;cr++)$t[ta[cr].x]=1;nn=function(kr){return $t[kr.x]?Vn:Da}}else nn=function(kr){return kr.minor?$a:Da}}if(q.drawTicks(Ke,Ze,{vals:on,layer:Or,path:nn,transFn:zr}),Ze.mirror==="allticks"){var Sr=Object.keys(Ze._linepositions||{});for(cr=0;cr<Sr.length;cr++){fr=Sr[cr],ir=Yt._plots[fr];var an=Ze._linepositions[fr]||[],cn=an[0],hn=an[1],_n=an[2],wn=q.makeTickPath(Ze,cn,_n?dn[0]:Un[0],{minor:_n})+q.makeTickPath(Ze,hn,_n?dn[1]:Un[1],{minor:_n});q.drawTicks(Ke,Ze,{vals:on,layer:ir[yr+"axislayer"],path:wn,transFn:zr})}}var fn=[];if(fn.push(function(){return q.drawLabels(Ke,Ze,{vals:xn,layer:Or,plotinfo:ir,transFn:Br,labelFns:q.makeLabelFns(Ze,Sn)})}),Ze.type==="multicategory"){var Rr={x:2,y:10}[yr];fn.push(function(){var kr={x:"height",y:"width"}[yr],vn=Ar()[kr]+Rr+(Ze._tickAngles[gr+"tick"]?Ze.tickfont.size*ie:0);return q.drawLabels(Ke,Ze,{vals:We(Ze,xn),layer:Or,cls:gr+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:zr,labelFns:q.makeLabelFns(Ze,Sn+vn*dn[4])})}),fn.push(function(){return Ze._depth=dn[4]*(Ar("tick2")[Ze.side]-Sn),Bt(Ke,Ze,{vals:ta,layer:Or,path:q.makeTickPath(Ze,Sn,dn[4],{len:Ze._depth}),transFn:zr})})}else Ze.title.hasOwnProperty("standoff")&&fn.push(function(){Ze._depth=dn[4]*(Ar()[Ze.side]-Sn)});var Lr=_.getComponentMethod("rangeslider","isVisible")(Ze);return!zt.skipTitle&&!(Lr&&Ze.side==="bottom")&&fn.push(function(){return hr(Ke,Ze)}),fn.push(function(){var kr=Ze.side.charAt(0),vn=se[Ze.side].charAt(0),kn=q.getPxPosition(Ke,Ze),Yn=An?Ze.ticklen:0,pn,zn,qn,ua;(Ze.automargin||Lr||Ze._shiftPusher)&&(Ze.type==="multicategory"?pn=Ar("tick2"):(pn=Ar(),yr==="x"&&kr==="b"&&(Ze._depth=Math.max(pn.width>0?pn.bottom-kn:0,Yn))));var ia=0,oa=0;if(Ze._shiftPusher&&(ia=Math.max(Yn,pn.height>0?kr==="l"?kn-pn.left:pn.right-kn:0),Ze.title.text!==Yt._dfltTitle[yr]&&(oa=(Ze._titleStandoff||0)+(Ze._titleScoot||0),kr==="l"&&(oa+=Wt(Ze))),Ze._fullDepth=Math.max(ia,oa)),Ze.automargin){zn={x:0,y:0,r:0,l:0,t:0,b:0};var ga=[0,1],uo=typeof Ze._shift=="number"?Ze._shift:0;if(yr==="x"){if(kr==="b"?zn[kr]=Ze._depth:(zn[kr]=Ze._depth=Math.max(pn.width>0?kn-pn.top:0,Yn),ga.reverse()),pn.width>0){var Co=pn.right-(Ze._offset+Ze._length);Co>0&&(zn.xr=1,zn.r=Co);var Fo=Ze._offset-pn.left;Fo>0&&(zn.xl=0,zn.l=Fo)}}else if(kr==="l"?(Ze._depth=Math.max(pn.height>0?kn-pn.left:0,Yn),zn[kr]=Ze._depth-uo):(Ze._depth=Math.max(pn.height>0?pn.right-kn:0,Yn),zn[kr]=Ze._depth+uo,ga.reverse()),pn.height>0){var Ho=pn.bottom-(Ze._offset+Ze._length);Ho>0&&(zn.yb=0,zn.b=Ho);var ko=Ze._offset-pn.top;ko>0&&(zn.yt=1,zn.t=ko)}zn[Tr]=Ze.anchor==="free"?Ze.position:Ze._anchorAxis.domain[ga[0]],Ze.title.text!==Yt._dfltTitle[yr]&&(zn[kr]+=Wt(Ze)+(Ze.title.standoff||0)),Ze.mirror&&Ze.anchor!=="free"&&(qn={x:0,y:0,r:0,l:0,t:0,b:0},qn[vn]=Ze.linewidth,Ze.mirror&&Ze.mirror!==!0&&(qn[vn]+=Yn),Ze.mirror===!0||Ze.mirror==="ticks"?qn[Tr]=Ze._anchorAxis.domain[ga[1]]:(Ze.mirror==="all"||Ze.mirror==="allticks")&&(qn[Tr]=[Ze._counterDomainMin,Ze._counterDomainMax][ga[1]]))}Lr&&(ua=_.getComponentMethod("rangeslider","autoMarginOpts")(Ke,Ze)),typeof Ze.automargin=="string"&&(Pe(zn,Ze.automargin),Pe(qn,Ze.automargin)),a.autoMargin(Ke,ur(Ze),zn),a.autoMargin(Ke,dt(Ze),qn),a.autoMargin(Ke,ut(Ze),ua)}),x.syncOrAsync(fn)}};function Pe(Ke,Ze){if(Ke){var zt=Object.keys(U).reduce(function(kt,Qt){return Ze.indexOf(Qt)!==-1&&U[Qt].forEach(function(cr){kt[cr]=1}),kt},{});Object.keys(Ke).forEach(function(kt){zt[kt]||(kt.length===1?Ke[kt]=0:delete Ke[kt])})}}function Ge(Ke,Ze){var zt=[],kt,Qt=function(cr,fr){var ir=cr.xbnd[fr];ir!==null&&zt.push(x.extendFlat({},cr,{x:ir}))};if(Ze.length){for(kt=0;kt<Ze.length;kt++)Qt(Ze[kt],0);Qt(Ze[kt-1],1)}return zt}function We(Ke,Ze){for(var zt=[],kt={},Qt=0;Qt<Ze.length;Qt++){var cr=Ze[Qt];kt[cr.text2]?kt[cr.text2].push(cr.x):kt[cr.text2]=[cr.x]}for(var fr in kt)zt.push(Dt(Ke,x.interp(kt[fr],.5),fr));return zt}function tt(Ke,Ze){var zt=[],kt,Qt,cr=Ze.length&&Ze[Ze.length-1].x<Ze[0].x,fr=function(Yt,gr){var yr=Yt.xbnd[gr];yr!==null&&zt.push(x.extendFlat({},Yt,{x:yr}))};if(Ke.showdividers&&Ze.length){for(kt=0;kt<Ze.length;kt++){var ir=Ze[kt];ir.text2!==Qt&&fr(ir,cr?1:0),Qt=ir.text2}fr(Ze[kt-1],cr?0:1)}return zt}function ct(Ke,Ze){var zt,kt,Qt,cr;return Ke._selections[Ze].size()?(zt=1/0,kt=-1/0,Qt=1/0,cr=-1/0,Ke._selections[Ze].each(function(){var fr=or(this),ir=u.bBox(fr.node().parentNode);zt=Math.min(zt,ir.top),kt=Math.max(kt,ir.bottom),Qt=Math.min(Qt,ir.left),cr=Math.max(cr,ir.right)})):(zt=0,kt=0,Qt=0,cr=0),{top:zt,bottom:kt,left:Qt,right:cr,height:kt-zt,width:cr-Qt}}q.getTickSigns=function(Ke,Ze){var zt=Ke._id.charAt(0),kt={x:"top",y:"right"}[zt],Qt=Ke.side===kt?1:-1,cr=[-1,1,Qt,-Qt],fr=Ze?(Ke.minor||{}).ticks:Ke.ticks;return fr!=="inside"==(zt==="x")&&(cr=cr.map(function(ir){return-ir})),Ke.side&&cr.push({l:-1,t:-1,r:1,b:1}[Ke.side.charAt(0)]),cr},q.makeTransTickFn=function(Ke){return Ke._id.charAt(0)==="x"?function(Ze){return v(Ke._offset+Ke.l2p(Ze.x),0)}:function(Ze){return v(0,Ke._offset+Ke.l2p(Ze.x))}},q.makeTransTickLabelFn=function(Ke){var Ze=Pt(Ke),zt=Ze[0],kt=Ze[1];return Ke._id.charAt(0)==="x"?function(Qt){return v(zt+Ke._offset+Ke.l2p(St(Qt)),kt)}:function(Qt){return v(kt,zt+Ke._offset+Ke.l2p(St(Qt)))}};function St(Ke){return Ke.periodX!==void 0?Ke.periodX:Ke.x}function Pt(Ke){var Ze=Ke.ticklabelposition||"",zt=function(Kr){return Ze.indexOf(Kr)!==-1},kt=zt("top"),Qt=zt("left"),cr=zt("right"),fr=zt("bottom"),ir=zt("inside"),Yt=fr||Qt||kt||cr;if(!Yt&&!ir)return[0,0];var gr=Ke.side,yr=Yt?(Ke.tickwidth||0)/2:0,Tr=ce,pr=Ke.tickfont?Ke.tickfont.size:12;return(fr||kt)&&(yr+=pr*re,Tr+=(Ke.linewidth||0)/2),(Qt||cr)&&(yr+=(Ke.linewidth||0)/2,Tr+=ce),ir&&gr==="top"&&(Tr-=pr*(1-re)),(Qt||kt)&&(yr=-yr),(gr==="bottom"||gr==="right")&&(Tr=-Tr),[Yt?yr:0,ir?Tr:0]}q.makeTickPath=function(Ke,Ze,zt,kt){kt||(kt={});var Qt=kt.minor;if(Qt&&!Ke.minor)return"";var cr=kt.len!==void 0?kt.len:Qt?Ke.minor.ticklen:Ke.ticklen,fr=Ke._id.charAt(0),ir=(Ke.linewidth||1)/2;return fr==="x"?"M0,"+(Ze+ir*zt)+"v"+cr*zt:"M"+(Ze+ir*zt)+",0h"+cr*zt},q.makeLabelFns=function(Ke,Ze,zt){var kt=Ke.ticklabelposition||"",Qt=function(Fn){return kt.indexOf(Fn)!==-1},cr=Qt("top"),fr=Qt("left"),ir=Qt("right"),Yt=Qt("bottom"),gr=Yt||fr||cr||ir,yr=Qt("inside"),Tr=kt==="inside"&&Ke.ticks==="inside"||!yr&&Ke.ticks==="outside"&&Ke.tickson!=="boundaries",pr=0,Kr=0,Or=Tr?Ke.ticklen:0;if(yr?Or*=-1:gr&&(Or=0),Tr&&(pr+=Or,zt)){var Nr=x.deg2rad(zt);pr=Or*Math.cos(Nr)+1,Kr=Or*Math.sin(Nr)}Ke.showticklabels&&(Tr||Ke.showline)&&(pr+=.2*Ke.tickfont.size),pr+=(Ke.linewidth||1)/2*(yr?-1:1);var Sn={labelStandoff:pr,labelShift:Kr},Jr,xn,Dn,mr,Ar=0,zr=Ke.side,Br=Ke._id.charAt(0),on=Ke.tickangle,mn;if(Br==="x")mn=!yr&&zr==="bottom"||yr&&zr==="top",mr=mn?1:-1,yr&&(mr*=-1),Jr=Kr*mr,xn=Ze+pr*mr,Dn=mn?1:-.2,Math.abs(on)===90&&(yr?Dn+=ee:on===-90&&zr==="bottom"?Dn=re:on===90&&zr==="top"?Dn=ee:Dn=.5,Ar=ee/2*(on/90)),Sn.xFn=function(Fn){return Fn.dx+Jr+Ar*Fn.fontSize},Sn.yFn=function(Fn){return Fn.dy+xn+Fn.fontSize*Dn},Sn.anchorFn=function(Fn,Jn){if(gr){if(fr)return"end";if(ir)return"start"}return!P(Jn)||Jn===0||Jn===180?"middle":Jn*mr<0!==yr?"end":"start"},Sn.heightFn=function(Fn,Jn,ta){return Jn<-60||Jn>60?-.5*ta:Ke.side==="top"!==yr?-ta:0};else if(Br==="y"){if(mn=!yr&&zr==="left"||yr&&zr==="right",mr=mn?1:-1,yr&&(mr*=-1),Jr=pr,xn=Kr*mr,Dn=0,!yr&&Math.abs(on)===90&&(on===-90&&zr==="left"||on===90&&zr==="right"?Dn=re:Dn=.5),yr){var Tn=P(on)?+on:0;if(Tn!==0){var An=x.deg2rad(Tn);Ar=Math.abs(Math.sin(An))*re*mr,Dn=0}}Sn.xFn=function(Fn){return Fn.dx+Ze-(Jr+Fn.fontSize*Dn)*mr+Ar*Fn.fontSize},Sn.yFn=function(Fn){return Fn.dy+xn+Fn.fontSize*ee},Sn.anchorFn=function(Fn,Jn){return P(Jn)&&Math.abs(Jn)===90?"middle":mn?"end":"start"},Sn.heightFn=function(Fn,Jn,ta){return Ke.side==="right"&&(Jn*=-1),Jn<-30?-ta:Jn<30?-.5*ta:0}}return Sn};function wt(Ke){return[Ke.text,Ke.x,Ke.axInfo,Ke.font,Ke.fontSize,Ke.fontColor].join("_")}q.drawTicks=function(Ke,Ze,zt){zt=zt||{};var kt=Ze._id+"tick",Qt=[].concat(Ze.minor&&Ze.minor.ticks?zt.vals.filter(function(fr){return fr.minor&&!fr.noTick}):[]).concat(Ze.ticks?zt.vals.filter(function(fr){return!fr.minor&&!fr.noTick}):[]),cr=zt.layer.selectAll("path."+kt).data(Qt,wt);cr.exit().remove(),cr.enter().append("path").classed(kt,1).classed("ticks",1).classed("crisp",zt.crisp!==!1).each(function(fr){return n.stroke(d.select(this),fr.minor?Ze.minor.tickcolor:Ze.tickcolor)}).style("stroke-width",function(fr){return u.crispRound(Ke,fr.minor?Ze.minor.tickwidth:Ze.tickwidth,1)+"px"}).attr("d",zt.path).style("display",null),Jt(Ze,[V]),cr.attr("transform",zt.transFn)},q.drawGrid=function(Ke,Ze,zt){if(zt=zt||{},Ze.tickmode!=="sync"){var kt=Ze._id+"grid",Qt=Ze.minor&&Ze.minor.showgrid,cr=Qt?zt.vals.filter(function(Jr){return Jr.minor}):[],fr=Ze.showgrid?zt.vals.filter(function(Jr){return!Jr.minor}):[],ir=zt.counterAxis;if(ir&&q.shouldShowZeroLine(Ke,Ze,ir))for(var Yt=Ze.tickmode==="array",gr=0;gr<fr.length;gr++){var yr=fr[gr].x;if(Yt?!yr:Math.abs(yr)<Ze.dtick/100)if(fr=fr.slice(0,gr).concat(fr.slice(gr+1)),Yt)gr--;else break}Ze._gw=u.crispRound(Ke,Ze.gridwidth,1);for(var Tr=Qt?u.crispRound(Ke,Ze.minor.gridwidth,1):0,pr=zt.layer,Kr=zt.minorLayer,Or=1;Or>=0;Or--){var Nr=Or?pr:Kr;if(Nr){var Sn=Nr.selectAll("path."+kt).data(Or?fr:cr,wt);Sn.exit().remove(),Sn.enter().append("path").classed(kt,1).classed("crisp",zt.crisp!==!1),Sn.attr("transform",zt.transFn).attr("d",zt.path).each(function(Jr){return n.stroke(d.select(this),Jr.minor?Ze.minor.gridcolor:Ze.gridcolor||"#ddd")}).style("stroke-dasharray",function(Jr){return u.dashStyle(Jr.minor?Ze.minor.griddash:Ze.griddash,Jr.minor?Ze.minor.gridwidth:Ze.gridwidth)}).style("stroke-width",function(Jr){return(Jr.minor?Tr:Ze._gw)+"px"}).style("display",null),typeof zt.path=="function"&&Sn.attr("d",zt.path)}}Jt(Ze,[H,k])}},q.drawZeroLine=function(Ke,Ze,zt){zt=zt||zt;var kt=Ze._id+"zl",Qt=q.shouldShowZeroLine(Ke,Ze,zt.counterAxis),cr=zt.layer.selectAll("path."+kt).data(Qt?[{x:0,id:Ze._id}]:[]);cr.exit().remove(),cr.enter().append("path").classed(kt,1).classed("zl",1).classed("crisp",zt.crisp!==!1).each(function(){zt.layer.selectAll("path").sort(function(fr,ir){return Q(fr.id,ir.id)})}),cr.attr("transform",zt.transFn).attr("d",zt.path).call(n.stroke,Ze.zerolinecolor||n.defaultLine).style("stroke-width",u.crispRound(Ke,Ze.zerolinewidth,Ze._gw||1)+"px").style("display",null),Jt(Ze,[N])},q.drawLabels=function(Ke,Ze,zt){zt=zt||{};var kt=Ke._fullLayout,Qt=Ze._id,cr=Qt.charAt(0),fr=zt.cls||Qt+"tick",ir=zt.vals.filter(function(mr){return mr.text}),Yt=zt.labelFns,gr=zt.secondary?0:Ze.tickangle,yr=(Ze._prevTickAngles||{})[fr],Tr=zt.layer.selectAll("g."+fr).data(Ze.showticklabels?ir:[],wt),pr=[];Tr.enter().append("g").classed(fr,1).append("text").attr("text-anchor","middle").each(function(mr){var Ar=d.select(this),zr=Ke._promises.length;Ar.call(y.positionText,Yt.xFn(mr),Yt.yFn(mr)).call(u.font,mr.font,mr.fontSize,mr.fontColor).text(mr.text).call(y.convertToTspans,Ke),Ke._promises[zr]?pr.push(Ke._promises.pop().then(function(){Kr(Ar,gr)})):Kr(Ar,gr)}),Jt(Ze,[G]),Tr.exit().remove(),zt.repositionOnUpdate&&Tr.each(function(mr){d.select(this).select("text").call(y.positionText,Yt.xFn(mr),Yt.yFn(mr))});function Kr(mr,Ar){mr.each(function(zr){var Br=d.select(this),on=Br.select(".text-math-group"),mn=Yt.anchorFn(zr,Ar),Tn=zt.transFn.call(Br.node(),zr)+(P(Ar)&&+Ar!=0?" rotate("+Ar+","+Yt.xFn(zr)+","+(Yt.yFn(zr)-zr.fontSize/2)+")":""),An=y.lineCount(Br),Fn=ie*zr.fontSize,Jn=Yt.heightFn(zr,P(Ar)?+Ar:0,(An-1)*Fn);if(Jn&&(Tn+=v(0,Jn)),on.empty()){var ta=Br.select("text");ta.attr({transform:Tn,"text-anchor":mn}),ta.style("opacity",1),Ze._adjustTickLabelsOverflow&&Ze._adjustTickLabelsOverflow()}else{var sa=u.bBox(on.node()).width,ha=sa*{end:-.5,start:.5}[mn];on.attr("transform",Tn+v(ha,0))}})}Ze._adjustTickLabelsOverflow=function(){var mr=Ze.ticklabeloverflow;if(!(!mr||mr==="allow")){var Ar=mr.indexOf("hide")!==-1,zr=Ze._id.charAt(0)==="x",Br=0,on=zr?Ke._fullLayout.width:Ke._fullLayout.height;if(mr.indexOf("domain")!==-1){var mn=x.simpleMap(Ze.range,Ze.r2l);Br=Ze.l2p(mn[0])+Ze._offset,on=Ze.l2p(mn[1])+Ze._offset}var Tn=Math.min(Br,on),An=Math.max(Br,on),Fn=Ze.side,Jn=1/0,ta=-1/0;Tr.each(function(Dr){var sn=d.select(this),nn=sn.select(".text-math-group");if(nn.empty()){var dn=u.bBox(sn.node()),Un=0;zr?(dn.right>An||dn.left<Tn)&&(Un=1):(dn.bottom>An||dn.top+(Ze.tickangle?0:Dr.fontSize/4)<Tn)&&(Un=1);var Ln=sn.select("text");Un?Ar&&Ln.style("opacity",0):(Ln.style("opacity",1),Fn==="bottom"||Fn==="right"?Jn=Math.min(Jn,zr?dn.top:dn.left):Jn=-1/0,Fn==="top"||Fn==="left"?ta=Math.max(ta,zr?dn.bottom:dn.right):ta=1/0)}});for(var sa in kt._plots){var ha=kt._plots[sa];if(!(Ze._id!==ha.xaxis._id&&Ze._id!==ha.yaxis._id)){var la=zr?ha.yaxis:ha.xaxis;la&&(la["_visibleLabelMin_"+Ze._id]=Jn,la["_visibleLabelMax_"+Ze._id]=ta)}}}},Ze._hideCounterAxisInsideTickLabels=function(mr){var Ar=Ze._id.charAt(0)==="x",zr=[];for(var Br in kt._plots){var on=kt._plots[Br];Ze._id!==on.xaxis._id&&Ze._id!==on.yaxis._id||zr.push(Ar?on.yaxis:on.xaxis)}zr.forEach(function(mn,Tn){mn&&qt(mn)&&(mr||[N,k,H,V,G]).forEach(function(An){var Fn=An.K==="tick"&&An.L==="text"&&Ze.ticklabelmode==="period",Jn=kt._plots[Ze._mainSubplot],ta;An.K===N.K?ta=Jn.zerolinelayer.selectAll("."+Ze._id+"zl"):An.K===k.K?ta=Jn.minorGridlayer.selectAll("."+Ze._id):An.K===H.K?ta=Jn.gridlayer.selectAll("."+Ze._id):ta=Jn[Ze._id.charAt(0)+"axislayer"],ta.each(function(){var sa=d.select(this);An.L&&(sa=sa.selectAll(An.L)),sa.each(function(ha){var la=Ze.l2p(Fn?St(ha):ha.x)+Ze._offset,Dr=d.select(this);la<Ze["_visibleLabelMax_"+mn._id]&&la>Ze["_visibleLabelMin_"+mn._id]?Dr.style("display","none"):An.K==="tick"&&!Tn&&Dr.style("display",null)})})})})},Kr(Tr,yr+1?yr:gr);function Or(){return pr.length&&Promise.all(pr)}var Nr=null;function Sn(){if(Kr(Tr,gr),ir.length&&cr==="x"&&!P(gr)&&(Ze.type!=="log"||String(Ze.dtick).charAt(0)!=="D")){Nr=0;var mr=0,Ar=[],zr;if(Tr.each(function(dn){mr=Math.max(mr,dn.fontSize);var Un=Ze.l2p(dn.x),Ln=or(this),Pn=u.bBox(Ln.node());Ar.push({top:0,bottom:10,height:10,left:Un-Pn.width/2,right:Un+Pn.width/2+2,width:Pn.width+2})}),(Ze.tickson==="boundaries"||Ze.showdividers)&&!zt.secondary){var Br=2;for(Ze.ticks&&(Br+=Ze.tickwidth/2),zr=0;zr<Ar.length;zr++){var on=ir[zr].xbnd,mn=Ar[zr];if(on[0]!==null&&mn.left-Ze.l2p(on[0])<Br||on[1]!==null&&Ze.l2p(on[1])-mn.right<Br){Nr=90;break}}}else{var Tn=ir.length,An=Math.abs((ir[Tn-1].x-ir[0].x)*Ze._m)/(Tn-1),Fn=Ze.ticklabelposition||"",Jn=function(dn){return Fn.indexOf(dn)!==-1},ta=Jn("top"),sa=Jn("left"),ha=Jn("right"),la=Jn("bottom"),Dr=la||sa||ta||ha,sn=Dr?(Ze.tickwidth||0)+2*ce:0,nn=An<mr*2.5||Ze.type==="multicategory"||Ze._name==="realaxis";for(zr=0;zr<Ar.length-1;zr++)if(x.bBoxIntersect(Ar[zr],Ar[zr+1],sn)){Nr=nn?90:30;break}}Nr&&Kr(Tr,Nr)}}Ze._selections&&(Ze._selections[fr]=Tr);var Jr=[Or];Ze.automargin&&kt._redrawFromAutoMarginCount&&yr===90?(Nr=90,Jr.push(function(){Kr(Tr,yr)})):Jr.push(Sn),Ze._tickAngles&&Jr.push(function(){Ze._tickAngles[fr]=Nr===null?P(gr)?gr:0:Nr});var xn=Ze._anchorAxis;xn&&xn.autorange&&qt(Ze)&&!ue(kt,Ze._id)&&(kt._insideTickLabelsAutorange||(kt._insideTickLabelsAutorange={}),kt._insideTickLabelsAutorange[xn._name+".autorange"]=xn.autorange,Jr.push(function(){Tr.each(function(Ar,zr){var Br=or(this),on=Br.select(".text-math-group");on.empty()&&(Ze._vals[zr].bb=u.bBox(Br.node()))})}));var Dn=x.syncOrAsync(Jr);return Dn&&Dn.then&&Ke._promises.push(Dn),Dn};function Bt(Ke,Ze,zt){var kt=Ze._id+"divider",Qt=zt.vals,cr=zt.layer.selectAll("path."+kt).data(Qt,wt);cr.exit().remove(),cr.enter().insert("path",":first-child").classed(kt,1).classed("crisp",1).call(n.stroke,Ze.dividercolor).style("stroke-width",u.crispRound(Ke,Ze.dividerwidth,1)+"px"),cr.attr("transform",zt.transFn).attr("d",zt.path)}q.getPxPosition=function(Ke,Ze){var zt=Ke._fullLayout._size,kt=Ze._id.charAt(0),Qt=Ze.side,cr;if(Ze.anchor!=="free"?cr=Ze._anchorAxis:kt==="x"?cr={_offset:zt.t+(1-(Ze.position||0))*zt.h,_length:0}:kt==="y"&&(cr={_offset:zt.l+(Ze.position||0)*zt.w+Ze._shift,_length:0}),Qt==="top"||Qt==="left")return cr._offset;if(Qt==="bottom"||Qt==="right")return cr._offset+cr._length};function Wt(Ke){var Ze=Ke.title.font.size,zt=(Ke.title.text.match(y.BR_TAG_ALL)||[]).length;return Ke.title.hasOwnProperty("standoff")?zt?Ze*(re+zt*ie):Ze*re:zt?Ze*(zt+1)*ie:Ze}function hr(Ke,Ze){var zt=Ke._fullLayout,kt=Ze._id,Qt=kt.charAt(0),cr=Ze.title.font.size,fr;if(Ze.title.hasOwnProperty("standoff"))fr=Ze._depth+Ze.title.standoff+Wt(Ze);else{var ir=qt(Ze);if(Ze.type==="multicategory")fr=Ze._depth;else{var Yt=1.5*cr;ir&&(Yt=.5*cr,Ze.ticks==="outside"&&(Yt+=Ze.ticklen)),fr=10+Yt+(Ze.linewidth?Ze.linewidth-1:0)}ir||(Qt==="x"?fr+=Ze.side==="top"?cr*(Ze.showticklabels?1:0):cr*(Ze.showticklabels?1.5:.5):fr+=Ze.side==="right"?cr*(Ze.showticklabels?1:.5):cr*(Ze.showticklabels?.5:0))}var gr=q.getPxPosition(Ke,Ze),yr,Tr,pr;Qt==="x"?(Tr=Ze._offset+Ze._length/2,pr=Ze.side==="top"?gr-fr:gr+fr):(pr=Ze._offset+Ze._length/2,Tr=Ze.side==="right"?gr+fr:gr-fr,yr={rotate:"-90",offset:0});var Kr;if(Ze.type!=="multicategory"){var Or=Ze._selections[Ze._id+"tick"];if(Kr={selection:Or,side:Ze.side},Or&&Or.node()&&Or.node().parentNode){var Nr=u.getTranslate(Or.node().parentNode);Kr.offsetLeft=Nr.x,Kr.offsetTop=Nr.y}Ze.title.hasOwnProperty("standoff")&&(Kr.pad=0)}return Ze._titleStandoff=fr,r.draw(Ke,kt+"title",{propContainer:Ze,propName:Ze._name+".title.text",placeholder:zt._dfltTitle[Qt],avoid:Kr,transform:yr,attributes:{x:Tr,y:pr,"text-anchor":"middle"}})}q.shouldShowZeroLine=function(Ke,Ze,zt){var kt=x.simpleMap(Ze.range,Ze.r2l);return kt[0]*kt[1]<=0&&Ze.zeroline&&(Ze.type==="linear"||Ze.type==="-")&&!(Ze.rangebreaks&&Ze.maskBreaks(0)===O)&&(gt(Ze,0)||!jt(Ke,Ze,zt,kt)||Ut(Ke,Ze))},q.clipEnds=function(Ke,Ze){return Ze.filter(function(zt){return gt(Ke,zt.x)})};function gt(Ke,Ze){var zt=Ke.l2p(Ze);return zt>1&&zt<Ke._length-1}function jt(Ke,Ze,zt,kt){var Qt=zt._mainAxis;if(!Qt)return;var cr=Ke._fullLayout,fr=Ze._id.charAt(0),ir=q.counterLetter(Ze._id),Yt=Ze._offset+(Math.abs(kt[0])<Math.abs(kt[1])==(fr==="x")?0:Ze._length);function gr(Or){if(!Or.showline||!Or.linewidth)return!1;var Nr=Math.max((Or.linewidth+Ze.zerolinewidth)/2,1);function Sn(Dn){return typeof Dn=="number"&&Math.abs(Dn-Yt)<Nr}if(Sn(Or._mainLinePosition)||Sn(Or._mainMirrorPosition))return!0;var Jr=Or._linepositions||{};for(var xn in Jr)if(Sn(Jr[xn][0])||Sn(Jr[xn][1]))return!0}var yr=cr._plots[zt._mainSubplot];if(!(yr.mainplotinfo||yr).overlays.length)return gr(zt);for(var Tr=q.list(Ke,ir),pr=0;pr<Tr.length;pr++){var Kr=Tr[pr];if(Kr._mainAxis===Qt&&gr(Kr))return!0}}function Ut(Ke,Ze){for(var zt=Ke._fullData,kt=Ze._mainSubplot,Qt=Ze._id.charAt(0),cr=0;cr<zt.length;cr++){var fr=zt[cr];if(fr.visible===!0&&fr.xaxis+fr.yaxis===kt&&(_.traceIs(fr,"bar-like")&&fr.orientation==={x:"h",y:"v"}[Qt]||fr.fill&&fr.fill.charAt(fr.fill.length-1)===Qt))return!0}return!1}function or(Ke){var Ze=d.select(Ke),zt=Ze.select(".text-math-group");return zt.empty()?Ze.select("text"):zt}q.allowAutoMargin=function(Ke){for(var Ze=q.list(Ke,"",!0),zt=0;zt<Ze.length;zt++){var kt=Ze[zt];kt.automargin&&(a.allowAutoMargin(Ke,ur(kt)),kt.mirror&&a.allowAutoMargin(Ke,dt(kt))),_.getComponentMethod("rangeslider","isVisible")(kt)&&a.allowAutoMargin(Ke,ut(kt))}};function ur(Ke){return Ke._id+".automargin"}function dt(Ke){return ur(Ke)+".mirror"}function ut(Ke){return Ke._id+".rangeslider"}q.swap=function(Ke,Ze){for(var zt=yt(Ke,Ze),kt=0;kt<zt.length;kt++)Rt(Ke,zt[kt].x,zt[kt].y)};function yt(Ke,Ze){var zt=[],kt,Qt;for(kt=0;kt<Ze.length;kt++){var cr=[],fr=Ke._fullData[Ze[kt]].xaxis,ir=Ke._fullData[Ze[kt]].yaxis;if(!(!fr||!ir)){for(Qt=0;Qt<zt.length;Qt++)(zt[Qt].x.indexOf(fr)!==-1||zt[Qt].y.indexOf(ir)!==-1)&&cr.push(Qt);if(!cr.length){zt.push({x:[fr],y:[ir]});continue}var Yt=zt[cr[0]],gr;if(cr.length>1)for(Qt=1;Qt<cr.length;Qt++)gr=zt[cr[Qt]],Lt(Yt.x,gr.x),Lt(Yt.y,gr.y);Lt(Yt.x,[fr]),Lt(Yt.y,[ir])}}return zt}function Lt(Ke,Ze){for(var zt=0;zt<Ze.length;zt++)Ke.indexOf(Ze[zt])===-1&&Ke.push(Ze[zt])}function Rt(Ke,Ze,zt){var kt=[],Qt=[],cr=Ke.layout,fr,ir;for(fr=0;fr<Ze.length;fr++)kt.push(q.getFromId(Ke,Ze[fr]));for(fr=0;fr<zt.length;fr++)Qt.push(q.getFromId(Ke,zt[fr]));var Yt=Object.keys(i),gr=["anchor","domain","overlaying","position","side","tickangle","editType"],yr=["linear","log"];for(fr=0;fr<Yt.length;fr++){var Tr=Yt[fr],pr=kt[0][Tr],Kr=Qt[0][Tr],Or=!0,Nr=!1,Sn=!1;if(!(Tr.charAt(0)==="_"||typeof pr=="function"||gr.indexOf(Tr)!==-1)){for(ir=1;ir<kt.length&&Or;ir++){var Jr=kt[ir][Tr];Tr==="type"&&yr.indexOf(pr)!==-1&&yr.indexOf(Jr)!==-1&&pr!==Jr?Nr=!0:Jr!==pr&&(Or=!1)}for(ir=1;ir<Qt.length&&Or;ir++){var xn=Qt[ir][Tr];Tr==="type"&&yr.indexOf(Kr)!==-1&&yr.indexOf(xn)!==-1&&Kr!==xn?Sn=!0:Qt[ir][Tr]!==Kr&&(Or=!1)}Or&&(Nr&&(cr[kt[0]._name].type="linear"),Sn&&(cr[Qt[0]._name].type="linear"),Nt(cr,Tr,kt,Qt,Ke._fullLayout._dfltTitle))}}for(fr=0;fr<Ke._fullLayout.annotations.length;fr++){var Dn=Ke._fullLayout.annotations[fr];Ze.indexOf(Dn.xref)!==-1&&zt.indexOf(Dn.yref)!==-1&&x.swapAttrs(cr.annotations[fr],["?"])}}function Nt(Ke,Ze,zt,kt,Qt){var cr=x.nestedProperty,fr=cr(Ke[zt[0]._name],Ze).get(),ir=cr(Ke[kt[0]._name],Ze).get(),Yt;for(Ze==="title"&&(fr&&fr.text===Qt.x&&(fr.text=Qt.y),ir&&ir.text===Qt.y&&(ir.text=Qt.x)),Yt=0;Yt<zt.length;Yt++)cr(Ke,zt[Yt]._name+"."+Ze).set(ir);for(Yt=0;Yt<kt.length;Yt++)cr(Ke,kt[Yt]._name+"."+Ze).set(fr)}function Vt(Ke){return Ke._id==="angularaxis"}function Zt(Ke,Ze){for(var zt=Ze._rangebreaks.length,kt=0;kt<zt;kt++){var Qt=Ze._rangebreaks[kt];if(Ke>=Qt.min&&Ke<Qt.max)return Qt.max}return Ke}function qt(Ke){return(Ke.ticklabelposition||"").indexOf("inside")!==-1}function Jt(Ke,Ze){qt(Ke._anchorAxis||{})&&Ke._hideCounterAxisInsideTickLabels&&Ke._hideCounterAxisInsideTickLabels(Ze)}function nr(Ke,Ze,zt,kt){var Qt=Ke.anchor!=="free"&&(Ke.overlaying===void 0||Ke.overlaying===!1)?Ke._id:Ke.overlaying,cr;kt?cr=Ke.side==="right"?Ze:-Ze:cr=Ze,Qt in zt||(zt[Qt]={}),Ke.side in zt[Qt]||(zt[Qt][Ke.side]=0),zt[Qt][Ke.side]+=cr}function Mr(Ke,Ze){return Ke.autoshift?Ze[Ke.overlaying][Ke.side]:Ke.shift||0}},4322:function(z,B,e){var d=e(92770),P=e(71828),a=e(50606).BADNUM,_=P.isArrayOrTypedArray,x=P.isDateTime,v=P.cleanNumber,y=Math.round;z.exports=function(b,p,E){var c=b,l=E.noMultiCategory;if(_(c)&&!c.length)return"-";if(!l&&g(c))return"multicategory";if(l&&Array.isArray(c[0])){for(var m=[],M=0;M<c.length;M++)if(_(c[M]))for(var L=0;L<c[M].length;L++)m.push(c[M][L]);c=m}if(u(c,p))return"date";var D=E.autotypenumbers!=="strict";return f(c,D)?"category":n(c,D)?"linear":"-"};function r(h,b){return b?d(h):typeof h=="number"}function n(h,b){for(var p=h.length,E=0;E<p;E++)if(r(h[E],b))return!0;return!1}function u(h,b){for(var p=h.length,E=i(p),c=0,l=0,m={},M=0;M<p;M+=E){var L=y(M),D=h[L],A=String(D);m[A]||(m[A]=1,x(D,b)&&c++,d(D)&&l++)}return c>l*2}function i(h){return Math.max(1,(h-1)/1e3)}function f(h,b){for(var p=h.length,E=i(p),c=0,l=0,m={},M=0;M<p;M+=E){var L=y(M),D=h[L],A=String(D);if(!m[A]){m[A]=1;var C=typeof D;C==="boolean"?l++:(b?v(D)!==a:C==="number")?c++:C==="string"&&l++}}return l>c*2}function g(h){return _(h[0])&&_(h[1])}},71453:function(z,B,e){var d=e(92770),P=e(73972),a=e(71828),_=e(44467),x=e(85501),v=e(13838),y=e(26218),r=e(38701),n=e(96115),u=e(89426),i=e(15258),f=e(92128),g=e(21994),h=e(85555).WEEKDAY_PATTERN,b=e(85555).HOUR_PATTERN;z.exports=function(m,M,L,D,A){var C=D.letter,S=D.font||{},o=D.splomStash||{},R=L("visible",!D.visibleDflt),T=M._template||{},O=M.type||T.type||"-",N;if(O==="date"){var H=P.getComponentMethod("calendars","handleDefaults");H(m,M,"calendar",D.calendar),D.noTicklabelmode||(N=L("ticklabelmode"))}var k="";(!D.noTicklabelposition||O==="multicategory")&&(k=a.coerce(m,M,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:N==="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")),D.noTicklabeloverflow||L("ticklabeloverflow",k.indexOf("inside")!==-1?"hide past domain":O==="category"||O==="multicategory"?"allow":"hide past div"),g(M,A);var V=!M.isValidRange(m.range);V&&D.reverseDflt&&(V="reversed");var G=L("autorange",V);G&&(O==="linear"||O==="-")&&L("rangemode"),L("range"),M.cleanRange(),i(m,M,L,D),O!=="category"&&!D.noHover&&L("hoverformat");var U=L("color"),Y=U!==v.color.dflt?U:S.color,ee=o.label||A._dfltTitle[C];if(u(m,M,L,O,D),!R)return M;L("title.text",ee),a.coerceFont(L,"title.font",{family:S.family,size:a.bigFont(S.size),color:Y}),y(m,M,L,O);var re=D.hasMinor;if(re&&(_.newContainer(M,"minor"),y(m,M,L,O,{isMinor:!0})),n(m,M,L,O,D),r(m,M,L,D),re){var ie=D.isMinor;D.isMinor=!0,r(m,M,L,D),D.isMinor=ie}f(m,M,L,{dfltColor:U,bgColor:D.bgColor,showGrid:D.showGrid,hasMinor:re,attributes:v}),re&&!M.minor.ticks&&!M.minor.showgrid&&delete M.minor,(M.showline||M.ticks)&&L("mirror");var se=O==="multicategory";if(!D.noTickson&&(O==="category"||se)&&(M.ticks||M.showgrid)){var ce;se&&(ce="boundaries");var q=L("tickson",ce);q==="boundaries"&&delete M.ticklabelposition}if(se){var j=L("showdividers");j&&(L("dividercolor"),L("dividerwidth"))}if(O==="date")if(x(m,M,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:p}),!M.rangebreaks.length)delete M.rangebreaks;else{for(var Z=0;Z<M.rangebreaks.length;Z++)if(M.rangebreaks[Z].pattern===h){M._hasDayOfWeekBreaks=!0;break}if(g(M,A),A._has("scattergl")||A._has("splom"))for(var Q=0;Q<D.data.length;Q++){var ue=D.data[Q];(ue.type==="scattergl"||ue.type==="splom")&&(ue.visible=!1,a.warn(ue.type+" traces do not work on axes with rangebreaks. Setting trace "+ue.index+" to `visible: false`."))}}return M};function p(l,m,M){function L(N,H){return a.coerce(l,m,v.rangebreaks,N,H)}var D=L("enabled");if(D){var A=L("bounds");if(A&&A.length>=2){var C="",S,o;if(A.length===2){for(S=0;S<2;S++)if(o=c(A[S]),o){C=h;break}}var R=L("pattern",C);if(R===h)for(S=0;S<2;S++)o=c(A[S]),o&&(m.bounds[S]=A[S]=o-1);if(R)for(S=0;S<2;S++)switch(o=A[S],R){case h:if(!d(o)){m.enabled=!1;return}if(o=+o,o!==Math.floor(o)||o<0||o>=7){m.enabled=!1;return}m.bounds[S]=A[S]=o;break;case b:if(!d(o)){m.enabled=!1;return}if(o=+o,o<0||o>24){m.enabled=!1;return}m.bounds[S]=A[S]=o;break}if(M.autorange===!1){var T=M.range;if(T[0]<T[1]){if(A[0]<T[0]&&A[1]>T[1]){m.enabled=!1;return}}else if(A[0]>T[0]&&A[1]<T[1]){m.enabled=!1;return}}}else{var O=L("values");if(O&&O.length)L("dvalue");else{m.enabled=!1;return}}}}var E={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function c(l){if(typeof l=="string")return E[l.substr(0,3).toLowerCase()]}},12663:function(z,B,e){var d=e(31562),P=d.FORMAT_LINK,a=d.DATE_FORMAT_LINK;function _(y,r){return{valType:"string",dflt:"",editType:"none",description:(r?x:v)("hover text",y)+["By default the values are formatted using "+(r?"generic number format":"`"+y+"axis.hoverformat`")+"."].join(" ")}}function x(y,r){return["Sets the "+y+" formatting rule"+(r?"for `"+r+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+P+"."].join(" ")}function v(y,r){return x(y,r)+[" And for dates see: "+a+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}z.exports={axisHoverFormat:_,descriptionOnlyNumbers:x,descriptionWithDates:v}},41675:function(z,B,e){var d=e(73972),P=e(85555);B.id2name=function(x){if(!(typeof x!="string"||!x.match(P.AX_ID_PATTERN))){var v=x.split(" ")[0].substr(1);return v==="1"&&(v=""),x.charAt(0)+"axis"+v}},B.name2id=function(x){if(x.match(P.AX_NAME_PATTERN)){var v=x.substr(5);return v==="1"&&(v=""),x.charAt(0)+v}},B.cleanId=function(x,v,y){var r=/( domain)$/.test(x);if(!(typeof x!="string"||!x.match(P.AX_ID_PATTERN))&&!(v&&x.charAt(0)!==v)&&!(r&&!y)){var n=x.split(" ")[0].substr(1).replace(/^0+/,"");return n==="1"&&(n=""),x.charAt(0)+n+(r&&y?" domain":"")}},B.list=function(_,x,v){var y=_._fullLayout;if(!y)return[];var r=B.listIds(_,x),n=new Array(r.length),u;for(u=0;u<r.length;u++){var i=r[u];n[u]=y[i.charAt(0)+"axis"+i.substr(1)]}if(!v){var f=y._subplots.gl3d||[];for(u=0;u<f.length;u++){var g=y[f[u]];x?n.push(g[x+"axis"]):n.push(g.xaxis,g.yaxis,g.zaxis)}}return n},B.listIds=function(_,x){var v=_._fullLayout;if(!v)return[];var y=v._subplots;return x?y[x+"axis"]:y.xaxis.concat(y.yaxis)},B.getFromId=function(_,x,v){var y=_._fullLayout;return x=x===void 0||typeof x!="string"?x:x.replace(" domain",""),v==="x"?x=x.replace(/y[0-9]*/,""):v==="y"&&(x=x.replace(/x[0-9]*/,"")),y[B.id2name(x)]},B.getFromTrace=function(_,x,v){var y=_._fullLayout,r=null;if(d.traceIs(x,"gl3d")){var n=x.scene;n.substr(0,5)==="scene"&&(r=y[n][v+"axis"])}else r=B.getFromId(_,x[v+"axis"]||v);return r},B.idSort=function(_,x){var v=_.charAt(0),y=x.charAt(0);return v!==y?v>y?1:-1:+(_.substr(1)||1)-+(x.substr(1)||1)},B.ref2id=function(_){return/^[xyz]/.test(_)?_.split(" ")[0]:!1};function a(_,x){if(x&&x.length){for(var v=0;v<x.length;v++)if(x[v][_])return!0}return!1}B.isLinked=function(_,x){return a(x,_._axisMatchGroups)||a(x,_._axisConstraintGroups)}},15258:function(z){function B(e,d){var P=d.dataAttr||e._id.charAt(0),a={},_,x,v;if(d.axData)_=d.axData;else for(_=[],x=0;x<d.data.length;x++){var y=d.data[x];y[P+"axis"]===e._id&&_.push(y)}for(x=0;x<_.length;x++){var r=_[x][P];for(v=0;v<r.length;v++){var n=r[v];n!=null&&(a[n]=1)}}return Object.keys(a)}z.exports=function(d,P,a,_){if(P.type==="category"){var x=d.categoryarray,v=Array.isArray(x)&&x.length>0,y;v&&(y="array");var r=a("categoryorder",y),n;r==="array"&&(n=a("categoryarray")),!v&&r==="array"&&(r=P.categoryorder="trace"),r==="trace"?P._initialCategories=[]:r==="array"?P._initialCategories=n.slice():(n=B(P,_).sort(),r==="category ascending"?P._initialCategories=n:r==="category descending"&&(P._initialCategories=n.reverse()))}}},66287:function(z,B,e){var d=e(92770),P=e(71828),a=e(50606),_=a.ONEDAY,x=a.ONEWEEK;B.dtick=function(v,y){var r=y==="log",n=y==="date",u=y==="category",i=n?_:1;if(!v)return i;if(d(v))return v=Number(v),v<=0?i:u?Math.max(1,Math.round(v)):n?Math.max(.1,v):v;if(typeof v!="string"||!(n||r))return i;var f=v.charAt(0),g=v.substr(1);return g=d(g)?Number(g):0,g<=0||!(n&&f==="M"&&g===Math.round(g)||r&&f==="L"||r&&f==="D"&&(g===1||g===2))?i:v},B.tick0=function(v,y,r,n){if(y==="date")return P.cleanDate(v,P.dateTick0(r,n%x===0?1:0));if(!(n==="D1"||n==="D2"))return d(v)?Number(v):0}},85555:function(z,B,e){var d=e(30587).counter;z.exports={idRegex:{x:d("x","( domain)?"),y:d("y","( domain)?")},attrRegex:d("[xy]axis"),xAxisMatch:d("xaxis"),yAxisMatch:d("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"}}},99082:function(z,B,e){var d=e(71828),P=e(71739),a=e(41675).id2name,_=e(13838),x=e(42449),v=e(21994),y=e(50606).ALMOST_EQUAL,r=e(18783).FROM_BL;B.handleDefaults=function(p,E,c){var l=c.axIds,m=c.axHasImage,M=E._axisConstraintGroups=[],L=E._axisMatchGroups=[],D,A,C,S,o,R,T,O;for(D=0;D<l.length;D++)S=a(l[D]),o=p[S],R=E[S],n(o,R,{axIds:l,layoutOut:E,hasImage:m[S]});function N(ie,se){for(D=0;D<ie.length;D++){A=ie[D];for(C in A)E[a(C)][se]=A}}for(N(L,"_matchGroup"),D=0;D<M.length;D++){A=M[D];for(C in A)if(R=E[a(C)],R.fixedrange){for(var H in A){var k=a(H);(p[k]||{}).fixedrange===!1&&d.warn("fixedrange was specified as false for axis "+k+" but was overridden because another axis in its constraint group has fixedrange true"),E[k].fixedrange=!0}break}}for(D=0;D<M.length;){A=M[D];for(C in A){R=E[a(C)],R._matchGroup&&Object.keys(R._matchGroup).length===Object.keys(A).length&&(M.splice(D,1),D--);break}D++}N(M,"_constraintGroup");var V=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],G=!1,U=!1;function Y(){O=R[T],T==="rangebreaks"&&(U=R._hasDayOfWeekBreaks)}for(D=0;D<L.length;D++){A=L[D];for(var ee=0;ee<V.length;ee++){T=V[ee],O=null;var re;for(C in A)if(S=a(C),o=p[S],R=E[S],T in R){if(!R.matches&&(re=R,T in o)){Y();break}O===null&&T in o&&Y()}if(T==="range"&&O&&(G=!0),T==="autorange"&&O===null&&G&&(O=!1),O===null&&T in re&&(O=re[T]),O!==null)for(C in A)R=E[a(C)],R[T]=T==="range"?O.slice():O,T==="rangebreaks"&&(R._hasDayOfWeekBreaks=U,v(R,E))}}};function n(p,E,c){var l=c.axIds,m=c.layoutOut,M=c.hasImage,L=m._axisConstraintGroups,D=m._axisMatchGroups,A=E._id,C=A.charAt(0),S=((m._splomAxes||{})[C]||{})[A]||{},o=E._id,R=o.charAt(0)==="x";E._matchGroup=null,E._constraintGroup=null;function T(j,Z){return d.coerce(p,E,_,j,Z)}T("constrain",M?"domain":"range"),d.coerce(p,E,{constraintoward:{valType:"enumerated",values:R?["left","center","right"]:["bottom","middle","top"],dflt:R?"center":"middle"}},"constraintoward");var O=E.type,N,H,k=[];for(N=0;N<l.length;N++)if(H=l[N],H!==o){var V=m[a(H)];V.type===O&&k.push(H)}var G=i(L,o);if(G){var U=[];for(N=0;N<k.length;N++)H=k[N],G[H]||U.push(H);k=U}var Y=k.length,ee,re;Y&&(p.matches||S.matches)&&(ee=d.coerce(p,E,{matches:{valType:"enumerated",values:k,dflt:k.indexOf(S.matches)!==-1?S.matches:void 0}},"matches"));var ie=M&&!R?E.anchor:void 0;if(Y&&!ee&&(p.scaleanchor||ie)&&(re=d.coerce(p,E,{scaleanchor:{valType:"enumerated",values:k}},"scaleanchor",ie)),ee){E._matchGroup=f(D,o,ee,1);var se=m[a(ee)],ce=u(m,E)/u(m,se);R!==(ee.charAt(0)==="x")&&(ce=(R?"x":"y")+ce),f(L,o,ee,ce)}else p.matches&&l.indexOf(p.matches)!==-1&&d.warn("ignored "+E._name+'.matches: "'+p.matches+'" to avoid an infinite loop');if(re){var q=T("scaleratio");q||(q=E.scaleratio=1),f(L,o,re,q)}else p.scaleanchor&&l.indexOf(p.scaleanchor)!==-1&&d.warn("ignored "+E._name+'.scaleanchor: "'+p.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function u(p,E){var c=E.domain;return c||(c=p[a(E.overlaying)].domain),c[1]-c[0]}function i(p,E){for(var c=0;c<p.length;c++)if(p[c][E])return p[c];return null}function f(p,E,c,l){var m,M,L,D,A,C=i(p,E);C===null?(C={},C[E]=1,A=p.length,p.push(C)):A=p.indexOf(C);var S=Object.keys(C);for(m=0;m<p.length;m++)if(L=p[m],m!==A&&L[c]){var o=L[c];for(M=0;M<S.length;M++)D=S[M],L[D]=g(o,g(l,C[D]));p.splice(A,1);return}if(l!==1)for(M=0;M<S.length;M++){var R=S[M];C[R]=g(l,C[R])}C[c]=1}function g(p,E){var c="",l="",m,M;typeof p=="string"&&(c=p.match(/^[xy]*/)[0],m=c.length,p=+p.substr(m)),typeof E=="string"&&(l=E.match(/^[xy]*/)[0],M=l.length,E=+E.substr(M));var L=p*E;return!m&&!M?L:!m||!M||c.charAt(0)===l.charAt(0)?c+l+p*E:m===M?L:(m>M?c.substr(M):l.substr(m))+L}function h(p,E){for(var c=E._size,l=c.h/c.w,m={},M=Object.keys(p),L=0;L<M.length;L++){var D=M[L],A=p[D];if(typeof A=="string"){var C=A.match(/^[xy]*/)[0],S=C.length;A=+A.substr(S);for(var o=C.charAt(0)==="y"?l:1/l,R=0;R<S;R++)A*=o}m[D]=A}return m}B.enforce=function(E){var c=E._fullLayout,l=c._axisConstraintGroups||[],m,M,L,D,A,C,S,o;for(m=0;m<l.length;m++){L=h(l[m],c);var R=Object.keys(L),T=1/0,O=0,N=1/0,H={},k={},V=!1;for(M=0;M<R.length;M++)D=R[M],k[D]=A=c[a(D)],A._inputDomain?A.domain=A._inputDomain.slice():A._inputDomain=A.domain.slice(),A._inputRange||(A._inputRange=A.range.slice()),A.setScale(),H[D]=C=Math.abs(A._m)/L[D],T=Math.min(T,C),(A.constrain==="domain"||!A._constraintShrinkable)&&(N=Math.min(N,C)),delete A._constraintShrinkable,O=Math.max(O,C),A.constrain==="domain"&&(V=!0);if(!(T>y*O&&!V)){for(M=0;M<R.length;M++)if(D=R[M],C=H[D],A=k[D],S=A.constrain,C!==N||S==="domain")if(o=C/N,S==="range")x(A,o);else{var G=A._inputDomain,U=(A.domain[1]-A.domain[0])/(G[1]-G[0]),Y=(A.r2l(A.range[1])-A.r2l(A.range[0]))/(A.r2l(A._inputRange[1])-A.r2l(A._inputRange[0]));if(o/=U,o*Y<1){A.domain=A._input.domain=G.slice(),x(A,o);continue}if(Y<1&&(A.range=A._input.range=A._inputRange.slice(),o*=Y),A.autorange){var ee=A.r2l(A.range[0]),re=A.r2l(A.range[1]),ie=(ee+re)/2,se=ie,ce=ie,q=Math.abs(re-ie),j=ie-q*o*1.0001,Z=ie+q*o*1.0001,Q=P.makePadFn(c,A,0),ue=P.makePadFn(c,A,1);b(A,o);var fe=Math.abs(A._m),te=P.concatExtremes(E,A),ne=te.min,ve=te.max,le,xe;for(xe=0;xe<ne.length;xe++)le=ne[xe].val-Q(ne[xe])/fe,le>j&&le<se&&(se=le);for(xe=0;xe<ve.length;xe++)le=ve[xe].val+ue(ve[xe])/fe,le<Z&&le>ce&&(ce=le);var Se=(ce-se)/(2*q);o/=Se,se=A.l2r(se),ce=A.l2r(ce),A.range=A._input.range=ee<re?[se,ce]:[ce,se]}b(A,o)}}}},B.getAxisGroup=function(E,c){for(var l=E._axisMatchGroups,m=0;m<l.length;m++){var M=l[m];if(M[c])return"g"+m}return c},B.clean=function(E,c){if(c._inputDomain){for(var l=!1,m=c._id,M=E._fullLayout._axisConstraintGroups,L=0;L<M.length;L++)if(M[L][m]){l=!0;break}(!l||c.constrain!=="domain")&&(c._input.domain=c.domain=c._inputDomain,delete c._inputDomain)}};function b(p,E){var c=p._inputDomain,l=r[p.constraintoward],m=c[0]+(c[1]-c[0])*l;p.domain=p._input.domain=[m+(c[0]-m)/E,m+(c[1]-m)/E],p.setScale()}},29323:function(z,B,e){var d=e(39898),P=e(71828),a=P.numberFormat,_=e(84267),x=e(38520),v=e(73972),y=P.strTranslate,r=e(63893),n=e(7901),u=e(91424),i=e(30211),f=e(89298),g=e(6964),h=e(28569),b=e(64505),p=b.selectingOrDrawing,E=b.freeMode,c=e(18783).FROM_TL,l=e(33306),m=e(61549).redrawReglTraces,M=e(74875),L=e(41675).getFromId,D=e(47322).prepSelect,A=e(47322).clearOutline,C=e(47322).selectOnClick,S=e(42449),o=e(85555),R=o.MINDRAG,T=o.MINZOOM,O=!0;function N(le,xe,Se,Re,Ee,Oe,Be,Le){var Te=le._fullLayout._zoomlayer,De=Be+Le==="nsew",Ve=(Be+Le).length===1,Ye,Ne,Xe,ht,st,it,nt,pt,Tt,Et,Dt,et,Ue,ze,rt,lt,Qe,Fe,Ce,pe,we,Ae,Pe;Se+=xe.yaxis._shift;function Ge(){if(Ye=xe.xaxis,Ne=xe.yaxis,Tt=Ye._length,Et=Ne._length,nt=Ye._offset,pt=Ne._offset,Xe={},Xe[Ye._id]=Ye,ht={},ht[Ne._id]=Ne,Be&&Le)for(var ir=xe.overlays,Yt=0;Yt<ir.length;Yt++){var gr=ir[Yt].xaxis;Xe[gr._id]=gr;var yr=ir[Yt].yaxis;ht[yr._id]=yr}st=ve(Xe),it=ve(ht),Ue=V(st,Le),ze=V(it,Be),rt=!ze&&!Ue,et=te(le,le._fullLayout._axisMatchGroups,Xe,ht),Dt=te(le,le._fullLayout._axisConstraintGroups,Xe,ht,et);var Tr=Dt.isSubplotConstrained||et.isSubplotConstrained;lt=Le||Tr,Qe=Be||Tr;var pr=le._fullLayout;Fe=pr._has("scattergl"),Ce=pr._has("splom"),pe=pr._has("svg")}Ge();var We=re(ze+Ue,le._fullLayout.dragmode,De),tt=k(xe,Be+Le+"drag",We,Se,Re,Ee,Oe);if(rt&&!De)return tt.onmousedown=null,tt.style.pointerEvents="none",tt;var ct={element:tt,gd:le,plotinfo:xe};ct.prepFn=function(ir,Yt,gr){var yr=ct.dragmode,Tr=le._fullLayout.dragmode;Tr!==yr&&(ct.dragmode=Tr),Ge(),Ae=le._fullLayout._invScaleX,Pe=le._fullLayout._invScaleY,rt||(De?ir.shiftKey?Tr==="pan"?Tr="zoom":p(Tr)||(Tr="pan"):ir.ctrlKey&&(Tr="pan"):Tr="pan"),E(Tr)?ct.minDrag=1:ct.minDrag=void 0,p(Tr)?(ct.xaxes=st,ct.yaxes=it,D(ir,Yt,gr,ct,Tr)):(ct.clickFn=Pt,p(yr)&&St(),rt||(Tr==="zoom"?(ct.moveFn=yt,ct.doneFn=Rt,ct.minDrag=1,ut(ir,Yt,gr)):Tr==="pan"&&(ct.moveFn=nr,ct.doneFn=zt))),le._fullLayout._redrag=function(){var pr=le._dragdata;if(pr&&pr.element===tt){var Kr=le._fullLayout.dragmode;p(Kr)||(Ge(),kt([0,0,Tt,Et]),ct.moveFn(pr.dx,pr.dy))}}};function St(){ct.plotinfo.selection=!1,A(le)}function Pt(ir,Yt){var gr=ct.gd;if(gr._fullLayout._activeShapeIndex>=0){gr._fullLayout._deactivateShape(gr);return}var yr=gr._fullLayout.clickmode;if(j(gr),ir===2&&!Ve&&Ze(),De)yr.indexOf("select")>-1&&C(Yt,gr,st,it,xe.id,ct),yr.indexOf("event")>-1&&i.click(gr,Yt,xe.id);else if(ir===1&&Ve){var Tr=Be?Ne:Ye,pr=Be==="s"||Le==="w"?0:1,Kr=Tr._name+".range["+pr+"]",Or=G(Tr,pr),Nr="left",Sn="middle";if(Tr.fixedrange)return;Be?(Sn=Be==="n"?"top":"bottom",Tr.side==="right"&&(Nr="right")):Le==="e"&&(Nr="right"),gr._context.showAxisRangeEntryBoxes&&d.select(tt).call(r.makeEditable,{gd:gr,immediate:!0,background:gr._fullLayout.paper_bgcolor,text:String(Or),fill:Tr.tickfont?Tr.tickfont.color:"#444",horizontalAlign:Nr,verticalAlign:Sn}).on("edit",function(Jr){var xn=Tr.d2r(Jr);xn!==void 0&&v.call("_guiRelayout",gr,Kr,xn)})}}h.init(ct);var wt,Bt,Wt,hr,gt,jt,Ut,or,ur,dt;function ut(ir,Yt,gr){var yr=tt.getBoundingClientRect();wt=Yt-yr.left,Bt=gr-yr.top,le._fullLayout._calcInverseTransform(le);var Tr=P.apply3DTransform(le._fullLayout._invTransform)(wt,Bt);wt=Tr[0],Bt=Tr[1],Wt={l:wt,r:wt,w:0,t:Bt,b:Bt,h:0},hr=le._hmpixcount?le._hmlumcount/le._hmpixcount:_(le._fullLayout.plot_bgcolor).getLuminance(),gt="M0,0H"+Tt+"V"+Et+"H0V0",jt=!1,Ut="xy",dt=!1,or=ie(Te,hr,nt,pt,gt),ur=se(Te,nt,pt)}function yt(ir,Yt){if(le._transitioningWithDuration)return!1;var gr=Math.max(0,Math.min(Tt,Ae*ir+wt)),yr=Math.max(0,Math.min(Et,Pe*Yt+Bt)),Tr=Math.abs(gr-wt),pr=Math.abs(yr-Bt);Wt.l=Math.min(wt,gr),Wt.r=Math.max(wt,gr),Wt.t=Math.min(Bt,yr),Wt.b=Math.max(Bt,yr);function Kr(){Ut="",Wt.r=Wt.l,Wt.t=Wt.b,ur.attr("d","M0,0Z")}if(Dt.isSubplotConstrained)Tr>T||pr>T?(Ut="xy",Tr/Tt>pr/Et?(pr=Tr*Et/Tt,Bt>yr?Wt.t=Bt-pr:Wt.b=Bt+pr):(Tr=pr*Tt/Et,wt>gr?Wt.l=wt-Tr:Wt.r=wt+Tr),ur.attr("d",fe(Wt))):Kr();else if(et.isSubplotConstrained)if(Tr>T||pr>T){Ut="xy";var Or=Math.min(Wt.l/Tt,(Et-Wt.b)/Et),Nr=Math.max(Wt.r/Tt,(Et-Wt.t)/Et);Wt.l=Or*Tt,Wt.r=Nr*Tt,Wt.b=(1-Or)*Et,Wt.t=(1-Nr)*Et,ur.attr("d",fe(Wt))}else Kr();else!ze||pr<Math.min(Math.max(Tr*.6,R),T)?Tr<R||!Ue?Kr():(Wt.t=0,Wt.b=Et,Ut="x",ur.attr("d",Q(Wt,Bt))):!Ue||Tr<Math.min(pr*.6,T)?(Wt.l=0,Wt.r=Tt,Ut="y",ur.attr("d",ue(Wt,wt))):(Ut="xy",ur.attr("d",fe(Wt)));Wt.w=Wt.r-Wt.l,Wt.h=Wt.b-Wt.t,Ut&&(dt=!0),le._dragged=dt,ce(or,ur,Wt,gt,jt,hr),Lt(),le.emit("plotly_relayouting",we),jt=!0}function Lt(){we={},(Ut==="xy"||Ut==="x")&&(U(st,Wt.l/Tt,Wt.r/Tt,we,Dt.xaxes),Mr("x",we)),(Ut==="xy"||Ut==="y")&&(U(it,(Et-Wt.b)/Et,(Et-Wt.t)/Et,we,Dt.yaxes),Mr("y",we))}function Rt(){Lt(),j(le),zt(),Z(le)}var Nt=[0,0,Tt,Et],Vt=null,Zt=o.REDRAWDELAY,qt=xe.mainplot?le._fullLayout._plots[xe.mainplot]:xe;function Jt(ir){if(!le._context._scrollZoom.cartesian&&!le._fullLayout._enablescrollzoom)return;if(St(),le._transitioningWithDuration){ir.preventDefault(),ir.stopPropagation();return}Ge(),clearTimeout(Vt);var Yt=-ir.deltaY;if(isFinite(Yt)||(Yt=ir.wheelDelta/10),!isFinite(Yt)){P.log("Did not find wheel motion attributes: ",ir);return}var gr=Math.exp(-Math.min(Math.max(Yt,-20),20)/200),yr=qt.draglayer.select(".nsewdrag").node().getBoundingClientRect(),Tr=(ir.clientX-yr.left)/yr.width,pr=(yr.bottom-ir.clientY)/yr.height,Kr;function Or(Nr,Sn,Jr){if(Nr.fixedrange)return;var xn=P.simpleMap(Nr.range,Nr.r2l),Dn=xn[0]+(xn[1]-xn[0])*Sn;function mr(Ar){return Nr.l2r(Dn+(Ar-Dn)*Jr)}Nr.range=xn.map(mr)}if(lt){for(Le||(Tr=.5),Kr=0;Kr<st.length;Kr++)Or(st[Kr],Tr,gr);Mr("x"),Nt[2]*=gr,Nt[0]+=Nt[2]*Tr*(1/gr-1)}if(Qe){for(Be||(pr=.5),Kr=0;Kr<it.length;Kr++)Or(it[Kr],pr,gr);Mr("y"),Nt[3]*=gr,Nt[1]+=Nt[3]*(1-pr)*(1/gr-1)}kt(Nt),Ke(),le.emit("plotly_relayouting",we),Vt=setTimeout(function(){le._fullLayout&&(Nt=[0,0,Tt,Et],zt())},Zt),ir.preventDefault()}Be.length*Le.length!==1&&ne(tt,Jt);function nr(ir,Yt){if(ir=ir*Ae,Yt=Yt*Pe,le._transitioningWithDuration)return;if(le._fullLayout._replotting=!0,Ue==="ew"||ze==="ns"){var gr=Ue?-ir:0,yr=ze?-Yt:0;if(et.isSubplotConstrained){if(Ue&&ze){var Tr=(ir/Tt-Yt/Et)/2;ir=Tr*Tt,Yt=-Tr*Et,gr=-ir,yr=-Yt}ze?gr=-yr*Tt/Et:yr=-gr*Et/Tt}Ue&&(Y(st,ir),Mr("x")),ze&&(Y(it,Yt),Mr("y")),kt([gr,yr,Tt,Et]),Ke(),le.emit("plotly_relayouting",we);return}function pr(mr,Ar,zr){for(var Br=1-Ar,on,mn,Tn=0;Tn<mr.length;Tn++){var An=mr[Tn];if(!An.fixedrange){on=An,mn=An._rl[Br]+(An._rl[Ar]-An._rl[Br])/ee(zr/An._length);var Fn=An.l2r(mn);Fn!==!1&&Fn!==void 0&&(An.range[Ar]=Fn)}}return on._length*(on._rl[Ar]-mn)/(on._rl[Ar]-on._rl[Br])}var Kr=Ue==="w"==(ze==="n")?1:-1;if(Ue&&ze&&(Dt.isSubplotConstrained||et.isSubplotConstrained)){var Or=(ir/Tt+Kr*Yt/Et)/2;ir=Or*Tt,Yt=Kr*Or*Et}var Nr,Sn;if(Ue==="w"?ir=pr(st,0,ir):Ue==="e"?ir=pr(st,1,-ir):Ue||(ir=0),ze==="n"?Yt=pr(it,1,Yt):ze==="s"?Yt=pr(it,0,-Yt):ze||(Yt=0),Nr=Ue==="w"?ir:0,Sn=ze==="n"?Yt:0,Dt.isSubplotConstrained&&!et.isSubplotConstrained||et.isSubplotConstrained&&Ue&&ze&&Kr>0){var Jr;if(et.isSubplotConstrained||!Ue&&ze.length===1){for(Jr=0;Jr<st.length;Jr++)st[Jr].range=st[Jr]._r.slice(),S(st[Jr],1-Yt/Et);ir=Yt*Tt/Et,Nr=ir/2}if(et.isSubplotConstrained||!ze&&Ue.length===1){for(Jr=0;Jr<it.length;Jr++)it[Jr].range=it[Jr]._r.slice(),S(it[Jr],1-ir/Tt);Yt=ir*Et/Tt,Sn=Yt/2}}(!et.isSubplotConstrained||!ze)&&Mr("x"),(!et.isSubplotConstrained||!Ue)&&Mr("y");var xn=Tt-ir,Dn=Et-Yt;et.isSubplotConstrained&&!(Ue&&ze)&&(Ue?(Sn=Nr?0:ir*Et/Tt,Dn=xn*Et/Tt):(Nr=Sn?0:Yt*Tt/Et,xn=Dn*Tt/Et)),kt([Nr,Sn,xn,Dn]),Ke(),le.emit("plotly_relayouting",we)}function Mr(ir,Yt){for(var gr=et.isSubplotConstrained?{x:it,y:st}[ir]:et[ir+"axes"],yr=et.isSubplotConstrained?{x:st,y:it}[ir]:[],Tr=0;Tr<gr.length;Tr++){var pr=gr[Tr],Kr=pr._id,Or=et.xLinks[Kr]||et.yLinks[Kr],Nr=yr[0]||Xe[Or]||ht[Or];Nr&&(Yt?(Yt[pr._name+".range[0]"]=Yt[Nr._name+".range[0]"],Yt[pr._name+".range[1]"]=Yt[Nr._name+".range[1]"]):pr.range=Nr.range.slice())}}function Ke(){var ir=[],Yt;function gr(Kr){for(Yt=0;Yt<Kr.length;Yt++)Kr[Yt].fixedrange||ir.push(Kr[Yt]._id)}function yr(Kr,Or){for(Yt=0;Yt<Kr.length;Yt++){var Nr=Kr[Yt],Sn=Nr[Or];!Nr.fixedrange&&Sn.tickmode==="sync"&&ir.push(Sn._id)}}for(lt&&(gr(st),gr(Dt.xaxes),gr(et.xaxes),yr(xe.overlays,"xaxis")),Qe&&(gr(it),gr(Dt.yaxes),gr(et.yaxes),yr(xe.overlays,"yaxis")),we={},Yt=0;Yt<ir.length;Yt++){var Tr=ir[Yt],pr=L(le,Tr);f.drawOne(le,pr,{skipTitle:!0}),we[pr._name+".range[0]"]=pr.range[0],we[pr._name+".range[1]"]=pr.range[1]}f.redrawComponents(le,ir)}function Ze(){if(!le._transitioningWithDuration){var ir=le._context.doubleClick,Yt=[];Ue&&(Yt=Yt.concat(st)),ze&&(Yt=Yt.concat(it)),et.xaxes&&(Yt=Yt.concat(et.xaxes)),et.yaxes&&(Yt=Yt.concat(et.yaxes));var gr={},yr,Tr,pr;if(ir==="reset+autosize"){for(ir="autosize",Tr=0;Tr<Yt.length;Tr++)if(yr=Yt[Tr],yr._rangeInitial&&(yr.range[0]!==yr._rangeInitial[0]||yr.range[1]!==yr._rangeInitial[1])||!yr._rangeInitial&&!yr.autorange){ir="reset";break}}if(ir==="autosize")for(Tr=0;Tr<Yt.length;Tr++)yr=Yt[Tr],yr.fixedrange||(gr[yr._name+".autorange"]=!0);else if(ir==="reset")for((Ue||Dt.isSubplotConstrained)&&(Yt=Yt.concat(Dt.xaxes)),ze&&!Dt.isSubplotConstrained&&(Yt=Yt.concat(Dt.yaxes)),Dt.isSubplotConstrained&&(Ue?ze||(Yt=Yt.concat(it)):Yt=Yt.concat(st)),Tr=0;Tr<Yt.length;Tr++)yr=Yt[Tr],yr.fixedrange||(yr._rangeInitial?(pr=yr._rangeInitial,gr[yr._name+".range[0]"]=pr[0],gr[yr._name+".range[1]"]=pr[1]):gr[yr._name+".autorange"]=!0);le.emit("plotly_doubleclick",null),v.call("_guiRelayout",le,gr)}}function zt(){kt([0,0,Tt,Et]),P.syncOrAsync([M.previousPromises,function(){le._fullLayout._replotting=!1,v.call("_guiRelayout",le,we)}],le)}function kt(ir){var Yt=le._fullLayout,gr=Yt._plots,yr=Yt._subplots.cartesian,Tr,pr,Kr,Or;if(Ce&&v.subplotsRegistry.splom.drag(le),Fe){for(Tr=0;Tr<yr.length;Tr++)if(pr=gr[yr[Tr]],Kr=pr.xaxis,Or=pr.yaxis,pr._scene){var Nr=P.simpleMap(Kr.range,Kr.r2l),Sn=P.simpleMap(Or.range,Or.r2l);pr._scene.update({range:[Nr[0],Sn[0],Nr[1],Sn[1]]})}}if((Ce||Fe)&&(l(le),m(le)),pe){var Jr=ir[2]/Ye._length,xn=ir[3]/Ne._length;for(Tr=0;Tr<yr.length;Tr++){pr=gr[yr[Tr]],Kr=pr.xaxis,Or=pr.yaxis;var Dn=(lt||et.isSubplotConstrained)&&!Kr.fixedrange&&Xe[Kr._id],mr=(Qe||et.isSubplotConstrained)&&!Or.fixedrange&&ht[Or._id],Ar,zr,Br,on;if(Dn?(Ar=Jr,Br=Le||et.isSubplotConstrained?ir[0]:fr(Kr,Ar)):et.xaHash[Kr._id]?(Ar=Jr,Br=ir[0]*Kr._length/Ye._length):et.yaHash[Kr._id]?(Ar=xn,Br=ze==="ns"?-ir[1]*Kr._length/Ne._length:fr(Kr,Ar,{n:"top",s:"bottom"}[ze])):(Ar=Qt(Kr,Jr,xn),Br=cr(Kr,Ar)),mr?(zr=xn,on=Be||et.isSubplotConstrained?ir[1]:fr(Or,zr)):et.yaHash[Or._id]?(zr=xn,on=ir[1]*Or._length/Ne._length):et.xaHash[Or._id]?(zr=Jr,on=Ue==="ew"?-ir[0]*Or._length/Ye._length:fr(Or,zr,{e:"right",w:"left"}[Ue])):(zr=Qt(Or,Jr,xn),on=cr(Or,zr)),!(!Ar&&!zr)){Ar||(Ar=1),zr||(zr=1);var mn=Kr._offset-Br/Ar,Tn=Or._offset-on/zr;pr.clipRect.call(u.setTranslate,Br,on).call(u.setScale,Ar,zr),pr.plot.call(u.setTranslate,mn,Tn).call(u.setScale,1/Ar,1/zr),(Ar!==pr.xScaleFactor||zr!==pr.yScaleFactor)&&(u.setPointGroupScale(pr.zoomScalePts,Ar,zr),u.setTextPointsScale(pr.zoomScaleTxt,Ar,zr)),u.hideOutsideRangePoints(pr.clipOnAxisFalseTraces,pr),pr.xScaleFactor=Ar,pr.yScaleFactor=zr}}}}function Qt(ir,Yt,gr){return ir.fixedrange?0:lt&&Dt.xaHash[ir._id]?Yt:Qe&&(Dt.isSubplotConstrained?Dt.xaHash:Dt.yaHash)[ir._id]?gr:0}function cr(ir,Yt){return Yt?(ir.range=ir._r.slice(),S(ir,Yt),fr(ir,Yt)):0}function fr(ir,Yt,gr){return ir._length*(1-Yt)*c[gr||ir.constraintoward||"middle"]}return tt}function H(le,xe,Se,Re){var Ee=P.ensureSingle(le.draglayer,xe,Se,function(Oe){Oe.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",le.id)});return Ee.call(g,Re),Ee.node()}function k(le,xe,Se,Re,Ee,Oe,Be){var Le=H(le,"rect",xe,Se);return d.select(Le).call(u.setRect,Re,Ee,Oe,Be),Le}function V(le,xe){for(var Se=0;Se<le.length;Se++)if(!le[Se].fixedrange)return xe;return""}function G(le,xe){var Se=le.range[xe],Re=Math.abs(Se-le.range[1-xe]),Ee;return le.type==="date"?Se:le.type==="log"?(Ee=Math.ceil(Math.max(0,-Math.log(Re)/Math.LN10))+3,a("."+Ee+"g")(Math.pow(10,Se))):(Ee=Math.floor(Math.log(Math.abs(Se))/Math.LN10)-Math.floor(Math.log(Re)/Math.LN10)+4,a("."+String(Ee)+"g")(Se))}function U(le,xe,Se,Re,Ee){for(var Oe=0;Oe<le.length;Oe++){var Be=le[Oe];if(!Be.fixedrange)if(Be.rangebreaks){var Le=Be._id.charAt(0)==="y",Te=Le?1-xe:xe,De=Le?1-Se:Se;Re[Be._name+".range[0]"]=Be.l2r(Be.p2l(Te*Be._length)),Re[Be._name+".range[1]"]=Be.l2r(Be.p2l(De*Be._length))}else{var Ve=Be._rl[0],Ye=Be._rl[1]-Ve;Re[Be._name+".range[0]"]=Be.l2r(Ve+Ye*xe),Re[Be._name+".range[1]"]=Be.l2r(Ve+Ye*Se)}}if(Ee&&Ee.length){var Ne=(xe+(1-Se))/2;U(Ee,Ne,1-Ne,Re,[])}}function Y(le,xe){for(var Se=0;Se<le.length;Se++){var Re=le[Se];if(!Re.fixedrange)if(Re.rangebreaks){var Ee=0,Oe=Re._length,Be=Re.p2l(Ee+xe)-Re.p2l(Ee),Le=Re.p2l(Oe+xe)-Re.p2l(Oe),Te=(Be+Le)/2;Re.range=[Re.l2r(Re._rl[0]-Te),Re.l2r(Re._rl[1]-Te)]}else Re.range=[Re.l2r(Re._rl[0]-xe/Re._m),Re.l2r(Re._rl[1]-xe/Re._m)]}}function ee(le){return 1-(le>=0?Math.min(le,.9):1/(1/Math.max(le,-.3)+3.222))}function re(le,xe,Se){return le?le==="nsew"?Se?"":xe==="pan"?"move":"crosshair":le.toLowerCase()+"-resize":"pointer"}function ie(le,xe,Se,Re,Ee){return le.append("path").attr("class","zoombox").style({fill:xe>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",y(Se,Re)).attr("d",Ee+"Z")}function se(le,xe,Se){return le.append("path").attr("class","zoombox-corners").style({fill:n.background,stroke:n.defaultLine,"stroke-width":1,opacity:0}).attr("transform",y(xe,Se)).attr("d","M0,0Z")}function ce(le,xe,Se,Re,Ee,Oe){le.attr("d",Re+"M"+Se.l+","+Se.t+"v"+Se.h+"h"+Se.w+"v-"+Se.h+"h-"+Se.w+"Z"),q(le,xe,Ee,Oe)}function q(le,xe,Se,Re){Se||(le.transition().style("fill",Re>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),xe.transition().style("opacity",1).duration(200))}function j(le){d.select(le).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function Z(le){O&&le.data&&le._context.showTips&&(P.notifier(P._(le,"Double-click to zoom back out"),"long"),O=!1)}function Q(le,xe){return"M"+(le.l-.5)+","+(xe-T-.5)+"h-3v"+(2*T+1)+"h3ZM"+(le.r+.5)+","+(xe-T-.5)+"h3v"+(2*T+1)+"h-3Z"}function ue(le,xe){return"M"+(xe-T-.5)+","+(le.t-.5)+"v-3h"+(2*T+1)+"v3ZM"+(xe-T-.5)+","+(le.b+.5)+"v3h"+(2*T+1)+"v-3Z"}function fe(le){var xe=Math.floor(Math.min(le.b-le.t,le.r-le.l,T)/2);return"M"+(le.l-3.5)+","+(le.t-.5+xe)+"h3v"+-xe+"h"+xe+"v-3h-"+(xe+3)+"ZM"+(le.r+3.5)+","+(le.t-.5+xe)+"h-3v"+-xe+"h"+-xe+"v-3h"+(xe+3)+"ZM"+(le.r+3.5)+","+(le.b+.5-xe)+"h-3v"+xe+"h"+-xe+"v3h"+(xe+3)+"ZM"+(le.l-3.5)+","+(le.b+.5-xe)+"h3v"+xe+"h"+xe+"v3h-"+(xe+3)+"Z"}function te(le,xe,Se,Re,Ee){for(var Oe=!1,Be={},Le={},Te,De,Ve,Ye,Ne=(Ee||{}).xaHash,Xe=(Ee||{}).yaHash,ht=0;ht<xe.length;ht++){var st=xe[ht];for(Te in Se)if(st[Te]){for(Ve in st)!(Ee&&(Ne[Ve]||Xe[Ve]))&&!(Ve.charAt(0)==="x"?Se:Re)[Ve]&&(Be[Ve]=Te);for(De in Re)!(Ee&&(Ne[De]||Xe[De]))&&st[De]&&(Oe=!0)}for(De in Re)if(st[De])for(Ye in st)!(Ee&&(Ne[Ye]||Xe[Ye]))&&!(Ye.charAt(0)==="x"?Se:Re)[Ye]&&(Le[Ye]=De)}Oe&&(P.extendFlat(Be,Le),Le={});var it={},nt=[];for(Ve in Be){var pt=L(le,Ve);nt.push(pt),it[pt._id]=pt}var Tt={},Et=[];for(Ye in Le){var Dt=L(le,Ye);Et.push(Dt),Tt[Dt._id]=Dt}return{xaHash:it,yaHash:Tt,xaxes:nt,yaxes:Et,xLinks:Be,yLinks:Le,isSubplotConstrained:Oe}}function ne(le,xe){if(!x)le.onwheel!==void 0?le.onwheel=xe:le.onmousewheel!==void 0?le.onmousewheel=xe:le.isAddedWheelEvent||(le.isAddedWheelEvent=!0,le.addEventListener("wheel",xe,{passive:!1}));else{var Se=le.onwheel!==void 0?"wheel":"mousewheel";le._onwheel&&le.removeEventListener(Se,le._onwheel),le._onwheel=xe,le.addEventListener(Se,xe,{passive:!1})}}function ve(le){var xe=[];for(var Se in le)xe.push(le[Se]);return xe}z.exports={makeDragBox:N,makeDragger:H,makeRectDragger:k,makeZoombox:ie,makeCorners:se,updateZoombox:ce,xyCorners:fe,transitionZoombox:q,removeZoombox:j,showDoubleClickNotifier:Z,attachWheelEventHandler:ne}},4305:function(z,B,e){var d=e(39898),P=e(30211),a=e(28569),_=e(6964),x=e(29323).makeDragBox,v=e(85555).DRAGGERSIZE;B.initInteractions=function(r){var n=r._fullLayout;if(r._context.staticPlot){d.select(r).selectAll(".drag").remove();return}if(!(!n._has("cartesian")&&!n._has("splom"))){var u=Object.keys(n._plots||{}).sort(function(f,g){if((n._plots[f].mainplot&&!0)===(n._plots[g].mainplot&&!0)){var h=f.split("y"),b=g.split("y");return h[0]===b[0]?Number(h[1]||1)-Number(b[1]||1):Number(h[0]||1)-Number(b[0]||1)}return n._plots[f].mainplot?1:-1});u.forEach(function(f){var g=n._plots[f],h=g.xaxis,b=g.yaxis;if(!g.mainplot){var p=x(r,g,h._offset,b._offset,h._length,b._length,"ns","ew");p.onmousemove=function(l){r._fullLayout._rehover=function(){r._fullLayout._hoversubplot===f&&r._fullLayout._plots[f]&&P.hover(r,l,f)},P.hover(r,l,f),r._fullLayout._lasthover=p,r._fullLayout._hoversubplot=f},p.onmouseout=function(l){r._dragging||(r._fullLayout._hoversubplot=null,a.unhover(r,l))},r._context.showAxisDragHandles&&(x(r,g,h._offset-v,b._offset-v,v,v,"n","w"),x(r,g,h._offset+h._length,b._offset-v,v,v,"n","e"),x(r,g,h._offset-v,b._offset+b._length,v,v,"s","w"),x(r,g,h._offset+h._length,b._offset+b._length,v,v,"s","e"))}if(r._context.showAxisDragHandles){if(f===h._mainSubplot){var E=h._mainLinePosition;h.side==="top"&&(E-=v),x(r,g,h._offset+h._length*.1,E,h._length*.8,v,"","ew"),x(r,g,h._offset,E,h._length*.1,v,"","w"),x(r,g,h._offset+h._length*.9,E,h._length*.1,v,"","e")}if(f===b._mainSubplot){var c=b._mainLinePosition;b.side!=="right"&&(c-=v),x(r,g,c,b._offset+b._length*.1,v,b._length*.8,"ns",""),x(r,g,c,b._offset+b._length*.9,v,b._length*.1,"s",""),x(r,g,c,b._offset,v,b._length*.1,"n","")}}});var i=n._hoverlayer.node();i.onmousemove=function(f){f.target=r._fullLayout._lasthover,P.hover(r,f,n._hoversubplot)},i.onclick=function(f){f.target=r._fullLayout._lasthover,P.click(r,f)},i.onmousedown=function(f){r._fullLayout._lasthover.onmousedown(f)},B.updateFx(r)}},B.updateFx=function(y){var r=y._fullLayout,n=r.dragmode==="pan"?"move":"crosshair";_(r._draggers,n)}},76325:function(z,B,e){var d=e(73972),P=e(71828),a=e(41675);z.exports=function(x){return function(y,r){var n=y[x];if(Array.isArray(n))for(var u=d.subplotsRegistry.cartesian,i=u.idRegex,f=r._subplots,g=f.xaxis,h=f.yaxis,b=f.cartesian,p=r._has("cartesian")||r._has("gl2d"),E=0;E<n.length;E++){var c=n[E];if(P.isPlainObject(c)){var l=a.cleanId(c.xref,"x",!1),m=a.cleanId(c.yref,"y",!1),M=i.x.test(l),L=i.y.test(m);if(M||L){p||P.pushUnique(r._basePlotModules,u);var D=!1;M&&g.indexOf(l)===-1&&(g.push(l),D=!0),L&&h.indexOf(m)===-1&&(h.push(m),D=!0),D&&M&&L&&b.push(l+m)}}}}}},93612:function(z,B,e){var d=e(39898),P=e(73972),a=e(71828),_=e(74875),x=e(91424),v=e(27659).a0,y=e(41675),r=e(85555),n=e(77922),u=a.ensureSingle;function i(E,c,l){return a.ensureSingle(E,c,l,function(m){m.datum(l)})}B.name="cartesian",B.attr=["xaxis","yaxis"],B.idRoot=["x","y"],B.idRegex=r.idRegex,B.attrRegex=r.attrRegex,B.attributes=e(89502),B.layoutAttributes=e(13838),B.supplyLayoutDefaults=e(86763),B.transitionAxes=e(66847),B.finalizeSubplots=function(E,c){var l=c._subplots,m=l.xaxis,M=l.yaxis,L=l.cartesian,D=L.concat(l.gl2d||[]),A={},C={},S,o,R;for(S=0;S<D.length;S++){var T=D[S].split("y");A[T[0]]=1,C["y"+T[1]]=1}for(S=0;S<m.length;S++)o=m[S],A[o]||(R=(E[y.id2name(o)]||{}).anchor,r.idRegex.y.test(R)||(R="y"),L.push(o+R),D.push(o+R),C[R]||(C[R]=1,a.pushUnique(M,R)));for(S=0;S<M.length;S++)R=M[S],C[R]||(o=(E[y.id2name(R)]||{}).anchor,r.idRegex.x.test(o)||(o="x"),L.push(o+R),D.push(o+R),A[o]||(A[o]=1,a.pushUnique(m,o)));if(!D.length){o="",R="";for(var O in E)if(r.attrRegex.test(O)){var N=O.charAt(0);N==="x"?(!o||+O.substr(5)<+o.substr(5))&&(o=O):(!R||+O.substr(5)<+R.substr(5))&&(R=O)}o=o?y.name2id(o):"x",R=R?y.name2id(R):"y",m.push(o),M.push(R),L.push(o+R)}},B.plot=function(E,c,l,m){var M=E._fullLayout,L=M._subplots.cartesian,D=E.calcdata,A;if(!Array.isArray(c))for(c=[],A=0;A<D.length;A++)c.push(A);for(A=0;A<L.length;A++){for(var C=L[A],S=M._plots[C],o=[],R,T=0;T<D.length;T++){var O=D[T],N=O[0].trace;N.xaxis+N.yaxis===C&&((c.indexOf(N.index)!==-1||N.carpet)&&(R&&R[0].trace.xaxis+R[0].trace.yaxis===C&&["tonextx","tonexty","tonext"].indexOf(N.fill)!==-1&&o.indexOf(R)===-1&&o.push(R),o.push(O)),R=O)}f(E,S,o,l,m)}};function f(E,c,l,m,M){for(var L=r.traceLayerClasses,D=E._fullLayout,A=D._modules,C,S,o,R=[],T=[],O=0;O<A.length;O++){C=A[O];var N=C.name,H=P.modules[N].categories;if(H.svg){var k=C.layerName||N+"layer",V=C.plot;S=v(l,V),o=S[0],l=S[1],o.length&&R.push({i:L.indexOf(k),className:k,plotMethod:V,cdModule:o}),H.zoomScale&&T.push("."+k)}}R.sort(function(Y,ee){return Y.i-ee.i});var G=c.plot.selectAll("g.mlayer").data(R,function(Y){return Y.className});if(G.enter().append("g").attr("class",function(Y){return Y.className}).classed("mlayer",!0).classed("rangeplot",c.isRangePlot),G.exit().remove(),G.order(),G.each(function(Y){var ee=d.select(this),re=Y.className;Y.plotMethod(E,c,Y.cdModule,ee,m,M),r.clipOnAxisFalseQuery.indexOf("."+re)===-1&&x.setClipUrl(ee,c.layerClipId,E)}),D._has("scattergl")&&(C=P.getModule("scattergl"),o=v(l,C)[0],C.plot(E,c,o)),!E._context.staticPlot&&(c._hasClipOnAxisFalse&&(c.clipOnAxisFalseTraces=c.plot.selectAll(r.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),T.length)){var U=c.plot.selectAll(T.join(",")).selectAll(".trace");c.zoomScalePts=U.selectAll("path.point"),c.zoomScaleTxt=U.selectAll(".textpoint")}}B.clean=function(E,c,l,m){var M=m._plots||{},L=c._plots||{},D=m._subplots||{},A,C,S;if(m._hasOnlyLargeSploms&&!c._hasOnlyLargeSploms)for(S in M)A=M[S],A.plotgroup&&A.plotgroup.remove();var o=m._has&&m._has("gl"),R=c._has&&c._has("gl");if(o&&!R)for(S in M)A=M[S],A._scene&&A._scene.destroy();if(D.xaxis&&D.yaxis){var T=y.listIds({_fullLayout:m});for(C=0;C<T.length;C++){var O=T[C];c[y.id2name(O)]||m._infolayer.selectAll(".g-"+O+"title").remove()}}var N=m._has&&m._has("cartesian"),H=c._has&&c._has("cartesian");if(N&&!H)b(m._cartesianlayer.selectAll(".subplot"),m),m._defs.selectAll(".axesclip").remove(),delete m._axisConstraintGroups,delete m._axisMatchGroups;else if(D.cartesian)for(C=0;C<D.cartesian.length;C++){var k=D.cartesian[C];if(!L[k]){var V="."+k+",."+k+"-x,."+k+"-y";m._cartesianlayer.selectAll(V).remove(),p(k,m)}}},B.drawFramework=function(E){var c=E._fullLayout,l=g(E),m=c._cartesianlayer.selectAll(".subplot").data(l,String);m.enter().append("g").attr("class",function(M){return"subplot "+M[0]}),m.order(),m.exit().call(b,c),m.each(function(M){var L=M[0],D=c._plots[L];D.plotgroup=d.select(this),h(E,D),D.draglayer=u(c._draggers,"g",L)})},B.rangePlot=function(E,c,l){h(E,c),f(E,c,l),_.style(E)};function g(E){var c=E._fullLayout,l=c._subplots.cartesian,m=l.length,M,L,D,A,C,S,o=[],R=[];for(M=0;M<m;M++){D=l[M],A=c._plots[D],C=A.xaxis,S=A.yaxis;var T=C._mainAxis,O=S._mainAxis,N=T._id+O._id,H=c._plots[N];A.overlays=[],N!==D&&H?(A.mainplot=N,A.mainplotinfo=H,R.push(D)):(A.mainplot=void 0,A.mainplotinfo=void 0,o.push(D))}for(M=0;M<R.length;M++)D=R[M],A=c._plots[D],A.mainplotinfo.overlays.push(A);var k=o.concat(R),V=new Array(m);for(M=0;M<m;M++){D=k[M],A=c._plots[D],C=A.xaxis,S=A.yaxis;var G=[D,C.layer,S.layer,C.overlaying||"",S.overlaying||""];for(L=0;L<A.overlays.length;L++)G.push(A.overlays[L].id);V[M]=G}return V}function h(E,c){var l=c.plotgroup,m=c.id,M=r.layerValue2layerClass[c.xaxis.layer],L=r.layerValue2layerClass[c.yaxis.layer],D=E._fullLayout._hasOnlyLargeSploms;if(c.mainplot){var C=c.mainplotinfo,S=C.plotgroup,o=m+"-x",R=m+"-y";c.minorGridlayer=C.minorGridlayer,c.gridlayer=C.gridlayer,c.zerolinelayer=C.zerolinelayer,u(C.overlinesBelow,"path",o),u(C.overlinesBelow,"path",R),u(C.overaxesBelow,"g",o),u(C.overaxesBelow,"g",R),c.plot=u(C.overplot,"g",m),u(C.overlinesAbove,"path",o),u(C.overlinesAbove,"path",R),u(C.overaxesAbove,"g",o),u(C.overaxesAbove,"g",R),c.xlines=S.select(".overlines-"+M).select("."+o),c.ylines=S.select(".overlines-"+L).select("."+R),c.xaxislayer=S.select(".overaxes-"+M).select("."+o),c.yaxislayer=S.select(".overaxes-"+L).select("."+R)}else if(D)c.xlines=u(l,"path","xlines-above"),c.ylines=u(l,"path","ylines-above"),c.xaxislayer=u(l,"g","xaxislayer-above"),c.yaxislayer=u(l,"g","yaxislayer-above");else{var A=u(l,"g","layer-subplot");c.shapelayer=u(A,"g","shapelayer"),c.imagelayer=u(A,"g","imagelayer"),c.minorGridlayer=u(l,"g","minor-gridlayer"),c.gridlayer=u(l,"g","gridlayer"),c.zerolinelayer=u(l,"g","zerolinelayer"),u(l,"path","xlines-below"),u(l,"path","ylines-below"),c.overlinesBelow=u(l,"g","overlines-below"),u(l,"g","xaxislayer-below"),u(l,"g","yaxislayer-below"),c.overaxesBelow=u(l,"g","overaxes-below"),c.plot=u(l,"g","plot"),c.overplot=u(l,"g","overplot"),c.xlines=u(l,"path","xlines-above"),c.ylines=u(l,"path","ylines-above"),c.overlinesAbove=u(l,"g","overlines-above"),u(l,"g","xaxislayer-above"),u(l,"g","yaxislayer-above"),c.overaxesAbove=u(l,"g","overaxes-above"),c.xlines=l.select(".xlines-"+M),c.ylines=l.select(".ylines-"+L),c.xaxislayer=l.select(".xaxislayer-"+M),c.yaxislayer=l.select(".yaxislayer-"+L)}D||(i(c.minorGridlayer,"g",c.xaxis._id),i(c.minorGridlayer,"g",c.yaxis._id),c.minorGridlayer.selectAll("g").map(function(T){return T[0]}).sort(y.idSort),i(c.gridlayer,"g",c.xaxis._id),i(c.gridlayer,"g",c.yaxis._id),c.gridlayer.selectAll("g").map(function(T){return T[0]}).sort(y.idSort)),c.xlines.style("fill","none").classed("crisp",!0),c.ylines.style("fill","none").classed("crisp",!0)}function b(E,c){if(E){var l={};E.each(function(C){var S=C[0],o=d.select(this);o.remove(),p(S,c),l[S]=!0});for(var m in c._plots)for(var M=c._plots[m],L=M.overlays||[],D=0;D<L.length;D++){var A=L[D];l[A.id]&&A.plot.selectAll(".trace").remove()}}}function p(E,c){c._draggers.selectAll("g."+E).remove(),c._defs.select("#clip"+c._uid+E+"plot").remove()}B.toSVG=function(E){var c=E._fullLayout._glimages,l=d.select(E).selectAll(".svg-container"),m=l.filter(function(L,D){return D===l.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function M(){var L=this,D=L.toDataURL("image/png"),A=c.append("svg:image");A.attr({xmlns:n.svg,"xlink:href":D,preserveAspectRatio:"none",x:0,y:0,width:L.style.width,height:L.style.height})}m.each(M)},B.updateFx=e(4305).updateFx},13838:function(z,B,e){var d=e(41940),P=e(22399),a=e(79952).P,_=e(1426).extendFlat,x=e(44467).templatedArray,v=e(12663).descriptionWithDates,y=e(50606).ONEDAY,r=e(85555),n=r.HOUR_PATTERN,u=r.WEEKDAY_PATTERN,i={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},f=_({},i,{values:i.values.slice().concat(["sync"])});function g(C){return{valType:"integer",min:0,dflt:C?5:0,editType:"ticks"}}var h={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},b={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},p={valType:"data_array",editType:"ticks"},E={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function c(C){var S={valType:"number",min:0,editType:"ticks"};return C||(S.dflt=5),S}function l(C){var S={valType:"number",min:0,editType:"ticks"};return C||(S.dflt=1),S}var m={valType:"color",dflt:P.defaultLine,editType:"ticks"},M={valType:"color",dflt:P.lightLine,editType:"ticks"};function L(C){var S={valType:"number",min:0,editType:"ticks"};return C||(S.dflt=1),S}var D=_({},a,{editType:"ticks"}),A={valType:"boolean",editType:"ticks"};z.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:P.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:d({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},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},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},scaleanchor:{valType:"enumerated",values:[r.idRegex.x.toString(),r.idRegex.y.toString()],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[r.idRegex.x.toString(),r.idRegex.y.toString()],editType:"calc"},rangebreaks:x("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[u,n,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:y},editType:"calc"}),tickmode:f,nticks:g(),tick0:h,dtick:b,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:p,ticktext:{valType:"data_array",editType:"ticks"},ticks:E,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},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"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:c(),tickwidth:l(),tickcolor:m,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:_({},a,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:d({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:v("tick label")},tickformatstops:x("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:v("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:P.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:A,gridcolor:M,gridwidth:L(),griddash:D,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:P.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:P.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",r.idRegex.x.toString(),r.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",r.idRegex.x.toString(),r.idRegex.y.toString()],editType:"plot"},minor:{tickmode:i,nticks:g("minor"),tick0:h,dtick:b,tickvals:p,ticks:E,ticklen:c("minor"),tickwidth:l("minor"),tickcolor:m,gridcolor:M,gridwidth:L("minor"),griddash:D,showgrid:A,editType:"ticks"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},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"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",editType:"plot"},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"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc",_deprecated:{autotick:{valType:"boolean",editType:"ticks"},title:{valType:"string",editType:"ticks"},titlefont:d({editType:"ticks"})}}},86763:function(z,B,e){var d=e(71828),P=e(7901),a=e(23469).isUnifiedHover,_=e(98212),x=e(44467),v=e(10820),y=e(13838),r=e(951),n=e(71453),u=e(99082),i=e(52830),f=e(41675),g=f.id2name,h=f.name2id,b=e(85555).AX_ID_PATTERN,p=e(73972),E=p.traceIs,c=p.getComponentMethod;function l(m,M,L){Array.isArray(m[M])?m[M].push(L):m[M]=[L]}z.exports=function(M,L,D){var A=L.autotypenumbers,C={},S={},o={},R={},T={},O={},N={},H={},k={},V={},G,U;for(G=0;G<D.length;G++){var Y=D[G];if(!(!E(Y,"cartesian")&&!E(Y,"gl2d"))){var ee;if(Y.xaxis)ee=g(Y.xaxis),l(C,ee,Y);else if(Y.xaxes)for(U=0;U<Y.xaxes.length;U++)l(C,g(Y.xaxes[U]),Y);var re;if(Y.yaxis)re=g(Y.yaxis),l(C,re,Y);else if(Y.yaxes)for(U=0;U<Y.yaxes.length;U++)l(C,g(Y.yaxes[U]),Y);if(Y.type==="funnel"?Y.orientation==="h"?(ee&&(S[ee]=!0),re&&(N[re]=!0)):re&&(o[re]=!0):Y.type==="image"?(re&&(H[re]=!0),ee&&(H[ee]=!0)):(re&&(T[re]=!0,O[re]=!0),(!E(Y,"carpet")||Y.type==="carpet"&&!Y._cheater)&&ee&&(R[ee]=!0)),Y.type==="carpet"&&Y._cheater&&ee&&(S[ee]=!0),E(Y,"2dMap")&&(k[ee]=!0,k[re]=!0),E(Y,"oriented")){var ie=Y.orientation==="h"?re:ee;V[ie]=!0}}}var se=L._subplots,ce=se.xaxis,q=se.yaxis,j=d.simpleMap(ce,g),Z=d.simpleMap(q,g),Q=j.concat(Z),ue=P.background;ce.length&&q.length&&(ue=d.coerce(M,L,v,"plot_bgcolor"));var fe=P.combine(ue,L.paper_bgcolor),te,ne,ve,le,xe;function Se(){var Ae=C[te]||[];xe._traceIndices=Ae.map(function(Pe){return Pe._expandedIndex}),xe._annIndices=[],xe._shapeIndices=[],xe._selectionIndices=[],xe._imgIndices=[],xe._subplotsWith=[],xe._counterAxes=[],xe._name=xe._attr=te,xe._id=ne}function Re(Ae,Pe){return d.coerce(le,xe,y,Ae,Pe)}function Ee(Ae,Pe){return d.coerce2(le,xe,y,Ae,Pe)}function Oe(Ae){return Ae==="x"?q:ce}function Be(Ae,Pe){for(var Ge=Ae==="x"?j:Z,We=[],tt=0;tt<Ge.length;tt++){var ct=Ge[tt];ct!==Pe&&!(M[ct]||{}).overlaying&&We.push(h(ct))}return We}var Le={x:Oe("x"),y:Oe("y")},Te=Le.x.concat(Le.y),De={},Ve=[];function Ye(){var Ae=le.matches;b.test(Ae)&&Te.indexOf(Ae)===-1&&(De[Ae]=le.type,Ve=Object.keys(De))}var Ne=_(M,L),Xe=a(Ne);for(G=0;G<Q.length;G++){te=Q[G],ne=h(te),ve=te.charAt(0),d.isPlainObject(M[te])||(M[te]={}),le=M[te],xe=x.newContainer(L,te,ve+"axis"),Se();var ht=ve==="x"&&!R[te]&&S[te]||ve==="y"&&!T[te]&&o[te],st=ve==="y"&&(!O[te]&&N[te]||H[te]),it={hasMinor:!0,letter:ve,font:L.font,outerTicks:k[te],showGrid:!V[te],data:C[te]||[],bgColor:fe,calendar:L.calendar,automargin:!0,visibleDflt:ht,reverseDflt:st,autotypenumbersDflt:A,splomStash:((L._splomAxes||{})[ve]||{})[ne]};Re("uirevision",L.uirevision),r(le,xe,Re,it),n(le,xe,Re,it,L);var nt=Xe&&ve===Ne.charAt(0),pt=Ee("spikecolor",Xe?xe.color:void 0),Tt=Ee("spikethickness",Xe?1.5:void 0),Et=Ee("spikedash",Xe?"dot":void 0),Dt=Ee("spikemode",Xe?"across":void 0),et=Ee("spikesnap"),Ue=Re("showspikes",!!nt||!!pt||!!Tt||!!Et||!!Dt||!!et);Ue||(delete xe.spikecolor,delete xe.spikethickness,delete xe.spikedash,delete xe.spikemode,delete xe.spikesnap);var ze=g(le.overlaying),rt=[0,1];if(L[ze]!==void 0){var lt=g(L[ze].anchor);L[lt]!==void 0&&(rt=L[lt].domain)}i(le,xe,Re,{letter:ve,counterAxes:Le[ve],overlayableAxes:Be(ve,te),grid:L.grid,overlayingDomain:rt}),Re("title.standoff"),Ye(),xe._input=le}for(G=0;G<Ve.length;){ne=Ve[G++],te=g(ne),ve=te.charAt(0),d.isPlainObject(M[te])||(M[te]={}),le=M[te],xe=x.newContainer(L,te,ve+"axis"),Se();var Qe={letter:ve,font:L.font,outerTicks:k[te],showGrid:!V[te],data:[],bgColor:fe,calendar:L.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:A,splomStash:((L._splomAxes||{})[ve]||{})[ne]};Re("uirevision",L.uirevision),xe.type=De[ne]||"linear",n(le,xe,Re,Qe,L),i(le,xe,Re,{letter:ve,counterAxes:Le[ve],overlayableAxes:Be(ve,te),grid:L.grid}),Re("fixedrange"),Ye(),xe._input=le}var Fe=c("rangeslider","handleDefaults"),Ce=c("rangeselector","handleDefaults");for(G=0;G<j.length;G++)te=j[G],le=M[te],xe=L[te],Fe(M,L,te),xe.type==="date"&&Ce(le,xe,L,Z,xe.calendar),Re("fixedrange");for(G=0;G<Z.length;G++){te=Z[G],le=M[te],xe=L[te];var pe=L[g(xe.anchor)],we=c("rangeslider","isVisible")(pe);Re("fixedrange",we)}u.handleDefaults(M,L,{axIds:Te.concat(Ve).sort(f.idSort),axHasImage:H})}},92128:function(z,B,e){var d=e(84267).mix,P=e(22399),a=e(71828);z.exports=function(x,v,y,r){r=r||{};var n=r.dfltColor;function u(o,R){return a.coerce2(x,v,r.attributes,o,R)}var i=u("linecolor",n),f=u("linewidth"),g=y("showline",r.showLine||!!i||!!f);g||(delete v.linecolor,delete v.linewidth);var h=d(n,r.bgColor,r.blend||P.lightFraction).toRgbString(),b=u("gridcolor",h),p=u("gridwidth"),E=u("griddash"),c=y("showgrid",r.showGrid||!!b||!!p||!!E);if(c||(delete v.gridcolor,delete v.gridwidth,delete v.griddash),r.hasMinor){var l=d(v.gridcolor,r.bgColor,67).toRgbString(),m=u("minor.gridcolor",l),M=u("minor.gridwidth",v.gridwidth||1),L=u("minor.griddash",v.griddash||"solid"),D=y("minor.showgrid",!!m||!!M||!!L);D||(delete v.minor.gridcolor,delete v.minor.gridwidth,delete v.minor.griddash)}if(!r.noZeroLine){var A=u("zerolinecolor",n),C=u("zerolinewidth"),S=y("zeroline",r.showGrid||!!A||!!C);S||(delete v.zerolinecolor,delete v.zerolinewidth)}}},52830:function(z,B,e){var d=e(92770),P=e(71828);z.exports=function(_,x,v,y){var r=y.counterAxes||[],n=y.overlayableAxes||[],u=y.letter,i=y.grid,f=y.overlayingDomain,g,h,b,p,E,c;i&&(h=i._domains[u][i._axisMap[x._id]],g=i._anchors[x._id],h&&(b=i[u+"side"].split(" ")[0],p=i.domain[u][b==="right"||b==="top"?1:0])),h=h||[0,1],g=g||(d(_.position)?"free":r[0]||"free"),b=b||(u==="x"?"bottom":"left"),p=p||0,E=0,c=!1;var l=P.coerce(_,x,{anchor:{valType:"enumerated",values:["free"].concat(r),dflt:g}},"anchor"),m=P.coerce(_,x,{side:{valType:"enumerated",values:u==="x"?["bottom","top"]:["left","right"],dflt:b}},"side");if(l==="free"){if(u==="y"){var M=v("autoshift");M&&(p=m==="left"?f[0]:f[1],c=x.automargin?x.automargin:!0,E=m==="left"?-3:3),v("shift",E)}v("position",p)}v("automargin",c);var L=!1;if(n.length&&(L=P.coerce(_,x,{overlaying:{valType:"enumerated",values:[!1].concat(n),dflt:!1}},"overlaying")),!L){var D=v("domain",h);D[0]>D[1]-.000244140625&&(x.domain=h),P.noneOrAll(_.domain,x.domain,h),x.tickmode==="sync"&&(x.tickmode="auto")}return v("layer"),x}},89426:function(z,B,e){var d=e(59652);z.exports=function(a,_,x,v,y){y||(y={});var r=y.tickSuffixDflt,n=d(a),u=x("tickprefix");u&&x("showtickprefix",n);var i=x("ticksuffix",r);i&&x("showticksuffix",n)}},42449:function(z,B,e){var d=e(18783).FROM_BL;z.exports=function(a,_,x){x===void 0&&(x=d[a.constraintoward||"center"]);var v=[a.r2l(a.range[0]),a.r2l(a.range[1])],y=v[0]+(v[1]-v[0])*x;a.range=a._input.range=[a.l2r(y+(v[0]-y)*_),a.l2r(y+(v[1]-y)*_)],a.setScale()}},21994:function(z,B,e){var d=e(39898),P=e(84096).g0,a=e(71828),_=a.numberFormat,x=e(92770),v=a.cleanNumber,y=a.ms2DateTime,r=a.dateTime2ms,n=a.ensureNumber,u=a.isArrayOrTypedArray,i=e(50606),f=i.FP_SAFE,g=i.BADNUM,h=i.LOG_CLIP,b=i.ONEWEEK,p=i.ONEDAY,E=i.ONEHOUR,c=i.ONEMIN,l=i.ONESEC,m=e(41675),M=e(85555),L=M.HOUR_PATTERN,D=M.WEEKDAY_PATTERN;function A(S){return Math.pow(10,S)}function C(S){return S!=null}z.exports=function(o,R){R=R||{};var T=o._id||"x",O=T.charAt(0);function N(Q,ue){if(Q>0)return Math.log(Q)/Math.LN10;if(Q<=0&&ue&&o.range&&o.range.length===2){var fe=o.range[0],te=o.range[1];return .5*(fe+te-2*h*Math.abs(fe-te))}else return g}function H(Q,ue,fe,te){if((te||{}).msUTC&&x(Q))return+Q;var ne=r(Q,fe||o.calendar);if(ne===g)if(x(Q)){Q=+Q;var ve=Math.floor(a.mod(Q+.05,1)*10),le=Math.round(Q-ve/10);ne=r(new Date(le))+ve/10}else return g;return ne}function k(Q,ue,fe){return y(Q,ue,fe||o.calendar)}function V(Q){return o._categories[Math.round(Q)]}function G(Q){if(C(Q)){if(o._categoriesMap===void 0&&(o._categoriesMap={}),o._categoriesMap[Q]!==void 0)return o._categoriesMap[Q];o._categories.push(typeof Q=="number"?String(Q):Q);var ue=o._categories.length-1;return o._categoriesMap[Q]=ue,ue}return g}function U(Q,ue){for(var fe=new Array(ue),te=0;te<ue;te++){var ne=(Q[0]||[])[te],ve=(Q[1]||[])[te];fe[te]=Y([ne,ve])}return fe}function Y(Q){if(o._categoriesMap)return o._categoriesMap[Q]}function ee(Q){var ue=Y(Q);if(ue!==void 0)return ue;if(x(Q))return+Q}function re(Q){return x(Q)?+Q:Y(Q)}function ie(Q,ue,fe){return d.round(fe+ue*Q,2)}function se(Q,ue,fe){return(Q-fe)/ue}var ce=function(ue){return x(ue)?ie(ue,o._m,o._b):g},q=function(Q){return se(Q,o._m,o._b)};if(o.rangebreaks){var j=O==="y";ce=function(Q){if(!x(Q))return g;var ue=o._rangebreaks.length;if(!ue)return ie(Q,o._m,o._b);var fe=j;o.range[0]>o.range[1]&&(fe=!fe);for(var te=fe?-1:1,ne=te*Q,ve=0,le=0;le<ue;le++){var xe=te*o._rangebreaks[le].min,Se=te*o._rangebreaks[le].max;if(ne<xe)break;if(ne>Se)ve=le+1;else{ve=ne<(xe+Se)/2?le:le+1;break}}var Re=o._B[ve]||0;return isFinite(Re)?ie(Q,o._m2,Re):0},q=function(Q){var ue=o._rangebreaks.length;if(!ue)return se(Q,o._m,o._b);for(var fe=0,te=0;te<ue&&!(Q<o._rangebreaks[te].pmin);te++)Q>o._rangebreaks[te].pmax&&(fe=te+1);return se(Q,o._m2,o._B[fe])}}o.c2l=o.type==="log"?N:n,o.l2c=o.type==="log"?A:n,o.l2p=ce,o.p2l=q,o.c2p=o.type==="log"?function(Q,ue){return ce(N(Q,ue))}:ce,o.p2c=o.type==="log"?function(Q){return A(q(Q))}:q,["linear","-"].indexOf(o.type)!==-1?(o.d2r=o.r2d=o.d2c=o.r2c=o.d2l=o.r2l=v,o.c2d=o.c2r=o.l2d=o.l2r=n,o.d2p=o.r2p=function(Q){return o.l2p(v(Q))},o.p2d=o.p2r=q,o.cleanPos=n):o.type==="log"?(o.d2r=o.d2l=function(Q,ue){return N(v(Q),ue)},o.r2d=o.r2c=function(Q){return A(v(Q))},o.d2c=o.r2l=v,o.c2d=o.l2r=n,o.c2r=N,o.l2d=A,o.d2p=function(Q,ue){return o.l2p(o.d2r(Q,ue))},o.p2d=function(Q){return A(q(Q))},o.r2p=function(Q){return o.l2p(v(Q))},o.p2r=q,o.cleanPos=n):o.type==="date"?(o.d2r=o.r2d=a.identity,o.d2c=o.r2c=o.d2l=o.r2l=H,o.c2d=o.c2r=o.l2d=o.l2r=k,o.d2p=o.r2p=function(Q,ue,fe){return o.l2p(H(Q,0,fe))},o.p2d=o.p2r=function(Q,ue,fe){return k(q(Q),ue,fe)},o.cleanPos=function(Q){return a.cleanDate(Q,g,o.calendar)}):o.type==="category"?(o.d2c=o.d2l=G,o.r2d=o.c2d=o.l2d=V,o.d2r=o.d2l_noadd=ee,o.r2c=function(Q){var ue=re(Q);return ue!==void 0?ue:o.fraction2r(.5)},o.l2r=o.c2r=n,o.r2l=re,o.d2p=function(Q){return o.l2p(o.r2c(Q))},o.p2d=function(Q){return V(q(Q))},o.r2p=o.d2p,o.p2r=q,o.cleanPos=function(Q){return typeof Q=="string"&&Q!==""?Q:n(Q)}):o.type==="multicategory"&&(o.r2d=o.c2d=o.l2d=V,o.d2r=o.d2l_noadd=ee,o.r2c=function(Q){var ue=ee(Q);return ue!==void 0?ue:o.fraction2r(.5)},o.r2c_just_indices=Y,o.l2r=o.c2r=n,o.r2l=ee,o.d2p=function(Q){return o.l2p(o.r2c(Q))},o.p2d=function(Q){return V(q(Q))},o.r2p=o.d2p,o.p2r=q,o.cleanPos=function(Q){return Array.isArray(Q)||typeof Q=="string"&&Q!==""?Q:n(Q)},o.setupMultiCategory=function(Q){var ue=o._traceIndices,fe,te,ne=o._matchGroup;if(ne&&o._categories.length===0){for(var ve in ne)if(ve!==T){var le=R[m.id2name(ve)];ue=ue.concat(le._traceIndices)}}var xe=[[0,{}],[0,{}]],Se=[];for(fe=0;fe<ue.length;fe++){var Re=Q[ue[fe]];if(O in Re){var Ee=Re[O],Oe=Re._length||a.minRowLength(Ee);if(u(Ee[0])&&u(Ee[1]))for(te=0;te<Oe;te++){var Be=Ee[0][te],Le=Ee[1][te];C(Be)&&C(Le)&&(Se.push([Be,Le]),Be in xe[0][1]||(xe[0][1][Be]=xe[0][0]++),Le in xe[1][1]||(xe[1][1][Le]=xe[1][0]++))}}}for(Se.sort(function(Te,De){var Ve=xe[0][1],Ye=Ve[Te[0]]-Ve[De[0]];if(Ye)return Ye;var Ne=xe[1][1];return Ne[Te[1]]-Ne[De[1]]}),fe=0;fe<Se.length;fe++)G(Se[fe])}),o.fraction2r=function(Q){var ue=o.r2l(o.range[0]),fe=o.r2l(o.range[1]);return o.l2r(ue+Q*(fe-ue))},o.r2fraction=function(Q){var ue=o.r2l(o.range[0]),fe=o.r2l(o.range[1]);return(o.r2l(Q)-ue)/(fe-ue)},o.cleanRange=function(Q,ue){ue||(ue={}),Q||(Q="range");var fe=a.nestedProperty(o,Q).get(),te,ne;if(o.type==="date"?ne=a.dfltRange(o.calendar):O==="y"?ne=M.DFLTRANGEY:o._name==="realaxis"?ne=[0,1]:ne=ue.dfltRange||M.DFLTRANGEX,ne=ne.slice(),(o.rangemode==="tozero"||o.rangemode==="nonnegative")&&(ne[0]=0),!fe||fe.length!==2){a.nestedProperty(o,Q).set(ne);return}for(o.type==="date"&&!o.autorange&&(fe[0]=a.cleanDate(fe[0],g,o.calendar),fe[1]=a.cleanDate(fe[1],g,o.calendar)),te=0;te<2;te++)if(o.type==="date"){if(!a.isDateTime(fe[te],o.calendar)){o[Q]=ne;break}if(o.r2l(fe[0])===o.r2l(fe[1])){var ve=a.constrain(o.r2l(fe[0]),a.MIN_MS+1e3,a.MAX_MS-1e3);fe[0]=o.l2r(ve-1e3),fe[1]=o.l2r(ve+1e3);break}}else{if(!x(fe[te]))if(x(fe[1-te]))fe[te]=fe[1-te]*(te?10:.1);else{o[Q]=ne;break}if(fe[te]<-f?fe[te]=-f:fe[te]>f&&(fe[te]=f),fe[0]===fe[1]){var le=Math.max(1,Math.abs(fe[0]*1e-6));fe[0]-=le,fe[1]+=le}}},o.setScale=function(Q){var ue=R._size;if(o.overlaying){var fe=m.getFromId({_fullLayout:R},o.overlaying);o.domain=fe.domain}var te=Q&&o._r?"_r":"range",ne=o.calendar;o.cleanRange(te);var ve=o.r2l(o[te][0],ne),le=o.r2l(o[te][1],ne),xe=O==="y";if(xe?(o._offset=ue.t+(1-o.domain[1])*ue.h,o._length=ue.h*(o.domain[1]-o.domain[0]),o._m=o._length/(ve-le),o._b=-o._m*le):(o._offset=ue.l+o.domain[0]*ue.w,o._length=ue.w*(o.domain[1]-o.domain[0]),o._m=o._length/(le-ve),o._b=-o._m*ve),o._rangebreaks=[],o._lBreaks=0,o._m2=0,o._B=[],o.rangebreaks){var Se,Re;if(o._rangebreaks=o.locateBreaks(Math.min(ve,le),Math.max(ve,le)),o._rangebreaks.length){for(Se=0;Se<o._rangebreaks.length;Se++)Re=o._rangebreaks[Se],o._lBreaks+=Math.abs(Re.max-Re.min);var Ee=xe;ve>le&&(Ee=!Ee),Ee&&o._rangebreaks.reverse();var Oe=Ee?-1:1;for(o._m2=Oe*o._length/(Math.abs(le-ve)-o._lBreaks),o._B.push(-o._m2*(xe?le:ve)),Se=0;Se<o._rangebreaks.length;Se++)Re=o._rangebreaks[Se],o._B.push(o._B[o._B.length-1]-Oe*o._m2*(Re.max-Re.min));for(Se=0;Se<o._rangebreaks.length;Se++)Re=o._rangebreaks[Se],Re.pmin=ce(Re.min),Re.pmax=ce(Re.max)}}if(!isFinite(o._m)||!isFinite(o._b)||o._length<0)throw R._replotting=!1,new Error("Something went wrong with axis scaling")},o.maskBreaks=function(Q){var ue=o.rangebreaks||[],fe,te,ne,ve,le;ue._cachedPatterns||(ue._cachedPatterns=ue.map(function(Ve){return Ve.enabled&&Ve.bounds?a.simpleMap(Ve.bounds,Ve.pattern?v:o.d2c):null})),ue._cachedValues||(ue._cachedValues=ue.map(function(Ve){return Ve.enabled&&Ve.values?a.simpleMap(Ve.values,o.d2c).sort(a.sorterAsc):null}));for(var xe=0;xe<ue.length;xe++){var Se=ue[xe];if(Se.enabled){if(Se.bounds){var Re=Se.pattern;switch(fe=ue._cachedPatterns[xe],te=fe[0],ne=fe[1],Re){case D:le=new Date(Q),ve=le.getUTCDay(),te>ne&&(ne+=7,ve<te&&(ve+=7));break;case L:le=new Date(Q);var Ee=le.getUTCHours(),Oe=le.getUTCMinutes(),Be=le.getUTCSeconds(),Le=le.getUTCMilliseconds();ve=Ee+(Oe/60+Be/3600+Le/36e5),te>ne&&(ne+=24,ve<te&&(ve+=24));break;case"":ve=Q;break}if(ve>=te&&ve<ne)return g}else for(var Te=ue._cachedValues[xe],De=0;De<Te.length;De++)if(te=Te[De],ne=te+Se.dvalue,Q>=te&&Q<ne)return g}}return Q},o.locateBreaks=function(Q,ue){var fe,te,ne,ve,le=[];if(!o.rangebreaks)return le;var xe=o.rangebreaks.slice().sort(function(Ne,Xe){return Ne.pattern===D&&Xe.pattern===L?-1:Xe.pattern===D&&Ne.pattern===L?1:0}),Se=function(Ne,Xe){if(Ne=a.constrain(Ne,Q,ue),Xe=a.constrain(Xe,Q,ue),Ne!==Xe){for(var ht=!0,st=0;st<le.length;st++){var it=le[st];Ne<it.max&&Xe>=it.min&&(Ne<it.min&&(it.min=Ne),Xe>it.max&&(it.max=Xe),ht=!1)}ht&&le.push({min:Ne,max:Xe})}};for(fe=0;fe<xe.length;fe++){var Re=xe[fe];if(Re.enabled)if(Re.bounds){var Ee=Q,Oe=ue;Re.pattern&&(Ee=Math.floor(Ee)),te=a.simpleMap(Re.bounds,Re.pattern?v:o.r2l),ne=te[0],ve=te[1];var Be=new Date(Ee),Le,Te;switch(Re.pattern){case D:Te=b,Le=((ve<ne?7:0)+(ve-ne))*p,Ee+=ne*p-(Be.getUTCDay()*p+Be.getUTCHours()*E+Be.getUTCMinutes()*c+Be.getUTCSeconds()*l+Be.getUTCMilliseconds());break;case L:Te=p,Le=((ve<ne?24:0)+(ve-ne))*E,Ee+=ne*E-(Be.getUTCHours()*E+Be.getUTCMinutes()*c+Be.getUTCSeconds()*l+Be.getUTCMilliseconds());break;default:Ee=Math.min(te[0],te[1]),Oe=Math.max(te[0],te[1]),Te=Oe-Ee,Le=Te}for(var De=Ee;De<Oe;De+=Te)Se(De,De+Le)}else for(var Ve=a.simpleMap(Re.values,o.d2c),Ye=0;Ye<Ve.length;Ye++)ne=Ve[Ye],ve=ne+Re.dvalue,Se(ne,ve)}return le.sort(function(Ne,Xe){return Ne.min-Xe.min}),le},o.makeCalcdata=function(Q,ue,fe){var te,ne,ve,le,xe=o.type,Se=xe==="date"&&Q[ue+"calendar"];if(ue in Q){if(te=Q[ue],le=Q._length||a.minRowLength(te),a.isTypedArray(te)&&(xe==="linear"||xe==="log")){if(le===te.length)return te;if(te.subarray)return te.subarray(0,le)}if(xe==="multicategory")return U(te,le);for(ne=new Array(le),ve=0;ve<le;ve++)ne[ve]=o.d2c(te[ve],0,Se,fe)}else{var Re=ue+"0"in Q?o.d2c(Q[ue+"0"],0,Se):0,Ee=Q["d"+ue]?Number(Q["d"+ue]):1;for(te=Q[{x:"y",y:"x"}[ue]],le=Q._length||te.length,ne=new Array(le),ve=0;ve<le;ve++)ne[ve]=Re+ve*Ee}if(o.rangebreaks)for(ve=0;ve<le;ve++)ne[ve]=o.maskBreaks(ne[ve]);return ne},o.isValidRange=function(Q){return Array.isArray(Q)&&Q.length===2&&x(o.r2l(Q[0]))&&x(o.r2l(Q[1]))},o.isPtWithinRange=function(Q,ue){var fe=o.c2l(Q[O],null,ue),te=o.r2l(o.range[0]),ne=o.r2l(o.range[1]);return te<ne?te<=fe&&fe<=ne:ne<=fe&&fe<=te},o._emptyCategories=function(){o._categories=[],o._categoriesMap={}},o.clearCalc=function(){var Q=o._matchGroup;if(Q){var ue=null,fe=null;for(var te in Q){var ne=R[m.id2name(te)];if(ne._categories){ue=ne._categories,fe=ne._categoriesMap;break}}ue&&fe?(o._categories=ue,o._categoriesMap=fe):o._emptyCategories()}else o._emptyCategories();if(o._initialCategories)for(var ve=0;ve<o._initialCategories.length;ve++)G(o._initialCategories[ve])},o.sortByInitialCategories=function(){var Q=[];if(o._emptyCategories(),o._initialCategories)for(var ue=0;ue<o._initialCategories.length;ue++)G(o._initialCategories[ue]);Q=Q.concat(o._traceIndices);var fe=o._matchGroup;for(var te in fe)if(T!==te){var ne=R[m.id2name(te)];ne._categories=o._categories,ne._categoriesMap=o._categoriesMap,Q=Q.concat(ne._traceIndices)}return Q};var Z=R._d3locale;o.type==="date"&&(o._dateFormat=Z?Z.timeFormat:P,o._extraFormat=R._extraFormat),o._separators=R.separators,o._numFormat=Z?Z.numberFormat:_,delete o._minDtick,delete o._forceTick0}},59652:function(z){z.exports=function(e){var d=["showexponent","showtickprefix","showticksuffix"],P=d.filter(function(_){return e[_]!==void 0}),a=function(_){return e[_]===e[P[0]]};if(P.every(a)||P.length===1)return e[P[0]]}},96115:function(z,B,e){var d=e(71828),P=e(7901).contrast,a=e(13838),_=e(59652),x=e(85501);z.exports=function(r,n,u,i,f){f||(f={});var g=_(r),h=u("showticklabels");if(h){var b=f.font||{},p=n.color,E=n.ticklabelposition||"",c=E.indexOf("inside")!==-1?P(f.bgColor):p&&p!==a.color.dflt?p:b.color;if(d.coerceFont(u,"tickfont",{family:b.family,size:b.size,color:c}),!f.noTicklabelstep&&i!=="multicategory"&&i!=="log"&&u("ticklabelstep"),f.noAng||u("tickangle"),i!=="category"){var l=u("tickformat");x(r,n,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:v}),n.tickformatstops.length||delete n.tickformatstops,!f.noExp&&!l&&i!=="date"&&(u("showexponent",g),u("exponentformat"),u("minexponent"),u("separatethousands"))}}};function v(y,r){function n(i,f){return d.coerce(y,r,a.tickformatstops,i,f)}var u=n("enabled");u&&(n("dtickrange"),n("value"))}},38701:function(z,B,e){var d=e(71828),P=e(13838);z.exports=function(_,x,v,y){var r=y.isMinor,n=r?_.minor||{}:_,u=r?x.minor:x,i=r?P.minor:P,f=r?"minor.":"",g=d.coerce2(n,u,i,"ticklen",r?(x.ticklen||5)*.6:void 0),h=d.coerce2(n,u,i,"tickwidth",r?x.tickwidth||1:void 0),b=d.coerce2(n,u,i,"tickcolor",(r?x.tickcolor:void 0)||u.color),p=v(f+"ticks",!r&&y.outerTicks||g||h||b?"outside":"");p||(delete u.ticklen,delete u.tickwidth,delete u.tickcolor)}},26218:function(z,B,e){var d=e(66287),P=e(71828).isArrayOrTypedArray;z.exports=function(_,x,v,y,r){r||(r={});var n=r.isMinor,u=n?_.minor||{}:_,i=n?x.minor:x,f=n?"minor.":"";function g(M){var L=u[M];return L!==void 0?L:(i._template||{})[M]}var h=g("tick0"),b=g("dtick"),p=g("tickvals"),E=P(p)?"array":b?"linear":"auto",c=v(f+"tickmode",E);if(c==="auto"||c==="sync")v(f+"nticks");else if(c==="linear"){var l=i.dtick=d.dtick(b,y);i.tick0=d.tick0(h,y,x.calendar,l)}else if(y!=="multicategory"){var m=v(f+"tickvals");m===void 0?i.tickmode="auto":n||v("ticktext")}}},66847:function(z,B,e){var d=e(39898),P=e(73972),a=e(71828),_=e(91424),x=e(89298);z.exports=function(y,r,n,u){var i=y._fullLayout;if(r.length===0){x.redrawComponents(y);return}function f(L){var D=L.xaxis,A=L.yaxis;i._defs.select("#"+L.clipId+"> rect").call(_.setTranslate,0,0).call(_.setScale,1,1),L.plot.call(_.setTranslate,D._offset,A._offset).call(_.setScale,1,1);var C=L.plot.selectAll(".scatterlayer .trace");C.selectAll(".point").call(_.setPointGroupScale,1,1),C.selectAll(".textpoint").call(_.setTextPointsScale,1,1),C.call(_.hideOutsideRangePoints,L)}function g(L,D){var A=L.plotinfo,C=A.xaxis,S=A.yaxis,o=C._length,R=S._length,T=!!L.xr1,O=!!L.yr1,N=[];if(T){var H=a.simpleMap(L.xr0,C.r2l),k=a.simpleMap(L.xr1,C.r2l),V=H[1]-H[0],G=k[1]-k[0];N[0]=(H[0]*(1-D)+D*k[0]-H[0])/(H[1]-H[0])*o,N[2]=o*(1-D+D*G/V),C.range[0]=C.l2r(H[0]*(1-D)+D*k[0]),C.range[1]=C.l2r(H[1]*(1-D)+D*k[1])}else N[0]=0,N[2]=o;if(O){var U=a.simpleMap(L.yr0,S.r2l),Y=a.simpleMap(L.yr1,S.r2l),ee=U[1]-U[0],re=Y[1]-Y[0];N[1]=(U[1]*(1-D)+D*Y[1]-U[1])/(U[0]-U[1])*R,N[3]=R*(1-D+D*re/ee),S.range[0]=C.l2r(U[0]*(1-D)+D*Y[0]),S.range[1]=S.l2r(U[1]*(1-D)+D*Y[1])}else N[1]=0,N[3]=R;x.drawOne(y,C,{skipTitle:!0}),x.drawOne(y,S,{skipTitle:!0}),x.redrawComponents(y,[C._id,S._id]);var ie=T?o/N[2]:1,se=O?R/N[3]:1,ce=T?N[0]:0,q=O?N[1]:0,j=T?N[0]/N[2]*o:0,Z=O?N[1]/N[3]*R:0,Q=C._offset-j,ue=S._offset-Z;A.clipRect.call(_.setTranslate,ce,q).call(_.setScale,1/ie,1/se),A.plot.call(_.setTranslate,Q,ue).call(_.setScale,ie,se),_.setPointGroupScale(A.zoomScalePts,1/ie,1/se),_.setTextPointsScale(A.zoomScaleTxt,1/ie,1/se)}var h;u&&(h=u());function b(){for(var L={},D=0;D<r.length;D++){var A=r[D],C=A.plotinfo.xaxis,S=A.plotinfo.yaxis;A.xr1&&(L[C._name+".range"]=A.xr1.slice()),A.yr1&&(L[S._name+".range"]=A.yr1.slice())}return h&&h(),P.call("relayout",y,L).then(function(){for(var o=0;o<r.length;o++)f(r[o].plotinfo)})}function p(){for(var L={},D=0;D<r.length;D++){var A=r[D],C=A.plotinfo.xaxis,S=A.plotinfo.yaxis;A.xr0&&(L[C._name+".range"]=A.xr0.slice()),A.yr0&&(L[S._name+".range"]=A.yr0.slice())}return P.call("relayout",y,L).then(function(){for(var o=0;o<r.length;o++)f(r[o].plotinfo)})}var E,c,l,m=d.ease(n.easing);y._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(l),l=null,p()});function M(){c=Date.now();for(var L=Math.min(1,(c-E)/n.duration),D=m(L),A=0;A<r.length;A++)g(r[A],D);c-E>n.duration?(b(),l=window.cancelAnimationFrame(M)):l=window.requestAnimationFrame(M)}return E=Date.now(),l=window.requestAnimationFrame(M),Promise.resolve()}},951:function(z,B,e){var d=e(73972).traceIs,P=e(4322);z.exports=function(r,n,u,i){u("autotypenumbers",i.autotypenumbersDflt);var f=u("type",(i.splomStash||{}).type);f==="-"&&(a(n,i.data),n.type==="-"?n.type="linear":r.type=n.type)};function a(y,r){if(y.type==="-"){var n=y._id,u=n.charAt(0),i;n.indexOf("scene")!==-1&&(n=u);var f=_(r,n,u);if(f){if(f.type==="histogram"&&u==={v:"y",h:"x"}[f.orientation||"v"]){y.type="linear";return}var g=u+"calendar",h=f[g],b={noMultiCategory:!d(f,"cartesian")||d(f,"noMultiCategory")};if(f.type==="box"&&f._hasPreCompStats&&u==={h:"x",v:"y"}[f.orientation||"v"]&&(b.noMultiCategory=!0),b.autotypenumbers=y.autotypenumbers,v(f,u)){var p=x(f),E=[];for(i=0;i<r.length;i++){var c=r[i];!d(c,"box-violin")||(c[u+"axis"]||u)!==n||(c[p]!==void 0?E.push(c[p][0]):c.name!==void 0?E.push(c.name):E.push("text"),c[g]!==h&&(h=void 0))}y.type=P(E,h,b)}else if(f.type==="splom"){var l=f.dimensions,m=l[f._axesDim[n]];m.visible&&(y.type=P(m.values,h,b))}else y.type=P(f[u]||[f[u+"0"]],h,b)}}}function _(y,r,n){for(var u=0;u<y.length;u++){var i=y[u];if(i.type==="splom"&&i._length>0&&(i["_"+n+"axes"]||{})[r])return i;if((i[n+"axis"]||n)===r){if(v(i,n))return i;if((i[n]||[]).length||i[n+"0"])return i}}}function x(y){return{v:"x",h:"y"}[y.orientation||"v"]}function v(y,r){var n=x(y),u=d(y,"box-violin"),i=d(y._fullInput||{},"candlestick");return u&&!i&&r===n&&y[n]===void 0&&y[n+"0"]===void 0}},31137:function(z,B,e){var d=e(73972),P=e(71828);B.manageCommandObserver=function(r,n,u,i){var f={},g=!0;n&&n._commandObserver&&(f=n._commandObserver),f.cache||(f.cache={}),f.lookupTable={};var h=B.hasSimpleAPICommandBindings(r,u,f.lookupTable);if(n&&n._commandObserver){if(h)return f;if(n._commandObserver.remove)return n._commandObserver.remove(),n._commandObserver=null,f}if(h){a(r,h,f.cache),f.check=function(){if(g){var c=a(r,h,f.cache);return c.changed&&i&&f.lookupTable[c.value]!==void 0&&(f.disable(),Promise.resolve(i({value:c.value,type:h.type,prop:h.prop,traces:h.traces,index:f.lookupTable[c.value]})).then(f.enable,f.enable)),c.changed}};for(var b=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],p=0;p<b.length;p++)r._internalOn(b[p],f.check);f.remove=function(){for(var E=0;E<b.length;E++)r._removeInternalListener(b[E],f.check)}}else P.log("Unable to automatically bind plot updates to API command"),f.lookupTable={},f.remove=function(){};return f.disable=function(){g=!1},f.enable=function(){g=!0},n&&(n._commandObserver=f),f},B.hasSimpleAPICommandBindings=function(r,n,u){var i,f=n.length,g;for(i=0;i<f;i++){var h,b=n[i],p=b.method,E=b.args;if(Array.isArray(E)||(E=[]),!p)return!1;var c=B.computeAPICommandBindings(r,p,E);if(c.length!==1)return!1;if(!g)g=c[0],Array.isArray(g.traces)&&g.traces.sort();else{if(h=c[0],h.type!==g.type||h.prop!==g.prop)return!1;if(Array.isArray(g.traces))if(Array.isArray(h.traces)){h.traces.sort();for(var l=0;l<g.traces.length;l++)if(g.traces[l]!==h.traces[l])return!1}else return!1;else if(h.prop!==g.prop)return!1}h=c[0];var m=h.value;if(Array.isArray(m))if(m.length===1)m=m[0];else return!1;u&&(u[m]=i)}return g};function a(r,n,u){var i,f,g,h=!1;if(n.type==="data")i=r._fullData[n.traces!==null?n.traces[0]:0];else if(n.type==="layout")i=r._fullLayout;else return!1;return f=P.nestedProperty(i,n.prop).get(),g=u[n.type]=u[n.type]||{},g.hasOwnProperty(n.prop)&&g[n.prop]!==f&&(h=!0),g[n.prop]=f,{changed:h,value:f}}B.executeAPICommand=function(r,n,u){if(n==="skip")return Promise.resolve();var i=d.apiMethodRegistry[n],f=[r];Array.isArray(u)||(u=[]);for(var g=0;g<u.length;g++)f.push(u[g]);return i.apply(null,f).catch(function(h){return P.warn("API call to Plotly."+n+" rejected.",h),Promise.reject(h)})},B.computeAPICommandBindings=function(r,n,u){var i;switch(Array.isArray(u)||(u=[]),n){case"restyle":i=v(r,u);break;case"relayout":i=x(r,u);break;case"update":i=v(r,[u[0],u[2]]).concat(x(r,[u[1]]));break;case"animate":i=_(r,u);break;default:i=[]}return i};function _(r,n){return Array.isArray(n[0])&&n[0].length===1&&["string","number"].indexOf(typeof n[0][0])!==-1?[{type:"layout",prop:"_currentFrame",value:n[0][0].toString()}]:[]}function x(r,n){var u=[],i=n[0],f={};if(typeof i=="string")f[i]=n[1];else if(P.isPlainObject(i))f=i;else return u;return y(f,function(g,h,b){u.push({type:"layout",prop:g,value:b})},"",0),u}function v(r,n){var u,i,f,g,h=[];if(i=n[0],f=n[1],u=n[2],g={},typeof i=="string")g[i]=f;else if(P.isPlainObject(i))g=i,u===void 0&&(u=f);else return h;return u===void 0&&(u=null),y(g,function(b,p,E){var c,l;if(Array.isArray(E)){l=E.slice();var m=Math.min(l.length,r.data.length);u&&(m=Math.min(m,u.length)),c=[];for(var M=0;M<m;M++)c[M]=u?u[M]:M}else l=E,c=u?u.slice():null;if(c===null)Array.isArray(l)&&(l=l[0]);else if(Array.isArray(c)){if(!Array.isArray(l)){var L=l;l=[];for(var D=0;D<c.length;D++)l[D]=L}l.length=Math.min(c.length,l.length)}h.push({type:"data",prop:b,traces:c,value:l})},"",0),h}function y(r,n,u,i){Object.keys(r).forEach(function(f){var g=r[f];if(f[0]!=="_"){var h=u+(i>0?".":"")+f;P.isPlainObject(g)?y(g,n,h,i+1):n(h,f,g)}})}},27670:function(z,B,e){var d=e(1426).extendFlat;B.Y=function(P,a){P=P||{},a=a||{};var _={valType:"info_array",editType:P.editType,items:[{valType:"number",min:0,max:1,editType:P.editType},{valType:"number",min:0,max:1,editType:P.editType}],dflt:[0,1]};P.name&&P.name+"",P.trace,a.description&&""+a.description;var x={x:d({},_,{}),y:d({},_,{}),editType:P.editType};return P.noGridCell||(x.row={valType:"integer",min:0,dflt:0,editType:P.editType},x.column={valType:"integer",min:0,dflt:0,editType:P.editType}),x},B.c=function(P,a,_,x){var v=x&&x.x||[0,1],y=x&&x.y||[0,1],r=a.grid;if(r){var n=_("domain.column");n!==void 0&&(n<r.columns?v=r._domains.x[n]:delete P.domain.column);var u=_("domain.row");u!==void 0&&(u<r.rows?y=r._domains.y[u]:delete P.domain.row)}var i=_("domain.x",v),f=_("domain.y",y);i[0]<i[1]||(P.domain.x=v.slice()),f[0]<f[1]||(P.domain.y=y.slice())}},41940:function(z){z.exports=function(B){var e=B.editType,d=B.colorEditType;d===void 0&&(d=e);var P={family:{valType:"string",noBlank:!0,strict:!0,editType:e},size:{valType:"number",min:1,editType:e},color:{valType:"color",editType:d},editType:e};return B.autoSize&&(P.size.dflt="auto"),B.autoColor&&(P.color.dflt="auto"),B.arrayOk&&(P.family.arrayOk=!0,P.size.arrayOk=!0,P.color.arrayOk=!0),P}},31391:function(z){z.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}},78776:function(z,B){B.projNames={airy:"airy",aitoff:"aitoff","albers usa":"albersUsa",albers:"albers",august:"august","azimuthal equal area":"azimuthalEqualArea","azimuthal equidistant":"azimuthalEquidistant",baker:"baker",bertin1953:"bertin1953",boggs:"boggs",bonne:"bonne",bottomley:"bottomley",bromley:"bromley",collignon:"collignon","conic conformal":"conicConformal","conic equal area":"conicEqualArea","conic equidistant":"conicEquidistant",craig:"craig",craster:"craster","cylindrical equal area":"cylindricalEqualArea","cylindrical stereographic":"cylindricalStereographic",eckert1:"eckert1",eckert2:"eckert2",eckert3:"eckert3",eckert4:"eckert4",eckert5:"eckert5",eckert6:"eckert6",eisenlohr:"eisenlohr",equirectangular:"equirectangular",fahey:"fahey","foucaut sinusoidal":"foucautSinusoidal",foucaut:"foucaut",ginzburg4:"ginzburg4",ginzburg5:"ginzburg5",ginzburg6:"ginzburg6",ginzburg8:"ginzburg8",ginzburg9:"ginzburg9",gnomonic:"gnomonic","gringorten quincuncial":"gringortenQuincuncial",gringorten:"gringorten",guyou:"guyou",hammer:"hammer",hill:"hill",homolosine:"homolosine",hufnagel:"hufnagel",hyperelliptical:"hyperelliptical",kavrayskiy7:"kavrayskiy7",lagrange:"lagrange",larrivee:"larrivee",laskowski:"laskowski",loximuthal:"loximuthal",mercator:"mercator",miller:"miller",mollweide:"mollweide","mt flat polar parabolic":"mtFlatPolarParabolic","mt flat polar quartic":"mtFlatPolarQuartic","mt flat polar sinusoidal":"mtFlatPolarSinusoidal","natural earth":"naturalEarth","natural earth1":"naturalEarth1","natural earth2":"naturalEarth2","nell hammer":"nellHammer",nicolosi:"nicolosi",orthographic:"orthographic",patterson:"patterson","peirce quincuncial":"peirceQuincuncial",polyconic:"polyconic","rectangular polyconic":"rectangularPolyconic",robinson:"robinson",satellite:"satellite","sinu mollweide":"sinuMollweide",sinusoidal:"sinusoidal",stereographic:"stereographic",times:"times","transverse mercator":"transverseMercator","van der grinten":"vanDerGrinten","van der grinten2":"vanDerGrinten2","van der grinten3":"vanDerGrinten3","van der grinten4":"vanDerGrinten4",wagner4:"wagner4",wagner6:"wagner6",wiechel:"wiechel","winkel tripel":"winkel3",winkel3:"winkel3"},B.axesNames=["lonaxis","lataxis"],B.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360},B.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180},B.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:"equirectangular",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:"albers usa"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:"conic conformal",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:"mercator",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:"mercator",projRotate:[0,0,0]},"north america":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:"conic conformal",projRotate:[-100,0,0],projParallels:[29.5,45.5]},"south america":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:"mercator",projRotate:[0,0,0]}},B.clipPad=.001,B.precision=.1,B.landColor="#F0DC82",B.waterColor="#3399FF",B.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"},B.sphereSVG={type:"Sphere"},B.fillLayers={ocean:1,land:1,lakes:1},B.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},B.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"],B.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"],B.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}},69082:function(z,B,e){var d=e(39898),P=e(27362),a=P.geoPath,_=P.geoDistance,x=e(65704),v=e(73972),y=e(71828),r=y.strTranslate,n=e(7901),u=e(91424),i=e(30211),f=e(74875),g=e(89298),h=e(71739).getAutoRange,b=e(28569),p=e(47322).prepSelect,E=e(47322).clearOutline,c=e(47322).selectOnClick,l=e(74455),m=e(78776),M=e(41327),L=e(90973),D=e(96892).zL;function A(T){this.id=T.id,this.graphDiv=T.graphDiv,this.container=T.container,this.topojsonURL=T.topojsonURL,this.isStatic=T.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var C=A.prototype;z.exports=function(O){return new A(O)},C.plot=function(T,O,N,H){var k=this;if(H)return k.update(T,O,!0);k._geoCalcData=T,k._fullLayout=O;var V=O[this.id],G=[],U=!1;for(var Y in m.layerNameToAdjective)if(Y!=="frame"&&V["show"+Y]){U=!0;break}for(var ee=!1,re=0;re<T.length;re++){var ie=T[0][0].trace;ie._geo=k,ie.locationmode&&(U=!0);var se=ie.marker;if(se){var ce=se.angle,q=se.angleref;(ce||q==="north"||q==="previous")&&(ee=!0)}}if(this._hasMarkerAngles=ee,U){var j=L.getTopojsonName(V);(k.topojson===null||j!==k.topojsonName)&&(k.topojsonName=j,PlotlyGeoAssets.topojson[k.topojsonName]===void 0&&G.push(k.fetchTopojson()))}G=G.concat(M.fetchTraceGeoData(T)),N.push(new Promise(function(Z,Q){Promise.all(G).then(function(){k.topojson=PlotlyGeoAssets.topojson[k.topojsonName],k.update(T,O),Z()}).catch(Q)}))},C.fetchTopojson=function(){var T=this,O=L.getTopojsonPath(T.topojsonURL,T.topojsonName);return new Promise(function(N,H){d.json(O,function(k,V){if(k)return k.status===404?H(new Error(["plotly.js could not find topojson file at",O+".","Make sure the *topojsonURL* plot config option","is set properly."].join(" "))):H(new Error(["unexpected error while fetching topojson file at",O].join(" ")));PlotlyGeoAssets.topojson[T.topojsonName]=V,N()})})},C.update=function(T,O,N){var H=O[this.id];this.hasChoropleth=!1;for(var k=0;k<T.length;k++){var V=T[k],G=V[0].trace;G.type==="choropleth"&&(this.hasChoropleth=!0),G.visible===!0&&G._length>0&&G._module.calcGeoJSON(V,O)}if(!N){var U=this.updateProjection(T,O);if(U)return;(!this.viewInitial||this.scope!==H.scope)&&this.saveViewInitial(H)}this.scope=H.scope,this.updateBaseLayers(O,H),this.updateDims(O,H),this.updateFx(O,H),f.generalUpdatePerTraceModule(this.graphDiv,this,T,H);var Y=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=Y.selectAll(".point"),this.dataPoints.text=Y.selectAll("text"),this.dataPaths.line=Y.selectAll(".js-line");var ee=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=ee.selectAll("path"),this._render()},C.updateProjection=function(T,O){var N=this.graphDiv,H=O[this.id],k=O._size,V=H.domain,G=H.projection,U=H.lonaxis,Y=H.lataxis,ee=U._ax,re=Y._ax,ie=this.projection=S(H),se=[[k.l+k.w*V.x[0],k.t+k.h*(1-V.y[1])],[k.l+k.w*V.x[1],k.t+k.h*(1-V.y[0])]],ce=H.center||{},q=G.rotation||{},j=U.range||[],Z=Y.range||[];if(H.fitbounds){ee._length=se[1][0]-se[0][0],re._length=se[1][1]-se[0][1],ee.range=h(N,ee),re.range=h(N,re);var Q=(ee.range[0]+ee.range[1])/2,ue=(re.range[0]+re.range[1])/2;if(H._isScoped)ce={lon:Q,lat:ue};else if(H._isClipped){ce={lon:Q,lat:ue},q={lon:Q,lat:ue,roll:q.roll};var fe=G.type,te=m.lonaxisSpan[fe]/2||180,ne=m.lataxisSpan[fe]/2||90;j=[Q-te,Q+te],Z=[ue-ne,ue+ne]}else ce={lon:Q,lat:ue},q={lon:Q,lat:q.lat,roll:q.roll}}ie.center([ce.lon-q.lon,ce.lat-q.lat]).rotate([-q.lon,-q.lat,q.roll]).parallels(G.parallels);var ve=R(j,Z);ie.fitExtent(se,ve);var le=this.bounds=ie.getBounds(ve),xe=this.fitScale=ie.scale(),Se=ie.translate();if(H.fitbounds){var Re=ie.getBounds(R(ee.range,re.range)),Ee=Math.min((le[1][0]-le[0][0])/(Re[1][0]-Re[0][0]),(le[1][1]-le[0][1])/(Re[1][1]-Re[0][1]));isFinite(Ee)?ie.scale(Ee*xe):y.warn("Something went wrong during"+this.id+"fitbounds computations.")}else ie.scale(G.scale*xe);var Oe=this.midPt=[(le[0][0]+le[1][0])/2,(le[0][1]+le[1][1])/2];if(ie.translate([Se[0]+(Oe[0]-Se[0]),Se[1]+(Oe[1]-Se[1])]).clipExtent(le),H._isAlbersUsa){var Be=ie([ce.lon,ce.lat]),Le=ie.translate();ie.translate([Le[0]-(Be[0]-Le[0]),Le[1]-(Be[1]-Le[1])])}},C.updateBaseLayers=function(T,O){var N=this,H=N.topojson,k=N.layers,V=N.basePaths;function G(se){return se==="lonaxis"||se==="lataxis"}function U(se){return Boolean(m.lineLayers[se])}function Y(se){return Boolean(m.fillLayers[se])}var ee=this.hasChoropleth?m.layersForChoropleth:m.layers,re=ee.filter(function(se){return U(se)||Y(se)?O["show"+se]:G(se)?O[se].showgrid:!0}),ie=N.framework.selectAll(".layer").data(re,String);ie.exit().each(function(se){delete k[se],delete V[se],d.select(this).remove()}),ie.enter().append("g").attr("class",function(se){return"layer "+se}).each(function(se){var ce=k[se]=d.select(this);se==="bg"?N.bgRect=ce.append("rect").style("pointer-events","all"):G(se)?V[se]=ce.append("path").style("fill","none"):se==="backplot"?ce.append("g").classed("choroplethlayer",!0):se==="frontplot"?ce.append("g").classed("scatterlayer",!0):U(se)?V[se]=ce.append("path").style("fill","none").style("stroke-miterlimit",2):Y(se)&&(V[se]=ce.append("path").style("stroke","none"))}),ie.order(),ie.each(function(se){var ce=V[se],q=m.layerNameToAdjective[se];se==="frame"?ce.datum(m.sphereSVG):U(se)||Y(se)?ce.datum(D(H,H.objects[se])):G(se)&&ce.datum(o(se,O,T)).call(n.stroke,O[se].gridcolor).call(u.dashLine,O[se].griddash,O[se].gridwidth),U(se)?ce.call(n.stroke,O[q+"color"]).call(u.dashLine,"",O[q+"width"]):Y(se)&&ce.call(n.fill,O[q+"color"])})},C.updateDims=function(T,O){var N=this.bounds,H=(O.framewidth||0)/2,k=N[0][0]-H,V=N[0][1]-H,G=N[1][0]-k+H,U=N[1][1]-V+H;u.setRect(this.clipRect,k,V,G,U),this.bgRect.call(u.setRect,k,V,G,U).call(n.fill,O.bgcolor),this.xaxis._offset=k,this.xaxis._length=G,this.yaxis._offset=V,this.yaxis._length=U},C.updateFx=function(T,O){var N=this,H=N.graphDiv,k=N.bgRect,V=T.dragmode,G=T.clickmode;if(N.isStatic)return;function U(){var ie=N.viewInitial,se={};for(var ce in ie)se[N.id+"."+ce]=ie[ce];v.call("_guiRelayout",H,se),H.emit("plotly_doubleclick",null)}function Y(ie){return N.projection.invert([ie[0]+N.xaxis._offset,ie[1]+N.yaxis._offset])}var ee=function(ie,se){if(se.isRect){var ce=ie.range={};ce[N.id]=[Y([se.xmin,se.ymin]),Y([se.xmax,se.ymax])]}else{var q=ie.lassoPoints={};q[N.id]=se.map(Y)}},re={element:N.bgRect.node(),gd:H,plotinfo:{id:N.id,xaxis:N.xaxis,yaxis:N.yaxis,fillRangeItems:ee},xaxes:[N.xaxis],yaxes:[N.yaxis],subplot:N.id,clickFn:function(ie){ie===2&&E(H)}};V==="pan"?(k.node().onmousedown=null,k.call(l(N,O)),k.on("dblclick.zoom",U),H._context._scrollZoom.geo||k.on("wheel.zoom",null)):(V==="select"||V==="lasso")&&(k.on(".zoom",null),re.prepFn=function(ie,se,ce){p(ie,se,ce,re,V)},b.init(re)),k.on("mousemove",function(){var ie=N.projection.invert(y.getPositionFromD3Event());if(!ie)return b.unhover(H,d.event);N.xaxis.p2c=function(){return ie[0]},N.yaxis.p2c=function(){return ie[1]},i.hover(H,d.event,N.id)}),k.on("mouseout",function(){H._dragging||b.unhover(H,d.event)}),k.on("click",function(){V!=="select"&&V!=="lasso"&&(G.indexOf("select")>-1&&c(d.event,H,[N.xaxis],[N.yaxis],N.id,re),G.indexOf("event")>-1&&i.click(H,d.event))})},C.makeFramework=function(){var T=this,O=T.graphDiv,N=O._fullLayout,H="clip"+N._uid+T.id;T.clipDef=N._clips.append("clipPath").attr("id",H),T.clipRect=T.clipDef.append("rect"),T.framework=d.select(T.container).append("g").attr("class","geo "+T.id).call(u.setClipUrl,H,O),T.project=function(k){var V=T.projection(k);return V?[V[0]-T.xaxis._offset,V[1]-T.yaxis._offset]:[null,null]},T.xaxis={_id:"x",c2p:function(k){return T.project(k)[0]}},T.yaxis={_id:"y",c2p:function(k){return T.project(k)[1]}},T.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},g.setConvert(T.mockAxis,N)},C.saveViewInitial=function(T){var O=T.center||{},N=T.projection,H=N.rotation||{};this.viewInitial={fitbounds:T.fitbounds,"projection.scale":N.scale};var k;T._isScoped?k={"center.lon":O.lon,"center.lat":O.lat}:T._isClipped?k={"projection.rotation.lon":H.lon,"projection.rotation.lat":H.lat}:k={"center.lon":O.lon,"center.lat":O.lat,"projection.rotation.lon":H.lon},y.extendFlat(this.viewInitial,k)},C.render=function(T){this._hasMarkerAngles&&T?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},C._render=function(){var T=this.projection,O=T.getPath(),N;function H(V){var G=T(V.lonlat);return G?r(G[0],G[1]):null}function k(V){return T.isLonLatOverEdges(V.lonlat)?"none":null}for(N in this.basePaths)this.basePaths[N].attr("d",O);for(N in this.dataPaths)this.dataPaths[N].attr("d",function(V){return O(V.geojson)});for(N in this.dataPoints)this.dataPoints[N].attr("display",k).attr("transform",H)};function S(T){var O=T.projection,N=O.type,H=m.projNames[N];H="geo"+y.titleCase(H);for(var k=P[H]||x[H],V=k(),G=T._isSatellite?Math.acos(1/O.distance)*180/Math.PI:T._isClipped?m.lonaxisSpan[N]/2:null,U=["center","rotate","parallels","clipExtent"],Y=function(ie){return ie?V:[]},ee=0;ee<U.length;ee++){var re=U[ee];typeof V[re]!="function"&&(V[re]=Y)}return V.isLonLatOverEdges=function(ie){if(V(ie)===null)return!0;if(G){var se=V.rotate(),ce=_(ie,[-se[0],-se[1]]),q=G*Math.PI/180;return ce>q}else return!1},V.getPath=function(){return a().projection(V)},V.getBounds=function(ie){return V.getPath().bounds(ie)},V.precision(m.precision),T._isSatellite&&V.tilt(O.tilt).distance(O.distance),G&&V.clipAngle(G-m.clipPad),V}function o(T,O,N){var H=1e-6,k=2.5,V=O[T],G=m.scopeDefaults[O.scope],U,Y,ee;T==="lonaxis"?(U=G.lonaxisRange,Y=G.lataxisRange,ee=function(ue,fe){return[ue,fe]}):T==="lataxis"&&(U=G.lataxisRange,Y=G.lonaxisRange,ee=function(ue,fe){return[fe,ue]});var re={type:"linear",range:[U[0],U[1]-H],tick0:V.tick0,dtick:V.dtick};g.setConvert(re,N);var ie=g.calcTicks(re);!O.isScoped&&T==="lonaxis"&&ie.pop();for(var se=ie.length,ce=new Array(se),q=0;q<se;q++)for(var j=ie[q].x,Z=ce[q]=[],Q=Y[0];Q<Y[1]+k;Q+=k)Z.push(ee(j,Q));return{type:"MultiLineString",coordinates:ce}}function R(T,O){var N=m.clipPad,H=T[0]+N,k=T[1]-N,V=O[0]+N,G=O[1]-N;H>0&&k<0&&(k+=360);var U=(k-H)/4;return{type:"Polygon",coordinates:[[[H,V],[H,G],[H+U,G],[H+2*U,G],[H+3*U,G],[k,G],[k,V],[k-U,V],[k-2*U,V],[k-3*U,V],[H,V]]]}}},44622:function(z,B,e){var d=e(27659).AU,P=e(71828).counterRegex,a=e(69082),_="geo",x=P(_),v={};v[_]={valType:"subplotid",dflt:_,editType:"calc"};function y(u){for(var i=u._fullLayout,f=u.calcdata,g=i._subplots[_],h=0;h<g.length;h++){var b=g[h],p=d(f,_,b),E=i[b],c=E._subplot;c||(c=a({id:b,graphDiv:u,container:i._geolayer.node(),topojsonURL:u._context.topojsonURL,staticPlot:u._context.staticPlot}),i[b]._subplot=c),c.plot(p,i,u._promises)}}function r(u,i,f,g){for(var h=g._subplots[_]||[],b=0;b<h.length;b++){var p=h[b],E=g[p]._subplot;!i[p]&&E&&(E.framework.remove(),E.clipDef.remove())}}function n(u){for(var i=u._fullLayout,f=i._subplots[_],g=0;g<f.length;g++){var h=i[f[g]],b=h._subplot;b.updateFx(i,h)}}z.exports={attr:_,name:_,idRoot:_,idRegex:x,attrRegex:x,attributes:v,layoutAttributes:e(77519),supplyLayoutDefaults:e(82161),plot:y,updateFx:n,clean:r}},77519:function(z,B,e){var d=e(22399),P=e(27670).Y,a=e(79952).P,_=e(78776),x=e(30962).overrideAll,v=e(78607),y={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:d.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:a},r=z.exports=x({domain:P({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:v(_.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:v(_.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:d.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:_.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:_.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:_.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:_.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:d.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:d.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:d.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:d.background},lonaxis:y,lataxis:y},"plot","from-root");r.uirevision={valType:"any",editType:"none"}},82161:function(z,B,e){var d=e(71828),P=e(49119),a=e(27659).NG,_=e(78776),x=e(77519),v=_.axesNames;z.exports=function(n,u,i){P(n,u,i,{type:"geo",attributes:x,handleDefaults:y,fullData:i,partition:"y"})};function y(r,n,u,i){var f=a(i.fullData,"geo",i.id),g=f.map(function(Z){return Z._expandedIndex}),h=u("resolution"),b=u("scope"),p=_.scopeDefaults[b],E=u("projection.type",p.projType),c=n._isAlbersUsa=E==="albers usa";c&&(b=n.scope="usa");var l=n._isScoped=b!=="world",m=n._isSatellite=E==="satellite",M=n._isConic=E.indexOf("conic")!==-1||E==="albers",L=n._isClipped=!!_.lonaxisSpan[E];if(r.visible===!1){var D=d.extendDeep({},n._template);D.showcoastlines=!1,D.showcountries=!1,D.showframe=!1,D.showlakes=!1,D.showland=!1,D.showocean=!1,D.showrivers=!1,D.showsubunits=!1,D.lonaxis&&(D.lonaxis.showgrid=!1),D.lataxis&&(D.lataxis.showgrid=!1),n._template=D}for(var A=u("visible"),C,S=0;S<v.length;S++){var o=v[S],R=[30,10][S],T;if(l)T=p[o+"Range"];else{var O=_[o+"Span"],N=(O[E]||O["*"])/2,H=u("projection.rotation."+o.substr(0,3),p.projRotate[S]);T=[H-N,H+N]}var k=u(o+".range",T);u(o+".tick0"),u(o+".dtick",R),C=u(o+".showgrid",A?void 0:!1),C&&(u(o+".gridcolor"),u(o+".gridwidth"),u(o+".griddash")),n[o]._ax={type:"linear",_id:o.slice(0,3),_traceIndices:g,setScale:d.identity,c2l:d.identity,r2l:d.identity,autorange:!0,range:k.slice(),_m:1,_input:{}}}var V=n.lonaxis.range,G=n.lataxis.range,U=V[0],Y=V[1];U>0&&Y<0&&(Y+=360);var ee=(U+Y)/2,re;if(!c){var ie=l?p.projRotate:[ee,0,0];re=u("projection.rotation.lon",ie[0]),u("projection.rotation.lat",ie[1]),u("projection.rotation.roll",ie[2]),C=u("showcoastlines",!l&&A),C&&(u("coastlinecolor"),u("coastlinewidth")),C=u("showocean",A?void 0:!1),C&&u("oceancolor")}var se,ce;if(c?(se=-96.6,ce=38.7):(se=l?ee:re,ce=(G[0]+G[1])/2),u("center.lon",se),u("center.lat",ce),m&&(u("projection.tilt"),u("projection.distance")),M){var q=p.projParallels||[0,60];u("projection.parallels",q)}u("projection.scale"),C=u("showland",A?void 0:!1),C&&u("landcolor"),C=u("showlakes",A?void 0:!1),C&&u("lakecolor"),C=u("showrivers",A?void 0:!1),C&&(u("rivercolor"),u("riverwidth")),C=u("showcountries",l&&b!=="usa"&&A),C&&(u("countrycolor"),u("countrywidth")),(b==="usa"||b==="north america"&&h===50)&&(u("showsubunits",A),u("subunitcolor"),u("subunitwidth")),l||(C=u("showframe",A),C&&(u("framecolor"),u("framewidth"))),u("bgcolor");var j=u("fitbounds");j&&(delete n.projection.scale,l?(delete n.center.lon,delete n.center.lat):L?(delete n.center.lon,delete n.center.lat,delete n.projection.rotation.lon,delete n.projection.rotation.lat,delete n.lonaxis.range,delete n.lataxis.range):(delete n.center.lon,delete n.center.lat,delete n.projection.rotation.lon))}},74455:function(z,B,e){var d=e(39898),P=e(71828),a=e(73972),_=Math.PI/180,x=180/Math.PI,v={cursor:"pointer"},y={cursor:"auto"};function r(o,R){var T=o.projection,O;return R._isScoped?O=i:R._isClipped?O=g:O=f,O(o,T)}z.exports=r;function n(o,R){return d.behavior.zoom().translate(R.translate()).scale(R.scale())}function u(o,R,T){var O=o.id,N=o.graphDiv,H=N.layout,k=H[O],V=N._fullLayout,G=V[O],U={},Y={};function ee(re,ie){U[O+"."+re]=P.nestedProperty(k,re).get(),a.call("_storeDirectGUIEdit",H,V._preGUI,U);var se=P.nestedProperty(G,re);se.get()!==ie&&(se.set(ie),P.nestedProperty(k,re).set(ie),Y[O+"."+re]=ie)}T(ee),ee("projection.scale",R.scale()/o.fitScale),ee("fitbounds",!1),N.emit("plotly_relayout",Y)}function i(o,R){var T=n(o,R);function O(){d.select(this).style(v)}function N(){R.scale(d.event.scale).translate(d.event.translate),o.render(!0);var V=R.invert(o.midPt);o.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":R.scale()/o.fitScale,"geo.center.lon":V[0],"geo.center.lat":V[1]})}function H(V){var G=R.invert(o.midPt);V("center.lon",G[0]),V("center.lat",G[1])}function k(){d.select(this).style(y),u(o,R,H)}return T.on("zoomstart",O).on("zoom",N).on("zoomend",k),T}function f(o,R){var T=n(o,R),O=2,N,H,k,V,G,U,Y,ee,re;function ie(Q){return R.invert(Q)}function se(Q){var ue=ie(Q);if(!ue)return!0;var fe=R(ue);return Math.abs(fe[0]-Q[0])>O||Math.abs(fe[1]-Q[1])>O}function ce(){d.select(this).style(v),N=d.mouse(this),H=R.rotate(),k=R.translate(),V=H,G=ie(N)}function q(){if(U=d.mouse(this),se(N)){T.scale(R.scale()),T.translate(R.translate());return}R.scale(d.event.scale),R.translate([k[0],d.event.translate[1]]),G?ie(U)&&(ee=ie(U),Y=[V[0]+(ee[0]-G[0]),H[1],H[2]],R.rotate(Y),V=Y):(N=U,G=ie(N)),re=!0,o.render(!0);var Q=R.rotate(),ue=R.invert(o.midPt);o.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":R.scale()/o.fitScale,"geo.center.lon":ue[0],"geo.center.lat":ue[1],"geo.projection.rotation.lon":-Q[0]})}function j(){d.select(this).style(y),re&&u(o,R,Z)}function Z(Q){var ue=R.rotate(),fe=R.invert(o.midPt);Q("projection.rotation.lon",-ue[0]),Q("center.lon",fe[0]),Q("center.lat",fe[1])}return T.on("zoomstart",ce).on("zoom",q).on("zoomend",j),T}function g(o,R){R.rotate(),R.scale();var T=n(o,R),O=S(T,"zoomstart","zoom","zoomend"),N=0,H=T.on,k;T.on("zoomstart",function(){d.select(this).style(v);var ee=d.mouse(this),re=R.rotate(),ie=re,se=R.translate(),ce=b(re);k=h(R,ee),H.call(T,"zoom",function(){var q=d.mouse(this);if(R.scale(d.event.scale),!k)ee=q,k=h(R,ee);else if(h(R,q)){R.rotate(re).translate(se);var j=h(R,q),Z=E(k,j),Q=L(p(ce,Z)),ue=c(Q,k,ie);(!isFinite(ue[0])||!isFinite(ue[1])||!isFinite(ue[2]))&&(ue=ie),R.rotate(ue),ie=ue}G(O.of(this,arguments))}),V(O.of(this,arguments))}).on("zoomend",function(){d.select(this).style(y),H.call(T,"zoom",null),U(O.of(this,arguments)),u(o,R,Y)}).on("zoom.redraw",function(){o.render(!0);var ee=R.rotate();o.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":R.scale()/o.fitScale,"geo.projection.rotation.lon":-ee[0],"geo.projection.rotation.lat":-ee[1]})});function V(ee){N++||ee({type:"zoomstart"})}function G(ee){ee({type:"zoom"})}function U(ee){--N||ee({type:"zoomend"})}function Y(ee){var re=R.rotate();ee("projection.rotation.lon",-re[0]),ee("projection.rotation.lat",-re[1])}return d.rebind(T,O,"on")}function h(o,R){var T=o.invert(R);return T&&isFinite(T[0])&&isFinite(T[1])&&D(T)}function b(o){var R=.5*o[0]*_,T=.5*o[1]*_,O=.5*o[2]*_,N=Math.sin(R),H=Math.cos(R),k=Math.sin(T),V=Math.cos(T),G=Math.sin(O),U=Math.cos(O);return[H*V*U+N*k*G,N*V*U-H*k*G,H*k*U+N*V*G,H*V*G-N*k*U]}function p(o,R){var T=o[0],O=o[1],N=o[2],H=o[3],k=R[0],V=R[1],G=R[2],U=R[3];return[T*k-O*V-N*G-H*U,T*V+O*k+N*U-H*G,T*G-O*U+N*k+H*V,T*U+O*G-N*V+H*k]}function E(o,R){if(!(!o||!R)){var T=C(o,R),O=Math.sqrt(A(T,T)),N=.5*Math.acos(Math.max(-1,Math.min(1,A(o,R)))),H=Math.sin(N)/O;return O&&[Math.cos(N),T[2]*H,-T[1]*H,T[0]*H]}}function c(o,R,T){var O=M(R,2,o[0]);O=M(O,1,o[1]),O=M(O,0,o[2]-T[2]);var N=R[0],H=R[1],k=R[2],V=O[0],G=O[1],U=O[2],Y=Math.atan2(H,N)*x,ee=Math.sqrt(N*N+H*H),re,ie;Math.abs(G)>ee?(ie=(G>0?90:-90)-Y,re=0):(ie=Math.asin(G/ee)*x-Y,re=Math.sqrt(ee*ee-G*G));var se=180-ie-2*Y,ce=(Math.atan2(U,V)-Math.atan2(k,re))*x,q=(Math.atan2(U,V)-Math.atan2(k,-re))*x,j=l(T[0],T[1],ie,ce),Z=l(T[0],T[1],se,q);return j<=Z?[ie,ce,T[2]]:[se,q,T[2]]}function l(o,R,T,O){var N=m(T-o),H=m(O-R);return Math.sqrt(N*N+H*H)}function m(o){return(o%360+540)%360-180}function M(o,R,T){var O=T*_,N=o.slice(),H=R===0?1:0,k=R===2?1:2,V=Math.cos(O),G=Math.sin(O);return N[H]=o[H]*V-o[k]*G,N[k]=o[k]*V+o[H]*G,N}function L(o){return[Math.atan2(2*(o[0]*o[1]+o[2]*o[3]),1-2*(o[1]*o[1]+o[2]*o[2]))*x,Math.asin(Math.max(-1,Math.min(1,2*(o[0]*o[2]-o[3]*o[1]))))*x,Math.atan2(2*(o[0]*o[3]+o[1]*o[2]),1-2*(o[2]*o[2]+o[3]*o[3]))*x]}function D(o){var R=o[0]*_,T=o[1]*_,O=Math.cos(T);return[O*Math.cos(R),O*Math.sin(R),Math.sin(T)]}function A(o,R){for(var T=0,O=0,N=o.length;O<N;++O)T+=o[O]*R[O];return T}function C(o,R){return[o[1]*R[2]-o[2]*R[1],o[2]*R[0]-o[0]*R[2],o[0]*R[1]-o[1]*R[0]]}function S(o){for(var R=0,T=arguments.length,O=[];++R<T;)O.push(arguments[R]);var N=d.dispatch.apply(null,O);return N.of=function(H,k){return function(V){var G;try{G=V.sourceEvent=d.event,V.target=o,d.event=V,N[V.type].apply(H,k)}finally{d.event=G}}},N}},27659:function(z,B,e){var d=e(73972),P=e(85555).SUBPLOT_PATTERN;B.AU=function(a,_,x){var v=d.subplotsRegistry[_];if(!v)return[];for(var y=v.attr,r=[],n=0;n<a.length;n++){var u=a[n],i=u[0].trace;i[y]===x&&r.push(u)}return r},B.a0=function(a,_){var x=[],v=[],y;if(typeof _=="string"?y=d.getModule(_).plot:typeof _=="function"?y=_:y=_.plot,!y)return[x,a];for(var r=0;r<a.length;r++){var n=a[r],u=n[0].trace;u.visible!==!0||u._length===0||(u._module.plot===y?x.push(n):v.push(n))}return[x,v]},B.NG=function(_,x,v){if(!d.subplotsRegistry[x])return[];var y=d.subplotsRegistry[x].attr,r=[],n,u,i;if(x==="gl2d"){var f=v.match(P);u="x"+f[1],i="y"+f[2]}for(var g=0;g<_.length;g++)n=_[g],x==="gl2d"&&d.traceIs(n,"gl2d")?n[y[0]]===u&&n[y[1]]===i&&r.push(n):n[y]===v&&r.push(n);return r}},75071:function(z,B,e){var d=e(16825),P=e(1195),a=e(48956),_=e(85555),x=e(38520);z.exports=y;function v(r,n){this.element=r,this.plot=n,this.mouseListener=null,this.wheelListener=null,this.lastInputTime=Date.now(),this.lastPos=[0,0],this.boxEnabled=!1,this.boxInited=!1,this.boxStart=[0,0],this.boxEnd=[0,0],this.dragStart=[0,0]}function y(r){var n=r.mouseContainer,u=r.glplot,i=new v(n,u);function f(){r.xaxis.autorange=!1,r.yaxis.autorange=!1}function g(){for(var b=r.graphDiv._fullLayout._axisConstraintGroups,p=r.xaxis._id,E=r.yaxis._id,c=0;c<b.length;c++)if(b[c][p]!==-1){if(b[c][E]!==-1)return!0;break}return!1}i.mouseListener=d(n,h),n.addEventListener("touchstart",function(b){var p=a(b.changedTouches[0],n);h(0,p[0],p[1]),h(1,p[0],p[1]),b.preventDefault()},x?{passive:!1}:!1),n.addEventListener("touchmove",function(b){b.preventDefault();var p=a(b.changedTouches[0],n);h(1,p[0],p[1]),b.preventDefault()},x?{passive:!1}:!1),n.addEventListener("touchend",function(b){h(0,i.lastPos[0],i.lastPos[1]),b.preventDefault()},x?{passive:!1}:!1);function h(b,p,E){var c=r.calcDataBox(),l=u.viewBox,m=i.lastPos[0],M=i.lastPos[1],L=_.MINDRAG*u.pixelRatio,D=_.MINZOOM*u.pixelRatio,A,C;p*=u.pixelRatio,E*=u.pixelRatio,E=l[3]-l[1]-E;function S(H,k,V){var G=Math.min(k,V),U=Math.max(k,V);G!==U?(c[H]=G,c[H+2]=U,i.dataBox=c,r.setRanges(c)):(r.selectBox.selectBox=[0,0,1,1],r.glplot.setDirty())}switch(r.fullLayout.dragmode){case"zoom":if(b){var o=p/(l[2]-l[0])*(c[2]-c[0])+c[0],R=E/(l[3]-l[1])*(c[3]-c[1])+c[1];i.boxInited||(i.boxStart[0]=o,i.boxStart[1]=R,i.dragStart[0]=p,i.dragStart[1]=E),i.boxEnd[0]=o,i.boxEnd[1]=R,i.boxInited=!0,!i.boxEnabled&&(i.boxStart[0]!==i.boxEnd[0]||i.boxStart[1]!==i.boxEnd[1])&&(i.boxEnabled=!0);var T=Math.abs(i.dragStart[0]-p)<D,O=Math.abs(i.dragStart[1]-E)<D;if(g()&&!(T&&O)){A=i.boxEnd[0]-i.boxStart[0],C=i.boxEnd[1]-i.boxStart[1];var N=(c[3]-c[1])/(c[2]-c[0]);Math.abs(A*N)>Math.abs(C)?(i.boxEnd[1]=i.boxStart[1]+Math.abs(A)*N*(C>=0?1:-1),i.boxEnd[1]<c[1]?(i.boxEnd[1]=c[1],i.boxEnd[0]=i.boxStart[0]+(c[1]-i.boxStart[1])/Math.abs(N)):i.boxEnd[1]>c[3]&&(i.boxEnd[1]=c[3],i.boxEnd[0]=i.boxStart[0]+(c[3]-i.boxStart[1])/Math.abs(N))):(i.boxEnd[0]=i.boxStart[0]+Math.abs(C)/N*(A>=0?1:-1),i.boxEnd[0]<c[0]?(i.boxEnd[0]=c[0],i.boxEnd[1]=i.boxStart[1]+(c[0]-i.boxStart[0])*Math.abs(N)):i.boxEnd[0]>c[2]&&(i.boxEnd[0]=c[2],i.boxEnd[1]=i.boxStart[1]+(c[2]-i.boxStart[0])*Math.abs(N)))}else T&&(i.boxEnd[0]=i.boxStart[0]),O&&(i.boxEnd[1]=i.boxStart[1])}else i.boxEnabled?(A=i.boxStart[0]!==i.boxEnd[0],C=i.boxStart[1]!==i.boxEnd[1],A||C?(A&&(S(0,i.boxStart[0],i.boxEnd[0]),r.xaxis.autorange=!1),C&&(S(1,i.boxStart[1],i.boxEnd[1]),r.yaxis.autorange=!1),r.relayoutCallback()):r.glplot.setDirty(),i.boxEnabled=!1,i.boxInited=!1):i.boxInited&&(i.boxInited=!1);break;case"pan":i.boxEnabled=!1,i.boxInited=!1,b?(i.panning||(i.dragStart[0]=p,i.dragStart[1]=E),Math.abs(i.dragStart[0]-p)<L&&(p=i.dragStart[0]),Math.abs(i.dragStart[1]-E)<L&&(E=i.dragStart[1]),A=(m-p)*(c[2]-c[0])/(u.viewBox[2]-u.viewBox[0]),C=(M-E)*(c[3]-c[1])/(u.viewBox[3]-u.viewBox[1]),c[0]+=A,c[2]+=A,c[1]+=C,c[3]+=C,r.setRanges(c),i.panning=!0,i.lastInputTime=Date.now(),f(),r.cameraChanged(),r.handleAnnotations()):i.panning&&(i.panning=!1,r.relayoutCallback());break}i.lastPos[0]=p,i.lastPos[1]=E}return i.wheelListener=P(n,function(b,p){if(!r.scrollZoom)return!1;var E=r.calcDataBox(),c=u.viewBox,l=i.lastPos[0],m=i.lastPos[1],M=Math.exp(5*p/(c[3]-c[1])),L=l/(c[2]-c[0])*(E[2]-E[0])+E[0],D=m/(c[3]-c[1])*(E[3]-E[1])+E[1];return E[0]=(E[0]-L)*M+L,E[2]=(E[2]-L)*M+L,E[1]=(E[1]-D)*M+D,E[3]=(E[3]-D)*M+D,r.setRanges(E),i.lastInputTime=Date.now(),f(),r.cameraChanged(),r.handleAnnotations(),r.relayoutCallback(),!0},!0),i}},82961:function(z,B,e){var d=e(89298),P=e(78614);function a(y){this.scene=y,this.gl=y.gl,this.pixelRatio=y.pixelRatio,this.screenBox=[0,0,1,1],this.viewBox=[0,0,1,1],this.dataBox=[-1,-1,1,1],this.borderLineEnable=[!1,!1,!1,!1],this.borderLineWidth=[1,1,1,1],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.ticks=[[],[]],this.tickEnable=[!0,!0,!1,!1],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labels=["x","y"],this.labelEnable=[!0,!0,!1,!1],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelPad=[15,15,15,15],this.labelSize=[12,12],this.labelFont=["sans-serif","sans-serif"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.title="",this.titleEnable=!0,this.titleCenter=[0,0,0,0],this.titleAngle=0,this.titleColor=[0,0,0,1],this.titleFont="sans-serif",this.titleSize=18,this.gridLineEnable=[!0,!0],this.gridLineColor=[[0,0,0,.5],[0,0,0,.5]],this.gridLineWidth=[1,1],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[1,1],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderColor=[0,0,0,0],this.backgroundColor=[0,0,0,0],this.static=this.scene.staticPlot}var _=a.prototype,x=["xaxis","yaxis"];_.merge=function(y){this.titleEnable=!1,this.backgroundColor=P(y.plot_bgcolor);var r,n,u,i,f,g,h,b,p,E,c;for(E=0;E<2;++E){r=x[E];var l=r.charAt(0);for(n=y[this.scene[r]._name],u=n.title.text===this.scene.fullLayout._dfltTitle[l]?"":n.title.text,c=0;c<=2;c+=2)this.labelEnable[E+c]=!1,this.labels[E+c]=u,this.labelColor[E+c]=P(n.title.font.color),this.labelFont[E+c]=n.title.font.family,this.labelSize[E+c]=n.title.font.size,this.labelPad[E+c]=this.getLabelPad(r,n),this.tickEnable[E+c]=!1,this.tickColor[E+c]=P((n.tickfont||{}).color),this.tickAngle[E+c]=n.tickangle==="auto"?0:Math.PI*-n.tickangle/180,this.tickPad[E+c]=this.getTickPad(n),this.tickMarkLength[E+c]=0,this.tickMarkWidth[E+c]=n.tickwidth||0,this.tickMarkColor[E+c]=P(n.tickcolor),this.borderLineEnable[E+c]=!1,this.borderLineColor[E+c]=P(n.linecolor),this.borderLineWidth[E+c]=n.linewidth||0;h=this.hasSharedAxis(n),f=this.hasAxisInDfltPos(r,n)&&!h,g=this.hasAxisInAltrPos(r,n)&&!h,i=n.mirror||!1,b=h?String(i).indexOf("all")!==-1:!!i,p=h?i==="allticks":String(i).indexOf("ticks")!==-1,f?this.labelEnable[E]=!0:g&&(this.labelEnable[E+2]=!0),f?this.tickEnable[E]=n.showticklabels:g&&(this.tickEnable[E+2]=n.showticklabels),(f||b)&&(this.borderLineEnable[E]=n.showline),(g||b)&&(this.borderLineEnable[E+2]=n.showline),(f||p)&&(this.tickMarkLength[E]=this.getTickMarkLength(n)),(g||p)&&(this.tickMarkLength[E+2]=this.getTickMarkLength(n)),this.gridLineEnable[E]=n.showgrid,this.gridLineColor[E]=P(n.gridcolor),this.gridLineWidth[E]=n.gridwidth,this.zeroLineEnable[E]=n.zeroline,this.zeroLineColor[E]=P(n.zerolinecolor),this.zeroLineWidth[E]=n.zerolinewidth}},_.hasSharedAxis=function(y){var r=this.scene,n=r.fullLayout._subplots.gl2d,u=d.findSubplotsWithAxis(n,y);return u.indexOf(r.id)!==0},_.hasAxisInDfltPos=function(y,r){var n=r.side;if(y==="xaxis")return n==="bottom";if(y==="yaxis")return n==="left"},_.hasAxisInAltrPos=function(y,r){var n=r.side;if(y==="xaxis")return n==="top";if(y==="yaxis")return n==="right"},_.getLabelPad=function(y,r){var n=1.5,u=r.title.font.size,i=r.showticklabels;if(y==="xaxis")return r.side==="top"?-10+u*(n+(i?1:0)):-10+u*(n+(i?.5:0));if(y==="yaxis")return r.side==="right"?10+u*(n+(i?1:.5)):10+u*(n+(i?.5:0))},_.getTickPad=function(y){return y.ticks==="outside"?10+y.ticklen:15},_.getTickMarkLength=function(y){if(!y.ticks)return 0;var r=y.ticklen;return y.ticks==="inside"?-r:r};function v(y){return new a(y)}z.exports=v},4796:function(z,B,e){var d=e(30962).overrideAll,P=e(92918),a=e(10820),_=e(77922),x=e(85555),v=e(93612),y=e(528),r=e(27659).NG;B.name="gl2d",B.attr=["xaxis","yaxis"],B.idRoot=["x","y"],B.idRegex=x.idRegex,B.attrRegex=x.attrRegex,B.attributes=e(89502),B.supplyLayoutDefaults=function(n,u,i){u._has("cartesian")||v.supplyLayoutDefaults(n,u,i)},B.layoutAttrOverrides=d(v.layoutAttributes,"plot","from-root"),B.baseLayoutAttrOverrides=d({plot_bgcolor:a.plot_bgcolor,hoverlabel:y.hoverlabel},"plot","nested"),B.plot=function(u){for(var i=u._fullLayout,f=u._fullData,g=i._subplots.gl2d,h=0;h<g.length;h++){var b=g[h],p=i._plots[b],E=r(f,"gl2d",b),c=p._scene2d;c===void 0&&(c=new P({id:b,graphDiv:u,container:u.querySelector(".gl-container"),staticPlot:u._context.staticPlot,plotGlPixelRatio:u._context.plotGlPixelRatio},i),p._scene2d=c),c.plot(E,u.calcdata,i,u.layout)}},B.clean=function(n,u,i,f){for(var g=f._subplots.gl2d||[],h=0;h<g.length;h++){var b=g[h],p=f._plots[b];if(p._scene2d){var E=r(n,"gl2d",b);E.length===0&&(p._scene2d.destroy(),delete f._plots[b])}}v.clean.apply(this,arguments)},B.drawFramework=function(n){n._context.staticPlot||v.drawFramework(n)},B.toSVG=function(n){for(var u=n._fullLayout,i=u._subplots.gl2d,f=0;f<i.length;f++){var g=u._plots[i[f]],h=g._scene2d,b=h.toImage("png"),p=u._glimages.append("svg:image");p.attr({xmlns:_.svg,"xlink:href":b,x:0,y:0,width:"100%",height:"100%",preserveAspectRatio:"none"}),h.destroy()}},B.updateFx=function(n){for(var u=n._fullLayout,i=u._subplots.gl2d,f=0;f<i.length;f++){var g=u._plots[i[f]]._scene2d;g.updateFx(u.dragmode)}}},92918:function(z,B,e){var d=e(73972),P=e(89298),a=e(30211),_=e(9330).gl_plot2d,x=e(9330).gl_spikes2d,v=e(9330).gl_select_box,y=e(40372),r=e(82961),n=e(75071),u=e(58617),i=e(99082),f=i.enforce,g=i.clean,h=e(71739).doAutoRange,b=e(64505),p=b.drawMode,E=b.selectMode,c=["xaxis","yaxis"],l,m,M=e(85555).SUBPLOT_PATTERN;function L(C,S){this.container=C.container,this.graphDiv=C.graphDiv,this.pixelRatio=C.plotGlPixelRatio||window.devicePixelRatio,this.id=C.id,this.staticPlot=!!C.staticPlot,this.scrollZoom=this.graphDiv._context._scrollZoom.cartesian,this.fullData=null,this.updateRefs(S),this.makeFramework(),!this.stopped&&(this.glplotOptions=r(this),this.glplotOptions.merge(S),this.glplot=_(this.glplotOptions),this.camera=n(this),this.traces={},this.spikes=x(this.glplot),this.selectBox=v(this.glplot,{innerFill:!1,outerFill:!0}),this.lastButtonState=0,this.pickResult=null,this.isMouseOver=!0,this.stopped=!1,this.redraw=this.draw.bind(this),this.redraw())}z.exports=L;var D=L.prototype;D.makeFramework=function(){if(this.staticPlot){if(!m&&(l=document.createElement("canvas"),m=y({canvas:l,preserveDrawingBuffer:!1,premultipliedAlpha:!0,antialias:!0}),!m))throw new Error("Error creating static canvas/context for image server");this.canvas=l,this.gl=m}else{var C=this.container.querySelector(".gl-canvas-focus"),S=y({canvas:C,preserveDrawingBuffer:!0,premultipliedAlpha:!0});if(!S){u(this),this.stopped=!0;return}this.canvas=C,this.gl=S}var o=this.canvas;o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.top="0px",o.style.left="0px",o.style["pointer-events"]="none",this.updateSize(o);var R=this.svgContainer=document.createElementNS("http://www.w3.org/2000/svg","svg");R.style.position="absolute",R.style.top=R.style.left="0px",R.style.width=R.style.height="100%",R.style["z-index"]=20,R.style["pointer-events"]="none";var T=this.mouseContainer=document.createElement("div");T.style.position="absolute",T.style["pointer-events"]="auto",this.pickCanvas=this.container.querySelector(".gl-canvas-pick");var O=this.container;O.appendChild(R),O.appendChild(T);var N=this;T.addEventListener("mouseout",function(){N.isMouseOver=!1,N.unhover()}),T.addEventListener("mouseover",function(){N.isMouseOver=!0})},D.toImage=function(C){C||(C="png"),this.stopped=!0,this.staticPlot&&this.container.appendChild(l),this.updateSize(this.canvas);var S=this.glplot.gl,o=S.drawingBufferWidth,R=S.drawingBufferHeight;S.clearColor(1,1,1,0),S.clear(S.COLOR_BUFFER_BIT|S.DEPTH_BUFFER_BIT),this.glplot.setDirty(),this.glplot.draw(),S.bindFramebuffer(S.FRAMEBUFFER,null);var T=new Uint8Array(o*R*4);S.readPixels(0,0,o,R,S.RGBA,S.UNSIGNED_BYTE,T);for(var O=0,N=R-1;O<N;++O,--N)for(var H=0;H<o;++H)for(var k=0;k<4;++k){var V=T[4*(o*O+H)+k];T[4*(o*O+H)+k]=T[4*(o*N+H)+k],T[4*(o*N+H)+k]=V}var G=document.createElement("canvas");G.width=o,G.height=R;var U=G.getContext("2d",{willReadFrequently:!0}),Y=U.createImageData(o,R);Y.data.set(T),U.putImageData(Y,0,0);var ee;switch(C){case"jpeg":ee=G.toDataURL("image/jpeg");break;case"webp":ee=G.toDataURL("image/webp");break;default:ee=G.toDataURL("image/png")}return this.staticPlot&&this.container.removeChild(l),ee},D.updateSize=function(C){C||(C=this.canvas);var S=this.pixelRatio,o=this.fullLayout,R=o.width,T=o.height,O=Math.ceil(S*R)|0,N=Math.ceil(S*T)|0;return(C.width!==O||C.height!==N)&&(C.width=O,C.height=N),C},D.computeTickMarks=function(){this.xaxis.setScale(),this.yaxis.setScale();for(var C=[P.calcTicks(this.xaxis),P.calcTicks(this.yaxis)],S=0;S<2;++S)for(var o=0;o<C[S].length;++o)C[S][o].text=C[S][o].text+"";return C};function A(C,S){for(var o=0;o<2;++o){var R=C[o],T=S[o];if(R.length!==T.length)return!0;for(var O=0;O<R.length;++O)if(R[O].x!==T[O].x)return!0}return!1}D.updateRefs=function(C){this.fullLayout=C;var S=this.id.match(M),o="xaxis"+S[1],R="yaxis"+S[2];this.xaxis=this.fullLayout[o],this.yaxis=this.fullLayout[R]},D.relayoutCallback=function(){var C=this.graphDiv,S=this.xaxis,o=this.yaxis,R=C.layout,T={},O=T[S._name+".range"]=S.range.slice(),N=T[o._name+".range"]=o.range.slice();T[S._name+".autorange"]=S.autorange,T[o._name+".autorange"]=o.autorange,d.call("_storeDirectGUIEdit",C.layout,C._fullLayout._preGUI,T);var H=R[S._name];H.range=O,H.autorange=S.autorange;var k=R[o._name];k.range=N,k.autorange=o.autorange,T.lastInputTime=this.camera.lastInputTime,C.emit("plotly_relayout",T)},D.cameraChanged=function(){var C=this.camera;this.glplot.setDataBox(this.calcDataBox());var S=this.computeTickMarks(),o=this.glplotOptions.ticks;A(S,o)&&(this.glplotOptions.ticks=S,this.glplotOptions.dataBox=C.dataBox,this.glplot.update(this.glplotOptions),this.handleAnnotations())},D.handleAnnotations=function(){for(var C=this.graphDiv,S=this.fullLayout.annotations,o=0;o<S.length;o++){var R=S[o];R.xref===this.xaxis._id&&R.yref===this.yaxis._id&&d.getComponentMethod("annotations","drawOne")(C,o)}},D.destroy=function(){if(this.glplot){var C=this.traces;C&&Object.keys(C).map(function(S){C[S].dispose(),delete C[S]}),this.glplot.dispose(),this.container.removeChild(this.svgContainer),this.container.removeChild(this.mouseContainer),this.fullData=null,this.glplot=null,this.stopped=!0,this.camera.mouseListener.enabled=!1,this.mouseContainer.removeEventListener("wheel",this.camera.wheelListener),this.camera=null}},D.plot=function(C,S,o){var R=this.glplot;this.updateRefs(o),this.xaxis.clearCalc(),this.yaxis.clearCalc(),this.updateTraces(C,S),this.updateFx(o.dragmode);var T=o.width,O=o.height;this.updateSize(this.canvas);var N=this.glplotOptions;N.merge(o),N.screenBox=[0,0,T,O];var H={_fullLayout:{_axisConstraintGroups:o._axisConstraintGroups,xaxis:this.xaxis,yaxis:this.yaxis,_size:o._size}};g(H,this.xaxis),g(H,this.yaxis);var k=o._size,V=this.xaxis.domain,G=this.yaxis.domain;N.viewBox=[k.l+V[0]*k.w,k.b+G[0]*k.h,T-k.r-(1-V[1])*k.w,O-k.t-(1-G[1])*k.h],this.mouseContainer.style.width=k.w*(V[1]-V[0])+"px",this.mouseContainer.style.height=k.h*(G[1]-G[0])+"px",this.mouseContainer.height=k.h*(G[1]-G[0]),this.mouseContainer.style.left=k.l+V[0]*k.w+"px",this.mouseContainer.style.top=k.t+(1-G[1])*k.h+"px";var U,Y;for(Y=0;Y<2;++Y)U=this[c[Y]],U._length=N.viewBox[Y+2]-N.viewBox[Y],h(this.graphDiv,U),U.setScale();f(H),N.ticks=this.computeTickMarks(),N.dataBox=this.calcDataBox(),N.merge(o),R.update(N),this.glplot.draw()},D.calcDataBox=function(){var C=this.xaxis,S=this.yaxis,o=C.range,R=S.range,T=C.r2l,O=S.r2l;return[T(o[0]),O(R[0]),T(o[1]),O(R[1])]},D.setRanges=function(C){var S=this.xaxis,o=this.yaxis,R=S.l2r,T=o.l2r;S.range=[R(C[0]),R(C[2])],o.range=[T(C[1]),T(C[3])]},D.updateTraces=function(C,S){var o=Object.keys(this.traces),R,T,O;this.fullData=C;e:for(R=0;R<o.length;R++){var N=o[R],H=this.traces[N];for(T=0;T<C.length;T++)if(O=C[T],O.uid===N&&O.type===H.type)continue e;H.dispose(),delete this.traces[N]}for(R=0;R<C.length;R++){O=C[R];var k=S[R],V=this.traces[O.uid];V?V.update(O,k):(V=O._module.plot(this,O,k),this.traces[O.uid]=V)}this.glplot.objects.sort(function(G,U){return G._trace.index-U._trace.index})},D.updateFx=function(C){E(C)||p(C)?(this.pickCanvas.style["pointer-events"]="none",this.mouseContainer.style["pointer-events"]="none"):(this.pickCanvas.style["pointer-events"]="auto",this.mouseContainer.style["pointer-events"]="auto"),C==="pan"?this.mouseContainer.style.cursor="move":C==="zoom"?this.mouseContainer.style.cursor="crosshair":this.mouseContainer.style.cursor=null},D.emitPointAction=function(C,S){for(var o=C.trace.uid,R=C.pointIndex,T,O=0;O<this.fullData.length;O++)this.fullData[O].uid===o&&(T=this.fullData[O]);var N={x:C.traceCoord[0],y:C.traceCoord[1],curveNumber:T.index,pointNumber:R,data:T._input,fullData:this.fullData,xaxis:this.xaxis,yaxis:this.yaxis};a.appendArrayPointValue(N,T,R),this.graphDiv.emit(S,{points:[N]})},D.draw=function(){if(!this.stopped){requestAnimationFrame(this.redraw);var C=this.glplot,S=this.camera,o=S.mouseListener,R=this.lastButtonState===1&&o.buttons===0,T=this.fullLayout;this.lastButtonState=o.buttons,this.cameraChanged();var O=o.x*C.pixelRatio,N=this.canvas.height-C.pixelRatio*o.y,H;if(S.boxEnabled&&T.dragmode==="zoom"){this.selectBox.enabled=!0;for(var k=this.selectBox.selectBox=[Math.min(S.boxStart[0],S.boxEnd[0]),Math.min(S.boxStart[1],S.boxEnd[1]),Math.max(S.boxStart[0],S.boxEnd[0]),Math.max(S.boxStart[1],S.boxEnd[1])],V=0;V<2;V++)S.boxStart[V]===S.boxEnd[V]&&(k[V]=C.dataBox[V],k[V+2]=C.dataBox[V+2]);C.setDirty()}else if(!S.panning&&this.isMouseOver){this.selectBox.enabled=!1;var G=T._size,U=this.xaxis.domain,Y=this.yaxis.domain;H=C.pick(O/C.pixelRatio+G.l+U[0]*G.w,N/C.pixelRatio-(G.t+(1-Y[1])*G.h));var ee=H&&H.object._trace.handlePick(H);if(ee&&R&&this.emitPointAction(ee,"plotly_click"),H&&H.object._trace.hoverinfo!=="skip"&&T.hovermode&&ee&&(!this.lastPickResult||this.lastPickResult.traceUid!==ee.trace.uid||this.lastPickResult.dataCoord[0]!==ee.dataCoord[0]||this.lastPickResult.dataCoord[1]!==ee.dataCoord[1])){var re=ee;this.lastPickResult={traceUid:ee.trace?ee.trace.uid:null,dataCoord:ee.dataCoord.slice()},this.spikes.update({center:H.dataCoord}),re.screenCoord=[((C.viewBox[2]-C.viewBox[0])*(H.dataCoord[0]-C.dataBox[0])/(C.dataBox[2]-C.dataBox[0])+C.viewBox[0])/C.pixelRatio,(this.canvas.height-(C.viewBox[3]-C.viewBox[1])*(H.dataCoord[1]-C.dataBox[1])/(C.dataBox[3]-C.dataBox[1])-C.viewBox[1])/C.pixelRatio],this.emitPointAction(ee,"plotly_hover");var ie=this.fullData[re.trace.index]||{},se=re.pointIndex,ce=a.castHoverinfo(ie,T,se);if(ce&&ce!=="all"){var q=ce.split("+");q.indexOf("x")===-1&&(re.traceCoord[0]=void 0),q.indexOf("y")===-1&&(re.traceCoord[1]=void 0),q.indexOf("z")===-1&&(re.traceCoord[2]=void 0),q.indexOf("text")===-1&&(re.textLabel=void 0),q.indexOf("name")===-1&&(re.name=void 0)}a.loneHover({x:re.screenCoord[0],y:re.screenCoord[1],xLabel:this.hoverFormatter("xaxis",re.traceCoord[0]),yLabel:this.hoverFormatter("yaxis",re.traceCoord[1]),zLabel:re.traceCoord[2],text:re.textLabel,name:re.name,color:a.castHoverOption(ie,se,"bgcolor")||re.color,borderColor:a.castHoverOption(ie,se,"bordercolor"),fontFamily:a.castHoverOption(ie,se,"font.family"),fontSize:a.castHoverOption(ie,se,"font.size"),fontColor:a.castHoverOption(ie,se,"font.color"),nameLength:a.castHoverOption(ie,se,"namelength"),textAlign:a.castHoverOption(ie,se,"align")},{container:this.svgContainer,gd:this.graphDiv})}}H||this.unhover(),C.draw()}},D.unhover=function(){this.lastPickResult&&(this.spikes.update({}),this.lastPickResult=null,this.graphDiv.emit("plotly_unhover"),a.loneUnhover(this.svgContainer))},D.hoverFormatter=function(C,S){if(S!==void 0){var o=this[C];return P.tickText(o,o.c2l(S),"hover").text}}},58547:function(z,B,e){var d=e(30962).overrideAll,P=e(528),a=e(33539),_=e(27659).NG,x=e(71828),v=e(77922),y="gl3d",r="scene";B.name=y,B.attr=r,B.idRoot=r,B.idRegex=B.attrRegex=x.counterRegex("scene"),B.attributes=e(59084),B.layoutAttributes=e(65500),B.baseLayoutAttrOverrides=d({hoverlabel:P.hoverlabel},"plot","nested"),B.supplyLayoutDefaults=e(24682),B.plot=function(u){for(var i=u._fullLayout,f=u._fullData,g=i._subplots[y],h=0;h<g.length;h++){var b=g[h],p=_(f,y,b),E=i[b],c=E.camera,l=E._scene;l||(l=new a({id:b,graphDiv:u,container:u.querySelector(".gl-container"),staticPlot:u._context.staticPlot,plotGlPixelRatio:u._context.plotGlPixelRatio,camera:c},i),E._scene=l),l.viewInitial||(l.viewInitial={up:{x:c.up.x,y:c.up.y,z:c.up.z},eye:{x:c.eye.x,y:c.eye.y,z:c.eye.z},center:{x:c.center.x,y:c.center.y,z:c.center.z}}),l.plot(p,i,u.layout)}},B.clean=function(n,u,i,f){for(var g=f._subplots[y]||[],h=0;h<g.length;h++){var b=g[h];!u[b]&&f[b]._scene&&(f[b]._scene.destroy(),f._infolayer&&f._infolayer.selectAll(".annotation-"+b).remove())}},B.toSVG=function(n){for(var u=n._fullLayout,i=u._subplots[y],f=u._size,g=0;g<i.length;g++){var h=u[i[g]],b=h.domain,p=h._scene,E=p.toImage("png"),c=u._glimages.append("svg:image");c.attr({xmlns:v.svg,"xlink:href":E,x:f.l+f.w*b.x[0],y:f.t+f.h*(1-b.y[1]),width:f.w*(b.x[1]-b.x[0]),height:f.h*(b.y[1]-b.y[0]),preserveAspectRatio:"none"}),p.destroy()}},B.cleanId=function(u){if(u.match(/^scene[0-9]*$/)){var i=u.substr(5);return i==="1"&&(i=""),r+i}},B.updateFx=function(n){for(var u=n._fullLayout,i=u._subplots[y],f=0;f<i.length;f++){var g=u[i[f]]._scene;g.updateFx(u.dragmode,u.hovermode)}}},59084:function(z){z.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}},77894:function(z,B,e){var d=e(7901),P=e(13838),a=e(1426).extendFlat,_=e(30962).overrideAll;z.exports=_({visible:P.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:d.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:P.color,categoryorder:P.categoryorder,categoryarray:P.categoryarray,title:{text:P.title.text,font:P.title.font},type:a({},P.type,{values:["-","linear","log","date","category"]}),autotypenumbers:P.autotypenumbers,autorange:P.autorange,rangemode:P.rangemode,range:a({},P.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:P.minor.tickmode,nticks:P.nticks,tick0:P.tick0,dtick:P.dtick,tickvals:P.tickvals,ticktext:P.ticktext,ticks:P.ticks,mirror:P.mirror,ticklen:P.ticklen,tickwidth:P.tickwidth,tickcolor:P.tickcolor,showticklabels:P.showticklabels,tickfont:P.tickfont,tickangle:P.tickangle,tickprefix:P.tickprefix,showtickprefix:P.showtickprefix,ticksuffix:P.ticksuffix,showticksuffix:P.showticksuffix,showexponent:P.showexponent,exponentformat:P.exponentformat,minexponent:P.minexponent,separatethousands:P.separatethousands,tickformat:P.tickformat,tickformatstops:P.tickformatstops,hoverformat:P.hoverformat,showline:P.showline,linecolor:P.linecolor,linewidth:P.linewidth,showgrid:P.showgrid,gridcolor:a({},P.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:P.gridwidth,zeroline:P.zeroline,zerolinecolor:P.zerolinecolor,zerolinewidth:P.zerolinewidth,_deprecated:{title:P._deprecated.title,titlefont:P._deprecated.titlefont}},"plot","from-root")},3277:function(z,B,e){var d=e(84267).mix,P=e(71828),a=e(44467),_=e(77894),x=e(951),v=e(71453),y=["xaxis","yaxis","zaxis"],r=100*(204-68)/(255-68);z.exports=function(u,i,f){var g,h;function b(c,l){return P.coerce(g,h,_,c,l)}for(var p=0;p<y.length;p++){var E=y[p];g=u[E]||{},h=a.newContainer(i,E),h._id=E[0]+f.scene,h._name=E,x(g,h,b,f),v(g,h,b,{font:f.font,letter:E[0],data:f.data,showGrid:!0,noTickson:!0,noTicklabelmode:!0,noTicklabelstep:!0,noTicklabelposition:!0,noTicklabeloverflow:!0,bgColor:f.bgColor,calendar:f.calendar},f.fullLayout),b("gridcolor",d(h.color,f.bgColor,r).toRgbString()),b("title.text",E[0]),h.setScale=P.noop,b("showspikes")&&(b("spikesides"),b("spikethickness"),b("spikecolor",h.color)),b("showaxeslabels"),b("showbackground")&&b("backgroundcolor")}}},30422:function(z,B,e){var d=e(78614),P=e(71828),a=["xaxis","yaxis","zaxis"];function _(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],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=[10,10,10],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=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}var x=_.prototype;x.merge=function(y,r){for(var n=this,u=0;u<3;++u){var i=r[a[u]];if(!i.visible){n.tickEnable[u]=!1,n.labelEnable[u]=!1,n.lineEnable[u]=!1,n.lineTickEnable[u]=!1,n.gridEnable[u]=!1,n.zeroEnable[u]=!1,n.backgroundEnable[u]=!1;continue}n.labels[u]=y._meta?P.templateString(i.title.text,y._meta):i.title.text,"font"in i.title&&(i.title.font.color&&(n.labelColor[u]=d(i.title.font.color)),i.title.font.family&&(n.labelFont[u]=i.title.font.family),i.title.font.size&&(n.labelSize[u]=i.title.font.size)),"showline"in i&&(n.lineEnable[u]=i.showline),"linecolor"in i&&(n.lineColor[u]=d(i.linecolor)),"linewidth"in i&&(n.lineWidth[u]=i.linewidth),"showgrid"in i&&(n.gridEnable[u]=i.showgrid),"gridcolor"in i&&(n.gridColor[u]=d(i.gridcolor)),"gridwidth"in i&&(n.gridWidth[u]=i.gridwidth),i.type==="log"?n.zeroEnable[u]=!1:"zeroline"in i&&(n.zeroEnable[u]=i.zeroline),"zerolinecolor"in i&&(n.zeroLineColor[u]=d(i.zerolinecolor)),"zerolinewidth"in i&&(n.zeroLineWidth[u]=i.zerolinewidth),"ticks"in i&&i.ticks?n.lineTickEnable[u]=!0:n.lineTickEnable[u]=!1,"ticklen"in i&&(n.lineTickLength[u]=n._defaultLineTickLength[u]=i.ticklen),"tickcolor"in i&&(n.lineTickColor[u]=d(i.tickcolor)),"tickwidth"in i&&(n.lineTickWidth[u]=i.tickwidth),"tickangle"in i&&(n.tickAngle[u]=i.tickangle==="auto"?-3600:Math.PI*-i.tickangle/180),"showticklabels"in i&&(n.tickEnable[u]=i.showticklabels),"tickfont"in i&&(i.tickfont.color&&(n.tickColor[u]=d(i.tickfont.color)),i.tickfont.family&&(n.tickFont[u]=i.tickfont.family),i.tickfont.size&&(n.tickSize[u]=i.tickfont.size)),"mirror"in i?["ticks","all","allticks"].indexOf(i.mirror)!==-1?(n.lineTickMirror[u]=!0,n.lineMirror[u]=!0):i.mirror===!0?(n.lineTickMirror[u]=!1,n.lineMirror[u]=!0):(n.lineTickMirror[u]=!1,n.lineMirror[u]=!1):n.lineMirror[u]=!1,"showbackground"in i&&i.showbackground!==!1?(n.backgroundEnable[u]=!0,n.backgroundColor[u]=d(i.backgroundcolor)):n.backgroundEnable[u]=!1}};function v(y,r){var n=new _;return n.merge(y,r),n}z.exports=v},24682:function(z,B,e){var d=e(71828),P=e(7901),a=e(73972),_=e(49119),x=e(3277),v=e(65500),y=e(27659).NG,r="gl3d";z.exports=function(i,f,g){var h=f._basePlotModules.length>1;function b(p){if(!h){var E=d.validate(i[p],v[p]);if(E)return i[p]}}_(i,f,g,{type:r,attributes:v,handleDefaults:n,fullLayout:f,font:f.font,fullData:g,getDfltFromLayout:b,autotypenumbersDflt:f.autotypenumbers,paper_bgcolor:f.paper_bgcolor,calendar:f.calendar})};function n(u,i,f,g){for(var h=f("bgcolor"),b=P.combine(h,g.paper_bgcolor),p=["up","center","eye"],E=0;E<p.length;E++)f("camera."+p[E]+".x"),f("camera."+p[E]+".y"),f("camera."+p[E]+".z");f("camera.projection.type");var c=!!f("aspectratio.x")&&!!f("aspectratio.y")&&!!f("aspectratio.z"),l=c?"manual":"auto",m=f("aspectmode",l);c||(u.aspectratio=i.aspectratio={x:1,y:1,z:1},m==="manual"&&(i.aspectmode="auto"),u.aspectmode=i.aspectmode);var M=y(g.fullData,r,g.id);x(u,i,{font:g.font,scene:g.id,data:M,bgColor:b,calendar:g.calendar,autotypenumbersDflt:g.autotypenumbersDflt,fullLayout:g.fullLayout}),a.getComponentMethod("annotations3d","handleDefaults")(u,i,g);var L=g.getDfltFromLayout("dragmode");if(L!==!1&&!L)if(L="orbit",u.camera&&u.camera.up){var D=u.camera.up.x,A=u.camera.up.y,C=u.camera.up.z;C!==0&&(!D||!A||!C||C/Math.sqrt(D*D+A*A+C*C)>.999)&&(L="turntable")}else L="turntable";f("dragmode",L),f("hovermode",g.getDfltFromLayout("hovermode"))}},65500:function(z,B,e){var d=e(77894),P=e(27670).Y,a=e(1426).extendFlat,_=e(71828).counterRegex;function x(v,y,r){return{x:{valType:"number",dflt:v,editType:"camera"},y:{valType:"number",dflt:y,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}z.exports={_arrayAttrRegexps:[_("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:a(x(0,0,1),{}),center:a(x(0,0,0),{}),eye:a(x(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:P({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}},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"}},xaxis:d,yaxis:d,zaxis:d,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},13133:function(z,B,e){var d=e(78614),P=["xaxis","yaxis","zaxis"];function a(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}var _=a.prototype;_.merge=function(v){for(var y=0;y<3;++y){var r=v[P[y]];if(!r.visible){this.enabled[y]=!1,this.drawSides[y]=!1;continue}this.enabled[y]=r.showspikes,this.colors[y]=d(r.spikecolor),this.drawSides[y]=r.spikesides,this.lineWidth[y]=r.spikethickness}};function x(v){var y=new a;return y.merge(v),y}z.exports=x},96085:function(z,B,e){z.exports=x;var d=e(89298),P=e(71828),a=["xaxis","yaxis","zaxis"];function _(v){for(var y=new Array(3),r=0;r<3;++r){for(var n=v[r],u=new Array(n.length),i=0;i<n.length;++i)u[i]=n[i].x;y[r]=u}return y}function x(v){for(var y=v.axesOptions,r=v.glplot.axesPixels,n=v.fullSceneLayout,u=[[],[],[]],i=0;i<3;++i){var f=n[a[i]];if(f._length=(r[i].hi-r[i].lo)*r[i].pixelsPerDataUnit/v.dataScale[i],Math.abs(f._length)===1/0||isNaN(f._length))u[i]=[];else{f._input_range=f.range.slice(),f.range[0]=r[i].lo/v.dataScale[i],f.range[1]=r[i].hi/v.dataScale[i],f._m=1/(v.dataScale[i]*r[i].pixelsPerDataUnit),f.range[0]===f.range[1]&&(f.range[0]-=1,f.range[1]+=1);var g=f.tickmode;if(f.tickmode==="auto"){f.tickmode="linear";var h=f.nticks||P.constrain(f._length/40,4,9);d.autoTicks(f,Math.abs(f.range[1]-f.range[0])/h)}for(var b=d.calcTicks(f,{msUTC:!0}),p=0;p<b.length;++p)b[p].x=b[p].x*v.dataScale[i],f.type==="date"&&(b[p].text=b[p].text.replace(/\<br\>/g," "));u[i]=b,f.tickmode=g}}y.ticks=u;for(var i=0;i<3;++i){.5*(v.glplot.bounds[0][i]+v.glplot.bounds[1][i]);for(var p=0;p<2;++p)y.bounds[p][i]=v.glplot.bounds[p][i]}v.contourLevels=_(u)}},63538:function(z){function B(d,P){var a=[0,0,0,0],_,x;for(_=0;_<4;++_)for(x=0;x<4;++x)a[x]+=d[4*_+x]*P[_];return a}function e(d,P){var a=B(d.projection,B(d.view,B(d.model,[P[0],P[1],P[2],1])));return a}z.exports=e},33539:function(z,B,e){var d=e(9330).gl_plot3d,P=d.createCamera,a=d.createScene,_=e(40372),x=e(38520),v=e(73972),y=e(71828),r=y.preserveDrawingBuffer(),n=e(89298),u=e(30211),i=e(78614),f=e(58617),g=e(63538),h=e(30422),b=e(13133),p=e(96085),E,c;function l(T,O){var N=document.createElement("div"),H=T.container;this.graphDiv=T.graphDiv;var k=document.createElementNS("http://www.w3.org/2000/svg","svg");k.style.position="absolute",k.style.top=k.style.left="0px",k.style.width=k.style.height="100%",k.style["z-index"]=20,k.style["pointer-events"]="none",N.appendChild(k),this.svgContainer=k,N.id=T.id,N.style.position="absolute",N.style.top=N.style.left="0px",N.style.width=N.style.height="100%",H.appendChild(N),this.fullLayout=O,this.id=T.id||"scene",this.fullSceneLayout=O[this.id],this.plotArgs=[[],{},{}],this.axesOptions=h(O,O[this.id]),this.spikeOptions=b(O[this.id]),this.container=N,this.staticMode=!!T.staticPlot,this.pixelRatio=this.pixelRatio||T.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=v.getComponentMethod("annotations3d","convert"),this.drawAnnotations=v.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var m=l.prototype;m.prepareOptions=function(){var T=this,O={canvas:T.canvas,gl:T.gl,glOptions:{preserveDrawingBuffer:r,premultipliedAlpha:!0,antialias:!0},container:T.container,axes:T.axesOptions,spikes:T.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:T.camera,pixelRatio:T.pixelRatio};if(T.staticMode){if(!c&&(E=document.createElement("canvas"),c=_({canvas:E,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!c))throw new Error("error creating static canvas/context for image server");O.gl=c,O.canvas=E}return O};var M=!0;m.tryCreatePlot=function(){var T=this,O=T.prepareOptions(),N=!0;try{T.glplot=a(O)}catch{if(T.staticMode||!M||r)N=!1;else{y.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{r=O.glOptions.preserveDrawingBuffer=!0,T.glplot=a(O)}catch{r=O.glOptions.preserveDrawingBuffer=!1,N=!1}}}return M=!1,N},m.initializeGLCamera=function(){var T=this,O=T.fullSceneLayout.camera,N=O.projection.type==="orthographic";T.camera=P(T.container,{center:[O.center.x,O.center.y,O.center.z],eye:[O.eye.x,O.eye.y,O.eye.z],up:[O.up.x,O.up.y,O.up.z],_ortho:N,zoomMin:.01,zoomMax:100,mode:"orbit"})},m.initializeGLPlot=function(){var T=this;T.initializeGLCamera();var O=T.tryCreatePlot();if(!O)return f(T);T.traces={},T.make4thDimension();var N=T.graphDiv,H=N.layout,k=function(){var G={};return T.isCameraChanged(H)&&(G[T.id+".camera"]=T.getCamera()),T.isAspectChanged(H)&&(G[T.id+".aspectratio"]=T.glplot.getAspectratio(),H[T.id].aspectmode!=="manual"&&(T.fullSceneLayout.aspectmode=H[T.id].aspectmode=G[T.id+".aspectmode"]="manual")),G},V=function(G){if(G.fullSceneLayout.dragmode!==!1){var U=k();G.saveLayout(H),G.graphDiv.emit("plotly_relayout",U)}};return T.glplot.canvas&&(T.glplot.canvas.addEventListener("mouseup",function(){V(T)}),T.glplot.canvas.addEventListener("wheel",function(G){if(N._context._scrollZoom.gl3d){if(T.camera._ortho){var U=G.deltaX>G.deltaY?1.1:.9090909090909091,Y=T.glplot.getAspectratio();T.glplot.setAspectratio({x:U*Y.x,y:U*Y.y,z:U*Y.z})}V(T)}},x?{passive:!1}:!1),T.glplot.canvas.addEventListener("mousemove",function(){if(T.fullSceneLayout.dragmode!==!1&&T.camera.mouseListener.buttons!==0){var G=k();T.graphDiv.emit("plotly_relayouting",G)}}),T.staticMode||T.glplot.canvas.addEventListener("webglcontextlost",function(G){N&&N.emit&&N.emit("plotly_webglcontextlost",{event:G,layer:T.id})},!1)),T.glplot.oncontextloss=function(){T.recoverContext()},T.glplot.onrender=function(){T.render()},!0},m.render=function(){var T=this,O=T.graphDiv,N,H=T.svgContainer,k=T.container.getBoundingClientRect();O._fullLayout._calcInverseTransform(O);var V=O._fullLayout._invScaleX,G=O._fullLayout._invScaleY,U=k.width*V,Y=k.height*G;H.setAttributeNS(null,"viewBox","0 0 "+U+" "+Y),H.setAttributeNS(null,"width",U),H.setAttributeNS(null,"height",Y),p(T),T.glplot.axes.update(T.axesOptions);for(var ee=Object.keys(T.traces),re=null,ie=T.glplot.selection,se=0;se<ee.length;++se)N=T.traces[ee[se]],N.data.hoverinfo!=="skip"&&N.handlePick(ie)&&(re=N),N.setContourLevels&&N.setContourLevels();function ce(Re,Ee,Oe){var Be=T.fullSceneLayout[Re+"axis"];return Be.type!=="log"&&(Ee=Be.d2l(Ee)),n.hoverLabelText(Be,Ee,Oe)}if(re!==null){var q=g(T.glplot.cameraParams,ie.dataCoordinate);N=re.data;var j=O._fullData[N.index],Z=ie.index,Q={xLabel:ce("x",ie.traceCoordinate[0],N.xhoverformat),yLabel:ce("y",ie.traceCoordinate[1],N.yhoverformat),zLabel:ce("z",ie.traceCoordinate[2],N.zhoverformat)},ue=u.castHoverinfo(j,T.fullLayout,Z),fe=(ue||"").split("+"),te=ue&&ue==="all";!j.hovertemplate&&!te&&(fe.indexOf("x")===-1&&(Q.xLabel=void 0),fe.indexOf("y")===-1&&(Q.yLabel=void 0),fe.indexOf("z")===-1&&(Q.zLabel=void 0),fe.indexOf("text")===-1&&(ie.textLabel=void 0),fe.indexOf("name")===-1&&(re.name=void 0));var ne,ve=[];N.type==="cone"||N.type==="streamtube"?(Q.uLabel=ce("x",ie.traceCoordinate[3],N.uhoverformat),(te||fe.indexOf("u")!==-1)&&ve.push("u: "+Q.uLabel),Q.vLabel=ce("y",ie.traceCoordinate[4],N.vhoverformat),(te||fe.indexOf("v")!==-1)&&ve.push("v: "+Q.vLabel),Q.wLabel=ce("z",ie.traceCoordinate[5],N.whoverformat),(te||fe.indexOf("w")!==-1)&&ve.push("w: "+Q.wLabel),Q.normLabel=ie.traceCoordinate[6].toPrecision(3),(te||fe.indexOf("norm")!==-1)&&ve.push("norm: "+Q.normLabel),N.type==="streamtube"&&(Q.divergenceLabel=ie.traceCoordinate[7].toPrecision(3),(te||fe.indexOf("divergence")!==-1)&&ve.push("divergence: "+Q.divergenceLabel)),ie.textLabel&&ve.push(ie.textLabel),ne=ve.join("<br>")):N.type==="isosurface"||N.type==="volume"?(Q.valueLabel=n.hoverLabelText(T._mockAxis,T._mockAxis.d2l(ie.traceCoordinate[3]),N.valuehoverformat),ve.push("value: "+Q.valueLabel),ie.textLabel&&ve.push(ie.textLabel),ne=ve.join("<br>")):ne=ie.textLabel;var le={x:ie.traceCoordinate[0],y:ie.traceCoordinate[1],z:ie.traceCoordinate[2],data:j._input,fullData:j,curveNumber:j.index,pointNumber:Z};u.appendArrayPointValue(le,j,Z),N._module.eventData&&(le=j._module.eventData(le,ie,j,{},Z));var xe={points:[le]};if(T.fullSceneLayout.hovermode){var Se=[];u.loneHover({trace:j,x:(.5+.5*q[0]/q[3])*U,y:(.5-.5*q[1]/q[3])*Y,xLabel:Q.xLabel,yLabel:Q.yLabel,zLabel:Q.zLabel,text:ne,name:re.name,color:u.castHoverOption(j,Z,"bgcolor")||re.color,borderColor:u.castHoverOption(j,Z,"bordercolor"),fontFamily:u.castHoverOption(j,Z,"font.family"),fontSize:u.castHoverOption(j,Z,"font.size"),fontColor:u.castHoverOption(j,Z,"font.color"),nameLength:u.castHoverOption(j,Z,"namelength"),textAlign:u.castHoverOption(j,Z,"align"),hovertemplate:y.castOption(j,Z,"hovertemplate"),hovertemplateLabels:y.extendFlat({},le,Q),eventData:[le]},{container:H,gd:O,inOut_bbox:Se}),le.bbox=Se[0]}ie.buttons&&ie.distance<5?O.emit("plotly_click",xe):O.emit("plotly_hover",xe),this.oldEventData=xe}else u.loneUnhover(H),this.oldEventData&&O.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;T.drawAnnotations(T)},m.recoverContext=function(){var T=this;T.glplot.dispose();var O=function(){if(T.glplot.gl.isContextLost()){requestAnimationFrame(O);return}if(!T.initializeGLPlot()){y.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}T.plot.apply(T,T.plotArgs)};requestAnimationFrame(O)};var L=["xaxis","yaxis","zaxis"];function D(T,O,N){for(var H=T.fullSceneLayout,k=0;k<3;k++){var V=L[k],G=V.charAt(0),U=H[V],Y=O[G],ee=O[G+"calendar"],re=O["_"+G+"length"];if(!y.isArrayOrTypedArray(Y))N[0][k]=Math.min(N[0][k],0),N[1][k]=Math.max(N[1][k],re-1);else for(var ie,se=0;se<(re||Y.length);se++)if(y.isArrayOrTypedArray(Y[se]))for(var ce=0;ce<Y[se].length;++ce)ie=U.d2l(Y[se][ce],0,ee),!isNaN(ie)&&isFinite(ie)&&(N[0][k]=Math.min(N[0][k],ie),N[1][k]=Math.max(N[1][k],ie));else ie=U.d2l(Y[se],0,ee),!isNaN(ie)&&isFinite(ie)&&(N[0][k]=Math.min(N[0][k],ie),N[1][k]=Math.max(N[1][k],ie))}}function A(T,O){for(var N=T.fullSceneLayout,H=N.annotations||[],k=0;k<3;k++)for(var V=L[k],G=V.charAt(0),U=N[V],Y=0;Y<H.length;Y++){var ee=H[Y];if(ee.visible){var re=U.r2l(ee[G]);!isNaN(re)&&isFinite(re)&&(O[0][k]=Math.min(O[0][k],re),O[1][k]=Math.max(O[1][k],re))}}}m.plot=function(T,O,N){var H=this;if(H.plotArgs=[T,O,N],H.glplot.contextLost)return;var k,V,G,U,Y,ee,re=O[H.id],ie=N[H.id];H.fullLayout=O,H.fullSceneLayout=re,H.axesOptions.merge(O,re),H.spikeOptions.merge(re),H.setViewport(re),H.updateFx(re.dragmode,re.hovermode),H.camera.enableWheel=H.graphDiv._context._scrollZoom.gl3d,H.glplot.setClearColor(i(re.bgcolor)),H.setConvert(Y),T?Array.isArray(T)||(T=[T]):T=[];var se=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(G=0;G<T.length;++G)k=T[G],!(k.visible!==!0||k._length===0)&&D(this,k,se);A(this,se);var ce=[1,1,1];for(U=0;U<3;++U)se[1][U]===se[0][U]?ce[U]=1:ce[U]=1/(se[1][U]-se[0][U]);for(H.dataScale=ce,H.convertAnnotations(this),G=0;G<T.length;++G)k=T[G],!(k.visible!==!0||k._length===0)&&(V=H.traces[k.uid],V?V.data.type===k.type?V.update(k):(V.dispose(),V=k._module.plot(this,k),H.traces[k.uid]=V):(V=k._module.plot(this,k),H.traces[k.uid]=V),V.name=k.name);var q=Object.keys(H.traces);e:for(G=0;G<q.length;++G){for(U=0;U<T.length;++U)if(T[U].uid===q[G]&&T[U].visible===!0&&T[U]._length!==0)continue e;V=H.traces[q[G]],V.dispose(),delete H.traces[q[G]]}H.glplot.objects.sort(function(Xe,ht){return Xe._trace.data.index-ht._trace.data.index});var j=[[0,0,0],[0,0,0]],Z={};for(G=0;G<3;++G){if(Y=re[L[G]],ee=Y.type,ee in Z?(Z[ee].acc*=ce[G],Z[ee].count+=1):Z[ee]={acc:ce[G],count:1},Y.autorange){j[0][G]=1/0,j[1][G]=-1/0;var Q=H.glplot.objects,ue=H.fullSceneLayout.annotations||[],fe=Y._name.charAt(0);for(U=0;U<Q.length;U++){var te=Q[U],ne=te.bounds,ve=te._trace.data._pad||0;te.constructor.name==="ErrorBars"&&Y._lowerLogErrorBound?j[0][G]=Math.min(j[0][G],Y._lowerLogErrorBound):j[0][G]=Math.min(j[0][G],ne[0][G]/ce[G]-ve),j[1][G]=Math.max(j[1][G],ne[1][G]/ce[G]+ve)}for(U=0;U<ue.length;U++){var le=ue[U];if(le.visible){var xe=Y.r2l(le[fe]);j[0][G]=Math.min(j[0][G],xe),j[1][G]=Math.max(j[1][G],xe)}}if("rangemode"in Y&&Y.rangemode==="tozero"&&(j[0][G]=Math.min(j[0][G],0),j[1][G]=Math.max(j[1][G],0)),j[0][G]>j[1][G])j[0][G]=-1,j[1][G]=1;else{var Se=j[1][G]-j[0][G];j[0][G]-=Se/32,j[1][G]+=Se/32}if(Y.autorange==="reversed"){var Re=j[0][G];j[0][G]=j[1][G],j[1][G]=Re}}else{var Ee=Y.range;j[0][G]=Y.r2l(Ee[0]),j[1][G]=Y.r2l(Ee[1])}j[0][G]===j[1][G]&&(j[0][G]-=1,j[1][G]+=1),H.glplot.setBounds(G,{min:j[0][G]*ce[G],max:j[1][G]*ce[G]})}var Oe,Be=re.aspectmode;if(Be==="cube")Oe=[1,1,1];else if(Be==="manual"){var Le=re.aspectratio;Oe=[Le.x,Le.y,Le.z]}else if(Be==="auto"||Be==="data"){var Te=[1,1,1];for(G=0;G<3;++G){Y=re[L[G]],ee=Y.type;var De=Z[ee];Te[G]=Math.pow(De.acc,1/De.count)/ce[G]}Be==="data"||Math.max.apply(null,Te)/Math.min.apply(null,Te)<=4?Oe=Te:Oe=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");re.aspectratio.x=ie.aspectratio.x=Oe[0],re.aspectratio.y=ie.aspectratio.y=Oe[1],re.aspectratio.z=ie.aspectratio.z=Oe[2],H.glplot.setAspectratio(re.aspectratio),H.viewInitial.aspectratio||(H.viewInitial.aspectratio={x:re.aspectratio.x,y:re.aspectratio.y,z:re.aspectratio.z}),H.viewInitial.aspectmode||(H.viewInitial.aspectmode=re.aspectmode);var Ve=re.domain||null,Ye=O._size||null;if(Ve&&Ye){var Ne=H.container.style;Ne.position="absolute",Ne.left=Ye.l+Ve.x[0]*Ye.w+"px",Ne.top=Ye.t+(1-Ve.y[1])*Ye.h+"px",Ne.width=Ye.w*(Ve.x[1]-Ve.x[0])+"px",Ne.height=Ye.h*(Ve.y[1]-Ve.y[0])+"px"}H.glplot.redraw()},m.destroy=function(){var T=this;T.glplot&&(T.camera.mouseListener.enabled=!1,T.container.removeEventListener("wheel",T.camera.wheelListener),T.camera=null,T.glplot.dispose(),T.container.parentNode.removeChild(T.container),T.glplot=null)};function C(T){return[[T.eye.x,T.eye.y,T.eye.z],[T.center.x,T.center.y,T.center.z],[T.up.x,T.up.y,T.up.z]]}function S(T){return{up:{x:T.up[0],y:T.up[1],z:T.up[2]},center:{x:T.center[0],y:T.center[1],z:T.center[2]},eye:{x:T.eye[0],y:T.eye[1],z:T.eye[2]},projection:{type:T._ortho===!0?"orthographic":"perspective"}}}m.getCamera=function(){var T=this;return T.camera.view.recalcMatrix(T.camera.view.lastT()),S(T.camera)},m.setViewport=function(T){var O=this,N=T.camera;O.camera.lookAt.apply(this,C(N)),O.glplot.setAspectratio(T.aspectratio);var H=N.projection.type==="orthographic",k=O.camera._ortho;H!==k&&(O.glplot.redraw(),O.glplot.clearRGBA(),O.glplot.dispose(),O.initializeGLPlot())},m.isCameraChanged=function(T){var O=this,N=O.getCamera(),H=y.nestedProperty(T,O.id+".camera"),k=H.get();function V(ee,re,ie,se){var ce=["up","center","eye"],q=["x","y","z"];return re[ce[ie]]&&ee[ce[ie]][q[se]]===re[ce[ie]][q[se]]}var G=!1;if(k===void 0)G=!0;else{for(var U=0;U<3;U++)for(var Y=0;Y<3;Y++)if(!V(N,k,U,Y)){G=!0;break}(!k.projection||N.projection&&N.projection.type!==k.projection.type)&&(G=!0)}return G},m.isAspectChanged=function(T){var O=this,N=O.glplot.getAspectratio(),H=y.nestedProperty(T,O.id+".aspectratio"),k=H.get();return k===void 0||k.x!==N.x||k.y!==N.y||k.z!==N.z},m.saveLayout=function(T){var O=this,N=O.fullLayout,H,k,V,G,U,Y,ee=O.isCameraChanged(T),re=O.isAspectChanged(T),ie=ee||re;if(ie){var se={};if(ee&&(H=O.getCamera(),k=y.nestedProperty(T,O.id+".camera"),V=k.get(),se[O.id+".camera"]=V),re&&(G=O.glplot.getAspectratio(),U=y.nestedProperty(T,O.id+".aspectratio"),Y=U.get(),se[O.id+".aspectratio"]=Y),v.call("_storeDirectGUIEdit",T,N._preGUI,se),ee){k.set(H);var ce=y.nestedProperty(N,O.id+".camera");ce.set(H)}if(re){U.set(G);var q=y.nestedProperty(N,O.id+".aspectratio");q.set(G),O.glplot.redraw()}}return ie},m.updateFx=function(T,O){var N=this,H=N.camera;if(H)if(T==="orbit")H.mode="orbit",H.keyBindingMode="rotate";else if(T==="turntable"){H.up=[0,0,1],H.mode="turntable",H.keyBindingMode="rotate";var k=N.graphDiv,V=k._fullLayout,G=N.fullSceneLayout.camera,U=G.up.x,Y=G.up.y,ee=G.up.z;if(ee/Math.sqrt(U*U+Y*Y+ee*ee)<.999){var re=N.id+".camera.up",ie={x:0,y:0,z:1},se={};se[re]=ie;var ce=k.layout;v.call("_storeDirectGUIEdit",ce,V._preGUI,se),G.up=ie,y.nestedProperty(ce,re).set(ie)}}else H.keyBindingMode=T;N.fullSceneLayout.hovermode=O};function o(T,O,N){for(var H=0,k=N-1;H<k;++H,--k)for(var V=0;V<O;++V)for(var G=0;G<4;++G){var U=4*(O*H+V)+G,Y=4*(O*k+V)+G,ee=T[U];T[U]=T[Y],T[Y]=ee}}function R(T,O,N){for(var H=0;H<N;++H)for(var k=0;k<O;++k){var V=4*(O*H+k),G=T[V+3];if(G>0)for(var U=255/G,Y=0;Y<3;++Y)T[V+Y]=Math.min(U*T[V+Y],255)}}m.toImage=function(T){var O=this;T||(T="png"),O.staticMode&&O.container.appendChild(E),O.glplot.redraw();var N=O.glplot.gl,H=N.drawingBufferWidth,k=N.drawingBufferHeight;N.bindFramebuffer(N.FRAMEBUFFER,null);var V=new Uint8Array(H*k*4);N.readPixels(0,0,H,k,N.RGBA,N.UNSIGNED_BYTE,V),o(V,H,k),R(V,H,k);var G=document.createElement("canvas");G.width=H,G.height=k;var U=G.getContext("2d",{willReadFrequently:!0}),Y=U.createImageData(H,k);Y.data.set(V),U.putImageData(Y,0,0);var ee;switch(T){case"jpeg":ee=G.toDataURL("image/jpeg");break;case"webp":ee=G.toDataURL("image/webp");break;default:ee=G.toDataURL("image/png")}return O.staticMode&&O.container.removeChild(E),ee},m.setConvert=function(){for(var T=this,O=0;O<3;O++){var N=T.fullSceneLayout[L[O]];n.setConvert(N,T.fullLayout),N.setScale=y.noop}},m.make4thDimension=function(){var T=this,O=T.graphDiv,N=O._fullLayout;T._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},n.setConvert(T._mockAxis,N)},z.exports=l},90060:function(z){z.exports=function(e,d,P,a){a=a||e.length;for(var _=new Array(a),x=0;x<a;x++)_[x]=[e[x],d[x],P[x]];return _}},10820:function(z,B,e){var d=e(41940),P=e(85594),a=e(22399),_=e(29241),x=e(53777),v=e(35025),y=e(1426).extendFlat,r=d({editType:"calc"});r.family.dflt='"Open Sans", verdana, arial, sans-serif',r.size.dflt=12,r.color.dflt=a.defaultLine,z.exports={font:r,title:{text:{valType:"string",editType:"layoutstyle"},font:d({editType:"layoutstyle"}),xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:y(v({editType:"layoutstyle"}),{}),editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:a.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:a.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:a.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:_.newshape,activeshape:_.activeshape,newselection:x.newselection,activeselection:x.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:y({},P.transition,{editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle"},titlefont:d({editType:"layoutstyle"})}}},77734:function(z,B,e){var d=e(78607),P="1.10.1",a='© <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',_=['© <a target="_blank" href="https://carto.com/">Carto</a>',a].join(" "),x=['Map tiles by <a target="_blank" href="https://stamen.com">Stamen Design</a>','under <a target="_blank" href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>',"|",'Data by <a target="_blank" href="https://openstreetmap.org">OpenStreetMap</a> contributors','under <a target="_blank" href="https://www.openstreetmap.org/copyright">ODbL</a>'].join(" "),v=['Map tiles by <a target="_blank" href="https://stamen.com">Stamen Design</a>','under <a target="_blank" href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>',"|",'Data by <a target="_blank" href="https://openstreetmap.org">OpenStreetMap</a> contributors','under <a target="_blank" href="https://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>'].join(" "),y={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:a,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}]},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}]},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:_,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}]},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:_,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}]},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:x,tiles:["https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}]},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:x,tiles:["https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}]},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:v,tiles:["https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}]}},r=d(y);z.exports={requiredVersion:P,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:y,styleValuesNonMapbox:r,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install mapbox-gl@"+P+"."].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:",r.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')`}}},13056:function(z,B,e){var d=e(71828);z.exports=function(a,_){var x=a.split(" "),v=x[0],y=x[1],r=d.isArrayOrTypedArray(_)?d.mean(_):_,n=.5+r/100,u=1.5+r/100,i=["",""],f=[0,0];switch(v){case"top":i[0]="top",f[1]=-u;break;case"bottom":i[0]="bottom",f[1]=u;break}switch(y){case"left":i[1]="right",f[0]=-n;break;case"right":i[1]="left",f[0]=n;break}var g;return i[0]&&i[1]?g=i.join("-"):i[0]?g=i[0]:i[1]?g=i[1]:g="center",{anchor:g,offset:f}}},50101:function(z,B,e){var d=e(44517),P=e(71828),a=P.strTranslate,_=P.strScale,x=e(27659).AU,v=e(77922),y=e(39898),r=e(91424),n=e(63893),u=e(10481),i="mapbox",f=B.constants=e(77734);B.name=i,B.attr="subplot",B.idRoot=i,B.idRegex=B.attrRegex=P.counterRegex(i),B.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},B.layoutAttributes=e(23585),B.supplyLayoutDefaults=e(77882),B.plot=function(p){var E=p._fullLayout,c=p.calcdata,l=E._subplots[i];if(d.version!==f.requiredVersion)throw new Error(f.wrongVersionErrorMsg);var m=g(p,l);d.accessToken=m;for(var M=0;M<l.length;M++){var L=l[M],D=x(c,i,L),A=E[L],C=A._subplot;C||(C=new u(p,L),E[L]._subplot=C),C.viewInitial||(C.viewInitial={center:P.extendFlat({},A.center),zoom:A.zoom,bearing:A.bearing,pitch:A.pitch}),C.plot(D,E,p._promises)}},B.clean=function(b,p,E,c){for(var l=c._subplots[i]||[],m=0;m<l.length;m++){var M=l[m];!p[M]&&c[M]._subplot&&c[M]._subplot.destroy()}},B.toSVG=function(b){for(var p=b._fullLayout,E=p._subplots[i],c=p._size,l=0;l<E.length;l++){var m=p[E[l]],M=m.domain,L=m._subplot,D=L.toImage("png"),A=p._glimages.append("svg:image");A.attr({xmlns:v.svg,"xlink:href":D,x:c.l+c.w*M.x[0],y:c.t+c.h*(1-M.y[1]),width:c.w*(M.x[1]-M.x[0]),height:c.h*(M.y[1]-M.y[0]),preserveAspectRatio:"none"});var C=y.select(m._subplot.div),S=C.select(".mapboxgl-ctrl-logo").node().offsetParent===null;if(!S){var o=p._glimages.append("g");o.attr("transform",a(c.l+c.w*M.x[0]+10,c.t+c.h*(1-M.y[0])-31)),o.append("path").attr("d",f.mapboxLogo.path0).style({opacity:.9,fill:"#ffffff","enable-background":"new"}),o.append("path").attr("d",f.mapboxLogo.path1).style("opacity",.35).style("enable-background","new"),o.append("path").attr("d",f.mapboxLogo.path2).style("opacity",.35).style("enable-background","new"),o.append("polygon").attr("points",f.mapboxLogo.polygon).style({opacity:.9,fill:"#ffffff","enable-background":"new"})}var R=C.select(".mapboxgl-ctrl-attrib").text().replace("Improve this map",""),T=p._glimages.append("g"),O=T.append("text");O.text(R).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":R});var N=r.bBox(O.node()),H=c.w*(M.x[1]-M.x[0]);if(N.width>H/2){var k=R.split("|").join("<br>");O.text(k).attr("data-unformatted",k).call(n.convertToTspans,b),N=r.bBox(O.node())}O.attr("transform",a(-3,-N.height+8)),T.insert("rect",".static-attribution").attr({x:-N.width-6,y:-N.height-3,width:N.width+6,height:N.height+3,fill:"rgba(255, 255, 255, 0.75)"});var V=1;N.width+6>H&&(V=H/(N.width+6));var G=[c.l+c.w*M.x[1],c.t+c.h*(1-M.y[0])];T.attr("transform",a(G[0],G[1])+_(V))}};function g(b,p){var E=b._fullLayout,c=b._context;if(c.mapboxAccessToken==="")return"";for(var l=[],m=[],M=!1,L=!1,D=0;D<p.length;D++){var A=E[p[D]],C=A.accesstoken;h(A.style)&&(C?P.pushUnique(l,C):(h(A._input.style)&&(P.error("Uses Mapbox map style, but did not set an access token."),M=!0),L=!0)),C&&P.pushUnique(m,C)}if(L){var S=M?f.noAccessTokenErrorMsg:f.missingStyleErrorMsg;throw P.error(S),new Error(S)}return l.length?(l.length>1&&P.warn(f.multipleTokensErrorMsg),l[0]):(m.length&&P.log(["Listed mapbox access token(s)",m.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function h(b){return typeof b=="string"&&(f.styleValuesMapbox.indexOf(b)!==-1||b.indexOf("mapbox://")===0)}B.updateFx=function(b){for(var p=b._fullLayout,E=p._subplots[i],c=0;c<E.length;c++){var l=p[E[c]]._subplot;l.updateFx(p)}}},67911:function(z,B,e){var d=e(71828),P=e(63893).sanitizeHTML,a=e(13056),_=e(77734);function x(u,i){this.subplot=u,this.uid=u.uid+"-"+i,this.index=i,this.idSource="source-"+this.uid,this.idLayer=_.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var v=x.prototype;v.update=function(i){this.visible?this.needsNewImage(i)?this.updateImage(i):this.needsNewSource(i)?(this.removeLayer(),this.updateSource(i),this.updateLayer(i)):this.needsNewLayer(i)?this.updateLayer(i):this.updateStyle(i):(this.updateSource(i),this.updateLayer(i)),this.visible=y(i)},v.needsNewImage=function(u){var i=this.subplot.map;return i.getSource(this.idSource)&&this.sourceType==="image"&&u.sourcetype==="image"&&(this.source!==u.source||JSON.stringify(this.coordinates)!==JSON.stringify(u.coordinates))},v.needsNewSource=function(u){return this.sourceType!==u.sourcetype||JSON.stringify(this.source)!==JSON.stringify(u.source)||this.layerType!==u.type},v.needsNewLayer=function(u){return this.layerType!==u.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},v.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},v.updateImage=function(u){var i=this.subplot.map;i.getSource(this.idSource).updateImage({url:u.source,coordinates:u.coordinates});var f=this.findFollowingMapboxLayerId(this.lookupBelow());f!==null&&this.subplot.map.moveLayer(this.idLayer,f)},v.updateSource=function(u){var i=this.subplot.map;if(i.getSource(this.idSource)&&i.removeSource(this.idSource),this.sourceType=u.sourcetype,this.source=u.source,!!y(u)){var f=n(u);i.addSource(this.idSource,f)}},v.findFollowingMapboxLayerId=function(u){if(u==="traces")for(var i=this.subplot.getMapLayers(),f=0;f<i.length;f++){var g=i[f].id;if(typeof g=="string"&&g.indexOf(_.traceLayerPrefix)===0){u=g;break}}return u},v.updateLayer=function(u){var i=this.subplot,f=r(u),g=this.lookupBelow(),h=this.findFollowingMapboxLayerId(g);this.removeLayer(),y(u)&&i.addLayer({id:this.idLayer,source:this.idSource,"source-layer":u.sourcelayer||"",type:u.type,minzoom:u.minzoom,maxzoom:u.maxzoom,layout:f.layout,paint:f.paint},h),this.layerType=u.type,this.below=g},v.updateStyle=function(u){if(y(u)){var i=r(u);this.subplot.setOptions(this.idLayer,"setLayoutProperty",i.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",i.paint)}},v.removeLayer=function(){var u=this.subplot.map;u.getLayer(this.idLayer)&&u.removeLayer(this.idLayer)},v.dispose=function(){var u=this.subplot.map;u.getLayer(this.idLayer)&&u.removeLayer(this.idLayer),u.getSource(this.idSource)&&u.removeSource(this.idSource)};function y(u){if(!u.visible)return!1;var i=u.source;if(Array.isArray(i)&&i.length>0){for(var f=0;f<i.length;f++)if(typeof i[f]!="string"||i[f].length===0)return!1;return!0}return d.isPlainObject(i)||typeof i=="string"&&i.length>0}function r(u){var i={},f={};switch(u.type){case"circle":d.extendFlat(f,{"circle-radius":u.circle.radius,"circle-color":u.color,"circle-opacity":u.opacity});break;case"line":d.extendFlat(f,{"line-width":u.line.width,"line-color":u.color,"line-opacity":u.opacity,"line-dasharray":u.line.dash});break;case"fill":d.extendFlat(f,{"fill-color":u.color,"fill-outline-color":u.fill.outlinecolor,"fill-opacity":u.opacity});break;case"symbol":var g=u.symbol,h=a(g.textposition,g.iconsize);d.extendFlat(i,{"icon-image":g.icon+"-15","icon-size":g.iconsize/10,"text-field":g.text,"text-size":g.textfont.size,"text-anchor":h.anchor,"text-offset":h.offset,"symbol-placement":g.placement}),d.extendFlat(f,{"icon-color":u.color,"text-color":g.textfont.color,"text-opacity":u.opacity});break;case"raster":d.extendFlat(f,{"raster-fade-duration":0,"raster-opacity":u.opacity});break}return{layout:i,paint:f}}function n(u){var i=u.sourcetype,f=u.source,g={type:i},h;return i==="geojson"?h="data":i==="vector"?h=typeof f=="string"?"url":"tiles":i==="raster"?(h="tiles",g.tileSize=256):i==="image"&&(h="url",g.coordinates=u.coordinates),g[h]=f,u.sourceattribution&&(g.attribution=P(u.sourceattribution)),g}z.exports=function(i,f,g){var h=new x(i,f);return h.update(g),h}},23585:function(z,B,e){var d=e(71828),P=e(7901).defaultLine,a=e(27670).Y,_=e(41940),x=e(82196).textposition,v=e(30962).overrideAll,y=e(44467).templatedArray,r=e(77734),n=_({});n.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var u=z.exports=v({_arrayAttrRegexps:[d.counterRegex("mapbox",".layers",!0)],domain:a({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:r.styleValuesMapbox.concat(r.styleValuesNonMapbox),dflt:r.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:y("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:P},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:P}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:n,textposition:d.extendFlat({},x,{arrayOk:!1})}})},"plot","from-root");u.uirevision={valType:"any",editType:"none"}},77882:function(z,B,e){var d=e(71828),P=e(49119),a=e(85501),_=e(23585);z.exports=function(r,n,u){P(r,n,u,{type:"mapbox",attributes:_,handleDefaults:x,partition:"y",accessToken:n._mapboxAccessToken})};function x(y,r,n,u){n("accesstoken",u.accessToken),n("style"),n("center.lon"),n("center.lat"),n("zoom"),n("bearing"),n("pitch");var i=n("bounds.west"),f=n("bounds.east"),g=n("bounds.south"),h=n("bounds.north");(i===void 0||f===void 0||g===void 0||h===void 0)&&delete r.bounds,a(y,r,{name:"layers",handleItemDefaults:v}),r._input=y}function v(y,r){function n(b,p){return d.coerce(y,r,_.layers,b,p)}var u=n("visible");if(u){var i=n("sourcetype"),f=i==="raster"||i==="image";n("source"),n("sourceattribution"),i==="vector"&&n("sourcelayer"),i==="image"&&n("coordinates");var g;f&&(g="raster");var h=n("type",g);f&&h!=="raster"&&(h=r.type="raster",d.log("Source types *raster* and *image* must drawn *raster* layer type.")),n("below"),n("color"),n("opacity"),n("minzoom"),n("maxzoom"),h==="circle"&&n("circle.radius"),h==="line"&&(n("line.width"),n("line.dash")),h==="fill"&&n("fill.outlinecolor"),h==="symbol"&&(n("symbol.icon"),n("symbol.iconsize"),n("symbol.text"),d.coerceFont(n,"symbol.textfont"),n("symbol.textposition"),n("symbol.placement"))}}},10481:function(z,B,e){var d=e(44517),P=e(71828),a=e(41327),_=e(73972),x=e(89298),v=e(28569),y=e(30211),r=e(64505),n=r.drawMode,u=r.selectMode,i=e(47322).prepSelect,f=e(47322).clearOutline,g=e(47322).clearSelectionsCache,h=e(47322).selectOnClick,b=e(77734),p=e(67911);function E(D,A){this.id=A,this.gd=D;var C=D._fullLayout,S=D._context;this.container=C._glcontainer.node(),this.isStatic=S.staticPlot,this.uid=C._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(C),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var c=E.prototype;c.plot=function(D,A,C){var S=this,o=A[S.id];S.map&&o.accesstoken!==S.accessToken&&(S.map.remove(),S.map=null,S.styleObj=null,S.traceHash={},S.layerList=[]);var R;S.map?R=new Promise(function(T,O){S.updateMap(D,A,T,O)}):R=new Promise(function(T,O){S.createMap(D,A,T,O)}),C.push(R)},c.createMap=function(D,A,C,S){var o=this,R=A[o.id],T=o.styleObj=m(R.style);o.accessToken=R.accesstoken;var O=R.bounds,N=O?[[O.west,O.south],[O.east,O.north]]:null,H=o.map=new d.Map({container:o.div,style:T.style,center:L(R.center),zoom:R.zoom,bearing:R.bearing,pitch:R.pitch,maxBounds:N,interactive:!o.isStatic,preserveDrawingBuffer:o.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new d.AttributionControl({compact:!0}));H._canvas.style.left="0px",H._canvas.style.top="0px",o.rejectOnError(S),o.isStatic||o.initFx(D,A);var k=[];k.push(new Promise(function(V){H.once("load",V)})),k=k.concat(a.fetchTraceGeoData(D)),Promise.all(k).then(function(){o.fillBelowLookup(D,A),o.updateData(D),o.updateLayout(A),o.resolveOnRender(C)}).catch(S)},c.updateMap=function(D,A,C,S){var o=this,R=o.map,T=A[this.id];o.rejectOnError(S);var O=[],N=m(T.style);JSON.stringify(o.styleObj)!==JSON.stringify(N)&&(o.styleObj=N,R.setStyle(N.style),o.traceHash={},O.push(new Promise(function(H){R.once("styledata",H)}))),O=O.concat(a.fetchTraceGeoData(D)),Promise.all(O).then(function(){o.fillBelowLookup(D,A),o.updateData(D),o.updateLayout(A),o.resolveOnRender(C)}).catch(S)},c.fillBelowLookup=function(D,A){var C=A[this.id],S=C.layers,o,R,T=this.belowLookup={},O=!1;for(o=0;o<D.length;o++){var N=D[o][0].trace,H=N._module;typeof N.below=="string"?R=N.below:H.getBelow&&(R=H.getBelow(N,this)),R===""&&(O=!0),T["trace-"+N.uid]=R||""}for(o=0;o<S.length;o++){var k=S[o];typeof k.below=="string"?R=k.below:O?R="traces":R="",T["layout-"+o]=R}var V={},G,U;for(G in T)R=T[G],V[R]?V[R].push(G):V[R]=[G];for(R in V){var Y=V[R];if(Y.length>1)for(o=0;o<Y.length;o++)G=Y[o],G.indexOf("trace-")===0?(U=G.split("trace-")[1],this.traceHash[U]&&(this.traceHash[U].below=null)):G.indexOf("layout-")===0&&(U=G.split("layout-")[1],this.layerList[U]&&(this.layerList[U].below=null))}};var l={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};c.updateData=function(D){var A=this.traceHash,C,S,o,R,T=D.slice().sort(function(V,G){return l[V[0].trace.type]-l[G[0].trace.type]});for(o=0;o<T.length;o++){var O=T[o];S=O[0].trace,C=A[S.uid];var N=!1;C&&(C.type===S.type?(C.update(O),N=!0):C.dispose()),!N&&S._module&&(A[S.uid]=S._module.plot(this,O))}var H=Object.keys(A);e:for(o=0;o<H.length;o++){var k=H[o];for(R=0;R<D.length;R++)if(S=D[R][0].trace,k===S.uid)continue e;C=A[k],C.dispose(),delete A[k]}},c.updateLayout=function(D){var A=this.map,C=D[this.id];!this.dragging&&!this.wheeling&&(A.setCenter(L(C.center)),A.setZoom(C.zoom),A.setBearing(C.bearing),A.setPitch(C.pitch)),this.updateLayers(D),this.updateFramework(D),this.updateFx(D),this.map.resize(),this.gd._context._scrollZoom.mapbox?A.scrollZoom.enable():A.scrollZoom.disable()},c.resolveOnRender=function(D){var A=this.map;A.on("render",function C(){A.loaded()&&(A.off("render",C),setTimeout(D,10))})},c.rejectOnError=function(D){var A=this.map;function C(){D(new Error(b.mapOnErrorMsg))}A.once("error",C),A.once("style.error",C),A.once("source.error",C),A.once("tile.error",C),A.once("layer.error",C)},c.createFramework=function(D){var A=this,C=A.div=document.createElement("div");C.id=A.uid,C.style.position="absolute",A.container.appendChild(C),A.xaxis={_id:"x",c2p:function(S){return A.project(S).x}},A.yaxis={_id:"y",c2p:function(S){return A.project(S).y}},A.updateFramework(D),A.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},x.setConvert(A.mockAxis,D)},c.initFx=function(D,A){var C=this,S=C.gd,o=C.map;o.on("moveend",function(O){if(C.map){var N=S._fullLayout;if(O.originalEvent||C.wheeling){var H=N[C.id];_.call("_storeDirectGUIEdit",S.layout,N._preGUI,C.getViewEdits(H));var k=C.getView();H._input.center=H.center=k.center,H._input.zoom=H.zoom=k.zoom,H._input.bearing=H.bearing=k.bearing,H._input.pitch=H.pitch=k.pitch,S.emit("plotly_relayout",C.getViewEditsWithDerived(k))}O.originalEvent&&O.originalEvent.type==="mouseup"?C.dragging=!1:C.wheeling&&(C.wheeling=!1),N._rehover&&N._rehover()}}),o.on("wheel",function(){C.wheeling=!0}),o.on("mousemove",function(O){var N=C.div.getBoundingClientRect(),H=[O.originalEvent.offsetX,O.originalEvent.offsetY];O.target.getBoundingClientRect=function(){return N},C.xaxis.p2c=function(){return o.unproject(H).lng},C.yaxis.p2c=function(){return o.unproject(H).lat},S._fullLayout._rehover=function(){S._fullLayout._hoversubplot===C.id&&S._fullLayout[C.id]&&y.hover(S,O,C.id)},y.hover(S,O,C.id),S._fullLayout._hoversubplot=C.id});function R(){y.loneUnhover(A._hoverlayer)}o.on("dragstart",function(){C.dragging=!0,R()}),o.on("zoomstart",R),o.on("mouseout",function(){S._fullLayout._hoversubplot=null});function T(){var O=C.getView();S.emit("plotly_relayouting",C.getViewEditsWithDerived(O))}o.on("drag",T),o.on("zoom",T),o.on("dblclick",function(){var O=S._fullLayout[C.id];_.call("_storeDirectGUIEdit",S.layout,S._fullLayout._preGUI,C.getViewEdits(O));var N=C.viewInitial;o.setCenter(L(N.center)),o.setZoom(N.zoom),o.setBearing(N.bearing),o.setPitch(N.pitch);var H=C.getView();O._input.center=O.center=H.center,O._input.zoom=O.zoom=H.zoom,O._input.bearing=O.bearing=H.bearing,O._input.pitch=O.pitch=H.pitch,S.emit("plotly_doubleclick",null),S.emit("plotly_relayout",C.getViewEditsWithDerived(H))}),C.clearOutline=function(){g(C.dragOptions),f(C.dragOptions.gd)},C.onClickInPanFn=function(O){return function(N){var H=S._fullLayout.clickmode;H.indexOf("select")>-1&&h(N.originalEvent,S,[C.xaxis],[C.yaxis],C.id,O),H.indexOf("event")>-1&&y.click(S,N.originalEvent)}}},c.updateFx=function(D){var A=this,C=A.map,S=A.gd;if(A.isStatic)return;function o(N){var H=A.map.unproject(N);return[H.lng,H.lat]}var R=D.dragmode,T;T=function(N,H){if(H.isRect){var k=N.range={};k[A.id]=[o([H.xmin,H.ymin]),o([H.xmax,H.ymax])]}else{var V=N.lassoPoints={};V[A.id]=H.map(o)}};var O=A.dragOptions;A.dragOptions=P.extendDeep(O||{},{dragmode:D.dragmode,element:A.div,gd:S,plotinfo:{id:A.id,domain:D[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis,fillRangeItems:T},xaxes:[A.xaxis],yaxes:[A.yaxis],subplot:A.id}),C.off("click",A.onClickInPanHandler),u(R)||n(R)?(C.dragPan.disable(),C.on("zoomstart",A.clearOutline),A.dragOptions.prepFn=function(N,H,k){i(N,H,k,A.dragOptions,R)},v.init(A.dragOptions)):(C.dragPan.enable(),C.off("zoomstart",A.clearOutline),A.div.onmousedown=null,A.div.ontouchstart=null,A.div.removeEventListener("touchstart",A.div._ontouchstart),A.onClickInPanHandler=A.onClickInPanFn(A.dragOptions),C.on("click",A.onClickInPanHandler))},c.updateFramework=function(D){var A=D[this.id].domain,C=D._size,S=this.div.style;S.width=C.w*(A.x[1]-A.x[0])+"px",S.height=C.h*(A.y[1]-A.y[0])+"px",S.left=C.l+A.x[0]*C.w+"px",S.top=C.t+(1-A.y[1])*C.h+"px",this.xaxis._offset=C.l+A.x[0]*C.w,this.xaxis._length=C.w*(A.x[1]-A.x[0]),this.yaxis._offset=C.t+(1-A.y[1])*C.h,this.yaxis._length=C.h*(A.y[1]-A.y[0])},c.updateLayers=function(D){var A=D[this.id],C=A.layers,S=this.layerList,o;if(C.length!==S.length){for(o=0;o<S.length;o++)S[o].dispose();for(S=this.layerList=[],o=0;o<C.length;o++)S.push(p(this,o,C[o]))}else for(o=0;o<C.length;o++)S[o].update(C[o])},c.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},c.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},c.setOptions=function(D,A,C){for(var S in C)this.map[A](D,S,C[S])},c.getMapLayers=function(){return this.map.getStyle().layers},c.addLayer=function(D,A){var C=this.map;if(typeof A=="string"){if(A===""){C.addLayer(D,A);return}for(var S=this.getMapLayers(),o=0;o<S.length;o++)if(A===S[o].id){C.addLayer(D,A);return}P.warn(["Trying to add layer with *below* value",A,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}C.addLayer(D)},c.project=function(D){return this.map.project(new d.LngLat(D[0],D[1]))},c.getView=function(){var D=this.map,A=D.getCenter(),C=A.lng,S=A.lat,o={lon:C,lat:S},R=D.getCanvas(),T=parseInt(R.style.width),O=parseInt(R.style.height);return{center:o,zoom:D.getZoom(),bearing:D.getBearing(),pitch:D.getPitch(),_derived:{coordinates:[D.unproject([0,0]).toArray(),D.unproject([T,0]).toArray(),D.unproject([T,O]).toArray(),D.unproject([0,O]).toArray()]}}},c.getViewEdits=function(D){for(var A=this.id,C=["center","zoom","bearing","pitch"],S={},o=0;o<C.length;o++){var R=C[o];S[A+"."+R]=D[R]}return S},c.getViewEditsWithDerived=function(D){var A=this.id,C=this.getViewEdits(D);return C[A+"._derived"]=D._derived,C};function m(D){var A={};return P.isPlainObject(D)?(A.id=D.id,A.style=D):typeof D=="string"?(A.id=D,b.styleValuesMapbox.indexOf(D)!==-1?A.style=M(D):b.stylesNonMapbox[D]?A.style=b.stylesNonMapbox[D]:A.style=D):(A.id=b.styleValueDflt,A.style=M(b.styleValueDflt)),A.transition={duration:0,delay:0},A}function M(D){return b.styleUrlPrefix+D+"-"+b.styleUrlSuffix}function L(D){return[D.lon,D.lat]}z.exports=E},35025:function(z){z.exports=function(B){var e=B.editType;return{t:{valType:"number",dflt:0,editType:e},r:{valType:"number",dflt:0,editType:e},b:{valType:"number",dflt:0,editType:e},l:{valType:"number",dflt:0,editType:e},editType:e}}},74875:function(z,B,e){var d=e(39898),P=e(84096).Dq,a=e(60721).FF,_=e(92770),x=e(73972),v=e(86281),y=e(44467),r=e(71828),n=e(7901),u=e(50606).BADNUM,i=e(41675),f=e(51873).clearOutline,g=e(21479),h=e(85594),b=e(31391),p=e(27659).a0,E=r.relinkPrivateKeys,c=r._,l=z.exports={};r.extendFlat(l,x),l.attributes=e(9012),l.attributes.type.values=l.allTypes,l.fontAttrs=e(41940),l.layoutAttributes=e(10820),l.fontWeight="normal";var m=l.transformsRegistry,M=e(31137);l.executeAPICommand=M.executeAPICommand,l.computeAPICommandBindings=M.computeAPICommandBindings,l.manageCommandObserver=M.manageCommandObserver,l.hasSimpleAPICommandBindings=M.hasSimpleAPICommandBindings,l.redrawText=function(Z){return Z=r.getGraphDiv(Z),new Promise(function(Q){setTimeout(function(){Z._fullLayout&&(x.getComponentMethod("annotations","draw")(Z),x.getComponentMethod("legend","draw")(Z),x.getComponentMethod("colorbar","draw")(Z),Q(l.previousPromises(Z)))},300)})},l.resize=function(Z){Z=r.getGraphDiv(Z);var Q,ue=new Promise(function(fe,te){(!Z||r.isHidden(Z))&&te(new Error("Resize must be passed a displayed plot div element.")),Z._redrawTimer&&clearTimeout(Z._redrawTimer),Z._resolveResize&&(Q=Z._resolveResize),Z._resolveResize=fe,Z._redrawTimer=setTimeout(function(){if(!Z.layout||Z.layout.width&&Z.layout.height||r.isHidden(Z)){fe(Z);return}delete Z.layout.width,delete Z.layout.height;var ne=Z.changed;Z.autoplay=!0,x.call("relayout",Z,{autosize:!0}).then(function(){Z.changed=ne,Z._resolveResize===fe&&(delete Z._resolveResize,fe(Z))})},100)});return Q&&Q(ue),ue},l.previousPromises=function(Z){if((Z._promises||[]).length)return Promise.all(Z._promises).then(function(){Z._promises=[]})},l.addLinks=function(Z){if(!(!Z._context.showLink&&!Z._context.showSources)){var Q=Z._fullLayout,ue=r.ensureSingle(Q._paper,"text","js-plot-link-container",function(xe){xe.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:n.defaultLine,"pointer-events":"all"}).each(function(){var Se=d.select(this);Se.append("tspan").classed("js-link-to-tool",!0),Se.append("tspan").classed("js-link-spacer",!0),Se.append("tspan").classed("js-sourcelinks",!0)})}),fe=ue.node(),te={y:Q._paper.attr("height")-9};document.body.contains(fe)&&fe.getComputedTextLength()>=Q.width-20?(te["text-anchor"]="start",te.x=5):(te["text-anchor"]="end",te.x=Q._paper.attr("width")-7),ue.attr(te);var ne=ue.select(".js-link-to-tool"),ve=ue.select(".js-link-spacer"),le=ue.select(".js-sourcelinks");Z._context.showSources&&Z._context.showSources(Z),Z._context.showLink&&L(Z,ne),ve.text(ne.text()&&le.text()?" - ":"")}};function L(Z,Q){Q.text("");var ue=Q.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(Z._context.linkText+" "+String.fromCharCode(187));if(Z._context.sendData)ue.on("click",function(){l.sendDataToCloud(Z)});else{var fe=window.location.pathname.split("/"),te=window.location.search;ue.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+fe[2].split(".")[0]+"/"+fe[1]+te})}}l.sendDataToCloud=function(Z){var Q=(window.PLOTLYENV||{}).BASE_URL||Z._context.plotlyServerURL;if(Q){Z.emit("plotly_beforeexport");var ue=d.select(Z).append("div").attr("id","hiddenform").style("display","none"),fe=ue.append("form").attr({action:Q+"/external",method:"post",target:"_blank"}),te=fe.append("input").attr({type:"text",name:"data"});return te.node().value=l.graphJson(Z,!1,"keepdata"),fe.node().submit(),ue.remove(),Z.emit("plotly_afterexport"),!1}};var D=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],A=["year","month","dayMonth","dayMonthYear"];l.supplyDefaults=function(Z,Q){var ue=Q&&Q.skipUpdateCalc,fe=Z._fullLayout||{};if(fe._skipDefaults){delete fe._skipDefaults;return}var te=Z._fullLayout={},ne=Z.layout||{},ve=Z._fullData||[],le=Z._fullData=[],xe=Z.data||[],Se=Z.calcdata||[],Re=Z._context||{},Ee;Z._transitionData||l.createTransitionData(Z),te._dfltTitle={plot:c(Z,"Click to enter Plot title"),x:c(Z,"Click to enter X axis title"),y:c(Z,"Click to enter Y axis title"),colorbar:c(Z,"Click to enter Colorscale title"),annotation:c(Z,"new text")},te._traceWord=c(Z,"trace");var Oe=o(Z,D);if(te._mapboxAccessToken=Re.mapboxAccessToken,fe._initialAutoSizeIsDone){var Be=fe.width,Le=fe.height;l.supplyLayoutGlobalDefaults(ne,te,Oe),ne.width||(te.width=Be),ne.height||(te.height=Le),l.sanitizeMargins(te)}else{l.supplyLayoutGlobalDefaults(ne,te,Oe);var Te=!ne.width||!ne.height,De=te.autosize,Ve=Re.autosizable,Ye=Te&&(De||Ve);Ye?l.plotAutoSize(Z,ne,te):Te&&l.sanitizeMargins(te),!De&&Te&&(ne.width=te.width,ne.height=te.height)}te._d3locale=R(Oe,te.separators),te._extraFormat=o(Z,A),te._initialAutoSizeIsDone=!0,te._dataLength=xe.length,te._modules=[],te._visibleModules=[],te._basePlotModules=[];var Ne=te._subplots=S(),Xe=te._splomAxes={x:{},y:{}},ht=te._splomSubplots={};te._splomGridDflt={},te._scatterStackOpts={},te._firstScatter={},te._alignmentOpts={},te._colorAxes={},te._requestRangeslider={},te._traceUids=C(ve,xe),te._globalTransforms=(Z._context||{}).globalTransforms,l.supplyDataDefaults(xe,le,ne,te);var st=Object.keys(Xe.x),it=Object.keys(Xe.y);if(st.length>1&&it.length>1){for(x.getComponentMethod("grid","sizeDefaults")(ne,te),Ee=0;Ee<st.length;Ee++)r.pushUnique(Ne.xaxis,st[Ee]);for(Ee=0;Ee<it.length;Ee++)r.pushUnique(Ne.yaxis,it[Ee]);for(var nt in ht)r.pushUnique(Ne.cartesian,nt)}if(te._has=l._hasPlotType.bind(te),ve.length===le.length)for(Ee=0;Ee<le.length;Ee++)E(le[Ee],ve[Ee]);l.supplyLayoutModuleDefaults(ne,te,le,Z._transitionData);var pt=te._visibleModules,Tt=[];for(Ee=0;Ee<pt.length;Ee++){var Et=pt[Ee].crossTraceDefaults;Et&&r.pushUnique(Tt,Et)}for(Ee=0;Ee<Tt.length;Ee++)Tt[Ee](le,te);te._hasOnlyLargeSploms=te._basePlotModules.length===1&&te._basePlotModules[0].name==="splom"&&st.length>15&&it.length>15&&te.shapes.length===0&&te.images.length===0,l.linkSubplots(le,te,ve,fe),l.cleanPlot(le,te,ve,fe);var Dt=!!(fe._has&&fe._has("gl2d")),et=!!(te._has&&te._has("gl2d")),Ue=!!(fe._has&&fe._has("cartesian")),ze=!!(te._has&&te._has("cartesian")),rt=Ue||Dt,lt=ze||et;rt&&!lt?fe._bgLayer.remove():lt&&!rt&&(te._shouldCreateBgLayer=!0),fe._zoomlayer&&!Z._dragging&&f({_fullLayout:fe}),T(le,te),E(te,fe),x.getComponentMethod("colorscale","crossTraceDefaults")(le,te),te._preGUI||(te._preGUI={}),te._tracePreGUI||(te._tracePreGUI={});var Qe=te._tracePreGUI,Fe={},Ce;for(Ce in Qe)Fe[Ce]="old";for(Ee=0;Ee<le.length;Ee++)Ce=le[Ee]._fullInput.uid,Fe[Ce]||(Qe[Ce]={}),Fe[Ce]="new";for(Ce in Fe)Fe[Ce]==="old"&&delete Qe[Ce];V(te),x.getComponentMethod("rangeslider","makeData")(te),!ue&&Se.length===le.length&&l.supplyDefaultsUpdateCalc(Se,le)},l.supplyDefaultsUpdateCalc=function(Z,Q){for(var ue=0;ue<Q.length;ue++){var fe=Q[ue],te=(Z[ue]||[])[0];if(te&&te.trace){var ne=te.trace;if(ne._hasCalcTransform){var ve=ne._arrayAttrs,le,xe,Se;for(le=0;le<ve.length;le++)xe=ve[le],Se=r.nestedProperty(ne,xe).get().slice(),r.nestedProperty(fe,xe).set(Se)}te.trace=fe}}};function C(Z,Q){var ue=Q.length,fe=[],te,ne;for(te=0;te<Z.length;te++){var ve=Z[te]._fullInput;ve!==ne&&fe.push(ve),ne=ve}var le=fe.length,xe=new Array(ue),Se={};function Re(Be,Le){xe[Le]=Be,Se[Be]=1}function Ee(Be,Le){if(Be&&typeof Be=="string"&&!Se[Be])return Re(Be,Le),!0}for(te=0;te<ue;te++){var Oe=Q[te].uid;typeof Oe=="number"&&(Oe=String(Oe)),!Ee(Oe,te)&&(te<le&&Ee(fe[te].uid,te)||Re(r.randstr(Se),te))}return xe}function S(){var Z=x.collectableSubplotTypes,Q={},ue,fe;if(!Z){Z=[];var te=x.subplotsRegistry;for(var ne in te){var ve=te[ne],le=ve.attr;if(le&&(Z.push(ne),Array.isArray(le)))for(fe=0;fe<le.length;fe++)r.pushUnique(Z,le[fe])}}for(ue=0;ue<Z.length;ue++)Q[Z[ue]]=[];return Q}function o(Z,Q){var ue=Z._context.locale;ue||(ue="en-US");var fe=!1,te={};function ne(Ee){for(var Oe=!0,Be=0;Be<Q.length;Be++){var Le=Q[Be];te[Le]||(Ee[Le]?te[Le]=Ee[Le]:Oe=!1)}Oe&&(fe=!0)}for(var ve=0;ve<2;ve++){for(var le=Z._context.locales,xe=0;xe<2;xe++){var Se=(le[ue]||{}).format;if(Se&&(ne(Se),fe))break;le=x.localeRegistry}var Re=ue.split("-")[0];if(fe||Re===ue)break;ue=Re}return fe||ne(x.localeRegistry.en.format),te}function R(Z,Q){return Z.decimal=Q.charAt(0),Z.thousands=Q.charAt(1),{numberFormat:function(ue){try{ue=a(Z).format(r.adjustFormat(ue))}catch{return r.warnBadFormat(ue),r.noFormat}return ue},timeFormat:P(Z).utcFormat}}function T(Z,Q){var ue,fe=[];Q.meta&&(ue=Q._meta={meta:Q.meta,layout:{meta:Q.meta}});for(var te=0;te<Z.length;te++){var ne=Z[te];ne.meta?fe[ne.index]=ne._meta={meta:ne.meta}:Q.meta&&(ne._meta={meta:Q.meta}),Q.meta&&(ne._meta.layout={meta:Q.meta})}fe.length&&(ue||(ue=Q._meta={}),ue.data=fe)}l.createTransitionData=function(Z){Z._transitionData||(Z._transitionData={}),Z._transitionData._frames||(Z._transitionData._frames=[]),Z._transitionData._frameHash||(Z._transitionData._frameHash={}),Z._transitionData._counter||(Z._transitionData._counter=0),Z._transitionData._interruptCallbacks||(Z._transitionData._interruptCallbacks=[])},l._hasPlotType=function(Z){var Q,ue=this._basePlotModules||[];for(Q=0;Q<ue.length;Q++)if(ue[Q].name===Z)return!0;var fe=this._modules||[];for(Q=0;Q<fe.length;Q++){var te=fe[Q].name;if(te===Z)return!0;var ne=x.modules[te];if(ne&&ne.categories[Z])return!0}return!1},l.cleanPlot=function(Z,Q,ue,fe){var te,ne,ve=fe._basePlotModules||[];for(te=0;te<ve.length;te++){var le=ve[te];le.clean&&le.clean(Z,Q,ue,fe)}var xe=fe._has&&fe._has("gl"),Se=Q._has&&Q._has("gl");xe&&!Se&&fe._glcontainer!==void 0&&(fe._glcontainer.selectAll(".gl-canvas").remove(),fe._glcontainer.selectAll(".no-webgl").remove(),fe._glcanvas=null);var Re=!!fe._infolayer;e:for(te=0;te<ue.length;te++){var Ee=ue[te],Oe=Ee.uid;for(ne=0;ne<Z.length;ne++){var Be=Z[ne];if(Oe===Be.uid)continue e}Re&&fe._infolayer.select(".cb"+Oe).remove()}},l.linkSubplots=function(Z,Q,ue,fe){var te,ne,ve=fe._plots||{},le=Q._plots={},xe=Q._subplots,Se={_fullData:Z,_fullLayout:Q},Re=xe.cartesian.concat(xe.gl2d||[]);for(te=0;te<Re.length;te++){var Ee=Re[te],Oe=ve[Ee],Be=i.getFromId(Se,Ee,"x"),Le=i.getFromId(Se,Ee,"y"),Te;for(Oe?Te=le[Ee]=Oe:(Te=le[Ee]={},Te.id=Ee),Be._counterAxes.push(Le._id),Le._counterAxes.push(Be._id),Be._subplotsWith.push(Ee),Le._subplotsWith.push(Ee),Te.xaxis=Be,Te.yaxis=Le,Te._hasClipOnAxisFalse=!1,ne=0;ne<Z.length;ne++){var De=Z[ne];if(De.xaxis===Te.xaxis._id&&De.yaxis===Te.yaxis._id&&De.cliponaxis===!1){Te._hasClipOnAxisFalse=!0;break}}}var Ve=i.list(Se,null,!0),Ye;for(te=0;te<Ve.length;te++){Ye=Ve[te];var Ne=null;Ye.overlaying&&(Ne=i.getFromId(Se,Ye.overlaying),Ne&&Ne.overlaying&&(Ye.overlaying=!1,Ne=null)),Ye._mainAxis=Ne||Ye,Ne&&(Ye.domain=Ne.domain.slice()),Ye._anchorAxis=Ye.anchor==="free"?null:i.getFromId(Se,Ye.anchor)}for(te=0;te<Ve.length;te++)if(Ye=Ve[te],Ye._counterAxes.sort(i.idSort),Ye._subplotsWith.sort(r.subplotSort),Ye._mainSubplot=O(Ye,Q),Ye._counterAxes.length&&(Ye.spikemode&&Ye.spikemode.indexOf("across")!==-1||Ye.automargin&&Ye.mirror&&Ye.anchor!=="free"||x.getComponentMethod("rangeslider","isVisible")(Ye))){var Xe=1,ht=0;for(ne=0;ne<Ye._counterAxes.length;ne++){var st=i.getFromId(Se,Ye._counterAxes[ne]);Xe=Math.min(Xe,st.domain[0]),ht=Math.max(ht,st.domain[1])}Xe<ht&&(Ye._counterDomainMin=Xe,Ye._counterDomainMax=ht)}};function O(Z,Q){var ue={_fullLayout:Q},fe=Z._id.charAt(0)==="x",te=Z._mainAxis._anchorAxis,ne="",ve="",le="";if(te&&(le=te._mainAxis._id,ne=fe?Z._id+le:le+Z._id),!ne||!Q._plots[ne]){ne="";for(var xe=Z._counterAxes,Se=0;Se<xe.length;Se++){var Re=xe[Se],Ee=fe?Z._id+Re:Re+Z._id;ve||(ve=Ee);var Oe=i.getFromId(ue,Re);if(le&&Oe.overlaying===le){ne=Ee;break}}}return ne||ve}l.clearExpandedTraceDefaultColors=function(Z){var Q,ue,fe;function te(ve,le,xe,Se){ue[Se]=le,ue.length=Se+1,ve.valType==="color"&&ve.dflt===void 0&&Q.push(ue.join("."))}for(ue=[],Q=Z._module._colorAttrs,Q||(Z._module._colorAttrs=Q=[],v.crawl(Z._module.attributes,te)),fe=0;fe<Q.length;fe++){var ne=r.nestedProperty(Z,"_input."+Q[fe]);ne.get()||r.nestedProperty(Z,Q[fe]).set(null)}},l.supplyDataDefaults=function(Z,Q,ue,fe){var te=fe._modules,ne=fe._visibleModules,ve=fe._basePlotModules,le=0,xe=0,Se,Re,Ee;fe._transformModules=[];function Oe(it){Q.push(it);var nt=it._module;nt&&(r.pushUnique(te,nt),it.visible===!0&&r.pushUnique(ne,nt),r.pushUnique(ve,it._module.basePlotModule),le++,it._input.visible!==!1&&xe++)}var Be={},Le=[],Te=(ue.template||{}).data||{},De=y.traceTemplater(Te);for(Se=0;Se<Z.length;Se++){if(Ee=Z[Se],Re=De.newTrace(Ee),Re.uid=fe._traceUids[Se],l.supplyTraceDefaults(Ee,Re,xe,fe,Se),Re.index=Se,Re._input=Ee,Re._expandedIndex=le,Re.transforms&&Re.transforms.length)for(var Ve=Ee.visible!==!1&&Re.visible===!1,Ye=H(Re,Q,ue,fe),Ne=0;Ne<Ye.length;Ne++){var Xe=Ye[Ne],ht={_template:Re._template,type:Re.type,uid:Re.uid+Ne};Ve&&Xe.visible===!1&&delete Xe.visible,l.supplyTraceDefaults(Xe,ht,le,fe,Se),E(ht,Xe),ht.index=Se,ht._input=Ee,ht._fullInput=Re,ht._expandedIndex=le,ht._expandedInput=Xe,Oe(ht)}else Re._fullInput=Re,Re._expandedInput=Re,Oe(Re);x.traceIs(Re,"carpetAxis")&&(Be[Re.carpet]=Re),x.traceIs(Re,"carpetDependent")&&Le.push(Se)}for(Se=0;Se<Le.length;Se++)if(Re=Q[Le[Se]],!!Re.visible){var st=Be[Re.carpet];if(Re._carpet=st,!st||!st.visible){Re.visible=!1;continue}Re.xaxis=st.xaxis,Re.yaxis=st.yaxis}},l.supplyAnimationDefaults=function(Z){Z=Z||{};var Q,ue={};function fe(te,ne){return r.coerce(Z||{},ue,h,te,ne)}if(fe("mode"),fe("direction"),fe("fromcurrent"),Array.isArray(Z.frame))for(ue.frame=[],Q=0;Q<Z.frame.length;Q++)ue.frame[Q]=l.supplyAnimationFrameDefaults(Z.frame[Q]||{});else ue.frame=l.supplyAnimationFrameDefaults(Z.frame||{});if(Array.isArray(Z.transition))for(ue.transition=[],Q=0;Q<Z.transition.length;Q++)ue.transition[Q]=l.supplyAnimationTransitionDefaults(Z.transition[Q]||{});else ue.transition=l.supplyAnimationTransitionDefaults(Z.transition||{});return ue},l.supplyAnimationFrameDefaults=function(Z){var Q={};function ue(fe,te){return r.coerce(Z||{},Q,h.frame,fe,te)}return ue("duration"),ue("redraw"),Q},l.supplyAnimationTransitionDefaults=function(Z){var Q={};function ue(fe,te){return r.coerce(Z||{},Q,h.transition,fe,te)}return ue("duration"),ue("easing"),Q},l.supplyFrameDefaults=function(Z){var Q={};function ue(fe,te){return r.coerce(Z,Q,b,fe,te)}return ue("group"),ue("name"),ue("traces"),ue("baseframe"),ue("data"),ue("layout"),Q},l.supplyTraceDefaults=function(Z,Q,ue,fe,te){var ne=fe.colorway||n.defaults,ve=ne[ue%ne.length],le;function xe(Ye,Ne){return r.coerce(Z,Q,l.attributes,Ye,Ne)}var Se=xe("visible");xe("type"),xe("name",fe._traceWord+" "+te),xe("uirevision",fe.uirevision);var Re=l.getModule(Q);if(Q._module=Re,Re){var Ee=Re.basePlotModule,Oe=Ee.attr,Be=Ee.attributes;if(Oe&&Be){var Le=fe._subplots,Te="";if(Se||Ee.name!=="gl2d"){if(Array.isArray(Oe))for(le=0;le<Oe.length;le++){var De=Oe[le],Ve=r.coerce(Z,Q,Be,De);Le[De]&&r.pushUnique(Le[De],Ve),Te+=Ve}else Te=r.coerce(Z,Q,Be,Oe);Le[Ee.name]&&r.pushUnique(Le[Ee.name],Te)}}}return Se&&(xe("customdata"),xe("ids"),xe("meta"),x.traceIs(Q,"showLegend")?(r.coerce(Z,Q,Re.attributes.showlegend?Re.attributes:l.attributes,"showlegend"),xe("legendwidth"),xe("legendgroup"),xe("legendgrouptitle.text"),xe("legendrank"),Q._dfltShowLegend=!0):Q._dfltShowLegend=!1,Re&&Re.supplyDefaults(Z,Q,ve,fe),x.traceIs(Q,"noOpacity")||xe("opacity"),x.traceIs(Q,"notLegendIsolatable")&&(Q.visible=!!Q.visible),x.traceIs(Q,"noHover")||(Q.hovertemplate||r.coerceHoverinfo(Z,Q,fe),Q.type!=="parcats"&&x.getComponentMethod("fx","supplyDefaults")(Z,Q,ve,fe)),Re&&Re.selectPoints&&xe("selectedpoints"),l.supplyTransformDefaults(Z,Q,fe)),Q};function N(Z){var Q=Z.transforms;if(Array.isArray(Q)&&Q.length)for(var ue=0;ue<Q.length;ue++){var fe=Q[ue],te=fe._module||m[fe.type];if(te&&te.makesData)return!0}return!1}l.hasMakesDataTransform=N,l.supplyTransformDefaults=function(Z,Q,ue){if(Q._length||N(Z)){var fe=ue._globalTransforms||[],te=ue._transformModules||[];if(!(!Array.isArray(Z.transforms)&&fe.length===0))for(var ne=Z.transforms||[],ve=fe.concat(ne),le=Q.transforms=[],xe=0;xe<ve.length;xe++){var Se=ve[xe],Re=Se.type,Ee=m[Re],Oe,Be=!(Se._module&&Se._module===Ee),Le=Ee&&typeof Ee.transform=="function";Ee||r.warn("Unrecognized transform type "+Re+"."),Ee&&Ee.supplyDefaults&&(Be||Le)?(Oe=Ee.supplyDefaults(Se,Q,ue,Z),Oe.type=Re,Oe._module=Ee,r.pushUnique(te,Ee)):Oe=r.extendFlat({},Se),le.push(Oe)}}};function H(Z,Q,ue,fe){for(var te=Z.transforms,ne=[Z],ve=0;ve<te.length;ve++){var le=te[ve],xe=m[le.type];xe&&xe.transform&&(ne=xe.transform(ne,{transform:le,fullTrace:Z,fullData:Q,layout:ue,fullLayout:fe,transformIndex:ve}))}return ne}l.supplyLayoutGlobalDefaults=function(Z,Q,ue){function fe(Se,Re){return r.coerce(Z,Q,l.layoutAttributes,Se,Re)}var te=Z.template;r.isPlainObject(te)&&(Q.template=te,Q._template=te.layout,Q._dataTemplate=te.data),fe("autotypenumbers");var ne=r.coerceFont(fe,"font"),ve=ne.size;r.coerceFont(fe,"title.font",r.extendFlat({},ne,{size:Math.round(ve*1.4)})),fe("title.text",Q._dfltTitle.plot),fe("title.xref"),fe("title.yref"),fe("title.x"),fe("title.y"),fe("title.xanchor"),fe("title.yanchor"),fe("title.pad.t"),fe("title.pad.r"),fe("title.pad.b"),fe("title.pad.l");var le=fe("uniformtext.mode");le&&fe("uniformtext.minsize"),fe("autosize",!(Z.width&&Z.height)),fe("width"),fe("height"),fe("minreducedwidth"),fe("minreducedheight"),fe("margin.l"),fe("margin.r"),fe("margin.t"),fe("margin.b"),fe("margin.pad"),fe("margin.autoexpand"),Z.width&&Z.height&&l.sanitizeMargins(Q),x.getComponentMethod("grid","sizeDefaults")(Z,Q),fe("paper_bgcolor"),fe("separators",ue.decimal+ue.thousands),fe("hidesources"),fe("colorway"),fe("datarevision");var xe=fe("uirevision");fe("editrevision",xe),fe("selectionrevision",xe),x.getComponentMethod("modebar","supplyLayoutDefaults")(Z,Q),x.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(Z,Q,fe),x.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(Z,Q,fe),fe("meta"),r.isPlainObject(Z.transition)&&(fe("transition.duration"),fe("transition.easing"),fe("transition.ordering")),x.getComponentMethod("calendars","handleDefaults")(Z,Q,"calendar"),x.getComponentMethod("fx","supplyLayoutGlobalDefaults")(Z,Q,fe),r.coerce(Z,Q,g,"scattermode")};function k(Z){return typeof Z=="string"&&Z.substr(Z.length-2)==="px"&&parseFloat(Z)}l.plotAutoSize=function(Q,ue,fe){var te=Q._context||{},ne=te.frameMargins,ve,le,xe=r.isPlotDiv(Q);if(xe&&Q.emit("plotly_autosize"),te.fillFrame)ve=window.innerWidth,le=window.innerHeight,document.body.style.overflow="hidden";else{var Se=xe?window.getComputedStyle(Q):{};if(ve=k(Se.width)||k(Se.maxWidth)||fe.width,le=k(Se.height)||k(Se.maxHeight)||fe.height,_(ne)&&ne>0){var Re=1-2*ne;ve=Math.round(Re*ve),le=Math.round(Re*le)}}var Ee=l.layoutAttributes.width.min,Oe=l.layoutAttributes.height.min;ve<Ee&&(ve=Ee),le<Oe&&(le=Oe);var Be=!ue.width&&Math.abs(fe.width-ve)>1,Le=!ue.height&&Math.abs(fe.height-le)>1;(Le||Be)&&(Be&&(fe.width=ve),Le&&(fe.height=le)),Q._initialAutoSize||(Q._initialAutoSize={width:ve,height:le}),l.sanitizeMargins(fe)},l.supplyLayoutModuleDefaults=function(Z,Q,ue,fe){var te=x.componentsRegistry,ne=Q._basePlotModules,ve,le,xe,Se=x.subplotsRegistry.cartesian;for(ve in te)xe=te[ve],xe.includeBasePlot&&xe.includeBasePlot(Z,Q);ne.length||ne.push(Se),Q._has("cartesian")&&(x.getComponentMethod("grid","contentDefaults")(Z,Q),Se.finalizeSubplots(Z,Q));for(var Re in Q._subplots)Q._subplots[Re].sort(r.subplotSort);for(le=0;le<ne.length;le++)xe=ne[le],xe.supplyLayoutDefaults&&xe.supplyLayoutDefaults(Z,Q,ue);var Ee=Q._modules;for(le=0;le<Ee.length;le++)xe=Ee[le],xe.supplyLayoutDefaults&&xe.supplyLayoutDefaults(Z,Q,ue);var Oe=Q._transformModules;for(le=0;le<Oe.length;le++)xe=Oe[le],xe.supplyLayoutDefaults&&xe.supplyLayoutDefaults(Z,Q,ue,fe);for(ve in te)xe=te[ve],xe.supplyLayoutDefaults&&xe.supplyLayoutDefaults(Z,Q,ue)},l.purge=function(Z){var Q=Z._fullLayout||{};Q._glcontainer!==void 0&&(Q._glcontainer.selectAll(".gl-canvas").remove(),Q._glcontainer.remove(),Q._glcanvas=null),Q._modeBar&&Q._modeBar.destroy(),Z._transitionData&&(Z._transitionData._interruptCallbacks&&(Z._transitionData._interruptCallbacks.length=0),Z._transitionData._animationRaf&&window.cancelAnimationFrame(Z._transitionData._animationRaf)),r.clearThrottle(),r.clearResponsive(Z),delete Z.data,delete Z.layout,delete Z._fullData,delete Z._fullLayout,delete Z.calcdata,delete Z.empty,delete Z.fid,delete Z.undoqueue,delete Z.undonum,delete Z.autoplay,delete Z.changed,delete Z._promises,delete Z._redrawTimer,delete Z._hmlumcount,delete Z._hmpixcount,delete Z._transitionData,delete Z._transitioning,delete Z._initialAutoSize,delete Z._transitioningWithDuration,delete Z._dragging,delete Z._dragged,delete Z._dragdata,delete Z._hoverdata,delete Z._snapshotInProgress,delete Z._editing,delete Z._mouseDownTime,delete Z._legendMouseDownTime,Z.removeAllListeners&&Z.removeAllListeners()},l.style=function(Z){var Q=Z._fullLayout._visibleModules,ue=[],fe;for(fe=0;fe<Q.length;fe++){var te=Q[fe];te.style&&r.pushUnique(ue,te.style)}for(fe=0;fe<ue.length;fe++)ue[fe](Z)},l.sanitizeMargins=function(Z){if(!(!Z||!Z.margin)){var Q=Z.width,ue=Z.height,fe=Z.margin,te=Q-(fe.l+fe.r),ne=ue-(fe.t+fe.b),ve;te<0&&(ve=(Q-1)/(fe.l+fe.r),fe.l=Math.floor(ve*fe.l),fe.r=Math.floor(ve*fe.r)),ne<0&&(ve=(ue-1)/(fe.t+fe.b),fe.t=Math.floor(ve*fe.t),fe.b=Math.floor(ve*fe.b))}},l.clearAutoMarginIds=function(Z){Z._fullLayout._pushmarginIds={}},l.allowAutoMargin=function(Z,Q){Z._fullLayout._pushmarginIds[Q]=1};function V(Z){var Q=Z.margin;if(!Z._size){var ue=Z._size={l:Math.round(Q.l),r:Math.round(Q.r),t:Math.round(Q.t),b:Math.round(Q.b),p:Math.round(Q.pad)};ue.w=Math.round(Z.width)-ue.l-ue.r,ue.h=Math.round(Z.height)-ue.t-ue.b}Z._pushmargin||(Z._pushmargin={}),Z._pushmarginIds||(Z._pushmarginIds={})}var G=2,U=2;l.autoMargin=function(Z,Q,ue){var fe=Z._fullLayout,te=fe.width,ne=fe.height,ve=fe.margin,le=fe.minreducedwidth,xe=fe.minreducedheight,Se=r.constrain(te-ve.l-ve.r,G,le),Re=r.constrain(ne-ve.t-ve.b,U,xe),Ee=Math.max(0,te-Se),Oe=Math.max(0,ne-Re),Be=fe._pushmargin,Le=fe._pushmarginIds;if(ve.autoexpand!==!1){if(!ue)delete Be[Q],delete Le[Q];else{var Te=ue.pad;if(Te===void 0&&(Te=Math.min(12,ve.l,ve.r,ve.t,ve.b)),Ee){var De=(ue.l+ue.r)/Ee;De>1&&(ue.l/=De,ue.r/=De)}if(Oe){var Ve=(ue.t+ue.b)/Oe;Ve>1&&(ue.t/=Ve,ue.b/=Ve)}var Ye=ue.xl!==void 0?ue.xl:ue.x,Ne=ue.xr!==void 0?ue.xr:ue.x,Xe=ue.yt!==void 0?ue.yt:ue.y,ht=ue.yb!==void 0?ue.yb:ue.y;Be[Q]={l:{val:Ye,size:ue.l+Te},r:{val:Ne,size:ue.r+Te},b:{val:ht,size:ue.b+Te},t:{val:Xe,size:ue.t+Te}},Le[Q]=1}if(!fe._replotting)return l.doAutoMargin(Z)}};function Y(Z){if("_redrawFromAutoMarginCount"in Z._fullLayout)return!1;var Q=i.list(Z,"",!0);for(var ue in Q)if(Q[ue].autoshift||Q[ue].shift)return!0;return!1}l.doAutoMargin=function(Z){var Q=Z._fullLayout,ue=Q.width,fe=Q.height;Q._size||(Q._size={}),V(Q);var te=Q._size,ne=Q.margin,ve=r.extendFlat({},te),le=ne.l,xe=ne.r,Se=ne.t,Re=ne.b,Ee=Q._pushmargin,Oe=Q._pushmarginIds,Be=Q.minreducedwidth,Le=Q.minreducedheight;if(Q.margin.autoexpand!==!1){for(var Te in Ee)Oe[Te]||delete Ee[Te];Ee.base={l:{val:0,size:le},r:{val:1,size:xe},t:{val:1,size:Se},b:{val:0,size:Re}};for(var De in Ee){var Ve=Ee[De].l||{},Ye=Ee[De].b||{},Ne=Ve.val,Xe=Ve.size,ht=Ye.val,st=Ye.size;for(var it in Ee){if(_(Xe)&&Ee[it].r){var nt=Ee[it].r.val,pt=Ee[it].r.size;if(nt>Ne){var Tt=(Xe*nt+(pt-ue)*Ne)/(nt-Ne),Et=(pt*(1-Ne)+(Xe-ue)*(1-nt))/(nt-Ne);Tt+Et>le+xe&&(le=Tt,xe=Et)}}if(_(st)&&Ee[it].t){var Dt=Ee[it].t.val,et=Ee[it].t.size;if(Dt>ht){var Ue=(st*Dt+(et-fe)*ht)/(Dt-ht),ze=(et*(1-ht)+(st-fe)*(1-Dt))/(Dt-ht);Ue+ze>Re+Se&&(Re=Ue,Se=ze)}}}}}var rt=r.constrain(ue-ne.l-ne.r,G,Be),lt=r.constrain(fe-ne.t-ne.b,U,Le),Qe=Math.max(0,ue-rt),Fe=Math.max(0,fe-lt);if(Qe){var Ce=(le+xe)/Qe;Ce>1&&(le/=Ce,xe/=Ce)}if(Fe){var pe=(Re+Se)/Fe;pe>1&&(Re/=pe,Se/=pe)}if(te.l=Math.round(le),te.r=Math.round(xe),te.t=Math.round(Se),te.b=Math.round(Re),te.p=Math.round(ne.pad),te.w=Math.round(ue)-te.l-te.r,te.h=Math.round(fe)-te.t-te.b,!Q._replotting&&(l.didMarginChange(ve,te)||Y(Z))){"_redrawFromAutoMarginCount"in Q?Q._redrawFromAutoMarginCount++:Q._redrawFromAutoMarginCount=1;var we=3*(1+Object.keys(Oe).length);if(Q._redrawFromAutoMarginCount<we)return x.call("_doPlot",Z);Q._size=ve,r.warn("Too many auto-margin redraws.")}ee(Z)};function ee(Z){var Q=i.list(Z,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(ue){for(var fe=0;fe<Q.length;fe++){var te=Q[fe][ue];te&&te()}})}var re=["l","r","t","b","p","w","h"];l.didMarginChange=function(Z,Q){for(var ue=0;ue<re.length;ue++){var fe=re[ue],te=Z[fe],ne=Q[fe];if(!_(te)||Math.abs(ne-te)>1)return!0}return!1},l.graphJson=function(Z,Q,ue,fe,te,ne){(te&&Q&&!Z._fullData||te&&!Q&&!Z._fullLayout)&&l.supplyDefaults(Z);var ve=te?Z._fullData:Z.data,le=te?Z._fullLayout:Z.layout,xe=(Z._transitionData||{})._frames;function Se(Oe,Be){if(typeof Oe=="function")return Be?"_function_":null;if(r.isPlainObject(Oe)){var Le={},Te;return Object.keys(Oe).sort().forEach(function(De){if(["_","["].indexOf(De.charAt(0))===-1){if(typeof Oe[De]=="function"){Be&&(Le[De]="_function");return}if(ue==="keepdata"){if(De.substr(De.length-3)==="src")return}else if(ue==="keepstream"){if(Te=Oe[De+"src"],typeof Te=="string"&&Te.indexOf(":")>0&&!r.isPlainObject(Oe.stream))return}else if(ue!=="keepall"&&(Te=Oe[De+"src"],typeof Te=="string"&&Te.indexOf(":")>0))return;Le[De]=Se(Oe[De],Be)}}),Le}return Array.isArray(Oe)?Oe.map(function(De){return Se(De,Be)}):r.isTypedArray(Oe)?r.simpleMap(Oe,r.identity):r.isJSDate(Oe)?r.ms2DateTimeLocal(+Oe):Oe}var Re={data:(ve||[]).map(function(Oe){var Be=Se(Oe);return Q&&delete Be.fit,Be})};if(!Q&&(Re.layout=Se(le),te)){var Ee=le._size;Re.layout.computed={margin:{b:Ee.b,l:Ee.l,r:Ee.r,t:Ee.t}}}return xe&&(Re.frames=Se(xe)),ne&&(Re.config=Se(Z._context,!0)),fe==="object"?Re:JSON.stringify(Re)},l.modifyFrames=function(Z,Q){var ue,fe,te,ne=Z._transitionData._frames,ve=Z._transitionData._frameHash;for(ue=0;ue<Q.length;ue++)switch(fe=Q[ue],fe.type){case"replace":te=fe.value;var le=(ne[fe.index]||{}).name,xe=te.name;ne[fe.index]=ve[xe]=te,xe!==le&&(delete ve[le],ve[xe]=te);break;case"insert":te=fe.value,ve[te.name]=te,ne.splice(fe.index,0,te);break;case"delete":te=ne[fe.index],delete ve[te.name],ne.splice(fe.index,1);break}return Promise.resolve()},l.computeFrame=function(Z,Q){var ue=Z._transitionData._frameHash,fe,te,ne,ve;if(!Q)throw new Error("computeFrame must be given a string frame name");var le=ue[Q.toString()];if(!le)return!1;for(var xe=[le],Se=[le.name];le.baseframe&&(le=ue[le.baseframe.toString()])&&Se.indexOf(le.name)===-1;)xe.push(le),Se.push(le.name);for(var Re={};le=xe.pop();)if(le.layout&&(Re.layout=l.extendLayout(Re.layout,le.layout)),le.data){if(Re.data||(Re.data=[]),te=le.traces,!te)for(te=[],fe=0;fe<le.data.length;fe++)te[fe]=fe;for(Re.traces||(Re.traces=[]),fe=0;fe<le.data.length;fe++)ne=te[fe],ne!=null&&(ve=Re.traces.indexOf(ne),ve===-1&&(ve=Re.data.length,Re.traces[ve]=ne),Re.data[ve]=l.extendTrace(Re.data[ve],le.data[fe]))}return Re},l.recomputeFrameHash=function(Z){for(var Q=Z._transitionData._frameHash={},ue=Z._transitionData._frames,fe=0;fe<ue.length;fe++){var te=ue[fe];te&&te.name&&(Q[te.name]=te)}},l.extendObjectWithContainers=function(Z,Q,ue){var fe,te,ne,ve,le,xe,Se,Re,Ee=r.extendDeepNoArrays({},Q||{}),Oe=r.expandObjectPaths(Ee),Be={};if(ue&&ue.length)for(ne=0;ne<ue.length;ne++)fe=r.nestedProperty(Oe,ue[ne]),te=fe.get(),te===void 0?r.nestedProperty(Be,ue[ne]).set(null):(fe.set(null),r.nestedProperty(Be,ue[ne]).set(te));if(Z=r.extendDeepNoArrays(Z||{},Oe),ue&&ue.length){for(ne=0;ne<ue.length;ne++)if(le=r.nestedProperty(Be,ue[ne]),Se=le.get(),!!Se){for(xe=r.nestedProperty(Z,ue[ne]),Re=xe.get(),Array.isArray(Re)||(Re=[],xe.set(Re)),ve=0;ve<Se.length;ve++){var Le=Se[ve];Le===null?Re[ve]=null:Re[ve]=l.extendObjectWithContainers(Re[ve],Le)}xe.set(Re)}}return Z},l.dataArrayContainers=["transforms","dimensions"],l.layoutArrayContainers=x.layoutArrayContainers,l.extendTrace=function(Z,Q){return l.extendObjectWithContainers(Z,Q,l.dataArrayContainers)},l.extendLayout=function(Z,Q){return l.extendObjectWithContainers(Z,Q,l.layoutArrayContainers)},l.transition=function(Z,Q,ue,fe,te,ne){var ve={redraw:te.redraw},le={},xe=[];return ve.prepareFn=function(){for(var Se=Array.isArray(Q)?Q.length:0,Re=fe.slice(0,Se),Ee=0;Ee<Re.length;Ee++){var Oe=Re[Ee],Be=Z._fullData[Oe],Le=Be._module;if(Le){if(Le.animatable){var Te=Le.basePlotModule.name;le[Te]||(le[Te]=[]),le[Te].push(Oe)}Z.data[Re[Ee]]=l.extendTrace(Z.data[Re[Ee]],Q[Ee])}}var De=r.expandObjectPaths(r.extendDeepNoArrays({},ue)),Ve=/^[xy]axis[0-9]*$/;for(var Ye in De)Ve.test(Ye)&&delete De[Ye].range;l.extendLayout(Z.layout,De),delete Z.calcdata,l.supplyDefaults(Z),l.doCalcdata(Z);var Ne=r.expandObjectPaths(ue);if(Ne){var Xe=Z._fullLayout._plots;for(var ht in Xe){var st=Xe[ht],it=st.xaxis,nt=st.yaxis,pt=it.range.slice(),Tt=nt.range.slice(),Et=null,Dt=null,et=null,Ue=null;Array.isArray(Ne[it._name+".range"])?Et=Ne[it._name+".range"].slice():Array.isArray((Ne[it._name]||{}).range)&&(Et=Ne[it._name].range.slice()),Array.isArray(Ne[nt._name+".range"])?Dt=Ne[nt._name+".range"].slice():Array.isArray((Ne[nt._name]||{}).range)&&(Dt=Ne[nt._name].range.slice()),pt&&Et&&(it.r2l(pt[0])!==it.r2l(Et[0])||it.r2l(pt[1])!==it.r2l(Et[1]))&&(et={xr0:pt,xr1:Et}),Tt&&Dt&&(nt.r2l(Tt[0])!==nt.r2l(Dt[0])||nt.r2l(Tt[1])!==nt.r2l(Dt[1]))&&(Ue={yr0:Tt,yr1:Dt}),(et||Ue)&&xe.push(r.extendFlat({plotinfo:st},et,Ue))}}return Promise.resolve()},ve.runFn=function(Se){var Re,Ee=Z._fullLayout._basePlotModules,Oe=xe.length,Be;if(ue)for(Be=0;Be<Ee.length;Be++)Ee[Be].transitionAxes&&Ee[Be].transitionAxes(Z,xe,ne,Se);Oe?(Re=r.extendFlat({},ne),Re.duration=0,delete le.cartesian):Re=ne;for(var Le in le){var Te=le[Le],De=Z._fullData[Te[0]]._module;De.basePlotModule.plot(Z,Te,Re,Se)}},ie(Z,ne,ve)},l.transitionFromReact=function(Z,Q,ue,fe){var te=Z._fullLayout,ne=te.transition,ve={},le=[];return ve.prepareFn=function(){var xe=te._plots;ve.redraw=!1,Q.anim==="some"&&(ve.redraw=!0),ue.anim==="some"&&(ve.redraw=!0);for(var Se in xe){var Re=xe[Se],Ee=Re.xaxis,Oe=Re.yaxis,Be=fe[Ee._name].range.slice(),Le=fe[Oe._name].range.slice(),Te=Ee.range.slice(),De=Oe.range.slice();Ee.setScale(),Oe.setScale();var Ve=null,Ye=null;(Ee.r2l(Be[0])!==Ee.r2l(Te[0])||Ee.r2l(Be[1])!==Ee.r2l(Te[1]))&&(Ve={xr0:Be,xr1:Te}),(Oe.r2l(Le[0])!==Oe.r2l(De[0])||Oe.r2l(Le[1])!==Oe.r2l(De[1]))&&(Ye={yr0:Le,yr1:De}),(Ve||Ye)&&le.push(r.extendFlat({plotinfo:Re},Ve,Ye))}return Promise.resolve()},ve.runFn=function(xe){for(var Se=Z._fullData,Re=Z._fullLayout,Ee=Re._basePlotModules,Oe,Be,Le,Te=[],De=0;De<Se.length;De++)Te.push(De);function Ve(){if(Z._fullLayout)for(var Ne=0;Ne<Ee.length;Ne++)Ee[Ne].transitionAxes&&Ee[Ne].transitionAxes(Z,le,Oe,xe)}function Ye(){if(Z._fullLayout)for(var Ne=0;Ne<Ee.length;Ne++)Ee[Ne].plot(Z,Le,Be,xe)}le.length&&Q.anim?ne.ordering==="traces first"?(Oe=r.extendFlat({},ne,{duration:0}),Le=Te,Be=ne,setTimeout(Ve,ne.duration),Ye()):(Oe=ne,Le=null,Be=r.extendFlat({},ne,{duration:0}),setTimeout(Ye,Oe.duration),Ve()):le.length?(Oe=ne,Ve()):Q.anim&&(Le=Te,Be=ne,Ye())},ie(Z,ne,ve)};function ie(Z,Q,ue){var fe=!1;function te(Ee){var Oe=Promise.resolve();if(!Ee)return Oe;for(;Ee.length;)Oe=Oe.then(Ee.shift());return Oe}function ne(Ee){if(Ee)for(;Ee.length;)Ee.shift()}function ve(){return Z.emit("plotly_transitioning",[]),new Promise(function(Ee){Z._transitioning=!0,Q.duration>0&&(Z._transitioningWithDuration=!0),Z._transitionData._interruptCallbacks.push(function(){fe=!0}),ue.redraw&&Z._transitionData._interruptCallbacks.push(function(){return x.call("redraw",Z)}),Z._transitionData._interruptCallbacks.push(function(){Z.emit("plotly_transitioninterrupted",[])});var Oe=0,Be=0;function Le(){return Oe++,function(){Be++,!fe&&Be===Oe&&le(Ee)}}ue.runFn(Le),setTimeout(Le())})}function le(Ee){if(Z._transitionData)return ne(Z._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(ue.redraw)return x.call("redraw",Z)}).then(function(){Z._transitioning=!1,Z._transitioningWithDuration=!1,Z.emit("plotly_transitioned",[])}).then(Ee)}function xe(){if(Z._transitionData)return Z._transitioning=!1,te(Z._transitionData._interruptCallbacks)}var Se=[l.previousPromises,xe,ue.prepareFn,l.rehover,l.reselect,ve],Re=r.syncOrAsync(Se,Z);return(!Re||!Re.then)&&(Re=Promise.resolve()),Re.then(function(){return Z})}l.doCalcdata=function(Z,Q){var ue=i.list(Z),fe=Z._fullData,te=Z._fullLayout,ne,ve,le,xe,Se=new Array(fe.length),Re=(Z.calcdata||[]).slice();for(Z.calcdata=Se,te._numBoxes=0,te._numViolins=0,te._violinScaleGroupStats={},Z._hmpixcount=0,Z._hmlumcount=0,te._piecolormap={},te._sunburstcolormap={},te._treemapcolormap={},te._iciclecolormap={},te._funnelareacolormap={},le=0;le<fe.length;le++)if(Array.isArray(Q)&&Q.indexOf(le)===-1){Se[le]=Re[le];continue}for(le=0;le<fe.length;le++)ne=fe[le],ne._arrayAttrs=v.findArrayAttributes(ne),ne._extremes={};var Ee=te._subplots.polar||[];for(le=0;le<Ee.length;le++)ue.push(te[Ee[le]].radialaxis,te[Ee[le]].angularaxis);for(var Oe in te._colorAxes){var Be=te[Oe];Be.cauto!==!1&&(delete Be.cmin,delete Be.cmax)}var Le=!1;function Te(Ye){if(ne=fe[Ye],ve=ne._module,ne.visible===!0&&ne.transforms){if(ve&&ve.calc){var Ne=ve.calc(Z,ne);Ne[0]&&Ne[0].t&&Ne[0].t._scene&&delete Ne[0].t._scene.dirty}for(xe=0;xe<ne.transforms.length;xe++){var Xe=ne.transforms[xe];ve=m[Xe.type],ve&&ve.calcTransform&&(ne._hasCalcTransform=!0,Le=!0,ve.calcTransform(Z,ne,Xe))}}}function De(Ye,Ne){if(ne=fe[Ye],ve=ne._module,!!ve.isContainer===Ne){var Xe=[];if(ne.visible===!0&&ne._length!==0){delete ne._indexToPoints;var ht=ne.transforms||[];for(xe=ht.length-1;xe>=0;xe--)if(ht[xe].enabled){ne._indexToPoints=ht[xe]._indexToPoints;break}ve&&ve.calc&&(Xe=ve.calc(Z,ne))}(!Array.isArray(Xe)||!Xe[0])&&(Xe=[{x:u,y:u}]),Xe[0].t||(Xe[0].t={}),Xe[0].trace=ne,Se[Ye]=Xe}}for(q(ue,fe,te),le=0;le<fe.length;le++)De(le,!0);for(le=0;le<fe.length;le++)Te(le);for(Le&&q(ue,fe,te),le=0;le<fe.length;le++)De(le,!0);for(le=0;le<fe.length;le++)De(le,!1);j(Z);var Ve=ce(ue,Z);if(Ve.length){for(te._numBoxes=0,te._numViolins=0,le=0;le<Ve.length;le++)De(Ve[le],!0);for(le=0;le<Ve.length;le++)De(Ve[le],!1);j(Z)}x.getComponentMethod("fx","calc")(Z),x.getComponentMethod("errorbars","calc")(Z)};var se=/(total|sum|min|max|mean|median) (ascending|descending)/;function ce(Z,Q){var ue=[],fe,te,ne,ve,le;function xe(rt,lt,Qe){var Fe=lt._id.charAt(0);if(rt==="histogram2dcontour"){var Ce=lt._counterAxes[0],pe=i.getFromId(Q,Ce),we=Fe==="x"||Ce==="x"&&pe.type==="category",Ae=Fe==="y"||Ce==="y"&&pe.type==="category";return function(Pe,Ge){return Pe===0||Ge===0||we&&Pe===Qe[Ge].length-1||Ae&&Ge===Qe.length-1?-1:(Fe==="y"?Ge:Pe)-1}}else return function(Pe,Ge){return Fe==="y"?Ge:Pe}}var Se={min:function(rt){return r.aggNums(Math.min,null,rt)},max:function(rt){return r.aggNums(Math.max,null,rt)},sum:function(rt){return r.aggNums(function(lt,Qe){return lt+Qe},null,rt)},total:function(rt){return r.aggNums(function(lt,Qe){return lt+Qe},null,rt)},mean:function(rt){return r.mean(rt)},median:function(rt){return r.median(rt)}};for(fe=0;fe<Z.length;fe++){var Re=Z[fe];if(Re.type==="category"){var Ee=Re.categoryorder.match(se);if(Ee){var Oe=Ee[1],Be=Ee[2],Le=Re._id.charAt(0),Te=Le==="x",De=[];for(te=0;te<Re._categories.length;te++)De.push([Re._categories[te],[]]);for(te=0;te<Re._traceIndices.length;te++){var Ve=Re._traceIndices[te],Ye=Q._fullData[Ve];if(Ye.visible===!0){var Ne=Ye.type;x.traceIs(Ye,"histogram")&&(delete Ye._xautoBinFinished,delete Ye._yautoBinFinished);var Xe=Ne==="splom",ht=Ne==="scattergl",st=Q.calcdata[Ve];for(ne=0;ne<st.length;ne++){var it=st[ne],nt,pt;if(Xe){var Tt=Ye._axesDim[Re._id];if(!Te){var Et=Ye._diag[Tt][0];Et&&(Re=Q._fullLayout[i.id2name(Et)])}var Dt=it.trace.dimensions[Tt].values;for(ve=0;ve<Dt.length;ve++)for(nt=Re._categoriesMap[Dt[ve]],le=0;le<it.trace.dimensions.length;le++)if(le!==Tt){var et=it.trace.dimensions[le];De[nt][1].push(et.values[ve])}}else if(ht){for(ve=0;ve<it.t.x.length;ve++)Te?(nt=it.t.x[ve],pt=it.t.y[ve]):(nt=it.t.y[ve],pt=it.t.x[ve]),De[nt][1].push(pt);it.t&&it.t._scene&&delete it.t._scene.dirty}else if(it.hasOwnProperty("z")){pt=it.z;var Ue=xe(Ye.type,Re,pt);for(ve=0;ve<pt.length;ve++)for(le=0;le<pt[ve].length;le++)nt=Ue(le,ve),nt+1&&De[nt][1].push(pt[ve][le])}else for(nt=it.p,nt===void 0&&(nt=it[Le]),pt=it.s,pt===void 0&&(pt=it.v),pt===void 0&&(pt=Te?it.y:it.x),Array.isArray(pt)||(pt===void 0?pt=[]:pt=[pt]),ve=0;ve<pt.length;ve++)De[nt][1].push(pt[ve])}}}Re._categoriesValue=De;var ze=[];for(te=0;te<De.length;te++)ze.push([De[te][0],Se[Oe](De[te][1])]);ze.sort(function(rt,lt){return rt[1]-lt[1]}),Re._categoriesAggregatedValue=ze,Re._initialCategories=ze.map(function(rt){return rt[0]}),Be==="descending"&&Re._initialCategories.reverse(),ue=ue.concat(Re.sortByInitialCategories())}}}return ue}function q(Z,Q,ue){var fe={};function te(xe){xe.clearCalc(),xe.type==="multicategory"&&xe.setupMultiCategory(Q),fe[xe._id]=1}r.simpleMap(Z,te);for(var ne=ue._axisMatchGroups||[],ve=0;ve<ne.length;ve++)for(var le in ne[ve])fe[le]||te(ue[i.id2name(le)])}function j(Z){var Q=Z._fullLayout,ue=Q._visibleModules,fe={},te,ne,ve;for(ne=0;ne<ue.length;ne++){var le=ue[ne],xe=le.crossTraceCalc;if(xe){var Se=le.basePlotModule.name;fe[Se]?r.pushUnique(fe[Se],xe):fe[Se]=[xe]}}for(ve in fe){var Re=fe[ve],Ee=Q._subplots[ve];if(Array.isArray(Ee))for(te=0;te<Ee.length;te++){var Oe=Ee[te],Be=ve==="cartesian"?Q._plots[Oe]:Q[Oe];for(ne=0;ne<Re.length;ne++)Re[ne](Z,Be,Oe)}else for(ne=0;ne<Re.length;ne++)Re[ne](Z)}}l.rehover=function(Z){Z._fullLayout._rehover&&Z._fullLayout._rehover()},l.redrag=function(Z){Z._fullLayout._redrag&&Z._fullLayout._redrag()},l.reselect=function(Z){var Q=Z._fullLayout,ue=(Z.layout||{}).selections,fe=Q._previousSelections;Q._previousSelections=ue;var te=Q._reselect||JSON.stringify(ue)!==JSON.stringify(fe);x.getComponentMethod("selections","reselect")(Z,te)},l.generalUpdatePerTraceModule=function(Z,Q,ue,fe){var te=Q.traceHash,ne={},ve;for(ve=0;ve<ue.length;ve++){var le=ue[ve],xe=le[0].trace;xe.visible&&(ne[xe.type]=ne[xe.type]||[],ne[xe.type].push(le))}for(var Se in te)if(!ne[Se]){var Re=te[Se][0],Ee=Re[0].trace;Ee.visible=!1,ne[Se]=[Re]}for(var Oe in ne){var Be=ne[Oe],Le=Be[0][0].trace._module;Le.plot(Z,Q,r.filterVisible(Be),fe)}Q.traceHash=ne},l.plotBasePlot=function(Z,Q,ue,fe,te){var ne=x.getModule(Z),ve=p(Q.calcdata,ne)[0];ne.plot(Q,ve,fe,te)},l.cleanBasePlot=function(Z,Q,ue,fe,te){var ne=te._has&&te._has(Z),ve=ue._has&&ue._has(Z);ne&&!ve&&te["_"+Z+"layer"].selectAll("g.trace").remove()}},9813:function(z){z.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}},10869:function(z,B,e){var d=e(71828),P=e(61082).tester,a=d.findIndexOfMin,_=d.isAngleInsideSector,x=d.angleDelta,v=d.angleDist;function y(l,m,M,L,D){if(!_(m,L))return!1;var A,C;M[0]<M[1]?(A=M[0],C=M[1]):(A=M[1],C=M[0]);var S=P(f(A,L[0],L[1],D)),o=P(f(C,L[0],L[1],D)),R=[l*Math.cos(m),l*Math.sin(m)];return o.contains(R)&&!S.contains(R)}function r(l,m,M,L){var D,A,C=L[0],S=L[1],o=b(Math.sin(m)-Math.sin(l)),R=b(Math.cos(m)-Math.cos(l)),T=Math.tan(M),O=b(1/T),N=o/R,H=S-N*C;return O?o&&R?(D=H/(T-N),A=T*D):R?(D=S*O,A=S):(D=C,A=C*T):o&&R?(D=0,A=H):R?(D=0,A=S):D=A=NaN,[D,A]}function n(l,m,M,L){var D=-m*M,A=m*m+1,C=2*(m*D-M),S=D*D+M*M-l*l,o=Math.sqrt(C*C-4*A*S),R=(-C+o)/(2*A),T=(-C-o)/(2*A);return[[R,m*R+D+L],[T,m*T+D+L]]}function u(l,m){var M=m.length,L=new Array(M+1),D;for(D=0;D<M;D++){var A=m[D];L[D]=[l*Math.cos(A),l*Math.sin(A)]}return L[D]=L[0].slice(),L}function i(l,m,M,L){var D=L.length,A=[],C,S;function o(U){return[l*Math.cos(U),l*Math.sin(U)]}function R(U,Y,ee){return r(U,Y,ee,o(U))}function T(U){return d.mod(U,D)}function O(U){return _(U,[m,M])}var N=a(L,function(U){return O(U)?v(U,m):1/0}),H=R(L[N],L[T(N-1)],m);for(A.push(H),C=N,S=0;S<D;C++,S++){var k=L[T(C)];if(!O(k))break;A.push(o(k))}var V=a(L,function(U){return O(U)?v(U,M):1/0}),G=R(L[V],L[T(V+1)],M);return A.push(G),A.push([0,0]),A.push(A[0].slice()),A}function f(l,m,M,L){return d.isFullCircle([m,M])?u(l,L):i(l,m,M,L)}function g(l,m,M,L){for(var D=1/0,A=1/0,C=f(l,m,M,L),S=0;S<C.length;S++){var o=C[S];D=Math.min(D,o[0]),A=Math.min(A,-o[1])}return[D,A]}function h(l,m){var M=function(A){var C=x(A,l);return C>0?C:1/0},L=a(m,M),D=d.mod(L+1,m.length);return[m[L],m[D]]}function b(l){return Math.abs(l)>1e-10?l:0}function p(l,m,M){m=m||0,M=M||0;for(var L=l.length,D=new Array(L),A=0;A<L;A++){var C=l[A];D[A]=[m+C[0],M-C[1]]}return D}function E(l,m,M,L,D,A){var C=f(l,m,M,L);return"M"+p(C,D,A).join("L")}function c(l,m,M,L,D,A,C){var S,o;l<m?(S=l,o=m):(S=m,o=l);var R=p(f(S,M,L,D),A,C),T=p(f(o,M,L,D),A,C);return"M"+T.reverse().join("L")+"M"+R.join("L")}z.exports={isPtInsidePolygon:y,findPolygonOffset:g,findEnclosingVertexAngles:h,findIntersectionXY:r,findXYatLength:n,clampTiny:b,pathPolygon:E,pathPolygonAnnulus:c}},23580:function(z,B,e){var d=e(27659).AU,P=e(71828).counterRegex,a=e(77997),_=e(9813),x=_.attr,v=_.name,y=P(v),r={};r[x]={valType:"subplotid",dflt:v,editType:"calc"};function n(i){for(var f=i._fullLayout,g=i.calcdata,h=f._subplots[v],b=0;b<h.length;b++){var p=h[b],E=d(g,v,p),c=f[p]._subplot;c||(c=a(i,p),f[p]._subplot=c),c.plot(E,f,i._promises)}}function u(i,f,g,h){for(var b=h._subplots[v]||[],p=h._has&&h._has("gl"),E=f._has&&f._has("gl"),c=p&&!E,l=0;l<b.length;l++){var m=b[l],M=h[m]._subplot;if(!f[m]&&M){M.framework.remove(),M.layers["radial-axis-title"].remove();for(var L in M.clipPaths)M.clipPaths[L].remove()}c&&M._scene&&(M._scene.destroy(),M._scene=null)}}z.exports={attr:x,name:v,idRoot:v,idRegex:y,attrRegex:y,attributes:r,layoutAttributes:e(73812),supplyLayoutDefaults:e(68993),plot:n,clean:u,toSVG:e(93612).toSVG}},73812:function(z,B,e){var d=e(22399),P=e(13838),a=e(27670).Y,_=e(71828).extendFlat,x=e(30962).overrideAll,v=x({color:P.color,showline:_({},P.showline,{dflt:!0}),linecolor:P.linecolor,linewidth:P.linewidth,showgrid:_({},P.showgrid,{dflt:!0}),gridcolor:P.gridcolor,gridwidth:P.gridwidth,griddash:P.griddash},"plot","from-root"),y=x({tickmode:P.minor.tickmode,nticks:P.nticks,tick0:P.tick0,dtick:P.dtick,tickvals:P.tickvals,ticktext:P.ticktext,ticks:P.ticks,ticklen:P.ticklen,tickwidth:P.tickwidth,tickcolor:P.tickcolor,ticklabelstep:P.ticklabelstep,showticklabels:P.showticklabels,showtickprefix:P.showtickprefix,tickprefix:P.tickprefix,showticksuffix:P.showticksuffix,ticksuffix:P.ticksuffix,showexponent:P.showexponent,exponentformat:P.exponentformat,minexponent:P.minexponent,separatethousands:P.separatethousands,tickfont:P.tickfont,tickangle:P.tickangle,tickformat:P.tickformat,tickformatstops:P.tickformatstops,layer:P.layer},"plot","from-root"),r={visible:_({},P.visible,{dflt:!0}),type:_({},P.type,{values:["-","linear","log","date","category"]}),autotypenumbers:P.autotypenumbers,autorange:_({},P.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},range:_({},P.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:P.categoryorder,categoryarray:P.categoryarray,angle:{valType:"angle",editType:"plot"},side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:_({},P.title.text,{editType:"plot",dflt:""}),font:_({},P.title.font,{editType:"plot"}),editType:"plot"},hoverformat:P.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc",_deprecated:{title:P._deprecated.title,titlefont:P._deprecated.titlefont}};_(r,v,y);var n={visible:_({},P.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:P.autotypenumbers,categoryorder:P.categoryorder,categoryarray:P.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:P.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};_(n,v,y),z.exports={domain:a({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:d.background},radialaxis:r,angularaxis:n,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}},68993:function(z,B,e){var d=e(71828),P=e(7901),a=e(44467),_=e(49119),x=e(27659).NG,v=e(26218),y=e(38701),r=e(96115),n=e(89426),u=e(15258),i=e(92128),f=e(4322),g=e(73812),h=e(12101),b=e(9813),p=b.axisNames;function E(l,m,M,L){var D=M("bgcolor");L.bgColor=P.combine(D,L.paper_bgcolor);var A=M("sector");M("hole");var C=x(L.fullData,b.name,L.id),S=L.layoutOut,o;function R(q,j){return M(o+"."+q,j)}for(var T=0;T<p.length;T++){o=p[T],d.isPlainObject(l[o])||(l[o]={});var O=l[o],N=a.newContainer(m,o);N._id=N._name=o,N._attr=L.id+"."+o,N._traceIndices=C.map(function(q){return q._expandedIndex});var H=b.axisName2dataArray[o],k=c(O,N,R,C,H,L);u(O,N,R,{axData:C,dataAttr:H});var V=R("visible");switch(h(N,m,S),R("uirevision",m.uirevision),N._m=1,o){case"radialaxis":var G=R("autorange",!N.isValidRange(O.range));O.autorange=G,G&&(k==="linear"||k==="-")&&R("rangemode"),G==="reversed"&&(N._m=-1),R("range"),N.cleanRange("range",{dfltRange:[0,1]});break;case"angularaxis":if(k==="date"){d.log("Polar plots do not support date angular axes yet.");for(var U=0;U<C.length;U++)C[U].visible=!1;k=O.type=N.type="linear"}R(k==="linear"?"thetaunit":"period");var Y=R("direction");R("rotation",{counterclockwise:0,clockwise:90}[Y]);break}if(n(O,N,R,N.type,{tickSuffixDflt:N.thetaunit==="degrees"?"°":void 0}),V){var ee,re,ie,se,ce=L.font||{};ee=R("color"),re=ee===O.color?ee:ce.color,ie=ce.size,se=ce.family,v(O,N,R,N.type),r(O,N,R,N.type,{font:{color:re,size:ie,family:se}}),y(O,N,R,{outerTicks:!0}),i(O,N,R,{dfltColor:ee,bgColor:L.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:g[o]}),R("layer"),o==="radialaxis"&&(R("side"),R("angle",A[0]),R("title.text"),d.coerceFont(R,"title.font",{color:re,size:d.bigFont(ie),family:se}))}k!=="category"&&R("hoverformat"),N._input=O}m.angularaxis.type==="category"&&M("gridshape")}function c(l,m,M,L,D,A){var C=M("autotypenumbers",A.autotypenumbersDflt),S=M("type");if(S==="-"){for(var o,R=0;R<L.length;R++)if(L[R].visible){o=L[R];break}o&&o[D]&&(m.type=f(o[D],"gregorian",{noMultiCategory:!0,autotypenumbers:C})),m.type==="-"?m.type="linear":l.type=m.type}return m.type}z.exports=function(m,M,L){_(m,M,L,{type:b.name,attributes:g,handleDefaults:E,font:M.font,autotypenumbersDflt:M.autotypenumbers,paper_bgcolor:M.paper_bgcolor,fullData:L,layoutOut:M})}},77997:function(z,B,e){var d=e(39898),P=e(84267),a=e(73972),_=e(71828),x=_.strRotate,v=_.strTranslate,y=e(7901),r=e(91424),n=e(74875),u=e(89298),i=e(21994),f=e(12101),g=e(71739).doAutoRange,h=e(29323),b=e(28569),p=e(30211),E=e(92998),c=e(47322).prepSelect,l=e(47322).selectOnClick,m=e(47322).clearOutline,M=e(6964),L=e(33306),D=e(61549).redrawReglTraces,A=e(18783).MID_SHIFT,C=e(9813),S=e(10869),o=e(23893),R=o.smith,T=o.reactanceArc,O=o.resistanceArc,N=o.smithTransform,H=_._,k=_.mod,V=_.deg2rad,G=_.rad2deg;function U(ce,q,j){this.isSmith=j||!1,this.id=q,this.gd=ce,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var Z=ce._fullLayout,Q="clip"+Z._uid+q;this.clipIds.forTraces=Q+"-for-traces",this.clipPaths.forTraces=Z._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=Z["_"+(j?"smith":"polar")+"layer"].append("g").attr("class",q),this.getHole=function(ue){return this.isSmith?0:ue.hole},this.getSector=function(ue){return this.isSmith?[0,360]:ue.sector},this.getRadial=function(ue){return this.isSmith?ue.realaxis:ue.radialaxis},this.getAngular=function(ue){return this.isSmith?ue.imaginaryaxis:ue.angularaxis},j||(this.radialTickLayout=null,this.angularTickLayout=null)}var Y=U.prototype;z.exports=function(q,j,Z){return new U(q,j,Z)},Y.plot=function(ce,q){for(var j=this,Z=q[j.id],Q=!1,ue=0;ue<ce.length;ue++){var fe=ce[ue][0].trace;if(fe.cliponaxis===!1){Q=!0;break}}j._hasClipOnAxisFalse=Q,j.updateLayers(q,Z),j.updateLayout(q,Z),n.generalUpdatePerTraceModule(j.gd,j,ce,Z),j.updateFx(q,Z),j.isSmith&&(delete Z.realaxis.range,delete Z.imaginaryaxis.range)},Y.updateLayers=function(ce,q){var j=this,Z=j.isSmith,Q=j.layers,ue=j.getRadial(q),fe=j.getAngular(q),te=C.layerNames,ne=te.indexOf("frontplot"),ve=te.slice(0,ne),le=fe.layer==="below traces",xe=ue.layer==="below traces";le&&ve.push("angular-line"),xe&&ve.push("radial-line"),le&&ve.push("angular-axis"),xe&&ve.push("radial-axis"),ve.push("frontplot"),le||ve.push("angular-line"),xe||ve.push("radial-line"),le||ve.push("angular-axis"),xe||ve.push("radial-axis");var Se=(Z?"smith":"polar")+"sublayer",Re=j.framework.selectAll("."+Se).data(ve,String);Re.enter().append("g").attr("class",function(Ee){return Se+" "+Ee}).each(function(Ee){var Oe=Q[Ee]=d.select(this);switch(Ee){case"frontplot":Z||Oe.append("g").classed("barlayer",!0),Oe.append("g").classed("scatterlayer",!0);break;case"backplot":Oe.append("g").classed("maplayer",!0);break;case"plotbg":Q.bg=Oe.append("path");break;case"radial-grid":Oe.style("fill","none");break;case"angular-grid":Oe.style("fill","none");break;case"radial-line":Oe.append("line").style("fill","none");break;case"angular-line":Oe.append("path").style("fill","none");break}}),Re.order()},Y.updateLayout=function(ce,q){var j=this,Z=j.layers,Q=ce._size,ue=j.getRadial(q),fe=j.getAngular(q),te=q.domain.x,ne=q.domain.y;j.xOffset=Q.l+Q.w*te[0],j.yOffset=Q.t+Q.h*(1-ne[1]);var ve=j.xLength=Q.w*(te[1]-te[0]),le=j.yLength=Q.h*(ne[1]-ne[0]),xe=j.getSector(q);j.sectorInRad=xe.map(V);var Se=j.sectorBBox=re(xe),Re=Se[2]-Se[0],Ee=Se[3]-Se[1],Oe=le/ve,Be=Math.abs(Ee/Re),Le,Te,De,Ve,Ye;Oe>Be?(Le=ve,Te=ve*Be,Ye=(le-Te)/Q.h/2,De=[te[0],te[1]],Ve=[ne[0]+Ye,ne[1]-Ye]):(Le=le/Be,Te=le,Ye=(ve-Le)/Q.w/2,De=[te[0]+Ye,te[1]-Ye],Ve=[ne[0],ne[1]]),j.xLength2=Le,j.yLength2=Te,j.xDomain2=De,j.yDomain2=Ve;var Ne=j.xOffset2=Q.l+Q.w*De[0],Xe=j.yOffset2=Q.t+Q.h*(1-Ve[1]),ht=j.radius=Le/Re,st=j.innerRadius=j.getHole(q)*ht,it=j.cx=Ne-ht*Se[0],nt=j.cy=Xe+ht*Se[3],pt=j.cxx=it-Ne,Tt=j.cyy=nt-Xe,Et=ue.side,Dt;Et==="counterclockwise"?(Dt=Et,Et="top"):Et==="clockwise"&&(Dt=Et,Et="bottom"),j.radialAxis=j.mockAxis(ce,q,ue,{_id:"x",side:Et,_trueSide:Dt,domain:[st/Q.w,ht/Q.w]}),j.angularAxis=j.mockAxis(ce,q,fe,{side:"right",domain:[0,Math.PI],autorange:!1}),j.doAutoRange(ce,q),j.updateAngularAxis(ce,q),j.updateRadialAxis(ce,q),j.updateRadialAxisTitle(ce,q),j.xaxis=j.mockCartesianAxis(ce,q,{_id:"x",domain:De}),j.yaxis=j.mockCartesianAxis(ce,q,{_id:"y",domain:Ve});var et=j.pathSubplot();j.clipPaths.forTraces.select("path").attr("d",et).attr("transform",v(pt,Tt)),Z.frontplot.attr("transform",v(Ne,Xe)).call(r.setClipUrl,j._hasClipOnAxisFalse?null:j.clipIds.forTraces,j.gd),Z.bg.attr("d",et).attr("transform",v(it,nt)).call(y.fill,q.bgcolor)},Y.mockAxis=function(ce,q,j,Z){var Q=_.extendFlat({},j,Z);return f(Q,q,ce),Q},Y.mockCartesianAxis=function(ce,q,j){var Z=this,Q=Z.isSmith,ue=j._id,fe=_.extendFlat({type:"linear"},j);i(fe,ce);var te={x:[0,2],y:[1,3]};return fe.setRange=function(){var ne=Z.sectorBBox,ve=te[ue],le=Z.radialAxis._rl,xe=(le[1]-le[0])/(1-Z.getHole(q));fe.range=[ne[ve[0]]*xe,ne[ve[1]]*xe]},fe.isPtWithinRange=ue==="x"&&!Q?function(ne){return Z.isPtInside(ne)}:function(){return!0},fe.setRange(),fe.setScale(),fe},Y.doAutoRange=function(ce,q){var j=this,Z=j.gd,Q=j.radialAxis,ue=j.getRadial(q);g(Z,Q);var fe=Q.range;ue.range=fe.slice(),ue._input.range=fe.slice(),Q._rl=[Q.r2l(fe[0],null,"gregorian"),Q.r2l(fe[1],null,"gregorian")]},Y.updateRadialAxis=function(ce,q){var j=this,Z=j.gd,Q=j.layers,ue=j.radius,fe=j.innerRadius,te=j.cx,ne=j.cy,ve=j.getRadial(q),le=k(j.getSector(q)[0],360),xe=j.radialAxis,Se=fe<ue,Re=j.isSmith;Re||(j.fillViewInitialKey("radialaxis.angle",ve.angle),j.fillViewInitialKey("radialaxis.range",xe.range.slice()),xe.setGeometry()),xe.tickangle==="auto"&&le>90&&le<=270&&(xe.tickangle=180);var Ee=Re?function(ht){var st=N(j,R([ht.x,0]));return v(st[0]-te,st[1]-ne)}:function(ht){return v(xe.l2p(ht.x)+fe,0)},Oe=Re?function(ht){return O(j,ht.x,-1/0,1/0)}:function(ht){return j.pathArc(xe.r2p(ht.x)+fe)},Be=ee(ve);if(j.radialTickLayout!==Be&&(Q["radial-axis"].selectAll(".xtick").remove(),j.radialTickLayout=Be),Se){xe.setScale();var Le=0,Te=Re?(xe.tickvals||[]).filter(function(ht){return ht>=0}).map(function(ht){return u.tickText(xe,ht,!0,!1)}):u.calcTicks(xe),De=Re?Te:u.clipEnds(xe,Te),Ve=u.getTickSigns(xe)[2];Re&&((xe.ticks==="top"&&xe.side==="bottom"||xe.ticks==="bottom"&&xe.side==="top")&&(Ve=-Ve),xe.ticks==="top"&&xe.side==="top"&&(Le=-xe.ticklen),xe.ticks==="bottom"&&xe.side==="bottom"&&(Le=xe.ticklen)),u.drawTicks(Z,xe,{vals:Te,layer:Q["radial-axis"],path:u.makeTickPath(xe,0,Ve),transFn:Ee,crisp:!1}),u.drawGrid(Z,xe,{vals:De,layer:Q["radial-grid"],path:Oe,transFn:_.noop,crisp:!1}),u.drawLabels(Z,xe,{vals:Te,layer:Q["radial-axis"],transFn:Ee,labelFns:u.makeLabelFns(xe,Le)})}var Ye=j.radialAxisAngle=j.vangles?G(ie(V(ve.angle),j.vangles)):ve.angle,Ne=v(te,ne),Xe=Ne+x(-Ye);se(Q["radial-axis"],Se&&(ve.showticklabels||ve.ticks),{transform:Xe}),se(Q["radial-grid"],Se&&ve.showgrid,{transform:Re?"":Ne}),se(Q["radial-line"].select("line"),Se&&ve.showline,{x1:Re?-ue:fe,y1:0,x2:ue,y2:0,transform:Xe}).attr("stroke-width",ve.linewidth).call(y.stroke,ve.linecolor)},Y.updateRadialAxisTitle=function(ce,q,j){if(!this.isSmith){var Z=this,Q=Z.gd,ue=Z.radius,fe=Z.cx,te=Z.cy,ne=Z.getRadial(q),ve=Z.id+"title",le=0;if(ne.title){var xe=r.bBox(Z.layers["radial-axis"].node()).height,Se=ne.title.font.size,Re=ne.side;le=Re==="top"?Se:Re==="counterclockwise"?-(xe+Se*.4):xe+Se*.8}var Ee=j!==void 0?j:Z.radialAxisAngle,Oe=V(Ee),Be=Math.cos(Oe),Le=Math.sin(Oe),Te=fe+ue/2*Be+le*Le,De=te-ue/2*Le+le*Be;Z.layers["radial-axis-title"]=E.draw(Q,ve,{propContainer:ne,propName:Z.id+".radialaxis.title",placeholder:H(Q,"Click to enter radial axis title"),attributes:{x:Te,y:De,"text-anchor":"middle"},transform:{rotate:-Ee}})}},Y.updateAngularAxis=function(ce,q){var j=this,Z=j.gd,Q=j.layers,ue=j.radius,fe=j.innerRadius,te=j.cx,ne=j.cy,ve=j.getAngular(q),le=j.angularAxis,xe=j.isSmith;xe||(j.fillViewInitialKey("angularaxis.rotation",ve.rotation),le.setGeometry(),le.setScale());var Se=xe?function(st){var it=N(j,R([0,st.x]));return Math.atan2(it[0]-te,it[1]-ne)-Math.PI/2}:function(st){return le.t2g(st.x)};le.type==="linear"&&le.thetaunit==="radians"&&(le.tick0=G(le.tick0),le.dtick=G(le.dtick));var Re=function(st){return v(te+ue*Math.cos(st),ne-ue*Math.sin(st))},Ee=xe?function(st){var it=N(j,R([0,st.x]));return v(it[0],it[1])}:function(st){return Re(Se(st))},Oe=xe?function(st){var it=N(j,R([0,st.x])),nt=Math.atan2(it[0]-te,it[1]-ne)-Math.PI/2;return v(it[0],it[1])+x(-G(nt))}:function(st){var it=Se(st);return Re(it)+x(-G(it))},Be=xe?function(st){return T(j,st.x,0,1/0)}:function(st){var it=Se(st),nt=Math.cos(it),pt=Math.sin(it);return"M"+[te+fe*nt,ne-fe*pt]+"L"+[te+ue*nt,ne-ue*pt]},Le=u.makeLabelFns(le,0),Te=Le.labelStandoff,De={};De.xFn=function(st){var it=Se(st);return Math.cos(it)*Te},De.yFn=function(st){var it=Se(st),nt=Math.sin(it)>0?.2:1;return-Math.sin(it)*(Te+st.fontSize*nt)+Math.abs(Math.cos(it))*(st.fontSize*A)},De.anchorFn=function(st){var it=Se(st),nt=Math.cos(it);return Math.abs(nt)<.1?"middle":nt>0?"start":"end"},De.heightFn=function(st,it,nt){var pt=Se(st);return-.5*(1+Math.sin(pt))*nt};var Ve=ee(ve);j.angularTickLayout!==Ve&&(Q["angular-axis"].selectAll("."+le._id+"tick").remove(),j.angularTickLayout=Ve);var Ye=xe?[1/0].concat(le.tickvals||[]).map(function(st){return u.tickText(le,st,!0,!1)}):u.calcTicks(le);xe&&(Ye[0].text="∞",Ye[0].fontSize*=1.75);var Ne;if(q.gridshape==="linear"?(Ne=Ye.map(Se),_.angleDelta(Ne[0],Ne[1])<0&&(Ne=Ne.slice().reverse())):Ne=null,j.vangles=Ne,le.type==="category"&&(Ye=Ye.filter(function(st){return _.isAngleInsideSector(Se(st),j.sectorInRad)})),le.visible){var Xe=le.ticks==="inside"?-1:1,ht=(le.linewidth||1)/2;u.drawTicks(Z,le,{vals:Ye,layer:Q["angular-axis"],path:"M"+Xe*ht+",0h"+Xe*le.ticklen,transFn:Oe,crisp:!1}),u.drawGrid(Z,le,{vals:Ye,layer:Q["angular-grid"],path:Be,transFn:_.noop,crisp:!1}),u.drawLabels(Z,le,{vals:Ye,layer:Q["angular-axis"],repositionOnUpdate:!0,transFn:Ee,labelFns:De})}se(Q["angular-line"].select("path"),ve.showline,{d:j.pathSubplot(),transform:v(te,ne)}).attr("stroke-width",ve.linewidth).call(y.stroke,ve.linecolor)},Y.updateFx=function(ce,q){if(!this.gd._context.staticPlot){var j=!this.isSmith;j&&(this.updateAngularDrag(ce),this.updateRadialDrag(ce,q,0),this.updateRadialDrag(ce,q,1)),this.updateHoverAndMainDrag(ce)}},Y.updateHoverAndMainDrag=function(ce){var q=this,j=q.isSmith,Z=q.gd,Q=q.layers,ue=ce._zoomlayer,fe=C.MINZOOM,te=C.OFFEDGE,ne=q.radius,ve=q.innerRadius,le=q.cx,xe=q.cy,Se=q.cxx,Re=q.cyy,Ee=q.sectorInRad,Oe=q.vangles,Be=q.radialAxis,Le=S.clampTiny,Te=S.findXYatLength,De=S.findEnclosingVertexAngles,Ve=C.cornerHalfWidth,Ye=C.cornerLen/2,Ne,Xe,ht=h.makeDragger(Q,"path","maindrag",ce.dragmode===!1?"none":"crosshair");d.select(ht).attr("d",q.pathSubplot()).attr("transform",v(le,xe)),ht.onmousemove=function(wt){p.hover(Z,wt,q.id),Z._fullLayout._lasthover=ht,Z._fullLayout._hoversubplot=q.id},ht.onmouseout=function(wt){Z._dragging||b.unhover(Z,wt)};var st={element:ht,gd:Z,subplot:q.id,plotinfo:{id:q.id,xaxis:q.xaxis,yaxis:q.yaxis},xaxes:[q.xaxis],yaxes:[q.yaxis]},it,nt,pt,Tt,Et,Dt,et,Ue,ze;function rt(wt,Bt){return Math.sqrt(wt*wt+Bt*Bt)}function lt(wt,Bt){return rt(wt-Se,Bt-Re)}function Qe(wt,Bt){return Math.atan2(Re-Bt,wt-Se)}function Fe(wt,Bt){return[wt*Math.cos(Bt),wt*Math.sin(-Bt)]}function Ce(wt,Bt){if(wt===0)return q.pathSector(2*Ve);var Wt=Ye/wt,hr=Bt-Wt,gt=Bt+Wt,jt=Math.max(0,Math.min(wt,ne)),Ut=jt-Ve,or=jt+Ve;return"M"+Fe(Ut,hr)+"A"+[Ut,Ut]+" 0,0,0 "+Fe(Ut,gt)+"L"+Fe(or,gt)+"A"+[or,or]+" 0,0,1 "+Fe(or,hr)+"Z"}function pe(wt,Bt,Wt){if(wt===0)return q.pathSector(2*Ve);var hr=Fe(wt,Bt),gt=Fe(wt,Wt),jt=Le((hr[0]+gt[0])/2),Ut=Le((hr[1]+gt[1])/2),or,ur;if(jt&&Ut){var dt=Ut/jt,ut=-1/dt,yt=Te(Ve,dt,jt,Ut);or=Te(Ye,ut,yt[0][0],yt[0][1]),ur=Te(Ye,ut,yt[1][0],yt[1][1])}else{var Lt,Rt;Ut?(Lt=Ye,Rt=Ve):(Lt=Ve,Rt=Ye),or=[[jt-Lt,Ut-Rt],[jt+Lt,Ut-Rt]],ur=[[jt-Lt,Ut+Rt],[jt+Lt,Ut+Rt]]}return"M"+or.join("L")+"L"+ur.reverse().join("L")+"Z"}function we(){pt=null,Tt=null,Et=q.pathSubplot(),Dt=!1;var wt=Z._fullLayout[q.id];et=P(wt.bgcolor).getLuminance(),Ue=h.makeZoombox(ue,et,le,xe,Et),Ue.attr("fill-rule","evenodd"),ze=h.makeCorners(ue,le,xe),m(Z)}function Ae(wt,Bt){return Bt=Math.max(Math.min(Bt,ne),ve),wt<te?wt=0:ne-wt<te?wt=ne:Bt<te?Bt=0:ne-Bt<te&&(Bt=ne),Math.abs(Bt-wt)>fe?(wt<Bt?(pt=wt,Tt=Bt):(pt=Bt,Tt=wt),!0):(pt=null,Tt=null,!1)}function Pe(wt,Bt){wt=wt||Et,Bt=Bt||"M0,0Z",Ue.attr("d",wt),ze.attr("d",Bt),h.transitionZoombox(Ue,ze,Dt,et),Dt=!0;var Wt={};St(Wt),Z.emit("plotly_relayouting",Wt)}function Ge(wt,Bt){wt=wt*Ne,Bt=Bt*Xe;var Wt=it+wt,hr=nt+Bt,gt=lt(it,nt),jt=Math.min(lt(Wt,hr),ne),Ut=Qe(it,nt),or,ur;Ae(gt,jt)&&(or=Et+q.pathSector(Tt),pt&&(or+=q.pathSector(pt)),ur=Ce(pt,Ut)+Ce(Tt,Ut)),Pe(or,ur)}function We(wt,Bt,Wt,hr){var gt=S.findIntersectionXY(Wt,hr,Wt,[wt-Se,Re-Bt]);return rt(gt[0],gt[1])}function tt(wt,Bt){var Wt=it+wt,hr=nt+Bt,gt=Qe(it,nt),jt=Qe(Wt,hr),Ut=De(gt,Oe),or=De(jt,Oe),ur=We(it,nt,Ut[0],Ut[1]),dt=Math.min(We(Wt,hr,or[0],or[1]),ne),ut,yt;Ae(ur,dt)&&(ut=Et+q.pathSector(Tt),pt&&(ut+=q.pathSector(pt)),yt=[pe(pt,Ut[0],Ut[1]),pe(Tt,Ut[0],Ut[1])].join(" ")),Pe(ut,yt)}function ct(){if(h.removeZoombox(Z),!(pt===null||Tt===null)){var wt={};St(wt),h.showDoubleClickNotifier(Z),a.call("_guiRelayout",Z,wt)}}function St(wt){var Bt=Be._rl,Wt=(Bt[1]-Bt[0])/(1-ve/ne)/ne,hr=[Bt[0]+(pt-ve)*Wt,Bt[0]+(Tt-ve)*Wt];wt[q.id+".radialaxis.range"]=hr}function Pt(wt,Bt){var Wt=Z._fullLayout.clickmode;if(h.removeZoombox(Z),wt===2){var hr={};for(var gt in q.viewInitial)hr[q.id+"."+gt]=q.viewInitial[gt];Z.emit("plotly_doubleclick",null),a.call("_guiRelayout",Z,hr)}Wt.indexOf("select")>-1&&wt===1&&l(Bt,Z,[q.xaxis],[q.yaxis],q.id,st),Wt.indexOf("event")>-1&&p.click(Z,Bt,q.id)}st.prepFn=function(wt,Bt,Wt){var hr=Z._fullLayout.dragmode,gt=ht.getBoundingClientRect();Z._fullLayout._calcInverseTransform(Z);var jt=Z._fullLayout._invTransform;Ne=Z._fullLayout._invScaleX,Xe=Z._fullLayout._invScaleY;var Ut=_.apply3DTransform(jt)(Bt-gt.left,Wt-gt.top);if(it=Ut[0],nt=Ut[1],Oe){var or=S.findPolygonOffset(ne,Ee[0],Ee[1],Oe);it+=Se+or[0],nt+=Re+or[1]}switch(hr){case"zoom":st.clickFn=Pt,j||(Oe?st.moveFn=tt:st.moveFn=Ge,st.doneFn=ct,we());break;case"select":case"lasso":c(wt,Bt,Wt,st,hr);break}},b.init(st)},Y.updateRadialDrag=function(ce,q,j){var Z=this,Q=Z.gd,ue=Z.layers,fe=Z.radius,te=Z.innerRadius,ne=Z.cx,ve=Z.cy,le=Z.radialAxis,xe=C.radialDragBoxSize,Se=xe/2;if(!le.visible)return;var Re=V(Z.radialAxisAngle),Ee=le._rl,Oe=Ee[0],Be=Ee[1],Le=Ee[j],Te=.75*(Ee[1]-Ee[0])/(1-Z.getHole(q))/fe,De,Ve,Ye;j?(De=ne+(fe+Se)*Math.cos(Re),Ve=ve-(fe+Se)*Math.sin(Re),Ye="radialdrag"):(De=ne+(te-Se)*Math.cos(Re),Ve=ve-(te-Se)*Math.sin(Re),Ye="radialdrag-inner");var Ne=h.makeRectDragger(ue,Ye,"crosshair",-Se,-Se,xe,xe),Xe={element:Ne,gd:Q};ce.dragmode===!1&&(Xe.dragmode=!1),se(d.select(Ne),le.visible&&te<fe,{transform:v(De,Ve)});var ht,st,it;function nt(et,Ue){if(ht)ht(et,Ue);else{var ze=[et,-Ue],rt=[Math.cos(Re),Math.sin(Re)],lt=Math.abs(_.dot(ze,rt)/Math.sqrt(_.dot(ze,ze)));isNaN(lt)||(ht=lt<.5?Et:Dt)}var Qe={};pt(Qe),Q.emit("plotly_relayouting",Qe)}function pt(et){st!==null?et[Z.id+".radialaxis.angle"]=st:it!==null&&(et[Z.id+".radialaxis.range["+j+"]"]=it)}function Tt(){st!==null?a.call("_guiRelayout",Q,Z.id+".radialaxis.angle",st):it!==null&&a.call("_guiRelayout",Q,Z.id+".radialaxis.range["+j+"]",it)}function Et(et,Ue){if(j!==0){var ze=De+et,rt=Ve+Ue;st=Math.atan2(ve-rt,ze-ne),Z.vangles&&(st=ie(st,Z.vangles)),st=G(st);var lt=v(ne,ve)+x(-st);ue["radial-axis"].attr("transform",lt),ue["radial-line"].select("line").attr("transform",lt);var Qe=Z.gd._fullLayout,Fe=Qe[Z.id];Z.updateRadialAxisTitle(Qe,Fe,st)}}function Dt(et,Ue){var ze=_.dot([et,-Ue],[Math.cos(Re),Math.sin(Re)]);if(it=Le-Te*ze,Te>0!=(j?it>Oe:it<Be)){it=null;return}var rt=Q._fullLayout,lt=rt[Z.id];le.range[j]=it,le._rl[j]=it,Z.updateRadialAxis(rt,lt),Z.xaxis.setRange(),Z.xaxis.setScale(),Z.yaxis.setRange(),Z.yaxis.setScale();var Qe=!1;for(var Fe in Z.traceHash){var Ce=Z.traceHash[Fe],pe=_.filterVisible(Ce),we=Ce[0][0].trace._module;we.plot(Q,Z,pe,lt),a.traceIs(Fe,"gl")&&pe.length&&(Qe=!0)}Qe&&(L(Q),D(Q))}Xe.prepFn=function(){ht=null,st=null,it=null,Xe.moveFn=nt,Xe.doneFn=Tt,m(Q)},Xe.clampFn=function(et,Ue){return Math.sqrt(et*et+Ue*Ue)<C.MINDRAG&&(et=0,Ue=0),[et,Ue]},b.init(Xe)},Y.updateAngularDrag=function(ce){var q=this,j=q.gd,Z=q.layers,Q=q.radius,ue=q.angularAxis,fe=q.cx,te=q.cy,ne=q.cxx,ve=q.cyy,le=C.angularDragBoxSize,xe=h.makeDragger(Z,"path","angulardrag",ce.dragmode===!1?"none":"move"),Se={element:xe,gd:j};ce.dragmode===!1?Se.dragmode=!1:d.select(xe).attr("d",q.pathAnnulus(Q,Q+le)).attr("transform",v(fe,te)).call(M,"move");function Re(it,nt){return Math.atan2(ve+le-nt,it-ne-le)}var Ee=Z.frontplot.select(".scatterlayer").selectAll(".trace"),Oe=Ee.selectAll(".point"),Be=Ee.selectAll(".textpoint"),Le,Te,De,Ve,Ye,Ne;function Xe(it,nt){var pt=q.gd._fullLayout,Tt=pt[q.id],Et=Le+it*ce._invScaleX,Dt=Te+nt*ce._invScaleY,et=Re(Et,Dt),Ue=G(et-Ne);if(Ve=De+Ue,Z.frontplot.attr("transform",v(q.xOffset2,q.yOffset2)+x([-Ue,ne,ve])),q.vangles){Ye=q.radialAxisAngle+Ue;var ze=v(fe,te)+x(-Ue),rt=v(fe,te)+x(-Ye);Z.bg.attr("transform",ze),Z["radial-grid"].attr("transform",ze),Z["radial-axis"].attr("transform",rt),Z["radial-line"].select("line").attr("transform",rt),q.updateRadialAxisTitle(pt,Tt,Ye)}else q.clipPaths.forTraces.select("path").attr("transform",v(ne,ve)+x(Ue));Oe.each(function(){var Ae=d.select(this),Pe=r.getTranslate(Ae);Ae.attr("transform",v(Pe.x,Pe.y)+x([Ue]))}),Be.each(function(){var Ae=d.select(this),Pe=Ae.select("text"),Ge=r.getTranslate(Ae);Ae.attr("transform",x([Ue,Pe.attr("x"),Pe.attr("y")])+v(Ge.x,Ge.y))}),ue.rotation=_.modHalf(Ve,360),q.updateAngularAxis(pt,Tt),q._hasClipOnAxisFalse&&!_.isFullCircle(q.sectorInRad)&&Ee.call(r.hideOutsideRangePoints,q);var lt=!1;for(var Qe in q.traceHash)if(a.traceIs(Qe,"gl")){var Fe=q.traceHash[Qe],Ce=_.filterVisible(Fe),pe=Fe[0][0].trace._module;pe.plot(j,q,Ce,Tt),Ce.length&&(lt=!0)}lt&&(L(j),D(j));var we={};ht(we),j.emit("plotly_relayouting",we)}function ht(it){it[q.id+".angularaxis.rotation"]=Ve,q.vangles&&(it[q.id+".radialaxis.angle"]=Ye)}function st(){Be.select("text").attr("transform",null);var it={};ht(it),a.call("_guiRelayout",j,it)}Se.prepFn=function(it,nt,pt){var Tt=ce[q.id];De=Tt.angularaxis.rotation;var Et=xe.getBoundingClientRect();Le=nt-Et.left,Te=pt-Et.top,j._fullLayout._calcInverseTransform(j);var Dt=_.apply3DTransform(ce._invTransform)(Le,Te);Le=Dt[0],Te=Dt[1],Ne=Re(Le,Te),Se.moveFn=Xe,Se.doneFn=st,m(j)},q.vangles&&!_.isFullCircle(q.sectorInRad)&&(Se.prepFn=_.noop,M(d.select(xe),null)),b.init(Se)},Y.isPtInside=function(ce){if(this.isSmith)return!0;var q=this.sectorInRad,j=this.vangles,Z=this.angularAxis.c2g(ce.theta),Q=this.radialAxis,ue=Q.c2l(ce.r),fe=Q._rl,te=j?S.isPtInsidePolygon:_.isPtInsideSector;return te(ue,Z,fe,q,j)},Y.pathArc=function(ce){var q=this.sectorInRad,j=this.vangles,Z=j?S.pathPolygon:_.pathArc;return Z(ce,q[0],q[1],j)},Y.pathSector=function(ce){var q=this.sectorInRad,j=this.vangles,Z=j?S.pathPolygon:_.pathSector;return Z(ce,q[0],q[1],j)},Y.pathAnnulus=function(ce,q){var j=this.sectorInRad,Z=this.vangles,Q=Z?S.pathPolygonAnnulus:_.pathAnnulus;return Q(ce,q,j[0],j[1],Z)},Y.pathSubplot=function(){var ce=this.innerRadius,q=this.radius;return ce?this.pathAnnulus(ce,q):this.pathSector(q)},Y.fillViewInitialKey=function(ce,q){ce in this.viewInitial||(this.viewInitial[ce]=q)};function ee(ce){var q=ce.ticks+String(ce.ticklen)+String(ce.showticklabels);return"side"in ce&&(q+=ce.side),q}function re(ce){var q=ce[0],j=ce[1],Z=j-q,Q=k(q,360),ue=Q+Z,fe=Math.cos(V(Q)),te=Math.sin(V(Q)),ne=Math.cos(V(ue)),ve=Math.sin(V(ue)),le,xe,Se,Re;return Q<=90&&ue>=90||Q>90&&ue>=450?Re=1:te<=0&&ve<=0?Re=0:Re=Math.max(te,ve),Q<=180&&ue>=180||Q>180&&ue>=540?le=-1:fe>=0&&ne>=0?le=0:le=Math.min(fe,ne),Q<=270&&ue>=270||Q>270&&ue>=630?xe=-1:te>=0&&ve>=0?xe=0:xe=Math.min(te,ve),ue>=360?Se=1:fe<=0&&ne<=0?Se=0:Se=Math.max(fe,ne),[le,xe,Se,Re]}function ie(ce,q){var j=function(Q){return _.angleDist(ce,Q)},Z=_.findIndexOfMin(q,j);return q[Z]}function se(ce,q,j){return q?(ce.attr("display",null),ce.attr(j)):ce&&ce.attr("display","none"),ce}},12101:function(z,B,e){var d=e(71828),P=e(21994),a=d.deg2rad,_=d.rad2deg;z.exports=function(u,i,f){switch(P(u,f),u._id){case"x":case"radialaxis":x(u,i);break;case"angularaxis":r(u,i);break}};function x(n,u){var i=u._subplot;n.setGeometry=function(){var f=n._rl[0],g=n._rl[1],h=i.innerRadius,b=(i.radius-h)/(g-f),p=h/b,E=f>g?function(c){return c<=0}:function(c){return c>=0};n.c2g=function(c){var l=n.c2l(c)-f;return(E(l)?l:0)+p},n.g2c=function(c){return n.l2c(c+f-p)},n.g2p=function(c){return c*b},n.c2p=function(c){return n.g2p(n.c2g(c))}}}function v(n,u){return u==="degrees"?a(n):n}function y(n,u){return u==="degrees"?_(n):n}function r(n,u){var i=n.type;if(i==="linear"){var f=n.d2c,g=n.c2d;n.d2c=function(h,b){return v(f(h),b)},n.c2d=function(h,b){return g(y(h,b))}}n.makeCalcdata=function(h,b){var p=h[b],E=h._length,c,l,m=function(C){return n.d2c(C,h.thetaunit)};if(p){if(d.isTypedArray(p)&&i==="linear"){if(E===p.length)return p;if(p.subarray)return p.subarray(0,E)}for(c=new Array(E),l=0;l<E;l++)c[l]=m(p[l])}else{var M=b+"0",L="d"+b,D=M in h?m(h[M]):0,A=h[L]?m(h[L]):(n.period||2*Math.PI)/E;for(c=new Array(E),l=0;l<E;l++)c[l]=D+l*A}return c},n.setGeometry=function(){var h=u.sector,b=h.map(a),p={clockwise:-1,counterclockwise:1}[n.direction],E=a(n.rotation),c=function(S){return p*S+E},l=function(S){return(S-E)/p},m,M,L,D;switch(i){case"linear":M=m=d.identity,D=a,L=_,n.range=d.isFullCircle(b)?[h[0],h[0]+360]:b.map(l).map(_);break;case"category":var A=n._categories.length,C=n.period?Math.max(n.period,A):A;C===0&&(C=1),M=D=function(S){return S*2*Math.PI/C},m=L=function(S){return S*C/Math.PI/2},n.range=[0,C];break}n.c2g=function(S){return c(M(S))},n.g2c=function(S){return m(l(S))},n.t2g=function(S){return c(D(S))},n.g2t=function(S){return L(l(S))}}}},39779:function(z){z.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}},23893:function(z){function B(x){return x<0?-1:x>0?1:0}function e(x){var v=x[0],y=x[1];if(!isFinite(v)||!isFinite(y))return[1,0];var r=(v+1)*(v+1)+y*y;return[(v*v+y*y-1)/r,2*y/r]}function d(x,v){var y=v[0],r=v[1];return[y*x.radius+x.cx,-r*x.radius+x.cy]}function P(x,v){return v*x.radius}function a(x,v,y,r){var n=d(x,e([y,v])),u=n[0],i=n[1],f=d(x,e([r,v])),g=f[0],h=f[1];if(v===0)return["M"+u+","+i,"L"+g+","+h].join(" ");var b=P(x,1/Math.abs(v));return["M"+u+","+i,"A"+b+","+b+" 0 0,"+(v<0?1:0)+" "+g+","+h].join(" ")}function _(x,v,y,r){var n=P(x,1/(v+1)),u=d(x,e([v,y])),i=u[0],f=u[1],g=d(x,e([v,r])),h=g[0],b=g[1];if(B(y)!==B(r)){var p=d(x,e([v,0])),E=p[0],c=p[1];return["M"+i+","+f,"A"+n+","+n+" 0 0,"+(0<y?0:1)+" "+E+","+c,"A"+n+","+n+" 0 0,"+(r<0?0:1)+h+","+b].join(" ")}return["M"+i+","+f,"A"+n+","+n+" 0 0,"+(r<y?0:1)+" "+h+","+b].join(" ")}z.exports={smith:e,reactanceArc:a,resistanceArc:_,smithTransform:d}},7504:function(z,B,e){var d=e(27659).AU,P=e(71828).counterRegex,a=e(77997),_=e(39779),x=_.attr,v=_.name,y=P(v),r={};r[x]={valType:"subplotid",dflt:v,editType:"calc"};function n(i){for(var f=i._fullLayout,g=i.calcdata,h=f._subplots[v],b=0;b<h.length;b++){var p=h[b],E=d(g,v,p),c=f[p]._subplot;c||(c=a(i,p,!0),f[p]._subplot=c),c.plot(E,f,i._promises)}}function u(i,f,g,h){for(var b=h._subplots[v]||[],p=0;p<b.length;p++){var E=b[p],c=h[E]._subplot;if(!f[E]&&c){c.framework.remove();for(var l in c.clipPaths)c.clipPaths[l].remove()}}}z.exports={attr:x,name:v,idRoot:v,idRegex:y,attrRegex:y,attributes:r,layoutAttributes:e(33419),supplyLayoutDefaults:e(9558),plot:n,clean:u,toSVG:e(93612).toSVG}},33419:function(z,B,e){var d=e(22399),P=e(13838),a=e(27670).Y,_=e(71828).extendFlat,x=e(30962).overrideAll,v=x({color:P.color,showline:_({},P.showline,{dflt:!0}),linecolor:P.linecolor,linewidth:P.linewidth,showgrid:_({},P.showgrid,{dflt:!0}),gridcolor:P.gridcolor,gridwidth:P.gridwidth,griddash:P.griddash},"plot","from-root"),y=x({ticklen:P.ticklen,tickwidth:_({},P.tickwidth,{dflt:2}),tickcolor:P.tickcolor,showticklabels:P.showticklabels,showtickprefix:P.showtickprefix,tickprefix:P.tickprefix,showticksuffix:P.showticksuffix,ticksuffix:P.ticksuffix,tickfont:P.tickfont,tickformat:P.tickformat,hoverformat:P.hoverformat,layer:P.layer},"plot","from-root"),r=_({visible:_({},P.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:_({},P.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},v,y),n=_({visible:_({},P.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:P.ticks,editType:"calc"},v,y);z.exports={domain:a({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:d.background},realaxis:r,imaginaryaxis:n,editType:"calc"}},9558:function(z,B,e){var d=e(71828),P=e(7901),a=e(44467),_=e(49119),x=e(27659).NG,v=e(89426),y=e(96115),r=e(92128),n=e(21994),u=e(33419),i=e(39779),f=i.axisNames,g=b(function(p){return p.slice().reverse().map(function(E){return-E}).concat([0]).concat(p)},String);function h(p,E,c,l){var m=c("bgcolor");l.bgColor=P.combine(m,l.paper_bgcolor);var M=x(l.fullData,i.name,l.id),L=l.layoutOut,D;function A(Y,ee){return c(D+"."+Y,ee)}for(var C=0;C<f.length;C++){D=f[C],d.isPlainObject(p[D])||(p[D]={});var S=p[D],o=a.newContainer(E,D);o._id=o._name=D,o._attr=l.id+"."+D,o._traceIndices=M.map(function(Y){return Y._expandedIndex});var R=A("visible");if(o.type="linear",n(o,L),v(S,o,A,o.type),R){var T=D==="realaxis";if(T&&A("side"),T)A("tickvals");else{var O=g(E.realaxis.tickvals||u.realaxis.tickvals.dflt);A("tickvals",O)}var N,H,k,V,G=l.font||{};R&&(N=A("color"),H=N===S.color?N:G.color,k=G.size,V=G.family),y(S,o,A,o.type,{noTicklabelstep:!0,noAng:!T,noExp:!0,font:{color:H,size:k,family:V}}),d.coerce2(p,E,u,D+".ticklen"),d.coerce2(p,E,u,D+".tickwidth"),d.coerce2(p,E,u,D+".tickcolor",E.color);var U=A("ticks");U||(delete E[D].ticklen,delete E[D].tickwidth,delete E[D].tickcolor),r(S,o,A,{dfltColor:N,bgColor:l.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:u[D]}),A("layer")}A("hoverformat"),delete o.type,o._input=S}}z.exports=function(E,c,l){_(E,c,l,{noUirevision:!0,type:i.name,attributes:u,handleDefaults:h,font:c.font,paper_bgcolor:c.paper_bgcolor,fullData:l,layoutOut:c})};function b(p,E){var c={};return function(l){var m=E?E(l):l;if(m in c)return c[m];var M=p(l);return c[m]=M,M}}},49119:function(z,B,e){var d=e(71828),P=e(44467),a=e(27670).c;z.exports=function(x,v,y,r){var n=r.type,u=r.attributes,i=r.handleDefaults,f=r.partition||"x",g=v._subplots[n],h=g.length,b=h&&g[0].replace(/\d+$/,""),p,E;function c(L,D){return d.coerce(p,E,u,L,D)}for(var l=0;l<h;l++){var m=g[l];x[m]?p=x[m]:p=x[m]={},E=P.newContainer(v,m,b),r.noUirevision||c("uirevision",v.uirevision);var M={};M[f]=[l/h,(l+1)/h],a(E,v,c,M),r.id=m,i(p,E,c,r)}}},5386:function(z,B,e){var d=e(31562);d.FORMAT_LINK,d.DATE_FORMAT_LINK;function P(a){var _=a.description?" "+a.description:"",x=a.keys||[];if(x.length>0){for(var v=[],y=0;y<x.length;y++)v[y]="`"+x[y]+"`";_=_+"Finally, the template string has access to ",x.length===1?_="variable "+v[0]:_="variables "+v.slice(0,-1).join(", ")+" and "+v.slice(-1)+"."}return _}B.f=function(a,_){a=a||{},_=_||{},P(_);var x={valType:"string",dflt:"",editType:a.editType||"none"};return a.arrayOk!==!1&&(x.arrayOk=!0),x},B.s=function(a,_){a=a||{},_=_||{},P(_);var x={valType:"string",dflt:"",editType:a.editType||"calc"};return a.arrayOk!==!1&&(x.arrayOk=!0),x}},61639:function(z,B,e){var d=e(64380),P=e(27659).AU,a=e(71828).counterRegex,_="ternary";B.name=_;var x=B.attr="subplot";B.idRoot=_,B.idRegex=B.attrRegex=a(_);var v=B.attributes={};v[x]={valType:"subplotid",dflt:"ternary",editType:"calc"},B.layoutAttributes=e(81367),B.supplyLayoutDefaults=e(25369),B.plot=function(r){for(var n=r._fullLayout,u=r.calcdata,i=n._subplots[_],f=0;f<i.length;f++){var g=i[f],h=P(u,_,g),b=n[g]._subplot;b||(b=new d({id:g,graphDiv:r,container:n._ternarylayer.node()},n),n[g]._subplot=b),b.plot(h,n,r._promises)}},B.clean=function(y,r,n,u){for(var i=u._subplots[_]||[],f=0;f<i.length;f++){var g=i[f],h=u[g]._subplot;!r[g]&&h&&(h.plotContainer.remove(),h.clipDef.remove(),h.clipDefRelative.remove(),h.layers["a-title"].remove(),h.layers["b-title"].remove(),h.layers["c-title"].remove())}}},81367:function(z,B,e){var d=e(22399),P=e(27670).Y,a=e(13838),_=e(30962).overrideAll,x=e(1426).extendFlat,v={title:{text:a.title.text,font:a.title.font},color:a.color,tickmode:a.minor.tickmode,nticks:x({},a.nticks,{dflt:6,min:1}),tick0:a.tick0,dtick:a.dtick,tickvals:a.tickvals,ticktext:a.ticktext,ticks:a.ticks,ticklen:a.ticklen,tickwidth:a.tickwidth,tickcolor:a.tickcolor,ticklabelstep:a.ticklabelstep,showticklabels:a.showticklabels,showtickprefix:a.showtickprefix,tickprefix:a.tickprefix,showticksuffix:a.showticksuffix,ticksuffix:a.ticksuffix,showexponent:a.showexponent,exponentformat:a.exponentformat,minexponent:a.minexponent,separatethousands:a.separatethousands,tickfont:a.tickfont,tickangle:a.tickangle,tickformat:a.tickformat,tickformatstops:a.tickformatstops,hoverformat:a.hoverformat,showline:x({},a.showline,{dflt:!0}),linecolor:a.linecolor,linewidth:a.linewidth,showgrid:x({},a.showgrid,{dflt:!0}),gridcolor:a.gridcolor,gridwidth:a.gridwidth,griddash:a.griddash,layer:a.layer,min:{valType:"number",dflt:0,min:0},_deprecated:{title:a._deprecated.title,titlefont:a._deprecated.titlefont}},y=z.exports=_({domain:P({name:"ternary"}),bgcolor:{valType:"color",dflt:d.background},sum:{valType:"number",dflt:1,min:0},aaxis:v,baxis:v,caxis:v},"plot","from-root");y.uirevision={valType:"any",editType:"none"},y.aaxis.uirevision=y.baxis.uirevision=y.caxis.uirevision={valType:"any",editType:"none"}},25369:function(z,B,e){var d=e(7901),P=e(44467),a=e(71828),_=e(49119),x=e(96115),v=e(89426),y=e(38701),r=e(26218),n=e(92128),u=e(81367),i=["aaxis","baxis","caxis"];z.exports=function(b,p,E){_(b,p,E,{type:"ternary",attributes:u,handleDefaults:f,font:p.font,paper_bgcolor:p.paper_bgcolor})};function f(h,b,p,E){var c=p("bgcolor"),l=p("sum");E.bgColor=d.combine(c,E.paper_bgcolor);for(var m,M,L,D=0;D<i.length;D++)m=i[D],M=h[m]||{},L=P.newContainer(b,m),L._name=m,g(M,L,E,b);var A=b.aaxis,C=b.baxis,S=b.caxis;A.min+C.min+S.min>=l&&(A.min=0,C.min=0,S.min=0,h.aaxis&&delete h.aaxis.min,h.baxis&&delete h.baxis.min,h.caxis&&delete h.caxis.min)}function g(h,b,p,E){var c=u[b._name];function l(o,R){return a.coerce(h,b,c,o,R)}l("uirevision",E.uirevision),b.type="linear";var m=l("color"),M=m!==c.color.dflt?m:p.font.color,L=b._name,D=L.charAt(0).toUpperCase(),A="Component "+D,C=l("title.text",A);b._hovertitle=C===A?C:D,a.coerceFont(l,"title.font",{family:p.font.family,size:a.bigFont(p.font.size),color:M}),l("min"),r(h,b,l,"linear"),v(h,b,l,"linear"),x(h,b,l,"linear"),y(h,b,l,{outerTicks:!0});var S=l("showticklabels");S&&(a.coerceFont(l,"tickfont",{family:p.font.family,size:p.font.size,color:M}),l("tickangle"),l("tickformat")),n(h,b,l,{dfltColor:m,bgColor:p.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:c}),l("hoverformat"),l("layer")}},64380:function(z,B,e){var d=e(39898),P=e(84267),a=e(73972),_=e(71828),x=_.strTranslate,v=_._,y=e(7901),r=e(91424),n=e(21994),u=e(1426).extendFlat,i=e(74875),f=e(89298),g=e(28569),h=e(30211),b=e(64505),p=b.freeMode,E=b.rectMode,c=e(92998),l=e(47322).prepSelect,m=e(47322).selectOnClick,M=e(47322).clearOutline,L=e(47322).clearSelectionsCache,D=e(85555);function A(G,U){this.id=G.id,this.graphDiv=G.graphDiv,this.init(U),this.makeFramework(U),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}z.exports=A;var C=A.prototype;C.init=function(G){this.container=G._ternarylayer,this.defs=G._defs,this.layoutId=G._uid,this.traceHash={},this.layers={}},C.plot=function(G,U){var Y=this,ee=U[Y.id],re=U._size;Y._hasClipOnAxisFalse=!1;for(var ie=0;ie<G.length;ie++){var se=G[ie][0].trace;if(se.cliponaxis===!1){Y._hasClipOnAxisFalse=!0;break}}Y.updateLayers(ee),Y.adjustLayout(ee,re),i.generalUpdatePerTraceModule(Y.graphDiv,Y,G,ee),Y.layers.plotbg.select("path").call(y.fill,ee.bgcolor)},C.makeFramework=function(G){var U=this,Y=U.graphDiv,ee=G[U.id],re=U.clipId="clip"+U.layoutId+U.id,ie=U.clipIdRelative="clip-relative"+U.layoutId+U.id;U.clipDef=_.ensureSingleById(G._clips,"clipPath",re,function(se){se.append("path").attr("d","M0,0Z")}),U.clipDefRelative=_.ensureSingleById(G._clips,"clipPath",ie,function(se){se.append("path").attr("d","M0,0Z")}),U.plotContainer=_.ensureSingle(U.container,"g",U.id),U.updateLayers(ee),r.setClipUrl(U.layers.backplot,re,Y),r.setClipUrl(U.layers.grids,re,Y)},C.updateLayers=function(G){var U=this,Y=U.layers,ee=["draglayer","plotbg","backplot","grids"];G.aaxis.layer==="below traces"&&ee.push("aaxis","aline"),G.baxis.layer==="below traces"&&ee.push("baxis","bline"),G.caxis.layer==="below traces"&&ee.push("caxis","cline"),ee.push("frontplot"),G.aaxis.layer==="above traces"&&ee.push("aaxis","aline"),G.baxis.layer==="above traces"&&ee.push("baxis","bline"),G.caxis.layer==="above traces"&&ee.push("caxis","cline");var re=U.plotContainer.selectAll("g.toplevel").data(ee,String),ie=["agrid","bgrid","cgrid"];re.enter().append("g").attr("class",function(se){return"toplevel "+se}).each(function(se){var ce=d.select(this);Y[se]=ce,se==="frontplot"?ce.append("g").classed("scatterlayer",!0):se==="backplot"?ce.append("g").classed("maplayer",!0):se==="plotbg"?ce.append("path").attr("d","M0,0Z"):se==="aline"||se==="bline"||se==="cline"?ce.append("path"):se==="grids"&&ie.forEach(function(q){Y[q]=ce.append("g").classed("grid "+q,!0)})}),re.order()};var S=Math.sqrt(4/3);C.adjustLayout=function(G,U){var Y=this,ee=G.domain,re=(ee.x[0]+ee.x[1])/2,ie=(ee.y[0]+ee.y[1])/2,se=ee.x[1]-ee.x[0],ce=ee.y[1]-ee.y[0],q=se*U.w,j=ce*U.h,Z=G.sum,Q=G.aaxis.min,ue=G.baxis.min,fe=G.caxis.min,te,ne,ve,le,xe,Se;q>S*j?(le=j,ve=le*S):(ve=q,le=ve/S),xe=se*ve/q,Se=ce*le/j,te=U.l+U.w*re-ve/2,ne=U.t+U.h*(1-ie)-le/2,Y.x0=te,Y.y0=ne,Y.w=ve,Y.h=le,Y.sum=Z,Y.xaxis={type:"linear",range:[Q+2*fe-Z,Z-Q-2*ue],domain:[re-xe/2,re+xe/2],_id:"x"},n(Y.xaxis,Y.graphDiv._fullLayout),Y.xaxis.setScale(),Y.xaxis.isPtWithinRange=function(Xe){return Xe.a>=Y.aaxis.range[0]&&Xe.a<=Y.aaxis.range[1]&&Xe.b>=Y.baxis.range[1]&&Xe.b<=Y.baxis.range[0]&&Xe.c>=Y.caxis.range[1]&&Xe.c<=Y.caxis.range[0]},Y.yaxis={type:"linear",range:[Q,Z-ue-fe],domain:[ie-Se/2,ie+Se/2],_id:"y"},n(Y.yaxis,Y.graphDiv._fullLayout),Y.yaxis.setScale(),Y.yaxis.isPtWithinRange=function(){return!0};var Re=Y.yaxis.domain[0],Ee=Y.aaxis=u({},G.aaxis,{range:[Q,Z-ue-fe],side:"left",tickangle:(+G.aaxis.tickangle||0)-30,domain:[Re,Re+Se*S],anchor:"free",position:0,_id:"y",_length:ve});n(Ee,Y.graphDiv._fullLayout),Ee.setScale();var Oe=Y.baxis=u({},G.baxis,{range:[Z-Q-fe,ue],side:"bottom",domain:Y.xaxis.domain,anchor:"free",position:0,_id:"x",_length:ve});n(Oe,Y.graphDiv._fullLayout),Oe.setScale();var Be=Y.caxis=u({},G.caxis,{range:[Z-Q-ue,fe],side:"right",tickangle:(+G.caxis.tickangle||0)+30,domain:[Re,Re+Se*S],anchor:"free",position:0,_id:"y",_length:ve});n(Be,Y.graphDiv._fullLayout),Be.setScale();var Le="M"+te+","+(ne+le)+"h"+ve+"l-"+ve/2+",-"+le+"Z";Y.clipDef.select("path").attr("d",Le),Y.layers.plotbg.select("path").attr("d",Le);var Te="M0,"+le+"h"+ve+"l-"+ve/2+",-"+le+"Z";Y.clipDefRelative.select("path").attr("d",Te);var De=x(te,ne);Y.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",De),Y.clipDefRelative.select("path").attr("transform",null);var Ve=x(te-Oe._offset,ne+le);Y.layers.baxis.attr("transform",Ve),Y.layers.bgrid.attr("transform",Ve);var Ye=x(te+ve/2,ne)+"rotate(30)"+x(0,-Ee._offset);Y.layers.aaxis.attr("transform",Ye),Y.layers.agrid.attr("transform",Ye);var Ne=x(te+ve/2,ne)+"rotate(-30)"+x(0,-Be._offset);Y.layers.caxis.attr("transform",Ne),Y.layers.cgrid.attr("transform",Ne),Y.drawAxes(!0),Y.layers.aline.select("path").attr("d",Ee.showline?"M"+te+","+(ne+le)+"l"+ve/2+",-"+le:"M0,0").call(y.stroke,Ee.linecolor||"#000").style("stroke-width",(Ee.linewidth||0)+"px"),Y.layers.bline.select("path").attr("d",Oe.showline?"M"+te+","+(ne+le)+"h"+ve:"M0,0").call(y.stroke,Oe.linecolor||"#000").style("stroke-width",(Oe.linewidth||0)+"px"),Y.layers.cline.select("path").attr("d",Be.showline?"M"+(te+ve/2)+","+ne+"l"+ve/2+","+le:"M0,0").call(y.stroke,Be.linecolor||"#000").style("stroke-width",(Be.linewidth||0)+"px"),Y.graphDiv._context.staticPlot||Y.initInteractions(),r.setClipUrl(Y.layers.frontplot,Y._hasClipOnAxisFalse?null:Y.clipId,Y.graphDiv)},C.drawAxes=function(G){var U=this,Y=U.graphDiv,ee=U.id.substr(7)+"title",re=U.layers,ie=U.aaxis,se=U.baxis,ce=U.caxis;if(U.drawAx(ie),U.drawAx(se),U.drawAx(ce),G){var q=Math.max(ie.showticklabels?ie.tickfont.size/2:0,(ce.showticklabels?ce.tickfont.size*.75:0)+(ce.ticks==="outside"?ce.ticklen*.87:0)),j=(se.showticklabels?se.tickfont.size:0)+(se.ticks==="outside"?se.ticklen:0)+3;re["a-title"]=c.draw(Y,"a"+ee,{propContainer:ie,propName:U.id+".aaxis.title",placeholder:v(Y,"Click to enter Component A title"),attributes:{x:U.x0+U.w/2,y:U.y0-ie.title.font.size/3-q,"text-anchor":"middle"}}),re["b-title"]=c.draw(Y,"b"+ee,{propContainer:se,propName:U.id+".baxis.title",placeholder:v(Y,"Click to enter Component B title"),attributes:{x:U.x0-j,y:U.y0+U.h+se.title.font.size*.83+j,"text-anchor":"middle"}}),re["c-title"]=c.draw(Y,"c"+ee,{propContainer:ce,propName:U.id+".caxis.title",placeholder:v(Y,"Click to enter Component C title"),attributes:{x:U.x0+U.w+j,y:U.y0+U.h+ce.title.font.size*.83+j,"text-anchor":"middle"}})}},C.drawAx=function(G){var U=this,Y=U.graphDiv,ee=G._name,re=ee.charAt(0),ie=G._id,se=U.layers[ee],ce=30,q=re+"tickLayout",j=o(G);U[q]!==j&&(se.selectAll("."+ie+"tick").remove(),U[q]=j),G.setScale();var Z=f.calcTicks(G),Q=f.clipEnds(G,Z),ue=f.makeTransTickFn(G),fe=f.getTickSigns(G)[2],te=_.deg2rad(ce),ne=fe*(G.linewidth||1)/2,ve=fe*G.ticklen,le=U.w,xe=U.h,Se=re==="b"?"M0,"+ne+"l"+Math.sin(te)*ve+","+Math.cos(te)*ve:"M"+ne+",0l"+Math.cos(te)*ve+","+-Math.sin(te)*ve,Re={a:"M0,0l"+xe+",-"+le/2,b:"M0,0l-"+le/2+",-"+xe,c:"M0,0l-"+xe+","+le/2}[re];f.drawTicks(Y,G,{vals:G.ticks==="inside"?Q:Z,layer:se,path:Se,transFn:ue,crisp:!1}),f.drawGrid(Y,G,{vals:Q,layer:U.layers[re+"grid"],path:Re,transFn:ue,crisp:!1}),f.drawLabels(Y,G,{vals:Z,layer:se,transFn:ue,labelFns:f.makeLabelFns(G,0,ce)})};function o(G){return G.ticks+String(G.ticklen)+String(G.showticklabels)}var R=D.MINZOOM/2+.87,T="m-0.87,.5h"+R+"v3h-"+(R+5.2)+"l"+(R/2+2.6)+",-"+(R*.87+4.5)+"l2.6,1.5l-"+R/2+","+R*.87+"Z",O="m0.87,.5h-"+R+"v3h"+(R+5.2)+"l-"+(R/2+2.6)+",-"+(R*.87+4.5)+"l-2.6,1.5l"+R/2+","+R*.87+"Z",N="m0,1l"+R/2+","+R*.87+"l2.6,-1.5l-"+(R/2+2.6)+",-"+(R*.87+4.5)+"l-"+(R/2+2.6)+","+(R*.87+4.5)+"l2.6,1.5l"+R/2+",-"+R*.87+"Z",H="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",k=!0;C.clearOutline=function(){L(this.dragOptions),M(this.dragOptions.gd)},C.initInteractions=function(){var G=this,U=G.layers.plotbg.select("path").node(),Y=G.graphDiv,ee=Y._fullLayout._zoomlayer,re,ie;this.dragOptions={element:U,gd:Y,plotinfo:{id:G.id,domain:Y._fullLayout[G.id].domain,xaxis:G.xaxis,yaxis:G.yaxis},subplot:G.id,prepFn:function(Ve,Ye,Ne){G.dragOptions.xaxes=[G.xaxis],G.dragOptions.yaxes=[G.yaxis],re=Y._fullLayout._invScaleX,ie=Y._fullLayout._invScaleY;var Xe=G.dragOptions.dragmode=Y._fullLayout.dragmode;p(Xe)?G.dragOptions.minDrag=1:G.dragOptions.minDrag=void 0,Xe==="zoom"?(G.dragOptions.moveFn=Oe,G.dragOptions.clickFn=le,G.dragOptions.doneFn=Be,xe(Ve,Ye,Ne)):Xe==="pan"?(G.dragOptions.moveFn=Te,G.dragOptions.clickFn=le,G.dragOptions.doneFn=De,Le(),G.clearOutline(Y)):(E(Xe)||p(Xe))&&l(Ve,Ye,Ne,G.dragOptions,Xe)}};var se,ce,q,j,Z,Q,ue,fe,te,ne;function ve(Ve){var Ye={};return Ye[G.id+".aaxis.min"]=Ve.a,Ye[G.id+".baxis.min"]=Ve.b,Ye[G.id+".caxis.min"]=Ve.c,Ye}function le(Ve,Ye){var Ne=Y._fullLayout.clickmode;V(Y),Ve===2&&(Y.emit("plotly_doubleclick",null),a.call("_guiRelayout",Y,ve({a:0,b:0,c:0}))),Ne.indexOf("select")>-1&&Ve===1&&m(Ye,Y,[G.xaxis],[G.yaxis],G.id,G.dragOptions),Ne.indexOf("event")>-1&&h.click(Y,Ye,G.id)}function xe(Ve,Ye,Ne){var Xe=U.getBoundingClientRect();se=Ye-Xe.left,ce=Ne-Xe.top,Y._fullLayout._calcInverseTransform(Y);var ht=Y._fullLayout._invTransform,st=_.apply3DTransform(ht)(se,ce);se=st[0],ce=st[1],q={a:G.aaxis.range[0],b:G.baxis.range[1],c:G.caxis.range[1]},Z=q,j=G.aaxis.range[1]-q.a,Q=P(G.graphDiv._fullLayout[G.id].bgcolor).getLuminance(),ue="M0,"+G.h+"L"+G.w/2+", 0L"+G.w+","+G.h+"Z",fe=!1,te=ee.append("path").attr("class","zoombox").attr("transform",x(G.x0,G.y0)).style({fill:Q>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",ue),ne=ee.append("path").attr("class","zoombox-corners").attr("transform",x(G.x0,G.y0)).style({fill:y.background,stroke:y.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),G.clearOutline(Y)}function Se(Ve,Ye){return 1-Ye/G.h}function Re(Ve,Ye){return 1-(Ve+(G.h-Ye)/Math.sqrt(3))/G.w}function Ee(Ve,Ye){return(Ve-(G.h-Ye)/Math.sqrt(3))/G.w}function Oe(Ve,Ye){var Ne=se+Ve*re,Xe=ce+Ye*ie,ht=Math.max(0,Math.min(1,Se(se,ce),Se(Ne,Xe))),st=Math.max(0,Math.min(1,Re(se,ce),Re(Ne,Xe))),it=Math.max(0,Math.min(1,Ee(se,ce),Ee(Ne,Xe))),nt=(ht/2+it)*G.w,pt=(1-ht/2-st)*G.w,Tt=(nt+pt)/2,Et=pt-nt,Dt=(1-ht)*G.h,et=Dt-Et/S;Et<D.MINZOOM?(Z=q,te.attr("d",ue),ne.attr("d","M0,0Z")):(Z={a:q.a+ht*j,b:q.b+st*j,c:q.c+it*j},te.attr("d",ue+"M"+nt+","+Dt+"H"+pt+"L"+Tt+","+et+"L"+nt+","+Dt+"Z"),ne.attr("d","M"+se+","+ce+H+"M"+nt+","+Dt+T+"M"+pt+","+Dt+O+"M"+Tt+","+et+N)),fe||(te.transition().style("fill",Q>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ne.transition().style("opacity",1).duration(200),fe=!0),Y.emit("plotly_relayouting",ve(Z))}function Be(){V(Y),Z!==q&&(a.call("_guiRelayout",Y,ve(Z)),k&&Y.data&&Y._context.showTips&&(_.notifier(v(Y,"Double-click to zoom back out"),"long"),k=!1))}function Le(){q={a:G.aaxis.range[0],b:G.baxis.range[1],c:G.caxis.range[1]},Z=q}function Te(Ve,Ye){var Ne=Ve/G.xaxis._m,Xe=Ye/G.yaxis._m;Z={a:q.a-Xe,b:q.b+(Ne+Xe)/2,c:q.c-(Ne-Xe)/2};var ht=[Z.a,Z.b,Z.c].sort(_.sorterAsc),st={a:ht.indexOf(Z.a),b:ht.indexOf(Z.b),c:ht.indexOf(Z.c)};ht[0]<0&&(ht[1]+ht[0]/2<0?(ht[2]+=ht[0]+ht[1],ht[0]=ht[1]=0):(ht[2]+=ht[0]/2,ht[1]+=ht[0]/2,ht[0]=0),Z={a:ht[st.a],b:ht[st.b],c:ht[st.c]},Ye=(q.a-Z.a)*G.yaxis._m,Ve=(q.c-Z.c-q.b+Z.b)*G.xaxis._m);var it=x(G.x0+Ve,G.y0+Ye);G.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",it);var nt=x(-Ve,-Ye);G.clipDefRelative.select("path").attr("transform",nt),G.aaxis.range=[Z.a,G.sum-Z.b-Z.c],G.baxis.range=[G.sum-Z.a-Z.c,Z.b],G.caxis.range=[G.sum-Z.a-Z.b,Z.c],G.drawAxes(!1),G._hasClipOnAxisFalse&&G.plotContainer.select(".scatterlayer").selectAll(".trace").call(r.hideOutsideRangePoints,G),Y.emit("plotly_relayouting",ve(Z))}function De(){a.call("_guiRelayout",Y,ve(Z))}U.onmousemove=function(Ve){h.hover(Y,Ve,G.id),Y._fullLayout._lasthover=U,Y._fullLayout._hoversubplot=G.id},U.onmouseout=function(Ve){Y._dragging||g.unhover(Y,Ve)},g.init(this.dragOptions)};function V(G){d.select(G).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}},73972:function(z,B,e){var d=e(47769),P=e(64213),a=e(75138),_=e(41965),x=e(24401).addStyleRule,v=e(1426),y=e(9012),r=e(10820),n=v.extendFlat,u=v.extendDeepAll;B.modules={},B.allCategories={},B.allTypes=[],B.subplotsRegistry={},B.transformsRegistry={},B.componentsRegistry={},B.layoutArrayContainers=[],B.layoutArrayRegexes=[],B.traceLayoutAttributes={},B.localeRegistry={},B.apiMethodRegistry={},B.collectableSubplotTypes=null,B.register=function(L){if(B.collectableSubplotTypes=null,L)L&&!Array.isArray(L)&&(L=[L]);else throw new Error("No argument passed to Plotly.register.");for(var D=0;D<L.length;D++){var A=L[D];if(!A)throw new Error("Invalid module was attempted to be registered!");switch(A.moduleType){case"trace":i(A);break;case"transform":h(A);break;case"component":g(A);break;case"locale":b(A);break;case"apiMethod":var C=A.name;B.apiMethodRegistry[C]=A.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},B.getModule=function(M){var L=B.modules[m(M)];return L?L._module:!1},B.traceIs=function(M,L){if(M=m(M),M==="various")return!1;var D=B.modules[M];return D||(M&&d.log("Unrecognized trace type "+M+"."),D=B.modules[y.type.dflt]),!!D.categories[L]},B.getTransformIndices=function(M,L){for(var D=[],A=M.transforms||[],C=0;C<A.length;C++)A[C].type===L&&D.push(C);return D},B.hasTransform=function(M,L){for(var D=M.transforms||[],A=0;A<D.length;A++)if(D[A].type===L)return!0;return!1},B.getComponentMethod=function(M,L){var D=B.componentsRegistry[M];return D&&D[L]||P},B.call=function(){var M=arguments[0],L=[].slice.call(arguments,1);return B.apiMethodRegistry[M].apply(null,L)};function i(M){var L=M.name,D=M.categories,A=M.meta;if(B.modules[L]){d.log("Type "+L+" already registered");return}B.subplotsRegistry[M.basePlotModule.name]||f(M.basePlotModule);for(var C={},S=0;S<D.length;S++)C[D[S]]=!0,B.allCategories[D[S]]=!0;B.modules[L]={_module:M,categories:C},A&&Object.keys(A).length&&(B.modules[L].meta=A),B.allTypes.push(L);for(var o in B.componentsRegistry)E(o,L);M.layoutAttributes&&n(B.traceLayoutAttributes,M.layoutAttributes);var R=M.basePlotModule,T=R.name;if(T==="mapbox"){var O=R.constants.styleRules;for(var N in O)x(".js-plotly-plot .plotly .mapboxgl-"+N,O[N])}(T==="geo"||T==="mapbox")&&window.PlotlyGeoAssets===void 0&&(window.PlotlyGeoAssets={topojson:{}})}function f(M){var L=M.name;if(B.subplotsRegistry[L]){d.log("Plot type "+L+" already registered.");return}p(M),B.subplotsRegistry[L]=M;for(var D in B.componentsRegistry)l(D,M.name)}function g(M){if(typeof M.name!="string")throw new Error("Component module *name* must be a string.");var L=M.name;B.componentsRegistry[L]=M,M.layoutAttributes&&(M.layoutAttributes._isLinkedToArray&&a(B.layoutArrayContainers,L),p(M));for(var D in B.modules)E(L,D);for(var A in B.subplotsRegistry)l(L,A);for(var C in B.transformsRegistry)c(L,C);M.schema&&M.schema.layout&&u(r,M.schema.layout)}function h(M){if(typeof M.name!="string")throw new Error("Transform module *name* must be a string.");var L="Transform module "+M.name,D=typeof M.transform=="function",A=typeof M.calcTransform=="function";if(!D&&!A)throw new Error(L+" is missing a *transform* or *calcTransform* method.");D&&A&&d.log([L+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),_(M.attributes)||d.log(L+" registered without an *attributes* object."),typeof M.supplyDefaults!="function"&&d.log(L+" registered without a *supplyDefaults* method."),B.transformsRegistry[M.name]=M;for(var C in B.componentsRegistry)c(C,M.name)}function b(M){var L=M.name,D=L.split("-")[0],A=M.dictionary,C=M.format,S=A&&Object.keys(A).length,o=C&&Object.keys(C).length,R=B.localeRegistry,T=R[L];if(T||(R[L]=T={}),D!==L){var O=R[D];O||(R[D]=O={}),S&&O.dictionary===T.dictionary&&(O.dictionary=A),o&&O.format===T.format&&(O.format=C)}S&&(T.dictionary=A),o&&(T.format=C)}function p(M){if(M.layoutAttributes){var L=M.layoutAttributes._arrayAttrRegexps;if(L)for(var D=0;D<L.length;D++)a(B.layoutArrayRegexes,L[D])}}function E(M,L){var D=B.componentsRegistry[M].schema;if(!(!D||!D.traces)){var A=D.traces[L];A&&u(B.modules[L]._module.attributes,A)}}function c(M,L){var D=B.componentsRegistry[M].schema;if(!(!D||!D.transforms)){var A=D.transforms[L];A&&u(B.transformsRegistry[L].attributes,A)}}function l(M,L){var D=B.componentsRegistry[M].schema;if(!(!D||!D.subplots)){var A=B.subplotsRegistry[L],C=A.layoutAttributes,S=A.attr==="subplot"?A.name:A.attr;Array.isArray(S)&&(S=S[0]);var o=D.subplots[S];C&&o&&u(C,o)}}function m(M){return typeof M=="object"&&(M=M.type),M}},61914:function(z,B,e){var d=e(73972),P=e(71828),a=P.extendFlat,_=P.extendDeep;function x(y){var r;switch(y){case"themes__thumb":r={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":r={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:r={}}return r}function v(y){var r=["xaxis","yaxis","zaxis"];return r.indexOf(y.slice(0,5))>-1}z.exports=function(r,n){var u,i=r.data,f=r.layout,g=_([],i),h=_({},f,x(n.tileClass)),b=r._context||{};if(n.width&&(h.width=n.width),n.height&&(h.height=n.height),n.tileClass==="thumbnail"||n.tileClass==="themes__thumb"){h.annotations=[];var p=Object.keys(h);for(u=0;u<p.length;u++)v(p[u])&&(h[p[u]].title={text:""});for(u=0;u<g.length;u++){var E=g[u];E.showscale=!1,E.marker&&(E.marker.showscale=!1),d.traceIs(E,"pie-like")&&(E.textposition="none")}}if(Array.isArray(n.annotations))for(u=0;u<n.annotations.length;u++)h.annotations.push(n.annotations[u]);var c=Object.keys(h).filter(function(D){return D.match(/^scene\d*$/)});if(c.length){var l={};for(n.tileClass==="thumbnail"&&(l={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),u=0;u<c.length;u++){var m=h[c[u]];m.xaxis||(m.xaxis={}),m.yaxis||(m.yaxis={}),m.zaxis||(m.zaxis={}),a(m.xaxis,l),a(m.yaxis,l),a(m.zaxis,l),m._scene=null}}var M=document.createElement("div");n.tileClass&&(M.className=n.tileClass);var L={gd:M,td:M,layout:h,data:g,config:{staticPlot:n.staticPlot===void 0?!0:n.staticPlot,plotGlPixelRatio:n.plotGlPixelRatio===void 0?2:n.plotGlPixelRatio,displaylogo:n.displaylogo||!1,showLink:n.showLink||!1,showTips:n.showTips||!1,mapboxAccessToken:b.mapboxAccessToken}};return n.setBackground!=="transparent"&&(L.config.setBackground=n.setBackground||"opaque"),L.gd.defaultLayout=x(n.tileClass),L}},7239:function(z,B,e){var d=e(71828),P=e(403),a=e(22435),_=e(25095);function x(v,y){var r;return d.isPlainObject(v)||(r=d.getGraphDiv(v)),y=y||{},y.format=y.format||"png",y.width=y.width||null,y.height=y.height||null,y.imageDataOnly=!0,new Promise(function(n,u){r&&r._snapshotInProgress&&u(new Error("Snapshotting already in progress.")),d.isIE()&&y.format!=="svg"&&u(new Error(_.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var i=P(v,y),f=y.filename||v.fn||"newplot";f+="."+y.format.replace("-","."),i.then(function(g){return r&&(r._snapshotInProgress=!1),a(g,f,y.format)}).then(function(g){n(g)}).catch(function(g){r&&(r._snapshotInProgress=!1),u(g)})})}z.exports=x},22435:function(z,B,e){var d=e(71828),P=e(25095);function a(_,x,v){var y=document.createElement("a"),r="download"in y,n=new Promise(function(u,i){var f,g;if(d.isIE())return f=P.createBlob(_,"svg"),window.navigator.msSaveBlob(f,x),f=null,u(x);if(r)return f=P.createBlob(_,v),g=P.createObjectURL(f),y.href=g,y.download=x,document.body.appendChild(y),y.click(),document.body.removeChild(y),P.revokeObjectURL(g),f=null,u(x);if(d.isSafari()){var h=v==="svg"?",":";base64,";return P.octetStream(h+encodeURIComponent(_)),u(x)}i(new Error("download error"))});return n}z.exports=a},25095:function(z,B,e){var d=e(73972);B.getDelay=function(_){return _._has&&(_._has("gl3d")||_._has("gl2d")||_._has("mapbox"))?500:0},B.getRedrawFunc=function(_){return function(){d.getComponentMethod("colorbar","draw")(_)}},B.encodeSVG=function(_){return"data:image/svg+xml,"+encodeURIComponent(_)},B.encodeJSON=function(_){return"data:application/json,"+encodeURIComponent(_)};var P=window.URL||window.webkitURL;B.createObjectURL=function(_){return P.createObjectURL(_)},B.revokeObjectURL=function(_){return P.revokeObjectURL(_)},B.createBlob=function(_,x){if(x==="svg")return new window.Blob([_],{type:"image/svg+xml;charset=utf-8"});if(x==="full-json")return new window.Blob([_],{type:"application/json;charset=utf-8"});var v=a(window.atob(_));return new window.Blob([v],{type:"image/"+x})},B.octetStream=function(_){document.location.href="data:application/octet-stream"+_};function a(_){for(var x=_.length,v=new ArrayBuffer(x),y=new Uint8Array(v),r=0;r<x;r++)y[r]=_.charCodeAt(r);return v}B.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/,B.MSG_IE_BAD_FORMAT="Sorry IE does not support downloading from canvas. Try {format:'svg'} instead."},44511:function(z,B,e){var d=e(25095),P={getDelay:d.getDelay,getRedrawFunc:d.getRedrawFunc,clone:e(61914),toSVG:e(5900),svgToImg:e(70942),toImage:e(56395),downloadImage:e(7239)};z.exports=P},70942:function(z,B,e){var d=e(71828),P=e(15398).EventEmitter,a=e(25095);function _(x){var v=x.emitter||new P,y=new Promise(function(r,n){var u=window.Image,i=x.svg,f=x.format||"png";if(d.isIE()&&f!=="svg"){var g=new Error(a.MSG_IE_BAD_FORMAT);return n(g),x.promise?y:v.emit("error",g)}var h=x.canvas,b=x.scale||1,p=x.width||300,E=x.height||150,c=b*p,l=b*E,m=h.getContext("2d",{willReadFrequently:!0}),M=new u,L,D;f==="svg"||d.isSafari()?D=a.encodeSVG(i):(L=a.createBlob(i,"svg"),D=a.createObjectURL(L)),h.width=c,h.height=l,M.onload=function(){var A;switch(L=null,a.revokeObjectURL(D),f!=="svg"&&m.drawImage(M,0,0,c,l),f){case"jpeg":A=h.toDataURL("image/jpeg");break;case"png":A=h.toDataURL("image/png");break;case"webp":A=h.toDataURL("image/webp");break;case"svg":A=D;break;default:var C="Image format is not jpeg, png, svg or webp.";if(n(new Error(C)),!x.promise)return v.emit("error",C)}r(A),x.promise||v.emit("success",A)},M.onerror=function(A){if(L=null,a.revokeObjectURL(D),n(A),!x.promise)return v.emit("error",A)},M.src=D});return x.promise?y:v}z.exports=_},56395:function(z,B,e){var d=e(15398).EventEmitter,P=e(73972),a=e(71828),_=e(25095),x=e(61914),v=e(5900),y=e(70942);function r(n,u){var i=new d,f=x(n,{format:"png"}),g=f.gd;g.style.position="absolute",g.style.left="-5000px",document.body.appendChild(g);function h(){var p=_.getDelay(g._fullLayout);setTimeout(function(){var E=v(g),c=document.createElement("canvas");c.id=a.randstr(),i=y({format:u.format,width:g._fullLayout.width,height:g._fullLayout.height,canvas:c,emitter:i,svg:E}),i.clean=function(){g&&document.body.removeChild(g)}},p)}var b=_.getRedrawFunc(g);return P.call("_doPlot",g,f.data,f.layout,f.config).then(b).then(h).catch(function(p){i.emit("error",p)}),i}z.exports=r},5900:function(z,B,e){var d=e(39898),P=e(71828),a=e(91424),_=e(7901),x=e(77922),v=/"/g,y="TOBESTRIPPED",r=new RegExp('("'+y+")|("+y+'")',"g");function n(i){var f=d.select("body").append("div").style({display:"none"}).html(""),g=i.replace(/(&[^;]*;)/gi,function(h){return h==="&lt;"?"&#60;":h==="&rt;"?"&#62;":h.indexOf("<")!==-1||h.indexOf(">")!==-1?"":f.html(h).text()});return f.remove(),g}function u(i){return i.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")}z.exports=function(f,g,h){var b=f._fullLayout,p=b._paper,E=b._toppaper,c=b.width,l=b.height,m;p.insert("rect",":first-child").call(a.setRect,0,0,c,l).call(_.fill,b.paper_bgcolor);var M=b._basePlotModules||[];for(m=0;m<M.length;m++){var L=M[m];L.toSVG&&L.toSVG(f)}if(E){var D=E.node().childNodes,A=Array.prototype.slice.call(D);for(m=0;m<A.length;m++){var C=A[m];C.childNodes.length&&p.node().appendChild(C)}}b._draggers&&b._draggers.remove(),p.node().style.background="",p.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each(function(){var o=d.select(this);if(this.style.visibility==="hidden"||this.style.display==="none"){o.remove();return}else o.style({visibility:null,display:null});var R=this.style.fontFamily;R&&R.indexOf('"')!==-1&&o.style("font-family",R.replace(v,y))}),p.selectAll(".gradient_filled,.pattern_filled").each(function(){var o=d.select(this),R=this.style.fill;R&&R.indexOf("url(")!==-1&&o.style("fill",R.replace(v,y));var T=this.style.stroke;T&&T.indexOf("url(")!==-1&&o.style("stroke",T.replace(v,y))}),(g==="pdf"||g==="eps")&&p.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),p.node().setAttributeNS(x.xmlns,"xmlns",x.svg),p.node().setAttributeNS(x.xmlns,"xmlns:xlink",x.xlink),g==="svg"&&h&&(p.attr("width",h*c),p.attr("height",h*l),p.attr("viewBox","0 0 "+c+" "+l));var S=new window.XMLSerializer().serializeToString(p.node());return S=n(S),S=u(S),S=S.replace(r,"'"),P.isIE()&&(S=S.replace(/"/gi,"'"),S=S.replace(/(\('#)([^']*)('\))/gi,'("#$2")'),S=S.replace(/(\\')/gi,'"')),S}},75341:function(z,B,e){var d=e(71828);z.exports=function(a,_){for(var x=0;x<a.length;x++)a[x].i=x;d.mergeArray(_.text,a,"tx"),d.mergeArray(_.hovertext,a,"htx");var v=_.marker;if(v){d.mergeArray(v.opacity,a,"mo",!0),d.mergeArray(v.color,a,"mc");var y=v.line;y&&(d.mergeArray(y.color,a,"mlc"),d.mergeArrayCastPositive(y.width,a,"mlw"))}}},1486:function(z,B,e){var d=e(82196),P=e(12663).axisHoverFormat,a=e(5386).f,_=e(5386).s,x=e(50693),v=e(41940),y=e(97313),r=e(79952).u,n=e(1426).extendFlat,u=v({editType:"calc",arrayOk:!0,colorEditType:"style"}),i=d.marker,f=i.line,g=n({},f.width,{dflt:0}),h=n({width:g,editType:"calc"},x("marker.line")),b=n({line:h,editType:"calc"},x("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:r});z.exports={x:d.x,x0:d.x0,dx:d.dx,y:d.y,y0:d.y0,dy:d.dy,xperiod:d.xperiod,yperiod:d.yperiod,xperiod0:d.xperiod0,yperiod0:d.yperiod0,xperiodalignment:d.xperiodalignment,yperiodalignment:d.yperiodalignment,xhoverformat:P("x"),yhoverformat:P("y"),text:d.text,texttemplate:_({editType:"plot"},{keys:y.eventDataKeys}),hovertext:d.hovertext,hovertemplate:a({},{keys:y.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:n({},u,{}),insidetextfont:n({},u,{}),outsidetextfont:n({},u,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:n({},d.cliponaxis,{}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc"},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc"},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc"},marker:b,offsetgroup:d.offsetgroup,alignmentgroup:d.alignmentgroup,selected:{marker:{opacity:d.selected.marker.opacity,color:d.selected.marker.color,editType:"style"},textfont:d.selected.textfont,editType:"style"},unselected:{marker:{opacity:d.unselected.marker.opacity,color:d.unselected.marker.color,editType:"style"},textfont:d.unselected.textfont,editType:"style"},_deprecated:{bardir:{valType:"enumerated",editType:"calc",values:["v","h"]}}}},92290:function(z,B,e){var d=e(89298),P=e(42973),a=e(52075).hasColorscale,_=e(78803),x=e(75341),v=e(66279);z.exports=function(r,n){var u=d.getFromId(r,n.xaxis||"x"),i=d.getFromId(r,n.yaxis||"y"),f,g,h,b,p,E,c={msUTC:!!(n.base||n.base===0)};n.orientation==="h"?(f=u.makeCalcdata(n,"x",c),h=i.makeCalcdata(n,"y"),b=P(n,i,"y",h),p=!!n.yperiodalignment,E="y"):(f=i.makeCalcdata(n,"y",c),h=u.makeCalcdata(n,"x"),b=P(n,u,"x",h),p=!!n.xperiodalignment,E="x"),g=b.vals;for(var l=Math.min(g.length,f.length),m=new Array(l),M=0;M<l;M++)m[M]={p:g[M],s:f[M]},p&&(m[M].orig_p=h[M],m[M][E+"End"]=b.ends[M],m[M][E+"Start"]=b.starts[M]),n.ids&&(m[M].id=String(n.ids[M]));return a(n,"marker")&&_(r,n,{vals:n.marker.color,containerStr:"marker",cLetter:"c"}),a(n,"marker.line")&&_(r,n,{vals:n.marker.line.color,containerStr:"marker.line",cLetter:"c"}),x(m,n),v(m,n),m}},97313:function(z){z.exports={TEXTPAD:3,eventDataKeys:["value","label"]}},11661:function(z,B,e){var d=e(92770),P=e(71828).isArrayOrTypedArray,a=e(50606).BADNUM,_=e(73972),x=e(89298),v=e(99082).getAxisGroup,y=e(61546);function r(S,o){for(var R=o.xaxis,T=o.yaxis,O=S._fullLayout,N=S._fullData,H=S.calcdata,k=[],V=[],G=0;G<N.length;G++){var U=N[G];if(U.visible===!0&&_.traceIs(U,"bar")&&U.xaxis===R._id&&U.yaxis===T._id&&(U.orientation==="h"?k.push(H[G]):V.push(H[G]),U._computePh))for(var Y=S.calcdata[G],ee=0;ee<Y.length;ee++)typeof Y[ee].ph0=="function"&&(Y[ee].ph0=Y[ee].ph0()),typeof Y[ee].ph1=="function"&&(Y[ee].ph1=Y[ee].ph1())}var re={xCat:R.type==="category"||R.type==="multicategory",yCat:T.type==="category"||T.type==="multicategory",mode:O.barmode,norm:O.barnorm,gap:O.bargap,groupgap:O.bargroupgap};n(S,R,T,V,re),n(S,T,R,k,re)}function n(S,o,R,T,O){if(T.length){var N,H,k,V,G;switch(u(R,T),O.mode){case"overlay":i(o,R,T,O);break;case"group":for(N=[],H=[],k=0;k<T.length;k++)V=T[k],G=V[0].trace,G.offset===void 0?H.push(V):N.push(V);H.length&&f(S,o,R,H,O),N.length&&i(o,R,N,O);break;case"stack":case"relative":for(N=[],H=[],k=0;k<T.length;k++)V=T[k],G=V[0].trace,G.base===void 0?H.push(V):N.push(V);H.length&&g(S,o,R,H,O),N.length&&i(o,R,N,O);break}A(T,o)}}function u(S,o){var R,T;for(R=0;R<o.length;R++){var O=o[R],N=O[0].trace,H=N.type==="funnel"?N._base:N.base,k,V=N.orientation==="h"?N.xcalendar:N.ycalendar,G=S.type==="category"||S.type==="multicategory"?function(){return null}:S.d2c;if(P(H)){for(T=0;T<Math.min(H.length,O.length);T++)k=G(H[T],0,V),d(k)?(O[T].b=+k,O[T].hasB=1):O[T].b=0;for(;T<O.length;T++)O[T].b=0}else{k=G(H,0,V);var U=d(k);for(k=U?k:0,T=0;T<O.length;T++)O[T].b=k,U&&(O[T].hasB=1)}}}function i(S,o,R,T){for(var O=0;O<R.length;O++){var N=R[O],H=new y([N],{posAxis:S,sepNegVal:!1,overlapNoMerge:!T.norm});h(S,H,T),T.norm?(M(H),D(o,H,T)):l(o,H)}}function f(S,o,R,T,O){var N=new y(T,{posAxis:o,sepNegVal:!1,overlapNoMerge:!O.norm});b(S,o,N,O),L(N,o),O.norm?(M(N),D(R,N,O)):l(R,N)}function g(S,o,R,T,O){var N=new y(T,{posAxis:o,sepNegVal:O.mode==="relative",overlapNoMerge:!(O.norm||O.mode==="stack"||O.mode==="relative")});h(o,N,O),m(R,N,O);for(var H=0;H<T.length;H++)for(var k=T[H],V=0;V<k.length;V++){var G=k[V];if(G.s!==a){var U=G.b+G.s===N.get(G.p,G.s);U&&(G._outmost=!0)}}O.norm&&D(R,N,O)}function h(S,o,R){for(var T=o.minDiff,O=o.traces,N=T*(1-R.gap),H=N,k=H*(1-(R.groupgap||0)),V=-k/2,G=0;G<O.length;G++){var U=O[G],Y=U[0].t;Y.barwidth=k,Y.poffset=V,Y.bargroupwidth=N,Y.bardelta=T}o.binWidth=O[0][0].t.barwidth/100,p(o),E(S,o),c(S,o)}function b(S,o,R,T){for(var O=S._fullLayout,N=R.positions,H=R.distinctPositions,k=R.minDiff,V=R.traces,G=V.length,U=N.length!==H.length,Y=k*(1-T.gap),ee=v(O,o._id)+V[0][0].trace.orientation,re=O._alignmentOpts[ee]||{},ie=0;ie<G;ie++){var se=V[ie],ce=se[0].trace,q=re[ce.alignmentgroup]||{},j=Object.keys(q.offsetGroups||{}).length,Z;j?Z=Y/j:Z=U?Y/G:Y;var Q=Z*(1-(T.groupgap||0)),ue;j?ue=((2*ce._offsetIndex+1-j)*Z-Q)/2:ue=U?((2*ie+1-G)*Z-Q)/2:-Q/2;var fe=se[0].t;fe.barwidth=Q,fe.poffset=ue,fe.bargroupwidth=Y,fe.bardelta=k}R.binWidth=V[0][0].t.barwidth/100,p(R),E(o,R),c(o,R,U)}function p(S){var o=S.traces,R,T;for(R=0;R<o.length;R++){var O=o[R],N=O[0],H=N.trace,k=N.t,V=H._offset||H.offset,G=k.poffset,U;if(P(V)){for(U=Array.prototype.slice.call(V,0,O.length),T=0;T<U.length;T++)d(U[T])||(U[T]=G);for(T=U.length;T<O.length;T++)U.push(G);k.poffset=U}else V!==void 0&&(k.poffset=V);var Y=H._width||H.width,ee=k.barwidth;if(P(Y)){var re=Array.prototype.slice.call(Y,0,O.length);for(T=0;T<re.length;T++)d(re[T])||(re[T]=ee);for(T=re.length;T<O.length;T++)re.push(ee);if(k.barwidth=re,V===void 0){for(U=[],T=0;T<O.length;T++)U.push(G+(ee-re[T])/2);k.poffset=U}}else Y!==void 0&&(k.barwidth=Y,V===void 0&&(k.poffset=G+(ee-Y)/2))}}function E(S,o){for(var R=o.traces,T=C(S),O=0;O<R.length;O++)for(var N=R[O],H=N[0].t,k=H.poffset,V=Array.isArray(k),G=H.barwidth,U=Array.isArray(G),Y=0;Y<N.length;Y++){var ee=N[Y],re=ee.w=U?G[Y]:G;ee.p===void 0&&(ee.p=ee[T],ee["orig_"+T]=ee[T]);var ie=(V?k[Y]:k)+re/2;ee[T]=ee.p+ie}}function c(S,o,R){var T=o.traces,O=o.minDiff,N=O/2;x.minDtick(S,o.minDiff,o.distinctPositions[0],R);for(var H=0;H<T.length;H++){var k=T[H],V=k[0],G=V.trace,U=[],Y,ee,re,ie;for(ie=0;ie<k.length;ie++)Y=k[ie],ee=Y.p-N,re=Y.p+N,U.push(ee,re);if(G.width||G.offset){var se=V.t,ce=se.poffset,q=se.barwidth,j=Array.isArray(ce),Z=Array.isArray(q);for(ie=0;ie<k.length;ie++){Y=k[ie];var Q=j?ce[ie]:ce,ue=Z?q[ie]:q;ee=Y.p+Q,re=ee+ue,U.push(ee,re)}}G._extremes[S._id]=x.findExtremes(S,U,{padded:!1})}}function l(S,o){for(var R=o.traces,T=C(S),O=0;O<R.length;O++){for(var N=R[O],H=N[0].trace,k=H.type==="scatter",V=H.orientation==="v",G=[],U=!1,Y=0;Y<N.length;Y++){var ee=N[Y],re=k?0:ee.b,ie=k?V?ee.y:ee.x:re+ee.s;ee[T]=ie,G.push(ie),ee.hasB&&G.push(re),(!ee.hasB||!ee.b)&&(U=!0)}H._extremes[S._id]=x.findExtremes(S,G,{tozero:U,padded:!0})}}function m(S,o,R){var T=C(S),O=o.traces,N,H,k,V,G,U;for(V=0;V<O.length;V++)if(N=O[V],H=N[0].trace,H.type==="funnel")for(G=0;G<N.length;G++)U=N[G],U.s!==a&&o.put(U.p,-.5*U.s);for(V=0;V<O.length;V++){N=O[V],H=N[0].trace,k=H.type==="funnel";var Y=[];for(G=0;G<N.length;G++)if(U=N[G],U.s!==a){var ee;k?ee=U.s:ee=U.s+U.b;var re=o.put(U.p,ee),ie=re+ee;U.b=re,U[T]=ie,R.norm||(Y.push(ie),U.hasB&&Y.push(re))}R.norm||(H._extremes[S._id]=x.findExtremes(S,Y,{tozero:!0,padded:!0}))}}function M(S){for(var o=S.traces,R=0;R<o.length;R++)for(var T=o[R],O=0;O<T.length;O++){var N=T[O];N.s!==a&&S.put(N.p,N.b+N.s)}}function L(S,o){for(var R=S.traces,T=0;T<R.length;T++){var O=R[T],N=O[0].trace;if(N.base===void 0)for(var H=new y([O],{posAxis:o,sepNegVal:!0,overlapNoMerge:!0}),k=0;k<O.length;k++){var V=O[k];if(V.p!==a){var G=H.put(V.p,V.b+V.s);G&&(V.b=G)}}}}function D(S,o,R){var T=o.traces,O=C(S),N=R.norm==="fraction"?1:100,H=N/1e9,k=S.l2c(S.c2l(0)),V=R.mode==="stack"?N:k;function G(ue){return d(S.c2l(ue))&&(ue<k-H||ue>V+H||!d(k))}for(var U=0;U<T.length;U++){for(var Y=T[U],ee=Y[0].trace,re=[],ie=!1,se=!1,ce=0;ce<Y.length;ce++){var q=Y[ce];if(q.s!==a){var j=Math.abs(N/o.get(q.p,q.s));q.b*=j,q.s*=j;var Z=q.b,Q=Z+q.s;q[O]=Q,re.push(Q),se=se||G(Q),q.hasB&&(re.push(Z),se=se||G(Z)),(!q.hasB||!q.b)&&(ie=!0)}}ee._extremes[S._id]=x.findExtremes(S,re,{tozero:ie,padded:se})}}function A(S,o){var R=C(o),T={},O,N,H,k=1/0,V=-1/0;for(O=0;O<S.length;O++)for(H=S[O],N=0;N<H.length;N++){var G=H[N].p;d(G)&&(k=Math.min(k,G),V=Math.max(V,G))}var U=1e4/(V-k),Y=T.round=function(j){return String(Math.round(U*(j-k)))};for(O=0;O<S.length;O++){H=S[O],H[0].t.extents=T;var ee=H[0].t.poffset,re=Array.isArray(ee);for(N=0;N<H.length;N++){var ie=H[N],se=ie[R]-ie.w/2;if(d(se)){var ce=ie[R]+ie.w/2,q=Y(ie.p);T[q]?T[q]=[Math.min(se,T[q][0]),Math.max(ce,T[q][1])]:T[q]=[se,ce]}ie.p0=ie.p+(re?ee[N]:ee),ie.p1=ie.p0+ie.w,ie.s0=ie.b,ie.s1=ie.s0+ie.s}}}function C(S){return S._id.charAt(0)}z.exports={crossTraceCalc:r,setGroupPositions:n}},90769:function(z,B,e){var d=e(71828),P=e(7901),a=e(73972),_=e(67513),x=e(73927),v=e(98340),y=e(26125),r=e(1486),n=d.coerceFont;function u(g,h,b,p){function E(L,D){return d.coerce(g,h,r,L,D)}var c=_(g,h,p,E);if(!c){h.visible=!1;return}x(g,h,p,E),E("xhoverformat"),E("yhoverformat"),E("orientation",h.x&&!h.y?"h":"v"),E("base"),E("offset"),E("width"),E("text"),E("hovertext"),E("hovertemplate");var l=E("textposition");f(g,h,p,E,l,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),v(g,h,E,b,p);var m=(h.marker.line||{}).color,M=a.getComponentMethod("errorbars","supplyDefaults");M(g,h,m||P.defaultLine,{axis:"y"}),M(g,h,m||P.defaultLine,{axis:"x",inherit:"y"}),d.coerceSelectionMarkerOpacity(h,E)}function i(g,h){var b,p;function E(l){return d.coerce(p._input,p,r,l)}if(h.barmode==="group")for(var c=0;c<g.length;c++)p=g[c],p.type==="bar"&&(b=p._input,y(b,p,h,E))}function f(g,h,b,p,E,c){c=c||{};var l=c.moduleHasSelected!==!1,m=c.moduleHasUnselected!==!1,M=c.moduleHasConstrain!==!1,L=c.moduleHasCliponaxis!==!1,D=c.moduleHasTextangle!==!1,A=c.moduleHasInsideanchor!==!1,C=!!c.hasPathbar,S=Array.isArray(E)||E==="auto",o=S||E==="inside",R=S||E==="outside";if(o||R){var T=n(p,"textfont",b.font),O=d.extendFlat({},T),N=g.textfont&&g.textfont.color,H=!N;if(H&&delete O.color,n(p,"insidetextfont",O),C){var k=d.extendFlat({},T);H&&delete k.color,n(p,"pathbar.textfont",k)}R&&n(p,"outsidetextfont",T),l&&p("selected.textfont.color"),m&&p("unselected.textfont.color"),M&&p("constraintext"),L&&p("cliponaxis"),D&&p("textangle"),p("texttemplate")}o&&A&&p("insidetextanchor")}z.exports={supplyDefaults:u,crossTraceDefaults:i,handleText:f}},58065:function(z){z.exports=function(e,d,P){return e.x="xVal"in d?d.xVal:d.x,e.y="yVal"in d?d.yVal:d.y,d.xa&&(e.xaxis=d.xa),d.ya&&(e.yaxis=d.ya),P.orientation==="h"?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e}},69383:function(z,B,e){var d=e(92770),P=e(84267),a=e(71828).isArrayOrTypedArray;B.coerceString=function(_,x,v){if(typeof x=="string"){if(x||!_.noBlank)return x}else if((typeof x=="number"||x===!0)&&!_.strict)return String(x);return v!==void 0?v:_.dflt},B.coerceNumber=function(_,x,v){if(d(x)){x=+x;var y=_.min,r=_.max,n=y!==void 0&&x<y||r!==void 0&&x>r;if(!n)return x}return v!==void 0?v:_.dflt},B.coerceColor=function(_,x,v){return P(x).isValid()?x:v!==void 0?v:_.dflt},B.coerceEnumerated=function(_,x,v){return _.coerceNumber&&(x=+x),_.values.indexOf(x)!==-1?x:v!==void 0?v:_.dflt},B.getValue=function(_,x){var v;return Array.isArray(_)?x<_.length&&(v=_[x]):v=_,v},B.getLineWidth=function(_,x){var v=0<x.mlw?x.mlw:a(_.marker.line.width)?0:_.marker.line.width;return v}},95423:function(z,B,e){var d=e(30211),P=e(73972),a=e(7901),_=e(71828).fillText,x=e(69383).getLineWidth,v=e(89298).hoverLabelText,y=e(50606).BADNUM;function r(i,f,g,h,b){var p=n(i,f,g,h,b);if(p){var E=p.cd,c=E[0].trace,l=E[p.index];return p.color=u(c,l),P.getComponentMethod("errorbars","hoverInfo")(l,c,p),[p]}}function n(i,f,g,h,b){var p=i.cd,E=p[0].trace,c=p[0].t,l=h==="closest",m=E.type==="waterfall",M=i.maxHoverDistance,L=i.maxSpikeDistance,D,A,C,S,o,R,T;E.orientation==="h"?(D=g,A=f,C="y",S="x",o=ce,R=re):(D=f,A=g,C="x",S="y",R=ce,o=re);var O=E[C+"period"],N=l||O;function H(xe){return V(xe,-1)}function k(xe){return V(xe,1)}function V(xe,Se){var Re=xe.w;return xe[C]+Se*Re/2}function G(xe){return xe[C+"End"]-xe[C+"Start"]}var U=l?H:O?function(xe){return xe.p-G(xe)/2}:function(xe){return Math.min(H(xe),xe.p-c.bardelta/2)},Y=l?k:O?function(xe){return xe.p+G(xe)/2}:function(xe){return Math.max(k(xe),xe.p+c.bardelta/2)};function ee(xe,Se,Re){return b.finiteRange&&(Re=0),d.inbox(xe-D,Se-D,Re+Math.min(1,Math.abs(Se-xe)/T)-1)}function re(xe){return ee(U(xe),Y(xe),M)}function ie(xe){return ee(H(xe),k(xe),L)}function se(xe){var Se=xe[S];if(m){var Re=Math.abs(xe.rawS)||0;A>0?Se+=Re:A<0&&(Se-=Re)}return Se}function ce(xe){var Se=A,Re=xe.b,Ee=se(xe);return d.inbox(Re-Se,Ee-Se,M+(Ee-Se)/(Ee-Re)-1)}function q(xe){var Se=A,Re=xe.b,Ee=se(xe);return d.inbox(Re-Se,Ee-Se,L+(Ee-Se)/(Ee-Re)-1)}var j=i[C+"a"],Z=i[S+"a"];T=Math.abs(j.r2c(j.range[1])-j.r2c(j.range[0]));function Q(xe){return(o(xe)+R(xe))/2}var ue=d.getDistanceFunction(h,o,R,Q);if(d.getClosest(p,ue,i),i.index!==!1&&p[i.index].p!==y){N||(U=function(xe){return Math.min(H(xe),xe.p-c.bargroupwidth/2)},Y=function(xe){return Math.max(k(xe),xe.p+c.bargroupwidth/2)});var fe=i.index,te=p[fe],ne=E.base?te.b+te.s:te.s;i[S+"0"]=i[S+"1"]=Z.c2p(te[S],!0),i[S+"LabelVal"]=ne;var ve=c.extents[c.extents.round(te.p)];i[C+"0"]=j.c2p(l?U(te):ve[0],!0),i[C+"1"]=j.c2p(l?Y(te):ve[1],!0);var le=te.orig_p!==void 0;return i[C+"LabelVal"]=le?te.orig_p:te.p,i.labelLabel=v(j,i[C+"LabelVal"],E[C+"hoverformat"]),i.valueLabel=v(Z,i[S+"LabelVal"],E[S+"hoverformat"]),i.baseLabel=v(Z,te.b,E[S+"hoverformat"]),i.spikeDistance=(q(te)+ie(te))/2,i[C+"Spike"]=j.c2p(te.p,!0),_(te,E,i),i.hovertemplate=E.hovertemplate,i}}function u(i,f){var g=f.mcc||i.marker.color,h=f.mlcc||i.marker.line.color,b=x(i,f);if(a.opacity(g))return g;if(a.opacity(h)&&b)return h}z.exports={hoverPoints:r,hoverOnBars:n,getTraceColor:u}},60822:function(z,B,e){z.exports={attributes:e(1486),layoutAttributes:e(43641),supplyDefaults:e(90769).supplyDefaults,crossTraceDefaults:e(90769).crossTraceDefaults,supplyLayoutDefaults:e(13957),calc:e(92290),crossTraceCalc:e(11661).crossTraceCalc,colorbar:e(4898),arraysToCalcdata:e(75341),plot:e(17295).plot,style:e(16688).style,styleOnSelect:e(16688).styleOnSelect,hoverPoints:e(95423).hoverPoints,eventData:e(58065),selectPoints:e(81974),moduleType:"trace",name:"bar",basePlotModule:e(93612),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},43641:function(z){z.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},13957:function(z,B,e){var d=e(73972),P=e(89298),a=e(71828),_=e(43641);z.exports=function(x,v,y){function r(c,l){return a.coerce(x,v,_,c,l)}for(var n=!1,u=!1,i=!1,f={},g=r("barmode"),h=0;h<y.length;h++){var b=y[h];if(d.traceIs(b,"bar")&&b.visible)n=!0;else continue;if(g==="group"){var p=b.xaxis+b.yaxis;f[p]&&(i=!0),f[p]=!0}if(b.visible&&b.type==="histogram"){var E=P.getFromId({_fullLayout:v},b[b.orientation==="v"?"xaxis":"yaxis"]);E.type!=="category"&&(u=!0)}}if(!n){delete v.barmode;return}g!=="overlay"&&r("barnorm"),r("bargap",u&&!i?0:.2),r("bargroupgap")}},17295:function(z,B,e){var d=e(39898),P=e(92770),a=e(71828),_=e(63893),x=e(7901),v=e(91424),y=e(73972),r=e(89298).tickText,n=e(72597),u=n.recordMinTextSize,i=n.clearMinTextSize,f=e(16688),g=e(69383),h=e(97313),b=e(1486),p=b.text,E=b.textposition,c=e(23469).appendArrayPointValue,l=h.TEXTPAD;function m(U){return U.id}function M(U){if(U.ids)return m}function L(U,Y){return U<Y?1:-1}function D(U,Y,ee,re){var ie=[],se=[],ce=re?Y:ee,q=re?ee:Y;return ie[0]=ce.c2p(U.s0,!0),se[0]=q.c2p(U.p0,!0),ie[1]=ce.c2p(U.s1,!0),se[1]=q.c2p(U.p1,!0),re?[ie,se]:[se,ie]}function A(U,Y,ee,re){if(!Y.uniformtext.mode&&C(ee)){var ie;return re&&(ie=re()),U.transition().duration(ee.duration).ease(ee.easing).each("end",function(){ie&&ie()}).each("interrupt",function(){ie&&ie()})}else return U}function C(U){return U&&U.duration>0}function S(U,Y,ee,re,ie,se){var ce=Y.xaxis,q=Y.yaxis,j=U._fullLayout,Z=U._context.staticPlot;ie||(ie={mode:j.barmode,norm:j.barmode,gap:j.bargap,groupgap:j.bargroupgap},i("bar",j));var Q=a.makeTraceGroups(re,ee,"trace bars").each(function(ue){var fe=d.select(this),te=ue[0].trace,ne=te.type==="waterfall",ve=te.type==="funnel",le=te.type==="bar",xe=le||ve,Se=0;ne&&te.connector.visible&&te.connector.mode==="between"&&(Se=te.connector.line.width/2);var Re=te.orientation==="h",Ee=C(ie),Oe=a.ensureSingle(fe,"g","points"),Be=M(te),Le=Oe.selectAll("g.point").data(a.identity,Be);Le.enter().append("g").classed("point",!0),Le.exit().remove(),Le.each(function(De,Ve){var Ye=d.select(this),Ne=D(De,ce,q,Re),Xe=Ne[0][0],ht=Ne[0][1],st=Ne[1][0],it=Ne[1][1],nt=(Re?ht-Xe:it-st)===0;nt&&xe&&g.getLineWidth(te,De)&&(nt=!1),nt||(nt=!P(Xe)||!P(ht)||!P(st)||!P(it)),De.isBlank=nt,nt&&(Re?ht=Xe:it=st),Se&&!nt&&(Re?(Xe-=L(Xe,ht)*Se,ht+=L(Xe,ht)*Se):(st-=L(st,it)*Se,it+=L(st,it)*Se));var pt,Tt;if(te.type==="waterfall"){if(!nt){var Et=te[De.dir].marker;pt=Et.line.width,Tt=Et.color}}else pt=g.getLineWidth(te,De),Tt=De.mc||te.marker.color;function Dt(Qe){var Fe=d.round(pt/2%1,2);return ie.gap===0&&ie.groupgap===0?d.round(Math.round(Qe)-Fe,2):Qe}function et(Qe,Fe,Ce){return Ce&&Qe===Fe?Qe:Math.abs(Qe-Fe)>=2?Dt(Qe):Qe>Fe?Math.ceil(Qe):Math.floor(Qe)}if(!U._context.staticPlot){var Ue=x.opacity(Tt),ze=Ue<1||pt>.01?Dt:et;Xe=ze(Xe,ht,Re),ht=ze(ht,Xe,Re),st=ze(st,it,!Re),it=ze(it,st,!Re)}var rt=A(a.ensureSingle(Ye,"path"),j,ie,se);if(rt.style("vector-effect",Z?"none":"non-scaling-stroke").attr("d",isNaN((ht-Xe)*(it-st))||nt&&U._context.staticPlot?"M0,0Z":"M"+Xe+","+st+"V"+it+"H"+ht+"V"+st+"Z").call(v.setClipUrl,Y.layerClipId,U),!j.uniformtext.mode&&Ee){var lt=v.makePointStyleFns(te);v.singlePointStyle(De,rt,te,lt,U)}o(U,Y,Ye,ue,Ve,Xe,ht,st,it,ie,se),Y.layerClipId&&v.hideOutsideRangePoint(De,Ye.select("text"),ce,q,te.xcalendar,te.ycalendar)});var Te=te.cliponaxis===!1;v.setClipUrl(fe,Te?null:Y.layerClipId,U)});y.getComponentMethod("errorbars","plot")(U,Q,Y,ie)}function o(U,Y,ee,re,ie,se,ce,q,j,Z,Q){var ue=Y.xaxis,fe=Y.yaxis,te=U._fullLayout,ne;function ve(Qe,Fe,Ce){var pe=a.ensureSingle(Qe,"text").text(Fe).attr({class:"bartext bartext-"+ne,"text-anchor":"middle","data-notex":1}).call(v.font,Ce).call(_.convertToTspans,U);return pe}var le=re[0].trace,xe=le.orientation==="h",Se=H(te,re,ie,ue,fe);ne=k(le,ie);var Re=Z.mode==="stack"||Z.mode==="relative",Ee=re[ie],Oe=!Re||Ee._outmost;if(!Se||ne==="none"||(Ee.isBlank||se===ce||q===j)&&(ne==="auto"||ne==="inside")){ee.select("text").remove();return}var Be=te.font,Le=f.getBarColor(re[ie],le),Te=f.getInsideTextFont(le,ie,Be,Le),De=f.getOutsideTextFont(le,ie,Be),Ve=ee.datum();xe?ue.type==="log"&&Ve.s0<=0&&(ue.range[0]<ue.range[1]?se=0:se=ue._length):fe.type==="log"&&Ve.s0<=0&&(fe.range[0]<fe.range[1]?q=fe._length:q=0);var Ye=Math.abs(ce-se)-2*l,Ne=Math.abs(j-q)-2*l,Xe,ht,st,it,nt;if(ne==="outside"&&!Oe&&!Ee.hasB&&(ne="inside"),ne==="auto")if(Oe){ne="inside",nt=a.ensureUniformFontSize(U,Te),Xe=ve(ee,Se,nt),ht=v.bBox(Xe.node()),st=ht.width,it=ht.height;var pt=st>0&&it>0,Tt=st<=Ye&&it<=Ne,Et=st<=Ne&&it<=Ye,Dt=xe?Ye>=st*(Ne/it):Ne>=it*(Ye/st);pt&&(Tt||Et||Dt)?ne="inside":(ne="outside",Xe.remove(),Xe=null)}else ne="inside";if(!Xe){nt=a.ensureUniformFontSize(U,ne==="outside"?De:Te),Xe=ve(ee,Se,nt);var et=Xe.attr("transform");if(Xe.attr("transform",""),ht=v.bBox(Xe.node()),st=ht.width,it=ht.height,Xe.attr("transform",et),st<=0||it<=0){Xe.remove();return}}var Ue=le.textangle,ze,rt;ne==="outside"?(rt=le.constraintext==="both"||le.constraintext==="outside",ze=N(se,ce,q,j,ht,{isHorizontal:xe,constrained:rt,angle:Ue})):(rt=le.constraintext==="both"||le.constraintext==="inside",ze=O(se,ce,q,j,ht,{isHorizontal:xe,constrained:rt,angle:Ue,anchor:le.insidetextanchor})),ze.fontSize=nt.size,u(le.type==="histogram"?"bar":le.type,ze,te),Ee.transform=ze;var lt=A(Xe,te,Z,Q);a.setTransormAndDisplay(lt,ze)}function R(U){return U==="auto"?0:U}function T(U,Y){var ee=Math.PI/180*Y,re=Math.abs(Math.sin(ee)),ie=Math.abs(Math.cos(ee));return{x:U.width*ie+U.height*re,y:U.width*re+U.height*ie}}function O(U,Y,ee,re,ie,se){var ce=!!se.isHorizontal,q=!!se.constrained,j=se.angle||0,Z=se.anchor||"end",Q=Z==="end",ue=Z==="start",fe=se.leftToRight||0,te=(fe+1)/2,ne=1-te,ve=ie.width,le=ie.height,xe=Math.abs(Y-U),Se=Math.abs(re-ee),Re=xe>2*l&&Se>2*l?l:0;xe-=2*Re,Se-=2*Re;var Ee=R(j);j==="auto"&&!(ve<=xe&&le<=Se)&&(ve>xe||le>Se)&&(!(ve>Se||le>xe)||ve<le!=xe<Se)&&(Ee+=90);var Oe=T(ie,Ee),Be=1;q&&(Be=Math.min(1,xe/Oe.x,Se/Oe.y));var Le=ie.left*ne+ie.right*te,Te=(ie.top+ie.bottom)/2,De=(U+l)*ne+(Y-l)*te,Ve=(ee+re)/2,Ye=0,Ne=0;if(ue||Q){var Xe=(ce?Oe.x:Oe.y)/2,ht=ce?L(U,Y):L(ee,re);ce?ue?(De=U+ht*Re,Ye=-ht*Xe):(De=Y-ht*Re,Ye=ht*Xe):ue?(Ve=ee+ht*Re,Ne=-ht*Xe):(Ve=re-ht*Re,Ne=ht*Xe)}return{textX:Le,textY:Te,targetX:De,targetY:Ve,anchorX:Ye,anchorY:Ne,scale:Be,rotate:Ee}}function N(U,Y,ee,re,ie,se){var ce=!!se.isHorizontal,q=!!se.constrained,j=se.angle||0,Z=ie.width,Q=ie.height,ue=Math.abs(Y-U),fe=Math.abs(re-ee),te;ce?te=fe>2*l?l:0:te=ue>2*l?l:0;var ne=1;q&&(ne=ce?Math.min(1,fe/Q):Math.min(1,ue/Z));var ve=R(j),le=T(ie,ve),xe=(ce?le.x:le.y)/2,Se=(ie.left+ie.right)/2,Re=(ie.top+ie.bottom)/2,Ee=(U+Y)/2,Oe=(ee+re)/2,Be=0,Le=0,Te=ce?L(Y,U):L(ee,re);return ce?(Ee=Y-Te*te,Be=Te*xe):(Oe=re+Te*te,Le=-Te*xe),{textX:Se,textY:Re,targetX:Ee,targetY:Oe,anchorX:Be,anchorY:Le,scale:ne,rotate:ve}}function H(U,Y,ee,re,ie){var se=Y[0].trace,ce=se.texttemplate,q;return ce?q=V(U,Y,ee,re,ie):se.textinfo?q=G(Y,ee,re,ie):q=g.getValue(se.text,ee),g.coerceString(p,q)}function k(U,Y){var ee=g.getValue(U.textposition,Y);return g.coerceEnumerated(E,ee)}function V(U,Y,ee,re,ie){var se=Y[0].trace,ce=a.castOption(se,ee,"texttemplate");if(!ce)return"";var q=se.type==="histogram",j=se.type==="waterfall",Z=se.type==="funnel",Q=se.orientation==="h",ue,fe,te,ne;Q?(ue="y",fe=ie,te="x",ne=re):(ue="x",fe=re,te="y",ne=ie);function ve(Be){return r(fe,fe.c2l(Be),!0).text}function le(Be){return r(ne,ne.c2l(Be),!0).text}var xe=Y[ee],Se={};Se.label=xe.p,Se.labelLabel=Se[ue+"Label"]=ve(xe.p);var Re=a.castOption(se,xe.i,"text");(Re===0||Re)&&(Se.text=Re),Se.value=xe.s,Se.valueLabel=Se[te+"Label"]=le(xe.s);var Ee={};c(Ee,se,xe.i),(q||Ee.x===void 0)&&(Ee.x=Q?Se.value:Se.label),(q||Ee.y===void 0)&&(Ee.y=Q?Se.label:Se.value),(q||Ee.xLabel===void 0)&&(Ee.xLabel=Q?Se.valueLabel:Se.labelLabel),(q||Ee.yLabel===void 0)&&(Ee.yLabel=Q?Se.labelLabel:Se.valueLabel),j&&(Se.delta=+xe.rawS||xe.s,Se.deltaLabel=le(Se.delta),Se.final=xe.v,Se.finalLabel=le(Se.final),Se.initial=Se.final-Se.delta,Se.initialLabel=le(Se.initial)),Z&&(Se.value=xe.s,Se.valueLabel=le(Se.value),Se.percentInitial=xe.begR,Se.percentInitialLabel=a.formatPercent(xe.begR),Se.percentPrevious=xe.difR,Se.percentPreviousLabel=a.formatPercent(xe.difR),Se.percentTotal=xe.sumR,Se.percenTotalLabel=a.formatPercent(xe.sumR));var Oe=a.castOption(se,xe.i,"customdata");return Oe&&(Se.customdata=Oe),a.texttemplateString(ce,Se,U._d3locale,Ee,Se,se._meta||{})}function G(U,Y,ee,re){var ie=U[0].trace,se=ie.orientation==="h",ce=ie.type==="waterfall",q=ie.type==="funnel";function j(Oe){var Be=se?re:ee;return r(Be,Oe,!0).text}function Z(Oe){var Be=se?ee:re;return r(Be,+Oe,!0).text}var Q=ie.textinfo,ue=U[Y],fe=Q.split("+"),te=[],ne,ve=function(Oe){return fe.indexOf(Oe)!==-1};if(ve("label")&&te.push(j(U[Y].p)),ve("text")&&(ne=a.castOption(ie,ue.i,"text"),(ne===0||ne)&&te.push(ne)),ce){var le=+ue.rawS||ue.s,xe=ue.v,Se=xe-le;ve("initial")&&te.push(Z(Se)),ve("delta")&&te.push(Z(le)),ve("final")&&te.push(Z(xe))}if(q){ve("value")&&te.push(Z(ue.s));var Re=0;ve("percent initial")&&Re++,ve("percent previous")&&Re++,ve("percent total")&&Re++;var Ee=Re>1;ve("percent initial")&&(ne=a.formatPercent(ue.begR),Ee&&(ne+=" of initial"),te.push(ne)),ve("percent previous")&&(ne=a.formatPercent(ue.difR),Ee&&(ne+=" of previous"),te.push(ne)),ve("percent total")&&(ne=a.formatPercent(ue.sumR),Ee&&(ne+=" of total"),te.push(ne))}return te.join("<br>")}z.exports={plot:S,toMoveInsideBar:O}},81974:function(z){z.exports=function(d,P){var a=d.cd,_=d.xaxis,x=d.yaxis,v=a[0].trace,y=v.type==="funnel",r=v.orientation==="h",n=[],u;if(P===!1)for(u=0;u<a.length;u++)a[u].selected=0;else for(u=0;u<a.length;u++){var i=a[u],f="ct"in i?i.ct:B(i,_,x,r,y);P.contains(f,!1,u,d)?(n.push({pointNumber:u,x:_.c2d(i.x),y:x.c2d(i.y)}),i.selected=1):i.selected=0}return n};function B(e,d,P,a,_){var x=d.c2p(a?e.s0:e.p0,!0),v=d.c2p(a?e.s1:e.p1,!0),y=P.c2p(a?e.p0:e.s0,!0),r=P.c2p(a?e.p1:e.s1,!0);return _?[(x+v)/2,(y+r)/2]:a?[v,(y+r)/2]:[(x+v)/2,r]}},61546:function(z,B,e){z.exports=P;var d=e(71828).distinctVals;function P(a,_){this.traces=a,this.sepNegVal=_.sepNegVal,this.overlapNoMerge=_.overlapNoMerge;for(var x=1/0,v=_.posAxis._id.charAt(0),y=[],r=0;r<a.length;r++){for(var n=a[r],u=0;u<n.length;u++){var i=n[u],f=i.p;f===void 0&&(f=i[v]),f!==void 0&&y.push(f)}n[0]&&n[0].width1&&(x=Math.min(n[0].width1,x))}this.positions=y;var g=d(y);this.distinctPositions=g.vals,g.vals.length===1&&x!==1/0?this.minDiff=x:this.minDiff=Math.min(g.minDiff,x);var h=(_.posAxis||{}).type;(h==="category"||h==="multicategory")&&(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}P.prototype.put=function(_,x){var v=this.getLabel(_,x),y=this.bins[v]||0;return this.bins[v]=y+x,y},P.prototype.get=function(_,x){var v=this.getLabel(_,x);return this.bins[v]||0},P.prototype.getLabel=function(_,x){var v=x<0&&this.sepNegVal?"v":"^",y=this.overlapNoMerge?_:Math.round(_/this.binWidth);return v+y}},16688:function(z,B,e){var d=e(39898),P=e(7901),a=e(91424),_=e(71828),x=e(73972),v=e(72597).resizeText,y=e(1486),r=y.textfont,n=y.insidetextfont,u=y.outsidetextfont,i=e(69383);function f(A){var C=d.select(A).selectAll("g.barlayer").selectAll("g.trace");v(A,C,"bar");var S=C.size(),o=A._fullLayout;C.style("opacity",function(R){return R[0].trace.opacity}).each(function(R){(o.barmode==="stack"&&S>1||o.bargap===0&&o.bargroupgap===0&&!R[0].trace.marker.line.width)&&d.select(this).attr("shape-rendering","crispEdges")}),C.selectAll("g.points").each(function(R){var T=d.select(this),O=R[0].trace;g(T,O,A)}),x.getComponentMethod("errorbars","style")(C)}function g(A,C,S){a.pointStyle(A.selectAll("path"),C,S),h(A,C,S)}function h(A,C,S){A.selectAll("text").each(function(o){var R=d.select(this),T=_.ensureUniformFontSize(S,c(R,o,C,S));a.font(R,T)})}function b(A,C,S){var o=C[0].trace;o.selectedpoints?p(S,o,A):(g(S,o,A),x.getComponentMethod("errorbars","style")(S))}function p(A,C,S){a.selectedPointStyle(A.selectAll("path"),C),E(A.selectAll("text"),C,S)}function E(A,C,S){A.each(function(o){var R=d.select(this),T;if(o.selected){T=_.ensureUniformFontSize(S,c(R,o,C,S));var O=C.selected.textfont&&C.selected.textfont.color;O&&(T.color=O),a.font(R,T)}else a.selectedTextStyle(R,C)})}function c(A,C,S,o){var R=o._fullLayout.font,T=S.textfont;if(A.classed("bartext-inside")){var O=D(C,S);T=m(S,C.i,R,O)}else A.classed("bartext-outside")&&(T=M(S,C.i,R));return T}function l(A,C,S){return L(r,A.textfont,C,S)}function m(A,C,S,o){var R=l(A,C,S),T=A._input.textfont===void 0||A._input.textfont.color===void 0||Array.isArray(A.textfont.color)&&A.textfont.color[C]===void 0;return T&&(R={color:P.contrast(o),family:R.family,size:R.size}),L(n,A.insidetextfont,C,R)}function M(A,C,S){var o=l(A,C,S);return L(u,A.outsidetextfont,C,o)}function L(A,C,S,o){C=C||{};var R=i.getValue(C.family,S),T=i.getValue(C.size,S),O=i.getValue(C.color,S);return{family:i.coerceString(A.family,R,o.family),size:i.coerceNumber(A.size,T,o.size),color:i.coerceColor(A.color,O,o.color)}}function D(A,C){return C.type==="waterfall"?C[A.dir].marker.color:A.mcc||A.mc||C.marker.color}z.exports={style:f,styleTextPoints:h,styleOnSelect:b,getInsideTextFont:m,getOutsideTextFont:M,getBarColor:D,resizeText:v}},98340:function(z,B,e){var d=e(7901),P=e(52075).hasColorscale,a=e(1586),_=e(71828).coercePattern;z.exports=function(v,y,r,n,u){var i=r("marker.color",n),f=P(v,"marker");f&&a(v,y,u,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",d.defaultLine),P(v,"marker.line")&&a(v,y,u,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),_(r,"marker.pattern",i,f),r("selected.marker.color"),r("unselected.marker.color")}},72597:function(z,B,e){var d=e(39898),P=e(71828);function a(y,r,n){var u=y._fullLayout,i=u["_"+n+"Text_minsize"];if(i){var f=u.uniformtext.mode==="hide",g;switch(n){case"funnelarea":case"pie":case"sunburst":g="g.slice";break;case"treemap":case"icicle":g="g.slice, g.pathbar";break;default:g="g.points > g.point"}r.selectAll(g).each(function(h){var b=h.transform;if(b){b.scale=f&&b.hide?0:i/b.fontSize;var p=d.select(this).select("text");P.setTransormAndDisplay(p,b)}})}}function _(y,r,n){if(n.uniformtext.mode){var u=v(y),i=n.uniformtext.minsize,f=r.scale*r.fontSize;r.hide=f<i,n[u]=n[u]||1/0,r.hide||(n[u]=Math.min(n[u],Math.max(f,i)))}}function x(y,r){var n=v(y);r[n]=void 0}function v(y){return"_"+y+"Text_minsize"}z.exports={recordMinTextSize:_,clearMinTextSize:x,resizeText:a}},55023:function(z,B,e){var d=e(5386).f,P=e(1426).extendFlat,a=e(81245),_=e(1486);z.exports={r:a.r,theta:a.theta,r0:a.r0,dr:a.dr,theta0:a.theta0,dtheta:a.dtheta,thetaunit:a.thetaunit,base:P({},_.base,{}),offset:P({},_.offset,{}),width:P({},_.width,{}),text:P({},_.text,{}),hovertext:P({},_.hovertext,{}),marker:_.marker,hoverinfo:a.hoverinfo,hovertemplate:d(),selected:_.selected,unselected:_.unselected}},74692:function(z,B,e){var d=e(52075).hasColorscale,P=e(78803),a=e(75341),_=e(11661).setGroupPositions,x=e(66279),v=e(73972).traceIs,y=e(71828).extendFlat;function r(u,i){for(var f=u._fullLayout,g=i.subplot,h=f[g].radialaxis,b=f[g].angularaxis,p=h.makeCalcdata(i,"r"),E=b.makeCalcdata(i,"theta"),c=i._length,l=new Array(c),m=p,M=E,L=0;L<c;L++)l[L]={p:M[L],s:m[L]};function D(A){var C=i[A];C!==void 0&&(i["_"+A]=Array.isArray(C)?b.makeCalcdata(i,A):b.d2c(C,i.thetaunit))}return b.type==="linear"&&(D("width"),D("offset")),d(i,"marker")&&P(u,i,{vals:i.marker.color,containerStr:"marker",cLetter:"c"}),d(i,"marker.line")&&P(u,i,{vals:i.marker.line.color,containerStr:"marker.line",cLetter:"c"}),a(l,i),x(l,i),l}function n(u,i,f){for(var g=u.calcdata,h=[],b=0;b<g.length;b++){var p=g[b],E=p[0].trace;E.visible===!0&&v(E,"bar")&&E.subplot===f&&h.push(p)}var c=y({},i.radialaxis,{_id:"x"}),l=i.angularaxis;_(u,l,c,h,{mode:i.barmode,norm:i.barnorm,gap:i.bargap,groupgap:i.bargroupgap})}z.exports={calc:r,crossTraceCalc:n}},6135:function(z,B,e){var d=e(71828),P=e(22184).handleRThetaDefaults,a=e(98340),_=e(55023);z.exports=function(v,y,r,n){function u(f,g){return d.coerce(v,y,_,f,g)}var i=P(v,y,n,u);if(!i){y.visible=!1;return}u("thetaunit"),u("base"),u("offset"),u("width"),u("text"),u("hovertext"),u("hovertemplate"),a(v,y,u,r,n),d.coerceSelectionMarkerOpacity(y,u)}},27379:function(z,B,e){var d=e(30211),P=e(71828),a=e(95423).getTraceColor,_=P.fillText,x=e(59150).makeHoverPointText,v=e(10869).isPtInsidePolygon;z.exports=function(r,n,u){var i=r.cd,f=i[0].trace,g=r.subplot,h=g.radialAxis,b=g.angularAxis,p=g.vangles,E=p?v:P.isPtInsideSector,c=r.maxHoverDistance,l=b._period||2*Math.PI,m=Math.abs(h.g2p(Math.sqrt(n*n+u*u))),M=Math.atan2(u,n);h.range[0]>h.range[1]&&(M+=Math.PI);var L=function(S){return E(m,M,[S.rp0,S.rp1],[S.thetag0,S.thetag1],p)?c+Math.min(1,Math.abs(S.thetag1-S.thetag0)/l)-1+(S.rp1-m)/(S.rp1-S.rp0)-1:1/0};if(d.getClosest(i,L,r),r.index!==!1){var D=r.index,A=i[D];r.x0=r.x1=A.ct[0],r.y0=r.y1=A.ct[1];var C=P.extendFlat({},A,{r:A.s,theta:A.p});return _(A,f,r),x(C,f,g,r),r.hovertemplate=f.hovertemplate,r.color=a(f,A),r.xLabelVal=r.yLabelVal=void 0,A.s<0&&(r.idealAlign="left"),[r]}}},23381:function(z,B,e){z.exports={moduleType:"trace",name:"barpolar",basePlotModule:e(23580),categories:["polar","bar","showLegend"],attributes:e(55023),layoutAttributes:e(40151),supplyDefaults:e(6135),supplyLayoutDefaults:e(19860),calc:e(74692).calc,crossTraceCalc:e(74692).crossTraceCalc,plot:e(60173),colorbar:e(4898),formatLabels:e(98608),style:e(16688).style,styleOnSelect:e(16688).styleOnSelect,hoverPoints:e(27379),selectPoints:e(81974),meta:{}}},40151:function(z){z.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},19860:function(z,B,e){var d=e(71828),P=e(40151);z.exports=function(a,_,x){var v={},y;function r(i,f){return d.coerce(a[y]||{},_[y],P,i,f)}for(var n=0;n<x.length;n++){var u=x[n];u.type==="barpolar"&&u.visible===!0&&(y=u.subplot,v[y]||(r("barmode"),r("bargap"),v[y]=1))}}},60173:function(z,B,e){var d=e(39898),P=e(92770),a=e(71828),_=e(91424),x=e(10869);z.exports=function(r,n,u){var i=r._context.staticPlot,f=n.xaxis,g=n.yaxis,h=n.radialAxis,b=n.angularAxis,p=v(n),E=n.layers.frontplot.select("g.barlayer");a.makeTraceGroups(E,u,"trace bars").each(function(){var c=d.select(this),l=a.ensureSingle(c,"g","points"),m=l.selectAll("g.point").data(a.identity);m.enter().append("g").style("vector-effect",i?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),m.exit().remove(),m.each(function(M){var L=d.select(this),D=M.rp0=h.c2p(M.s0),A=M.rp1=h.c2p(M.s1),C=M.thetag0=b.c2g(M.p0),S=M.thetag1=b.c2g(M.p1),o;if(!P(D)||!P(A)||!P(C)||!P(S)||D===A||C===S)o="M0,0Z";else{var R=h.c2g(M.s1),T=(C+S)/2;M.ct=[f.c2p(R*Math.cos(T)),g.c2p(R*Math.sin(T))],o=p(D,A,C,S)}a.ensureSingle(L,"path").attr("d",o)}),_.setClipUrl(c,n._hasClipOnAxisFalse?n.clipIds.forTraces:null,r)})};function v(y){var r=y.cxx,n=y.cyy;return y.vangles?function(u,i,f,g){var h,b;a.angleDelta(f,g)>0?(h=f,b=g):(h=g,b=f);var p=x.findEnclosingVertexAngles(h,y.vangles)[0],E=x.findEnclosingVertexAngles(b,y.vangles)[1],c=[p,(h+b)/2,E];return x.pathPolygonAnnulus(u,i,h,b,c,r,n)}:function(u,i,f,g){return a.pathAnnulus(u,i,f,g,r,n)}}},53522:function(z,B,e){var d=e(82196),P=e(1486),a=e(22399),_=e(12663).axisHoverFormat,x=e(5386).f,v=e(1426).extendFlat,y=d.marker,r=y.line;z.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:d.xperiod,yperiod:d.yperiod,xperiod0:d.xperiod0,yperiod0:d.yperiod0,xperiodalignment:d.xperiodalignment,yperiodalignment:d.yperiodalignment,xhoverformat:_("x"),yhoverformat:_("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:v({},y.symbol,{arrayOk:!1,editType:"plot"}),opacity:v({},y.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:v({},y.angle,{arrayOk:!1,editType:"calc"}),size:v({},y.size,{arrayOk:!1,editType:"calc"}),color:v({},y.color,{arrayOk:!1,editType:"style"}),line:{color:v({},r.color,{arrayOk:!1,dflt:a.defaultLine,editType:"style"}),width:v({},r.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:d.fillcolor,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},offsetgroup:P.offsetgroup,alignmentgroup:P.alignmentgroup,selected:{marker:d.selected.marker,editType:"style"},unselected:{marker:d.unselected.marker,editType:"style"},text:v({},d.text,{}),hovertext:v({},d.hovertext,{}),hovertemplate:x({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},48518:function(z,B,e){var d=e(92770),P=e(89298),a=e(42973),_=e(71828),x=e(50606).BADNUM,v=_._;z.exports=function(M,L){var D=M._fullLayout,A=P.getFromId(M,L.xaxis||"x"),C=P.getFromId(M,L.yaxis||"y"),S=[],o=L.type==="violin"?"_numViolins":"_numBoxes",R,T,O,N,H,k,V;L.orientation==="h"?(O=A,N="x",H=C,k="y",V=!!L.yperiodalignment):(O=C,N="y",H=A,k="x",V=!!L.xperiodalignment);var G=y(L,k,H,D[o]),U=G[0],Y=G[1],ee=_.distinctVals(U,H),re=ee.vals,ie=ee.minDiff/2,se,ce,q,j,Z,Q,ue=(L.boxpoints||L.points)==="all"?_.identity:function(et){return et.v<se.lf||et.v>se.uf};if(L._hasPreCompStats){var fe=L[N],te=function(et){return O.d2c((L[et]||[])[R])},ne=1/0,ve=-1/0;for(R=0;R<L._length;R++){var le=U[R];if(d(le)){if(se={},se.pos=se[k]=le,V&&Y&&(se.orig_p=Y[R]),se.q1=te("q1"),se.med=te("median"),se.q3=te("q3"),ce=[],fe&&_.isArrayOrTypedArray(fe[R]))for(T=0;T<fe[R].length;T++)Q=O.d2c(fe[R][T]),Q!==x&&(Z={v:Q,i:[R,T]},i(Z,L,[R,T]),ce.push(Z));if(se.pts=ce.sort(g),q=se[N]=ce.map(h),j=q.length,se.med!==x&&se.q1!==x&&se.q3!==x&&se.med>=se.q1&&se.q3>=se.med){var xe=te("lowerfence");se.lf=xe!==x&&xe<=se.q1?xe:b(se,q,j);var Se=te("upperfence");se.uf=Se!==x&&Se>=se.q3?Se:p(se,q,j);var Re=te("mean");se.mean=Re!==x?Re:j?_.mean(q,j):(se.q1+se.q3)/2;var Ee=te("sd");se.sd=Re!==x&&Ee>=0?Ee:j?_.stdev(q,j,se.mean):se.q3-se.q1,se.lo=E(se),se.uo=c(se);var Oe=te("notchspan");Oe=Oe!==x&&Oe>0?Oe:l(se,j),se.ln=se.med-Oe,se.un=se.med+Oe;var Be=se.lf,Le=se.uf;L.boxpoints&&q.length&&(Be=Math.min(Be,q[0]),Le=Math.max(Le,q[j-1])),L.notched&&(Be=Math.min(Be,se.ln),Le=Math.max(Le,se.un)),se.min=Be,se.max=Le}else{_.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+se.q1,"median = "+se.med,"q3 = "+se.q3].join(`
`));var Te;se.med!==x?Te=se.med:se.q1!==x?se.q3!==x?Te=(se.q1+se.q3)/2:Te=se.q1:se.q3!==x?Te=se.q3:Te=0,se.med=Te,se.q1=se.q3=Te,se.lf=se.uf=Te,se.mean=se.sd=Te,se.ln=se.un=Te,se.min=se.max=Te}ne=Math.min(ne,se.min),ve=Math.max(ve,se.max),se.pts2=ce.filter(ue),S.push(se)}}L._extremes[O._id]=P.findExtremes(O,[ne,ve],{padded:!0})}else{var De=O.makeCalcdata(L,N),Ve=r(re,ie),Ye=re.length,Ne=n(Ye);for(R=0;R<L._length;R++)if(Q=De[R],!!d(Q)){var Xe=_.findBin(U[R],Ve);Xe>=0&&Xe<Ye&&(Z={v:Q,i:R},i(Z,L,R),Ne[Xe].push(Z))}var ht=1/0,st=-1/0,it=L.quartilemethod,nt=it==="exclusive",pt=it==="inclusive";for(R=0;R<Ye;R++)if(Ne[R].length>0){if(se={},se.pos=se[k]=re[R],ce=se.pts=Ne[R].sort(g),q=se[N]=ce.map(h),j=q.length,se.min=q[0],se.max=q[j-1],se.mean=_.mean(q,j),se.sd=_.stdev(q,j,se.mean),se.med=_.interp(q,.5),j%2&&(nt||pt)){var Tt,Et;nt?(Tt=q.slice(0,j/2),Et=q.slice(j/2+1)):pt&&(Tt=q.slice(0,j/2+1),Et=q.slice(j/2)),se.q1=_.interp(Tt,.5),se.q3=_.interp(Et,.5)}else se.q1=_.interp(q,.25),se.q3=_.interp(q,.75);se.lf=b(se,q,j),se.uf=p(se,q,j),se.lo=E(se),se.uo=c(se);var Dt=l(se,j);se.ln=se.med-Dt,se.un=se.med+Dt,ht=Math.min(ht,se.ln),st=Math.max(st,se.un),se.pts2=ce.filter(ue),S.push(se)}L._extremes[O._id]=P.findExtremes(O,L.notched?De.concat([ht,st]):De,{padded:!0})}return f(S,L),S.length>0?(S[0].t={num:D[o],dPos:ie,posLetter:k,valLetter:N,labels:{med:v(M,"median:"),min:v(M,"min:"),q1:v(M,"q1:"),q3:v(M,"q3:"),max:v(M,"max:"),mean:L.boxmean==="sd"?v(M,"mean ± σ:"):v(M,"mean:"),lf:v(M,"lower fence:"),uf:v(M,"upper fence:")}},D[o]++,S):[{t:{empty:!0}}]};function y(m,M,L,D){var A=M in m,C=M+"0"in m,S="d"+M in m;if(A||C&&S){var o=L.makeCalcdata(m,M),R=a(m,L,M,o).vals;return[R,o]}var T;C?T=m[M+"0"]:"name"in m&&(L.type==="category"||d(m.name)&&["linear","log"].indexOf(L.type)!==-1||_.isDateTime(m.name)&&L.type==="date")?T=m.name:T=D;for(var O=L.type==="multicategory"?L.r2c_just_indices(T):L.d2c(T,0,m[M+"calendar"]),N=m._length,H=new Array(N),k=0;k<N;k++)H[k]=O;return[H]}function r(m,M){for(var L=m.length,D=new Array(L+1),A=0;A<L;A++)D[A]=m[A]-M;return D[L]=m[L-1]+M,D}function n(m){for(var M=new Array(m),L=0;L<m;L++)M[L]=[];return M}var u={text:"tx",hovertext:"htx"};function i(m,M,L){for(var D in u)_.isArrayOrTypedArray(M[D])&&(Array.isArray(L)?_.isArrayOrTypedArray(M[D][L[0]])&&(m[u[D]]=M[D][L[0]][L[1]]):m[u[D]]=M[D][L])}function f(m,M){if(_.isArrayOrTypedArray(M.selectedpoints))for(var L=0;L<m.length;L++){for(var D=m[L].pts||[],A={},C=0;C<D.length;C++)A[D[C].i]=C;_.tagSelected(D,M,A)}}function g(m,M){return m.v-M.v}function h(m){return m.v}function b(m,M,L){return L===0?m.q1:Math.min(m.q1,M[Math.min(_.findBin(2.5*m.q1-1.5*m.q3,M,!0)+1,L-1)])}function p(m,M,L){return L===0?m.q3:Math.max(m.q3,M[Math.max(_.findBin(2.5*m.q3-1.5*m.q1,M),0)])}function E(m){return 4*m.q1-3*m.q3}function c(m){return 4*m.q3-3*m.q1}function l(m,M){return M===0?0:1.57*(m.q3-m.q1)/Math.sqrt(M)}},37188:function(z,B,e){var d=e(89298),P=e(71828),a=e(99082).getAxisGroup,_=["v","h"];function x(y,r){for(var n=y.calcdata,u=r.xaxis,i=r.yaxis,f=0;f<_.length;f++){for(var g=_[f],h=g==="h"?i:u,b=[],p=0;p<n.length;p++){var E=n[p],c=E[0].t,l=E[0].trace;l.visible===!0&&(l.type==="box"||l.type==="candlestick")&&!c.empty&&(l.orientation||"v")===g&&l.xaxis===u._id&&l.yaxis===i._id&&b.push(p)}v("box",y,b,h)}}function v(y,r,n,u){var i=r.calcdata,f=r._fullLayout,g=u._id,h=g.charAt(0),b,p,E,c=[],l=0;for(b=0;b<n.length;b++)for(E=i[n[b]],p=0;p<E.length;p++)c.push(u.c2l(E[p].pos,!0)),l+=(E[p].pts2||[]).length;if(c.length){var m=P.distinctVals(c);(u.type==="category"||u.type==="multicategory")&&(m.minDiff=1);var M=m.minDiff/2;d.minDtick(u,m.minDiff,m.vals[0],!0);var L=y==="violin"?"_numViolins":"_numBoxes",D=f[L],A=f[y+"mode"]==="group"&&D>1,C=1-f[y+"gap"],S=1-f[y+"groupgap"];for(b=0;b<n.length;b++){E=i[n[b]];var o=E[0].trace,R=E[0].t,T=o.width,O=o.side,N,H,k,V;if(T)N=H=V=T/2,k=0;else if(N=M,A){var G=a(f,u._id)+o.orientation,U=f._alignmentOpts[G]||{},Y=U[o.alignmentgroup]||{},ee=Object.keys(Y.offsetGroups||{}).length,re=ee||D,ie=ee?o._offsetIndex:R.num;H=N*C*S/re,k=2*N*(-.5+(ie+.5)/re)*C,V=N*C/re}else H=N*C*S,k=0,V=N;R.dPos=N,R.bPos=k,R.bdPos=H,R.wHover=V;var se,ce,q=k+H,j,Z,Q,ue,fe,te,ne=Boolean(T),ve=(o.boxpoints||o.points)&&l>0;if(O==="positive"?(se=N*(T?1:.5),j=q,ce=j=k):O==="negative"?(se=j=k,ce=N*(T?1:.5),Z=q):(se=ce=N,j=Z=q),ve){var le=o.pointpos,xe=o.jitter,Se=o.marker.size/2,Re=0;le+xe>=0&&(Re=q*(le+xe),Re>se?(ne=!0,fe=Se,Q=Re):Re>j&&(fe=Se,Q=se)),Re<=se&&(Q=se);var Ee=0;le-xe<=0&&(Ee=-q*(le-xe),Ee>ce?(ne=!0,te=Se,ue=Ee):Ee>Z&&(te=Se,ue=ce)),Ee<=ce&&(ue=ce)}else Q=se,ue=ce;var Oe=new Array(E.length);for(p=0;p<E.length;p++)Oe[p]=E[p].pos;o._extremes[g]=d.findExtremes(u,Oe,{padded:ne,vpadminus:ue,vpadplus:Q,vpadLinearized:!0,ppadminus:{x:te,y:fe}[h],ppadplus:{x:fe,y:te}[h]})}}}z.exports={crossTraceCalc:x,setPositionOffset:v}},36411:function(z,B,e){var d=e(71828),P=e(73972),a=e(7901),_=e(73927),x=e(26125),v=e(4322),y=e(53522);function r(f,g,h,b){function p(A,C){return d.coerce(f,g,y,A,C)}if(n(f,g,p,b),g.visible!==!1){_(f,g,b,p),p("xhoverformat"),p("yhoverformat");var E=g._hasPreCompStats;E&&(p("lowerfence"),p("upperfence")),p("line.color",(f.marker||{}).color||h),p("line.width"),p("fillcolor",a.addOpacity(g.line.color,.5));var c=!1;if(E){var l=p("mean"),m=p("sd");l&&l.length&&(c=!0,m&&m.length&&(c="sd"))}p("boxmean",c),p("whiskerwidth"),p("width"),p("quartilemethod");var M=!1;if(E){var L=p("notchspan");L&&L.length&&(M=!0)}else d.validate(f.notchwidth,y.notchwidth)&&(M=!0);var D=p("notched",M);D&&p("notchwidth"),u(f,g,p,{prefix:"box"})}}function n(f,g,h,b){function p(ee){var re=0;return ee&&ee.length&&(re+=1,d.isArrayOrTypedArray(ee[0])&&ee[0].length&&(re+=1)),re}function E(ee){return d.validate(f[ee],y[ee])}var c=h("y"),l=h("x"),m;if(g.type==="box"){var M=h("q1"),L=h("median"),D=h("q3");g._hasPreCompStats=M&&M.length&&L&&L.length&&D&&D.length,m=Math.min(d.minRowLength(M),d.minRowLength(L),d.minRowLength(D))}var A=p(c),C=p(l),S=A&&d.minRowLength(c),o=C&&d.minRowLength(l),R=b.calendar,T={autotypenumbers:b.autotypenumbers},O,N;if(g._hasPreCompStats)switch(String(C)+String(A)){case"00":var H=E("x0")||E("dx"),k=E("y0")||E("dy");k&&!H?O="h":O="v",N=m;break;case"10":O="v",N=Math.min(m,o);break;case"20":O="h",N=Math.min(m,l.length);break;case"01":O="h",N=Math.min(m,S);break;case"02":O="v",N=Math.min(m,c.length);break;case"12":O="v",N=Math.min(m,o,c.length);break;case"21":O="h",N=Math.min(m,l.length,S);break;case"11":N=0;break;case"22":var V=!1,G;for(G=0;G<l.length;G++)if(v(l[G],R,T)==="category"){V=!0;break}if(V)O="v",N=Math.min(m,o,c.length);else{for(G=0;G<c.length;G++)if(v(c[G],R,T)==="category"){V=!0;break}V?(O="h",N=Math.min(m,l.length,S)):(O="v",N=Math.min(m,o,c.length))}break}else A>0?(O="v",C>0?N=Math.min(o,S):N=Math.min(S)):C>0?(O="h",N=Math.min(o)):N=0;if(!N){g.visible=!1;return}g._length=N;var U=h("orientation",O);g._hasPreCompStats?U==="v"&&C===0?(h("x0",0),h("dx",1)):U==="h"&&A===0&&(h("y0",0),h("dy",1)):U==="v"&&C===0?h("x0"):U==="h"&&A===0&&h("y0");var Y=P.getComponentMethod("calendars","handleTraceDefaults");Y(f,g,["x","y"],b)}function u(f,g,h,b){var p=b.prefix,E=d.coerce2(f,g,y,"marker.outliercolor"),c=h("marker.line.outliercolor"),l="outliers";g._hasPreCompStats?l="all":(E||c)&&(l="suspectedoutliers");var m=h(p+"points",l);m?(h("jitter",m==="all"?.3:0),h("pointpos",m==="all"?-1.5:0),h("marker.symbol"),h("marker.opacity"),h("marker.size"),h("marker.angle"),h("marker.color",g.line.color),h("marker.line.color"),h("marker.line.width"),m==="suspectedoutliers"&&(h("marker.line.outliercolor",g.marker.color),h("marker.line.outlierwidth")),h("selected.marker.color"),h("unselected.marker.color"),h("selected.marker.size"),h("unselected.marker.size"),h("text"),h("hovertext")):delete g.marker;var M=h("hoveron");(M==="all"||M.indexOf("points")!==-1)&&h("hovertemplate"),d.coerceSelectionMarkerOpacity(g,h)}function i(f,g){var h,b;function p(l){return d.coerce(b._input,b,y,l)}for(var E=0;E<f.length;E++){b=f[E];var c=b.type;(c==="box"||c==="violin")&&(h=b._input,g[c+"mode"]==="group"&&x(h,b,g,p))}}z.exports={supplyDefaults:r,crossTraceDefaults:i,handleSampleDefaults:n,handlePointsDefaults:u}},74907:function(z){z.exports=function(e,d){return d.hoverOnBox&&(e.hoverOnBox=d.hoverOnBox),"xVal"in d&&(e.x=d.xVal),"yVal"in d&&(e.y=d.yVal),d.xa&&(e.xaxis=d.xa),d.ya&&(e.yaxis=d.ya),e}},41868:function(z,B,e){var d=e(89298),P=e(71828),a=e(30211),_=e(7901),x=P.fillText;function v(n,u,i,f){var g=n.cd,h=g[0].trace,b=h.hoveron,p=[],E;return b.indexOf("boxes")!==-1&&(p=p.concat(y(n,u,i,f))),b.indexOf("points")!==-1&&(E=r(n,u,i)),f==="closest"?E?[E]:p:(E&&p.push(E),p)}function y(n,u,i,f){var g=n.cd,h=n.xa,b=n.ya,p=g[0].trace,E=g[0].t,c=p.type==="violin",l,m,M,L,D,A,C,S,o,R,T,O=E.bdPos,N,H,k=E.wHover,V=function(Ee){return M.c2l(Ee.pos)+E.bPos-M.c2l(A)};c&&p.side!=="both"?(p.side==="positive"&&(o=function(Ee){var Oe=V(Ee);return a.inbox(Oe,Oe+k,R)},N=O,H=0),p.side==="negative"&&(o=function(Ee){var Oe=V(Ee);return a.inbox(Oe-k,Oe,R)},N=0,H=O)):(o=function(Ee){var Oe=V(Ee);return a.inbox(Oe-k,Oe+k,R)},N=H=O);var G;c?G=function(Ee){return a.inbox(Ee.span[0]-D,Ee.span[1]-D,R)}:G=function(Ee){return a.inbox(Ee.min-D,Ee.max-D,R)},p.orientation==="h"?(D=u,A=i,C=G,S=o,l="y",M=b,m="x",L=h):(D=i,A=u,C=o,S=G,l="x",M=h,m="y",L=b);var U=Math.min(1,O/Math.abs(M.r2c(M.range[1])-M.r2c(M.range[0])));R=n.maxHoverDistance-U,T=n.maxSpikeDistance-U;function Y(Ee){return(C(Ee)+S(Ee))/2}var ee=a.getDistanceFunction(f,C,S,Y);if(a.getClosest(g,ee,n),n.index===!1)return[];var re=g[n.index],ie=p.line.color,se=(p.marker||{}).color;_.opacity(ie)&&p.line.width?n.color=ie:_.opacity(se)&&p.boxpoints?n.color=se:n.color=p.fillcolor,n[l+"0"]=M.c2p(re.pos+E.bPos-H,!0),n[l+"1"]=M.c2p(re.pos+E.bPos+N,!0),n[l+"LabelVal"]=re.orig_p!==void 0?re.orig_p:re.pos;var ce=l+"Spike";n.spikeDistance=Y(re)*T/R,n[ce]=M.c2p(re.pos,!0);var q=p.boxmean||(p.meanline||{}).visible,j=p.boxpoints||p.points,Z=j&&q?["max","uf","q3","med","mean","q1","lf","min"]:j&&!q?["max","uf","q3","med","q1","lf","min"]:!j&&q?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],Q=L.range[1]<L.range[0];p.orientation===(Q?"v":"h")&&Z.reverse();for(var ue=n.spikeDistance,fe=n[ce],te=[],ne=0;ne<Z.length;ne++){var ve=Z[ne];if(ve in re){var le=re[ve],xe=L.c2p(le,!0),Se=P.extendFlat({},n);Se.attr=ve,Se[m+"0"]=Se[m+"1"]=xe,Se[m+"LabelVal"]=le,Se[m+"Label"]=(E.labels?E.labels[ve]+" ":"")+d.hoverLabelText(L,le,p[m+"hoverformat"]),Se.hoverOnBox=!0,ve==="mean"&&"sd"in re&&p.boxmean==="sd"&&(Se[m+"err"]=re.sd),Se.hovertemplate=!1,te.push(Se)}}n.name="",n.spikeDistance=void 0,n[ce]=void 0;for(var Re=0;Re<te.length;Re++)te[Re].attr!=="med"?(te[Re].name="",te[Re].spikeDistance=void 0,te[Re][ce]=void 0):(te[Re].spikeDistance=ue,te[Re][ce]=fe);return te}function r(n,u,i){for(var f=n.cd,g=n.xa,h=n.ya,b=f[0].trace,p=g.c2p(u),E=h.c2p(i),c,l=function(G){var U=Math.max(3,G.mrc||0);return Math.max(Math.abs(g.c2p(G.x)-p)-U,1-3/U)},m=function(G){var U=Math.max(3,G.mrc||0);return Math.max(Math.abs(h.c2p(G.y)-E)-U,1-3/U)},M=a.quadrature(l,m),L=!1,D,A,C=0;C<f.length;C++){D=f[C];for(var S=0;S<(D.pts||[]).length;S++){A=D.pts[S];var o=M(A);o<=n.distance&&(n.distance=o,L=[C,S])}}if(!L)return!1;D=f[L[0]],A=D.pts[L[1]];var R=g.c2p(A.x,!0),T=h.c2p(A.y,!0),O=A.mrc||1;c=P.extendFlat({},n,{index:A.i,color:(b.marker||{}).color,name:b.name,x0:R-O,x1:R+O,y0:T-O,y1:T+O,spikeDistance:n.distance,hovertemplate:b.hovertemplate});var N=D.orig_p,H=N!==void 0?N:D.pos,k;b.orientation==="h"?(k=h,c.xLabelVal=A.x,c.yLabelVal=H):(k=g,c.xLabelVal=H,c.yLabelVal=A.y);var V=k._id.charAt(0);return c[V+"Spike"]=k.c2p(D.pos,!0),x(A,b,c),c}z.exports={hoverPoints:v,hoverOnBoxes:y,hoverOnPoints:r}},83832:function(z,B,e){z.exports={attributes:e(53522),layoutAttributes:e(40094),supplyDefaults:e(36411).supplyDefaults,crossTraceDefaults:e(36411).crossTraceDefaults,supplyLayoutDefaults:e(4199).supplyLayoutDefaults,calc:e(48518),crossTraceCalc:e(37188).crossTraceCalc,plot:e(86047).plot,style:e(58063).style,styleOnSelect:e(58063).styleOnSelect,hoverPoints:e(41868).hoverPoints,eventData:e(74907),selectPoints:e(24626),moduleType:"trace",name:"box",basePlotModule:e(93612),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}},40094:function(z){z.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"}}},4199:function(z,B,e){var d=e(73972),P=e(71828),a=e(40094);function _(v,y,r,n,u){for(var i=u+"Layout",f=!1,g=0;g<r.length;g++){var h=r[g];if(d.traceIs(h,i)){f=!0;break}}f&&(n(u+"mode"),n(u+"gap"),n(u+"groupgap"))}function x(v,y,r){function n(u,i){return P.coerce(v,y,a,u,i)}_(v,y,r,n,"box")}z.exports={supplyLayoutDefaults:x,_supply:_}},86047:function(z,B,e){var d=e(39898),P=e(71828),a=e(91424),_=5,x=.01;function v(u,i,f,g){var h=u._context.staticPlot,b=i.xaxis,p=i.yaxis;P.makeTraceGroups(g,f,"trace boxes").each(function(E){var c=d.select(this),l=E[0],m=l.t,M=l.trace;if(m.wdPos=m.bdPos*M.whiskerwidth,M.visible!==!0||m.empty){c.remove();return}var L,D;M.orientation==="h"?(L=p,D=b):(L=b,D=p),y(c,{pos:L,val:D},M,m,h),r(c,{x:b,y:p},M,m),n(c,{pos:L,val:D},M,m)})}function y(u,i,f,g,h){var b=f.orientation==="h",p=i.val,E=i.pos,c=!!E.rangebreaks,l=g.bPos,m=g.wdPos||0,M=g.bPosPxOffset||0,L=f.whiskerwidth||0,D=f.notched||!1,A=D?1-2*f.notchwidth:1,C,S;Array.isArray(g.bdPos)?(C=g.bdPos[0],S=g.bdPos[1]):(C=g.bdPos,S=g.bdPos);var o=u.selectAll("path.box").data(f.type!=="violin"||f.box.visible?P.identity:[]);o.enter().append("path").style("vector-effect",h?"none":"non-scaling-stroke").attr("class","box"),o.exit().remove(),o.each(function(R){if(R.empty)return"M0,0Z";var T=E.c2l(R.pos+l,!0),O=E.l2p(T-C)+M,N=E.l2p(T+S)+M,H=c?(O+N)/2:E.l2p(T)+M,k=f.whiskerwidth,V=c?O*k+(1-k)*H:E.l2p(T-m)+M,G=c?N*k+(1-k)*H:E.l2p(T+m)+M,U=E.l2p(T-C*A)+M,Y=E.l2p(T+S*A)+M,ee=p.c2p(R.q1,!0),re=p.c2p(R.q3,!0),ie=P.constrain(p.c2p(R.med,!0),Math.min(ee,re)+1,Math.max(ee,re)-1),se=R.lf===void 0||f.boxpoints===!1,ce=p.c2p(se?R.min:R.lf,!0),q=p.c2p(se?R.max:R.uf,!0),j=p.c2p(R.ln,!0),Z=p.c2p(R.un,!0);b?d.select(this).attr("d","M"+ie+","+U+"V"+Y+"M"+ee+","+O+"V"+N+(D?"H"+j+"L"+ie+","+Y+"L"+Z+","+N:"")+"H"+re+"V"+O+(D?"H"+Z+"L"+ie+","+U+"L"+j+","+O:"")+"ZM"+ee+","+H+"H"+ce+"M"+re+","+H+"H"+q+(L===0?"":"M"+ce+","+V+"V"+G+"M"+q+","+V+"V"+G)):d.select(this).attr("d","M"+U+","+ie+"H"+Y+"M"+O+","+ee+"H"+N+(D?"V"+j+"L"+Y+","+ie+"L"+N+","+Z:"")+"V"+re+"H"+O+(D?"V"+Z+"L"+U+","+ie+"L"+O+","+j:"")+"ZM"+H+","+ee+"V"+ce+"M"+H+","+re+"V"+q+(L===0?"":"M"+V+","+ce+"H"+G+"M"+V+","+q+"H"+G))})}function r(u,i,f,g){var h=i.x,b=i.y,p=g.bdPos,E=g.bPos,c=f.boxpoints||f.points;P.seedPseudoRandom();var l=function(L){return L.forEach(function(D){D.t=g,D.trace=f}),L},m=u.selectAll("g.points").data(c?l:[]);m.enter().append("g").attr("class","points"),m.exit().remove();var M=m.selectAll("path").data(function(L){var D,A=L.pts2,C=Math.max((L.max-L.min)/10,L.q3-L.q1),S=C*1e-9,o=C*x,R=[],T=0,O;if(f.jitter){if(C===0)for(T=1,R=new Array(A.length),D=0;D<A.length;D++)R[D]=1;else for(D=0;D<A.length;D++){var N=Math.max(0,D-_),H=A[N].v,k=Math.min(A.length-1,D+_),V=A[k].v;c!=="all"&&(A[D].v<L.lf?V=Math.min(V,L.lf):H=Math.max(H,L.uf));var G=Math.sqrt(o*(k-N)/(V-H+S))||0;G=P.constrain(Math.abs(G),0,1),R.push(G),T=Math.max(G,T)}O=f.jitter*2/(T||1)}for(D=0;D<A.length;D++){var U=A[D],Y=U.v,ee=f.jitter?O*R[D]*(P.pseudoRandom()-.5):0,re=L.pos+E+p*(f.pointpos+ee);f.orientation==="h"?(U.y=re,U.x=Y):(U.x=re,U.y=Y),c==="suspectedoutliers"&&Y<L.uo&&Y>L.lo&&(U.so=!0)}return A});M.enter().append("path").classed("point",!0),M.exit().remove(),M.call(a.translatePoints,h,b)}function n(u,i,f,g){var h=i.val,b=i.pos,p=!!b.rangebreaks,E=g.bPos,c=g.bPosPxOffset||0,l=f.boxmean||(f.meanline||{}).visible,m,M;Array.isArray(g.bdPos)?(m=g.bdPos[0],M=g.bdPos[1]):(m=g.bdPos,M=g.bdPos);var L=u.selectAll("path.mean").data(f.type==="box"&&f.boxmean||f.type==="violin"&&f.box.visible&&f.meanline.visible?P.identity:[]);L.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),L.exit().remove(),L.each(function(D){var A=b.c2l(D.pos+E,!0),C=b.l2p(A-m)+c,S=b.l2p(A+M)+c,o=p?(C+S)/2:b.l2p(A)+c,R=h.c2p(D.mean,!0),T=h.c2p(D.mean-D.sd,!0),O=h.c2p(D.mean+D.sd,!0);f.orientation==="h"?d.select(this).attr("d","M"+R+","+C+"V"+S+(l==="sd"?"m0,0L"+T+","+o+"L"+R+","+C+"L"+O+","+o+"Z":"")):d.select(this).attr("d","M"+C+","+R+"H"+S+(l==="sd"?"m0,0L"+o+","+T+"L"+C+","+R+"L"+o+","+O+"Z":""))})}z.exports={plot:v,plotBoxAndWhiskers:y,plotPoints:r,plotBoxMean:n}},24626:function(z){z.exports=function(e,d){var P=e.cd,a=e.xaxis,_=e.yaxis,x=[],v,y;if(d===!1)for(v=0;v<P.length;v++)for(y=0;y<(P[v].pts||[]).length;y++)P[v].pts[y].selected=0;else for(v=0;v<P.length;v++)for(y=0;y<(P[v].pts||[]).length;y++){var r=P[v].pts[y],n=a.c2p(r.x),u=_.c2p(r.y);d.contains([n,u],null,r.i,e)?(x.push({pointNumber:r.i,x:a.c2d(r.x),y:_.c2d(r.y)}),r.selected=1):r.selected=0}return x}},58063:function(z,B,e){var d=e(39898),P=e(7901),a=e(91424);function _(v,y,r){var n=r||d.select(v).selectAll("g.trace.boxes");n.style("opacity",function(u){return u[0].trace.opacity}),n.each(function(u){var i=d.select(this),f=u[0].trace,g=f.line.width;function h(E,c,l,m){E.style("stroke-width",c+"px").call(P.stroke,l).call(P.fill,m)}var b=i.selectAll("path.box");if(f.type==="candlestick")b.each(function(E){if(!E.empty){var c=d.select(this),l=f[E.dir];h(c,l.line.width,l.line.color,l.fillcolor),c.style("opacity",f.selectedpoints&&!E.selected?.3:1)}});else{h(b,g,f.line.color,f.fillcolor),i.selectAll("path.mean").style({"stroke-width":g,"stroke-dasharray":2*g+"px,"+g+"px"}).call(P.stroke,f.line.color);var p=i.selectAll("path.point");a.pointStyle(p,f,v)}})}function x(v,y,r){var n=y[0].trace,u=r.selectAll("path.point");n.selectedpoints?a.selectedPointStyle(u,n):a.pointStyle(u,n,v)}z.exports={style:_,styleOnSelect:x}},75343:function(z,B,e){var d=e(71828).extendFlat,P=e(12663).axisHoverFormat,a=e(2522),_=e(53522);function x(v){return{line:{color:d({},_.line.color,{dflt:v}),width:_.line.width,editType:"style"},fillcolor:_.fillcolor,editType:"style"}}z.exports={xperiod:a.xperiod,xperiod0:a.xperiod0,xperiodalignment:a.xperiodalignment,xhoverformat:P("x"),yhoverformat:P("y"),x:a.x,open:a.open,high:a.high,low:a.low,close:a.close,line:{width:d({},_.line.width,{}),editType:"style"},increasing:x(a.increasing.line.color.dflt),decreasing:x(a.decreasing.line.color.dflt),text:a.text,hovertext:a.hovertext,whiskerwidth:d({},_.whiskerwidth,{dflt:0}),hoverlabel:a.hoverlabel}},41197:function(z,B,e){var d=e(71828),P=e(89298),a=e(42973),_=e(3485).calcCommon;z.exports=function(v,y){var r=v._fullLayout,n=P.getFromId(v,y.xaxis),u=P.getFromId(v,y.yaxis),i=n.makeCalcdata(y,"x"),f=a(y,n,"x",i).vals,g=_(v,y,i,f,u,x);return g.length?(d.extendFlat(g[0].t,{num:r._numBoxes,dPos:d.distinctVals(f).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,g):[{t:{empty:!0}}]};function x(v,y,r,n){return{min:r,q1:Math.min(v,n),med:n,q3:Math.max(v,n),max:y}}},1026:function(z,B,e){var d=e(71828),P=e(7901),a=e(14555),_=e(73927),x=e(75343);z.exports=function(r,n,u,i){function f(h,b){return d.coerce(r,n,x,h,b)}var g=a(r,n,f,i);if(!g){n.visible=!1;return}_(r,n,i,f,{x:!0}),f("xhoverformat"),f("yhoverformat"),f("line.width"),v(r,n,f,"increasing"),v(r,n,f,"decreasing"),f("text"),f("hovertext"),f("whiskerwidth"),i._requestRangeslider[n.xaxis]=!0};function v(y,r,n,u){var i=n(u+".line.color");n(u+".line.width",r.line.width),n(u+".fillcolor",P.addOpacity(i,.5))}},91815:function(z,B,e){z.exports={moduleType:"trace",name:"candlestick",basePlotModule:e(93612),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:e(75343),layoutAttributes:e(40094),supplyLayoutDefaults:e(4199).supplyLayoutDefaults,crossTraceCalc:e(37188).crossTraceCalc,supplyDefaults:e(1026),calc:e(41197),plot:e(86047).plot,layerName:"boxlayer",style:e(58063).style,hoverPoints:e(66449).hoverPoints,selectPoints:e(67324)}},13145:function(z,B,e){var d=e(11500),P=e(44467);z.exports=function(x,v,y,r,n){var u=r("a");u||(r("da"),r("a0"));var i=r("b");i||(r("db"),r("b0")),a(x,v,y,n)};function a(_,x,v,y){var r=["aaxis","baxis"];r.forEach(function(n){var u=n.charAt(0),i=_[n]||{},f=P.newContainer(x,n),g={noTicklabelstep:!0,tickfont:"x",id:u+"axis",letter:u,font:x.font,name:n,data:_[u],calendar:x.calendar,dfltColor:y,bgColor:v.paper_bgcolor,autotypenumbersDflt:v.autotypenumbers,fullLayout:v};d(i,f,g),f._categories=f._categories||[],!_[n]&&i.type!=="-"&&(_[n]={type:i.type})})}},402:function(z,B,e){var d=e(71828).isArrayOrTypedArray;z.exports=function(a){return P(a,0)};function P(a,_){if(!d(a)||_>=10)return null;for(var x=1/0,v=-1/0,y=a.length,r=0;r<y;r++){var n=a[r];if(d(n)){var u=P(n,_+1);u&&(x=Math.min(u[0],x),v=Math.max(u[1],v))}else x=Math.min(n,x),v=Math.max(n,v)}return[x,v]}},99798:function(z,B,e){var d=e(41940),P=e(1928),a=e(22399),_=d({editType:"calc"});_.family.dflt='"Open Sans", verdana, arial, sans-serif',_.size.dflt=12,_.color.dflt=a.defaultLine,z.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:P,baxis:P,font:_,color:{valType:"color",dflt:a.defaultLine,editType:"plot"},transforms:void 0}},4536:function(z,B,e){var d=e(71828).isArrayOrTypedArray;z.exports=function(P,a,_,x){var v,y,r,n,u,i,f,g,h,b,p,E,c,l=d(_)?"a":"b",m=l==="a"?P.aaxis:P.baxis,M=m.smoothing,L=l==="a"?P.a2i:P.b2j,D=l==="a"?_:x,A=l==="a"?x:_,C=l==="a"?a.a.length:a.b.length,S=l==="a"?a.b.length:a.a.length,o=Math.floor(l==="a"?P.b2j(A):P.a2i(A)),R=l==="a"?function(ie){return P.evalxy([],ie,o)}:function(ie){return P.evalxy([],o,ie)};M&&(r=Math.max(0,Math.min(S-2,o)),n=o-r,y=l==="a"?function(ie,se){return P.dxydi([],ie,r,se,n)}:function(ie,se){return P.dxydj([],r,ie,n,se)});var T=L(D[0]),O=L(D[1]),N=T<O?1:-1,H=(O-T)*1e-8,k=N>0?Math.floor:Math.ceil,V=N>0?Math.ceil:Math.floor,G=N>0?Math.min:Math.max,U=N>0?Math.max:Math.min,Y=k(T+H),ee=V(O-H);f=R(T);var re=[[f]];for(v=Y;v*N<ee*N;v+=N)u=[],p=U(T,v),E=G(O,v+N),c=E-p,i=Math.max(0,Math.min(C-2,Math.floor(.5*(p+E)))),g=R(E),M&&(h=y(i,p-i),b=y(i,E-i),u.push([f[0]+h[0]/3*c,f[1]+h[1]/3*c]),u.push([g[0]-b[0]/3*c,g[1]-b[1]/3*c])),u.push(g),re.push(u),f=g;return re}},1928:function(z,B,e){var d=e(41940),P=e(22399),a=e(13838),_=e(12663).descriptionWithDates,x=e(30962).overrideAll,v=e(79952).P,y=e(1426).extendFlat;z.exports={color:{valType:"color",editType:"calc"},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc"},font:d({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:a.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},tickfont:d({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:_("tick label")},tickformatstops:x(a.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:P.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:y({},v,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgriddash:y({},v,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:P.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},_deprecated:{title:{valType:"string",editType:"calc"},titlefont:d({editType:"calc"}),titleoffset:{valType:"number",dflt:10,editType:"calc"}},editType:"calc"}},11500:function(z,B,e){var d=e(99798),P=e(7901).addOpacity,a=e(73972),_=e(71828),x=e(26218),v=e(96115),y=e(89426),r=e(15258),n=e(21994),u=e(4322);z.exports=function(g,h,b){var p=b.letter,E=b.font||{},c=d[p+"axis"];function l(Y,ee){return _.coerce(g,h,c,Y,ee)}function m(Y,ee){return _.coerce2(g,h,c,Y,ee)}b.name&&(h._name=b.name,h._id=b.name),l("autotypenumbers",b.autotypenumbersDflt);var M=l("type");if(M==="-"&&(b.data&&i(h,b.data),h.type==="-"?h.type="linear":M=g.type=h.type),l("smoothing"),l("cheatertype"),l("showticklabels"),l("labelprefix",p+" = "),l("labelsuffix"),l("showtickprefix"),l("showticksuffix"),l("separatethousands"),l("tickformat"),l("exponentformat"),l("minexponent"),l("showexponent"),l("categoryorder"),l("tickmode"),l("tickvals"),l("ticktext"),l("tick0"),l("dtick"),h.tickmode==="array"&&(l("arraytick0"),l("arraydtick")),l("labelpadding"),h._hovertitle=p,M==="date"){var L=a.getComponentMethod("calendars","handleDefaults");L(g,h,"calendar",b.calendar)}n(h,b.fullLayout),h.c2p=_.identity;var D=l("color",b.dfltColor),A=D===g.color?D:E.color,C=l("title.text");C&&(_.coerceFont(l,"title.font",{family:E.family,size:_.bigFont(E.size),color:A}),l("title.offset")),l("tickangle");var S=l("autorange",!h.isValidRange(g.range));S&&l("rangemode"),l("range"),h.cleanRange(),l("fixedrange"),x(g,h,l,M),y(g,h,l,M,b),v(g,h,l,M,b),r(g,h,l,{data:b.data,dataAttr:p});var o=m("gridcolor",P(D,.3)),R=m("gridwidth"),T=m("griddash"),O=l("showgrid");O||(delete h.gridcolor,delete h.gridwidth,delete h.griddash);var N=m("startlinecolor",D),H=m("startlinewidth",R),k=l("startline",h.showgrid||!!N||!!H);k||(delete h.startlinecolor,delete h.startlinewidth);var V=m("endlinecolor",D),G=m("endlinewidth",R),U=l("endline",h.showgrid||!!V||!!G);return U||(delete h.endlinecolor,delete h.endlinewidth),O?(l("minorgridcount"),l("minorgridwidth",R),l("minorgriddash",T),l("minorgridcolor",P(o,.06)),h.minorgridcount||(delete h.minorgridwidth,delete h.minorgriddash,delete h.minorgridcolor)):(delete h.gridcolor,delete h.gridwidth,delete h.griddash),h.showticklabels==="none"&&(delete h.tickfont,delete h.tickangle,delete h.showexponent,delete h.exponentformat,delete h.minexponent,delete h.tickformat,delete h.showticksuffix,delete h.showtickprefix),h.showticksuffix||delete h.ticksuffix,h.showtickprefix||delete h.tickprefix,l("tickmode"),h};function i(f,g){if(f.type==="-"){var h=f._id,b=h.charAt(0),p=b+"calendar",E=f[p];f.type=u(g,E,{autotypenumbers:f.autotypenumbers})}}},25281:function(z,B,e){var d=e(89298),P=e(71828).isArray1D,a=e(53824),_=e(402),x=e(20347),v=e(83311),y=e(44807),r=e(4742),n=e(72505),u=e(68296),i=e(11435);z.exports=function(g,h){var b=d.getFromId(g,h.xaxis),p=d.getFromId(g,h.yaxis),E=h.aaxis,c=h.baxis,l=h.x,m=h.y,M=[];l&&P(l)&&M.push("x"),m&&P(m)&&M.push("y"),M.length&&u(h,E,c,"a","b",M);var L=h._a=h._a||h.a,D=h._b=h._b||h.b;l=h._x||h.x,m=h._y||h.y;var A={};if(h._cheater){var C=E.cheatertype==="index"?L.length:L,S=c.cheatertype==="index"?D.length:D;l=a(C,S,h.cheaterslope)}h._x=l=r(l),h._y=m=r(m),n(l,L,D),n(m,L,D),i(h),h.setScale();var o=_(l),R=_(m),T=.5*(o[1]-o[0]),O=.5*(o[1]+o[0]),N=.5*(R[1]-R[0]),H=.5*(R[1]+R[0]),k=1.3;return o=[O-T*k,O+T*k],R=[H-N*k,H+N*k],h._extremes[b._id]=d.findExtremes(b,o,{padded:!0}),h._extremes[p._id]=d.findExtremes(p,R,{padded:!0}),x(h,"a","b"),x(h,"b","a"),v(h,E),v(h,c),A.clipsegments=y(h._xctrl,h._yctrl,E,c),A.x=l,A.y=m,A.a=L,A.b=D,[A]}},44807:function(z){z.exports=function(e,d,P,a){var _,x,v,y=[],r=!!P.smoothing,n=!!a.smoothing,u=e[0].length-1,i=e.length-1;for(_=0,x=[],v=[];_<=u;_++)x[_]=e[0][_],v[_]=d[0][_];for(y.push({x,y:v,bicubic:r}),_=0,x=[],v=[];_<=i;_++)x[_]=e[_][u],v[_]=d[_][u];for(y.push({x,y:v,bicubic:n}),_=u,x=[],v=[];_>=0;_--)x[u-_]=e[i][_],v[u-_]=d[i][_];for(y.push({x,y:v,bicubic:r}),_=i,x=[],v=[];_>=0;_--)x[i-_]=e[_][0],v[i-_]=d[_][0];return y.push({x,y:v,bicubic:n}),y}},20347:function(z,B,e){var d=e(89298),P=e(1426).extendFlat;z.exports=function(_,x,v){var y,r,n,u,i,f,g,h,b,p,E,c,l,m,M=_["_"+x],L=_[x+"axis"],D=L._gridlines=[],A=L._minorgridlines=[],C=L._boundarylines=[],S=_["_"+v],o=_[v+"axis"];L.tickmode==="array"&&(L.tickvals=M.slice());var R=_._xctrl,T=_._yctrl,O=R[0].length,N=R.length,H=_._a.length,k=_._b.length;d.prepTicks(L),L.tickmode==="array"&&delete L.tickvals;var V=L.smoothing?3:1;function G(Y){var ee,re,ie,se,ce,q,j,Z,Q,ue,fe,te,ne=[],ve=[],le={};if(x==="b")for(re=_.b2j(Y),ie=Math.floor(Math.max(0,Math.min(k-2,re))),se=re-ie,le.length=k,le.crossLength=H,le.xy=function(xe){return _.evalxy([],xe,re)},le.dxy=function(xe,Se){return _.dxydi([],xe,ie,Se,se)},ee=0;ee<H;ee++)q=Math.min(H-2,ee),j=ee-q,Z=_.evalxy([],ee,re),o.smoothing&&ee>0&&(Q=_.dxydi([],ee-1,ie,0,se),ne.push(ce[0]+Q[0]/3),ve.push(ce[1]+Q[1]/3),ue=_.dxydi([],ee-1,ie,1,se),ne.push(Z[0]-ue[0]/3),ve.push(Z[1]-ue[1]/3)),ne.push(Z[0]),ve.push(Z[1]),ce=Z;else for(ee=_.a2i(Y),q=Math.floor(Math.max(0,Math.min(H-2,ee))),j=ee-q,le.length=H,le.crossLength=k,le.xy=function(xe){return _.evalxy([],ee,xe)},le.dxy=function(xe,Se){return _.dxydj([],q,xe,j,Se)},re=0;re<k;re++)ie=Math.min(k-2,re),se=re-ie,Z=_.evalxy([],ee,re),o.smoothing&&re>0&&(fe=_.dxydj([],q,re-1,j,0),ne.push(ce[0]+fe[0]/3),ve.push(ce[1]+fe[1]/3),te=_.dxydj([],q,re-1,j,1),ne.push(Z[0]-te[0]/3),ve.push(Z[1]-te[1]/3)),ne.push(Z[0]),ve.push(Z[1]),ce=Z;return le.axisLetter=x,le.axis=L,le.crossAxis=o,le.value=Y,le.constvar=v,le.index=h,le.x=ne,le.y=ve,le.smoothing=o.smoothing,le}function U(Y){var ee,re,ie,se,ce,q=[],j=[],Z={};if(Z.length=M.length,Z.crossLength=S.length,x==="b")for(ie=Math.max(0,Math.min(k-2,Y)),ce=Math.min(1,Math.max(0,Y-ie)),Z.xy=function(Q){return _.evalxy([],Q,Y)},Z.dxy=function(Q,ue){return _.dxydi([],Q,ie,ue,ce)},ee=0;ee<O;ee++)q[ee]=R[Y*V][ee],j[ee]=T[Y*V][ee];else for(re=Math.max(0,Math.min(H-2,Y)),se=Math.min(1,Math.max(0,Y-re)),Z.xy=function(Q){return _.evalxy([],Y,Q)},Z.dxy=function(Q,ue){return _.dxydj([],re,Q,se,ue)},ee=0;ee<N;ee++)q[ee]=R[ee][Y*V],j[ee]=T[ee][Y*V];return Z.axisLetter=x,Z.axis=L,Z.crossAxis=o,Z.value=M[Y],Z.constvar=v,Z.index=Y,Z.x=q,Z.y=j,Z.smoothing=o.smoothing,Z}if(L.tickmode==="array"){for(u=5e-15,i=[Math.floor((M.length-1-L.arraytick0)/L.arraydtick*(1+u)),Math.ceil(-L.arraytick0/L.arraydtick/(1+u))].sort(function(Y,ee){return Y-ee}),f=i[0]-1,g=i[1]+1,h=f;h<g;h++)r=L.arraytick0+L.arraydtick*h,!(r<0||r>M.length-1)&&D.push(P(U(r),{color:L.gridcolor,width:L.gridwidth,dash:L.griddash}));for(h=f;h<g;h++)if(n=L.arraytick0+L.arraydtick*h,E=Math.min(n+L.arraydtick,M.length-1),!(n<0||n>M.length-1)&&!(E<0||E>M.length-1))for(c=M[n],l=M[E],y=0;y<L.minorgridcount;y++)m=E-n,!(m<=0)&&(p=c+(l-c)*(y+1)/(L.minorgridcount+1)*(L.arraydtick/m),!(p<M[0]||p>M[M.length-1])&&A.push(P(G(p),{color:L.minorgridcolor,width:L.minorgridwidth,dash:L.minorgriddash})));L.startline&&C.push(P(U(0),{color:L.startlinecolor,width:L.startlinewidth})),L.endline&&C.push(P(U(M.length-1),{color:L.endlinecolor,width:L.endlinewidth}))}else{for(u=5e-15,i=[Math.floor((M[M.length-1]-L.tick0)/L.dtick*(1+u)),Math.ceil((M[0]-L.tick0)/L.dtick/(1+u))].sort(function(Y,ee){return Y-ee}),f=i[0],g=i[1],h=f;h<=g;h++)b=L.tick0+L.dtick*h,D.push(P(G(b),{color:L.gridcolor,width:L.gridwidth,dash:L.griddash}));for(h=f-1;h<g+1;h++)for(b=L.tick0+L.dtick*h,y=0;y<L.minorgridcount;y++)p=b+L.dtick*(y+1)/(L.minorgridcount+1),!(p<M[0]||p>M[M.length-1])&&A.push(P(G(p),{color:L.minorgridcolor,width:L.minorgridwidth,dash:L.minorgriddash}));L.startline&&C.push(P(G(M[0]),{color:L.startlinecolor,width:L.startlinewidth})),L.endline&&C.push(P(G(M[M.length-1]),{color:L.endlinecolor,width:L.endlinewidth}))}}},83311:function(z,B,e){var d=e(89298),P=e(1426).extendFlat;z.exports=function(_,x){var v,y,r,n,u,i=x._labels=[],f=x._gridlines;for(v=0;v<f.length;v++)u=f[v],["start","both"].indexOf(x.showticklabels)!==-1&&(y=d.tickText(x,u.value),P(y,{prefix:r,suffix:n,endAnchor:!0,xy:u.xy(0),dxy:u.dxy(0,0),axis:u.axis,length:u.crossAxis.length,font:u.axis.tickfont,isFirst:v===0,isLast:v===f.length-1}),i.push(y)),["end","both"].indexOf(x.showticklabels)!==-1&&(y=d.tickText(x,u.value),P(y,{endAnchor:!1,xy:u.xy(u.crossLength-1),dxy:u.dxy(u.crossLength-2,1),axis:u.axis,length:u.crossAxis.length,font:u.axis.tickfont,isFirst:v===0,isLast:v===f.length-1}),i.push(y))}},42048:function(z){var B=.5;z.exports=function(d,P,a,_){var x=d[0]-P[0],v=d[1]-P[1],y=a[0]-P[0],r=a[1]-P[1],n=Math.pow(x*x+v*v,B/2),u=Math.pow(y*y+r*r,B/2),i=(u*u*x-n*n*y)*_,f=(u*u*v-n*n*r)*_,g=u*(n+u)*3,h=n*(n+u)*3;return[[P[0]+(g&&i/g),P[1]+(g&&f/g)],[P[0]-(h&&i/h),P[1]-(h&&f/h)]]}},53824:function(z,B,e){var d=e(71828).isArrayOrTypedArray;z.exports=function(P,a,_){var x,v,y,r,n,u,i=[],f=d(P)?P.length:P,g=d(a)?a.length:a,h=d(P)?P:null,b=d(a)?a:null;h&&(y=(h.length-1)/(h[h.length-1]-h[0])/(f-1)),b&&(r=(b.length-1)/(b[b.length-1]-b[0])/(g-1));var p,E=1/0,c=-1/0;for(v=0;v<g;v++)for(i[v]=[],u=b?(b[v]-b[0])*r:v/(g-1),x=0;x<f;x++)n=h?(h[x]-h[0])*y:x/(f-1),p=n-u*_,E=Math.min(p,E),c=Math.max(p,c),i[v][x]=p;var l=1/(c-E),m=-E*l;for(v=0;v<g;v++)for(x=0;x<f;x++)i[v][x]=l*i[v][x]+m;return i}},45664:function(z,B,e){var d=e(42048),P=e(71828).ensureArray;function a(_,x,v){var y=-.5*v[0]+1.5*x[0],r=-.5*v[1]+1.5*x[1];return[(2*y+_[0])/3,(2*r+_[1])/3]}z.exports=function(x,v,y,r,n,u){var i,f,g,h,b,p,E,c,l,m,M=y[0].length,L=y.length,D=n?3*M-2:M,A=u?3*L-2:L;for(x=P(x,A),v=P(v,A),g=0;g<A;g++)x[g]=P(x[g],D),v[g]=P(v[g],D);for(f=0,h=0;f<L;f++,h+=u?3:1)for(b=x[h],p=v[h],E=y[f],c=r[f],i=0,g=0;i<M;i++,g+=n?3:1)b[g]=E[i],p[g]=c[i];if(n)for(f=0,h=0;f<L;f++,h+=u?3:1){for(i=1,g=3;i<M-1;i++,g+=3)l=d([y[f][i-1],r[f][i-1]],[y[f][i],r[f][i]],[y[f][i+1],r[f][i+1]],n),x[h][g-1]=l[0][0],v[h][g-1]=l[0][1],x[h][g+1]=l[1][0],v[h][g+1]=l[1][1];m=a([x[h][0],v[h][0]],[x[h][2],v[h][2]],[x[h][3],v[h][3]]),x[h][1]=m[0],v[h][1]=m[1],m=a([x[h][D-1],v[h][D-1]],[x[h][D-3],v[h][D-3]],[x[h][D-4],v[h][D-4]]),x[h][D-2]=m[0],v[h][D-2]=m[1]}if(u)for(g=0;g<D;g++){for(h=3;h<A-3;h+=3)l=d([x[h-3][g],v[h-3][g]],[x[h][g],v[h][g]],[x[h+3][g],v[h+3][g]],u),x[h-1][g]=l[0][0],v[h-1][g]=l[0][1],x[h+1][g]=l[1][0],v[h+1][g]=l[1][1];m=a([x[0][g],v[0][g]],[x[2][g],v[2][g]],[x[3][g],v[3][g]]),x[1][g]=m[0],v[1][g]=m[1],m=a([x[A-1][g],v[A-1][g]],[x[A-3][g],v[A-3][g]],[x[A-4][g],v[A-4][g]]),x[A-2][g]=m[0],v[A-2][g]=m[1]}if(n&&u)for(h=1;h<A;h+=(h+1)%3===0?2:1){for(g=3;g<D-3;g+=3)l=d([x[h][g-3],v[h][g-3]],[x[h][g],v[h][g]],[x[h][g+3],v[h][g+3]],n),x[h][g-1]=.5*(x[h][g-1]+l[0][0]),v[h][g-1]=.5*(v[h][g-1]+l[0][1]),x[h][g+1]=.5*(x[h][g+1]+l[1][0]),v[h][g+1]=.5*(v[h][g+1]+l[1][1]);m=a([x[h][0],v[h][0]],[x[h][2],v[h][2]],[x[h][3],v[h][3]]),x[h][1]=.5*(x[h][1]+m[0]),v[h][1]=.5*(v[h][1]+m[1]),m=a([x[h][D-1],v[h][D-1]],[x[h][D-3],v[h][D-3]],[x[h][D-4],v[h][D-4]]),x[h][D-2]=.5*(x[h][D-2]+m[0]),v[h][D-2]=.5*(v[h][D-2]+m[1])}return[x,v]}},35509:function(z){z.exports={RELATIVE_CULL_TOLERANCE:1e-6}},54495:function(z){z.exports=function(B,e,d){return e&&d?function(P,a,_,x,v){P||(P=[]);var y,r,n,u,i,f;a*=3,_*=3;var g=x*x,h=1-x,b=h*h,p=h*x*2,E=-3*b,c=3*(b-p),l=3*(p-g),m=3*g,M=v*v,L=M*v,D=1-v,A=D*D,C=A*D;for(f=0;f<B.length;f++)i=B[f],y=E*i[_][a]+c*i[_][a+1]+l*i[_][a+2]+m*i[_][a+3],r=E*i[_+1][a]+c*i[_+1][a+1]+l*i[_+1][a+2]+m*i[_+1][a+3],n=E*i[_+2][a]+c*i[_+2][a+1]+l*i[_+2][a+2]+m*i[_+2][a+3],u=E*i[_+3][a]+c*i[_+3][a+1]+l*i[_+3][a+2]+m*i[_+3][a+3],P[f]=C*y+3*(A*v*r+D*M*n)+L*u;return P}:e?function(P,a,_,x,v){P||(P=[]);var y,r,n,u;a*=3;var i=x*x,f=1-x,g=f*f,h=f*x*2,b=-3*g,p=3*(g-h),E=3*(h-i),c=3*i,l=1-v;for(n=0;n<B.length;n++)u=B[n],y=b*u[_][a]+p*u[_][a+1]+E*u[_][a+2]+c*u[_][a+3],r=b*u[_+1][a]+p*u[_+1][a+1]+E*u[_+1][a+2]+c*u[_+1][a+3],P[n]=l*y+v*r;return P}:d?function(P,a,_,x,v){P||(P=[]);var y,r,n,u,i,f;_*=3;var g=v*v,h=g*v,b=1-v,p=b*b,E=p*b;for(i=0;i<B.length;i++)f=B[i],y=f[_][a+1]-f[_][a],r=f[_+1][a+1]-f[_+1][a],n=f[_+2][a+1]-f[_+2][a],u=f[_+3][a+1]-f[_+3][a],P[i]=E*y+3*(p*v*r+b*g*n)+h*u;return P}:function(P,a,_,x,v){P||(P=[]);var y,r,n,u,i=1-v;for(n=0;n<B.length;n++)u=B[n],y=u[_][a+1]-u[_][a],r=u[_+1][a+1]-u[_+1][a],P[n]=i*y+v*r;return P}}},73057:function(z){z.exports=function(B,e,d){return e&&d?function(P,a,_,x,v){P||(P=[]);var y,r,n,u,i,f;a*=3,_*=3;var g=x*x,h=g*x,b=1-x,p=b*b,E=p*b,c=v*v,l=1-v,m=l*l,M=l*v*2,L=-3*m,D=3*(m-M),A=3*(M-c),C=3*c;for(f=0;f<B.length;f++)i=B[f],y=L*i[_][a]+D*i[_+1][a]+A*i[_+2][a]+C*i[_+3][a],r=L*i[_][a+1]+D*i[_+1][a+1]+A*i[_+2][a+1]+C*i[_+3][a+1],n=L*i[_][a+2]+D*i[_+1][a+2]+A*i[_+2][a+2]+C*i[_+3][a+2],u=L*i[_][a+3]+D*i[_+1][a+3]+A*i[_+2][a+3]+C*i[_+3][a+3],P[f]=E*y+3*(p*x*r+b*g*n)+h*u;return P}:e?function(P,a,_,x,v){P||(P=[]);var y,r,n,u,i,f;a*=3;var g=v*v,h=g*v,b=1-v,p=b*b,E=p*b;for(i=0;i<B.length;i++)f=B[i],y=f[_+1][a]-f[_][a],r=f[_+1][a+1]-f[_][a+1],n=f[_+1][a+2]-f[_][a+2],u=f[_+1][a+3]-f[_][a+3],P[i]=E*y+3*(p*v*r+b*g*n)+h*u;return P}:d?function(P,a,_,x,v){P||(P=[]);var y,r,n,u;_*=3;var i=1-x,f=v*v,g=1-v,h=g*g,b=g*v*2,p=-3*h,E=3*(h-b),c=3*(b-f),l=3*f;for(n=0;n<B.length;n++)u=B[n],y=p*u[_][a]+E*u[_+1][a]+c*u[_+2][a]+l*u[_+3][a],r=p*u[_][a+1]+E*u[_+1][a+1]+c*u[_+2][a+1]+l*u[_+3][a+1],P[n]=i*y+x*r;return P}:function(P,a,_,x,v){P||(P=[]);var y,r,n,u,i=1-x;for(n=0;n<B.length;n++)u=B[n],y=u[_+1][a]-u[_][a],r=u[_+1][a+1]-u[_][a+1],P[n]=i*y+x*r;return P}}},20349:function(z){z.exports=function(B,e,d,P,a){var _=e-2,x=d-2;return P&&a?function(v,y,r){v||(v=[]);var n,u,i,f,g,h,b=Math.max(0,Math.min(Math.floor(y),_)),p=Math.max(0,Math.min(Math.floor(r),x)),E=Math.max(0,Math.min(1,y-b)),c=Math.max(0,Math.min(1,r-p));b*=3,p*=3;var l=E*E,m=l*E,M=1-E,L=M*M,D=L*M,A=c*c,C=A*c,S=1-c,o=S*S,R=o*S;for(h=0;h<B.length;h++)g=B[h],n=D*g[p][b]+3*(L*E*g[p][b+1]+M*l*g[p][b+2])+m*g[p][b+3],u=D*g[p+1][b]+3*(L*E*g[p+1][b+1]+M*l*g[p+1][b+2])+m*g[p+1][b+3],i=D*g[p+2][b]+3*(L*E*g[p+2][b+1]+M*l*g[p+2][b+2])+m*g[p+2][b+3],f=D*g[p+3][b]+3*(L*E*g[p+3][b+1]+M*l*g[p+3][b+2])+m*g[p+3][b+3],v[h]=R*n+3*(o*c*u+S*A*i)+C*f;return v}:P?function(v,y,r){v||(v=[]);var n=Math.max(0,Math.min(Math.floor(y),_)),u=Math.max(0,Math.min(Math.floor(r),x)),i=Math.max(0,Math.min(1,y-n)),f=Math.max(0,Math.min(1,r-u)),g,h,b,p,E,c;n*=3;var l=i*i,m=l*i,M=1-i,L=M*M,D=L*M,A=1-f;for(E=0;E<B.length;E++)c=B[E],g=A*c[u][n]+f*c[u+1][n],h=A*c[u][n+1]+f*c[u+1][n+1],b=A*c[u][n+2]+f*c[u+1][n+1],p=A*c[u][n+3]+f*c[u+1][n+1],v[E]=D*g+3*(L*i*h+M*l*b)+m*p;return v}:a?function(v,y,r){v||(v=[]);var n=Math.max(0,Math.min(Math.floor(y),_)),u=Math.max(0,Math.min(Math.floor(r),x)),i=Math.max(0,Math.min(1,y-n)),f=Math.max(0,Math.min(1,r-u)),g,h,b,p,E,c;u*=3;var l=f*f,m=l*f,M=1-f,L=M*M,D=L*M,A=1-i;for(E=0;E<B.length;E++)c=B[E],g=A*c[u][n]+i*c[u][n+1],h=A*c[u+1][n]+i*c[u+1][n+1],b=A*c[u+2][n]+i*c[u+2][n+1],p=A*c[u+3][n]+i*c[u+3][n+1],v[E]=D*g+3*(L*f*h+M*l*b)+m*p;return v}:function(v,y,r){v||(v=[]);var n=Math.max(0,Math.min(Math.floor(y),_)),u=Math.max(0,Math.min(Math.floor(r),x)),i=Math.max(0,Math.min(1,y-n)),f=Math.max(0,Math.min(1,r-u)),g,h,b,p,E=1-f,c=1-i;for(b=0;b<B.length;b++)p=B[b],g=c*p[u][n]+i*p[u][n+1],h=c*p[u+1][n]+i*p[u+1][n+1],v[b]=E*g+f*h;return v}}},92087:function(z,B,e){var d=e(71828),P=e(19237),a=e(13145),_=e(99798),x=e(22399);z.exports=function(y,r,n,u){function i(h,b){return d.coerce(y,r,_,h,b)}r._clipPathId="clip"+r.uid+"carpet";var f=i("color",x.defaultLine);if(d.coerceFont(i,"font"),i("carpet"),a(y,r,u,i,f),!r.a||!r.b){r.visible=!1;return}r.a.length<3&&(r.aaxis.smoothing=0),r.b.length<3&&(r.baxis.smoothing=0);var g=P(y,r,i);g||(r.visible=!1),r._cheater&&i("cheaterslope")}},21462:function(z,B,e){z.exports={attributes:e(99798),supplyDefaults:e(92087),plot:e(89740),calc:e(25281),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:e(93612),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}},22882:function(z){z.exports=function(B,e){for(var d=B._fullData.length,P,a=0;a<d;a++){var _=B._fullData[a];if(_.index!==e.index&&_.type==="carpet"&&(P||(P=_),_.carpet===e.carpet))return _}return P}},67961:function(z){z.exports=function(e,d,P){if(e.length===0)return"";var a,_=[],x=P?3:1;for(a=0;a<e.length;a+=x)_.push(e[a]+","+d[a]),P&&a<e.length-x&&(_.push("C"),_.push([e[a+1]+","+d[a+1],e[a+2]+","+d[a+2]+" "].join(" ")));return _.join(P?"":"L")}},27669:function(z,B,e){var d=e(71828).isArrayOrTypedArray;z.exports=function(a,_,x){var v;for(d(a)?a.length>_.length&&(a=a.slice(0,_.length)):a=[],v=0;v<_.length;v++)a[v]=x(_[v]);return a}},11651:function(z){z.exports=function(e,d,P,a,_,x){var v=_[0]*e.dpdx(d),y=_[1]*e.dpdy(P),r=1,n=1;if(x){var u=Math.sqrt(_[0]*_[0]+_[1]*_[1]),i=Math.sqrt(x[0]*x[0]+x[1]*x[1]),f=(_[0]*x[0]+_[1]*x[1])/u/i;n=Math.max(0,f)}var g=Math.atan2(y,v)*180/Math.PI;return g<-90?(g+=180,r=-r):g>90&&(g-=180,r=-r),{angle:g,flip:r,p:e.c2p(a,d,P),offsetMultplier:n}}},89740:function(z,B,e){var d=e(39898),P=e(91424),a=e(27669),_=e(67961),x=e(11651),v=e(63893),y=e(71828),r=y.strRotate,n=y.strTranslate,u=e(18783);z.exports=function(l,m,M,L){var D=l._context.staticPlot,A=m.xaxis,C=m.yaxis,S=l._fullLayout,o=S._clips;y.makeTraceGroups(L,M,"trace").each(function(R){var T=d.select(this),O=R[0],N=O.trace,H=N.aaxis,k=N.baxis,V=y.ensureSingle(T,"g","minorlayer"),G=y.ensureSingle(T,"g","majorlayer"),U=y.ensureSingle(T,"g","boundarylayer"),Y=y.ensureSingle(T,"g","labellayer");T.style("opacity",N.opacity),f(A,C,G,H,"a",H._gridlines,!0),f(A,C,G,k,"b",k._gridlines,!0),f(A,C,V,H,"a",H._minorgridlines,!0),f(A,C,V,k,"b",k._minorgridlines,!0),f(A,C,U,H,"a-boundary",H._boundarylines,D),f(A,C,U,k,"b-boundary",k._boundarylines,D);var ee=g(l,A,C,N,O,Y,H._labels,"a-label"),re=g(l,A,C,N,O,Y,k._labels,"b-label");h(l,Y,N,O,A,C,ee,re),i(N,O,o,A,C)})};function i(c,l,m,M,L){var D,A,C,S,o=m.select("#"+c._clipPathId);o.size()||(o=m.append("clipPath").classed("carpetclip",!0));var R=y.ensureSingle(o,"path","carpetboundary"),T=l.clipsegments,O=[];for(S=0;S<T.length;S++)D=T[S],A=a([],D.x,M.c2p),C=a([],D.y,L.c2p),O.push(_(A,C,D.bicubic));var N="M"+O.join("L")+"Z";o.attr("id",c._clipPathId),R.attr("d",N)}function f(c,l,m,M,L,D,A){var C="const-"+L+"-lines",S=m.selectAll("."+C).data(D);S.enter().append("path").classed(C,!0).style("vector-effect",A?"none":"non-scaling-stroke"),S.each(function(o){var R=o,T=R.x,O=R.y,N=a([],T,c.c2p),H=a([],O,l.c2p),k="M"+_(N,H,R.smoothing),V=d.select(this);V.attr("d",k).style("stroke-width",R.width).style("stroke",R.color).style("stroke-dasharray",P.dashStyle(R.dash,R.width)).style("fill","none")}),S.exit().remove()}function g(c,l,m,M,L,D,A,C){var S=D.selectAll("text."+C).data(A);S.enter().append("text").classed(C,!0);var o=0,R={};return S.each(function(T,O){var N;if(T.axis.tickangle==="auto")N=x(M,l,m,T.xy,T.dxy);else{var H=(T.axis.tickangle+180)*Math.PI/180;N=x(M,l,m,T.xy,[Math.cos(H),Math.sin(H)])}O||(R={angle:N.angle,flip:N.flip});var k=(T.endAnchor?-1:1)*N.flip,V=d.select(this).attr({"text-anchor":k>0?"start":"end","data-notex":1}).call(P.font,T.font).text(T.text).call(v.convertToTspans,c),G=P.bBox(this);V.attr("transform",n(N.p[0],N.p[1])+r(N.angle)+n(T.axis.labelpadding*k,G.height*.3)),o=Math.max(o,G.width+T.axis.labelpadding)}),S.exit().remove(),R.maxExtent=o,R}function h(c,l,m,M,L,D,A,C){var S,o,R,T,O=y.aggNums(Math.min,null,m.a),N=y.aggNums(Math.max,null,m.a),H=y.aggNums(Math.min,null,m.b),k=y.aggNums(Math.max,null,m.b);S=.5*(O+N),o=H,R=m.ab2xy(S,o,!0),T=m.dxyda_rough(S,o),A.angle===void 0&&y.extendFlat(A,x(m,L,D,R,m.dxydb_rough(S,o))),E(c,l,m,M,R,T,m.aaxis,L,D,A,"a-title"),S=O,o=.5*(H+k),R=m.ab2xy(S,o,!0),T=m.dxydb_rough(S,o),C.angle===void 0&&y.extendFlat(C,x(m,L,D,R,m.dxyda_rough(S,o))),E(c,l,m,M,R,T,m.baxis,L,D,C,"b-title")}var b=u.LINE_SPACING,p=(1-u.MID_SHIFT)/b+1;function E(c,l,m,M,L,D,A,C,S,o,R){var T=[];A.title.text&&T.push(A.title.text);var O=l.selectAll("text."+R).data(T),N=o.maxExtent;O.enter().append("text").classed(R,!0),O.each(function(){var H=x(m,C,S,L,D);["start","both"].indexOf(A.showticklabels)===-1&&(N=0);var k=A.title.font.size;N+=k+A.title.offset;var V=o.angle+(o.flip<0?180:0),G=(V-H.angle+450)%360,U=G>90&&G<270,Y=d.select(this);Y.text(A.title.text).call(v.convertToTspans,c),U&&(N=(-v.lineCount(Y)+p)*b*k-N),Y.attr("transform",n(H.p[0],H.p[1])+r(H.angle)+n(0,N)).attr("text-anchor","middle").call(P.font,A.title.font)}),O.exit().remove()}},11435:function(z,B,e){var d=e(35509),P=e(65888).findBin,a=e(45664),_=e(20349),x=e(54495),v=e(73057);z.exports=function(r){var n=r._a,u=r._b,i=n.length,f=u.length,g=r.aaxis,h=r.baxis,b=n[0],p=n[i-1],E=u[0],c=u[f-1],l=n[n.length-1]-n[0],m=u[u.length-1]-u[0],M=l*d.RELATIVE_CULL_TOLERANCE,L=m*d.RELATIVE_CULL_TOLERANCE;b-=M,p+=M,E-=L,c+=L,r.isVisible=function(D,A){return D>b&&D<p&&A>E&&A<c},r.isOccluded=function(D,A){return D<b||D>p||A<E||A>c},r.setScale=function(){var D=r._x,A=r._y,C=a(r._xctrl,r._yctrl,D,A,g.smoothing,h.smoothing);r._xctrl=C[0],r._yctrl=C[1],r.evalxy=_([r._xctrl,r._yctrl],i,f,g.smoothing,h.smoothing),r.dxydi=x([r._xctrl,r._yctrl],g.smoothing,h.smoothing),r.dxydj=v([r._xctrl,r._yctrl],g.smoothing,h.smoothing)},r.i2a=function(D){var A=Math.max(0,Math.floor(D[0]),i-2),C=D[0]-A;return(1-C)*n[A]+C*n[A+1]},r.j2b=function(D){var A=Math.max(0,Math.floor(D[1]),i-2),C=D[1]-A;return(1-C)*u[A]+C*u[A+1]},r.ij2ab=function(D){return[r.i2a(D[0]),r.j2b(D[1])]},r.a2i=function(D){var A=Math.max(0,Math.min(P(D,n),i-2)),C=n[A],S=n[A+1];return Math.max(0,Math.min(i-1,A+(D-C)/(S-C)))},r.b2j=function(D){var A=Math.max(0,Math.min(P(D,u),f-2)),C=u[A],S=u[A+1];return Math.max(0,Math.min(f-1,A+(D-C)/(S-C)))},r.ab2ij=function(D){return[r.a2i(D[0]),r.b2j(D[1])]},r.i2c=function(D,A){return r.evalxy([],D,A)},r.ab2xy=function(D,A,C){if(!C&&(D<n[0]||D>n[i-1]|A<u[0]||A>u[f-1]))return[!1,!1];var S=r.a2i(D),o=r.b2j(A),R=r.evalxy([],S,o);if(C){var T=0,O=0,N=[],H,k,V,G;D<n[0]?(H=0,k=0,T=(D-n[0])/(n[1]-n[0])):D>n[i-1]?(H=i-2,k=1,T=(D-n[i-1])/(n[i-1]-n[i-2])):(H=Math.max(0,Math.min(i-2,Math.floor(S))),k=S-H),A<u[0]?(V=0,G=0,O=(A-u[0])/(u[1]-u[0])):A>u[f-1]?(V=f-2,G=1,O=(A-u[f-1])/(u[f-1]-u[f-2])):(V=Math.max(0,Math.min(f-2,Math.floor(o))),G=o-V),T&&(r.dxydi(N,H,V,k,G),R[0]+=N[0]*T,R[1]+=N[1]*T),O&&(r.dxydj(N,H,V,k,G),R[0]+=N[0]*O,R[1]+=N[1]*O)}return R},r.c2p=function(D,A,C){return[A.c2p(D[0]),C.c2p(D[1])]},r.p2x=function(D,A,C){return[A.p2c(D[0]),C.p2c(D[1])]},r.dadi=function(D){var A=Math.max(0,Math.min(n.length-2,D));return n[A+1]-n[A]},r.dbdj=function(D){var A=Math.max(0,Math.min(u.length-2,D));return u[A+1]-u[A]},r.dxyda=function(D,A,C,S){var o=r.dxydi(null,D,A,C,S),R=r.dadi(D,C);return[o[0]/R,o[1]/R]},r.dxydb=function(D,A,C,S){var o=r.dxydj(null,D,A,C,S),R=r.dbdj(A,S);return[o[0]/R,o[1]/R]},r.dxyda_rough=function(D,A,C){var S=l*(C||.1),o=r.ab2xy(D+S,A,!0),R=r.ab2xy(D-S,A,!0);return[(o[0]-R[0])*.5/S,(o[1]-R[1])*.5/S]},r.dxydb_rough=function(D,A,C){var S=m*(C||.1),o=r.ab2xy(D,A+S,!0),R=r.ab2xy(D,A-S,!0);return[(o[0]-R[0])*.5/S,(o[1]-R[1])*.5/S]},r.dpdx=function(D){return D._m},r.dpdy=function(D){return D._m}}},72505:function(z,B,e){var d=e(71828);z.exports=function(a,_,x){var v,y,r,n=[],u=[],i=a[0].length,f=a.length;function g(re,ie){var se=0,ce,q=0;return re>0&&(ce=a[ie][re-1])!==void 0&&(q++,se+=ce),re<i-1&&(ce=a[ie][re+1])!==void 0&&(q++,se+=ce),ie>0&&(ce=a[ie-1][re])!==void 0&&(q++,se+=ce),ie<f-1&&(ce=a[ie+1][re])!==void 0&&(q++,se+=ce),se/Math.max(1,q)}var h=0;for(v=0;v<i;v++)for(y=0;y<f;y++)a[y][v]===void 0&&(n.push(v),u.push(y),a[y][v]=g(v,y)),h=Math.max(h,Math.abs(a[y][v]));if(!n.length)return a;var b,p,E,c,l,m,M,L,D,A,C,S=1e-5,o=0,R=100,T=0,O=n.length;do{for(o=0,r=0;r<O;r++){v=n[r],y=u[r];var N=0,H=0,k,V,G,U,Y,ee;v===0?(Y=Math.min(i-1,2),G=_[Y],U=_[1],k=a[y][Y],V=a[y][1],H+=V+(V-k)*(_[0]-U)/(U-G),N++):v===i-1&&(Y=Math.max(0,i-3),G=_[Y],U=_[i-2],k=a[y][Y],V=a[y][i-2],H+=V+(V-k)*(_[i-1]-U)/(U-G),N++),(v===0||v===i-1)&&y>0&&y<f-1&&(b=x[y+1]-x[y],p=x[y]-x[y-1],H+=(p*a[y+1][v]+b*a[y-1][v])/(p+b),N++),y===0?(ee=Math.min(f-1,2),G=x[ee],U=x[1],k=a[ee][v],V=a[1][v],H+=V+(V-k)*(x[0]-U)/(U-G),N++):y===f-1&&(ee=Math.max(0,f-3),G=x[ee],U=x[f-2],k=a[ee][v],V=a[f-2][v],H+=V+(V-k)*(x[f-1]-U)/(U-G),N++),(y===0||y===f-1)&&v>0&&v<i-1&&(b=_[v+1]-_[v],p=_[v]-_[v-1],H+=(p*a[y][v+1]+b*a[y][v-1])/(p+b),N++),N?H/=N:(E=_[v+1]-_[v],c=_[v]-_[v-1],l=x[y+1]-x[y],m=x[y]-x[y-1],M=E*c*(E+c),L=l*m*(l+m),H=(M*(m*a[y+1][v]+l*a[y-1][v])+L*(c*a[y][v+1]+E*a[y][v-1]))/(L*(c+E)+M*(m+l))),D=H-a[y][v],A=D/h,o+=A*A,C=N?0:.85,a[y][v]+=D*(1+C)}o=Math.sqrt(o)}while(T++<R&&o>S);return d.log("Smoother converged to",o,"after",T,"iterations"),a}},19237:function(z,B,e){var d=e(71828).isArray1D;z.exports=function(a,_,x){var v=x("x"),y=v&&v.length,r=x("y"),n=r&&r.length;if(!y&&!n)return!1;if(_._cheater=!v,(!y||d(v))&&(!n||d(r))){var u=y?v.length:1/0;n&&(u=Math.min(u,r.length)),_.a&&_.a.length&&(u=Math.min(u,_.a.length)),_.b&&_.b.length&&(u=Math.min(u,_.b.length)),_._length=u}else _._length=null;return!0}},69568:function(z,B,e){var d=e(5386).f,P=e(19316),a=e(50693),_=e(9012),x=e(22399).defaultLine,v=e(1426).extendFlat,y=P.marker.line;z.exports=v({locations:{valType:"data_array",editType:"calc"},locationmode:P.locationmode,z:{valType:"data_array",editType:"calc"},geojson:v({},P.geojson,{}),featureidkey:P.featureidkey,text:v({},P.text,{}),hovertext:v({},P.hovertext,{}),marker:{line:{color:v({},y.color,{dflt:x}),width:v({},y.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:P.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:P.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:v({},_.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:d(),showlegend:v({},_.showlegend,{dflt:!1})},a("",{cLetter:"z",editTypeOverride:"calc"}))},38675:function(z,B,e){var d=e(92770),P=e(50606).BADNUM,a=e(78803),_=e(75225),x=e(66279);function v(y){return y&&typeof y=="string"}z.exports=function(r,n){var u=n._length,i=new Array(u),f;n.geojson?f=function(E){return v(E)||d(E)}:f=v;for(var g=0;g<u;g++){var h=i[g]={},b=n.locations[g],p=n.z[g];f(b)&&d(p)?(h.loc=b,h.z=p):(h.loc=null,h.z=P),h.index=g}return _(i,n),a(r,n,{vals:n.z,containerStr:"",cLetter:"z"}),x(i,n),i}},61869:function(z,B,e){var d=e(71828),P=e(1586),a=e(69568);z.exports=function(x,v,y,r){function n(p,E){return d.coerce(x,v,a,p,E)}var u=n("locations"),i=n("z");if(!(u&&u.length&&d.isArrayOrTypedArray(i)&&i.length)){v.visible=!1;return}v._length=Math.min(u.length,i.length);var f=n("geojson"),g;(typeof f=="string"&&f!==""||d.isPlainObject(f))&&(g="geojson-id");var h=n("locationmode",g);h==="geojson-id"&&n("featureidkey"),n("text"),n("hovertext"),n("hovertemplate");var b=n("marker.line.width");b&&n("marker.line.color"),n("marker.opacity"),P(x,v,r,n,{prefix:"",cLetter:"z"}),d.coerceSelectionMarkerOpacity(v,n)}},92069:function(z){z.exports=function(e,d,P,a,_){e.location=d.location,e.z=d.z;var x=a[_];return x.fIn&&x.fIn.properties&&(e.properties=x.fIn.properties),e.ct=x.ct,e}},42300:function(z,B,e){var d=e(89298),P=e(69568),a=e(71828).fillText;z.exports=function(v,y,r){var n=v.cd,u=n[0].trace,i=v.subplot,f,g,h,b,p=[y,r],E=[y+360,r];for(g=0;g<n.length;g++)if(f=n[g],b=!1,f._polygons){for(h=0;h<f._polygons.length;h++)f._polygons[h].contains(p)&&(b=!b),f._polygons[h].contains(E)&&(b=!b);if(b)break}if(!(!b||!f))return v.x0=v.x1=v.xa.c2p(f.ct),v.y0=v.y1=v.ya.c2p(f.ct),v.index=f.index,v.location=f.loc,v.z=f.z,v.zLabel=d.tickText(i.mockAxis,i.mockAxis.c2l(f.z),"hover").text,v.hovertemplate=f.hovertemplate,_(v,u,f),[v]};function _(x,v,y){if(!v.hovertemplate){var r=y.hi||v.hoverinfo,n=String(y.loc),u=r==="all"?P.hoverinfo.flags:r.split("+"),i=u.indexOf("name")!==-1,f=u.indexOf("location")!==-1,g=u.indexOf("z")!==-1,h=u.indexOf("text")!==-1,b=!i&&f,p=[];b?x.nameOverride=n:(i&&(x.nameOverride=v.name),f&&p.push(n)),g&&p.push(x.zLabel),h&&a(y,v,p),x.extraText=p.join("<br>")}}},51319:function(z,B,e){z.exports={attributes:e(69568),supplyDefaults:e(61869),colorbar:e(61243),calc:e(38675),calcGeoJSON:e(99841).calcGeoJSON,plot:e(99841).plot,style:e(99636).style,styleOnSelect:e(99636).styleOnSelect,hoverPoints:e(42300),eventData:e(92069),selectPoints:e(81253),moduleType:"trace",name:"choropleth",basePlotModule:e(44622),categories:["geo","noOpacity","showLegend"],meta:{}}},99841:function(z,B,e){var d=e(39898),P=e(71828),a=e(41327),_=e(90973).getTopojsonFeatures,x=e(71739).findExtremes,v=e(99636).style;function y(n,u,i){var f=u.layers.backplot.select(".choroplethlayer");P.makeTraceGroups(f,i,"trace choropleth").each(function(g){var h=d.select(this),b=h.selectAll("path.choroplethlocation").data(P.identity);b.enter().append("path").classed("choroplethlocation",!0),b.exit().remove(),v(n,g)})}function r(n,u){for(var i=n[0].trace,f=u[i.geo],g=f._subplot,h=i.locationmode,b=i._length,p=h==="geojson-id"?a.extractTraceFeature(n):_(i,g.topojson),E=[],c=[],l=0;l<b;l++){var m=n[l],M=h==="geojson-id"?m.fOut:a.locationToFeature(h,m.loc,p);if(M){m.geojson=M,m.ct=M.properties.ct,m._polygons=a.feature2polygons(M);var L=a.computeBbox(M);E.push(L[0],L[2]),c.push(L[1],L[3])}else m.geojson=null}if(f.fitbounds==="geojson"&&h==="geojson-id"){var D=a.computeBbox(a.getTraceGeojson(i));E=[D[0],D[2]],c=[D[1],D[3]]}var A={padded:!0};i._extremes.lon=x(f.lonaxis._ax,E,A),i._extremes.lat=x(f.lataxis._ax,c,A)}z.exports={calcGeoJSON:r,plot:y}},81253:function(z){z.exports=function(e,d){var P=e.cd,a=e.xaxis,_=e.yaxis,x=[],v,y,r,n,u;if(d===!1)for(v=0;v<P.length;v++)P[v].selected=0;else for(v=0;v<P.length;v++)y=P[v],r=y.ct,r&&(n=a.c2p(r),u=_.c2p(r),d.contains([n,u],null,v,e)?(x.push({pointNumber:v,lon:r[0],lat:r[1]}),y.selected=1):y.selected=0);return x}},99636:function(z,B,e){var d=e(39898),P=e(7901),a=e(91424),_=e(21081);function x(r,n){n&&v(r,n)}function v(r,n){var u=n[0].trace,i=n[0].node3,f=i.selectAll(".choroplethlocation"),g=u.marker||{},h=g.line||{},b=_.makeColorScaleFuncFromTrace(u);f.each(function(p){d.select(this).attr("fill",b(p.z)).call(P.stroke,p.mlc||h.color).call(a.dashLine,"",p.mlw||h.width||0).style("opacity",g.opacity)}),a.selectedPointStyle(f,u)}function y(r,n){var u=n[0].node3,i=n[0].trace;i.selectedpoints?a.selectedPointStyle(u.selectAll(".choroplethlocation"),i):v(r,n)}z.exports={style:x,styleOnSelect:y}},64496:function(z,B,e){var d=e(69568),P=e(50693),a=e(5386).f,_=e(9012),x=e(1426).extendFlat;z.exports=x({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:x({},d.featureidkey,{}),below:{valType:"string",editType:"plot"},text:d.text,hovertext:d.hovertext,marker:{line:{color:x({},d.marker.line.color,{editType:"plot"}),width:x({},d.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:x({},d.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:x({},d.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:x({},d.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:d.hoverinfo,hovertemplate:a({},{keys:["properties"]}),showlegend:x({},_.showlegend,{dflt:!1})},P("",{cLetter:"z",editTypeOverride:"calc"}))},82004:function(z,B,e){var d=e(92770),P=e(71828),a=e(21081),_=e(91424),x=e(18214).makeBlank,v=e(41327);function y(n){var u=n[0].trace,i=u.visible===!0&&u._length!==0,f={layout:{visibility:"none"},paint:{}},g={layout:{visibility:"none"},paint:{}},h=u._opts={fill:f,line:g,geojson:x()};if(!i)return h;var b=v.extractTraceFeature(n);if(!b)return h;var p=a.makeColorScaleFuncFromTrace(u),E=u.marker,c=E.line||{},l;P.isArrayOrTypedArray(E.opacity)&&(l=function(o){var R=o.mo;return d(R)?+P.constrain(R,0,1):0});var m;P.isArrayOrTypedArray(c.color)&&(m=function(o){return o.mlc});var M;P.isArrayOrTypedArray(c.width)&&(M=function(o){return o.mlw});for(var L=0;L<n.length;L++){var D=n[L],A=D.fOut;if(A){var C=A.properties;C.fc=p(D.z),l&&(C.mo=l(D)),m&&(C.mlc=m(D)),M&&(C.mlw=M(D)),D.ct=C.ct,D._polygons=v.feature2polygons(A)}}var S=l?{type:"identity",property:"mo"}:E.opacity;return P.extendFlat(f.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":S}),P.extendFlat(g.paint,{"line-color":m?{type:"identity",property:"mlc"}:c.color,"line-width":M?{type:"identity",property:"mlw"}:c.width,"line-opacity":S}),f.layout.visibility="visible",g.layout.visibility="visible",h.geojson={type:"FeatureCollection",features:b},r(n),h}function r(n){var u=n[0].trace,i=u._opts,f;if(u.selectedpoints){for(var g=_.makeSelectedPointStyleFns(u),h=0;h<n.length;h++){var b=n[h];b.fOut&&(b.fOut.properties.mo2=g.selectedOpacityFn(b))}f={type:"identity",property:"mo2"}}else f=P.isArrayOrTypedArray(u.marker.opacity)?{type:"identity",property:"mo"}:u.marker.opacity;return P.extendFlat(i.fill.paint,{"fill-opacity":f}),P.extendFlat(i.line.paint,{"line-opacity":f}),i}z.exports={convert:y,convertOnSelect:r}},22654:function(z,B,e){var d=e(71828),P=e(1586),a=e(64496);z.exports=function(x,v,y,r){function n(h,b){return d.coerce(x,v,a,h,b)}var u=n("locations"),i=n("z"),f=n("geojson");if(!d.isArrayOrTypedArray(u)||!u.length||!d.isArrayOrTypedArray(i)||!i.length||!(typeof f=="string"&&f!==""||d.isPlainObject(f))){v.visible=!1;return}n("featureidkey"),v._length=Math.min(u.length,i.length),n("below"),n("text"),n("hovertext"),n("hovertemplate");var g=n("marker.line.width");g&&n("marker.line.color"),n("marker.opacity"),P(x,v,r,n,{prefix:"",cLetter:"z"}),d.coerceSelectionMarkerOpacity(v,n)}},57516:function(z,B,e){z.exports={attributes:e(64496),supplyDefaults:e(22654),colorbar:e(61243),calc:e(38675),plot:e(7852),hoverPoints:e(42300),eventData:e(92069),selectPoints:e(81253),styleOnSelect:function(d,P){if(P){var a=P[0].trace;a._glTrace.updateOnSelect(P)}},getBelow:function(d,P){for(var a=P.getMapLayers(),_=a.length-2;_>=0;_--){var x=a[_].id;if(typeof x=="string"&&x.indexOf("water")===0){for(var v=_+1;v<a.length;v++)if(x=a[v].id,typeof x=="string"&&x.indexOf("plotly-")===-1)return x}}},moduleType:"trace",name:"choroplethmapbox",basePlotModule:e(50101),categories:["mapbox","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_mapbox"}}},7852:function(z,B,e){var d=e(82004).convert,P=e(82004).convertOnSelect,a=e(77734).traceLayerPrefix;function _(v,y){this.type="choroplethmapbox",this.subplot=v,this.uid=y,this.sourceId="source-"+y,this.layerList=[["fill",a+y+"-fill"],["line",a+y+"-line"]],this.below=null}var x=_.prototype;x.update=function(v){this._update(d(v)),v[0].trace._glTrace=this},x.updateOnSelect=function(v){this._update(P(v))},x._update=function(v){var y=this.subplot,r=this.layerList,n=y.belowLookup["trace-"+this.uid];y.map.getSource(this.sourceId).setData(v.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(v,n),this.below=n);for(var u=0;u<r.length;u++){var i=r[u],f=i[0],g=i[1],h=v[f];y.setOptions(g,"setLayoutProperty",h.layout),h.layout.visibility==="visible"&&y.setOptions(g,"setPaintProperty",h.paint)}},x._addLayers=function(v,y){for(var r=this.subplot,n=this.layerList,u=this.sourceId,i=0;i<n.length;i++){var f=n[i],g=f[0],h=v[g];r.addLayer({type:g,id:f[1],source:u,layout:h.layout,paint:h.paint},y)}},x._removeLayers=function(){for(var v=this.subplot.map,y=this.layerList,r=y.length-1;r>=0;r--)v.removeLayer(y[r][1])},x.dispose=function(){var v=this.subplot.map;this._removeLayers(),v.removeSource(this.sourceId)},z.exports=function(y,r){var n=r[0].trace,u=new _(y,n.uid),i=u.sourceId,f=d(r),g=u.below=y.belowLookup["trace-"+n.uid];return y.map.addSource(i,{type:"geojson",data:f.geojson}),u._addLayers(f,g),r[0].trace._glTrace=u,u}},12674:function(z,B,e){var d=e(50693),P=e(12663).axisHoverFormat,a=e(5386).f,_=e(2418),x=e(9012),v=e(1426).extendFlat,y={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:a({editType:"calc"},{keys:["norm"]}),uhoverformat:P("u",1),vhoverformat:P("v",1),whoverformat:P("w",1),xhoverformat:P("x"),yhoverformat:P("y"),zhoverformat:P("z"),showlegend:v({},x.showlegend,{dflt:!1})};v(y,d("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var r=["opacity","lightposition","lighting"];r.forEach(function(n){y[n]=_[n]}),y.hoverinfo=v({},x.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),y.transforms=void 0,z.exports=y},31371:function(z,B,e){var d=e(78803);z.exports=function(a,_){for(var x=_.u,v=_.v,y=_.w,r=Math.min(_.x.length,_.y.length,_.z.length,x.length,v.length,y.length),n=-1/0,u=1/0,i=0;i<r;i++){var f=x[i],g=v[i],h=y[i],b=Math.sqrt(f*f+g*g+h*h);n=Math.max(n,b),u=Math.min(u,b)}_._len=r,_._normMax=n,d(a,_,{vals:[u,n],containerStr:"",cLetter:"c"})}},5453:function(z,B,e){var d=e(9330).gl_cone3d,P=e(9330).gl_cone3d.createConeMesh,a=e(71828).simpleMap,_=e(81697).parseColorScale,x=e(21081).extractOpts,v=e(90060);function y(h,b){this.scene=h,this.uid=b,this.mesh=null,this.data=null}var r=y.prototype;r.handlePick=function(h){if(h.object===this.mesh){var b=h.index=h.data.index,p=this.data.x[b],E=this.data.y[b],c=this.data.z[b],l=this.data.u[b],m=this.data.v[b],M=this.data.w[b];h.traceCoordinate=[p,E,c,l,m,M,Math.sqrt(l*l+m*m+M*M)];var L=this.data.hovertext||this.data.text;return Array.isArray(L)&&L[b]!==void 0?h.textLabel=L[b]:L&&(h.textLabel=L),!0}};var n={xaxis:0,yaxis:1,zaxis:2},u={tip:1,tail:0,cm:.25,center:.5},i={tip:1,tail:1,cm:.75,center:.5};function f(h,b){var p=h.fullSceneLayout,E=h.dataScale,c={};function l(D,A){var C=p[A],S=E[n[A]];return a(D,function(o){return C.d2l(o)*S})}c.vectors=v(l(b.u,"xaxis"),l(b.v,"yaxis"),l(b.w,"zaxis"),b._len),c.positions=v(l(b.x,"xaxis"),l(b.y,"yaxis"),l(b.z,"zaxis"),b._len);var m=x(b);c.colormap=_(b),c.vertexIntensityBounds=[m.min/b._normMax,m.max/b._normMax],c.coneOffset=u[b.anchor],b.sizemode==="scaled"?c.coneSize=b.sizeref||.5:c.coneSize=b.sizeref&&b._normMax?b.sizeref/b._normMax:.5;var M=d(c),L=b.lightposition;return M.lightPosition=[L.x,L.y,L.z],M.ambient=b.lighting.ambient,M.diffuse=b.lighting.diffuse,M.specular=b.lighting.specular,M.roughness=b.lighting.roughness,M.fresnel=b.lighting.fresnel,M.opacity=b.opacity,b._pad=i[b.anchor]*M.vectorScale*M.coneScale*b._normMax,M}r.update=function(h){this.data=h;var b=f(this.scene,h);this.mesh.update(b)},r.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function g(h,b){var p=h.glplot.gl,E=f(h,b),c=P(p,E),l=new y(h,b.uid);return l.mesh=c,l.data=b,c._trace=l,h.glplot.add(c),l}z.exports=g},91750:function(z,B,e){var d=e(71828),P=e(1586),a=e(12674);z.exports=function(x,v,y,r){function n(p,E){return d.coerce(x,v,a,p,E)}var u=n("u"),i=n("v"),f=n("w"),g=n("x"),h=n("y"),b=n("z");if(!u||!u.length||!i||!i.length||!f||!f.length||!g||!g.length||!h||!h.length||!b||!b.length){v.visible=!1;return}n("sizeref"),n("sizemode"),n("anchor"),n("lighting.ambient"),n("lighting.diffuse"),n("lighting.specular"),n("lighting.roughness"),n("lighting.fresnel"),n("lightposition.x"),n("lightposition.y"),n("lightposition.z"),P(x,v,r,n,{prefix:"",cLetter:"c"}),n("text"),n("hovertext"),n("hovertemplate"),n("uhoverformat"),n("vhoverformat"),n("whoverformat"),n("xhoverformat"),n("yhoverformat"),n("zhoverformat"),v._length=null}},98128:function(z,B,e){z.exports={moduleType:"trace",name:"cone",basePlotModule:e(58547),categories:["gl3d","showLegend"],attributes:e(12674),supplyDefaults:e(91750),colorbar:{min:"cmin",max:"cmax"},calc:e(31371),plot:e(5453),eventData:function(d,P){return d.norm=P.traceCoordinate[6],d},meta:{}}},70600:function(z,B,e){var d=e(21606),P=e(82196),a=e(12663),_=a.axisHoverFormat,x=a.descriptionOnlyNumbers,v=e(50693),y=e(79952).P,r=e(41940),n=e(1426).extendFlat,u=e(74808),i=u.COMPARISON_OPS2,f=u.INTERVAL_OPS,g=P.line;z.exports=n({z:d.z,x:d.x,x0:d.x0,dx:d.dx,y:d.y,y0:d.y0,dy:d.dy,xperiod:d.xperiod,yperiod:d.yperiod,xperiod0:P.xperiod0,yperiod0:P.yperiod0,xperiodalignment:d.xperiodalignment,yperiodalignment:d.yperiodalignment,text:d.text,hovertext:d.hovertext,transpose:d.transpose,xtype:d.xtype,ytype:d.ytype,xhoverformat:_("x"),yhoverformat:_("y"),zhoverformat:_("z",1),hovertemplate:d.hovertemplate,texttemplate:n({},d.texttemplate,{}),textfont:n({},d.textfont,{}),hoverongaps:d.hoverongaps,connectgaps:n({},d.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:r({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:x("contour label")},operation:{valType:"enumerated",values:[].concat(i).concat(f),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:n({},g.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:y,smoothing:n({},g.smoothing,{}),editType:"plot"}},v("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))},27529:function(z,B,e){var d=e(21081),P=e(90757),a=e(18670),_=e(53572);z.exports=function(v,y){var r=P(v,y),n=r[0].z;a(y,n);var u=y.contours,i=d.extractOpts(y),f;if(u.coloring==="heatmap"&&i.auto&&y.autocontour===!1){var g=u.start,h=_(u),b=u.size||1,p=Math.floor((h-g)/b)+1;isFinite(b)||(b=1,p=1);var E=g-b/2,c=E+p*b;f=[E,c]}else f=n;return d.calc(v,y,{vals:f,cLetter:"z"}),r}},20083:function(z){z.exports=function(B,e){var d=B[0],P=d.z,a;switch(e.type){case"levels":var _=Math.min(P[0][0],P[0][1]);for(a=0;a<B.length;a++){var x=B[a];x.prefixBoundary=!x.edgepaths.length&&(_>x.level||x.starts.length&&_===x.level)}break;case"constraint":if(d.prefixBoundary=!1,d.edgepaths.length)return;var v=d.x.length,y=d.y.length,r=-1/0,n=1/0;for(a=0;a<y;a++)n=Math.min(n,P[a][0]),n=Math.min(n,P[a][v-1]),r=Math.max(r,P[a][0]),r=Math.max(r,P[a][v-1]);for(a=1;a<v-1;a++)n=Math.min(n,P[0][a]),n=Math.min(n,P[y-1][a]),r=Math.max(r,P[0][a]),r=Math.max(r,P[y-1][a]);var u=e.value,i,f;switch(e._operation){case">":u>r&&(d.prefixBoundary=!0);break;case"<":(u<n||d.starts.length&&u===n)&&(d.prefixBoundary=!0);break;case"[]":i=Math.min(u[0],u[1]),f=Math.max(u[0],u[1]),(f<n||i>r||d.starts.length&&f===n)&&(d.prefixBoundary=!0);break;case"][":i=Math.min(u[0],u[1]),f=Math.max(u[0],u[1]),i<n&&f>r&&(d.prefixBoundary=!0);break}break}}},90654:function(z,B,e){var d=e(21081),P=e(86068),a=e(53572);function _(x,v,y){var r=v.contours,n=v.line,u=r.size||1,i=r.coloring,f=P(v,{isColorbar:!0});if(i==="heatmap"){var g=d.extractOpts(v);y._fillgradient=g.reversescale?d.flipScale(g.colorscale):g.colorscale,y._zrange=[g.min,g.max]}else i==="fill"&&(y._fillcolor=f);y._line={color:i==="lines"?f:n.color,width:r.showlines!==!1?n.width:0,dash:n.dash},y._levels={start:r.start,end:a(r),size:u}}z.exports={min:"zmin",max:"zmax",calc:_}},36914:function(z){z.exports={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}}},83179:function(z,B,e){var d=e(92770),P=e(14523),a=e(7901),_=a.addOpacity,x=a.opacity,v=e(74808),y=v.CONSTRAINT_REDUCTION,r=v.COMPARISON_OPS2;z.exports=function(i,f,g,h,b,p){var E=f.contours,c,l,m,M=g("contours.operation");if(E._operation=y[M],n(g,E),M==="="?c=E.showlines=!0:(c=g("contours.showlines"),m=g("fillcolor",_((i.line||{}).color||b,.5))),c){var L=m&&x(m)?_(f.fillcolor,1):b;l=g("line.color",L),g("line.width",2),g("line.dash")}g("line.smoothing"),P(g,h,l,p)};function n(u,i){var f;r.indexOf(i.operation)===-1?(u("contours.value",[0,1]),Array.isArray(i.value)?i.value.length>2?i.value=i.value.slice(2):i.length===0?i.value=[0,1]:i.length<2?(f=parseFloat(i.value[0]),i.value=[f,f+1]):i.value=[parseFloat(i.value[0]),parseFloat(i.value[1])]:d(i.value)&&(f=parseFloat(i.value),i.value=[f,f+1])):(u("contours.value",0),d(i.value)||(Array.isArray(i.value)?i.value=parseFloat(i.value[0]):i.value=0))}},64237:function(z,B,e){var d=e(74808),P=e(92770);z.exports={"[]":_("[]"),"][":_("]["),">":x(">"),"<":x("<"),"=":x("=")};function a(v,y){var r=Array.isArray(y),n;function u(i){return P(i)?+i:null}return d.COMPARISON_OPS2.indexOf(v)!==-1?n=u(r?y[0]:y):d.INTERVAL_OPS.indexOf(v)!==-1?n=r?[u(y[0]),u(y[1])]:[u(y),u(y)]:d.SET_OPS.indexOf(v)!==-1&&(n=r?y.map(u):[u(y)]),n}function _(v){return function(y){y=a(v,y);var r=Math.min(y[0],y[1]),n=Math.max(y[0],y[1]);return{start:r,end:n,size:n-r}}}function x(v){return function(y){return y=a(v,y),{start:y,end:1/0,size:1/0}}}},67217:function(z){z.exports=function(e,d,P,a){var _=a("contours.start"),x=a("contours.end"),v=_===!1||x===!1,y=P("contours.size"),r;v?r=d.autocontour=!0:r=P("autocontour",!1),(r||!y)&&P("ncontours")}},84857:function(z,B,e){var d=e(71828);z.exports=function(a,_){var x,v,y,r=function(i){return i.reverse()},n=function(i){return i};switch(_){case"=":case"<":return a;case">":for(a.length!==1&&d.warn("Contour data invalid for the specified inequality operation."),v=a[0],x=0;x<v.edgepaths.length;x++)v.edgepaths[x]=r(v.edgepaths[x]);for(x=0;x<v.paths.length;x++)v.paths[x]=r(v.paths[x]);for(x=0;x<v.starts.length;x++)v.starts[x]=r(v.starts[x]);return a;case"][":var u=r;r=n,n=u;case"[]":for(a.length!==2&&d.warn("Contour data invalid for the specified inequality range operation."),v=P(a[0]),y=P(a[1]),x=0;x<v.edgepaths.length;x++)v.edgepaths[x]=r(v.edgepaths[x]);for(x=0;x<v.paths.length;x++)v.paths[x]=r(v.paths[x]);for(x=0;x<v.starts.length;x++)v.starts[x]=r(v.starts[x]);for(;y.edgepaths.length;)v.edgepaths.push(n(y.edgepaths.shift()));for(;y.paths.length;)v.paths.push(n(y.paths.shift()));for(;y.starts.length;)v.starts.push(n(y.starts.shift()));return[v]}};function P(a){return d.extendFlat({},a,{edgepaths:d.extendDeep([],a.edgepaths),paths:d.extendDeep([],a.paths),starts:d.extendDeep([],a.starts)})}},13031:function(z,B,e){var d=e(71828),P=e(67684),a=e(73927),_=e(83179),x=e(67217),v=e(8724),y=e(58623),r=e(70600);z.exports=function(u,i,f,g){function h(c,l){return d.coerce(u,i,r,c,l)}function b(c){return d.coerce2(u,i,r,c)}var p=P(u,i,h,g);if(!p){i.visible=!1;return}a(u,i,g,h),h("xhoverformat"),h("yhoverformat"),h("text"),h("hovertext"),h("hoverongaps"),h("hovertemplate");var E=h("contours.type")==="constraint";h("connectgaps",d.isArray1D(i.z)),E?_(u,i,h,g,f):(x(u,i,h,b),v(u,i,h,g)),i.contours&&i.contours.coloring==="heatmap"&&y(h,g)}},87558:function(z,B,e){var d=e(71828),P=e(64237),a=e(53572);z.exports=function(x,v,y){for(var r=x.type==="constraint"?P[x._operation](x.value):x,n=r.size,u=[],i=a(r),f=y.trace._carpetTrace,g=f?{xaxis:f.aaxis,yaxis:f.baxis,x:y.a,y:y.b}:{xaxis:v.xaxis,yaxis:v.yaxis,x:y.x,y:y.y},h=r.start;h<i;h+=n)if(u.push(d.extendFlat({level:h,crossings:{},starts:[],edgepaths:[],paths:[],z:y.z,smoothing:y.trace.line.smoothing},g)),u.length>1e3){d.warn("Too many contours, clipping at 1000",x);break}return u}},53572:function(z){z.exports=function(e){return e.end+e.size/1e6}},81696:function(z,B,e){var d=e(71828),P=e(36914);z.exports=function(n,u,i){var f,g,h,b,p;for(u=u||.01,i=i||.01,h=0;h<n.length;h++){for(b=n[h],p=0;p<b.starts.length;p++)g=b.starts[p],x(b,g,"edge",u,i);for(f=0;Object.keys(b.crossings).length&&f<1e4;)f++,g=Object.keys(b.crossings)[0].split(",").map(Number),x(b,g,void 0,u,i);f===1e4&&d.log("Infinite loop in contour?")}};function a(r,n,u,i){return Math.abs(r[0]-n[0])<u&&Math.abs(r[1]-n[1])<i}function _(r,n){var u=r[2]-n[2],i=r[3]-n[3];return Math.sqrt(u*u+i*i)}function x(r,n,u,i,f){var g=n.join(","),h=r.crossings[g],b=v(h,u,n),p=[y(r,n,[-b[0],-b[1]])],E=r.z.length,c=r.z[0].length,l=n.slice(),m=b.slice(),M;for(M=0;M<1e4;M++){if(h>20?(h=P.CHOOSESADDLE[h][(b[0]||b[1])<0?0:1],r.crossings[g]=P.SADDLEREMAINDER[h]):delete r.crossings[g],b=P.NEWDELTA[h],!b){d.log("Found bad marching index:",h,n,r.level);break}p.push(y(r,n,b)),n[0]+=b[0],n[1]+=b[1],g=n.join(","),a(p[p.length-1],p[p.length-2],i,f)&&p.pop();var L=b[0]&&(n[0]<0||n[0]>c-2)||b[1]&&(n[1]<0||n[1]>E-2),D=n[0]===l[0]&&n[1]===l[1]&&b[0]===m[0]&&b[1]===m[1];if(D||u&&L)break;h=r.crossings[g]}M===1e4&&d.log("Infinite loop in contour?");var A=a(p[0],p[p.length-1],i,f),C=0,S=.2*r.smoothing,o=[],R=0,T,O,N,H,k,V,G,U,Y,ee,re;for(M=1;M<p.length;M++)G=_(p[M],p[M-1]),C+=G,o.push(G);var ie=C/o.length*S;function se(j){return p[j%p.length]}for(M=p.length-2;M>=R;M--)if(T=o[M],T<ie){for(N=0,O=M-1;O>=R&&T+o[O]<ie;O--)T+=o[O];if(A&&M===p.length-2)for(N=0;N<O&&T+o[N]<ie;N++)T+=o[N];k=M-O+N+1,V=Math.floor((M+O+N+2)/2),!A&&M===p.length-2?H=p[p.length-1]:!A&&O===-1?H=p[0]:k%2?H=se(V):H=[(se(V)[0]+se(V+1)[0])/2,(se(V)[1]+se(V+1)[1])/2],p.splice(O+1,M-O+1,H),M=O+1,N&&(R=N),A&&(M===p.length-2?p[N]=p[p.length-1]:M===0&&(p[p.length-1]=p[0]))}for(p.splice(0,R),M=0;M<p.length;M++)p[M].length=2;if(!(p.length<2))if(A)p.pop(),r.paths.push(p);else{u||d.log("Unclosed interior contour?",r.level,l.join(","),p.join("L"));var ce=!1;for(U=0;U<r.edgepaths.length;U++)if(ee=r.edgepaths[U],!ce&&a(ee[0],p[p.length-1],i,f)){p.pop(),ce=!0;var q=!1;for(Y=0;Y<r.edgepaths.length;Y++)if(re=r.edgepaths[Y],a(re[re.length-1],p[0],i,f)){q=!0,p.shift(),r.edgepaths.splice(U,1),Y===U?r.paths.push(p.concat(re)):(Y>U&&Y--,r.edgepaths[Y]=re.concat(p,ee));break}q||(r.edgepaths[U]=p.concat(ee))}for(U=0;U<r.edgepaths.length&&!ce;U++)ee=r.edgepaths[U],a(ee[ee.length-1],p[0],i,f)&&(p.shift(),r.edgepaths[U]=ee.concat(p),ce=!0);ce||r.edgepaths.push(p)}}function v(r,n,u){var i=0,f=0;return r>20&&n?r===208||r===1114?i=u[0]===0?1:-1:f=u[1]===0?1:-1:P.BOTTOMSTART.indexOf(r)!==-1?f=1:P.LEFTSTART.indexOf(r)!==-1?i=1:P.TOPSTART.indexOf(r)!==-1?f=-1:i=-1,[i,f]}function y(r,n,u){var i=n[0]+Math.max(u[0],0),f=n[1]+Math.max(u[1],0),g=r.z[f][i],h=r.xaxis,b=r.yaxis;if(u[1]){var p=(r.level-g)/(r.z[f][i+1]-g),E=(p!==1?(1-p)*h.c2l(r.x[i]):0)+(p!==0?p*h.c2l(r.x[i+1]):0);return[h.c2p(h.l2c(E),!0),b.c2p(r.y[f],!0),i+p,f]}else{var c=(r.level-g)/(r.z[f+1][i]-g),l=(c!==1?(1-c)*b.c2l(r.y[f]):0)+(c!==0?c*b.c2l(r.y[f+1]):0);return[h.c2p(r.x[i],!0),b.c2p(b.l2c(l),!0),i,f+c]}}},52421:function(z,B,e){var d=e(7901),P=e(46248);z.exports=function(_,x,v,y,r){r||(r={}),r.isContour=!0;var n=P(_,x,v,y,r);return n&&n.forEach(function(u){var i=u.trace;i.contours.type==="constraint"&&(i.fillcolor&&d.opacity(i.fillcolor)?u.color=d.addOpacity(i.fillcolor,1):i.contours.showlines&&d.opacity(i.line.color)&&(u.color=d.addOpacity(i.line.color,1)))}),n}},99442:function(z,B,e){z.exports={attributes:e(70600),supplyDefaults:e(13031),calc:e(27529),plot:e(29854).plot,style:e(84426),colorbar:e(90654),hoverPoints:e(52421),moduleType:"trace",name:"contour",basePlotModule:e(93612),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}},14523:function(z,B,e){var d=e(71828);z.exports=function(a,_,x,v){v||(v={});var y=a("contours.showlabels");if(y){var r=_.font;d.coerceFont(a,"contours.labelfont",{family:r.family,size:r.size,color:x}),a("contours.labelformat")}v.hasHover!==!1&&a("zhoverformat")}},86068:function(z,B,e){var d=e(39898),P=e(21081),a=e(53572);z.exports=function(x){var v=x.contours,y=v.start,r=a(v),n=v.size||1,u=Math.floor((r-y)/n)+1,i=v.coloring==="lines"?0:1,f=P.extractOpts(x);isFinite(n)||(n=1,u=1);var g=f.reversescale?P.flipScale(f.colorscale):f.colorscale,h=g.length,b=new Array(h),p=new Array(h),E,c;if(v.coloring==="heatmap"){var l=f.min,m=f.max;for(c=0;c<h;c++)E=g[c],b[c]=E[0]*(m-l)+l,p[c]=E[1];var M=d.extent([l,m,v.start,v.start+n*(u-1)]),L=M[l<m?0:1],D=M[l<m?1:0];L!==l&&(b.splice(0,0,L),p.splice(0,0,p[0])),D!==m&&(b.push(D),p.push(p[p.length-1]))}else for(c=0;c<h;c++)E=g[c],b[c]=(E[0]*(u+i-1)-i/2)*n+y,p[c]=E[1];return P.makeColorScaleFunc({domain:b,range:p},{noNumericCheck:!0})}},87678:function(z,B,e){var d=e(36914);z.exports=function(_){var x=_[0].z,v=x.length,y=x[0].length,r=v===2||y===2,n,u,i,f,g,h,b,p,E;for(u=0;u<v-1;u++)for(f=[],u===0&&(f=f.concat(d.BOTTOMSTART)),u===v-2&&(f=f.concat(d.TOPSTART)),n=0;n<y-1;n++)for(i=f.slice(),n===0&&(i=i.concat(d.LEFTSTART)),n===y-2&&(i=i.concat(d.RIGHTSTART)),g=n+","+u,h=[[x[u][n],x[u][n+1]],[x[u+1][n],x[u+1][n+1]]],E=0;E<_.length;E++)p=_[E],b=P(p.level,h),b&&(p.crossings[g]=b,i.indexOf(b)!==-1&&(p.starts.push([n,u]),r&&i.indexOf(b,i.indexOf(b)+1)!==-1&&p.starts.push([n,u])))};function P(a,_){var x=(_[0][0]>a?0:1)+(_[0][1]>a?0:2)+(_[1][1]>a?0:4)+(_[1][0]>a?0:8);if(x===5||x===10){var v=(_[0][0]+_[0][1]+_[1][0]+_[1][1])/4;return a>v?x===5?713:1114:x===5?104:208}return x===15?0:x}},29854:function(z,B,e){var d=e(39898),P=e(71828),a=e(91424),_=e(21081),x=e(63893),v=e(89298),y=e(21994),r=e(50347),n=e(87678),u=e(81696),i=e(87558),f=e(84857),g=e(20083),h=e(36914),b=h.LABELOPTIMIZER;B.plot=function(A,C,S,o){var R=C.xaxis,T=C.yaxis;P.makeTraceGroups(o,S,"contour").each(function(O){var N=d.select(this),H=O[0],k=H.trace,V=H.x,G=H.y,U=k.contours,Y=i(U,C,H),ee=P.ensureSingle(N,"g","heatmapcoloring"),re=[];U.coloring==="heatmap"&&(re=[O]),r(A,C,re,ee),n(Y),u(Y);var ie=R.c2p(V[0],!0),se=R.c2p(V[V.length-1],!0),ce=T.c2p(G[0],!0),q=T.c2p(G[G.length-1],!0),j=[[ie,q],[se,q],[se,ce],[ie,ce]],Z=Y;U.type==="constraint"&&(Z=f(Y,U._operation)),p(N,j,U),E(N,Z,j,U),l(N,Y,A,H,U),M(N,C,A,H,j)})};function p(D,A,C){var S=P.ensureSingle(D,"g","contourbg"),o=S.selectAll("path").data(C.coloring==="fill"?[0]:[]);o.enter().append("path"),o.exit().remove(),o.attr("d","M"+A.join("L")+"Z").style("stroke","none")}function E(D,A,C,S){var o=S.coloring==="fill"||S.type==="constraint"&&S._operation!=="=",R="M"+C.join("L")+"Z";o&&g(A,S);var T=P.ensureSingle(D,"g","contourfill"),O=T.selectAll("path").data(o?A:[]);O.enter().append("path"),O.exit().remove(),O.each(function(N){var H=(N.prefixBoundary?R:"")+c(N,C);H?d.select(this).attr("d",H).style("stroke","none"):d.select(this).remove()})}function c(D,A){var C="",S=0,o=D.edgepaths.map(function(ie,se){return se}),R=!0,T,O,N,H,k,V;function G(ie){return Math.abs(ie[1]-A[0][1])<.01}function U(ie){return Math.abs(ie[1]-A[2][1])<.01}function Y(ie){return Math.abs(ie[0]-A[0][0])<.01}function ee(ie){return Math.abs(ie[0]-A[2][0])<.01}for(;o.length;){for(V=a.smoothopen(D.edgepaths[S],D.smoothing),C+=R?V:V.replace(/^M/,"L"),o.splice(o.indexOf(S),1),T=D.edgepaths[S][D.edgepaths[S].length-1],H=-1,N=0;N<4;N++){if(!T){P.log("Missing end?",S,D);break}for(G(T)&&!ee(T)?O=A[1]:Y(T)?O=A[0]:U(T)?O=A[3]:ee(T)&&(O=A[2]),k=0;k<D.edgepaths.length;k++){var re=D.edgepaths[k][0];Math.abs(T[0]-O[0])<.01?Math.abs(T[0]-re[0])<.01&&(re[1]-T[1])*(O[1]-re[1])>=0&&(O=re,H=k):Math.abs(T[1]-O[1])<.01?Math.abs(T[1]-re[1])<.01&&(re[0]-T[0])*(O[0]-re[0])>=0&&(O=re,H=k):P.log("endpt to newendpt is not vert. or horz.",T,O,re)}if(T=O,H>=0)break;C+="L"+O}if(H===D.edgepaths.length){P.log("unclosed perimeter path");break}S=H,R=o.indexOf(S)===-1,R&&(S=o[0],C+="Z")}for(S=0;S<D.paths.length;S++)C+=a.smoothclosed(D.paths[S],D.smoothing);return C}function l(D,A,C,S,o){var R=C._context.staticPlot,T=P.ensureSingle(D,"g","contourlines"),O=o.showlines!==!1,N=o.showlabels,H=O&&N,k=B.createLines(T,O||N,A,R),V=B.createLineClip(T,H,C,S.trace.uid),G=D.selectAll("g.contourlabels").data(N?[0]:[]);if(G.exit().remove(),G.enter().append("g").classed("contourlabels",!0),N){var U=[],Y=[];P.clearLocationCache();var ee=B.labelFormatter(C,S),re=a.tester.append("text").attr("data-notex",1).call(a.font,o.labelfont),ie=A[0].xaxis,se=A[0].yaxis,ce=ie._length,q=se._length,j=ie.range,Z=se.range,Q=P.aggNums(Math.min,null,S.x),ue=P.aggNums(Math.max,null,S.x),fe=P.aggNums(Math.min,null,S.y),te=P.aggNums(Math.max,null,S.y),ne=Math.max(ie.c2p(Q,!0),0),ve=Math.min(ie.c2p(ue,!0),ce),le=Math.max(se.c2p(te,!0),0),xe=Math.min(se.c2p(fe,!0),q),Se={};j[0]<j[1]?(Se.left=ne,Se.right=ve):(Se.left=ve,Se.right=ne),Z[0]<Z[1]?(Se.top=le,Se.bottom=xe):(Se.top=xe,Se.bottom=le),Se.middle=(Se.top+Se.bottom)/2,Se.center=(Se.left+Se.right)/2,U.push([[Se.left,Se.top],[Se.right,Se.top],[Se.right,Se.bottom],[Se.left,Se.bottom]]);var Re=Math.sqrt(ce*ce+q*q),Ee=h.LABELDISTANCE*Re/Math.max(1,A.length/h.LABELINCREASE);k.each(function(Oe){var Be=B.calcTextOpts(Oe.level,ee,re,C);d.select(this).selectAll("path").each(function(){var Le=this,Te=P.getVisibleSegment(Le,Se,Be.height/2);if(Te&&!(Te.len<(Be.width+Be.height)*h.LABELMIN))for(var De=Math.min(Math.ceil(Te.len/Ee),h.LABELMAX),Ve=0;Ve<De;Ve++){var Ye=B.findBestTextLocation(Le,Te,Be,Y,Se);if(!Ye)break;B.addLabelData(Ye,Be,Y,U)}})}),re.remove(),B.drawLabels(G,Y,C,V,H?U:null)}N&&!O&&k.remove()}B.createLines=function(D,A,C,S){var o=C[0].smoothing,R=D.selectAll("g.contourlevel").data(A?C:[]);if(R.exit().remove(),R.enter().append("g").classed("contourlevel",!0),A){var T=R.selectAll("path.openline").data(function(N){return N.pedgepaths||N.edgepaths});T.exit().remove(),T.enter().append("path").classed("openline",!0),T.attr("d",function(N){return a.smoothopen(N,o)}).style("stroke-miterlimit",1).style("vector-effect",S?"none":"non-scaling-stroke");var O=R.selectAll("path.closedline").data(function(N){return N.ppaths||N.paths});O.exit().remove(),O.enter().append("path").classed("closedline",!0),O.attr("d",function(N){return a.smoothclosed(N,o)}).style("stroke-miterlimit",1).style("vector-effect",S?"none":"non-scaling-stroke")}return R},B.createLineClip=function(D,A,C,S){var o=C._fullLayout._clips,R=A?"clipline"+S:null,T=o.selectAll("#"+R).data(A?[0]:[]);return T.exit().remove(),T.enter().append("clipPath").classed("contourlineclip",!0).attr("id",R),a.setClipUrl(D,R,C),T},B.labelFormatter=function(D,A){var C=D._fullLayout,S=A.trace,o=S.contours,R={type:"linear",_id:"ycontour",showexponent:"all",exponentformat:"B"};if(o.labelformat)R.tickformat=o.labelformat,y(R,C);else{var T=_.extractOpts(S);if(T&&T.colorbar&&T.colorbar._axis)R=T.colorbar._axis;else{if(o.type==="constraint"){var O=o.value;Array.isArray(O)?R.range=[O[0],O[O.length-1]]:R.range=[O,O]}else R.range=[o.start,o.end],R.nticks=(o.end-o.start)/o.size;R.range[0]===R.range[1]&&(R.range[1]+=R.range[0]||1),R.nticks||(R.nticks=1e3),y(R,C),v.prepTicks(R),R._tmin=null,R._tmax=null}}return function(N){return v.tickText(R,N).text}},B.calcTextOpts=function(D,A,C,S){var o=A(D);C.text(o).call(x.convertToTspans,S);var R=C.node(),T=a.bBox(R,!0);return{text:o,width:T.width,height:T.height,fontSize:+R.style["font-size"].replace("px",""),level:D,dy:(T.top+T.bottom)/2}},B.findBestTextLocation=function(D,A,C,S,o){var R=C.width,T,O,N,H,k;A.isClosed?(O=A.len/b.INITIALSEARCHPOINTS,T=A.min+O/2,N=A.max):(O=(A.len-R)/(b.INITIALSEARCHPOINTS+1),T=A.min+O+R/2,N=A.max-(O+R)/2);for(var V=1/0,G=0;G<b.ITERATIONS;G++){for(var U=T;U<N;U+=O){var Y=P.getTextLocation(D,A.total,U,R),ee=m(Y,C,S,o);ee<V&&(V=ee,k=Y,H=U)}if(V>b.MAXCOST*2)break;G&&(O/=2),T=H-O/2,N=T+O*1.5}if(V<=b.MAXCOST)return k};function m(D,A,C,S){var o=A.width/2,R=A.height/2,T=D.x,O=D.y,N=D.theta,H=Math.cos(N)*o,k=Math.sin(N)*o,V=(T>S.center?S.right-T:T-S.left)/(H+Math.abs(Math.sin(N)*R)),G=(O>S.middle?S.bottom-O:O-S.top)/(Math.abs(k)+Math.cos(N)*R);if(V<1||G<1)return 1/0;var U=b.EDGECOST*(1/(V-1)+1/(G-1));U+=b.ANGLECOST*N*N;for(var Y=T-H,ee=O-k,re=T+H,ie=O+k,se=0;se<C.length;se++){var ce=C[se],q=Math.cos(ce.theta)*ce.width/2,j=Math.sin(ce.theta)*ce.width/2,Z=P.segmentDistance(Y,ee,re,ie,ce.x-q,ce.y-j,ce.x+q,ce.y+j)*2/(A.height+ce.height),Q=ce.level===A.level,ue=Q?b.SAMELEVELDISTANCE:1;if(Z<=ue)return 1/0;var fe=b.NEIGHBORCOST*(Q?b.SAMELEVELFACTOR:1);U+=fe/(Z-ue)}return U}B.addLabelData=function(D,A,C,S){var o=A.fontSize,R=A.width+o/3,T=Math.max(0,A.height-o/3),O=D.x,N=D.y,H=D.theta,k=Math.sin(H),V=Math.cos(H),G=function(Y,ee){return[O+Y*V-ee*k,N+Y*k+ee*V]},U=[G(-R/2,-T/2),G(-R/2,T/2),G(R/2,T/2),G(R/2,-T/2)];C.push({text:A.text,x:O,y:N,dy:A.dy,theta:H,level:A.level,width:R,height:T}),S.push(U)},B.drawLabels=function(D,A,C,S,o){var R=D.selectAll("text").data(A,function(H){return H.text+","+H.x+","+H.y+","+H.theta});if(R.exit().remove(),R.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(H){var k=H.x+Math.sin(H.theta)*H.dy,V=H.y-Math.cos(H.theta)*H.dy;d.select(this).text(H.text).attr({x:k,y:V,transform:"rotate("+180*H.theta/Math.PI+" "+k+" "+V+")"}).call(x.convertToTspans,C)}),o){for(var T="",O=0;O<o.length;O++)T+="M"+o[O].join("L")+"Z";var N=P.ensureSingle(S,"path","");N.attr("d",T)}};function M(D,A,C,S,o){var R=S.trace,T=C._fullLayout._clips,O="clip"+R.uid,N=T.selectAll("#"+O).data(R.connectgaps?[]:[0]);if(N.enter().append("clipPath").classed("contourclip",!0).attr("id",O),N.exit().remove(),R.connectgaps===!1){var H={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:A.xaxis,yaxis:A.yaxis,x:S.x,y:S.y,z:L(S),smoothing:0};n([H]),u([H]),g([H],{type:"levels"});var k=P.ensureSingle(N,"path","");k.attr("d",(H.prefixBoundary?"M"+o.join("L")+"Z":"")+c(H,o))}else O=null;a.setClipUrl(D,O,C)}function L(D){var A=D.trace._emptypoints,C=[],S=D.z.length,o=D.z[0].length,R,T=[],O;for(R=0;R<o;R++)T.push(1);for(R=0;R<S;R++)C.push(T.slice());for(R=0;R<A.length;R++)O=A[R],C[O[0]][O[1]]=0;return D.zmask=C,C}},18670:function(z,B,e){var d=e(89298),P=e(71828);z.exports=function(x,v){var y=x.contours;if(x.autocontour){var r=x.zmin,n=x.zmax;(x.zauto||r===void 0)&&(r=P.aggNums(Math.min,null,v)),(x.zauto||n===void 0)&&(n=P.aggNums(Math.max,null,v));var u=a(r,n,x.ncontours);y.size=u.dtick,y.start=d.tickFirst(u),u.range.reverse(),y.end=d.tickFirst(u),y.start===r&&(y.start+=y.size),y.end===n&&(y.end-=y.size),y.start>y.end&&(y.start=y.end=(y.start+y.end)/2),x._input.contours||(x._input.contours={}),P.extendFlat(x._input.contours,{start:y.start,end:y.end,size:y.size}),x._input.autocontour=!0}else if(y.type!=="constraint"){var i=y.start,f=y.end,g=x._input.contours;if(i>f&&(y.start=g.start=f,f=y.end=g.end=i,i=y.start),!(y.size>0)){var h;i===f?h=1:h=a(i,f,x.ncontours).dtick,g.size=y.size=h}}};function a(_,x,v){var y={type:"linear",range:[_,x]};return d.autoTicks(y,(x-_)/(v||15)),y}},84426:function(z,B,e){var d=e(39898),P=e(91424),a=e(70035),_=e(86068);z.exports=function(v){var y=d.select(v).selectAll("g.contour");y.style("opacity",function(r){return r[0].trace.opacity}),y.each(function(r){var n=d.select(this),u=r[0].trace,i=u.contours,f=u.line,g=i.size||1,h=i.start,b=i.type==="constraint",p=!b&&i.coloring==="lines",E=!b&&i.coloring==="fill",c=p||E?_(u):null;n.selectAll("g.contourlevel").each(function(M){d.select(this).selectAll("path").call(P.lineGroupStyle,f.width,p?c(M.level):f.color,f.dash)});var l=i.labelfont;if(n.selectAll("g.contourlabels text").each(function(M){P.font(d.select(this),{family:l.family,size:l.size,color:l.color||(p?c(M.level):f.color)})}),b)n.selectAll("g.contourfill path").style("fill",u.fillcolor);else if(E){var m;n.selectAll("g.contourfill path").style("fill",function(M){return m===void 0&&(m=M.level),c(M.level+.5*g)}),m===void 0&&(m=h),n.selectAll("g.contourbg path").style("fill",c(m-.5*g))}}),a(v)}},8724:function(z,B,e){var d=e(1586),P=e(14523);z.exports=function(_,x,v,y,r){var n=v("contours.coloring"),u,i="";n==="fill"&&(u=v("contours.showlines")),u!==!1&&(n!=="lines"&&(i=v("line.color","#000")),v("line.width",.5),v("line.dash")),n!=="none"&&(_.showlegend!==!0&&(x.showlegend=!1),x._dfltShowLegend=!1,d(_,x,y,v,{prefix:"",cLetter:"z"})),v("line.smoothing"),P(v,y,i,r)}},88085:function(z,B,e){var d=e(21606),P=e(70600),a=e(50693),_=e(1426).extendFlat,x=P.contours;z.exports=_({carpet:{valType:"string",editType:"calc"},z:d.z,a:d.x,a0:d.x0,da:d.dx,b:d.y,b0:d.y0,db:d.dy,text:d.text,hovertext:d.hovertext,transpose:d.transpose,atype:d.xtype,btype:d.ytype,fillcolor:P.fillcolor,autocontour:P.autocontour,ncontours:P.ncontours,contours:{type:x.type,start:x.start,end:x.end,size:x.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:x.showlines,showlabels:x.showlabels,labelfont:x.labelfont,labelformat:x.labelformat,operation:x.operation,value:x.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:P.line.color,width:P.line.width,dash:P.line.dash,smoothing:P.line.smoothing,editType:"plot"},transforms:void 0},a("",{cLetter:"z",autoColorDflt:!1}))},59885:function(z,B,e){var d=e(78803),P=e(71828),a=e(68296),_=e(4742),x=e(824),v=e(43907),y=e(70769),r=e(75005),n=e(22882),u=e(18670);z.exports=function(g,h){var b=h._carpetTrace=n(g,h);if(!(!b||!b.visible||b.visible==="legendonly")){if(!h.a||!h.b){var p=g.data[b.index],E=g.data[h.index];E.a||(E.a=p.a),E.b||(E.b=p.b),r(E,h,h._defaultColor,g._fullLayout)}var c=i(g,h);return u(h,h._z),c}};function i(f,g){var h=g._carpetTrace,b=h.aaxis,p=h.baxis,E,c,l,m,M,L,D;b._minDtick=0,p._minDtick=0,P.isArray1D(g.z)&&a(g,b,p,"a","b",["z"]),E=g._a=g._a||g.a,m=g._b=g._b||g.b,E=E?b.makeCalcdata(g,"_a"):[],m=m?p.makeCalcdata(g,"_b"):[],c=g.a0||0,l=g.da||1,M=g.b0||0,L=g.db||1,D=g._z=_(g._z||g.z,g.transpose),g._emptypoints=v(D),x(D,g._emptypoints);var A=P.maxRowLength(D),C=g.xtype==="scaled"?"":E,S=y(g,C,c,l,A,b),o=g.ytype==="scaled"?"":m,R=y(g,o,M,L,D.length,p),T={a:S,b:R,z:D};return g.contours.type==="levels"&&g.contours.coloring!=="none"&&d(f,g,{vals:D,containerStr:"",cLetter:"z"}),[T]}},75005:function(z,B,e){var d=e(71828),P=e(67684),a=e(88085),_=e(83179),x=e(67217),v=e(8724);z.exports=function(r,n,u,i){function f(p,E){return d.coerce(r,n,a,p,E)}function g(p){return d.coerce2(r,n,a,p)}if(f("carpet"),r.a&&r.b){var h=P(r,n,f,i,"a","b");if(!h){n.visible=!1;return}f("text");var b=f("contours.type")==="constraint";b?_(r,n,f,i,u,{hasHover:!1}):(x(r,n,f,g),v(r,n,f,i,{hasHover:!1}))}else n._defaultColor=u,n._length=null}},93740:function(z,B,e){z.exports={attributes:e(88085),supplyDefaults:e(75005),colorbar:e(90654),calc:e(59885),plot:e(51048),style:e(84426),moduleType:"trace",name:"contourcarpet",basePlotModule:e(93612),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},51048:function(z,B,e){var d=e(39898),P=e(27669),a=e(67961),_=e(91424),x=e(71828),v=e(87678),y=e(81696),r=e(29854),n=e(36914),u=e(84857),i=e(87558),f=e(20083),g=e(22882),h=e(4536);z.exports=function(C,S,o,R){var T=S.xaxis,O=S.yaxis;x.makeTraceGroups(R,o,"contour").each(function(N){var H=d.select(this),k=N[0],V=k.trace,G=V._carpetTrace=g(C,V),U=C.calcdata[G.index][0];if(!G.visible||G.visible==="legendonly")return;var Y=k.a,ee=k.b,re=V.contours,ie=i(re,S,k),se=re.type==="constraint",ce=re._operation,q=se?ce==="="?"lines":"fill":re.coloring;function j(Re){var Ee=G.ab2xy(Re[0],Re[1],!0);return[T.c2p(Ee[0]),O.c2p(Ee[1])]}var Z=[[Y[0],ee[ee.length-1]],[Y[Y.length-1],ee[ee.length-1]],[Y[Y.length-1],ee[0]],[Y[0],ee[0]]];v(ie);var Q=(Y[Y.length-1]-Y[0])*1e-8,ue=(ee[ee.length-1]-ee[0])*1e-8;y(ie,Q,ue);var fe=ie;re.type==="constraint"&&(fe=u(ie,ce)),b(ie,j);var te,ne,ve,le,xe=[];for(le=U.clipsegments.length-1;le>=0;le--)te=U.clipsegments[le],ne=P([],te.x,T.c2p),ve=P([],te.y,O.c2p),ne.reverse(),ve.reverse(),xe.push(a(ne,ve,te.bicubic));var Se="M"+xe.join("L")+"Z";M(H,U.clipsegments,T,O,se,q),L(V,H,T,O,fe,Z,j,G,U,q,Se),p(H,ie,C,k,re,S,G),_.setClipUrl(H,G._clipPathId,C)})};function b(A,C){var S,o,R,T,O,N,H,k,V;for(S=0;S<A.length;S++){for(T=A[S],O=T.pedgepaths=[],N=T.ppaths=[],o=0;o<T.edgepaths.length;o++){for(V=T.edgepaths[o],H=[],R=0;R<V.length;R++)H[R]=C(V[R]);O.push(H)}for(o=0;o<T.paths.length;o++){for(V=T.paths[o],k=[],R=0;R<V.length;R++)k[R]=C(V[R]);N.push(k)}}}function p(A,C,S,o,R,T,O){var N=S._context.staticPlot,H=x.ensureSingle(A,"g","contourlines"),k=R.showlines!==!1,V=R.showlabels,G=k&&V,U=r.createLines(H,k||V,C,N),Y=r.createLineClip(H,G,S,o.trace.uid),ee=A.selectAll("g.contourlabels").data(V?[0]:[]);if(ee.exit().remove(),ee.enter().append("g").classed("contourlabels",!0),V){var re=T.xaxis,ie=T.yaxis,se=re._length,ce=ie._length,q=[[[0,0],[se,0],[se,ce],[0,ce]]],j=[];x.clearLocationCache();var Z=r.labelFormatter(S,o),Q=_.tester.append("text").attr("data-notex",1).call(_.font,R.labelfont),ue={left:0,right:se,center:se/2,top:0,bottom:ce,middle:ce/2},fe=Math.sqrt(se*se+ce*ce),te=n.LABELDISTANCE*fe/Math.max(1,C.length/n.LABELINCREASE);U.each(function(ne){var ve=r.calcTextOpts(ne.level,Z,Q,S);d.select(this).selectAll("path").each(function(le){var xe=this,Se=x.getVisibleSegment(xe,ue,ve.height/2);if(Se&&(E(xe,le,ne,Se,O,ve.height),!(Se.len<(ve.width+ve.height)*n.LABELMIN)))for(var Re=Math.min(Math.ceil(Se.len/te),n.LABELMAX),Ee=0;Ee<Re;Ee++){var Oe=r.findBestTextLocation(xe,Se,ve,j,ue);if(!Oe)break;r.addLabelData(Oe,ve,j,q)}})}),Q.remove(),r.drawLabels(ee,j,S,Y,G?q:null)}V&&!k&&U.remove()}function E(A,C,S,o,R,T){for(var O,N=0;N<S.pedgepaths.length;N++)C===S.pedgepaths[N]&&(O=S.edgepaths[N]);if(!O)return;var H=R.a[0],k=R.a[R.a.length-1],V=R.b[0],G=R.b[R.b.length-1];function U(se,ce){var q=0,j,Z=.1;return(Math.abs(se[0]-H)<Z||Math.abs(se[0]-k)<Z)&&(j=l(R.dxydb_rough(se[0],se[1],Z)),q=Math.max(q,T*m(ce,j)/2)),(Math.abs(se[1]-V)<Z||Math.abs(se[1]-G)<Z)&&(j=l(R.dxyda_rough(se[0],se[1],Z)),q=Math.max(q,T*m(ce,j)/2)),q}var Y=c(A,0,1),ee=c(A,o.total,o.total-1),re=U(O[0],Y),ie=o.total-U(O[O.length-1],ee);o.min<re&&(o.min=re),o.max>ie&&(o.max=ie),o.len=o.max-o.min}function c(A,C,S){var o=A.getPointAtLength(C),R=A.getPointAtLength(S),T=R.x-o.x,O=R.y-o.y,N=Math.sqrt(T*T+O*O);return[T/N,O/N]}function l(A){var C=Math.sqrt(A[0]*A[0]+A[1]*A[1]);return[A[0]/C,A[1]/C]}function m(A,C){var S=Math.abs(A[0]*C[0]+A[1]*C[1]),o=Math.sqrt(1-S*S);return o/S}function M(A,C,S,o,R,T){var O,N,H,k,V=x.ensureSingle(A,"g","contourbg"),G=V.selectAll("path").data(T==="fill"&&!R?[0]:[]);G.enter().append("path"),G.exit().remove();var U=[];for(k=0;k<C.length;k++)O=C[k],N=P([],O.x,S.c2p),H=P([],O.y,o.c2p),U.push(a(N,H,O.bicubic));G.attr("d","M"+U.join("L")+"Z").style("stroke","none")}function L(A,C,S,o,R,T,O,N,H,k,V){var G=k==="fill";G&&f(R,A.contours);var U=x.ensureSingle(C,"g","contourfill"),Y=U.selectAll("path").data(G?R:[]);Y.enter().append("path"),Y.exit().remove(),Y.each(function(ee){var re=(ee.prefixBoundary?V:"")+D(A,ee,T,O,N,H,S,o);re?d.select(this).attr("d",re).style("stroke","none"):d.select(this).remove()})}function D(A,C,S,o,R,T,O,N){var H,k="",V=C.edgepaths.map(function(ve,le){return le}),G=!0,U,Y,ee,re,ie,se,ce=Math.abs(S[0][0]-S[2][0])*1e-4,q=Math.abs(S[0][1]-S[2][1])*1e-4;function j(ve){return Math.abs(ve[1]-S[0][1])<q}function Z(ve){return Math.abs(ve[1]-S[2][1])<q}function Q(ve){return Math.abs(ve[0]-S[0][0])<ce}function ue(ve){return Math.abs(ve[0]-S[2][0])<ce}function fe(ve,le){var xe,Se,Re,Ee,Oe="";for(j(ve)&&!ue(ve)||Z(ve)&&!Q(ve)?(Ee=R.aaxis,Re=h(R,T,[ve[0],le[0]],.5*(ve[1]+le[1]))):(Ee=R.baxis,Re=h(R,T,.5*(ve[0]+le[0]),[ve[1],le[1]])),xe=1;xe<Re.length;xe++)for(Oe+=Ee.smoothing?"C":"L",Se=0;Se<Re[xe].length;Se++){var Be=Re[xe][Se];Oe+=[O.c2p(Be[0]),N.c2p(Be[1])]+" "}return Oe}for(H=0,U=null;V.length;){var te=C.edgepaths[H][0];for(U&&(k+=fe(U,te)),se=_.smoothopen(C.edgepaths[H].map(o),C.smoothing),k+=G?se:se.replace(/^M/,"L"),V.splice(V.indexOf(H),1),U=C.edgepaths[H][C.edgepaths[H].length-1],re=-1,ee=0;ee<4;ee++){if(!U){x.log("Missing end?",H,C);break}for(j(U)&&!ue(U)?Y=S[1]:Q(U)?Y=S[0]:Z(U)?Y=S[3]:ue(U)&&(Y=S[2]),ie=0;ie<C.edgepaths.length;ie++){var ne=C.edgepaths[ie][0];Math.abs(U[0]-Y[0])<ce?Math.abs(U[0]-ne[0])<ce&&(ne[1]-U[1])*(Y[1]-ne[1])>=0&&(Y=ne,re=ie):Math.abs(U[1]-Y[1])<q?Math.abs(U[1]-ne[1])<q&&(ne[0]-U[0])*(Y[0]-ne[0])>=0&&(Y=ne,re=ie):x.log("endpt to newendpt is not vert. or horz.",U,Y,ne)}if(re>=0)break;k+=fe(U,Y),U=Y}if(re===C.edgepaths.length){x.log("unclosed perimeter path");break}H=re,G=V.indexOf(H)===-1,G&&(H=V[0],k+=fe(U,Y)+"Z",U=null)}for(H=0;H<C.paths.length;H++)k+=_.smoothclosed(C.paths[H].map(o),C.smoothing);return k}},64096:function(z,B,e){var d=e(50693),P=e(5386).f,a=e(9012),_=e(99181),x=e(1426).extendFlat;z.exports=x({lon:_.lon,lat:_.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:_.text,hovertext:_.hovertext,hoverinfo:x({},a.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:P(),showlegend:x({},a.showlegend,{dflt:!1})},d("",{cLetter:"z",editTypeOverride:"calc"}))},85070:function(z,B,e){var d=e(92770),P=e(71828).isArrayOrTypedArray,a=e(50606).BADNUM,_=e(78803),x=e(71828)._;z.exports=function(y,r){for(var n=r._length,u=new Array(n),i=r.z,f=P(i)&&i.length,g=0;g<n;g++){var h=u[g]={},b=r.lon[g],p=r.lat[g];if(h.lonlat=d(b)&&d(p)?[+b,+p]:[a,a],f){var E=i[g];h.z=d(E)?E:a}}return _(y,r,{vals:f?i:[0,1],containerStr:"",cLetter:"z"}),n&&(u[0].t={labels:{lat:x(y,"lat:")+" ",lon:x(y,"lon:")+" "}}),u}},52414:function(z,B,e){var d=e(92770),P=e(71828),a=e(7901),_=e(21081),x=e(50606).BADNUM,v=e(18214).makeBlank;z.exports=function(r){var n=r[0].trace,u=n.visible===!0&&n._length!==0,i={layout:{visibility:"none"},paint:{}},f=n._opts={heatmap:i,geojson:v()};if(!u)return f;var g=[],h,b=n.z,p=n.radius,E=P.isArrayOrTypedArray(b)&&b.length,c=P.isArrayOrTypedArray(p);for(h=0;h<r.length;h++){var l=r[h],m=l.lonlat;if(m[0]!==x){var M={};if(E){var L=l.z;M.z=L!==x?L:0}c&&(M.r=d(p[h])&&p[h]>0?+p[h]:0),g.push({type:"Feature",geometry:{type:"Point",coordinates:m},properties:M})}}var D=_.extractOpts(n),A=D.reversescale?_.flipScale(D.colorscale):D.colorscale,C=A[0][1],S=a.opacity(C)<1?C:a.addOpacity(C,0),o=["interpolate",["linear"],["heatmap-density"],0,S];for(h=1;h<A.length;h++)o.push(A[h][0],A[h][1]);var R=["interpolate",["linear"],["get","z"],D.min,0,D.max,1];return P.extendFlat(f.heatmap.paint,{"heatmap-weight":E?R:1/(D.max-D.min),"heatmap-color":o,"heatmap-radius":c?{type:"identity",property:"r"}:n.radius,"heatmap-opacity":n.opacity}),f.geojson={type:"FeatureCollection",features:g},f.heatmap.layout.visibility="visible",f}},79429:function(z,B,e){var d=e(71828),P=e(1586),a=e(64096);z.exports=function(x,v,y,r){function n(g,h){return d.coerce(x,v,a,g,h)}var u=n("lon")||[],i=n("lat")||[],f=Math.min(u.length,i.length);if(!f){v.visible=!1;return}v._length=f,n("z"),n("radius"),n("below"),n("text"),n("hovertext"),n("hovertemplate"),P(x,v,r,n,{prefix:"",cLetter:"z"})}},62474:function(z){z.exports=function(e,d){return e.lon=d.lon,e.lat=d.lat,e.z=d.z,e}},84684:function(z,B,e){var d=e(89298),P=e(28178).hoverPoints,a=e(28178).getExtraText;z.exports=function(x,v,y){var r=P(x,v,y);if(r){var n=r[0],u=n.cd,i=u[0].trace,f=u[n.index];if(delete n.color,"z"in f){var g=n.subplot.mockAxis;n.z=f.z,n.zLabel=d.tickText(g,g.c2l(f.z),"hover").text}return n.extraText=a(i,f,u[0].t.labels),[n]}}},93814:function(z,B,e){z.exports={attributes:e(64096),supplyDefaults:e(79429),colorbar:e(61243),formatLabels:e(15636),calc:e(85070),plot:e(7336),hoverPoints:e(84684),eventData:e(62474),getBelow:function(d,P){for(var a=P.getMapLayers(),_=0;_<a.length;_++){var x=a[_],v=x.id;if(x.type==="symbol"&&typeof v=="string"&&v.indexOf("plotly-")===-1)return v}},moduleType:"trace",name:"densitymapbox",basePlotModule:e(50101),categories:["mapbox","gl","showLegend"],meta:{hr_name:"density_mapbox"}}},7336:function(z,B,e){var d=e(52414),P=e(77734).traceLayerPrefix;function a(x,v){this.type="densitymapbox",this.subplot=x,this.uid=v,this.sourceId="source-"+v,this.layerList=[["heatmap",P+v+"-heatmap"]],this.below=null}var _=a.prototype;_.update=function(x){var v=this.subplot,y=this.layerList,r=d(x),n=v.belowLookup["trace-"+this.uid];v.map.getSource(this.sourceId).setData(r.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(r,n),this.below=n);for(var u=0;u<y.length;u++){var i=y[u],f=i[0],g=i[1],h=r[f];v.setOptions(g,"setLayoutProperty",h.layout),h.layout.visibility==="visible"&&v.setOptions(g,"setPaintProperty",h.paint)}},_._addLayers=function(x,v){for(var y=this.subplot,r=this.layerList,n=this.sourceId,u=0;u<r.length;u++){var i=r[u],f=i[0],g=x[f];y.addLayer({type:f,id:i[1],source:n,layout:g.layout,paint:g.paint},v)}},_._removeLayers=function(){for(var x=this.subplot.map,v=this.layerList,y=v.length-1;y>=0;y--)x.removeLayer(v[y][1])},_.dispose=function(){var x=this.subplot.map;this._removeLayers(),x.removeSource(this.sourceId)},z.exports=function(v,y){var r=y[0].trace,n=new a(v,r.uid),u=n.sourceId,i=d(y),f=n.below=v.belowLookup["trace-"+r.uid];return v.map.addSource(u,{type:"geojson",data:i.geojson}),n._addLayers(i,f),n}},49789:function(z,B,e){var d=e(71828);z.exports=function(a,_){for(var x=0;x<a.length;x++)a[x].i=x;d.mergeArray(_.text,a,"tx"),d.mergeArray(_.hovertext,a,"htx");var v=_.marker;if(v){d.mergeArray(v.opacity,a,"mo"),d.mergeArray(v.color,a,"mc");var y=v.line;y&&(d.mergeArray(y.color,a,"mlc"),d.mergeArrayCastPositive(y.width,a,"mlw"))}}},1285:function(z,B,e){var d=e(1486),P=e(82196).line,a=e(9012),_=e(12663).axisHoverFormat,x=e(5386).f,v=e(5386).s,y=e(18517),r=e(1426).extendFlat,n=e(7901);z.exports={x:d.x,x0:d.x0,dx:d.dx,y:d.y,y0:d.y0,dy:d.dy,xperiod:d.xperiod,yperiod:d.yperiod,xperiod0:d.xperiod0,yperiod0:d.yperiod0,xperiodalignment:d.xperiodalignment,yperiodalignment:d.yperiodalignment,xhoverformat:_("x"),yhoverformat:_("y"),hovertext:d.hovertext,hovertemplate:x({},{keys:y.eventDataKeys}),hoverinfo:r({},a.hoverinfo,{flags:["name","x","y","text","percent initial","percent previous","percent total"]}),textinfo:{valType:"flaglist",flags:["label","text","percent initial","percent previous","percent total","value"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:v({editType:"plot"},{keys:y.eventDataKeys.concat(["label","value"])}),text:d.text,textposition:d.textposition,insidetextanchor:r({},d.insidetextanchor,{dflt:"middle"}),textangle:r({},d.textangle,{dflt:0}),textfont:d.textfont,insidetextfont:d.insidetextfont,outsidetextfont:d.outsidetextfont,constraintext:d.constraintext,cliponaxis:d.cliponaxis,orientation:r({},d.orientation,{}),offset:r({},d.offset,{arrayOk:!1}),width:r({},d.width,{arrayOk:!1}),marker:u(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:r({},P.color,{dflt:n.defaultLine}),width:r({},P.width,{dflt:0,editType:"plot"}),dash:P.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:d.offsetgroup,alignmentgroup:d.alignmentgroup};function u(){var i=r({},d.marker);return delete i.pattern,i}},9532:function(z,B,e){var d=e(89298),P=e(42973),a=e(49789),_=e(66279),x=e(50606).BADNUM;z.exports=function(r,n){var u=d.getFromId(r,n.xaxis||"x"),i=d.getFromId(r,n.yaxis||"y"),f,g,h,b,p,E,c,l;n.orientation==="h"?(f=u.makeCalcdata(n,"x"),h=i.makeCalcdata(n,"y"),b=P(n,i,"y",h),p=!!n.yperiodalignment,E="y"):(f=i.makeCalcdata(n,"y"),h=u.makeCalcdata(n,"x"),b=P(n,u,"x",h),p=!!n.xperiodalignment,E="x"),g=b.vals;var m=Math.min(g.length,f.length),M=new Array(m);for(n._base=[],c=0;c<m;c++){f[c]<0&&(f[c]=x);var L=!1;f[c]!==x&&c+1<m&&f[c+1]!==x&&(L=!0),l=M[c]={p:g[c],s:f[c],cNext:L},n._base[c]=-.5*l.s,p&&(M[c].orig_p=h[c],M[c][E+"End"]=b.ends[c],M[c][E+"Start"]=b.starts[c]),n.ids&&(l.id=String(n.ids[c])),c===0&&(M[0].vTotal=0),M[0].vTotal+=v(l.s),l.begR=v(l.s)/v(M[0].s)}var D;for(c=0;c<m;c++)l=M[c],l.s!==x&&(l.sumR=l.s/M[0].vTotal,l.difR=D!==void 0?l.s/D:1,D=l.s);return a(M,n),_(M,n),M};function v(y){return y===x?0:y}},18517:function(z){z.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}},8984:function(z,B,e){var d=e(11661).setGroupPositions;z.exports=function(a,_){var x=a._fullLayout,v=a._fullData,y=a.calcdata,r=_.xaxis,n=_.yaxis,u=[],i=[],f=[],g,h;for(h=0;h<v.length;h++){var b=v[h],p=b.orientation==="h";b.visible===!0&&b.xaxis===r._id&&b.yaxis===n._id&&b.type==="funnel"&&(g=y[h],p?f.push(g):i.push(g),u.push(g))}var E={mode:x.funnelmode,norm:x.funnelnorm,gap:x.funnelgap,groupgap:x.funnelgroupgap};for(d(a,r,n,i,E),d(a,n,r,f,E),h=0;h<u.length;h++){g=u[h];for(var c=0;c<g.length;c++)c+1<g.length&&(g[c].nextP0=g[c+1].p0,g[c].nextS0=g[c+1].s0,g[c].nextP1=g[c+1].p1,g[c].nextS1=g[c+1].s1)}}},26199:function(z,B,e){var d=e(71828),P=e(26125),a=e(90769).handleText,_=e(67513),x=e(73927),v=e(1285),y=e(7901);function r(i,f,g,h){function b(L,D){return d.coerce(i,f,v,L,D)}var p=_(i,f,h,b);if(!p){f.visible=!1;return}x(i,f,h,b),b("xhoverformat"),b("yhoverformat"),b("orientation",f.y&&!f.x?"v":"h"),b("offset"),b("width");var E=b("text");b("hovertext"),b("hovertemplate");var c=b("textposition");a(i,f,h,b,c,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),f.textposition!=="none"&&!f.texttemplate&&b("textinfo",Array.isArray(E)?"text+value":"value");var l=b("marker.color",g);b("marker.line.color",y.defaultLine),b("marker.line.width");var m=b("connector.visible");if(m){b("connector.fillcolor",n(l));var M=b("connector.line.width");M&&(b("connector.line.color"),b("connector.line.dash"))}}function n(i){var f=d.isArrayOrTypedArray(i)?"#000":i;return y.addOpacity(f,.5*y.opacity(f))}function u(i,f){var g,h;function b(E){return d.coerce(h._input,h,v,E)}if(f.funnelmode==="group")for(var p=0;p<i.length;p++)h=i[p],g=h._input,P(g,h,f,b)}z.exports={supplyDefaults:r,crossTraceDefaults:u}},34598:function(z){z.exports=function(e,d){return e.x="xVal"in d?d.xVal:d.x,e.y="yVal"in d?d.yVal:d.y,"percentInitial"in d&&(e.percentInitial=d.percentInitial),"percentPrevious"in d&&(e.percentPrevious=d.percentPrevious),"percentTotal"in d&&(e.percentTotal=d.percentTotal),d.xa&&(e.xaxis=d.xa),d.ya&&(e.yaxis=d.ya),e}},63341:function(z,B,e){var d=e(7901).opacity,P=e(95423).hoverOnBars,a=e(71828).formatPercent;z.exports=function(v,y,r,n,u){var i=P(v,y,r,n,u);if(i){var f=i.cd,g=f[0].trace,h=g.orientation==="h",b=i.index,p=f[b],E=h?"x":"y";i[E+"LabelVal"]=p.s,i.percentInitial=p.begR,i.percentInitialLabel=a(p.begR,1),i.percentPrevious=p.difR,i.percentPreviousLabel=a(p.difR,1),i.percentTotal=p.sumR,i.percentTotalLabel=a(p.sumR,1);var c=p.hi||g.hoverinfo,l=[];if(c&&c!=="none"&&c!=="skip"){var m=c==="all",M=c.split("+"),L=function(D){return m||M.indexOf(D)!==-1};L("percent initial")&&l.push(i.percentInitialLabel+" of initial"),L("percent previous")&&l.push(i.percentPreviousLabel+" of previous"),L("percent total")&&l.push(i.percentTotalLabel+" of total")}return i.extraText=l.join("<br>"),i.color=_(g,p),[i]}};function _(x,v){var y=x.marker,r=v.mc||y.color,n=v.mlc||y.line.color,u=v.mlw||y.line.width;if(d(r))return r;if(d(n)&&u)return n}},51759:function(z,B,e){z.exports={attributes:e(1285),layoutAttributes:e(10440),supplyDefaults:e(26199).supplyDefaults,crossTraceDefaults:e(26199).crossTraceDefaults,supplyLayoutDefaults:e(93138),calc:e(9532),crossTraceCalc:e(8984),plot:e(80461),style:e(68266).style,hoverPoints:e(63341),eventData:e(34598),selectPoints:e(81974),moduleType:"trace",name:"funnel",basePlotModule:e(93612),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},10440:function(z){z.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},93138:function(z,B,e){var d=e(71828),P=e(10440);z.exports=function(a,_,x){var v=!1;function y(u,i){return d.coerce(a,_,P,u,i)}for(var r=0;r<x.length;r++){var n=x[r];if(n.visible&&n.type==="funnel"){v=!0;break}}v&&(y("funnelmode"),y("funnelgap",.2),y("funnelgroupgap"))}},80461:function(z,B,e){var d=e(39898),P=e(71828),a=e(91424),_=e(50606).BADNUM,x=e(17295),v=e(72597).clearMinTextSize;z.exports=function(i,f,g,h){var b=i._fullLayout;v("funnel",b),y(i,f,g,h),r(i,f,g,h),x.plot(i,f,g,h,{mode:b.funnelmode,norm:b.funnelmode,gap:b.funnelgap,groupgap:b.funnelgroupgap})};function y(u,i,f,g){var h=i.xaxis,b=i.yaxis;P.makeTraceGroups(g,f,"trace bars").each(function(p){var E=d.select(this),c=p[0].trace,l=P.ensureSingle(E,"g","regions");if(!c.connector||!c.connector.visible){l.remove();return}var m=c.orientation==="h",M=l.selectAll("g.region").data(P.identity);M.enter().append("g").classed("region",!0),M.exit().remove();var L=M.size();M.each(function(D,A){if(!(A!==L-1&&!D.cNext)){var C=n(D,h,b,m),S=C[0],o=C[1],R="";S[0]!==_&&o[0]!==_&&S[1]!==_&&o[1]!==_&&S[2]!==_&&o[2]!==_&&S[3]!==_&&o[3]!==_&&(m?R+="M"+S[0]+","+o[1]+"L"+S[2]+","+o[2]+"H"+S[3]+"L"+S[1]+","+o[1]+"Z":R+="M"+S[1]+","+o[1]+"L"+S[2]+","+o[3]+"V"+o[2]+"L"+S[1]+","+o[0]+"Z"),R===""&&(R="M0,0Z"),P.ensureSingle(d.select(this),"path").attr("d",R).call(a.setClipUrl,i.layerClipId,u)}})})}function r(u,i,f,g){var h=i.xaxis,b=i.yaxis;P.makeTraceGroups(g,f,"trace bars").each(function(p){var E=d.select(this),c=p[0].trace,l=P.ensureSingle(E,"g","lines");if(!c.connector||!c.connector.visible||!c.connector.line.width){l.remove();return}var m=c.orientation==="h",M=l.selectAll("g.line").data(P.identity);M.enter().append("g").classed("line",!0),M.exit().remove();var L=M.size();M.each(function(D,A){if(!(A!==L-1&&!D.cNext)){var C=n(D,h,b,m),S=C[0],o=C[1],R="";S[3]!==void 0&&o[3]!==void 0&&(m?(R+="M"+S[0]+","+o[1]+"L"+S[2]+","+o[2],R+="M"+S[1]+","+o[1]+"L"+S[3]+","+o[2]):(R+="M"+S[1]+","+o[1]+"L"+S[2]+","+o[3],R+="M"+S[1]+","+o[0]+"L"+S[2]+","+o[2])),R===""&&(R="M0,0Z"),P.ensureSingle(d.select(this),"path").attr("d",R).call(a.setClipUrl,i.layerClipId,u)}})})}function n(u,i,f,g){var h=[],b=[],p=g?i:f,E=g?f:i;return h[0]=p.c2p(u.s0,!0),b[0]=E.c2p(u.p0,!0),h[1]=p.c2p(u.s1,!0),b[1]=E.c2p(u.p1,!0),h[2]=p.c2p(u.nextS0,!0),b[2]=E.c2p(u.nextP0,!0),h[3]=p.c2p(u.nextS1,!0),b[3]=E.c2p(u.nextP1,!0),g?[h,b]:[b,h]}},68266:function(z,B,e){var d=e(39898),P=e(91424),a=e(7901),_=e(37822).DESELECTDIM,x=e(16688),v=e(72597).resizeText,y=x.styleTextPoints;function r(n,u,i){var f=i||d.select(n).selectAll("g.funnellayer").selectAll("g.trace");v(n,f,"funnel"),f.style("opacity",function(g){return g[0].trace.opacity}),f.each(function(g){var h=d.select(this),b=g[0].trace;h.selectAll(".point > path").each(function(p){if(!p.isBlank){var E=b.marker;d.select(this).call(a.fill,p.mc||E.color).call(a.stroke,p.mlc||E.line.color).call(P.dashLine,E.line.dash,p.mlw||E.line.width).style("opacity",b.selectedpoints&&!p.selected?_:1)}}),y(h,b,n),h.selectAll(".regions").each(function(){d.select(this).selectAll("path").style("stroke-width",0).call(a.fill,b.connector.fillcolor)}),h.selectAll(".lines").each(function(){var p=b.connector.line;P.lineGroupStyle(d.select(this).selectAll("path"),p.width,p.color,p.dash)})})}z.exports={style:r}},86807:function(z,B,e){var d=e(34e3),P=e(9012),a=e(27670).Y,_=e(5386).f,x=e(5386).s,v=e(1426).extendFlat;z.exports={labels:d.labels,label0:d.label0,dlabel:d.dlabel,values:d.values,marker:{colors:d.marker.colors,line:{color:v({},d.marker.line.color,{dflt:null}),width:v({},d.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},text:d.text,hovertext:d.hovertext,scalegroup:v({},d.scalegroup,{}),textinfo:v({},d.textinfo,{flags:["label","text","value","percent"]}),texttemplate:x({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:v({},P.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:_({},{keys:["label","color","value","text","percent"]}),textposition:v({},d.textposition,{values:["inside","none"],dflt:"inside"}),textfont:d.textfont,insidetextfont:d.insidetextfont,title:{text:d.title.text,font:d.title.font,position:v({},d.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:a({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}},6452:function(z,B,e){var d=e(74875);B.name="funnelarea",B.plot=function(P,a,_,x){d.plotBasePlot(B.name,P,a,_,x)},B.clean=function(P,a,_,x){d.cleanBasePlot(B.name,P,a,_,x)}},89574:function(z,B,e){var d=e(32354);function P(_,x){return d.calc(_,x)}function a(_){d.crossTraceCalc(_,{type:"funnelarea"})}z.exports={calc:P,crossTraceCalc:a}},86282:function(z,B,e){var d=e(71828),P=e(86807),a=e(27670).c,_=e(90769).handleText,x=e(37434).handleLabelsAndValues;z.exports=function(y,r,n,u){function i(L,D){return d.coerce(y,r,P,L,D)}var f=i("labels"),g=i("values"),h=x(f,g),b=h.len;if(r._hasLabels=h.hasLabels,r._hasValues=h.hasValues,!r._hasLabels&&r._hasValues&&(i("label0"),i("dlabel")),!b){r.visible=!1;return}r._length=b;var p=i("marker.line.width");p&&i("marker.line.color",u.paper_bgcolor),i("marker.colors"),i("scalegroup");var E=i("text"),c=i("texttemplate"),l;if(c||(l=i("textinfo",Array.isArray(E)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),c||l&&l!=="none"){var m=i("textposition");_(y,r,u,i,m,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}a(r,u,i);var M=i("title.text");M&&(i("title.position"),d.coerceFont(i,"title.font",u.font)),i("aspectratio"),i("baseratio")}},10421:function(z,B,e){z.exports={moduleType:"trace",name:"funnelarea",basePlotModule:e(6452),categories:["pie-like","funnelarea","showLegend"],attributes:e(86807),layoutAttributes:e(80097),supplyDefaults:e(86282),supplyLayoutDefaults:e(57402),calc:e(89574).calc,crossTraceCalc:e(89574).crossTraceCalc,plot:e(79187),style:e(71858),styleOne:e(63463),meta:{}}},80097:function(z,B,e){var d=e(92774).hiddenlabels;z.exports={hiddenlabels:d,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},57402:function(z,B,e){var d=e(71828),P=e(80097);z.exports=function(_,x){function v(y,r){return d.coerce(_,x,P,y,r)}v("hiddenlabels"),v("funnelareacolorway",x.colorway),v("extendfunnelareacolors")}},79187:function(z,B,e){var d=e(39898),P=e(91424),a=e(71828),_=a.strScale,x=a.strTranslate,v=e(63893),y=e(17295),r=y.toMoveInsideBar,n=e(72597),u=n.recordMinTextSize,i=n.clearMinTextSize,f=e(53581),g=e(14575),h=g.attachFxHandlers,b=g.determineInsideTextFont,p=g.layoutAreas,E=g.prerenderTitles,c=g.positionTitleOutside,l=g.formatSliceLabel;z.exports=function(A,C){var S=A._context.staticPlot,o=A._fullLayout;i("funnelarea",o),E(C,A),p(C,o._size),a.makeTraceGroups(o._funnelarealayer,C,"trace").each(function(R){var T=d.select(this),O=R[0],N=O.trace;L(R),T.each(function(){var H=d.select(this).selectAll("g.slice").data(R);H.enter().append("g").classed("slice",!0),H.exit().remove(),H.each(function(V,G){if(V.hidden){d.select(this).selectAll("path,g").remove();return}V.pointNumber=V.i,V.curveNumber=N.index;var U=O.cx,Y=O.cy,ee=d.select(this),re=ee.selectAll("path.surface").data([V]);re.enter().append("path").classed("surface",!0).style({"pointer-events":S?"none":"all"}),ee.call(h,A,R);var ie="M"+(U+V.TR[0])+","+(Y+V.TR[1])+m(V.TR,V.BR)+m(V.BR,V.BL)+m(V.BL,V.TL)+"Z";re.attr("d",ie),l(A,V,O);var se=f.castOption(N.textposition,V.pts),ce=ee.selectAll("g.slicetext").data(V.text&&se!=="none"?[0]:[]);ce.enter().append("g").classed("slicetext",!0),ce.exit().remove(),ce.each(function(){var q=a.ensureSingle(d.select(this),"text","",function(ve){ve.attr("data-notex",1)}),j=a.ensureUniformFontSize(A,b(N,V,o.font));q.text(V.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(P.font,j).call(v.convertToTspans,A);var Z=P.bBox(q.node()),Q,ue,fe,te=Math.min(V.BL[1],V.BR[1])+Y,ne=Math.max(V.TL[1],V.TR[1])+Y;ue=Math.max(V.TL[0],V.BL[0])+U,fe=Math.min(V.TR[0],V.BR[0])+U,Q=r(ue,fe,te,ne,Z,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),Q.fontSize=j.size,u(N.type,Q,o),R[G].transform=Q,a.setTransormAndDisplay(q,Q)})});var k=d.select(this).selectAll("g.titletext").data(N.title.text?[0]:[]);k.enter().append("g").classed("titletext",!0),k.exit().remove(),k.each(function(){var V=a.ensureSingle(d.select(this),"text","",function(Y){Y.attr("data-notex",1)}),G=N.title.text;N._meta&&(G=a.templateString(G,N._meta)),V.text(G).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(P.font,N.title.font).call(v.convertToTspans,A);var U=c(O,o._size);V.attr("transform",x(U.x,U.y)+_(Math.min(1,U.scale))+x(U.tx,U.ty))})})})};function m(D,A){var C=A[0]-D[0],S=A[1]-D[1];return"l"+C+","+S}function M(D,A){return[.5*(D[0]+A[0]),.5*(D[1]+A[1])]}function L(D){if(!D.length)return;var A=D[0],C=A.trace,S=C.aspectratio,o=C.baseratio;o>.999&&(o=.999);var R=Math.pow(o,2),T=A.vTotal,O=T*R/(1-R),N=T,H=O/T;function k(){var le=Math.sqrt(H);return{x:le,y:-le}}function V(){var le=k();return[le.x,le.y]}var G,U=[];U.push(V());var Y,ee;for(Y=D.length-1;Y>-1;Y--)if(ee=D[Y],!ee.hidden){var re=ee.v/N;H+=re,U.push(V())}var ie=1/0,se=-1/0;for(Y=0;Y<U.length;Y++)G=U[Y],ie=Math.min(ie,G[1]),se=Math.max(se,G[1]);for(Y=0;Y<U.length;Y++)U[Y][1]-=(se+ie)/2;var ce=U[U.length-1][0],q=A.r,j=(se-ie)/2,Z=q/ce,Q=q/j*S;for(A.r=Q*j,Y=0;Y<U.length;Y++)U[Y][0]*=Z,U[Y][1]*=Q;G=U[0];var ue=[-G[0],G[1]],fe=[G[0],G[1]],te=0;for(Y=D.length-1;Y>-1;Y--)if(ee=D[Y],!ee.hidden){te+=1;var ne=U[te][0],ve=U[te][1];ee.TL=[-ne,ve],ee.TR=[ne,ve],ee.BL=ue,ee.BR=fe,ee.pxmid=M(ee.TR,ee.BR),ue=ee.TL,fe=ee.TR}}},71858:function(z,B,e){var d=e(39898),P=e(63463),a=e(72597).resizeText;z.exports=function(x){var v=x._fullLayout._funnelarealayer.selectAll(".trace");a(x,v,"funnelarea"),v.each(function(y){var r=y[0],n=r.trace,u=d.select(this);u.style({opacity:n.opacity}),u.selectAll("path.surface").each(function(i){d.select(this).call(P,i,n)})})}},21606:function(z,B,e){var d=e(82196),P=e(9012),a=e(41940),_=e(12663).axisHoverFormat,x=e(5386).f,v=e(5386).s,y=e(50693),r=e(1426).extendFlat;z.exports=r({z:{valType:"data_array",editType:"calc"},x:r({},d.x,{impliedEdits:{xtype:"array"}}),x0:r({},d.x0,{impliedEdits:{xtype:"scaled"}}),dx:r({},d.dx,{impliedEdits:{xtype:"scaled"}}),y:r({},d.y,{impliedEdits:{ytype:"array"}}),y0:r({},d.y0,{impliedEdits:{ytype:"scaled"}}),dy:r({},d.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:r({},d.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:r({},d.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:r({},d.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:r({},d.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:r({},d.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:r({},d.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:_("x"),yhoverformat:_("y"),zhoverformat:_("z",1),hovertemplate:x(),texttemplate:v({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:a({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:r({},P.showlegend,{dflt:!1})},{transforms:void 0},y("",{cLetter:"z",autoColorDflt:!1}))},90757:function(z,B,e){var d=e(73972),P=e(71828),a=e(89298),_=e(42973),x=e(17562),v=e(78803),y=e(68296),r=e(4742),n=e(824),u=e(43907),i=e(70769),f=e(50606).BADNUM;z.exports=function(p,E){var c=a.getFromId(p,E.xaxis||"x"),l=a.getFromId(p,E.yaxis||"y"),m=d.traceIs(E,"contour"),M=d.traceIs(E,"histogram"),L=d.traceIs(E,"gl2d"),D=m?"best":E.zsmooth,A,C,S,o,R,T,O,N,H,k,V;if(c._minDtick=0,l._minDtick=0,M)V=x(p,E),o=V.orig_x,A=V.x,C=V.x0,S=V.dx,N=V.orig_y,R=V.y,T=V.y0,O=V.dy,H=V.z;else{var G=E.z;P.isArray1D(G)?(y(E,c,l,"x","y",["z"]),A=E._x,R=E._y,G=E._z):(o=E.x?c.makeCalcdata(E,"x"):[],N=E.y?l.makeCalcdata(E,"y"):[],A=_(E,c,"x",o).vals,R=_(E,l,"y",N).vals,E._x=A,E._y=R),C=E.x0,S=E.dx,T=E.y0,O=E.dy,H=r(G,E,c,l)}(c.rangebreaks||l.rangebreaks)&&(H=h(A,R,H),M||(A=g(A),R=g(R),E._x=A,E._y=R)),!M&&(m||E.connectgaps)&&(E._emptypoints=u(H),n(H,E._emptypoints));function U(fe){D=E._input.zsmooth=E.zsmooth=!1,P.warn('cannot use zsmooth: "fast": '+fe)}if(D==="fast"){if(c.type==="log"||l.type==="log")U("log axis found");else if(!M){if(A.length){var Y=(A[A.length-1]-A[0])/(A.length-1),ee=Math.abs(Y/100);for(k=0;k<A.length-1;k++)if(Math.abs(A[k+1]-A[k]-Y)>ee){U("x scale is not linear");break}}if(R.length&&D==="fast"){var re=(R[R.length-1]-R[0])/(R.length-1),ie=Math.abs(re/100);for(k=0;k<R.length-1;k++)if(Math.abs(R[k+1]-R[k]-re)>ie){U("y scale is not linear");break}}}}var se=P.maxRowLength(H),ce=E.xtype==="scaled"?"":A,q=i(E,ce,C,S,se,c),j=E.ytype==="scaled"?"":R,Z=i(E,j,T,O,H.length,l);L||(E._extremes[c._id]=a.findExtremes(c,q),E._extremes[l._id]=a.findExtremes(l,Z));var Q={x:q,y:Z,z:H,text:E._text||E.text,hovertext:E._hovertext||E.hovertext};if(E.xperiodalignment&&o&&(Q.orig_x=o),E.yperiodalignment&&N&&(Q.orig_y=N),ce&&ce.length===q.length-1&&(Q.xCenter=ce),j&&j.length===Z.length-1&&(Q.yCenter=j),M&&(Q.xRanges=V.xRanges,Q.yRanges=V.yRanges,Q.pts=V.pts),m||v(p,E,{vals:H,cLetter:"z"}),m&&E.contours&&E.contours.coloring==="heatmap"){var ue={type:E.type==="contour"?"heatmap":"histogram2d",xcalendar:E.xcalendar,ycalendar:E.ycalendar};Q.xfill=i(ue,ce,C,S,se,c),Q.yfill=i(ue,j,T,O,H.length,l)}return[Q]};function g(b){for(var p=[],E=b.length,c=0;c<E;c++){var l=b[c];l!==f&&p.push(l)}return p}function h(b,p,E){for(var c=[],l=-1,m=0;m<E.length;m++)if(p[m]!==f){l++,c[l]=[];for(var M=0;M<E[m].length;M++)b[M]!==f&&c[l].push(E[m][M])}return c}},4742:function(z,B,e){var d=e(92770),P=e(71828),a=e(50606).BADNUM;z.exports=function(x,v,y,r){var n,u,i,f,g,h;function b(M){if(d(M))return+M}if(v&&v.transpose){for(n=0,g=0;g<x.length;g++)n=Math.max(n,x[g].length);if(n===0)return!1;i=function(M){return M.length},f=function(M,L,D){return(M[D]||[])[L]}}else n=x.length,i=function(M,L){return M[L].length},f=function(M,L,D){return(M[L]||[])[D]};var p=function(M,L,D){return L===a||D===a?a:f(M,L,D)};function E(M){if(v&&v.type!=="carpet"&&v.type!=="contourcarpet"&&M&&M.type==="category"&&v["_"+M._id.charAt(0)].length){var L=M._id.charAt(0),D={},A=v["_"+L+"CategoryMap"]||v[L];for(g=0;g<A.length;g++)D[A[g]]=g;return function(C){var S=D[M._categories[C]];return S+1?S:a}}else return P.identity}var c=E(y),l=E(r);r&&r.type==="category"&&(n=r._categories.length);var m=new Array(n);for(g=0;g<n;g++)for(y&&y.type==="category"?u=y._categories.length:u=i(x,g),m[g]=new Array(u),h=0;h<u;h++)m[g][h]=b(p(x,l(g),c(h)));return m}},61243:function(z){z.exports={min:"zmin",max:"zmax"}},68296:function(z,B,e){var d=e(71828),P=e(50606).BADNUM,a=e(42973);z.exports=function(x,v,y,r,n,u){var i=x._length,f=v.makeCalcdata(x,r),g=y.makeCalcdata(x,n);f=a(x,v,r,f).vals,g=a(x,y,n,g).vals;var h=x.text,b=h!==void 0&&d.isArray1D(h),p=x.hovertext,E=p!==void 0&&d.isArray1D(p),c,l,m=d.distinctVals(f),M=m.vals,L=d.distinctVals(g),D=L.vals,A=[],C,S,o=D.length,R=M.length;for(c=0;c<u.length;c++)A[c]=d.init2dArray(o,R);b&&(C=d.init2dArray(o,R)),E&&(S=d.init2dArray(o,R));var T=d.init2dArray(o,R);for(c=0;c<i;c++)if(f[c]!==P&&g[c]!==P){var O=d.findBin(f[c]+m.minDiff/2,M),N=d.findBin(g[c]+L.minDiff/2,D);for(l=0;l<u.length;l++){var H=u[l],k=x[H],V=A[l];V[N][O]=k[c],T[N][O]=c}b&&(C[N][O]=h[c]),E&&(S[N][O]=p[c])}for(x["_"+r]=M,x["_"+n]=D,l=0;l<u.length;l++)x["_"+u[l]]=A[l];b&&(x._text=C),E&&(x._hovertext=S),v&&v.type==="category"&&(x["_"+r+"CategoryMap"]=M.map(function(G){return v._categories[G]})),y&&y.type==="category"&&(x["_"+n+"CategoryMap"]=D.map(function(G){return y._categories[G]})),x._after2before=T}},76382:function(z,B,e){var d=e(71828),P=e(67684),a=e(58623),_=e(73927),x=e(49901),v=e(1586),y=e(21606);z.exports=function(n,u,i,f){function g(b,p){return d.coerce(n,u,y,b,p)}var h=P(n,u,g,f);if(!h){u.visible=!1;return}_(n,u,f,g),g("xhoverformat"),g("yhoverformat"),g("text"),g("hovertext"),g("hovertemplate"),a(g,f),x(n,u,g,f),g("hoverongaps"),g("connectgaps",d.isArray1D(u.z)&&u.zsmooth!==!1),v(n,u,f,g,{prefix:"",cLetter:"z"})}},43907:function(z,B,e){var d=e(71828).maxRowLength;z.exports=function(a){var _=[],x={},v=[],y=a[0],r=[],n=[0,0,0],u=d(a),i,f,g,h,b,p,E,c;for(f=0;f<a.length;f++)for(i=r,r=y,y=a[f+1]||[],g=0;g<u;g++)r[g]===void 0&&(p=(r[g-1]!==void 0?1:0)+(r[g+1]!==void 0?1:0)+(i[g]!==void 0?1:0)+(y[g]!==void 0?1:0),p?(f===0&&p++,g===0&&p++,f===a.length-1&&p++,g===r.length-1&&p++,p<4&&(x[[f,g]]=[f,g,p]),_.push([f,g,p])):v.push([f,g]));for(;v.length;){for(E={},c=!1,b=v.length-1;b>=0;b--)h=v[b],f=h[0],g=h[1],p=((x[[f-1,g]]||n)[2]+(x[[f+1,g]]||n)[2]+(x[[f,g-1]]||n)[2]+(x[[f,g+1]]||n)[2])/20,p&&(E[h]=[f,g,p],v.splice(b,1),c=!0);if(!c)throw"findEmpties iterated with no new neighbors";for(h in E)x[h]=E[h],_.push(E[h])}return _.sort(function(l,m){return m[2]-l[2]})}},46248:function(z,B,e){var d=e(30211),P=e(71828),a=e(89298),_=e(21081).extractOpts;z.exports=function(v,y,r,n,u){u||(u={});var i=u.isContour,f=v.cd[0],g=f.trace,h=v.xa,b=v.ya,p=f.x,E=f.y,c=f.z,l=f.xCenter,m=f.yCenter,M=f.zmask,L=g.zhoverformat,D=p,A=E,C,S,o,R;if(v.index!==!1){try{o=Math.round(v.index[1]),R=Math.round(v.index[0])}catch{P.error("Error hovering on heatmap, pointNumber must be [row,col], found:",v.index);return}if(o<0||o>=c[0].length||R<0||R>c.length)return}else{if(d.inbox(y-p[0],y-p[p.length-1],0)>0||d.inbox(r-E[0],r-E[E.length-1],0)>0)return;if(i){var T;for(D=[2*p[0]-p[1]],T=1;T<p.length;T++)D.push((p[T]+p[T-1])/2);for(D.push([2*p[p.length-1]-p[p.length-2]]),A=[2*E[0]-E[1]],T=1;T<E.length;T++)A.push((E[T]+E[T-1])/2);A.push([2*E[E.length-1]-E[E.length-2]])}o=Math.max(0,Math.min(D.length-2,P.findBin(y,D))),R=Math.max(0,Math.min(A.length-2,P.findBin(r,A)))}var O=h.c2p(p[o]),N=h.c2p(p[o+1]),H=b.c2p(E[R]),k=b.c2p(E[R+1]),V,G;i?(V=f.orig_x||p,G=f.orig_y||E,N=O,C=V[o],k=H,S=G[R]):(V=f.orig_x||l||p,G=f.orig_y||m||E,C=l?V[o]:(V[o]+V[o+1])/2,S=m?G[R]:(G[R]+G[R+1])/2,h&&h.type==="category"&&(C=p[o]),b&&b.type==="category"&&(S=E[R]),g.zsmooth&&(O=N=h.c2p(C),H=k=b.c2p(S)));var U=c[R][o];if(M&&!M[R][o]&&(U=void 0),!(U===void 0&&!g.hoverongaps)){var Y;Array.isArray(f.hovertext)&&Array.isArray(f.hovertext[R])?Y=f.hovertext[R][o]:Array.isArray(f.text)&&Array.isArray(f.text[R])&&(Y=f.text[R][o]);var ee=_(g),re={type:"linear",range:[ee.min,ee.max],hoverformat:L,_separators:h._separators,_numFormat:h._numFormat},ie=a.tickText(re,U,"hover").text;return[P.extendFlat(v,{index:g._after2before?g._after2before[R][o]:[R,o],distance:v.maxHoverDistance,spikeDistance:v.maxSpikeDistance,x0:O,x1:N,y0:H,y1:k,xLabelVal:C,yLabelVal:S,zLabelVal:U,zLabel:ie,text:Y})]}}},92165:function(z,B,e){z.exports={attributes:e(21606),supplyDefaults:e(76382),calc:e(90757),plot:e(50347),colorbar:e(61243),style:e(70035),hoverPoints:e(46248),moduleType:"trace",name:"heatmap",basePlotModule:e(93612),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}},824:function(z,B,e){var d=e(71828),P=.01,a=[[-1,0],[1,0],[0,-1],[0,1]];function _(v){return .5-.25*Math.min(1,v*.5)}z.exports=function(y,r){var n=1,u;for(x(y,r),u=0;u<r.length&&!(r[u][2]<4);u++);for(r=r.slice(u),u=0;u<100&&n>P;u++)n=x(y,r,_(n));return n>P&&d.log("interp2d didn't converge quickly",n),y};function x(v,y,r){var n=0,u,i,f,g,h,b,p,E,c,l,m,M,L;for(g=0;g<y.length;g++){for(u=y[g],i=u[0],f=u[1],m=v[i][f],l=0,c=0,h=0;h<4;h++)b=a[h],p=v[i+b[0]],p&&(E=p[f+b[1]],E!==void 0&&(l===0?M=L=E:(M=Math.min(M,E),L=Math.max(L,E)),c++,l+=E));if(c===0)throw"iterateInterp2d order is wrong: no defined neighbors";v[i][f]=l/c,m===void 0?c<4&&(n=1):(v[i][f]=(1+r)*v[i][f]-r*m,L>M&&(n=Math.max(n,Math.abs(v[i][f]-m)/(L-M))))}return n}},58623:function(z,B,e){var d=e(71828);z.exports=function(a,_){a("texttemplate");var x=d.extendFlat({},_.font,{color:"auto",size:"auto"});d.coerceFont(a,"textfont",x)}},70769:function(z,B,e){var d=e(73972),P=e(71828).isArrayOrTypedArray;z.exports=function(_,x,v,y,r,n){var u=[],i=d.traceIs(_,"contour"),f=d.traceIs(_,"histogram"),g=d.traceIs(_,"gl2d"),h,b,p,E=P(x)&&x.length>1;if(E&&!f&&n.type!=="category"){var c=x.length;if(c<=r){if(i||g)u=x.slice(0,r);else if(r===1)u=[x[0]-.5,x[0]+.5];else{for(u=[1.5*x[0]-.5*x[1]],p=1;p<c;p++)u.push((x[p-1]+x[p])*.5);u.push(1.5*x[c-1]-.5*x[c-2])}if(c<r){var l=u[u.length-1],m=l-u[u.length-2];for(p=c;p<r;p++)l+=m,u.push(l)}}else return i?x.slice(0,r):x.slice(0,r+1)}else{var M=_[n._id.charAt(0)+"calendar"];if(f)h=n.r2c(v,0,M);else if(P(x)&&x.length===1)h=x[0];else if(v===void 0)h=0;else{var L=n.type==="log"?n.d2c:n.r2c;h=L(v,0,M)}for(b=y||1,p=i||g?0:-.5;p<r;p++)u.push(h+b*p)}return u}},50347:function(z,B,e){var d=e(39898),P=e(84267),a=e(73972),_=e(91424),x=e(89298),v=e(71828),y=e(63893),r=e(8225),n=e(7901),u=e(21081).extractOpts,i=e(21081).makeColorScaleFuncFromTrace,f=e(77922),g=e(18783),h=g.LINE_SPACING,b="heatmap-label";function p(M){return M.selectAll("g."+b)}function E(M){p(M).remove()}z.exports=function(M,L,D,A){var C=L.xaxis,S=L.yaxis;v.makeTraceGroups(A,D,"hm").each(function(o){var R=d.select(this),T=o[0],O=T.trace,N=O.xgap||0,H=O.ygap||0,k=T.z,V=T.x,G=T.y,U=T.xCenter,Y=T.yCenter,ee=a.traceIs(O,"contour"),re=ee?"best":O.zsmooth,ie=k.length,se=v.maxRowLength(k),ce=!1,q=!1,j,Z,Q,ue,fe,te,ne,ve;for(te=0;j===void 0&&te<V.length-1;)j=C.c2p(V[te]),te++;for(te=V.length-1;Z===void 0&&te>0;)Z=C.c2p(V[te]),te--;for(Z<j&&(Q=Z,Z=j,j=Q,ce=!0),te=0;ue===void 0&&te<G.length-1;)ue=S.c2p(G[te]),te++;for(te=G.length-1;fe===void 0&&te>0;)fe=S.c2p(G[te]),te--;if(fe<ue&&(Q=ue,ue=fe,fe=Q,q=!0),ee&&(U=V,Y=G,V=T.xfill,G=T.yfill),re!=="fast"){var le=re==="best"?0:.5;j=Math.max(-le*C._length,j),Z=Math.min((1+le)*C._length,Z),ue=Math.max(-le*S._length,ue),fe=Math.min((1+le)*S._length,fe)}var xe=Math.round(Z-j),Se=Math.round(fe-ue),Re=xe<=0||Se<=0;if(Re){var Ee=R.selectAll("image").data([]);Ee.exit().remove(),E(R);return}var Oe,Be;re==="fast"?(Oe=se,Be=ie):(Oe=xe,Be=Se);var Le=document.createElement("canvas");Le.width=Oe,Le.height=Be;var Te=Le.getContext("2d"),De=i(O,{noNumericCheck:!0,returnArray:!0}),Ve,Ye;re==="fast"?(Ve=ce?function(Ar){return se-1-Ar}:v.identity,Ye=q?function(Ar){return ie-1-Ar}:v.identity):(Ve=function(Ar){return v.constrain(Math.round(C.c2p(V[Ar])-j),0,xe)},Ye=function(Ar){return v.constrain(Math.round(S.c2p(G[Ar])-ue),0,Se)});var Ne=Ye(0),Xe=[Ne,Ne],ht=ce?0:1,st=q?0:1,it=0,nt=0,pt=0,Tt=0,Et,Dt,et,Ue,ze;function rt(Ar,zr){if(Ar!==void 0){var Br=De(Ar);return Br[0]=Math.round(Br[0]),Br[1]=Math.round(Br[1]),Br[2]=Math.round(Br[2]),it+=zr,nt+=Br[0]*zr,pt+=Br[1]*zr,Tt+=Br[2]*zr,Br}return[0,0,0,0]}function lt(Ar,zr,Br,on){var mn=Ar[Br.bin0];if(mn===void 0)return rt(void 0,1);var Tn=Ar[Br.bin1],An=zr[Br.bin0],Fn=zr[Br.bin1],Jn=Tn-mn||0,ta=An-mn||0,sa;return Tn===void 0?Fn===void 0?sa=0:An===void 0?sa=2*(Fn-mn):sa=(2*Fn-An-mn)*2/3:Fn===void 0?An===void 0?sa=0:sa=(2*mn-Tn-An)*2/3:An===void 0?sa=(2*Fn-Tn-mn)*2/3:sa=Fn+mn-Tn-An,rt(mn+Br.frac*Jn+on.frac*(ta+Br.frac*sa))}if(re){var Qe=0,Fe;try{Fe=new Uint8Array(xe*Se*4)}catch{Fe=new Array(xe*Se*4)}if(re==="best"){var Ce=U||V,pe=Y||G,we=new Array(Ce.length),Ae=new Array(pe.length),Pe=new Array(xe),Ge=U?l:c,We=Y?l:c,tt,ct,St;for(te=0;te<Ce.length;te++)we[te]=Math.round(C.c2p(Ce[te])-j);for(te=0;te<pe.length;te++)Ae[te]=Math.round(S.c2p(pe[te])-ue);for(te=0;te<xe;te++)Pe[te]=Ge(te,we);for(ne=0;ne<Se;ne++)for(tt=We(ne,Ae),ct=k[tt.bin0],St=k[tt.bin1],te=0;te<xe;te++,Qe+=4)ze=lt(ct,St,Pe[te],tt),m(Fe,Qe,ze)}else for(ne=0;ne<ie;ne++)for(Ue=k[ne],Xe=Ye(ne),te=0;te<xe;te++)ze=rt(Ue[te],1),Qe=(Xe*xe+Ve(te))*4,m(Fe,Qe,ze);var Pt=Te.createImageData(xe,Se);try{Pt.data.set(Fe)}catch{var wt=Pt.data,Bt=wt.length;for(ne=0;ne<Bt;ne++)wt[ne]=Fe[ne]}Te.putImageData(Pt,0,0)}else{var Wt=Math.floor(N/2),hr=Math.floor(H/2);for(ne=0;ne<ie;ne++)if(Ue=k[ne],Xe.reverse(),Xe[st]=Ye(ne+1),!(Xe[0]===Xe[1]||Xe[0]===void 0||Xe[1]===void 0))for(Dt=Ve(0),Et=[Dt,Dt],te=0;te<se;te++)Et.reverse(),Et[ht]=Ve(te+1),!(Et[0]===Et[1]||Et[0]===void 0||Et[1]===void 0)&&(et=Ue[te],ze=rt(et,(Et[1]-Et[0])*(Xe[1]-Xe[0])),Te.fillStyle="rgba("+ze.join(",")+")",Te.fillRect(Et[0]+Wt,Xe[0]+hr,Et[1]-Et[0]-N,Xe[1]-Xe[0]-H))}nt=Math.round(nt/it),pt=Math.round(pt/it),Tt=Math.round(Tt/it);var gt=P("rgb("+nt+","+pt+","+Tt+")");M._hmpixcount=(M._hmpixcount||0)+it,M._hmlumcount=(M._hmlumcount||0)+it*gt.getLuminance();var jt=R.selectAll("image").data(o);jt.enter().append("svg:image").attr({xmlns:f.svg,preserveAspectRatio:"none"}),jt.attr({height:Se,width:xe,x:j,y:ue,"xlink:href":Le.toDataURL("image/png")}),E(R);var Ut=O.texttemplate;if(Ut){var or=u(O),ur={type:"linear",range:[or.min,or.max],_separators:C._separators,_numFormat:C._numFormat},dt=O.type==="histogram2dcontour",ut=O.type==="contour",yt=ut?1:0,Lt=ut?ie-1:ie,Rt=ut?1:0,Nt=ut?se-1:se,Vt=[];for(te=yt;te<Lt;te++){var Zt;if(ut)Zt=T.y[te];else if(dt){if(te===0||te===ie-1)continue;Zt=T.y[te]}else if(T.yCenter)Zt=T.yCenter[te];else{if(te+1===ie&&T.y[te+1]===void 0)continue;Zt=(T.y[te]+T.y[te+1])/2}var qt=Math.round(S.c2p(Zt));if(!(0>qt||qt>S._length))for(ne=Rt;ne<Nt;ne++){var Jt;if(ut)Jt=T.x[ne];else if(dt){if(ne===0||ne===se-1)continue;Jt=T.x[ne]}else if(T.xCenter)Jt=T.xCenter[ne];else{if(ne+1===se&&T.x[ne+1]===void 0)continue;Jt=(T.x[ne]+T.x[ne+1])/2}var nr=Math.round(C.c2p(Jt));if(!(0>nr||nr>C._length)){var Mr=r({x:Jt,y:Zt},O,M._fullLayout);Mr.x=Jt,Mr.y=Zt;var Ke=T.z[te][ne];Ke===void 0?(Mr.z="",Mr.zLabel=""):(Mr.z=Ke,Mr.zLabel=x.tickText(ur,Ke,"hover").text);var Ze=T.text&&T.text[te]&&T.text[te][ne];(Ze===void 0||Ze===!1)&&(Ze=""),Mr.text=Ze;var zt=v.texttemplateString(Ut,Mr,M._fullLayout._d3locale,Mr,O._meta||{});if(zt){var kt=zt.split("<br>"),Qt=kt.length,cr=0;for(ve=0;ve<Qt;ve++)cr=Math.max(cr,kt[ve].length);Vt.push({l:Qt,c:cr,t:zt,x:nr,y:qt,z:Ke})}}}}var fr=O.textfont,ir=fr.family,Yt=fr.size,gr=M._fullLayout.font.size;if(!Yt||Yt==="auto"){var yr=1/0,Tr=1/0,pr=0,Kr=0;for(ve=0;ve<Vt.length;ve++){var Or=Vt[ve];if(pr=Math.max(pr,Or.l),Kr=Math.max(Kr,Or.c),ve<Vt.length-1){var Nr=Vt[ve+1],Sn=Math.abs(Nr.x-Or.x),Jr=Math.abs(Nr.y-Or.y);Sn&&(yr=Math.min(yr,Sn)),Jr&&(Tr=Math.min(Tr,Jr))}}!isFinite(yr)||!isFinite(Tr)?Yt=gr:(yr-=N,Tr-=H,yr/=Kr,Tr/=pr,yr/=h/2,Tr/=h,Yt=Math.min(Math.floor(yr),Math.floor(Tr),gr))}if(Yt<=0||!isFinite(Yt))return;var xn=function(Ar){return Ar.x},Dn=function(Ar){return Ar.y-Yt*(Ar.l*h/2-1)},mr=p(R).data(Vt);mr.enter().append("g").classed(b,1).append("text").attr("text-anchor","middle").each(function(Ar){var zr=d.select(this),Br=fr.color;(!Br||Br==="auto")&&(Br=n.contrast("rgba("+De(Ar.z).join()+")")),zr.attr("data-notex",1).call(y.positionText,xn(Ar),Dn(Ar)).call(_.font,ir,Yt,Br).text(Ar.t).call(y.convertToTspans,M)})}})};function c(M,L){var D=L.length-2,A=v.constrain(v.findBin(M,L),0,D),C=L[A],S=L[A+1],o=v.constrain(A+(M-C)/(S-C)-.5,0,D),R=Math.round(o),T=Math.abs(o-R);return!o||o===D||!T?{bin0:R,bin1:R,frac:0}:{bin0:R,frac:T,bin1:Math.round(R+T/(o-R))}}function l(M,L){var D=L.length-1,A=v.constrain(v.findBin(M,L),0,D),C=L[A],S=L[A+1],o=(M-C)/(S-C)||0;return o<=0?{bin0:A,bin1:A,frac:0}:o<.5?{bin0:A,bin1:A+1,frac:o}:{bin0:A+1,bin1:A,frac:1-o}}function m(M,L,D){M[L]=D[0],M[L+1]=D[1],M[L+2]=D[2],M[L+3]=Math.round(D[3]*255)}},70035:function(z,B,e){var d=e(39898);z.exports=function(a){d.select(a).selectAll(".hm image").style("opacity",function(_){return _.trace.opacity})}},49901:function(z){z.exports=function(e,d,P){var a=P("zsmooth");a===!1&&(P("xgap"),P("ygap")),P("zhoverformat")}},67684:function(z,B,e){var d=e(92770),P=e(71828),a=e(73972);z.exports=function(y,r,n,u,i,f){var g=n("z");i=i||"x",f=f||"y";var h,b;if(g===void 0||!g.length)return 0;if(P.isArray1D(y.z)){h=n(i),b=n(f);var p=P.minRowLength(h),E=P.minRowLength(b);if(p===0||E===0)return 0;r._length=Math.min(p,E,g.length)}else{if(h=_(i,n),b=_(f,n),!x(g))return 0;n("transpose"),r._length=null}if(y.type==="heatmapgl")return!0;var c=a.getComponentMethod("calendars","handleTraceDefaults");return c(y,r,[i,f],u),!0};function _(v,y){var r=y(v),n=r?y(v+"type","array"):"scaled";return n==="scaled"&&(y(v+"0"),y("d"+v)),r}function x(v){for(var y=!0,r=!1,n=!1,u,i=0;i<v.length;i++){if(u=v[i],!P.isArrayOrTypedArray(u)){y=!1;break}u.length>0&&(r=!0);for(var f=0;f<u.length;f++)if(d(u[f])){n=!0;break}}return y&&r&&n}},16063:function(z,B,e){for(var d=e(21606),P=e(50693),a=e(1426).extendFlat,_=e(30962).overrideAll,x=["z","x","x0","dx","y","y0","dy","text","transpose","xtype","ytype"],v={},y=0;y<x.length;y++){var r=x[y];v[r]=d[r]}v.zsmooth={valType:"enumerated",values:["fast",!1],dflt:"fast",editType:"calc"},a(v,P("",{cLetter:"z",autoColorDflt:!1})),z.exports=_(v,"calc","nested")},59560:function(z,B,e){var d=e(9330).gl_heatmap2d,P=e(89298),a=e(78614);function _(r,n){this.scene=r,this.uid=n,this.type="heatmapgl",this.name="",this.hoverinfo="all",this.xData=[],this.yData=[],this.zData=[],this.textLabels=[],this.idToIndex=[],this.bounds=[0,0,0,0],this.options={zsmooth:"fast",z:[],x:[],y:[],shape:[0,0],colorLevels:[0],colorValues:[0,0,0,1]},this.heatmap=d(r.glplot,this.options),this.heatmap._trace=this}var x=_.prototype;x.handlePick=function(r){var n=this.options,u=n.shape,i=r.pointId,f=i%u[0],g=Math.floor(i/u[0]),h=i;return{trace:this,dataCoord:r.dataCoord,traceCoord:[n.x[f],n.y[g],n.z[h]],textLabel:this.textLabels[i],name:this.name,pointIndex:[g,f],hoverinfo:this.hoverinfo}},x.update=function(r,n){var u=n[0];this.index=r.index,this.name=r.name,this.hoverinfo=r.hoverinfo;var i=u.z;this.options.z=[].concat.apply([],i);var f=i[0].length,g=i.length;this.options.shape=[f,g],this.options.x=u.x,this.options.y=u.y,this.options.zsmooth=r.zsmooth;var h=v(r);this.options.colorLevels=h.colorLevels,this.options.colorValues=h.colorValues,this.textLabels=[].concat.apply([],r.text),this.heatmap.update(this.options);var b=this.scene.xaxis,p=this.scene.yaxis,E,c;r.zsmooth===!1&&(E={ppad:u.x[1]-u.x[0]},c={ppad:u.y[1]-u.y[0]}),r._extremes[b._id]=P.findExtremes(b,u.x,E),r._extremes[p._id]=P.findExtremes(p,u.y,c)},x.dispose=function(){this.heatmap.dispose()};function v(r){for(var n=r.colorscale,u=r.zmin,i=r.zmax,f=n.length,g=new Array(f),h=new Array(4*f),b=0;b<f;b++){var p=n[b],E=a(p[1]);g[b]=u+p[0]*(i-u);for(var c=0;c<4;c++)h[4*b+c]=E[c]}return{colorLevels:g,colorValues:h}}function y(r,n,u){var i=new _(r,n.uid);return i.update(n,u),i}z.exports=y},19600:function(z,B,e){var d=e(71828),P=e(67684),a=e(1586),_=e(16063);z.exports=function(v,y,r,n){function u(f,g){return d.coerce(v,y,_,f,g)}var i=P(v,y,u,n);if(!i){y.visible=!1;return}u("text"),u("zsmooth"),a(v,y,n,u,{prefix:"",cLetter:"z"})}},3325:function(z,B,e){z.exports={attributes:e(16063),supplyDefaults:e(19600),colorbar:e(61243),calc:e(90757),plot:e(59560),moduleType:"trace",name:"heatmapgl",basePlotModule:e(4796),categories:["gl","gl2d","2dMap"],meta:{}}},7745:function(z,B,e){var d=e(1486),P=e(12663).axisHoverFormat,a=e(5386).f,_=e(5386).s,x=e(41940),v=e(17656),y=e(72406),r=e(1426).extendFlat;z.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:P("x"),yhoverformat:P("y"),text:r({},d.text,{}),hovertext:r({},d.hovertext,{}),orientation:d.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:v("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:v("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:a({},{keys:y.eventDataKeys}),texttemplate:_({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:r({},d.textposition,{arrayOk:!1}),textfont:x({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:x({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:x({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:d.insidetextanchor,textangle:d.textangle,cliponaxis:d.cliponaxis,constraintext:d.constraintext,marker:d.marker,offsetgroup:d.offsetgroup,alignmentgroup:d.alignmentgroup,selected:d.selected,unselected:d.unselected,_deprecated:{bardir:d._deprecated.bardir}}},42174:function(z){z.exports=function(e,d){for(var P=e.length,a=0,_=0;_<P;_++)d[_]?(e[_]/=d[_],a+=e[_]):e[_]=null;return a}},17656:function(z){z.exports=function(e,d){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}},59575:function(z,B,e){var d=e(92770);z.exports={count:function(P,a,_){return _[P]++,1},sum:function(P,a,_,x){var v=x[a];return d(v)?(v=Number(v),_[P]+=v,v):0},avg:function(P,a,_,x,v){var y=x[a];return d(y)&&(y=Number(y),_[P]+=y,v[P]++),0},min:function(P,a,_,x){var v=x[a];if(d(v))if(v=Number(v),d(_[P])){if(_[P]>v){var y=v-_[P];return _[P]=v,y}}else return _[P]=v,v;return 0},max:function(P,a,_,x){var v=x[a];if(d(v))if(v=Number(v),d(_[P])){if(_[P]<v){var y=v-_[P];return _[P]=v,y}}else return _[P]=v,v;return 0}}},40965:function(z,B,e){var d=e(50606),P=d.ONEAVGYEAR,a=d.ONEAVGMONTH,_=d.ONEDAY,x=d.ONEHOUR,v=d.ONEMIN,y=d.ONESEC,r=e(89298).tickIncrement;z.exports=function(h,b,p,E,c){var l=-1.1*b,m=-.1*b,M=h-m,L=p[0],D=p[1],A=Math.min(n(L+m,L+M,E,c),n(D+m,D+M,E,c)),C=Math.min(n(L+l,L+m,E,c),n(D+l,D+m,E,c)),S,o;if(A>C&&C<Math.abs(D-L)/4e3?(S=A,o=!1):(S=Math.min(A,C),o=!0),E.type==="date"&&S>_){var R=S===P?1:6,T=S===P?"M12":"M1";return function(O,N){var H=E.c2d(O,P,c),k=H.indexOf("-",R);k>0&&(H=H.substr(0,k));var V=E.d2c(H,0,c);if(V<O){var G=r(V,T,!1,c);(V+G)/2<O+h&&(V=G)}return N&&o?r(V,T,!0,c):V}}return function(O,N){var H=S*Math.round(O/S);return H+S/10<O&&H+S*.9<O+h&&(H+=S),N&&o&&(H-=S),H}};function n(g,h,b,p){if(g*h<=0)return 1/0;for(var E=Math.abs(h-g),c=b.type==="date",l=u(E,c),m=0;m<10;m++){var M=u(l*80,c);if(l===M)break;if(i(M,g,h,c,b,p))l=M;else break}return l}function u(g,h){return h&&g>y?g>_?g>P*1.1?P:g>a*1.1?a:_:g>x?x:g>v?v:y:Math.pow(10,Math.floor(Math.log(g)/Math.LN10))}function i(g,h,b,p,E,c){if(p&&g>_){var l=f(h,E,c),m=f(b,E,c),M=g===P?0:1;return l[M]!==m[M]}return Math.floor(b/g)-Math.floor(h/g)>.1}function f(g,h,b){var p=h.c2d(g,P,b).split("-");return p[0]===""&&(p.unshift(),p[0]="-"+p[0]),p}},72138:function(z,B,e){var d=e(92770),P=e(71828),a=e(73972),_=e(89298),x=e(75341),v=e(59575),y=e(36362),r=e(42174),n=e(40965);function u(b,p){var E=[],c=[],l=p.orientation==="h",m=_.getFromId(b,l?p.yaxis:p.xaxis),M=l?"y":"x",L={x:"y",y:"x"}[M],D=p[M+"calendar"],A=p.cumulative,C,S=i(b,p,m,M),o=S[0],R=S[1],T=typeof o.size=="string",O=[],N=T?O:o,H=[],k=[],V=[],G=0,U=p.histnorm,Y=p.histfunc,ee=U.indexOf("density")!==-1,re,ie,se;A.enabled&&ee&&(U=U.replace(/ ?density$/,""),ee=!1);var ce=Y==="max"||Y==="min",q=ce?null:0,j=v.count,Z=y[U],Q=!1,ue=function(Ye){return m.r2c(Ye,0,D)},fe;for(P.isArrayOrTypedArray(p[L])&&Y!=="count"&&(fe=p[L],Q=Y==="avg",j=v[Y]),C=ue(o.start),ie=ue(o.end)+(C-_.tickIncrement(C,o.size,!1,D))/1e6;C<ie&&E.length<1e6&&(re=_.tickIncrement(C,o.size,!1,D),E.push((C+re)/2),c.push(q),V.push([]),O.push(C),ee&&H.push(1/(re-C)),Q&&k.push(0),!(re<=C));)C=re;O.push(C),!T&&m.type==="date"&&(N={start:ue(N.start),end:ue(N.end),size:N.size}),b._fullLayout._roundFnOpts||(b._fullLayout._roundFnOpts={});var te=p["_"+M+"bingroup"],ne={leftGap:1/0,rightGap:1/0};te&&(b._fullLayout._roundFnOpts[te]||(b._fullLayout._roundFnOpts[te]=ne),ne=b._fullLayout._roundFnOpts[te]);var ve=c.length,le=!0,xe=ne.leftGap,Se=ne.rightGap,Re={};for(C=0;C<R.length;C++){var Ee=R[C];se=P.findBin(Ee,N),se>=0&&se<ve&&(G+=j(se,C,c,fe,k),le&&V[se].length&&Ee!==R[V[se][0]]&&(le=!1),V[se].push(C),Re[C]=se,xe=Math.min(xe,Ee-O[se]),Se=Math.min(Se,O[se+1]-Ee))}ne.leftGap=xe,ne.rightGap=Se;var Oe;le||(Oe=function(Ye,Ne){return function(){var Xe=b._fullLayout._roundFnOpts[te];return n(Xe.leftGap,Xe.rightGap,O,m,D)(Ye,Ne)}}),Q&&(G=r(c,k)),Z&&Z(c,G,H),A.enabled&&h(c,A.direction,A.currentbin);var Be=Math.min(E.length,c.length),Le=[],Te=0,De=Be-1;for(C=0;C<Be;C++)if(c[C]){Te=C;break}for(C=Be-1;C>=Te;C--)if(c[C]){De=C;break}for(C=Te;C<=De;C++)if(d(E[C])&&d(c[C])){var Ve={p:E[C],s:c[C],b:0};A.enabled||(Ve.pts=V[C],le?Ve.ph0=Ve.ph1=V[C].length?R[V[C][0]]:E[C]:(p._computePh=!0,Ve.ph0=Oe(O[C]),Ve.ph1=Oe(O[C+1],!0))),Le.push(Ve)}return Le.length===1&&(Le[0].width1=_.tickIncrement(Le[0].p,o.size,!1,D)-Le[0].p),x(Le,p),P.isArrayOrTypedArray(p.selectedpoints)&&P.tagSelected(Le,p,Re),Le}function i(b,p,E,c,l){var m=c+"bins",M=b._fullLayout,L=p["_"+c+"bingroup"],D=M._histogramBinOpts[L],A=M.barmode==="overlay",C,S,o,R,T,O,N,H=function(Ee){return E.r2c(Ee,0,R)},k=function(Ee){return E.c2r(Ee,0,R)},V=E.type==="date"?function(Ee){return Ee||Ee===0?P.cleanDate(Ee,null,R):null}:function(Ee){return d(Ee)?Number(Ee):null};function G(Ee,Oe,Be){Oe[Ee+"Found"]?(Oe[Ee]=V(Oe[Ee]),Oe[Ee]===null&&(Oe[Ee]=Be[Ee])):(O[Ee]=Oe[Ee]=Be[Ee],P.nestedProperty(S[0],m+"."+Ee).set(Be[Ee]))}if(p["_"+c+"autoBinFinished"])delete p["_"+c+"autoBinFinished"];else{S=D.traces;var U=[],Y=!0,ee=!1,re=!1;for(C=0;C<S.length;C++)if(o=S[C],o.visible){var ie=D.dirs[C];T=o["_"+ie+"pos0"]=E.makeCalcdata(o,ie),U=P.concat(U,T),delete o["_"+c+"autoBinFinished"],p.visible===!0&&(Y?Y=!1:(delete o._autoBin,o["_"+c+"autoBinFinished"]=1),a.traceIs(o,"2dMap")&&(ee=!0),o.type==="histogram2dcontour"&&(re=!0))}R=S[0][c+"calendar"];var se=_.autoBin(U,E,D.nbins,ee,R,D.sizeFound&&D.size),ce=S[0]._autoBin={};if(O=ce[D.dirs[0]]={},re&&(D.size||(se.start=k(_.tickIncrement(H(se.start),se.size,!0,R))),D.end===void 0&&(se.end=k(_.tickIncrement(H(se.end),se.size,!1,R)))),A&&!a.traceIs(p,"2dMap")&&se._dataSpan===0&&E.type!=="category"&&E.type!=="multicategory"){if(l)return[se,T,!0];se=f(b,p,E,c,m)}N=o.cumulative||{},N.enabled&&N.currentbin!=="include"&&(N.direction==="decreasing"?se.start=k(_.tickIncrement(H(se.start),se.size,!0,R)):se.end=k(_.tickIncrement(H(se.end),se.size,!1,R))),D.size=se.size,D.sizeFound||(O.size=se.size,P.nestedProperty(S[0],m+".size").set(se.size)),G("start",D,se),G("end",D,se)}T=p["_"+c+"pos0"],delete p["_"+c+"pos0"];var q=p._input[m]||{},j=P.extendFlat({},D),Z=D.start,Q=E.r2l(q.start),ue=Q!==void 0;if((D.startFound||ue)&&Q!==E.r2l(Z)){var fe=ue?Q:P.aggNums(Math.min,null,T),te={type:E.type==="category"||E.type==="multicategory"?"linear":E.type,r2l:E.r2l,dtick:D.size,tick0:Z,calendar:R,range:[fe,_.tickIncrement(fe,D.size,!1,R)].map(E.l2r)},ne=_.tickFirst(te);ne>E.r2l(fe)&&(ne=_.tickIncrement(ne,D.size,!0,R)),j.start=E.l2r(ne),ue||P.nestedProperty(p,m+".start").set(j.start)}var ve=D.end,le=E.r2l(q.end),xe=le!==void 0;if((D.endFound||xe)&&le!==E.r2l(ve)){var Se=xe?le:P.aggNums(Math.max,null,T);j.end=E.l2r(Se),xe||P.nestedProperty(p,m+".start").set(j.end)}var Re="autobin"+c;return p._input[Re]===!1&&(p._input[m]=P.extendFlat({},p[m]||{}),delete p._input[Re],delete p[Re]),[j,T]}function f(b,p,E,c,l){var m=b._fullLayout,M=g(b,p),L=!1,D=1/0,A=[p],C,S,o;for(C=0;C<M.length;C++)if(S=M[C],S===p)L=!0;else if(!L)o=m._histogramBinOpts[S["_"+c+"bingroup"]],D=Math.min(D,o.size||S[l].size);else{var R=i(b,S,E,c,!0),T=R[0],O=R[2];S["_"+c+"autoBinFinished"]=1,S["_"+c+"pos0"]=R[1],O?A.push(S):D=Math.min(D,T.size)}var N=new Array(A.length);for(C=0;C<A.length;C++)for(var H=A[C]["_"+c+"pos0"],k=0;k<H.length;k++)if(H[k]!==void 0){N[C]=H[k];break}for(isFinite(D)||(D=P.distinctVals(N).minDiff),C=0;C<A.length;C++){S=A[C];var V=S[c+"calendar"],G={start:E.c2r(N[C]-D/2,0,V),end:E.c2r(N[C]+D/2,0,V),size:D};S._input[l]=S[l]=G,o=m._histogramBinOpts[S["_"+c+"bingroup"]],o&&P.extendFlat(o,G)}return p[l]}function g(b,p){for(var E=p.xaxis,c=p.yaxis,l=p.orientation,m=[],M=b._fullData,L=0;L<M.length;L++){var D=M[L];D.type==="histogram"&&D.visible===!0&&D.orientation===l&&D.xaxis===E&&D.yaxis===c&&m.push(D)}return m}function h(b,p,E){var c,l,m;function M(D){m=b[D],b[D]/=2}function L(D){l=b[D],b[D]=m+l/2,m+=l}if(E==="half")if(p==="increasing")for(M(0),c=1;c<b.length;c++)L(c);else for(M(b.length-1),c=b.length-2;c>=0;c--)L(c);else if(p==="increasing"){for(c=1;c<b.length;c++)b[c]+=b[c-1];E==="exclude"&&(b.unshift(0),b.pop())}else{for(c=b.length-2;c>=0;c--)b[c]+=b[c+1];E==="exclude"&&(b.push(0),b.shift())}}z.exports={calc:u,calcAllAutoBins:i}},72406:function(z){z.exports={eventDataKeys:["binNumber"]}},82222:function(z,B,e){var d=e(71828),P=e(41675),a=e(73972).traceIs,_=e(26125),x=d.nestedProperty,v=e(99082).getAxisGroup,y=[{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"}],r=["x","y"];z.exports=function(u,i){var f=i._histogramBinOpts={},g=[],h={},b=[],p,E,c,l,m,M,L;function D(re,ie){return d.coerce(p._input,p,p._module.attributes,re,ie)}function A(re){return re.orientation==="v"?"x":"y"}function C(re,ie){var se=P.getFromTrace({_fullLayout:i},re,ie);return se.type}function S(re,ie,se){var ce=re.uid+"__"+se;ie||(ie=ce);var q=C(re,se),j=re[se+"calendar"]||"",Z=f[ie],Q=!0;Z&&(q===Z.axType&&j===Z.calendar?(Q=!1,Z.traces.push(re),Z.dirs.push(se)):(ie=ce,q!==Z.axType&&d.warn(["Attempted to group the bins of trace",re.index,"set on a","type:"+q,"axis","with bins on","type:"+Z.axType,"axis."].join(" ")),j!==Z.calendar&&d.warn(["Attempted to group the bins of trace",re.index,"set with a",j,"calendar","with bins",Z.calendar?"on a "+Z.calendar+" calendar":"w/o a set calendar"].join(" ")))),Q&&(f[ie]={traces:[re],dirs:[se],axType:q,calendar:re[se+"calendar"]||""}),re["_"+se+"bingroup"]=ie}for(m=0;m<u.length;m++)p=u[m],a(p,"histogram")&&(g.push(p),delete p._xautoBinFinished,delete p._yautoBinFinished,a(p,"2dMap")||_(p._input,p,i,D));var o=i._alignmentOpts||{};for(m=0;m<g.length;m++){if(p=g[m],c="",!a(p,"2dMap")){if(l=A(p),i.barmode==="group"&&p.alignmentgroup){var R=p[l+"axis"],T=v(i,R)+p.orientation;(o[T]||{})[p.alignmentgroup]&&(c=T)}!c&&i.barmode!=="overlay"&&(c=v(i,p.xaxis)+v(i,p.yaxis)+A(p))}c?(h[c]||(h[c]=[]),h[c].push(p)):b.push(p)}for(c in h){if(E=h[c],E.length===1){b.push(E[0]);continue}var O=!1;for(E.length&&(p=E[0],O=D("bingroup")),c=O||c,m=0;m<E.length;m++){p=E[m];var N=p._input.bingroup;N&&N!==c&&d.warn(["Trace",p.index,"must match","within bingroup",c+".","Ignoring its bingroup:",N,"setting."].join(" ")),p.bingroup=c,S(p,c,A(p))}}for(m=0;m<b.length;m++){p=b[m];var H=D("bingroup");if(a(p,"2dMap"))for(L=0;L<2;L++){l=r[L];var k=D(l+"bingroup",H?H+"__"+l:null);S(p,k,l)}else S(p,H,A(p))}for(c in f){var V=f[c];for(E=V.traces,M=0;M<y.length;M++){var G=y[M],U=G.name,Y,ee;if(!(U==="nbins"&&V.sizeFound)){for(m=0;m<E.length;m++){if(p=E[m],l=V.dirs[m],Y=G.aStr[l],x(p._input,Y).get()!==void 0){V[U]=D(Y),V[U+"Found"]=!0;break}ee=(p._autoBin||{})[l]||{},ee[U]&&x(p,Y).set(ee[U])}if(U==="start"||U==="end")for(;m<E.length;m++)p=E[m],p["_"+l+"bingroup"]&&(ee=(p._autoBin||{})[l]||{},D(Y,ee[U]));U==="nbins"&&!V.sizeFound&&!V.nbinsFound&&(p=E[0],V[U]=D(Y))}}}}},11385:function(z,B,e){var d=e(73972),P=e(71828),a=e(7901),_=e(90769).handleText,x=e(98340),v=e(7745);z.exports=function(r,n,u,i){function f(C,S){return P.coerce(r,n,v,C,S)}var g=f("x"),h=f("y"),b=f("cumulative.enabled");b&&(f("cumulative.direction"),f("cumulative.currentbin")),f("text");var p=f("textposition");_(r,n,i,f,p,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),f("hovertext"),f("hovertemplate"),f("xhoverformat"),f("yhoverformat");var E=f("orientation",h&&!g?"h":"v"),c=E==="v"?"x":"y",l=E==="v"?"y":"x",m=g&&h?Math.min(P.minRowLength(g)&&P.minRowLength(h)):P.minRowLength(n[c]||[]);if(!m){n.visible=!1;return}n._length=m;var M=d.getComponentMethod("calendars","handleTraceDefaults");M(r,n,["x","y"],i);var L=n[l];L&&f("histfunc"),f("histnorm"),f("autobin"+c),x(r,n,f,u,i),P.coerceSelectionMarkerOpacity(n,f);var D=(n.marker.line||{}).color,A=d.getComponentMethod("errorbars","supplyDefaults");A(r,n,D||a.defaultLine,{axis:"y"}),A(r,n,D||a.defaultLine,{axis:"x",inherit:"y"})}},84402:function(z){z.exports=function(e,d,P,a,_){if(e.x="xVal"in d?d.xVal:d.x,e.y="yVal"in d?d.yVal:d.y,"zLabelVal"in d&&(e.z=d.zLabelVal),d.xa&&(e.xaxis=d.xa),d.ya&&(e.yaxis=d.ya),!(P.cumulative||{}).enabled){var x=Array.isArray(_)?a[0].pts[_[0]][_[1]]:a[_].pts;e.pointNumbers=x,e.binNumber=e.pointNumber,delete e.pointNumber,delete e.pointIndex;var v;if(P._indexToPoints){v=[];for(var y=0;y<x.length;y++)v=v.concat(P._indexToPoints[x[y]])}else v=x;e.pointIndices=v}return e}},76440:function(z,B,e){var d=e(95423).hoverPoints,P=e(89298).hoverLabelText;z.exports=function(_,x,v,y,r){var n=d(_,x,v,y,r);if(n){_=n[0];var u=_.cd[_.index],i=_.cd[0].trace;if(!i.cumulative.enabled){var f=i.orientation==="h"?"y":"x";_[f+"Label"]=P(_[f+"a"],[u.ph0,u.ph1],i[f+"hoverformat"])}return n}}},36071:function(z,B,e){z.exports={attributes:e(7745),layoutAttributes:e(43641),supplyDefaults:e(11385),crossTraceDefaults:e(82222),supplyLayoutDefaults:e(13957),calc:e(72138).calc,crossTraceCalc:e(11661).crossTraceCalc,plot:e(17295).plot,layerName:"barlayer",style:e(16688).style,styleOnSelect:e(16688).styleOnSelect,colorbar:e(4898),hoverPoints:e(76440),selectPoints:e(81974),eventData:e(84402),moduleType:"trace",name:"histogram",basePlotModule:e(93612),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}},36362:function(z){z.exports={percent:function(B,e){for(var d=B.length,P=100/e,a=0;a<d;a++)B[a]*=P},probability:function(B,e){for(var d=B.length,P=0;P<d;P++)B[P]/=e},density:function(B,e,d,P){var a=B.length;P=P||1;for(var _=0;_<a;_++)B[_]*=d[_]*P},"probability density":function(B,e,d,P){var a=B.length;P&&(e/=P);for(var _=0;_<a;_++)B[_]*=d[_]/e}}},35361:function(z,B,e){var d=e(7745),P=e(17656),a=e(21606),_=e(9012),x=e(12663).axisHoverFormat,v=e(5386).f,y=e(5386).s,r=e(50693),n=e(1426).extendFlat;z.exports=n({x:d.x,y:d.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:d.histnorm,histfunc:d.histfunc,nbinsx:d.nbinsx,xbins:P("x"),nbinsy:d.nbinsy,ybins:P("y"),autobinx:d.autobinx,autobiny:d.autobiny,bingroup:n({},d.bingroup,{}),xbingroup:n({},d.bingroup,{}),ybingroup:n({},d.bingroup,{}),xgap:a.xgap,ygap:a.ygap,zsmooth:a.zsmooth,xhoverformat:x("x"),yhoverformat:x("y"),zhoverformat:x("z",1),hovertemplate:v({},{keys:"z"}),texttemplate:y({arrayOk:!1,editType:"plot"},{keys:"z"}),textfont:a.textfont,showlegend:n({},_.showlegend,{dflt:!1})},r("",{cLetter:"z",autoColorDflt:!1}))},17562:function(z,B,e){var d=e(71828),P=e(89298),a=e(59575),_=e(36362),x=e(42174),v=e(40965),y=e(72138).calcAllAutoBins;z.exports=function(f,g){var h=P.getFromId(f,g.xaxis),b=P.getFromId(f,g.yaxis),p=g.xcalendar,E=g.ycalendar,c=function(Qe){return h.r2c(Qe,0,p)},l=function(Qe){return b.r2c(Qe,0,E)},m=function(Qe){return h.c2r(Qe,0,p)},M=function(Qe){return b.c2r(Qe,0,E)},L,D,A,C,S=y(f,g,h,"x"),o=S[0],R=S[1],T=y(f,g,b,"y"),O=T[0],N=T[1],H=g._length;R.length>H&&R.splice(H,R.length-H),N.length>H&&N.splice(H,N.length-H);var k=[],V=[],G=[],U=typeof o.size=="string",Y=typeof O.size=="string",ee=[],re=[],ie=U?ee:o,se=Y?re:O,ce=0,q=[],j=[],Z=g.histnorm,Q=g.histfunc,ue=Z.indexOf("density")!==-1,fe=Q==="max"||Q==="min",te=fe?null:0,ne=a.count,ve=_[Z],le=!1,xe=[],Se=[],Re="z"in g?g.z:"marker"in g&&Array.isArray(g.marker.color)?g.marker.color:"";Re&&Q!=="count"&&(le=Q==="avg",ne=a[Q]);var Ee=o.size,Oe=c(o.start),Be=c(o.end)+(Oe-P.tickIncrement(Oe,Ee,!1,p))/1e6;for(L=Oe;L<Be;L=P.tickIncrement(L,Ee,!1,p))V.push(te),ee.push(L),le&&G.push(0);ee.push(L);var Le=V.length,Te=(L-Oe)/Le,De=m(Oe+Te/2),Ve=O.size,Ye=l(O.start),Ne=l(O.end)+(Ye-P.tickIncrement(Ye,Ve,!1,E))/1e6;for(L=Ye;L<Ne;L=P.tickIncrement(L,Ve,!1,E)){k.push(V.slice()),re.push(L);var Xe=new Array(Le);for(D=0;D<Le;D++)Xe[D]=[];j.push(Xe),le&&q.push(G.slice())}re.push(L);var ht=k.length,st=(L-Ye)/ht,it=M(Ye+st/2);ue&&(xe=r(V.length,ie,Te,U),Se=r(k.length,se,st,Y)),!U&&h.type==="date"&&(ie=n(c,ie)),!Y&&b.type==="date"&&(se=n(l,se));var nt=!0,pt=!0,Tt=new Array(Le),Et=new Array(ht),Dt=1/0,et=1/0,Ue=1/0,ze=1/0;for(L=0;L<H;L++){var rt=R[L],lt=N[L];A=d.findBin(rt,ie),C=d.findBin(lt,se),A>=0&&A<Le&&C>=0&&C<ht&&(ce+=ne(A,L,k[C],Re,q[C]),j[C][A].push(L),nt&&(Tt[A]===void 0?Tt[A]=rt:Tt[A]!==rt&&(nt=!1)),pt&&(Et[C]===void 0?Et[C]=lt:Et[C]!==lt&&(pt=!1)),Dt=Math.min(Dt,rt-ee[A]),et=Math.min(et,ee[A+1]-rt),Ue=Math.min(Ue,lt-re[C]),ze=Math.min(ze,re[C+1]-lt))}if(le)for(C=0;C<ht;C++)ce+=x(k[C],q[C]);if(ve)for(C=0;C<ht;C++)ve(k[C],ce,xe,Se[C]);return{x:R,xRanges:u(ee,nt&&Tt,Dt,et,h,p),x0:De,dx:Te,y:N,yRanges:u(re,pt&&Et,Ue,ze,b,E),y0:it,dy:st,z:k,pts:j}};function r(i,f,g,h){var b=new Array(i),p;if(h)for(p=0;p<i;p++)b[p]=1/(f[p+1]-f[p]);else{var E=1/g;for(p=0;p<i;p++)b[p]=E}return b}function n(i,f){return{start:i(f.start),end:i(f.end),size:f.size}}function u(i,f,g,h,b,p){var E,c=i.length-1,l=new Array(c),m=v(g,h,i,b,p);for(E=0;E<c;E++){var M=(f||[])[E];l[E]=M===void 0?[m(i[E]),m(i[E+1],!0)]:[M,M]}return l}},93888:function(z,B,e){var d=e(71828),P=e(75238),a=e(49901),_=e(1586),x=e(58623),v=e(35361);z.exports=function(r,n,u,i){function f(g,h){return d.coerce(r,n,v,g,h)}P(r,n,f,i),n.visible!==!1&&(a(r,n,f,i),_(r,n,i,f,{prefix:"",cLetter:"z"}),f("hovertemplate"),x(f,i),f("xhoverformat"),f("yhoverformat"))}},76128:function(z,B,e){var d=e(46248),P=e(89298).hoverLabelText;z.exports=function(_,x,v,y,r){var n=d(_,x,v,y,r);if(n){_=n[0];var u=_.index,i=u[0],f=u[1],g=_.cd[0],h=g.trace,b=g.xRanges[f],p=g.yRanges[i];return _.xLabel=P(_.xa,[b[0],b[1]],h.xhoverformat),_.yLabel=P(_.ya,[p[0],p[1]],h.yhoverformat),n}}},43905:function(z,B,e){z.exports={attributes:e(35361),supplyDefaults:e(93888),crossTraceDefaults:e(82222),calc:e(90757),plot:e(50347),layerName:"heatmaplayer",colorbar:e(61243),style:e(70035),hoverPoints:e(76128),eventData:e(84402),moduleType:"trace",name:"histogram2d",basePlotModule:e(93612),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}},75238:function(z,B,e){var d=e(73972),P=e(71828);z.exports=function(_,x,v,y){var r=v("x"),n=v("y"),u=P.minRowLength(r),i=P.minRowLength(n);if(!u||!i){x.visible=!1;return}x._length=Math.min(u,i);var f=d.getComponentMethod("calendars","handleTraceDefaults");f(_,x,["x","y"],y);var g=v("z")||v("marker.color");g&&v("histfunc"),v("histnorm"),v("autobinx"),v("autobiny")}},99066:function(z,B,e){var d=e(35361),P=e(70600),a=e(50693),_=e(12663).axisHoverFormat,x=e(1426).extendFlat;z.exports=x({x:d.x,y:d.y,z:d.z,marker:d.marker,histnorm:d.histnorm,histfunc:d.histfunc,nbinsx:d.nbinsx,xbins:d.xbins,nbinsy:d.nbinsy,ybins:d.ybins,autobinx:d.autobinx,autobiny:d.autobiny,bingroup:d.bingroup,xbingroup:d.xbingroup,ybingroup:d.ybingroup,autocontour:P.autocontour,ncontours:P.ncontours,contours:P.contours,line:{color:P.line.color,width:x({},P.line.width,{dflt:.5}),dash:P.line.dash,smoothing:P.line.smoothing,editType:"plot"},xhoverformat:_("x"),yhoverformat:_("y"),zhoverformat:_("z",1),hovertemplate:d.hovertemplate,texttemplate:P.texttemplate,textfont:P.textfont},a("",{cLetter:"z",editTypeOverride:"calc"}))},62654:function(z,B,e){var d=e(71828),P=e(75238),a=e(67217),_=e(8724),x=e(58623),v=e(99066);z.exports=function(r,n,u,i){function f(h,b){return d.coerce(r,n,v,h,b)}function g(h){return d.coerce2(r,n,v,h)}P(r,n,f,i),n.visible!==!1&&(a(r,n,f,g),_(r,n,f,i),f("xhoverformat"),f("yhoverformat"),f("hovertemplate"),n.contours&&n.contours.coloring==="heatmap"&&x(f,i))}},35902:function(z,B,e){z.exports={attributes:e(99066),supplyDefaults:e(62654),crossTraceDefaults:e(82222),calc:e(27529),plot:e(29854).plot,layerName:"contourlayer",style:e(84426),colorbar:e(90654),hoverPoints:e(52421),moduleType:"trace",name:"histogram2dcontour",basePlotModule:e(93612),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}},46291:function(z,B,e){var d=e(5386).f,P=e(5386).s,a=e(50693),_=e(27670).Y,x=e(34e3),v=e(57564),y=e(45802),r=e(43473),n=e(1426).extendFlat;z.exports={labels:v.labels,parents:v.parents,values:v.values,branchvalues:v.branchvalues,count:v.count,level:v.level,maxdepth:v.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:y.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:n({colors:v.marker.colors,line:v.marker.line,editType:"calc"},a("marker",{colorAttr:"colors",anim:!1})),leaf:v.leaf,pathbar:y.pathbar,text:x.text,textinfo:v.textinfo,texttemplate:P({editType:"plot"},{keys:r.eventDataKeys.concat(["label","value"])}),hovertext:x.hovertext,hoverinfo:v.hoverinfo,hovertemplate:d({},{keys:r.eventDataKeys}),textfont:x.textfont,insidetextfont:x.insidetextfont,outsidetextfont:y.outsidetextfont,textposition:y.textposition,sort:x.sort,root:v.root,domain:_({name:"icicle",trace:!0,editType:"calc"})}},96346:function(z,B,e){var d=e(74875);B.name="icicle",B.plot=function(P,a,_,x){d.plotBasePlot(B.name,P,a,_,x)},B.clean=function(P,a,_,x){d.cleanBasePlot(B.name,P,a,_,x)}},46584:function(z,B,e){var d=e(52147);B.y=function(P,a){return d.calc(P,a)},B.T=function(P){return d._runCrossTraceCalc("icicle",P)}},56524:function(z,B,e){var d=e(71828),P=e(46291),a=e(7901),_=e(27670).c,x=e(90769).handleText,v=e(97313).TEXTPAD,y=e(21081),r=y.hasColorscale,n=y.handleDefaults;z.exports=function(i,f,g,h){function b(A,C){return d.coerce(i,f,P,A,C)}var p=b("labels"),E=b("parents");if(!p||!p.length||!E||!E.length){f.visible=!1;return}var c=b("values");c&&c.length?b("branchvalues"):b("count"),b("level"),b("maxdepth"),b("tiling.orientation"),b("tiling.flip"),b("tiling.pad");var l=b("text");b("texttemplate"),f.texttemplate||b("textinfo",Array.isArray(l)?"text+label":"label"),b("hovertext"),b("hovertemplate");var m=b("pathbar.visible"),M="auto";x(i,f,h,b,M,{hasPathbar:m,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),b("textposition");var L=b("marker.line.width");L&&b("marker.line.color",h.paper_bgcolor),b("marker.colors");var D=f._hasColorscale=r(i,"marker","colors")||(i.marker||{}).coloraxis;D&&n(i,f,h,b,{prefix:"marker.",cLetter:"c"}),b("leaf.opacity",D?1:.7),f._hovered={marker:{line:{width:2,color:a.contrast(h.paper_bgcolor)}}},m&&(b("pathbar.thickness",f.pathbar.textfont.size+2*v),b("pathbar.side"),b("pathbar.edgeshape")),b("sort"),b("root.color"),_(f,h,b),f._length=null}},90666:function(z,B,e){var d=e(39898),P=e(71828),a=e(91424),_=e(63893),x=e(21538),v=e(82454).styleOne,y=e(43473),r=e(2791),n=e(83523),u=e(24714).formatSliceLabel,i=!1;z.exports=function(g,h,b,p,E){var c=E.width,l=E.height,m=E.viewX,M=E.viewY,L=E.pathSlice,D=E.toMoveInsideSlice,A=E.strTransform,C=E.hasTransition,S=E.handleSlicesExit,o=E.makeUpdateSliceInterpolator,R=E.makeUpdateTextInterpolator,T=E.prevEntry,O={},N=g._context.staticPlot,H=g._fullLayout,k=h[0],V=k.trace,G=V.textposition.indexOf("left")!==-1,U=V.textposition.indexOf("right")!==-1,Y=V.textposition.indexOf("bottom")!==-1,ee=x(b,[c,l],{flipX:V.tiling.flip.indexOf("x")>-1,flipY:V.tiling.flip.indexOf("y")>-1,orientation:V.tiling.orientation,pad:{inner:V.tiling.pad},maxDepth:V._maxDepth}),re=ee.descendants(),ie=1/0,se=-1/0;re.forEach(function(Q){var ue=Q.depth;ue>=V._maxDepth?(Q.x0=Q.x1=(Q.x0+Q.x1)/2,Q.y0=Q.y1=(Q.y0+Q.y1)/2):(ie=Math.min(ie,ue),se=Math.max(se,ue))}),p=p.data(re,r.getPtId),V._maxVisibleLayers=isFinite(se)?se-ie+1:0,p.enter().append("g").classed("slice",!0),S(p,i,O,[c,l],L),p.order();var ce=null;if(C&&T){var q=r.getPtId(T);p.each(function(Q){ce===null&&r.getPtId(Q)===q&&(ce={x0:Q.x0,x1:Q.x1,y0:Q.y0,y1:Q.y1})})}var j=function(){return ce||{x0:0,x1:c,y0:0,y1:l}},Z=p;return C&&(Z=Z.transition().each("end",function(){var Q=d.select(this);r.setSliceCursor(Q,g,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),Z.each(function(Q){Q._x0=m(Q.x0),Q._x1=m(Q.x1),Q._y0=M(Q.y0),Q._y1=M(Q.y1),Q._hoverX=m(Q.x1-V.tiling.pad),Q._hoverY=M(Y?Q.y1-V.tiling.pad/2:Q.y0+V.tiling.pad/2);var ue=d.select(this),fe=P.ensureSingle(ue,"path","surface",function(le){le.style("pointer-events",N?"none":"all")});C?fe.transition().attrTween("d",function(le){var xe=o(le,i,j(),[c,l],{orientation:V.tiling.orientation,flipX:V.tiling.flip.indexOf("x")>-1,flipY:V.tiling.flip.indexOf("y")>-1});return function(Se){return L(xe(Se))}}):fe.attr("d",L),ue.call(n,b,g,h,{styleOne:v,eventDataKeys:y.eventDataKeys,transitionTime:y.CLICK_TRANSITION_TIME,transitionEasing:y.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,g,{isTransitioning:g._transitioning}),fe.call(v,Q,V,{hovered:!1}),Q.x0===Q.x1||Q.y0===Q.y1?Q._text="":Q._text=u(Q,b,V,h,H)||"";var te=P.ensureSingle(ue,"g","slicetext"),ne=P.ensureSingle(te,"text","",function(le){le.attr("data-notex",1)}),ve=P.ensureUniformFontSize(g,r.determineTextFont(V,Q,H.font));ne.text(Q._text||" ").classed("slicetext",!0).attr("text-anchor",U?"end":G?"start":"middle").call(a.font,ve).call(_.convertToTspans,g),Q.textBB=a.bBox(ne.node()),Q.transform=D(Q,{fontSize:ve.size}),Q.transform.fontSize=ve.size,C?ne.transition().attrTween("transform",function(le){var xe=R(le,i,j(),[c,l]);return function(Se){return A(xe(Se))}}):ne.attr("transform",A(Q))}),ce}},69816:function(z,B,e){z.exports={moduleType:"trace",name:"icicle",basePlotModule:e(96346),categories:[],animatable:!0,attributes:e(46291),layoutAttributes:e(92894),supplyDefaults:e(56524),supplyLayoutDefaults:e(21070),calc:e(46584).y,crossTraceCalc:e(46584).T,plot:e(85596),style:e(82454).style,colorbar:e(4898),meta:{}}},92894:function(z){z.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},21070:function(z,B,e){var d=e(71828),P=e(92894);z.exports=function(_,x){function v(y,r){return d.coerce(_,x,P,y,r)}v("iciclecolorway",x.colorway),v("extendiciclecolors")}},21538:function(z,B,e){var d=e(674),P=e(14102);z.exports=function(_,x,v){var y=v.flipX,r=v.flipY,n=v.orientation==="h",u=v.maxDepth,i=x[0],f=x[1];u&&(i=(_.height+1)*x[0]/Math.min(_.height+1,u),f=(_.height+1)*x[1]/Math.min(_.height+1,u));var g=d.partition().padding(v.pad.inner).size(n?[x[1],i]:[x[0],f])(_);return(n||y||r)&&P(g,x,{swapXY:n,flipX:y,flipY:r}),g}},85596:function(z,B,e){var d=e(80694),P=e(90666);z.exports=function(_,x,v,y){return d(_,x,v,y,{type:"icicle",drawDescendants:P})}},82454:function(z,B,e){var d=e(39898),P=e(7901),a=e(71828),_=e(72597).resizeText;function x(y){var r=y._fullLayout._iciclelayer.selectAll(".trace");_(y,r,"icicle"),r.each(function(n){var u=d.select(this),i=n[0],f=i.trace;u.style("opacity",f.opacity),u.selectAll("path.surface").each(function(g){d.select(this).call(v,g,f)})})}function v(y,r,n){var u=r.data.data,i=!r.children,f=u.i,g=a.castOption(n,f,"marker.line.color")||P.defaultLine,h=a.castOption(n,f,"marker.line.width")||0;y.style("stroke-width",h).call(P.fill,u.color).call(P.stroke,g).style("opacity",i?n.leaf.opacity:null)}z.exports={style:x,styleOne:v}},17230:function(z,B,e){for(var d=e(9012),P=e(5386).f,a=e(1426).extendFlat,_=e(51877).colormodel,x=["rgb","rgba","rgba256","hsl","hsla"],v=[],y=[],r=0;r<x.length;r++){var n=_[x[r]];v.push("For the `"+x[r]+"` colormodel, it is ["+(n.zminDflt||n.min).join(", ")+"]."),y.push("For the `"+x[r]+"` colormodel, it is ["+(n.zmaxDflt||n.max).join(", ")+"].")}z.exports=a({source:{valType:"string",editType:"calc"},z:{valType:"data_array",editType:"calc"},colormodel:{valType:"enumerated",values:x,editType:"calc"},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot"},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc"},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc"},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dx:{valType:"number",dflt:1,editType:"calc"},dy:{valType:"number",dflt:1,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"data_array",editType:"plot"},hoverinfo:a({},d.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:P({},{keys:["z","color","colormodel"]}),transforms:void 0})},71113:function(z,B,e){var d=e(71828),P=e(51877),a=e(92770),_=e(89298),x=e(71828).maxRowLength,v=e(67395).A;z.exports=function(i,f){var g,h;if(f._hasZ)g=f.z.length,h=x(f.z);else if(f._hasSource){var b=v(f.source);g=b.height,h=b.width}var p=_.getFromId(i,f.xaxis||"x"),E=_.getFromId(i,f.yaxis||"y"),c=p.d2c(f.x0)-f.dx/2,l=E.d2c(f.y0)-f.dy/2,m,M=[c,c+h*f.dx],L=[l,l+g*f.dy];if(p&&p.type==="log")for(m=0;m<h;m++)M.push(c+m*f.dx);if(E&&E.type==="log")for(m=0;m<g;m++)L.push(l+m*f.dy);f._extremes[p._id]=_.findExtremes(p,M),f._extremes[E._id]=_.findExtremes(E,L),f._scaler=n(f);var D={x0:c,y0:l,z:f.z,w:h,h:g};return[D]};function y(u,i,f,g){return function(h){return d.constrain((h-u)*i,f,g)}}function r(u,i){return function(f){return d.constrain(f,u,i)}}function n(u){var i=P.colormodel[u.colormodel],f=i.colormodel||u.colormodel,g=f.length;u._sArray=[];for(var h=0;h<g;h++)i.min[h]!==u.zmin[h]||i.max[h]!==u.zmax[h]?u._sArray.push(y(u.zmin[h],(i.max[h]-i.min[h])/(u.zmax[h]-u.zmin[h]),i.min[h],i.max[h])):u._sArray.push(r(i.min[h],i.max[h]));return function(b){for(var p=b.slice(0,g),E=0;E<g;E++){var c=p[E];if(!a(c))return!1;p[E]=u._sArray[E](c)}return p}}},51877:function(z){z.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(B){return B.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(B){return B.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(B){return B.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(B){var e=B.slice(0,3);return e[1]=e[1]+"%",e[2]=e[2]+"%",e},suffix:["°","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(B){var e=B.slice(0,4);return e[1]=e[1]+"%",e[2]=e[2]+"%",e},suffix:["°","%","%",""]}},pixelatedStyle:["image-rendering: optimizeSpeed","image-rendering: -moz-crisp-edges","image-rendering: -o-crisp-edges","image-rendering: -webkit-optimize-contrast","image-rendering: optimize-contrast","image-rendering: crisp-edges","image-rendering: pixelated",""].join("; ")}},13245:function(z,B,e){var d=e(71828),P=e(17230),a=e(51877),_=e(25095).IMAGE_URL_PREFIX;z.exports=function(v,y){function r(i,f){return d.coerce(v,y,P,i,f)}r("source"),y.source&&!y.source.match(_)&&delete y.source,y._hasSource=!!y.source;var n=r("z");if(y._hasZ=!(n===void 0||!n.length||!n[0]||!n[0].length),!y._hasZ&&!y._hasSource){y.visible=!1;return}r("x0"),r("y0"),r("dx"),r("dy");var u;y._hasZ?(r("colormodel","rgb"),u=a.colormodel[y.colormodel],r("zmin",u.zminDflt||u.min),r("zmax",u.zmaxDflt||u.max)):y._hasSource&&(y.colormodel="rgba256",u=a.colormodel[y.colormodel],y.zmin=u.zminDflt,y.zmax=u.zmaxDflt),r("zsmooth"),r("text"),r("hovertext"),r("hovertemplate"),y._length=null}},30835:function(z){z.exports=function(e,d){return"xVal"in d&&(e.x=d.xVal),"yVal"in d&&(e.y=d.yVal),d.xa&&(e.xaxis=d.xa),d.ya&&(e.yaxis=d.ya),e.color=d.color,e.colormodel=d.trace.colormodel,e.z||(e.z=d.color),e}},67395:function(z,B,e){var d=e(33575),P=e(25095).IMAGE_URL_PREFIX,a=e(12856).Buffer;B.A=function(_){var x=_.replace(P,""),v=new a(x,"base64");return d(v)}},28749:function(z,B,e){var d=e(30211),P=e(71828),a=e(51877);z.exports=function(x,v,y){var r=x.cd[0],n=r.trace,u=x.xa,i=x.ya;if(!(d.inbox(v-r.x0,v-(r.x0+r.w*n.dx),0)>0||d.inbox(y-r.y0,y-(r.y0+r.h*n.dy),0)>0)){var f=Math.floor((v-r.x0)/n.dx),g=Math.floor(Math.abs(y-r.y0)/n.dy),h;if(n._hasZ?h=r.z[g][f]:n._hasSource&&(h=n._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(f,g,1,1).data),!!h){var b=r.hi||n.hoverinfo,p;if(b){var E=b.split("+");E.indexOf("all")!==-1&&(E=["color"]),E.indexOf("color")!==-1&&(p=!0)}var c=a.colormodel[n.colormodel],l=c.colormodel||n.colormodel,m=l.length,M=n._scaler(h),L=c.suffix,D=[];(n.hovertemplate||p)&&(D.push("["+[M[0]+L[0],M[1]+L[1],M[2]+L[2]].join(", ")),m===4&&D.push(", "+M[3]+L[3]),D.push("]"),D=D.join(""),x.extraText=l.toUpperCase()+": "+D);var A;Array.isArray(n.hovertext)&&Array.isArray(n.hovertext[g])?A=n.hovertext[g][f]:Array.isArray(n.text)&&Array.isArray(n.text[g])&&(A=n.text[g][f]);var C=i.c2p(r.y0+(g+.5)*n.dy),S=r.x0+(f+.5)*n.dx,o=r.y0+(g+.5)*n.dy,R="["+h.slice(0,n.colormodel.length).join(", ")+"]";return[P.extendFlat(x,{index:[g,f],x0:u.c2p(r.x0+f*n.dx),x1:u.c2p(r.x0+(f+1)*n.dx),y0:C,y1:C,color:M,xVal:S,xLabelVal:S,yVal:o,yLabelVal:o,zLabelVal:R,text:A,hovertemplateLabels:{zLabel:R,colorLabel:D,"color[0]Label":M[0]+L[0],"color[1]Label":M[1]+L[1],"color[2]Label":M[2]+L[2],"color[3]Label":M[3]+L[3]}})]}}}},94507:function(z,B,e){z.exports={attributes:e(17230),supplyDefaults:e(13245),calc:e(71113),plot:e(60775),style:e(12826),hoverPoints:e(28749),eventData:e(30835),moduleType:"trace",name:"image",basePlotModule:e(93612),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},60775:function(z,B,e){var d=e(39898),P=e(71828),a=P.strTranslate,_=e(77922),x=e(51877),v=P.isIOS()||P.isSafari()||P.isIE();z.exports=function(r,n,u,i){var f=n.xaxis,g=n.yaxis,h=!(v||r._context._exportedPlot);P.makeTraceGroups(i,u,"im").each(function(b){var p=d.select(this),E=b[0],c=E.trace,l=(c.zsmooth==="fast"||c.zsmooth===!1&&h)&&!c._hasZ&&c._hasSource&&f.type==="linear"&&g.type==="linear";c._realImage=l;var m=E.z,M=E.x0,L=E.y0,D=E.w,A=E.h,C=c.dx,S=c.dy,o,R,T,O,N,H;for(H=0;o===void 0&&H<D;)o=f.c2p(M+H*C),H++;for(H=D;R===void 0&&H>0;)R=f.c2p(M+H*C),H--;for(H=0;O===void 0&&H<A;)O=g.c2p(L+H*S),H++;for(H=A;N===void 0&&H>0;)N=g.c2p(L+H*S),H--;if(R<o&&(T=R,R=o,o=T),N<O&&(T=O,O=N,N=T),!l){var k=.5;o=Math.max(-k*f._length,o),R=Math.min((1+k)*f._length,R),O=Math.max(-k*g._length,O),N=Math.min((1+k)*g._length,N)}var V=Math.round(R-o),G=Math.round(N-O),U=V<=0||G<=0;if(U){var Y=p.selectAll("image").data([]);Y.exit().remove();return}function ee(fe){var te=document.createElement("canvas");te.width=V,te.height=G;var ne=te.getContext("2d",{willReadFrequently:!0}),ve=function(Ve){return P.constrain(Math.round(f.c2p(M+Ve*C)-o),0,V)},le=function(Ve){return P.constrain(Math.round(g.c2p(L+Ve*S)-O),0,G)},xe=x.colormodel[c.colormodel],Se=xe.colormodel||c.colormodel,Re=xe.fmt,Ee;for(H=0;H<E.w;H++){var Oe=ve(H),Be=ve(H+1);if(!(Be===Oe||isNaN(Be)||isNaN(Oe)))for(var Le=0;Le<E.h;Le++){var Te=le(Le),De=le(Le+1);De===Te||isNaN(De)||isNaN(Te)||!fe(H,Le)||(Ee=c._scaler(fe(H,Le)),Ee?ne.fillStyle=Se+"("+Re(Ee).join(",")+")":ne.fillStyle="rgba(0,0,0,0)",ne.fillRect(Oe,Te,Be-Oe,De-Te))}}return te}var re=p.selectAll("image").data([b]);re.enter().append("svg:image").attr({xmlns:_.svg,preserveAspectRatio:"none"}),re.exit().remove();var ie=c.zsmooth===!1?x.pixelatedStyle:"";if(l){var se=P.simpleMap(f.range,f.r2l),ce=P.simpleMap(g.range,g.r2l),q=se[1]<se[0],j=ce[1]>ce[0];if(q||j){var Z=o+V/2,Q=O+G/2;ie+="transform:"+a(Z+"px",Q+"px")+"scale("+(q?-1:1)+","+(j?-1:1)+")"+a(-Z+"px",-Q+"px")+";"}}re.attr("style",ie);var ue=new Promise(function(fe){if(c._hasZ)fe();else if(c._hasSource)if(c._canvas&&c._canvas.el.width===D&&c._canvas.el.height===A&&c._canvas.source===c.source)fe();else{var te=document.createElement("canvas");te.width=D,te.height=A;var ne=te.getContext("2d",{willReadFrequently:!0});c._image=c._image||new Image;var ve=c._image;ve.onload=function(){ne.drawImage(ve,0,0),c._canvas={el:te,source:c.source},fe()},ve.setAttribute("src",c.source)}}).then(function(){var fe,te;if(c._hasZ)te=ee(function(le,xe){return m[xe][le]}),fe=te.toDataURL("image/png");else if(c._hasSource)if(l)fe=c.source;else{var ne=c._canvas.el.getContext("2d",{willReadFrequently:!0}),ve=ne.getImageData(0,0,D,A).data;te=ee(function(le,xe){var Se=4*(xe*D+le);return[ve[Se],ve[Se+1],ve[Se+2],ve[Se+3]]}),fe=te.toDataURL("image/png")}re.attr({"xlink:href":fe,height:G,width:V,x:o,y:O})});r._promises.push(ue)})}},12826:function(z,B,e){var d=e(39898);z.exports=function(a){d.select(a).selectAll(".im image").style("opacity",function(_){return _[0].trace.opacity})}},54846:function(z,B,e){var d=e(1426).extendFlat,P=e(1426).extendDeep,a=e(30962).overrideAll,_=e(41940),x=e(22399),v=e(27670).Y,y=e(13838),r=e(44467).templatedArray,n=e(22372),u=e(12663).descriptionOnlyNumbers,i=_({editType:"plot",colorEditType:"plot"}),f={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:x.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},g={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},h=r("step",P({},f,{range:g}));z.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:v({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:d({},i,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:u("value")},font:d({},i,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:u("value")},increasing:{symbol:{valType:"string",dflt:n.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:n.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:n.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:n.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:d({},i,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:P({},f,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:x.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:a({range:g,visible:d({},y.visible,{dflt:!0}),tickmode:y.minor.tickmode,nticks:y.nticks,tick0:y.tick0,dtick:y.dtick,tickvals:y.tickvals,ticktext:y.ticktext,ticks:d({},y.ticks,{dflt:"outside"}),ticklen:y.ticklen,tickwidth:y.tickwidth,tickcolor:y.tickcolor,ticklabelstep:y.ticklabelstep,showticklabels:y.showticklabels,tickfont:_({}),tickangle:y.tickangle,tickformat:y.tickformat,tickformatstops:y.tickformatstops,tickprefix:y.tickprefix,showtickprefix:y.showtickprefix,ticksuffix:y.ticksuffix,showticksuffix:y.showticksuffix,separatethousands:y.separatethousands,exponentformat:y.exponentformat,minexponent:y.minexponent,showexponent:y.showexponent,editType:"plot"},"plot"),steps:h,threshold:{line:{color:d({},f.line.color,{}),width:d({},f.line.width,{dflt:1}),editType:"plot"},thickness:d({},f.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}},15970:function(z,B,e){var d=e(74875);B.name="indicator",B.plot=function(P,a,_,x){d.plotBasePlot(B.name,P,a,_,x)},B.clean=function(P,a,_,x){d.cleanBasePlot(B.name,P,a,_,x)}},24667:function(z){function B(e,d){var P=[],a=d.value;typeof d._lastValue!="number"&&(d._lastValue=d.value);var _=d._lastValue,x=_;return d._hasDelta&&typeof d.delta.reference=="number"&&(x=d.delta.reference),P[0]={y:a,lastY:_,delta:a-x,relativeDelta:(a-x)/x},P}z.exports={calc:B}},84577:function(z){z.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}},94425:function(z,B,e){var d=e(71828),P=e(54846),a=e(27670).c,_=e(44467),x=e(85501),v=e(84577),y=e(26218),r=e(38701),n=e(96115),u=e(89426);function i(g,h,b,p){function E(H,k){return d.coerce(g,h,P,H,k)}a(h,p,E),E("mode"),h._hasNumber=h.mode.indexOf("number")!==-1,h._hasDelta=h.mode.indexOf("delta")!==-1,h._hasGauge=h.mode.indexOf("gauge")!==-1;var c=E("value");h._range=[0,typeof c=="number"?1.5*c:1];var l=new Array(2),m;h._hasNumber&&(E("number.valueformat"),E("number.font.color",p.font.color),E("number.font.family",p.font.family),E("number.font.size"),h.number.font.size===void 0&&(h.number.font.size=v.defaultNumberFontSize,l[0]=!0),E("number.prefix"),E("number.suffix"),m=h.number.font.size);var M;h._hasDelta&&(E("delta.font.color",p.font.color),E("delta.font.family",p.font.family),E("delta.font.size"),h.delta.font.size===void 0&&(h.delta.font.size=(h._hasNumber?.5:1)*(m||v.defaultNumberFontSize),l[1]=!0),E("delta.reference",h.value),E("delta.relative"),E("delta.valueformat",h.delta.relative?"2%":""),E("delta.increasing.symbol"),E("delta.increasing.color"),E("delta.decreasing.symbol"),E("delta.decreasing.color"),E("delta.position"),E("delta.prefix"),E("delta.suffix"),M=h.delta.font.size),h._scaleNumbers=(!h._hasNumber||l[0])&&(!h._hasDelta||l[1])||!1,E("title.font.color",p.font.color),E("title.font.family",p.font.family),E("title.font.size",.25*(m||M||v.defaultNumberFontSize)),E("title.text");var L,D,A,C;function S(H,k){return d.coerce(L,D,P.gauge,H,k)}function o(H,k){return d.coerce(A,C,P.gauge.axis,H,k)}if(h._hasGauge){L=g.gauge,L||(L={}),D=_.newContainer(h,"gauge"),S("shape");var R=h._isBullet=h.gauge.shape==="bullet";R||E("title.align","center");var T=h._isAngular=h.gauge.shape==="angular";T||E("align","center"),S("bgcolor",p.paper_bgcolor),S("borderwidth"),S("bordercolor"),S("bar.color"),S("bar.line.color"),S("bar.line.width");var O=v.valueThickness*(h.gauge.shape==="bullet"?.5:1);S("bar.thickness",O),x(L,D,{name:"steps",handleItemDefaults:f}),S("threshold.value"),S("threshold.thickness"),S("threshold.line.width"),S("threshold.line.color"),A={},L&&(A=L.axis||{}),C=_.newContainer(D,"axis"),o("visible"),h._range=o("range",h._range);var N={outerTicks:!0};y(A,C,o,"linear"),u(A,C,o,"linear",N),n(A,C,o,"linear",N),r(A,C,o,N)}else E("title.align","center"),E("align","center"),h._isAngular=h._isBullet=!1;h._length=null}function f(g,h){function b(p,E){return d.coerce(g,h,P.gauge.steps,p,E)}b("color"),b("line.color"),b("line.width"),b("range"),b("thickness")}z.exports={supplyDefaults:i}},15154:function(z,B,e){z.exports={moduleType:"trace",name:"indicator",basePlotModule:e(15970),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:e(54846),supplyDefaults:e(94425).supplyDefaults,calc:e(24667).calc,plot:e(75634),meta:{}}},75634:function(z,B,e){var d=e(39898),P=e(81684).sX,a=e(81684).k4,_=e(71828),x=_.strScale,v=_.strTranslate,y=_.rad2deg,r=e(18783).MID_SHIFT,n=e(91424),u=e(84577),i=e(63893),f=e(89298),g=e(71453),h=e(52830),b=e(13838),p=e(7901),E={left:"start",center:"middle",right:"end"},c={left:0,center:.5,right:1},l=/[yzafpnµmkMGTPEZY]/;function m(N){return N&&N.duration>0}z.exports=function(H,k,V,G){var U=H._fullLayout,Y;m(V)&&G&&(Y=G()),_.makeTraceGroups(U._indicatorlayer,k,"trace").each(function(ee){var re=ee[0],ie=re.trace,se=d.select(this),ce=ie._hasGauge,q=ie._isAngular,j=ie._isBullet,Z=ie.domain,Q={w:U._size.w*(Z.x[1]-Z.x[0]),h:U._size.h*(Z.y[1]-Z.y[0]),l:U._size.l+U._size.w*Z.x[0],r:U._size.r+U._size.w*(1-Z.x[1]),t:U._size.t+U._size.h*(1-Z.y[1]),b:U._size.b+U._size.h*Z.y[0]},ue=Q.l+Q.w/2,fe=Q.t+Q.h/2,te=Math.min(Q.w/2,Q.h),ne=u.innerRadius*te,ve,le,xe,Se=ie.align||"center";if(le=fe,!ce)ve=Q.l+c[Se]*Q.w,xe=function(Ne){return o(Ne,Q.w,Q.h)};else if(q&&(ve=ue,le=fe+te/2,xe=function(Ne){return R(Ne,.9*ne)}),j){var Re=u.bulletPadding,Ee=1-u.bulletNumberDomainSize+Re;ve=Q.l+(Ee+(1-Ee)*c[Se])*Q.w,xe=function(Ne){return o(Ne,(u.bulletNumberDomainSize-Re)*Q.w,Q.h)}}D(H,se,ee,{numbersX:ve,numbersY:le,numbersScaler:xe,transitionOpts:V,onComplete:Y});var Oe,Be;ce&&(Oe={range:ie.gauge.axis.range,color:ie.gauge.bgcolor,line:{color:ie.gauge.bordercolor,width:0},thickness:1},Be={range:ie.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:ie.gauge.bordercolor,width:ie.gauge.borderwidth},thickness:1});var Le=se.selectAll("g.angular").data(q?ee:[]);Le.exit().remove();var Te=se.selectAll("g.angularaxis").data(q?ee:[]);Te.exit().remove(),q&&L(H,se,ee,{radius:te,innerRadius:ne,gauge:Le,layer:Te,size:Q,gaugeBg:Oe,gaugeOutline:Be,transitionOpts:V,onComplete:Y});var De=se.selectAll("g.bullet").data(j?ee:[]);De.exit().remove();var Ve=se.selectAll("g.bulletaxis").data(j?ee:[]);Ve.exit().remove(),j&&M(H,se,ee,{gauge:De,layer:Ve,size:Q,gaugeBg:Oe,gaugeOutline:Be,transitionOpts:V,onComplete:Y});var Ye=se.selectAll("text.title").data(ee);Ye.exit().remove(),Ye.enter().append("text").classed("title",!0),Ye.attr("text-anchor",function(){return j?E.right:E[ie.title.align]}).text(ie.title.text).call(n.font,ie.title.font).call(i.convertToTspans,H),Ye.attr("transform",function(){var Ne=Q.l+Q.w*c[ie.title.align],Xe,ht=u.titlePadding,st=n.bBox(Ye.node());if(ce){if(q)if(ie.gauge.axis.visible){var it=n.bBox(Te.node());Xe=it.top-ht-st.bottom}else Xe=Q.t+Q.h/2-te/2-st.bottom-ht;j&&(Xe=le-(st.top+st.bottom)/2,Ne=Q.l-u.bulletPadding*Q.w)}else Xe=ie._numbersTop-ht-st.bottom;return v(Ne,Xe)})})};function M(N,H,k,V){var G=k[0].trace,U=V.gauge,Y=V.layer,ee=V.gaugeBg,re=V.gaugeOutline,ie=V.size,se=G.domain,ce=V.transitionOpts,q=V.onComplete,j,Z,Q,ue,fe;U.enter().append("g").classed("bullet",!0),U.attr("transform",v(ie.l,ie.t)),Y.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),Y.selectAll("g.xbulletaxistick,path,text").remove();var te=ie.h,ne=G.gauge.bar.thickness*te,ve=se.x[0],le=se.x[0]+(se.x[1]-se.x[0])*(G._hasNumber||G._hasDelta?1-u.bulletNumberDomainSize:1);j=S(N,G.gauge.axis),j._id="xbulletaxis",j.domain=[ve,le],j.setScale(),Z=f.calcTicks(j),Q=f.makeTransTickFn(j),ue=f.getTickSigns(j)[2],fe=ie.t+ie.h,j.visible&&(f.drawTicks(N,j,{vals:j.ticks==="inside"?f.clipEnds(j,Z):Z,layer:Y,path:f.makeTickPath(j,fe,ue),transFn:Q}),f.drawLabels(N,j,{vals:Z,layer:Y,transFn:Q,labelFns:f.makeLabelFns(j,fe)}));function xe(Te){Te.attr("width",function(De){return Math.max(0,j.c2p(De.range[1])-j.c2p(De.range[0]))}).attr("x",function(De){return j.c2p(De.range[0])}).attr("y",function(De){return .5*(1-De.thickness)*te}).attr("height",function(De){return De.thickness*te})}var Se=[ee].concat(G.gauge.steps),Re=U.selectAll("g.bg-bullet").data(Se);Re.enter().append("g").classed("bg-bullet",!0).append("rect"),Re.select("rect").call(xe).call(A),Re.exit().remove();var Ee=U.selectAll("g.value-bullet").data([G.gauge.bar]);Ee.enter().append("g").classed("value-bullet",!0).append("rect"),Ee.select("rect").attr("height",ne).attr("y",(te-ne)/2).call(A),m(ce)?Ee.select("rect").transition().duration(ce.duration).ease(ce.easing).each("end",function(){q&&q()}).each("interrupt",function(){q&&q()}).attr("width",Math.max(0,j.c2p(Math.min(G.gauge.axis.range[1],k[0].y)))):Ee.select("rect").attr("width",typeof k[0].y=="number"?Math.max(0,j.c2p(Math.min(G.gauge.axis.range[1],k[0].y))):0),Ee.exit().remove();var Oe=k.filter(function(){return G.gauge.threshold.value||G.gauge.threshold.value===0}),Be=U.selectAll("g.threshold-bullet").data(Oe);Be.enter().append("g").classed("threshold-bullet",!0).append("line"),Be.select("line").attr("x1",j.c2p(G.gauge.threshold.value)).attr("x2",j.c2p(G.gauge.threshold.value)).attr("y1",(1-G.gauge.threshold.thickness)/2*te).attr("y2",(1-(1-G.gauge.threshold.thickness)/2)*te).call(p.stroke,G.gauge.threshold.line.color).style("stroke-width",G.gauge.threshold.line.width),Be.exit().remove();var Le=U.selectAll("g.gauge-outline").data([re]);Le.enter().append("g").classed("gauge-outline",!0).append("rect"),Le.select("rect").call(xe).call(A),Le.exit().remove()}function L(N,H,k,V){var G=k[0].trace,U=V.size,Y=V.radius,ee=V.innerRadius,re=V.gaugeBg,ie=V.gaugeOutline,se=[U.l+U.w/2,U.t+U.h/2+Y/2],ce=V.gauge,q=V.layer,j=V.transitionOpts,Z=V.onComplete,Q=Math.PI/2;function ue(nt){var pt=G.gauge.axis.range[0],Tt=G.gauge.axis.range[1],Et=(nt-pt)/(Tt-pt)*Math.PI-Q;return Et<-Q?-Q:Et>Q?Q:Et}function fe(nt){return d.svg.arc().innerRadius((ee+Y)/2-nt/2*(Y-ee)).outerRadius((ee+Y)/2+nt/2*(Y-ee)).startAngle(-Q)}function te(nt){nt.attr("d",function(pt){return fe(pt.thickness).startAngle(ue(pt.range[0])).endAngle(ue(pt.range[1]))()})}var ne,ve,le,xe;ce.enter().append("g").classed("angular",!0),ce.attr("transform",v(se[0],se[1])),q.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),q.selectAll("g.xangularaxistick,path,text").remove(),ne=S(N,G.gauge.axis),ne.type="linear",ne.range=G.gauge.axis.range,ne._id="xangularaxis",ne.ticklabeloverflow="allow",ne.setScale();var Se=function(nt){return(ne.range[0]-nt.x)/(ne.range[1]-ne.range[0])*Math.PI+Math.PI},Re={},Ee=f.makeLabelFns(ne,0),Oe=Ee.labelStandoff;Re.xFn=function(nt){var pt=Se(nt);return Math.cos(pt)*Oe},Re.yFn=function(nt){var pt=Se(nt),Tt=Math.sin(pt)>0?.2:1;return-Math.sin(pt)*(Oe+nt.fontSize*Tt)+Math.abs(Math.cos(pt))*(nt.fontSize*r)},Re.anchorFn=function(nt){var pt=Se(nt),Tt=Math.cos(pt);return Math.abs(Tt)<.1?"middle":Tt>0?"start":"end"},Re.heightFn=function(nt,pt,Tt){var Et=Se(nt);return-.5*(1+Math.sin(Et))*Tt};var Be=function(nt){return v(se[0]+Y*Math.cos(nt),se[1]-Y*Math.sin(nt))};le=function(nt){return Be(Se(nt))};var Le=function(nt){var pt=Se(nt);return Be(pt)+"rotate("+-y(pt)+")"};if(ve=f.calcTicks(ne),xe=f.getTickSigns(ne)[2],ne.visible){xe=ne.ticks==="inside"?-1:1;var Te=(ne.linewidth||1)/2;f.drawTicks(N,ne,{vals:ve,layer:q,path:"M"+xe*Te+",0h"+xe*ne.ticklen,transFn:Le}),f.drawLabels(N,ne,{vals:ve,layer:q,transFn:le,labelFns:Re})}var De=[re].concat(G.gauge.steps),Ve=ce.selectAll("g.bg-arc").data(De);Ve.enter().append("g").classed("bg-arc",!0).append("path"),Ve.select("path").call(te).call(A),Ve.exit().remove();var Ye=fe(G.gauge.bar.thickness),Ne=ce.selectAll("g.value-arc").data([G.gauge.bar]);Ne.enter().append("g").classed("value-arc",!0).append("path");var Xe=Ne.select("path");m(j)?(Xe.transition().duration(j.duration).ease(j.easing).each("end",function(){Z&&Z()}).each("interrupt",function(){Z&&Z()}).attrTween("d",C(Ye,ue(k[0].lastY),ue(k[0].y))),G._lastValue=k[0].y):Xe.attr("d",typeof k[0].y=="number"?Ye.endAngle(ue(k[0].y)):"M0,0Z"),Xe.call(A),Ne.exit().remove(),De=[];var ht=G.gauge.threshold.value;(ht||ht===0)&&De.push({range:[ht,ht],color:G.gauge.threshold.color,line:{color:G.gauge.threshold.line.color,width:G.gauge.threshold.line.width},thickness:G.gauge.threshold.thickness});var st=ce.selectAll("g.threshold-arc").data(De);st.enter().append("g").classed("threshold-arc",!0).append("path"),st.select("path").call(te).call(A),st.exit().remove();var it=ce.selectAll("g.gauge-outline").data([ie]);it.enter().append("g").classed("gauge-outline",!0).append("path"),it.select("path").call(te).call(A),it.exit().remove()}function D(N,H,k,V){var G=k[0].trace,U=V.numbersX,Y=V.numbersY,ee=G.align||"center",re=E[ee],ie=V.transitionOpts,se=V.onComplete,ce=_.ensureSingle(H,"g","numbers"),q,j,Z,Q=[];G._hasNumber&&Q.push("number"),G._hasDelta&&(Q.push("delta"),G.delta.position==="left"&&Q.reverse());var ue=ce.selectAll("text").data(Q);ue.enter().append("text"),ue.attr("text-anchor",function(){return re}).attr("class",function(Be){return Be}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),ue.exit().remove();function fe(Be,Le,Te,De){if(Be.match("s")&&Te>=0!=De>=0&&!Le(Te).slice(-1).match(l)&&!Le(De).slice(-1).match(l)){var Ve=Be.slice().replace("s","f").replace(/\d+/,function(Ne){return parseInt(Ne)-1}),Ye=S(N,{tickformat:Ve});return function(Ne){return Math.abs(Ne)<1?f.tickText(Ye,Ne).text:Le(Ne)}}else return Le}function te(){var Be=S(N,{tickformat:G.number.valueformat},G._range);Be.setScale(),f.prepTicks(Be);var Le=function(Ne){return f.tickText(Be,Ne).text},Te=G.number.suffix,De=G.number.prefix,Ve=ce.select("text.number");function Ye(){var Ne=typeof k[0].y=="number"?De+Le(k[0].y)+Te:"-";Ve.text(Ne).call(n.font,G.number.font).call(i.convertToTspans,N)}return m(ie)?Ve.transition().duration(ie.duration).ease(ie.easing).each("end",function(){Ye(),se&&se()}).each("interrupt",function(){Ye(),se&&se()}).attrTween("text",function(){var Ne=d.select(this),Xe=a(k[0].lastY,k[0].y);G._lastValue=k[0].y;var ht=fe(G.number.valueformat,Le,k[0].lastY,k[0].y);return function(st){Ne.text(De+ht(Xe(st))+Te)}}):Ye(),q=T(De+Le(k[0].y)+Te,G.number.font,re,N),Ve}function ne(){var Be=S(N,{tickformat:G.delta.valueformat},G._range);Be.setScale(),f.prepTicks(Be);var Le=function(st){return f.tickText(Be,st).text},Te=G.delta.suffix,De=G.delta.prefix,Ve=function(st){var it=G.delta.relative?st.relativeDelta:st.delta;return it},Ye=function(st,it){return st===0||typeof st!="number"||isNaN(st)?"-":(st>0?G.delta.increasing.symbol:G.delta.decreasing.symbol)+De+it(st)+Te},Ne=function(st){return st.delta>=0?G.delta.increasing.color:G.delta.decreasing.color};G._deltaLastValue===void 0&&(G._deltaLastValue=Ve(k[0]));var Xe=ce.select("text.delta");Xe.call(n.font,G.delta.font).call(p.fill,Ne({delta:G._deltaLastValue}));function ht(){Xe.text(Ye(Ve(k[0]),Le)).call(p.fill,Ne(k[0])).call(i.convertToTspans,N)}return m(ie)?Xe.transition().duration(ie.duration).ease(ie.easing).tween("text",function(){var st=d.select(this),it=Ve(k[0]),nt=G._deltaLastValue,pt=fe(G.delta.valueformat,Le,nt,it),Tt=a(nt,it);return G._deltaLastValue=it,function(Et){st.text(Ye(Tt(Et),pt)),st.call(p.fill,Ne({delta:Tt(Et)}))}}).each("end",function(){ht(),se&&se()}).each("interrupt",function(){ht(),se&&se()}):ht(),j=T(Ye(Ve(k[0]),Le),G.delta.font,re,N),Xe}var ve=G.mode+G.align,le;if(G._hasDelta&&(le=ne(),ve+=G.delta.position+G.delta.font.size+G.delta.font.family+G.delta.valueformat,ve+=G.delta.increasing.symbol+G.delta.decreasing.symbol,Z=j),G._hasNumber&&(te(),ve+=G.number.font.size+G.number.font.family+G.number.valueformat+G.number.suffix+G.number.prefix,Z=q),G._hasDelta&&G._hasNumber){var xe=[(q.left+q.right)/2,(q.top+q.bottom)/2],Se=[(j.left+j.right)/2,(j.top+j.bottom)/2],Re,Ee,Oe=.75*G.delta.font.size;G.delta.position==="left"&&(Re=O(G,"deltaPos",0,-1*(q.width*c[G.align]+j.width*(1-c[G.align])+Oe),ve,Math.min),Ee=xe[1]-Se[1],Z={width:q.width+j.width+Oe,height:Math.max(q.height,j.height),left:j.left+Re,right:q.right,top:Math.min(q.top,j.top+Ee),bottom:Math.max(q.bottom,j.bottom+Ee)}),G.delta.position==="right"&&(Re=O(G,"deltaPos",0,q.width*(1-c[G.align])+j.width*c[G.align]+Oe,ve,Math.max),Ee=xe[1]-Se[1],Z={width:q.width+j.width+Oe,height:Math.max(q.height,j.height),left:q.left,right:j.right+Re,top:Math.min(q.top,j.top+Ee),bottom:Math.max(q.bottom,j.bottom+Ee)}),G.delta.position==="bottom"&&(Re=null,Ee=j.height,Z={width:Math.max(q.width,j.width),height:q.height+j.height,left:Math.min(q.left,j.left),right:Math.max(q.right,j.right),top:q.bottom-q.height,bottom:q.bottom+j.height}),G.delta.position==="top"&&(Re=null,Ee=q.top,Z={width:Math.max(q.width,j.width),height:q.height+j.height,left:Math.min(q.left,j.left),right:Math.max(q.right,j.right),top:q.bottom-q.height-j.height,bottom:q.bottom}),le.attr({dx:Re,dy:Ee})}(G._hasNumber||G._hasDelta)&&ce.attr("transform",function(){var Be=V.numbersScaler(Z);ve+=Be[2];var Le=O(G,"numbersScale",1,Be[0],ve,Math.min),Te;G._scaleNumbers||(Le=1),G._isAngular?Te=Y-Le*Z.bottom:Te=Y-Le*(Z.top+Z.bottom)/2,G._numbersTop=Le*Z.top+Te;var De=Z[ee];ee==="center"&&(De=(Z.left+Z.right)/2);var Ve=U-Le*De;return Ve=O(G,"numbersTranslate",0,Ve,ve,Math.max),v(Ve,Te)+x(Le)})}function A(N){N.each(function(H){p.stroke(d.select(this),H.line.color)}).each(function(H){p.fill(d.select(this),H.color)}).style("stroke-width",function(H){return H.line.width})}function C(N,H,k){return function(){var V=P(H,k);return function(G){return N.endAngle(V(G))()}}}function S(N,H,k){var V=N._fullLayout,G=_.extendFlat({type:"linear",ticks:"outside",range:k,showline:!0},H),U={type:"linear",_id:"x"+H._id},Y={letter:"x",font:V.font,noHover:!0,noTickson:!0};function ee(re,ie){return _.coerce(G,U,b,re,ie)}return g(G,U,ee,Y,V),h(G,U,ee,Y),U}function o(N,H,k){var V=Math.min(H/N.width,k/N.height);return[V,N,H+"x"+k]}function R(N,H){var k=Math.sqrt(N.width/2*(N.width/2)+N.height*N.height),V=H/k;return[V,N,H]}function T(N,H,k,V){var G=document.createElementNS("http://www.w3.org/2000/svg","text"),U=d.select(G);return U.text(N).attr("x",0).attr("y",0).attr("text-anchor",k).attr("data-unformatted",N).call(i.convertToTspans,V).call(n.font,H),n.bBox(U.node())}function O(N,H,k,V,G,U){var Y="_cache"+H;N[Y]&&N[Y].key===G||(N[Y]={key:G,value:k});var ee=_.aggNums(U,null,[N[Y].value,V],2);return N[Y].value=ee,ee}},16249:function(z,B,e){var d=e(50693),P=e(12663).axisHoverFormat,a=e(5386).f,_=e(2418),x=e(9012),v=e(1426).extendFlat,y=e(30962).overrideAll;function r(i){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function n(i){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var u=z.exports=y(v({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:r(),y:r(),z:r()},caps:{x:n(),y:n(),z:n()},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:a(),xhoverformat:P("x"),yhoverformat:P("y"),zhoverformat:P("z"),valuehoverformat:P("value",1),showlegend:v({},x.showlegend,{dflt:!1})},d("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:_.opacity,lightposition:_.lightposition,lighting:_.lighting,flatshading:_.flatshading,contour:_.contour,hoverinfo:v({},x.hoverinfo)}),"calc","nested");u.flatshading.dflt=!0,u.lighting.facenormalsepsilon.dflt=0,u.x.editType=u.y.editType=u.z.editType=u.value.editType="calc+clearAxisTypes",u.transforms=void 0},56959:function(z,B,e){var d=e(78803),P=e(88489).processGrid,a=e(88489).filter;z.exports=function(x,v){v._len=Math.min(v.x.length,v.y.length,v.z.length,v.value.length),v._x=a(v.x,v._len),v._y=a(v.y,v._len),v._z=a(v.z,v._len),v._value=a(v.value,v._len);var y=P(v);v._gridFill=y.fill,v._Xs=y.Xs,v._Ys=y.Ys,v._Zs=y.Zs,v._len=y.len;for(var r=1/0,n=-1/0,u=0;u<v._len;u++){var i=v._value[u];r=Math.min(r,i),n=Math.max(n,i)}v._minValues=r,v._maxValues=n,v._vMin=v.isomin===void 0||v.isomin===null?r:v.isomin,v._vMax=v.isomax===void 0||v.isomin===null?n:v.isomax,d(x,v,{vals:[v._vMin,v._vMax],containerStr:"",cLetter:"c"})}},22674:function(z,B,e){var d=e(9330).gl_mesh3d,P=e(81697).parseColorScale,a=e(78614),_=e(21081).extractOpts,x=e(90060),v=function(f,g){for(var h=g.length-1;h>0;h--){var b=Math.min(g[h],g[h-1]),p=Math.max(g[h],g[h-1]);if(p>b&&b<f&&f<=p)return{id:h,distRatio:(p-f)/(p-b)}}return{id:0,distRatio:0}};function y(f,g,h){this.scene=f,this.uid=h,this.mesh=g,this.name="",this.data=null,this.showContour=!1}var r=y.prototype;r.handlePick=function(f){if(f.object===this.mesh){var g=f.data.index,h=this.data._meshX[g],b=this.data._meshY[g],p=this.data._meshZ[g],E=this.data._Ys.length,c=this.data._Zs.length,l=v(h,this.data._Xs).id,m=v(b,this.data._Ys).id,M=v(p,this.data._Zs).id,L=f.index=M+c*m+c*E*l;f.traceCoordinate=[this.data._meshX[L],this.data._meshY[L],this.data._meshZ[L],this.data._value[L]];var D=this.data.hovertext||this.data.text;return Array.isArray(D)&&D[L]!==void 0?f.textLabel=D[L]:D&&(f.textLabel=D),!0}},r.update=function(f){var g=this.scene,h=g.fullSceneLayout;this.data=u(f);function b(m,M,L,D){return M.map(function(A){return m.d2l(A,0,D)*L})}var p=x(b(h.xaxis,f._meshX,g.dataScale[0],f.xcalendar),b(h.yaxis,f._meshY,g.dataScale[1],f.ycalendar),b(h.zaxis,f._meshZ,g.dataScale[2],f.zcalendar)),E=x(f._meshI,f._meshJ,f._meshK),c={positions:p,cells:E,lightPosition:[f.lightposition.x,f.lightposition.y,f.lightposition.z],ambient:f.lighting.ambient,diffuse:f.lighting.diffuse,specular:f.lighting.specular,roughness:f.lighting.roughness,fresnel:f.lighting.fresnel,vertexNormalsEpsilon:f.lighting.vertexnormalsepsilon,faceNormalsEpsilon:f.lighting.facenormalsepsilon,opacity:f.opacity,contourEnable:f.contour.show,contourColor:a(f.contour.color).slice(0,3),contourWidth:f.contour.width,useFacetNormals:f.flatshading},l=_(f);c.vertexIntensity=f._meshIntensity,c.vertexIntensityBounds=[l.min,l.max],c.colormap=P(f),this.mesh.update(c)},r.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};var n=["xyz","xzy","yxz","yzx","zxy","zyx"];function u(f){f._meshI=[],f._meshJ=[],f._meshK=[];var g=f.surface.show,h=f.spaceframe.show,b=f.surface.fill,p=f.spaceframe.fill,E=!1,c=!1,l=0,m,M,L=f._Xs,D=f._Ys,A=f._Zs,C=L.length,S=D.length,o=A.length,R=n.indexOf(f._gridFill.replace(/-/g,"").replace(/\+/g,"")),T=function(rt,lt,Qe){switch(R){case 5:return Qe+o*lt+o*S*rt;case 4:return Qe+o*rt+o*C*lt;case 3:return lt+S*Qe+S*o*rt;case 2:return lt+S*rt+S*C*Qe;case 1:return rt+C*Qe+C*o*lt;default:return rt+C*lt+C*S*Qe}},O=f._minValues,N=f._maxValues,H=f._vMin,k=f._vMax,V,G,U,Y;function ee(rt,lt,Qe){for(var Fe=Y.length,Ce=M;Ce<Fe;Ce++)if(rt===V[Ce]&&lt===G[Ce]&&Qe===U[Ce])return Ce;return-1}function re(){M=m}function ie(){V=[],G=[],U=[],Y=[],m=0,re()}function se(rt,lt,Qe,Fe){return V.push(rt),G.push(lt),U.push(Qe),Y.push(Fe),m++,m-1}function ce(rt,lt,Qe){return f._meshI.push(rt),f._meshJ.push(lt),f._meshK.push(Qe),l++,l-1}function q(rt,lt,Qe){for(var Fe=[],Ce=0;Ce<rt.length;Ce++)Fe[Ce]=(rt[Ce]+lt[Ce]+Qe[Ce])/3;return Fe}function j(rt,lt,Qe){for(var Fe=[],Ce=0;Ce<rt.length;Ce++)Fe[Ce]=rt[Ce]*(1-Qe)+Qe*lt[Ce];return Fe}var Z;function Q(rt){Z=rt}function ue(rt,lt){var Qe=rt[0],Fe=rt[1],Ce=rt[2],pe=q(Qe,Fe,Ce),we=Math.sqrt(1-Z),Ae=j(pe,Qe,we),Pe=j(pe,Fe,we),Ge=j(pe,Ce,we),We=lt[0],tt=lt[1],ct=lt[2];return{xyzv:[[Qe,Fe,Pe],[Pe,Ae,Qe],[Fe,Ce,Ge],[Ge,Pe,Fe],[Ce,Qe,Ae],[Ae,Ge,Ce]],abc:[[We,tt,-1],[-1,-1,We],[tt,ct,-1],[-1,-1,tt],[ct,We,-1],[-1,-1,ct]]}}function fe(rt,lt){return rt==="all"||rt===null?!0:rt.indexOf(lt)>-1}function te(rt,lt){return rt===null?lt:rt}function ne(rt,lt,Qe){re();var Fe=[lt],Ce=[Qe];if(Z>=1)Fe=[lt],Ce=[Qe];else if(Z>0){var pe=ue(lt,Qe);Fe=pe.xyzv,Ce=pe.abc}for(var we=0;we<Fe.length;we++){lt=Fe[we],Qe=Ce[we];for(var Ae=[],Pe=0;Pe<3;Pe++){var Ge=lt[Pe][0],We=lt[Pe][1],tt=lt[Pe][2],ct=lt[Pe][3],St=Qe[Pe]>-1?Qe[Pe]:ee(Ge,We,tt);St>-1?Ae[Pe]=St:Ae[Pe]=se(Ge,We,tt,te(rt,ct))}ce(Ae[0],Ae[1],Ae[2])}}function ve(rt,lt,Qe){var Fe=function(Ce,pe,we){ne(rt,[lt[Ce],lt[pe],lt[we]],[Qe[Ce],Qe[pe],Qe[we]])};Fe(0,1,2),Fe(2,3,0)}function le(rt,lt,Qe){var Fe=function(Ce,pe,we){ne(rt,[lt[Ce],lt[pe],lt[we]],[Qe[Ce],Qe[pe],Qe[we]])};Fe(0,1,2),Fe(3,0,1),Fe(2,3,0),Fe(1,2,3)}function xe(rt,lt,Qe,Fe){var Ce=rt[3];Ce<Qe&&(Ce=Qe),Ce>Fe&&(Ce=Fe);for(var pe=(rt[3]-Ce)/(rt[3]-lt[3]+1e-9),we=[],Ae=0;Ae<4;Ae++)we[Ae]=(1-pe)*rt[Ae]+pe*lt[Ae];return we}function Se(rt,lt,Qe){return rt>=lt&&rt<=Qe}function Re(rt){var lt=.001*(k-H);return rt>=H-lt&&rt<=k+lt}function Ee(rt){for(var lt=[],Qe=0;Qe<4;Qe++){var Fe=rt[Qe];lt.push([f._x[Fe],f._y[Fe],f._z[Fe],f._value[Fe]])}return lt}var Oe=3;function Be(rt,lt,Qe,Fe,Ce,pe){pe||(pe=1),Qe=[-1,-1,-1];var we=!1,Ae=[Se(lt[0][3],Fe,Ce),Se(lt[1][3],Fe,Ce),Se(lt[2][3],Fe,Ce)];if(!Ae[0]&&!Ae[1]&&!Ae[2])return!1;var Pe=function(We,tt,ct){return Re(tt[0][3])&&Re(tt[1][3])&&Re(tt[2][3])?(ne(We,tt,ct),!0):pe<Oe?Be(We,tt,ct,H,k,++pe):!1};if(Ae[0]&&Ae[1]&&Ae[2])return Pe(rt,lt,Qe)||we;var Ge=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(We){if(Ae[We[0]]&&Ae[We[1]]&&!Ae[We[2]]){var tt=lt[We[0]],ct=lt[We[1]],St=lt[We[2]],Pt=xe(St,tt,Fe,Ce),wt=xe(St,ct,Fe,Ce);we=Pe(rt,[wt,Pt,tt],[-1,-1,Qe[We[0]]])||we,we=Pe(rt,[tt,ct,wt],[Qe[We[0]],Qe[We[1]],-1])||we,Ge=!0}}),Ge||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(We){if(Ae[We[0]]&&!Ae[We[1]]&&!Ae[We[2]]){var tt=lt[We[0]],ct=lt[We[1]],St=lt[We[2]],Pt=xe(ct,tt,Fe,Ce),wt=xe(St,tt,Fe,Ce);we=Pe(rt,[wt,Pt,tt],[-1,-1,Qe[We[0]]])||we,Ge=!0}}),we}function Le(rt,lt,Qe,Fe){var Ce=!1,pe=Ee(lt),we=[Se(pe[0][3],Qe,Fe),Se(pe[1][3],Qe,Fe),Se(pe[2][3],Qe,Fe),Se(pe[3][3],Qe,Fe)];if(!we[0]&&!we[1]&&!we[2]&&!we[3])return Ce;if(we[0]&&we[1]&&we[2]&&we[3])return c&&(Ce=le(rt,pe,lt)||Ce),Ce;var Ae=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(Pe){if(we[Pe[0]]&&we[Pe[1]]&&we[Pe[2]]&&!we[Pe[3]]){var Ge=pe[Pe[0]],We=pe[Pe[1]],tt=pe[Pe[2]],ct=pe[Pe[3]];if(c)Ce=ne(rt,[Ge,We,tt],[lt[Pe[0]],lt[Pe[1]],lt[Pe[2]]])||Ce;else{var St=xe(ct,Ge,Qe,Fe),Pt=xe(ct,We,Qe,Fe),wt=xe(ct,tt,Qe,Fe);Ce=ne(null,[St,Pt,wt],[-1,-1,-1])||Ce}Ae=!0}}),Ae||([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach(function(Pe){if(we[Pe[0]]&&we[Pe[1]]&&!we[Pe[2]]&&!we[Pe[3]]){var Ge=pe[Pe[0]],We=pe[Pe[1]],tt=pe[Pe[2]],ct=pe[Pe[3]],St=xe(tt,Ge,Qe,Fe),Pt=xe(tt,We,Qe,Fe),wt=xe(ct,We,Qe,Fe),Bt=xe(ct,Ge,Qe,Fe);c?(Ce=ne(rt,[Ge,Bt,St],[lt[Pe[0]],-1,-1])||Ce,Ce=ne(rt,[We,Pt,wt],[lt[Pe[1]],-1,-1])||Ce):Ce=ve(null,[St,Pt,wt,Bt],[-1,-1,-1,-1])||Ce,Ae=!0}}),Ae)||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(Pe){if(we[Pe[0]]&&!we[Pe[1]]&&!we[Pe[2]]&&!we[Pe[3]]){var Ge=pe[Pe[0]],We=pe[Pe[1]],tt=pe[Pe[2]],ct=pe[Pe[3]],St=xe(We,Ge,Qe,Fe),Pt=xe(tt,Ge,Qe,Fe),wt=xe(ct,Ge,Qe,Fe);c?(Ce=ne(rt,[Ge,St,Pt],[lt[Pe[0]],-1,-1])||Ce,Ce=ne(rt,[Ge,Pt,wt],[lt[Pe[0]],-1,-1])||Ce,Ce=ne(rt,[Ge,wt,St],[lt[Pe[0]],-1,-1])||Ce):Ce=ne(null,[St,Pt,wt],[-1,-1,-1])||Ce,Ae=!0}}),Ce}function Te(rt,lt,Qe,Fe,Ce,pe,we,Ae,Pe,Ge,We){var tt=!1;return E&&(fe(rt,"A")&&(tt=Le(null,[lt,Qe,Fe,pe],Ge,We)||tt),fe(rt,"B")&&(tt=Le(null,[Qe,Fe,Ce,Pe],Ge,We)||tt),fe(rt,"C")&&(tt=Le(null,[Qe,pe,we,Pe],Ge,We)||tt),fe(rt,"D")&&(tt=Le(null,[Fe,pe,Ae,Pe],Ge,We)||tt),fe(rt,"E")&&(tt=Le(null,[Qe,Fe,pe,Pe],Ge,We)||tt)),c&&(tt=Le(rt,[Qe,Fe,pe,Pe],Ge,We)||tt),tt}function De(rt,lt,Qe,Fe,Ce,pe,we,Ae){return[Ae[0]===!0?!0:Be(rt,Ee([lt,Qe,Fe]),[lt,Qe,Fe],pe,we),Ae[1]===!0?!0:Be(rt,Ee([Fe,Ce,lt]),[Fe,Ce,lt],pe,we)]}function Ve(rt,lt,Qe,Fe,Ce,pe,we,Ae,Pe){return Ae?De(rt,lt,Qe,Ce,Fe,pe,we,Pe):De(rt,Qe,Ce,Fe,lt,pe,we,Pe)}function Ye(rt,lt,Qe,Fe,Ce,pe,we){var Ae=!1,Pe,Ge,We,tt,ct=function(){Ae=Be(rt,[Pe,Ge,We],[-1,-1,-1],Ce,pe)||Ae,Ae=Be(rt,[We,tt,Pe],[-1,-1,-1],Ce,pe)||Ae},St=we[0],Pt=we[1],wt=we[2];return St&&(Pe=j(Ee([T(lt,Qe-0,Fe-0)])[0],Ee([T(lt-1,Qe-0,Fe-0)])[0],St),Ge=j(Ee([T(lt,Qe-0,Fe-1)])[0],Ee([T(lt-1,Qe-0,Fe-1)])[0],St),We=j(Ee([T(lt,Qe-1,Fe-1)])[0],Ee([T(lt-1,Qe-1,Fe-1)])[0],St),tt=j(Ee([T(lt,Qe-1,Fe-0)])[0],Ee([T(lt-1,Qe-1,Fe-0)])[0],St),ct()),Pt&&(Pe=j(Ee([T(lt-0,Qe,Fe-0)])[0],Ee([T(lt-0,Qe-1,Fe-0)])[0],Pt),Ge=j(Ee([T(lt-0,Qe,Fe-1)])[0],Ee([T(lt-0,Qe-1,Fe-1)])[0],Pt),We=j(Ee([T(lt-1,Qe,Fe-1)])[0],Ee([T(lt-1,Qe-1,Fe-1)])[0],Pt),tt=j(Ee([T(lt-1,Qe,Fe-0)])[0],Ee([T(lt-1,Qe-1,Fe-0)])[0],Pt),ct()),wt&&(Pe=j(Ee([T(lt-0,Qe-0,Fe)])[0],Ee([T(lt-0,Qe-0,Fe-1)])[0],wt),Ge=j(Ee([T(lt-0,Qe-1,Fe)])[0],Ee([T(lt-0,Qe-1,Fe-1)])[0],wt),We=j(Ee([T(lt-1,Qe-1,Fe)])[0],Ee([T(lt-1,Qe-1,Fe-1)])[0],wt),tt=j(Ee([T(lt-1,Qe-0,Fe)])[0],Ee([T(lt-1,Qe-0,Fe-1)])[0],wt),ct()),Ae}function Ne(rt,lt,Qe,Fe,Ce,pe,we,Ae,Pe,Ge,We,tt){var ct=rt;return tt?(E&&rt==="even"&&(ct=null),Te(ct,lt,Qe,Fe,Ce,pe,we,Ae,Pe,Ge,We)):(E&&rt==="odd"&&(ct=null),Te(ct,Pe,Ae,we,pe,Ce,Fe,Qe,lt,Ge,We))}function Xe(rt,lt,Qe,Fe,Ce){for(var pe=[],we=0,Ae=0;Ae<lt.length;Ae++)for(var Pe=lt[Ae],Ge=1;Ge<o;Ge++)for(var We=1;We<S;We++)pe.push(Ve(rt,T(Pe,We-1,Ge-1),T(Pe,We-1,Ge),T(Pe,We,Ge-1),T(Pe,We,Ge),Qe,Fe,(Pe+We+Ge)%2,Ce&&Ce[we]?Ce[we]:[])),we++;return pe}function ht(rt,lt,Qe,Fe,Ce){for(var pe=[],we=0,Ae=0;Ae<lt.length;Ae++)for(var Pe=lt[Ae],Ge=1;Ge<C;Ge++)for(var We=1;We<o;We++)pe.push(Ve(rt,T(Ge-1,Pe,We-1),T(Ge,Pe,We-1),T(Ge-1,Pe,We),T(Ge,Pe,We),Qe,Fe,(Ge+Pe+We)%2,Ce&&Ce[we]?Ce[we]:[])),we++;return pe}function st(rt,lt,Qe,Fe,Ce){for(var pe=[],we=0,Ae=0;Ae<lt.length;Ae++)for(var Pe=lt[Ae],Ge=1;Ge<S;Ge++)for(var We=1;We<C;We++)pe.push(Ve(rt,T(We-1,Ge-1,Pe),T(We-1,Ge,Pe),T(We,Ge-1,Pe),T(We,Ge,Pe),Qe,Fe,(We+Ge+Pe)%2,Ce&&Ce[we]?Ce[we]:[])),we++;return pe}function it(rt,lt,Qe){for(var Fe=1;Fe<o;Fe++)for(var Ce=1;Ce<S;Ce++)for(var pe=1;pe<C;pe++)Ne(rt,T(pe-1,Ce-1,Fe-1),T(pe-1,Ce-1,Fe),T(pe-1,Ce,Fe-1),T(pe-1,Ce,Fe),T(pe,Ce-1,Fe-1),T(pe,Ce-1,Fe),T(pe,Ce,Fe-1),T(pe,Ce,Fe),lt,Qe,(pe+Ce+Fe)%2)}function nt(rt,lt,Qe){c=!0,it(rt,lt,Qe),c=!1}function pt(rt,lt,Qe){E=!0,it(rt,lt,Qe),E=!1}function Tt(rt,lt,Qe,Fe,Ce,pe){for(var we=[],Ae=0,Pe=0;Pe<lt.length;Pe++)for(var Ge=lt[Pe],We=1;We<o;We++)for(var tt=1;tt<S;tt++)we.push(Ye(rt,Ge,tt,We,Qe,Fe,Ce[Pe],pe&&pe[Ae]?pe[Ae]:[])),Ae++;return we}function Et(rt,lt,Qe,Fe,Ce,pe){for(var we=[],Ae=0,Pe=0;Pe<lt.length;Pe++)for(var Ge=lt[Pe],We=1;We<C;We++)for(var tt=1;tt<o;tt++)we.push(Ye(rt,We,Ge,tt,Qe,Fe,Ce[Pe],pe&&pe[Ae]?pe[Ae]:[])),Ae++;return we}function Dt(rt,lt,Qe,Fe,Ce,pe){for(var we=[],Ae=0,Pe=0;Pe<lt.length;Pe++)for(var Ge=lt[Pe],We=1;We<S;We++)for(var tt=1;tt<C;tt++)we.push(Ye(rt,tt,We,Ge,Qe,Fe,Ce[Pe],pe&&pe[Ae]?pe[Ae]:[])),Ae++;return we}function et(rt,lt){for(var Qe=[],Fe=rt;Fe<lt;Fe++)Qe.push(Fe);return Qe}function Ue(){for(var rt=0;rt<C;rt++)for(var lt=0;lt<S;lt++)for(var Qe=0;Qe<o;Qe++){var Fe=T(rt,lt,Qe);se(f._x[Fe],f._y[Fe],f._z[Fe],f._value[Fe])}}function ze(){ie(),Ue();var rt=null;if(h&&p&&(Q(p),nt(rt,H,k)),g&&b){Q(b);for(var lt=f.surface.pattern,Qe=f.surface.count,Fe=0;Fe<Qe;Fe++){var Ce=Qe===1?.5:Fe/(Qe-1),pe=(1-Ce)*H+Ce*k,we=Math.abs(pe-O),Ae=Math.abs(pe-N),Pe=we>Ae?[O,pe]:[pe,N];pt(lt,Pe[0],Pe[1])}}var Ge=[[Math.min(H,N),Math.max(H,N)],[Math.min(O,k),Math.max(O,k)]];["x","y","z"].forEach(function(We){for(var tt=[],ct=0;ct<Ge.length;ct++){var St=0,Pt=Ge[ct][0],wt=Ge[ct][1],Bt=f.slices[We];if(Bt.show&&Bt.fill){Q(Bt.fill);var Wt=[],hr=[],gt=[];if(Bt.locations.length)for(var jt=0;jt<Bt.locations.length;jt++){var Ut=v(Bt.locations[jt],We==="x"?L:We==="y"?D:A);Ut.distRatio===0?Wt.push(Ut.id):Ut.id>0&&(hr.push(Ut.id),We==="x"?gt.push([Ut.distRatio,0,0]):We==="y"?gt.push([0,Ut.distRatio,0]):gt.push([0,0,Ut.distRatio]))}else We==="x"?Wt=et(1,C-1):We==="y"?Wt=et(1,S-1):Wt=et(1,o-1);hr.length>0&&(We==="x"?tt[St]=Tt(rt,hr,Pt,wt,gt,tt[St]):We==="y"?tt[St]=Et(rt,hr,Pt,wt,gt,tt[St]):tt[St]=Dt(rt,hr,Pt,wt,gt,tt[St]),St++),Wt.length>0&&(We==="x"?tt[St]=Xe(rt,Wt,Pt,wt,tt[St]):We==="y"?tt[St]=ht(rt,Wt,Pt,wt,tt[St]):tt[St]=st(rt,Wt,Pt,wt,tt[St]),St++)}var or=f.caps[We];or.show&&or.fill&&(Q(or.fill),We==="x"?tt[St]=Xe(rt,[0,C-1],Pt,wt,tt[St]):We==="y"?tt[St]=ht(rt,[0,S-1],Pt,wt,tt[St]):tt[St]=st(rt,[0,o-1],Pt,wt,tt[St]),St++)}}),l===0&&ie(),f._meshX=V,f._meshY=G,f._meshZ=U,f._meshIntensity=Y,f._Xs=L,f._Ys=D,f._Zs=A}return ze(),f}function i(f,g){var h=f.glplot.gl,b=d({gl:h}),p=new y(f,b,g.uid);return b._trace=p,p.update(g),f.glplot.add(b),p}z.exports={findNearestOnAxis:v,generateIsoMeshes:u,createIsosurfaceTrace:i}},82738:function(z,B,e){var d=e(71828),P=e(73972),a=e(16249),_=e(1586);function x(y,r,n,u){function i(f,g){return d.coerce(y,r,a,f,g)}v(y,r,n,u,i)}function v(y,r,n,u,i){var f=i("isomin"),g=i("isomax");g!=null&&f!==void 0&&f!==null&&f>g&&(r.isomin=null,r.isomax=null);var h=i("x"),b=i("y"),p=i("z"),E=i("value");if(!h||!h.length||!b||!b.length||!p||!p.length||!E||!E.length){r.visible=!1;return}var c=P.getComponentMethod("calendars","handleTraceDefaults");c(y,r,["x","y","z"],u),i("valuehoverformat"),["x","y","z"].forEach(function(L){i(L+"hoverformat");var D="caps."+L,A=i(D+".show");A&&i(D+".fill");var C="slices."+L,S=i(C+".show");S&&(i(C+".fill"),i(C+".locations"))});var l=i("spaceframe.show");l&&i("spaceframe.fill");var m=i("surface.show");m&&(i("surface.count"),i("surface.fill"),i("surface.pattern"));var M=i("contour.show");M&&(i("contour.color"),i("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(L){i(L)}),_(y,r,u,i,{prefix:"",cLetter:"c"}),r._length=null}z.exports={supplyDefaults:x,supplyIsoDefaults:v}},64943:function(z,B,e){z.exports={attributes:e(16249),supplyDefaults:e(82738).supplyDefaults,calc:e(56959),colorbar:{min:"cmin",max:"cmax"},plot:e(22674).createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:e(58547),categories:["gl3d","showLegend"],meta:{}}},2418:function(z,B,e){var d=e(50693),P=e(12663).axisHoverFormat,a=e(5386).f,_=e(54532),x=e(9012),v=e(1426).extendFlat;z.exports=v({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:a({editType:"calc"}),xhoverformat:P("x"),yhoverformat:P("y"),zhoverformat:P("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},d("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:_.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:v({},_.contours.x.show,{}),color:_.contours.x.color,width:_.contours.x.width,editType:"calc"},lightposition:{x:v({},_.lightposition.x,{dflt:1e5}),y:v({},_.lightposition.y,{dflt:1e5}),z:v({},_.lightposition.z,{dflt:0}),editType:"calc"},lighting:v({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},_.lighting),hoverinfo:v({},x.hoverinfo,{editType:"calc"}),showlegend:v({},x.showlegend,{dflt:!1})})},82932:function(z,B,e){var d=e(78803);z.exports=function(a,_){_.intensity&&d(a,_,{vals:_.intensity,containerStr:"",cLetter:"c"})}},91134:function(z,B,e){var d=e(9330).gl_mesh3d,P=e(9330).delaunay_triangulate,a=e(9330).alpha_shape,_=e(9330).convex_hull,x=e(81697).parseColorScale,v=e(78614),y=e(21081).extractOpts,r=e(90060);function n(E,c,l){this.scene=E,this.uid=l,this.mesh=c,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var u=n.prototype;u.handlePick=function(E){if(E.object===this.mesh){var c=E.index=E.data.index;E.data._cellCenter?E.traceCoordinate=E.data.dataCoordinate:E.traceCoordinate=[this.data.x[c],this.data.y[c],this.data.z[c]];var l=this.data.hovertext||this.data.text;return Array.isArray(l)&&l[c]!==void 0?E.textLabel=l[c]:l&&(E.textLabel=l),!0}};function i(E){for(var c=[],l=E.length,m=0;m<l;m++)c[m]=v(E[m]);return c}function f(E,c,l,m){for(var M=[],L=c.length,D=0;D<L;D++)M[D]=E.d2l(c[D],0,m)*l;return M}function g(E){for(var c=[],l=E.length,m=0;m<l;m++)c[m]=Math.round(E[m]);return c}function h(E,c){for(var l=["x","y","z"].indexOf(E),m=[],M=c.length,L=0;L<M;L++)m[L]=[c[L][(l+1)%3],c[L][(l+2)%3]];return P(m)}function b(E,c){for(var l=E.length,m=0;m<l;m++)if(E[m]<=-.5||E[m]>=c-.5)return!1;return!0}u.update=function(E){var c=this.scene,l=c.fullSceneLayout;this.data=E;var m=E.x.length,M=r(f(l.xaxis,E.x,c.dataScale[0],E.xcalendar),f(l.yaxis,E.y,c.dataScale[1],E.ycalendar),f(l.zaxis,E.z,c.dataScale[2],E.zcalendar)),L;if(E.i&&E.j&&E.k){if(E.i.length!==E.j.length||E.j.length!==E.k.length||!b(E.i,m)||!b(E.j,m)||!b(E.k,m))return;L=r(g(E.i),g(E.j),g(E.k))}else E.alphahull===0?L=_(M):E.alphahull>0?L=a(E.alphahull,M):L=h(E.delaunayaxis,M);var D={positions:M,cells:L,lightPosition:[E.lightposition.x,E.lightposition.y,E.lightposition.z],ambient:E.lighting.ambient,diffuse:E.lighting.diffuse,specular:E.lighting.specular,roughness:E.lighting.roughness,fresnel:E.lighting.fresnel,vertexNormalsEpsilon:E.lighting.vertexnormalsepsilon,faceNormalsEpsilon:E.lighting.facenormalsepsilon,opacity:E.opacity,contourEnable:E.contour.show,contourColor:v(E.contour.color).slice(0,3),contourWidth:E.contour.width,useFacetNormals:E.flatshading};if(E.intensity){var A=y(E);this.color="#fff";var C=E.intensitymode;D[C+"Intensity"]=E.intensity,D[C+"IntensityBounds"]=[A.min,A.max],D.colormap=x(E)}else E.vertexcolor?(this.color=E.vertexcolor[0],D.vertexColors=i(E.vertexcolor)):E.facecolor?(this.color=E.facecolor[0],D.cellColors=i(E.facecolor)):(this.color=E.color,D.meshColor=v(E.color));this.mesh.update(D)},u.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function p(E,c){var l=E.glplot.gl,m=d({gl:l}),M=new n(E,m,c.uid);return m._trace=M,M.update(c),E.glplot.add(m),M}z.exports=p},58669:function(z,B,e){var d=e(73972),P=e(71828),a=e(1586),_=e(2418);z.exports=function(v,y,r,n){function u(b,p){return P.coerce(v,y,_,b,p)}function i(b){var p=b.map(function(E){var c=u(E);return c&&P.isArrayOrTypedArray(c)?c:null});return p.every(function(E){return E&&E.length===p[0].length})&&p}var f=i(["x","y","z"]);if(!f){y.visible=!1;return}if(i(["i","j","k"]),y.i&&(!y.j||!y.k)||y.j&&(!y.k||!y.i)||y.k&&(!y.i||!y.j)){y.visible=!1;return}var g=d.getComponentMethod("calendars","handleTraceDefaults");g(v,y,["x","y","z"],n),["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(b){u(b)});var h=u("contour.show");h&&(u("contour.color"),u("contour.width")),"intensity"in v?(u("intensity"),u("intensitymode"),a(v,y,n,u,{prefix:"",cLetter:"c"})):(y.showscale=!1,"facecolor"in v?u("facecolor"):"vertexcolor"in v?u("vertexcolor"):u("color",r)),u("text"),u("hovertext"),u("hovertemplate"),u("xhoverformat"),u("yhoverformat"),u("zhoverformat"),y._length=null}},21164:function(z,B,e){z.exports={attributes:e(2418),supplyDefaults:e(58669),calc:e(82932),colorbar:{min:"cmin",max:"cmax"},plot:e(91134),moduleType:"trace",name:"mesh3d",basePlotModule:e(58547),categories:["gl3d","showLegend"],meta:{}}},2522:function(z,B,e){var d=e(71828).extendFlat,P=e(82196),a=e(12663).axisHoverFormat,_=e(79952).P,x=e(77914),v=e(22372),y=v.INCREASING.COLOR,r=v.DECREASING.COLOR,n=P.line;function u(i){return{line:{color:d({},n.color,{dflt:i}),width:n.width,dash:_,editType:"style"},editType:"style"}}z.exports={xperiod:P.xperiod,xperiod0:P.xperiod0,xperiodalignment:P.xperiodalignment,xhoverformat:a("x"),yhoverformat:a("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:d({},n.width,{}),dash:d({},_,{}),editType:"style"},increasing:u(y),decreasing:u(r),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:d({},x.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}})}},3485:function(z,B,e){var d=e(71828),P=d._,a=e(89298),_=e(42973),x=e(50606).BADNUM;function v(u,i){var f=a.getFromId(u,i.xaxis),g=a.getFromId(u,i.yaxis),h=n(u,f,i),b=i._minDiff;i._minDiff=null;var p=i._origX;i._origX=null;var E=i._xcalc;i._xcalc=null;var c=r(u,i,p,E,g,y);return i._extremes[f._id]=a.findExtremes(f,E,{vpad:b/2}),c.length?(d.extendFlat(c[0].t,{wHover:b/2,tickLen:h}),c):[{t:{empty:!0}}]}function y(u,i,f,g){return{o:u,h:i,l:f,c:g}}function r(u,i,f,g,h,b){for(var p=h.makeCalcdata(i,"open"),E=h.makeCalcdata(i,"high"),c=h.makeCalcdata(i,"low"),l=h.makeCalcdata(i,"close"),m=Array.isArray(i.text),M=Array.isArray(i.hovertext),L=!0,D=null,A=!!i.xperiodalignment,C=[],S=0;S<g.length;S++){var o=g[S],R=p[S],T=E[S],O=c[S],N=l[S];if(o!==x&&R!==x&&T!==x&&O!==x&&N!==x){N===R?D!==null&&N!==D&&(L=N>D):L=N>R,D=N;var H=b(R,T,O,N);H.pos=o,H.yc=(R+N)/2,H.i=S,H.dir=L?"increasing":"decreasing",H.x=H.pos,H.y=[O,T],A&&(H.orig_p=f[S]),m&&(H.tx=i.text[S]),M&&(H.htx=i.hovertext[S]),C.push(H)}else C.push({pos:o,empty:!0})}return i._extremes[h._id]=a.findExtremes(h,d.concat(c,E),{padded:!0}),C.length&&(C[0].t={labels:{open:P(u,"open:")+" ",high:P(u,"high:")+" ",low:P(u,"low:")+" ",close:P(u,"close:")+" "}}),C}function n(u,i,f){var g=f._minDiff;if(!g){var h=u._fullData,b=[];g=1/0;var p;for(p=0;p<h.length;p++){var E=h[p];if(E.type==="ohlc"&&E.visible===!0&&E.xaxis===i._id){b.push(E);var c=i.makeCalcdata(E,"x");E._origX=c;var l=_(f,i,"x",c).vals;E._xcalc=l;var m=d.distinctVals(l).minDiff;m&&isFinite(m)&&(g=Math.min(g,m))}}for(g===1/0&&(g=1),p=0;p<b.length;p++)b[p]._minDiff=g}return g*f.tickwidth}z.exports={calc:v,calcCommon:r}},16169:function(z,B,e){var d=e(71828),P=e(14555),a=e(73927),_=e(2522);z.exports=function(y,r,n,u){function i(g,h){return d.coerce(y,r,_,g,h)}var f=P(y,r,i,u);if(!f){r.visible=!1;return}a(y,r,u,i,{x:!0}),i("xhoverformat"),i("yhoverformat"),i("line.width"),i("line.dash"),x(y,r,i,"increasing"),x(y,r,i,"decreasing"),i("text"),i("hovertext"),i("tickwidth"),u._requestRangeslider[r.xaxis]=!0};function x(v,y,r,n){r(n+".line.color"),r(n+".line.width",y.line.width),r(n+".line.dash",y.line.dash)}},66449:function(z,B,e){var d=e(89298),P=e(71828),a=e(30211),_=e(7901),x=e(71828).fillText,v=e(22372),y={increasing:v.INCREASING.SYMBOL,decreasing:v.DECREASING.SYMBOL};function r(f,g,h,b){var p=f.cd,E=p[0].trace;return E.hoverlabel.split?u(f,g,h,b):i(f,g,h,b)}function n(f,g,h,b){var p=f.cd,E=f.xa,c=p[0].trace,l=p[0].t,m=c.type,M=m==="ohlc"?"l":"min",L=m==="ohlc"?"h":"max",D,A,C=l.bPos||0,S=function(ee){return ee.pos+C-g},o=l.bdPos||l.tickLen,R=l.wHover,T=Math.min(1,o/Math.abs(E.r2c(E.range[1])-E.r2c(E.range[0])));D=f.maxHoverDistance-T,A=f.maxSpikeDistance-T;function O(ee){var re=S(ee);return a.inbox(re-R,re+R,D)}function N(ee){var re=ee[M],ie=ee[L];return re===ie||a.inbox(re-h,ie-h,D)}function H(ee){return(O(ee)+N(ee))/2}var k=a.getDistanceFunction(b,O,N,H);if(a.getClosest(p,k,f),f.index===!1)return null;var V=p[f.index];if(V.empty)return null;var G=V.dir,U=c[G],Y=U.line.color;return _.opacity(Y)&&U.line.width?f.color=Y:f.color=U.fillcolor,f.x0=E.c2p(V.pos+C-o,!0),f.x1=E.c2p(V.pos+C+o,!0),f.xLabelVal=V.orig_p!==void 0?V.orig_p:V.pos,f.spikeDistance=H(V)*A/D,f.xSpike=E.c2p(V.pos,!0),f}function u(f,g,h,b){var p=f.cd,E=f.ya,c=p[0].trace,l=p[0].t,m=[],M=n(f,g,h,b);if(!M)return[];var L=M.index,D=p[L],A=D.hi||c.hoverinfo,C=A.split("+"),S=A==="all",o=S||C.indexOf("y")!==-1;if(!o)return[];for(var R=["high","open","close","low"],T={},O=0;O<R.length;O++){var N=R[O],H=c[N][M.index],k=E.c2p(H,!0),V;H in T?(V=T[H],V.yLabel+="<br>"+l.labels[N]+d.hoverLabelText(E,H,c.yhoverformat)):(V=P.extendFlat({},M),V.y0=V.y1=k,V.yLabelVal=H,V.yLabel=l.labels[N]+d.hoverLabelText(E,H,c.yhoverformat),V.name="",m.push(V),T[H]=V)}return m}function i(f,g,h,b){var p=f.cd,E=f.ya,c=p[0].trace,l=p[0].t,m=n(f,g,h,b);if(!m)return[];var M=m.index,L=p[M],D=m.index=L.i,A=L.dir;function C(H){return l.labels[H]+d.hoverLabelText(E,c[H][D],c.yhoverformat)}var S=L.hi||c.hoverinfo,o=S.split("+"),R=S==="all",T=R||o.indexOf("y")!==-1,O=R||o.indexOf("text")!==-1,N=T?[C("open"),C("high"),C("low"),C("close")+" "+y[A]]:[];return O&&x(L,c,N),m.extraText=N.join("<br>"),m.y0=m.y1=E.c2p(L.yc,!0),[m]}z.exports={hoverPoints:r,hoverSplit:u,hoverOnPoints:i}},54186:function(z,B,e){z.exports={moduleType:"trace",name:"ohlc",basePlotModule:e(93612),categories:["cartesian","svg","showLegend"],meta:{},attributes:e(2522),supplyDefaults:e(16169),calc:e(3485).calc,plot:e(72314),style:e(53101),hoverPoints:e(66449).hoverPoints,selectPoints:e(67324)}},14555:function(z,B,e){var d=e(73972),P=e(71828);z.exports=function(_,x,v,y){var r=v("x"),n=v("open"),u=v("high"),i=v("low"),f=v("close");v("hoverlabel.split");var g=d.getComponentMethod("calendars","handleTraceDefaults");if(g(_,x,["x"],y),!!(n&&u&&i&&f)){var h=Math.min(n.length,u.length,i.length,f.length);return r&&(h=Math.min(h,P.minRowLength(r))),x._length=h,h}}},72314:function(z,B,e){var d=e(39898),P=e(71828);z.exports=function(_,x,v,y){var r=x.yaxis,n=x.xaxis,u=!!n.rangebreaks;P.makeTraceGroups(y,v,"trace ohlc").each(function(i){var f=d.select(this),g=i[0],h=g.t,b=g.trace;if(b.visible!==!0||h.empty){f.remove();return}var p=h.tickLen,E=f.selectAll("path").data(P.identity);E.enter().append("path"),E.exit().remove(),E.attr("d",function(c){if(c.empty)return"M0,0Z";var l=n.c2p(c.pos-p,!0),m=n.c2p(c.pos+p,!0),M=u?(l+m)/2:n.c2p(c.pos,!0),L=r.c2p(c.o,!0),D=r.c2p(c.h,!0),A=r.c2p(c.l,!0),C=r.c2p(c.c,!0);return"M"+l+","+L+"H"+M+"M"+M+","+D+"V"+A+"M"+m+","+C+"H"+M})})}},67324:function(z){z.exports=function(e,d){var P=e.cd,a=e.xaxis,_=e.yaxis,x=[],v,y=P[0].t.bPos||0;if(d===!1)for(v=0;v<P.length;v++)P[v].selected=0;else for(v=0;v<P.length;v++){var r=P[v];d.contains([a.c2p(r.pos+y),_.c2p(r.yc)],null,r.i,e)?(x.push({pointNumber:r.i,x:a.c2d(r.pos),y:_.c2d(r.yc)}),r.selected=1):r.selected=0}return x}},53101:function(z,B,e){var d=e(39898),P=e(91424),a=e(7901);z.exports=function(x,v,y){var r=y||d.select(x).selectAll("g.ohlclayer").selectAll("g.trace");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var u=n[0].trace;d.select(this).selectAll("path").each(function(i){if(!i.empty){var f=u[i.dir].line;d.select(this).style("fill","none").call(a.stroke,f.color).call(P.dashLine,f.dash,f.width).style("opacity",u.selectedpoints&&!i.selected?.3:1)}})})}},99506:function(z,B,e){var d=e(1426).extendFlat,P=e(9012),a=e(41940),_=e(50693),x=e(5386).f,v=e(27670).Y,y=d({editType:"calc"},_("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:x({editType:"plot",arrayOk:!1},{keys:["count","probability"]})});z.exports={domain:v({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:d({},P.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:x({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:a({editType:"calc"}),tickfont:a({editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:y,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}},27677:function(z,B,e){var d=e(27659).a0,P=e(45784),a="parcats";B.name=a,B.plot=function(_,x,v,y){var r=d(_.calcdata,a);if(r.length){var n=r[0];P(_,n,v,y)}},B.clean=function(_,x,v,y){var r=y._has&&y._has("parcats"),n=x._has&&x._has("parcats");r&&!n&&y._paperdiv.selectAll(".parcats").remove()}},28699:function(z,B,e){var d=e(28984).wrap,P=e(52075).hasColorscale,a=e(78803),_=e(75744),x=e(91424),v=e(71828),y=e(92770);z.exports=function(l,m){var M=v.filterVisible(m.dimensions);if(M.length===0)return[];var L=M.map(function(q){var j;if(q.categoryorder==="trace")j=null;else if(q.categoryorder==="array")j=q.categoryarray;else{j=_(q.values);for(var Z=!0,Q=0;Q<j.length;Q++)if(!y(j[Q])){Z=!1;break}j.sort(Z?v.sorterAsc:void 0),q.categoryorder==="category descending"&&(j=j.reverse())}return h(q.values,j)}),D,A,C;v.isArrayOrTypedArray(m.counts)?D=m.counts:D=[m.counts],b(M),M.forEach(function(q,j){p(q,L[j])});var S=m.line,o;S?(P(m,"line")&&a(l,m,{vals:m.line.color,containerStr:"line",cLetter:"c"}),o=x.tryColorscale(S)):o=v.identity;function R(q){var j,Z;return v.isArrayOrTypedArray(S.color)?(j=S.color[q%S.color.length],Z=j):j=S.color,{color:o(j),rawColor:Z}}var T=M[0].values.length,O={},N=L.map(function(q){return q.inds});C=0;var H,k;for(H=0;H<T;H++){var V=[];for(k=0;k<N.length;k++)V.push(N[k][H]);A=D[H%D.length],C+=A;var G=R(H),U=V+"-"+G.rawColor;O[U]===void 0&&(O[U]=f(V,G.color,G.rawColor)),g(O[U],H,A)}var Y=M.map(function(q,j){return n(j,q._index,q._displayindex,q.label,C)});for(H=0;H<T;H++)for(A=D[H%D.length],k=0;k<Y.length;k++){var ee=Y[k].containerInd,re=L[k].inds[H],ie=Y[k].categories;if(ie[re]===void 0){var se=m.dimensions[ee]._categoryarray[re],ce=m.dimensions[ee]._ticktext[re];ie[re]=u(k,re,se,ce)}i(ie[re],H,A)}return d(r(Y,O,C))};function r(c,l,m){var M=c.map(function(L){return L.categories.length}).reduce(function(L,D){return Math.max(L,D)});return{dimensions:c,paths:l,trace:void 0,maxCats:M,count:m}}function n(c,l,m,M,L){return{dimensionInd:c,containerInd:l,displayInd:m,dimensionLabel:M,count:L,categories:[],dragX:null}}function u(c,l,m,M){return{dimensionInd:c,categoryInd:l,categoryValue:m,displayInd:l,categoryLabel:M,valueInds:[],count:0,dragY:null}}function i(c,l,m){c.valueInds.push(l),c.count+=m}function f(c,l,m){return{categoryInds:c,color:l,rawColor:m,valueInds:[],count:0}}function g(c,l,m){c.valueInds.push(l),c.count+=m}function h(c,l){l==null?l=[]:l=l.map(function(o){return o});var m={},M={},L=[];l.forEach(function(o,R){m[o]=0,M[o]=R});for(var D=0;D<c.length;D++){var A=c[D],C;m[A]===void 0?(m[A]=1,C=l.push(A)-1,M[A]=C):(m[A]++,C=M[A]),L.push(C)}var S=l.map(function(o){return m[o]});return{uniqueValues:l,uniqueCounts:S,inds:L}}function b(c){var l=c.map(function(M){return M.displayindex}),m;if(E(l))for(m=0;m<c.length;m++)c[m]._displayindex=c[m].displayindex;else for(m=0;m<c.length;m++)c[m]._displayindex=m}function p(c,l){c._categoryarray=l.uniqueValues,c.ticktext===null||c.ticktext===void 0?c._ticktext=[]:c._ticktext=c.ticktext.slice();for(var m=c._ticktext.length;m<l.uniqueValues.length;m++)c._ticktext.push(l.uniqueValues[m])}function E(c){for(var l=new Array(c.length),m=0;m<c.length;m++){if(c[m]<0||c[m]>=c.length||l[c[m]]!==void 0)return!1;l[c[m]]=!0}return!0}},14647:function(z,B,e){var d=e(71828),P=e(52075).hasColorscale,a=e(1586),_=e(27670).c,x=e(85501),v=e(99506),y=e(94397);function r(u,i,f,g,h){h("line.shape"),h("line.hovertemplate");var b=h("line.color",g.colorway[0]);if(P(u,"line")&&d.isArrayOrTypedArray(b)){if(b.length)return h("line.colorscale"),a(u,i,g,h,{prefix:"line.",cLetter:"c"}),b.length;i.line.color=f}return 1/0}function n(u,i){function f(l,m){return d.coerce(u,i,v.dimensions,l,m)}var g=f("values"),h=f("visible");if(g&&g.length||(h=i.visible=!1),h){f("label"),f("displayindex",i._index);var b=u.categoryarray,p=Array.isArray(b)&&b.length>0,E;p&&(E="array");var c=f("categoryorder",E);c==="array"?(f("categoryarray"),f("ticktext")):(delete u.categoryarray,delete u.ticktext),!p&&c==="array"&&(i.categoryorder="trace")}}z.exports=function(i,f,g,h){function b(m,M){return d.coerce(i,f,v,m,M)}var p=x(i,f,{name:"dimensions",handleItemDefaults:n}),E=r(i,f,g,h,b);_(f,h,b),(!Array.isArray(p)||!p.length)&&(f.visible=!1),y(f,p,"values",E),b("hoveron"),b("hovertemplate"),b("arrangement"),b("bundlecolors"),b("sortpaths"),b("counts");var c={family:h.font.family,size:Math.round(h.font.size),color:h.font.color};d.coerceFont(b,"labelfont",c);var l={family:h.font.family,size:Math.round(h.font.size/1.2),color:h.font.color};d.coerceFont(b,"tickfont",l)}},94873:function(z,B,e){z.exports={attributes:e(99506),supplyDefaults:e(14647),calc:e(28699),plot:e(45784),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:e(27677),categories:["noOpacity"],meta:{}}},45460:function(z,B,e){var d=e(39898),P=e(81684).k4,a=e(72391),_=e(30211),x=e(71828),v=x.strTranslate,y=e(91424),r=e(84267),n=e(63893);function u(Q,ue,fe,te){var ne=ue._context.staticPlot,ve=Q.map(se.bind(0,ue,fe)),le=te.selectAll("g.parcatslayer").data([null]);le.enter().append("g").attr("class","parcatslayer").style("pointer-events",ne?"none":"all");var xe=le.selectAll("g.trace.parcats").data(ve,i),Se=xe.enter().append("g").attr("class","trace parcats");xe.attr("transform",function(Xe){return v(Xe.x,Xe.y)}),Se.append("g").attr("class","paths");var Re=xe.select("g.paths"),Ee=Re.selectAll("path.path").data(function(Xe){return Xe.paths},i);Ee.attr("fill",function(Xe){return Xe.model.color});var Oe=Ee.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Xe){return Xe.model.color}).attr("fill-opacity",0);l(Oe),Ee.attr("d",function(Xe){return Xe.svgD}),Oe.empty()||Ee.sort(g),Ee.exit().remove(),Ee.on("mouseover",h).on("mouseout",b).on("click",c),Se.append("g").attr("class","dimensions");var Be=xe.select("g.dimensions"),Le=Be.selectAll("g.dimension").data(function(Xe){return Xe.dimensions},i);Le.enter().append("g").attr("class","dimension"),Le.attr("transform",function(Xe){return v(Xe.x,0)}),Le.exit().remove();var Te=Le.selectAll("g.category").data(function(Xe){return Xe.categories},i),De=Te.enter().append("g").attr("class","category");Te.attr("transform",function(Xe){return v(0,Xe.y)}),De.append("rect").attr("class","catrect").attr("pointer-events","none"),Te.select("rect.catrect").attr("fill","none").attr("width",function(Xe){return Xe.width}).attr("height",function(Xe){return Xe.height}),L(De);var Ve=Te.selectAll("rect.bandrect").data(function(Xe){return Xe.bands},i);Ve.each(function(){x.raiseToTop(this)}),Ve.attr("fill",function(Xe){return Xe.color});var Ye=Ve.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Xe){return Xe.color}).attr("fill-opacity",0);Ve.attr("fill",function(Xe){return Xe.color}).attr("width",function(Xe){return Xe.width}).attr("height",function(Xe){return Xe.height}).attr("y",function(Xe){return Xe.y}).attr("cursor",function(Xe){return Xe.parcatsViewModel.arrangement==="fixed"?"default":Xe.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),A(Ye),Ve.exit().remove(),De.append("text").attr("class","catlabel").attr("pointer-events","none");var Ne=ue._fullLayout.paper_bgcolor;Te.select("text.catlabel").attr("text-anchor",function(Xe){return f(Xe)?"start":"end"}).attr("alignment-baseline","middle").style("text-shadow",n.makeTextShadow(Ne)).style("fill","rgb(0, 0, 0)").attr("x",function(Xe){return f(Xe)?Xe.width+5:-5}).attr("y",function(Xe){return Xe.height/2}).text(function(Xe){return Xe.model.categoryLabel}).each(function(Xe){y.font(d.select(this),Xe.parcatsViewModel.categorylabelfont),n.convertToTspans(d.select(this),ue)}),De.append("text").attr("class","dimlabel"),Te.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Xe){return Xe.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Xe){return Xe.width/2}).attr("y",-5).text(function(Xe,ht){return ht===0?Xe.parcatsViewModel.model.dimensions[Xe.model.dimensionInd].dimensionLabel:null}).each(function(Xe){y.font(d.select(this),Xe.parcatsViewModel.labelfont)}),Te.selectAll("rect.bandrect").on("mouseover",k).on("mouseout",V),Te.exit().remove(),Le.call(d.behavior.drag().origin(function(Xe){return{x:Xe.x,y:0}}).on("dragstart",G).on("drag",U).on("dragend",Y)),xe.each(function(Xe){Xe.traceSelection=d.select(this),Xe.pathSelection=d.select(this).selectAll("g.paths").selectAll("path.path"),Xe.dimensionSelection=d.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),xe.exit().remove()}z.exports=function(Q,ue,fe,te){u(fe,Q,te,ue)};function i(Q){return Q.key}function f(Q){var ue=Q.parcatsViewModel.dimensions.length,fe=Q.parcatsViewModel.dimensions[ue-1].model.dimensionInd;return Q.model.dimensionInd===fe}function g(Q,ue){return Q.model.rawColor>ue.model.rawColor?1:Q.model.rawColor<ue.model.rawColor?-1:0}function h(Q){if(!Q.parcatsViewModel.dragDimension&&Q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){x.raiseToTop(this),m(d.select(this));var ue=p(Q),fe=E(Q);if(Q.parcatsViewModel.graphDiv.emit("plotly_hover",{points:ue,event:d.event,constraints:fe}),Q.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var te=d.mouse(this)[0],ne=Q.parcatsViewModel.graphDiv,ve=Q.parcatsViewModel.trace,le=ne._fullLayout,xe=le._paperdiv.node().getBoundingClientRect(),Se=Q.parcatsViewModel.graphDiv.getBoundingClientRect(),Re,Ee,Oe;for(Oe=0;Oe<Q.leftXs.length-1;Oe++)if(Q.leftXs[Oe]+Q.dimWidths[Oe]-2<=te&&te<=Q.leftXs[Oe+1]+2){var Be=Q.parcatsViewModel.dimensions[Oe],Le=Q.parcatsViewModel.dimensions[Oe+1];Re=(Be.x+Be.width+Le.x)/2,Ee=(Q.topYs[Oe]+Q.topYs[Oe+1]+Q.height)/2;break}var Te=Q.parcatsViewModel.x+Re,De=Q.parcatsViewModel.y+Ee,Ve=r.mostReadable(Q.model.color,["black","white"]),Ye=Q.model.count,Ne=Ye/Q.parcatsViewModel.model.count,Xe={countLabel:Ye,probabilityLabel:Ne.toFixed(3)},ht=[];Q.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&ht.push(["Count:",Xe.countLabel].join(" ")),Q.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&ht.push(["P:",Xe.probabilityLabel].join(" "));var st=ht.join("<br>"),it=d.mouse(ne)[0];_.loneHover({trace:ve,x:Te-xe.left+Se.left,y:De-xe.top+Se.top,text:st,color:Q.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:Ve,idealAlign:it<Te?"right":"left",hovertemplate:(ve.line||{}).hovertemplate,hovertemplateLabels:Xe,eventData:[{data:ve._input,fullData:ve,count:Ye,probability:Ne}]},{container:le._hoverlayer.node(),outerContainer:le._paper.node(),gd:ne})}}}function b(Q){if(!Q.parcatsViewModel.dragDimension&&(l(d.select(this)),_.loneUnhover(Q.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),Q.parcatsViewModel.pathSelection.sort(g),Q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1)){var ue=p(Q),fe=E(Q);Q.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:ue,event:d.event,constraints:fe})}}function p(Q){for(var ue=[],fe=ee(Q.parcatsViewModel),te=0;te<Q.model.valueInds.length;te++){var ne=Q.model.valueInds[te];ue.push({curveNumber:fe,pointNumber:ne})}return ue}function E(Q){for(var ue={},fe=Q.parcatsViewModel.model.dimensions,te=0;te<fe.length;te++){var ne=fe[te],ve=ne.categories[Q.model.categoryInds[te]];ue[ne.containerInd]=ve.categoryValue}return Q.model.rawColor!==void 0&&(ue.color=Q.model.rawColor),ue}function c(Q){if(Q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var ue=p(Q),fe=E(Q);Q.parcatsViewModel.graphDiv.emit("plotly_click",{points:ue,event:d.event,constraints:fe})}}function l(Q){Q.attr("fill",function(ue){return ue.model.color}).attr("fill-opacity",.6).attr("stroke","lightgray").attr("stroke-width",.2).attr("stroke-opacity",1)}function m(Q){Q.attr("fill-opacity",.8).attr("stroke",function(ue){return r.mostReadable(ue.model.color,["black","white"])}).attr("stroke-width",.3)}function M(Q){Q.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function L(Q){Q.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function D(Q){Q.attr("stroke","black").attr("stroke-width",1.5)}function A(Q){Q.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function C(Q){var ue=Q.parcatsViewModel.pathSelection,fe=Q.categoryViewModel.model.dimensionInd,te=Q.categoryViewModel.model.categoryInd;return ue.filter(function(ne){return ne.model.categoryInds[fe]===te&&ne.model.color===Q.color})}function S(Q){var ue=d.select(Q.parentNode).selectAll("rect.bandrect");ue.each(function(fe){var te=C(fe);m(te),te.each(function(){x.raiseToTop(this)})}),M(d.select(Q.parentNode))}function o(Q){var ue=d.select(Q).datum(),fe=C(ue);m(fe),fe.each(function(){x.raiseToTop(this)}),d.select(Q.parentNode).selectAll("rect.bandrect").filter(function(te){return te.color===ue.color}).each(function(){x.raiseToTop(this),D(d.select(this))})}function R(Q,ue,fe){var te=d.select(Q).datum(),ne=te.categoryViewModel.model,ve=te.parcatsViewModel.graphDiv,le=d.select(Q.parentNode).selectAll("rect.bandrect"),xe=[];le.each(function(Re){var Ee=C(Re);Ee.each(function(Oe){Array.prototype.push.apply(xe,p(Oe))})});var Se={};Se[ne.dimensionInd]=ne.categoryValue,ve.emit(ue,{points:xe,event:fe,constraints:Se})}function T(Q,ue,fe){var te=d.select(Q).datum(),ne=te.categoryViewModel.model,ve=te.parcatsViewModel.graphDiv,le=C(te),xe=[];le.each(function(Re){Array.prototype.push.apply(xe,p(Re))});var Se={};Se[ne.dimensionInd]=ne.categoryValue,te.rawColor!==void 0&&(Se.color=te.rawColor),ve.emit(ue,{points:xe,event:fe,constraints:Se})}function O(Q,ue,fe){Q._fullLayout._calcInverseTransform(Q);var te=Q._fullLayout._invScaleX,ne=Q._fullLayout._invScaleY,ve=d.select(fe.parentNode).select("rect.catrect"),le=ve.node().getBoundingClientRect(),xe=ve.datum(),Se=xe.parcatsViewModel,Re=Se.model.dimensions[xe.model.dimensionInd],Ee=Se.trace,Oe=le.top+le.height/2,Be,Le;Se.dimensions.length>1&&Re.displayInd===Se.dimensions.length-1?(Be=le.left,Le="left"):(Be=le.left+le.width,Le="right");var Te=xe.model.count,De=xe.model.categoryLabel,Ve=Te/xe.parcatsViewModel.model.count,Ye={countLabel:Te,categoryLabel:De,probabilityLabel:Ve.toFixed(3)},Ne=[];xe.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Ne.push(["Count:",Ye.countLabel].join(" ")),xe.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&Ne.push(["P("+Ye.categoryLabel+"):",Ye.probabilityLabel].join(" "));var Xe=Ne.join("<br>");return{trace:Ee,x:te*(Be-ue.left),y:ne*(Oe-ue.top),text:Xe,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:Le,hovertemplate:Ee.hovertemplate,hovertemplateLabels:Ye,eventData:[{data:Ee._input,fullData:Ee,count:Te,category:De,probability:Ve}]}}function N(Q,ue,fe){var te=[];return d.select(fe.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var ne=this;te.push(O(Q,ue,ne))}),te}function H(Q,ue,fe){Q._fullLayout._calcInverseTransform(Q);var te=Q._fullLayout._invScaleX,ne=Q._fullLayout._invScaleY,ve=fe.getBoundingClientRect(),le=d.select(fe).datum(),xe=le.categoryViewModel,Se=xe.parcatsViewModel,Re=Se.model.dimensions[xe.model.dimensionInd],Ee=Se.trace,Oe=ve.y+ve.height/2,Be,Le;Se.dimensions.length>1&&Re.displayInd===Se.dimensions.length-1?(Be=ve.left,Le="left"):(Be=ve.left+ve.width,Le="right");var Te=xe.model.categoryLabel,De=le.parcatsViewModel.model.count,Ve=0;le.categoryViewModel.bands.forEach(function(Et){Et.color===le.color&&(Ve+=Et.count)});var Ye=xe.model.count,Ne=0;Se.pathSelection.each(function(Et){Et.model.color===le.color&&(Ne+=Et.model.count)});var Xe=Ve/De,ht=Ve/Ne,st=Ve/Ye,it={countLabel:De,categoryLabel:Te,probabilityLabel:Xe.toFixed(3)},nt=[];xe.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&nt.push(["Count:",it.countLabel].join(" ")),xe.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(nt.push("P(color ∩ "+Te+"): "+it.probabilityLabel),nt.push("P("+Te+" | color): "+ht.toFixed(3)),nt.push("P(color | "+Te+"): "+st.toFixed(3)));var pt=nt.join("<br>"),Tt=r.mostReadable(le.color,["black","white"]);return{trace:Ee,x:te*(Be-ue.left),y:ne*(Oe-ue.top),text:pt,color:le.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:Tt,fontSize:10,idealAlign:Le,hovertemplate:Ee.hovertemplate,hovertemplateLabels:it,eventData:[{data:Ee._input,fullData:Ee,category:Te,count:De,probability:Xe,categorycount:Ye,colorcount:Ne,bandcolorcount:Ve}]}}function k(Q){if(!Q.parcatsViewModel.dragDimension&&Q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var ue=d.mouse(this)[1];if(ue<-1)return;var fe=Q.parcatsViewModel.graphDiv,te=fe._fullLayout,ne=te._paperdiv.node().getBoundingClientRect(),ve=Q.parcatsViewModel.hoveron,le=this;if(ve==="color"?(o(le),T(le,"plotly_hover",d.event)):(S(le),R(le,"plotly_hover",d.event)),Q.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var xe;ve==="category"?xe=O(fe,ne,le):ve==="color"?xe=H(fe,ne,le):ve==="dimension"&&(xe=N(fe,ne,le)),xe&&_.loneHover(xe,{container:te._hoverlayer.node(),outerContainer:te._paper.node(),gd:fe})}}}function V(Q){var ue=Q.parcatsViewModel;if(!ue.dragDimension&&(l(ue.pathSelection),L(ue.dimensionSelection.selectAll("g.category")),A(ue.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),_.loneUnhover(ue.graphDiv._fullLayout._hoverlayer.node()),ue.pathSelection.sort(g),ue.hoverinfoItems.indexOf("skip")===-1)){var fe=Q.parcatsViewModel.hoveron,te=this;fe==="color"?T(te,"plotly_unhover",d.event):R(te,"plotly_unhover",d.event)}}function G(Q){Q.parcatsViewModel.arrangement!=="fixed"&&(Q.dragDimensionDisplayInd=Q.model.displayInd,Q.initialDragDimensionDisplayInds=Q.parcatsViewModel.model.dimensions.map(function(ue){return ue.displayInd}),Q.dragHasMoved=!1,Q.dragCategoryDisplayInd=null,d.select(this).selectAll("g.category").select("rect.catrect").each(function(ue){var fe=d.mouse(this)[0],te=d.mouse(this)[1];-2<=fe&&fe<=ue.width+2&&-2<=te&&te<=ue.height+2&&(Q.dragCategoryDisplayInd=ue.model.displayInd,Q.initialDragCategoryDisplayInds=Q.model.categories.map(function(ne){return ne.displayInd}),ue.model.dragY=ue.y,x.raiseToTop(this.parentNode),d.select(this.parentNode).selectAll("rect.bandrect").each(function(ne){ne.y<te&&te<=ne.y+ne.height&&(Q.potentialClickBand=this)}))}),Q.parcatsViewModel.dragDimension=Q,_.loneUnhover(Q.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function U(Q){if(Q.parcatsViewModel.arrangement!=="fixed"&&(Q.dragHasMoved=!0,Q.dragDimensionDisplayInd!==null)){var ue=Q.dragDimensionDisplayInd,fe=ue-1,te=ue+1,ne=Q.parcatsViewModel.dimensions[ue];if(Q.dragCategoryDisplayInd!==null){var ve=ne.categories[Q.dragCategoryDisplayInd];ve.model.dragY+=d.event.dy;var le=ve.model.dragY,xe=ve.model.displayInd,Se=ne.categories,Re=Se[xe-1],Ee=Se[xe+1];Re!==void 0&&le<Re.y+Re.height/2&&(ve.model.displayInd=Re.model.displayInd,Re.model.displayInd=xe),Ee!==void 0&&le+ve.height>Ee.y+Ee.height/2&&(ve.model.displayInd=Ee.model.displayInd,Ee.model.displayInd=xe),Q.dragCategoryDisplayInd=ve.model.displayInd}if(Q.dragCategoryDisplayInd===null||Q.parcatsViewModel.arrangement==="freeform"){ne.model.dragX=d.event.x;var Oe=Q.parcatsViewModel.dimensions[fe],Be=Q.parcatsViewModel.dimensions[te];Oe!==void 0&&ne.model.dragX<Oe.x+Oe.width&&(ne.model.displayInd=Oe.model.displayInd,Oe.model.displayInd=ue),Be!==void 0&&ne.model.dragX+ne.width>Be.x&&(ne.model.displayInd=Be.model.displayInd,Be.model.displayInd=Q.dragDimensionDisplayInd),Q.dragDimensionDisplayInd=ne.model.displayInd}j(Q.parcatsViewModel),q(Q.parcatsViewModel),ie(Q.parcatsViewModel),re(Q.parcatsViewModel)}}function Y(Q){if(Q.parcatsViewModel.arrangement!=="fixed"&&Q.dragDimensionDisplayInd!==null){d.select(this).selectAll("text").attr("font-weight","normal");var ue={},fe=ee(Q.parcatsViewModel),te=Q.parcatsViewModel.model.dimensions.map(function(Be){return Be.displayInd}),ne=Q.initialDragDimensionDisplayInds.some(function(Be,Le){return Be!==te[Le]});ne&&te.forEach(function(Be,Le){var Te=Q.parcatsViewModel.model.dimensions[Le].containerInd;ue["dimensions["+Te+"].displayindex"]=Be});var ve=!1;if(Q.dragCategoryDisplayInd!==null){var le=Q.model.categories.map(function(Be){return Be.displayInd});if(ve=Q.initialDragCategoryDisplayInds.some(function(Be,Le){return Be!==le[Le]}),ve){var xe=Q.model.categories.slice().sort(function(Be,Le){return Be.displayInd-Le.displayInd}),Se=xe.map(function(Be){return Be.categoryValue}),Re=xe.map(function(Be){return Be.categoryLabel});ue["dimensions["+Q.model.containerInd+"].categoryarray"]=[Se],ue["dimensions["+Q.model.containerInd+"].ticktext"]=[Re],ue["dimensions["+Q.model.containerInd+"].categoryorder"]="array"}}if(Q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!Q.dragHasMoved&&Q.potentialClickBand&&(Q.parcatsViewModel.hoveron==="color"?T(Q.potentialClickBand,"plotly_click",d.event.sourceEvent):R(Q.potentialClickBand,"plotly_click",d.event.sourceEvent)),Q.model.dragX=null,Q.dragCategoryDisplayInd!==null){var Ee=Q.parcatsViewModel.dimensions[Q.dragDimensionDisplayInd].categories[Q.dragCategoryDisplayInd];Ee.model.dragY=null,Q.dragCategoryDisplayInd=null}Q.dragDimensionDisplayInd=null,Q.parcatsViewModel.dragDimension=null,Q.dragHasMoved=null,Q.potentialClickBand=null,j(Q.parcatsViewModel),q(Q.parcatsViewModel);var Oe=d.transition().duration(300).ease("cubic-in-out");Oe.each(function(){ie(Q.parcatsViewModel,!0),re(Q.parcatsViewModel,!0)}).each("end",function(){(ne||ve)&&a.restyle(Q.parcatsViewModel.graphDiv,ue,[fe])})}}function ee(Q){for(var ue,fe=Q.graphDiv._fullData,te=0;te<fe.length;te++)if(Q.key===fe[te].uid){ue=te;break}return ue}function re(Q,ue){ue===void 0&&(ue=!1);function fe(te){return ue?te.transition():te}Q.pathSelection.data(function(te){return te.paths},i),fe(Q.pathSelection).attr("d",function(te){return te.svgD})}function ie(Q,ue){ue===void 0&&(ue=!1);function fe(Se){return ue?Se.transition():Se}Q.dimensionSelection.data(function(Se){return Se.dimensions},i);var te=Q.dimensionSelection.selectAll("g.category").data(function(Se){return Se.categories},i);fe(Q.dimensionSelection).attr("transform",function(Se){return v(Se.x,0)}),fe(te).attr("transform",function(Se){return v(0,Se.y)});var ne=te.select(".dimlabel");ne.text(function(Se,Re){return Re===0?Se.parcatsViewModel.model.dimensions[Se.model.dimensionInd].dimensionLabel:null});var ve=te.select(".catlabel");ve.attr("text-anchor",function(Se){return f(Se)?"start":"end"}).attr("x",function(Se){return f(Se)?Se.width+5:-5}).each(function(Se){var Re,Ee;f(Se)?(Re=Se.width+5,Ee="start"):(Re=-5,Ee="end"),d.select(this).selectAll("tspan").attr("x",Re).attr("text-anchor",Ee)});var le=te.selectAll("rect.bandrect").data(function(Se){return Se.bands},i),xe=le.enter().append("rect").attr("class","bandrect").attr("cursor","move").attr("stroke-opacity",0).attr("fill",function(Se){return Se.color}).attr("fill-opacity",0);le.attr("fill",function(Se){return Se.color}).attr("width",function(Se){return Se.width}).attr("height",function(Se){return Se.height}).attr("y",function(Se){return Se.y}),A(xe),le.each(function(){x.raiseToTop(this)}),le.exit().remove()}function se(Q,ue,fe){var te=fe[0],ne=ue.margin||{l:80,r:80,t:100,b:80},ve=te.trace,le=ve.domain,xe=ue.width,Se=ue.height,Re=Math.floor(xe*(le.x[1]-le.x[0])),Ee=Math.floor(Se*(le.y[1]-le.y[0])),Oe=le.x[0]*xe+ne.l,Be=ue.height-le.y[1]*ue.height+ne.t,Le=ve.line.shape,Te;ve.hoverinfo==="all"?Te=["count","probability"]:Te=(ve.hoverinfo||"").split("+");var De={trace:ve,key:ve.uid,model:te,x:Oe,y:Be,width:Re,height:Ee,hoveron:ve.hoveron,hoverinfoItems:Te,arrangement:ve.arrangement,bundlecolors:ve.bundlecolors,sortpaths:ve.sortpaths,labelfont:ve.labelfont,categorylabelfont:ve.tickfont,pathShape:Le,dragDimension:null,margin:ne,paths:[],dimensions:[],graphDiv:Q,traceSelection:null,pathSelection:null,dimensionSelection:null};return te.dimensions&&(j(De),q(De)),De}function ce(Q,ue,fe,te,ne){var ve=[],le=[],xe,Se;for(Se=0;Se<fe.length-1;Se++)xe=P(fe[Se]+Q[Se],Q[Se+1]),ve.push(xe(ne)),le.push(xe(1-ne));var Re="M "+Q[0]+","+ue[0];for(Re+="l"+fe[0]+",0 ",Se=1;Se<fe.length;Se++)Re+="C"+ve[Se-1]+","+ue[Se-1]+" "+le[Se-1]+","+ue[Se]+" "+Q[Se]+","+ue[Se],Re+="l"+fe[Se]+",0 ";for(Re+="l0,"+te+" ",Re+="l -"+fe[fe.length-1]+",0 ",Se=fe.length-2;Se>=0;Se--)Re+="C"+le[Se]+","+(ue[Se+1]+te)+" "+ve[Se]+","+(ue[Se]+te)+" "+(Q[Se]+fe[Se])+","+(ue[Se]+te),Re+="l-"+fe[Se]+",0 ";return Re+="Z",Re}function q(Q){var ue=Q.dimensions,fe=Q.model,te=ue.map(function(Ue){return Ue.categories.map(function(ze){return ze.y})}),ne=Q.model.dimensions.map(function(Ue){return Ue.categories.map(function(ze){return ze.displayInd})}),ve=Q.model.dimensions.map(function(Ue){return Ue.displayInd}),le=Q.dimensions.map(function(Ue){return Ue.model.dimensionInd}),xe=ue.map(function(Ue){return Ue.x}),Se=ue.map(function(Ue){return Ue.width}),Re=[];for(var Ee in fe.paths)fe.paths.hasOwnProperty(Ee)&&Re.push(fe.paths[Ee]);function Oe(Ue){var ze=Ue.categoryInds.map(function(lt,Qe){return ne[Qe][lt]}),rt=le.map(function(lt){return ze[lt]});return rt}Re.sort(function(Ue,ze){var rt=Oe(Ue),lt=Oe(ze);return Q.sortpaths==="backward"&&(rt.reverse(),lt.reverse()),rt.push(Ue.valueInds[0]),lt.push(ze.valueInds[0]),Q.bundlecolors&&(rt.unshift(Ue.rawColor),lt.unshift(ze.rawColor)),rt<lt?-1:rt>lt?1:0});for(var Be=new Array(Re.length),Le=ue[0].model.count,Te=ue[0].categories.map(function(Ue){return Ue.height}).reduce(function(Ue,ze){return Ue+ze}),De=0;De<Re.length;De++){var Ve=Re[De],Ye;Le>0?Ye=Te*(Ve.count/Le):Ye=0;for(var Ne=new Array(te.length),Xe=0;Xe<Ve.categoryInds.length;Xe++){var ht=Ve.categoryInds[Xe],st=ne[Xe][ht],it=ve[Xe];Ne[it]=te[it][st],te[it][st]+=Ye;var nt=Q.dimensions[it].categories[st],pt=nt.bands.length,Tt=nt.bands[pt-1];if(Tt===void 0||Ve.rawColor!==Tt.rawColor){var Et=Tt===void 0?0:Tt.y+Tt.height;nt.bands.push({key:Et,color:Ve.color,rawColor:Ve.rawColor,height:Ye,width:nt.width,count:Ve.count,y:Et,categoryViewModel:nt,parcatsViewModel:Q})}else{var Dt=nt.bands[pt-1];Dt.height+=Ye,Dt.count+=Ve.count}}var et;Q.pathShape==="hspline"?et=ce(xe,Ne,Se,Ye,.5):et=ce(xe,Ne,Se,Ye,0),Be[De]={key:Ve.valueInds[0],model:Ve,height:Ye,leftXs:xe,topYs:Ne,dimWidths:Se,svgD:et,parcatsViewModel:Q}}Q.paths=Be}function j(Q){var ue=Q.model.dimensions.map(function(le){return{displayInd:le.displayInd,dimensionInd:le.dimensionInd}});ue.sort(function(le,xe){return le.displayInd-xe.displayInd});var fe=[];for(var te in ue){var ne=ue[te].dimensionInd,ve=Q.model.dimensions[ne];fe.push(Z(Q,ve))}Q.dimensions=fe}function Z(Q,ue){var fe=40,te=16,ne=Q.model.dimensions.length,ve=ue.displayInd,le,xe,Se;ne>1?le=(Q.width-2*fe-te)/(ne-1):le=0,xe=fe,Se=xe+le*ve;var Re=[],Ee=Q.model.maxCats,Oe=ue.categories.length,Be=8,Le=ue.count,Te=Q.height-Be*(Ee-1),De,Ve,Ye,Ne,Xe,ht=(Ee-Oe)*Be/2,st=ue.categories.map(function(it){return{displayInd:it.displayInd,categoryInd:it.categoryInd}});for(st.sort(function(it,nt){return it.displayInd-nt.displayInd}),Xe=0;Xe<Oe;Xe++)Ne=st[Xe].categoryInd,Ve=ue.categories[Ne],Le>0?De=Ve.count/Le*Te:De=0,Ye={key:Ve.valueInds[0],model:Ve,width:te,height:De,y:Ve.dragY!==null?Ve.dragY:ht,bands:[],parcatsViewModel:Q},ht=ht+De+Be,Re.push(Ye);return{key:ue.dimensionInd,x:ue.dragX!==null?ue.dragX:Se,y:0,width:te,model:ue,categories:Re,parcatsViewModel:Q,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}},45784:function(z,B,e){var d=e(45460);z.exports=function(a,_,x,v){var y=a._fullLayout,r=y._paper,n=y._size;d(a,r,_,{width:n.w,height:n.h,margin:{t:n.t,r:n.r,b:n.b,l:n.l}},x,v)}},73362:function(z,B,e){var d=e(50693),P=e(13838),a=e(41940),_=e(27670).Y,x=e(1426).extendFlat,v=e(44467).templatedArray;z.exports={domain:_({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:a({editType:"plot"}),tickfont:a({editType:"plot"}),rangefont:a({editType:"plot"}),dimensions:v("dimension",{label:{valType:"string",editType:"plot"},tickvals:x({},P.tickvals,{editType:"plot"}),ticktext:x({},P.ticktext,{editType:"plot"}),tickformat:x({},P.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:x({editType:"calc"},d("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}},57920:function(z,B,e){var d=e(25706),P=e(39898),a=e(28984).keyFun,_=e(28984).repeat,x=e(71828).sorterAsc,v=e(71828).strTranslate,y=d.bar.snapRatio;function r(Y,ee){return Y*(1-y)+ee*y}var n=d.bar.snapClose;function u(Y,ee){return Y*(1-n)+ee*n}function i(Y,ee,re,ie){if(f(re,ie))return re;var se=Y?-1:1,ce=0,q=ee.length-1;if(se<0){var j=ce;ce=q,q=j}for(var Z=ee[ce],Q=Z,ue=ce;se*ue<se*q;ue+=se){var fe=ue+se,te=ee[fe];if(se*re<se*u(Z,te))return r(Z,Q);if(se*re<se*te||fe===q)return r(te,Z);Q=Z,Z=te}}function f(Y,ee){for(var re=0;re<ee.length;re++)if(Y>=ee[re][0]&&Y<=ee[re][1])return!0;return!1}function g(Y){Y.attr("x",-d.bar.captureWidth/2).attr("width",d.bar.captureWidth)}function h(Y){Y.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function b(Y){if(!Y.brush.filterSpecified)return"0,"+Y.height;for(var ee=p(Y.brush.filter.getConsolidated(),Y.height),re=[0],ie,se,ce,q=ee.length?ee[0][0]:null,j=0;j<ee.length;j++)ie=ee[j],se=ie[1]-ie[0],re.push(q),re.push(se),ce=j+1,ce<ee.length&&(q=ee[ce][0]-ie[1]);return re.push(Y.height),re}function p(Y,ee){return Y.map(function(re){return re.map(function(ie){return Math.max(0,ie*ee)}).sort(x)})}function E(Y,ee){var re=d.bar.handleHeight;if(!(ee>Y[1]+re||ee<Y[0]-re))return ee>=.9*Y[1]+.1*Y[0]?"n":ee<=.9*Y[0]+.1*Y[1]?"s":"ns"}function c(){P.select(document.body).style("cursor",null)}function l(Y){Y.attr("stroke-dasharray",b)}function m(Y,ee){var re=P.select(Y).selectAll(".highlight, .highlight-shadow"),ie=ee?re.transition().duration(d.bar.snapDuration).each("end",ee):re;l(ie)}function M(Y,ee){var re=Y.brush,ie=re.filterSpecified,se=NaN,ce={},q;if(ie){var j=Y.height,Z=re.filter.getConsolidated(),Q=p(Z,j),ue=NaN,fe=NaN,te=NaN;for(q=0;q<=Q.length;q++){var ne=Q[q];if(ne&&ne[0]<=ee&&ee<=ne[1]){ue=q;break}else if(fe=q?q-1:NaN,ne&&ne[0]>ee){te=q;break}}if(se=ue,isNaN(se)&&(isNaN(fe)||isNaN(te)?se=isNaN(fe)?te:fe:se=ee-Q[fe][1]<Q[te][0]-ee?fe:te),!isNaN(se)){var ve=Q[se],le=E(ve,ee);le&&(ce.interval=Z[se],ce.intervalPix=ve,ce.region=le)}}if(Y.ordinal&&!ce.region){var xe=Y.unitTickvals,Se=Y.unitToPaddedPx.invert(ee);for(q=0;q<xe.length;q++){var Re=[xe[Math.max(q-1,0)]*.25+xe[q]*.75,xe[Math.min(q+1,xe.length-1)]*.25+xe[q]*.75];if(Se>=Re[0]&&Se<=Re[1]){ce.clickableOrdinalRange=Re;break}}}return ce}function L(Y,ee){P.event.sourceEvent.stopPropagation();var re=ee.height-P.mouse(Y)[1]-2*d.verticalPadding,ie=ee.unitToPaddedPx.invert(re),se=ee.brush,ce=M(ee,re),q=ce.interval,j=se.svgBrush;if(j.wasDragged=!1,j.grabbingBar=ce.region==="ns",j.grabbingBar){var Z=q.map(ee.unitToPaddedPx);j.grabPoint=re-Z[0]-d.verticalPadding,j.barLength=Z[1]-Z[0]}j.clickableOrdinalRange=ce.clickableOrdinalRange,j.stayingIntervals=ee.multiselect&&se.filterSpecified?se.filter.getConsolidated():[],q&&(j.stayingIntervals=j.stayingIntervals.filter(function(Q){return Q[0]!==q[0]&&Q[1]!==q[1]})),j.startExtent=ce.region?q[ce.region==="s"?1:0]:ie,ee.parent.inBrushDrag=!0,j.brushStartCallback()}function D(Y,ee){P.event.sourceEvent.stopPropagation();var re=ee.height-P.mouse(Y)[1]-2*d.verticalPadding,ie=ee.brush.svgBrush;ie.wasDragged=!0,ie._dragging=!0,ie.grabbingBar?ie.newExtent=[re-ie.grabPoint,re+ie.barLength-ie.grabPoint].map(ee.unitToPaddedPx.invert):ie.newExtent=[ie.startExtent,ee.unitToPaddedPx.invert(re)].sort(x),ee.brush.filterSpecified=!0,ie.extent=ie.stayingIntervals.concat([ie.newExtent]),ie.brushCallback(ee),m(Y.parentNode)}function A(Y,ee){var re=ee.brush,ie=re.filter,se=re.svgBrush;se._dragging||(C(Y,ee),D(Y,ee),ee.brush.svgBrush.wasDragged=!1),se._dragging=!1;var ce=P.event;ce.sourceEvent.stopPropagation();var q=se.grabbingBar;if(se.grabbingBar=!1,se.grabLocation=void 0,ee.parent.inBrushDrag=!1,c(),!se.wasDragged){se.wasDragged=void 0,se.clickableOrdinalRange?re.filterSpecified&&ee.multiselect?se.extent.push(se.clickableOrdinalRange):(se.extent=[se.clickableOrdinalRange],re.filterSpecified=!0):q?(se.extent=se.stayingIntervals,se.extent.length===0&&N(re)):N(re),se.brushCallback(ee),m(Y.parentNode),se.brushEndCallback(re.filterSpecified?ie.getConsolidated():[]);return}var j=function(){ie.set(ie.getConsolidated())};if(ee.ordinal){var Z=ee.unitTickvals;Z[Z.length-1]<Z[0]&&Z.reverse(),se.newExtent=[i(0,Z,se.newExtent[0],se.stayingIntervals),i(1,Z,se.newExtent[1],se.stayingIntervals)];var Q=se.newExtent[1]>se.newExtent[0];se.extent=se.stayingIntervals.concat(Q?[se.newExtent]:[]),se.extent.length||N(re),se.brushCallback(ee),Q?m(Y.parentNode,j):(j(),m(Y.parentNode))}else j();se.brushEndCallback(re.filterSpecified?ie.getConsolidated():[])}function C(Y,ee){var re=ee.height-P.mouse(Y)[1]-2*d.verticalPadding,ie=M(ee,re),se="crosshair";ie.clickableOrdinalRange?se="pointer":ie.region&&(se=ie.region+"-resize"),P.select(document.body).style("cursor",se)}function S(Y){Y.on("mousemove",function(ee){P.event.preventDefault(),ee.parent.inBrushDrag||C(this,ee)}).on("mouseleave",function(ee){ee.parent.inBrushDrag||c()}).call(P.behavior.drag().on("dragstart",function(ee){L(this,ee)}).on("drag",function(ee){D(this,ee)}).on("dragend",function(ee){A(this,ee)}))}function o(Y,ee){return Y[0]-ee[0]}function R(Y,ee,re){var ie=re._context.staticPlot,se=Y.selectAll(".background").data(_);se.enter().append("rect").classed("background",!0).call(g).call(h).style("pointer-events",ie?"none":"auto").attr("transform",v(0,d.verticalPadding)),se.call(S).attr("height",function(j){return j.height-d.verticalPadding});var ce=Y.selectAll(".highlight-shadow").data(_);ce.enter().append("line").classed("highlight-shadow",!0).attr("x",-d.bar.width/2).attr("stroke-width",d.bar.width+d.bar.strokeWidth).attr("stroke",ee).attr("opacity",d.bar.strokeOpacity).attr("stroke-linecap","butt"),ce.attr("y1",function(j){return j.height}).call(l);var q=Y.selectAll(".highlight").data(_);q.enter().append("line").classed("highlight",!0).attr("x",-d.bar.width/2).attr("stroke-width",d.bar.width-d.bar.strokeWidth).attr("stroke",d.bar.fillColor).attr("opacity",d.bar.fillOpacity).attr("stroke-linecap","butt"),q.attr("y1",function(j){return j.height}).call(l)}function T(Y,ee,re){var ie=Y.selectAll("."+d.cn.axisBrush).data(_,a);ie.enter().append("g").classed(d.cn.axisBrush,!0),R(ie,ee,re)}function O(Y){return Y.svgBrush.extent.map(function(ee){return ee.slice()})}function N(Y){Y.filterSpecified=!1,Y.svgBrush.extent=[[-1/0,1/0]]}function H(Y){return function(re){var ie=re.brush,se=O(ie),ce=se.slice();ie.filter.set(ce),Y()}}function k(Y){for(var ee=Y.slice(),re=[],ie,se=ee.shift();se;){for(ie=se.slice();(se=ee.shift())&&se[0]<=ie[1];)ie[1]=Math.max(ie[1],se[1]);re.push(ie)}return re.length===1&&re[0][0]>re[0][1]&&(re=[]),re}function V(){var Y=[],ee,re;return{set:function(ie){Y=ie.map(function(se){return se.slice().sort(x)}).sort(o),Y.length===1&&Y[0][0]===-1/0&&Y[0][1]===1/0&&(Y=[[0,-1]]),ee=k(Y),re=Y.reduce(function(se,ce){return[Math.min(se[0],ce[0]),Math.max(se[1],ce[1])]},[1/0,-1/0])},get:function(){return Y.slice()},getConsolidated:function(){return ee},getBounds:function(){return re}}}function G(Y,ee,re,ie,se,ce){var q=V();return q.set(re),{filter:q,filterSpecified:ee,svgBrush:{extent:[],brushStartCallback:ie,brushCallback:H(se),brushEndCallback:ce}}}function U(Y,ee){if(Array.isArray(Y[0])?(Y=Y.map(function(ie){return ie.sort(x)}),ee.multiselect?Y=k(Y.sort(o)):Y=[Y[0]]):Y=[Y.sort(x)],ee.tickvals){var re=ee.tickvals.slice().sort(x);if(Y=Y.map(function(ie){var se=[i(0,re,ie[0],[]),i(1,re,ie[1],[])];if(se[1]>se[0])return se}).filter(function(ie){return ie}),!Y.length)return}return Y.length>1?Y:Y[0]}z.exports={makeBrush:G,ensureAxisBrush:T,cleanRanges:U}},71791:function(z,B,e){z.exports={attributes:e(73362),supplyDefaults:e(3633),calc:e(24639),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:e(49351),categories:["gl","regl","noOpacity","noHover"],meta:{}}},49351:function(z,B,e){var d=e(39898),P=e(27659).a0,a=e(21341),_=e(77922);B.name="parcoords",B.plot=function(x){var v=P(x.calcdata,"parcoords")[0];v.length&&a(x,v)},B.clean=function(x,v,y,r){var n=r._has&&r._has("parcoords"),u=v._has&&v._has("parcoords");n&&!u&&(r._paperdiv.selectAll(".parcoords").remove(),r._glimages.selectAll("*").remove())},B.toSVG=function(x){var v=x._fullLayout._glimages,y=d.select(x).selectAll(".svg-container"),r=y.filter(function(u,i){return i===y.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function n(){var u=this,i=u.toDataURL("image/png"),f=v.append("svg:image");f.attr({xmlns:_.svg,"xlink:href":i,preserveAspectRatio:"none",x:0,y:0,width:u.style.width,height:u.style.height})}r.each(n),window.setTimeout(function(){d.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},24639:function(z,B,e){var d=e(71828).isArrayOrTypedArray,P=e(21081),a=e(28984).wrap;z.exports=function(v,y){var r,n;return P.hasColorscale(y,"line")&&d(y.line.color)?(r=y.line.color,n=P.extractOpts(y.line).colorscale,P.calc(v,y,{vals:r,containerStr:"line",cLetter:"c"})):(r=_(y._length),n=[[0,y.line.color],[1,y.line.color]]),a({lineColor:r,cscale:n})};function _(x){for(var v=new Array(x),y=0;y<x;y++)v[y]=.5;return v}},25706:function(z){z.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,captureWidth:10,fillColor:"magenta",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:"axis-extent-text",parcoordsLineLayers:"parcoords-line-layers",parcoordsLineLayer:"parcoords-lines",parcoords:"parcoords",parcoordsControlView:"parcoords-control-view",yAxis:"y-axis",axisOverlays:"axis-overlays",axis:"axis",axisHeading:"axis-heading",axisTitle:"axis-title",axisExtent:"axis-extent",axisExtentTop:"axis-extent-top",axisExtentTopText:"axis-extent-top-text",axisExtentBottom:"axis-extent-bottom",axisExtentBottomText:"axis-extent-bottom-text",axisBrush:"axis-brush"},id:{filterBarPattern:"filter-bar-pattern"}}},3633:function(z,B,e){var d=e(71828),P=e(52075).hasColorscale,a=e(1586),_=e(27670).c,x=e(85501),v=e(89298),y=e(73362),r=e(57920),n=e(25706).maxDimensionCount,u=e(94397);function i(g,h,b,p,E){var c=E("line.color",b);if(P(g,"line")&&d.isArrayOrTypedArray(c)){if(c.length)return E("line.colorscale"),a(g,h,p,E,{prefix:"line.",cLetter:"c"}),c.length;h.line.color=b}return 1/0}function f(g,h,b,p){function E(L,D){return d.coerce(g,h,y.dimensions,L,D)}var c=E("values"),l=E("visible");if(c&&c.length||(l=h.visible=!1),l){E("label"),E("tickvals"),E("ticktext"),E("tickformat");var m=E("range");h._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:m},v.setConvert(h._ax,p.layout),E("multiselect");var M=E("constraintrange");M&&(h.constraintrange=r.cleanRanges(M,h))}}z.exports=function(h,b,p,E){function c(D,A){return d.coerce(h,b,y,D,A)}var l=h.dimensions;Array.isArray(l)&&l.length>n&&(d.log("parcoords traces support up to "+n+" dimensions at the moment"),l.splice(n));var m=x(h,b,{name:"dimensions",layout:E,handleItemDefaults:f}),M=i(h,b,p,E,c);_(b,E,c),(!Array.isArray(m)||!m.length)&&(b.visible=!1),u(b,m,"values",M);var L={family:E.font.family,size:Math.round(E.font.size/1.2),color:E.font.color};d.coerceFont(c,"labelfont",L),d.coerceFont(c,"tickfont",L),d.coerceFont(c,"rangefont",L),c("labelangle"),c("labelside"),c("unselected.line.color"),c("unselected.line.opacity")}},1602:function(z,B,e){var d=e(71828).isTypedArray;B.convertTypedArray=function(P){return d(P)?Array.prototype.slice.call(P):P},B.isOrdinal=function(P){return!!P.tickvals},B.isVisible=function(P){return P.visible||!("visible"in P)}},67618:function(z,B,e){var d=e(71791);d.plot=e(21341),z.exports=d},83398:function(z,B,e){var d=e(56068),P=d([`precision highp float;
#define GLSLIFY 1
varying vec4 fragColor;
attribute vec4 p01_04, p05_08, p09_12, p13_16,
p17_20, p21_24, p25_28, p29_32,
p33_36, p37_40, p41_44, p45_48,
p49_52, p53_56, p57_60, colors;
uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,
loA, hiA, loB, hiB, loC, hiC, loD, hiD;
uniform vec2 resolution, viewBoxPos, viewBoxSize;
uniform float maskHeight;
uniform float drwLayer; // 0: context, 1: focus, 2: pick
uniform vec4 contextColor;
uniform sampler2D maskTexture, palette;
bool isPick = (drwLayer > 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));
}
`]),a=d([`precision highp float;
#define GLSLIFY 1
varying vec4 fragColor;
void main() {
gl_FragColor = fragColor;
}
`]),_=e(25706).maxDimensionCount,x=e(71828),v=1e-6,y=2048,r=new Uint8Array(4),n=new Uint8Array(4),u={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function i(C){C.read({x:0,y:0,width:1,height:1,data:r})}function f(C,S,o,R,T){var O=C._gl;O.enable(O.SCISSOR_TEST),O.scissor(S,o,R,T),C.clear({color:[0,0,0,0],depth:1})}function g(C,S,o,R,T,O){var N=O.key;function H(k){var V=Math.min(R,T-k*R);k===0&&(window.cancelAnimationFrame(o.currentRafs[N]),delete o.currentRafs[N],f(C,O.scissorX,O.scissorY,O.scissorWidth,O.viewBoxSize[1])),!o.clearOnly&&(O.count=2*V,O.offset=2*k*R,S(O),k*R+V<T&&(o.currentRafs[N]=window.requestAnimationFrame(function(){H(k+1)})),o.drawCompleted=!1)}o.drawCompleted||(i(C),o.drawCompleted=!0),H(0)}function h(C){return Math.max(v,Math.min(1-v,C))}function b(C,S){for(var o=new Array(256),R=0;R<256;R++)o[R]=C(R/255).concat(S);return o}function p(C,S){return(C>>>8*S)%256/255}function E(C,S,o){for(var R=new Array(C*(_+4)),T=0,O=0;O<C;O++){for(var N=0;N<_;N++)R[T++]=N<S.length?S[N].paddedUnitValues[O]:.5;R[T++]=p(O,2),R[T++]=p(O,1),R[T++]=p(O,0),R[T++]=h(o[O])}return R}function c(C,S,o){for(var R=new Array(S*8),T=0,O=0;O<S;O++)for(var N=0;N<2;N++)for(var H=0;H<4;H++){var k=C*4+H,V=o[O*64+k];k===63&&N===0&&(V*=-1),R[T++]=V}return R}function l(C){var S="0"+C;return S.substr(S.length-2)}function m(C){return C<_?"p"+l(C+1)+"_"+l(C+4):"colors"}function M(C,S,o){for(var R=0;R<=_;R+=4)C[m(R)](c(R/4,S,o))}function L(C){for(var S={},o=0;o<=_;o+=4)S[m(o)]=C.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)});return S}function D(C,S,o,R,T,O,N,H,k,V,G,U,Y,ee){for(var re=[[],[]],ie=0;ie<64;ie++)re[0][ie]=ie===T?1:0,re[1][ie]=ie===O?1:0;N*=ee,H*=ee,k*=ee,V*=ee;var se=C.lines.canvasOverdrag*ee,ce=C.domain,q=C.canvasWidth*ee,j=C.canvasHeight*ee,Z=C.pad.l*ee,Q=C.pad.b*ee,ue=C.layoutHeight*ee,fe=C.layoutWidth*ee,te=C.deselectedLines.color,ne=C.deselectedLines.opacity,ve=x.extendFlat({key:G,resolution:[q,j],viewBoxPos:[N+se,H],viewBoxSize:[k,V],i0:T,i1:O,dim0A:re[0].slice(0,16),dim0B:re[0].slice(16,32),dim0C:re[0].slice(32,48),dim0D:re[0].slice(48,64),dim1A:re[1].slice(0,16),dim1B:re[1].slice(16,32),dim1C:re[1].slice(32,48),dim1D:re[1].slice(48,64),drwLayer:U,contextColor:[te[0]/255,te[1]/255,te[2]/255,ne!=="auto"?te[3]*ne:Math.max(1/255,Math.pow(1/C.lines.color.length,1/3))],scissorX:(R===S?0:N+se)+(Z-se)+fe*ce.x[0],scissorWidth:(R===o?q-N+se:k+.5)+(R===S?N+se:0),scissorY:H+Q+ue*ce.y[0],scissorHeight:V,viewportX:Z-se+fe*ce.x[0],viewportY:Q+ue*ce.y[0],viewportWidth:q,viewportHeight:j},Y);return ve}function A(C){var S=y-1,o=Math.max(0,Math.floor(C[0]*S),0),R=Math.min(S,Math.ceil(C[1]*S),S);return[Math.min(o,R),Math.max(o,R)]}z.exports=function(C,S){var o=S.context,R=S.pick,T=S.regl,O=T._gl,N=O.getParameter(O.ALIASED_LINE_WIDTH_RANGE),H=Math.max(N[0],Math.min(N[1],S.viewModel.plotGlPixelRatio)),k={currentRafs:{},drawCompleted:!0,clearOnly:!1},V,G,U,Y,ee=L(T),re,ie=T.texture(u),se=[];q(S);var ce=T({profile:!1,blend:{enable:o,func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:1,dstAlpha:1},equation:{rgb:"add",alpha:"add"},color:[0,0,0,0]},depth:{enable:!o,mask:!0,func:"less",range:[0,1]},cull:{enable:!0,face:"back"},scissor:{enable:!0,box:{x:T.prop("scissorX"),y:T.prop("scissorY"),width:T.prop("scissorWidth"),height:T.prop("scissorHeight")}},viewport:{x:T.prop("viewportX"),y:T.prop("viewportY"),width:T.prop("viewportWidth"),height:T.prop("viewportHeight")},dither:!1,vert:P,frag:a,primitive:"lines",lineWidth:H,attributes:ee,uniforms:{resolution:T.prop("resolution"),viewBoxPos:T.prop("viewBoxPos"),viewBoxSize:T.prop("viewBoxSize"),dim0A:T.prop("dim0A"),dim1A:T.prop("dim1A"),dim0B:T.prop("dim0B"),dim1B:T.prop("dim1B"),dim0C:T.prop("dim0C"),dim1C:T.prop("dim1C"),dim0D:T.prop("dim0D"),dim1D:T.prop("dim1D"),loA:T.prop("loA"),hiA:T.prop("hiA"),loB:T.prop("loB"),hiB:T.prop("hiB"),loC:T.prop("loC"),hiC:T.prop("hiC"),loD:T.prop("loD"),hiD:T.prop("hiD"),palette:ie,contextColor:T.prop("contextColor"),maskTexture:T.prop("maskTexture"),drwLayer:T.prop("drwLayer"),maskHeight:T.prop("maskHeight")},offset:T.prop("offset"),count:T.prop("count")});function q(te){V=te.model,G=te.viewModel,U=G.dimensions.slice(),Y=U[0]?U[0].values.length:0;var ne=V.lines,ve=R?ne.color.map(function(xe,Se){return Se/ne.color.length}):ne.color,le=E(Y,U,ve);M(ee,Y,le),!o&&!R&&(ie=T.texture(x.extendFlat({data:b(V.unitToColor,255)},u)))}function j(te){var ne,ve,le,xe=[[],[]];for(le=0;le<64;le++){var Se=!te&&le<U.length?U[le].brush.filter.getBounds():[-1/0,1/0];xe[0][le]=Se[0],xe[1][le]=Se[1]}var Re=y*8,Ee=new Array(Re);for(ne=0;ne<Re;ne++)Ee[ne]=255;if(!te)for(ne=0;ne<U.length;ne++){var Oe=ne%8,Be=(ne-Oe)/8,Le=Math.pow(2,Oe),Te=U[ne],De=Te.brush.filter.get();if(!(De.length<2)){var Ve=A(De[0])[1];for(ve=1;ve<De.length;ve++){var Ye=A(De[ve]);for(le=Ve+1;le<Ye[0];le++)Ee[le*8+Be]&=~Le;Ve=Math.max(Ve,Ye[1])}}}var Ne={shape:[8,y],format:"alpha",type:"uint8",mag:"nearest",min:"nearest",data:Ee};return re?re(Ne):re=T.texture(Ne),{maskTexture:re,maskHeight:y,loA:xe[0].slice(0,16),loB:xe[0].slice(16,32),loC:xe[0].slice(32,48),loD:xe[0].slice(48,64),hiA:xe[1].slice(0,16),hiB:xe[1].slice(16,32),hiC:xe[1].slice(32,48),hiD:xe[1].slice(48,64)}}function Z(te,ne,ve){var le=te.length,xe,Se,Re,Ee=1/0,Oe=-1/0;for(xe=0;xe<le;xe++)te[xe].dim0.canvasX<Ee&&(Ee=te[xe].dim0.canvasX,Se=xe),te[xe].dim1.canvasX>Oe&&(Oe=te[xe].dim1.canvasX,Re=xe);le===0&&f(T,0,0,V.canvasWidth,V.canvasHeight);var Be=j(o);for(xe=0;xe<le;xe++){var Le=te[xe],Te=Le.dim0.crossfilterDimensionIndex,De=Le.dim1.crossfilterDimensionIndex,Ve=Le.canvasX,Ye=Le.canvasY,Ne=Ve+Le.panelSizeX,Xe=Le.plotGlPixelRatio;if(ne||!se[Te]||se[Te][0]!==Ve||se[Te][1]!==Ne){se[Te]=[Ve,Ne];var ht=D(V,Se,Re,xe,Te,De,Ve,Ye,Le.panelSizeX,Le.panelSizeY,Le.dim0.crossfilterDimensionIndex,o?0:R?2:1,Be,Xe);k.clearOnly=ve;var st=ne?V.lines.blockLineCount:Y;g(T,ce,k,st,Y,ht)}}}function Q(te,ne){return T.read({x:te,y:ne,width:1,height:1,data:n}),n}function ue(te,ne,ve,le){var xe=new Uint8Array(4*ve*le);return T.read({x:te,y:ne,width:ve,height:le,data:xe}),xe}function fe(){C.style["pointer-events"]="none",ie.destroy(),re&&re.destroy();for(var te in ee)ee[te].destroy()}return{render:Z,readPixel:Q,readPixels:ue,destroy:fe,update:q}}},94397:function(z){z.exports=function(B,e,d,P){P||(P=1/0);var a,_;for(a=0;a<e.length;a++)_=e[a],_.visible&&(P=Math.min(P,_[d].length));for(P===1/0&&(P=0),B._length=P,a=0;a<e.length;a++)_=e[a],_.visible&&(_._length=P);return P}},17171:function(z,B,e){var d=e(39898),P=e(71828),a=P.numberFormat,_=e(36652),x=e(89298),v=P.strRotate,y=P.strTranslate,r=e(63893),n=e(91424),u=e(21081),i=e(28984),f=i.keyFun,g=i.repeat,h=i.unwrap,b=e(1602),p=e(25706),E=e(57920),c=e(83398);function l(re,ie,se){return P.aggNums(re,null,ie,se)}function m(re,ie){return L(l(Math.min,re,ie),l(Math.max,re,ie))}function M(re){var ie=re.range;return ie?L(ie[0],ie[1]):m(re.values,re._length)}function L(re,ie){return(isNaN(re)||!isFinite(re))&&(re=0),(isNaN(ie)||!isFinite(ie))&&(ie=0),re===ie&&(re===0?(re-=1,ie+=1):(re*=.9,ie*=1.1)),[re,ie]}function D(re,ie){return ie?function(se,ce){var q=ie[ce];return q??re(se)}:re}function A(re,ie,se,ce,q){var j=M(se);return ce?d.scale.ordinal().domain(ce.map(D(a(se.tickformat),q))).range(ce.map(function(Z){var Q=(Z-j[0])/(j[1]-j[0]);return re-ie+Q*(2*ie-re)})):d.scale.linear().domain(j).range([re-ie,ie])}function C(re,ie){return d.scale.linear().range([ie,re-ie])}function S(re,ie){return d.scale.linear().domain(M(re)).range([ie,1-ie])}function o(re){if(re.tickvals){var ie=M(re);return d.scale.ordinal().domain(re.tickvals).range(re.tickvals.map(function(se){return(se-ie[0])/(ie[1]-ie[0])}))}}function R(re){var ie=re.map(function(j){return j[0]}),se=re.map(function(j){var Z=_(j[1]);return d.rgb("rgb("+Z[0]+","+Z[1]+","+Z[2]+")")}),ce=function(j){return function(Z){return Z[j]}},q="rgb".split("").map(function(j){return d.scale.linear().clamp(!0).domain(ie).range(se.map(ce(j)))});return function(j){return q.map(function(Z){return Z(j)})}}function T(re){return re.dimensions.some(function(ie){return ie.brush.filterSpecified})}function O(re,ie,se){var ce=h(ie),q=ce.trace,j=b.convertTypedArray(ce.lineColor),Z=q.line,Q={color:_(q.unselected.line.color),opacity:q.unselected.line.opacity},ue=u.extractOpts(Z),fe=ue.reversescale?u.flipScale(ce.cscale):ce.cscale,te=q.domain,ne=q.dimensions,ve=re.width,le=q.labelangle,xe=q.labelside,Se=q.labelfont,Re=q.tickfont,Ee=q.rangefont,Oe=P.extendDeepNoArrays({},Z,{color:j.map(d.scale.linear().domain(M({values:j,range:[ue.min,ue.max],_length:q._length}))),blockLineCount:p.blockLineCount,canvasOverdrag:p.overdrag*p.canvasPixelRatio}),Be=Math.floor(ve*(te.x[1]-te.x[0])),Le=Math.floor(re.height*(te.y[1]-te.y[0])),Te=re.margin||{l:80,r:80,t:100,b:80},De=Be,Ve=Le;return{key:se,colCount:ne.filter(b.isVisible).length,dimensions:ne,tickDistance:p.tickDistance,unitToColor:R(fe),lines:Oe,deselectedLines:Q,labelAngle:le,labelSide:xe,labelFont:Se,tickFont:Re,rangeFont:Ee,layoutWidth:ve,layoutHeight:re.height,domain:te,translateX:te.x[0]*ve,translateY:re.height-te.y[1]*re.height,pad:Te,canvasWidth:De*p.canvasPixelRatio+2*Oe.canvasOverdrag,canvasHeight:Ve*p.canvasPixelRatio,width:De,height:Ve,canvasPixelRatio:p.canvasPixelRatio}}function N(re,ie,se){var ce=se.width,q=se.height,j=se.dimensions,Z=se.canvasPixelRatio,Q=function(ve){return ce*ve/Math.max(1,se.colCount-1)},ue=p.verticalPadding/q,fe=C(q,p.verticalPadding),te={key:se.key,xScale:Q,model:se,inBrushDrag:!1},ne={};return te.dimensions=j.filter(b.isVisible).map(function(ve,le){var xe=S(ve,ue),Se=ne[ve.label];ne[ve.label]=(Se||0)+1;var Re=ve.label+(Se?"__"+Se:""),Ee=ve.constraintrange,Oe=Ee&&Ee.length;Oe&&!Array.isArray(Ee[0])&&(Ee=[Ee]);var Be=Oe?Ee.map(function(it){return it.map(xe)}):[[-1/0,1/0]],Le=function(){var it=te;it.focusLayer&&it.focusLayer.render(it.panels,!0);var nt=T(it);!re.contextShown()&&nt?(it.contextLayer&&it.contextLayer.render(it.panels,!0),re.contextShown(!0)):re.contextShown()&&!nt&&(it.contextLayer&&it.contextLayer.render(it.panels,!0,!0),re.contextShown(!1))},Te=ve.values;Te.length>ve._length&&(Te=Te.slice(0,ve._length));var De=ve.tickvals,Ve;function Ye(it,nt){return{val:it,text:Ve[nt]}}function Ne(it,nt){return it.val-nt.val}if(Array.isArray(De)&&De.length){Ve=ve.ticktext,!Array.isArray(Ve)||!Ve.length?Ve=De.map(a(ve.tickformat)):Ve.length>De.length?Ve=Ve.slice(0,De.length):De.length>Ve.length&&(De=De.slice(0,Ve.length));for(var Xe=1;Xe<De.length;Xe++)if(De[Xe]<De[Xe-1]){for(var ht=De.map(Ye).sort(Ne),st=0;st<De.length;st++)De[st]=ht[st].val,Ve[st]=ht[st].text;break}}else De=void 0;return Te=b.convertTypedArray(Te),{key:Re,label:ve.label,tickFormat:ve.tickformat,tickvals:De,ticktext:Ve,ordinal:b.isOrdinal(ve),multiselect:ve.multiselect,xIndex:le,crossfilterDimensionIndex:le,visibleIndex:ve._index,height:q,values:Te,paddedUnitValues:Te.map(xe),unitTickvals:De&&De.map(xe),xScale:Q,x:Q(le),canvasX:Q(le)*Z,unitToPaddedPx:fe,domainScale:A(q,p.verticalPadding,ve,De,Ve),ordinalScale:o(ve),parent:te,model:se,brush:E.makeBrush(re,Oe,Be,function(){re.linePickActive(!1)},Le,function(it){if(te.focusLayer.render(te.panels,!0),te.pickLayer&&te.pickLayer.render(te.panels,!0),re.linePickActive(!0),ie&&ie.filterChanged){var nt=xe.invert,pt=it.map(function(Tt){return Tt.map(nt).sort(P.sorterAsc)}).sort(function(Tt,Et){return Tt[0]-Et[0]});ie.filterChanged(te.key,ve._index,pt)}})}}),te}function H(re){re.classed(p.cn.axisExtentText,!0).attr("text-anchor","middle").style("cursor","default")}function k(){var re=!0,ie=!1;return{linePickActive:function(se){return arguments.length?re=!!se:re},contextShown:function(se){return arguments.length?ie=!!se:ie}}}function V(re,ie){var se=ie==="top"?1:-1,ce=re*Math.PI/180,q=Math.sin(ce),j=Math.cos(ce);return{dir:se,dx:q,dy:j,degrees:re}}function G(re,ie,se){for(var ce=ie.panels||(ie.panels=[]),q=re.data(),j=0;j<q.length-1;j++){var Z=ce[j]||(ce[j]={}),Q=q[j],ue=q[j+1];Z.dim0=Q,Z.dim1=ue,Z.canvasX=Q.canvasX,Z.panelSizeX=ue.canvasX-Q.canvasX,Z.panelSizeY=ie.model.canvasHeight,Z.y=0,Z.canvasY=0,Z.plotGlPixelRatio=se}}function U(re){for(var ie=0;ie<re.length;ie++)for(var se=0;se<re[ie].length;se++)for(var ce=re[ie][se].trace,q=ce.dimensions,j=0;j<q.length;j++){var Z=q[j].values,Q=q[j]._ax;Q&&(Q.range?Q.range=L(Q.range[0],Q.range[1]):Q.range=m(Z,ce._length),Q.dtick||(Q.dtick=.01*(Math.abs(Q.range[1]-Q.range[0])||1)),Q.tickformat=q[j].tickformat,x.calcTicks(Q),Q.cleanRange())}}function Y(re,ie){return x.tickText(re._ax,ie,!1).text}function ee(re,ie){if(re.ordinal)return"";var se=re.domainScale.domain(),ce=se[ie?se.length-1:0];return Y(re.model.dimensions[re.visibleIndex],ce)}z.exports=function(ie,se,ce,q){var j=ie._context.staticPlot,Z=ie._fullLayout,Q=Z._toppaper,ue=Z._glcontainer,fe=ie._context.plotGlPixelRatio,te=ie._fullLayout.paper_bgcolor;U(se);var ne=k(),ve=se.filter(function(st){return h(st).trace.visible}).map(O.bind(0,ce)).map(N.bind(0,ne,q));ue.each(function(st,it){return P.extendFlat(st,ve[it])});var le=ue.selectAll(".gl-canvas").each(function(st){st.viewModel=ve[0],st.viewModel.plotGlPixelRatio=fe,st.viewModel.paperColor=te,st.model=st.viewModel?st.viewModel.model:null}),xe=null,Se=le.filter(function(st){return st.pick});Se.style("pointer-events",j?"none":"auto").on("mousemove",function(st){if(ne.linePickActive()&&st.lineLayer&&q&&q.hover){var it=d.event,nt=this.width,pt=this.height,Tt=d.mouse(this),Et=Tt[0],Dt=Tt[1];if(Et<0||Dt<0||Et>=nt||Dt>=pt)return;var et=st.lineLayer.readPixel(Et,pt-1-Dt),Ue=et[3]!==0,ze=Ue?et[2]+256*(et[1]+256*et[0]):null,rt={x:Et,y:Dt,clientX:it.clientX,clientY:it.clientY,dataIndex:st.model.key,curveNumber:ze};ze!==xe&&(Ue?q.hover(rt):q.unhover&&q.unhover(rt),xe=ze)}}),le.style("opacity",function(st){return st.pick?0:1}),Q.style("background","rgba(255, 255, 255, 0)");var Re=Q.selectAll("."+p.cn.parcoords).data(ve,f);Re.exit().remove(),Re.enter().append("g").classed(p.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),Re.attr("transform",function(st){return y(st.model.translateX,st.model.translateY)});var Ee=Re.selectAll("."+p.cn.parcoordsControlView).data(g,f);Ee.enter().append("g").classed(p.cn.parcoordsControlView,!0),Ee.attr("transform",function(st){return y(st.model.pad.l,st.model.pad.t)});var Oe=Ee.selectAll("."+p.cn.yAxis).data(function(st){return st.dimensions},f);Oe.enter().append("g").classed(p.cn.yAxis,!0),Ee.each(function(st){G(Oe,st,fe)}),le.each(function(st){if(st.viewModel){!st.lineLayer||q?st.lineLayer=c(this,st):st.lineLayer.update(st),(st.key||st.key===0)&&(st.viewModel[st.key]=st.lineLayer);var it=!st.context||q;st.lineLayer.render(st.viewModel.panels,it)}}),Oe.attr("transform",function(st){return y(st.xScale(st.xIndex),0)}),Oe.call(d.behavior.drag().origin(function(st){return st}).on("drag",function(st){var it=st.parent;ne.linePickActive(!1),st.x=Math.max(-p.overdrag,Math.min(st.model.width+p.overdrag,d.event.x)),st.canvasX=st.x*st.model.canvasPixelRatio,Oe.sort(function(nt,pt){return nt.x-pt.x}).each(function(nt,pt){nt.xIndex=pt,nt.x=st===nt?nt.x:nt.xScale(nt.xIndex),nt.canvasX=nt.x*nt.model.canvasPixelRatio}),G(Oe,it,fe),Oe.filter(function(nt){return Math.abs(st.xIndex-nt.xIndex)!==0}).attr("transform",function(nt){return y(nt.xScale(nt.xIndex),0)}),d.select(this).attr("transform",y(st.x,0)),Oe.each(function(nt,pt,Tt){Tt===st.parent.key&&(it.dimensions[pt]=nt)}),it.contextLayer&&it.contextLayer.render(it.panels,!1,!T(it)),it.focusLayer.render&&it.focusLayer.render(it.panels)}).on("dragend",function(st){var it=st.parent;st.x=st.xScale(st.xIndex),st.canvasX=st.x*st.model.canvasPixelRatio,G(Oe,it,fe),d.select(this).attr("transform",function(nt){return y(nt.x,0)}),it.contextLayer&&it.contextLayer.render(it.panels,!1,!T(it)),it.focusLayer&&it.focusLayer.render(it.panels),it.pickLayer&&it.pickLayer.render(it.panels,!0),ne.linePickActive(!0),q&&q.axesMoved&&q.axesMoved(it.key,it.dimensions.map(function(nt){return nt.crossfilterDimensionIndex}))})),Oe.exit().remove();var Be=Oe.selectAll("."+p.cn.axisOverlays).data(g,f);Be.enter().append("g").classed(p.cn.axisOverlays,!0),Be.selectAll("."+p.cn.axis).remove();var Le=Be.selectAll("."+p.cn.axis).data(g,f);Le.enter().append("g").classed(p.cn.axis,!0),Le.each(function(st){var it=st.model.height/st.model.tickDistance,nt=st.domainScale,pt=nt.domain();d.select(this).call(d.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(it,st.tickFormat).tickValues(st.ordinal?pt:null).tickFormat(function(Tt){return b.isOrdinal(st)?Tt:Y(st.model.dimensions[st.visibleIndex],Tt)}).scale(nt)),n.font(Le.selectAll("text"),st.model.tickFont)}),Le.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),Le.selectAll("text").style("text-shadow",r.makeTextShadow(te)).style("cursor","default");var Te=Be.selectAll("."+p.cn.axisHeading).data(g,f);Te.enter().append("g").classed(p.cn.axisHeading,!0);var De=Te.selectAll("."+p.cn.axisTitle).data(g,f);De.enter().append("text").classed(p.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",j?"none":"auto"),De.text(function(st){return st.label}).each(function(st){var it=d.select(this);n.font(it,st.model.labelFont),r.convertToTspans(it,ie)}).attr("transform",function(st){var it=V(st.model.labelAngle,st.model.labelSide),nt=p.axisTitleOffset;return(it.dir>0?"":y(0,2*nt+st.model.height))+v(it.degrees)+y(-nt*it.dx,-nt*it.dy)}).attr("text-anchor",function(st){var it=V(st.model.labelAngle,st.model.labelSide),nt=Math.abs(it.dx),pt=Math.abs(it.dy);return 2*nt>pt?it.dir*it.dx<0?"start":"end":"middle"});var Ve=Be.selectAll("."+p.cn.axisExtent).data(g,f);Ve.enter().append("g").classed(p.cn.axisExtent,!0);var Ye=Ve.selectAll("."+p.cn.axisExtentTop).data(g,f);Ye.enter().append("g").classed(p.cn.axisExtentTop,!0),Ye.attr("transform",y(0,-p.axisExtentOffset));var Ne=Ye.selectAll("."+p.cn.axisExtentTopText).data(g,f);Ne.enter().append("text").classed(p.cn.axisExtentTopText,!0).call(H),Ne.text(function(st){return ee(st,!0)}).each(function(st){n.font(d.select(this),st.model.rangeFont)});var Xe=Ve.selectAll("."+p.cn.axisExtentBottom).data(g,f);Xe.enter().append("g").classed(p.cn.axisExtentBottom,!0),Xe.attr("transform",function(st){return y(0,st.model.height+p.axisExtentOffset)});var ht=Xe.selectAll("."+p.cn.axisExtentBottomText).data(g,f);ht.enter().append("text").classed(p.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(H),ht.text(function(st){return ee(st,!1)}).each(function(st){n.font(d.select(this),st.model.rangeFont)}),E.ensureAxisBrush(Be,te,ie)}},21341:function(z,B,e){var d=e(17171),P=e(79749),a=e(1602).isVisible,_={};function x(r,n,u){var i=n.indexOf(u),f=r.indexOf(i);return f===-1&&(f+=n.length),f}function v(r,n){return function(i,f){return x(r,n,i)-x(r,n,f)}}var y=z.exports=function(n,u){var i=n._fullLayout,f=P(n,[],_);if(f){var g={},h={},b={},p={},E=i._size;u.forEach(function(L,D){var A=L[0].trace;b[D]=A.index;var C=p[D]=A._fullInput.index;g[D]=n.data[C].dimensions,h[D]=n.data[C].dimensions.slice()});var c=function(L,D,A){var C=h[L][D],S=A.map(function(H){return H.slice()}),o="dimensions["+D+"].constraintrange",R=i._tracePreGUI[n._fullData[b[L]]._fullInput.uid];if(R[o]===void 0){var T=C.constraintrange;R[o]=T||null}var O=n._fullData[b[L]].dimensions[D];S.length?(S.length===1&&(S=S[0]),C.constraintrange=S,O.constraintrange=S.slice(),S=[S]):(delete C.constraintrange,delete O.constraintrange,S=null);var N={};N[o]=S,n.emit("plotly_restyle",[N,[p[L]]])},l=function(L){n.emit("plotly_hover",L)},m=function(L){n.emit("plotly_unhover",L)},M=function(L,D){var A=v(D,h[L].filter(a));g[L].sort(A),h[L].filter(function(C){return!a(C)}).sort(function(C){return h[L].indexOf(C)}).forEach(function(C){g[L].splice(g[L].indexOf(C),1),g[L].splice(h[L].indexOf(C),0,C)}),n.emit("plotly_restyle",[{dimensions:[g[L]]},[p[L]]])};d(n,u,{width:E.w,height:E.h,margin:{t:E.t,r:E.r,b:E.b,l:E.l}},{filterChanged:c,hover:l,unhover:m,axesMoved:M})}};y.reglPrecompiled=_},34e3:function(z,B,e){var d=e(9012),P=e(27670).Y,a=e(41940),_=e(22399),x=e(5386).f,v=e(5386).s,y=e(1426).extendFlat,r=a({editType:"plot",arrayOk:!0,colorEditType:"plot"});z.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:_.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:y({},d.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:x({},{keys:["label","color","value","percent","text"]}),texttemplate:v({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:y({},r,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:y({},r,{}),outsidetextfont:y({},r,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:y({},r,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:P({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"},_deprecated:{title:{valType:"string",dflt:"",editType:"calc"},titlefont:y({},r,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},13584:function(z,B,e){var d=e(74875);B.name="pie",B.plot=function(P,a,_,x){d.plotBasePlot(B.name,P,a,_,x)},B.clean=function(P,a,_,x){d.cleanBasePlot(B.name,P,a,_,x)}},32354:function(z,B,e){var d=e(92770),P=e(84267),a=e(7901),_={};function x(n,u){var i=[],f=n._fullLayout,g=f.hiddenlabels||[],h=u.labels,b=u.marker.colors||[],p=u.values,E=u._length,c=u._hasValues&&E,l,m;if(u.dlabel)for(h=new Array(E),l=0;l<E;l++)h[l]=String(u.label0+l*u.dlabel);var M={},L=v(f["_"+u.type+"colormap"]),D=0,A=!1;for(l=0;l<E;l++){var C,S,o;if(c){if(C=p[l],!d(C))continue;C=+C}else C=1;S=h[l],(S===void 0||S==="")&&(S=l),S=String(S);var R=M[S];R===void 0?(M[S]=i.length,o=g.indexOf(S)!==-1,o||(D+=C),i.push({v:C,label:S,color:L(b[l],S),i:l,pts:[l],hidden:o})):(A=!0,m=i[R],m.v+=C,m.pts.push(l),m.hidden||(D+=C),m.color===!1&&b[l]&&(m.color=L(b[l],S)))}i=i.filter(function(O){return O.v>=0});var T=u.type==="funnelarea"?A:u.sort;return T&&i.sort(function(O,N){return N.v-O.v}),i[0]&&(i[0].vTotal=D),i}function v(n){return function(i,f){return!i||(i=P(i),!i.isValid())?!1:(i=a.addOpacity(i,i.getAlpha()),n[f]||(n[f]=i),i)}}function y(n,u){var i=(u||{}).type;i||(i="pie");var f=n._fullLayout,g=n.calcdata,h=f[i+"colorway"],b=f["_"+i+"colormap"];f["extend"+i+"colors"]&&(h=r(h,_));for(var p=0,E=0;E<g.length;E++){var c=g[E],l=c[0].trace.type;if(l===i)for(var m=0;m<c.length;m++){var M=c[m];M.color===!1&&(b[M.label]?M.color=b[M.label]:(b[M.label]=M.color=h[p%h.length],p++))}}}function r(n,u){var i,f=JSON.stringify(n),g=u[f];if(!g){for(g=n.slice(),i=0;i<n.length;i++)g.push(P(n[i]).lighten(20).toHexString());for(i=0;i<n.length;i++)g.push(P(n[i]).darken(20).toHexString());u[f]=g}return g}z.exports={calc:x,crossTraceCalc:y,makePullColorFn:v,generateExtendedColors:r}},37434:function(z,B,e){var d=e(92770),P=e(71828),a=e(34e3),_=e(27670).c,x=e(90769).handleText;function v(r,n){var u=Array.isArray(r),i=P.isArrayOrTypedArray(n),f=Math.min(u?r.length:1/0,i?n.length:1/0);if(isFinite(f)||(f=0),f&&i){for(var g,h=0;h<f;h++){var b=n[h];if(d(b)&&b>0){g=!0;break}}g||(f=0)}return{hasLabels:u,hasValues:i,len:f}}function y(r,n,u,i){function f(o,R){return P.coerce(r,n,a,o,R)}var g=f("labels"),h=f("values"),b=v(g,h),p=b.len;if(n._hasLabels=b.hasLabels,n._hasValues=b.hasValues,!n._hasLabels&&n._hasValues&&(f("label0"),f("dlabel")),!p){n.visible=!1;return}n._length=p;var E=f("marker.line.width");E&&f("marker.line.color"),f("marker.colors"),f("scalegroup");var c=f("text"),l=f("texttemplate"),m;if(l||(m=f("textinfo",Array.isArray(c)?"text+percent":"percent")),f("hovertext"),f("hovertemplate"),l||m&&m!=="none"){var M=f("textposition");x(r,n,i,f,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var L=Array.isArray(M)||M==="auto",D=L||M==="outside";D&&f("automargin"),(M==="inside"||M==="auto"||Array.isArray(M))&&f("insidetextorientation")}_(n,i,f);var A=f("hole"),C=f("title.text");if(C){var S=f("title.position",A?"middle center":"top center");!A&&S==="middle center"&&(n.title.position="top center"),P.coerceFont(f,"title.font",i.font)}f("sort"),f("direction"),f("rotation"),f("pull")}z.exports={handleLabelsAndValues:v,supplyDefaults:y}},20007:function(z,B,e){var d=e(23469).appendArrayMultiPointValues;z.exports=function(a,_){var x={curveNumber:_.index,pointNumbers:a.pts,data:_._input,fullData:_,label:a.label,color:a.color,value:a.v,percent:a.percent,text:a.text,bbox:a.bbox,v:a.v};return a.pts.length===1&&(x.pointNumber=x.i=a.pts[0]),d(x,_,a.pts),_.type==="funnelarea"&&(delete x.v,delete x.i),x}},53581:function(z,B,e){var d=e(71828);function P(a){return a.indexOf("e")!==-1?a.replace(/[.]?0+e/,"e"):a.indexOf(".")!==-1?a.replace(/[.]?0+$/,""):a}B.formatPiePercent=function(_,x){var v=P((_*100).toPrecision(3));return d.numSeparate(v,x)+"%"},B.formatPieValue=function(_,x){var v=P(_.toPrecision(10));return d.numSeparate(v,x)},B.getFirstFilled=function(_,x){if(Array.isArray(_))for(var v=0;v<x.length;v++){var y=_[x[v]];if(y||y===0||y==="")return y}},B.castOption=function(_,x){if(Array.isArray(_))return B.getFirstFilled(_,x);if(_)return _},B.getRotationAngle=function(a){return(a==="auto"?0:a)*Math.PI/180}},58810:function(z,B,e){z.exports={attributes:e(34e3),supplyDefaults:e(37434).supplyDefaults,supplyLayoutDefaults:e(92097),layoutAttributes:e(92774),calc:e(32354).calc,crossTraceCalc:e(32354).crossTraceCalc,plot:e(14575).plot,style:e(68357),styleOne:e(63463),moduleType:"trace",name:"pie",basePlotModule:e(13584),categories:["pie-like","pie","showLegend"],meta:{}}},92774:function(z){z.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},92097:function(z,B,e){var d=e(71828),P=e(92774);z.exports=function(_,x){function v(y,r){return d.coerce(_,x,P,y,r)}v("hiddenlabels"),v("piecolorway",x.colorway),v("extendpiecolors")}},14575:function(z,B,e){var d=e(39898),P=e(74875),a=e(30211),_=e(7901),x=e(91424),v=e(71828),y=v.strScale,r=v.strTranslate,n=e(63893),u=e(72597),i=u.recordMinTextSize,f=u.clearMinTextSize,g=e(97313).TEXTPAD,h=e(53581),b=e(20007),p=e(71828).isValidTextValue;function E(j,Z){var Q=j._context.staticPlot,ue=j._fullLayout,fe=ue._size;f("pie",ue),L(Z,j),ee(Z,fe);var te=v.makeTraceGroups(ue._pielayer,Z,"trace").each(function(ne){var ve=d.select(this),le=ne[0],xe=le.trace;ie(ne),ve.attr("stroke-linejoin","round"),ve.each(function(){var Se=d.select(this).selectAll("g.slice").data(ne);Se.enter().append("g").classed("slice",!0),Se.exit().remove();var Re=[[[],[]],[[],[]]],Ee=!1;Se.each(function(Ne,Xe){if(Ne.hidden){d.select(this).selectAll("path,g").remove();return}Ne.pointNumber=Ne.i,Ne.curveNumber=xe.index,Re[Ne.pxmid[1]<0?0:1][Ne.pxmid[0]<0?0:1].push(Ne);var ht=le.cx,st=le.cy,it=d.select(this),nt=it.selectAll("path.surface").data([Ne]);if(nt.enter().append("path").classed("surface",!0).style({"pointer-events":Q?"none":"all"}),it.call(l,j,ne),xe.pull){var pt=+h.castOption(xe.pull,Ne.pts)||0;pt>0&&(ht+=pt*Ne.pxmid[0],st+=pt*Ne.pxmid[1])}Ne.cxFinal=ht,Ne.cyFinal=st;function Tt(lt,Qe,Fe,Ce){var pe=Ce*(Qe[0]-lt[0]),we=Ce*(Qe[1]-lt[1]);return"a"+Ce*le.r+","+Ce*le.r+" 0 "+Ne.largeArc+(Fe?" 1 ":" 0 ")+pe+","+we}var Et=xe.hole;if(Ne.v===le.vTotal){var Dt="M"+(ht+Ne.px0[0])+","+(st+Ne.px0[1])+Tt(Ne.px0,Ne.pxmid,!0,1)+Tt(Ne.pxmid,Ne.px0,!0,1)+"Z";Et?nt.attr("d","M"+(ht+Et*Ne.px0[0])+","+(st+Et*Ne.px0[1])+Tt(Ne.px0,Ne.pxmid,!1,Et)+Tt(Ne.pxmid,Ne.px0,!1,Et)+"Z"+Dt):nt.attr("d",Dt)}else{var et=Tt(Ne.px0,Ne.px1,!0,1);if(Et){var Ue=1-Et;nt.attr("d","M"+(ht+Et*Ne.px1[0])+","+(st+Et*Ne.px1[1])+Tt(Ne.px1,Ne.px0,!1,Et)+"l"+Ue*Ne.px0[0]+","+Ue*Ne.px0[1]+et+"Z")}else nt.attr("d","M"+ht+","+st+"l"+Ne.px0[0]+","+Ne.px0[1]+et+"Z")}ce(j,Ne,le);var ze=h.castOption(xe.textposition,Ne.pts),rt=it.selectAll("g.slicetext").data(Ne.text&&ze!=="none"?[0]:[]);rt.enter().append("g").classed("slicetext",!0),rt.exit().remove(),rt.each(function(){var lt=v.ensureSingle(d.select(this),"text","",function(Ge){Ge.attr("data-notex",1)}),Qe=v.ensureUniformFontSize(j,ze==="outside"?m(xe,Ne,ue.font):M(xe,Ne,ue.font));lt.text(Ne.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(x.font,Qe).call(n.convertToTspans,j);var Fe=x.bBox(lt.node()),Ce;if(ze==="outside")Ce=N(Fe,Ne);else if(Ce=D(Fe,Ne,le),ze==="auto"&&Ce.scale<1){var pe=v.ensureUniformFontSize(j,xe.outsidetextfont);lt.call(x.font,pe),Fe=x.bBox(lt.node()),Ce=N(Fe,Ne)}var we=Ce.textPosAngle,Ae=we===void 0?Ne.pxmid:se(le.r,we);if(Ce.targetX=ht+Ae[0]*Ce.rCenter+(Ce.x||0),Ce.targetY=st+Ae[1]*Ce.rCenter+(Ce.y||0),q(Ce,Fe),Ce.outside){var Pe=Ce.targetY;Ne.yLabelMin=Pe-Fe.height/2,Ne.yLabelMid=Pe,Ne.yLabelMax=Pe+Fe.height/2,Ne.labelExtraX=0,Ne.labelExtraY=0,Ee=!0}Ce.fontSize=Qe.size,i(xe.type,Ce,ue),ne[Xe].transform=Ce,v.setTransormAndDisplay(lt,Ce)})});var Oe=d.select(this).selectAll("g.titletext").data(xe.title.text?[0]:[]);if(Oe.enter().append("g").classed("titletext",!0),Oe.exit().remove(),Oe.each(function(){var Ne=v.ensureSingle(d.select(this),"text","",function(st){st.attr("data-notex",1)}),Xe=xe.title.text;xe._meta&&(Xe=v.templateString(Xe,xe._meta)),Ne.text(Xe).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(x.font,xe.title.font).call(n.convertToTspans,j);var ht;xe.title.position==="middle center"?ht=H(le):ht=k(le,fe),Ne.attr("transform",r(ht.x,ht.y)+y(Math.min(1,ht.scale))+r(ht.tx,ht.ty))}),Ee&&Y(Re,xe),c(Se,xe),Ee&&xe.automargin){var Be=x.bBox(ve.node()),Le=xe.domain,Te=fe.w*(Le.x[1]-Le.x[0]),De=fe.h*(Le.y[1]-Le.y[0]),Ve=(.5*Te-le.r)/fe.w,Ye=(.5*De-le.r)/fe.h;P.autoMargin(j,"pie."+xe.uid+".automargin",{xl:Le.x[0]-Ve,xr:Le.x[1]+Ve,yb:Le.y[0]-Ye,yt:Le.y[1]+Ye,l:Math.max(le.cx-le.r-Be.left,0),r:Math.max(Be.right-(le.cx+le.r),0),b:Math.max(Be.bottom-(le.cy+le.r),0),t:Math.max(le.cy-le.r-Be.top,0),pad:5})}})});setTimeout(function(){te.selectAll("tspan").each(function(){var ne=d.select(this);ne.attr("dy")&&ne.attr("dy",ne.attr("dy"))})},0)}function c(j,Z){j.each(function(Q){var ue=d.select(this);if(!Q.labelExtraX&&!Q.labelExtraY){ue.select("path.textline").remove();return}var fe=ue.select("g.slicetext text");Q.transform.targetX+=Q.labelExtraX,Q.transform.targetY+=Q.labelExtraY,v.setTransormAndDisplay(fe,Q.transform);var te=Q.cxFinal+Q.pxmid[0],ne=Q.cyFinal+Q.pxmid[1],ve="M"+te+","+ne,le=(Q.yLabelMax-Q.yLabelMin)*(Q.pxmid[0]<0?-1:1)/4;if(Q.labelExtraX){var xe=Q.labelExtraX*Q.pxmid[1]/Q.pxmid[0],Se=Q.yLabelMid+Q.labelExtraY-(Q.cyFinal+Q.pxmid[1]);Math.abs(xe)>Math.abs(Se)?ve+="l"+Se*Q.pxmid[0]/Q.pxmid[1]+","+Se+"H"+(te+Q.labelExtraX+le):ve+="l"+Q.labelExtraX+","+xe+"v"+(Se-xe)+"h"+le}else ve+="V"+(Q.yLabelMid+Q.labelExtraY)+"h"+le;v.ensureSingle(ue,"path","textline").call(_.stroke,Z.outsidetextfont.color).attr({"stroke-width":Math.min(2,Z.outsidetextfont.size/8),d:ve,fill:"none"})})}function l(j,Z,Q){var ue=Q[0],fe=ue.cx,te=ue.cy,ne=ue.trace,ve=ne.type==="funnelarea";"_hasHoverLabel"in ne||(ne._hasHoverLabel=!1),"_hasHoverEvent"in ne||(ne._hasHoverEvent=!1),j.on("mouseover",function(le){var xe=Z._fullLayout,Se=Z._fullData[ne.index];if(!(Z._dragging||xe.hovermode===!1)){var Re=Se.hoverinfo;if(Array.isArray(Re)&&(Re=a.castHoverinfo({hoverinfo:[h.castOption(Re,le.pts)],_module:ne._module},xe,0)),Re==="all"&&(Re="label+text+value+percent+name"),Se.hovertemplate||Re!=="none"&&Re!=="skip"&&Re){var Ee=le.rInscribed||0,Oe=fe+le.pxmid[0]*(1-Ee),Be=te+le.pxmid[1]*(1-Ee),Le=xe.separators,Te=[];if(Re&&Re.indexOf("label")!==-1&&Te.push(le.label),le.text=h.castOption(Se.hovertext||Se.text,le.pts),Re&&Re.indexOf("text")!==-1){var De=le.text;v.isValidTextValue(De)&&Te.push(De)}le.value=le.v,le.valueLabel=h.formatPieValue(le.v,Le),Re&&Re.indexOf("value")!==-1&&Te.push(le.valueLabel),le.percent=le.v/ue.vTotal,le.percentLabel=h.formatPiePercent(le.percent,Le),Re&&Re.indexOf("percent")!==-1&&Te.push(le.percentLabel);var Ve=Se.hoverlabel,Ye=Ve.font,Ne=[];a.loneHover({trace:ne,x0:Oe-Ee*ue.r,x1:Oe+Ee*ue.r,y:Be,_x0:ve?fe+le.TL[0]:Oe-Ee*ue.r,_x1:ve?fe+le.TR[0]:Oe+Ee*ue.r,_y0:ve?te+le.TL[1]:Be-Ee*ue.r,_y1:ve?te+le.BL[1]:Be+Ee*ue.r,text:Te.join("<br>"),name:Se.hovertemplate||Re.indexOf("name")!==-1?Se.name:void 0,idealAlign:le.pxmid[0]<0?"left":"right",color:h.castOption(Ve.bgcolor,le.pts)||le.color,borderColor:h.castOption(Ve.bordercolor,le.pts),fontFamily:h.castOption(Ye.family,le.pts),fontSize:h.castOption(Ye.size,le.pts),fontColor:h.castOption(Ye.color,le.pts),nameLength:h.castOption(Ve.namelength,le.pts),textAlign:h.castOption(Ve.align,le.pts),hovertemplate:h.castOption(Se.hovertemplate,le.pts),hovertemplateLabels:le,eventData:[b(le,Se)]},{container:xe._hoverlayer.node(),outerContainer:xe._paper.node(),gd:Z,inOut_bbox:Ne}),le.bbox=Ne[0],ne._hasHoverLabel=!0}ne._hasHoverEvent=!0,Z.emit("plotly_hover",{points:[b(le,Se)],event:d.event})}}),j.on("mouseout",function(le){var xe=Z._fullLayout,Se=Z._fullData[ne.index],Re=d.select(this).datum();ne._hasHoverEvent&&(le.originalEvent=d.event,Z.emit("plotly_unhover",{points:[b(Re,Se)],event:d.event}),ne._hasHoverEvent=!1),ne._hasHoverLabel&&(a.loneUnhover(xe._hoverlayer.node()),ne._hasHoverLabel=!1)}),j.on("click",function(le){var xe=Z._fullLayout,Se=Z._fullData[ne.index];Z._dragging||xe.hovermode===!1||(Z._hoverdata=[b(le,Se)],a.click(Z,d.event))})}function m(j,Z,Q){var ue=h.castOption(j.outsidetextfont.color,Z.pts)||h.castOption(j.textfont.color,Z.pts)||Q.color,fe=h.castOption(j.outsidetextfont.family,Z.pts)||h.castOption(j.textfont.family,Z.pts)||Q.family,te=h.castOption(j.outsidetextfont.size,Z.pts)||h.castOption(j.textfont.size,Z.pts)||Q.size;return{color:ue,family:fe,size:te}}function M(j,Z,Q){var ue=h.castOption(j.insidetextfont.color,Z.pts);!ue&&j._input.textfont&&(ue=h.castOption(j._input.textfont.color,Z.pts));var fe=h.castOption(j.insidetextfont.family,Z.pts)||h.castOption(j.textfont.family,Z.pts)||Q.family,te=h.castOption(j.insidetextfont.size,Z.pts)||h.castOption(j.textfont.size,Z.pts)||Q.size;return{color:ue||_.contrast(Z.color),family:fe,size:te}}function L(j,Z){for(var Q,ue,fe=0;fe<j.length;fe++)if(Q=j[fe][0],ue=Q.trace,ue.title.text){var te=ue.title.text;ue._meta&&(te=v.templateString(te,ue._meta));var ne=x.tester.append("text").attr("data-notex",1).text(te).call(x.font,ue.title.font).call(n.convertToTspans,Z),ve=x.bBox(ne.node(),!0);Q.titleBox={width:ve.width,height:ve.height},ne.remove()}}function D(j,Z,Q){var ue=Q.r||Z.rpx1,fe=Z.rInscribed,te=Z.startangle===Z.stopangle;if(te)return{rCenter:1-fe,scale:0,rotate:0,textPosAngle:0};var ne=Z.ring,ve=ne===1&&Math.abs(Z.startangle-Z.stopangle)===Math.PI*2,le=Z.halfangle,xe=Z.midangle,Se=Q.trace.insidetextorientation,Re=Se==="horizontal",Ee=Se==="tangential",Oe=Se==="radial",Be=Se==="auto",Le=[],Te;if(!Be){var De=function(it,nt){if(A(Z,it)){var pt=Math.abs(it-Z.startangle),Tt=Math.abs(it-Z.stopangle),Et=pt<Tt?pt:Tt;nt==="tan"?Te=S(j,ue,ne,Et,0):Te=C(j,ue,ne,Et,Math.PI/2),Te.textPosAngle=it,Le.push(Te)}},Ve;if(Re||Ee){for(Ve=4;Ve>=-4;Ve-=2)De(Math.PI*Ve,"tan");for(Ve=4;Ve>=-4;Ve-=2)De(Math.PI*(Ve+1),"tan")}if(Re||Oe){for(Ve=4;Ve>=-4;Ve-=2)De(Math.PI*(Ve+1.5),"rad");for(Ve=4;Ve>=-4;Ve-=2)De(Math.PI*(Ve+.5),"rad")}}if(ve||Be||Re){var Ye=Math.sqrt(j.width*j.width+j.height*j.height);if(Te={scale:fe*ue*2/Ye,rCenter:1-fe,rotate:0},Te.textPosAngle=(Z.startangle+Z.stopangle)/2,Te.scale>=1)return Te;Le.push(Te)}(Be||Oe)&&(Te=C(j,ue,ne,le,xe),Te.textPosAngle=(Z.startangle+Z.stopangle)/2,Le.push(Te)),(Be||Ee)&&(Te=S(j,ue,ne,le,xe),Te.textPosAngle=(Z.startangle+Z.stopangle)/2,Le.push(Te));for(var Ne=0,Xe=0,ht=0;ht<Le.length;ht++){var st=Le[ht].scale;if(Xe<st&&(Xe=st,Ne=ht),!Be&&Xe>=1)break}return Le[Ne]}function A(j,Z){var Q=j.startangle,ue=j.stopangle;return Q>Z&&Z>ue||Q<Z&&Z<ue}function C(j,Z,Q,ue,fe){Z=Math.max(0,Z-2*g);var te=j.width/j.height,ne=T(te,ue,Z,Q);return{scale:ne*2/j.height,rCenter:o(te,ne/Z),rotate:R(fe)}}function S(j,Z,Q,ue,fe){Z=Math.max(0,Z-2*g);var te=j.height/j.width,ne=T(te,ue,Z,Q);return{scale:ne*2/j.width,rCenter:o(te,ne/Z),rotate:R(fe+Math.PI/2)}}function o(j,Z){return Math.cos(Z)-j*Z}function R(j){return(180/Math.PI*j+720)%180-90}function T(j,Z,Q,ue){var fe=j+1/(2*Math.tan(Z));return Q*Math.min(1/(Math.sqrt(fe*fe+.5)+fe),ue/(Math.sqrt(j*j+ue/2)+j))}function O(j,Z){return j.v===Z.vTotal&&!Z.trace.hole?1:Math.min(1/(1+1/Math.sin(j.halfangle)),j.ring/2)}function N(j,Z){var Q=Z.pxmid[0],ue=Z.pxmid[1],fe=j.width/2,te=j.height/2;return Q<0&&(fe*=-1),ue<0&&(te*=-1),{scale:1,rCenter:1,rotate:0,x:fe+Math.abs(te)*(fe>0?1:-1)/2,y:te/(1+Q*Q/(ue*ue)),outside:!0}}function H(j){var Z=Math.sqrt(j.titleBox.width*j.titleBox.width+j.titleBox.height*j.titleBox.height);return{x:j.cx,y:j.cy,scale:j.trace.hole*j.r*2/Z,tx:0,ty:-j.titleBox.height/2+j.trace.title.font.size}}function k(j,Z){var Q=1,ue=1,fe,te=j.trace,ne={x:j.cx,y:j.cy},ve={tx:0,ty:0};ve.ty+=te.title.font.size,fe=U(te),te.title.position.indexOf("top")!==-1?(ne.y-=(1+fe)*j.r,ve.ty-=j.titleBox.height):te.title.position.indexOf("bottom")!==-1&&(ne.y+=(1+fe)*j.r);var le=V(j.r,j.trace.aspectratio),xe=Z.w*(te.domain.x[1]-te.domain.x[0])/2;return te.title.position.indexOf("left")!==-1?(xe=xe+le,ne.x-=(1+fe)*le,ve.tx+=j.titleBox.width/2):te.title.position.indexOf("center")!==-1?xe*=2:te.title.position.indexOf("right")!==-1&&(xe=xe+le,ne.x+=(1+fe)*le,ve.tx-=j.titleBox.width/2),Q=xe/j.titleBox.width,ue=G(j,Z)/j.titleBox.height,{x:ne.x,y:ne.y,scale:Math.min(Q,ue),tx:ve.tx,ty:ve.ty}}function V(j,Z){return j/(Z===void 0?1:Z)}function G(j,Z){var Q=j.trace,ue=Z.h*(Q.domain.y[1]-Q.domain.y[0]);return Math.min(j.titleBox.height,ue/2)}function U(j){var Z=j.pull;if(!Z)return 0;var Q;if(Array.isArray(Z))for(Z=0,Q=0;Q<j.pull.length;Q++)j.pull[Q]>Z&&(Z=j.pull[Q]);return Z}function Y(j,Z){var Q,ue,fe,te,ne,ve,le,xe,Se,Re,Ee,Oe,Be;function Le(Ye,Ne){return Ye.pxmid[1]-Ne.pxmid[1]}function Te(Ye,Ne){return Ne.pxmid[1]-Ye.pxmid[1]}function De(Ye,Ne){Ne||(Ne={});var Xe=Ne.labelExtraY+(ue?Ne.yLabelMax:Ne.yLabelMin),ht=ue?Ye.yLabelMin:Ye.yLabelMax,st=ue?Ye.yLabelMax:Ye.yLabelMin,it=Ye.cyFinal+ne(Ye.px0[1],Ye.px1[1]),nt=Xe-ht,pt,Tt,Et,Dt,et,Ue;if(nt*le>0&&(Ye.labelExtraY=nt),!!Array.isArray(Z.pull))for(Tt=0;Tt<Re.length;Tt++)Et=Re[Tt],!(Et===Ye||(h.castOption(Z.pull,Ye.pts)||0)>=(h.castOption(Z.pull,Et.pts)||0))&&((Ye.pxmid[1]-Et.pxmid[1])*le>0?(Dt=Et.cyFinal+ne(Et.px0[1],Et.px1[1]),nt=Dt-ht-Ye.labelExtraY,nt*le>0&&(Ye.labelExtraY+=nt)):(st+Ye.labelExtraY-it)*le>0&&(pt=3*ve*Math.abs(Tt-Re.indexOf(Ye)),et=Et.cxFinal+te(Et.px0[0],Et.px1[0]),Ue=et+pt-(Ye.cxFinal+Ye.pxmid[0])-Ye.labelExtraX,Ue*ve>0&&(Ye.labelExtraX+=Ue)))}for(ue=0;ue<2;ue++)for(fe=ue?Le:Te,ne=ue?Math.max:Math.min,le=ue?1:-1,Q=0;Q<2;Q++){for(te=Q?Math.max:Math.min,ve=Q?1:-1,xe=j[ue][Q],xe.sort(fe),Se=j[1-ue][Q],Re=Se.concat(xe),Oe=[],Ee=0;Ee<xe.length;Ee++)xe[Ee].yLabelMid!==void 0&&Oe.push(xe[Ee]);for(Be=!1,Ee=0;ue&&Ee<Se.length;Ee++)if(Se[Ee].yLabelMid!==void 0){Be=Se[Ee];break}for(Ee=0;Ee<Oe.length;Ee++){var Ve=Ee&&Oe[Ee-1];Be&&!Ee&&(Ve=Be),De(Oe[Ee],Ve)}}}function ee(j,Z){for(var Q=[],ue=0;ue<j.length;ue++){var fe=j[ue][0],te=fe.trace,ne=te.domain,ve=Z.w*(ne.x[1]-ne.x[0]),le=Z.h*(ne.y[1]-ne.y[0]);te.title.text&&te.title.position!=="middle center"&&(le-=G(fe,Z));var xe=ve/2,Se=le/2;te.type==="funnelarea"&&!te.scalegroup&&(Se/=te.aspectratio),fe.r=Math.min(xe,Se)/(1+U(te)),fe.cx=Z.l+Z.w*(te.domain.x[1]+te.domain.x[0])/2,fe.cy=Z.t+Z.h*(1-te.domain.y[0])-le/2,te.title.text&&te.title.position.indexOf("bottom")!==-1&&(fe.cy-=G(fe,Z)),te.scalegroup&&Q.indexOf(te.scalegroup)===-1&&Q.push(te.scalegroup)}re(j,Q)}function re(j,Z){for(var Q,ue,fe,te=0;te<Z.length;te++){var ne=1/0,ve=Z[te];for(ue=0;ue<j.length;ue++)if(Q=j[ue][0],fe=Q.trace,fe.scalegroup===ve){var le;if(fe.type==="pie")le=Q.r*Q.r;else if(fe.type==="funnelarea"){var xe,Se;fe.aspectratio>1?(xe=Q.r,Se=xe/fe.aspectratio):(Se=Q.r,xe=Se*fe.aspectratio),xe*=(1+fe.baseratio)/2,le=xe*Se}ne=Math.min(ne,le/Q.vTotal)}for(ue=0;ue<j.length;ue++)if(Q=j[ue][0],fe=Q.trace,fe.scalegroup===ve){var Re=ne*Q.vTotal;fe.type==="funnelarea"&&(Re/=(1+fe.baseratio)/2,Re/=fe.aspectratio),Q.r=Math.sqrt(Re)}}}function ie(j){var Z=j[0],Q=Z.r,ue=Z.trace,fe=h.getRotationAngle(ue.rotation),te=2*Math.PI/Z.vTotal,ne="px0",ve="px1",le,xe,Se;if(ue.direction==="counterclockwise"){for(le=0;le<j.length&&j[le].hidden;le++);if(le===j.length)return;fe+=te*j[le].v,te*=-1,ne="px1",ve="px0"}for(Se=se(Q,fe),le=0;le<j.length;le++)xe=j[le],!xe.hidden&&(xe[ne]=Se,xe.startangle=fe,fe+=te*xe.v/2,xe.pxmid=se(Q,fe),xe.midangle=fe,fe+=te*xe.v/2,Se=se(Q,fe),xe.stopangle=fe,xe[ve]=Se,xe.largeArc=xe.v>Z.vTotal/2?1:0,xe.halfangle=Math.PI*Math.min(xe.v/Z.vTotal,.5),xe.ring=1-ue.hole,xe.rInscribed=O(xe,Z))}function se(j,Z){return[j*Math.sin(Z),-j*Math.cos(Z)]}function ce(j,Z,Q){var ue=j._fullLayout,fe=Q.trace,te=fe.texttemplate,ne=fe.textinfo;if(!te&&ne&&ne!=="none"){var ve=ne.split("+"),le=function(Ne){return ve.indexOf(Ne)!==-1},xe=le("label"),Se=le("text"),Re=le("value"),Ee=le("percent"),Oe=ue.separators,Be;if(Be=xe?[Z.label]:[],Se){var Le=h.getFirstFilled(fe.text,Z.pts);p(Le)&&Be.push(Le)}Re&&Be.push(h.formatPieValue(Z.v,Oe)),Ee&&Be.push(h.formatPiePercent(Z.v/Q.vTotal,Oe)),Z.text=Be.join("<br>")}function Te(Ne){return{label:Ne.label,value:Ne.v,valueLabel:h.formatPieValue(Ne.v,ue.separators),percent:Ne.v/Q.vTotal,percentLabel:h.formatPiePercent(Ne.v/Q.vTotal,ue.separators),color:Ne.color,text:Ne.text,customdata:v.castOption(fe,Ne.i,"customdata")}}if(te){var De=v.castOption(fe,Z.i,"texttemplate");if(!De)Z.text="";else{var Ve=Te(Z),Ye=h.getFirstFilled(fe.text,Z.pts);(p(Ye)||Ye==="")&&(Ve.text=Ye),Z.text=v.texttemplateString(De,Ve,j._fullLayout._d3locale,Ve,fe._meta||{})}}}function q(j,Z){var Q=j.rotate*Math.PI/180,ue=Math.cos(Q),fe=Math.sin(Q),te=(Z.left+Z.right)/2,ne=(Z.top+Z.bottom)/2;j.textX=te*ue-ne*fe,j.textY=te*fe+ne*ue,j.noCenter=!0}z.exports={plot:E,formatSliceLabel:ce,transformInsideText:D,determineInsideTextFont:M,positionTitleOutside:k,prerenderTitles:L,layoutAreas:ee,attachFxHandlers:l,computeTransform:q}},68357:function(z,B,e){var d=e(39898),P=e(63463),a=e(72597).resizeText;z.exports=function(x){var v=x._fullLayout._pielayer.selectAll(".trace");a(x,v,"pie"),v.each(function(y){var r=y[0],n=r.trace,u=d.select(this);u.style({opacity:n.opacity}),u.selectAll("path.surface").each(function(i){d.select(this).call(P,i,n)})})}},63463:function(z,B,e){var d=e(7901),P=e(53581).castOption;z.exports=function(_,x,v){var y=v.marker.line,r=P(y.color,x.pts)||d.defaultLine,n=P(y.width,x.pts)||0;_.style("stroke-width",n).call(d.fill,x.color).call(d.stroke,r)}},10959:function(z,B,e){var d=e(82196);z.exports={x:d.x,y:d.y,xy:{valType:"data_array",editType:"calc"},indices:{valType:"data_array",editType:"calc"},xbounds:{valType:"data_array",editType:"calc"},ybounds:{valType:"data_array",editType:"calc"},text:d.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc"},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc"},blend:{valType:"boolean",dflt:null,editType:"calc"},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc"},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc"},border:{color:{valType:"color",arrayOk:!1,editType:"calc"},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},editType:"calc"},editType:"calc"},transforms:void 0}},42743:function(z,B,e){var d=e(9330).gl_pointcloud2d,P=e(78614),a=e(71739).findExtremes,_=e(34603);function x(r,n){this.scene=r,this.uid=n,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=d(r.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var v=x.prototype;v.handlePick=function(r){var n=this.idToIndex[r.pointId];return{trace:this,dataCoord:r.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[n*2],this.pickXYData[n*2+1]]:[this.pickXData[n],this.pickYData[n]],textLabel:Array.isArray(this.textLabels)?this.textLabels[n]:this.textLabels,color:this.color,name:this.name,pointIndex:n,hoverinfo:this.hoverinfo}},v.update=function(r){this.index=r.index,this.textLabels=r.text,this.name=r.name,this.hoverinfo=r.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(r),this.color=_(r,{})},v.updateFast=function(r){var n=this.xData=this.pickXData=r.x,u=this.yData=this.pickYData=r.y,i=this.pickXYData=r.xy,f=r.xbounds&&r.ybounds,g=r.indices,h,b,p,E=this.bounds,c,l,m;if(i){if(p=i,h=i.length>>>1,f)E[0]=r.xbounds[0],E[2]=r.xbounds[1],E[1]=r.ybounds[0],E[3]=r.ybounds[1];else for(m=0;m<h;m++)c=p[m*2],l=p[m*2+1],c<E[0]&&(E[0]=c),c>E[2]&&(E[2]=c),l<E[1]&&(E[1]=l),l>E[3]&&(E[3]=l);if(g)b=g;else for(b=new Int32Array(h),m=0;m<h;m++)b[m]=m}else for(h=n.length,p=new Float32Array(2*h),b=new Int32Array(h),m=0;m<h;m++)c=n[m],l=u[m],b[m]=m,p[m*2]=c,p[m*2+1]=l,c<E[0]&&(E[0]=c),c>E[2]&&(E[2]=c),l<E[1]&&(E[1]=l),l>E[3]&&(E[3]=l);this.idToIndex=b,this.pointcloudOptions.idToIndex=b,this.pointcloudOptions.positions=p;var M=P(r.marker.color),L=P(r.marker.border.color),D=r.opacity*r.marker.opacity;M[3]*=D,this.pointcloudOptions.color=M;var A=r.marker.blend;if(A===null){var C=100;A=n.length<C||u.length<C}this.pointcloudOptions.blend=A,L[3]*=D,this.pointcloudOptions.borderColor=L;var S=r.marker.sizemin,o=Math.max(r.marker.sizemax,r.marker.sizemin);this.pointcloudOptions.sizeMin=S,this.pointcloudOptions.sizeMax=o,this.pointcloudOptions.areaRatio=r.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var R=this.scene.xaxis,T=this.scene.yaxis,O=o/2||.5;r._extremes[R._id]=a(R,[E[0],E[2]],{ppad:O}),r._extremes[T._id]=a(T,[E[1],E[3]],{ppad:O})},v.dispose=function(){this.pointcloud.dispose()};function y(r,n){var u=new x(r,n.uid);return u.update(n),u}z.exports=y},33876:function(z,B,e){var d=e(71828),P=e(10959);z.exports=function(_,x,v){function y(r,n){return d.coerce(_,x,P,r,n)}y("x"),y("y"),y("xbounds"),y("ybounds"),_.xy&&_.xy instanceof Float32Array&&(x.xy=_.xy),_.indices&&_.indices instanceof Int32Array&&(x.indices=_.indices),y("text"),y("marker.color",v),y("marker.opacity"),y("marker.blend"),y("marker.sizemin"),y("marker.sizemax"),y("marker.border.color",v),y("marker.border.arearatio"),x._length=null}},20593:function(z,B,e){z.exports={attributes:e(10959),supplyDefaults:e(33876),calc:e(36563),plot:e(42743),moduleType:"trace",name:"pointcloud",basePlotModule:e(4796),categories:["gl","gl2d","showLegend"],meta:{}}},39953:function(z,B,e){var d=e(41940),P=e(9012),a=e(22399),_=e(77914),x=e(27670).Y,v=e(5386).f,y=e(50693),r=e(44467).templatedArray,n=e(12663).descriptionOnlyNumbers,u=e(1426).extendFlat,i=e(30962).overrideAll,f=z.exports=i({hoverinfo:u({},P.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:_.hoverlabel,domain:x({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:n("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:d({}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:a.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:_.hoverlabel,hovertemplate:v({},{keys:["value","label"]})},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:a.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:_.hoverlabel,hovertemplate:v({},{keys:["value","label"]}),colorscales:r("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:u(y().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested");f.transforms=void 0},75536:function(z,B,e){var d=e(30962).overrideAll,P=e(27659).a0,a=e(60436),_=e(528),x=e(6964),v=e(28569),y=e(47322).prepSelect,r=e(71828),n=e(73972),u="sankey";B.name=u,B.baseLayoutAttrOverrides=d({hoverlabel:_.hoverlabel},"plot","nested"),B.plot=function(f){var g=P(f.calcdata,u)[0];a(f,g),B.updateFx(f)},B.clean=function(f,g,h,b){var p=b._has&&b._has(u),E=g._has&&g._has(u);p&&!E&&(b._paperdiv.selectAll(".sankey").remove(),b._paperdiv.selectAll(".bgsankey").remove())},B.updateFx=function(f){for(var g=0;g<f._fullData.length;g++)i(f,g)};function i(f,g){var h=f._fullData[g],b=f._fullLayout,p=b.dragmode,E=b.dragmode==="pan"?"move":"crosshair",c=h._bgRect;if(c&&!(p==="pan"||p==="zoom")){x(c,E);var l={_id:"x",c2p:r.identity,_offset:h._sankey.translateX,_length:h._sankey.width},m={_id:"y",c2p:r.identity,_offset:h._sankey.translateY,_length:h._sankey.height},M={gd:f,element:c.node(),plotinfo:{id:g,xaxis:l,yaxis:m,fillRangeItems:r.noop},subplot:g,xaxes:[l],yaxes:[m],doneFnCompleted:function(L){var D=f._fullData[g],A,C=D.node.groups.slice(),S=[];function o(N){for(var H=D._sankey.graph.nodes,k=0;k<H.length;k++)if(H[k].pointNumber===N)return H[k]}for(var R=0;R<L.length;R++){var T=o(L[R].pointNumber);if(T)if(T.group){for(var O=0;O<T.childrenNodes.length;O++)S.push(T.childrenNodes[O].pointNumber);C[T.pointNumber-D.node._count]=!1}else S.push(T.pointNumber)}A=C.filter(Boolean).concat([S]),n.call("_guiRestyle",f,{"node.groups":[A]},g)}};M.prepFn=function(L,D,A){y(L,D,A,M,p)},v.init(M)}}},92930:function(z,B,e){var d=e(68664),P=e(71828),a=e(28984).wrap,_=P.isArrayOrTypedArray,x=P.isIndex,v=e(21081);function y(n){var u=n.node,i=n.link,f=[],g=_(i.color),h=_(i.customdata),b={},p={},E=i.colorscales.length,c;for(c=0;c<E;c++){var l=i.colorscales[c],m=v.extractScale(l,{cLetter:"c"}),M=v.makeColorScaleFunc(m);p[l.label]=M}var L=0;for(c=0;c<i.value.length;c++)i.source[c]>L&&(L=i.source[c]),i.target[c]>L&&(L=i.target[c]);var D=L+1;n.node._count=D;var A,C=n.node.groups,S={};for(c=0;c<C.length;c++){var o=C[c];for(A=0;A<o.length;A++){var R=o[A],T=D+c;S.hasOwnProperty(R)?P.warn("Node "+R+" is already part of a group."):S[R]=T}}var O={source:[],target:[]};for(c=0;c<i.value.length;c++){var N=i.value[c],H=i.source[c],k=i.target[c];if(N>0&&x(H,D)&&x(k,D)&&!(S.hasOwnProperty(H)&&S.hasOwnProperty(k)&&S[H]===S[k])){S.hasOwnProperty(k)&&(k=S[k]),S.hasOwnProperty(H)&&(H=S[H]),H=+H,k=+k,b[H]=b[k]=!0;var V="";i.label&&i.label[c]&&(V=i.label[c]);var G=null;V&&p.hasOwnProperty(V)&&(G=p[V]),f.push({pointNumber:c,label:V,color:g?i.color[c]:i.color,customdata:h?i.customdata[c]:i.customdata,concentrationscale:G,source:H,target:k,value:+N}),O.source.push(H),O.target.push(k)}}var U=D+C.length,Y=_(u.color),ee=_(u.customdata),re=[];for(c=0;c<U;c++)if(b[c]){var ie=u.label[c];re.push({group:c>D-1,childrenNodes:[],pointNumber:c,label:ie,color:Y?u.color[c]:u.color,customdata:ee?u.customdata[c]:u.customdata})}var se=!1;return r(U,O.source,O.target)&&(se=!0),{circular:se,links:f,nodes:re,groups:C,groupLookup:S}}function r(n,u,i){for(var f=P.init2dArray(n,0),g=0;g<Math.min(u.length,i.length);g++)if(P.isIndex(u[g],n)&&P.isIndex(i[g],n)){if(u[g]===i[g])return!0;f[u[g]].push(i[g])}var h=d(f);return h.components.some(function(b){return b.length>1})}z.exports=function(u,i){var f=y(i);return a({circular:f.circular,_nodes:f.nodes,_links:f.links,_groups:f.groups,_groupLookup:f.groupLookup})}},85247:function(z){z.exports={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"}}},26857:function(z,B,e){var d=e(71828),P=e(39953),a=e(7901),_=e(84267),x=e(27670).c,v=e(38048),y=e(44467),r=e(85501);z.exports=function(i,f,g,h){function b(o,R){return d.coerce(i,f,P,o,R)}var p=d.extendDeep(h.hoverlabel,i.hoverlabel),E=i.node,c=y.newContainer(f,"node");function l(o,R){return d.coerce(E,c,P.node,o,R)}l("label"),l("groups"),l("x"),l("y"),l("pad"),l("thickness"),l("line.color"),l("line.width"),l("hoverinfo",i.hoverinfo),v(E,c,l,p),l("hovertemplate");var m=h.colorway,M=function(o){return m[o%m.length]};l("color",c.label.map(function(o,R){return a.addOpacity(M(R),.8)})),l("customdata");var L=i.link||{},D=y.newContainer(f,"link");function A(o,R){return d.coerce(L,D,P.link,o,R)}A("label"),A("arrowlen"),A("source"),A("target"),A("value"),A("line.color"),A("line.width"),A("hoverinfo",i.hoverinfo),v(L,D,A,p),A("hovertemplate");var C=_(h.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";A("color",d.repeat(C,D.value.length)),A("customdata"),r(L,D,{name:"colorscales",handleItemDefaults:n}),x(f,h,b),b("orientation"),b("valueformat"),b("valuesuffix");var S;c.x.length&&c.y.length&&(S="freeform"),b("arrangement",S),d.coerceFont(b,"textfont",d.extendFlat({},h.font)),f._length=null};function n(u,i){function f(g,h){return d.coerce(u,i,P.link.colorscales,g,h)}f("label"),f("cmin"),f("cmax"),f("colorscale")}},29396:function(z,B,e){z.exports={attributes:e(39953),supplyDefaults:e(26857),calc:e(92930),plot:e(60436),moduleType:"trace",name:"sankey",basePlotModule:e(75536),selectPoints:e(84564),categories:["noOpacity"],meta:{}}},60436:function(z,B,e){var d=e(39898),P=e(71828),a=P.numberFormat,_=e(3393),x=e(30211),v=e(7901),y=e(85247).cn,r=P._;function n(m){return m!==""}function u(m,M){return m.filter(function(L){return L.key===M.traceId})}function i(m,M){d.select(m).select("path").style("fill-opacity",M),d.select(m).select("rect").style("fill-opacity",M)}function f(m){d.select(m).select("text.name").style("fill","black")}function g(m){return function(M){return m.node.sourceLinks.indexOf(M.link)!==-1||m.node.targetLinks.indexOf(M.link)!==-1}}function h(m){return function(M){return M.node.sourceLinks.indexOf(m.link)!==-1||M.node.targetLinks.indexOf(m.link)!==-1}}function b(m,M,L){M&&L&&u(L,M).selectAll("."+y.sankeyLink).filter(g(M)).call(E.bind(0,M,L,!1))}function p(m,M,L){M&&L&&u(L,M).selectAll("."+y.sankeyLink).filter(g(M)).call(c.bind(0,M,L,!1))}function E(m,M,L,D){var A=D.datum().link.label;D.style("fill-opacity",function(C){if(!C.link.concentrationscale)return .4}),A&&u(M,m).selectAll("."+y.sankeyLink).filter(function(C){return C.link.label===A}).style("fill-opacity",function(C){if(!C.link.concentrationscale)return .4}),L&&u(M,m).selectAll("."+y.sankeyNode).filter(h(m)).call(b)}function c(m,M,L,D){var A=D.datum().link.label;D.style("fill-opacity",function(C){return C.tinyColorAlpha}),A&&u(M,m).selectAll("."+y.sankeyLink).filter(function(C){return C.link.label===A}).style("fill-opacity",function(C){return C.tinyColorAlpha}),L&&u(M,m).selectAll(y.sankeyNode).filter(h(m)).call(p)}function l(m,M){var L=m.hoverlabel||{},D=P.nestedProperty(L,M).get();return Array.isArray(D)?!1:D}z.exports=function(M,L){for(var D=M._fullLayout,A=D._paper,C=D._size,S=0;S<M._fullData.length;S++)if(M._fullData[S].visible&&M._fullData[S].type===y.sankey&&!M._fullData[S]._viewInitial){var o=M._fullData[S].node;M._fullData[S]._viewInitial={node:{groups:o.groups.slice(),x:o.x.slice(),y:o.y.slice()}}}var R=function(se,ce){var q=ce.link;q.originalEvent=d.event,M._hoverdata=[q],x.click(M,{target:!0})},T=function(se,ce,q){M._fullLayout.hovermode!==!1&&(d.select(se).call(E.bind(0,ce,q,!0)),ce.link.trace.link.hoverinfo!=="skip"&&(ce.link.fullData=ce.link.trace,M.emit("plotly_hover",{event:d.event,points:[ce.link]})))},O=r(M,"source:")+" ",N=r(M,"target:")+" ",H=r(M,"concentration:")+" ",k=r(M,"incoming flow count:")+" ",V=r(M,"outgoing flow count:")+" ",G=function(se,ce){if(M._fullLayout.hovermode===!1)return;var q=ce.link.trace.link;if(q.hoverinfo==="none"||q.hoverinfo==="skip")return;var j=[];function Z(le){var xe,Se;le.circular?(xe=(le.circularPathData.leftInnerExtent+le.circularPathData.rightInnerExtent)/2,Se=le.circularPathData.verticalFullExtent):(xe=(le.source.x1+le.target.x0)/2,Se=(le.y0+le.y1)/2);var Re=[xe,Se];return le.trace.orientation==="v"&&Re.reverse(),Re[0]+=ce.parent.translateX,Re[1]+=ce.parent.translateY,Re}for(var Q=0,ue=0;ue<ce.flow.links.length;ue++){var fe=ce.flow.links[ue];if(!(M._fullLayout.hovermode==="closest"&&ce.link.pointNumber!==fe.pointNumber)){ce.link.pointNumber===fe.pointNumber&&(Q=ue),fe.fullData=fe.trace,q=ce.link.trace.link;var te=Z(fe),ne={valueLabel:a(ce.valueFormat)(fe.value)+ce.valueSuffix};j.push({x:te[0],y:te[1],name:ne.valueLabel,text:[fe.label||"",O+fe.source.label,N+fe.target.label,fe.concentrationscale?H+a("%0.2f")(fe.flow.labelConcentration):""].filter(n).join("<br>"),color:l(q,"bgcolor")||v.addOpacity(fe.color,1),borderColor:l(q,"bordercolor"),fontFamily:l(q,"font.family"),fontSize:l(q,"font.size"),fontColor:l(q,"font.color"),nameLength:l(q,"namelength"),textAlign:l(q,"align"),idealAlign:d.event.x<te[0]?"right":"left",hovertemplate:q.hovertemplate,hovertemplateLabels:ne,eventData:[fe]})}}var ve=x.loneHover(j,{container:D._hoverlayer.node(),outerContainer:D._paper.node(),gd:M,anchorIndex:Q});ve.each(function(){var le=this;ce.link.concentrationscale||i(le,.65),f(le)})},U=function(se,ce,q){M._fullLayout.hovermode!==!1&&(d.select(se).call(c.bind(0,ce,q,!0)),ce.link.trace.link.hoverinfo!=="skip"&&(ce.link.fullData=ce.link.trace,M.emit("plotly_unhover",{event:d.event,points:[ce.link]})),x.loneUnhover(D._hoverlayer.node()))},Y=function(se,ce,q){var j=ce.node;j.originalEvent=d.event,M._hoverdata=[j],d.select(se).call(p,ce,q),x.click(M,{target:!0})},ee=function(se,ce,q){M._fullLayout.hovermode!==!1&&(d.select(se).call(b,ce,q),ce.node.trace.node.hoverinfo!=="skip"&&(ce.node.fullData=ce.node.trace,M.emit("plotly_hover",{event:d.event,points:[ce.node]})))},re=function(se,ce){if(M._fullLayout.hovermode!==!1){var q=ce.node.trace.node;if(!(q.hoverinfo==="none"||q.hoverinfo==="skip")){var j=d.select(se).select("."+y.nodeRect),Z=M._fullLayout._paperdiv.node().getBoundingClientRect(),Q=j.node().getBoundingClientRect(),ue=Q.left-2-Z.left,fe=Q.right+2-Z.left,te=Q.top+Q.height/4-Z.top,ne={valueLabel:a(ce.valueFormat)(ce.node.value)+ce.valueSuffix};ce.node.fullData=ce.node.trace,M._fullLayout._calcInverseTransform(M);var ve=M._fullLayout._invScaleX,le=M._fullLayout._invScaleY,xe=x.loneHover({x0:ve*ue,x1:ve*fe,y:le*te,name:a(ce.valueFormat)(ce.node.value)+ce.valueSuffix,text:[ce.node.label,k+ce.node.targetLinks.length,V+ce.node.sourceLinks.length].filter(n).join("<br>"),color:l(q,"bgcolor")||ce.tinyColorHue,borderColor:l(q,"bordercolor"),fontFamily:l(q,"font.family"),fontSize:l(q,"font.size"),fontColor:l(q,"font.color"),nameLength:l(q,"namelength"),textAlign:l(q,"align"),idealAlign:"left",hovertemplate:q.hovertemplate,hovertemplateLabels:ne,eventData:[ce.node]},{container:D._hoverlayer.node(),outerContainer:D._paper.node(),gd:M});i(xe,.85),f(xe)}}},ie=function(se,ce,q){M._fullLayout.hovermode!==!1&&(d.select(se).call(p,ce,q),ce.node.trace.node.hoverinfo!=="skip"&&(ce.node.fullData=ce.node.trace,M.emit("plotly_unhover",{event:d.event,points:[ce.node]})),x.loneUnhover(D._hoverlayer.node()))};_(M,A,L,{width:C.w,height:C.h,margin:{t:C.t,r:C.r,b:C.b,l:C.l}},{linkEvents:{hover:T,follow:G,unhover:U,select:R},nodeEvents:{hover:ee,follow:re,unhover:ie,select:Y}})}},3393:function(z,B,e){var d=e(49887),P=e(81684).k4,a=e(39898),_=e(30838),x=e(86781),v=e(85247),y=e(84267),r=e(7901),n=e(91424),u=e(71828),i=u.strTranslate,f=u.strRotate,g=e(28984),h=g.keyFun,b=g.repeat,p=g.unwrap,E=e(63893),c=e(73972),l=e(18783),m=l.CAP_SHIFT,M=l.LINE_SPACING,L=3;function D(Z,Q,ue){var fe=p(Q),te=fe.trace,ne=te.domain,ve=te.orientation==="h",le=te.node.pad,xe=te.node.thickness,Se=Z.width*(ne.x[1]-ne.x[0]),Re=Z.height*(ne.y[1]-ne.y[0]),Ee=fe._nodes,Oe=fe._links,Be=fe.circular,Le;Be?Le=x.sankeyCircular().circularLinkGap(0):Le=_.sankey(),Le.iterations(v.sankeyIterations).size(ve?[Se,Re]:[Re,Se]).nodeWidth(xe).nodePadding(le).nodeId(function(et){return et.pointNumber}).nodes(Ee).links(Oe);var Te=Le();Le.nodePadding()<le&&u.warn("node.pad was reduced to ",Le.nodePadding()," to fit within the figure.");var De,Ve,Ye;for(var Ne in fe._groupLookup){var Xe=parseInt(fe._groupLookup[Ne]),ht;for(De=0;De<Te.nodes.length;De++)if(Te.nodes[De].pointNumber===Xe){ht=Te.nodes[De];break}if(ht){var st={pointNumber:parseInt(Ne),x0:ht.x0,x1:ht.x1,y0:ht.y0,y1:ht.y1,partOfGroup:!0,sourceLinks:[],targetLinks:[]};Te.nodes.unshift(st),ht.childrenNodes.unshift(st)}}function it(){for(De=0;De<Te.nodes.length;De++){var et=Te.nodes[De],Ue={},ze,rt;for(Ve=0;Ve<et.targetLinks.length;Ve++)rt=et.targetLinks[Ve],ze=rt.source.pointNumber+":"+rt.target.pointNumber,Ue.hasOwnProperty(ze)||(Ue[ze]=[]),Ue[ze].push(rt);var lt=Object.keys(Ue);for(Ve=0;Ve<lt.length;Ve++){ze=lt[Ve];var Qe=Ue[ze],Fe=0,Ce={};for(Ye=0;Ye<Qe.length;Ye++)rt=Qe[Ye],Ce[rt.label]||(Ce[rt.label]=0),Ce[rt.label]+=rt.value,Fe+=rt.value;for(Ye=0;Ye<Qe.length;Ye++)rt=Qe[Ye],rt.flow={value:Fe,labelConcentration:Ce[rt.label]/Fe,concentration:rt.value/Fe,links:Qe},rt.concentrationscale&&(rt.color=y(rt.concentrationscale(rt.flow.labelConcentration)))}var pe=0;for(Ve=0;Ve<et.sourceLinks.length;Ve++)pe+=et.sourceLinks[Ve].value;for(Ve=0;Ve<et.sourceLinks.length;Ve++)rt=et.sourceLinks[Ve],rt.concentrationOut=rt.value/pe;var we=0;for(Ve=0;Ve<et.targetLinks.length;Ve++)we+=et.targetLinks[Ve].value;for(Ve=0;Ve<et.targetLinks.length;Ve++)rt=et.targetLinks[Ve],rt.concenrationIn=rt.value/we}}it();function nt(et){et.forEach(function(Ue){var ze,rt,lt=0,Qe=Ue.length,Fe;for(Ue.sort(function(Ce,pe){return Ce.y0-pe.y0}),Fe=0;Fe<Qe;++Fe)ze=Ue[Fe],ze.y0>=lt||(rt=lt-ze.y0,rt>1e-6&&(ze.y0+=rt,ze.y1+=rt)),lt=ze.y1+le})}function pt(et){var Ue=et.map(function(pe,we){return{x0:pe.x0,index:we}}).sort(function(pe,we){return pe.x0-we.x0}),ze=[],rt=-1,lt,Qe=-1/0,Fe;for(De=0;De<Ue.length;De++){var Ce=et[Ue[De].index];Ce.x0>Qe+xe&&(rt+=1,lt=Ce.x0),Qe=Ce.x0,ze[rt]||(ze[rt]=[]),ze[rt].push(Ce),Fe=lt-Ce.x0,Ce.x0+=Fe,Ce.x1+=Fe}return ze}if(te.node.x.length&&te.node.y.length){for(De=0;De<Math.min(te.node.x.length,te.node.y.length,Te.nodes.length);De++)if(te.node.x[De]&&te.node.y[De]){var Tt=[te.node.x[De]*Se,te.node.y[De]*Re];Te.nodes[De].x0=Tt[0]-xe/2,Te.nodes[De].x1=Tt[0]+xe/2;var Et=Te.nodes[De].y1-Te.nodes[De].y0;Te.nodes[De].y0=Tt[1]-Et/2,Te.nodes[De].y1=Tt[1]+Et/2}if(te.arrangement==="snap"){Ee=Te.nodes;var Dt=pt(Ee);nt(Dt)}Le.update(Te)}return{circular:Be,key:ue,trace:te,guid:u.randstr(),horizontal:ve,width:Se,height:Re,nodePad:te.node.pad,nodeLineColor:te.node.line.color,nodeLineWidth:te.node.line.width,linkLineColor:te.link.line.color,linkLineWidth:te.link.line.width,linkArrowLength:te.link.arrowlen,valueFormat:te.valueformat,valueSuffix:te.valuesuffix,textFont:te.textfont,translateX:ne.x[0]*Z.width+Z.margin.l,translateY:Z.height-ne.y[1]*Z.height+Z.margin.t,dragParallel:ve?Re:Se,dragPerpendicular:ve?Se:Re,arrangement:te.arrangement,sankey:Le,graph:Te,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function A(Z,Q,ue){var fe=y(Q.color),te=Q.source.label+"|"+Q.target.label,ne=te+"__"+ue;return Q.trace=Z.trace,Q.curveNumber=Z.trace.index,{circular:Z.circular,key:ne,traceId:Z.key,pointNumber:Q.pointNumber,link:Q,tinyColorHue:r.tinyRGB(fe),tinyColorAlpha:fe.getAlpha(),linkPath:S,linkLineColor:Z.linkLineColor,linkLineWidth:Z.linkLineWidth,linkArrowLength:Z.linkArrowLength,valueFormat:Z.valueFormat,valueSuffix:Z.valueSuffix,sankey:Z.sankey,parent:Z,interactionState:Z.interactionState,flow:Q.flow}}function C(Z,Q){var ue="",fe=Z.width/2,te=Z.circularPathData;return Z.circularLinkType==="top"?ue="M "+(te.targetX-Q)+" "+(te.targetY+fe)+" L"+(te.rightInnerExtent-Q)+" "+(te.targetY+fe)+"A"+(te.rightLargeArcRadius+fe)+" "+(te.rightSmallArcRadius+fe)+" 0 0 1 "+(te.rightFullExtent-fe-Q)+" "+(te.targetY-te.rightSmallArcRadius)+"L"+(te.rightFullExtent-fe-Q)+" "+te.verticalRightInnerExtent+"A"+(te.rightLargeArcRadius+fe)+" "+(te.rightLargeArcRadius+fe)+" 0 0 1 "+(te.rightInnerExtent-Q)+" "+(te.verticalFullExtent-fe)+"L"+te.leftInnerExtent+" "+(te.verticalFullExtent-fe)+"A"+(te.leftLargeArcRadius+fe)+" "+(te.leftLargeArcRadius+fe)+" 0 0 1 "+(te.leftFullExtent+fe)+" "+te.verticalLeftInnerExtent+"L"+(te.leftFullExtent+fe)+" "+(te.sourceY-te.leftSmallArcRadius)+"A"+(te.leftLargeArcRadius+fe)+" "+(te.leftSmallArcRadius+fe)+" 0 0 1 "+te.leftInnerExtent+" "+(te.sourceY+fe)+"L"+te.sourceX+" "+(te.sourceY+fe)+"L"+te.sourceX+" "+(te.sourceY-fe)+"L"+te.leftInnerExtent+" "+(te.sourceY-fe)+"A"+(te.leftLargeArcRadius-fe)+" "+(te.leftSmallArcRadius-fe)+" 0 0 0 "+(te.leftFullExtent-fe)+" "+(te.sourceY-te.leftSmallArcRadius)+"L"+(te.leftFullExtent-fe)+" "+te.verticalLeftInnerExtent+"A"+(te.leftLargeArcRadius-fe)+" "+(te.leftLargeArcRadius-fe)+" 0 0 0 "+te.leftInnerExtent+" "+(te.verticalFullExtent+fe)+"L"+(te.rightInnerExtent-Q)+" "+(te.verticalFullExtent+fe)+"A"+(te.rightLargeArcRadius-fe)+" "+(te.rightLargeArcRadius-fe)+" 0 0 0 "+(te.rightFullExtent+fe-Q)+" "+te.verticalRightInnerExtent+"L"+(te.rightFullExtent+fe-Q)+" "+(te.targetY-te.rightSmallArcRadius)+"A"+(te.rightLargeArcRadius-fe)+" "+(te.rightSmallArcRadius-fe)+" 0 0 0 "+(te.rightInnerExtent-Q)+" "+(te.targetY-fe)+"L"+(te.targetX-Q)+" "+(te.targetY-fe)+(Q>0?"L"+te.targetX+" "+te.targetY:"")+"Z":ue="M "+(te.targetX-Q)+" "+(te.targetY-fe)+" L"+(te.rightInnerExtent-Q)+" "+(te.targetY-fe)+"A"+(te.rightLargeArcRadius+fe)+" "+(te.rightSmallArcRadius+fe)+" 0 0 0 "+(te.rightFullExtent-fe-Q)+" "+(te.targetY+te.rightSmallArcRadius)+"L"+(te.rightFullExtent-fe-Q)+" "+te.verticalRightInnerExtent+"A"+(te.rightLargeArcRadius+fe)+" "+(te.rightLargeArcRadius+fe)+" 0 0 0 "+(te.rightInnerExtent-Q)+" "+(te.verticalFullExtent+fe)+"L"+te.leftInnerExtent+" "+(te.verticalFullExtent+fe)+"A"+(te.leftLargeArcRadius+fe)+" "+(te.leftLargeArcRadius+fe)+" 0 0 0 "+(te.leftFullExtent+fe)+" "+te.verticalLeftInnerExtent+"L"+(te.leftFullExtent+fe)+" "+(te.sourceY+te.leftSmallArcRadius)+"A"+(te.leftLargeArcRadius+fe)+" "+(te.leftSmallArcRadius+fe)+" 0 0 0 "+te.leftInnerExtent+" "+(te.sourceY-fe)+"L"+te.sourceX+" "+(te.sourceY-fe)+"L"+te.sourceX+" "+(te.sourceY+fe)+"L"+te.leftInnerExtent+" "+(te.sourceY+fe)+"A"+(te.leftLargeArcRadius-fe)+" "+(te.leftSmallArcRadius-fe)+" 0 0 1 "+(te.leftFullExtent-fe)+" "+(te.sourceY+te.leftSmallArcRadius)+"L"+(te.leftFullExtent-fe)+" "+te.verticalLeftInnerExtent+"A"+(te.leftLargeArcRadius-fe)+" "+(te.leftLargeArcRadius-fe)+" 0 0 1 "+te.leftInnerExtent+" "+(te.verticalFullExtent-fe)+"L"+(te.rightInnerExtent-Q)+" "+(te.verticalFullExtent-fe)+"A"+(te.rightLargeArcRadius-fe)+" "+(te.rightLargeArcRadius-fe)+" 0 0 1 "+(te.rightFullExtent+fe-Q)+" "+te.verticalRightInnerExtent+"L"+(te.rightFullExtent+fe-Q)+" "+(te.targetY+te.rightSmallArcRadius)+"A"+(te.rightLargeArcRadius-fe)+" "+(te.rightSmallArcRadius-fe)+" 0 0 1 "+(te.rightInnerExtent-Q)+" "+(te.targetY+fe)+"L"+(te.targetX-Q)+" "+(te.targetY+fe)+(Q>0?"L"+te.targetX+" "+te.targetY:"")+"Z",ue}function S(){var Z=.5;function Q(ue){var fe=ue.linkArrowLength;if(ue.link.circular)return C(ue.link,fe);var te=Math.abs((ue.link.target.x0-ue.link.source.x1)/2);fe>te&&(fe=te);var ne=ue.link.source.x1,ve=ue.link.target.x0-fe,le=P(ne,ve),xe=le(Z),Se=le(1-Z),Re=ue.link.y0-ue.link.width/2,Ee=ue.link.y0+ue.link.width/2,Oe=ue.link.y1-ue.link.width/2,Be=ue.link.y1+ue.link.width/2,Le="M"+ne+","+Re,Te="C"+xe+","+Re+" "+Se+","+Oe+" "+ve+","+Oe,De="C"+Se+","+Be+" "+xe+","+Ee+" "+ne+","+Ee,Ve=fe>0?"L"+(ve+fe)+","+(Oe+ue.link.width/2):"";return Ve+="L"+ve+","+Be,Le+Te+Ve+De+"Z"}return Q}function o(Z,Q){var ue=y(Q.color),fe=v.nodePadAcross,te=Z.nodePad/2;Q.dx=Q.x1-Q.x0,Q.dy=Q.y1-Q.y0;var ne=Q.dx,ve=Math.max(.5,Q.dy),le="node_"+Q.pointNumber;return Q.group&&(le=u.randstr()),Q.trace=Z.trace,Q.curveNumber=Z.trace.index,{index:Q.pointNumber,key:le,partOfGroup:Q.partOfGroup||!1,group:Q.group,traceId:Z.key,trace:Z.trace,node:Q,nodePad:Z.nodePad,nodeLineColor:Z.nodeLineColor,nodeLineWidth:Z.nodeLineWidth,textFont:Z.textFont,size:Z.horizontal?Z.height:Z.width,visibleWidth:Math.ceil(ne),visibleHeight:ve,zoneX:-fe,zoneY:-te,zoneWidth:ne+2*fe,zoneHeight:ve+2*te,labelY:Z.horizontal?Q.dy/2+1:Q.dx/2+1,left:Q.originalLayer===1,sizeAcross:Z.width,forceLayouts:Z.forceLayouts,horizontal:Z.horizontal,darkBackground:ue.getBrightness()<=128,tinyColorHue:r.tinyRGB(ue),tinyColorAlpha:ue.getAlpha(),valueFormat:Z.valueFormat,valueSuffix:Z.valueSuffix,sankey:Z.sankey,graph:Z.graph,arrangement:Z.arrangement,uniqueNodeLabelPathId:[Z.guid,Z.key,le].join("_"),interactionState:Z.interactionState,figure:Z}}function R(Z){Z.attr("transform",function(Q){return i(Q.node.x0.toFixed(3),Q.node.y0.toFixed(3))})}function T(Z){Z.call(R)}function O(Z,Q){Z.call(T),Q.attr("d",S())}function N(Z){Z.attr("width",function(Q){return Q.node.x1-Q.node.x0}).attr("height",function(Q){return Q.visibleHeight})}function H(Z){return Z.link.width>1||Z.linkLineWidth>0}function k(Z){var Q=i(Z.translateX,Z.translateY);return Q+(Z.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function V(Z,Q,ue){Z.on(".basic",null).on("mouseover.basic",function(fe){!fe.interactionState.dragInProgress&&!fe.partOfGroup&&(ue.hover(this,fe,Q),fe.interactionState.hovered=[this,fe])}).on("mousemove.basic",function(fe){!fe.interactionState.dragInProgress&&!fe.partOfGroup&&(ue.follow(this,fe),fe.interactionState.hovered=[this,fe])}).on("mouseout.basic",function(fe){!fe.interactionState.dragInProgress&&!fe.partOfGroup&&(ue.unhover(this,fe,Q),fe.interactionState.hovered=!1)}).on("click.basic",function(fe){fe.interactionState.hovered&&(ue.unhover(this,fe,Q),fe.interactionState.hovered=!1),!fe.interactionState.dragInProgress&&!fe.partOfGroup&&ue.select(this,fe,Q)})}function G(Z,Q,ue,fe){var te=a.behavior.drag().origin(function(ne){return{x:ne.node.x0+ne.visibleWidth/2,y:ne.node.y0+ne.visibleHeight/2}}).on("dragstart",function(ne){if(ne.arrangement!=="fixed"&&(u.ensureSingle(fe._fullLayout._infolayer,"g","dragcover",function(le){fe._fullLayout._dragCover=le}),u.raiseToTop(this),ne.interactionState.dragInProgress=ne.node,se(ne.node),ne.interactionState.hovered&&(ue.nodeEvents.unhover.apply(0,ne.interactionState.hovered),ne.interactionState.hovered=!1),ne.arrangement==="snap")){var ve=ne.traceId+"|"+ne.key;ne.forceLayouts[ve]?ne.forceLayouts[ve].alpha(1):U(Z,ve,ne),Y(Z,Q,ne,ve,fe)}}).on("drag",function(ne){if(ne.arrangement!=="fixed"){var ve=a.event.x,le=a.event.y;ne.arrangement==="snap"?(ne.node.x0=ve-ne.visibleWidth/2,ne.node.x1=ve+ne.visibleWidth/2,ne.node.y0=le-ne.visibleHeight/2,ne.node.y1=le+ne.visibleHeight/2):(ne.arrangement==="freeform"&&(ne.node.x0=ve-ne.visibleWidth/2,ne.node.x1=ve+ne.visibleWidth/2),le=Math.max(0,Math.min(ne.size-ne.visibleHeight/2,le)),ne.node.y0=le-ne.visibleHeight/2,ne.node.y1=le+ne.visibleHeight/2),se(ne.node),ne.arrangement!=="snap"&&(ne.sankey.update(ne.graph),O(Z.filter(ce(ne)),Q))}}).on("dragend",function(ne){if(ne.arrangement!=="fixed"){ne.interactionState.dragInProgress=!1;for(var ve=0;ve<ne.node.childrenNodes.length;ve++)ne.node.childrenNodes[ve].x=ne.node.x,ne.node.childrenNodes[ve].y=ne.node.y;ne.arrangement!=="snap"&&re(ne,fe)}});Z.on(".drag",null).call(te)}function U(Z,Q,ue,fe){q(ue.graph.nodes);var te=ue.graph.nodes.filter(function(ne){return ne.originalX===ue.node.originalX}).filter(function(ne){return!ne.partOfGroup});ue.forceLayouts[Q]=d.forceSimulation(te).alphaDecay(0).force("collide",d.forceCollide().radius(function(ne){return ne.dy/2+ue.nodePad/2}).strength(1).iterations(v.forceIterations)).force("constrain",ee(Z,Q,te,ue)).stop()}function Y(Z,Q,ue,fe,te){window.requestAnimationFrame(function ne(){var ve;for(ve=0;ve<v.forceTicksPerFrame;ve++)ue.forceLayouts[fe].tick();var le=ue.graph.nodes;if(j(le),ue.sankey.update(ue.graph),O(Z.filter(ce(ue)),Q),ue.forceLayouts[fe].alpha()>0)window.requestAnimationFrame(ne);else{var xe=ue.node.originalX;ue.node.x0=xe-ue.visibleWidth/2,ue.node.x1=xe+ue.visibleWidth/2,re(ue,te)}})}function ee(Z,Q,ue,fe){return function(){for(var ne=0,ve=0;ve<ue.length;ve++){var le=ue[ve];le===fe.interactionState.dragInProgress?(le.x=le.lastDraggedX,le.y=le.lastDraggedY):(le.vx=(le.originalX-le.x)/v.forceTicksPerFrame,le.y=Math.min(fe.size-le.dy/2,Math.max(le.dy/2,le.y))),ne=Math.max(ne,Math.abs(le.vx),Math.abs(le.vy))}!fe.interactionState.dragInProgress&&ne<.1&&fe.forceLayouts[Q].alpha()>0&&fe.forceLayouts[Q].alpha(0)}}function re(Z,Q){for(var ue=[],fe=[],te=0;te<Z.graph.nodes.length;te++){var ne=(Z.graph.nodes[te].x0+Z.graph.nodes[te].x1)/2,ve=(Z.graph.nodes[te].y0+Z.graph.nodes[te].y1)/2;ue.push(ne/Z.figure.width),fe.push(ve/Z.figure.height)}c.call("_guiRestyle",Q,{"node.x":[ue],"node.y":[fe]},Z.trace.index).then(function(){Q._fullLayout._dragCover&&Q._fullLayout._dragCover.remove()})}function ie(Z){var Q=[],ue;for(ue=0;ue<Z.length;ue++)Z[ue].originalX=(Z[ue].x0+Z[ue].x1)/2,Z[ue].originalY=(Z[ue].y0+Z[ue].y1)/2,Q.indexOf(Z[ue].originalX)===-1&&Q.push(Z[ue].originalX);for(Q.sort(function(fe,te){return fe-te}),ue=0;ue<Z.length;ue++)Z[ue].originalLayerIndex=Q.indexOf(Z[ue].originalX),Z[ue].originalLayer=Z[ue].originalLayerIndex/(Q.length-1)}function se(Z){Z.lastDraggedX=Z.x0+Z.dx/2,Z.lastDraggedY=Z.y0+Z.dy/2}function ce(Z){return function(Q){return Q.node.originalX===Z.node.originalX}}function q(Z){for(var Q=0;Q<Z.length;Q++)Z[Q].y=(Z[Q].y0+Z[Q].y1)/2,Z[Q].x=(Z[Q].x0+Z[Q].x1)/2}function j(Z){for(var Q=0;Q<Z.length;Q++)Z[Q].y0=Z[Q].y-Z[Q].dy/2,Z[Q].y1=Z[Q].y0+Z[Q].dy,Z[Q].x0=Z[Q].x-Z[Q].dx/2,Z[Q].x1=Z[Q].x0+Z[Q].dx}z.exports=function(Z,Q,ue,fe,te){var ne=Z._context.staticPlot,ve=!1;u.ensureSingle(Z._fullLayout._infolayer,"g","first-render",function(){ve=!0});var le=Z._fullLayout._dragCover,xe=ue.filter(function(De){return p(De).trace.visible}).map(D.bind(null,fe)),Se=Q.selectAll("."+v.cn.sankey).data(xe,h);Se.exit().remove(),Se.enter().append("g").classed(v.cn.sankey,!0).style("box-sizing","content-box").style("position","absolute").style("left",0).style("shape-rendering","geometricPrecision").style("pointer-events",ne?"none":"auto").attr("transform",k),Se.each(function(De,Ve){Z._fullData[Ve]._sankey=De;var Ye="bgsankey-"+De.trace.uid+"-"+Ve;u.ensureSingle(Z._fullLayout._draggers,"rect",Ye),Z._fullData[Ve]._bgRect=a.select("."+Ye),Z._fullData[Ve]._bgRect.style("pointer-events",ne?"none":"all").attr("width",De.width).attr("height",De.height).attr("x",De.translateX).attr("y",De.translateY).classed("bgsankey",!0).style({fill:"transparent","stroke-width":0})}),Se.transition().ease(v.ease).duration(v.duration).attr("transform",k);var Re=Se.selectAll("."+v.cn.sankeyLinks).data(b,h);Re.enter().append("g").classed(v.cn.sankeyLinks,!0).style("fill","none");var Ee=Re.selectAll("."+v.cn.sankeyLink).data(function(De){var Ve=De.graph.links;return Ve.filter(function(Ye){return Ye.value}).map(A.bind(null,De))},h);Ee.enter().append("path").classed(v.cn.sankeyLink,!0).call(V,Se,te.linkEvents),Ee.style("stroke",function(De){return H(De)?r.tinyRGB(y(De.linkLineColor)):De.tinyColorHue}).style("stroke-opacity",function(De){return H(De)?r.opacity(De.linkLineColor):De.tinyColorAlpha}).style("fill",function(De){return De.tinyColorHue}).style("fill-opacity",function(De){return De.tinyColorAlpha}).style("stroke-width",function(De){return H(De)?De.linkLineWidth:1}).attr("d",S()),Ee.style("opacity",function(){return Z._context.staticPlot||ve||le?1:0}).transition().ease(v.ease).duration(v.duration).style("opacity",1),Ee.exit().transition().ease(v.ease).duration(v.duration).style("opacity",0).remove();var Oe=Se.selectAll("."+v.cn.sankeyNodeSet).data(b,h);Oe.enter().append("g").classed(v.cn.sankeyNodeSet,!0),Oe.style("cursor",function(De){switch(De.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var Be=Oe.selectAll("."+v.cn.sankeyNode).data(function(De){var Ve=De.graph.nodes;return ie(Ve),Ve.map(o.bind(null,De))},h);Be.enter().append("g").classed(v.cn.sankeyNode,!0).call(R).style("opacity",function(De){return(Z._context.staticPlot||ve)&&!De.partOfGroup?1:0}),Be.call(V,Se,te.nodeEvents).call(G,Ee,te,Z),Be.transition().ease(v.ease).duration(v.duration).call(R).style("opacity",function(De){return De.partOfGroup?0:1}),Be.exit().transition().ease(v.ease).duration(v.duration).style("opacity",0).remove();var Le=Be.selectAll("."+v.cn.nodeRect).data(b);Le.enter().append("rect").classed(v.cn.nodeRect,!0).call(N),Le.style("stroke-width",function(De){return De.nodeLineWidth}).style("stroke",function(De){return r.tinyRGB(y(De.nodeLineColor))}).style("stroke-opacity",function(De){return r.opacity(De.nodeLineColor)}).style("fill",function(De){return De.tinyColorHue}).style("fill-opacity",function(De){return De.tinyColorAlpha}),Le.transition().ease(v.ease).duration(v.duration).call(N);var Te=Be.selectAll("."+v.cn.nodeLabel).data(b);Te.enter().append("text").classed(v.cn.nodeLabel,!0).style("cursor","default"),Te.attr("data-notex",1).text(function(De){return De.node.label}).each(function(De){var Ve=a.select(this);n.font(Ve,De.textFont),E.convertToTspans(Ve,Z)}).style("text-shadow",E.makeTextShadow(Z._fullLayout.paper_bgcolor)).attr("text-anchor",function(De){return De.horizontal&&De.left?"end":"start"}).attr("transform",function(De){var Ve=a.select(this),Ye=E.lineCount(Ve),Ne=De.textFont.size*((Ye-1)*M-m),Xe=De.nodeLineWidth/2+L,ht=((De.horizontal?De.visibleHeight:De.visibleWidth)-Ne)/2;De.horizontal&&(De.left?Xe=-Xe:Xe+=De.visibleWidth);var st=De.horizontal?"":"scale(-1,1)"+f(90);return i(De.horizontal?Xe:ht,De.horizontal?ht:Xe)+st}),Te.transition().ease(v.ease).duration(v.duration)}},84564:function(z){z.exports=function(e,d){for(var P=e.cd,a=[],_=P[0].trace,x=_._sankey.graph.nodes,v=0;v<x.length;v++){var y=x[v];if(!y.partOfGroup){var r=[(y.x0+y.x1)/2,(y.y0+y.y1)/2];_.orientation==="v"&&r.reverse(),d&&d.contains(r,!1,v,e)&&a.push({pointNumber:y.pointNumber})}}return a}},75225:function(z,B,e){var d=e(71828);z.exports=function(a,_){for(var x=0;x<a.length;x++)a[x].i=x;d.mergeArray(_.text,a,"tx"),d.mergeArray(_.texttemplate,a,"txt"),d.mergeArray(_.hovertext,a,"htx"),d.mergeArray(_.customdata,a,"data"),d.mergeArray(_.textposition,a,"tp"),_.textfont&&(d.mergeArrayCastPositive(_.textfont.size,a,"ts"),d.mergeArray(_.textfont.color,a,"tc"),d.mergeArray(_.textfont.family,a,"tf"));var v=_.marker;if(v){d.mergeArrayCastPositive(v.size,a,"ms"),d.mergeArrayCastPositive(v.opacity,a,"mo"),d.mergeArray(v.symbol,a,"mx"),d.mergeArray(v.angle,a,"ma"),d.mergeArray(v.standoff,a,"mf"),d.mergeArray(v.color,a,"mc");var y=v.line;v.line&&(d.mergeArray(y.color,a,"mlc"),d.mergeArrayCastPositive(y.width,a,"mlw"));var r=v.gradient;r&&r.type!=="none"&&(d.mergeArray(r.type,a,"mgt"),d.mergeArray(r.color,a,"mgc"))}}},82196:function(z,B,e){var d=e(12663).axisHoverFormat,P=e(5386).s,a=e(5386).f,_=e(50693),x=e(41940),v=e(79952).P,y=e(79952).u,r=e(91424),n=e(47581),u=e(1426).extendFlat;function i(h){return{valType:"any",dflt:0,editType:"calc"}}function f(h){return{valType:"any",editType:"calc"}}function g(h){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}z.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:i(),yperiod:i(),xperiod0:f(),yperiod0:f(),xperiodalignment:g(),yperiodalignment:g(),xhoverformat:d("x"),yhoverformat:d("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:P({},{}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:a({},{keys:n.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:u({},v,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:{valType:"color",editType:"style",anim:!0},fillpattern:y,marker:u({symbol:{valType:"enumerated",values:r.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:u({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},_("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},_("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},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"},textfont:x({editType:"calc",colorEditType:"style",arrayOk:!0})}},47761:function(z,B,e){var d=e(92770),P=e(71828),a=e(89298),_=e(42973),x=e(50606).BADNUM,v=e(34098),y=e(36922),r=e(75225),n=e(66279);function u(p,E){var c=p._fullLayout,l=E._xA=a.getFromId(p,E.xaxis||"x","x"),m=E._yA=a.getFromId(p,E.yaxis||"y","y"),M=l.makeCalcdata(E,"x"),L=m.makeCalcdata(E,"y"),D=_(E,l,"x",M),A=_(E,m,"y",L),C=D.vals,S=A.vals,o=E._length,R=new Array(o),T=E.ids,O=b(E,c,l,m),N=!1,H,k,V,G,U,Y;g(c,E);var ee="x",re="y",ie;if(O)P.pushUnique(O.traceIndices,E._expandedIndex),H=O.orientation==="v",H?(re="s",ie="x"):(ee="s",ie="y"),U=O.stackgaps==="interpolate";else{var se=f(E,o);i(p,E,l,m,C,S,se)}var ce=!!E.xperiodalignment,q=!!E.yperiodalignment;for(k=0;k<o;k++){var j=R[k]={},Z=d(C[k]),Q=d(S[k]);Z&&Q?(j[ee]=C[k],j[re]=S[k],ce&&(j.orig_x=M[k],j.xEnd=D.ends[k],j.xStart=D.starts[k]),q&&(j.orig_y=L[k],j.yEnd=A.ends[k],j.yStart=A.starts[k])):O&&(H?Z:Q)?(j[ie]=H?C[k]:S[k],j.gap=!0,U?(j.s=x,N=!0):j.s=0):j[ee]=j[re]=x,T&&(j.id=String(T[k]))}if(r(R,E),y(p,E),n(R,E),O){for(k=0;k<R.length;)R[k][ie]===x?R.splice(k,1):k++;if(P.sort(R,function(ne,ve){return ne[ie]-ve[ie]||ne.i-ve.i}),N){for(k=0;k<R.length-1&&R[k].gap;)k++;for(Y=R[k].s,Y||(Y=R[k].s=0),V=0;V<k;V++)R[V].s=Y;for(G=R.length-1;G>k&&R[G].gap;)G--;for(Y=R[G].s,V=R.length-1;V>G;V--)R[V].s=Y;for(;k<G;)if(k++,R[k].gap){for(V=k+1;R[V].gap;)V++;for(var ue=R[k-1][ie],fe=R[k-1].s,te=(R[V].s-fe)/(R[V][ie]-ue);k<V;)R[k].s=fe+(R[k][ie]-ue)*te,k++}}}return R}function i(p,E,c,l,m,M,L){var D=E._length,A=p._fullLayout,C=c._id,S=l._id,o=A._firstScatter[h(E)]===E.uid,R=(b(E,A,c,l)||{}).orientation,T=E.fill;c._minDtick=0,l._minDtick=0;var O={padded:!0},N={padded:!0};L&&(O.ppad=N.ppad=L);var H=D<2||m[0]!==m[D-1]||M[0]!==M[D-1];H&&(T==="tozerox"||T==="tonextx"&&(o||R==="h"))?O.tozero=!0:!(E.error_y||{}).visible&&(T==="tonexty"||T==="tozeroy"||!v.hasMarkers(E)&&!v.hasText(E))&&(O.padded=!1,O.ppad=0),H&&(T==="tozeroy"||T==="tonexty"&&(o||R==="v"))?N.tozero=!0:(T==="tonextx"||T==="tozerox")&&(N.padded=!1),C&&(E._extremes[C]=a.findExtremes(c,m,O)),S&&(E._extremes[S]=a.findExtremes(l,M,N))}function f(p,E){if(v.hasMarkers(p)){var c=p.marker,l=1.6*(p.marker.sizeref||1),m;if(p.marker.sizemode==="area"?m=function(C){return Math.max(Math.sqrt((C||0)/l),3)}:m=function(C){return Math.max((C||0)/l,3)},P.isArrayOrTypedArray(c.size)){var M={type:"linear"};a.setConvert(M);for(var L=M.makeCalcdata(p.marker,"size"),D=new Array(E),A=0;A<E;A++)D[A]=m(L[A]);return D}else return m(c.size)}}function g(p,E){var c=h(E),l=p._firstScatter;l[c]||(l[c]=E.uid)}function h(p){var E=p.stackgroup;return p.xaxis+p.yaxis+p.type+(E?"-"+E:"")}function b(p,E,c,l){var m=p.stackgroup;if(m){var M=E._scatterStackOpts[c._id+l._id][m],L=M.orientation==="v"?l:c;if(L.type==="linear"||L.type==="log")return M}}z.exports={calc:u,calcMarkerSize:f,calcAxisExpansion:i,setFirstScatter:g,getStackOpts:b}},66279:function(z,B,e){var d=e(71828);z.exports=function(a,_){d.isArrayOrTypedArray(_.selectedpoints)&&d.tagSelected(a,_)}},36922:function(z,B,e){var d=e(52075).hasColorscale,P=e(78803),a=e(34098);z.exports=function(x,v){a.hasLines(v)&&d(v,"line")&&P(x,v,{vals:v.line.color,containerStr:"line",cLetter:"c"}),a.hasMarkers(v)&&(d(v,"marker")&&P(x,v,{vals:v.marker.color,containerStr:"marker",cLetter:"c"}),d(v,"marker.line")&&P(x,v,{vals:v.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}},47581:function(z){z.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}},72626:function(z,B,e){var d=e(47761),P=e(11661).setGroupPositions;function a(v,y){for(var r=y.xaxis,n=y.yaxis,u=v._fullLayout,i=v._fullData,f=v.calcdata,g=[],h=[],b=0;b<i.length;b++){var p=i[b];p.visible===!0&&p.type==="scatter"&&p.xaxis===r._id&&p.yaxis===n._id&&(p.orientation==="h"?g.push(f[b]):p.orientation==="v"&&h.push(f[b]))}var E={mode:u.scattermode,gap:u.scattergap};P(v,r,n,h,E),P(v,n,r,g,E)}z.exports=function(y,r){y._fullLayout.scattermode==="group"&&a(y,r);var n=r.xaxis,u=r.yaxis,i=n._id+u._id,f=y._fullLayout._scatterStackOpts[i];if(f){var g=y.calcdata,h,b,p,E,c,l,m,M,L,D,A,C,S,o,R;for(var T in f){D=f[T];var O=D.traceIndices;if(O.length){for(A=D.stackgaps==="interpolate",C=D.groupnorm,D.orientation==="v"?(S="x",o="y"):(S="y",o="x"),R=new Array(O.length),h=0;h<R.length;h++)R[h]=!1;l=g[O[0]];var N=new Array(l.length);for(h=0;h<l.length;h++)N[h]=l[h][S];for(h=1;h<O.length;h++){for(c=g[O[h]],b=p=0;b<c.length;b++){for(m=c[b][S];m>N[p]&&p<N.length;p++)_(c,b,N[p],h,R,A,S),b++;if(m!==N[p]){for(E=0;E<h;E++)_(g[O[E]],p,m,E,R,A,S);N.splice(p,0,m)}p++}for(;p<N.length;p++)_(c,b,N[p],h,R,A,S),b++}var H=N.length;for(b=0;b<l.length;b++){for(M=l[b][o]=l[b].s,h=1;h<O.length;h++)c=g[O[h]],c[0].trace._rawLength=c[0].trace._length,c[0].trace._length=H,M+=c[b].s,c[b][o]=M;if(C)for(L=(C==="fraction"?M:M/100)||1,h=0;h<O.length;h++){var k=g[O[h]][b];k[o]/=L,k.sNorm=k.s/L}}for(h=0;h<O.length;h++){c=g[O[h]];var V=c[0].trace,G=d.calcMarkerSize(V,V._rawLength),U=Array.isArray(G);if(G&&R[h]||U){var Y=G;for(G=new Array(H),b=0;b<H;b++)G[b]=c[b].gap?0:U?Y[c[b].i]:Y}var ee=new Array(H),re=new Array(H);for(b=0;b<H;b++)ee[b]=c[b].x,re[b]=c[b].y;d.calcAxisExpansion(y,V,n,u,ee,re,G),c[0].t.orientation=D.orientation}}}}};function _(v,y,r,n,u,i,f){u[n]=!0;var g={i:null,gap:!0,s:0};if(g[f]=r,v.splice(y,0,g),y&&r===v[y-1][f]){var h=v[y-1];g.s=h.s,g.i=h.i,g.gap=h.gap}else i&&(g.s=x(v,y,r,f));y||(v[0].t=v[1].t,v[0].trace=v[1].trace,delete v[1].t,delete v[1].trace)}function x(v,y,r,n){var u=v[y-1],i=v[y+1];return i?u?u.s+(i.s-u.s)*(r-u[n])/(i[n]-u[n]):i.s:u.s}},34936:function(z,B,e){var d=e(71828),P=e(26125),a=e(82196);z.exports=function(x,v){var y,r,n;function u(b){return d.coerce(r._input,r,a,b)}if(v.scattermode==="group")for(n=0;n<x.length;n++)r=x[n],r.type==="scatter"&&(y=r._input,P(y,r,v,u));for(n=0;n<x.length;n++){var i=x[n];if(i.type==="scatter"){var f=i.fill;if(!(f==="none"||f==="toself")&&(i.opacity=void 0,f==="tonexty"||f==="tonextx"))for(var g=n-1;g>=0;g--){var h=x[g];if(h.type==="scatter"&&h.xaxis===i.xaxis&&h.yaxis===i.yaxis){h.opacity=void 0;break}}}}}},17438:function(z,B,e){var d=e(71828),P=e(73972),a=e(82196),_=e(47581),x=e(34098),v=e(67513),y=e(73927),r=e(565),n=e(49508),u=e(11058),i=e(94039),f=e(82410),g=e(28908),h=e(71828).coercePattern;z.exports=function(p,E,c,l){function m(R,T){return d.coerce(p,E,a,R,T)}var M=v(p,E,l,m);if(M||(E.visible=!1),!!E.visible){y(p,E,l,m),m("xhoverformat"),m("yhoverformat");var L=r(p,E,l,m);l.scattermode==="group"&&E.orientation===void 0&&m("orientation","v");var D=!L&&M<_.PTS_LINESONLY?"lines+markers":"lines";m("text"),m("hovertext"),m("mode",D),x.hasLines(E)&&(u(p,E,c,l,m,{backoff:!0}),i(p,E,m),m("connectgaps"),m("line.simplify")),x.hasMarkers(E)&&n(p,E,c,l,m,{gradient:!0}),x.hasText(E)&&(m("texttemplate"),f(p,E,l,m));var A=[];(x.hasMarkers(E)||x.hasText(E))&&(m("cliponaxis"),m("marker.maxdisplayed"),A.push("points")),m("fill",L?L.fillDflt:"none"),E.fill!=="none"&&(g(p,E,c,m),x.hasLines(E)||i(p,E,m),h(m,"fillpattern",E.fillcolor,!1));var C=(E.line||{}).color,S=(E.marker||{}).color;(E.fill==="tonext"||E.fill==="toself")&&A.push("fills"),m("hoveron",A.join("+")||"points"),E.hoveron!=="fills"&&m("hovertemplate");var o=P.getComponentMethod("errorbars","supplyDefaults");o(p,E,C||S||c,{axis:"y"}),o(p,E,C||S||c,{axis:"x",inherit:"y"}),d.coerceSelectionMarkerOpacity(E,m)}}},28908:function(z,B,e){var d=e(7901),P=e(71828).isArrayOrTypedArray;z.exports=function(_,x,v,y){var r=!1;if(x.marker){var n=x.marker.color,u=(x.marker.line||{}).color;n&&!P(n)?r=n:u&&!P(u)&&(r=u)}y("fillcolor",d.addOpacity((x.line||{}).color||r||v,.5))}},8225:function(z,B,e){var d=e(89298);z.exports=function(a,_,x){var v={},y={_fullLayout:x},r=d.getFromTrace(y,_,"x"),n=d.getFromTrace(y,_,"y"),u=a.orig_x;u===void 0&&(u=a.x);var i=a.orig_y;return i===void 0&&(i=a.y),v.xLabel=d.tickText(r,r.c2l(u),!0).text,v.yLabel=d.tickText(n,n.c2l(i),!0).text,v}},34603:function(z,B,e){var d=e(7901),P=e(34098);z.exports=function(_,x){var v,y;if(_.mode==="lines")return v=_.line.color,v&&d.opacity(v)?v:_.fillcolor;if(_.mode==="none")return _.fill?_.fillcolor:"";var r=x.mcc||(_.marker||{}).color,n=x.mlcc||((_.marker||{}).line||{}).color;return y=r&&d.opacity(r)?r:n&&d.opacity(n)&&(x.mlw||((_.marker||{}).line||{}).width)?n:"",y?d.opacity(y)<.3?d.addOpacity(y,.3):y:(v=(_.line||{}).color,v&&d.opacity(v)&&P.hasLines(_)&&_.line.width?v:_.fillcolor)}},26125:function(z,B,e){var d=e(99082).getAxisGroup;z.exports=function(a,_,x,v){var y=_.orientation,r=_[{v:"x",h:"y"}[y]+"axis"],n=d(x,r)+y,u=x._alignmentOpts||{},i=v("alignmentgroup"),f=u[n];f||(f=u[n]={});var g=f[i];g?g.traces.push(_):g=f[i]={traces:[_],alignmentIndex:Object.keys(f).length,offsetGroups:{}};var h=v("offsetgroup"),b=g.offsetGroups,p=b[h];h&&(p||(p=b[h]={offsetIndex:Object.keys(b).length}),_._offsetIndex=p.offsetIndex)}},33720:function(z,B,e){var d=e(71828),P=e(30211),a=e(73972),_=e(34603),x=e(7901),v=d.fillText;z.exports=function(r,n,u,i){var f=r.cd,g=f[0].trace,h=r.xa,b=r.ya,p=h.c2p(n),E=b.c2p(u),c=[p,E],l=g.hoveron||"",m=g.mode.indexOf("markers")!==-1?3:.5,M=!!g.xperiodalignment,L=!!g.yperiodalignment;if(l.indexOf("points")!==-1){var D=function(xe){if(M){var Se=h.c2p(xe.xStart),Re=h.c2p(xe.xEnd);return p>=Math.min(Se,Re)&&p<=Math.max(Se,Re)?0:1/0}var Ee=Math.max(3,xe.mrc||0),Oe=1-1/Ee,Be=Math.abs(h.c2p(xe.x)-p);return Be<Ee?Oe*Be/Ee:Be-Ee+Oe},A=function(xe){if(L){var Se=b.c2p(xe.yStart),Re=b.c2p(xe.yEnd);return E>=Math.min(Se,Re)&&E<=Math.max(Se,Re)?0:1/0}var Ee=Math.max(3,xe.mrc||0),Oe=1-1/Ee,Be=Math.abs(b.c2p(xe.y)-E);return Be<Ee?Oe*Be/Ee:Be-Ee+Oe},C=function(xe){var Se=Math.max(m,xe.mrc||0),Re=h.c2p(xe.x)-p,Ee=b.c2p(xe.y)-E;return Math.max(Math.sqrt(Re*Re+Ee*Ee)-Se,1-m/Se)},S=P.getDistanceFunction(i,D,A,C);if(P.getClosest(f,S,r),r.index!==!1){var o=f[r.index],R=h.c2p(o.x,!0),T=b.c2p(o.y,!0),O=o.mrc||1;r.index=o.i;var N=f[0].t.orientation,H=N&&(o.sNorm||o.s),k=N==="h"?H:o.orig_x!==void 0?o.orig_x:o.x,V=N==="v"?H:o.orig_y!==void 0?o.orig_y:o.y;return d.extendFlat(r,{color:_(g,o),x0:R-O,x1:R+O,xLabelVal:k,y0:T-O,y1:T+O,yLabelVal:V,spikeDistance:C(o),hovertemplate:g.hovertemplate}),v(o,g,r),a.getComponentMethod("errorbars","hoverInfo")(o,g,r),[r]}}if(l.indexOf("fills")!==-1&&g._polygons){var G=g._polygons,U=[],Y=!1,ee=1/0,re=-1/0,ie=1/0,se=-1/0,ce,q,j,Z,Q,ue,fe,te,ne;for(ce=0;ce<G.length;ce++)j=G[ce],j.contains(c)&&(Y=!Y,U.push(j),ie=Math.min(ie,j.ymin),se=Math.max(se,j.ymax));if(Y){ie=Math.max(ie,0),se=Math.min(se,b._length);var ve=(ie+se)/2;for(ce=0;ce<U.length;ce++)for(Z=U[ce].pts,q=1;q<Z.length;q++)te=Z[q-1][1],ne=Z[q][1],te>ve!=ne>=ve&&(ue=Z[q-1][0],fe=Z[q][0],ne-te&&(Q=ue+(fe-ue)*(ve-te)/(ne-te),ee=Math.min(ee,Q),re=Math.max(re,Q)));ee=Math.max(ee,0),re=Math.min(re,h._length);var le=x.defaultLine;return x.opacity(g.fillcolor)?le=g.fillcolor:x.opacity((g.line||{}).color)&&(le=g.line.color),d.extendFlat(r,{distance:r.maxHoverDistance,x0:ee,x1:re,y0:ve,y1:ve,color:le,hovertemplate:!1}),delete r.index,g.text&&!Array.isArray(g.text)?r.text=String(g.text):r.text=g.name,[r]}}}},67368:function(z,B,e){var d=e(34098);z.exports={hasLines:d.hasLines,hasMarkers:d.hasMarkers,hasText:d.hasText,isBubble:d.isBubble,attributes:e(82196),layoutAttributes:e(21479),supplyDefaults:e(17438),crossTraceDefaults:e(34936),supplyLayoutDefaults:e(79334),calc:e(47761).calc,crossTraceCalc:e(72626),arraysToCalcdata:e(75225),plot:e(32663),colorbar:e(4898),formatLabels:e(8225),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(33720),selectPoints:e(98002),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:e(93612),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},21479:function(z){z.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}},79334:function(z,B,e){var d=e(71828),P=e(21479);z.exports=function(a,_){function x(y,r){return d.coerce(a,_,P,y,r)}var v=_.barmode==="group";_.scattermode==="group"&&x("scattergap",v?_.bargap:.2)}},11058:function(z,B,e){var d=e(71828).isArrayOrTypedArray,P=e(52075).hasColorscale,a=e(1586);z.exports=function(x,v,y,r,n,u){u||(u={});var i=(x.marker||{}).color;if(n("line.color",y),P(x,"line"))a(x,v,r,n,{prefix:"line.",cLetter:"c"});else{var f=(d(i)?!1:i)||y;n("line.color",f)}n("line.width"),u.noDash||n("line.dash"),u.backoff&&n("line.backoff")}},34621:function(z,B,e){var d=e(91424),P=e(50606),a=P.BADNUM,_=P.LOG_CLIP,x=_+.5,v=_-.5,y=e(71828),r=y.segmentsIntersect,n=y.constrain,u=e(47581);z.exports=function(f,g){var h=g.trace||{},b=g.xaxis,p=g.yaxis,E=b.type==="log",c=p.type==="log",l=b._length,m=p._length,M=g.backoff,L=h.marker,D=g.connectGaps,A=g.baseTolerance,C=g.shape,S=C==="linear",o=h.fill&&h.fill!=="none",R=[],T=u.minTolerance,O=f.length,N=new Array(O),H=0,k,V,G,U,Y,ee,re,ie,se,ce,q,j,Z,Q,ue,fe;function te(tt){var ct=f[tt];if(!ct)return!1;var St=g.linearized?b.l2p(ct.x):b.c2p(ct.x),Pt=g.linearized?p.l2p(ct.y):p.c2p(ct.y);if(St===a){if(E&&(St=b.c2p(ct.x,!0)),St===a)return!1;c&&Pt===a&&(St*=Math.abs(b._m*m*(b._m>0?x:v)/(p._m*l*(p._m>0?x:v)))),St*=1e3}if(Pt===a){if(c&&(Pt=p.c2p(ct.y,!0)),Pt===a)return!1;Pt*=1e3}return[St,Pt]}function ne(tt,ct,St,Pt){var wt=St-tt,Bt=Pt-ct,Wt=.5-tt,hr=.5-ct,gt=wt*wt+Bt*Bt,jt=wt*Wt+Bt*hr;if(jt>0&&jt<gt){var Ut=Wt*Bt-hr*wt;if(Ut*Ut<gt)return!0}}var ve,le;function xe(tt,ct){var St=tt[0]/l,Pt=tt[1]/m,wt=Math.max(0,-St,St-1,-Pt,Pt-1);return wt&&ve!==void 0&&ne(St,Pt,ve,le)&&(wt=0),wt&&ct&&ne(St,Pt,ct[0]/l,ct[1]/m)&&(wt=0),(1+u.toleranceGrowth*wt)*A}function Se(tt,ct){var St=tt[0]-ct[0],Pt=tt[1]-ct[1];return Math.sqrt(St*St+Pt*Pt)}var Re=u.maxScreensAway,Ee=-l*Re,Oe=l*(1+Re),Be=-m*Re,Le=m*(1+Re),Te=[[Ee,Be,Oe,Be],[Oe,Be,Oe,Le],[Oe,Le,Ee,Le],[Ee,Le,Ee,Be]],De,Ve,Ye,Ne,Xe,ht;function st(tt,ct){for(var St=[],Pt=0,wt=0;wt<4;wt++){var Bt=Te[wt],Wt=r(tt[0],tt[1],ct[0],ct[1],Bt[0],Bt[1],Bt[2],Bt[3]);Wt&&(!Pt||Math.abs(Wt.x-St[0][0])>1||Math.abs(Wt.y-St[0][1])>1)&&(Wt=[Wt.x,Wt.y],Pt&&Se(Wt,tt)<Se(St[0],tt)?St.unshift(Wt):St.push(Wt),Pt++)}return St}function it(tt){if(tt[0]<Ee||tt[0]>Oe||tt[1]<Be||tt[1]>Le)return[n(tt[0],Ee,Oe),n(tt[1],Be,Le)]}function nt(tt,ct){if(tt[0]===ct[0]&&(tt[0]===Ee||tt[0]===Oe)||tt[1]===ct[1]&&(tt[1]===Be||tt[1]===Le))return!0}function pt(tt,ct){var St=[],Pt=it(tt),wt=it(ct);return Pt&&wt&&nt(Pt,wt)||(Pt&&St.push(Pt),wt&&St.push(wt)),St}function Tt(tt,ct,St){return function(Pt,wt){var Bt=it(Pt),Wt=it(wt),hr=[];if(Bt&&Wt&&nt(Bt,Wt))return hr;Bt&&hr.push(Bt),Wt&&hr.push(Wt);var gt=2*y.constrain((Pt[tt]+wt[tt])/2,ct,St)-((Bt||Pt)[tt]+(Wt||wt)[tt]);if(gt){var jt;Bt&&Wt?jt=gt>0==Bt[tt]>Wt[tt]?Bt:Wt:jt=Bt||Wt,jt[tt]+=gt}return hr}}var Et;C==="linear"||C==="spline"?Et=st:C==="hv"||C==="vh"?Et=pt:C==="hvh"?Et=Tt(0,Ee,Oe):C==="vhv"&&(Et=Tt(1,Be,Le));function Dt(tt,ct){var St=ct[0]-tt[0],Pt=(ct[1]-tt[1])/St,wt=(tt[1]*ct[0]-ct[1]*tt[0])/St;return wt>0?[Pt>0?Ee:Oe,Le]:[Pt>0?Oe:Ee,Be]}function et(tt){var ct=tt[0],St=tt[1],Pt=ct===N[H-1][0],wt=St===N[H-1][1];if(!(Pt&&wt))if(H>1){var Bt=ct===N[H-2][0],Wt=St===N[H-2][1];Pt&&(ct===Ee||ct===Oe)&&Bt?Wt?H--:N[H-1]=tt:wt&&(St===Be||St===Le)&&Wt?Bt?H--:N[H-1]=tt:N[H++]=tt}else N[H++]=tt}function Ue(tt){N[H-1][0]!==tt[0]&&N[H-1][1]!==tt[1]&&et([Ye,Ne]),et(tt),Xe=null,Ye=Ne=0}var ze=y.isArrayOrTypedArray(L);function rt(tt){if(tt&&M&&(tt.i=k,tt.d=f,tt.trace=h,tt.marker=ze?L[tt.i]:L,tt.backoff=M),ve=tt[0]/l,le=tt[1]/m,De=tt[0]<Ee?Ee:tt[0]>Oe?Oe:0,Ve=tt[1]<Be?Be:tt[1]>Le?Le:0,De||Ve){if(!H)N[H++]=[De||tt[0],Ve||tt[1]];else if(Xe){var ct=Et(Xe,tt);ct.length>1&&(Ue(ct[0]),N[H++]=ct[1])}else ht=Et(N[H-1],tt)[0],N[H++]=ht;var St=N[H-1];De&&Ve&&(St[0]!==De||St[1]!==Ve)?(Xe&&(Ye!==De&&Ne!==Ve?et(Ye&&Ne?Dt(Xe,tt):[Ye||De,Ne||Ve]):Ye&&Ne&&et([Ye,Ne])),et([De,Ve])):Ye-De&&Ne-Ve&&et([De||Ye,Ve||Ne]),Xe=tt,Ye=De,Ne=Ve}else Xe&&Ue(Et(Xe,tt)[0]),N[H++]=tt}for(k=0;k<O;k++)if(V=te(k),!!V){for(H=0,Xe=null,rt(V),k++;k<O;k++){if(U=te(k),!U){if(D)continue;break}if(!S||!g.simplify){rt(U);continue}var lt=te(k+1);if(ce=Se(U,V),!(!(o&&(H===0||H===O-1))&&ce<xe(U,lt)*T)){for(ie=[(U[0]-V[0])/ce,(U[1]-V[1])/ce],Y=V,q=ce,j=Q=ue=0,re=!1,G=U,k++;k<f.length;k++){if(ee=lt,lt=te(k+1),!ee){if(D)continue;break}if(se=[ee[0]-V[0],ee[1]-V[1]],fe=se[0]*ie[1]-se[1]*ie[0],Q=Math.min(Q,fe),ue=Math.max(ue,fe),ue-Q>xe(ee,lt))break;G=ee,Z=se[0]*ie[0]+se[1]*ie[1],Z>q?(q=Z,U=ee,re=!1):Z<j&&(j=Z,Y=ee,re=!0)}if(re?(rt(U),G!==Y&&rt(Y)):(Y!==V&&rt(Y),G!==U&&rt(U)),rt(G),k>=f.length||!ee)break;rt(ee),V=ee}}Xe&&et([Ye||Xe[0],Ne||Xe[1]]),R.push(N.slice(0,H))}var Qe=C.slice(C.length-1);if(M&&Qe!=="h"&&Qe!=="v"){for(var Fe=!1,Ce=-1,pe=[],we=0;we<R.length;we++)for(var Ae=0;Ae<R[we].length-1;Ae++){var Pe=R[we][Ae],Ge=R[we][Ae+1],We=d.applyBackoff(Ge,Pe);(We[0]!==Ge[0]||We[1]!==Ge[1])&&(Fe=!0),pe[Ce+1]||(Ce++,pe[Ce]=[Pe,[We[0],We[1]]])}return Fe?pe:R}return R}},94039:function(z){z.exports=function(e,d,P){var a=P("line.shape");a==="spline"&&P("line.smoothing")}},68687:function(z){var B={tonextx:1,tonexty:1,tonext:1};z.exports=function(d,P,a){var _,x,v,y,r,n={},u=!1,i=-1,f=0,g=-1;for(x=0;x<a.length;x++)_=a[x][0].trace,v=_.stackgroup||"",v?v in n?r=n[v]:(r=n[v]=f,f++):_.fill in B&&g>=0?r=g:(r=g=f,f++),r<i&&(u=!0),_._groupIndex=i=r;var h=a.slice();u&&h.sort(function(p,E){var c=p[0].trace,l=E[0].trace;return c._groupIndex-l._groupIndex||c.index-l.index});var b={};for(x=0;x<h.length;x++)_=h[x][0].trace,v=_.stackgroup||"",_.visible===!0?(_._nexttrace=null,_.fill in B&&(y=b[v],_._prevtrace=y||null,y&&(y._nexttrace=_)),_._ownfill=_.fill&&(_.fill.substr(0,6)==="tozero"||_.fill==="toself"||_.fill.substr(0,2)==="to"&&!_._prevtrace),b[v]=_):_._prevtrace=_._nexttrace=_._ownfill=null;return h}},39984:function(z,B,e){var d=e(92770);z.exports=function(a,_){_||(_=2);var x=a.marker,v=x.sizeref||1,y=x.sizemin||0,r=x.sizemode==="area"?function(n){return Math.sqrt(n/v)}:function(n){return n/v};return function(n){var u=r(n/_);return d(u)&&u>0?Math.max(u,y):0}}},4898:function(z){z.exports={container:"marker",min:"cmin",max:"cmax"}},49508:function(z,B,e){var d=e(7901),P=e(52075).hasColorscale,a=e(1586),_=e(34098);z.exports=function(v,y,r,n,u,i){var f=_.isBubble(v),g=(v.line||{}).color,h;if(i=i||{},g&&(r=g),u("marker.symbol"),u("marker.opacity",f?.7:1),u("marker.size"),i.noAngle||(u("marker.angle"),i.noAngleRef||u("marker.angleref"),i.noStandOff||u("marker.standoff")),u("marker.color",r),P(v,"marker")&&a(v,y,n,u,{prefix:"marker.",cLetter:"c"}),i.noSelect||(u("selected.marker.color"),u("unselected.marker.color"),u("selected.marker.size"),u("unselected.marker.size")),i.noLine||(g&&!Array.isArray(g)&&y.marker.color!==g?h=g:f?h=d.background:h=d.defaultLine,u("marker.line.color",h),P(v,"marker.line")&&a(v,y,n,u,{prefix:"marker.line.",cLetter:"c"}),u("marker.line.width",f?1:0)),f&&(u("marker.sizeref"),u("marker.sizemin"),u("marker.sizemode")),i.gradient){var b=u("marker.gradient.type");b!=="none"&&u("marker.gradient.color")}}},73927:function(z,B,e){var d=e(71828).dateTick0,P=e(50606),a=P.ONEWEEK;function _(x,v){return x%a===0?d(v,1):d(v,0)}z.exports=function(v,y,r,n,u){if(u||(u={x:!0,y:!0}),u.x){var i=n("xperiod");i&&(n("xperiod0",_(i,y.xcalendar)),n("xperiodalignment"))}if(u.y){var f=n("yperiod");f&&(n("yperiod0",_(f,y.ycalendar)),n("yperiodalignment"))}}},32663:function(z,B,e){var d=e(39898),P=e(73972),a=e(71828),_=a.ensureSingle,x=a.identity,v=e(91424),y=e(34098),r=e(34621),n=e(68687),u=e(61082).tester;z.exports=function(b,p,E,c,l,m){var M,L,D=!l,A=!!l&&l.duration>0,C=n(b,p,E);if(M=c.selectAll("g.trace").data(C,function(o){return o[0].trace.uid}),M.enter().append("g").attr("class",function(o){return"trace scatter trace"+o[0].trace.uid}).style("stroke-miterlimit",2),M.order(),i(b,M,p),A){m&&(L=m());var S=d.transition().duration(l.duration).ease(l.easing).each("end",function(){L&&L()}).each("interrupt",function(){L&&L()});S.each(function(){c.selectAll("g.trace").each(function(o,R){f(b,R,p,o,C,this,l)})})}else M.each(function(o,R){f(b,R,p,o,C,this,l)});D&&M.exit().remove(),c.selectAll("path:not([d])").remove()};function i(h,b,p){b.each(function(E){var c=_(d.select(this),"g","fills");v.setClipUrl(c,p.layerClipId,h);var l=E[0].trace,m=[];l._ownfill&&m.push("_ownFill"),l._nexttrace&&m.push("_nextFill");var M=c.selectAll("g").data(m,x);M.enter().append("g"),M.exit().each(function(L){l[L]=null}).remove(),M.order().each(function(L){l[L]=_(d.select(this),"path","js-fill")})})}function f(h,b,p,E,c,l,m){var M=h._context.staticPlot,L;g(h,b,p,E,c);var D=!!m&&m.duration>0;function A(Ne){return D?Ne.transition():Ne}var C=p.xaxis,S=p.yaxis,o=E[0].trace,R=o.line,T=d.select(l),O=_(T,"g","errorbars"),N=_(T,"g","lines"),H=_(T,"g","points"),k=_(T,"g","text");if(P.getComponentMethod("errorbars","plot")(h,O,p,m),o.visible!==!0)return;A(T).style("opacity",o.opacity);var V,G,U=o.fill.charAt(o.fill.length-1);U!=="x"&&U!=="y"&&(U=""),E[0][p.isRangePlot?"nodeRangePlot3":"node3"]=T;var Y="",ee=[],re=o._prevtrace;re&&(Y=re._prevRevpath||"",G=re._nextFill,ee=re._polygons);var ie,se,ce="",q="",j,Z,Q,ue,fe,te,ne,ve=[],le=a.noop;if(V=o._ownFill,y.hasLines(o)||o.fill!=="none"){for(G&&G.datum(E),["hv","vh","hvh","vhv"].indexOf(R.shape)!==-1?(j=v.steps(R.shape),Z=v.steps(R.shape.split("").reverse().join(""))):R.shape==="spline"?j=Z=function(Ne){var Xe=Ne[Ne.length-1];return Ne.length>1&&Ne[0][0]===Xe[0]&&Ne[0][1]===Xe[1]?v.smoothclosed(Ne.slice(1),R.smoothing):v.smoothopen(Ne,R.smoothing)}:j=Z=function(Ne){return"M"+Ne.join("L")},Q=function(Ne){return Z(Ne.reverse())},ve=r(E,{xaxis:C,yaxis:S,trace:o,connectGaps:o.connectgaps,baseTolerance:Math.max(R.width||1,3)/4,shape:R.shape,backoff:R.backoff,simplify:R.simplify,fill:o.fill}),ne=o._polygons=new Array(ve.length),L=0;L<ve.length;L++)o._polygons[L]=u(ve[L]);ve.length&&(ue=ve[0][0],fe=ve[ve.length-1],te=fe[fe.length-1]),le=function(Ne){return function(Xe){if(ie=j(Xe),se=Q(Xe),ce?U?(ce+="L"+ie.substr(1),q=se+("L"+q.substr(1))):(ce+="Z"+ie,q=se+"Z"+q):(ce=ie,q=se),y.hasLines(o)){var ht=d.select(this);if(ht.datum(E),Ne)A(ht.style("opacity",0).attr("d",ie).call(v.lineGroupStyle)).style("opacity",1);else{var st=A(ht);st.attr("d",ie),v.singleLineStyle(E,st)}}}}}var xe=N.selectAll(".js-line").data(ve);A(xe.exit()).style("opacity",0).remove(),xe.each(le(!1)),xe.enter().append("path").classed("js-line",!0).style("vector-effect",M?"none":"non-scaling-stroke").call(v.lineGroupStyle).each(le(!0)),v.setClipUrl(xe,p.layerClipId,h);function Se(Ne){A(Ne).attr("d","M0,0Z")}ve.length?(V?(V.datum(E),ue&&te&&(U?(U==="y"?ue[1]=te[1]=S.c2p(0,!0):U==="x"&&(ue[0]=te[0]=C.c2p(0,!0)),A(V).attr("d","M"+te+"L"+ue+"L"+ce.substr(1)).call(v.singleFillStyle,h)):A(V).attr("d",ce+"Z").call(v.singleFillStyle,h))):G&&(o.fill.substr(0,6)==="tonext"&&ce&&Y?(o.fill==="tonext"?A(G).attr("d",ce+"Z"+Y+"Z").call(v.singleFillStyle,h):A(G).attr("d",ce+"L"+Y.substr(1)+"Z").call(v.singleFillStyle,h),o._polygons=o._polygons.concat(ee)):(Se(G),o._polygons=null)),o._prevRevpath=q,o._prevPolygons=ne):(V?Se(V):G&&Se(G),o._polygons=o._prevRevpath=o._prevPolygons=null);function Re(Ne){return Ne.filter(function(Xe){return!Xe.gap&&Xe.vis})}function Ee(Ne){return Ne.filter(function(Xe){return Xe.vis})}function Oe(Ne){return Ne.filter(function(Xe){return!Xe.gap})}function Be(Ne){return Ne.id}function Le(Ne){if(Ne.ids)return Be}function Te(){return!1}function De(Ne,Xe,ht){var st,it,nt,pt=ht[0].trace,Tt=y.hasMarkers(pt),Et=y.hasText(pt),Dt=Le(pt),et=Te,Ue=Te;if(Tt||Et){var ze=x,rt=pt.stackgroup,lt=rt&&h._fullLayout._scatterStackOpts[C._id+S._id][rt].stackgaps==="infer zero";pt.marker.maxdisplayed||pt._needsCull?ze=lt?Ee:Re:rt&&!lt&&(ze=Oe),Tt&&(et=ze),Et&&(Ue=ze)}it=Ne.selectAll("path.point"),st=it.data(et,Dt);var Qe=st.enter().append("path").classed("point",!0);D&&Qe.call(v.pointStyle,pt,h).call(v.translatePoints,C,S).style("opacity",0).transition().style("opacity",1),st.order();var Fe;Tt&&(Fe=v.makePointStyleFns(pt)),st.each(function(Ce){var pe=d.select(this),we=A(pe);nt=v.translatePoint(Ce,we,C,S),nt?(v.singlePointStyle(Ce,we,pt,Fe,h),p.layerClipId&&v.hideOutsideRangePoint(Ce,we,C,S,pt.xcalendar,pt.ycalendar),pt.customdata&&pe.classed("plotly-customdata",Ce.data!==null&&Ce.data!==void 0)):we.remove()}),D?st.exit().transition().style("opacity",0).remove():st.exit().remove(),it=Xe.selectAll("g"),st=it.data(Ue,Dt),st.enter().append("g").classed("textpoint",!0).append("text"),st.order(),st.each(function(Ce){var pe=d.select(this),we=A(pe.select("text"));nt=v.translatePoint(Ce,we,C,S),nt?p.layerClipId&&v.hideOutsideRangePoint(Ce,pe,C,S,pt.xcalendar,pt.ycalendar):pe.remove()}),st.selectAll("text").call(v.textPointStyle,pt,h).each(function(Ce){var pe=C.c2p(Ce.x),we=S.c2p(Ce.y);d.select(this).selectAll("tspan.line").each(function(){A(d.select(this)).attr({x:pe,y:we})})}),st.exit().remove()}H.datum(E),k.datum(E),De(H,k,E);var Ve=o.cliponaxis===!1,Ye=Ve?null:p.layerClipId;v.setClipUrl(H,Ye,h),v.setClipUrl(k,Ye,h)}function g(h,b,p,E,c){var l=p.xaxis,m=p.yaxis,M=d.extent(a.simpleMap(l.range,l.r2c)),L=d.extent(a.simpleMap(m.range,m.r2c)),D=E[0].trace;if(y.hasMarkers(D)){var A=D.marker.maxdisplayed;if(A!==0){var C=E.filter(function(T){return T.x>=M[0]&&T.x<=M[1]&&T.y>=L[0]&&T.y<=L[1]}),S=Math.ceil(C.length/A),o=0;c.forEach(function(T,O){var N=T[0].trace;y.hasMarkers(N)&&N.marker.maxdisplayed>0&&O<b&&o++});var R=Math.round(o*S/3+Math.floor(o/3)*S/7.1);E.forEach(function(T){delete T.vis}),C.forEach(function(T,O){Math.round((O+R)%S)===0&&(T.vis=!0)})}}}},98002:function(z,B,e){var d=e(34098);z.exports=function(a,_){var x=a.cd,v=a.xaxis,y=a.yaxis,r=[],n=x[0].trace,u,i,f,g,h=!d.hasMarkers(n)&&!d.hasText(n);if(h)return[];if(_===!1)for(u=0;u<x.length;u++)x[u].selected=0;else for(u=0;u<x.length;u++)i=x[u],f=v.c2p(i.x),g=y.c2p(i.y),i.i!==null&&_.contains([f,g],!1,u,a)?(r.push({pointNumber:i.i,x:v.c2d(i.x),y:y.c2d(i.y)}),i.selected=1):i.selected=0;return r}},565:function(z){var B=["orientation","groupnorm","stackgaps"];z.exports=function(d,P,a,_){var x=a._scatterStackOpts,v=_("stackgroup");if(v){var y=P.xaxis+P.yaxis,r=x[y];r||(r=x[y]={});var n=r[v],u=!1;n?n.traces.push(P):(n=r[v]={traceIndices:[],traces:[P]},u=!0);for(var i={orientation:P.x&&!P.y?"h":"v"},f=0;f<B.length;f++){var g=B[f],h=g+"Found";if(!n[h]){var b=d[g]!==void 0,p=g==="orientation";if((b||u)&&(n[g]=_(g,i[g]),p&&(n.fillDflt=n[g]==="h"?"tonextx":"tonexty"),b&&(n[h]=!0,!u&&(delete n.traces[0][g],p))))for(var E=0;E<n.traces.length-1;E++){var c=n.traces[E];c._input.fill!==c.fill&&(c.fill=n.fillDflt)}}}return n}}},16296:function(z,B,e){var d=e(39898),P=e(91424),a=e(73972);function _(r){var n=d.select(r).selectAll("g.trace.scatter");n.style("opacity",function(u){return u[0].trace.opacity}),n.selectAll("g.points").each(function(u){var i=d.select(this),f=u.trace||u[0].trace;x(i,f,r)}),n.selectAll("g.text").each(function(u){var i=d.select(this),f=u.trace||u[0].trace;v(i,f,r)}),n.selectAll("g.trace path.js-line").call(P.lineGroupStyle),n.selectAll("g.trace path.js-fill").call(P.fillGroupStyle,r),a.getComponentMethod("errorbars","style")(n)}function x(r,n,u){P.pointStyle(r.selectAll("path.point"),n,u)}function v(r,n,u){P.textPointStyle(r.selectAll("text"),n,u)}function y(r,n,u){var i=n[0].trace;i.selectedpoints?(P.selectedPointStyle(u.selectAll("path.point"),i),P.selectedTextStyle(u.selectAll("text"),i)):(x(u,i,r),v(u,i,r))}z.exports={style:_,stylePoints:x,styleText:v,styleOnSelect:y}},34098:function(z,B,e){var d=e(71828);z.exports={hasLines:function(P){return P.visible&&P.mode&&P.mode.indexOf("lines")!==-1},hasMarkers:function(P){return P.visible&&(P.mode&&P.mode.indexOf("markers")!==-1||P.type==="splom")},hasText:function(P){return P.visible&&P.mode&&P.mode.indexOf("text")!==-1},isBubble:function(P){return d.isPlainObject(P.marker)&&d.isArrayOrTypedArray(P.marker.size)}}},82410:function(z,B,e){var d=e(71828);z.exports=function(P,a,_,x,v){v=v||{},x("textposition"),d.coerceFont(x,"textfont",_.font),v.noSelect||(x("selected.textfont.color"),x("unselected.textfont.color"))}},67513:function(z,B,e){var d=e(71828),P=e(73972);z.exports=function(_,x,v,y){var r=y("x"),n=y("y"),u,i=P.getComponentMethod("calendars","handleTraceDefaults");if(i(_,x,["x","y"],v),r){var f=d.minRowLength(r);n?u=Math.min(f,d.minRowLength(n)):(u=f,y("y0"),y("dy"))}else{if(!n)return 0;u=d.minRowLength(n),y("x0"),y("dx")}return x._length=u,u}},44542:function(z,B,e){var d=e(82196),P=e(50693),a=e(12663).axisHoverFormat,_=e(5386).f,x=e(5386).s,v=e(9012),y=e(29659),r=e(87381),n=e(1426).extendFlat,u=e(30962).overrideAll,i=e(78607),f=d.line,g=d.marker,h=g.line,b=n({width:f.width,dash:{valType:"enumerated",values:i(y),dflt:"solid"}},P("line"));function p(c){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:.6666666666666666}}}var E=z.exports=u({x:d.x,y:d.y,z:{valType:"data_array"},text:n({},d.text,{}),texttemplate:x({},{}),hovertext:n({},d.hovertext,{}),hovertemplate:_(),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),mode:n({},d.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:p(),y:p(),z:p()},connectgaps:d.connectgaps,line:b,marker:n({symbol:{valType:"enumerated",values:i(r),dflt:"circle",arrayOk:!0},size:n({},g.size,{dflt:8}),sizeref:g.sizeref,sizemin:g.sizemin,sizemode:g.sizemode,opacity:n({},g.opacity,{arrayOk:!1}),colorbar:g.colorbar,line:n({width:n({},h.width,{arrayOk:!1})},P("marker.line"))},P("marker")),textposition:n({},d.textposition,{dflt:"top center"}),textfont:{color:d.textfont.color,size:d.textfont.size,family:n({},d.textfont.family,{arrayOk:!1})},opacity:v.opacity,hoverinfo:n({},v.hoverinfo)},"calc","nested");E.x.editType=E.y.editType=E.z.editType="calc+clearAxisTypes"},36563:function(z,B,e){var d=e(75225),P=e(36922);z.exports=function(_,x){var v=[{x:!1,y:!1,trace:x,t:{}}];return d(v,x),P(_,x),v}},67336:function(z,B,e){var d=e(73972);function P(x,v,y,r){if(!v||!v.visible)return null;for(var n=d.getComponentMethod("errorbars","makeComputeError")(v),u=new Array(x.length),i=0;i<x.length;i++){var f=n(+x[i],i);if(r.type==="log"){var g=r.c2l(x[i]),h=x[i]-f[0],b=x[i]+f[1];if(u[i]=[(r.c2l(h,!0)-g)*y,(r.c2l(b,!0)-g)*y],h>0){var p=r.c2l(h);r._lowerLogErrorBound||(r._lowerLogErrorBound=p),r._lowerErrorBound=Math.min(r._lowerLogErrorBound,p)}}else u[i]=[-f[0]*y,f[1]*y]}return u}function a(x){for(var v=0;v<x.length;v++)if(x[v])return x[v].length;return 0}function _(x,v,y){var r=[P(x.x,x.error_x,v[0],y.xaxis),P(x.y,x.error_y,v[1],y.yaxis),P(x.z,x.error_z,v[2],y.zaxis)],n=a(r);if(n===0)return null;for(var u=new Array(n),i=0;i<n;i++){for(var f=[[0,0,0],[0,0,0]],g=0;g<3;g++)if(r[g])for(var h=0;h<2;h++)f[h][g]=r[g][i][h];u[i]=f}return u}z.exports=_},58925:function(z,B,e){var d=e(9330).gl_line3d,P=e(9330).gl_scatter3d,a=e(9330).gl_error3d,_=e(9330).gl_mesh3d,x=e(9330).delaunay_triangulate,v=e(71828),y=e(78614),r=e(81697).formatColor,n=e(39984),u=e(29659),i=e(87381),f=e(89298),g=e(23469).appendArrayPointValue,h=e(67336);function b(T,O){this.scene=T,this.uid=O,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var p=b.prototype;p.handlePick=function(T){if(T.object&&(T.object===this.linePlot||T.object===this.delaunayMesh||T.object===this.textMarkers||T.object===this.scatterPlot)){var O=T.index=T.data.index;return T.object.highlight&&T.object.highlight(null),this.scatterPlot&&(T.object=this.scatterPlot,this.scatterPlot.highlight(T.data)),T.textLabel="",this.textLabels&&(Array.isArray(this.textLabels)?(this.textLabels[O]||this.textLabels[O]===0)&&(T.textLabel=this.textLabels[O]):T.textLabel=this.textLabels),T.traceCoordinate=[this.data.x[O],this.data.y[O],this.data.z[O]],!0}};function E(T,O,N){var H=(N+1)%3,k=(N+2)%3,V=[],G=[],U;for(U=0;U<T.length;++U){var Y=T[U];isNaN(Y[H])||!isFinite(Y[H])||isNaN(Y[k])||!isFinite(Y[k])||(V.push([Y[H],Y[k]]),G.push(U))}var ee=x(V);for(U=0;U<ee.length;++U)for(var re=ee[U],ie=0;ie<re.length;++ie)re[ie]=G[re[ie]];return{positions:T,cells:ee,meshColor:O}}function c(T){for(var O=[0,0,0],N=[[0,0,0],[0,0,0],[0,0,0]],H=[1,1,1],k=0;k<3;k++){var V=T[k];V&&V.copy_zstyle!==!1&&T[2].visible!==!1&&(V=T[2]),!(!V||!V.visible)&&(O[k]=V.width/2,N[k]=y(V.color),H[k]=V.thickness)}return{capSize:O,color:N,lineWidth:H}}function l(T){return T==null?0:T.indexOf("left")>-1?-1:T.indexOf("right")>-1?1:0}function m(T){return T==null?0:T.indexOf("top")>-1?-1:T.indexOf("bottom")>-1?1:0}function M(T){var O=0,N=0,H=[O,N];if(Array.isArray(T))for(var k=0;k<T.length;k++)H[k]=[O,N],T[k]&&(H[k][0]=l(T[k]),H[k][1]=m(T[k]));else H[0]=l(T),H[1]=m(T);return H}function L(T,O){return O(T*4)}function D(T){return i[T]}function A(T,O,N,H,k){var V=null;if(v.isArrayOrTypedArray(T)){V=[];for(var G=0;G<O;G++)T[G]===void 0?V[G]=H:V[G]=N(T[G],k)}else V=N(T,v.identity);return V}function C(T,O){var N=[],H=T.fullSceneLayout,k=T.dataScale,V=H.xaxis,G=H.yaxis,U=H.zaxis,Y=O.marker,ee=O.line,re=O.x||[],ie=O.y||[],se=O.z||[],ce=re.length,q=O.xcalendar,j=O.ycalendar,Z=O.zcalendar,Q,ue,fe,te,ne,ve;for(ne=0;ne<ce;ne++)Q=V.d2l(re[ne],0,q)*k[0],ue=G.d2l(ie[ne],0,j)*k[1],fe=U.d2l(se[ne],0,Z)*k[2],N[ne]=[Q,ue,fe];if(Array.isArray(O.text))ve=O.text;else if(O.text!==void 0)for(ve=new Array(ce),ne=0;ne<ce;ne++)ve[ne]=O.text;function le(st,it){var nt=H[st];return f.tickText(nt,nt.d2l(it),!0).text}var xe=O.texttemplate;if(xe){var Se=T.fullLayout,Re=Se._d3locale,Ee=Array.isArray(xe),Oe=Ee?Math.min(xe.length,ce):ce,Be=Ee?function(st){return xe[st]}:function(){return xe};for(ve=new Array(Oe),ne=0;ne<Oe;ne++){var Le={x:re[ne],y:ie[ne],z:se[ne]},Te={xLabel:le("xaxis",re[ne]),yLabel:le("yaxis",ie[ne]),zLabel:le("zaxis",se[ne])},De={};g(De,O,ne);var Ve=O._meta||{};ve[ne]=v.texttemplateString(Be(ne),Te,Re,De,Le,Ve)}}if(te={position:N,mode:O.mode,text:ve},"line"in O&&(te.lineColor=r(ee,1,ce),te.lineWidth=ee.width,te.lineDashes=ee.dash),"marker"in O){var Ye=n(O);te.scatterColor=r(Y,1,ce),te.scatterSize=A(Y.size,ce,L,20,Ye),te.scatterMarker=A(Y.symbol,ce,D,"●"),te.scatterLineWidth=Y.line.width,te.scatterLineColor=r(Y.line,1,ce),te.scatterAngle=0}"textposition"in O&&(te.textOffset=M(O.textposition),te.textColor=r(O.textfont,1,ce),te.textSize=A(O.textfont.size,ce,v.identity,12),te.textFont=O.textfont.family,te.textAngle=0);var Ne=["x","y","z"];for(te.project=[!1,!1,!1],te.projectScale=[1,1,1],te.projectOpacity=[1,1,1],ne=0;ne<3;++ne){var Xe=O.projection[Ne[ne]];(te.project[ne]=Xe.show)&&(te.projectOpacity[ne]=Xe.opacity,te.projectScale[ne]=Xe.scale)}te.errorBounds=h(O,k,H);var ht=c([O.error_x,O.error_y,O.error_z]);return te.errorColor=ht.color,te.errorLineWidth=ht.lineWidth,te.errorCapSize=ht.capSize,te.delaunayAxis=O.surfaceaxis,te.delaunayColor=y(O.surfacecolor),te}function S(T){if(v.isArrayOrTypedArray(T)){var O=T[0];return v.isArrayOrTypedArray(O)&&(T=O),"rgb("+T.slice(0,3).map(function(N){return Math.round(N*255)})+")"}return null}function o(T){return v.isArrayOrTypedArray(T)?T.length===4&&typeof T[0]=="number"?S(T):T.map(S):null}p.update=function(T){var O=this.scene.glplot.gl,N,H,k,V,G=u.solid;this.data=T;var U=C(this.scene,T);"mode"in U&&(this.mode=U.mode),"lineDashes"in U&&U.lineDashes in u&&(G=u[U.lineDashes]),this.color=o(U.scatterColor)||o(U.lineColor),this.dataPoints=U.position,N={gl:this.scene.glplot.gl,position:U.position,color:U.lineColor,lineWidth:U.lineWidth||1,dashes:G[0],dashScale:G[1],opacity:T.opacity,connectGaps:T.connectgaps},this.mode.indexOf("lines")!==-1?this.linePlot?this.linePlot.update(N):(this.linePlot=d(N),this.linePlot._trace=this,this.scene.glplot.add(this.linePlot)):this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose(),this.linePlot=null);var Y=T.opacity;if(T.marker&&T.marker.opacity&&(Y*=T.marker.opacity),H={gl:this.scene.glplot.gl,position:U.position,color:U.scatterColor,size:U.scatterSize,glyph:U.scatterMarker,opacity:Y,orthographic:!0,lineWidth:U.scatterLineWidth,lineColor:U.scatterLineColor,project:U.project,projectScale:U.projectScale,projectOpacity:U.projectOpacity},this.mode.indexOf("markers")!==-1?this.scatterPlot?this.scatterPlot.update(H):(this.scatterPlot=P(H),this.scatterPlot._trace=this,this.scatterPlot.highlightScale=1,this.scene.glplot.add(this.scatterPlot)):this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose(),this.scatterPlot=null),V={gl:this.scene.glplot.gl,position:U.position,glyph:U.text,color:U.textColor,size:U.textSize,angle:U.textAngle,alignment:U.textOffset,font:U.textFont,orthographic:!0,lineWidth:0,project:!1,opacity:T.opacity},this.textLabels=T.hovertext||T.text,this.mode.indexOf("text")!==-1?this.textMarkers?this.textMarkers.update(V):(this.textMarkers=P(V),this.textMarkers._trace=this,this.textMarkers.highlightScale=1,this.scene.glplot.add(this.textMarkers)):this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose(),this.textMarkers=null),k={gl:this.scene.glplot.gl,position:U.position,color:U.errorColor,error:U.errorBounds,lineWidth:U.errorLineWidth,capSize:U.errorCapSize,opacity:T.opacity},this.errorBars?U.errorBounds?this.errorBars.update(k):(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose(),this.errorBars=null):U.errorBounds&&(this.errorBars=a(k),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),U.delaunayAxis>=0){var ee=E(U.position,U.delaunayColor,U.delaunayAxis);ee.opacity=T.opacity,this.delaunayMesh?this.delaunayMesh.update(ee):(ee.gl=O,this.delaunayMesh=_(ee),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 R(T,O){var N=new b(T,O.uid);return N.update(O),N}z.exports=R},21428:function(z,B,e){var d=e(73972),P=e(71828),a=e(34098),_=e(49508),x=e(11058),v=e(82410),y=e(44542);z.exports=function(u,i,f,g){function h(L,D){return P.coerce(u,i,y,L,D)}var b=r(u,i,h,g);if(!b){i.visible=!1;return}h("text"),h("hovertext"),h("hovertemplate"),h("xhoverformat"),h("yhoverformat"),h("zhoverformat"),h("mode"),a.hasLines(i)&&(h("connectgaps"),x(u,i,f,g,h)),a.hasMarkers(i)&&_(u,i,f,g,h,{noSelect:!0,noAngle:!0}),a.hasText(i)&&(h("texttemplate"),v(u,i,g,h,{noSelect:!0}));var p=(i.line||{}).color,E=(i.marker||{}).color;h("surfaceaxis")>=0&&h("surfacecolor",p||E);for(var c=["x","y","z"],l=0;l<3;++l){var m="projection."+c[l];h(m+".show")&&(h(m+".opacity"),h(m+".scale"))}var M=d.getComponentMethod("errorbars","supplyDefaults");M(u,i,p||E||f,{axis:"z"}),M(u,i,p||E||f,{axis:"y",inherit:"z"}),M(u,i,p||E||f,{axis:"x",inherit:"z"})};function r(n,u,i,f){var g=0,h=i("x"),b=i("y"),p=i("z"),E=d.getComponentMethod("calendars","handleTraceDefaults");return E(n,u,["x","y","z"],f),h&&b&&p&&(g=Math.min(h.length,b.length,p.length),u._length=u._xlength=u._ylength=u._zlength=g),g}},13551:function(z,B,e){z.exports={plot:e(58925),attributes:e(44542),markerSymbols:e(87381),supplyDefaults:e(21428),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:e(36563),moduleType:"trace",name:"scatter3d",basePlotModule:e(58547),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},97001:function(z,B,e){var d=e(82196),P=e(9012),a=e(5386).f,_=e(5386).s,x=e(50693),v=e(1426).extendFlat,y=d.marker,r=d.line,n=y.line;z.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:v({},d.mode,{dflt:"markers"}),text:v({},d.text,{}),texttemplate:_({editType:"plot"},{keys:["a","b","text"]}),hovertext:v({},d.hovertext,{}),line:{color:r.color,width:r.width,dash:r.dash,backoff:r.backoff,shape:v({},r.shape,{values:["linear","spline"]}),smoothing:r.smoothing,editType:"calc"},connectgaps:d.connectgaps,fill:v({},d.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:d.fillcolor,marker:v({symbol:y.symbol,opacity:y.opacity,maxdisplayed:y.maxdisplayed,angle:y.angle,angleref:y.angleref,standoff:y.standoff,size:y.size,sizeref:y.sizeref,sizemin:y.sizemin,sizemode:y.sizemode,line:v({width:n.width,editType:"calc"},x("marker.line")),gradient:y.gradient,editType:"calc"},x("marker")),textfont:d.textfont,textposition:d.textposition,selected:d.selected,unselected:d.unselected,hoverinfo:v({},P.hoverinfo,{flags:["a","b","text","name"]}),hoveron:d.hoveron,hovertemplate:a()}},34618:function(z,B,e){var d=e(92770),P=e(36922),a=e(75225),_=e(66279),x=e(47761).calcMarkerSize,v=e(22882);z.exports=function(r,n){var u=n._carpetTrace=v(r,n);if(!(!u||!u.visible||u.visible==="legendonly")){var i;n.xaxis=u.xaxis,n.yaxis=u.yaxis;var f=n._length,g=new Array(f),h,b,p=!1;for(i=0;i<f;i++)if(h=n.a[i],b=n.b[i],d(h)&&d(b)){var E=u.ab2xy(+h,+b,!0),c=u.isVisible(+h,+b);c||(p=!0),g[i]={x:E[0],y:E[1],a:h,b,vis:c}}else g[i]={x:!1,y:!1};return n._needsCull=p,g[0].carpet=u,g[0].trace=n,x(n,f),P(r,n),a(g,n),_(g,n),g}}},98965:function(z,B,e){var d=e(71828),P=e(47581),a=e(34098),_=e(49508),x=e(11058),v=e(94039),y=e(82410),r=e(28908),n=e(97001);z.exports=function(i,f,g,h){function b(L,D){return d.coerce(i,f,n,L,D)}b("carpet"),f.xaxis="x",f.yaxis="y";var p=b("a"),E=b("b"),c=Math.min(p.length,E.length);if(!c){f.visible=!1;return}f._length=c,b("text"),b("texttemplate"),b("hovertext");var l=c<P.PTS_LINESONLY?"lines+markers":"lines";b("mode",l),a.hasLines(f)&&(x(i,f,g,h,b,{backoff:!0}),v(i,f,b),b("connectgaps")),a.hasMarkers(f)&&_(i,f,g,h,b,{gradient:!0}),a.hasText(f)&&y(i,f,h,b);var m=[];(a.hasMarkers(f)||a.hasText(f))&&(b("marker.maxdisplayed"),m.push("points")),b("fill"),f.fill!=="none"&&(r(i,f,g,b),a.hasLines(f)||v(i,f,b)),(f.fill==="tonext"||f.fill==="toself")&&m.push("fills");var M=b("hoveron",m.join("+")||"points");M!=="fills"&&b("hovertemplate"),d.coerceSelectionMarkerOpacity(f,b)}},16165:function(z){z.exports=function(e,d,P,a,_){var x=a[_];return e.a=x.a,e.b=x.b,e.y=x.y,e}},48953:function(z){z.exports=function(e,d){var P={},a=d._carpet,_=a.ab2ij([e.a,e.b]),x=Math.floor(_[0]),v=_[0]-x,y=Math.floor(_[1]),r=_[1]-y,n=a.evalxy([],x,y,v,r);return P.yLabel=n[1].toFixed(3),P}},22931:function(z,B,e){var d=e(33720),P=e(71828).fillText;z.exports=function(_,x,v,y){var r=d(_,x,v,y);if(!r||r[0].index===!1)return;var n=r[0];if(n.index===void 0){var u=1-n.y0/_.ya._length,i=_.xa._length,f=i*u/2,g=i-f;return n.x0=Math.max(Math.min(n.x0,g),f),n.x1=Math.max(Math.min(n.x1,g),f),r}var h=n.cd[n.index];n.a=h.a,n.b=h.b,n.xLabelVal=void 0,n.yLabelVal=void 0;var b=n.trace,p=b._carpet,E=b._module.formatLabels(h,b);n.yLabel=E.yLabel,delete n.text;var c=[];function l(L,D){var A;L.labelprefix&&L.labelprefix.length>0?A=L.labelprefix.replace(/ = $/,""):A=L._hovertitle,c.push(A+": "+D.toFixed(3)+L.labelsuffix)}if(!b.hovertemplate){var m=h.hi||b.hoverinfo,M=m.split("+");M.indexOf("all")!==-1&&(M=["a","b","text"]),M.indexOf("a")!==-1&&l(p.aaxis,h.a),M.indexOf("b")!==-1&&l(p.baxis,h.b),c.push("y: "+n.yLabel),M.indexOf("text")!==-1&&P(h,b,c),n.extraText=c.join("<br>")}return r}},46858:function(z,B,e){z.exports={attributes:e(97001),supplyDefaults:e(98965),colorbar:e(4898),formatLabels:e(48953),calc:e(34618),plot:e(1913),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(22931),selectPoints:e(98002),eventData:e(16165),moduleType:"trace",name:"scattercarpet",basePlotModule:e(93612),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},1913:function(z,B,e){var d=e(32663),P=e(89298),a=e(91424);z.exports=function(x,v,y,r){var n,u,i,f=y[0][0].carpet,g=P.getFromId(x,f.xaxis||"x"),h=P.getFromId(x,f.yaxis||"y"),b={xaxis:g,yaxis:h,plot:v.plot};for(n=0;n<y.length;n++)u=y[n][0].trace,u._xA=g,u._yA=h;for(d(x,b,y,r),n=0;n<y.length;n++)u=y[n][0].trace,i=r.selectAll("g.trace"+u.uid+" .js-line"),a.setClipUrl(i,y[n][0].carpet._clipPathId,x)}},19316:function(z,B,e){var d=e(5386).f,P=e(5386).s,a=e(82196),_=e(9012),x=e(50693),v=e(79952).P,y=e(1426).extendFlat,r=e(30962).overrideAll,n=a.marker,u=a.line,i=n.line;z.exports=r({lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names","geojson-id"],dflt:"ISO-3"},geojson:{valType:"any",editType:"calc"},featureidkey:{valType:"string",editType:"calc",dflt:"id"},mode:y({},a.mode,{dflt:"markers"}),text:y({},a.text,{}),texttemplate:P({editType:"plot"},{keys:["lat","lon","location","text"]}),hovertext:y({},a.hovertext,{}),textfont:a.textfont,textposition:a.textposition,line:{color:u.color,width:u.width,dash:v},connectgaps:a.connectgaps,marker:y({symbol:n.symbol,opacity:n.opacity,angle:n.angle,angleref:y({},n.angleref,{values:["previous","up","north"]}),standoff:n.standoff,size:n.size,sizeref:n.sizeref,sizemin:n.sizemin,sizemode:n.sizemode,colorbar:n.colorbar,line:y({width:i.width},x("marker.line")),gradient:n.gradient},x("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:a.fillcolor,selected:a.selected,unselected:a.unselected,hoverinfo:y({},_.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:d()},"calc","nested")},84622:function(z,B,e){var d=e(92770),P=e(50606).BADNUM,a=e(36922),_=e(75225),x=e(66279),v=e(71828)._;function y(r){return r&&typeof r=="string"}z.exports=function(n,u){var i=Array.isArray(u.locations),f=i?u.locations.length:u._length,g=new Array(f),h;u.geojson?h=function(m){return y(m)||d(m)}:h=y;for(var b=0;b<f;b++){var p=g[b]={};if(i){var E=u.locations[b];p.loc=h(E)?E:null}else{var c=u.lon[b],l=u.lat[b];d(c)&&d(l)?p.lonlat=[+c,+l]:p.lonlat=[P,P]}}return _(g,u),a(n,u),x(g,u),f&&(g[0].t={labels:{lat:v(n,"lat:")+" ",lon:v(n,"lon:")+" "}}),g}},10659:function(z,B,e){var d=e(71828),P=e(34098),a=e(49508),_=e(11058),x=e(82410),v=e(28908),y=e(19316);z.exports=function(n,u,i,f){function g(M,L){return d.coerce(n,u,y,M,L)}var h=g("locations"),b;if(h&&h.length){var p=g("geojson"),E;(typeof p=="string"&&p!==""||d.isPlainObject(p))&&(E="geojson-id");var c=g("locationmode",E);c==="geojson-id"&&g("featureidkey"),b=h.length}else{var l=g("lon")||[],m=g("lat")||[];b=Math.min(l.length,m.length)}if(!b){u.visible=!1;return}u._length=b,g("text"),g("hovertext"),g("hovertemplate"),g("mode"),P.hasLines(u)&&(_(n,u,i,f,g),g("connectgaps")),P.hasMarkers(u)&&a(n,u,i,f,g,{gradient:!0}),P.hasText(u)&&(g("texttemplate"),x(n,u,f,g)),g("fill"),u.fill!=="none"&&v(n,u,i,g),d.coerceSelectionMarkerOpacity(u,g)}},84084:function(z){z.exports=function(e,d,P,a,_){e.lon=d.lon,e.lat=d.lat,e.location=d.loc?d.loc:null;var x=a[_];return x.fIn&&x.fIn.properties&&(e.properties=x.fIn.properties),e}},82719:function(z,B,e){var d=e(89298);z.exports=function(a,_,x){var v={},y=x[_.geo]._subplot,r=y.mockAxis,n=a.lonlat;return v.lonLabel=d.tickText(r,r.c2l(n[0]),!0).text,v.latLabel=d.tickText(r,r.c2l(n[1]),!0).text,v}},14977:function(z,B,e){var d=e(30211),P=e(50606).BADNUM,a=e(34603),_=e(71828).fillText,x=e(19316);z.exports=function(r,n,u){var i=r.cd,f=i[0].trace,g=r.xa,h=r.ya,b=r.subplot,p=b.projection.isLonLatOverEdges,E=b.project;function c(C){var S=C.lonlat;if(S[0]===P||p(S))return 1/0;var o=E(S),R=E([n,u]),T=Math.abs(o[0]-R[0]),O=Math.abs(o[1]-R[1]),N=Math.max(3,C.mrc||0);return Math.max(Math.sqrt(T*T+O*O)-N,1-3/N)}if(d.getClosest(i,c,r),r.index!==!1){var l=i[r.index],m=l.lonlat,M=[g.c2p(m),h.c2p(m)],L=l.mrc||1;r.x0=M[0]-L,r.x1=M[0]+L,r.y0=M[1]-L,r.y1=M[1]+L,r.loc=l.loc,r.lon=m[0],r.lat=m[1];var D={};D[f.geo]={_subplot:b};var A=f._module.formatLabels(l,f,D);return r.lonLabel=A.lonLabel,r.latLabel=A.latLabel,r.color=a(f,l),r.extraText=v(f,l,r,i[0].t.labels),r.hovertemplate=f.hovertemplate,[r]}};function v(y,r,n,u){if(y.hovertemplate)return;var i=r.hi||y.hoverinfo,f=i==="all"?x.hoverinfo.flags:i.split("+"),g=f.indexOf("location")!==-1&&Array.isArray(y.locations),h=f.indexOf("lon")!==-1,b=f.indexOf("lat")!==-1,p=f.indexOf("text")!==-1,E=[];function c(l){return l+"°"}return g?E.push(r.loc):h&&b?E.push("("+c(n.latLabel)+", "+c(n.lonLabel)+")"):h?E.push(u.lon+c(n.lonLabel)):b&&E.push(u.lat+c(n.latLabel)),p&&_(r,y,E),E.join("<br>")}},17988:function(z,B,e){z.exports={attributes:e(19316),supplyDefaults:e(10659),colorbar:e(4898),formatLabels:e(82719),calc:e(84622),calcGeoJSON:e(89171).calcGeoJSON,plot:e(89171).plot,style:e(33095),styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(14977),eventData:e(84084),selectPoints:e(20548),moduleType:"trace",name:"scattergeo",basePlotModule:e(44622),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},89171:function(z,B,e){var d=e(39898),P=e(71828),a=e(90973).getTopojsonFeatures,_=e(18214),x=e(41327),v=e(71739).findExtremes,y=e(50606).BADNUM,r=e(47761).calcMarkerSize,n=e(34098),u=e(33095);function i(g,h,b){var p=h.layers.frontplot.select(".scatterlayer"),E=P.makeTraceGroups(p,b,"trace scattergeo");function c(l,m){l.lonlat[0]===y&&d.select(m).remove()}E.selectAll("*").remove(),E.each(function(l){var m=d.select(this),M=l[0].trace;if(n.hasLines(M)||M.fill!=="none"){var L=_.calcTraceToLineCoords(l),D=M.fill!=="none"?_.makePolygon(L):_.makeLine(L);m.selectAll("path.js-line").data([{geojson:D,trace:M}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}n.hasMarkers(M)&&m.selectAll("path.point").data(P.identity).enter().append("path").classed("point",!0).each(function(A){c(A,this)}),n.hasText(M)&&m.selectAll("g").data(P.identity).enter().append("g").append("text").each(function(A){c(A,this)}),u(g,l)})}function f(g,h){var b=g[0].trace,p=h[b.geo],E=p._subplot,c=b._length,l,m;if(Array.isArray(b.locations)){var M=b.locationmode,L=M==="geojson-id"?x.extractTraceFeature(g):a(b,E.topojson);for(l=0;l<c;l++){m=g[l];var D=M==="geojson-id"?m.fOut:x.locationToFeature(M,m.loc,L);m.lonlat=D?D.properties.ct:[y,y]}}var A={padded:!0},C,S;if(p.fitbounds==="geojson"&&b.locationmode==="geojson-id"){var o=x.computeBbox(x.getTraceGeojson(b));C=[o[0],o[2]],S=[o[1],o[3]]}else{for(C=new Array(c),S=new Array(c),l=0;l<c;l++)m=g[l],C[l]=m.lonlat[0],S[l]=m.lonlat[1];A.ppad=r(b,c)}b._extremes.lon=v(p.lonaxis._ax,C,A),b._extremes.lat=v(p.lataxis._ax,S,A)}z.exports={calcGeoJSON:f,plot:i}},20548:function(z,B,e){var d=e(34098),P=e(50606).BADNUM;z.exports=function(_,x){var v=_.cd,y=_.xaxis,r=_.yaxis,n=[],u=v[0].trace,i,f,g,h,b,p=!d.hasMarkers(u)&&!d.hasText(u);if(p)return[];if(x===!1)for(b=0;b<v.length;b++)v[b].selected=0;else for(b=0;b<v.length;b++)i=v[b],f=i.lonlat,f[0]!==P&&(g=y.c2p(f),h=r.c2p(f),x.contains([g,h],null,b,_)?(n.push({pointNumber:b,lon:f[0],lat:f[1]}),i.selected=1):i.selected=0);return n}},33095:function(z,B,e){var d=e(39898),P=e(91424),a=e(7901),_=e(16296),x=_.stylePoints,v=_.styleText;z.exports=function(n,u){u&&y(n,u)};function y(r,n){var u=n[0].trace,i=n[0].node3;i.style("opacity",n[0].trace.opacity),x(i,u,r),v(i,u,r),i.selectAll("path.js-line").style("fill","none").each(function(f){var g=d.select(this),h=f.trace,b=h.line||{};g.call(a.stroke,b.color).call(P.dashLine,b.dash||"",b.width||0),h.fill!=="none"&&g.call(a.fill,h.fillcolor)})}},42341:function(z,B,e){var d=e(9012),P=e(82196),a=e(12663).axisHoverFormat,_=e(50693),x=e(78607),v=e(1426).extendFlat,y=e(30962).overrideAll,r=e(78232).DASHES,n=P.line,u=P.marker,i=u.line,f=z.exports=y({x:P.x,x0:P.x0,dx:P.dx,y:P.y,y0:P.y0,dy:P.dy,xperiod:P.xperiod,yperiod:P.yperiod,xperiod0:P.xperiod0,yperiod0:P.yperiod0,xperiodalignment:P.xperiodalignment,yperiodalignment:P.yperiodalignment,xhoverformat:a("x"),yhoverformat:a("y"),text:P.text,hovertext:P.hovertext,textposition:P.textposition,textfont:P.textfont,mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},line:{color:n.color,width:n.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:x(r),dflt:"solid"}},marker:v({},_("marker"),{symbol:u.symbol,angle:u.angle,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,opacity:u.opacity,colorbar:u.colorbar,line:v({},_("marker.line"),{width:i.width})}),connectgaps:P.connectgaps,fill:v({},P.fill,{dflt:"none"}),fillcolor:P.fillcolor,selected:{marker:P.selected.marker,textfont:P.selected.textfont},unselected:{marker:P.unselected.marker,textfont:P.unselected.textfont},opacity:d.opacity},"calc","nested");f.x.editType=f.y.editType=f.x0.editType=f.y0.editType="calc+clearAxisTypes",f.hovertemplate=P.hovertemplate,f.texttemplate=P.texttemplate},72156:function(z,B,e){var d=e(20794);z.exports={moduleType:"trace",name:"scattergl",basePlotModule:e(93612),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:e(42341),supplyDefaults:e(47148),crossTraceDefaults:e(34936),colorbar:e(4898),formatLabels:e(68101),calc:e(45032),hoverPoints:d.hoverPoints,selectPoints:e(58147),meta:{}}},45032:function(z,B,e){var d=e(88294),P=e(71828),a=e(41675),_=e(71739).findExtremes,x=e(42973),v=e(47761),y=v.calcMarkerSize,r=v.calcAxisExpansion,n=v.setFirstScatter,u=e(36922),i=e(19635),f=e(38967),g=e(50606).BADNUM,h=e(78232).TOO_MANY_POINTS;z.exports=function(c,l){var m=c._fullLayout,M=l._xA=a.getFromId(c,l.xaxis,"x"),L=l._yA=a.getFromId(c,l.yaxis,"y"),D=m._plots[l.xaxis+l.yaxis],A=l._length,C=A>=h,S=A*2,o={},R,T=M.makeCalcdata(l,"x"),O=L.makeCalcdata(l,"y"),N=x(l,M,"x",T),H=x(l,L,"y",O),k=N.vals,V=H.vals;l._x=k,l._y=V,l.xperiodalignment&&(l._origX=T,l._xStarts=N.starts,l._xEnds=N.ends),l.yperiodalignment&&(l._origY=O,l._yStarts=H.starts,l._yEnds=H.ends);var G=new Array(S),U=new Array(A);for(R=0;R<A;R++)G[R*2]=k[R]===g?NaN:k[R],G[R*2+1]=V[R]===g?NaN:V[R],U[R]=R;if(M.type==="log")for(R=0;R<S;R+=2)G[R]=M.c2l(G[R]);if(L.type==="log")for(R=1;R<S;R+=2)G[R]=L.c2l(G[R]);C&&M.type!=="log"&&L.type!=="log"?o.tree=d(G):o.ids=U,u(c,l);var Y=p(c,D,l,G,k,V),ee=f(c,D);n(m,l);var re;return C?Y.marker&&(re=Y.marker.sizeAvg||Math.max(Y.marker.size,3)):re=y(l,A),r(c,l,M,L,k,V,re),Y.errorX&&b(l,M,Y.errorX),Y.errorY&&b(l,L,Y.errorY),Y.fill&&!ee.fill2d&&(ee.fill2d=!0),Y.marker&&!ee.scatter2d&&(ee.scatter2d=!0),Y.line&&!ee.line2d&&(ee.line2d=!0),(Y.errorX||Y.errorY)&&!ee.error2d&&(ee.error2d=!0),Y.text&&!ee.glText&&(ee.glText=!0),Y.marker&&(Y.marker.snap=A),ee.lineOptions.push(Y.line),ee.errorXOptions.push(Y.errorX),ee.errorYOptions.push(Y.errorY),ee.fillOptions.push(Y.fill),ee.markerOptions.push(Y.marker),ee.markerSelectedOptions.push(Y.markerSel),ee.markerUnselectedOptions.push(Y.markerUnsel),ee.textOptions.push(Y.text),ee.textSelectedOptions.push(Y.textSel),ee.textUnselectedOptions.push(Y.textUnsel),ee.selectBatch.push([]),ee.unselectBatch.push([]),o._scene=ee,o.index=ee.count,o.x=k,o.y=V,o.positions=G,ee.count++,[{x:!1,y:!1,t:o,trace:l}]};function b(E,c,l){var m=E._extremes[c._id],M=_(c,l._bnds,{padded:!0});m.min=m.min.concat(M.min),m.max=m.max.concat(M.max)}function p(E,c,l,m,M,L){var D=i.style(E,l);if(D.marker&&(D.marker.positions=m),D.line&&m.length>1&&P.extendFlat(D.line,i.linePositions(E,l,m)),D.errorX||D.errorY){var A=i.errorBarPositions(E,l,m,M,L);D.errorX&&P.extendFlat(D.errorX,A.x),D.errorY&&P.extendFlat(D.errorY,A.y)}return D.text&&(P.extendFlat(D.text,{positions:m},i.textPosition(E,l,D.text,D.marker)),P.extendFlat(D.textSel,{positions:m},i.textPosition(E,l,D.text,D.markerSel)),P.extendFlat(D.textUnsel,{positions:m},i.textPosition(E,l,D.text,D.markerUnsel))),D}},78232:function(z){var B=20;z.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:B,SYMBOL_STROKE:B/20,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},19635:function(z,B,e){var d=e(92770),P=e(82019),a=e(25075),_=e(73972),x=e(71828),v=e(91424),y=e(41675),r=e(81697).formatColor,n=e(34098),u=e(39984),i=e(68645),f=e(78232),g=e(37822).DESELECTDIM,h={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},b=e(23469).appendArrayPointValue;function p(N,H){var k,V={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},G=N._context.plotGlPixelRatio;if(H.visible!==!0)return V;if(n.hasText(H)&&(V.text=E(N,H),V.textSel=m(N,H,H.selected),V.textUnsel=m(N,H,H.unselected)),n.hasMarkers(H)&&(V.marker=c(N,H),V.markerSel=l(N,H,H.selected),V.markerUnsel=l(N,H,H.unselected),!H.unselected&&x.isArrayOrTypedArray(H.marker.opacity))){var U=H.marker.opacity;for(V.markerUnsel.opacity=new Array(U.length),k=0;k<U.length;k++)V.markerUnsel.opacity[k]=g*U[k]}if(n.hasLines(H)){V.line={overlay:!0,thickness:H.line.width*G,color:H.line.color,opacity:H.opacity};var Y=(f.DASHES[H.line.dash]||[1]).slice();for(k=0;k<Y.length;++k)Y[k]*=H.line.width*G;V.line.dashes=Y}return H.error_x&&H.error_x.visible&&(V.errorX=M(H,H.error_x,G)),H.error_y&&H.error_y.visible&&(V.errorY=M(H,H.error_y,G)),H.fill&&H.fill!=="none"&&(V.fill={closed:!0,fill:H.fillcolor,thickness:0}),V}function E(N,H){var k=N._fullLayout,V=H._length,G=H.textfont,U=H.textposition,Y=Array.isArray(U)?U:[U],ee=G.color,re=G.size,ie=G.family,se={},ce,q=N._context.plotGlPixelRatio,j=H.texttemplate;if(j){se.text=[];var Z=k._d3locale,Q=Array.isArray(j),ue=Q?Math.min(j.length,V):V,fe=Q?function(Re){return j[Re]}:function(){return j};for(ce=0;ce<ue;ce++){var te={i:ce},ne=H._module.formatLabels(te,H,k),ve={};b(ve,H,ce);var le=H._meta||{};se.text.push(x.texttemplateString(fe(ce),ne,Z,ve,te,le))}}else Array.isArray(H.text)&&H.text.length<V?se.text=H.text.slice():se.text=H.text;if(Array.isArray(se.text))for(ce=se.text.length;ce<V;ce++)se.text[ce]="";for(se.opacity=H.opacity,se.font={},se.align=[],se.baseline=[],ce=0;ce<Y.length;ce++){var xe=Y[ce].split(/\s+/);switch(xe[1]){case"left":se.align.push("right");break;case"right":se.align.push("left");break;default:se.align.push(xe[1])}switch(xe[0]){case"top":se.baseline.push("bottom");break;case"bottom":se.baseline.push("top");break;default:se.baseline.push(xe[0])}}if(Array.isArray(ee))for(se.color=new Array(V),ce=0;ce<V;ce++)se.color[ce]=ee[ce];else se.color=ee;if(x.isArrayOrTypedArray(re)||Array.isArray(ie))for(se.font=new Array(V),ce=0;ce<V;ce++){var Se=se.font[ce]={};Se.size=(x.isTypedArray(re)?re[ce]:Array.isArray(re)?d(re[ce])?re[ce]:0:re)*q,Se.family=Array.isArray(ie)?ie[ce]:ie}else se.font={size:re*q,family:ie};return se}function c(N,H){var k=H._length,V=H.marker,G={},U,Y=x.isArrayOrTypedArray(V.symbol),ee=x.isArrayOrTypedArray(V.angle),re=x.isArrayOrTypedArray(V.color),ie=x.isArrayOrTypedArray(V.line.color),se=x.isArrayOrTypedArray(V.opacity),ce=x.isArrayOrTypedArray(V.size),q=x.isArrayOrTypedArray(V.line.width),j;if(Y||(j=i.isOpenSymbol(V.symbol)),Y||re||ie||se||ee){G.symbols=new Array(k),G.angles=new Array(k),G.colors=new Array(k),G.borderColors=new Array(k);var Z=V.symbol,Q=V.angle,ue=r(V,V.opacity,k),fe=r(V.line,V.opacity,k);if(!Array.isArray(fe[0])){var te=fe;for(fe=Array(k),U=0;U<k;U++)fe[U]=te}if(!Array.isArray(ue[0])){var ne=ue;for(ue=Array(k),U=0;U<k;U++)ue[U]=ne}if(!Array.isArray(Z)){var ve=Z;for(Z=Array(k),U=0;U<k;U++)Z[U]=ve}if(!Array.isArray(Q)){var le=Q;for(Q=Array(k),U=0;U<k;U++)Q[U]=le}for(G.symbols=Z,G.angles=Q,G.colors=ue,G.borderColors=fe,U=0;U<k;U++)Y&&(j=i.isOpenSymbol(V.symbol[U])),j&&(fe[U]=ue[U].slice(),ue[U]=ue[U].slice(),ue[U][3]=0);for(G.opacity=H.opacity,G.markers=new Array(k),U=0;U<k;U++)G.markers[U]=o({mx:G.symbols[U],ma:G.angles[U]},H)}else j?(G.color=a(V.color,"uint8"),G.color[3]=0,G.borderColor=a(V.color,"uint8")):(G.color=a(V.color,"uint8"),G.borderColor=a(V.line.color,"uint8")),G.opacity=H.opacity*V.opacity,G.marker=o({mx:V.symbol,ma:V.angle},H);var xe=1,Se=u(H,xe),Re;if(ce||q){var Ee=G.sizes=new Array(k),Oe=G.borderSizes=new Array(k),Be=0,Le;if(ce){for(U=0;U<k;U++)Ee[U]=Se(V.size[U]),Be+=Ee[U];Le=Be/k}else for(Re=Se(V.size),U=0;U<k;U++)Ee[U]=Re;if(q)for(U=0;U<k;U++)Oe[U]=V.line.width[U];else for(Re=V.line.width,U=0;U<k;U++)Oe[U]=Re;G.sizeAvg=Le}else G.size=Se(V&&V.size||10),G.borderSizes=Se(V.line.width);return G}function l(N,H,k){var V=H.marker,G={};return k&&(k.marker&&k.marker.symbol?G=c(N,x.extendFlat({},V,k.marker)):k.marker&&(k.marker.size&&(G.size=k.marker.size),k.marker.color&&(G.colors=k.marker.color),k.marker.opacity!==void 0&&(G.opacity=k.marker.opacity))),G}function m(N,H,k){var V={};if(!k)return V;if(k.textfont){var G={opacity:1,text:H.text,texttemplate:H.texttemplate,textposition:H.textposition,textfont:x.extendFlat({},H.textfont)};k.textfont&&x.extendFlat(G.textfont,k.textfont),V=E(N,G)}return V}function M(N,H,k){var V={capSize:H.width*2*k,lineWidth:H.thickness*k,color:H.color};return H.copy_ystyle&&(V=N.error_y),V}var L=f.SYMBOL_SDF_SIZE,D=f.SYMBOL_SIZE,A=f.SYMBOL_STROKE,C={},S=v.symbolFuncs[0](D*.05);function o(N,H){var k=N.mx;if(k==="circle")return null;var V,G,U=v.symbolNumber(k),Y=v.symbolFuncs[U%100],ee=!!v.symbolNoDot[U%100],re=!!v.symbolNoFill[U%100],ie=i.isDotSymbol(k);if(N.ma&&(k+="_"+N.ma),C[k])return C[k];var se=v.getMarkerAngle(N,H);return ie&&!ee?V=Y(D*1.1,se)+S:V=Y(D,se),G=P(V,{w:L,h:L,viewBox:[-D,-D,D,D],stroke:re?A:-A}),C[k]=G,G||null}function R(N,H,k){var V=k.length,G=V/2,U,Y;if(n.hasLines(H)&&G)if(H.line.shape==="hv"){for(U=[],Y=0;Y<G-1;Y++)isNaN(k[Y*2])||isNaN(k[Y*2+1])?U.push(NaN,NaN,NaN,NaN):(U.push(k[Y*2],k[Y*2+1]),!isNaN(k[Y*2+2])&&!isNaN(k[Y*2+3])?U.push(k[Y*2+2],k[Y*2+1]):U.push(NaN,NaN));U.push(k[V-2],k[V-1])}else if(H.line.shape==="hvh"){for(U=[],Y=0;Y<G-1;Y++)if(isNaN(k[Y*2])||isNaN(k[Y*2+1])||isNaN(k[Y*2+2])||isNaN(k[Y*2+3]))!isNaN(k[Y*2])&&!isNaN(k[Y*2+1])?U.push(k[Y*2],k[Y*2+1]):U.push(NaN,NaN),U.push(NaN,NaN);else{var ee=(k[Y*2]+k[Y*2+2])/2;U.push(k[Y*2],k[Y*2+1],ee,k[Y*2+1],ee,k[Y*2+3])}U.push(k[V-2],k[V-1])}else if(H.line.shape==="vhv"){for(U=[],Y=0;Y<G-1;Y++)if(isNaN(k[Y*2])||isNaN(k[Y*2+1])||isNaN(k[Y*2+2])||isNaN(k[Y*2+3]))!isNaN(k[Y*2])&&!isNaN(k[Y*2+1])?U.push(k[Y*2],k[Y*2+1]):U.push(NaN,NaN),U.push(NaN,NaN);else{var re=(k[Y*2+1]+k[Y*2+3])/2;U.push(k[Y*2],k[Y*2+1],k[Y*2],re,k[Y*2+2],re)}U.push(k[V-2],k[V-1])}else if(H.line.shape==="vh"){for(U=[],Y=0;Y<G-1;Y++)isNaN(k[Y*2])||isNaN(k[Y*2+1])?U.push(NaN,NaN,NaN,NaN):(U.push(k[Y*2],k[Y*2+1]),!isNaN(k[Y*2+2])&&!isNaN(k[Y*2+3])?U.push(k[Y*2],k[Y*2+3]):U.push(NaN,NaN));U.push(k[V-2],k[V-1])}else U=k;var ie=!1;for(Y=0;Y<U.length;Y++)if(isNaN(U[Y])){ie=!0;break}var se=ie||U.length>f.TOO_MANY_POINTS||n.hasMarkers(H)?"rect":"round";if(ie&&H.connectgaps){var ce=U[0],q=U[1];for(Y=0;Y<U.length;Y+=2)isNaN(U[Y])||isNaN(U[Y+1])?(U[Y]=ce,U[Y+1]=q):(ce=U[Y],q=U[Y+1])}return{join:se,positions:U}}function T(N,H,k,V,G){var U=_.getComponentMethod("errorbars","makeComputeError"),Y=y.getFromId(N,H.xaxis,"x"),ee=y.getFromId(N,H.yaxis,"y"),re=k.length/2,ie={};function se(ce,q){var j=q._id.charAt(0),Z=H["error_"+j];if(Z&&Z.visible&&(q.type==="linear"||q.type==="log")){for(var Q=U(Z),ue={x:0,y:1}[j],fe={x:[0,1,2,3],y:[2,3,0,1]}[j],te=new Float64Array(4*re),ne=1/0,ve=-1/0,le=0,xe=0;le<re;le++,xe+=4){var Se=ce[le];if(d(Se)){var Re=k[le*2+ue],Ee=Q(Se,le),Oe=Ee[0],Be=Ee[1];if(d(Oe)&&d(Be)){var Le=Se-Oe,Te=Se+Be;te[xe+fe[0]]=Re-q.c2l(Le),te[xe+fe[1]]=q.c2l(Te)-Re,te[xe+fe[2]]=0,te[xe+fe[3]]=0,ne=Math.min(ne,Se-Oe),ve=Math.max(ve,Se+Be)}}}ie[j]={positions:k,errors:te,_bnds:[ne,ve]}}}return se(V,Y),se(G,ee),ie}function O(N,H,k,V){var G=H._length,U={},Y;if(n.hasMarkers(H)){var ee=k.font,re=k.align,ie=k.baseline;for(U.offset=new Array(G),Y=0;Y<G;Y++){var se=V.sizes?V.sizes[Y]:V.size,ce=Array.isArray(ee)?ee[Y].size:ee.size,q=Array.isArray(re)?re.length>1?re[Y]:re[0]:re,j=Array.isArray(ie)?ie.length>1?ie[Y]:ie[0]:ie,Z=h[q],Q=h[j],ue=se?se/.8+1:0,fe=-Q*ue-Q*.5;U.offset[Y]=[Z*ue/ce,fe/ce]}}return U}z.exports={style:p,markerStyle:c,markerSelection:l,linePositions:R,errorBarPositions:T,textPosition:O}},47148:function(z,B,e){var d=e(71828),P=e(73972),a=e(68645),_=e(42341),x=e(47581),v=e(34098),y=e(67513),r=e(73927),n=e(49508),u=e(11058),i=e(28908),f=e(82410);z.exports=function(h,b,p,E){function c(S,o){return d.coerce(h,b,_,S,o)}var l=h.marker?a.isOpenSymbol(h.marker.symbol):!1,m=v.isBubble(h),M=y(h,b,E,c);if(!M){b.visible=!1;return}r(h,b,E,c),c("xhoverformat"),c("yhoverformat");var L=M<x.PTS_LINESONLY?"lines+markers":"lines";c("text"),c("hovertext"),c("hovertemplate"),c("mode",L),v.hasLines(b)&&(c("connectgaps"),u(h,b,p,E,c),c("line.shape")),v.hasMarkers(b)&&(n(h,b,p,E,c,{noAngleRef:!0,noStandOff:!0}),c("marker.line.width",l||m?1:0)),v.hasText(b)&&(c("texttemplate"),f(h,b,E,c));var D=(b.line||{}).color,A=(b.marker||{}).color;c("fill"),b.fill!=="none"&&i(h,b,p,c);var C=P.getComponentMethod("errorbars","supplyDefaults");C(h,b,D||A||p,{axis:"y"}),C(h,b,D||A||p,{axis:"x",inherit:"y"}),d.coerceSelectionMarkerOpacity(b,c)}},5345:function(z,B,e){var d=e(71828),P=e(7901),a=e(37822).DESELECTDIM;function _(x){var v=x[0],y=v.trace,r=v.t,n=r._scene,u=r.index,i=n.selectBatch[u],f=n.unselectBatch[u],g=n.textOptions[u],h=n.textSelectedOptions[u]||{},b=n.textUnselectedOptions[u]||{},p=d.extendFlat({},g),E,c;if(i.length||f.length){var l=h.color,m=b.color,M=g.color,L=Array.isArray(M);for(p.color=new Array(y._length),E=0;E<i.length;E++)c=i[E],p.color[c]=l||(L?M[c]:M);for(E=0;E<f.length;E++){c=f[E];var D=L?M[c]:M;p.color[c]=m||(l?D:P.addOpacity(D,a))}}n.glText[u].update(p)}z.exports={styleTextSelection:_}},68101:function(z,B,e){var d=e(8225);z.exports=function(a,_,x){var v=a.i;return"x"in a||(a.x=_._x[v]),"y"in a||(a.y=_._y[v]),d(a,_,x)}},68645:function(z,B,e){var d=e(78232);B.isOpenSymbol=function(P){return typeof P=="string"?d.OPEN_RE.test(P):P%200>100},B.isDotSymbol=function(P){return typeof P=="string"?d.DOT_RE.test(P):P>200}},20794:function(z,B,e){var d=e(73972),P=e(71828),a=e(34603);function _(v,y,r,n){var u=v.cd,i=u[0].t,f=u[0].trace,g=v.xa,h=v.ya,b=i.x,p=i.y,E=g.c2p(y),c=h.c2p(r),l=v.distance,m;if(i.tree){var M=g.p2c(E-l),L=g.p2c(E+l),D=h.p2c(c-l),A=h.p2c(c+l);n==="x"?m=i.tree.range(Math.min(M,L),Math.min(h._rl[0],h._rl[1]),Math.max(M,L),Math.max(h._rl[0],h._rl[1])):m=i.tree.range(Math.min(M,L),Math.min(D,A),Math.max(M,L),Math.max(D,A))}else m=i.ids;var C,S,o,R,T,O,N,H,k,V=l;if(n==="x"){var G=!!f.xperiodalignment,U=!!f.yperiodalignment;for(T=0;T<m.length;T++){if(C=m[T],o=b[C],O=Math.abs(g.c2p(o)-E),G){var Y=g.c2p(f._xStarts[C]),ee=g.c2p(f._xEnds[C]);O=E>=Math.min(Y,ee)&&E<=Math.max(Y,ee)?0:1/0}if(O<V){if(V=O,R=p[C],N=h.c2p(R)-c,U){var re=h.c2p(f._yStarts[C]),ie=h.c2p(f._yEnds[C]);N=c>=Math.min(re,ie)&&c<=Math.max(re,ie)?0:1/0}k=Math.sqrt(O*O+N*N),S=m[T]}}}else for(T=m.length-1;T>-1;T--)C=m[T],o=b[C],R=p[C],O=g.c2p(o)-E,N=h.c2p(R)-c,H=Math.sqrt(O*O+N*N),H<V&&(V=k=H,S=C);return v.index=S,v.distance=V,v.dxy=k,S===void 0?[v]:[x(v,b,p,f)]}function x(v,y,r,n){var u=v.xa,i=v.ya,f=v.distance,g=v.dxy,h=v.index,b={pointNumber:h,x:y[h],y:r[h]};b.tx=Array.isArray(n.text)?n.text[h]:n.text,b.htx=Array.isArray(n.hovertext)?n.hovertext[h]:n.hovertext,b.data=Array.isArray(n.customdata)?n.customdata[h]:n.customdata,b.tp=Array.isArray(n.textposition)?n.textposition[h]:n.textposition;var p=n.textfont;p&&(b.ts=P.isArrayOrTypedArray(p.size)?p.size[h]:p.size,b.tc=Array.isArray(p.color)?p.color[h]:p.color,b.tf=Array.isArray(p.family)?p.family[h]:p.family);var E=n.marker;E&&(b.ms=P.isArrayOrTypedArray(E.size)?E.size[h]:E.size,b.mo=P.isArrayOrTypedArray(E.opacity)?E.opacity[h]:E.opacity,b.mx=P.isArrayOrTypedArray(E.symbol)?E.symbol[h]:E.symbol,b.ma=P.isArrayOrTypedArray(E.angle)?E.angle[h]:E.angle,b.mc=P.isArrayOrTypedArray(E.color)?E.color[h]:E.color);var c=E&&E.line;c&&(b.mlc=Array.isArray(c.color)?c.color[h]:c.color,b.mlw=P.isArrayOrTypedArray(c.width)?c.width[h]:c.width);var l=E&&E.gradient;l&&l.type!=="none"&&(b.mgt=Array.isArray(l.type)?l.type[h]:l.type,b.mgc=Array.isArray(l.color)?l.color[h]:l.color);var m=u.c2p(b.x,!0),M=i.c2p(b.y,!0),L=b.mrc||1,D=n.hoverlabel;D&&(b.hbg=Array.isArray(D.bgcolor)?D.bgcolor[h]:D.bgcolor,b.hbc=Array.isArray(D.bordercolor)?D.bordercolor[h]:D.bordercolor,b.hts=P.isArrayOrTypedArray(D.font.size)?D.font.size[h]:D.font.size,b.htc=Array.isArray(D.font.color)?D.font.color[h]:D.font.color,b.htf=Array.isArray(D.font.family)?D.font.family[h]:D.font.family,b.hnl=P.isArrayOrTypedArray(D.namelength)?D.namelength[h]:D.namelength);var A=n.hoverinfo;A&&(b.hi=Array.isArray(A)?A[h]:A);var C=n.hovertemplate;C&&(b.ht=Array.isArray(C)?C[h]:C);var S={};S[v.index]=b;var o=n._origX,R=n._origY,T=P.extendFlat({},v,{color:a(n,b),x0:m-L,x1:m+L,xLabelVal:o?o[h]:b.x,y0:M-L,y1:M+L,yLabelVal:R?R[h]:b.y,cd:S,distance:f,spikeDistance:g,hovertemplate:b.ht});return b.htx?T.text=b.htx:b.tx?T.text=b.tx:n.text&&(T.text=n.text),P.fillText(b,n,T),d.getComponentMethod("errorbars","hoverInfo")(b,n,T),T}z.exports={hoverPoints:_,calcHover:x}},68868:function(z,B,e){var d=e(72156);d.plot=e(26787),z.exports=d},26787:function(z,B,e){var d=e(11870),P=e(46075),a=e(3593),_=e(42505),x=e(71828),v=e(64505).selectMode,y=e(79749),r=e(34098),n=e(68687),u=e(5345).styleTextSelection,i={};function f(h,b,p,E){var c=h._size,l=h.width*E,m=h.height*E,M=c.l*E,L=c.b*E,D=c.r*E,A=c.t*E,C=c.w*E,S=c.h*E;return[M+b.domain[0]*C,L+p.domain[0]*S,l-D-(1-b.domain[1])*C,m-A-(1-p.domain[1])*S]}var g=z.exports=function(b,p,E){if(E.length){var c=b._fullLayout,l=p._scene,m=p.xaxis,M=p.yaxis,L,D;if(l){var A=y(b,["ANGLE_instanced_arrays","OES_element_index_uint"],i);if(!A){l.init();return}var C=l.count,S=c._glcanvas.data()[0].regl;if(n(b,p,E),l.dirty){if(l.error2d===!0&&(l.error2d=a(S)),l.line2d===!0&&(l.line2d=P(S)),l.scatter2d===!0&&(l.scatter2d=d(S)),l.fill2d===!0&&(l.fill2d=P(S)),l.glText===!0)for(l.glText=new Array(C),L=0;L<C;L++)l.glText[L]=new _(S);if(l.glText){if(C>l.glText.length){var o=C-l.glText.length;for(L=0;L<o;L++)l.glText.push(new _(S))}else if(C<l.glText.length){var R=l.glText.length-C,T=l.glText.splice(C,R);T.forEach(function(te){te.destroy()})}for(L=0;L<C;L++)l.glText[L].update(l.textOptions[L])}if(l.line2d&&(l.line2d.update(l.lineOptions),l.lineOptions=l.lineOptions.map(function(te){if(te&&te.positions){for(var ne=te.positions,ve=0;ve<ne.length&&(isNaN(ne[ve])||isNaN(ne[ve+1]));)ve+=2;for(var le=ne.length-2;le>ve&&(isNaN(ne[le])||isNaN(ne[le+1]));)le-=2;te.positions=ne.slice(ve,le+2)}return te}),l.line2d.update(l.lineOptions)),l.error2d){var O=(l.errorXOptions||[]).concat(l.errorYOptions||[]);l.error2d.update(O)}l.scatter2d&&l.scatter2d.update(l.markerOptions),l.fillOrder=x.repeat(null,C),l.fill2d&&(l.fillOptions=l.fillOptions.map(function(te,ne){var ve=E[ne];if(!(!te||!ve||!ve[0]||!ve[0].trace)){var le=ve[0],xe=le.trace,Se=le.t,Re=l.lineOptions[ne],Ee,Oe,Be=[];xe._ownfill&&Be.push(ne),xe._nexttrace&&Be.push(ne+1),Be.length&&(l.fillOrder[ne]=Be);var Le=[],Te=Re&&Re.positions||Se.positions,De,Ve;if(xe.fill==="tozeroy"){for(De=0;De<Te.length&&isNaN(Te[De+1]);)De+=2;for(Ve=Te.length-2;Ve>De&&isNaN(Te[Ve+1]);)Ve-=2;Te[De+1]!==0&&(Le=[Te[De],0]),Le=Le.concat(Te.slice(De,Ve+2)),Te[Ve+1]!==0&&(Le=Le.concat([Te[Ve],0]))}else if(xe.fill==="tozerox"){for(De=0;De<Te.length&&isNaN(Te[De]);)De+=2;for(Ve=Te.length-2;Ve>De&&isNaN(Te[Ve]);)Ve-=2;Te[De]!==0&&(Le=[0,Te[De+1]]),Le=Le.concat(Te.slice(De,Ve+2)),Te[Ve]!==0&&(Le=Le.concat([0,Te[Ve+1]]))}else if(xe.fill==="toself"||xe.fill==="tonext"){for(Le=[],Ee=0,te.splitNull=!0,Oe=0;Oe<Te.length;Oe+=2)(isNaN(Te[Oe])||isNaN(Te[Oe+1]))&&(Le=Le.concat(Te.slice(Ee,Oe)),Le.push(Te[Ee],Te[Ee+1]),Le.push(null,null),Ee=Oe+2);Le=Le.concat(Te.slice(Ee)),Ee&&Le.push(Te[Ee],Te[Ee+1])}else{var Ye=xe._nexttrace;if(Ye){var Ne=l.lineOptions[ne+1];if(Ne){var Xe=Ne.positions;if(xe.fill==="tonexty"){for(Le=Te.slice(),ne=Math.floor(Xe.length/2);ne--;){var ht=Xe[ne*2],st=Xe[ne*2+1];isNaN(ht)||isNaN(st)||Le.push(ht,st)}te.fill=Ye.fillcolor}}}}if(xe._prevtrace&&xe._prevtrace.fill==="tonext"){var it=l.lineOptions[ne-1].positions,nt=Le.length/2;Ee=nt;var pt=[Ee];for(Oe=0;Oe<it.length;Oe+=2)(isNaN(it[Oe])||isNaN(it[Oe+1]))&&(pt.push(Oe/2+nt+1),Ee=Oe+2);Le=Le.concat(it),te.hole=pt}return te.fillmode=xe.fill,te.opacity=xe.opacity,te.positions=Le,te}}),l.fill2d.update(l.fillOptions))}var N=c.dragmode,H=v(N),k=c.clickmode.indexOf("select")>-1;for(L=0;L<C;L++){var V=E[L][0],G=V.trace,U=V.t,Y=U.index,ee=G._length,re=U.x,ie=U.y;if(G.selectedpoints||H||k){if(H||(H=!0),G.selectedpoints){var se=l.selectBatch[Y]=x.selIndices2selPoints(G),ce={};for(D=0;D<se.length;D++)ce[se[D]]=1;var q=[];for(D=0;D<ee;D++)ce[D]||q.push(D);l.unselectBatch[Y]=q}var j=U.xpx=new Array(ee),Z=U.ypx=new Array(ee);for(D=0;D<ee;D++)j[D]=m.c2p(re[D]),Z[D]=M.c2p(ie[D])}else U.xpx=U.ypx=null}if(H){if(l.select2d||(l.select2d=d(c._glcanvas.data()[1].regl)),l.scatter2d){var Q=new Array(C);for(L=0;L<C;L++)Q[L]=l.selectBatch[L].length||l.unselectBatch[L].length?l.markerUnselectedOptions[L]:{};l.scatter2d.update(Q)}l.select2d&&(l.select2d.update(l.markerOptions),l.select2d.update(l.markerSelectedOptions)),l.glText&&E.forEach(function(te){var ne=((te||[])[0]||{}).trace||{};r.hasText(ne)&&u(te)})}else l.scatter2d&&l.scatter2d.update(l.markerOptions);var ue={viewport:f(c,m,M,b._context.plotGlPixelRatio),range:[(m._rl||m.range)[0],(M._rl||M.range)[0],(m._rl||m.range)[1],(M._rl||M.range)[1]]},fe=x.repeat(ue,l.count);l.fill2d&&l.fill2d.update(fe),l.line2d&&l.line2d.update(fe),l.error2d&&l.error2d.update(fe.concat(fe)),l.scatter2d&&l.scatter2d.update(fe),l.select2d&&l.select2d.update(fe),l.glText&&l.glText.forEach(function(te){te.update(ue)})}}};g.reglPrecompiled=i},38967:function(z,B,e){var d=e(71828);z.exports=function(a,_){var x=_._scene,v={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},y={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return _._scene||(x=_._scene={},x.init=function(){d.extendFlat(x,y,v)},x.init(),x.update=function(n){var u=d.repeat(n,x.count);if(x.fill2d&&x.fill2d.update(u),x.scatter2d&&x.scatter2d.update(u),x.line2d&&x.line2d.update(u),x.error2d&&x.error2d.update(u.concat(u)),x.select2d&&x.select2d.update(u),x.glText)for(var i=0;i<x.count;i++)x.glText[i].update(n)},x.draw=function(){for(var n=x.count,u=x.fill2d,i=x.error2d,f=x.line2d,g=x.scatter2d,h=x.glText,b=x.select2d,p=x.selectBatch,E=x.unselectBatch,c=0;c<n;c++){if(u&&x.fillOrder[c]&&u.draw(x.fillOrder[c]),f&&x.lineOptions[c]&&f.draw(c),i&&(x.errorXOptions[c]&&i.draw(c),x.errorYOptions[c]&&i.draw(c+n)),g&&x.markerOptions[c])if(E[c].length){var l=d.repeat([],x.count);l[c]=E[c],g.draw(l)}else p[c].length||g.draw(c);h[c]&&x.textOptions[c]&&h[c].render()}b&&b.draw(p),x.dirty=!1},x.destroy=function(){x.fill2d&&x.fill2d.destroy&&x.fill2d.destroy(),x.scatter2d&&x.scatter2d.destroy&&x.scatter2d.destroy(),x.error2d&&x.error2d.destroy&&x.error2d.destroy(),x.line2d&&x.line2d.destroy&&x.line2d.destroy(),x.select2d&&x.select2d.destroy&&x.select2d.destroy(),x.glText&&x.glText.forEach(function(n){n.destroy&&n.destroy()}),x.lineOptions=null,x.fillOptions=null,x.markerOptions=null,x.markerSelectedOptions=null,x.markerUnselectedOptions=null,x.errorXOptions=null,x.errorYOptions=null,x.textOptions=null,x.textSelectedOptions=null,x.textUnselectedOptions=null,x.selectBatch=null,x.unselectBatch=null,_._scene=null}),x.dirty||d.extendFlat(x,v),x}},58147:function(z,B,e){var d=e(34098),P=e(5345).styleTextSelection;z.exports=function(_,x){var v=_.cd,y=_.xaxis,r=_.yaxis,n=[],u=v[0].trace,i=v[0].t,f=u._length,g=i.x,h=i.y,b=i._scene,p=i.index;if(!b)return n;var E=d.hasText(u),c=d.hasMarkers(u),l=!c&&!E;if(u.visible!==!0||l)return n;var m=[],M=[];if(x!==!1&&!x.degenerate)for(var L=0;L<f;L++)x.contains([i.xpx[L],i.ypx[L]],!1,L,_)?(m.push(L),n.push({pointNumber:L,x:y.c2d(g[L]),y:r.c2d(h[L])})):M.push(L);if(c){var D=b.scatter2d;if(!m.length&&!M.length){var A=new Array(b.count);A[p]=b.markerOptions[p],D.update.apply(D,A)}else if(!b.selectBatch[p].length&&!b.unselectBatch[p].length){var C=new Array(b.count);C[p]=b.markerUnselectedOptions[p],D.update.apply(D,C)}}return b.selectBatch[p]=m,b.unselectBatch[p]=M,E&&P(v),n}},99181:function(z,B,e){var d=e(5386).f,P=e(5386).s,a=e(19316),_=e(82196),x=e(23585),v=e(9012),y=e(50693),r=e(1426).extendFlat,n=e(30962).overrideAll,u=e(23585),i=a.line,f=a.marker;z.exports=n({lon:a.lon,lat:a.lat,cluster:{enabled:{valType:"boolean"},maxzoom:r({},u.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:r({},f.opacity,{dflt:1})},mode:r({},_.mode,{dflt:"markers"}),text:r({},_.text,{}),texttemplate:P({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:r({},_.hovertext,{}),line:{color:i.color,width:i.width},connectgaps:_.connectgaps,marker:r({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:f.opacity,size:f.size,sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode},y("marker")),fill:a.fill,fillcolor:_.fillcolor,textfont:x.layers.symbol.textfont,textposition:x.layers.symbol.textposition,below:{valType:"string"},selected:{marker:_.selected.marker},unselected:{marker:_.unselected.marker},hoverinfo:r({},v.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:d()},"calc","nested")},15790:function(z,B,e){var d=e(92770),P=e(71828),a=e(50606).BADNUM,_=e(18214),x=e(21081),v=e(91424),y=e(39984),r=e(34098),n=e(13056),u=e(23469).appendArrayPointValue,i=e(63893).NEWLINES,f=e(63893).BR_TAG_ALL;z.exports=function(M,L){var D=L[0].trace,A=D.visible===!0&&D._length!==0,C=D.fill!=="none",S=r.hasLines(D),o=r.hasMarkers(D),R=r.hasText(D),T=o&&D.marker.symbol==="circle",O=o&&D.marker.symbol!=="circle",N=D.cluster&&D.cluster.enabled,H=g("fill"),k=g("line"),V=g("circle"),G=g("symbol"),U={fill:H,line:k,circle:V,symbol:G};if(!A)return U;var Y;if((C||S)&&(Y=_.calcTraceToLineCoords(L)),C&&(H.geojson=_.makePolygon(Y),H.layout.visibility="visible",P.extendFlat(H.paint,{"fill-color":D.fillcolor})),S&&(k.geojson=_.makeLine(Y),k.layout.visibility="visible",P.extendFlat(k.paint,{"line-width":D.line.width,"line-color":D.line.color,"line-opacity":D.opacity})),T){var ee=h(L);V.geojson=ee.geojson,V.layout.visibility="visible",N&&(V.filter=["!",["has","point_count"]],U.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":l(D.cluster.color,D.cluster.step),"circle-radius":l(D.cluster.size,D.cluster.step),"circle-opacity":l(D.cluster.opacity,D.cluster.step)}},U.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}}),P.extendFlat(V.paint,{"circle-color":ee.mcc,"circle-radius":ee.mrc,"circle-opacity":ee.mo})}if(T&&N&&(V.filter=["!",["has","point_count"]]),(O||R)&&(G.geojson=b(L,M),P.extendFlat(G.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),O&&(P.extendFlat(G.layout,{"icon-size":D.marker.size/10}),"angle"in D.marker&&D.marker.angle!=="auto"&&P.extendFlat(G.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),G.layout["icon-allow-overlap"]=D.marker.allowoverlap,P.extendFlat(G.paint,{"icon-opacity":D.opacity*D.marker.opacity,"icon-color":D.marker.color})),R)){var re=(D.marker||{}).size,ie=n(D.textposition,re);P.extendFlat(G.layout,{"text-size":D.textfont.size,"text-anchor":ie.anchor,"text-offset":ie.offset}),P.extendFlat(G.paint,{"text-color":D.textfont.color,"text-opacity":D.opacity})}return U};function g(m){return{type:m,geojson:_.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function h(m){var M=m[0].trace,L=M.marker,D=M.selectedpoints,A=P.isArrayOrTypedArray(L.color),C=P.isArrayOrTypedArray(L.size),S=P.isArrayOrTypedArray(L.opacity),o;function R(re){return M.opacity*re}function T(re){return re/2}var O;A&&(x.hasColorscale(M,"marker")?O=x.makeColorScaleFuncFromTrace(L):O=P.identity);var N;C&&(N=y(M));var H;S&&(H=function(re){var ie=d(re)?+P.constrain(re,0,1):0;return R(ie)});var k=[];for(o=0;o<m.length;o++){var V=m[o],G=V.lonlat;if(!c(G)){var U={};O&&(U.mcc=V.mcc=O(V.mc)),N&&(U.mrc=V.mrc=N(V.ms)),H&&(U.mo=H(V.mo)),D&&(U.selected=V.selected||0),k.push({type:"Feature",id:o+1,geometry:{type:"Point",coordinates:G},properties:U})}}var Y;if(D)for(Y=v.makeSelectedPointStyleFns(M),o=0;o<k.length;o++){var ee=k[o].properties;Y.selectedOpacityFn&&(ee.mo=R(Y.selectedOpacityFn(ee))),Y.selectedColorFn&&(ee.mcc=Y.selectedColorFn(ee)),Y.selectedSizeFn&&(ee.mrc=Y.selectedSizeFn(ee))}return{geojson:{type:"FeatureCollection",features:k},mcc:A||Y&&Y.selectedColorFn?{type:"identity",property:"mcc"}:L.color,mrc:C||Y&&Y.selectedSizeFn?{type:"identity",property:"mrc"}:T(L.size),mo:S||Y&&Y.selectedOpacityFn?{type:"identity",property:"mo"}:R(L.opacity)}}function b(m,M){for(var L=M._fullLayout,D=m[0].trace,A=D.marker||{},C=A.symbol,S=A.angle,o=C!=="circle"?p(C):E,R=S!=="auto"?p(S,!0):E,T=r.hasText(D)?p(D.text):E,O=[],N=0;N<m.length;N++){var H=m[N];if(!c(H.lonlat)){var k=D.texttemplate,V;if(k){var G=Array.isArray(k)?k[N]||"":k,U=D._module.formatLabels(H,D,L),Y={};u(Y,D,H.i);var ee=D._meta||{};V=P.texttemplateString(G,U,L._d3locale,Y,H,ee)}else V=T(N);V&&(V=V.replace(i,"").replace(f,`
`)),O.push({type:"Feature",geometry:{type:"Point",coordinates:H.lonlat},properties:{symbol:o(N),angle:R(N),text:V}})}}return{type:"FeatureCollection",features:O}}function p(m,M){return P.isArrayOrTypedArray(m)?M?function(L){return d(m[L])?+m[L]:0}:function(L){return m[L]}:m?function(){return m}:E}function E(){return""}function c(m){return m[0]===a}function l(m,M){var L;if(P.isArrayOrTypedArray(m)&&P.isArrayOrTypedArray(M)){L=["step",["get","point_count"],m[0]];for(var D=1;D<m.length;D++)L.push(M[D-1],m[D])}else L=m;return L}},76645:function(z,B,e){var d=e(71828),P=e(34098),a=e(49508),_=e(11058),x=e(82410),v=e(28908),y=e(99181);z.exports=function(u,i,f,g){function h(A,C){return d.coerce(u,i,y,A,C)}function b(A,C){return d.coerce2(u,i,y,A,C)}var p=r(u,i,h);if(!p){i.visible=!1;return}if(h("text"),h("texttemplate"),h("hovertext"),h("hovertemplate"),h("mode"),h("below"),P.hasLines(i)&&(_(u,i,f,g,h,{noDash:!0}),h("connectgaps")),P.hasMarkers(i)){a(u,i,f,g,h,{noLine:!0,noAngle:!0}),h("marker.allowoverlap"),h("marker.angle");var E=i.marker;E.symbol!=="circle"&&(d.isArrayOrTypedArray(E.size)&&(E.size=E.size[0]),d.isArrayOrTypedArray(E.color)&&(E.color=E.color[0]))}var c=b("cluster.maxzoom"),l=b("cluster.step"),m=b("cluster.color",i.marker&&i.marker.color||f),M=b("cluster.size"),L=b("cluster.opacity"),D=c!==!1||l!==!1||m!==!1||M!==!1||L!==!1;h("cluster.enabled",D),P.hasText(i)&&x(u,i,g,h,{noSelect:!0}),h("fill"),i.fill!=="none"&&v(u,i,f,h),d.coerceSelectionMarkerOpacity(i,h)};function r(n,u,i){var f=i("lon")||[],g=i("lat")||[],h=Math.min(f.length,g.length);return u._length=h,h}},53353:function(z){z.exports=function(e,d){return e.lon=d.lon,e.lat=d.lat,e}},15636:function(z,B,e){var d=e(89298);z.exports=function(a,_,x){var v={},y=x[_.subplot]._subplot,r=y.mockAxis,n=a.lonlat;return v.lonLabel=d.tickText(r,r.c2l(n[0]),!0).text,v.latLabel=d.tickText(r,r.c2l(n[1]),!0).text,v}},28178:function(z,B,e){var d=e(30211),P=e(71828),a=e(34603),_=P.fillText,x=e(50606).BADNUM,v=e(77734).traceLayerPrefix;function y(n,u,i){var f=n.cd,g=f[0].trace,h=n.xa,b=n.ya,p=n.subplot,E=[],c=v+g.uid+"-circle",l=g.cluster&&g.cluster.enabled;if(l){var m=p.map.queryRenderedFeatures(null,{layers:[c]});E=m.map(function(k){return k.id})}var M=u>=0?Math.floor((u+180)/360):Math.ceil((u-180)/360),L=M*360,D=u-L;function A(k){var V=k.lonlat;if(V[0]===x||l&&E.indexOf(k.i+1)===-1)return 1/0;var G=P.modHalf(V[0],360),U=V[1],Y=p.project([G,U]),ee=Y.x-h.c2p([D,U]),re=Y.y-b.c2p([G,i]),ie=Math.max(3,k.mrc||0);return Math.max(Math.sqrt(ee*ee+re*re)-ie,1-3/ie)}if(d.getClosest(f,A,n),n.index!==!1){var C=f[n.index],S=C.lonlat,o=[P.modHalf(S[0],360)+L,S[1]],R=h.c2p(o),T=b.c2p(o),O=C.mrc||1;n.x0=R-O,n.x1=R+O,n.y0=T-O,n.y1=T+O;var N={};N[g.subplot]={_subplot:p};var H=g._module.formatLabels(C,g,N);return n.lonLabel=H.lonLabel,n.latLabel=H.latLabel,n.color=a(g,C),n.extraText=r(g,C,f[0].t.labels),n.hovertemplate=g.hovertemplate,[n]}}function r(n,u,i){if(n.hovertemplate)return;var f=u.hi||n.hoverinfo,g=f.split("+"),h=g.indexOf("all")!==-1,b=g.indexOf("lon")!==-1,p=g.indexOf("lat")!==-1,E=u.lonlat,c=[];function l(m){return m+"°"}return h||b&&p?c.push("("+l(E[1])+", "+l(E[0])+")"):b?c.push(i.lon+l(E[0])):p&&c.push(i.lat+l(E[1])),(h||g.indexOf("text")!==-1)&&_(u,n,c),c.join("<br>")}z.exports={hoverPoints:y,getExtraText:r}},20467:function(z,B,e){z.exports={attributes:e(99181),supplyDefaults:e(76645),colorbar:e(4898),formatLabels:e(15636),calc:e(84622),plot:e(86951),hoverPoints:e(28178).hoverPoints,eventData:e(53353),selectPoints:e(86387),styleOnSelect:function(d,P){if(P){var a=P[0].trace;a._glTrace.update(P)}},moduleType:"trace",name:"scattermapbox",basePlotModule:e(50101),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},86951:function(z,B,e){var d=e(71828),P=e(15790),a=e(77734).traceLayerPrefix,_={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function x(y,r,n,u){this.type="scattermapbox",this.subplot=y,this.uid=r,this.clusterEnabled=n,this.isHidden=u,this.sourceIds={fill:"source-"+r+"-fill",line:"source-"+r+"-line",circle:"source-"+r+"-circle",symbol:"source-"+r+"-symbol",cluster:"source-"+r+"-circle",clusterCount:"source-"+r+"-circle"},this.layerIds={fill:a+r+"-fill",line:a+r+"-line",circle:a+r+"-circle",symbol:a+r+"-symbol",cluster:a+r+"-cluster",clusterCount:a+r+"-cluster-count"},this.below=null}var v=x.prototype;v.addSource=function(y,r,n){var u={type:"geojson",data:r.geojson};n&&n.enabled&&d.extendFlat(u,{cluster:!0,clusterMaxZoom:n.maxzoom}),this.subplot.map.addSource(this.sourceIds[y],u)},v.setSourceData=function(y,r){this.subplot.map.getSource(this.sourceIds[y]).setData(r.geojson)},v.addLayer=function(y,r,n){var u={type:r.type,id:this.layerIds[y],source:this.sourceIds[y],layout:r.layout,paint:r.paint};r.filter&&(u.filter=r.filter),this.subplot.addLayer(u,n)},v.update=function(r){var n=r[0].trace,u=this.subplot,i=u.map,f=P(u.gd,r),g=u.belowLookup["trace-"+this.uid],h=!!(n.cluster&&n.cluster.enabled),b=!!this.clusterEnabled,p=this;function E(S){S||p.addSource("circle",f.circle,n.cluster);for(var o=_.cluster,R=0;R<o.length;R++){var T=o[R],O=f[T];p.addLayer(T,O,g)}}function c(S){for(var o=_.cluster,R=o.length-1;R>=0;R--){var T=o[R];i.removeLayer(p.layerIds[T])}S||i.removeSource(p.sourceIds.circle)}function l(S){for(var o=_.nonCluster,R=0;R<o.length;R++){var T=o[R],O=f[T];S||p.addSource(T,O),p.addLayer(T,O,g)}}function m(S){for(var o=_.nonCluster,R=o.length-1;R>=0;R--){var T=o[R];i.removeLayer(p.layerIds[T]),S||i.removeSource(p.sourceIds[T])}}function M(S){b?c(S):m(S)}function L(S){h?E(S):l(S)}function D(){for(var S=h?_.cluster:_.nonCluster,o=0;o<S.length;o++){var R=S[o],T=f[R];T&&(u.setOptions(p.layerIds[R],"setLayoutProperty",T.layout),T.layout.visibility==="visible"&&(R!=="cluster"&&p.setSourceData(R,T),u.setOptions(p.layerIds[R],"setPaintProperty",T.paint)))}}var A=this.isHidden,C=n.visible!==!0;C?A||M():A?C||L():b!==h?(M(),L()):(this.below!==g&&(M(!0),L(!0)),D()),this.clusterEnabled=h,this.isHidden=C,this.below=g,r[0].trace._glTrace=this},v.dispose=function(){for(var r=this.subplot.map,n=this.clusterEnabled?_.cluster:_.nonCluster,u=n.length-1;u>=0;u--){var i=n[u];r.removeLayer(this.layerIds[i]),r.removeSource(this.sourceIds[i])}},z.exports=function(r,n){var u=n[0].trace,i=u.cluster&&u.cluster.enabled,f=u.visible!==!0,g=new x(r,u.uid,i,f),h=P(r.gd,n),b=g.below=r.belowLookup["trace-"+u.uid],p,E,c;if(i)for(g.addSource("circle",h.circle,u.cluster),p=0;p<_.cluster.length;p++)E=_.cluster[p],c=h[E],g.addLayer(E,c,b);else for(p=0;p<_.nonCluster.length;p++)E=_.nonCluster[p],c=h[E],g.addSource(E,c,u.cluster),g.addLayer(E,c,b);return n[0].trace._glTrace=g,g}},86387:function(z,B,e){var d=e(71828),P=e(34098),a=e(50606).BADNUM;z.exports=function(x,v){var y=x.cd,r=x.xaxis,n=x.yaxis,u=[],i=y[0].trace,f;if(!P.hasMarkers(i))return[];if(v===!1)for(f=0;f<y.length;f++)y[f].selected=0;else for(f=0;f<y.length;f++){var g=y[f],h=g.lonlat;if(h[0]!==a){var b=[d.modHalf(h[0],360),h[1]],p=[r.c2p(b),n.c2p(b)];v.contains(p,null,f,x)?(u.push({pointNumber:f,lon:h[0],lat:h[1]}),g.selected=1):g.selected=0}}return u}},81245:function(z,B,e){var d=e(5386).f,P=e(5386).s,a=e(1426).extendFlat,_=e(82196),x=e(9012),v=_.line;z.exports={mode:_.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:_.text,texttemplate:P({editType:"plot"},{keys:["r","theta","text"]}),hovertext:_.hovertext,line:{color:v.color,width:v.width,dash:v.dash,backoff:v.backoff,shape:a({},v.shape,{values:["linear","spline"]}),smoothing:v.smoothing,editType:"calc"},connectgaps:_.connectgaps,marker:_.marker,cliponaxis:a({},_.cliponaxis,{dflt:!1}),textposition:_.textposition,textfont:_.textfont,fill:a({},_.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:_.fillcolor,hoverinfo:a({},x.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:_.hoveron,hovertemplate:d(),selected:_.selected,unselected:_.unselected}},26442:function(z,B,e){var d=e(92770),P=e(50606).BADNUM,a=e(89298),_=e(36922),x=e(75225),v=e(66279),y=e(47761).calcMarkerSize;z.exports=function(n,u){for(var i=n._fullLayout,f=u.subplot,g=i[f].radialaxis,h=i[f].angularaxis,b=g.makeCalcdata(u,"r"),p=h.makeCalcdata(u,"theta"),E=u._length,c=new Array(E),l=0;l<E;l++){var m=b[l],M=p[l],L=c[l]={};d(m)&&d(M)?(L.r=m,L.theta=M):L.r=P}var D=y(u,E);return u._extremes.x=a.findExtremes(g,b,{ppad:D}),_(n,u),x(c,u),v(c,u),c}},22184:function(z,B,e){var d=e(71828),P=e(34098),a=e(49508),_=e(11058),x=e(94039),v=e(82410),y=e(28908),r=e(47581).PTS_LINESONLY,n=e(81245);function u(f,g,h,b){function p(l,m){return d.coerce(f,g,n,l,m)}var E=i(f,g,b,p);if(!E){g.visible=!1;return}p("thetaunit"),p("mode",E<r?"lines+markers":"lines"),p("text"),p("hovertext"),g.hoveron!=="fills"&&p("hovertemplate"),P.hasLines(g)&&(_(f,g,h,b,p,{backoff:!0}),x(f,g,p),p("connectgaps")),P.hasMarkers(g)&&a(f,g,h,b,p,{gradient:!0}),P.hasText(g)&&(p("texttemplate"),v(f,g,b,p));var c=[];(P.hasMarkers(g)||P.hasText(g))&&(p("cliponaxis"),p("marker.maxdisplayed"),c.push("points")),p("fill"),g.fill!=="none"&&(y(f,g,h,p),P.hasLines(g)||x(f,g,p)),(g.fill==="tonext"||g.fill==="toself")&&c.push("fills"),p("hoveron",c.join("+")||"points"),d.coerceSelectionMarkerOpacity(g,p)}function i(f,g,h,b){var p=b("r"),E=b("theta"),c;if(p)E?c=Math.min(p.length,E.length):(c=p.length,b("theta0"),b("dtheta"));else{if(!E)return 0;c=g.theta.length,b("r0"),b("dr")}return g._length=c,c}z.exports={handleRThetaDefaults:i,supplyDefaults:u}},98608:function(z,B,e){var d=e(71828),P=e(89298);z.exports=function(_,x,v){var y={},r=v[x.subplot]._subplot,n,u;r?(n=r.radialAxis,u=r.angularAxis):(r=v[x.subplot],n=r.radialaxis,u=r.angularaxis);var i=n.c2l(_.r);y.rLabel=P.tickText(n,i,!0).text;var f=u.thetaunit==="degrees"?d.rad2deg(_.theta):_.theta;return y.thetaLabel=P.tickText(u,f,!0).text,y}},59150:function(z,B,e){var d=e(33720);function P(_,x,v,y){var r=d(_,x,v,y);if(!(!r||r[0].index===!1)){var n=r[0];if(n.index===void 0)return r;var u=_.subplot,i=n.cd[n.index],f=n.trace;if(u.isPtInside(i))return n.xLabelVal=void 0,n.yLabelVal=void 0,a(i,f,u,n),n.hovertemplate=f.hovertemplate,r}}function a(_,x,v,y){var r=v.radialAxis,n=v.angularAxis;r._hovertitle="r",n._hovertitle="θ";var u={};u[x.subplot]={_subplot:v};var i=x._module.formatLabels(_,x,u);y.rLabel=i.rLabel,y.thetaLabel=i.thetaLabel;var f=_.hi||x.hoverinfo,g=[];function h(p,E){g.push(p._hovertitle+": "+E)}if(!x.hovertemplate){var b=f.split("+");b.indexOf("all")!==-1&&(b=["r","theta","text"]),b.indexOf("r")!==-1&&h(r,y.rLabel),b.indexOf("theta")!==-1&&h(n,y.thetaLabel),b.indexOf("text")!==-1&&y.text&&(g.push(y.text),delete y.text),y.extraText=g.join("<br>")}}z.exports={hoverPoints:P,makeHoverPointText:a}},91271:function(z,B,e){z.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:e(23580),categories:["polar","symbols","showLegend","scatter-like"],attributes:e(81245),supplyDefaults:e(22184).supplyDefaults,colorbar:e(4898),formatLabels:e(98608),calc:e(26442),plot:e(45162),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(59150).hoverPoints,selectPoints:e(98002),meta:{}}},45162:function(z,B,e){var d=e(32663),P=e(50606).BADNUM;z.exports=function(_,x,v){for(var y=x.layers.frontplot.select("g.scatterlayer"),r=x.xaxis,n=x.yaxis,u={xaxis:r,yaxis:n,plot:x.framework,layerClipId:x._hasClipOnAxisFalse?x.clipIds.forTraces:null},i=x.radialAxis,f=x.angularAxis,g=0;g<v.length;g++)for(var h=v[g],b=0;b<h.length;b++){b===0&&(h[0].trace._xA=r,h[0].trace._yA=n);var p=h[b],E=p.r;if(E===P)p.x=p.y=P;else{var c=i.c2g(E),l=f.c2g(p.theta);p.x=c*Math.cos(l),p.y=c*Math.sin(l)}}d(_,u,v,y)}},53286:function(z,B,e){var d=e(81245),P=e(42341),a=e(5386).s;z.exports={mode:d.mode,r:d.r,theta:d.theta,r0:d.r0,dr:d.dr,theta0:d.theta0,dtheta:d.dtheta,thetaunit:d.thetaunit,text:d.text,texttemplate:a({editType:"plot"},{keys:["r","theta","text"]}),hovertext:d.hovertext,hovertemplate:d.hovertemplate,line:P.line,connectgaps:P.connectgaps,marker:P.marker,fill:P.fill,fillcolor:P.fillcolor,textposition:P.textposition,textfont:P.textfont,hoverinfo:d.hoverinfo,selected:d.selected,unselected:d.unselected}},65746:function(z,B,e){z.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:e(23580),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:e(53286),supplyDefaults:e(75485),colorbar:e(4898),formatLabels:e(46255),calc:e(37499),hoverPoints:e(29347).hoverPoints,selectPoints:e(58147),meta:{}}},37499:function(z,B,e){var d=e(36922),P=e(47761).calcMarkerSize,a=e(19635),_=e(89298),x=e(78232).TOO_MANY_POINTS;z.exports=function(y,r){var n=y._fullLayout,u=r.subplot,i=n[u].radialaxis,f=n[u].angularaxis,g=r._r=i.makeCalcdata(r,"r"),h=r._theta=f.makeCalcdata(r,"theta"),b=r._length,p={};b<g.length&&(g=g.slice(0,b)),b<h.length&&(h=h.slice(0,b)),p.r=g,p.theta=h,d(y,r);var E=p.opts=a.style(y,r),c;return b<x?c=P(r,b):E.marker&&(c=2*(E.marker.sizeAvg||Math.max(E.marker.size,3))),r._extremes.x=_.findExtremes(i,g,{ppad:c}),[{x:!1,y:!1,t:p,trace:r}]}},75485:function(z,B,e){var d=e(71828),P=e(34098),a=e(22184).handleRThetaDefaults,_=e(49508),x=e(11058),v=e(82410),y=e(28908),r=e(47581).PTS_LINESONLY,n=e(53286);z.exports=function(i,f,g,h){function b(E,c){return d.coerce(i,f,n,E,c)}var p=a(i,f,h,b);if(!p){f.visible=!1;return}b("thetaunit"),b("mode",p<r?"lines+markers":"lines"),b("text"),b("hovertext"),f.hoveron!=="fills"&&b("hovertemplate"),P.hasLines(f)&&(x(i,f,g,h,b),b("connectgaps")),P.hasMarkers(f)&&_(i,f,g,h,b,{noAngleRef:!0,noStandOff:!0}),P.hasText(f)&&(b("texttemplate"),v(i,f,h,b)),b("fill"),f.fill!=="none"&&y(i,f,g,b),d.coerceSelectionMarkerOpacity(f,b)}},46255:function(z,B,e){var d=e(98608);z.exports=function(a,_,x){var v=a.i;return"r"in a||(a.r=_._r[v]),"theta"in a||(a.theta=_._theta[v]),d(a,_,x)}},29347:function(z,B,e){var d=e(20794),P=e(59150).makeHoverPointText;function a(_,x,v,y){var r=_.cd,n=r[0].t,u=n.r,i=n.theta,f=d.hoverPoints(_,x,v,y);if(!(!f||f[0].index===!1)){var g=f[0];if(g.index===void 0)return f;var h=_.subplot,b=g.cd[g.index],p=g.trace;if(b.r=u[g.index],b.theta=i[g.index],!!h.isPtInside(b))return g.xLabelVal=void 0,g.yLabelVal=void 0,P(b,p,h,g),f}}z.exports={hoverPoints:a}},21461:function(z,B,e){var d=e(65746);d.plot=e(49741),z.exports=d},49741:function(z,B,e){var d=e(88294),P=e(92770),a=e(26787),_=e(38967),x=e(19635),v=e(71828),y=e(78232).TOO_MANY_POINTS,r={};z.exports=function(u,i,f){if(f.length){var g=i.radialAxis,h=i.angularAxis,b=_(u,i);return f.forEach(function(p){if(!(!p||!p[0]||!p[0].trace)){var E=p[0],c=E.trace,l=E.t,m=c._length,M=l.r,L=l.theta,D=l.opts,A,C=M.slice(),S=L.slice();for(A=0;A<M.length;A++)i.isPtInside({r:M[A],theta:L[A]})||(C[A]=NaN,S[A]=NaN);var o=new Array(m*2),R=Array(m),T=Array(m);for(A=0;A<m;A++){var O=C[A],N,H;if(P(O)){var k=g.c2g(O),V=h.c2g(S[A],c.thetaunit);N=k*Math.cos(V),H=k*Math.sin(V)}else N=H=NaN;R[A]=o[A*2]=N,T[A]=o[A*2+1]=H}l.tree=d(o),D.marker&&m>=y&&(D.marker.cluster=l.tree),D.marker&&(D.markerSel.positions=D.markerUnsel.positions=D.marker.positions=o),D.line&&o.length>1&&v.extendFlat(D.line,x.linePositions(u,c,o)),D.text&&(v.extendFlat(D.text,{positions:o},x.textPosition(u,c,D.text,D.marker)),v.extendFlat(D.textSel,{positions:o},x.textPosition(u,c,D.text,D.markerSel)),v.extendFlat(D.textUnsel,{positions:o},x.textPosition(u,c,D.text,D.markerUnsel))),D.fill&&!b.fill2d&&(b.fill2d=!0),D.marker&&!b.scatter2d&&(b.scatter2d=!0),D.line&&!b.line2d&&(b.line2d=!0),D.text&&!b.glText&&(b.glText=!0),b.lineOptions.push(D.line),b.fillOptions.push(D.fill),b.markerOptions.push(D.marker),b.markerSelectedOptions.push(D.markerSel),b.markerUnselectedOptions.push(D.markerUnsel),b.textOptions.push(D.text),b.textSelectedOptions.push(D.textSel),b.textUnselectedOptions.push(D.textUnsel),b.selectBatch.push([]),b.unselectBatch.push([]),l.x=R,l.y=T,l.rawx=R,l.rawy=T,l.r=M,l.theta=L,l.positions=o,l._scene=b,l.index=b.count,b.count++}}),a(u,i,f)}},z.exports.reglPrecompiled=r},48300:function(z,B,e){var d=e(5386).f,P=e(5386).s,a=e(1426).extendFlat,_=e(82196),x=e(9012),v=_.line;z.exports={mode:_.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:_.text,texttemplate:P({editType:"plot"},{keys:["real","imag","text"]}),hovertext:_.hovertext,line:{color:v.color,width:v.width,dash:v.dash,backoff:v.backoff,shape:a({},v.shape,{values:["linear","spline"]}),smoothing:v.smoothing,editType:"calc"},connectgaps:_.connectgaps,marker:_.marker,cliponaxis:a({},_.cliponaxis,{dflt:!1}),textposition:_.textposition,textfont:_.textfont,fill:a({},_.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:_.fillcolor,hoverinfo:a({},x.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:_.hoveron,hovertemplate:d(),selected:_.selected,unselected:_.unselected}},30621:function(z,B,e){var d=e(92770),P=e(50606).BADNUM,a=e(36922),_=e(75225),x=e(66279),v=e(47761).calcMarkerSize;z.exports=function(r,n){for(var u=r._fullLayout,i=n.subplot,f=u[i].realaxis,g=u[i].imaginaryaxis,h=f.makeCalcdata(n,"real"),b=g.makeCalcdata(n,"imag"),p=n._length,E=new Array(p),c=0;c<p;c++){var l=h[c],m=b[c],M=E[c]={};d(l)&&d(m)?(M.real=l,M.imag=m):M.real=P}return v(n,p),a(r,n),_(E,n),x(E,n),E}},65269:function(z,B,e){var d=e(71828),P=e(34098),a=e(49508),_=e(11058),x=e(94039),v=e(82410),y=e(28908),r=e(47581).PTS_LINESONLY,n=e(48300);z.exports=function(f,g,h,b){function p(l,m){return d.coerce(f,g,n,l,m)}var E=u(f,g,b,p);if(!E){g.visible=!1;return}p("mode",E<r?"lines+markers":"lines"),p("text"),p("hovertext"),g.hoveron!=="fills"&&p("hovertemplate"),P.hasLines(g)&&(_(f,g,h,b,p,{backoff:!0}),x(f,g,p),p("connectgaps")),P.hasMarkers(g)&&a(f,g,h,b,p,{gradient:!0}),P.hasText(g)&&(p("texttemplate"),v(f,g,b,p));var c=[];(P.hasMarkers(g)||P.hasText(g))&&(p("cliponaxis"),p("marker.maxdisplayed"),c.push("points")),p("fill"),g.fill!=="none"&&(y(f,g,h,p),P.hasLines(g)||x(f,g,p)),(g.fill==="tonext"||g.fill==="toself")&&c.push("fills"),p("hoveron",c.join("+")||"points"),d.coerceSelectionMarkerOpacity(g,p)};function u(i,f,g,h){var b=h("real"),p=h("imag"),E;return b&&p&&(E=Math.min(b.length,p.length)),f._length=E,E}},62047:function(z,B,e){var d=e(89298);z.exports=function(a,_,x){var v={},y=x[_.subplot]._subplot;return v.realLabel=d.tickText(y.radialAxis,a.real,!0).text,v.imagLabel=d.tickText(y.angularAxis,a.imag,!0).text,v}},11350:function(z,B,e){var d=e(33720);function P(_,x,v,y){var r=d(_,x,v,y);if(!(!r||r[0].index===!1)){var n=r[0];if(n.index===void 0)return r;var u=_.subplot,i=n.cd[n.index],f=n.trace;if(u.isPtInside(i))return n.xLabelVal=void 0,n.yLabelVal=void 0,a(i,f,u,n),n.hovertemplate=f.hovertemplate,r}}function a(_,x,v,y){var r=v.radialAxis,n=v.angularAxis;r._hovertitle="real",n._hovertitle="imag";var u={};u[x.subplot]={_subplot:v};var i=x._module.formatLabels(_,x,u);y.realLabel=i.realLabel,y.imagLabel=i.imagLabel;var f=_.hi||x.hoverinfo,g=[];function h(p,E){g.push(p._hovertitle+": "+E)}if(!x.hovertemplate){var b=f.split("+");b.indexOf("all")!==-1&&(b=["real","imag","text"]),b.indexOf("real")!==-1&&h(r,y.realLabel),b.indexOf("imag")!==-1&&h(n,y.imagLabel),b.indexOf("text")!==-1&&y.text&&(g.push(y.text),delete y.text),y.extraText=g.join("<br>")}}z.exports={hoverPoints:P,makeHoverPointText:a}},85956:function(z,B,e){z.exports={moduleType:"trace",name:"scattersmith",basePlotModule:e(7504),categories:["smith","symbols","showLegend","scatter-like"],attributes:e(48300),supplyDefaults:e(65269),colorbar:e(4898),formatLabels:e(62047),calc:e(30621),plot:e(12480),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(11350).hoverPoints,selectPoints:e(98002),meta:{}}},12480:function(z,B,e){var d=e(32663),P=e(50606).BADNUM,a=e(23893),_=a.smith;z.exports=function(v,y,r){for(var n=y.layers.frontplot.select("g.scatterlayer"),u=y.xaxis,i=y.yaxis,f={xaxis:u,yaxis:i,plot:y.framework,layerClipId:y._hasClipOnAxisFalse?y.clipIds.forTraces:null},g=0;g<r.length;g++)for(var h=r[g],b=0;b<h.length;b++){b===0&&(h[0].trace._xA=u,h[0].trace._yA=i);var p=h[b],E=p.real;if(E===P)p.x=p.y=P;else{var c=_([E,p.imag]);p.x=c[0],p.y=c[1]}}d(v,f,r,n)}},50413:function(z,B,e){var d=e(5386).f,P=e(5386).s,a=e(82196),_=e(9012),x=e(50693),v=e(79952).P,y=e(1426).extendFlat,r=a.marker,n=a.line,u=r.line;z.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:y({},a.mode,{dflt:"markers"}),text:y({},a.text,{}),texttemplate:P({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:y({},a.hovertext,{}),line:{color:n.color,width:n.width,dash:v,backoff:n.backoff,shape:y({},n.shape,{values:["linear","spline"]}),smoothing:n.smoothing,editType:"calc"},connectgaps:a.connectgaps,cliponaxis:a.cliponaxis,fill:y({},a.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:a.fillcolor,marker:y({symbol:r.symbol,opacity:r.opacity,angle:r.angle,angleref:r.angleref,standoff:r.standoff,maxdisplayed:r.maxdisplayed,size:r.size,sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,line:y({width:u.width,editType:"calc"},x("marker.line")),gradient:r.gradient,editType:"calc"},x("marker")),textfont:a.textfont,textposition:a.textposition,selected:a.selected,unselected:a.unselected,hoverinfo:y({},_.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:a.hoveron,hovertemplate:d()}},54337:function(z,B,e){var d=e(92770),P=e(36922),a=e(75225),_=e(66279),x=e(47761).calcMarkerSize,v=["a","b","c"],y={a:["b","c"],b:["a","c"],c:["a","b"]};z.exports=function(n,u){var i=n._fullLayout[u.subplot],f=i.sum,g=u.sum||f,h={a:u.a,b:u.b,c:u.c},b,p,E,c,l,m;for(b=0;b<v.length;b++)if(E=v[b],!h[E]){for(l=h[y[E][0]],m=h[y[E][1]],c=new Array(l.length),p=0;p<l.length;p++)c[p]=g-l[p]-m[p];h[E]=c}var M=u._length,L=new Array(M),D,A,C,S,o,R;for(b=0;b<M;b++)D=h.a[b],A=h.b[b],C=h.c[b],d(D)&&d(A)&&d(C)?(D=+D,A=+A,C=+C,S=f/(D+A+C),S!==1&&(D*=S,A*=S,C*=S),R=D,o=C-A,L[b]={x:o,y:R,a:D,b:A,c:C}):L[b]={x:!1,y:!1};return x(u,M),P(n,u),a(L,u),_(L,u),L}},46008:function(z,B,e){var d=e(71828),P=e(47581),a=e(34098),_=e(49508),x=e(11058),v=e(94039),y=e(82410),r=e(28908),n=e(50413);z.exports=function(i,f,g,h){function b(L,D){return d.coerce(i,f,n,L,D)}var p=b("a"),E=b("b"),c=b("c"),l;if(p?(l=p.length,E?(l=Math.min(l,E.length),c&&(l=Math.min(l,c.length))):c?l=Math.min(l,c.length):l=0):E&&c&&(l=Math.min(E.length,c.length)),!l){f.visible=!1;return}f._length=l,b("sum"),b("text"),b("hovertext"),f.hoveron!=="fills"&&b("hovertemplate");var m=l<P.PTS_LINESONLY?"lines+markers":"lines";b("mode",m),a.hasLines(f)&&(x(i,f,g,h,b,{backoff:!0}),v(i,f,b),b("connectgaps")),a.hasMarkers(f)&&_(i,f,g,h,b,{gradient:!0}),a.hasText(f)&&(b("texttemplate"),y(i,f,h,b));var M=[];(a.hasMarkers(f)||a.hasText(f))&&(b("cliponaxis"),b("marker.maxdisplayed"),M.push("points")),b("fill"),f.fill!=="none"&&(r(i,f,g,b),a.hasLines(f)||v(i,f,b)),(f.fill==="tonext"||f.fill==="toself")&&M.push("fills"),b("hoveron",M.join("+")||"points"),d.coerceSelectionMarkerOpacity(f,b)}},4524:function(z){z.exports=function(e,d,P,a,_){if(d.xa&&(e.xaxis=d.xa),d.ya&&(e.yaxis=d.ya),a[_]){var x=a[_];e.a=x.a,e.b=x.b,e.c=x.c}else e.a=d.a,e.b=d.b,e.c=d.c;return e}},93645:function(z,B,e){var d=e(89298);z.exports=function(a,_,x){var v={},y=x[_.subplot]._subplot;return v.aLabel=d.tickText(y.aaxis,a.a,!0).text,v.bLabel=d.tickText(y.baxis,a.b,!0).text,v.cLabel=d.tickText(y.caxis,a.c,!0).text,v}},47250:function(z,B,e){var d=e(33720);z.exports=function(a,_,x,v){var y=d(a,_,x,v);if(!y||y[0].index===!1)return;var r=y[0];if(r.index===void 0){var n=1-r.y0/a.ya._length,u=a.xa._length,i=u*n/2,f=u-i;return r.x0=Math.max(Math.min(r.x0,f),i),r.x1=Math.max(Math.min(r.x1,f),i),y}var g=r.cd[r.index],h=r.trace,b=r.subplot;r.a=g.a,r.b=g.b,r.c=g.c,r.xLabelVal=void 0,r.yLabelVal=void 0;var p={};p[h.subplot]={_subplot:b};var E=h._module.formatLabels(g,h,p);r.aLabel=E.aLabel,r.bLabel=E.bLabel,r.cLabel=E.cLabel;var c=g.hi||h.hoverinfo,l=[];function m(L,D){l.push(L._hovertitle+": "+D)}if(!h.hovertemplate){var M=c.split("+");M.indexOf("all")!==-1&&(M=["a","b","c"]),M.indexOf("a")!==-1&&m(b.aaxis,r.aLabel),M.indexOf("b")!==-1&&m(b.baxis,r.bLabel),M.indexOf("c")!==-1&&m(b.caxis,r.cLabel)}return r.extraText=l.join("<br>"),r.hovertemplate=h.hovertemplate,y}},52979:function(z,B,e){z.exports={attributes:e(50413),supplyDefaults:e(46008),colorbar:e(4898),formatLabels:e(93645),calc:e(54337),plot:e(7507),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(47250),selectPoints:e(98002),eventData:e(4524),moduleType:"trace",name:"scatterternary",basePlotModule:e(61639),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},7507:function(z,B,e){var d=e(32663);z.exports=function(a,_,x){var v=_.plotContainer;v.select(".scatterlayer").selectAll("*").remove();for(var y=_.xaxis,r=_.yaxis,n={xaxis:y,yaxis:r,plot:v,layerClipId:_._hasClipOnAxisFalse?_.clipIdRelative:null},u=_.layers.frontplot.select("g.scatterlayer"),i=0;i<x.length;i++){var f=x[i];f.length&&(f[0].trace._xA=y,f[0].trace._yA=r)}d(a,n,x,u)}},46880:function(z,B,e){var d=e(82196),P=e(50693),a=e(12663).axisHoverFormat,_=e(5386).f,x=e(42341),v=e(85555).idRegex,y=e(44467).templatedArray,r=e(1426).extendFlat,n=d.marker,u=n.line,i=r(P("marker.line",{editTypeOverride:"calc"}),{width:r({},u.width,{editType:"calc"}),editType:"calc"}),f=r(P("marker"),{symbol:n.symbol,angle:n.angle,size:r({},n.size,{editType:"markerSize"}),sizeref:n.sizeref,sizemin:n.sizemin,sizemode:n.sizemode,opacity:n.opacity,colorbar:n.colorbar,line:i,editType:"calc"});f.color.editType=f.cmin.editType=f.cmax.editType="style";function g(h){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:v[h],editType:"plot"}}}z.exports={dimensions:y("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:r({},x.text,{}),hovertext:r({},x.hovertext,{}),hovertemplate:_(),xhoverformat:a("x"),yhoverformat:a("y"),marker:f,xaxes:g("x"),yaxes:g("y"),diagonal:{visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},showupperhalf:{valType:"boolean",dflt:!0,editType:"calc"},showlowerhalf:{valType:"boolean",dflt:!0,editType:"calc"},selected:{marker:x.selected.marker,editType:"calc"},unselected:{marker:x.unselected.marker,editType:"calc"},opacity:x.opacity}},65017:function(z,B,e){var d=e(73972),P=e(83312);z.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:e(46880),supplyDefaults:e(25784),colorbar:e(4898),calc:e(87625),plot:e(79410),hoverPoints:e(8567).hoverPoints,selectPoints:e(8689),editStyle:e(28801),meta:{}},d.register(P)},16947:function(z,B,e){var d=e(46075),P=e(73972),a=e(79749),_=e(27659).a0,x=e(93612),v=e(41675).getFromId,y=e(89298).shouldShowZeroLine,r="splom",n={};function u(p){var E=p._fullLayout,c=P.getModule(r),l=_(p.calcdata,c)[0],m=a(p,["ANGLE_instanced_arrays","OES_element_index_uint"],n);m&&(E._hasOnlyLargeSploms&&g(p),c.plot(p,{},l))}function i(p){var E=p.calcdata,c=p._fullLayout;c._hasOnlyLargeSploms&&g(p);for(var l=0;l<E.length;l++){var m=E[l][0],M=m.trace,L=c._splomScenes[M.uid];M.type==="splom"&&L&&L.matrix&&f(p,M,L)}}function f(p,E,c){for(var l=c.matrixOptions.data.length,m=E._visibleDims,M=c.viewOpts.ranges=new Array(l),L=0;L<m.length;L++){var D=m[L],A=M[L]=new Array(4),C=v(p,E._diag[D][0]);C&&(A[0]=C.r2l(C.range[0]),A[2]=C.r2l(C.range[1]));var S=v(p,E._diag[D][1]);S&&(A[1]=S.r2l(S.range[0]),A[3]=S.r2l(S.range[1]))}c.selectBatch.length||c.unselectBatch.length?c.matrix.update({ranges:M},{ranges:M}):c.matrix.update({ranges:M})}function g(p){var E=p._fullLayout,c=E._glcanvas.data()[0].regl,l=E._splomGrid;l||(l=E._splomGrid=d(c)),l.update(h(p))}function h(p){var E=p._context.plotGlPixelRatio,c=p._fullLayout,l=c._size,m=[0,0,c.width*E,c.height*E],M={},L;function D(ee,re,ie,se,ce,q){ie*=E,se*=E,ce*=E,q*=E;var j=re[ee+"color"],Z=re[ee+"width"],Q=String(j+Z);Q in M?M[Q].data.push(NaN,NaN,ie,se,ce,q):M[Q]={data:[ie,se,ce,q],join:"rect",thickness:Z*E,color:j,viewport:m,range:m,overlay:!1}}for(L in c._splomSubplots){var A=c._plots[L],C=A.xaxis,S=A.yaxis,o=C._gridVals,R=S._gridVals,T=C._offset,O=C._length,N=S._length,H=l.b+S.domain[0]*l.h,k=-S._m,V=-k*S.r2l(S.range[0],S.calendar),G,U;if(C.showgrid)for(L=0;L<o.length;L++)G=T+C.l2p(o[L].x),D("grid",C,G,H,G,H+N);if(S.showgrid)for(L=0;L<R.length;L++)U=H+V+k*R[L].x,D("grid",S,T,U,T+O,U);y(p,C,S)&&(G=T+C.l2p(0),D("zeroline",C,G,H,G,H+N)),y(p,S,C)&&(U=H+V+0,D("zeroline",S,T,U,T+O,U))}var Y=[];for(L in M)Y.push(M[L]);return Y}function b(p,E,c,l){var m={},M;if(l._splomScenes){for(M=0;M<p.length;M++){var L=p[M];L.type==="splom"&&(m[L.uid]=1)}for(M=0;M<c.length;M++){var D=c[M];if(!m[D.uid]){var A=l._splomScenes[D.uid];A&&A.destroy&&A.destroy(),l._splomScenes[D.uid]=null,delete l._splomScenes[D.uid]}}}Object.keys(l._splomScenes||{}).length===0&&delete l._splomScenes,l._splomGrid&&!E._hasOnlyLargeSploms&&l._hasOnlyLargeSploms&&(l._splomGrid.destroy(),l._splomGrid=null,delete l._splomGrid),x.clean(p,E,c,l)}z.exports={name:r,attr:x.attr,attrRegex:x.attrRegex,layoutAttributes:x.layoutAttributes,supplyLayoutDefaults:x.supplyLayoutDefaults,drawFramework:x.drawFramework,plot:u,drag:i,updateGrid:g,clean:b,updateFx:x.updateFx,toSVG:x.toSVG,reglPrecompiled:n}},87625:function(z,B,e){var d=e(71828),P=e(41675),a=e(47761).calcMarkerSize,_=e(47761).calcAxisExpansion,x=e(36922),v=e(19635).markerSelection,y=e(19635).markerStyle,r=e(10164),n=e(50606).BADNUM,u=e(78232).TOO_MANY_POINTS;z.exports=function(f,g){var h=g.dimensions,b=g._length,p={},E=p.cdata=[],c=p.data=[],l=g._visibleDims=[],m,M,L,D,A;function C(O,N){for(var H=O.makeCalcdata({v:N.values,vcalendar:g.calendar},"v"),k=0;k<H.length;k++)H[k]=H[k]===n?NaN:H[k];E.push(H),c.push(O.type==="log"?d.simpleMap(H,O.c2l):H)}for(m=0;m<h.length;m++)if(L=h[m],L.visible){if(D=P.getFromId(f,g._diag[m][0]),A=P.getFromId(f,g._diag[m][1]),D&&A&&D.type!==A.type){d.log("Skipping splom dimension "+m+" with conflicting axis types");continue}D?(C(D,L),A&&A.type==="category"&&(A._categories=D._categories.slice())):C(A,L),l.push(m)}x(f,g),d.extendFlat(p,y(f,g));var S=E.length,o=S*b>u,R;for(o?R=p.sizeAvg||Math.max(p.size,3):R=a(g,b),M=0;M<l.length;M++)m=l[M],L=h[m],D=P.getFromId(f,g._diag[m][0])||{},A=P.getFromId(f,g._diag[m][1])||{},_(f,g,D,A,E[M],E[M],R);var T=r(f,g);return T.matrix||(T.matrix=!0),T.matrixOptions=p,T.selectedOptions=v(f,g,g.selected),T.unselectedOptions=v(f,g,g.unselected),[{x:!1,y:!1,t:{},trace:g}]}},25784:function(z,B,e){var d=e(71828),P=e(85501),a=e(46880),_=e(34098),x=e(49508),v=e(94397),y=e(68645).isOpenSymbol;z.exports=function(i,f,g,h){function b(D,A){return d.coerce(i,f,a,D,A)}var p=P(i,f,{name:"dimensions",handleItemDefaults:r}),E=b("diagonal.visible"),c=b("showupperhalf"),l=b("showlowerhalf"),m=v(f,p,"values");if(!m||!E&&!c&&!l){f.visible=!1;return}b("text"),b("hovertext"),b("hovertemplate"),b("xhoverformat"),b("yhoverformat"),x(i,f,g,h,b,{noAngleRef:!0,noStandOff:!0});var M=y(f.marker.symbol),L=_.isBubble(f);b("marker.line.width",M||L?1:0),n(i,f,h,b),d.coerceSelectionMarkerOpacity(f,b)};function r(u,i){function f(h,b){return d.coerce(u,i,a.dimensions,h,b)}f("label");var g=f("values");g&&g.length?f("visible"):i.visible=!1,f("axis.type"),f("axis.matches")}function n(u,i,f,g){var h=i.dimensions,b=h.length,p=i.showupperhalf,E=i.showlowerhalf,c=i.diagonal.visible,l,m,M=new Array(b),L=new Array(b);for(l=0;l<b;l++){var D=l?l+1:"";M[l]="x"+D,L[l]="y"+D}var A=g("xaxes",M),C=g("yaxes",L),S=i._diag=new Array(b);i._xaxes={},i._yaxes={};var o=[],R=[];function T(ee,re,ie,se){if(ee){var ce=ee.charAt(0),q=f._splomAxes[ce];if(i["_"+ce+"axes"][ee]=1,se.push(ee),!(ee in q)){var j=q[ee]={};ie&&(j.label=ie.label||"",ie.visible&&ie.axis&&(ie.axis.type&&(j.type=ie.axis.type),ie.axis.matches&&(j.matches=re)))}}}var O=!c&&!E,N=!c&&!p;for(i._axesDim={},l=0;l<b;l++){var H=h[l],k=l===0,V=l===b-1,G=k&&O||V&&N?void 0:A[l],U=k&&N||V&&O?void 0:C[l];T(G,U,H,o),T(U,G,H,R),S[l]=[G,U],i._axesDim[G]=l,i._axesDim[U]=l}for(l=0;l<o.length;l++)for(m=0;m<R.length;m++){var Y=o[l]+R[m];(l>m&&p||l<m&&E||l===m&&(c||!E||!p))&&(f._splomSubplots[Y]=1)}(!E||!c&&p&&E)&&(f._splomGridDflt.xside="bottom",f._splomGridDflt.yside="left")}},28801:function(z,B,e){var d=e(71828),P=e(36922),a=e(19635).markerStyle;z.exports=function(x,v){var y=v.trace,r=x._fullLayout._splomScenes[y.uid];if(r){P(x,y),d.extendFlat(r.matrixOptions,a(x,y));var n=d.extendFlat({},r.matrixOptions,r.viewOpts);r.matrix.update(n,null)}}},35948:function(z,B){B.getDimIndex=function(d,P){for(var a=P._id,_=a.charAt(0),x={x:0,y:1}[_],v=d._visibleDims,y=0;y<v.length;y++){var r=v[y];if(d._diag[r][x]===a)return y}return!1}},8567:function(z,B,e){var d=e(35948),P=e(20794).calcHover;function a(_,x,v){var y=_.cd,r=y[0].trace,n=_.scene,u=n.matrixOptions.cdata,i=_.xa,f=_.ya,g=i.c2p(x),h=f.c2p(v),b=_.distance,p=d.getDimIndex(r,i),E=d.getDimIndex(r,f);if(p===!1||E===!1)return[_];for(var c=u[p],l=u[E],m,M,L=b,D=0;D<c.length;D++){var A=c[D],C=l[D],S=i.c2p(A)-g,o=f.c2p(C)-h,R=Math.sqrt(S*S+o*o);R<L&&(L=M=R,m=D)}return _.index=m,_.distance=L,_.dxy=M,m===void 0?[_]:[P(_,c,l,r)]}z.exports={hoverPoints:a}},6419:function(z,B,e){var d=e(65017);d.basePlotModule=e(16947),z.exports=d},79410:function(z,B,e){var d=e(60487),P=e(71828),a=e(41675),_=e(64505).selectMode;z.exports=function(y,r,n){if(n.length)for(var u=0;u<n.length;u++)x(y,n[u][0])};function x(v,y){var r=v._fullLayout,n=r._size,u=y.trace,i=y.t,f=r._splomScenes[u.uid],g=f.matrixOptions,h=g.cdata,b=r._glcanvas.data()[0].regl,p=r.dragmode,E,c,l,m,M;if(h.length!==0){g.lower=u.showupperhalf,g.upper=u.showlowerhalf,g.diagonal=u.diagonal.visible;var L=u._visibleDims,D=h.length,A=f.viewOpts={};for(A.ranges=new Array(D),A.domains=new Array(D),M=0;M<L.length;M++){l=L[M];var C=A.ranges[M]=new Array(4),S=A.domains[M]=new Array(4);E=a.getFromId(v,u._diag[l][0]),E&&(C[0]=E._rl[0],C[2]=E._rl[1],S[0]=E.domain[0],S[2]=E.domain[1]),c=a.getFromId(v,u._diag[l][1]),c&&(C[1]=c._rl[0],C[3]=c._rl[1],S[1]=c.domain[0],S[3]=c.domain[1])}var o=v._context.plotGlPixelRatio,R=n.l*o,T=n.b*o,O=n.w*o,N=n.h*o;A.viewport=[R,T,O+R,N+T],f.matrix===!0&&(f.matrix=d(b));var H=r.clickmode.indexOf("select")>-1,k=_(p)||!!u.selectedpoints||H,V=!0;if(k){var G=u._length;if(u.selectedpoints){f.selectBatch=u.selectedpoints;var U=u.selectedpoints,Y={};for(l=0;l<U.length;l++)Y[U[l]]=!0;var ee=[];for(l=0;l<G;l++)Y[l]||ee.push(l);f.unselectBatch=ee}var re=i.xpx=new Array(D),ie=i.ypx=new Array(D);for(M=0;M<L.length;M++){if(l=L[M],E=a.getFromId(v,u._diag[l][0]),E)for(re[M]=new Array(G),m=0;m<G;m++)re[M][m]=E.c2p(h[M][m]);if(c=a.getFromId(v,u._diag[l][1]),c)for(ie[M]=new Array(G),m=0;m<G;m++)ie[M][m]=c.c2p(h[M][m])}if(f.selectBatch.length||f.unselectBatch.length){var se=P.extendFlat({},g,f.unselectedOptions,A),ce=P.extendFlat({},g,f.selectedOptions,A);f.matrix.update(se,ce),V=!1}}else i.xpx=i.ypx=null;if(V){var q=P.extendFlat({},g,A);f.matrix.update(q,null)}}}},10164:function(z,B,e){var d=e(71828);z.exports=function(a,_){var x=a._fullLayout,v=_.uid,y=x._splomScenes;y||(y=x._splomScenes={});var r={dirty:!0,selectBatch:[],unselectBatch:[]},n={matrix:!1,selectBatch:[],unselectBatch:[]},u=y[_.uid];return u||(u=y[v]=d.extendFlat({},r,n),u.draw=function(){u.matrix&&u.matrix.draw&&(u.selectBatch.length||u.unselectBatch.length?u.matrix.draw(u.unselectBatch,u.selectBatch):u.matrix.draw()),u.dirty=!1},u.destroy=function(){u.matrix&&u.matrix.destroy&&u.matrix.destroy(),u.matrixOptions=null,u.selectBatch=null,u.unselectBatch=null,u=null}),u.dirty||d.extendFlat(u,r),u}},8689:function(z,B,e){var d=e(71828),P=d.pushUnique,a=e(34098),_=e(35948);z.exports=function(v,y){var r=v.cd,n=r[0].trace,u=r[0].t,i=v.scene,f=i.matrixOptions.cdata,g=v.xaxis,h=v.yaxis,b=[];if(!i)return b;var p=!a.hasMarkers(n)&&!a.hasText(n);if(n.visible!==!0||p)return b;var E=_.getDimIndex(n,g),c=_.getDimIndex(n,h);if(E===!1||c===!1)return b;var l=u.xpx[E],m=u.ypx[c],M=f[E],L=f[c],D=(v.scene.selectBatch||[]).slice(),A=[];if(y!==!1&&!y.degenerate)for(var C=0;C<M.length;C++)y.contains([l[C],m[C]],null,C,v)?(b.push({pointNumber:C,x:M[C],y:L[C]}),P(D,C)):D.indexOf(C)!==-1?P(D,C):A.push(C);var S=i.matrixOptions;return!D.length&&!A.length?i.matrix.update(S,null):!i.selectBatch.length&&!i.unselectBatch.length&&i.matrix.update(i.unselectedOptions,d.extendFlat({},S,i.selectedOptions,i.viewOpts)),i.selectBatch=D,i.unselectBatch=A,b}},21850:function(z,B,e){var d=e(50693),P=e(12663).axisHoverFormat,a=e(5386).f,_=e(2418),x=e(9012),v=e(1426).extendFlat,y={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},starts:{x:{valType:"data_array",editType:"calc"},y:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},editType:"calc"},maxdisplayed:{valType:"integer",min:0,dflt:1e3,editType:"calc"},sizeref:{valType:"number",editType:"calc",min:0,dflt:1},text:{valType:"string",dflt:"",editType:"calc"},hovertext:{valType:"string",dflt:"",editType:"calc"},hovertemplate:a({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),uhoverformat:P("u",1),vhoverformat:P("v",1),whoverformat:P("w",1),xhoverformat:P("x"),yhoverformat:P("y"),zhoverformat:P("z"),showlegend:v({},x.showlegend,{dflt:!1})};v(y,d("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var r=["opacity","lightposition","lighting"];r.forEach(function(n){y[n]=_[n]}),y.hoverinfo=v({},x.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"}),y.transforms=void 0,z.exports=y},88489:function(z,B,e){var d=e(71828),P=e(78803);function a(y,r){r._len=Math.min(r.u.length,r.v.length,r.w.length,r.x.length,r.y.length,r.z.length),r._u=v(r.u,r._len),r._v=v(r.v,r._len),r._w=v(r.w,r._len),r._x=v(r.x,r._len),r._y=v(r.y,r._len),r._z=v(r.z,r._len);var n=_(r);r._gridFill=n.fill,r._Xs=n.Xs,r._Ys=n.Ys,r._Zs=n.Zs,r._len=n.len;var u=0,i,f,g;r.starts&&(i=v(r.starts.x||[]),f=v(r.starts.y||[]),g=v(r.starts.z||[]),u=Math.min(i.length,f.length,g.length)),r._startsX=i||[],r._startsY=f||[],r._startsZ=g||[];var h=0,b=1/0,p;for(p=0;p<r._len;p++){var E=r._u[p],c=r._v[p],l=r._w[p],m=Math.sqrt(E*E+c*c+l*l);h=Math.max(h,m),b=Math.min(b,m)}for(P(y,r,{vals:[b,h],containerStr:"",cLetter:"c"}),p=0;p<u;p++){var M=i[p];n.xMax=Math.max(n.xMax,M),n.xMin=Math.min(n.xMin,M);var L=f[p];n.yMax=Math.max(n.yMax,L),n.yMin=Math.min(n.yMin,L);var D=g[p];n.zMax=Math.max(n.zMax,D),n.zMin=Math.min(n.zMin,D)}r._slen=u,r._normMax=h,r._xbnds=[n.xMin,n.xMax],r._ybnds=[n.yMin,n.yMax],r._zbnds=[n.zMin,n.zMax]}function _(y){var r=y._x,n=y._y,u=y._z,i=y._len,f,g,h,b=-1/0,p=1/0,E=-1/0,c=1/0,l=-1/0,m=1/0,M="",L,D,A,C,S,o,R,T,O;for(i&&(C=r[0],o=n[0],T=u[0]),i>1&&(S=r[i-1],R=n[i-1],O=u[i-1]),f=0;f<i;f++)b=Math.max(b,r[f]),p=Math.min(p,r[f]),E=Math.max(E,n[f]),c=Math.min(c,n[f]),l=Math.max(l,u[f]),m=Math.min(m,u[f]),!L&&r[f]!==C&&(L=!0,M+="x"),!D&&n[f]!==o&&(D=!0,M+="y"),!A&&u[f]!==T&&(A=!0,M+="z");L||(M+="x"),D||(M+="y"),A||(M+="z");var N=x(y._x),H=x(y._y),k=x(y._z);M=M.replace("x",(C>S?"-":"+")+"x"),M=M.replace("y",(o>R?"-":"+")+"y"),M=M.replace("z",(T>O?"-":"+")+"z");var V=function(){i=0,N=[],H=[],k=[]};(!i||i<N.length*H.length*k.length)&&V();var G=function(xe){return xe==="x"?r:xe==="y"?n:u},U=function(xe){return xe==="x"?N:xe==="y"?H:k},Y=function(xe){return xe[i-1]<xe[0]?-1:1},ee=G(M[1]),re=G(M[3]),ie=G(M[5]),se=U(M[1]).length,ce=U(M[3]).length,q=U(M[5]).length,j=!1,Z=function(xe,Se,Re){return se*(ce*xe+Se)+Re},Q=Y(G(M[1])),ue=Y(G(M[3])),fe=Y(G(M[5]));for(f=0;f<q-1;f++){for(g=0;g<ce-1;g++){for(h=0;h<se-1;h++){var te=Z(f,g,h),ne=Z(f,g,h+1),ve=Z(f,g+1,h),le=Z(f+1,g,h);if((!(ee[te]*Q<ee[ne]*Q)||!(re[te]*ue<re[ve]*ue)||!(ie[te]*fe<ie[le]*fe))&&(j=!0),j)break}if(j)break}if(j)break}return j&&(d.warn("Encountered arbitrary coordinates! Unable to input data grid."),V()),{xMin:p,yMin:c,zMin:m,xMax:b,yMax:E,zMax:l,Xs:N,Ys:H,Zs:k,len:i,fill:M}}function x(y){return d.distinctVals(y).vals}function v(y,r){if(r===void 0&&(r=y.length),d.isTypedArray(y))return y.subarray(0,r);for(var n=[],u=0;u<r;u++)n[u]=+y[u];return n}z.exports={calc:a,filter:v,processGrid:_}},90154:function(z,B,e){var d=e(9330).gl_streamtube3d,P=d.createTubeMesh,a=e(71828),_=e(81697).parseColorScale,x=e(21081).extractOpts,v=e(90060),y={xaxis:0,yaxis:1,zaxis:2};function r(h,b){this.scene=h,this.uid=b,this.mesh=null,this.data=null}var n=r.prototype;n.handlePick=function(h){var b=this.scene.fullSceneLayout,p=this.scene.dataScale;function E(m,M){var L=b[M],D=p[y[M]];return L.l2c(m)/D}if(h.object===this.mesh){var c=h.data.position,l=h.data.velocity;return h.traceCoordinate=[E(c[0],"xaxis"),E(c[1],"yaxis"),E(c[2],"zaxis"),E(l[0],"xaxis"),E(l[1],"yaxis"),E(l[2],"zaxis"),h.data.intensity*this.data._normMax,h.data.divergence],h.textLabel=this.data.hovertext||this.data.text,!0}};function u(h){var b=h.length,p;return b>2?p=h.slice(1,b-1):b===2?p=[(h[0]+h[1])/2]:p=h,p}function i(h){var b=h.length;return b===1?[.5,.5]:[h[1]-h[0],h[b-1]-h[b-2]]}function f(h,b){var p=h.fullSceneLayout,E=h.dataScale,c=b._len,l={};function m(ce,q){var j=p[q],Z=E[y[q]];return a.simpleMap(ce,function(Q){return j.d2l(Q)*Z})}if(l.vectors=v(m(b._u,"xaxis"),m(b._v,"yaxis"),m(b._w,"zaxis"),c),!c)return{positions:[],cells:[]};var M=m(b._Xs,"xaxis"),L=m(b._Ys,"yaxis"),D=m(b._Zs,"zaxis");l.meshgrid=[M,L,D],l.gridFill=b._gridFill;var A=b._slen;if(A)l.startingPositions=v(m(b._startsX,"xaxis"),m(b._startsY,"yaxis"),m(b._startsZ,"zaxis"));else{for(var C=L[0],S=u(M),o=u(D),R=new Array(S.length*o.length),T=0,O=0;O<S.length;O++)for(var N=0;N<o.length;N++)R[T++]=[S[O],C,o[N]];l.startingPositions=R}l.colormap=_(b),l.tubeSize=b.sizeref,l.maxLength=b.maxdisplayed;var H=m(b._xbnds,"xaxis"),k=m(b._ybnds,"yaxis"),V=m(b._zbnds,"zaxis"),G=i(M),U=i(L),Y=i(D),ee=[[H[0]-G[0],k[0]-U[0],V[0]-Y[0]],[H[1]+G[1],k[1]+U[1],V[1]+Y[1]]],re=d(l,ee),ie=x(b);re.vertexIntensityBounds=[ie.min/b._normMax,ie.max/b._normMax];var se=b.lightposition;return re.lightPosition=[se.x,se.y,se.z],re.ambient=b.lighting.ambient,re.diffuse=b.lighting.diffuse,re.specular=b.lighting.specular,re.roughness=b.lighting.roughness,re.fresnel=b.lighting.fresnel,re.opacity=b.opacity,b._pad=re.tubeScale*b.sizeref*2,re}n.update=function(h){this.data=h;var b=f(this.scene,h);this.mesh.update(b)},n.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function g(h,b){var p=h.glplot.gl,E=f(h,b),c=P(p,E),l=new r(h,b.uid);return l.mesh=c,l.data=b,c._trace=l,h.glplot.add(c),l}z.exports=g},22459:function(z,B,e){var d=e(71828),P=e(1586),a=e(21850);z.exports=function(x,v,y,r){function n(p,E){return d.coerce(x,v,a,p,E)}var u=n("u"),i=n("v"),f=n("w"),g=n("x"),h=n("y"),b=n("z");if(!u||!u.length||!i||!i.length||!f||!f.length||!g||!g.length||!h||!h.length||!b||!b.length){v.visible=!1;return}n("starts.x"),n("starts.y"),n("starts.z"),n("maxdisplayed"),n("sizeref"),n("lighting.ambient"),n("lighting.diffuse"),n("lighting.specular"),n("lighting.roughness"),n("lighting.fresnel"),n("lightposition.x"),n("lightposition.y"),n("lightposition.z"),P(x,v,r,n,{prefix:"",cLetter:"c"}),n("text"),n("hovertext"),n("hovertemplate"),n("uhoverformat"),n("vhoverformat"),n("whoverformat"),n("xhoverformat"),n("yhoverformat"),n("zhoverformat"),v._length=null}},61510:function(z,B,e){z.exports={moduleType:"trace",name:"streamtube",basePlotModule:e(58547),categories:["gl3d","showLegend"],attributes:e(21850),supplyDefaults:e(22459),colorbar:{min:"cmin",max:"cmax"},calc:e(88489).calc,plot:e(90154),eventData:function(d,P){return d.tubex=d.x,d.tubey=d.y,d.tubez=d.z,d.tubeu=P.traceCoordinate[3],d.tubev=P.traceCoordinate[4],d.tubew=P.traceCoordinate[5],d.norm=P.traceCoordinate[6],d.divergence=P.traceCoordinate[7],delete d.x,delete d.y,delete d.z,d},meta:{}}},57564:function(z,B,e){var d=e(9012),P=e(5386).f,a=e(5386).s,_=e(50693),x=e(27670).Y,v=e(34e3),y=e(7055),r=e(1426).extendFlat;z.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:r({colors:{valType:"data_array",editType:"calc"},line:{color:r({},v.marker.line.color,{dflt:null}),width:r({},v.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},_("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:v.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:a({editType:"plot"},{keys:y.eventDataKeys.concat(["label","value"])}),hovertext:v.hovertext,hoverinfo:r({},d.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:P({},{keys:y.eventDataKeys}),textfont:v.textfont,insidetextorientation:v.insidetextorientation,insidetextfont:v.insidetextfont,outsidetextfont:r({},v.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:v.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:x({name:"sunburst",trace:!0,editType:"calc"})}},66888:function(z,B,e){var d=e(74875);B.name="sunburst",B.plot=function(P,a,_,x){d.plotBasePlot(B.name,P,a,_,x)},B.clean=function(P,a,_,x){d.cleanBasePlot(B.name,P,a,_,x)}},52147:function(z,B,e){var d=e(674),P=e(92770),a=e(71828),_=e(21081).makeColorScaleFuncFromTrace,x=e(32354).makePullColorFn,v=e(32354).generateExtendedColors,y=e(21081).calc,r=e(50606).ALMOST_EQUAL,n={},u={},i={};B.calc=function(g,h){var b=g._fullLayout,p=h.ids,E=a.isArrayOrTypedArray(p),c=h.labels,l=h.parents,m=h.values,M=a.isArrayOrTypedArray(m),L=[],D={},A={},C=function(Q,ue){D[Q]?D[Q].push(ue):D[Q]=[ue],A[ue]=1},S=function(Q){return Q||typeof Q=="number"},o=function(Q){return!M||P(m[Q])&&m[Q]>=0},R,T,O;E?(R=Math.min(p.length,l.length),T=function(Q){return S(p[Q])&&o(Q)},O=function(Q){return String(p[Q])}):(R=Math.min(c.length,l.length),T=function(Q){return S(c[Q])&&o(Q)},O=function(Q){return String(c[Q])}),M&&(R=Math.min(R,m.length));for(var N=0;N<R;N++)if(T(N)){var H=O(N),k=S(l[N])?String(l[N]):"",V={i:N,id:H,pid:k,label:S(c[N])?String(c[N]):""};M&&(V.v=+m[N]),L.push(V),C(k,H)}if(D[""]){if(D[""].length>1){for(var Y=a.randstr(),ee=0;ee<L.length;ee++)L[ee].pid===""&&(L[ee].pid=Y);L.unshift({hasMultipleRoots:!0,id:Y,pid:"",label:""})}}else{var G=[],U;for(U in D)A[U]||G.push(U);if(G.length===1)U=G[0],L.unshift({hasImpliedRoot:!0,id:U,pid:"",label:U});else return a.warn(["Multiple implied roots, cannot build",h.type,"hierarchy of",h.name+".","These roots include:",G.join(", ")].join(" "))}var re;try{re=d.stratify().id(function(Q){return Q.id}).parentId(function(Q){return Q.pid})(L)}catch(Q){return a.warn(["Failed to build",h.type,"hierarchy of",h.name+".","Error:",Q.message].join(" "))}var ie=d.hierarchy(re),se=!1;if(M)switch(h.branchvalues){case"remainder":ie.sum(function(Q){return Q.data.v});break;case"total":ie.each(function(Q){var ue=Q.data.data,fe=ue.v;if(Q.children){var te=Q.children.reduce(function(ne,ve){return ne+ve.data.data.v},0);if((ue.hasImpliedRoot||ue.hasMultipleRoots)&&(fe=te),fe<te*r)return se=!0,a.warn(["Total value for node",Q.data.data.id,"of",h.name,"is smaller than the sum of its children.",`
parent value =`,fe,`
children sum =`,te].join(" "))}Q.value=fe});break}else f(ie,h,{branches:h.count.indexOf("branches")!==-1,leaves:h.count.indexOf("leaves")!==-1});if(!se){h.sort&&ie.sort(function(Q,ue){return ue.value-Q.value});var ce,q,j=h.marker.colors||[],Z=!!j.length;return h._hasColorscale?(Z||(j=M?h.values:h._values),y(g,h,{vals:j,containerStr:"marker",cLetter:"c"}),q=_(h.marker)):ce=x(b["_"+h.type+"colormap"]),ie.each(function(Q){var ue=Q.data.data;ue.color=h._hasColorscale?q(j[ue.i]):ce(j[ue.i],ue.id)}),L[0].hierarchy=ie,L}},B._runCrossTraceCalc=function(g,h){var b=h._fullLayout,p=h.calcdata,E=b[g+"colorway"],c=b["_"+g+"colormap"];b["extend"+g+"colors"]&&(E=v(E,g==="icicle"?i:g==="treemap"?u:n));var l=0,m;function M(C){var S=C.data.data,o=S.id;S.color===!1&&(c[o]?S.color=c[o]:C.parent?C.parent.parent?S.color=C.parent.data.data.color:(c[o]=S.color=E[l%E.length],l++):S.color=m)}for(var L=0;L<p.length;L++){var D=p[L],A=D[0];A.trace.type===g&&A.hierarchy&&(m=A.trace.root.color,A.hierarchy.each(M))}},B.crossTraceCalc=function(g){return B._runCrossTraceCalc("sunburst",g)};function f(g,h,b){var p=0,E=g.children;if(E){for(var c=E.length,l=0;l<c;l++)p+=f(E[l],h,b);b.branches&&p++}else b.leaves&&p++;return g.value=g.data.data.value=p,h._values||(h._values=[]),h._values[g.data.data.i]=p,p}},7055:function(z){z.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}},17094:function(z,B,e){var d=e(71828),P=e(57564),a=e(27670).c,_=e(90769).handleText,x=e(21081),v=x.hasColorscale,y=x.handleDefaults;z.exports=function(n,u,i,f){function g(M,L){return d.coerce(n,u,P,M,L)}var h=g("labels"),b=g("parents");if(!h||!h.length||!b||!b.length){u.visible=!1;return}var p=g("values");p&&p.length?g("branchvalues"):g("count"),g("level"),g("maxdepth");var E=g("marker.line.width");E&&g("marker.line.color",f.paper_bgcolor),g("marker.colors");var c=u._hasColorscale=v(n,"marker","colors")||(n.marker||{}).coloraxis;c&&y(n,u,f,g,{prefix:"marker.",cLetter:"c"}),g("leaf.opacity",c?1:.7);var l=g("text");g("texttemplate"),u.texttemplate||g("textinfo",Array.isArray(l)?"text+label":"label"),g("hovertext"),g("hovertemplate");var m="auto";_(n,u,f,g,m,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),g("insidetextorientation"),g("sort"),g("rotation"),g("root.color"),a(u,f,g),u._length=null}},83523:function(z,B,e){var d=e(39898),P=e(73972),a=e(23469).appendArrayPointValue,_=e(30211),x=e(71828),v=e(11086),y=e(2791),r=e(53581),n=r.formatPieValue;z.exports=function(f,g,h,b,p){var E=b[0],c=E.trace,l=E.hierarchy,m=c.type==="sunburst",M=c.type==="treemap"||c.type==="icicle";"_hasHoverLabel"in c||(c._hasHoverLabel=!1),"_hasHoverEvent"in c||(c._hasHoverEvent=!1);var L=function(C){var S=h._fullLayout;if(!(h._dragging||S.hovermode===!1)){var o=h._fullData[c.index],R=C.data.data,T=R.i,O=y.isHierarchyRoot(C),N=y.getParent(l,C),H=y.getValue(C),k=function(ne){return x.castOption(o,T,ne)},V=k("hovertemplate"),G=_.castHoverinfo(o,S,T),U=S.separators,Y;if(V||G&&G!=="none"&&G!=="skip"){var ee,re;m&&(ee=E.cx+C.pxmid[0]*(1-C.rInscribed),re=E.cy+C.pxmid[1]*(1-C.rInscribed)),M&&(ee=C._hoverX,re=C._hoverY);var ie={},se=[],ce=[],q=function(ne){return se.indexOf(ne)!==-1};G&&(se=G==="all"?o._module.attributes.hoverinfo.flags:G.split("+")),ie.label=R.label,q("label")&&ie.label&&ce.push(ie.label),R.hasOwnProperty("v")&&(ie.value=R.v,ie.valueLabel=n(ie.value,U),q("value")&&ce.push(ie.valueLabel)),ie.currentPath=C.currentPath=y.getPath(C.data),q("current path")&&!O&&ce.push(ie.currentPath);var j,Z=[],Q=function(){Z.indexOf(j)===-1&&(ce.push(j),Z.push(j))};ie.percentParent=C.percentParent=H/y.getValue(N),ie.parent=C.parentString=y.getPtLabel(N),q("percent parent")&&(j=y.formatPercent(ie.percentParent,U)+" of "+ie.parent,Q()),ie.percentEntry=C.percentEntry=H/y.getValue(g),ie.entry=C.entry=y.getPtLabel(g),q("percent entry")&&!O&&!C.onPathbar&&(j=y.formatPercent(ie.percentEntry,U)+" of "+ie.entry,Q()),ie.percentRoot=C.percentRoot=H/y.getValue(l),ie.root=C.root=y.getPtLabel(l),q("percent root")&&!O&&(j=y.formatPercent(ie.percentRoot,U)+" of "+ie.root,Q()),ie.text=k("hovertext")||k("text"),q("text")&&(j=ie.text,x.isValidTextValue(j)&&ce.push(j)),Y=[u(C,o,p.eventDataKeys)];var ue={trace:o,y:re,_x0:C._x0,_x1:C._x1,_y0:C._y0,_y1:C._y1,text:ce.join("<br>"),name:V||q("name")?o.name:void 0,color:k("hoverlabel.bgcolor")||R.color,borderColor:k("hoverlabel.bordercolor"),fontFamily:k("hoverlabel.font.family"),fontSize:k("hoverlabel.font.size"),fontColor:k("hoverlabel.font.color"),nameLength:k("hoverlabel.namelength"),textAlign:k("hoverlabel.align"),hovertemplate:V,hovertemplateLabels:ie,eventData:Y};m&&(ue.x0=ee-C.rInscribed*C.rpx1,ue.x1=ee+C.rInscribed*C.rpx1,ue.idealAlign=C.pxmid[0]<0?"left":"right"),M&&(ue.x=ee,ue.idealAlign=ee<0?"left":"right");var fe=[];_.loneHover(ue,{container:S._hoverlayer.node(),outerContainer:S._paper.node(),gd:h,inOut_bbox:fe}),Y[0].bbox=fe[0],c._hasHoverLabel=!0}if(M){var te=f.select("path.surface");p.styleOne(te,C,o,{hovered:!0})}c._hasHoverEvent=!0,h.emit("plotly_hover",{points:Y||[u(C,o,p.eventDataKeys)],event:d.event})}},D=function(C){var S=h._fullLayout,o=h._fullData[c.index],R=d.select(this).datum();if(c._hasHoverEvent&&(C.originalEvent=d.event,h.emit("plotly_unhover",{points:[u(R,o,p.eventDataKeys)],event:d.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(_.loneUnhover(S._hoverlayer.node()),c._hasHoverLabel=!1),M){var T=f.select("path.surface");p.styleOne(T,R,o,{hovered:!1})}},A=function(C){var S=h._fullLayout,o=h._fullData[c.index],R=m&&(y.isHierarchyRoot(C)||y.isLeaf(C)),T=y.getPtId(C),O=y.isEntry(C)?y.findEntryWithChild(l,T):y.findEntryWithLevel(l,T),N=y.getPtId(O),H={points:[u(C,o,p.eventDataKeys)],event:d.event};R||(H.nextLevel=N);var k=v.triggerHandler(h,"plotly_"+c.type+"click",H);if(k!==!1&&S.hovermode&&(h._hoverdata=[u(C,o,p.eventDataKeys)],_.click(h,d.event)),!R&&k!==!1&&!h._dragging&&!h._transitioning){P.call("_storeDirectGUIEdit",o,S._tracePreGUI[o.uid],{level:o.level});var V={data:[{level:N}],traces:[c.index]},G={frame:{redraw:!1,duration:p.transitionTime},transition:{duration:p.transitionTime,easing:p.transitionEasing},mode:"immediate",fromcurrent:!0};_.loneUnhover(S._hoverlayer.node()),P.call("animate",h,V,G)}};f.on("mouseover",L),f.on("mouseout",D),f.on("click",A)};function u(i,f,g){for(var h=i.data.data,b={curveNumber:f.index,pointNumber:h.i,data:f._input,fullData:f},p=0;p<g.length;p++){var E=g[p];E in i&&(b[E]=i[E])}return"parentString"in i&&!y.isHierarchyRoot(i)&&(b.parent=i.parentString),a(b,f,h.i),b}},2791:function(z,B,e){var d=e(71828),P=e(7901),a=e(6964),_=e(53581);B.findEntryWithLevel=function(r,n){var u;return n&&r.eachAfter(function(i){if(B.getPtId(i)===n)return u=i.copy()}),u||r},B.findEntryWithChild=function(r,n){var u;return r.eachAfter(function(i){for(var f=i.children||[],g=0;g<f.length;g++){var h=f[g];if(B.getPtId(h)===n)return u=i.copy()}}),u||r},B.isEntry=function(r){return!r.parent},B.isLeaf=function(r){return!r.children},B.getPtId=function(r){return r.data.data.id},B.getPtLabel=function(r){return r.data.data.label},B.getValue=function(r){return r.value},B.isHierarchyRoot=function(r){return y(r)===""},B.setSliceCursor=function(r,n,u){var i=u.isTransitioning;if(!i){var f=r.datum();i=u.hideOnRoot&&B.isHierarchyRoot(f)||u.hideOnLeaves&&B.isLeaf(f)}a(r,i?null:"pointer")};function x(r,n,u){return{color:B.getOutsideTextFontKey("color",r,n,u),family:B.getOutsideTextFontKey("family",r,n,u),size:B.getOutsideTextFontKey("size",r,n,u)}}function v(r,n,u,i){var f=(i||{}).onPathbar,g=n.data.data,h=g.i,b=d.castOption(r,h,(f?"pathbar.textfont":"insidetextfont")+".color");return!b&&r._input.textfont&&(b=d.castOption(r._input,h,"textfont.color")),{color:b||P.contrast(g.color),family:B.getInsideTextFontKey("family",r,n,u,i),size:B.getInsideTextFontKey("size",r,n,u,i)}}B.getInsideTextFontKey=function(r,n,u,i,f){var g=(f||{}).onPathbar,h=g?"pathbar.textfont":"insidetextfont",b=u.data.data.i;return d.castOption(n,b,h+"."+r)||d.castOption(n,b,"textfont."+r)||i.size},B.getOutsideTextFontKey=function(r,n,u,i){var f=u.data.data.i;return d.castOption(n,f,"outsidetextfont."+r)||d.castOption(n,f,"textfont."+r)||i.size},B.isOutsideText=function(r,n){return!r._hasColorscale&&B.isHierarchyRoot(n)},B.determineTextFont=function(r,n,u,i){return B.isOutsideText(r,n)?x(r,n,u):v(r,n,u,i)},B.hasTransition=function(r){return!!(r&&r.duration>0)},B.getMaxDepth=function(r){return r.maxdepth>=0?r.maxdepth:1/0},B.isHeader=function(r,n){return!(B.isLeaf(r)||r.depth===n._maxDepth-1)};function y(r){return r.data.data.pid}B.getParent=function(r,n){return B.findEntryWithLevel(r,y(n))},B.listPath=function(r,n){var u=r.parent;if(!u)return[];var i=n?[u.data[n]]:[u];return B.listPath(u,n).concat(i)},B.getPath=function(r){return B.listPath(r,"label").join("/")+"/"},B.formatValue=_.formatPieValue,B.formatPercent=function(r,n){var u=d.formatPercent(r,0);return u==="0%"&&(u=_.formatPiePercent(r,n)),u}},87619:function(z,B,e){z.exports={moduleType:"trace",name:"sunburst",basePlotModule:e(66888),categories:[],animatable:!0,attributes:e(57564),layoutAttributes:e(2654),supplyDefaults:e(17094),supplyLayoutDefaults:e(57034),calc:e(52147).calc,crossTraceCalc:e(52147).crossTraceCalc,plot:e(24714).plot,style:e(29969).style,colorbar:e(4898),meta:{}}},2654:function(z){z.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},57034:function(z,B,e){var d=e(71828),P=e(2654);z.exports=function(_,x){function v(y,r){return d.coerce(_,x,P,y,r)}v("sunburstcolorway",x.colorway),v("extendsunburstcolors")}},24714:function(z,B,e){var d=e(39898),P=e(674),a=e(81684).sX,_=e(91424),x=e(71828),v=e(63893),y=e(72597),r=y.recordMinTextSize,n=y.clearMinTextSize,u=e(14575),i=e(53581).getRotationAngle,f=u.computeTransform,g=u.transformInsideText,h=e(29969).styleOne,b=e(16688).resizeText,p=e(83523),E=e(7055),c=e(2791);B.plot=function(A,C,S,o){var R=A._fullLayout,T=R._sunburstlayer,O,N,H=!S,k=!R.uniformtext.mode&&c.hasTransition(S);if(n("sunburst",R),O=T.selectAll("g.trace.sunburst").data(C,function(G){return G[0].trace.uid}),O.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),O.order(),k){o&&(N=o());var V=d.transition().duration(S.duration).ease(S.easing).each("end",function(){N&&N()}).each("interrupt",function(){N&&N()});V.each(function(){T.selectAll("g.trace").each(function(G){l(A,G,this,S)})})}else O.each(function(G){l(A,G,this,S)}),R.uniformtext.mode&&b(A,R._sunburstlayer.selectAll(".trace"),"sunburst");H&&O.exit().remove()};function l(A,C,S,o){var R=A._context.staticPlot,T=A._fullLayout,O=!T.uniformtext.mode&&c.hasTransition(o),N=d.select(S),H=N.selectAll("g.slice"),k=C[0],V=k.trace,G=k.hierarchy,U=c.findEntryWithLevel(G,V.level),Y=c.getMaxDepth(V),ee=T._size,re=V.domain,ie=ee.w*(re.x[1]-re.x[0]),se=ee.h*(re.y[1]-re.y[0]),ce=.5*Math.min(ie,se),q=k.cx=ee.l+ee.w*(re.x[1]+re.x[0])/2,j=k.cy=ee.t+ee.h*(1-re.y[0])-se/2;if(!U)return H.remove();var Z=null,Q={};O&&H.each(function(Xe){Q[c.getPtId(Xe)]={rpx0:Xe.rpx0,rpx1:Xe.rpx1,x0:Xe.x0,x1:Xe.x1,transform:Xe.transform},!Z&&c.isEntry(Xe)&&(Z=Xe)});var ue=m(U).descendants(),fe=U.height+1,te=0,ne=Y;k.hasMultipleRoots&&c.isHierarchyRoot(U)&&(ue=ue.slice(1),fe-=1,te=1,ne+=1),ue=ue.filter(function(Xe){return Xe.y1<=ne});var ve=i(V.rotation);ve&&ue.forEach(function(Xe){Xe.x0+=ve,Xe.x1+=ve});var le=Math.min(fe,Y),xe=function(Xe){return(Xe-te)/le*ce},Se=function(Xe,ht){return[Xe*Math.cos(ht),-Xe*Math.sin(ht)]},Re=function(Xe){return x.pathAnnulus(Xe.rpx0,Xe.rpx1,Xe.x0,Xe.x1,q,j)},Ee=function(Xe){return q+L(Xe)[0]*(Xe.transform.rCenter||0)+(Xe.transform.x||0)},Oe=function(Xe){return j+L(Xe)[1]*(Xe.transform.rCenter||0)+(Xe.transform.y||0)};H=H.data(ue,c.getPtId),H.enter().append("g").classed("slice",!0),O?H.exit().transition().each(function(){var Xe=d.select(this),ht=Xe.select("path.surface");ht.transition().attrTween("d",function(it){var nt=De(it);return function(pt){return Re(nt(pt))}});var st=Xe.select("g.slicetext");st.attr("opacity",0)}).remove():H.exit().remove(),H.order();var Be=null;if(O&&Z){var Le=c.getPtId(Z);H.each(function(Xe){Be===null&&c.getPtId(Xe)===Le&&(Be=Xe.x1)})}var Te=H;O&&(Te=Te.transition().each("end",function(){var Xe=d.select(this);c.setSliceCursor(Xe,A,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),Te.each(function(Xe){var ht=d.select(this),st=x.ensureSingle(ht,"path","surface",function(Dt){Dt.style("pointer-events",R?"none":"all")});Xe.rpx0=xe(Xe.y0),Xe.rpx1=xe(Xe.y1),Xe.xmid=(Xe.x0+Xe.x1)/2,Xe.pxmid=Se(Xe.rpx1,Xe.xmid),Xe.midangle=-(Xe.xmid-Math.PI/2),Xe.startangle=-(Xe.x0-Math.PI/2),Xe.stopangle=-(Xe.x1-Math.PI/2),Xe.halfangle=.5*Math.min(x.angleDelta(Xe.x0,Xe.x1)||Math.PI,Math.PI),Xe.ring=1-Xe.rpx0/Xe.rpx1,Xe.rInscribed=M(Xe),O?st.transition().attrTween("d",function(Dt){var et=Ve(Dt);return function(Ue){return Re(et(Ue))}}):st.attr("d",Re),ht.call(p,U,A,C,{eventDataKeys:E.eventDataKeys,transitionTime:E.CLICK_TRANSITION_TIME,transitionEasing:E.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,A,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:A._transitioning}),st.call(h,Xe,V);var it=x.ensureSingle(ht,"g","slicetext"),nt=x.ensureSingle(it,"text","",function(Dt){Dt.attr("data-notex",1)}),pt=x.ensureUniformFontSize(A,c.determineTextFont(V,Xe,T.font));nt.text(B.formatSliceLabel(Xe,U,V,C,T)).classed("slicetext",!0).attr("text-anchor","middle").call(_.font,pt).call(v.convertToTspans,A);var Tt=_.bBox(nt.node());Xe.transform=g(Tt,Xe,k),Xe.transform.targetX=Ee(Xe),Xe.transform.targetY=Oe(Xe);var Et=function(Dt,et){var Ue=Dt.transform;return f(Ue,et),Ue.fontSize=pt.size,r(V.type,Ue,T),x.getTextTransform(Ue)};O?nt.transition().attrTween("transform",function(Dt){var et=Ye(Dt);return function(Ue){return Et(et(Ue),Tt)}}):nt.attr("transform",Et(Xe,Tt))});function De(Xe){var ht=c.getPtId(Xe),st=Q[ht],it=Q[c.getPtId(U)],nt;if(it){var pt=(Xe.x1>it.x1?2*Math.PI:0)+ve;nt=Xe.rpx1<it.rpx1?{x0:Xe.x0,x1:Xe.x1,rpx0:0,rpx1:0}:{x0:pt,x1:pt,rpx0:Xe.rpx0,rpx1:Xe.rpx1}}else{var Tt,Et=c.getPtId(Xe.parent);H.each(function(rt){if(c.getPtId(rt)===Et)return Tt=rt});var Dt=Tt.children,et;Dt.forEach(function(rt,lt){if(c.getPtId(rt)===ht)return et=lt});var Ue=Dt.length,ze=a(Tt.x0,Tt.x1);nt={rpx0:ce,rpx1:ce,x0:ze(et/Ue),x1:ze((et+1)/Ue)}}return a(st,nt)}function Ve(Xe){var ht=Q[c.getPtId(Xe)],st,it={x0:Xe.x0,x1:Xe.x1,rpx0:Xe.rpx0,rpx1:Xe.rpx1};if(ht)st=ht;else if(Z)if(Xe.parent)if(Be){var nt=(Xe.x1>Be?2*Math.PI:0)+ve;st={x0:nt,x1:nt}}else st={rpx0:ce,rpx1:ce},x.extendFlat(st,Ne(Xe));else st={rpx0:0,rpx1:0};else st={x0:ve,x1:ve};return a(st,it)}function Ye(Xe){var ht=Q[c.getPtId(Xe)],st,it=Xe.transform;if(ht)st=ht;else if(st={rpx1:Xe.rpx1,transform:{textPosAngle:it.textPosAngle,scale:0,rotate:it.rotate,rCenter:it.rCenter,x:it.x,y:it.y}},Z)if(Xe.parent)if(Be){var nt=Xe.x1>Be?2*Math.PI:0;st.x0=st.x1=nt}else x.extendFlat(st,Ne(Xe));else st.x0=st.x1=ve;else st.x0=st.x1=ve;var pt=a(st.transform.textPosAngle,Xe.transform.textPosAngle),Tt=a(st.rpx1,Xe.rpx1),Et=a(st.x0,Xe.x0),Dt=a(st.x1,Xe.x1),et=a(st.transform.scale,it.scale),Ue=a(st.transform.rotate,it.rotate),ze=it.rCenter===0?3:st.transform.rCenter===0?1/3:1,rt=a(st.transform.rCenter,it.rCenter),lt=function(Qe){return rt(Math.pow(Qe,ze))};return function(Qe){var Fe=Tt(Qe),Ce=Et(Qe),pe=Dt(Qe),we=lt(Qe),Ae=Se(Fe,(Ce+pe)/2),Pe=pt(Qe),Ge={pxmid:Ae,rpx1:Fe,transform:{textPosAngle:Pe,rCenter:we,x:it.x,y:it.y}};return r(V.type,it,T),{transform:{targetX:Ee(Ge),targetY:Oe(Ge),scale:et(Qe),rotate:Ue(Qe),rCenter:we}}}}function Ne(Xe){var ht=Xe.parent,st=Q[c.getPtId(ht)],it={};if(st){var nt=ht.children,pt=nt.indexOf(Xe),Tt=nt.length,Et=a(st.x0,st.x1);it.x0=Et(pt/Tt),it.x1=Et(pt/Tt)}else it.x0=it.x1=0;return it}}function m(A){return P.partition().size([2*Math.PI,A.height+1])(A)}B.formatSliceLabel=function(A,C,S,o,R){var T=S.texttemplate,O=S.textinfo;if(!T&&(!O||O==="none"))return"";var N=R.separators,H=o[0],k=A.data.data,V=H.hierarchy,G=c.isHierarchyRoot(A),U=c.getParent(V,A),Y=c.getValue(A);if(!T){var ee=O.split("+"),re=function(te){return ee.indexOf(te)!==-1},ie=[],se;if(re("label")&&k.label&&ie.push(k.label),k.hasOwnProperty("v")&&re("value")&&ie.push(c.formatValue(k.v,N)),!G){re("current path")&&ie.push(c.getPath(A.data));var ce=0;re("percent parent")&&ce++,re("percent entry")&&ce++,re("percent root")&&ce++;var q=ce>1;if(ce){var j,Z=function(te){se=c.formatPercent(j,N),q&&(se+=" of "+te),ie.push(se)};re("percent parent")&&!G&&(j=Y/c.getValue(U),Z("parent")),re("percent entry")&&(j=Y/c.getValue(C),Z("entry")),re("percent root")&&(j=Y/c.getValue(V),Z("root"))}}return re("text")&&(se=x.castOption(S,k.i,"text"),x.isValidTextValue(se)&&ie.push(se)),ie.join("<br>")}var Q=x.castOption(S,k.i,"texttemplate");if(!Q)return"";var ue={};k.label&&(ue.label=k.label),k.hasOwnProperty("v")&&(ue.value=k.v,ue.valueLabel=c.formatValue(k.v,N)),ue.currentPath=c.getPath(A.data),G||(ue.percentParent=Y/c.getValue(U),ue.percentParentLabel=c.formatPercent(ue.percentParent,N),ue.parent=c.getPtLabel(U)),ue.percentEntry=Y/c.getValue(C),ue.percentEntryLabel=c.formatPercent(ue.percentEntry,N),ue.entry=c.getPtLabel(C),ue.percentRoot=Y/c.getValue(V),ue.percentRootLabel=c.formatPercent(ue.percentRoot,N),ue.root=c.getPtLabel(V),k.hasOwnProperty("color")&&(ue.color=k.color);var fe=x.castOption(S,k.i,"text");return(x.isValidTextValue(fe)||fe==="")&&(ue.text=fe),ue.customdata=x.castOption(S,k.i,"customdata"),x.texttemplateString(Q,ue,R._d3locale,ue,S._meta||{})};function M(A){return A.rpx0===0&&x.isFullCircle([A.x0,A.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(A.halfangle)),A.ring/2))}function L(A){return D(A.rpx1,A.transform.textPosAngle)}function D(A,C){return[A*Math.sin(C),-A*Math.cos(C)]}},29969:function(z,B,e){var d=e(39898),P=e(7901),a=e(71828),_=e(72597).resizeText;function x(y){var r=y._fullLayout._sunburstlayer.selectAll(".trace");_(y,r,"sunburst"),r.each(function(n){var u=d.select(this),i=n[0],f=i.trace;u.style("opacity",f.opacity),u.selectAll("path.surface").each(function(g){d.select(this).call(v,g,f)})})}function v(y,r,n){var u=r.data.data,i=!r.children,f=u.i,g=a.castOption(n,f,"marker.line.color")||P.defaultLine,h=a.castOption(n,f,"marker.line.width")||0;y.style("stroke-width",h).call(P.fill,u.color).call(P.stroke,g).style("opacity",i?n.leaf.opacity:null)}z.exports={style:x,styleOne:v}},54532:function(z,B,e){var d=e(7901),P=e(50693),a=e(12663).axisHoverFormat,_=e(5386).f,x=e(9012),v=e(1426).extendFlat,y=e(30962).overrideAll;function r(i){return{valType:"boolean",dflt:!1}}function n(i){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:r(),y:r(),z:r()},color:{valType:"color",dflt:d.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:d.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var u=z.exports=y(v({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:_(),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},P("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:n(),y:n(),z:n()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},_deprecated:{zauto:v({},P.zauto,{}),zmin:v({},P.zmin,{}),zmax:v({},P.zmax,{})},hoverinfo:v({},x.hoverinfo),showlegend:v({},x.showlegend,{dflt:!1})}),"calc","nested");u.x.editType=u.y.editType=u.z.editType="calc+clearAxisTypes",u.transforms=void 0},18396:function(z,B,e){var d=e(78803);z.exports=function(a,_){_.surfacecolor?d(a,_,{vals:_.surfacecolor,containerStr:"",cLetter:"c"}):d(a,_,{vals:_.z,containerStr:"",cLetter:"c"})}},43768:function(z,B,e){var d=e(9330).gl_surface3d,P=e(9330).ndarray,a=e(9330).ndarray_linear_interpolate.d2,_=e(824),x=e(43907),v=e(71828).isArrayOrTypedArray,y=e(81697).parseColorScale,r=e(78614),n=e(21081).extractOpts;function u(o,R,T){this.scene=o,this.uid=T,this.surface=R,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var i=u.prototype;i.getXat=function(o,R,T,O){var N=v(this.data.x)?v(this.data.x[0])?this.data.x[R][o]:this.data.x[o]:o;return T===void 0?N:O.d2l(N,0,T)},i.getYat=function(o,R,T,O){var N=v(this.data.y)?v(this.data.y[0])?this.data.y[R][o]:this.data.y[R]:R;return T===void 0?N:O.d2l(N,0,T)},i.getZat=function(o,R,T,O){var N=this.data.z[R][o];return N===null&&this.data.connectgaps&&this.data._interpolatedZ&&(N=this.data._interpolatedZ[R][o]),T===void 0?N:O.d2l(N,0,T)},i.handlePick=function(o){if(o.object===this.surface){var R=(o.data.index[0]-1)/this.dataScaleX-1,T=(o.data.index[1]-1)/this.dataScaleY-1,O=Math.max(Math.min(Math.round(R),this.data.z[0].length-1),0),N=Math.max(Math.min(Math.round(T),this.data._ylength-1),0);o.index=[O,N],o.traceCoordinate=[this.getXat(O,N),this.getYat(O,N),this.getZat(O,N)],o.dataCoordinate=[this.getXat(O,N,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(O,N,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(O,N,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var H=0;H<3;H++){var k=o.dataCoordinate[H];k!=null&&(o.dataCoordinate[H]*=this.scene.dataScale[H])}var V=this.data.hovertext||this.data.text;return Array.isArray(V)&&V[N]&&V[N][O]!==void 0?o.textLabel=V[N][O]:V?o.textLabel=V:o.textLabel="",o.data.dataCoordinate=o.dataCoordinate.slice(),this.surface.highlight(o.data),this.scene.glplot.spikes.position=o.dataCoordinate,!0}};function f(o){var R=o[0].rgb,T=o[o.length-1].rgb;return R[0]===T[0]&&R[1]===T[1]&&R[2]===T[2]&&R[3]===T[3]}var g=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function h(o,R){if(o<R)return 0;for(var T=0;Math.floor(o%R)===0;)o/=R,T++;return T}function b(o){for(var R=[],T=0;T<g.length;T++){var O=g[T];R.push(h(o,O))}return R}function p(o){for(var R=b(o),T=o,O=0;O<g.length;O++)if(R[O]>0){T=g[O];break}return T}function E(o,R){if(!(o<1||R<1)){for(var T=b(o),O=b(R),N=1,H=0;H<g.length;H++)N*=Math.pow(g[H],Math.max(T[H],O[H]));return N}}function c(o){if(o.length!==0){for(var R=1,T=0;T<o.length;T++)R=E(R,o[T]);return R}}i.calcXnums=function(o){var R,T=[];for(R=1;R<o;R++){var O=this.getXat(R-1,0),N=this.getXat(R,0);N!==O&&O!==void 0&&O!==null&&N!==void 0&&N!==null?T[R-1]=Math.abs(N-O):T[R-1]=0}var H=0;for(R=1;R<o;R++)H+=T[R-1];for(R=1;R<o;R++)T[R-1]===0?T[R-1]=1:T[R-1]=Math.round(H/T[R-1]);return T},i.calcYnums=function(o){var R,T=[];for(R=1;R<o;R++){var O=this.getYat(0,R-1),N=this.getYat(0,R);N!==O&&O!==void 0&&O!==null&&N!==void 0&&N!==null?T[R-1]=Math.abs(N-O):T[R-1]=0}var H=0;for(R=1;R<o;R++)H+=T[R-1];for(R=1;R<o;R++)T[R-1]===0?T[R-1]=1:T[R-1]=Math.round(H/T[R-1]);return T};var l=[1,2,4,6,12,24,36,48,60,120,180,240,360,720,840,1260],m=l[9],M=l[13];i.estimateScale=function(o,R){for(var T=R===0?this.calcXnums(o):this.calcYnums(o),O=1+c(T);O<m;)O*=2;for(;O>M;)O--,O/=p(O),O++,O<m&&(O=M);var N=Math.round(O/o);return N>1?N:1};function L(o,R,T){var O=T[8]+T[2]*R[0]+T[5]*R[1];return o[0]=(T[6]+T[0]*R[0]+T[3]*R[1])/O,o[1]=(T[7]+T[1]*R[0]+T[4]*R[1])/O,o}function D(o,R,T){return A(o,R,L,T),o}function A(o,R,T,O){for(var N=[0,0],H=o.shape[0],k=o.shape[1],V=0;V<H;V++)for(var G=0;G<k;G++)T(N,[V,G],O),o.set(V,G,a(R,N[0],N[1]));return o}i.refineCoords=function(o){for(var R=this.dataScaleX,T=this.dataScaleY,O=o[0].shape[0],N=o[0].shape[1],H=Math.floor(o[0].shape[0]*R+1)|0,k=Math.floor(o[0].shape[1]*T+1)|0,V=1+O+1,G=1+N+1,U=P(new Float32Array(V*G),[V,G]),Y=[1/R,0,0,0,1/T,0,0,0,1],ee=0;ee<o.length;++ee){this.surface.padField(U,o[ee]);var re=P(new Float32Array(H*k),[H,k]);D(re,U,Y),o[ee]=re}};function C(o,R){for(var T=!1,O=0;O<o.length;O++)if(R===o[O]){T=!0;break}T===!1&&o.push(R)}i.setContourLevels=function(){var o=[[],[],[]],R=[!1,!1,!1],T=!1,O,N,H;for(O=0;O<3;++O)if(this.showContour[O]&&(T=!0,this.contourSize[O]>0&&this.contourStart[O]!==null&&this.contourEnd[O]!==null&&this.contourEnd[O]>this.contourStart[O]))for(R[O]=!0,N=this.contourStart[O];N<this.contourEnd[O];N+=this.contourSize[O])H=N*this.scene.dataScale[O],C(o[O],H);if(T){var k=[[],[],[]];for(O=0;O<3;++O)this.showContour[O]&&(k[O]=R[O]?o[O]:this.scene.contourLevels[O]);this.surface.update({levels:k})}},i.update=function(o){var R=this.scene,T=R.fullSceneLayout,O=this.surface,N=y(o),H=R.dataScale,k=o.z[0].length,V=o._ylength,G=R.contourLevels;this.data=o;var U,Y,ee,re,ie=[];for(U=0;U<3;U++)for(ie[U]=[],Y=0;Y<k;Y++)ie[U][Y]=[];for(Y=0;Y<k;Y++)for(ee=0;ee<V;ee++)ie[0][Y][ee]=this.getXat(Y,ee,o.xcalendar,T.xaxis),ie[1][Y][ee]=this.getYat(Y,ee,o.ycalendar,T.yaxis),ie[2][Y][ee]=this.getZat(Y,ee,o.zcalendar,T.zaxis);if(o.connectgaps)for(o._emptypoints=x(ie[2]),_(ie[2],o._emptypoints),o._interpolatedZ=[],Y=0;Y<k;Y++)for(o._interpolatedZ[Y]=[],ee=0;ee<V;ee++)o._interpolatedZ[Y][ee]=ie[2][Y][ee];for(U=0;U<3;U++)for(Y=0;Y<k;Y++)for(ee=0;ee<V;ee++)re=ie[U][Y][ee],re==null?ie[U][Y][ee]=NaN:re=ie[U][Y][ee]*=H[U];for(U=0;U<3;U++)for(Y=0;Y<k;Y++)for(ee=0;ee<V;ee++)re=ie[U][Y][ee],re!=null&&(this.minValues[U]>re&&(this.minValues[U]=re),this.maxValues[U]<re&&(this.maxValues[U]=re));for(U=0;U<3;U++)this.objectOffset[U]=.5*(this.minValues[U]+this.maxValues[U]);for(U=0;U<3;U++)for(Y=0;Y<k;Y++)for(ee=0;ee<V;ee++)re=ie[U][Y][ee],re!=null&&(ie[U][Y][ee]-=this.objectOffset[U]);var se=[P(new Float32Array(k*V),[k,V]),P(new Float32Array(k*V),[k,V]),P(new Float32Array(k*V),[k,V])];for(U=0;U<3;U++)for(Y=0;Y<k;Y++)for(ee=0;ee<V;ee++)se[U].set(Y,ee,ie[U][Y][ee]);ie=[];var ce={colormap:N,levels:[[],[],[]],showContour:[!0,!0,!0],showSurface:!o.hidesurface,contourProject:[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],contourWidth:[1,1,1],contourColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],contourTint:[1,1,1],dynamicColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],dynamicWidth:[1,1,1],dynamicTint:[1,1,1],opacityscale:o.opacityscale,opacity:o.opacity},q=n(o);if(ce.intensityBounds=[q.min,q.max],o.surfacecolor){var j=P(new Float32Array(k*V),[k,V]);for(Y=0;Y<k;Y++)for(ee=0;ee<V;ee++)j.set(Y,ee,o.surfacecolor[ee][Y]);se.push(j)}else ce.intensityBounds[0]*=H[2],ce.intensityBounds[1]*=H[2];(M<se[0].shape[0]||M<se[0].shape[1])&&(this.refineData=!1),this.refineData===!0&&(this.dataScaleX=this.estimateScale(se[0].shape[0],0),this.dataScaleY=this.estimateScale(se[0].shape[1],1),(this.dataScaleX!==1||this.dataScaleY!==1)&&this.refineCoords(se)),o.surfacecolor&&(ce.intensity=se.pop());var Z=[!0,!0,!0],Q=["x","y","z"];for(U=0;U<3;++U){var ue=o.contours[Q[U]];Z[U]=ue.highlight,ce.showContour[U]=ue.show||ue.highlight,ce.showContour[U]&&(ce.contourProject[U]=[ue.project.x,ue.project.y,ue.project.z],ue.show?(this.showContour[U]=!0,ce.levels[U]=G[U],O.highlightColor[U]=ce.contourColor[U]=r(ue.color),ue.usecolormap?O.highlightTint[U]=ce.contourTint[U]=0:O.highlightTint[U]=ce.contourTint[U]=1,ce.contourWidth[U]=ue.width,this.contourStart[U]=ue.start,this.contourEnd[U]=ue.end,this.contourSize[U]=ue.size):(this.showContour[U]=!1,this.contourStart[U]=null,this.contourEnd[U]=null,this.contourSize[U]=0),ue.highlight&&(ce.dynamicColor[U]=r(ue.highlightcolor),ce.dynamicWidth[U]=ue.highlightwidth))}f(N)&&(ce.vertexColor=!0),ce.objectOffset=this.objectOffset,ce.coords=se,O.update(ce),O.visible=o.visible,O.enableDynamic=Z,O.enableHighlight=Z,O.snapToData=!0,"lighting"in o&&(O.ambientLight=o.lighting.ambient,O.diffuseLight=o.lighting.diffuse,O.specularLight=o.lighting.specular,O.roughness=o.lighting.roughness,O.fresnel=o.lighting.fresnel),"lightposition"in o&&(O.lightPosition=[o.lightposition.x,o.lightposition.y,o.lightposition.z])},i.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()};function S(o,R){var T=o.glplot.gl,O=d({gl:T}),N=new u(o,O,R.uid);return O._trace=N,N.update(R),o.glplot.add(O),N}z.exports=S},91831:function(z,B,e){var d=e(73972),P=e(71828),a=e(1586),_=e(54532),x=.1;function v(i,f){for(var g=[],h=32,b=0;b<h;b++){var p=b/(h-1),E=f+(1-f)*(1-Math.pow(Math.sin(i*p*Math.PI),2));g.push([p,Math.max(0,Math.min(1,E))])}return g}function y(i){var f=0;if(!Array.isArray(i)||i.length<2||!i[0]||!i[i.length-1]||+i[0][0]!=0||+i[i.length-1][0]!=1)return!1;for(var g=0;g<i.length;g++){var h=i[g];if(h.length!==2||+h[0]<f)return!1;f=+h[0]}return!0}function r(i,f,g,h){var b,p;function E(o,R){return P.coerce(i,f,_,o,R)}var c=E("x"),l=E("y"),m=E("z");if(!m||!m.length||c&&c.length<1||l&&l.length<1){f.visible=!1;return}f._xlength=Array.isArray(c)&&P.isArrayOrTypedArray(c[0])?m.length:m[0].length,f._ylength=m.length;var M=d.getComponentMethod("calendars","handleTraceDefaults");M(i,f,["x","y","z"],h),E("text"),E("hovertext"),E("hovertemplate"),E("xhoverformat"),E("yhoverformat"),E("zhoverformat"),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lightposition.x","lightposition.y","lightposition.z","hidesurface","connectgaps","opacity"].forEach(function(o){E(o)});var L=E("surfacecolor"),D=["x","y","z"];for(b=0;b<3;++b){var A="contours."+D[b],C=E(A+".show"),S=E(A+".highlight");if(C||S)for(p=0;p<3;++p)E(A+".project."+D[p]);C&&(E(A+".color"),E(A+".width"),E(A+".usecolormap")),S&&(E(A+".highlightcolor"),E(A+".highlightwidth")),E(A+".start"),E(A+".end"),E(A+".size")}L||(u(i,"zmin","cmin"),u(i,"zmax","cmax"),u(i,"zauto","cauto")),a(i,f,h,E,{prefix:"",cLetter:"c"}),n(i,f,h,E),f._length=null}function n(i,f,g,h){var b=h("opacityscale");b==="max"?f.opacityscale=[[0,x],[1,1]]:b==="min"?f.opacityscale=[[0,1],[1,x]]:b==="extremes"?f.opacityscale=v(1,x):y(b)||(f.opacityscale=void 0)}function u(i,f,g){f in i&&!(g in i)&&(i[g]=i[f])}z.exports={supplyDefaults:r,opacityscaleDefaults:n}},93601:function(z,B,e){z.exports={attributes:e(54532),supplyDefaults:e(91831).supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:e(18396),plot:e(43768),moduleType:"trace",name:"surface",basePlotModule:e(58547),categories:["gl3d","2dMap","showLegend"],meta:{}}},44464:function(z,B,e){var d=e(50215),P=e(1426).extendFlat,a=e(30962).overrideAll,_=e(41940),x=e(27670).Y,v=e(12663).descriptionOnlyNumbers,y=z.exports=a({domain:x({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:v("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:P({},d.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"}},font:P({},_({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:v("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:P({},d.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"}},font:P({},_({arrayOk:!0}))}},"calc","from-root");y.transforms=void 0},99469:function(z,B,e){var d=e(27659).a0,P=e(36736),a="table";B.name=a,B.plot=function(_){var x=d(_.calcdata,a)[0];x.length&&P(_,x)},B.clean=function(_,x,v,y){var r=y._has&&y._has(a),n=x._has&&x._has(a);r&&!n&&y._paperdiv.selectAll(".table").remove()}},76333:function(z,B,e){var d=e(28984).wrap;z.exports=function(){return d({})}},49850:function(z){z.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"<br>",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"}}},51018:function(z,B,e){var d=e(49850),P=e(1426).extendFlat,a=e(92770);z.exports=function(g,h){var b=v(h.cells.values),p=function(Y){return Y.slice(h.header.values.length,Y.length)},E=v(h.header.values);E.length&&!E[0].length&&(E[0]=[""],E=v(E));var c=E.concat(p(b).map(function(){return y((E[0]||[""]).length)})),l=h.domain,m=Math.floor(g._fullLayout._size.w*(l.x[1]-l.x[0])),M=Math.floor(g._fullLayout._size.h*(l.y[1]-l.y[0])),L=h.header.values.length?c[0].map(function(){return h.header.height}):[d.emptyHeaderHeight],D=b.length?b[0].map(function(){return h.cells.height}):[],A=L.reduce(x,0),C=M-A,S=C+d.uplift,o=u(D,S),R=u(L,A),T=n(R,[]),O=n(o,T),N={},H=h._fullInput.columnorder.concat(p(b.map(function(Y,ee){return ee}))),k=c.map(function(Y,ee){var re=Array.isArray(h.columnwidth)?h.columnwidth[Math.min(ee,h.columnwidth.length-1)]:h.columnwidth;return a(re)?Number(re):1}),V=k.reduce(x,0);k=k.map(function(Y){return Y/V*m});var G=Math.max(_(h.header.line.width),_(h.cells.line.width)),U={key:h.uid+g._context.staticPlot,translateX:l.x[0]*g._fullLayout._size.w,translateY:g._fullLayout._size.h*(1-l.y[1]),size:g._fullLayout._size,width:m,maxLineWidth:G,height:M,columnOrder:H,groupHeight:M,rowBlocks:O,headerRowBlocks:T,scrollY:0,cells:P({},h.cells,{values:b}),headerCells:P({},h.header,{values:c}),gdColumns:c.map(function(Y){return Y[0]}),gdColumnsOriginalOrder:c.map(function(Y){return Y[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:c.map(function(Y,ee){var re=N[Y];N[Y]=(re||0)+1;var ie=Y+"__"+N[Y];return{key:ie,label:Y,specIndex:ee,xIndex:H[ee],xScale:r,x:void 0,calcdata:void 0,columnWidth:k[ee]}})};return U.columns.forEach(function(Y){Y.calcdata=U,Y.x=r(Y)}),U};function _(f){if(Array.isArray(f)){for(var g=0,h=0;h<f.length;h++)g=Math.max(g,_(f[h]));return g}return f}function x(f,g){return f+g}function v(f){var g=f.slice(),h=1/0,b=0,p;for(p=0;p<g.length;p++)Array.isArray(g[p])||(g[p]=[g[p]]),h=Math.min(h,g[p].length),b=Math.max(b,g[p].length);if(h!==b)for(p=0;p<g.length;p++){var E=b-g[p].length;E&&(g[p]=g[p].concat(y(E)))}return g}function y(f){for(var g=new Array(f),h=0;h<f;h++)g[h]="";return g}function r(f){return f.calcdata.columns.reduce(function(g,h){return h.xIndex<f.xIndex?g+h.columnWidth:g},0)}function n(f,g){var h=Object.keys(f);return h.map(function(b){return P({},f[b],{auxiliaryBlocks:g})})}function u(f,g){for(var h={},b,p=0,E=0,c=i(),l=0,m=0,M=0;M<f.length;M++)b=f[M],c.rows.push({rowIndex:M,rowHeight:b}),E+=b,(E>=g||M===f.length-1)&&(h[p]=c,c.key=m++,c.firstRowIndex=l,c.lastRowIndex=M,c=i(),p+=E,l=M+1,E=0);return h}function i(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}},56269:function(z,B,e){var d=e(1426).extendFlat;B.splitToPanels=function(a){var _=[0,0],x=d({},a,{key:"header",type:"header",page:0,prevPages:_,currentRepaint:[null,null],dragHandle:!0,values:a.calcdata.headerCells.values[a.specIndex],rowBlocks:a.calcdata.headerRowBlocks,calcdata:d({},a.calcdata,{cells:a.calcdata.headerCells})}),v=d({},a,{key:"cells1",type:"cells",page:0,prevPages:_,currentRepaint:[null,null],dragHandle:!1,values:a.calcdata.cells.values[a.specIndex],rowBlocks:a.calcdata.rowBlocks}),y=d({},a,{key:"cells2",type:"cells",page:1,prevPages:_,currentRepaint:[null,null],dragHandle:!1,values:a.calcdata.cells.values[a.specIndex],rowBlocks:a.calcdata.rowBlocks});return[v,y,x]},B.splitToCells=function(a){var _=P(a);return(a.values||[]).slice(_[0],_[1]).map(function(x,v){var y=typeof x=="string"&&x.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:v+y,key:_[0]+v,column:a,calcdata:a.calcdata,page:a.page,rowBlocks:a.rowBlocks,value:x}})};function P(a){var _=a.rowBlocks[a.page],x=_?_.rows[0].rowIndex:0,v=_?x+_.rows.length:0;return[x,v]}},39754:function(z,B,e){var d=e(71828),P=e(44464),a=e(27670).c;function _(x,v){for(var y=x.columnorder||[],r=x.header.values.length,n=y.slice(0,r),u=n.slice().sort(function(g,h){return g-h}),i=n.map(function(g){return u.indexOf(g)}),f=i.length;f<r;f++)i.push(f);v("columnorder",i)}z.exports=function(v,y,r,n){function u(i,f){return d.coerce(v,y,P,i,f)}a(y,n,u),u("columnwidth"),u("header.values"),u("header.format"),u("header.align"),u("header.prefix"),u("header.suffix"),u("header.height"),u("header.line.width"),u("header.line.color"),u("header.fill.color"),d.coerceFont(u,"header.font",d.extendFlat({},n.font)),_(y,u),u("cells.values"),u("cells.format"),u("cells.align"),u("cells.prefix"),u("cells.suffix"),u("cells.height"),u("cells.line.width"),u("cells.line.color"),u("cells.fill.color"),d.coerceFont(u,"cells.font",d.extendFlat({},n.font)),y._length=null}},96595:function(z,B,e){z.exports={attributes:e(44464),supplyDefaults:e(39754),calc:e(76333),plot:e(36736),moduleType:"trace",name:"table",basePlotModule:e(99469),categories:["noOpacity"],meta:{}}},36736:function(z,B,e){var d=e(49850),P=e(39898),a=e(71828),_=a.numberFormat,x=e(28984),v=e(91424),y=e(63893),r=e(71828).raiseToTop,n=e(71828).strTranslate,u=e(71828).cancelTransition,i=e(51018),f=e(56269),g=e(7901);z.exports=function(ve,le){var xe=!ve._context.staticPlot,Se=ve._fullLayout._paper.selectAll("."+d.cn.table).data(le.map(function(it){var nt=x.unwrap(it),pt=nt.trace;return i(ve,pt)}),x.keyFun);Se.exit().remove(),Se.enter().append("g").classed(d.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"),Se.attr("width",function(it){return it.width+it.size.l+it.size.r}).attr("height",function(it){return it.height+it.size.t+it.size.b}).attr("transform",function(it){return n(it.translateX,it.translateY)});var Re=Se.selectAll("."+d.cn.tableControlView).data(x.repeat,x.keyFun),Ee=Re.enter().append("g").classed(d.cn.tableControlView,!0).style("box-sizing","content-box");if(xe){var Oe="onwheel"in document?"wheel":"mousewheel";Ee.on("mousemove",function(it){Re.filter(function(nt){return it===nt}).call(c,ve)}).on(Oe,function(it){if(!it.scrollbarState.wheeling){it.scrollbarState.wheeling=!0;var nt=it.scrollY+P.event.deltaY,pt=re(ve,Re,null,nt)(it);pt||(P.event.stopPropagation(),P.event.preventDefault()),it.scrollbarState.wheeling=!1}}).call(c,ve,!0)}Re.attr("transform",function(it){return n(it.size.l,it.size.t)});var Be=Re.selectAll("."+d.cn.scrollBackground).data(x.repeat,x.keyFun);Be.enter().append("rect").classed(d.cn.scrollBackground,!0).attr("fill","none"),Be.attr("width",function(it){return it.width}).attr("height",function(it){return it.height}),Re.each(function(it){v.setClipUrl(P.select(this),b(ve,it),ve)});var Le=Re.selectAll("."+d.cn.yColumn).data(function(it){return it.columns},x.keyFun);Le.enter().append("g").classed(d.cn.yColumn,!0),Le.exit().remove(),Le.attr("transform",function(it){return n(it.x,0)}),xe&&Le.call(P.behavior.drag().origin(function(it){var nt=P.select(this);return k(nt,it,-d.uplift),r(this),it.calcdata.columnDragInProgress=!0,c(Re.filter(function(pt){return it.calcdata.key===pt.key}),ve),it}).on("drag",function(it){var nt=P.select(this),pt=function(Dt){return(it===Dt?P.event.x:Dt.x)+Dt.columnWidth/2};it.x=Math.max(-d.overdrag,Math.min(it.calcdata.width+d.overdrag-it.columnWidth,P.event.x));var Tt=E(Le).filter(function(Dt){return Dt.calcdata.key===it.calcdata.key}),Et=Tt.sort(function(Dt,et){return pt(Dt)-pt(et)});Et.forEach(function(Dt,et){Dt.xIndex=et,Dt.x=it===Dt?Dt.x:Dt.xScale(Dt)}),Le.filter(function(Dt){return it!==Dt}).transition().ease(d.transitionEase).duration(d.transitionDuration).attr("transform",function(Dt){return n(Dt.x,0)}),nt.call(u).attr("transform",n(it.x,-d.uplift))}).on("dragend",function(it){var nt=P.select(this),pt=it.calcdata;it.x=it.xScale(it),it.calcdata.columnDragInProgress=!1,k(nt,it,0),N(ve,pt,pt.columns.map(function(Tt){return Tt.xIndex}))})),Le.each(function(it){v.setClipUrl(P.select(this),p(ve,it),ve)});var Te=Le.selectAll("."+d.cn.columnBlock).data(f.splitToPanels,x.keyFun);Te.enter().append("g").classed(d.cn.columnBlock,!0).attr("id",function(it){return it.key}),Te.style("cursor",function(it){return it.dragHandle?"ew-resize":it.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var De=Te.filter(G),Ve=Te.filter(V);xe&&Ve.call(P.behavior.drag().origin(function(it){return P.event.stopPropagation(),it}).on("drag",re(ve,Re,-1)).on("dragend",function(){})),l(ve,Re,De,Te),l(ve,Re,Ve,Te);var Ye=Re.selectAll("."+d.cn.scrollAreaClip).data(x.repeat,x.keyFun);Ye.enter().append("clipPath").classed(d.cn.scrollAreaClip,!0).attr("id",function(it){return b(ve,it)});var Ne=Ye.selectAll("."+d.cn.scrollAreaClipRect).data(x.repeat,x.keyFun);Ne.enter().append("rect").classed(d.cn.scrollAreaClipRect,!0).attr("x",-d.overdrag).attr("y",-d.uplift).attr("fill","none"),Ne.attr("width",function(it){return it.width+2*d.overdrag}).attr("height",function(it){return it.height+d.uplift});var Xe=Le.selectAll("."+d.cn.columnBoundary).data(x.repeat,x.keyFun);Xe.enter().append("g").classed(d.cn.columnBoundary,!0);var ht=Le.selectAll("."+d.cn.columnBoundaryClippath).data(x.repeat,x.keyFun);ht.enter().append("clipPath").classed(d.cn.columnBoundaryClippath,!0),ht.attr("id",function(it){return p(ve,it)});var st=ht.selectAll("."+d.cn.columnBoundaryRect).data(x.repeat,x.keyFun);st.enter().append("rect").classed(d.cn.columnBoundaryRect,!0).attr("fill","none"),st.attr("width",function(it){return it.columnWidth+2*h(it)}).attr("height",function(it){return it.calcdata.height+2*h(it)+d.uplift}).attr("x",function(it){return-h(it)}).attr("y",function(it){return-h(it)}),ee(null,Ve,Re)};function h(ne){return Math.ceil(ne.calcdata.maxLineWidth/2)}function b(ne,ve){return"clip"+ne._fullLayout._uid+"_scrollAreaBottomClip_"+ve.key}function p(ne,ve){return"clip"+ne._fullLayout._uid+"_columnBoundaryClippath_"+ve.calcdata.key+"_"+ve.specIndex}function E(ne){return[].concat.apply([],ne.map(function(ve){return ve})).map(function(ve){return ve.__data__})}function c(ne,ve,le){function xe(Le){var Te=Le.rowBlocks;return Z(Te,Te.length-1)+(Te.length?Q(Te[Te.length-1],1/0):1)}var Se=ne.selectAll("."+d.cn.scrollbarKit).data(x.repeat,x.keyFun);Se.enter().append("g").classed(d.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),Se.each(function(Le){var Te=Le.scrollbarState;Te.totalHeight=xe(Le),Te.scrollableAreaHeight=Le.groupHeight-U(Le),Te.currentlyVisibleHeight=Math.min(Te.totalHeight,Te.scrollableAreaHeight),Te.ratio=Te.currentlyVisibleHeight/Te.totalHeight,Te.barLength=Math.max(Te.ratio*Te.currentlyVisibleHeight,d.goldenRatio*d.scrollbarWidth),Te.barWiggleRoom=Te.currentlyVisibleHeight-Te.barLength,Te.wiggleRoom=Math.max(0,Te.totalHeight-Te.scrollableAreaHeight),Te.topY=Te.barWiggleRoom===0?0:Le.scrollY/Te.wiggleRoom*Te.barWiggleRoom,Te.bottomY=Te.topY+Te.barLength,Te.dragMultiplier=Te.wiggleRoom/Te.barWiggleRoom}).attr("transform",function(Le){var Te=Le.width+d.scrollbarWidth/2+d.scrollbarOffset;return n(Te,U(Le))});var Re=Se.selectAll("."+d.cn.scrollbar).data(x.repeat,x.keyFun);Re.enter().append("g").classed(d.cn.scrollbar,!0);var Ee=Re.selectAll("."+d.cn.scrollbarSlider).data(x.repeat,x.keyFun);Ee.enter().append("g").classed(d.cn.scrollbarSlider,!0),Ee.attr("transform",function(Le){return n(0,Le.scrollbarState.topY||0)});var Oe=Ee.selectAll("."+d.cn.scrollbarGlyph).data(x.repeat,x.keyFun);Oe.enter().append("line").classed(d.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",d.scrollbarWidth).attr("stroke-linecap","round").attr("y1",d.scrollbarWidth/2),Oe.attr("y2",function(Le){return Le.scrollbarState.barLength-d.scrollbarWidth/2}).attr("stroke-opacity",function(Le){return Le.columnDragInProgress||!Le.scrollbarState.barWiggleRoom||le?0:.4}),Oe.transition().delay(0).duration(0),Oe.transition().delay(d.scrollbarHideDelay).duration(d.scrollbarHideDuration).attr("stroke-opacity",0);var Be=Re.selectAll("."+d.cn.scrollbarCaptureZone).data(x.repeat,x.keyFun);Be.enter().append("line").classed(d.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",d.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(Le){var Te=P.event.y,De=this.getBoundingClientRect(),Ve=Le.scrollbarState,Ye=Te-De.top,Ne=P.scale.linear().domain([0,Ve.scrollableAreaHeight]).range([0,Ve.totalHeight]).clamp(!0);Ve.topY<=Ye&&Ye<=Ve.bottomY||re(ve,ne,null,Ne(Ye-Ve.barLength/2))(Le)}).call(P.behavior.drag().origin(function(Le){return P.event.stopPropagation(),Le.scrollbarState.scrollbarScrollInProgress=!0,Le}).on("drag",re(ve,ne)).on("dragend",function(){})),Be.attr("y2",function(Le){return Le.scrollbarState.scrollableAreaHeight}),ve._context.staticPlot&&(Oe.remove(),Be.remove())}function l(ne,ve,le,xe){var Se=m(le),Re=M(Se);C(Re);var Ee=L(Re);o(Ee);var Oe=A(Re),Be=D(Oe);S(Be),R(Be,ve,xe,ne),j(Re)}function m(ne){var ve=ne.selectAll("."+d.cn.columnCells).data(x.repeat,x.keyFun);return ve.enter().append("g").classed(d.cn.columnCells,!0),ve.exit().remove(),ve}function M(ne){var ve=ne.selectAll("."+d.cn.columnCell).data(f.splitToCells,function(le){return le.keyWithinBlock});return ve.enter().append("g").classed(d.cn.columnCell,!0),ve.exit().remove(),ve}function L(ne){var ve=ne.selectAll("."+d.cn.cellRect).data(x.repeat,function(le){return le.keyWithinBlock});return ve.enter().append("rect").classed(d.cn.cellRect,!0),ve}function D(ne){var ve=ne.selectAll("."+d.cn.cellText).data(x.repeat,function(le){return le.keyWithinBlock});return ve.enter().append("text").classed(d.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){P.event.stopPropagation()}),ve}function A(ne){var ve=ne.selectAll("."+d.cn.cellTextHolder).data(x.repeat,function(le){return le.keyWithinBlock});return ve.enter().append("g").classed(d.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),ve}function C(ne){ne.each(function(ve,le){var xe=ve.calcdata.cells.font,Se=ve.column.specIndex,Re={size:H(xe.size,Se,le),color:H(xe.color,Se,le),family:H(xe.family,Se,le)};ve.rowNumber=ve.key,ve.align=H(ve.calcdata.cells.align,Se,le),ve.cellBorderWidth=H(ve.calcdata.cells.line.width,Se,le),ve.font=Re})}function S(ne){ne.each(function(ve){v.font(P.select(this),ve.font)})}function o(ne){ne.attr("width",function(ve){return ve.column.columnWidth}).attr("stroke-width",function(ve){return ve.cellBorderWidth}).each(function(ve){var le=P.select(this);g.stroke(le,H(ve.calcdata.cells.line.color,ve.column.specIndex,ve.rowNumber)),g.fill(le,H(ve.calcdata.cells.fill.color,ve.column.specIndex,ve.rowNumber))})}function R(ne,ve,le,xe){ne.text(function(Se){var Re=Se.column.specIndex,Ee=Se.rowNumber,Oe=Se.value,Be=typeof Oe=="string",Le=Be&&Oe.match(/<br>/i),Te=!Be||Le;Se.mayHaveMarkup=Be&&Oe.match(/[<&>]/);var De=T(Oe);Se.latex=De;var Ve=De?"":H(Se.calcdata.cells.prefix,Re,Ee)||"",Ye=De?"":H(Se.calcdata.cells.suffix,Re,Ee)||"",Ne=De?null:H(Se.calcdata.cells.format,Re,Ee)||null,Xe=Ve+(Ne?_(Ne)(Se.value):Se.value)+Ye,ht;Se.wrappingNeeded=!Se.wrapped&&!Te&&!De&&(ht=O(Xe)),Se.cellHeightMayIncrease=Le||De||Se.mayHaveMarkup||(ht===void 0?O(Xe):ht),Se.needsConvertToTspans=Se.mayHaveMarkup||Se.wrappingNeeded||Se.latex;var st;if(Se.wrappingNeeded){var it=d.wrapSplitCharacter===" "?Xe.replace(/<a href=/ig,"<a_href="):Xe,nt=it.split(d.wrapSplitCharacter),pt=d.wrapSplitCharacter===" "?nt.map(function(Tt){return Tt.replace(/<a_href=/ig,"<a href=")}):nt;Se.fragments=pt.map(function(Tt){return{text:Tt,width:null}}),Se.fragments.push({fragment:d.wrapSpacer,width:null}),st=pt.join(d.lineBreaker)+d.lineBreaker+d.wrapSpacer}else delete Se.fragments,st=Xe;return st}).attr("dy",function(Se){return Se.needsConvertToTspans?0:"0.75em"}).each(function(Se){var Re=this,Ee=P.select(Re),Oe=Se.wrappingNeeded?se:ce;Se.needsConvertToTspans?y.convertToTspans(Ee,xe,Oe(le,Re,ve,xe,Se)):P.select(Re.parentNode).attr("transform",function(Be){return n(q(Be),d.cellPad)}).attr("text-anchor",function(Be){return{left:"start",center:"middle",right:"end"}[Be.align]})})}function T(ne){return typeof ne=="string"&&ne.match(d.latexCheck)}function O(ne){return ne.indexOf(d.wrapSplitCharacter)!==-1}function N(ne,ve,le){var xe=ve.gdColumnsOriginalOrder;ve.gdColumns.sort(function(Se,Re){return le[xe.indexOf(Se)]-le[xe.indexOf(Re)]}),ve.columnorder=le,ne.emit("plotly_restyle")}function H(ne,ve,le){if(Array.isArray(ne)){var xe=ne[Math.min(ve,ne.length-1)];return Array.isArray(xe)?xe[Math.min(le,xe.length-1)]:xe}else return ne}function k(ne,ve,le){ne.transition().ease(d.releaseTransitionEase).duration(d.releaseTransitionDuration).attr("transform",n(ve.x,le))}function V(ne){return ne.type==="cells"}function G(ne){return ne.type==="header"}function U(ne){var ve=ne.rowBlocks.length?ne.rowBlocks[0].auxiliaryBlocks:[];return ve.reduce(function(le,xe){return le+Q(xe,1/0)},0)}function Y(ne,ve,le){for(var xe=[],Se=0,Re=0;Re<ne.length;Re++){for(var Ee=ne[Re],Oe=Ee.rows,Be=0,Le=0;Le<Oe.length;Le++)Be+=Oe[Le].rowHeight;Ee.allRowsHeight=Be;var Te=Se+Be,De=ve,Ve=De+le;De<Te&&Ve>Se&&xe.push(Re),Se+=Be}return xe}function ee(ne,ve,le){var xe=E(ve)[0];if(xe!==void 0){var Se=xe.rowBlocks,Re=xe.calcdata,Ee=Z(Se,Se.length),Oe=xe.calcdata.groupHeight-U(xe),Be=Re.scrollY=Math.max(0,Math.min(Ee-Oe,Re.scrollY)),Le=Y(Se,Be,Oe);Le.length===1&&(Le[0]===Se.length-1?Le.unshift(Le[0]-1):Le.push(Le[0]+1)),Le[0]%2&&Le.reverse(),ve.each(function(Te,De){Te.page=Le[De],Te.scrollY=Be}),ve.attr("transform",function(Te){var De=Z(Te.rowBlocks,Te.page)-Te.scrollY;return n(0,De)}),ne&&(ie(ne,le,ve,Le,xe.prevPages,xe,0),ie(ne,le,ve,Le,xe.prevPages,xe,1),c(le,ne))}}function re(ne,ve,le,xe){return function(Re){var Ee=Re.calcdata?Re.calcdata:Re,Oe=ve.filter(function(De){return Ee.key===De.key}),Be=le||Ee.scrollbarState.dragMultiplier,Le=Ee.scrollY;Ee.scrollY=xe===void 0?Ee.scrollY+Be*P.event.dy:xe;var Te=Oe.selectAll("."+d.cn.yColumn).selectAll("."+d.cn.columnBlock).filter(V);return ee(ne,Te,Oe),Ee.scrollY===Le}}function ie(ne,ve,le,xe,Se,Re,Ee){var Oe=xe[Ee]!==Se[Ee];Oe&&(clearTimeout(Re.currentRepaint[Ee]),Re.currentRepaint[Ee]=setTimeout(function(){var Be=le.filter(function(Le,Te){return Te===Ee&&xe[Te]!==Se[Te]});l(ne,ve,Be,le),Se[Ee]=xe[Ee]}))}function se(ne,ve,le,xe){return function(){var Re=P.select(ve.parentNode);Re.each(function(Ee){var Oe=Ee.fragments;Re.selectAll("tspan.line").each(function(Xe,ht){Oe[ht].width=this.getComputedTextLength()});var Be=Oe[Oe.length-1].width,Le=Oe.slice(0,-1),Te=[],De,Ve,Ye=0,Ne=Ee.column.columnWidth-2*d.cellPad;for(Ee.value="";Le.length;)De=Le.shift(),Ve=De.width+Be,Ye+Ve>Ne&&(Ee.value+=Te.join(d.wrapSpacer)+d.lineBreaker,Te=[],Ye=0),Te.push(De.text),Ye+=Ve;Ye&&(Ee.value+=Te.join(d.wrapSpacer)),Ee.wrapped=!0}),Re.selectAll("tspan.line").remove(),R(Re.select("."+d.cn.cellText),le,ne,xe),P.select(ve.parentNode.parentNode).call(j)}}function ce(ne,ve,le,xe,Se){return function(){if(!Se.settledY){var Ee=P.select(ve.parentNode),Oe=fe(Se),Be=Se.key-Oe.firstRowIndex,Le=Oe.rows[Be].rowHeight,Te=Se.cellHeightMayIncrease?ve.parentNode.getBoundingClientRect().height+2*d.cellPad:Le,De=Math.max(Te,Le),Ve=De-Oe.rows[Be].rowHeight;Ve&&(Oe.rows[Be].rowHeight=De,ne.selectAll("."+d.cn.columnCell).call(j),ee(null,ne.filter(V),0),c(le,xe,!0)),Ee.attr("transform",function(){var Ye=this,Ne=Ye.parentNode,Xe=Ne.getBoundingClientRect(),ht=P.select(Ye.parentNode).select("."+d.cn.cellRect).node().getBoundingClientRect(),st=Ye.transform.baseVal.consolidate(),it=ht.top-Xe.top+(st?st.matrix.f:d.cellPad);return n(q(Se,P.select(Ye.parentNode).select("."+d.cn.cellTextHolder).node().getBoundingClientRect().width),it)}),Se.settledY=!0}}}function q(ne,ve){switch(ne.align){case"left":return d.cellPad;case"right":return ne.column.columnWidth-(ve||0)-d.cellPad;case"center":return(ne.column.columnWidth-(ve||0))/2;default:return d.cellPad}}function j(ne){ne.attr("transform",function(ve){var le=ve.rowBlocks[0].auxiliaryBlocks.reduce(function(Ee,Oe){return Ee+Q(Oe,1/0)},0),xe=fe(ve),Se=Q(xe,ve.key),Re=Se+le;return n(0,Re)}).selectAll("."+d.cn.cellRect).attr("height",function(ve){return te(fe(ve),ve.key).rowHeight})}function Z(ne,ve){for(var le=0,xe=ve-1;xe>=0;xe--)le+=ue(ne[xe]);return le}function Q(ne,ve){for(var le=0,xe=0;xe<ne.rows.length&&ne.rows[xe].rowIndex<ve;xe++)le+=ne.rows[xe].rowHeight;return le}function ue(ne){var ve=ne.allRowsHeight;if(ve!==void 0)return ve;for(var le=0,xe=0;xe<ne.rows.length;xe++)le+=ne.rows[xe].rowHeight;return ne.allRowsHeight=le,le}function fe(ne){return ne.rowBlocks[ne.page]}function te(ne,ve){return ne.rows[ve-ne.firstRowIndex]}},45802:function(z,B,e){var d=e(5386).f,P=e(5386).s,a=e(50693),_=e(27670).Y,x=e(34e3),v=e(57564),y=e(43473),r=e(1426).extendFlat;z.exports={labels:v.labels,parents:v.parents,values:v.values,branchvalues:v.branchvalues,count:v.count,level:v.level,maxdepth:v.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:r({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:v.marker.colors,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:v.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},a("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:r({},x.textfont,{}),editType:"calc"},text:x.text,textinfo:v.textinfo,texttemplate:P({editType:"plot"},{keys:y.eventDataKeys.concat(["label","value"])}),hovertext:x.hovertext,hoverinfo:v.hoverinfo,hovertemplate:d({},{keys:y.eventDataKeys}),textfont:x.textfont,insidetextfont:x.insidetextfont,outsidetextfont:r({},x.outsidetextfont,{}),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"},sort:x.sort,root:v.root,domain:_({name:"treemap",trace:!0,editType:"calc"})}},78018:function(z,B,e){var d=e(74875);B.name="treemap",B.plot=function(P,a,_,x){d.plotBasePlot(B.name,P,a,_,x)},B.clean=function(P,a,_,x){d.cleanBasePlot(B.name,P,a,_,x)}},65039:function(z,B,e){var d=e(52147);B.y=function(P,a){return d.calc(P,a)},B.T=function(P){return d._runCrossTraceCalc("treemap",P)}},43473:function(z){z.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},91174:function(z,B,e){var d=e(71828),P=e(45802),a=e(7901),_=e(27670).c,x=e(90769).handleText,v=e(97313).TEXTPAD,y=e(21081),r=y.hasColorscale,n=y.handleDefaults;z.exports=function(i,f,g,h){function b(R,T){return d.coerce(i,f,P,R,T)}var p=b("labels"),E=b("parents");if(!p||!p.length||!E||!E.length){f.visible=!1;return}var c=b("values");c&&c.length?b("branchvalues"):b("count"),b("level"),b("maxdepth");var l=b("tiling.packing");l==="squarify"&&b("tiling.squarifyratio"),b("tiling.flip"),b("tiling.pad");var m=b("text");b("texttemplate"),f.texttemplate||b("textinfo",Array.isArray(m)?"text+label":"label"),b("hovertext"),b("hovertemplate");var M=b("pathbar.visible"),L="auto";x(i,f,h,b,L,{hasPathbar:M,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),b("textposition");var D=f.textposition.indexOf("bottom")!==-1,A=b("marker.line.width");A&&b("marker.line.color",h.paper_bgcolor);var C=b("marker.colors"),S=f._hasColorscale=r(i,"marker","colors")||(i.marker||{}).coloraxis;S?n(i,f,h,b,{prefix:"marker.",cLetter:"c"}):b("marker.depthfade",!(C||[]).length);var o=f.textfont.size*2;b("marker.pad.t",D?o/4:o),b("marker.pad.l",o/4),b("marker.pad.r",o/4),b("marker.pad.b",D?o:o/4),b("marker.cornerradius"),f._hovered={marker:{line:{width:2,color:a.contrast(h.paper_bgcolor)}}},M&&(b("pathbar.thickness",f.pathbar.textfont.size+2*v),b("pathbar.side"),b("pathbar.edgeshape")),b("sort"),b("root.color"),_(f,h,b),f._length=null}},80694:function(z,B,e){var d=e(39898),P=e(2791),a=e(72597),_=a.clearMinTextSize,x=e(16688).resizeText,v=e(46650);z.exports=function(r,n,u,i,f){var g=f.type,h=f.drawDescendants,b=r._fullLayout,p=b["_"+g+"layer"],E,c,l=!u;if(_(g,b),E=p.selectAll("g.trace."+g).data(n,function(M){return M[0].trace.uid}),E.enter().append("g").classed("trace",!0).classed(g,!0),E.order(),!b.uniformtext.mode&&P.hasTransition(u)){i&&(c=i());var m=d.transition().duration(u.duration).ease(u.easing).each("end",function(){c&&c()}).each("interrupt",function(){c&&c()});m.each(function(){p.selectAll("g.trace").each(function(M){v(r,M,this,u,h)})})}else E.each(function(M){v(r,M,this,u,h)}),b.uniformtext.mode&&x(r,p.selectAll(".trace"),g);l&&E.exit().remove()}},66209:function(z,B,e){var d=e(39898),P=e(71828),a=e(91424),_=e(63893),x=e(37210),v=e(96362).styleOne,y=e(43473),r=e(2791),n=e(83523),u=!0;z.exports=function(f,g,h,b,p){var E=p.barDifY,c=p.width,l=p.height,m=p.viewX,M=p.viewY,L=p.pathSlice,D=p.toMoveInsideSlice,A=p.strTransform,C=p.hasTransition,S=p.handleSlicesExit,o=p.makeUpdateSliceInterpolator,R=p.makeUpdateTextInterpolator,T={},O=f._context.staticPlot,N=f._fullLayout,H=g[0],k=H.trace,V=H.hierarchy,G=c/k._entryDepth,U=r.listPath(h.data,"id"),Y=x(V.copy(),[c,l],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();Y=Y.filter(function(re){var ie=U.indexOf(re.data.id);return ie===-1?!1:(re.x0=G*ie,re.x1=G*(ie+1),re.y0=E,re.y1=E+l,re.onPathbar=!0,!0)}),Y.reverse(),b=b.data(Y,r.getPtId),b.enter().append("g").classed("pathbar",!0),S(b,u,T,[c,l],L),b.order();var ee=b;C&&(ee=ee.transition().each("end",function(){var re=d.select(this);r.setSliceCursor(re,f,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),ee.each(function(re){re._x0=m(re.x0),re._x1=m(re.x1),re._y0=M(re.y0),re._y1=M(re.y1),re._hoverX=m(re.x1-Math.min(c,l)/2),re._hoverY=M(re.y1-l/2);var ie=d.select(this),se=P.ensureSingle(ie,"path","surface",function(Z){Z.style("pointer-events",O?"none":"all")});C?se.transition().attrTween("d",function(Z){var Q=o(Z,u,T,[c,l]);return function(ue){return L(Q(ue))}}):se.attr("d",L),ie.call(n,h,f,g,{styleOne:v,eventDataKeys:y.eventDataKeys,transitionTime:y.CLICK_TRANSITION_TIME,transitionEasing:y.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,f,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:f._transitioning}),se.call(v,re,k,{hovered:!1}),re._text=(r.getPtLabel(re)||"").split("<br>").join(" ")||"";var ce=P.ensureSingle(ie,"g","slicetext"),q=P.ensureSingle(ce,"text","",function(Z){Z.attr("data-notex",1)}),j=P.ensureUniformFontSize(f,r.determineTextFont(k,re,N.font,{onPathbar:!0}));q.text(re._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(a.font,j).call(_.convertToTspans,f),re.textBB=a.bBox(q.node()),re.transform=D(re,{fontSize:j.size,onPathbar:!0}),re.transform.fontSize=j.size,C?q.transition().attrTween("transform",function(Z){var Q=R(Z,u,T,[c,l]);return function(ue){return A(Q(ue))}}):q.attr("transform",A(re))})}},52583:function(z,B,e){var d=e(39898),P=e(71828),a=e(91424),_=e(63893),x=e(37210),v=e(96362).styleOne,y=e(43473),r=e(2791),n=e(83523),u=e(24714).formatSliceLabel,i=!1;z.exports=function(g,h,b,p,E){var c=E.width,l=E.height,m=E.viewX,M=E.viewY,L=E.pathSlice,D=E.toMoveInsideSlice,A=E.strTransform,C=E.hasTransition,S=E.handleSlicesExit,o=E.makeUpdateSliceInterpolator,R=E.makeUpdateTextInterpolator,T=E.prevEntry,O={},N=g._context.staticPlot,H=g._fullLayout,k=h[0],V=k.trace,G=V.textposition.indexOf("left")!==-1,U=V.textposition.indexOf("right")!==-1,Y=V.textposition.indexOf("bottom")!==-1,ee=!Y&&!V.marker.pad.t||Y&&!V.marker.pad.b,re=x(b,[c,l],{packing:V.tiling.packing,squarifyratio:V.tiling.squarifyratio,flipX:V.tiling.flip.indexOf("x")>-1,flipY:V.tiling.flip.indexOf("y")>-1,pad:{inner:V.tiling.pad,top:V.marker.pad.t,left:V.marker.pad.l,right:V.marker.pad.r,bottom:V.marker.pad.b}}),ie=re.descendants(),se=1/0,ce=-1/0;ie.forEach(function(ue){var fe=ue.depth;fe>=V._maxDepth?(ue.x0=ue.x1=(ue.x0+ue.x1)/2,ue.y0=ue.y1=(ue.y0+ue.y1)/2):(se=Math.min(se,fe),ce=Math.max(ce,fe))}),p=p.data(ie,r.getPtId),V._maxVisibleLayers=isFinite(ce)?ce-se+1:0,p.enter().append("g").classed("slice",!0),S(p,i,O,[c,l],L),p.order();var q=null;if(C&&T){var j=r.getPtId(T);p.each(function(ue){q===null&&r.getPtId(ue)===j&&(q={x0:ue.x0,x1:ue.x1,y0:ue.y0,y1:ue.y1})})}var Z=function(){return q||{x0:0,x1:c,y0:0,y1:l}},Q=p;return C&&(Q=Q.transition().each("end",function(){var ue=d.select(this);r.setSliceCursor(ue,g,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),Q.each(function(ue){var fe=r.isHeader(ue,V);ue._x0=m(ue.x0),ue._x1=m(ue.x1),ue._y0=M(ue.y0),ue._y1=M(ue.y1),ue._hoverX=m(ue.x1-V.marker.pad.r),ue._hoverY=M(Y?ue.y1-V.marker.pad.b/2:ue.y0+V.marker.pad.t/2);var te=d.select(this),ne=P.ensureSingle(te,"path","surface",function(Se){Se.style("pointer-events",N?"none":"all")});C?ne.transition().attrTween("d",function(Se){var Re=o(Se,i,Z(),[c,l]);return function(Ee){return L(Re(Ee))}}):ne.attr("d",L),te.call(n,b,g,h,{styleOne:v,eventDataKeys:y.eventDataKeys,transitionTime:y.CLICK_TRANSITION_TIME,transitionEasing:y.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,g,{isTransitioning:g._transitioning}),ne.call(v,ue,V,{hovered:!1}),ue.x0===ue.x1||ue.y0===ue.y1?ue._text="":fe?ue._text=ee?"":r.getPtLabel(ue)||"":ue._text=u(ue,b,V,h,H)||"";var ve=P.ensureSingle(te,"g","slicetext"),le=P.ensureSingle(ve,"text","",function(Se){Se.attr("data-notex",1)}),xe=P.ensureUniformFontSize(g,r.determineTextFont(V,ue,H.font));le.text(ue._text||" ").classed("slicetext",!0).attr("text-anchor",U?"end":G||fe?"start":"middle").call(a.font,xe).call(_.convertToTspans,g),ue.textBB=a.bBox(le.node()),ue.transform=D(ue,{fontSize:xe.size,isHeader:fe}),ue.transform.fontSize=xe.size,C?le.transition().attrTween("transform",function(Se){var Re=R(Se,i,Z(),[c,l]);return function(Ee){return A(Re(Ee))}}):le.attr("transform",A(ue))}),q}},14102:function(z){z.exports=function B(e,d,P){var a;P.swapXY&&(a=e.x0,e.x0=e.y0,e.y0=a,a=e.x1,e.x1=e.y1,e.y1=a),P.flipX&&(a=e.x0,e.x0=d[0]-e.x1,e.x1=d[0]-a),P.flipY&&(a=e.y0,e.y0=d[1]-e.y1,e.y1=d[1]-a);var _=e.children;if(_)for(var x=0;x<_.length;x++)B(_[x],d,P)}},70954:function(z,B,e){z.exports={moduleType:"trace",name:"treemap",basePlotModule:e(78018),categories:[],animatable:!0,attributes:e(45802),layoutAttributes:e(55479),supplyDefaults:e(91174),supplyLayoutDefaults:e(77182),calc:e(65039).y,crossTraceCalc:e(65039).T,plot:e(5893),style:e(96362).style,colorbar:e(4898),meta:{}}},55479:function(z){z.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},77182:function(z,B,e){var d=e(71828),P=e(55479);z.exports=function(_,x){function v(y,r){return d.coerce(_,x,P,y,r)}v("treemapcolorway",x.colorway),v("extendtreemapcolors")}},37210:function(z,B,e){var d=e(674),P=e(14102);z.exports=function(x,v,y){var r=y.flipX,n=y.flipY,u=y.packing==="dice-slice",i=y.pad[n?"bottom":"top"],f=y.pad[r?"right":"left"],g=y.pad[r?"left":"right"],h=y.pad[n?"top":"bottom"],b;u&&(b=f,f=i,i=b,b=g,g=h,h=b);var p=d.treemap().tile(a(y.packing,y.squarifyratio)).paddingInner(y.pad.inner).paddingLeft(f).paddingRight(g).paddingTop(i).paddingBottom(h).size(u?[v[1],v[0]]:v)(x);return(u||r||n)&&P(p,v,{swapXY:u,flipX:r,flipY:n}),p};function a(_,x){switch(_){case"squarify":return d.treemapSquarify.ratio(x);case"binary":return d.treemapBinary;case"dice":return d.treemapDice;case"slice":return d.treemapSlice;default:return d.treemapSliceDice}}},5893:function(z,B,e){var d=e(80694),P=e(52583);z.exports=function(_,x,v,y){return d(_,x,v,y,{type:"treemap",drawDescendants:P})}},46650:function(z,B,e){var d=e(39898),P=e(81684).sX,a=e(2791),_=e(71828),x=e(97313).TEXTPAD,v=e(17295),y=v.toMoveInsideBar,r=e(72597),n=r.recordMinTextSize,u=e(43473),i=e(66209);function f(g){return a.isHierarchyRoot(g)?"":a.getPtId(g)}z.exports=function(h,b,p,E,c){var l=h._fullLayout,m=b[0],M=m.trace,L=M.type,D=L==="icicle",A=m.hierarchy,C=a.findEntryWithLevel(A,M.level),S=d.select(p),o=S.selectAll("g.pathbar"),R=S.selectAll("g.slice");if(!C){o.remove(),R.remove();return}var T=a.isHierarchyRoot(C),O=!l.uniformtext.mode&&a.hasTransition(E),N=a.getMaxDepth(M),H=function(ze){return ze.data.depth-C.data.depth<N},k=l._size,V=M.domain,G=k.w*(V.x[1]-V.x[0]),U=k.h*(V.y[1]-V.y[0]),Y=G,ee=M.pathbar.thickness,re=M.marker.line.width+u.gapWithPathbar,ie=M.pathbar.visible?M.pathbar.side.indexOf("bottom")>-1?U+re:-(ee+re):0,se={x0:Y,x1:Y,y0:ie,y1:ie+ee},ce=function(ze,rt,lt){var Qe=M.tiling.pad,Fe=function(Ae){return Ae-Qe<=rt.x0},Ce=function(Ae){return Ae+Qe>=rt.x1},pe=function(Ae){return Ae-Qe<=rt.y0},we=function(Ae){return Ae+Qe>=rt.y1};return ze.x0===rt.x0&&ze.x1===rt.x1&&ze.y0===rt.y0&&ze.y1===rt.y1?{x0:ze.x0,x1:ze.x1,y0:ze.y0,y1:ze.y1}:{x0:Fe(ze.x0-Qe)?0:Ce(ze.x0-Qe)?lt[0]:ze.x0,x1:Fe(ze.x1+Qe)?0:Ce(ze.x1+Qe)?lt[0]:ze.x1,y0:pe(ze.y0-Qe)?0:we(ze.y0-Qe)?lt[1]:ze.y0,y1:pe(ze.y1+Qe)?0:we(ze.y1+Qe)?lt[1]:ze.y1}},q=null,j={},Z={},Q=null,ue=function(ze,rt){return rt?j[f(ze)]:Z[f(ze)]},fe=function(ze,rt,lt,Qe){if(rt)return j[f(A)]||se;var Fe=Z[M.level]||lt;return H(ze)?ce(ze,Fe,Qe):{}};m.hasMultipleRoots&&T&&N++,M._maxDepth=N,M._backgroundColor=l.paper_bgcolor,M._entryDepth=C.data.depth,M._atRootLevel=T;var te=-G/2+k.l+k.w*(V.x[1]+V.x[0])/2,ne=-U/2+k.t+k.h*(1-(V.y[1]+V.y[0])/2),ve=function(ze){return te+ze},le=function(ze){return ne+ze},xe=le(0),Se=ve(0),Re=function(ze){return Se+ze},Ee=function(ze){return xe+ze};function Oe(ze,rt){return ze+","+rt}var Be=Re(0),Le=function(ze){ze.x=Math.max(Be,ze.x)},Te=M.pathbar.edgeshape,De=function(ze){var rt=Re(Math.max(Math.min(ze.x0,ze.x0),0)),lt=Re(Math.min(Math.max(ze.x1,ze.x1),Y)),Qe=Ee(ze.y0),Fe=Ee(ze.y1),Ce=ee/2,pe={},we={};pe.x=rt,we.x=lt,pe.y=we.y=(Qe+Fe)/2;var Ae={x:rt,y:Qe},Pe={x:lt,y:Qe},Ge={x:lt,y:Fe},We={x:rt,y:Fe};return Te===">"?(Ae.x-=Ce,Pe.x-=Ce,Ge.x-=Ce,We.x-=Ce):Te==="/"?(Ge.x-=Ce,We.x-=Ce,pe.x-=Ce/2,we.x-=Ce/2):Te==="\\"?(Ae.x-=Ce,Pe.x-=Ce,pe.x-=Ce/2,we.x-=Ce/2):Te==="<"&&(pe.x-=Ce,we.x-=Ce),Le(Ae),Le(We),Le(pe),Le(Pe),Le(Ge),Le(we),"M"+Oe(Ae.x,Ae.y)+"L"+Oe(Pe.x,Pe.y)+"L"+Oe(we.x,we.y)+"L"+Oe(Ge.x,Ge.y)+"L"+Oe(We.x,We.y)+"L"+Oe(pe.x,pe.y)+"Z"},Ve=M[D?"tiling":"marker"].pad,Ye=function(ze){return M.textposition.indexOf(ze)!==-1},Ne=Ye("top"),Xe=Ye("left"),ht=Ye("right"),st=Ye("bottom"),it=function(ze){var rt=ve(ze.x0),lt=ve(ze.x1),Qe=le(ze.y0),Fe=le(ze.y1),Ce=lt-rt,pe=Fe-Qe;if(!Ce||!pe)return"";var we=M.marker.cornerradius||0,Ae=Math.min(we,Ce/2,pe/2);Ae&&ze.data&&ze.data.data&&ze.data.data.label&&(Ne&&(Ae=Math.min(Ae,Ve.t)),Xe&&(Ae=Math.min(Ae,Ve.l)),ht&&(Ae=Math.min(Ae,Ve.r)),st&&(Ae=Math.min(Ae,Ve.b)));var Pe=function(Ge,We){return Ae?"a"+Oe(Ae,Ae)+" 0 0 1 "+Oe(Ge,We):""};return"M"+Oe(rt,Qe+Ae)+Pe(Ae,-Ae)+"L"+Oe(lt-Ae,Qe)+Pe(Ae,Ae)+"L"+Oe(lt,Fe-Ae)+Pe(-Ae,Ae)+"L"+Oe(rt+Ae,Fe)+Pe(-Ae,-Ae)+"Z"},nt=function(ze,rt){var lt=ze.x0,Qe=ze.x1,Fe=ze.y0,Ce=ze.y1,pe=ze.textBB,we=Ne||rt.isHeader&&!st,Ae=we?"start":st?"end":"middle",Pe=Ye("right"),Ge=Ye("left")||rt.onPathbar,We=Ge?-1:Pe?1:0;if(rt.isHeader){if(lt+=(D?Ve:Ve.l)-x,Qe-=(D?Ve:Ve.r)-x,lt>=Qe){var tt=(lt+Qe)/2;lt=tt,Qe=tt}var ct;st?(ct=Ce-(D?Ve:Ve.b),Fe<ct&&ct<Ce&&(Fe=ct)):(ct=Fe+(D?Ve:Ve.t),Fe<ct&&ct<Ce&&(Ce=ct))}var St=y(lt,Qe,Fe,Ce,pe,{isHorizontal:!1,constrained:!0,angle:0,anchor:Ae,leftToRight:We});return St.fontSize=rt.fontSize,St.targetX=ve(St.targetX),St.targetY=le(St.targetY),isNaN(St.targetX)||isNaN(St.targetY)?{}:(lt!==Qe&&Fe!==Ce&&n(M.type,St,l),{scale:St.scale,rotate:St.rotate,textX:St.textX,textY:St.textY,anchorX:St.anchorX,anchorY:St.anchorY,targetX:St.targetX,targetY:St.targetY})},pt=function(ze,rt){for(var lt,Qe=0,Fe=ze;!lt&&Qe<N;)Qe++,Fe=Fe.parent,Fe?lt=ue(Fe,rt):Qe=N;return lt||{}},Tt=function(ze,rt,lt,Qe){var Fe=ue(ze,rt),Ce;if(rt)Ce=se;else{var pe=ue(C,rt);pe?Ce=ce(ze,pe,Qe):Ce={}}return P(Fe,Ce)},Et=function(ze,rt,lt,Qe,Fe){var Ce=ue(ze,rt),pe;if(Ce)pe=Ce;else if(rt)pe=se;else if(q)if(ze.parent){var we=Q||lt;we&&!rt?pe=ce(ze,we,Qe):(pe={},_.extendFlat(pe,pt(ze,rt)))}else pe=_.extendFlat({},ze),D&&(Fe.orientation==="h"?Fe.flipX?pe.x0=ze.x1:pe.x1=0:Fe.flipY?pe.y0=ze.y1:pe.y1=0);else pe={};return P(pe,{x0:ze.x0,x1:ze.x1,y0:ze.y0,y1:ze.y1})},Dt=function(ze,rt,lt,Qe){var Fe=ue(ze,rt),Ce={},pe=fe(ze,rt,lt,Qe);_.extendFlat(Ce,{transform:nt({x0:pe.x0,x1:pe.x1,y0:pe.y0,y1:pe.y1,textBB:ze.textBB,_text:ze._text},{isHeader:a.isHeader(ze,M)})}),Fe?Ce=Fe:ze.parent&&_.extendFlat(Ce,pt(ze,rt));var we=ze.transform;return ze.x0!==ze.x1&&ze.y0!==ze.y1&&n(M.type,we,l),P(Ce,{transform:{scale:we.scale,rotate:we.rotate,textX:we.textX,textY:we.textY,anchorX:we.anchorX,anchorY:we.anchorY,targetX:we.targetX,targetY:we.targetY}})},et=function(ze,rt,lt,Qe,Fe){var Ce=Qe[0],pe=Qe[1];O?ze.exit().transition().each(function(){var we=d.select(this),Ae=we.select("path.surface");Ae.transition().attrTween("d",function(Ge){var We=Tt(Ge,rt,lt,[Ce,pe]);return function(tt){return Fe(We(tt))}});var Pe=we.select("g.slicetext");Pe.attr("opacity",0)}).remove():ze.exit().remove()},Ue=function(ze){var rt=ze.transform;return ze.x0!==ze.x1&&ze.y0!==ze.y1&&n(M.type,rt,l),_.getTextTransform({textX:rt.textX,textY:rt.textY,anchorX:rt.anchorX,anchorY:rt.anchorY,targetX:rt.targetX,targetY:rt.targetY,scale:rt.scale,rotate:rt.rotate})};O&&(o.each(function(ze){j[f(ze)]={x0:ze.x0,x1:ze.x1,y0:ze.y0,y1:ze.y1},ze.transform&&(j[f(ze)].transform={textX:ze.transform.textX,textY:ze.transform.textY,anchorX:ze.transform.anchorX,anchorY:ze.transform.anchorY,targetX:ze.transform.targetX,targetY:ze.transform.targetY,scale:ze.transform.scale,rotate:ze.transform.rotate})}),R.each(function(ze){Z[f(ze)]={x0:ze.x0,x1:ze.x1,y0:ze.y0,y1:ze.y1},ze.transform&&(Z[f(ze)].transform={textX:ze.transform.textX,textY:ze.transform.textY,anchorX:ze.transform.anchorX,anchorY:ze.transform.anchorY,targetX:ze.transform.targetX,targetY:ze.transform.targetY,scale:ze.transform.scale,rotate:ze.transform.rotate}),!q&&a.isEntry(ze)&&(q=ze)})),Q=c(h,b,C,R,{width:G,height:U,viewX:ve,viewY:le,pathSlice:it,toMoveInsideSlice:nt,prevEntry:q,makeUpdateSliceInterpolator:Et,makeUpdateTextInterpolator:Dt,handleSlicesExit:et,hasTransition:O,strTransform:Ue}),M.pathbar.visible?i(h,b,C,o,{barDifY:ie,width:Y,height:ee,viewX:Re,viewY:Ee,pathSlice:De,toMoveInsideSlice:nt,makeUpdateSliceInterpolator:Et,makeUpdateTextInterpolator:Dt,handleSlicesExit:et,hasTransition:O,strTransform:Ue}):o.remove()}},96362:function(z,B,e){var d=e(39898),P=e(7901),a=e(71828),_=e(2791),x=e(72597).resizeText;function v(r){var n=r._fullLayout._treemaplayer.selectAll(".trace");x(r,n,"treemap"),n.each(function(u){var i=d.select(this),f=u[0],g=f.trace;i.style("opacity",g.opacity),i.selectAll("path.surface").each(function(h){d.select(this).call(y,h,g,{hovered:!1})})})}function y(r,n,u,i){var f=(i||{}).hovered,g=n.data.data,h=g.i,b,p,E=g.color,c=_.isHierarchyRoot(n),l=1;if(f)b=u._hovered.marker.line.color,p=u._hovered.marker.line.width;else if(c&&E===u.root.color)l=100,b="rgba(0,0,0,0)",p=0;else if(b=a.castOption(u,h,"marker.line.color")||P.defaultLine,p=a.castOption(u,h,"marker.line.width")||0,!u._hasColorscale&&!n.onPathbar){var m=u.marker.depthfade;if(m){var M=P.combine(P.addOpacity(u._backgroundColor,.75),E),L;if(m===!0){var D=_.getMaxDepth(u);isFinite(D)?_.isLeaf(n)?L=0:L=u._maxVisibleLayers-(n.data.depth-u._entryDepth):L=n.data.height+1}else L=n.data.depth-u._entryDepth,u._atRootLevel||L++;if(L>0)for(var A=0;A<L;A++){var C=.5*A/L;E=P.combine(P.addOpacity(M,C),E)}}}r.style("stroke-width",p).call(P.fill,E).call(P.stroke,b).style("opacity",l)}z.exports={style:v,styleOne:y}},68875:function(z,B,e){var d=e(53522),P=e(1426).extendFlat,a=e(12663).axisHoverFormat;z.exports={y:d.y,x:d.x,x0:d.x0,y0:d.y0,xhoverformat:a("x"),yhoverformat:a("y"),name:P({},d.name,{}),orientation:P({},d.orientation,{}),bandwidth:{valType:"number",min:0,editType:"calc"},scalegroup:{valType:"string",dflt:"",editType:"calc"},scalemode:{valType:"enumerated",values:["width","count"],dflt:"width",editType:"calc"},spanmode:{valType:"enumerated",values:["soft","hard","manual"],dflt:"soft",editType:"calc"},span:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:d.fillcolor,points:P({},d.boxpoints,{}),jitter:P({},d.jitter,{}),pointpos:P({},d.pointpos,{}),width:P({},d.width,{}),marker:d.marker,text:d.text,hovertext:d.hovertext,hovertemplate:d.hovertemplate,quartilemethod:d.quartilemethod,box:{visible:{valType:"boolean",dflt:!1,editType:"plot"},width:{valType:"number",min:0,max:1,dflt:.25,editType:"plot"},fillcolor:{valType:"color",editType:"style"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"plot"},meanline:{visible:{valType:"boolean",dflt:!1,editType:"plot"},color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"plot"},side:{valType:"enumerated",values:["both","positive","negative"],dflt:"both",editType:"calc"},offsetgroup:d.offsetgroup,alignmentgroup:d.alignmentgroup,selected:d.selected,unselected:d.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"}}},38603:function(z,B,e){var d=e(71828),P=e(89298),a=e(48518),_=e(60168),x=e(50606).BADNUM;z.exports=function(u,i){var f=a(u,i);if(f[0].t.empty)return f;for(var g=u._fullLayout,h=P.getFromId(u,i[i.orientation==="h"?"xaxis":"yaxis"]),b=1/0,p=-1/0,E=0,c=0,l=0;l<f.length;l++){var m=f[l],M=m.pts.map(_.extractVal),L=m.bandwidth=y(i,m,M),D=m.span=r(i,m,h,L);if(m.min===m.max&&L===0)D=m.span=[m.min,m.max],m.density=[{v:1,t:D[0]}],m.bandwidth=L,E=Math.max(E,1);else{var A=D[1]-D[0],C=Math.ceil(A/(L/3)),S=A/C;if(!isFinite(S)||!isFinite(C))return d.error("Something went wrong with computing the violin span"),f[0].t.empty=!0,f;var o=_.makeKDE(m,i,M);m.density=new Array(C);for(var R=0,T=D[0];T<D[1]+S/2;R++,T+=S){var O=o(T);m.density[R]={v:O,t:T},E=Math.max(E,O)}}c=Math.max(c,M.length),b=Math.min(b,D[0]),p=Math.max(p,D[1])}var N=P.findExtremes(h,[b,p],{padded:!0});if(i._extremes[h._id]=N,i.width)f[0].t.maxKDE=E;else{var H=g._violinScaleGroupStats,k=i.scalegroup,V=H[k];V?(V.maxKDE=Math.max(V.maxKDE,E),V.maxCount=Math.max(V.maxCount,c)):H[k]={maxKDE:E,maxCount:c}}return f[0].t.labels.kde=d._(u,"kde:"),f};function v(n,u,i){var f=Math.min(u,i/1.349);return 1.059*f*Math.pow(n,-.2)}function y(n,u,i){var f=u.max-u.min;if(!f)return n.bandwidth?n.bandwidth:0;if(n.bandwidth)return Math.max(n.bandwidth,f/1e4);var g=i.length,h=d.stdev(i,g-1,u.mean);return Math.max(v(g,h,u.q3-u.q1),f/100)}function r(n,u,i,f){var g=n.spanmode,h=n.span||[],b=[u.min,u.max],p=[u.min-2*f,u.max+2*f],E;function c(m){var M=h[m],L=i.type==="multicategory"?i.r2c(M):i.d2c(M,0,n[u.valLetter+"calendar"]);return L===x?p[m]:L}g==="soft"?E=p:g==="hard"?E=b:E=[c(0),c(1)];var l={type:"linear",range:E};return P.setConvert(l),l.cleanRange(),E}},86403:function(z,B,e){var d=e(37188).setPositionOffset,P=["v","h"];z.exports=function(_,x){for(var v=_.calcdata,y=x.xaxis,r=x.yaxis,n=0;n<P.length;n++){for(var u=P[n],i=u==="h"?r:y,f=[],g=0;g<v.length;g++){var h=v[g],b=h[0].t,p=h[0].trace;p.visible===!0&&p.type==="violin"&&!b.empty&&p.orientation===u&&p.xaxis===y._id&&p.yaxis===r._id&&f.push(g)}d("violin",_,f,i)}}},15899:function(z,B,e){var d=e(71828),P=e(7901),a=e(36411),_=e(68875);z.exports=function(v,y,r,n){function u(S,o){return d.coerce(v,y,_,S,o)}function i(S,o){return d.coerce2(v,y,_,S,o)}if(a.handleSampleDefaults(v,y,u,n),y.visible!==!1){u("bandwidth"),u("side");var f=u("width");f||(u("scalegroup",y.name),u("scalemode"));var g=u("span"),h;Array.isArray(g)&&(h="manual"),u("spanmode",h);var b=u("line.color",(v.marker||{}).color||r),p=u("line.width"),E=u("fillcolor",P.addOpacity(y.line.color,.5));a.handlePointsDefaults(v,y,u,{prefix:""});var c=i("box.width"),l=i("box.fillcolor",E),m=i("box.line.color",b),M=i("box.line.width",p),L=u("box.visible",Boolean(c||l||m||M));L||(y.box={visible:!1});var D=i("meanline.color",b),A=i("meanline.width",p),C=u("meanline.visible",Boolean(D||A));C||(y.meanline={visible:!1}),u("quartilemethod")}}},60168:function(z,B,e){var d=e(71828),P={gaussian:function(a){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*a*a)}};B.makeKDE=function(a,_,x){var v=x.length,y=P.gaussian,r=a.bandwidth,n=1/(v*r);return function(u){for(var i=0,f=0;f<v;f++)i+=y((u-x[f])/r);return n*i}},B.getPositionOnKdePath=function(a,_,x){var v,y;_.orientation==="h"?(v="y",y="x"):(v="x",y="y");var r=d.findPointOnPath(a.path,x,y,{pathLength:a.pathLength}),n=a.posCenterPx,u=r[v],i=_.side==="both"?2*n-u:n;return[u,i]},B.getKdeValue=function(a,_,x){var v=a.pts.map(B.extractVal),y=B.makeKDE(a,_,v);return y(x)/a.posDensityScale},B.extractVal=function(a){return a.v}},57634:function(z,B,e){var d=e(7901),P=e(71828),a=e(89298),_=e(41868),x=e(60168);z.exports=function(y,r,n,u,i){i||(i={});var f=i.hoverLayer,g=y.cd,h=g[0].trace,b=h.hoveron,p=b.indexOf("violins")!==-1,E=b.indexOf("kde")!==-1,c=[],l,m;if(p||E){var M=_.hoverOnBoxes(y,r,n,u);if(E&&M.length>0){var L=y.xa,D=y.ya,A,C,S,o,R;h.orientation==="h"?(R=r,A="y",S=D,C="x",o=L):(R=n,A="x",S=L,C="y",o=D);var T=g[y.index];if(R>=T.span[0]&&R<=T.span[1]){var O=P.extendFlat({},y),N=o.c2p(R,!0),H=x.getKdeValue(T,h,R),k=x.getPositionOnKdePath(T,h,N),V=S._offset,G=S._length;O[A+"0"]=k[0],O[A+"1"]=k[1],O[C+"0"]=O[C+"1"]=N,O[C+"Label"]=C+": "+a.hoverLabelText(o,R,h[C+"hoverformat"])+", "+g[0].t.labels.kde+" "+H.toFixed(3);for(var U=0,Y=0;Y<M.length;Y++)if(M[Y].attr==="med"){U=Y;break}O.spikeDistance=M[U].spikeDistance;var ee=A+"Spike";O[ee]=M[U][ee],M[U].spikeDistance=void 0,M[U][ee]=void 0,O.hovertemplate=!1,c.push(O),m={},m[A+"1"]=P.constrain(V+k[0],V,V+G),m[A+"2"]=P.constrain(V+k[1],V,V+G),m[C+"1"]=m[C+"2"]=o._offset+N}}p&&(c=c.concat(M))}b.indexOf("points")!==-1&&(l=_.hoverOnPoints(y,r,n));var re=f.selectAll(".violinline-"+h.uid).data(m?[0]:[]);return re.enter().append("line").classed("violinline-"+h.uid,!0).attr("stroke-width",1.5),re.exit().remove(),re.attr(m).call(d.stroke,y.color),u==="closest"?l?[l]:c:(l&&c.push(l),c)}},47462:function(z,B,e){z.exports={attributes:e(68875),layoutAttributes:e(9228),supplyDefaults:e(15899),crossTraceDefaults:e(36411).crossTraceDefaults,supplyLayoutDefaults:e(33598),calc:e(38603),crossTraceCalc:e(86403),plot:e(28443),style:e(31847),styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(57634),selectPoints:e(24626),moduleType:"trace",name:"violin",basePlotModule:e(93612),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}},9228:function(z,B,e){var d=e(40094),P=e(71828).extendFlat;z.exports={violinmode:P({},d.boxmode,{}),violingap:P({},d.boxgap,{}),violingroupgap:P({},d.boxgroupgap,{})}},33598:function(z,B,e){var d=e(71828),P=e(9228),a=e(4199);z.exports=function(x,v,y){function r(n,u){return d.coerce(x,v,P,n,u)}a._supply(x,v,y,r,"violin")}},28443:function(z,B,e){var d=e(39898),P=e(71828),a=e(91424),_=e(86047),x=e(34621),v=e(60168);z.exports=function(r,n,u,i){var f=r._context.staticPlot,g=r._fullLayout,h=n.xaxis,b=n.yaxis;function p(E,c){var l=x(E,{xaxis:h,yaxis:b,trace:c,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return a.smoothopen(l[0],1)}P.makeTraceGroups(i,u,"trace violins").each(function(E){var c=d.select(this),l=E[0],m=l.t,M=l.trace;if(M.visible!==!0||m.empty){c.remove();return}var L=m.bPos,D=m.bdPos,A=n[m.valLetter+"axis"],C=n[m.posLetter+"axis"],S=M.side==="both",o=S||M.side==="positive",R=S||M.side==="negative",T=c.selectAll("path.violin").data(P.identity);T.enter().append("path").style("vector-effect",f?"none":"non-scaling-stroke").attr("class","violin"),T.exit().remove(),T.each(function(Y){var ee=d.select(this),re=Y.density,ie=re.length,se=C.c2l(Y.pos+L,!0),ce=C.l2p(se),q;if(M.width)q=m.maxKDE/D;else{var j=g._violinScaleGroupStats[M.scalegroup];q=M.scalemode==="count"?j.maxKDE/D*(j.maxCount/Y.pts.length):j.maxKDE/D}var Z,Q,ue,fe,te,ne,ve;if(o){for(ne=new Array(ie),fe=0;fe<ie;fe++)ve=ne[fe]={},ve[m.posLetter]=se+re[fe].v/q,ve[m.valLetter]=A.c2l(re[fe].t,!0);Z=p(ne,M)}if(R){for(ne=new Array(ie),te=0,fe=ie-1;te<ie;te++,fe--)ve=ne[te]={},ve[m.posLetter]=se-re[fe].v/q,ve[m.valLetter]=A.c2l(re[fe].t,!0);Q=p(ne,M)}if(S)ue=Z+"L"+Q.substr(1)+"Z";else{var le=[ce,A.c2p(re[0].t)],xe=[ce,A.c2p(re[ie-1].t)];M.orientation==="h"&&(le.reverse(),xe.reverse()),o?ue="M"+le+"L"+Z.substr(1)+"L"+xe:ue="M"+xe+"L"+Q.substr(1)+"L"+le}ee.attr("d",ue),Y.posCenterPx=ce,Y.posDensityScale=q*D,Y.path=ee.node(),Y.pathLength=Y.path.getTotalLength()/(S?2:1)});var O=M.box,N=O.width,H=(O.line||{}).width,k,V;S?(k=D*N,V=0):o?(k=[0,D*N/2],V=H*{x:1,y:-1}[m.posLetter]):(k=[D*N/2,0],V=H*{x:-1,y:1}[m.posLetter]),_.plotBoxAndWhiskers(c,{pos:C,val:A},M,{bPos:L,bdPos:k,bPosPxOffset:V}),_.plotBoxMean(c,{pos:C,val:A},M,{bPos:L,bdPos:k,bPosPxOffset:V});var G;!M.box.visible&&M.meanline.visible&&(G=P.identity);var U=c.selectAll("path.meanline").data(G||[]);U.enter().append("path").attr("class","meanline").style("fill","none").style("vector-effect",f?"none":"non-scaling-stroke"),U.exit().remove(),U.each(function(Y){var ee=A.c2p(Y.mean,!0),re=v.getPositionOnKdePath(Y,M,ee);d.select(this).attr("d",M.orientation==="h"?"M"+ee+","+re[0]+"V"+re[1]:"M"+re[0]+","+ee+"H"+re[1])}),_.plotPoints(c,{x:h,y:b},M,m)})}},31847:function(z,B,e){var d=e(39898),P=e(7901),a=e(16296).stylePoints;z.exports=function(x){var v=d.select(x).selectAll("g.trace.violins");v.style("opacity",function(y){return y[0].trace.opacity}),v.each(function(y){var r=y[0].trace,n=d.select(this),u=r.box||{},i=u.line||{},f=r.meanline||{},g=f.width;n.selectAll("path.violin").style("stroke-width",r.line.width+"px").call(P.stroke,r.line.color).call(P.fill,r.fillcolor),n.selectAll("path.box").style("stroke-width",i.width+"px").call(P.stroke,i.color).call(P.fill,u.fillcolor);var h={"stroke-width":g+"px","stroke-dasharray":2*g+"px,"+g+"px"};n.selectAll("path.mean").style(h).call(P.stroke,f.color),n.selectAll("path.meanline").style(h).call(P.stroke,f.color),a(n,r,x)})}},16336:function(z,B,e){var d=e(50693),P=e(16249),a=e(54532),_=e(9012),x=e(1426).extendFlat,v=e(30962).overrideAll,y=z.exports=v(x({x:P.x,y:P.y,z:P.z,value:P.value,isomin:P.isomin,isomax:P.isomax,surface:P.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:P.slices,caps:P.caps,text:P.text,hovertext:P.hovertext,xhoverformat:P.xhoverformat,yhoverformat:P.yhoverformat,zhoverformat:P.zhoverformat,valuehoverformat:P.valuehoverformat,hovertemplate:P.hovertemplate},d("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:P.colorbar,opacity:P.opacity,opacityscale:a.opacityscale,lightposition:P.lightposition,lighting:P.lighting,flatshading:P.flatshading,contour:P.contour,hoverinfo:x({},_.hoverinfo),showlegend:x({},_.showlegend,{dflt:!1})}),"calc","nested");y.x.editType=y.y.editType=y.z.editType=y.value.editType="calc+clearAxisTypes",y.transforms=void 0},64809:function(z,B,e){var d=e(9330).gl_mesh3d,P=e(81697).parseColorScale,a=e(78614),_=e(21081).extractOpts,x=e(90060),v=e(22674).findNearestOnAxis,y=e(22674).generateIsoMeshes;function r(i,f,g){this.scene=i,this.uid=g,this.mesh=f,this.name="",this.data=null,this.showContour=!1}var n=r.prototype;n.handlePick=function(i){if(i.object===this.mesh){var f=i.data.index,g=this.data._meshX[f],h=this.data._meshY[f],b=this.data._meshZ[f],p=this.data._Ys.length,E=this.data._Zs.length,c=v(g,this.data._Xs).id,l=v(h,this.data._Ys).id,m=v(b,this.data._Zs).id,M=i.index=m+E*l+E*p*c;i.traceCoordinate=[this.data._meshX[M],this.data._meshY[M],this.data._meshZ[M],this.data._value[M]];var L=this.data.hovertext||this.data.text;return Array.isArray(L)&&L[M]!==void 0?i.textLabel=L[M]:L&&(i.textLabel=L),!0}},n.update=function(i){var f=this.scene,g=f.fullSceneLayout;this.data=y(i);function h(l,m,M,L){return m.map(function(D){return l.d2l(D,0,L)*M})}var b=x(h(g.xaxis,i._meshX,f.dataScale[0],i.xcalendar),h(g.yaxis,i._meshY,f.dataScale[1],i.ycalendar),h(g.zaxis,i._meshZ,f.dataScale[2],i.zcalendar)),p=x(i._meshI,i._meshJ,i._meshK),E={positions:b,cells:p,lightPosition:[i.lightposition.x,i.lightposition.y,i.lightposition.z],ambient:i.lighting.ambient,diffuse:i.lighting.diffuse,specular:i.lighting.specular,roughness:i.lighting.roughness,fresnel:i.lighting.fresnel,vertexNormalsEpsilon:i.lighting.vertexnormalsepsilon,faceNormalsEpsilon:i.lighting.facenormalsepsilon,opacity:i.opacity,opacityscale:i.opacityscale,contourEnable:i.contour.show,contourColor:a(i.contour.color).slice(0,3),contourWidth:i.contour.width,useFacetNormals:i.flatshading},c=_(i);E.vertexIntensity=i._meshIntensity,E.vertexIntensityBounds=[c.min,c.max],E.colormap=P(i),this.mesh.update(E)},n.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function u(i,f){var g=i.glplot.gl,h=d({gl:g}),b=new r(i,h,f.uid);return h._trace=b,b.update(f),i.glplot.add(h),b}z.exports=u},47651:function(z,B,e){var d=e(71828),P=e(16336),a=e(82738).supplyIsoDefaults,_=e(91831).opacityscaleDefaults;z.exports=function(v,y,r,n){function u(i,f){return d.coerce(v,y,P,i,f)}a(v,y,r,n,u),_(v,y,n,u)}},17659:function(z,B,e){z.exports={attributes:e(16336),supplyDefaults:e(47651),calc:e(56959),colorbar:{min:"cmin",max:"cmax"},plot:e(64809),moduleType:"trace",name:"volume",basePlotModule:e(58547),categories:["gl3d","showLegend"],meta:{}}},43037:function(z,B,e){var d=e(1486),P=e(82196).line,a=e(9012),_=e(12663).axisHoverFormat,x=e(5386).f,v=e(5386).s,y=e(48334),r=e(1426).extendFlat,n=e(7901);function u(i){return{marker:{color:r({},d.marker.color,{arrayOk:!1,editType:"style"}),line:{color:r({},d.marker.line.color,{arrayOk:!1,editType:"style"}),width:r({},d.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}z.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:d.x,x0:d.x0,dx:d.dx,y:d.y,y0:d.y0,dy:d.dy,xperiod:d.xperiod,yperiod:d.yperiod,xperiod0:d.xperiod0,yperiod0:d.yperiod0,xperiodalignment:d.xperiodalignment,yperiodalignment:d.yperiodalignment,xhoverformat:_("x"),yhoverformat:_("y"),hovertext:d.hovertext,hovertemplate:x({},{keys:y.eventDataKeys}),hoverinfo:r({},a.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:v({editType:"plot"},{keys:y.eventDataKeys.concat(["label"])}),text:d.text,textposition:d.textposition,insidetextanchor:d.insidetextanchor,textangle:d.textangle,textfont:d.textfont,insidetextfont:d.insidetextfont,outsidetextfont:d.outsidetextfont,constraintext:d.constraintext,cliponaxis:d.cliponaxis,orientation:d.orientation,offset:d.offset,width:d.width,increasing:u(),decreasing:u(),totals:u(),connector:{line:{color:r({},P.color,{dflt:n.defaultLine}),width:r({},P.width,{editType:"plot"}),dash:P.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:d.offsetgroup,alignmentgroup:d.alignmentgroup}},52752:function(z,B,e){var d=e(89298),P=e(42973),a=e(71828).mergeArray,_=e(66279),x=e(50606).BADNUM;function v(r){return r==="a"||r==="absolute"}function y(r){return r==="t"||r==="total"}z.exports=function(n,u){var i=d.getFromId(n,u.xaxis||"x"),f=d.getFromId(n,u.yaxis||"y"),g,h,b,p,E,c;u.orientation==="h"?(g=i.makeCalcdata(u,"x"),b=f.makeCalcdata(u,"y"),p=P(u,f,"y",b),E=!!u.yperiodalignment,c="y"):(g=f.makeCalcdata(u,"y"),b=i.makeCalcdata(u,"x"),p=P(u,i,"x",b),E=!!u.xperiodalignment,c="x"),h=p.vals;for(var l=Math.min(h.length,g.length),m=new Array(l),M=0,L,D=!1,A=0;A<l;A++){var C=g[A]||0,S=!1;(g[A]!==x||y(u.measure[A])||v(u.measure[A]))&&A+1<l&&(g[A+1]!==x||y(u.measure[A+1])||v(u.measure[A+1]))&&(S=!0);var o=m[A]={i:A,p:h[A],s:C,rawS:C,cNext:S};v(u.measure[A])?(M=o.s,o.isSum=!0,o.dir="totals",o.s=M):y(u.measure[A])?(o.isSum=!0,o.dir="totals",o.s=M):(o.isSum=!1,o.dir=o.rawS<0?"decreasing":"increasing",L=o.s,o.s=M+L,M+=L),o.dir==="totals"&&(D=!0),E&&(m[A].orig_p=b[A],m[A][c+"End"]=p.ends[A],m[A][c+"Start"]=p.starts[A]),u.ids&&(o.id=String(u.ids[A])),o.v=(u.base||0)+M}return m.length&&(m[0].hasTotals=D),a(u.text,m,"tx"),a(u.hovertext,m,"htx"),_(m,u),m}},48334:function(z){z.exports={eventDataKeys:["initial","delta","final"]}},70766:function(z,B,e){var d=e(11661).setGroupPositions;z.exports=function(a,_){var x=a._fullLayout,v=a._fullData,y=a.calcdata,r=_.xaxis,n=_.yaxis,u=[],i=[],f=[],g,h;for(h=0;h<v.length;h++){var b=v[h];b.visible===!0&&b.xaxis===r._id&&b.yaxis===n._id&&b.type==="waterfall"&&(g=y[h],b.orientation==="h"?f.push(g):i.push(g),u.push(g))}var p={mode:x.waterfallmode,norm:x.waterfallnorm,gap:x.waterfallgap,groupgap:x.waterfallgroupgap};for(d(a,r,n,i,p),d(a,n,r,f,p),h=0;h<u.length;h++){g=u[h];for(var E=0;E<g.length;E++){var c=g[E];c.isSum===!1&&(c.s0+=E===0?0:g[E-1].s),E+1<g.length&&(g[E].nextP0=g[E+1].p0,g[E].nextS0=g[E+1].s0)}}}},83266:function(z,B,e){var d=e(71828),P=e(26125),a=e(90769).handleText,_=e(67513),x=e(73927),v=e(43037),y=e(7901),r=e(22372),n=r.INCREASING.COLOR,u=r.DECREASING.COLOR,i="#4499FF";function f(b,p,E){b(p+".marker.color",E),b(p+".marker.line.color",y.defaultLine),b(p+".marker.line.width")}function g(b,p,E,c){function l(A,C){return d.coerce(b,p,v,A,C)}var m=_(b,p,c,l);if(!m){p.visible=!1;return}x(b,p,c,l),l("xhoverformat"),l("yhoverformat"),l("measure"),l("orientation",p.x&&!p.y?"h":"v"),l("base"),l("offset"),l("width"),l("text"),l("hovertext"),l("hovertemplate");var M=l("textposition");a(b,p,c,l,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),p.textposition!=="none"&&(l("texttemplate"),p.texttemplate||l("textinfo")),f(l,"increasing",n),f(l,"decreasing",u),f(l,"totals",i);var L=l("connector.visible");if(L){l("connector.mode");var D=l("connector.line.width");D&&(l("connector.line.color"),l("connector.line.dash"))}}function h(b,p){var E,c;function l(M){return d.coerce(c._input,c,v,M)}if(p.waterfallmode==="group")for(var m=0;m<b.length;m++)c=b[m],E=c._input,P(E,c,p,l)}z.exports={supplyDefaults:g,crossTraceDefaults:h}},58593:function(z){z.exports=function(e,d){return e.x="xVal"in d?d.xVal:d.x,e.y="yVal"in d?d.yVal:d.y,"initial"in d&&(e.initial=d.initial),"delta"in d&&(e.delta=d.delta),"final"in d&&(e.final=d.final),d.xa&&(e.xaxis=d.xa),d.ya&&(e.yaxis=d.ya),e}},61326:function(z,B,e){var d=e(89298).hoverLabelText,P=e(7901).opacity,a=e(95423).hoverOnBars,_=e(22372),x={increasing:_.INCREASING.SYMBOL,decreasing:_.DECREASING.SYMBOL};z.exports=function(r,n,u,i,f){var g=a(r,n,u,i,f);if(!g)return;var h=g.cd,b=h[0].trace,p=b.orientation==="h",E=p?"x":"y",c=p?r.xa:r.ya;function l(T){return d(c,T,b[E+"hoverformat"])}var m=g.index,M=h[m],L=M.isSum?M.b+M.s:M.rawS;if(!M.isSum){g.initial=M.b+M.s-L,g.delta=L,g.final=g.initial+g.delta;var D=l(Math.abs(g.delta));g.deltaLabel=L<0?"("+D+")":D,g.finalLabel=l(g.final),g.initialLabel=l(g.initial)}var A=M.hi||b.hoverinfo,C=[];if(A&&A!=="none"&&A!=="skip"){var S=A==="all",o=A.split("+"),R=function(T){return S||o.indexOf(T)!==-1};M.isSum||(R("final")&&(p?!R("x"):!R("y"))&&C.push(g.finalLabel),R("delta")&&(L<0?C.push(g.deltaLabel+" "+x.decreasing):C.push(g.deltaLabel+" "+x.increasing)),R("initial")&&C.push("Initial: "+g.initialLabel))}return C.length&&(g.extraText=C.join("<br>")),g.color=v(b,M),[g]};function v(y,r){var n=y[r.dir].marker,u=n.color,i=n.line.color,f=n.line.width;if(P(u))return u;if(P(i)&&f)return i}},19990:function(z,B,e){z.exports={attributes:e(43037),layoutAttributes:e(13494),supplyDefaults:e(83266).supplyDefaults,crossTraceDefaults:e(83266).crossTraceDefaults,supplyLayoutDefaults:e(5176),calc:e(52752),crossTraceCalc:e(70766),plot:e(30436),style:e(55750).style,hoverPoints:e(61326),eventData:e(58593),selectPoints:e(81974),moduleType:"trace",name:"waterfall",basePlotModule:e(93612),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},13494:function(z){z.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},5176:function(z,B,e){var d=e(71828),P=e(13494);z.exports=function(a,_,x){var v=!1;function y(u,i){return d.coerce(a,_,P,u,i)}for(var r=0;r<x.length;r++){var n=x[r];if(n.visible&&n.type==="waterfall"){v=!0;break}}v&&(y("waterfallmode"),y("waterfallgap",.2),y("waterfallgroupgap"))}},30436:function(z,B,e){var d=e(39898),P=e(71828),a=e(91424),_=e(50606).BADNUM,x=e(17295),v=e(72597).clearMinTextSize;z.exports=function(u,i,f,g){var h=u._fullLayout;v("waterfall",h),x.plot(u,i,f,g,{mode:h.waterfallmode,norm:h.waterfallmode,gap:h.waterfallgap,groupgap:h.waterfallgroupgap}),y(u,i,f,g)};function y(n,u,i,f){var g=u.xaxis,h=u.yaxis;P.makeTraceGroups(f,i,"trace bars").each(function(b){var p=d.select(this),E=b[0].trace,c=P.ensureSingle(p,"g","lines");if(!E.connector||!E.connector.visible){c.remove();return}var l=E.orientation==="h",m=E.connector.mode,M=c.selectAll("g.line").data(P.identity);M.enter().append("g").classed("line",!0),M.exit().remove();var L=M.size();M.each(function(D,A){if(!(A!==L-1&&!D.cNext)){var C=r(D,g,h,l),S=C[0],o=C[1],R="";S[0]!==_&&o[0]!==_&&S[1]!==_&&o[1]!==_&&(m==="spanning"&&!D.isSum&&A>0&&(l?R+="M"+S[0]+","+o[1]+"V"+o[0]:R+="M"+S[1]+","+o[0]+"H"+S[0]),m!=="between"&&(D.isSum||A<L-1)&&(l?R+="M"+S[1]+","+o[0]+"V"+o[1]:R+="M"+S[0]+","+o[1]+"H"+S[1]),S[2]!==_&&o[2]!==_&&(l?R+="M"+S[1]+","+o[1]+"V"+o[2]:R+="M"+S[1]+","+o[1]+"H"+S[2])),R===""&&(R="M0,0Z"),P.ensureSingle(d.select(this),"path").attr("d",R).call(a.setClipUrl,u.layerClipId,n)}})})}function r(n,u,i,f){var g=[],h=[],b=f?u:i,p=f?i:u;return g[0]=b.c2p(n.s0,!0),h[0]=p.c2p(n.p0,!0),g[1]=b.c2p(n.s1,!0),h[1]=p.c2p(n.p1,!0),g[2]=b.c2p(n.nextS0,!0),h[2]=p.c2p(n.nextP0,!0),f?[g,h]:[h,g]}},55750:function(z,B,e){var d=e(39898),P=e(91424),a=e(7901),_=e(37822).DESELECTDIM,x=e(16688),v=e(72597).resizeText,y=x.styleTextPoints;function r(n,u,i){var f=i||d.select(n).selectAll("g.waterfalllayer").selectAll("g.trace");v(n,f,"waterfall"),f.style("opacity",function(g){return g[0].trace.opacity}),f.each(function(g){var h=d.select(this),b=g[0].trace;h.selectAll(".point > path").each(function(p){if(!p.isBlank){var E=b[p.dir].marker;d.select(this).call(a.fill,E.color).call(a.stroke,E.line.color).call(P.dashLine,E.line.dash,E.line.width).style("opacity",b.selectedpoints&&!p.selected?_:1)}}),y(h,b,n),h.selectAll(".lines").each(function(){var p=b.connector.line;P.lineGroupStyle(d.select(this).selectAll("path"),p.width,p.color,p.dash)})})}z.exports={style:r}},82887:function(z,B,e){var d=e(89298),P=e(71828),a=e(86281),_=e(79344).p,x=e(50606).BADNUM;B.moduleType="transform",B.name="aggregate";var v=B.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},y=v.aggregations;B.supplyDefaults=function(g,h){var b={},p;function E(T,O){return P.coerce(g,b,v,T,O)}var c=E("enabled");if(!c)return b;var l=a.findArrayAttributes(h),m={};for(p=0;p<l.length;p++)m[l[p]]=1;var M=E("groups");if(!Array.isArray(M)){if(!m[M])return b.enabled=!1,b;m[M]=0}var L=g.aggregations||[],D=b.aggregations=new Array(L.length),A;function C(T,O){return P.coerce(L[p],A,y,T,O)}for(p=0;p<L.length;p++){A={_index:p};var S=C("target"),o=C("func"),R=C("enabled");R&&S&&(m[S]||o==="count"&&m[S]===void 0)?(o==="stddev"&&C("funcmode"),m[S]=0,D[p]=A):D[p]={enabled:!1,_index:p}}for(p=0;p<l.length;p++)m[l[p]]&&D.push({target:l[p],func:y.func.dflt,enabled:!0,_index:-1});return b},B.calcTransform=function(g,h,b){if(b.enabled){var p=b.groups,E=P.getTargetArray(h,{target:p});if(E){var c,l,m,M,L={},D={},A=[],C=_(h.transforms,b),S=E.length;for(h._length&&(S=Math.min(S,h._length)),c=0;c<S;c++)l=E[c],m=L[l],m===void 0?(L[l]=A.length,M=[c],A.push(M),D[L[l]]=C(c)):(A[m].push(c),D[L[l]]=(D[L[l]]||[]).concat(C(c)));b._indexToPoints=D;var o=b.aggregations;for(c=0;c<o.length;c++)r(g,h,A,o[c]);typeof p=="string"&&r(g,h,A,{target:p,func:"first",enabled:!0}),h._length=A.length}}};function r(g,h,b,p){if(p.enabled){for(var E=p.target,c=P.nestedProperty(h,E),l=c.get(),m=d.getDataConversions(g,h,E,l),M=n(p,m),L=new Array(b.length),D=0;D<b.length;D++)L[D]=M(l,b[D]);c.set(L),p.func==="count"&&P.pushUnique(h._arrayAttrs,E)}}function n(g,h){var b=g.func,p=h.d2c,E=h.c2d;switch(b){case"count":return u;case"first":return i;case"last":return f;case"sum":return function(c,l){for(var m=0,M=0;M<l.length;M++){var L=p(c[l[M]]);L!==x&&(m+=L)}return E(m)};case"avg":return function(c,l){for(var m=0,M=0,L=0;L<l.length;L++){var D=p(c[l[L]]);D!==x&&(m+=D,M++)}return M?E(m/M):x};case"min":return function(c,l){for(var m=1/0,M=0;M<l.length;M++){var L=p(c[l[M]]);L!==x&&(m=Math.min(m,L))}return m===1/0?x:E(m)};case"max":return function(c,l){for(var m=-1/0,M=0;M<l.length;M++){var L=p(c[l[M]]);L!==x&&(m=Math.max(m,L))}return m===-1/0?x:E(m)};case"range":return function(c,l){for(var m=1/0,M=-1/0,L=0;L<l.length;L++){var D=p(c[l[L]]);D!==x&&(m=Math.min(m,D),M=Math.max(M,D))}return M===-1/0||m===1/0?x:E(M-m)};case"change":return function(c,l){var m=p(c[l[0]]),M=p(c[l[l.length-1]]);return m===x||M===x?x:E(M-m)};case"median":return function(c,l){for(var m=[],M=0;M<l.length;M++){var L=p(c[l[M]]);L!==x&&m.push(L)}if(!m.length)return x;m.sort(P.sorterAsc);var D=(m.length-1)/2;return E((m[Math.floor(D)]+m[Math.ceil(D)])/2)};case"mode":return function(c,l){for(var m={},M=0,L=x,D=0;D<l.length;D++){var A=p(c[l[D]]);if(A!==x){var C=m[A]=(m[A]||0)+1;C>M&&(M=C,L=A)}}return M?E(L):x};case"rms":return function(c,l){for(var m=0,M=0,L=0;L<l.length;L++){var D=p(c[l[L]]);D!==x&&(m+=D*D,M++)}return M?E(Math.sqrt(m/M)):x};case"stddev":return function(c,l){var m=0,M=0,L=1,D=x,A;for(A=0;A<l.length&&D===x;A++)D=p(c[l[A]]);if(D===x)return x;for(;A<l.length;A++){var C=p(c[l[A]]);if(C!==x){var S=C-D;m+=S,M+=S*S,L++}}var o=g.funcmode==="sample"?L-1:L;return o?Math.sqrt((M-m*m/L)/o):0}}}function u(g,h){return h.length}function i(g,h){return g[h[0]]}function f(g,h){return g[h[h.length-1]]}},14382:function(z,B,e){var d=e(71828),P=e(73972),a=e(89298),_=e(79344).p,x=e(74808),v=x.COMPARISON_OPS,y=x.INTERVAL_OPS,r=x.SET_OPS;B.moduleType="transform",B.name="filter",B.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},operation:{valType:"enumerated",values:[].concat(v).concat(y).concat(r),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},preservegaps:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc"},B.supplyDefaults=function(u){var i={};function f(p,E){return d.coerce(u,i,B.attributes,p,E)}var g=f("enabled");if(g){var h=f("target");if(d.isArrayOrTypedArray(h)&&h.length===0)return i.enabled=!1,i;f("preservegaps"),f("operation"),f("value");var b=P.getComponentMethod("calendars","handleDefaults");b(u,i,"valuecalendar",null),b(u,i,"targetcalendar",null)}return i},B.calcTransform=function(u,i,f){if(!f.enabled)return;var g=d.getTargetArray(i,f);if(!g)return;var h=f.target,b=g.length;i._length&&(b=Math.min(b,i._length));var p=f.targetcalendar,E=i._arrayAttrs,c=f.preservegaps;if(typeof h=="string"){var l=d.nestedProperty(i,h+"calendar").get();l&&(p=l)}var m=a.getDataToCoordFunc(u,i,h,g),M=n(f,m,p),L={},D={},A=0;function C(N,H){for(var k=0;k<E.length;k++){var V=d.nestedProperty(i,E[k]);N(V,H)}}var S,o;c?(S=function(N){L[N.astr]=d.extendDeep([],N.get()),N.set(new Array(b))},o=function(N,H){var k=L[N.astr][H];N.get()[H]=k}):(S=function(N){L[N.astr]=d.extendDeep([],N.get()),N.set([])},o=function(N,H){var k=L[N.astr][H];N.get().push(k)}),C(S);for(var R=_(i.transforms,f),T=0;T<b;T++){var O=M(g[T]);O?(C(o,T),D[A++]=R(T)):c&&A++}f._indexToPoints=D,i._length=A};function n(u,i,f){var g=u.operation,h=u.value,b=Array.isArray(h);function p(m){return m.indexOf(g)!==-1}var E=function(m){return i(m,0,u.valuecalendar)},c=function(m){return i(m,0,f)},l;switch(p(v)?l=E(b?h[0]:h):p(y)?l=b?[E(h[0]),E(h[1])]:[E(h),E(h)]:p(r)&&(l=b?h.map(E):[E(h)]),g){case"=":return function(m){return c(m)===l};case"!=":return function(m){return c(m)!==l};case"<":return function(m){return c(m)<l};case"<=":return function(m){return c(m)<=l};case">":return function(m){return c(m)>l};case">=":return function(m){return c(m)>=l};case"[]":return function(m){var M=c(m);return M>=l[0]&&M<=l[1]};case"()":return function(m){var M=c(m);return M>l[0]&&M<l[1]};case"[)":return function(m){var M=c(m);return M>=l[0]&&M<l[1]};case"(]":return function(m){var M=c(m);return M>l[0]&&M<=l[1]};case"][":return function(m){var M=c(m);return M<=l[0]||M>=l[1]};case")(":return function(m){var M=c(m);return M<l[0]||M>l[1]};case"](":return function(m){var M=c(m);return M<=l[0]||M>l[1]};case")[":return function(m){var M=c(m);return M<l[0]||M>=l[1]};case"{}":return function(m){return l.indexOf(c(m))!==-1};case"}{":return function(m){return l.indexOf(c(m))===-1}}}},43102:function(z,B,e){var d=e(71828),P=e(86281),a=e(74875),_=e(79344).p;B.moduleType="transform",B.name="groupby",B.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"data_array",dflt:[],editType:"calc"},nameformat:{valType:"string",editType:"calc"},styles:{_isLinkedToArray:"style",target:{valType:"string",editType:"calc"},value:{valType:"any",dflt:{},editType:"calc",_compareAsJSON:!0},editType:"calc"},editType:"calc"},B.supplyDefaults=function(v,y,r){var n,u={};function i(E,c){return d.coerce(v,u,B.attributes,E,c)}var f=i("enabled");if(!f)return u;i("groups"),i("nameformat",r._dataLength>1?"%{group} (%{trace})":"%{group}");var g=v.styles,h=u.styles=[];if(g)for(n=0;n<g.length;n++){var b=h[n]={};d.coerce(g[n],h[n],B.attributes.styles,"target");var p=d.coerce(g[n],h[n],B.attributes.styles,"value");d.isPlainObject(p)?b.value=d.extendDeep({},p):p&&delete b.value}return u},B.transform=function(v,y){var r,n,u,i=[];for(n=0;n<v.length;n++)for(r=x(v[n],y),u=0;u<r.length;u++)i.push(r[u]);return i};function x(v,y){var r,n,u,i,f,g,h,b,p,E,c=y.transform,l=y.transformIndex,m=v.transforms[l].groups,M=_(v.transforms,c);if(!d.isArrayOrTypedArray(m)||m.length===0)return[v];var L=d.filterUnique(m),D=new Array(L.length),A=m.length,C=P.findArrayAttributes(v),S=c.styles||[],o={};for(r=0;r<S.length;r++)o[S[r].target]=S[r].value;c.styles&&(E=d.keyedContainer(c,"styles","target","value.name"));var R={},T={};for(r=0;r<L.length;r++){g=L[r],R[g]=r,T[g]=0,h=D[r]=d.extendDeepNoArrays({},v),h._group=g,h.transforms[l]._indexToPoints={};var O=null;for(E&&(O=E.get(g)),O||O===""?h.name=O:h.name=d.templateString(c.nameformat,{trace:v.name,group:g}),b=h.transforms,h.transforms=[],n=0;n<b.length;n++)h.transforms[n]=d.extendDeepNoArrays({},b[n]);for(n=0;n<C.length;n++)d.nestedProperty(h,C[n]).set([])}for(u=0;u<C.length;u++){for(i=C[u],n=0,p=[];n<L.length;n++)p[n]=d.nestedProperty(D[n],i).get();for(f=d.nestedProperty(v,i).get(),n=0;n<A;n++)p[R[m[n]]].push(f[n])}for(n=0;n<A;n++){h=D[R[m[n]]];var N=h.transforms[l]._indexToPoints;N[T[m[n]]]=M(n),T[m[n]]++}for(r=0;r<L.length;r++)g=L[r],h=D[r],a.clearExpandedTraceDefaultColors(h),h=d.extendDeepNoArrays(h,o[g]||{});return D}},79344:function(z,B){B.p=function(e,d){for(var P,a,_=0;_<e.length&&(P=e[_],P!==d);_++)!P._indexToPoints||P.enabled===!1||(a=P._indexToPoints);var x=a?function(v){return a[v]}:function(v){return[v]};return x}},32275:function(z,B,e){var d=e(71828),P=e(89298),a=e(79344).p,_=e(50606).BADNUM;B.moduleType="transform",B.name="sort",B.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},order:{valType:"enumerated",values:["ascending","descending"],dflt:"ascending",editType:"calc"},editType:"calc"},B.supplyDefaults=function(y){var r={};function n(i,f){return d.coerce(y,r,B.attributes,i,f)}var u=n("enabled");return u&&(n("target"),n("order")),r},B.calcTransform=function(y,r,n){if(n.enabled){var u=d.getTargetArray(r,n);if(u){var i=n.target,f=u.length;r._length&&(f=Math.min(f,r._length));var g=r._arrayAttrs,h=P.getDataToCoordFunc(y,r,i,u),b=x(n,u,h,f),p=a(r.transforms,n),E={},c,l;for(c=0;c<g.length;c++){var m=d.nestedProperty(r,g[c]),M=m.get(),L=new Array(f);for(l=0;l<f;l++)L[l]=M[b[l]];m.set(L)}for(l=0;l<f;l++)E[l]=p(b[l]);n._indexToPoints=E,r._length=f}}};function x(y,r,n,u){var i=new Array(u),f=new Array(u),g;for(g=0;g<u;g++)i[g]={v:r[g],i:g};for(i.sort(v(y,n)),g=0;g<u;g++)f[g]=i[g].i;return f}function v(y,r){switch(y.order){case"ascending":return function(n,u){var i=r(n.v),f=r(u.v);return i===_?1:f===_?-1:i-f};case"descending":return function(n,u){var i=r(n.v),f=r(u.v);return i===_?1:f===_?-1:f-i}}}},11506:function(z,B){B.version="2.18.2"},9330:function(z,B,e){var d=e(90386);(function(a,_){z.exports=_()})(self,function(){return function(){var P={7386:function(v,y,r){v.exports={alpha_shape:r(2350),convex_hull:r(5537),delaunay_triangulate:r(4419),gl_cone3d:r(1140),gl_error3d:r(3110),gl_heatmap2d:r(6386),gl_line3d:r(6086),gl_mesh3d:r(8116),gl_plot2d:r(2117),gl_plot3d:r(1059),gl_pointcloud2d:r(8271),gl_scatter3d:r(2182),gl_select_box:r(6623),gl_spikes2d:r(3050),gl_streamtube3d:r(7307),gl_surface3d:r(3754),ndarray:r(5050),ndarray_linear_interpolate:r(3581)}},2146:function(v,y,r){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/function n(Ce,pe){if(!(Ce instanceof pe))throw new TypeError("Cannot call a class as a function")}function u(Ce,pe){for(var we=0;we<pe.length;we++){var Ae=pe[we];Ae.enumerable=Ae.enumerable||!1,Ae.configurable=!0,"value"in Ae&&(Ae.writable=!0),Object.defineProperty(Ce,Ae.key,Ae)}}function i(Ce,pe,we){return pe&&u(Ce.prototype,pe),we&&u(Ce,we),Object.defineProperty(Ce,"prototype",{writable:!1}),Ce}function f(Ce,pe){if(typeof pe!="function"&&pe!==null)throw new TypeError("Super expression must either be null or a function");Ce.prototype=Object.create(pe&&pe.prototype,{constructor:{value:Ce,writable:!0,configurable:!0}}),Object.defineProperty(Ce,"prototype",{writable:!1}),pe&&g(Ce,pe)}function g(Ce,pe){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Ae,Pe){return Ae.__proto__=Pe,Ae},g(Ce,pe)}function h(Ce){var pe=E();return function(){var Ae=c(Ce),Pe;if(pe){var Ge=c(this).constructor;Pe=Reflect.construct(Ae,arguments,Ge)}else Pe=Ae.apply(this,arguments);return b(this,Pe)}}function b(Ce,pe){if(pe&&(l(pe)==="object"||typeof pe=="function"))return pe;if(pe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return p(Ce)}function p(Ce){if(Ce===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ce}function E(){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 c(Ce){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(we){return we.__proto__||Object.getPrototypeOf(we)},c(Ce)}function l(Ce){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(pe){return typeof pe}:function(pe){return pe&&typeof Symbol=="function"&&pe.constructor===Symbol&&pe!==Symbol.prototype?"symbol":typeof pe},l(Ce)}var m=r(3910),M=r(3187),L=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;y.lW=S,y.h2=50;var D=2147483647;S.TYPED_ARRAY_SUPPORT=A(),!S.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 A(){try{var Ce=new Uint8Array(1),pe={foo:function(){return 42}};return Object.setPrototypeOf(pe,Uint8Array.prototype),Object.setPrototypeOf(Ce,pe),Ce.foo()===42}catch{return!1}}Object.defineProperty(S.prototype,"parent",{enumerable:!0,get:function(){if(S.isBuffer(this))return this.buffer}}),Object.defineProperty(S.prototype,"offset",{enumerable:!0,get:function(){if(S.isBuffer(this))return this.byteOffset}});function C(Ce){if(Ce>D)throw new RangeError('The value "'+Ce+'" is invalid for option "size"');var pe=new Uint8Array(Ce);return Object.setPrototypeOf(pe,S.prototype),pe}function S(Ce,pe,we){if(typeof Ce=="number"){if(typeof pe=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return O(Ce)}return o(Ce,pe,we)}S.poolSize=8192;function o(Ce,pe,we){if(typeof Ce=="string")return N(Ce,pe);if(ArrayBuffer.isView(Ce))return k(Ce);if(Ce==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(Ce));if(ze(Ce,ArrayBuffer)||Ce&&ze(Ce.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ze(Ce,SharedArrayBuffer)||Ce&&ze(Ce.buffer,SharedArrayBuffer)))return V(Ce,pe,we);if(typeof Ce=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Ae=Ce.valueOf&&Ce.valueOf();if(Ae!=null&&Ae!==Ce)return S.from(Ae,pe,we);var Pe=G(Ce);if(Pe)return Pe;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Ce[Symbol.toPrimitive]=="function")return S.from(Ce[Symbol.toPrimitive]("string"),pe,we);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(Ce))}S.from=function(Ce,pe,we){return o(Ce,pe,we)},Object.setPrototypeOf(S.prototype,Uint8Array.prototype),Object.setPrototypeOf(S,Uint8Array);function R(Ce){if(typeof Ce!="number")throw new TypeError('"size" argument must be of type number');if(Ce<0)throw new RangeError('The value "'+Ce+'" is invalid for option "size"')}function T(Ce,pe,we){return R(Ce),Ce<=0?C(Ce):pe!==void 0?typeof we=="string"?C(Ce).fill(pe,we):C(Ce).fill(pe):C(Ce)}S.alloc=function(Ce,pe,we){return T(Ce,pe,we)};function O(Ce){return R(Ce),C(Ce<0?0:U(Ce)|0)}S.allocUnsafe=function(Ce){return O(Ce)},S.allocUnsafeSlow=function(Ce){return O(Ce)};function N(Ce,pe){if((typeof pe!="string"||pe==="")&&(pe="utf8"),!S.isEncoding(pe))throw new TypeError("Unknown encoding: "+pe);var we=Y(Ce,pe)|0,Ae=C(we),Pe=Ae.write(Ce,pe);return Pe!==we&&(Ae=Ae.slice(0,Pe)),Ae}function H(Ce){for(var pe=Ce.length<0?0:U(Ce.length)|0,we=C(pe),Ae=0;Ae<pe;Ae+=1)we[Ae]=Ce[Ae]&255;return we}function k(Ce){if(ze(Ce,Uint8Array)){var pe=new Uint8Array(Ce);return V(pe.buffer,pe.byteOffset,pe.byteLength)}return H(Ce)}function V(Ce,pe,we){if(pe<0||Ce.byteLength<pe)throw new RangeError('"offset" is outside of buffer bounds');if(Ce.byteLength<pe+(we||0))throw new RangeError('"length" is outside of buffer bounds');var Ae;return pe===void 0&&we===void 0?Ae=new Uint8Array(Ce):we===void 0?Ae=new Uint8Array(Ce,pe):Ae=new Uint8Array(Ce,pe,we),Object.setPrototypeOf(Ae,S.prototype),Ae}function G(Ce){if(S.isBuffer(Ce)){var pe=U(Ce.length)|0,we=C(pe);return we.length===0||Ce.copy(we,0,0,pe),we}if(Ce.length!==void 0)return typeof Ce.length!="number"||rt(Ce.length)?C(0):H(Ce);if(Ce.type==="Buffer"&&Array.isArray(Ce.data))return H(Ce.data)}function U(Ce){if(Ce>=D)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+D.toString(16)+" bytes");return Ce|0}S.isBuffer=function(pe){return pe!=null&&pe._isBuffer===!0&&pe!==S.prototype},S.compare=function(pe,we){if(ze(pe,Uint8Array)&&(pe=S.from(pe,pe.offset,pe.byteLength)),ze(we,Uint8Array)&&(we=S.from(we,we.offset,we.byteLength)),!S.isBuffer(pe)||!S.isBuffer(we))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(pe===we)return 0;for(var Ae=pe.length,Pe=we.length,Ge=0,We=Math.min(Ae,Pe);Ge<We;++Ge)if(pe[Ge]!==we[Ge]){Ae=pe[Ge],Pe=we[Ge];break}return Ae<Pe?-1:Pe<Ae?1:0},S.isEncoding=function(pe){switch(String(pe).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},S.concat=function(pe,we){if(!Array.isArray(pe))throw new TypeError('"list" argument must be an Array of Buffers');if(pe.length===0)return S.alloc(0);var Ae;if(we===void 0)for(we=0,Ae=0;Ae<pe.length;++Ae)we+=pe[Ae].length;var Pe=S.allocUnsafe(we),Ge=0;for(Ae=0;Ae<pe.length;++Ae){var We=pe[Ae];if(ze(We,Uint8Array))Ge+We.length>Pe.length?(S.isBuffer(We)||(We=S.from(We)),We.copy(Pe,Ge)):Uint8Array.prototype.set.call(Pe,We,Ge);else if(S.isBuffer(We))We.copy(Pe,Ge);else throw new TypeError('"list" argument must be an Array of Buffers');Ge+=We.length}return Pe};function Y(Ce,pe){if(S.isBuffer(Ce))return Ce.length;if(ArrayBuffer.isView(Ce)||ze(Ce,ArrayBuffer))return Ce.byteLength;if(typeof Ce!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+l(Ce));var we=Ce.length,Ae=arguments.length>2&&arguments[2]===!0;if(!Ae&&we===0)return 0;for(var Pe=!1;;)switch(pe){case"ascii":case"latin1":case"binary":return we;case"utf8":case"utf-8":return Tt(Ce).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return we*2;case"hex":return we>>>1;case"base64":return et(Ce).length;default:if(Pe)return Ae?-1:Tt(Ce).length;pe=(""+pe).toLowerCase(),Pe=!0}}S.byteLength=Y;function ee(Ce,pe,we){var Ae=!1;if((pe===void 0||pe<0)&&(pe=0),pe>this.length||((we===void 0||we>this.length)&&(we=this.length),we<=0)||(we>>>=0,pe>>>=0,we<=pe))return"";for(Ce||(Ce="utf8");;)switch(Ce){case"hex":return xe(this,pe,we);case"utf8":case"utf-8":return fe(this,pe,we);case"ascii":return ve(this,pe,we);case"latin1":case"binary":return le(this,pe,we);case"base64":return ue(this,pe,we);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Se(this,pe,we);default:if(Ae)throw new TypeError("Unknown encoding: "+Ce);Ce=(Ce+"").toLowerCase(),Ae=!0}}S.prototype._isBuffer=!0;function re(Ce,pe,we){var Ae=Ce[pe];Ce[pe]=Ce[we],Ce[we]=Ae}S.prototype.swap16=function(){var pe=this.length;if(pe%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var we=0;we<pe;we+=2)re(this,we,we+1);return this},S.prototype.swap32=function(){var pe=this.length;if(pe%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var we=0;we<pe;we+=4)re(this,we,we+3),re(this,we+1,we+2);return this},S.prototype.swap64=function(){var pe=this.length;if(pe%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var we=0;we<pe;we+=8)re(this,we,we+7),re(this,we+1,we+6),re(this,we+2,we+5),re(this,we+3,we+4);return this},S.prototype.toString=function(){var pe=this.length;return pe===0?"":arguments.length===0?fe(this,0,pe):ee.apply(this,arguments)},S.prototype.toLocaleString=S.prototype.toString,S.prototype.equals=function(pe){if(!S.isBuffer(pe))throw new TypeError("Argument must be a Buffer");return this===pe?!0:S.compare(this,pe)===0},S.prototype.inspect=function(){var pe="",we=y.h2;return pe=this.toString("hex",0,we).replace(/(.{2})/g,"$1 ").trim(),this.length>we&&(pe+=" ... "),"<Buffer "+pe+">"},L&&(S.prototype[L]=S.prototype.inspect),S.prototype.compare=function(pe,we,Ae,Pe,Ge){if(ze(pe,Uint8Array)&&(pe=S.from(pe,pe.offset,pe.byteLength)),!S.isBuffer(pe))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+l(pe));if(we===void 0&&(we=0),Ae===void 0&&(Ae=pe?pe.length:0),Pe===void 0&&(Pe=0),Ge===void 0&&(Ge=this.length),we<0||Ae>pe.length||Pe<0||Ge>this.length)throw new RangeError("out of range index");if(Pe>=Ge&&we>=Ae)return 0;if(Pe>=Ge)return-1;if(we>=Ae)return 1;if(we>>>=0,Ae>>>=0,Pe>>>=0,Ge>>>=0,this===pe)return 0;for(var We=Ge-Pe,tt=Ae-we,ct=Math.min(We,tt),St=this.slice(Pe,Ge),Pt=pe.slice(we,Ae),wt=0;wt<ct;++wt)if(St[wt]!==Pt[wt]){We=St[wt],tt=Pt[wt];break}return We<tt?-1:tt<We?1:0};function ie(Ce,pe,we,Ae,Pe){if(Ce.length===0)return-1;if(typeof we=="string"?(Ae=we,we=0):we>2147483647?we=2147483647:we<-2147483648&&(we=-2147483648),we=+we,rt(we)&&(we=Pe?0:Ce.length-1),we<0&&(we=Ce.length+we),we>=Ce.length){if(Pe)return-1;we=Ce.length-1}else if(we<0)if(Pe)we=0;else return-1;if(typeof pe=="string"&&(pe=S.from(pe,Ae)),S.isBuffer(pe))return pe.length===0?-1:se(Ce,pe,we,Ae,Pe);if(typeof pe=="number")return pe=pe&255,typeof Uint8Array.prototype.indexOf=="function"?Pe?Uint8Array.prototype.indexOf.call(Ce,pe,we):Uint8Array.prototype.lastIndexOf.call(Ce,pe,we):se(Ce,[pe],we,Ae,Pe);throw new TypeError("val must be string, number or Buffer")}function se(Ce,pe,we,Ae,Pe){var Ge=1,We=Ce.length,tt=pe.length;if(Ae!==void 0&&(Ae=String(Ae).toLowerCase(),Ae==="ucs2"||Ae==="ucs-2"||Ae==="utf16le"||Ae==="utf-16le")){if(Ce.length<2||pe.length<2)return-1;Ge=2,We/=2,tt/=2,we/=2}function ct(Wt,hr){return Ge===1?Wt[hr]:Wt.readUInt16BE(hr*Ge)}var St;if(Pe){var Pt=-1;for(St=we;St<We;St++)if(ct(Ce,St)===ct(pe,Pt===-1?0:St-Pt)){if(Pt===-1&&(Pt=St),St-Pt+1===tt)return Pt*Ge}else Pt!==-1&&(St-=St-Pt),Pt=-1}else for(we+tt>We&&(we=We-tt),St=we;St>=0;St--){for(var wt=!0,Bt=0;Bt<tt;Bt++)if(ct(Ce,St+Bt)!==ct(pe,Bt)){wt=!1;break}if(wt)return St}return-1}S.prototype.includes=function(pe,we,Ae){return this.indexOf(pe,we,Ae)!==-1},S.prototype.indexOf=function(pe,we,Ae){return ie(this,pe,we,Ae,!0)},S.prototype.lastIndexOf=function(pe,we,Ae){return ie(this,pe,we,Ae,!1)};function ce(Ce,pe,we,Ae){we=Number(we)||0;var Pe=Ce.length-we;Ae?(Ae=Number(Ae),Ae>Pe&&(Ae=Pe)):Ae=Pe;var Ge=pe.length;Ae>Ge/2&&(Ae=Ge/2);var We;for(We=0;We<Ae;++We){var tt=parseInt(pe.substr(We*2,2),16);if(rt(tt))return We;Ce[we+We]=tt}return We}function q(Ce,pe,we,Ae){return Ue(Tt(pe,Ce.length-we),Ce,we,Ae)}function j(Ce,pe,we,Ae){return Ue(Et(pe),Ce,we,Ae)}function Z(Ce,pe,we,Ae){return Ue(et(pe),Ce,we,Ae)}function Q(Ce,pe,we,Ae){return Ue(Dt(pe,Ce.length-we),Ce,we,Ae)}S.prototype.write=function(pe,we,Ae,Pe){if(we===void 0)Pe="utf8",Ae=this.length,we=0;else if(Ae===void 0&&typeof we=="string")Pe=we,Ae=this.length,we=0;else if(isFinite(we))we=we>>>0,isFinite(Ae)?(Ae=Ae>>>0,Pe===void 0&&(Pe="utf8")):(Pe=Ae,Ae=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ge=this.length-we;if((Ae===void 0||Ae>Ge)&&(Ae=Ge),pe.length>0&&(Ae<0||we<0)||we>this.length)throw new RangeError("Attempt to write outside buffer bounds");Pe||(Pe="utf8");for(var We=!1;;)switch(Pe){case"hex":return ce(this,pe,we,Ae);case"utf8":case"utf-8":return q(this,pe,we,Ae);case"ascii":case"latin1":case"binary":return j(this,pe,we,Ae);case"base64":return Z(this,pe,we,Ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,pe,we,Ae);default:if(We)throw new TypeError("Unknown encoding: "+Pe);Pe=(""+Pe).toLowerCase(),We=!0}},S.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ue(Ce,pe,we){return pe===0&&we===Ce.length?m.fromByteArray(Ce):m.fromByteArray(Ce.slice(pe,we))}function fe(Ce,pe,we){we=Math.min(Ce.length,we);for(var Ae=[],Pe=pe;Pe<we;){var Ge=Ce[Pe],We=null,tt=Ge>239?4:Ge>223?3:Ge>191?2:1;if(Pe+tt<=we){var ct=void 0,St=void 0,Pt=void 0,wt=void 0;switch(tt){case 1:Ge<128&&(We=Ge);break;case 2:ct=Ce[Pe+1],(ct&192)===128&&(wt=(Ge&31)<<6|ct&63,wt>127&&(We=wt));break;case 3:ct=Ce[Pe+1],St=Ce[Pe+2],(ct&192)===128&&(St&192)===128&&(wt=(Ge&15)<<12|(ct&63)<<6|St&63,wt>2047&&(wt<55296||wt>57343)&&(We=wt));break;case 4:ct=Ce[Pe+1],St=Ce[Pe+2],Pt=Ce[Pe+3],(ct&192)===128&&(St&192)===128&&(Pt&192)===128&&(wt=(Ge&15)<<18|(ct&63)<<12|(St&63)<<6|Pt&63,wt>65535&&wt<1114112&&(We=wt))}}We===null?(We=65533,tt=1):We>65535&&(We-=65536,Ae.push(We>>>10&1023|55296),We=56320|We&1023),Ae.push(We),Pe+=tt}return ne(Ae)}var te=4096;function ne(Ce){var pe=Ce.length;if(pe<=te)return String.fromCharCode.apply(String,Ce);for(var we="",Ae=0;Ae<pe;)we+=String.fromCharCode.apply(String,Ce.slice(Ae,Ae+=te));return we}function ve(Ce,pe,we){var Ae="";we=Math.min(Ce.length,we);for(var Pe=pe;Pe<we;++Pe)Ae+=String.fromCharCode(Ce[Pe]&127);return Ae}function le(Ce,pe,we){var Ae="";we=Math.min(Ce.length,we);for(var Pe=pe;Pe<we;++Pe)Ae+=String.fromCharCode(Ce[Pe]);return Ae}function xe(Ce,pe,we){var Ae=Ce.length;(!pe||pe<0)&&(pe=0),(!we||we<0||we>Ae)&&(we=Ae);for(var Pe="",Ge=pe;Ge<we;++Ge)Pe+=lt[Ce[Ge]];return Pe}function Se(Ce,pe,we){for(var Ae=Ce.slice(pe,we),Pe="",Ge=0;Ge<Ae.length-1;Ge+=2)Pe+=String.fromCharCode(Ae[Ge]+Ae[Ge+1]*256);return Pe}S.prototype.slice=function(pe,we){var Ae=this.length;pe=~~pe,we=we===void 0?Ae:~~we,pe<0?(pe+=Ae,pe<0&&(pe=0)):pe>Ae&&(pe=Ae),we<0?(we+=Ae,we<0&&(we=0)):we>Ae&&(we=Ae),we<pe&&(we=pe);var Pe=this.subarray(pe,we);return Object.setPrototypeOf(Pe,S.prototype),Pe};function Re(Ce,pe,we){if(Ce%1!==0||Ce<0)throw new RangeError("offset is not uint");if(Ce+pe>we)throw new RangeError("Trying to access beyond buffer length")}S.prototype.readUintLE=S.prototype.readUIntLE=function(pe,we,Ae){pe=pe>>>0,we=we>>>0,Ae||Re(pe,we,this.length);for(var Pe=this[pe],Ge=1,We=0;++We<we&&(Ge*=256);)Pe+=this[pe+We]*Ge;return Pe},S.prototype.readUintBE=S.prototype.readUIntBE=function(pe,we,Ae){pe=pe>>>0,we=we>>>0,Ae||Re(pe,we,this.length);for(var Pe=this[pe+--we],Ge=1;we>0&&(Ge*=256);)Pe+=this[pe+--we]*Ge;return Pe},S.prototype.readUint8=S.prototype.readUInt8=function(pe,we){return pe=pe>>>0,we||Re(pe,1,this.length),this[pe]},S.prototype.readUint16LE=S.prototype.readUInt16LE=function(pe,we){return pe=pe>>>0,we||Re(pe,2,this.length),this[pe]|this[pe+1]<<8},S.prototype.readUint16BE=S.prototype.readUInt16BE=function(pe,we){return pe=pe>>>0,we||Re(pe,2,this.length),this[pe]<<8|this[pe+1]},S.prototype.readUint32LE=S.prototype.readUInt32LE=function(pe,we){return pe=pe>>>0,we||Re(pe,4,this.length),(this[pe]|this[pe+1]<<8|this[pe+2]<<16)+this[pe+3]*16777216},S.prototype.readUint32BE=S.prototype.readUInt32BE=function(pe,we){return pe=pe>>>0,we||Re(pe,4,this.length),this[pe]*16777216+(this[pe+1]<<16|this[pe+2]<<8|this[pe+3])},S.prototype.readBigUInt64LE=Qe(function(pe){pe=pe>>>0,st(pe,"offset");var we=this[pe],Ae=this[pe+7];(we===void 0||Ae===void 0)&&it(pe,this.length-8);var Pe=we+this[++pe]*Math.pow(2,8)+this[++pe]*Math.pow(2,16)+this[++pe]*Math.pow(2,24),Ge=this[++pe]+this[++pe]*Math.pow(2,8)+this[++pe]*Math.pow(2,16)+Ae*Math.pow(2,24);return BigInt(Pe)+(BigInt(Ge)<<BigInt(32))}),S.prototype.readBigUInt64BE=Qe(function(pe){pe=pe>>>0,st(pe,"offset");var we=this[pe],Ae=this[pe+7];(we===void 0||Ae===void 0)&&it(pe,this.length-8);var Pe=we*Math.pow(2,24)+this[++pe]*Math.pow(2,16)+this[++pe]*Math.pow(2,8)+this[++pe],Ge=this[++pe]*Math.pow(2,24)+this[++pe]*Math.pow(2,16)+this[++pe]*Math.pow(2,8)+Ae;return(BigInt(Pe)<<BigInt(32))+BigInt(Ge)}),S.prototype.readIntLE=function(pe,we,Ae){pe=pe>>>0,we=we>>>0,Ae||Re(pe,we,this.length);for(var Pe=this[pe],Ge=1,We=0;++We<we&&(Ge*=256);)Pe+=this[pe+We]*Ge;return Ge*=128,Pe>=Ge&&(Pe-=Math.pow(2,8*we)),Pe},S.prototype.readIntBE=function(pe,we,Ae){pe=pe>>>0,we=we>>>0,Ae||Re(pe,we,this.length);for(var Pe=we,Ge=1,We=this[pe+--Pe];Pe>0&&(Ge*=256);)We+=this[pe+--Pe]*Ge;return Ge*=128,We>=Ge&&(We-=Math.pow(2,8*we)),We},S.prototype.readInt8=function(pe,we){return pe=pe>>>0,we||Re(pe,1,this.length),this[pe]&128?(255-this[pe]+1)*-1:this[pe]},S.prototype.readInt16LE=function(pe,we){pe=pe>>>0,we||Re(pe,2,this.length);var Ae=this[pe]|this[pe+1]<<8;return Ae&32768?Ae|4294901760:Ae},S.prototype.readInt16BE=function(pe,we){pe=pe>>>0,we||Re(pe,2,this.length);var Ae=this[pe+1]|this[pe]<<8;return Ae&32768?Ae|4294901760:Ae},S.prototype.readInt32LE=function(pe,we){return pe=pe>>>0,we||Re(pe,4,this.length),this[pe]|this[pe+1]<<8|this[pe+2]<<16|this[pe+3]<<24},S.prototype.readInt32BE=function(pe,we){return pe=pe>>>0,we||Re(pe,4,this.length),this[pe]<<24|this[pe+1]<<16|this[pe+2]<<8|this[pe+3]},S.prototype.readBigInt64LE=Qe(function(pe){pe=pe>>>0,st(pe,"offset");var we=this[pe],Ae=this[pe+7];(we===void 0||Ae===void 0)&&it(pe,this.length-8);var Pe=this[pe+4]+this[pe+5]*Math.pow(2,8)+this[pe+6]*Math.pow(2,16)+(Ae<<24);return(BigInt(Pe)<<BigInt(32))+BigInt(we+this[++pe]*Math.pow(2,8)+this[++pe]*Math.pow(2,16)+this[++pe]*Math.pow(2,24))}),S.prototype.readBigInt64BE=Qe(function(pe){pe=pe>>>0,st(pe,"offset");var we=this[pe],Ae=this[pe+7];(we===void 0||Ae===void 0)&&it(pe,this.length-8);var Pe=(we<<24)+this[++pe]*Math.pow(2,16)+this[++pe]*Math.pow(2,8)+this[++pe];return(BigInt(Pe)<<BigInt(32))+BigInt(this[++pe]*Math.pow(2,24)+this[++pe]*Math.pow(2,16)+this[++pe]*Math.pow(2,8)+Ae)}),S.prototype.readFloatLE=function(pe,we){return pe=pe>>>0,we||Re(pe,4,this.length),M.read(this,pe,!0,23,4)},S.prototype.readFloatBE=function(pe,we){return pe=pe>>>0,we||Re(pe,4,this.length),M.read(this,pe,!1,23,4)},S.prototype.readDoubleLE=function(pe,we){return pe=pe>>>0,we||Re(pe,8,this.length),M.read(this,pe,!0,52,8)},S.prototype.readDoubleBE=function(pe,we){return pe=pe>>>0,we||Re(pe,8,this.length),M.read(this,pe,!1,52,8)};function Ee(Ce,pe,we,Ae,Pe,Ge){if(!S.isBuffer(Ce))throw new TypeError('"buffer" argument must be a Buffer instance');if(pe>Pe||pe<Ge)throw new RangeError('"value" argument is out of bounds');if(we+Ae>Ce.length)throw new RangeError("Index out of range")}S.prototype.writeUintLE=S.prototype.writeUIntLE=function(pe,we,Ae,Pe){if(pe=+pe,we=we>>>0,Ae=Ae>>>0,!Pe){var Ge=Math.pow(2,8*Ae)-1;Ee(this,pe,we,Ae,Ge,0)}var We=1,tt=0;for(this[we]=pe&255;++tt<Ae&&(We*=256);)this[we+tt]=pe/We&255;return we+Ae},S.prototype.writeUintBE=S.prototype.writeUIntBE=function(pe,we,Ae,Pe){if(pe=+pe,we=we>>>0,Ae=Ae>>>0,!Pe){var Ge=Math.pow(2,8*Ae)-1;Ee(this,pe,we,Ae,Ge,0)}var We=Ae-1,tt=1;for(this[we+We]=pe&255;--We>=0&&(tt*=256);)this[we+We]=pe/tt&255;return we+Ae},S.prototype.writeUint8=S.prototype.writeUInt8=function(pe,we,Ae){return pe=+pe,we=we>>>0,Ae||Ee(this,pe,we,1,255,0),this[we]=pe&255,we+1},S.prototype.writeUint16LE=S.prototype.writeUInt16LE=function(pe,we,Ae){return pe=+pe,we=we>>>0,Ae||Ee(this,pe,we,2,65535,0),this[we]=pe&255,this[we+1]=pe>>>8,we+2},S.prototype.writeUint16BE=S.prototype.writeUInt16BE=function(pe,we,Ae){return pe=+pe,we=we>>>0,Ae||Ee(this,pe,we,2,65535,0),this[we]=pe>>>8,this[we+1]=pe&255,we+2},S.prototype.writeUint32LE=S.prototype.writeUInt32LE=function(pe,we,Ae){return pe=+pe,we=we>>>0,Ae||Ee(this,pe,we,4,4294967295,0),this[we+3]=pe>>>24,this[we+2]=pe>>>16,this[we+1]=pe>>>8,this[we]=pe&255,we+4},S.prototype.writeUint32BE=S.prototype.writeUInt32BE=function(pe,we,Ae){return pe=+pe,we=we>>>0,Ae||Ee(this,pe,we,4,4294967295,0),this[we]=pe>>>24,this[we+1]=pe>>>16,this[we+2]=pe>>>8,this[we+3]=pe&255,we+4};function Oe(Ce,pe,we,Ae,Pe){ht(pe,Ae,Pe,Ce,we,7);var Ge=Number(pe&BigInt(4294967295));Ce[we++]=Ge,Ge=Ge>>8,Ce[we++]=Ge,Ge=Ge>>8,Ce[we++]=Ge,Ge=Ge>>8,Ce[we++]=Ge;var We=Number(pe>>BigInt(32)&BigInt(4294967295));return Ce[we++]=We,We=We>>8,Ce[we++]=We,We=We>>8,Ce[we++]=We,We=We>>8,Ce[we++]=We,we}function Be(Ce,pe,we,Ae,Pe){ht(pe,Ae,Pe,Ce,we,7);var Ge=Number(pe&BigInt(4294967295));Ce[we+7]=Ge,Ge=Ge>>8,Ce[we+6]=Ge,Ge=Ge>>8,Ce[we+5]=Ge,Ge=Ge>>8,Ce[we+4]=Ge;var We=Number(pe>>BigInt(32)&BigInt(4294967295));return Ce[we+3]=We,We=We>>8,Ce[we+2]=We,We=We>>8,Ce[we+1]=We,We=We>>8,Ce[we]=We,we+8}S.prototype.writeBigUInt64LE=Qe(function(pe){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Oe(this,pe,we,BigInt(0),BigInt("0xffffffffffffffff"))}),S.prototype.writeBigUInt64BE=Qe(function(pe){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Be(this,pe,we,BigInt(0),BigInt("0xffffffffffffffff"))}),S.prototype.writeIntLE=function(pe,we,Ae,Pe){if(pe=+pe,we=we>>>0,!Pe){var Ge=Math.pow(2,8*Ae-1);Ee(this,pe,we,Ae,Ge-1,-Ge)}var We=0,tt=1,ct=0;for(this[we]=pe&255;++We<Ae&&(tt*=256);)pe<0&&ct===0&&this[we+We-1]!==0&&(ct=1),this[we+We]=(pe/tt>>0)-ct&255;return we+Ae},S.prototype.writeIntBE=function(pe,we,Ae,Pe){if(pe=+pe,we=we>>>0,!Pe){var Ge=Math.pow(2,8*Ae-1);Ee(this,pe,we,Ae,Ge-1,-Ge)}var We=Ae-1,tt=1,ct=0;for(this[we+We]=pe&255;--We>=0&&(tt*=256);)pe<0&&ct===0&&this[we+We+1]!==0&&(ct=1),this[we+We]=(pe/tt>>0)-ct&255;return we+Ae},S.prototype.writeInt8=function(pe,we,Ae){return pe=+pe,we=we>>>0,Ae||Ee(this,pe,we,1,127,-128),pe<0&&(pe=255+pe+1),this[we]=pe&255,we+1},S.prototype.writeInt16LE=function(pe,we,Ae){return pe=+pe,we=we>>>0,Ae||Ee(this,pe,we,2,32767,-32768),this[we]=pe&255,this[we+1]=pe>>>8,we+2},S.prototype.writeInt16BE=function(pe,we,Ae){return pe=+pe,we=we>>>0,Ae||Ee(this,pe,we,2,32767,-32768),this[we]=pe>>>8,this[we+1]=pe&255,we+2},S.prototype.writeInt32LE=function(pe,we,Ae){return pe=+pe,we=we>>>0,Ae||Ee(this,pe,we,4,2147483647,-2147483648),this[we]=pe&255,this[we+1]=pe>>>8,this[we+2]=pe>>>16,this[we+3]=pe>>>24,we+4},S.prototype.writeInt32BE=function(pe,we,Ae){return pe=+pe,we=we>>>0,Ae||Ee(this,pe,we,4,2147483647,-2147483648),pe<0&&(pe=4294967295+pe+1),this[we]=pe>>>24,this[we+1]=pe>>>16,this[we+2]=pe>>>8,this[we+3]=pe&255,we+4},S.prototype.writeBigInt64LE=Qe(function(pe){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Oe(this,pe,we,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),S.prototype.writeBigInt64BE=Qe(function(pe){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Be(this,pe,we,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Le(Ce,pe,we,Ae,Pe,Ge){if(we+Ae>Ce.length)throw new RangeError("Index out of range");if(we<0)throw new RangeError("Index out of range")}function Te(Ce,pe,we,Ae,Pe){return pe=+pe,we=we>>>0,Pe||Le(Ce,pe,we,4),M.write(Ce,pe,we,Ae,23,4),we+4}S.prototype.writeFloatLE=function(pe,we,Ae){return Te(this,pe,we,!0,Ae)},S.prototype.writeFloatBE=function(pe,we,Ae){return Te(this,pe,we,!1,Ae)};function De(Ce,pe,we,Ae,Pe){return pe=+pe,we=we>>>0,Pe||Le(Ce,pe,we,8),M.write(Ce,pe,we,Ae,52,8),we+8}S.prototype.writeDoubleLE=function(pe,we,Ae){return De(this,pe,we,!0,Ae)},S.prototype.writeDoubleBE=function(pe,we,Ae){return De(this,pe,we,!1,Ae)},S.prototype.copy=function(pe,we,Ae,Pe){if(!S.isBuffer(pe))throw new TypeError("argument should be a Buffer");if(Ae||(Ae=0),!Pe&&Pe!==0&&(Pe=this.length),we>=pe.length&&(we=pe.length),we||(we=0),Pe>0&&Pe<Ae&&(Pe=Ae),Pe===Ae||pe.length===0||this.length===0)return 0;if(we<0)throw new RangeError("targetStart out of bounds");if(Ae<0||Ae>=this.length)throw new RangeError("Index out of range");if(Pe<0)throw new RangeError("sourceEnd out of bounds");Pe>this.length&&(Pe=this.length),pe.length-we<Pe-Ae&&(Pe=pe.length-we+Ae);var Ge=Pe-Ae;return this===pe&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(we,Ae,Pe):Uint8Array.prototype.set.call(pe,this.subarray(Ae,Pe),we),Ge},S.prototype.fill=function(pe,we,Ae,Pe){if(typeof pe=="string"){if(typeof we=="string"?(Pe=we,we=0,Ae=this.length):typeof Ae=="string"&&(Pe=Ae,Ae=this.length),Pe!==void 0&&typeof Pe!="string")throw new TypeError("encoding must be a string");if(typeof Pe=="string"&&!S.isEncoding(Pe))throw new TypeError("Unknown encoding: "+Pe);if(pe.length===1){var Ge=pe.charCodeAt(0);(Pe==="utf8"&&Ge<128||Pe==="latin1")&&(pe=Ge)}}else typeof pe=="number"?pe=pe&255:typeof pe=="boolean"&&(pe=Number(pe));if(we<0||this.length<we||this.length<Ae)throw new RangeError("Out of range index");if(Ae<=we)return this;we=we>>>0,Ae=Ae===void 0?this.length:Ae>>>0,pe||(pe=0);var We;if(typeof pe=="number")for(We=we;We<Ae;++We)this[We]=pe;else{var tt=S.isBuffer(pe)?pe:S.from(pe,Pe),ct=tt.length;if(ct===0)throw new TypeError('The value "'+pe+'" is invalid for argument "value"');for(We=0;We<Ae-we;++We)this[We+we]=tt[We%ct]}return this};var Ve={};function Ye(Ce,pe,we){Ve[Ce]=function(Ae){f(Ge,Ae);var Pe=h(Ge);function Ge(){var We;return n(this,Ge),We=Pe.call(this),Object.defineProperty(p(We),"message",{value:pe.apply(p(We),arguments),writable:!0,configurable:!0}),We.name="".concat(We.name," [").concat(Ce,"]"),We.stack,delete We.name,We}return i(Ge,[{key:"code",get:function(){return Ce},set:function(tt){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:tt,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(Ce,"]: ").concat(this.message)}}]),Ge}(we)}Ye("ERR_BUFFER_OUT_OF_BOUNDS",function(Ce){return Ce?"".concat(Ce," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),Ye("ERR_INVALID_ARG_TYPE",function(Ce,pe){return'The "'.concat(Ce,'" argument must be of type number. Received type ').concat(l(pe))},TypeError),Ye("ERR_OUT_OF_RANGE",function(Ce,pe,we){var Ae='The value of "'.concat(Ce,'" is out of range.'),Pe=we;return Number.isInteger(we)&&Math.abs(we)>Math.pow(2,32)?Pe=Ne(String(we)):typeof we=="bigint"&&(Pe=String(we),(we>Math.pow(BigInt(2),BigInt(32))||we<-Math.pow(BigInt(2),BigInt(32)))&&(Pe=Ne(Pe)),Pe+="n"),Ae+=" It must be ".concat(pe,". Received ").concat(Pe),Ae},RangeError);function Ne(Ce){for(var pe="",we=Ce.length,Ae=Ce[0]==="-"?1:0;we>=Ae+4;we-=3)pe="_".concat(Ce.slice(we-3,we)).concat(pe);return"".concat(Ce.slice(0,we)).concat(pe)}function Xe(Ce,pe,we){st(pe,"offset"),(Ce[pe]===void 0||Ce[pe+we]===void 0)&&it(pe,Ce.length-(we+1))}function ht(Ce,pe,we,Ae,Pe,Ge){if(Ce>we||Ce<pe){var We=typeof pe=="bigint"?"n":"",tt;throw Ge>3?pe===0||pe===BigInt(0)?tt=">= 0".concat(We," and < 2").concat(We," ** ").concat((Ge+1)*8).concat(We):tt=">= -(2".concat(We," ** ").concat((Ge+1)*8-1).concat(We,") and < 2 ** ")+"".concat((Ge+1)*8-1).concat(We):tt=">= ".concat(pe).concat(We," and <= ").concat(we).concat(We),new Ve.ERR_OUT_OF_RANGE("value",tt,Ce)}Xe(Ae,Pe,Ge)}function st(Ce,pe){if(typeof Ce!="number")throw new Ve.ERR_INVALID_ARG_TYPE(pe,"number",Ce)}function it(Ce,pe,we){throw Math.floor(Ce)!==Ce?(st(Ce,we),new Ve.ERR_OUT_OF_RANGE(we||"offset","an integer",Ce)):pe<0?new Ve.ERR_BUFFER_OUT_OF_BOUNDS:new Ve.ERR_OUT_OF_RANGE(we||"offset",">= ".concat(we?1:0," and <= ").concat(pe),Ce)}var nt=/[^+/0-9A-Za-z-_]/g;function pt(Ce){if(Ce=Ce.split("=")[0],Ce=Ce.trim().replace(nt,""),Ce.length<2)return"";for(;Ce.length%4!==0;)Ce=Ce+"=";return Ce}function Tt(Ce,pe){pe=pe||1/0;for(var we,Ae=Ce.length,Pe=null,Ge=[],We=0;We<Ae;++We){if(we=Ce.charCodeAt(We),we>55295&&we<57344){if(!Pe){if(we>56319){(pe-=3)>-1&&Ge.push(239,191,189);continue}else if(We+1===Ae){(pe-=3)>-1&&Ge.push(239,191,189);continue}Pe=we;continue}if(we<56320){(pe-=3)>-1&&Ge.push(239,191,189),Pe=we;continue}we=(Pe-55296<<10|we-56320)+65536}else Pe&&(pe-=3)>-1&&Ge.push(239,191,189);if(Pe=null,we<128){if((pe-=1)<0)break;Ge.push(we)}else if(we<2048){if((pe-=2)<0)break;Ge.push(we>>6|192,we&63|128)}else if(we<65536){if((pe-=3)<0)break;Ge.push(we>>12|224,we>>6&63|128,we&63|128)}else if(we<1114112){if((pe-=4)<0)break;Ge.push(we>>18|240,we>>12&63|128,we>>6&63|128,we&63|128)}else throw new Error("Invalid code point")}return Ge}function Et(Ce){for(var pe=[],we=0;we<Ce.length;++we)pe.push(Ce.charCodeAt(we)&255);return pe}function Dt(Ce,pe){for(var we,Ae,Pe,Ge=[],We=0;We<Ce.length&&!((pe-=2)<0);++We)we=Ce.charCodeAt(We),Ae=we>>8,Pe=we%256,Ge.push(Pe),Ge.push(Ae);return Ge}function et(Ce){return m.toByteArray(pt(Ce))}function Ue(Ce,pe,we,Ae){var Pe;for(Pe=0;Pe<Ae&&!(Pe+we>=pe.length||Pe>=Ce.length);++Pe)pe[Pe+we]=Ce[Pe];return Pe}function ze(Ce,pe){return Ce instanceof pe||Ce!=null&&Ce.constructor!=null&&Ce.constructor.name!=null&&Ce.constructor.name===pe.name}function rt(Ce){return Ce!==Ce}var lt=function(){for(var Ce="0123456789abcdef",pe=new Array(256),we=0;we<16;++we)for(var Ae=we*16,Pe=0;Pe<16;++Pe)pe[Ae+Pe]=Ce[we]+Ce[Pe];return pe}();function Qe(Ce){return typeof BigInt>"u"?Fe:Ce}function Fe(){throw new Error("BigInt not supported")}},3910:function(v,y){y.byteLength=b,y.toByteArray=E,y.fromByteArray=m;for(var r=[],n=[],u=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,g=i.length;f<g;++f)r[f]=i[f],n[i.charCodeAt(f)]=f;n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63;function h(M){var L=M.length;if(L%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var D=M.indexOf("=");D===-1&&(D=L);var A=D===L?0:4-D%4;return[D,A]}function b(M){var L=h(M),D=L[0],A=L[1];return(D+A)*3/4-A}function p(M,L,D){return(L+D)*3/4-D}function E(M){var L,D=h(M),A=D[0],C=D[1],S=new u(p(M,A,C)),o=0,R=C>0?A-4:A,T;for(T=0;T<R;T+=4)L=n[M.charCodeAt(T)]<<18|n[M.charCodeAt(T+1)]<<12|n[M.charCodeAt(T+2)]<<6|n[M.charCodeAt(T+3)],S[o++]=L>>16&255,S[o++]=L>>8&255,S[o++]=L&255;return C===2&&(L=n[M.charCodeAt(T)]<<2|n[M.charCodeAt(T+1)]>>4,S[o++]=L&255),C===1&&(L=n[M.charCodeAt(T)]<<10|n[M.charCodeAt(T+1)]<<4|n[M.charCodeAt(T+2)]>>2,S[o++]=L>>8&255,S[o++]=L&255),S}function c(M){return r[M>>18&63]+r[M>>12&63]+r[M>>6&63]+r[M&63]}function l(M,L,D){for(var A,C=[],S=L;S<D;S+=3)A=(M[S]<<16&16711680)+(M[S+1]<<8&65280)+(M[S+2]&255),C.push(c(A));return C.join("")}function m(M){for(var L,D=M.length,A=D%3,C=[],S=16383,o=0,R=D-A;o<R;o+=S)C.push(l(M,o,o+S>R?R:o+S));return A===1?(L=M[D-1],C.push(r[L>>2]+r[L<<4&63]+"==")):A===2&&(L=(M[D-2]<<8)+M[D-1],C.push(r[L>>10]+r[L>>4&63]+r[L<<2&63]+"=")),C.join("")}},3187:function(v,y){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */y.read=function(r,n,u,i,f){var g,h,b=f*8-i-1,p=(1<<b)-1,E=p>>1,c=-7,l=u?f-1:0,m=u?-1:1,M=r[n+l];for(l+=m,g=M&(1<<-c)-1,M>>=-c,c+=b;c>0;g=g*256+r[n+l],l+=m,c-=8);for(h=g&(1<<-c)-1,g>>=-c,c+=i;c>0;h=h*256+r[n+l],l+=m,c-=8);if(g===0)g=1-E;else{if(g===p)return h?NaN:(M?-1:1)*(1/0);h=h+Math.pow(2,i),g=g-E}return(M?-1:1)*h*Math.pow(2,g-i)},y.write=function(r,n,u,i,f,g){var h,b,p,E=g*8-f-1,c=(1<<E)-1,l=c>>1,m=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,M=i?0:g-1,L=i?1:-1,D=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(b=isNaN(n)?1:0,h=c):(h=Math.floor(Math.log(n)/Math.LN2),n*(p=Math.pow(2,-h))<1&&(h--,p*=2),h+l>=1?n+=m/p:n+=m*Math.pow(2,1-l),n*p>=2&&(h++,p/=2),h+l>=c?(b=0,h=c):h+l>=1?(b=(n*p-1)*Math.pow(2,f),h=h+l):(b=n*Math.pow(2,l-1)*Math.pow(2,f),h=0));f>=8;r[u+M]=b&255,M+=L,b/=256,f-=8);for(h=h<<f|b,E+=f;E>0;r[u+M]=h&255,M+=L,h/=256,E-=8);r[u+M-L]|=D*128}},1152:function(v,y,r){v.exports=h;var n=r(3440),u=r(7774),i=r(9298);function f(b,p){this._controllerNames=Object.keys(b),this._controllerList=this._controllerNames.map(function(E){return b[E]}),this._mode=p,this._active=b[p],this._active||(this._mode="turntable",this._active=b.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 g=f.prototype;g.flush=function(b){for(var p=this._controllerList,E=0;E<p.length;++E)p[E].flush(b)},g.idle=function(b){for(var p=this._controllerList,E=0;E<p.length;++E)p[E].idle(b)},g.lookAt=function(b,p,E,c){for(var l=this._controllerList,m=0;m<l.length;++m)l[m].lookAt(b,p,E,c)},g.rotate=function(b,p,E,c){for(var l=this._controllerList,m=0;m<l.length;++m)l[m].rotate(b,p,E,c)},g.pan=function(b,p,E,c){for(var l=this._controllerList,m=0;m<l.length;++m)l[m].pan(b,p,E,c)},g.translate=function(b,p,E,c){for(var l=this._controllerList,m=0;m<l.length;++m)l[m].translate(b,p,E,c)},g.setMatrix=function(b,p){for(var E=this._controllerList,c=0;c<E.length;++c)E[c].setMatrix(b,p)},g.setDistanceLimits=function(b,p){for(var E=this._controllerList,c=0;c<E.length;++c)E[c].setDistanceLimits(b,p)},g.setDistance=function(b,p){for(var E=this._controllerList,c=0;c<E.length;++c)E[c].setDistance(b,p)},g.recalcMatrix=function(b){this._active.recalcMatrix(b)},g.getDistance=function(b){return this._active.getDistance(b)},g.getDistanceLimits=function(b){return this._active.getDistanceLimits(b)},g.lastT=function(){return this._active.lastT()},g.setMode=function(b){if(b!==this._mode){var p=this._controllerNames.indexOf(b);if(!(p<0)){var E=this._active,c=this._controllerList[p],l=Math.max(E.lastT(),c.lastT());E.recalcMatrix(l),c.setMatrix(l,E.computedMatrix),this._active=c,this._mode=b,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}}},g.getMode=function(){return this._mode};function h(b){b=b||{};var p=b.eye||[0,0,1],E=b.center||[0,0,0],c=b.up||[0,1,0],l=b.distanceLimits||[0,1/0],m=b.mode||"turntable",M=n(),L=u(),D=i();return M.setDistanceLimits(l[0],l[1]),M.lookAt(0,p,E,c),L.setDistanceLimits(l[0],l[1]),L.lookAt(0,p,E,c),D.setDistanceLimits(l[0],l[1]),D.lookAt(0,p,E,c),new f({turntable:M,orbit:L,matrix:D},m)}},8126:function(v,y,r){var n=typeof WeakMap>"u"?r(5346):WeakMap,u=r(5827),i=r(2944),f=new n;function g(h){var b=f.get(h),p=b&&(b._triangleBuffer.handle||b._triangleBuffer.buffer);if(!p||!h.isBuffer(p)){var E=u(h,new Float32Array([-1,-1,-1,4,4,-1]));b=i(h,[{buffer:E,type:h.FLOAT,size:2}]),b._triangleBuffer=E,f.set(h,b)}b.bind(),h.drawArrays(h.TRIANGLES,0,3),b.unbind()}v.exports=g},8008:function(v,y,r){var n=r(4930);v.exports=u;function u(i,f,g){f=typeof f=="number"?f:1,g=g||": ";var h=i.split(/\r?\n/),b=String(h.length+f-1).length;return h.map(function(p,E){var c=E+f,l=String(c).length,m=n(c,b-l);return m+g+p}).join(`
`)}},2153:function(v,y,r){v.exports=i;var n=r(417);function u(f,g){for(var h=new Array(g+1),b=0;b<f.length;++b)h[b]=f[b];for(var b=0;b<=f.length;++b){for(var p=f.length;p<=g;++p){for(var E=new Array(g),c=0;c<g;++c)E[c]=Math.pow(p+1-b,c);h[p]=E}var l=n.apply(void 0,h);if(l)return!0}return!1}function i(f){var g=f.length;if(g===0)return[];if(g===1)return[0];for(var h=f[0].length,b=[f[0]],p=[0],E=1;E<g;++E){if(b.push(f[E]),!u(b,h)){b.pop();continue}if(p.push(E),p.length===h+1)return p}return p}},4653:function(v,y,r){v.exports=i;var n=r(4419),u=r(1778);function i(f,g){return n(g).filter(function(h){for(var b=new Array(h.length),p=0;p<h.length;++p)b[p]=g[h[p]];return u(b)*f<1})}},2350:function(v,y,r){v.exports=i;var n=r(4653),u=r(8691);function i(f,g){return u(n(f,g))}},7896:function(v){v.exports=function(r){return atob(r)}},957:function(v,y,r){v.exports=i;var n=r(6606);function u(f){for(var g=0,h=0;h<f.length;++h)g+=f[h];return g}function i(f,g){for(var h=g.length,b=new Array(h+1),p=0;p<h;++p){for(var E=new Array(h+1),c=0;c<=h;++c)E[c]=f[c][p];b[p]=E}b[h]=new Array(h+1);for(var p=0;p<=h;++p)b[h][p]=1;for(var l=new Array(h+1),p=0;p<h;++p)l[p]=g[p];l[h]=1;var m=n(b,l),M=u(m[h+1]);M===0&&(M=1);for(var L=new Array(h+1),p=0;p<=h;++p)L[p]=u(m[p])/M;return L}},1539:function(v,y,r){var n=r(8524);v.exports=u;function u(i,f){return n(i[0].mul(f[1]).add(f[0].mul(i[1])),i[1].mul(f[1]))}},8846:function(v){v.exports=y;function y(r,n){return r[0].mul(n[1]).cmp(n[0].mul(r[1]))}},9189:function(v,y,r){var n=r(8524);v.exports=u;function u(i,f){return n(i[0].mul(f[1]),i[1].mul(f[0]))}},5125:function(v,y,r){var n=r(234),u=r(3218),i=r(5514),f=r(2813),g=r(8524),h=r(9189);v.exports=b;function b(p,E){if(n(p))return E?h(p,b(E)):[p[0].clone(),p[1].clone()];var c=0,l,m;if(u(p))l=p.clone();else if(typeof p=="string")l=f(p);else{if(p===0)return[i(0),i(1)];if(p===Math.floor(p))l=i(p);else{for(;p!==Math.floor(p);)p=p*Math.pow(2,256),c-=256;l=i(p)}}if(n(E))l.mul(E[1]),m=E[0].clone();else if(u(E))m=E.clone();else if(typeof E=="string")m=f(E);else if(!E)m=i(1);else if(E===Math.floor(E))m=i(E);else{for(;E!==Math.floor(E);)E=E*Math.pow(2,256),c+=256;m=i(E)}return c>0?l=l.ushln(c):c<0&&(m=m.ushln(-c)),g(l,m)}},234:function(v,y,r){var n=r(3218);v.exports=u;function u(i){return Array.isArray(i)&&i.length===2&&n(i[0])&&n(i[1])}},4275:function(v,y,r){var n=r(1928);v.exports=u;function u(i){return i.cmp(new n(0))}},9958:function(v,y,r){var n=r(4275);v.exports=u;function u(i){var f=i.length,g=i.words,h=0;if(f===1)h=g[0];else if(f===2)h=g[0]+g[1]*67108864;else for(var b=0;b<f;b++){var p=g[b];h+=p*Math.pow(67108864,b)}return n(i)*h}},1112:function(v,y,r){var n=r(8362),u=r(2288).countTrailingZeros;v.exports=i;function i(f){var g=u(n.lo(f));if(g<32)return g;var h=u(n.hi(f));return h>20?52:h+32}},3218:function(v,y,r){r(1928),v.exports=n;function n(u){return u&&typeof u=="object"&&Boolean(u.words)}},5514:function(v,y,r){var n=r(1928),u=r(8362);v.exports=i;function i(f){var g=u.exponent(f);return g<52?new n(f):new n(f*Math.pow(2,52-g)).ushln(g-52)}},8524:function(v,y,r){var n=r(5514),u=r(4275);v.exports=i;function i(f,g){var h=u(f),b=u(g);if(h===0)return[n(0),n(1)];if(b===0)return[n(0),n(0)];b<0&&(f=f.neg(),g=g.neg());var p=f.gcd(g);return p.cmpn(1)?[f.div(p),g.div(p)]:[f,g]}},2813:function(v,y,r){var n=r(1928);v.exports=u;function u(i){return new n(i)}},3962:function(v,y,r){var n=r(8524);v.exports=u;function u(i,f){return n(i[0].mul(f[0]),i[1].mul(f[1]))}},4951:function(v,y,r){var n=r(4275);v.exports=u;function u(i){return n(i[0])*n(i[1])}},4354:function(v,y,r){var n=r(8524);v.exports=u;function u(i,f){return n(i[0].mul(f[1]).sub(i[1].mul(f[0])),i[1].mul(f[1]))}},7999:function(v,y,r){var n=r(9958),u=r(1112);v.exports=i;function i(f){var g=f[0],h=f[1];if(g.cmpn(0)===0)return 0;var b=g.abs().divmod(h.abs()),p=b.div,E=n(p),c=b.mod,l=g.negative!==h.negative?-1:1;if(c.cmpn(0)===0)return l*E;if(E){var m=u(E)+4,M=n(c.ushln(m).divRound(h));return l*(E+M*Math.pow(2,-m))}else{var L=h.bitLength()-c.bitLength()+53,M=n(c.ushln(L).divRound(h));return L<1023?l*M*Math.pow(2,-L):(M*=Math.pow(2,-1023),l*M*Math.pow(2,1023-L))}}},5070:function(v){function y(g,h,b,p,E){for(var c=E+1;p<=E;){var l=p+E>>>1,m=g[l],M=b!==void 0?b(m,h):m-h;M>=0?(c=l,E=l-1):p=l+1}return c}function r(g,h,b,p,E){for(var c=E+1;p<=E;){var l=p+E>>>1,m=g[l],M=b!==void 0?b(m,h):m-h;M>0?(c=l,E=l-1):p=l+1}return c}function n(g,h,b,p,E){for(var c=p-1;p<=E;){var l=p+E>>>1,m=g[l],M=b!==void 0?b(m,h):m-h;M<0?(c=l,p=l+1):E=l-1}return c}function u(g,h,b,p,E){for(var c=p-1;p<=E;){var l=p+E>>>1,m=g[l],M=b!==void 0?b(m,h):m-h;M<=0?(c=l,p=l+1):E=l-1}return c}function i(g,h,b,p,E){for(;p<=E;){var c=p+E>>>1,l=g[c],m=b!==void 0?b(l,h):l-h;if(m===0)return c;m<=0?p=c+1:E=c-1}return-1}function f(g,h,b,p,E,c){return typeof b=="function"?c(g,h,b,p===void 0?0:p|0,E===void 0?g.length-1:E|0):c(g,h,void 0,b===void 0?0:b|0,p===void 0?g.length-1:p|0)}v.exports={ge:function(g,h,b,p,E){return f(g,h,b,p,E,y)},gt:function(g,h,b,p,E){return f(g,h,b,p,E,r)},lt:function(g,h,b,p,E){return f(g,h,b,p,E,n)},le:function(g,h,b,p,E){return f(g,h,b,p,E,u)},eq:function(g,h,b,p,E){return f(g,h,b,p,E,i)}}},2288:function(v,y){var r=32;y.INT_BITS=r,y.INT_MAX=2147483647,y.INT_MIN=-1<<r-1,y.sign=function(i){return(i>0)-(i<0)},y.abs=function(i){var f=i>>r-1;return(i^f)-f},y.min=function(i,f){return f^(i^f)&-(i<f)},y.max=function(i,f){return i^(i^f)&-(i<f)},y.isPow2=function(i){return!(i&i-1)&&!!i},y.log2=function(i){var f,g;return f=(i>65535)<<4,i>>>=f,g=(i>255)<<3,i>>>=g,f|=g,g=(i>15)<<2,i>>>=g,f|=g,g=(i>3)<<1,i>>>=g,f|=g,f|i>>1},y.log10=function(i){return i>=1e9?9:i>=1e8?8:i>=1e7?7:i>=1e6?6:i>=1e5?5:i>=1e4?4:i>=1e3?3:i>=100?2:i>=10?1:0},y.popCount=function(i){return i=i-(i>>>1&1431655765),i=(i&858993459)+(i>>>2&858993459),(i+(i>>>4)&252645135)*16843009>>>24};function n(i){var f=32;return i&=-i,i&&f--,i&65535&&(f-=16),i&16711935&&(f-=8),i&252645135&&(f-=4),i&858993459&&(f-=2),i&1431655765&&(f-=1),f}y.countTrailingZeros=n,y.nextPow2=function(i){return i+=i===0,--i,i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i+1},y.prevPow2=function(i){return i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i-(i>>>1)},y.parity=function(i){return i^=i>>>16,i^=i>>>8,i^=i>>>4,i&=15,27030>>>i&1};var u=new Array(256);(function(i){for(var f=0;f<256;++f){var g=f,h=f,b=7;for(g>>>=1;g;g>>>=1)h<<=1,h|=g&1,--b;i[f]=h<<b&255}})(u),y.reverse=function(i){return u[i&255]<<24|u[i>>>8&255]<<16|u[i>>>16&255]<<8|u[i>>>24&255]},y.interleave2=function(i,f){return i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,i|f<<1},y.deinterleave2=function(i,f){return i=i>>>f&1431655765,i=(i|i>>>1)&858993459,i=(i|i>>>2)&252645135,i=(i|i>>>4)&16711935,i=(i|i>>>16)&65535,i<<16>>16},y.interleave3=function(i,f,g){return i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,i|=f<<1,g&=1023,g=(g|g<<16)&4278190335,g=(g|g<<8)&251719695,g=(g|g<<4)&3272356035,g=(g|g<<2)&1227133513,i|g<<2},y.deinterleave3=function(i,f){return i=i>>>f&1227133513,i=(i|i>>>2)&3272356035,i=(i|i>>>4)&251719695,i=(i|i>>>8)&4278190335,i=(i|i>>>16)&1023,i<<22>>22},y.nextCombination=function(i){var f=i|i-1;return f+1|(~f&-~f)-1>>>n(i)+1}},1928:function(v,y,r){v=r.nmd(v),function(n,u){function i(G,U){if(!G)throw new Error(U||"Assertion failed")}function f(G,U){G.super_=U;var Y=function(){};Y.prototype=U.prototype,G.prototype=new Y,G.prototype.constructor=G}function g(G,U,Y){if(g.isBN(G))return G;this.negative=0,this.words=null,this.length=0,this.red=null,G!==null&&((U==="le"||U==="be")&&(Y=U,U=10),this._init(G||0,U||10,Y||"be"))}typeof n=="object"?n.exports=g:u.BN=g,g.BN=g,g.wordSize=26;var h;try{typeof window<"u"&&typeof window.Buffer<"u"?h=window.Buffer:h=r(6601).Buffer}catch{}g.isBN=function(U){return U instanceof g?!0:U!==null&&typeof U=="object"&&U.constructor.wordSize===g.wordSize&&Array.isArray(U.words)},g.max=function(U,Y){return U.cmp(Y)>0?U:Y},g.min=function(U,Y){return U.cmp(Y)<0?U:Y},g.prototype._init=function(U,Y,ee){if(typeof U=="number")return this._initNumber(U,Y,ee);if(typeof U=="object")return this._initArray(U,Y,ee);Y==="hex"&&(Y=16),i(Y===(Y|0)&&Y>=2&&Y<=36),U=U.toString().replace(/\s+/g,"");var re=0;U[0]==="-"&&(re++,this.negative=1),re<U.length&&(Y===16?this._parseHex(U,re,ee):(this._parseBase(U,Y,re),ee==="le"&&this._initArray(this.toArray(),Y,ee)))},g.prototype._initNumber=function(U,Y,ee){U<0&&(this.negative=1,U=-U),U<67108864?(this.words=[U&67108863],this.length=1):U<4503599627370496?(this.words=[U&67108863,U/67108864&67108863],this.length=2):(i(U<9007199254740992),this.words=[U&67108863,U/67108864&67108863,1],this.length=3),ee==="le"&&this._initArray(this.toArray(),Y,ee)},g.prototype._initArray=function(U,Y,ee){if(i(typeof U.length=="number"),U.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(U.length/3),this.words=new Array(this.length);for(var re=0;re<this.length;re++)this.words[re]=0;var ie,se,ce=0;if(ee==="be")for(re=U.length-1,ie=0;re>=0;re-=3)se=U[re]|U[re-1]<<8|U[re-2]<<16,this.words[ie]|=se<<ce&67108863,this.words[ie+1]=se>>>26-ce&67108863,ce+=24,ce>=26&&(ce-=26,ie++);else if(ee==="le")for(re=0,ie=0;re<U.length;re+=3)se=U[re]|U[re+1]<<8|U[re+2]<<16,this.words[ie]|=se<<ce&67108863,this.words[ie+1]=se>>>26-ce&67108863,ce+=24,ce>=26&&(ce-=26,ie++);return this.strip()};function b(G,U){var Y=G.charCodeAt(U);return Y>=65&&Y<=70?Y-55:Y>=97&&Y<=102?Y-87:Y-48&15}function p(G,U,Y){var ee=b(G,Y);return Y-1>=U&&(ee|=b(G,Y-1)<<4),ee}g.prototype._parseHex=function(U,Y,ee){this.length=Math.ceil((U.length-Y)/6),this.words=new Array(this.length);for(var re=0;re<this.length;re++)this.words[re]=0;var ie=0,se=0,ce;if(ee==="be")for(re=U.length-1;re>=Y;re-=2)ce=p(U,Y,re)<<ie,this.words[se]|=ce&67108863,ie>=18?(ie-=18,se+=1,this.words[se]|=ce>>>26):ie+=8;else{var q=U.length-Y;for(re=q%2===0?Y+1:Y;re<U.length;re+=2)ce=p(U,Y,re)<<ie,this.words[se]|=ce&67108863,ie>=18?(ie-=18,se+=1,this.words[se]|=ce>>>26):ie+=8}this.strip()};function E(G,U,Y,ee){for(var re=0,ie=Math.min(G.length,Y),se=U;se<ie;se++){var ce=G.charCodeAt(se)-48;re*=ee,ce>=49?re+=ce-49+10:ce>=17?re+=ce-17+10:re+=ce}return re}g.prototype._parseBase=function(U,Y,ee){this.words=[0],this.length=1;for(var re=0,ie=1;ie<=67108863;ie*=Y)re++;re--,ie=ie/Y|0;for(var se=U.length-ee,ce=se%re,q=Math.min(se,se-ce)+ee,j=0,Z=ee;Z<q;Z+=re)j=E(U,Z,Z+re,Y),this.imuln(ie),this.words[0]+j<67108864?this.words[0]+=j:this._iaddn(j);if(ce!==0){var Q=1;for(j=E(U,Z,U.length,Y),Z=0;Z<ce;Z++)Q*=Y;this.imuln(Q),this.words[0]+j<67108864?this.words[0]+=j:this._iaddn(j)}this.strip()},g.prototype.copy=function(U){U.words=new Array(this.length);for(var Y=0;Y<this.length;Y++)U.words[Y]=this.words[Y];U.length=this.length,U.negative=this.negative,U.red=this.red},g.prototype.clone=function(){var U=new g(null);return this.copy(U),U},g.prototype._expand=function(U){for(;this.length<U;)this.words[this.length++]=0;return this},g.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},g.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},g.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","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"],l=[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],m=[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];g.prototype.toString=function(U,Y){U=U||10,Y=Y|0||1;var ee;if(U===16||U==="hex"){ee="";for(var re=0,ie=0,se=0;se<this.length;se++){var ce=this.words[se],q=((ce<<re|ie)&16777215).toString(16);ie=ce>>>24-re&16777215,ie!==0||se!==this.length-1?ee=c[6-q.length]+q+ee:ee=q+ee,re+=2,re>=26&&(re-=26,se--)}for(ie!==0&&(ee=ie.toString(16)+ee);ee.length%Y!==0;)ee="0"+ee;return this.negative!==0&&(ee="-"+ee),ee}if(U===(U|0)&&U>=2&&U<=36){var j=l[U],Z=m[U];ee="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var ue=Q.modn(Z).toString(U);Q=Q.idivn(Z),Q.isZero()?ee=ue+ee:ee=c[j-ue.length]+ue+ee}for(this.isZero()&&(ee="0"+ee);ee.length%Y!==0;)ee="0"+ee;return this.negative!==0&&(ee="-"+ee),ee}i(!1,"Base should be between 2 and 36")},g.prototype.toNumber=function(){var U=this.words[0];return this.length===2?U+=this.words[1]*67108864:this.length===3&&this.words[2]===1?U+=4503599627370496+this.words[1]*67108864:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-U:U},g.prototype.toJSON=function(){return this.toString(16)},g.prototype.toBuffer=function(U,Y){return i(typeof h<"u"),this.toArrayLike(h,U,Y)},g.prototype.toArray=function(U,Y){return this.toArrayLike(Array,U,Y)},g.prototype.toArrayLike=function(U,Y,ee){var re=this.byteLength(),ie=ee||Math.max(1,re);i(re<=ie,"byte array longer than desired length"),i(ie>0,"Requested array length <= 0"),this.strip();var se=Y==="le",ce=new U(ie),q,j,Z=this.clone();if(se){for(j=0;!Z.isZero();j++)q=Z.andln(255),Z.iushrn(8),ce[j]=q;for(;j<ie;j++)ce[j]=0}else{for(j=0;j<ie-re;j++)ce[j]=0;for(j=0;!Z.isZero();j++)q=Z.andln(255),Z.iushrn(8),ce[ie-j-1]=q}return ce},Math.clz32?g.prototype._countBits=function(U){return 32-Math.clz32(U)}:g.prototype._countBits=function(U){var Y=U,ee=0;return Y>=4096&&(ee+=13,Y>>>=13),Y>=64&&(ee+=7,Y>>>=7),Y>=8&&(ee+=4,Y>>>=4),Y>=2&&(ee+=2,Y>>>=2),ee+Y},g.prototype._zeroBits=function(U){if(U===0)return 26;var Y=U,ee=0;return Y&8191||(ee+=13,Y>>>=13),Y&127||(ee+=7,Y>>>=7),Y&15||(ee+=4,Y>>>=4),Y&3||(ee+=2,Y>>>=2),Y&1||ee++,ee},g.prototype.bitLength=function(){var U=this.words[this.length-1],Y=this._countBits(U);return(this.length-1)*26+Y};function M(G){for(var U=new Array(G.bitLength()),Y=0;Y<U.length;Y++){var ee=Y/26|0,re=Y%26;U[Y]=(G.words[ee]&1<<re)>>>re}return U}g.prototype.zeroBits=function(){if(this.isZero())return 0;for(var U=0,Y=0;Y<this.length;Y++){var ee=this._zeroBits(this.words[Y]);if(U+=ee,ee!==26)break}return U},g.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},g.prototype.toTwos=function(U){return this.negative!==0?this.abs().inotn(U).iaddn(1):this.clone()},g.prototype.fromTwos=function(U){return this.testn(U-1)?this.notn(U).iaddn(1).ineg():this.clone()},g.prototype.isNeg=function(){return this.negative!==0},g.prototype.neg=function(){return this.clone().ineg()},g.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},g.prototype.iuor=function(U){for(;this.length<U.length;)this.words[this.length++]=0;for(var Y=0;Y<U.length;Y++)this.words[Y]=this.words[Y]|U.words[Y];return this.strip()},g.prototype.ior=function(U){return i((this.negative|U.negative)===0),this.iuor(U)},g.prototype.or=function(U){return this.length>U.length?this.clone().ior(U):U.clone().ior(this)},g.prototype.uor=function(U){return this.length>U.length?this.clone().iuor(U):U.clone().iuor(this)},g.prototype.iuand=function(U){var Y;this.length>U.length?Y=U:Y=this;for(var ee=0;ee<Y.length;ee++)this.words[ee]=this.words[ee]&U.words[ee];return this.length=Y.length,this.strip()},g.prototype.iand=function(U){return i((this.negative|U.negative)===0),this.iuand(U)},g.prototype.and=function(U){return this.length>U.length?this.clone().iand(U):U.clone().iand(this)},g.prototype.uand=function(U){return this.length>U.length?this.clone().iuand(U):U.clone().iuand(this)},g.prototype.iuxor=function(U){var Y,ee;this.length>U.length?(Y=this,ee=U):(Y=U,ee=this);for(var re=0;re<ee.length;re++)this.words[re]=Y.words[re]^ee.words[re];if(this!==Y)for(;re<Y.length;re++)this.words[re]=Y.words[re];return this.length=Y.length,this.strip()},g.prototype.ixor=function(U){return i((this.negative|U.negative)===0),this.iuxor(U)},g.prototype.xor=function(U){return this.length>U.length?this.clone().ixor(U):U.clone().ixor(this)},g.prototype.uxor=function(U){return this.length>U.length?this.clone().iuxor(U):U.clone().iuxor(this)},g.prototype.inotn=function(U){i(typeof U=="number"&&U>=0);var Y=Math.ceil(U/26)|0,ee=U%26;this._expand(Y),ee>0&&Y--;for(var re=0;re<Y;re++)this.words[re]=~this.words[re]&67108863;return ee>0&&(this.words[re]=~this.words[re]&67108863>>26-ee),this.strip()},g.prototype.notn=function(U){return this.clone().inotn(U)},g.prototype.setn=function(U,Y){i(typeof U=="number"&&U>=0);var ee=U/26|0,re=U%26;return this._expand(ee+1),Y?this.words[ee]=this.words[ee]|1<<re:this.words[ee]=this.words[ee]&~(1<<re),this.strip()},g.prototype.iadd=function(U){var Y;if(this.negative!==0&&U.negative===0)return this.negative=0,Y=this.isub(U),this.negative^=1,this._normSign();if(this.negative===0&&U.negative!==0)return U.negative=0,Y=this.isub(U),U.negative=1,Y._normSign();var ee,re;this.length>U.length?(ee=this,re=U):(ee=U,re=this);for(var ie=0,se=0;se<re.length;se++)Y=(ee.words[se]|0)+(re.words[se]|0)+ie,this.words[se]=Y&67108863,ie=Y>>>26;for(;ie!==0&&se<ee.length;se++)Y=(ee.words[se]|0)+ie,this.words[se]=Y&67108863,ie=Y>>>26;if(this.length=ee.length,ie!==0)this.words[this.length]=ie,this.length++;else if(ee!==this)for(;se<ee.length;se++)this.words[se]=ee.words[se];return this},g.prototype.add=function(U){var Y;return U.negative!==0&&this.negative===0?(U.negative=0,Y=this.sub(U),U.negative^=1,Y):U.negative===0&&this.negative!==0?(this.negative=0,Y=U.sub(this),this.negative=1,Y):this.length>U.length?this.clone().iadd(U):U.clone().iadd(this)},g.prototype.isub=function(U){if(U.negative!==0){U.negative=0;var Y=this.iadd(U);return U.negative=1,Y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(U),this.negative=1,this._normSign();var ee=this.cmp(U);if(ee===0)return this.negative=0,this.length=1,this.words[0]=0,this;var re,ie;ee>0?(re=this,ie=U):(re=U,ie=this);for(var se=0,ce=0;ce<ie.length;ce++)Y=(re.words[ce]|0)-(ie.words[ce]|0)+se,se=Y>>26,this.words[ce]=Y&67108863;for(;se!==0&&ce<re.length;ce++)Y=(re.words[ce]|0)+se,se=Y>>26,this.words[ce]=Y&67108863;if(se===0&&ce<re.length&&re!==this)for(;ce<re.length;ce++)this.words[ce]=re.words[ce];return this.length=Math.max(this.length,ce),re!==this&&(this.negative=1),this.strip()},g.prototype.sub=function(U){return this.clone().isub(U)};function L(G,U,Y){Y.negative=U.negative^G.negative;var ee=G.length+U.length|0;Y.length=ee,ee=ee-1|0;var re=G.words[0]|0,ie=U.words[0]|0,se=re*ie,ce=se&67108863,q=se/67108864|0;Y.words[0]=ce;for(var j=1;j<ee;j++){for(var Z=q>>>26,Q=q&67108863,ue=Math.min(j,U.length-1),fe=Math.max(0,j-G.length+1);fe<=ue;fe++){var te=j-fe|0;re=G.words[te]|0,ie=U.words[fe]|0,se=re*ie+Q,Z+=se/67108864|0,Q=se&67108863}Y.words[j]=Q|0,q=Z|0}return q!==0?Y.words[j]=q|0:Y.length--,Y.strip()}var D=function(U,Y,ee){var re=U.words,ie=Y.words,se=ee.words,ce=0,q,j,Z,Q=re[0]|0,ue=Q&8191,fe=Q>>>13,te=re[1]|0,ne=te&8191,ve=te>>>13,le=re[2]|0,xe=le&8191,Se=le>>>13,Re=re[3]|0,Ee=Re&8191,Oe=Re>>>13,Be=re[4]|0,Le=Be&8191,Te=Be>>>13,De=re[5]|0,Ve=De&8191,Ye=De>>>13,Ne=re[6]|0,Xe=Ne&8191,ht=Ne>>>13,st=re[7]|0,it=st&8191,nt=st>>>13,pt=re[8]|0,Tt=pt&8191,Et=pt>>>13,Dt=re[9]|0,et=Dt&8191,Ue=Dt>>>13,ze=ie[0]|0,rt=ze&8191,lt=ze>>>13,Qe=ie[1]|0,Fe=Qe&8191,Ce=Qe>>>13,pe=ie[2]|0,we=pe&8191,Ae=pe>>>13,Pe=ie[3]|0,Ge=Pe&8191,We=Pe>>>13,tt=ie[4]|0,ct=tt&8191,St=tt>>>13,Pt=ie[5]|0,wt=Pt&8191,Bt=Pt>>>13,Wt=ie[6]|0,hr=Wt&8191,gt=Wt>>>13,jt=ie[7]|0,Ut=jt&8191,or=jt>>>13,ur=ie[8]|0,dt=ur&8191,ut=ur>>>13,yt=ie[9]|0,Lt=yt&8191,Rt=yt>>>13;ee.negative=U.negative^Y.negative,ee.length=19,q=Math.imul(ue,rt),j=Math.imul(ue,lt),j=j+Math.imul(fe,rt)|0,Z=Math.imul(fe,lt);var Nt=(ce+q|0)+((j&8191)<<13)|0;ce=(Z+(j>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,q=Math.imul(ne,rt),j=Math.imul(ne,lt),j=j+Math.imul(ve,rt)|0,Z=Math.imul(ve,lt),q=q+Math.imul(ue,Fe)|0,j=j+Math.imul(ue,Ce)|0,j=j+Math.imul(fe,Fe)|0,Z=Z+Math.imul(fe,Ce)|0;var Vt=(ce+q|0)+((j&8191)<<13)|0;ce=(Z+(j>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,q=Math.imul(xe,rt),j=Math.imul(xe,lt),j=j+Math.imul(Se,rt)|0,Z=Math.imul(Se,lt),q=q+Math.imul(ne,Fe)|0,j=j+Math.imul(ne,Ce)|0,j=j+Math.imul(ve,Fe)|0,Z=Z+Math.imul(ve,Ce)|0,q=q+Math.imul(ue,we)|0,j=j+Math.imul(ue,Ae)|0,j=j+Math.imul(fe,we)|0,Z=Z+Math.imul(fe,Ae)|0;var Zt=(ce+q|0)+((j&8191)<<13)|0;ce=(Z+(j>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,q=Math.imul(Ee,rt),j=Math.imul(Ee,lt),j=j+Math.imul(Oe,rt)|0,Z=Math.imul(Oe,lt),q=q+Math.imul(xe,Fe)|0,j=j+Math.imul(xe,Ce)|0,j=j+Math.imul(Se,Fe)|0,Z=Z+Math.imul(Se,Ce)|0,q=q+Math.imul(ne,we)|0,j=j+Math.imul(ne,Ae)|0,j=j+Math.imul(ve,we)|0,Z=Z+Math.imul(ve,Ae)|0,q=q+Math.imul(ue,Ge)|0,j=j+Math.imul(ue,We)|0,j=j+Math.imul(fe,Ge)|0,Z=Z+Math.imul(fe,We)|0;var qt=(ce+q|0)+((j&8191)<<13)|0;ce=(Z+(j>>>13)|0)+(qt>>>26)|0,qt&=67108863,q=Math.imul(Le,rt),j=Math.imul(Le,lt),j=j+Math.imul(Te,rt)|0,Z=Math.imul(Te,lt),q=q+Math.imul(Ee,Fe)|0,j=j+Math.imul(Ee,Ce)|0,j=j+Math.imul(Oe,Fe)|0,Z=Z+Math.imul(Oe,Ce)|0,q=q+Math.imul(xe,we)|0,j=j+Math.imul(xe,Ae)|0,j=j+Math.imul(Se,we)|0,Z=Z+Math.imul(Se,Ae)|0,q=q+Math.imul(ne,Ge)|0,j=j+Math.imul(ne,We)|0,j=j+Math.imul(ve,Ge)|0,Z=Z+Math.imul(ve,We)|0,q=q+Math.imul(ue,ct)|0,j=j+Math.imul(ue,St)|0,j=j+Math.imul(fe,ct)|0,Z=Z+Math.imul(fe,St)|0;var Jt=(ce+q|0)+((j&8191)<<13)|0;ce=(Z+(j>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,q=Math.imul(Ve,rt),j=Math.imul(Ve,lt),j=j+Math.imul(Ye,rt)|0,Z=Math.imul(Ye,lt),q=q+Math.imul(Le,Fe)|0,j=j+Math.imul(Le,Ce)|0,j=j+Math.imul(Te,Fe)|0,Z=Z+Math.imul(Te,Ce)|0,q=q+Math.imul(Ee,we)|0,j=j+Math.imul(Ee,Ae)|0,j=j+Math.imul(Oe,we)|0,Z=Z+Math.imul(Oe,Ae)|0,q=q+Math.imul(xe,Ge)|0,j=j+Math.imul(xe,We)|0,j=j+Math.imul(Se,Ge)|0,Z=Z+Math.imul(Se,We)|0,q=q+Math.imul(ne,ct)|0,j=j+Math.imul(ne,St)|0,j=j+Math.imul(ve,ct)|0,Z=Z+Math.imul(ve,St)|0,q=q+Math.imul(ue,wt)|0,j=j+Math.imul(ue,Bt)|0,j=j+Math.imul(fe,wt)|0,Z=Z+Math.imul(fe,Bt)|0;var nr=(ce+q|0)+((j&8191)<<13)|0;ce=(Z+(j>>>13)|0)+(nr>>>26)|0,nr&=67108863,q=Math.imul(Xe,rt),j=Math.imul(Xe,lt),j=j+Math.imul(ht,rt)|0,Z=Math.imul(ht,lt),q=q+Math.imul(Ve,Fe)|0,j=j+Math.imul(Ve,Ce)|0,j=j+Math.imul(Ye,Fe)|0,Z=Z+Math.imul(Ye,Ce)|0,q=q+Math.imul(Le,we)|0,j=j+Math.imul(Le,Ae)|0,j=j+Math.imul(Te,we)|0,Z=Z+Math.imul(Te,Ae)|0,q=q+Math.imul(Ee,Ge)|0,j=j+Math.imul(Ee,We)|0,j=j+Math.imul(Oe,Ge)|0,Z=Z+Math.imul(Oe,We)|0,q=q+Math.imul(xe,ct)|0,j=j+Math.imul(xe,St)|0,j=j+Math.imul(Se,ct)|0,Z=Z+Math.imul(Se,St)|0,q=q+Math.imul(ne,wt)|0,j=j+Math.imul(ne,Bt)|0,j=j+Math.imul(ve,wt)|0,Z=Z+Math.imul(ve,Bt)|0,q=q+Math.imul(ue,hr)|0,j=j+Math.imul(ue,gt)|0,j=j+Math.imul(fe,hr)|0,Z=Z+Math.imul(fe,gt)|0;var Mr=(ce+q|0)+((j&8191)<<13)|0;ce=(Z+(j>>>13)|0)+(Mr>>>26)|0,Mr&=67108863,q=Math.imul(it,rt),j=Math.imul(it,lt),j=j+Math.imul(nt,rt)|0,Z=Math.imul(nt,lt),q=q+Math.imul(Xe,Fe)|0,j=j+Math.imul(Xe,Ce)|0,j=j+Math.imul(ht,Fe)|0,Z=Z+Math.imul(ht,Ce)|0,q=q+Math.imul(Ve,we)|0,j=j+Math.imul(Ve,Ae)|0,j=j+Math.imul(Ye,we)|0,Z=Z+Math.imul(Ye,Ae)|0,q=q+Math.imul(Le,Ge)|0,j=j+Math.imul(Le,We)|0,j=j+Math.imul(Te,Ge)|0,Z=Z+Math.imul(Te,We)|0,q=q+Math.imul(Ee,ct)|0,j=j+Math.imul(Ee,St)|0,j=j+Math.imul(Oe,ct)|0,Z=Z+Math.imul(Oe,St)|0,q=q+Math.imul(xe,wt)|0,j=j+Math.imul(xe,Bt)|0,j=j+Math.imul(Se,wt)|0,Z=Z+Math.imul(Se,Bt)|0,q=q+Math.imul(ne,hr)|0,j=j+Math.imul(ne,gt)|0,j=j+Math.imul(ve,hr)|0,Z=Z+Math.imul(ve,gt)|0,q=q+Math.imul(ue,Ut)|0,j=j+Math.imul(ue,or)|0,j=j+Math.imul(fe,Ut)|0,Z=Z+Math.imul(fe,or)|0;var Ke=(ce+q|0)+((j&8191)<<13)|0;ce=(Z+(j>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,q=Math.imul(Tt,rt),j=Math.imul(Tt,lt),j=j+Math.imul(Et,rt)|0,Z=Math.imul(Et,lt),q=q+Math.imul(it,Fe)|0,j=j+Math.imul(it,Ce)|0,j=j+Math.imul(nt,Fe)|0,Z=Z+Math.imul(nt,Ce)|0,q=q+Math.imul(Xe,we)|0,j=j+Math.imul(Xe,Ae)|0,j=j+Math.imul(ht,we)|0,Z=Z+Math.imul(ht,Ae)|0,q=q+Math.imul(Ve,Ge)|0,j=j+Math.imul(Ve,We)|0,j=j+Math.imul(Ye,Ge)|0,Z=Z+Math.imul(Ye,We)|0,q=q+Math.imul(Le,ct)|0,j=j+Math.imul(Le,St)|0,j=j+Math.imul(Te,ct)|0,Z=Z+Math.imul(Te,St)|0,q=q+Math.imul(Ee,wt)|0,j=j+Math.imul(Ee,Bt)|0,j=j+Math.imul(Oe,wt)|0,Z=Z+Math.imul(Oe,Bt)|0,q=q+Math.imul(xe,hr)|0,j=j+Math.imul(xe,gt)|0,j=j+Math.imul(Se,hr)|0,Z=Z+Math.imul(Se,gt)|0,q=q+Math.imul(ne,Ut)|0,j=j+Math.imul(ne,or)|0,j=j+Math.imul(ve,Ut)|0,Z=Z+Math.imul(ve,or)|0,q=q+Math.imul(ue,dt)|0,j=j+Math.imul(ue,ut)|0,j=j+Math.imul(fe,dt)|0,Z=Z+Math.imul(fe,ut)|0;var Ze=(ce+q|0)+((j&8191)<<13)|0;ce=(Z+(j>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,q=Math.imul(et,rt),j=Math.imul(et,lt),j=j+Math.imul(Ue,rt)|0,Z=Math.imul(Ue,lt),q=q+Math.imul(Tt,Fe)|0,j=j+Math.imul(Tt,Ce)|0,j=j+Math.imul(Et,Fe)|0,Z=Z+Math.imul(Et,Ce)|0,q=q+Math.imul(it,we)|0,j=j+Math.imul(it,Ae)|0,j=j+Math.imul(nt,we)|0,Z=Z+Math.imul(nt,Ae)|0,q=q+Math.imul(Xe,Ge)|0,j=j+Math.imul(Xe,We)|0,j=j+Math.imul(ht,Ge)|0,Z=Z+Math.imul(ht,We)|0,q=q+Math.imul(Ve,ct)|0,j=j+Math.imul(Ve,St)|0,j=j+Math.imul(Ye,ct)|0,Z=Z+Math.imul(Ye,St)|0,q=q+Math.imul(Le,wt)|0,j=j+Math.imul(Le,Bt)|0,j=j+Math.imul(Te,wt)|0,Z=Z+Math.imul(Te,Bt)|0,q=q+Math.imul(Ee,hr)|0,j=j+Math.imul(Ee,gt)|0,j=j+Math.imul(Oe,hr)|0,Z=Z+Math.imul(Oe,gt)|0,q=q+Math.imul(xe,Ut)|0,j=j+Math.imul(xe,or)|0,j=j+Math.imul(Se,Ut)|0,Z=Z+Math.imul(Se,or)|0,q=q+Math.imul(ne,dt)|0,j=j+Math.imul(ne,ut)|0,j=j+Math.imul(ve,dt)|0,Z=Z+Math.imul(ve,ut)|0,q=q+Math.imul(ue,Lt)|0,j=j+Math.imul(ue,Rt)|0,j=j+Math.imul(fe,Lt)|0,Z=Z+Math.imul(fe,Rt)|0;var zt=(ce+q|0)+((j&8191)<<13)|0;ce=(Z+(j>>>13)|0)+(zt>>>26)|0,zt&=67108863,q=Math.imul(et,Fe),j=Math.imul(et,Ce),j=j+Math.imul(Ue,Fe)|0,Z=Math.imul(Ue,Ce),q=q+Math.imul(Tt,we)|0,j=j+Math.imul(Tt,Ae)|0,j=j+Math.imul(Et,we)|0,Z=Z+Math.imul(Et,Ae)|0,q=q+Math.imul(it,Ge)|0,j=j+Math.imul(it,We)|0,j=j+Math.imul(nt,Ge)|0,Z=Z+Math.imul(nt,We)|0,q=q+Math.imul(Xe,ct)|0,j=j+Math.imul(Xe,St)|0,j=j+Math.imul(ht,ct)|0,Z=Z+Math.imul(ht,St)|0,q=q+Math.imul(Ve,wt)|0,j=j+Math.imul(Ve,Bt)|0,j=j+Math.imul(Ye,wt)|0,Z=Z+Math.imul(Ye,Bt)|0,q=q+Math.imul(Le,hr)|0,j=j+Math.imul(Le,gt)|0,j=j+Math.imul(Te,hr)|0,Z=Z+Math.imul(Te,gt)|0,q=q+Math.imul(Ee,Ut)|0,j=j+Math.imul(Ee,or)|0,j=j+Math.imul(Oe,Ut)|0,Z=Z+Math.imul(Oe,or)|0,q=q+Math.imul(xe,dt)|0,j=j+Math.imul(xe,ut)|0,j=j+Math.imul(Se,dt)|0,Z=Z+Math.imul(Se,ut)|0,q=q+Math.imul(ne,Lt)|0,j=j+Math.imul(ne,Rt)|0,j=j+Math.imul(ve,Lt)|0,Z=Z+Math.imul(ve,Rt)|0;var kt=(ce+q|0)+((j&8191)<<13)|0;ce=(Z+(j>>>13)|0)+(kt>>>26)|0,kt&=67108863,q=Math.imul(et,we),j=Math.imul(et,Ae),j=j+Math.imul(Ue,we)|0,Z=Math.imul(Ue,Ae),q=q+Math.imul(Tt,Ge)|0,j=j+Math.imul(Tt,We)|0,j=j+Math.imul(Et,Ge)|0,Z=Z+Math.imul(Et,We)|0,q=q+Math.imul(it,ct)|0,j=j+Math.imul(it,St)|0,j=j+Math.imul(nt,ct)|0,Z=Z+Math.imul(nt,St)|0,q=q+Math.imul(Xe,wt)|0,j=j+Math.imul(Xe,Bt)|0,j=j+Math.imul(ht,wt)|0,Z=Z+Math.imul(ht,Bt)|0,q=q+Math.imul(Ve,hr)|0,j=j+Math.imul(Ve,gt)|0,j=j+Math.imul(Ye,hr)|0,Z=Z+Math.imul(Ye,gt)|0,q=q+Math.imul(Le,Ut)|0,j=j+Math.imul(Le,or)|0,j=j+Math.imul(Te,Ut)|0,Z=Z+Math.imul(Te,or)|0,q=q+Math.imul(Ee,dt)|0,j=j+Math.imul(Ee,ut)|0,j=j+Math.imul(Oe,dt)|0,Z=Z+Math.imul(Oe,ut)|0,q=q+Math.imul(xe,Lt)|0,j=j+Math.imul(xe,Rt)|0,j=j+Math.imul(Se,Lt)|0,Z=Z+Math.imul(Se,Rt)|0;var Qt=(ce+q|0)+((j&8191)<<13)|0;ce=(Z+(j>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,q=Math.imul(et,Ge),j=Math.imul(et,We),j=j+Math.imul(Ue,Ge)|0,Z=Math.imul(Ue,We),q=q+Math.imul(Tt,ct)|0,j=j+Math.imul(Tt,St)|0,j=j+Math.imul(Et,ct)|0,Z=Z+Math.imul(Et,St)|0,q=q+Math.imul(it,wt)|0,j=j+Math.imul(it,Bt)|0,j=j+Math.imul(nt,wt)|0,Z=Z+Math.imul(nt,Bt)|0,q=q+Math.imul(Xe,hr)|0,j=j+Math.imul(Xe,gt)|0,j=j+Math.imul(ht,hr)|0,Z=Z+Math.imul(ht,gt)|0,q=q+Math.imul(Ve,Ut)|0,j=j+Math.imul(Ve,or)|0,j=j+Math.imul(Ye,Ut)|0,Z=Z+Math.imul(Ye,or)|0,q=q+Math.imul(Le,dt)|0,j=j+Math.imul(Le,ut)|0,j=j+Math.imul(Te,dt)|0,Z=Z+Math.imul(Te,ut)|0,q=q+Math.imul(Ee,Lt)|0,j=j+Math.imul(Ee,Rt)|0,j=j+Math.imul(Oe,Lt)|0,Z=Z+Math.imul(Oe,Rt)|0;var cr=(ce+q|0)+((j&8191)<<13)|0;ce=(Z+(j>>>13)|0)+(cr>>>26)|0,cr&=67108863,q=Math.imul(et,ct),j=Math.imul(et,St),j=j+Math.imul(Ue,ct)|0,Z=Math.imul(Ue,St),q=q+Math.imul(Tt,wt)|0,j=j+Math.imul(Tt,Bt)|0,j=j+Math.imul(Et,wt)|0,Z=Z+Math.imul(Et,Bt)|0,q=q+Math.imul(it,hr)|0,j=j+Math.imul(it,gt)|0,j=j+Math.imul(nt,hr)|0,Z=Z+Math.imul(nt,gt)|0,q=q+Math.imul(Xe,Ut)|0,j=j+Math.imul(Xe,or)|0,j=j+Math.imul(ht,Ut)|0,Z=Z+Math.imul(ht,or)|0,q=q+Math.imul(Ve,dt)|0,j=j+Math.imul(Ve,ut)|0,j=j+Math.imul(Ye,dt)|0,Z=Z+Math.imul(Ye,ut)|0,q=q+Math.imul(Le,Lt)|0,j=j+Math.imul(Le,Rt)|0,j=j+Math.imul(Te,Lt)|0,Z=Z+Math.imul(Te,Rt)|0;var fr=(ce+q|0)+((j&8191)<<13)|0;ce=(Z+(j>>>13)|0)+(fr>>>26)|0,fr&=67108863,q=Math.imul(et,wt),j=Math.imul(et,Bt),j=j+Math.imul(Ue,wt)|0,Z=Math.imul(Ue,Bt),q=q+Math.imul(Tt,hr)|0,j=j+Math.imul(Tt,gt)|0,j=j+Math.imul(Et,hr)|0,Z=Z+Math.imul(Et,gt)|0,q=q+Math.imul(it,Ut)|0,j=j+Math.imul(it,or)|0,j=j+Math.imul(nt,Ut)|0,Z=Z+Math.imul(nt,or)|0,q=q+Math.imul(Xe,dt)|0,j=j+Math.imul(Xe,ut)|0,j=j+Math.imul(ht,dt)|0,Z=Z+Math.imul(ht,ut)|0,q=q+Math.imul(Ve,Lt)|0,j=j+Math.imul(Ve,Rt)|0,j=j+Math.imul(Ye,Lt)|0,Z=Z+Math.imul(Ye,Rt)|0;var ir=(ce+q|0)+((j&8191)<<13)|0;ce=(Z+(j>>>13)|0)+(ir>>>26)|0,ir&=67108863,q=Math.imul(et,hr),j=Math.imul(et,gt),j=j+Math.imul(Ue,hr)|0,Z=Math.imul(Ue,gt),q=q+Math.imul(Tt,Ut)|0,j=j+Math.imul(Tt,or)|0,j=j+Math.imul(Et,Ut)|0,Z=Z+Math.imul(Et,or)|0,q=q+Math.imul(it,dt)|0,j=j+Math.imul(it,ut)|0,j=j+Math.imul(nt,dt)|0,Z=Z+Math.imul(nt,ut)|0,q=q+Math.imul(Xe,Lt)|0,j=j+Math.imul(Xe,Rt)|0,j=j+Math.imul(ht,Lt)|0,Z=Z+Math.imul(ht,Rt)|0;var Yt=(ce+q|0)+((j&8191)<<13)|0;ce=(Z+(j>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,q=Math.imul(et,Ut),j=Math.imul(et,or),j=j+Math.imul(Ue,Ut)|0,Z=Math.imul(Ue,or),q=q+Math.imul(Tt,dt)|0,j=j+Math.imul(Tt,ut)|0,j=j+Math.imul(Et,dt)|0,Z=Z+Math.imul(Et,ut)|0,q=q+Math.imul(it,Lt)|0,j=j+Math.imul(it,Rt)|0,j=j+Math.imul(nt,Lt)|0,Z=Z+Math.imul(nt,Rt)|0;var gr=(ce+q|0)+((j&8191)<<13)|0;ce=(Z+(j>>>13)|0)+(gr>>>26)|0,gr&=67108863,q=Math.imul(et,dt),j=Math.imul(et,ut),j=j+Math.imul(Ue,dt)|0,Z=Math.imul(Ue,ut),q=q+Math.imul(Tt,Lt)|0,j=j+Math.imul(Tt,Rt)|0,j=j+Math.imul(Et,Lt)|0,Z=Z+Math.imul(Et,Rt)|0;var yr=(ce+q|0)+((j&8191)<<13)|0;ce=(Z+(j>>>13)|0)+(yr>>>26)|0,yr&=67108863,q=Math.imul(et,Lt),j=Math.imul(et,Rt),j=j+Math.imul(Ue,Lt)|0,Z=Math.imul(Ue,Rt);var Tr=(ce+q|0)+((j&8191)<<13)|0;return ce=(Z+(j>>>13)|0)+(Tr>>>26)|0,Tr&=67108863,se[0]=Nt,se[1]=Vt,se[2]=Zt,se[3]=qt,se[4]=Jt,se[5]=nr,se[6]=Mr,se[7]=Ke,se[8]=Ze,se[9]=zt,se[10]=kt,se[11]=Qt,se[12]=cr,se[13]=fr,se[14]=ir,se[15]=Yt,se[16]=gr,se[17]=yr,se[18]=Tr,ce!==0&&(se[19]=ce,ee.length++),ee};Math.imul||(D=L);function A(G,U,Y){Y.negative=U.negative^G.negative,Y.length=G.length+U.length;for(var ee=0,re=0,ie=0;ie<Y.length-1;ie++){var se=re;re=0;for(var ce=ee&67108863,q=Math.min(ie,U.length-1),j=Math.max(0,ie-G.length+1);j<=q;j++){var Z=ie-j,Q=G.words[Z]|0,ue=U.words[j]|0,fe=Q*ue,te=fe&67108863;se=se+(fe/67108864|0)|0,te=te+ce|0,ce=te&67108863,se=se+(te>>>26)|0,re+=se>>>26,se&=67108863}Y.words[ie]=ce,ee=se,se=re}return ee!==0?Y.words[ie]=ee:Y.length--,Y.strip()}function C(G,U,Y){var ee=new S;return ee.mulp(G,U,Y)}g.prototype.mulTo=function(U,Y){var ee,re=this.length+U.length;return this.length===10&&U.length===10?ee=D(this,U,Y):re<63?ee=L(this,U,Y):re<1024?ee=A(this,U,Y):ee=C(this,U,Y),ee};function S(G,U){this.x=G,this.y=U}S.prototype.makeRBT=function(U){for(var Y=new Array(U),ee=g.prototype._countBits(U)-1,re=0;re<U;re++)Y[re]=this.revBin(re,ee,U);return Y},S.prototype.revBin=function(U,Y,ee){if(U===0||U===ee-1)return U;for(var re=0,ie=0;ie<Y;ie++)re|=(U&1)<<Y-ie-1,U>>=1;return re},S.prototype.permute=function(U,Y,ee,re,ie,se){for(var ce=0;ce<se;ce++)re[ce]=Y[U[ce]],ie[ce]=ee[U[ce]]},S.prototype.transform=function(U,Y,ee,re,ie,se){this.permute(se,U,Y,ee,re,ie);for(var ce=1;ce<ie;ce<<=1)for(var q=ce<<1,j=Math.cos(2*Math.PI/q),Z=Math.sin(2*Math.PI/q),Q=0;Q<ie;Q+=q)for(var ue=j,fe=Z,te=0;te<ce;te++){var ne=ee[Q+te],ve=re[Q+te],le=ee[Q+te+ce],xe=re[Q+te+ce],Se=ue*le-fe*xe;xe=ue*xe+fe*le,le=Se,ee[Q+te]=ne+le,re[Q+te]=ve+xe,ee[Q+te+ce]=ne-le,re[Q+te+ce]=ve-xe,te!==q&&(Se=j*ue-Z*fe,fe=j*fe+Z*ue,ue=Se)}},S.prototype.guessLen13b=function(U,Y){var ee=Math.max(Y,U)|1,re=ee&1,ie=0;for(ee=ee/2|0;ee;ee=ee>>>1)ie++;return 1<<ie+1+re},S.prototype.conjugate=function(U,Y,ee){if(!(ee<=1))for(var re=0;re<ee/2;re++){var ie=U[re];U[re]=U[ee-re-1],U[ee-re-1]=ie,ie=Y[re],Y[re]=-Y[ee-re-1],Y[ee-re-1]=-ie}},S.prototype.normalize13b=function(U,Y){for(var ee=0,re=0;re<Y/2;re++){var ie=Math.round(U[2*re+1]/Y)*8192+Math.round(U[2*re]/Y)+ee;U[re]=ie&67108863,ie<67108864?ee=0:ee=ie/67108864|0}return U},S.prototype.convert13b=function(U,Y,ee,re){for(var ie=0,se=0;se<Y;se++)ie=ie+(U[se]|0),ee[2*se]=ie&8191,ie=ie>>>13,ee[2*se+1]=ie&8191,ie=ie>>>13;for(se=2*Y;se<re;++se)ee[se]=0;i(ie===0),i((ie&-8192)===0)},S.prototype.stub=function(U){for(var Y=new Array(U),ee=0;ee<U;ee++)Y[ee]=0;return Y},S.prototype.mulp=function(U,Y,ee){var re=2*this.guessLen13b(U.length,Y.length),ie=this.makeRBT(re),se=this.stub(re),ce=new Array(re),q=new Array(re),j=new Array(re),Z=new Array(re),Q=new Array(re),ue=new Array(re),fe=ee.words;fe.length=re,this.convert13b(U.words,U.length,ce,re),this.convert13b(Y.words,Y.length,Z,re),this.transform(ce,se,q,j,re,ie),this.transform(Z,se,Q,ue,re,ie);for(var te=0;te<re;te++){var ne=q[te]*Q[te]-j[te]*ue[te];j[te]=q[te]*ue[te]+j[te]*Q[te],q[te]=ne}return this.conjugate(q,j,re),this.transform(q,j,fe,se,re,ie),this.conjugate(fe,se,re),this.normalize13b(fe,re),ee.negative=U.negative^Y.negative,ee.length=U.length+Y.length,ee.strip()},g.prototype.mul=function(U){var Y=new g(null);return Y.words=new Array(this.length+U.length),this.mulTo(U,Y)},g.prototype.mulf=function(U){var Y=new g(null);return Y.words=new Array(this.length+U.length),C(this,U,Y)},g.prototype.imul=function(U){return this.clone().mulTo(U,this)},g.prototype.imuln=function(U){i(typeof U=="number"),i(U<67108864);for(var Y=0,ee=0;ee<this.length;ee++){var re=(this.words[ee]|0)*U,ie=(re&67108863)+(Y&67108863);Y>>=26,Y+=re/67108864|0,Y+=ie>>>26,this.words[ee]=ie&67108863}return Y!==0&&(this.words[ee]=Y,this.length++),this},g.prototype.muln=function(U){return this.clone().imuln(U)},g.prototype.sqr=function(){return this.mul(this)},g.prototype.isqr=function(){return this.imul(this.clone())},g.prototype.pow=function(U){var Y=M(U);if(Y.length===0)return new g(1);for(var ee=this,re=0;re<Y.length&&Y[re]===0;re++,ee=ee.sqr());if(++re<Y.length)for(var ie=ee.sqr();re<Y.length;re++,ie=ie.sqr())Y[re]!==0&&(ee=ee.mul(ie));return ee},g.prototype.iushln=function(U){i(typeof U=="number"&&U>=0);var Y=U%26,ee=(U-Y)/26,re=67108863>>>26-Y<<26-Y,ie;if(Y!==0){var se=0;for(ie=0;ie<this.length;ie++){var ce=this.words[ie]&re,q=(this.words[ie]|0)-ce<<Y;this.words[ie]=q|se,se=ce>>>26-Y}se&&(this.words[ie]=se,this.length++)}if(ee!==0){for(ie=this.length-1;ie>=0;ie--)this.words[ie+ee]=this.words[ie];for(ie=0;ie<ee;ie++)this.words[ie]=0;this.length+=ee}return this.strip()},g.prototype.ishln=function(U){return i(this.negative===0),this.iushln(U)},g.prototype.iushrn=function(U,Y,ee){i(typeof U=="number"&&U>=0);var re;Y?re=(Y-Y%26)/26:re=0;var ie=U%26,se=Math.min((U-ie)/26,this.length),ce=67108863^67108863>>>ie<<ie,q=ee;if(re-=se,re=Math.max(0,re),q){for(var j=0;j<se;j++)q.words[j]=this.words[j];q.length=se}if(se!==0)if(this.length>se)for(this.length-=se,j=0;j<this.length;j++)this.words[j]=this.words[j+se];else this.words[0]=0,this.length=1;var Z=0;for(j=this.length-1;j>=0&&(Z!==0||j>=re);j--){var Q=this.words[j]|0;this.words[j]=Z<<26-ie|Q>>>ie,Z=Q&ce}return q&&Z!==0&&(q.words[q.length++]=Z),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},g.prototype.ishrn=function(U,Y,ee){return i(this.negative===0),this.iushrn(U,Y,ee)},g.prototype.shln=function(U){return this.clone().ishln(U)},g.prototype.ushln=function(U){return this.clone().iushln(U)},g.prototype.shrn=function(U){return this.clone().ishrn(U)},g.prototype.ushrn=function(U){return this.clone().iushrn(U)},g.prototype.testn=function(U){i(typeof U=="number"&&U>=0);var Y=U%26,ee=(U-Y)/26,re=1<<Y;if(this.length<=ee)return!1;var ie=this.words[ee];return!!(ie&re)},g.prototype.imaskn=function(U){i(typeof U=="number"&&U>=0);var Y=U%26,ee=(U-Y)/26;if(i(this.negative===0,"imaskn works only with positive numbers"),this.length<=ee)return this;if(Y!==0&&ee++,this.length=Math.min(ee,this.length),Y!==0){var re=67108863^67108863>>>Y<<Y;this.words[this.length-1]&=re}return this.strip()},g.prototype.maskn=function(U){return this.clone().imaskn(U)},g.prototype.iaddn=function(U){return i(typeof U=="number"),i(U<67108864),U<0?this.isubn(-U):this.negative!==0?this.length===1&&(this.words[0]|0)<U?(this.words[0]=U-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(U),this.negative=1,this):this._iaddn(U)},g.prototype._iaddn=function(U){this.words[0]+=U;for(var Y=0;Y<this.length&&this.words[Y]>=67108864;Y++)this.words[Y]-=67108864,Y===this.length-1?this.words[Y+1]=1:this.words[Y+1]++;return this.length=Math.max(this.length,Y+1),this},g.prototype.isubn=function(U){if(i(typeof U=="number"),i(U<67108864),U<0)return this.iaddn(-U);if(this.negative!==0)return this.negative=0,this.iaddn(U),this.negative=1,this;if(this.words[0]-=U,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Y=0;Y<this.length&&this.words[Y]<0;Y++)this.words[Y]+=67108864,this.words[Y+1]-=1;return this.strip()},g.prototype.addn=function(U){return this.clone().iaddn(U)},g.prototype.subn=function(U){return this.clone().isubn(U)},g.prototype.iabs=function(){return this.negative=0,this},g.prototype.abs=function(){return this.clone().iabs()},g.prototype._ishlnsubmul=function(U,Y,ee){var re=U.length+ee,ie;this._expand(re);var se,ce=0;for(ie=0;ie<U.length;ie++){se=(this.words[ie+ee]|0)+ce;var q=(U.words[ie]|0)*Y;se-=q&67108863,ce=(se>>26)-(q/67108864|0),this.words[ie+ee]=se&67108863}for(;ie<this.length-ee;ie++)se=(this.words[ie+ee]|0)+ce,ce=se>>26,this.words[ie+ee]=se&67108863;if(ce===0)return this.strip();for(i(ce===-1),ce=0,ie=0;ie<this.length;ie++)se=-(this.words[ie]|0)+ce,ce=se>>26,this.words[ie]=se&67108863;return this.negative=1,this.strip()},g.prototype._wordDiv=function(U,Y){var ee=this.length-U.length,re=this.clone(),ie=U,se=ie.words[ie.length-1]|0,ce=this._countBits(se);ee=26-ce,ee!==0&&(ie=ie.ushln(ee),re.iushln(ee),se=ie.words[ie.length-1]|0);var q=re.length-ie.length,j;if(Y!=="mod"){j=new g(null),j.length=q+1,j.words=new Array(j.length);for(var Z=0;Z<j.length;Z++)j.words[Z]=0}var Q=re.clone()._ishlnsubmul(ie,1,q);Q.negative===0&&(re=Q,j&&(j.words[q]=1));for(var ue=q-1;ue>=0;ue--){var fe=(re.words[ie.length+ue]|0)*67108864+(re.words[ie.length+ue-1]|0);for(fe=Math.min(fe/se|0,67108863),re._ishlnsubmul(ie,fe,ue);re.negative!==0;)fe--,re.negative=0,re._ishlnsubmul(ie,1,ue),re.isZero()||(re.negative^=1);j&&(j.words[ue]=fe)}return j&&j.strip(),re.strip(),Y!=="div"&&ee!==0&&re.iushrn(ee),{div:j||null,mod:re}},g.prototype.divmod=function(U,Y,ee){if(i(!U.isZero()),this.isZero())return{div:new g(0),mod:new g(0)};var re,ie,se;return this.negative!==0&&U.negative===0?(se=this.neg().divmod(U,Y),Y!=="mod"&&(re=se.div.neg()),Y!=="div"&&(ie=se.mod.neg(),ee&&ie.negative!==0&&ie.iadd(U)),{div:re,mod:ie}):this.negative===0&&U.negative!==0?(se=this.divmod(U.neg(),Y),Y!=="mod"&&(re=se.div.neg()),{div:re,mod:se.mod}):this.negative&U.negative?(se=this.neg().divmod(U.neg(),Y),Y!=="div"&&(ie=se.mod.neg(),ee&&ie.negative!==0&&ie.isub(U)),{div:se.div,mod:ie}):U.length>this.length||this.cmp(U)<0?{div:new g(0),mod:this}:U.length===1?Y==="div"?{div:this.divn(U.words[0]),mod:null}:Y==="mod"?{div:null,mod:new g(this.modn(U.words[0]))}:{div:this.divn(U.words[0]),mod:new g(this.modn(U.words[0]))}:this._wordDiv(U,Y)},g.prototype.div=function(U){return this.divmod(U,"div",!1).div},g.prototype.mod=function(U){return this.divmod(U,"mod",!1).mod},g.prototype.umod=function(U){return this.divmod(U,"mod",!0).mod},g.prototype.divRound=function(U){var Y=this.divmod(U);if(Y.mod.isZero())return Y.div;var ee=Y.div.negative!==0?Y.mod.isub(U):Y.mod,re=U.ushrn(1),ie=U.andln(1),se=ee.cmp(re);return se<0||ie===1&&se===0?Y.div:Y.div.negative!==0?Y.div.isubn(1):Y.div.iaddn(1)},g.prototype.modn=function(U){i(U<=67108863);for(var Y=(1<<26)%U,ee=0,re=this.length-1;re>=0;re--)ee=(Y*ee+(this.words[re]|0))%U;return ee},g.prototype.idivn=function(U){i(U<=67108863);for(var Y=0,ee=this.length-1;ee>=0;ee--){var re=(this.words[ee]|0)+Y*67108864;this.words[ee]=re/U|0,Y=re%U}return this.strip()},g.prototype.divn=function(U){return this.clone().idivn(U)},g.prototype.egcd=function(U){i(U.negative===0),i(!U.isZero());var Y=this,ee=U.clone();Y.negative!==0?Y=Y.umod(U):Y=Y.clone();for(var re=new g(1),ie=new g(0),se=new g(0),ce=new g(1),q=0;Y.isEven()&&ee.isEven();)Y.iushrn(1),ee.iushrn(1),++q;for(var j=ee.clone(),Z=Y.clone();!Y.isZero();){for(var Q=0,ue=1;!(Y.words[0]&ue)&&Q<26;++Q,ue<<=1);if(Q>0)for(Y.iushrn(Q);Q-- >0;)(re.isOdd()||ie.isOdd())&&(re.iadd(j),ie.isub(Z)),re.iushrn(1),ie.iushrn(1);for(var fe=0,te=1;!(ee.words[0]&te)&&fe<26;++fe,te<<=1);if(fe>0)for(ee.iushrn(fe);fe-- >0;)(se.isOdd()||ce.isOdd())&&(se.iadd(j),ce.isub(Z)),se.iushrn(1),ce.iushrn(1);Y.cmp(ee)>=0?(Y.isub(ee),re.isub(se),ie.isub(ce)):(ee.isub(Y),se.isub(re),ce.isub(ie))}return{a:se,b:ce,gcd:ee.iushln(q)}},g.prototype._invmp=function(U){i(U.negative===0),i(!U.isZero());var Y=this,ee=U.clone();Y.negative!==0?Y=Y.umod(U):Y=Y.clone();for(var re=new g(1),ie=new g(0),se=ee.clone();Y.cmpn(1)>0&&ee.cmpn(1)>0;){for(var ce=0,q=1;!(Y.words[0]&q)&&ce<26;++ce,q<<=1);if(ce>0)for(Y.iushrn(ce);ce-- >0;)re.isOdd()&&re.iadd(se),re.iushrn(1);for(var j=0,Z=1;!(ee.words[0]&Z)&&j<26;++j,Z<<=1);if(j>0)for(ee.iushrn(j);j-- >0;)ie.isOdd()&&ie.iadd(se),ie.iushrn(1);Y.cmp(ee)>=0?(Y.isub(ee),re.isub(ie)):(ee.isub(Y),ie.isub(re))}var Q;return Y.cmpn(1)===0?Q=re:Q=ie,Q.cmpn(0)<0&&Q.iadd(U),Q},g.prototype.gcd=function(U){if(this.isZero())return U.abs();if(U.isZero())return this.abs();var Y=this.clone(),ee=U.clone();Y.negative=0,ee.negative=0;for(var re=0;Y.isEven()&&ee.isEven();re++)Y.iushrn(1),ee.iushrn(1);do{for(;Y.isEven();)Y.iushrn(1);for(;ee.isEven();)ee.iushrn(1);var ie=Y.cmp(ee);if(ie<0){var se=Y;Y=ee,ee=se}else if(ie===0||ee.cmpn(1)===0)break;Y.isub(ee)}while(!0);return ee.iushln(re)},g.prototype.invm=function(U){return this.egcd(U).a.umod(U)},g.prototype.isEven=function(){return(this.words[0]&1)===0},g.prototype.isOdd=function(){return(this.words[0]&1)===1},g.prototype.andln=function(U){return this.words[0]&U},g.prototype.bincn=function(U){i(typeof U=="number");var Y=U%26,ee=(U-Y)/26,re=1<<Y;if(this.length<=ee)return this._expand(ee+1),this.words[ee]|=re,this;for(var ie=re,se=ee;ie!==0&&se<this.length;se++){var ce=this.words[se]|0;ce+=ie,ie=ce>>>26,ce&=67108863,this.words[se]=ce}return ie!==0&&(this.words[se]=ie,this.length++),this},g.prototype.isZero=function(){return this.length===1&&this.words[0]===0},g.prototype.cmpn=function(U){var Y=U<0;if(this.negative!==0&&!Y)return-1;if(this.negative===0&&Y)return 1;this.strip();var ee;if(this.length>1)ee=1;else{Y&&(U=-U),i(U<=67108863,"Number is too big");var re=this.words[0]|0;ee=re===U?0:re<U?-1:1}return this.negative!==0?-ee|0:ee},g.prototype.cmp=function(U){if(this.negative!==0&&U.negative===0)return-1;if(this.negative===0&&U.negative!==0)return 1;var Y=this.ucmp(U);return this.negative!==0?-Y|0:Y},g.prototype.ucmp=function(U){if(this.length>U.length)return 1;if(this.length<U.length)return-1;for(var Y=0,ee=this.length-1;ee>=0;ee--){var re=this.words[ee]|0,ie=U.words[ee]|0;if(re!==ie){re<ie?Y=-1:re>ie&&(Y=1);break}}return Y},g.prototype.gtn=function(U){return this.cmpn(U)===1},g.prototype.gt=function(U){return this.cmp(U)===1},g.prototype.gten=function(U){return this.cmpn(U)>=0},g.prototype.gte=function(U){return this.cmp(U)>=0},g.prototype.ltn=function(U){return this.cmpn(U)===-1},g.prototype.lt=function(U){return this.cmp(U)===-1},g.prototype.lten=function(U){return this.cmpn(U)<=0},g.prototype.lte=function(U){return this.cmp(U)<=0},g.prototype.eqn=function(U){return this.cmpn(U)===0},g.prototype.eq=function(U){return this.cmp(U)===0},g.red=function(U){return new k(U)},g.prototype.toRed=function(U){return i(!this.red,"Already a number in reduction context"),i(this.negative===0,"red works only with positives"),U.convertTo(this)._forceRed(U)},g.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},g.prototype._forceRed=function(U){return this.red=U,this},g.prototype.forceRed=function(U){return i(!this.red,"Already a number in reduction context"),this._forceRed(U)},g.prototype.redAdd=function(U){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,U)},g.prototype.redIAdd=function(U){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,U)},g.prototype.redSub=function(U){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,U)},g.prototype.redISub=function(U){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,U)},g.prototype.redShl=function(U){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,U)},g.prototype.redMul=function(U){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,U),this.red.mul(this,U)},g.prototype.redIMul=function(U){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,U),this.red.imul(this,U)},g.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},g.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},g.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},g.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},g.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},g.prototype.redPow=function(U){return i(this.red&&!U.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,U)};var o={k256:null,p224:null,p192:null,p25519:null};function R(G,U){this.name=G,this.p=new g(U,16),this.n=this.p.bitLength(),this.k=new g(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}R.prototype._tmp=function(){var U=new g(null);return U.words=new Array(Math.ceil(this.n/13)),U},R.prototype.ireduce=function(U){var Y=U,ee;do this.split(Y,this.tmp),Y=this.imulK(Y),Y=Y.iadd(this.tmp),ee=Y.bitLength();while(ee>this.n);var re=ee<this.n?-1:Y.ucmp(this.p);return re===0?(Y.words[0]=0,Y.length=1):re>0?Y.isub(this.p):Y.strip!==void 0?Y.strip():Y._strip(),Y},R.prototype.split=function(U,Y){U.iushrn(this.n,0,Y)},R.prototype.imulK=function(U){return U.imul(this.k)};function T(){R.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}f(T,R),T.prototype.split=function(U,Y){for(var ee=4194303,re=Math.min(U.length,9),ie=0;ie<re;ie++)Y.words[ie]=U.words[ie];if(Y.length=re,U.length<=9){U.words[0]=0,U.length=1;return}var se=U.words[9];for(Y.words[Y.length++]=se&ee,ie=10;ie<U.length;ie++){var ce=U.words[ie]|0;U.words[ie-10]=(ce&ee)<<4|se>>>22,se=ce}se>>>=22,U.words[ie-10]=se,se===0&&U.length>10?U.length-=10:U.length-=9},T.prototype.imulK=function(U){U.words[U.length]=0,U.words[U.length+1]=0,U.length+=2;for(var Y=0,ee=0;ee<U.length;ee++){var re=U.words[ee]|0;Y+=re*977,U.words[ee]=Y&67108863,Y=re*64+(Y/67108864|0)}return U.words[U.length-1]===0&&(U.length--,U.words[U.length-1]===0&&U.length--),U};function O(){R.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}f(O,R);function N(){R.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}f(N,R);function H(){R.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}f(H,R),H.prototype.imulK=function(U){for(var Y=0,ee=0;ee<U.length;ee++){var re=(U.words[ee]|0)*19+Y,ie=re&67108863;re>>>=26,U.words[ee]=ie,Y=re}return Y!==0&&(U.words[U.length++]=Y),U},g._prime=function(U){if(o[U])return o[U];var Y;if(U==="k256")Y=new T;else if(U==="p224")Y=new O;else if(U==="p192")Y=new N;else if(U==="p25519")Y=new H;else throw new Error("Unknown prime "+U);return o[U]=Y,Y};function k(G){if(typeof G=="string"){var U=g._prime(G);this.m=U.p,this.prime=U}else i(G.gtn(1),"modulus must be greater than 1"),this.m=G,this.prime=null}k.prototype._verify1=function(U){i(U.negative===0,"red works only with positives"),i(U.red,"red works only with red numbers")},k.prototype._verify2=function(U,Y){i((U.negative|Y.negative)===0,"red works only with positives"),i(U.red&&U.red===Y.red,"red works only with red numbers")},k.prototype.imod=function(U){return this.prime?this.prime.ireduce(U)._forceRed(this):U.umod(this.m)._forceRed(this)},k.prototype.neg=function(U){return U.isZero()?U.clone():this.m.sub(U)._forceRed(this)},k.prototype.add=function(U,Y){this._verify2(U,Y);var ee=U.add(Y);return ee.cmp(this.m)>=0&&ee.isub(this.m),ee._forceRed(this)},k.prototype.iadd=function(U,Y){this._verify2(U,Y);var ee=U.iadd(Y);return ee.cmp(this.m)>=0&&ee.isub(this.m),ee},k.prototype.sub=function(U,Y){this._verify2(U,Y);var ee=U.sub(Y);return ee.cmpn(0)<0&&ee.iadd(this.m),ee._forceRed(this)},k.prototype.isub=function(U,Y){this._verify2(U,Y);var ee=U.isub(Y);return ee.cmpn(0)<0&&ee.iadd(this.m),ee},k.prototype.shl=function(U,Y){return this._verify1(U),this.imod(U.ushln(Y))},k.prototype.imul=function(U,Y){return this._verify2(U,Y),this.imod(U.imul(Y))},k.prototype.mul=function(U,Y){return this._verify2(U,Y),this.imod(U.mul(Y))},k.prototype.isqr=function(U){return this.imul(U,U.clone())},k.prototype.sqr=function(U){return this.mul(U,U)},k.prototype.sqrt=function(U){if(U.isZero())return U.clone();var Y=this.m.andln(3);if(i(Y%2===1),Y===3){var ee=this.m.add(new g(1)).iushrn(2);return this.pow(U,ee)}for(var re=this.m.subn(1),ie=0;!re.isZero()&&re.andln(1)===0;)ie++,re.iushrn(1);i(!re.isZero());var se=new g(1).toRed(this),ce=se.redNeg(),q=this.m.subn(1).iushrn(1),j=this.m.bitLength();for(j=new g(2*j*j).toRed(this);this.pow(j,q).cmp(ce)!==0;)j.redIAdd(ce);for(var Z=this.pow(j,re),Q=this.pow(U,re.addn(1).iushrn(1)),ue=this.pow(U,re),fe=ie;ue.cmp(se)!==0;){for(var te=ue,ne=0;te.cmp(se)!==0;ne++)te=te.redSqr();i(ne<fe);var ve=this.pow(Z,new g(1).iushln(fe-ne-1));Q=Q.redMul(ve),Z=ve.redSqr(),ue=ue.redMul(Z),fe=ne}return Q},k.prototype.invm=function(U){var Y=U._invmp(this.m);return Y.negative!==0?(Y.negative=0,this.imod(Y).redNeg()):this.imod(Y)},k.prototype.pow=function(U,Y){if(Y.isZero())return new g(1).toRed(this);if(Y.cmpn(1)===0)return U.clone();var ee=4,re=new Array(1<<ee);re[0]=new g(1).toRed(this),re[1]=U;for(var ie=2;ie<re.length;ie++)re[ie]=this.mul(re[ie-1],U);var se=re[0],ce=0,q=0,j=Y.bitLength()%26;for(j===0&&(j=26),ie=Y.length-1;ie>=0;ie--){for(var Z=Y.words[ie],Q=j-1;Q>=0;Q--){var ue=Z>>Q&1;if(se!==re[0]&&(se=this.sqr(se)),ue===0&&ce===0){q=0;continue}ce<<=1,ce|=ue,q++,!(q!==ee&&(ie!==0||Q!==0))&&(se=this.mul(se,re[ce]),q=0,ce=0)}j=26}return se},k.prototype.convertTo=function(U){var Y=U.umod(this.m);return Y===U?Y.clone():Y},k.prototype.convertFrom=function(U){var Y=U.clone();return Y.red=null,Y},g.mont=function(U){return new V(U)};function V(G){k.call(this,G),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new g(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)}f(V,k),V.prototype.convertTo=function(U){return this.imod(U.ushln(this.shift))},V.prototype.convertFrom=function(U){var Y=this.imod(U.mul(this.rinv));return Y.red=null,Y},V.prototype.imul=function(U,Y){if(U.isZero()||Y.isZero())return U.words[0]=0,U.length=1,U;var ee=U.imul(Y),re=ee.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ie=ee.isub(re).iushrn(this.shift),se=ie;return ie.cmp(this.m)>=0?se=ie.isub(this.m):ie.cmpn(0)<0&&(se=ie.iadd(this.m)),se._forceRed(this)},V.prototype.mul=function(U,Y){if(U.isZero()||Y.isZero())return new g(0)._forceRed(this);var ee=U.mul(Y),re=ee.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ie=ee.isub(re).iushrn(this.shift),se=ie;return ie.cmp(this.m)>=0?se=ie.isub(this.m):ie.cmpn(0)<0&&(se=ie.iadd(this.m)),se._forceRed(this)},V.prototype.invm=function(U){var Y=this.imod(U._invmp(this.m).mul(this.r2));return Y._forceRed(this)}}(v,this)},2692:function(v){v.exports=y;function y(r){var n,u,i,f=r.length,g=0;for(n=0;n<f;++n)g+=r[n].length;var h=new Array(g),b=0;for(n=0;n<f;++n){var p=r[n],E=p.length;for(u=0;u<E;++u){var c=h[b++]=new Array(E-1),l=0;for(i=0;i<E;++i)i!==u&&(c[l++]=p[i]);if(u&1){var m=c[1];c[1]=c[0],c[0]=m}}}return h}},2569:function(v,y,r){v.exports=l;var n=r(5306),u=r(1390),i=r(2337);function f(m,M){for(var L=0;L<m;++L)if(!(M[L]<=M[L+m]))return!0;return!1}function g(m,M,L,D){for(var A=0,C=0,S=0,o=m.length;S<o;++S){var R=m[S];if(!f(M,R)){for(var T=0;T<2*M;++T)L[A++]=R[T];D[C++]=S}}return C}function h(m,M,L,D){var A=m.length,C=M.length;if(!(A<=0||C<=0)){var S=m[0].length>>>1;if(!(S<=0)){var o,R=n.mallocDouble(2*S*A),T=n.mallocInt32(A);if(A=g(m,S,R,T),A>0){if(S===1&&D)u.init(A),o=u.sweepComplete(S,L,0,A,R,T,0,A,R,T);else{var O=n.mallocDouble(2*S*C),N=n.mallocInt32(C);C=g(M,S,O,N),C>0&&(u.init(A+C),S===1?o=u.sweepBipartite(S,L,0,A,R,T,0,C,O,N):o=i(S,L,D,A,R,T,C,O,N),n.free(O),n.free(N))}n.free(R),n.free(T)}return o}}}var b;function p(m,M){b.push([m,M])}function E(m){return b=[],h(m,m,p,!0),b}function c(m,M){return b=[],h(m,M,p,!1),b}function l(m,M,L){switch(arguments.length){case 1:return E(m);case 2:return typeof M=="function"?h(m,m,M,!0):c(m,M);case 3:return h(m,M,L,!1);default:throw new Error("box-intersect: Invalid arguments")}}},7333:function(v,y){function r(){function i(h,b,p,E,c,l,m,M,L,D,A){for(var C=2*h,S=E,o=C*E;S<c;++S,o+=C){var R=l[b+o],T=l[b+o+h],O=m[S];e:for(var N=M,H=C*M;N<L;++N,H+=C){var k=D[b+H],V=D[b+H+h],G=A[N];if(!(V<R||T<k)){for(var U=b+1;U<h;++U){var Y=l[U+o],ee=l[U+h+o],re=D[U+H],ie=D[U+h+H];if(ee<re||ie<Y)continue e}var se=p(O,G);if(se!==void 0)return se}}}}function f(h,b,p,E,c,l,m,M,L,D,A){for(var C=2*h,S=M,o=C*M;S<L;++S,o+=C){var R=D[b+o],T=D[b+o+h],O=A[S];e:for(var N=E,H=C*E;N<c;++N,H+=C){var k=l[b+H],V=l[b+H+h],G=m[N];if(!(T<k||V<R)){for(var U=b+1;U<h;++U){var Y=l[U+H],ee=l[U+h+H],re=D[U+o],ie=D[U+h+o];if(ee<re||ie<Y)continue e}var se=p(G,O);if(se!==void 0)return se}}}}function g(h,b,p,E,c,l,m,M,L,D,A){return c-E>L-M?i(h,b,p,E,c,l,m,M,L,D,A):f(h,b,p,E,c,l,m,M,L,D,A)}return g}function n(){function i(p,E,c,l,m,M,L,D,A,C,S){for(var o=2*p,R=l,T=o*l;R<m;++R,T+=o){var O=M[E+T],N=M[E+T+p],H=L[R];e:for(var k=D,V=o*D;k<A;++k,V+=o){var G=C[E+V],U=S[k];if(!(G<=O||N<G)){for(var Y=E+1;Y<p;++Y){var ee=M[Y+T],re=M[Y+p+T],ie=C[Y+V],se=C[Y+p+V];if(re<ie||se<ee)continue e}var ce=c(U,H);if(ce!==void 0)return ce}}}}function f(p,E,c,l,m,M,L,D,A,C,S){for(var o=2*p,R=l,T=o*l;R<m;++R,T+=o){var O=M[E+T],N=M[E+T+p],H=L[R];e:for(var k=D,V=o*D;k<A;++k,V+=o){var G=C[E+V],U=S[k];if(!(G<O||N<G)){for(var Y=E+1;Y<p;++Y){var ee=M[Y+T],re=M[Y+p+T],ie=C[Y+V],se=C[Y+p+V];if(re<ie||se<ee)continue e}var ce=c(H,U);if(ce!==void 0)return ce}}}}function g(p,E,c,l,m,M,L,D,A,C,S){for(var o=2*p,R=D,T=o*D;R<A;++R,T+=o){var O=C[E+T],N=S[R];e:for(var H=l,k=o*l;H<m;++H,k+=o){var V=M[E+k],G=M[E+k+p],U=L[H];if(!(O<=V||G<O)){for(var Y=E+1;Y<p;++Y){var ee=M[Y+k],re=M[Y+p+k],ie=C[Y+T],se=C[Y+p+T];if(re<ie||se<ee)continue e}var ce=c(N,U);if(ce!==void 0)return ce}}}}function h(p,E,c,l,m,M,L,D,A,C,S){for(var o=2*p,R=D,T=o*D;R<A;++R,T+=o){var O=C[E+T],N=S[R];e:for(var H=l,k=o*l;H<m;++H,k+=o){var V=M[E+k],G=M[E+k+p],U=L[H];if(!(O<V||G<O)){for(var Y=E+1;Y<p;++Y){var ee=M[Y+k],re=M[Y+p+k],ie=C[Y+T],se=C[Y+p+T];if(re<ie||se<ee)continue e}var ce=c(U,N);if(ce!==void 0)return ce}}}}function b(p,E,c,l,m,M,L,D,A,C,S,o){return M-m>C-A?l?i(p,E,c,m,M,L,D,A,C,S,o):f(p,E,c,m,M,L,D,A,C,S,o):l?g(p,E,c,m,M,L,D,A,C,S,o):h(p,E,c,m,M,L,D,A,C,S,o)}return b}function u(i){return i?r():n()}y.partial=u(!1),y.full=u(!0)},2337:function(v,y,r){v.exports=G;var n=r(5306),u=r(2288),i=r(7333),f=i.partial,g=i.full,h=r(1390),b=r(2464),p=r(122),E=128,c=1<<22,l=1<<22,m=p("!(lo>=p0)&&!(p1>=hi)"),M=p("lo===p0"),L=p("lo<p0"),D=p("hi<=p0"),A=p("lo<=p0&&p0<=hi"),C=p("lo<p0&&p0<=hi"),S=6,o=2,R=1024,T=n.mallocInt32(R),O=n.mallocDouble(R);function N(U,Y){var ee=8*u.log2(Y+1)*(U+1)|0,re=u.nextPow2(S*ee);T.length<re&&(n.free(T),T=n.mallocInt32(re));var ie=u.nextPow2(o*ee);O.length<ie&&(n.free(O),O=n.mallocDouble(ie))}function H(U,Y,ee,re,ie,se,ce,q,j){var Z=S*U;T[Z]=Y,T[Z+1]=ee,T[Z+2]=re,T[Z+3]=ie,T[Z+4]=se,T[Z+5]=ce;var Q=o*U;O[Q]=q,O[Q+1]=j}function k(U,Y,ee,re,ie,se,ce,q,j,Z,Q){var ue=2*U,fe=j*ue,te=Z[fe+Y];e:for(var ne=ie,ve=ie*ue;ne<se;++ne,ve+=ue){var le=ce[ve+Y],xe=ce[ve+Y+U];if(!(te<le||xe<te)&&!(re&&te===le)){for(var Se=q[ne],Re=Y+1;Re<U;++Re){var le=ce[ve+Re],xe=ce[ve+Re+U],Ee=Z[fe+Re],Oe=Z[fe+Re+U];if(xe<Ee||Oe<le)continue e}var Be;if(re?Be=ee(Q,Se):Be=ee(Se,Q),Be!==void 0)return Be}}}function V(U,Y,ee,re,ie,se,ce,q,j,Z){var Q=2*U,ue=q*Q,fe=j[ue+Y];e:for(var te=re,ne=re*Q;te<ie;++te,ne+=Q){var ve=ce[te];if(ve!==Z){var le=se[ne+Y],xe=se[ne+Y+U];if(!(fe<le||xe<fe)){for(var Se=Y+1;Se<U;++Se){var le=se[ne+Se],xe=se[ne+Se+U],Re=j[ue+Se],Ee=j[ue+Se+U];if(xe<Re||Ee<le)continue e}var Oe=ee(ve,Z);if(Oe!==void 0)return Oe}}}}function G(U,Y,ee,re,ie,se,ce,q,j){N(U,re+ce);var Z=0,Q=2*U,ue;for(H(Z++,0,0,re,0,ce,ee?16:0,-1/0,1/0),ee||H(Z++,0,0,ce,0,re,1,-1/0,1/0);Z>0;){Z-=1;var fe=Z*S,te=T[fe],ne=T[fe+1],ve=T[fe+2],le=T[fe+3],xe=T[fe+4],Se=T[fe+5],Re=Z*o,Ee=O[Re],Oe=O[Re+1],Be=Se&1,Le=!!(Se&16),Te=ie,De=se,Ve=q,Ye=j;if(Be&&(Te=q,De=j,Ve=ie,Ye=se),!(Se&2&&(ve=L(U,te,ne,ve,Te,De,Oe),ne>=ve))&&!(Se&4&&(ne=D(U,te,ne,ve,Te,De,Ee),ne>=ve))){var Ne=ve-ne,Xe=xe-le;if(Le){if(U*Ne*(Ne+Xe)<l){if(ue=h.scanComplete(U,te,Y,ne,ve,Te,De,le,xe,Ve,Ye),ue!==void 0)return ue;continue}}else if(U*Math.min(Ne,Xe)<E){if(ue=f(U,te,Y,Be,ne,ve,Te,De,le,xe,Ve,Ye),ue!==void 0)return ue;continue}else if(U*Ne*Xe<c){if(ue=h.scanBipartite(U,te,Y,Be,ne,ve,Te,De,le,xe,Ve,Ye),ue!==void 0)return ue;continue}var ht=m(U,te,ne,ve,Te,De,Ee,Oe);if(ne<ht)if(U*(ht-ne)<E){if(ue=g(U,te+1,Y,ne,ht,Te,De,le,xe,Ve,Ye),ue!==void 0)return ue}else if(te===U-2){if(Be?ue=h.sweepBipartite(U,Y,le,xe,Ve,Ye,ne,ht,Te,De):ue=h.sweepBipartite(U,Y,ne,ht,Te,De,le,xe,Ve,Ye),ue!==void 0)return ue}else H(Z++,te+1,ne,ht,le,xe,Be,-1/0,1/0),H(Z++,te+1,le,xe,ne,ht,Be^1,-1/0,1/0);if(ht<ve){var st=b(U,te,le,xe,Ve,Ye),it=Ve[Q*st+te],nt=M(U,te,st,xe,Ve,Ye,it);if(nt<xe&&H(Z++,te,ht,ve,nt,xe,(Be|4)+(Le?16:0),it,Oe),le<st&&H(Z++,te,ht,ve,le,st,(Be|2)+(Le?16:0),Ee,it),st+1===nt){if(Le?ue=V(U,te,Y,ht,ve,Te,De,st,Ve,Ye[st]):ue=k(U,te,Y,Be,ht,ve,Te,De,st,Ve,Ye[st]),ue!==void 0)return ue}else if(st<nt){var pt;if(Le){if(pt=A(U,te,ht,ve,Te,De,it),ht<pt){var Tt=M(U,te,ht,pt,Te,De,it);if(te===U-2){if(ht<Tt&&(ue=h.sweepComplete(U,Y,ht,Tt,Te,De,st,nt,Ve,Ye),ue!==void 0)||Tt<pt&&(ue=h.sweepBipartite(U,Y,Tt,pt,Te,De,st,nt,Ve,Ye),ue!==void 0))return ue}else ht<Tt&&H(Z++,te+1,ht,Tt,st,nt,16,-1/0,1/0),Tt<pt&&(H(Z++,te+1,Tt,pt,st,nt,0,-1/0,1/0),H(Z++,te+1,st,nt,Tt,pt,1,-1/0,1/0))}}else Be?pt=C(U,te,ht,ve,Te,De,it):pt=A(U,te,ht,ve,Te,De,it),ht<pt&&(te===U-2?Be?ue=h.sweepBipartite(U,Y,st,nt,Ve,Ye,ht,pt,Te,De):ue=h.sweepBipartite(U,Y,ht,pt,Te,De,st,nt,Ve,Ye):(H(Z++,te+1,ht,pt,st,nt,Be,-1/0,1/0),H(Z++,te+1,st,nt,ht,pt,Be^1,-1/0,1/0)))}}}}}},2464:function(v,y,r){v.exports=g;var n=r(122),u=n("lo<p0"),i=8;function f(h,b,p,E,c,l){for(var m=2*h,M=m*(p+1)+b,L=p+1;L<E;++L,M+=m)for(var D=c[M],A=L,C=m*(L-1);A>p&&c[C+b]>D;--A,C-=m){for(var S=C,o=C+m,R=0;R<m;++R,++S,++o){var T=c[S];c[S]=c[o],c[o]=T}var O=l[A];l[A]=l[A-1],l[A-1]=O}}function g(h,b,p,E,c,l){if(E<=p+1)return p;for(var m=p,M=E,L=E+p>>>1,D=2*h,A=L,C=c[D*L+b];m<M;){if(M-m<i){f(h,b,m,M,c,l),C=c[D*L+b];break}var S=M-m,o=Math.random()*S+m|0,R=c[D*o+b],T=Math.random()*S+m|0,O=c[D*T+b],N=Math.random()*S+m|0,H=c[D*N+b];R<=O?H>=O?(A=T,C=O):R>=H?(A=o,C=R):(A=N,C=H):O>=H?(A=T,C=O):H>=R?(A=o,C=R):(A=N,C=H);for(var G=D*(M-1),U=D*A,k=0;k<D;++k,++G,++U){var V=c[G];c[G]=c[U],c[U]=V}var Y=l[M-1];l[M-1]=l[A],l[A]=Y,A=u(h,b,m,M-1,c,l,C);for(var G=D*(M-1),U=D*A,k=0;k<D;++k,++G,++U){var V=c[G];c[G]=c[U],c[U]=V}var Y=l[M-1];if(l[M-1]=l[A],l[A]=Y,L<A){for(M=A-1;m<M&&c[D*(M-1)+b]===C;)M-=1;M+=1}else if(A<L)for(m=A+1;m<M&&c[D*m+b]===C;)m+=1;else break}return u(h,b,p,L,c,l,c[D*L+b])}},122:function(v){v.exports=r;var y={"lo===p0":n,"lo<p0":u,"lo<=p0":i,"hi<=p0":f,"lo<p0&&p0<=hi":h,"lo<=p0&&p0<=hi":g,"!(lo>=p0)&&!(p1>=hi)":b};function r(p){return y[p]}function n(p,E,c,l,m,M,L){for(var D=2*p,A=D*c,C=A,S=c,o=E,R=p+E,T=c;l>T;++T,A+=D){var O=m[A+o];if(O===L)if(S===T)S+=1,C+=D;else{for(var N=0;D>N;++N){var H=m[A+N];m[A+N]=m[C],m[C++]=H}var k=M[T];M[T]=M[S],M[S++]=k}}return S}function u(p,E,c,l,m,M,L){for(var D=2*p,A=D*c,C=A,S=c,o=E,R=p+E,T=c;l>T;++T,A+=D){var O=m[A+o];if(O<L)if(S===T)S+=1,C+=D;else{for(var N=0;D>N;++N){var H=m[A+N];m[A+N]=m[C],m[C++]=H}var k=M[T];M[T]=M[S],M[S++]=k}}return S}function i(p,E,c,l,m,M,L){for(var D=2*p,A=D*c,C=A,S=c,o=E,R=p+E,T=c;l>T;++T,A+=D){var O=m[A+R];if(O<=L)if(S===T)S+=1,C+=D;else{for(var N=0;D>N;++N){var H=m[A+N];m[A+N]=m[C],m[C++]=H}var k=M[T];M[T]=M[S],M[S++]=k}}return S}function f(p,E,c,l,m,M,L){for(var D=2*p,A=D*c,C=A,S=c,o=E,R=p+E,T=c;l>T;++T,A+=D){var O=m[A+R];if(O<=L)if(S===T)S+=1,C+=D;else{for(var N=0;D>N;++N){var H=m[A+N];m[A+N]=m[C],m[C++]=H}var k=M[T];M[T]=M[S],M[S++]=k}}return S}function g(p,E,c,l,m,M,L){for(var D=2*p,A=D*c,C=A,S=c,o=E,R=p+E,T=c;l>T;++T,A+=D){var O=m[A+o],N=m[A+R];if(O<=L&&L<=N)if(S===T)S+=1,C+=D;else{for(var H=0;D>H;++H){var k=m[A+H];m[A+H]=m[C],m[C++]=k}var V=M[T];M[T]=M[S],M[S++]=V}}return S}function h(p,E,c,l,m,M,L){for(var D=2*p,A=D*c,C=A,S=c,o=E,R=p+E,T=c;l>T;++T,A+=D){var O=m[A+o],N=m[A+R];if(O<L&&L<=N)if(S===T)S+=1,C+=D;else{for(var H=0;D>H;++H){var k=m[A+H];m[A+H]=m[C],m[C++]=k}var V=M[T];M[T]=M[S],M[S++]=V}}return S}function b(p,E,c,l,m,M,L,D){for(var A=2*p,C=A*c,S=C,o=c,R=E,T=p+E,O=c;l>O;++O,C+=A){var N=m[C+R],H=m[C+T];if(!(N>=L)&&!(D>=H))if(o===O)o+=1,S+=A;else{for(var k=0;A>k;++k){var V=m[C+k];m[C+k]=m[S],m[S++]=V}var G=M[O];M[O]=M[o],M[o++]=G}}return o}},309:function(v){v.exports=r;var y=32;function r(E,c){c<=4*y?n(0,c-1,E):p(0,c-1,E)}function n(E,c,l){for(var m=2*(E+1),M=E+1;M<=c;++M){for(var L=l[m++],D=l[m++],A=M,C=m-2;A-- >E;){var S=l[C-2],o=l[C-1];if(S<L)break;if(S===L&&o<D)break;l[C]=S,l[C+1]=o,C-=2}l[C]=L,l[C+1]=D}}function u(E,c,l){E*=2,c*=2;var m=l[E],M=l[E+1];l[E]=l[c],l[E+1]=l[c+1],l[c]=m,l[c+1]=M}function i(E,c,l){E*=2,c*=2,l[E]=l[c],l[E+1]=l[c+1]}function f(E,c,l,m){E*=2,c*=2,l*=2;var M=m[E],L=m[E+1];m[E]=m[c],m[E+1]=m[c+1],m[c]=m[l],m[c+1]=m[l+1],m[l]=M,m[l+1]=L}function g(E,c,l,m,M){E*=2,c*=2,M[E]=M[c],M[c]=l,M[E+1]=M[c+1],M[c+1]=m}function h(E,c,l){E*=2,c*=2;var m=l[E],M=l[c];return m<M?!1:m===M?l[E+1]>l[c+1]:!0}function b(E,c,l,m){E*=2;var M=m[E];return M<c?!0:M===c?m[E+1]<l:!1}function p(E,c,l){var m=(c-E+1)/6|0,M=E+m,L=c-m,D=E+c>>1,A=D-m,C=D+m,S=M,o=A,R=D,T=C,O=L,N=E+1,H=c-1,k=0;h(S,o,l)&&(k=S,S=o,o=k),h(T,O,l)&&(k=T,T=O,O=k),h(S,R,l)&&(k=S,S=R,R=k),h(o,R,l)&&(k=o,o=R,R=k),h(S,T,l)&&(k=S,S=T,T=k),h(R,T,l)&&(k=R,R=T,T=k),h(o,O,l)&&(k=o,o=O,O=k),h(o,R,l)&&(k=o,o=R,R=k),h(T,O,l)&&(k=T,T=O,O=k);for(var V=l[2*o],G=l[2*o+1],U=l[2*T],Y=l[2*T+1],ee=2*S,re=2*R,ie=2*O,se=2*M,ce=2*D,q=2*L,j=0;j<2;++j){var Z=l[ee+j],Q=l[re+j],ue=l[ie+j];l[se+j]=Z,l[ce+j]=Q,l[q+j]=ue}i(A,E,l),i(C,c,l);for(var fe=N;fe<=H;++fe)if(b(fe,V,G,l))fe!==N&&u(fe,N,l),++N;else if(!b(fe,U,Y,l))for(;;)if(b(H,U,Y,l)){b(H,V,G,l)?(f(fe,N,H,l),++N,--H):(u(fe,H,l),--H);break}else{if(--H<fe)break;continue}g(E,N-1,V,G,l),g(c,H+1,U,Y,l),N-2-E<=y?n(E,N-2,l):p(E,N-2,l),c-(H+2)<=y?n(H+2,c,l):p(H+2,c,l),H-N<=y?n(N,H,l):p(N,H,l)}},1390:function(v,y,r){v.exports={init:M,sweepBipartite:A,sweepComplete:C,scanBipartite:S,scanComplete:o};var n=r(5306),u=r(2288),i=r(309),f=1<<28,g=1024,h=n.mallocInt32(g),b=n.mallocInt32(g),p=n.mallocInt32(g),E=n.mallocInt32(g),c=n.mallocInt32(g),l=n.mallocInt32(g),m=n.mallocDouble(g*8);function M(R){var T=u.nextPow2(R);h.length<T&&(n.free(h),h=n.mallocInt32(T)),b.length<T&&(n.free(b),b=n.mallocInt32(T)),p.length<T&&(n.free(p),p=n.mallocInt32(T)),E.length<T&&(n.free(E),E=n.mallocInt32(T)),c.length<T&&(n.free(c),c=n.mallocInt32(T)),l.length<T&&(n.free(l),l=n.mallocInt32(T));var O=8*T;m.length<O&&(n.free(m),m=n.mallocDouble(O))}function L(R,T,O,N){var H=T[N],k=R[O-1];R[H]=k,T[k]=H}function D(R,T,O,N){R[O]=N,T[N]=O}function A(R,T,O,N,H,k,V,G,U,Y){for(var ee=0,re=2*R,ie=R-1,se=re-1,ce=O;ce<N;++ce){var q=k[ce],j=re*ce;m[ee++]=H[j+ie],m[ee++]=-(q+1),m[ee++]=H[j+se],m[ee++]=q}for(var ce=V;ce<G;++ce){var q=Y[ce]+f,Z=re*ce;m[ee++]=U[Z+ie],m[ee++]=-q,m[ee++]=U[Z+se],m[ee++]=q}var Q=ee>>>1;i(m,Q);for(var ue=0,fe=0,ce=0;ce<Q;++ce){var te=m[2*ce+1]|0;if(te>=f)te=te-f|0,L(p,E,fe--,te);else if(te>=0)L(h,b,ue--,te);else if(te<=-f){te=-te-f|0;for(var ne=0;ne<ue;++ne){var ve=T(h[ne],te);if(ve!==void 0)return ve}D(p,E,fe++,te)}else{te=-te-1|0;for(var ne=0;ne<fe;++ne){var ve=T(te,p[ne]);if(ve!==void 0)return ve}D(h,b,ue++,te)}}}function C(R,T,O,N,H,k,V,G,U,Y){for(var ee=0,re=2*R,ie=R-1,se=re-1,ce=O;ce<N;++ce){var q=k[ce]+1<<1,j=re*ce;m[ee++]=H[j+ie],m[ee++]=-q,m[ee++]=H[j+se],m[ee++]=q}for(var ce=V;ce<G;++ce){var q=Y[ce]+1<<1,Z=re*ce;m[ee++]=U[Z+ie],m[ee++]=-q|1,m[ee++]=U[Z+se],m[ee++]=q|1}var Q=ee>>>1;i(m,Q);for(var ue=0,fe=0,te=0,ce=0;ce<Q;++ce){var ne=m[2*ce+1]|0,ve=ne&1;if(ce<Q-1&&ne>>1===m[2*ce+3]>>1&&(ve=2,ce+=1),ne<0){for(var le=-(ne>>1)-1,xe=0;xe<te;++xe){var Se=T(c[xe],le);if(Se!==void 0)return Se}if(ve!==0)for(var xe=0;xe<ue;++xe){var Se=T(h[xe],le);if(Se!==void 0)return Se}if(ve!==1)for(var xe=0;xe<fe;++xe){var Se=T(p[xe],le);if(Se!==void 0)return Se}ve===0?D(h,b,ue++,le):ve===1?D(p,E,fe++,le):ve===2&&D(c,l,te++,le)}else{var le=(ne>>1)-1;ve===0?L(h,b,ue--,le):ve===1?L(p,E,fe--,le):ve===2&&L(c,l,te--,le)}}}function S(R,T,O,N,H,k,V,G,U,Y,ee,re){var ie=0,se=2*R,ce=T,q=T+R,j=1,Z=1;N?Z=f:j=f;for(var Q=H;Q<k;++Q){var ue=Q+j,fe=se*Q;m[ie++]=V[fe+ce],m[ie++]=-ue,m[ie++]=V[fe+q],m[ie++]=ue}for(var Q=U;Q<Y;++Q){var ue=Q+Z,te=se*Q;m[ie++]=ee[te+ce],m[ie++]=-ue}var ne=ie>>>1;i(m,ne);for(var ve=0,Q=0;Q<ne;++Q){var le=m[2*Q+1]|0;if(le<0){var ue=-le,xe=!1;if(ue>=f?(xe=!N,ue-=f):(xe=!!N,ue-=1),xe)D(h,b,ve++,ue);else{var Se=re[ue],Re=se*ue,Ee=ee[Re+T+1],Oe=ee[Re+T+1+R];e:for(var Be=0;Be<ve;++Be){var Le=h[Be],Te=se*Le;if(!(Oe<V[Te+T+1]||V[Te+T+1+R]<Ee)){for(var De=T+2;De<R;++De)if(ee[Re+De+R]<V[Te+De]||V[Te+De+R]<ee[Re+De])continue e;var Ve=G[Le],Ye;if(N?Ye=O(Se,Ve):Ye=O(Ve,Se),Ye!==void 0)return Ye}}}}else L(h,b,ve--,le-j)}}function o(R,T,O,N,H,k,V,G,U,Y,ee){for(var re=0,ie=2*R,se=T,ce=T+R,q=N;q<H;++q){var j=q+f,Z=ie*q;m[re++]=k[Z+se],m[re++]=-j,m[re++]=k[Z+ce],m[re++]=j}for(var q=G;q<U;++q){var j=q+1,Q=ie*q;m[re++]=Y[Q+se],m[re++]=-j}var ue=re>>>1;i(m,ue);for(var fe=0,q=0;q<ue;++q){var te=m[2*q+1]|0;if(te<0){var j=-te;if(j>=f)h[fe++]=j-f;else{j-=1;var ne=ee[j],ve=ie*j,le=Y[ve+T+1],xe=Y[ve+T+1+R];e:for(var Se=0;Se<fe;++Se){var Re=h[Se],Ee=V[Re];if(Ee===ne)break;var Oe=ie*Re;if(!(xe<k[Oe+T+1]||k[Oe+T+1+R]<le)){for(var Be=T+2;Be<R;++Be)if(Y[ve+Be+R]<k[Oe+Be]||k[Oe+Be+R]<Y[ve+Be])continue e;var Le=O(Ee,ne);if(Le!==void 0)return Le}}}}else{for(var j=te-f,Se=fe-1;Se>=0;--Se)if(h[Se]===j){for(var Be=Se+1;Be<fe;++Be)h[Be-1]=h[Be];break}--fe}}}},7761:function(v,y,r){var n=r(9971),u=r(743),i=r(2161),f=r(7098);v.exports=E;function g(c){return[Math.min(c[0],c[1]),Math.max(c[0],c[1])]}function h(c,l){return c[0]-l[0]||c[1]-l[1]}function b(c){return c.map(g).sort(h)}function p(c,l,m){return l in c?c[l]:m}function E(c,l,m){Array.isArray(l)?(m=m||{},l=l||[]):(m=l||{},l=[]);var M=!!p(m,"delaunay",!0),L=!!p(m,"interior",!0),D=!!p(m,"exterior",!0),A=!!p(m,"infinity",!1);if(!L&&!D||c.length===0)return[];var C=n(c,l);if(M||L!==D||A){for(var S=u(c.length,b(l)),o=0;o<C.length;++o){var R=C[o];S.addTriangle(R[0],R[1],R[2])}return M&&i(c,S),D?L?A?f(S,0,A):S.cells():f(S,1,A):f(S,-1)}else return C}},2161:function(v,y,r){var n=r(2227)[4];r(5070),v.exports=i;function u(f,g,h,b,p,E){var c=g.opposite(b,p);if(!(c<0)){if(p<b){var l=b;b=p,p=l,l=E,E=c,c=l}g.isConstraint(b,p)||n(f[b],f[p],f[E],f[c])<0&&h.push(b,p)}}function i(f,g){for(var h=[],b=f.length,p=g.stars,E=0;E<b;++E)for(var c=p[E],l=1;l<c.length;l+=2){var m=c[l];if(!(m<E)&&!g.isConstraint(E,m)){for(var M=c[l-1],L=-1,D=1;D<c.length;D+=2)if(c[D-1]===m){L=c[D];break}L<0||n(f[E],f[m],f[M],f[L])<0&&h.push(E,m)}}for(;h.length>0;){for(var m=h.pop(),E=h.pop(),M=-1,L=-1,c=p[E],A=1;A<c.length;A+=2){var C=c[A-1],S=c[A];C===m?L=S:S===m&&(M=C)}M<0||L<0||n(f[E],f[m],f[M],f[L])>=0||(g.flip(E,m),u(f,g,h,M,E,L),u(f,g,h,E,L,M),u(f,g,h,L,m,M),u(f,g,h,m,M,L))}}},7098:function(v,y,r){var n=r(5070);v.exports=b;function u(p,E,c,l,m,M,L){this.cells=p,this.neighbor=E,this.flags=l,this.constraint=c,this.active=m,this.next=M,this.boundary=L}var i=u.prototype;function f(p,E){return p[0]-E[0]||p[1]-E[1]||p[2]-E[2]}i.locate=function(){var p=[0,0,0];return function(E,c,l){var m=E,M=c,L=l;return c<l?c<E&&(m=c,M=l,L=E):l<E&&(m=l,M=E,L=c),m<0?-1:(p[0]=m,p[1]=M,p[2]=L,n.eq(this.cells,p,f))}}();function g(p,E){for(var c=p.cells(),l=c.length,m=0;m<l;++m){var M=c[m],L=M[0],D=M[1],A=M[2];D<A?D<L&&(M[0]=D,M[1]=A,M[2]=L):A<L&&(M[0]=A,M[1]=L,M[2]=D)}c.sort(f);for(var C=new Array(l),m=0;m<C.length;++m)C[m]=0;var S=[],o=[],R=new Array(3*l),T=new Array(3*l),O=null;E&&(O=[]);for(var N=new u(c,R,T,C,S,o,O),m=0;m<l;++m)for(var M=c[m],H=0;H<3;++H){var L=M[H],D=M[(H+1)%3],k=R[3*m+H]=N.locate(D,L,p.opposite(D,L)),V=T[3*m+H]=p.isConstraint(L,D);k<0&&(V?o.push(m):(S.push(m),C[m]=1),E&&O.push([D,L,-1]))}return N}function h(p,E,c){for(var l=0,m=0;m<p.length;++m)E[m]===c&&(p[l++]=p[m]);return p.length=l,p}function b(p,E,c){var l=g(p,c);if(E===0)return c?l.cells.concat(l.boundary):l.cells;for(var m=1,M=l.active,L=l.next,D=l.flags,A=l.cells,C=l.constraint,S=l.neighbor;M.length>0||L.length>0;){for(;M.length>0;){var o=M.pop();if(D[o]!==-m){D[o]=m,A[o];for(var R=0;R<3;++R){var T=S[3*o+R];T>=0&&D[T]===0&&(C[3*o+R]?L.push(T):(M.push(T),D[T]=m))}}}var O=L;L=M,M=O,L.length=0,m=-m}var N=h(A,D,E);return c?N.concat(l.boundary):N}},9971:function(v,y,r){var n=r(5070),u=r(417)[3],i=0,f=1,g=2;v.exports=L;function h(D,A,C,S,o){this.a=D,this.b=A,this.idx=C,this.lowerIds=S,this.upperIds=o}function b(D,A,C,S){this.a=D,this.b=A,this.type=C,this.idx=S}function p(D,A){var C=D.a[0]-A.a[0]||D.a[1]-A.a[1]||D.type-A.type;return C||D.type!==i&&(C=u(D.a,D.b,A.b),C)?C:D.idx-A.idx}function E(D,A){return u(D.a,D.b,A)}function c(D,A,C,S,o){for(var R=n.lt(A,S,E),T=n.gt(A,S,E),O=R;O<T;++O){for(var N=A[O],H=N.lowerIds,V=H.length;V>1&&u(C[H[V-2]],C[H[V-1]],S)>0;)D.push([H[V-1],H[V-2],o]),V-=1;H.length=V,H.push(o);for(var k=N.upperIds,V=k.length;V>1&&u(C[k[V-2]],C[k[V-1]],S)<0;)D.push([k[V-2],k[V-1],o]),V-=1;k.length=V,k.push(o)}}function l(D,A){var C;return D.a[0]<A.a[0]?C=u(D.a,D.b,A.a):C=u(A.b,A.a,D.a),C||(A.b[0]<D.b[0]?C=u(D.a,D.b,A.b):C=u(A.b,A.a,D.b),C||D.idx-A.idx)}function m(D,A,C){var S=n.le(D,C,l),o=D[S],R=o.upperIds,T=R[R.length-1];o.upperIds=[T],D.splice(S+1,0,new h(C.a,C.b,C.idx,[T],R))}function M(D,A,C){var S=C.a;C.a=C.b,C.b=S;var o=n.eq(D,C,l),R=D[o],T=D[o-1];T.upperIds=R.upperIds,D.splice(o,1)}function L(D,A){for(var C=D.length,S=A.length,o=[],R=0;R<C;++R)o.push(new b(D[R],null,i,R));for(var R=0;R<S;++R){var T=A[R],O=D[T[0]],N=D[T[1]];O[0]<N[0]?o.push(new b(O,N,g,R),new b(N,O,f,R)):O[0]>N[0]&&o.push(new b(N,O,g,R),new b(O,N,f,R))}o.sort(p);for(var H=o[0].a[0]-(1+Math.abs(o[0].a[0]))*Math.pow(2,-52),k=[new h([H,1],[H,0],-1,[],[])],V=[],R=0,G=o.length;R<G;++R){var U=o[R],Y=U.type;Y===i?c(V,k,D,U.a,U.idx):Y===g?m(k,D,U):M(k,D,U)}return V}},743:function(v,y,r){var n=r(5070);v.exports=g;function u(h,b){this.stars=h,this.edges=b}var i=u.prototype;function f(h,b,p){for(var E=1,c=h.length;E<c;E+=2)if(h[E-1]===b&&h[E]===p){h[E-1]=h[c-2],h[E]=h[c-1],h.length=c-2;return}}i.isConstraint=function(){var h=[0,0];function b(p,E){return p[0]-E[0]||p[1]-E[1]}return function(p,E){return h[0]=Math.min(p,E),h[1]=Math.max(p,E),n.eq(this.edges,h,b)>=0}}(),i.removeTriangle=function(h,b,p){var E=this.stars;f(E[h],b,p),f(E[b],p,h),f(E[p],h,b)},i.addTriangle=function(h,b,p){var E=this.stars;E[h].push(b,p),E[b].push(p,h),E[p].push(h,b)},i.opposite=function(h,b){for(var p=this.stars[b],E=1,c=p.length;E<c;E+=2)if(p[E]===h)return p[E-1];return-1},i.flip=function(h,b){var p=this.opposite(h,b),E=this.opposite(b,h);this.removeTriangle(h,b,p),this.removeTriangle(b,h,E),this.addTriangle(h,E,p),this.addTriangle(b,p,E)},i.edges=function(){for(var h=this.stars,b=[],p=0,E=h.length;p<E;++p)for(var c=h[p],l=0,m=c.length;l<m;l+=2)b.push([c[l],c[l+1]]);return b},i.cells=function(){for(var h=this.stars,b=[],p=0,E=h.length;p<E;++p)for(var c=h[p],l=0,m=c.length;l<m;l+=2){var M=c[l],L=c[l+1];p<Math.min(M,L)&&b.push([p,M,L])}return b};function g(h,b){for(var p=new Array(h),E=0;E<h;++E)p[E]=[];return new u(p,b)}},9887:function(v){v.exports=y;function y(r){for(var n=1,u=1;u<r.length;++u)for(var i=0;i<u;++i)if(r[u]<r[i])n=-n;else if(r[i]===r[u])return 0;return n}},9243:function(v,y,r){var n=r(3094),u=r(6606);function i(h,b){for(var p=0,E=h.length,c=0;c<E;++c)p+=h[c]*b[c];return p}function f(h){var b=h.length;if(b===0)return[];h[0].length;var p=n([h.length+1,h.length+1],1),E=n([h.length+1],1);p[b][b]=0;for(var c=0;c<b;++c){for(var l=0;l<=c;++l)p[l][c]=p[c][l]=2*i(h[c],h[l]);E[c]=i(h[c],h[c])}for(var m=u(p,E),M=0,L=m[b+1],c=0;c<L.length;++c)M+=L[c];for(var D=new Array(b),c=0;c<b;++c){for(var L=m[c],A=0,l=0;l<L.length;++l)A+=L[l];D[c]=A/M}return D}function g(h){if(h.length===0)return[];for(var b=h[0].length,p=n([b]),E=f(h),c=0;c<h.length;++c)for(var l=0;l<b;++l)p[l]+=h[c][l]*E[c];return p}g.barycenetric=f,v.exports=g},1778:function(v,y,r){v.exports=u;var n=r(9243);function u(i){for(var f=n(i),g=0,h=0;h<i.length;++h)for(var b=i[h],p=0;p<f.length;++p)g+=Math.pow(b[p]-f[p],2);return Math.sqrt(g/i.length)}},197:function(v,y,r){v.exports=O;var n=r(1731),u=r(2569),i=r(4434),f=r(5125),g=r(8846),h=r(7999),b=r(2826),p=r(8551),E=r(5528);function c(N){var H=h(N);return[p(H,-1/0),p(H,1/0)]}function l(N,H){for(var k=new Array(H.length),V=0;V<H.length;++V){var G=H[V],U=N[G[0]],Y=N[G[1]];k[V]=[p(Math.min(U[0],Y[0]),-1/0),p(Math.min(U[1],Y[1]),-1/0),p(Math.max(U[0],Y[0]),1/0),p(Math.max(U[1],Y[1]),1/0)]}return k}function m(N){for(var H=new Array(N.length),k=0;k<N.length;++k){var V=N[k];H[k]=[p(V[0],-1/0),p(V[1],-1/0),p(V[0],1/0),p(V[1],1/0)]}return H}function M(N,H,k){var V=[];return u(k,function(G,U){var Y=H[G],ee=H[U];if(!(Y[0]===ee[0]||Y[0]===ee[1]||Y[1]===ee[0]||Y[1]===ee[1])){var re=N[Y[0]],ie=N[Y[1]],se=N[ee[0]],ce=N[ee[1]];i(re,ie,se,ce)&&V.push([G,U])}}),V}function L(N,H,k,V){var G=[];return u(k,V,function(U,Y){var ee=H[U];if(!(ee[0]===Y||ee[1]===Y)){var re=N[Y],ie=N[ee[0]],se=N[ee[1]];i(ie,se,re,re)&&G.push([U,Y])}}),G}function D(N,H,k,V,G){var U,Y,ee=N.map(function(Re){return[f(Re[0]),f(Re[1])]});for(U=0;U<k.length;++U){var re=k[U];Y=re[0];var ie=re[1],se=H[Y],ce=H[ie],q=E(b(N[se[0]]),b(N[se[1]]),b(N[ce[0]]),b(N[ce[1]]));if(q){var j=N.length;N.push([h(q[0]),h(q[1])]),ee.push(q),V.push([Y,j],[ie,j])}}for(V.sort(function(Re,Ee){if(Re[0]!==Ee[0])return Re[0]-Ee[0];var Oe=ee[Re[1]],Be=ee[Ee[1]];return g(Oe[0],Be[0])||g(Oe[1],Be[1])}),U=V.length-1;U>=0;--U){var Z=V[U];Y=Z[0];var Q=H[Y],ue=Q[0],fe=Q[1],te=N[ue],ne=N[fe];if((te[0]-ne[0]||te[1]-ne[1])<0){var ve=ue;ue=fe,fe=ve}Q[0]=ue;var le=Q[1]=Z[1],xe;for(G&&(xe=Q[2]);U>0&&V[U-1][0]===Y;){var Z=V[--U],Se=Z[1];G?H.push([le,Se,xe]):H.push([le,Se]),le=Se}G?H.push([le,fe,xe]):H.push([le,fe])}return ee}function A(N,H,k){for(var V=H.length,G=new n(V),U=[],Y=0;Y<H.length;++Y){var ee=H[Y],re=c(ee[0]),ie=c(ee[1]);U.push([p(re[0],-1/0),p(ie[0],-1/0),p(re[1],1/0),p(ie[1],1/0)])}u(U,function(Z,Q){G.link(Z,Q)});for(var se=!0,ce=new Array(V),Y=0;Y<V;++Y){var q=G.find(Y);q!==Y&&(se=!1,N[q]=[Math.min(N[Y][0],N[q][0]),Math.min(N[Y][1],N[q][1])])}if(se)return null;for(var j=0,Y=0;Y<V;++Y){var q=G.find(Y);q===Y?(ce[Y]=j,N[j++]=N[Y]):ce[Y]=-1}N.length=j;for(var Y=0;Y<V;++Y)ce[Y]<0&&(ce[Y]=ce[G.find(Y)]);return ce}function C(N,H){return N[0]-H[0]||N[1]-H[1]}function S(N,H){var k=N[0]-H[0]||N[1]-H[1];return k||(N[2]<H[2]?-1:N[2]>H[2]?1:0)}function o(N,H,k){if(N.length!==0){if(H)for(var V=0;V<N.length;++V){var G=N[V],U=H[G[0]],Y=H[G[1]];G[0]=Math.min(U,Y),G[1]=Math.max(U,Y)}else for(var V=0;V<N.length;++V){var G=N[V],U=G[0],Y=G[1];G[0]=Math.min(U,Y),G[1]=Math.max(U,Y)}k?N.sort(S):N.sort(C);for(var ee=1,V=1;V<N.length;++V){var re=N[V-1],ie=N[V];ie[0]===re[0]&&ie[1]===re[1]&&(!k||ie[2]===re[2])||(N[ee++]=ie)}N.length=ee}}function R(N,H,k){var V=A(N,[],m(N));return o(H,V,k),!!V}function T(N,H,k){var V=l(N,H),G=M(N,H,V),U=m(N),Y=L(N,H,V,U),ee=D(N,H,G,Y,k),re=A(N,ee);return o(H,re,k),re?!0:G.length>0||Y.length>0}function O(N,H,k){var V;if(k){V=H;for(var G=new Array(H.length),U=0;U<H.length;++U){var Y=H[U];G[U]=[Y[0],Y[1],k[U]]}H=G}for(var ee=R(N,H,!!k);T(N,H,!!k);)ee=!0;if(k&&ee){V.length=0,k.length=0;for(var U=0;U<H.length;++U){var Y=H[U];V.push([Y[0],Y[1]]),k.push(Y[2])}}return ee}},5528:function(v,y,r){v.exports=E;var n=r(3962),u=r(9189),i=r(4354),f=r(4951),g=r(6695),h=r(7584),b=r(4469);function p(c,l){return i(n(c[0],l[1]),n(c[1],l[0]))}function E(c,l,m,M){var L=g(l,c),D=g(M,m),A=p(L,D);if(f(A)===0)return null;var C=g(c,m),S=p(D,C),o=u(S,A),R=b(L,o),T=h(c,R);return T}},5692:function(v){v.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},9156:function(v,y,r){var n=r(5692),u=r(3578);v.exports=i;function i(b){var p,E,c,l,m,M,L,D,o,A,C;if(b||(b={}),D=(b.nshades||72)-1,L=b.format||"hex",M=b.colormap,M||(M="jet"),typeof M=="string"){if(M=M.toLowerCase(),!n[M])throw Error(M+" not a supported colorscale");m=n[M]}else if(Array.isArray(M))m=M.slice();else throw Error("unsupported colormap option",M);if(m.length>D+1)throw new Error(M+" map requires nshades to be at least size "+m.length);Array.isArray(b.alpha)?b.alpha.length!==2?A=[1,1]:A=b.alpha.slice():typeof b.alpha=="number"?A=[b.alpha,b.alpha]:A=[1,1],p=m.map(function(O){return Math.round(O.index*D)}),A[0]=Math.min(Math.max(A[0],0),1),A[1]=Math.min(Math.max(A[1],0),1);var S=m.map(function(O,N){var H=m[N].index,k=m[N].rgb.slice();return k.length===4&&k[3]>=0&&k[3]<=1||(k[3]=A[0]+(A[1]-A[0])*H),k}),o=[];for(C=0;C<p.length-1;++C){l=p[C+1]-p[C],E=S[C],c=S[C+1];for(var R=0;R<l;R++){var T=R/l;o.push([Math.round(u(E[0],c[0],T)),Math.round(u(E[1],c[1],T)),Math.round(u(E[2],c[2],T)),u(E[3],c[3],T)])}}return o.push(m[m.length-1].rgb.concat(A[1])),L==="hex"?o=o.map(g):L==="rgbaString"?o=o.map(h):L==="float"&&(o=o.map(f)),o}function f(b){return[b[0]/255,b[1]/255,b[2]/255,b[3]]}function g(b){for(var p,E="#",c=0;c<3;++c)p=b[c],p=p.toString(16),E+=("00"+p).substr(p.length);return E}function h(b){return"rgba("+b.join(",")+")"}},9398:function(v,y,r){v.exports=b;var n=r(417),u=r(7538),i=r(87),f=r(2019),g=r(9662);function h(p,E,c){var l=i(p[0],-E[0]),m=i(p[1],-E[1]),M=i(c[0],-E[0]),L=i(c[1],-E[1]),D=g(f(l,M),f(m,L));return D[D.length-1]>=0}function b(p,E,c,l){var m=n(E,c,l);if(m===0){var M=u(n(p,E,c)),L=u(n(p,E,l));if(M===L){if(M===0){var D=h(p,E,c),A=h(p,E,l);return D===A?0:D?1:-1}return 0}else{if(L===0)return M>0||h(p,E,l)?-1:1;if(M===0)return L>0||h(p,E,c)?1:-1}return u(L-M)}var C=n(p,E,c);if(C>0)return m>0&&n(p,E,l)>0?1:-1;if(C<0)return m>0||n(p,E,l)>0?1:-1;var S=n(p,E,l);return S>0||h(p,E,c)?1:-1}},7538:function(v){v.exports=function(r){return r<0?-1:r>0?1:0}},9209:function(v){v.exports=n;var y=Math.min;function r(u,i){return u-i}function n(u,i){var f=u.length,g=u.length-i.length;if(g)return g;switch(f){case 0:return 0;case 1:return u[0]-i[0];case 2:return u[0]+u[1]-i[0]-i[1]||y(u[0],u[1])-y(i[0],i[1]);case 3:var h=u[0]+u[1],b=i[0]+i[1];if(g=h+u[2]-(b+i[2]),g)return g;var p=y(u[0],u[1]),E=y(i[0],i[1]);return y(p,u[2])-y(E,i[2])||y(p+u[2],h)-y(E+i[2],b);case 4:var c=u[0],l=u[1],m=u[2],M=u[3],L=i[0],D=i[1],A=i[2],C=i[3];return c+l+m+M-(L+D+A+C)||y(c,l,m,M)-y(L,D,A,C,L)||y(c+l,c+m,c+M,l+m,l+M,m+M)-y(L+D,L+A,L+C,D+A,D+C,A+C)||y(c+l+m,c+l+M,c+m+M,l+m+M)-y(L+D+A,L+D+C,L+A+C,D+A+C);default:for(var S=u.slice().sort(r),o=i.slice().sort(r),R=0;R<f;++R)if(g=S[R]-o[R],g)return g;return 0}}},1284:function(v,y,r){var n=r(9209),u=r(9887);v.exports=i;function i(f,g){return n(f,g)||u(f)-u(g)}},5537:function(v,y,r){var n=r(8950),u=r(8722),i=r(3332);v.exports=f;function f(g){var h=g.length;if(h===0)return[];if(h===1)return[[0]];var b=g[0].length;return b===0?[]:b===1?n(g):b===2?u(g):i(g,b)}},8950:function(v){v.exports=y;function y(r){for(var n=0,u=0,i=1;i<r.length;++i)r[i][0]<r[n][0]&&(n=i),r[i][0]>r[u][0]&&(u=i);return n<u?[[n],[u]]:n>u?[[u],[n]]:[[n]]}},8722:function(v,y,r){v.exports=u;var n=r(3266);function u(i){var f=n(i),g=f.length;if(g<=2)return[];for(var h=new Array(g),b=f[g-1],p=0;p<g;++p){var E=f[p];h[p]=[b,E],b=E}return h}},3332:function(v,y,r){v.exports=g;var n=r(2183),u=r(2153);function i(h,b){for(var p=h.length,E=new Array(p),c=0;c<b.length;++c)E[c]=h[b[c]];for(var l=b.length,c=0;c<p;++c)b.indexOf(c)<0&&(E[l++]=h[c]);return E}function f(h,b){for(var p=h.length,E=b.length,c=0;c<p;++c)for(var l=h[c],m=0;m<l.length;++m){var M=l[m];if(M<E)l[m]=b[M];else{M=M-E;for(var L=0;L<E;++L)M>=b[L]&&(M+=1);l[m]=M}}return h}function g(h,b){try{return n(h,!0)}catch{var p=u(h);if(p.length<=b)return[];var E=i(h,p),c=n(E,!0);return f(c,p)}}},9680:function(v){function y(n,u,i,f,g,h){var b=6*g*g-6*g,p=3*g*g-4*g+1,E=-6*g*g+6*g,c=3*g*g-2*g;if(n.length){h||(h=new Array(n.length));for(var l=n.length-1;l>=0;--l)h[l]=b*n[l]+p*u[l]+E*i[l]+c*f[l];return h}return b*n+p*u+E*i[l]+c*f}function r(n,u,i,f,g,h){var b=g-1,p=g*g,E=b*b,c=(1+2*g)*E,l=g*E,m=p*(3-2*g),M=p*b;if(n.length){h||(h=new Array(n.length));for(var L=n.length-1;L>=0;--L)h[L]=c*n[L]+l*u[L]+m*i[L]+M*f[L];return h}return c*n+l*u+m*i+M*f}v.exports=r,v.exports.derivative=y},4419:function(v,y,r){var n=r(2183),u=r(1215);v.exports=h;function i(b,p){this.point=b,this.index=p}function f(b,p){for(var E=b.point,c=p.point,l=E.length,m=0;m<l;++m){var M=c[m]-E[m];if(M)return M}return 0}function g(b,p,E){if(b===1)return E?[[-1,0]]:[];var c=p.map(function(D,A){return[D[0],A]});c.sort(function(D,A){return D[0]-A[0]});for(var l=new Array(b-1),m=1;m<b;++m){var M=c[m-1],L=c[m];l[m-1]=[M[1],L[1]]}return E&&l.push([-1,l[0][1]],[l[b-1][1],-1]),l}function h(b,p){var E=b.length;if(E===0)return[];var c=b[0].length;if(c<1)return[];if(c===1)return g(E,b,p);for(var l=new Array(E),m=1,M=0;M<E;++M){for(var L=b[M],D=new Array(c+1),A=0,C=0;C<c;++C){var S=L[C];D[C]=S,A+=S*S}D[c]=A,l[M]=new i(D,M),m=Math.max(A,m)}u(l,f),E=l.length;for(var o=new Array(E+c+1),R=new Array(E+c+1),T=(c+1)*(c+1)*m,O=new Array(c+1),M=0;M<=c;++M)O[M]=0;O[c]=T,o[0]=O.slice(),R[0]=-1;for(var M=0;M<=c;++M){var D=O.slice();D[M]=1,o[M+1]=D,R[M+1]=-1}for(var M=0;M<E;++M){var N=l[M];o[M+c+1]=N.point,R[M+c+1]=N.index}var H=n(o,!1);if(p?H=H.filter(function(k){for(var V=0,G=0;G<=c;++G){var U=R[k[G]];if(U<0&&++V>=2)return!1;k[G]=U}return!0}):H=H.filter(function(k){for(var V=0;V<=c;++V){var G=R[k[V]];if(G<0)return!1;k[V]=G}return!0}),c&1)for(var M=0;M<H.length;++M){var N=H[M],D=N[0];N[0]=N[1],N[1]=D}return H}},8362:function(v){var y=!1;if(typeof Float64Array<"u"){var r=new Float64Array(1),n=new Uint32Array(r.buffer);if(r[0]=1,y=!0,n[1]===1072693248){let m=function(D,A){return n[0]=D,n[1]=A,r[0]},M=function(D){return r[0]=D,n[0]},L=function(D){return r[0]=D,n[1]};var i=m,f=M,g=L;v.exports=function(A){return r[0]=A,[n[0],n[1]]},v.exports.pack=m,v.exports.lo=M,v.exports.hi=L}else if(n[0]===1072693248){let m=function(D,A){return n[1]=D,n[0]=A,r[0]},M=function(D){return r[0]=D,n[1]},L=function(D){return r[0]=D,n[0]};var h=m,b=M,p=L;v.exports=function(A){return r[0]=A,[n[1],n[0]]},v.exports.pack=m,v.exports.lo=M,v.exports.hi=L}else y=!1}if(!y){let m=function(D,A){return u.writeUInt32LE(D,0,!0),u.writeUInt32LE(A,4,!0),u.readDoubleLE(0,!0)},M=function(D){return u.writeDoubleLE(D,0,!0),u.readUInt32LE(0,!0)},L=function(D){return u.writeDoubleLE(D,0,!0),u.readUInt32LE(4,!0)};var E=m,c=M,l=L,u=new Buffer(8);v.exports=function(A){return u.writeDoubleLE(A,0,!0),[u.readUInt32LE(0,!0),u.readUInt32LE(4,!0)]},v.exports.pack=m,v.exports.lo=M,v.exports.hi=L}v.exports.sign=function(m){return v.exports.hi(m)>>>31},v.exports.exponent=function(m){var M=v.exports.hi(m);return(M<<1>>>21)-1023},v.exports.fraction=function(m){var M=v.exports.lo(m),L=v.exports.hi(m),D=L&(1<<20)-1;return L&2146435072&&(D+=1048576),[M,D]},v.exports.denormalized=function(m){var M=v.exports.hi(m);return!(M&2146435072)}},3094:function(v){function y(u,i,f){var g=u[f]|0;if(g<=0)return[];var h=new Array(g),b;if(f===u.length-1)for(b=0;b<g;++b)h[b]=i;else for(b=0;b<g;++b)h[b]=y(u,i,f+1);return h}function r(u,i){var f,g;for(f=new Array(u),g=0;g<u;++g)f[g]=i;return f}function n(u,i){switch(typeof i>"u"&&(i=0),typeof u){case"number":if(u>0)return r(u|0,i);break;case"object":if(typeof u.length=="number")return y(u,i,0);break}return[]}v.exports=n},8348:function(v,y,r){v.exports=u;var n=r(1215);function u(i,f){var g=i.length;if(typeof f!="number"){f=0;for(var h=0;h<g;++h){var b=i[h];f=Math.max(f,b[0],b[1])}f=(f|0)+1}f=f|0;for(var p=new Array(f),h=0;h<f;++h)p[h]=[];for(var h=0;h<g;++h){var b=i[h];p[b[0]].push(b[1]),p[b[1]].push(b[0])}for(var E=0;E<f;++E)n(p[E],function(c,l){return c-l});return p}},5795:function(v){v.exports=y;function y(r,n,u){var i=n||0,f=u||1;return[[r[12]+r[0],r[13]+r[1],r[14]+r[2],r[15]+r[3]],[r[12]-r[0],r[13]-r[1],r[14]-r[2],r[15]-r[3]],[r[12]+r[4],r[13]+r[5],r[14]+r[6],r[15]+r[7]],[r[12]-r[4],r[13]-r[5],r[14]-r[6],r[15]-r[7]],[i*r[12]+r[8],i*r[13]+r[9],i*r[14]+r[10],i*r[15]+r[11]],[f*r[12]-r[8],f*r[13]-r[9],f*r[14]-r[10],f*r[15]-r[11]]]}},8444:function(v,y,r){v.exports=b;var n=r(9680),u=r(5070);function i(p,E,c){return Math.min(E,Math.max(p,c))}function f(p,E,c){this.dimension=p.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var l=0;l<this.dimension;++l)this.bounds[0][l]=-1/0,this.bounds[1][l]=1/0;this._state=p.slice().reverse(),this._velocity=E.slice().reverse(),this._time=[c],this._scratch=[p.slice(),p.slice(),p.slice(),p.slice(),p.slice()]}var g=f.prototype;g.flush=function(p){var E=u.gt(this._time,p)-1;E<=0||(this._time.splice(0,E),this._state.splice(0,E*this.dimension),this._velocity.splice(0,E*this.dimension))},g.curve=function(p){var E=this._time,c=E.length,l=u.le(E,p),m=this._scratch[0],M=this._state,L=this._velocity,D=this.dimension,A=this.bounds;if(l<0)for(var C=D-1,S=0;S<D;++S,--C)m[S]=M[C];else if(l>=c-1)for(var C=M.length-1,o=p-E[c-1],S=0;S<D;++S,--C)m[S]=M[C]+o*L[C];else{for(var C=D*(l+1)-1,R=E[l],T=E[l+1],O=T-R||1,N=this._scratch[1],H=this._scratch[2],k=this._scratch[3],V=this._scratch[4],G=!0,S=0;S<D;++S,--C)N[S]=M[C],k[S]=L[C]*O,H[S]=M[C+D],V[S]=L[C+D]*O,G=G&&N[S]===H[S]&&k[S]===V[S]&&k[S]===0;if(G)for(var S=0;S<D;++S)m[S]=N[S];else n(N,k,H,V,(p-R)/O,m)}for(var U=A[0],Y=A[1],S=0;S<D;++S)m[S]=i(U[S],Y[S],m[S]);return m},g.dcurve=function(p){var E=this._time,c=E.length,l=u.le(E,p),m=this._scratch[0],M=this._state,L=this._velocity,D=this.dimension;if(l>=c-1){var A=M.length-1;p-E[c-1];for(var C=0;C<D;++C,--A)m[C]=L[A]}else{for(var A=D*(l+1)-1,S=E[l],o=E[l+1],R=o-S||1,T=this._scratch[1],O=this._scratch[2],N=this._scratch[3],H=this._scratch[4],k=!0,C=0;C<D;++C,--A)T[C]=M[A],N[C]=L[A]*R,O[C]=M[A+D],H[C]=L[A+D]*R,k=k&&T[C]===O[C]&&N[C]===H[C]&&N[C]===0;if(k)for(var C=0;C<D;++C)m[C]=0;else{n.derivative(T,N,O,H,(p-S)/R,m);for(var C=0;C<D;++C)m[C]/=R}}return m},g.lastT=function(){var p=this._time;return p[p.length-1]},g.stable=function(){for(var p=this._velocity,E=p.length,c=this.dimension-1;c>=0;--c)if(p[--E])return!1;return!0},g.jump=function(p){var E=this.lastT(),c=this.dimension;if(!(p<E||arguments.length!==c+1)){var l=this._state,m=this._velocity,M=l.length-this.dimension,L=this.bounds,D=L[0],A=L[1];this._time.push(E,p);for(var C=0;C<2;++C)for(var S=0;S<c;++S)l.push(l[M++]),m.push(0);this._time.push(p);for(var S=c;S>0;--S)l.push(i(D[S-1],A[S-1],arguments[S])),m.push(0)}},g.push=function(p){var E=this.lastT(),c=this.dimension;if(!(p<E||arguments.length!==c+1)){var l=this._state,m=this._velocity,M=l.length-this.dimension,L=p-E,D=this.bounds,A=D[0],C=D[1],S=L>1e-6?1/L:0;this._time.push(p);for(var o=c;o>0;--o){var R=i(A[o-1],C[o-1],arguments[o]);l.push(R),m.push((R-l[M++])*S)}}},g.set=function(p){var E=this.dimension;if(!(p<this.lastT()||arguments.length!==E+1)){var c=this._state,l=this._velocity,m=this.bounds,M=m[0],L=m[1];this._time.push(p);for(var D=E;D>0;--D)c.push(i(M[D-1],L[D-1],arguments[D])),l.push(0)}},g.move=function(p){var E=this.lastT(),c=this.dimension;if(!(p<=E||arguments.length!==c+1)){var l=this._state,m=this._velocity,M=l.length-this.dimension,L=this.bounds,D=L[0],A=L[1],C=p-E,S=C>1e-6?1/C:0;this._time.push(p);for(var o=c;o>0;--o){var R=arguments[o];l.push(i(D[o-1],A[o-1],l[M++]+R)),m.push(R*S)}}},g.idle=function(p){var E=this.lastT();if(!(p<E)){var c=this.dimension,l=this._state,m=this._velocity,M=l.length-c,L=this.bounds,D=L[0],A=L[1],C=p-E;this._time.push(p);for(var S=c-1;S>=0;--S)l.push(i(D[S],A[S],l[M]+C*m[M])),m.push(0),M+=1}};function h(p){for(var E=new Array(p),c=0;c<p;++c)E[c]=0;return E}function b(p,E,c){switch(arguments.length){case 0:return new f([0],[0],0);case 1:if(typeof p=="number"){var l=h(p);return new f(l,l,0)}else return new f(p,h(p.length),0);case 2:if(typeof E=="number"){var l=h(p.length);return new f(p,l,+E)}else c=0;case 3:if(p.length!==E.length)throw new Error("state and velocity lengths must match");return new f(p,E,c)}}},7080:function(v){v.exports=D;var y=0,r=1;function n(A,C,S,o,R,T){this._color=A,this.key=C,this.value=S,this.left=o,this.right=R,this._count=T}function u(A){return new n(A._color,A.key,A.value,A.left,A.right,A._count)}function i(A,C){return new n(A,C.key,C.value,C.left,C.right,C._count)}function f(A){A._count=1+(A.left?A.left._count:0)+(A.right?A.right._count:0)}function g(A,C){this._compare=A,this.root=C}var h=g.prototype;Object.defineProperty(h,"keys",{get:function(){var A=[];return this.forEach(function(C,S){A.push(C)}),A}}),Object.defineProperty(h,"values",{get:function(){var A=[];return this.forEach(function(C,S){A.push(S)}),A}}),Object.defineProperty(h,"length",{get:function(){return this.root?this.root._count:0}}),h.insert=function(A,C){for(var S=this._compare,o=this.root,R=[],T=[];o;){var O=S(A,o.key);R.push(o),T.push(O),O<=0?o=o.left:o=o.right}R.push(new n(y,A,C,null,null,1));for(var N=R.length-2;N>=0;--N){var o=R[N];T[N]<=0?R[N]=new n(o._color,o.key,o.value,R[N+1],o.right,o._count+1):R[N]=new n(o._color,o.key,o.value,o.left,R[N+1],o._count+1)}for(var N=R.length-1;N>1;--N){var H=R[N-1],o=R[N];if(H._color===r||o._color===r)break;var k=R[N-2];if(k.left===H)if(H.left===o){var V=k.right;if(V&&V._color===y)H._color=r,k.right=i(r,V),k._color=y,N-=1;else{if(k._color=y,k.left=H.right,H._color=r,H.right=k,R[N-2]=H,R[N-1]=o,f(k),f(H),N>=3){var G=R[N-3];G.left===k?G.left=H:G.right=H}break}}else{var V=k.right;if(V&&V._color===y)H._color=r,k.right=i(r,V),k._color=y,N-=1;else{if(H.right=o.left,k._color=y,k.left=o.right,o._color=r,o.left=H,o.right=k,R[N-2]=o,R[N-1]=H,f(k),f(H),f(o),N>=3){var G=R[N-3];G.left===k?G.left=o:G.right=o}break}}else if(H.right===o){var V=k.left;if(V&&V._color===y)H._color=r,k.left=i(r,V),k._color=y,N-=1;else{if(k._color=y,k.right=H.left,H._color=r,H.left=k,R[N-2]=H,R[N-1]=o,f(k),f(H),N>=3){var G=R[N-3];G.right===k?G.right=H:G.left=H}break}}else{var V=k.left;if(V&&V._color===y)H._color=r,k.left=i(r,V),k._color=y,N-=1;else{if(H.left=o.right,k._color=y,k.right=o.left,o._color=r,o.right=H,o.left=k,R[N-2]=o,R[N-1]=H,f(k),f(H),f(o),N>=3){var G=R[N-3];G.right===k?G.right=o:G.left=o}break}}}return R[0]._color=r,new g(S,R[0])};function b(A,C){if(C.left){var S=b(A,C.left);if(S)return S}var S=A(C.key,C.value);if(S)return S;if(C.right)return b(A,C.right)}function p(A,C,S,o){var R=C(A,o.key);if(R<=0){if(o.left){var T=p(A,C,S,o.left);if(T)return T}var T=S(o.key,o.value);if(T)return T}if(o.right)return p(A,C,S,o.right)}function E(A,C,S,o,R){var T=S(A,R.key),O=S(C,R.key),N;if(T<=0&&(R.left&&(N=E(A,C,S,o,R.left),N)||O>0&&(N=o(R.key,R.value),N)))return N;if(O>0&&R.right)return E(A,C,S,o,R.right)}h.forEach=function(C,S,o){if(this.root)switch(arguments.length){case 1:return b(C,this.root);case 2:return p(S,this._compare,C,this.root);case 3:return this._compare(S,o)>=0?void 0:E(S,o,this._compare,C,this.root)}},Object.defineProperty(h,"begin",{get:function(){for(var A=[],C=this.root;C;)A.push(C),C=C.left;return new c(this,A)}}),Object.defineProperty(h,"end",{get:function(){for(var A=[],C=this.root;C;)A.push(C),C=C.right;return new c(this,A)}}),h.at=function(A){if(A<0)return new c(this,[]);for(var C=this.root,S=[];;){if(S.push(C),C.left){if(A<C.left._count){C=C.left;continue}A-=C.left._count}if(!A)return new c(this,S);if(A-=1,C.right){if(A>=C.right._count)break;C=C.right}else break}return new c(this,[])},h.ge=function(A){for(var C=this._compare,S=this.root,o=[],R=0;S;){var T=C(A,S.key);o.push(S),T<=0&&(R=o.length),T<=0?S=S.left:S=S.right}return o.length=R,new c(this,o)},h.gt=function(A){for(var C=this._compare,S=this.root,o=[],R=0;S;){var T=C(A,S.key);o.push(S),T<0&&(R=o.length),T<0?S=S.left:S=S.right}return o.length=R,new c(this,o)},h.lt=function(A){for(var C=this._compare,S=this.root,o=[],R=0;S;){var T=C(A,S.key);o.push(S),T>0&&(R=o.length),T<=0?S=S.left:S=S.right}return o.length=R,new c(this,o)},h.le=function(A){for(var C=this._compare,S=this.root,o=[],R=0;S;){var T=C(A,S.key);o.push(S),T>=0&&(R=o.length),T<0?S=S.left:S=S.right}return o.length=R,new c(this,o)},h.find=function(A){for(var C=this._compare,S=this.root,o=[];S;){var R=C(A,S.key);if(o.push(S),R===0)return new c(this,o);R<=0?S=S.left:S=S.right}return new c(this,[])},h.remove=function(A){var C=this.find(A);return C?C.remove():this},h.get=function(A){for(var C=this._compare,S=this.root;S;){var o=C(A,S.key);if(o===0)return S.value;o<=0?S=S.left:S=S.right}};function c(A,C){this.tree=A,this._stack=C}var l=c.prototype;Object.defineProperty(l,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(l,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),l.clone=function(){return new c(this.tree,this._stack.slice())};function m(A,C){A.key=C.key,A.value=C.value,A.left=C.left,A.right=C.right,A._color=C._color,A._count=C._count}function M(A){for(var C,S,o,R,T=A.length-1;T>=0;--T){if(C=A[T],T===0){C._color=r;return}if(S=A[T-1],S.left===C){if(o=S.right,o.right&&o.right._color===y){if(o=S.right=u(o),R=o.right=u(o.right),S.right=o.left,o.left=S,o.right=R,o._color=S._color,C._color=r,S._color=r,R._color=r,f(S),f(o),T>1){var O=A[T-2];O.left===S?O.left=o:O.right=o}A[T-1]=o;return}else if(o.left&&o.left._color===y){if(o=S.right=u(o),R=o.left=u(o.left),S.right=R.left,o.left=R.right,R.left=S,R.right=o,R._color=S._color,S._color=r,o._color=r,C._color=r,f(S),f(o),f(R),T>1){var O=A[T-2];O.left===S?O.left=R:O.right=R}A[T-1]=R;return}if(o._color===r)if(S._color===y){S._color=r,S.right=i(y,o);return}else{S.right=i(y,o);continue}else{if(o=u(o),S.right=o.left,o.left=S,o._color=S._color,S._color=y,f(S),f(o),T>1){var O=A[T-2];O.left===S?O.left=o:O.right=o}A[T-1]=o,A[T]=S,T+1<A.length?A[T+1]=C:A.push(C),T=T+2}}else{if(o=S.left,o.left&&o.left._color===y){if(o=S.left=u(o),R=o.left=u(o.left),S.left=o.right,o.right=S,o.left=R,o._color=S._color,C._color=r,S._color=r,R._color=r,f(S),f(o),T>1){var O=A[T-2];O.right===S?O.right=o:O.left=o}A[T-1]=o;return}else if(o.right&&o.right._color===y){if(o=S.left=u(o),R=o.right=u(o.right),S.left=R.right,o.right=R.left,R.right=S,R.left=o,R._color=S._color,S._color=r,o._color=r,C._color=r,f(S),f(o),f(R),T>1){var O=A[T-2];O.right===S?O.right=R:O.left=R}A[T-1]=R;return}if(o._color===r)if(S._color===y){S._color=r,S.left=i(y,o);return}else{S.left=i(y,o);continue}else{if(o=u(o),S.left=o.right,o.right=S,o._color=S._color,S._color=y,f(S),f(o),T>1){var O=A[T-2];O.right===S?O.right=o:O.left=o}A[T-1]=o,A[T]=S,T+1<A.length?A[T+1]=C:A.push(C),T=T+2}}}}l.remove=function(){var A=this._stack;if(A.length===0)return this.tree;var C=new Array(A.length),S=A[A.length-1];C[C.length-1]=new n(S._color,S.key,S.value,S.left,S.right,S._count);for(var o=A.length-2;o>=0;--o){var S=A[o];S.left===A[o+1]?C[o]=new n(S._color,S.key,S.value,C[o+1],S.right,S._count):C[o]=new n(S._color,S.key,S.value,S.left,C[o+1],S._count)}if(S=C[C.length-1],S.left&&S.right){var R=C.length;for(S=S.left;S.right;)C.push(S),S=S.right;var T=C[R-1];C.push(new n(S._color,T.key,T.value,S.left,S.right,S._count)),C[R-1].key=S.key,C[R-1].value=S.value;for(var o=C.length-2;o>=R;--o)S=C[o],C[o]=new n(S._color,S.key,S.value,S.left,C[o+1],S._count);C[R-1].left=C[R]}if(S=C[C.length-1],S._color===y){var O=C[C.length-2];O.left===S?O.left=null:O.right===S&&(O.right=null),C.pop();for(var o=0;o<C.length;++o)C[o]._count--;return new g(this.tree._compare,C[0])}else if(S.left||S.right){S.left?m(S,S.left):S.right&&m(S,S.right),S._color=r;for(var o=0;o<C.length-1;++o)C[o]._count--;return new g(this.tree._compare,C[0])}else{if(C.length===1)return new g(this.tree._compare,null);for(var o=0;o<C.length;++o)C[o]._count--;var N=C[C.length-2];M(C),N.left===S?N.left=null:N.right=null}return new g(this.tree._compare,C[0])},Object.defineProperty(l,"key",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(l,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(l,"index",{get:function(){var A=0,C=this._stack;if(C.length===0){var S=this.tree.root;return S?S._count:0}else C[C.length-1].left&&(A=C[C.length-1].left._count);for(var o=C.length-2;o>=0;--o)C[o+1]===C[o].right&&(++A,C[o].left&&(A+=C[o].left._count));return A},enumerable:!0}),l.next=function(){var A=this._stack;if(A.length!==0){var C=A[A.length-1];if(C.right)for(C=C.right;C;)A.push(C),C=C.left;else for(A.pop();A.length>0&&A[A.length-1].right===C;)C=A[A.length-1],A.pop()}},Object.defineProperty(l,"hasNext",{get:function(){var A=this._stack;if(A.length===0)return!1;if(A[A.length-1].right)return!0;for(var C=A.length-1;C>0;--C)if(A[C-1].left===A[C])return!0;return!1}}),l.update=function(A){var C=this._stack;if(C.length===0)throw new Error("Can't update empty node!");var S=new Array(C.length),o=C[C.length-1];S[S.length-1]=new n(o._color,o.key,A,o.left,o.right,o._count);for(var R=C.length-2;R>=0;--R)o=C[R],o.left===C[R+1]?S[R]=new n(o._color,o.key,o.value,S[R+1],o.right,o._count):S[R]=new n(o._color,o.key,o.value,o.left,S[R+1],o._count);return new g(this.tree._compare,S[0])},l.prev=function(){var A=this._stack;if(A.length!==0){var C=A[A.length-1];if(C.left)for(C=C.left;C;)A.push(C),C=C.right;else for(A.pop();A.length>0&&A[A.length-1].left===C;)C=A[A.length-1],A.pop()}},Object.defineProperty(l,"hasPrev",{get:function(){var A=this._stack;if(A.length===0)return!1;if(A[A.length-1].left)return!0;for(var C=A.length-1;C>0;--C)if(A[C-1].right===A[C])return!0;return!1}});function L(A,C){return A<C?-1:A>C?1:0}function D(A){return new g(A||L,null)}},7453:function(v,y,r){v.exports=o;var n=r(9557),u=r(1681),i=r(1011),f=r(2864),g=r(8468),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function b(R,T){return R[0]=T[0],R[1]=T[1],R[2]=T[2],R}function p(R){this.gl=R,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=i(R)}var E=p.prototype;E.update=function(R){R=R||{};function T(se,ce,q){if(q in R){var j=R[q],Z=this[q],Q;(se?Array.isArray(j)&&Array.isArray(j[0]):Array.isArray(j))?this[q]=Q=[ce(j[0]),ce(j[1]),ce(j[2])]:this[q]=Q=[ce(j),ce(j),ce(j)];for(var ue=0;ue<3;++ue)if(Q[ue]!==Z[ue])return!0}return!1}var O=T.bind(this,!1,Number),N=T.bind(this,!1,Boolean),H=T.bind(this,!1,String),k=T.bind(this,!0,function(se){if(Array.isArray(se)){if(se.length===3)return[+se[0],+se[1],+se[2],1];if(se.length===4)return[+se[0],+se[1],+se[2],+se[3]]}return[0,0,0,1]}),V,G=!1,U=!1;if("bounds"in R)for(var Y=R.bounds,ee=0;ee<2;++ee)for(var re=0;re<3;++re)Y[ee][re]!==this.bounds[ee][re]&&(U=!0),this.bounds[ee][re]=Y[ee][re];if("ticks"in R){V=R.ticks,G=!0,this.autoTicks=!1;for(var ee=0;ee<3;++ee)this.tickSpacing[ee]=0}else O("tickSpacing")&&(this.autoTicks=!0,U=!0);if(this._firstInit&&("ticks"in R||"tickSpacing"in R||(this.autoTicks=!0),U=!0,G=!0,this._firstInit=!1),U&&this.autoTicks&&(V=g.create(this.bounds,this.tickSpacing),G=!0),G){for(var ee=0;ee<3;++ee)V[ee].sort(function(ce,q){return ce.x-q.x});g.equal(V,this.ticks)?G=!1:this.ticks=V}N("tickEnable"),H("tickFont")&&(G=!0),O("tickSize"),O("tickAngle"),O("tickPad"),k("tickColor");var ie=H("labels");H("labelFont")&&(ie=!0),N("labelEnable"),O("labelSize"),O("labelPad"),k("labelColor"),N("lineEnable"),N("lineMirror"),O("lineWidth"),k("lineColor"),N("lineTickEnable"),N("lineTickMirror"),O("lineTickLength"),O("lineTickWidth"),k("lineTickColor"),N("gridEnable"),O("gridWidth"),k("gridColor"),N("zeroEnable"),k("zeroLineColor"),O("zeroLineWidth"),N("backgroundEnable"),k("backgroundColor"),this._text?this._text&&(ie||G)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=n(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&G&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=u(this.gl,this.bounds,this.ticks))};function c(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var l=[new c,new c,new c];function m(R,T,O,N,H){for(var k=R.primalOffset,V=R.primalMinor,G=R.mirrorOffset,U=R.mirrorMinor,Y=N[T],ee=0;ee<3;++ee)if(T!==ee){var re=k,ie=G,se=V,ce=U;Y&1<<ee&&(re=G,ie=k,se=U,ce=V),re[ee]=O[0][ee],ie[ee]=O[1][ee],H[ee]>0?(se[ee]=-1,ce[ee]=0):(se[ee]=0,ce[ee]=1)}}var M=[0,0,0],L={model:h,view:h,projection:h,_ortho:!1};E.isOpaque=function(){return!0},E.isTransparent=function(){return!1},E.drawTransparent=function(R){};var D=0,A=[0,0,0],C=[0,0,0],S=[0,0,0];E.draw=function(R){R=R||L;for(var Z=this.gl,T=R.model||h,O=R.view||h,N=R.projection||h,H=this.bounds,k=R._ortho||!1,V=f(T,O,N,H,k),G=V.cubeEdges,U=V.axis,Y=O[12],ee=O[13],re=O[14],ie=O[15],se=k?2:1,ce=se*this.pixelRatio*(N[3]*Y+N[7]*ee+N[11]*re+N[15]*ie)/Z.drawingBufferHeight,q=0;q<3;++q)this.lastCubeProps.cubeEdges[q]=G[q],this.lastCubeProps.axis[q]=U[q];for(var j=l,q=0;q<3;++q)m(l[q],q,this.bounds,G,U);for(var Z=this.gl,Q=M,q=0;q<3;++q)this.backgroundEnable[q]?Q[q]=U[q]:Q[q]=0;this._background.draw(T,O,N,H,Q,this.backgroundColor),this._lines.bind(T,O,N,this);for(var q=0;q<3;++q){var ue=[0,0,0];U[q]>0?ue[q]=H[1][q]:ue[q]=H[0][q];for(var fe=0;fe<2;++fe){var te=(q+1+fe)%3,ne=(q+1+(fe^1))%3;this.gridEnable[te]&&this._lines.drawGrid(te,ne,this.bounds,ue,this.gridColor[te],this.gridWidth[te]*this.pixelRatio)}for(var fe=0;fe<2;++fe){var te=(q+1+fe)%3,ne=(q+1+(fe^1))%3;this.zeroEnable[ne]&&Math.min(H[0][ne],H[1][ne])<=0&&Math.max(H[0][ne],H[1][ne])>=0&&this._lines.drawZero(te,ne,this.bounds,ue,this.zeroLineColor[ne],this.zeroLineWidth[ne]*this.pixelRatio)}}for(var q=0;q<3;++q){this.lineEnable[q]&&this._lines.drawAxisLine(q,this.bounds,j[q].primalOffset,this.lineColor[q],this.lineWidth[q]*this.pixelRatio),this.lineMirror[q]&&this._lines.drawAxisLine(q,this.bounds,j[q].mirrorOffset,this.lineColor[q],this.lineWidth[q]*this.pixelRatio);for(var ve=b(A,j[q].primalMinor),le=b(C,j[q].mirrorMinor),xe=this.lineTickLength,fe=0;fe<3;++fe){var Se=ce/T[5*fe];ve[fe]*=xe[fe]*Se,le[fe]*=xe[fe]*Se}this.lineTickEnable[q]&&this._lines.drawAxisTicks(q,j[q].primalOffset,ve,this.lineTickColor[q],this.lineTickWidth[q]*this.pixelRatio),this.lineTickMirror[q]&&this._lines.drawAxisTicks(q,j[q].mirrorOffset,le,this.lineTickColor[q],this.lineTickWidth[q]*this.pixelRatio)}this._lines.unbind(),this._text.bind(T,O,N,this.pixelRatio);var Re,Ee=.5,Oe,Be;function Le(Xe){Be=[0,0,0],Be[Xe]=1}function Te(Xe,ht,st){var it=(Xe+1)%3,nt=(Xe+2)%3,pt=ht[it],Tt=ht[nt],Et=st[it],Dt=st[nt];if(pt>0&&Dt>0){Le(it);return}else if(pt>0&&Dt<0){Le(it);return}else if(pt<0&&Dt>0){Le(it);return}else if(pt<0&&Dt<0){Le(it);return}else if(Tt>0&&Et>0){Le(nt);return}else if(Tt>0&&Et<0){Le(nt);return}else if(Tt<0&&Et>0){Le(nt);return}else if(Tt<0&&Et<0){Le(nt);return}}for(var q=0;q<3;++q){for(var De=j[q].primalMinor,Ve=j[q].mirrorMinor,Ye=b(S,j[q].primalOffset),fe=0;fe<3;++fe)this.lineTickEnable[q]&&(Ye[fe]+=ce*De[fe]*Math.max(this.lineTickLength[fe],0)/T[5*fe]);var Ne=[0,0,0];if(Ne[q]=1,this.tickEnable[q]){this.tickAngle[q]===-3600?(this.tickAngle[q]=0,this.tickAlign[q]="auto"):this.tickAlign[q]=-1,Oe=1,Re=[this.tickAlign[q],Ee,Oe],Re[0]==="auto"?Re[0]=D:Re[0]=parseInt(""+Re[0]),Be=[0,0,0],Te(q,De,Ve);for(var fe=0;fe<3;++fe)Ye[fe]+=ce*De[fe]*this.tickPad[fe]/T[5*fe];this._text.drawTicks(q,this.tickSize[q],this.tickAngle[q],Ye,this.tickColor[q],Ne,Be,Re)}if(this.labelEnable[q]){Oe=0,Be=[0,0,0],this.labels[q].length>4&&(Le(q),Oe=1),Re=[this.labelAlign[q],Ee,Oe],Re[0]==="auto"?Re[0]=D:Re[0]=parseInt(""+Re[0]);for(var fe=0;fe<3;++fe)Ye[fe]+=ce*De[fe]*this.labelPad[fe]/T[5*fe];Ye[q]+=.5*(H[0][q]+H[1][q]),this._text.drawLabel(q,this.labelSize[q],this.labelAngle[q],Ye,this.labelColor[q],[0,0,0],Be,Re)}}this._text.unbind()},E.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function o(R,T){var O=new p(R);return O.update(T),O}},1011:function(v,y,r){v.exports=h;var n=r(5827),u=r(2944),i=r(1943).bg;function f(b,p,E,c){this.gl=b,this.buffer=p,this.vao=E,this.shader=c}var g=f.prototype;g.draw=function(b,p,E,c,l,m){for(var M=!1,L=0;L<3;++L)M=M||l[L];if(M){var D=this.gl;D.enable(D.POLYGON_OFFSET_FILL),D.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:b,view:p,projection:E,bounds:c,enable:l,colors:m},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),D.disable(D.POLYGON_OFFSET_FILL)}},g.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function h(b){for(var p=[],E=[],c=0,l=0;l<3;++l)for(var m=(l+1)%3,M=(l+2)%3,L=[0,0,0],D=[0,0,0],A=-1;A<=1;A+=2){E.push(c,c+2,c+1,c+1,c+2,c+3),L[l]=A,D[l]=A;for(var C=-1;C<=1;C+=2){L[m]=C;for(var S=-1;S<=1;S+=2)L[M]=S,p.push(L[0],L[1],L[2],D[0],D[1],D[2]),c+=1}var o=m;m=M,M=o}var R=n(b,new Float32Array(p)),T=n(b,new Uint16Array(E),b.ELEMENT_ARRAY_BUFFER),O=u(b,[{buffer:R,type:b.FLOAT,size:3,offset:0,stride:24},{buffer:R,type:b.FLOAT,size:3,offset:12,stride:24}],T),N=i(b);return N.attributes.position.location=0,N.attributes.normal.location=1,new f(b,R,O,N)}},2864:function(v,y,r){v.exports=A;var n=r(2288),u=r(104),i=r(4670),f=r(417),g=new Array(16),h=new Array(8),b=new Array(8),p=new Array(3),E=[0,0,0];(function(){for(var C=0;C<8;++C)h[C]=[1,1,1,1],b[C]=[1,1,1]})();function c(C,S,o){for(var R=0;R<4;++R){C[R]=o[12+R];for(var T=0;T<3;++T)C[R]+=S[T]*o[4*T+R]}}var l=[[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 m(C){for(var S=0;S<l.length;++S)if(C=i.positive(C,l[S]),C.length<3)return 0;for(var o=C[0],R=o[0]/o[3],T=o[1]/o[3],O=0,S=1;S+1<C.length;++S){var N=C[S],H=C[S+1],k=N[0]/N[3],V=N[1]/N[3],G=H[0]/H[3],U=H[1]/H[3],Y=k-R,ee=V-T,re=G-R,ie=U-T;O+=Math.abs(Y*ie-ee*re)}return O}var M=[1,1,1],L=[0,0,0],D={cubeEdges:M,axis:L};function A(C,S,o,R,T){u(g,S,C),u(g,o,g);for(var O=0,N=0;N<2;++N){p[2]=R[N][2];for(var H=0;H<2;++H){p[1]=R[H][1];for(var k=0;k<2;++k)p[0]=R[k][0],c(h[O],p,g),O+=1}}for(var V=-1,N=0;N<8;++N){for(var G=h[N][3],U=0;U<3;++U)b[N][U]=h[N][U]/G;T&&(b[N][2]*=-1),G<0&&(V<0||b[N][2]<b[V][2])&&(V=N)}if(V<0){V=0;for(var Y=0;Y<3;++Y){for(var ee=(Y+2)%3,re=(Y+1)%3,ie=-1,se=-1,ce=0;ce<2;++ce){var q=ce<<Y,j=q+(ce<<ee)+(1-ce<<re),Z=q+(1-ce<<ee)+(ce<<re);f(b[q],b[j],b[Z],E)<0||(ce?ie=1:se=1)}if(ie<0||se<0){se>ie&&(V|=1<<Y);continue}for(var ce=0;ce<2;++ce){var q=ce<<Y,j=q+(ce<<ee)+(1-ce<<re),Z=q+(1-ce<<ee)+(ce<<re),Q=m([h[q],h[j],h[Z],h[q+(1<<ee)+(1<<re)]]);ce?ie=Q:se=Q}if(se>ie){V|=1<<Y;continue}}}for(var ue=7^V,fe=-1,N=0;N<8;++N)N===V||N===ue||(fe<0||b[fe][1]>b[N][1])&&(fe=N);for(var te=-1,N=0;N<3;++N){var ne=fe^1<<N;if(!(ne===V||ne===ue)){te<0&&(te=ne);var re=b[ne];re[0]<b[te][0]&&(te=ne)}}for(var ve=-1,N=0;N<3;++N){var ne=fe^1<<N;if(!(ne===V||ne===ue||ne===te)){ve<0&&(ve=ne);var re=b[ne];re[0]>b[ve][0]&&(ve=ne)}}var le=M;le[0]=le[1]=le[2]=0,le[n.log2(te^fe)]=fe&te,le[n.log2(fe^ve)]=fe&ve;var xe=ve^7;xe===V||xe===ue?(xe=te^7,le[n.log2(ve^xe)]=xe&ve):le[n.log2(te^xe)]=xe&te;for(var Se=L,Re=V,Y=0;Y<3;++Y)Re&1<<Y?Se[Y]=-1:Se[Y]=1;return D}},1681:function(v,y,r){v.exports=M;var n=r(5827),u=r(2944),i=r(1943).j,f=[0,0,0],g=[0,0,0],h=[0,0,0],b=[0,0,0],p=[1,1];function E(L){return L[0]=L[1]=L[2]=0,L}function c(L,D){return L[0]=D[0],L[1]=D[1],L[2]=D[2],L}function l(L,D,A,C,S,o,R,T){this.gl=L,this.vertBuffer=D,this.vao=A,this.shader=C,this.tickCount=S,this.tickOffset=o,this.gridCount=R,this.gridOffset=T}var m=l.prototype;m.bind=function(L,D,A){this.shader.bind(),this.shader.uniforms.model=L,this.shader.uniforms.view=D,this.shader.uniforms.projection=A,p[0]=this.gl.drawingBufferWidth,p[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=p,this.vao.bind()},m.unbind=function(){this.vao.unbind()},m.drawAxisLine=function(L,D,A,C,S){var o=E(g);this.shader.uniforms.majorAxis=g,o[L]=D[1][L]-D[0][L],this.shader.uniforms.minorAxis=o;var R=c(b,A);R[L]+=D[0][L],this.shader.uniforms.offset=R,this.shader.uniforms.lineWidth=S,this.shader.uniforms.color=C;var T=E(h);T[(L+2)%3]=1,this.shader.uniforms.screenAxis=T,this.vao.draw(this.gl.TRIANGLES,6);var T=E(h);T[(L+1)%3]=1,this.shader.uniforms.screenAxis=T,this.vao.draw(this.gl.TRIANGLES,6)},m.drawAxisTicks=function(L,D,A,C,S){if(this.tickCount[L]){var o=E(f);o[L]=1,this.shader.uniforms.majorAxis=o,this.shader.uniforms.offset=D,this.shader.uniforms.minorAxis=A,this.shader.uniforms.color=C,this.shader.uniforms.lineWidth=S;var R=E(h);R[L]=1,this.shader.uniforms.screenAxis=R,this.vao.draw(this.gl.TRIANGLES,this.tickCount[L],this.tickOffset[L])}},m.drawGrid=function(L,D,A,C,S,o){if(this.gridCount[L]){var R=E(g);R[D]=A[1][D]-A[0][D],this.shader.uniforms.minorAxis=R;var T=c(b,C);T[D]+=A[0][D],this.shader.uniforms.offset=T;var O=E(f);O[L]=1,this.shader.uniforms.majorAxis=O;var N=E(h);N[L]=1,this.shader.uniforms.screenAxis=N,this.shader.uniforms.lineWidth=o,this.shader.uniforms.color=S,this.vao.draw(this.gl.TRIANGLES,this.gridCount[L],this.gridOffset[L])}},m.drawZero=function(L,D,A,C,S,o){var R=E(g);this.shader.uniforms.majorAxis=R,R[L]=A[1][L]-A[0][L],this.shader.uniforms.minorAxis=R;var T=c(b,C);T[L]+=A[0][L],this.shader.uniforms.offset=T;var O=E(h);O[D]=1,this.shader.uniforms.screenAxis=O,this.shader.uniforms.lineWidth=o,this.shader.uniforms.color=S,this.vao.draw(this.gl.TRIANGLES,6)},m.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()};function M(L,D,A){var C=[],S=[0,0,0],o=[0,0,0],R=[0,0,0],T=[0,0,0];C.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var O=0;O<3;++O){for(var k=C.length/3|0,N=0;N<A[O].length;++N){var H=+A[O][N].x;C.push(H,0,1,H,1,1,H,0,-1,H,0,-1,H,1,1,H,1,-1)}var G=C.length/3|0;S[O]=k,o[O]=G-k;for(var k=C.length/3|0,V=0;V<A[O].length;++V){var H=+A[O][V].x;C.push(H,0,1,H,1,1,H,0,-1,H,0,-1,H,1,1,H,1,-1)}var G=C.length/3|0;R[O]=k,T[O]=G-k}var U=n(L,new Float32Array(C)),Y=u(L,[{buffer:U,type:L.FLOAT,size:3,stride:0,offset:0}]),ee=i(L);return ee.attributes.position.location=0,new l(L,U,Y,ee,o,S,T,R)}},1943:function(v,y,r){var n=r(6832),u=r(5158),i=n([`precision highp float;
#define GLSLIFY 1
attribute vec3 position;
uniform mat4 model, view, projection;
uniform vec3 offset, majorAxis, minorAxis, screenAxis;
uniform float lineWidth;
uniform vec2 screenShape;
vec3 project(vec3 p) {
vec4 pp = projection * view * model * vec4(p, 1.0);
return pp.xyz / max(pp.w, 0.0001);
}
void main() {
vec3 major = position.x * majorAxis;
vec3 minor = position.y * minorAxis;
vec3 vPosition = major + minor + offset;
vec3 pPosition = project(vPosition);
vec3 offset = project(vPosition + screenAxis * position.z);
vec2 screen = normalize((offset - pPosition).xy * screenShape) / screenShape;
gl_Position = vec4(pPosition + vec3(0.5 * screen * lineWidth, 0), 1.0);
}
`]),f=n([`precision highp float;
#define GLSLIFY 1
uniform vec4 color;
void main() {
gl_FragColor = color;
}`]);y.j=function(E){return u(E,i,f,null,[{name:"position",type:"vec3"}])};var g=n([`precision highp float;
#define GLSLIFY 1
attribute vec3 position;
uniform mat4 model, view, projection;
uniform vec3 offset, axis, alignDir, alignOpt;
uniform float scale, angle, pixelScale;
uniform vec2 resolution;
vec3 project(vec3 p) {
vec4 pp = projection * view * model * vec4(p, 1.0);
return pp.xyz / max(pp.w, 0.0001);
}
float computeViewAngle(vec3 a, vec3 b) {
vec3 A = project(a);
vec3 B = project(b);
return atan(
(B.y - A.y) * resolution.y,
(B.x - A.x) * resolution.x
);
}
const float PI = 3.141592;
const float TWO_PI = 2.0 * PI;
const float HALF_PI = 0.5 * PI;
const float ONE_AND_HALF_PI = 1.5 * PI;
int option = int(floor(alignOpt.x + 0.001));
float hv_ratio = alignOpt.y;
bool enableAlign = (alignOpt.z != 0.0);
float mod_angle(float a) {
return mod(a, PI);
}
float positive_angle(float a) {
return mod_angle((a < 0.0) ?
a + TWO_PI :
a
);
}
float look_upwards(float a) {
float b = positive_angle(a);
return ((b > 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);
}`]),h=n([`precision highp float;
#define GLSLIFY 1
uniform vec4 color;
void main() {
gl_FragColor = color;
}`]);y.f=function(E){return u(E,g,h,null,[{name:"position",type:"vec3"}])};var b=n([`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);
}`]),p=n([`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];
}`]);y.bg=function(E){return u(E,b,p,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},9557:function(v,y,r){v.exports=m;var n=r(5827),u=r(2944),i=r(875),f=r(1943).f,g=window||d.global||{},h=g.__TEXT_CACHE||{};g.__TEXT_CACHE={};var b=3;function p(M,L,D,A){this.gl=M,this.shader=L,this.buffer=D,this.vao=A,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var E=p.prototype,c=[0,0];E.bind=function(M,L,D,A){this.vao.bind(),this.shader.bind();var C=this.shader.uniforms;C.model=M,C.view=L,C.projection=D,C.pixelScale=A,c[0]=this.gl.drawingBufferWidth,c[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=c},E.unbind=function(){this.vao.unbind()},E.update=function(M,L,D,A,C){var S=[];function o(U,Y,ee,re,ie,se){var ce=h[ee];ce||(ce=h[ee]={});var q=ce[Y];q||(q=ce[Y]=l(Y,{triangles:!0,font:ee,textAlign:"center",textBaseline:"middle",lineSpacing:ie,styletags:se}));for(var j=(re||12)/12,Z=q.positions,Q=q.cells,ue=0,fe=Q.length;ue<fe;++ue)for(var te=Q[ue],ne=2;ne>=0;--ne){var ve=Z[te[ne]];S.push(j*ve[0],-j*ve[1],U)}}for(var R=[0,0,0],T=[0,0,0],O=[0,0,0],N=[0,0,0],H=1.25,k={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},V=0;V<3;++V){O[V]=S.length/b|0,o(.5*(M[0][V]+M[1][V]),L[V],D[V],12,H,k),N[V]=(S.length/b|0)-O[V],R[V]=S.length/b|0;for(var G=0;G<A[V].length;++G)A[V][G].text&&o(A[V][G].x,A[V][G].text,A[V][G].font||C,A[V][G].fontSize||12,H,k);T[V]=(S.length/b|0)-R[V]}this.buffer.update(S),this.tickOffset=R,this.tickCount=T,this.labelOffset=O,this.labelCount=N},E.drawTicks=function(M,L,D,A,C,S,o,R){this.tickCount[M]&&(this.shader.uniforms.axis=S,this.shader.uniforms.color=C,this.shader.uniforms.angle=D,this.shader.uniforms.scale=L,this.shader.uniforms.offset=A,this.shader.uniforms.alignDir=o,this.shader.uniforms.alignOpt=R,this.vao.draw(this.gl.TRIANGLES,this.tickCount[M],this.tickOffset[M]))},E.drawLabel=function(M,L,D,A,C,S,o,R){this.labelCount[M]&&(this.shader.uniforms.axis=S,this.shader.uniforms.color=C,this.shader.uniforms.angle=D,this.shader.uniforms.scale=L,this.shader.uniforms.offset=A,this.shader.uniforms.alignDir=o,this.shader.uniforms.alignOpt=R,this.vao.draw(this.gl.TRIANGLES,this.labelCount[M],this.labelOffset[M]))},E.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function l(M,L){try{return i(M,L)}catch(D){return console.warn('error vectorizing text:"'+M+'" error:',D),{cells:[],positions:[]}}}function m(M,L,D,A,C,S){var o=n(M),R=u(M,[{buffer:o,size:3}]),T=f(M);T.attributes.position.location=0;var O=new p(M,T,o,R);return O.update(L,D,A,C,S),O}},8468:function(v,y){y.create=n,y.equal=u;function r(i,f){var g=i+"",h=g.indexOf("."),b=0;h>=0&&(b=g.length-h-1);var p=Math.pow(10,b),E=Math.round(i*f*p),c=E+"";if(c.indexOf("e")>=0)return c;var l=E/p,m=E%p;E<0?(l=-Math.ceil(l)|0,m=-m|0):(l=Math.floor(l)|0,m=m|0);var M=""+l;if(E<0&&(M="-"+M),b){for(var L=""+m;L.length<b;)L="0"+L;return M+"."+L}else return M}function n(i,f){for(var g=[],h=0;h<3;++h){var b=[];.5*(i[0][h]+i[1][h]);for(var p=0;p*f[h]<=i[1][h];++p)b.push({x:p*f[h],text:r(f[h],p)});for(var p=-1;p*f[h]>=i[0][h];--p)b.push({x:p*f[h],text:r(f[h],p)});g.push(b)}return g}function u(i,f){for(var g=0;g<3;++g){if(i[g].length!==f[g].length)return!1;for(var h=0;h<i[g].length;++h){var b=i[g][h],p=f[g][h];if(b.x!==p.x||b.text!==p.text||b.font!==p.font||b.fontColor!==p.fontColor||b.fontSize!==p.fontSize||b.dx!==p.dx||b.dy!==p.dy)return!1}}return!0}},2771:function(v,y,r){v.exports=D;var n=r(5795),u=r(4670),i=r(2864),f=r(104),g=r(2142),h=r(6342),b=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),p=new Float32Array(16);function E(A,C,S){this.lo=A,this.hi=C,this.pixelsPerDataUnit=S}var c=[0,0,0,1],l=[0,0,0,1];function m(A,C,S,o,R){for(var T=0;T<3;++T){for(var O=c,N=l,H=0;H<3;++H)N[H]=O[H]=S[H];N[3]=O[3]=1,N[T]+=1,h(N,N,C),N[3]<0&&(A[T]=1/0),O[T]-=1,h(O,O,C),O[3]<0&&(A[T]=1/0);var k=(O[0]/O[3]-N[0]/N[3])*o,V=(O[1]/O[3]-N[1]/N[3])*R;A[T]=.25*Math.sqrt(k*k+V*V)}return A}var M=[new E(1/0,-1/0,1/0),new E(1/0,-1/0,1/0),new E(1/0,-1/0,1/0)],L=[0,0,0];function D(A,C,S,o,V){var T=C.model||b,O=C.view||b,N=C.projection||b,H=C._ortho||!1,k=A.bounds,V=V||i(T,O,N,k,H),G=V.axis;f(p,O,T),f(p,N,p);for(var U=M,Y=0;Y<3;++Y)U[Y].lo=1/0,U[Y].hi=-1/0,U[Y].pixelsPerDataUnit=1/0;var ee=n(g(p,p));g(p,p);for(var re=0;re<3;++re){var ie=(re+1)%3,se=(re+2)%3,ce=L;e:for(var Y=0;Y<2;++Y){var q=[];if(G[re]<0!=!!Y){ce[re]=k[Y][re];for(var j=0;j<2;++j){ce[ie]=k[j^Y][ie];for(var Z=0;Z<2;++Z)ce[se]=k[Z^j^Y][se],q.push(ce.slice())}for(var Q=H?5:4,j=Q;j===Q;++j){if(q.length===0)continue e;q=u.positive(q,ee[j])}for(var j=0;j<q.length;++j)for(var se=q[j],ue=m(L,p,se,S,o),Z=0;Z<3;++Z)U[Z].lo=Math.min(U[Z].lo,se[Z]),U[Z].hi=Math.max(U[Z].hi,se[Z]),Z!==re&&(U[Z].pixelsPerDataUnit=Math.min(U[Z].pixelsPerDataUnit,Math.abs(ue[Z])))}}}return U}},5827:function(v,y,r){var n=r(5306),u=r(7498),i=r(5050),f=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function g(l,m,M,L,D){this.gl=l,this.type=m,this.handle=M,this.length=L,this.usage=D}var h=g.prototype;h.bind=function(){this.gl.bindBuffer(this.type,this.handle)},h.unbind=function(){this.gl.bindBuffer(this.type,null)},h.dispose=function(){this.gl.deleteBuffer(this.handle)};function b(l,m,M,L,D,A){var C=D.length*D.BYTES_PER_ELEMENT;if(A<0)return l.bufferData(m,D,L),C;if(C+A>M)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return l.bufferSubData(m,A,D),M}function p(l,m){for(var M=n.malloc(l.length,m),L=l.length,D=0;D<L;++D)M[D]=l[D];return M}function E(l,m){for(var M=1,L=m.length-1;L>=0;--L){if(m[L]!==M)return!1;M*=l[L]}return!0}h.update=function(l,m){if(typeof m!="number"&&(m=-1),this.bind(),typeof l=="object"&&typeof l.shape<"u"){var M=l.dtype;if(f.indexOf(M)<0&&(M="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var L=gl.getExtension("OES_element_index_uint");L&&M!=="uint16"?M="uint32":M="uint16"}if(M===l.dtype&&E(l.shape,l.stride))l.offset===0&&l.data.length===l.shape[0]?this.length=b(this.gl,this.type,this.length,this.usage,l.data,m):this.length=b(this.gl,this.type,this.length,this.usage,l.data.subarray(l.offset,l.shape[0]),m);else{var D=n.malloc(l.size,M),A=i(D,l.shape);u.assign(A,l),m<0?this.length=b(this.gl,this.type,this.length,this.usage,D,m):this.length=b(this.gl,this.type,this.length,this.usage,D.subarray(0,l.size),m),n.free(D)}}else if(Array.isArray(l)){var C;this.type===this.gl.ELEMENT_ARRAY_BUFFER?C=p(l,"uint16"):C=p(l,"float32"),m<0?this.length=b(this.gl,this.type,this.length,this.usage,C,m):this.length=b(this.gl,this.type,this.length,this.usage,C.subarray(0,l.length),m),n.free(C)}else if(typeof l=="object"&&typeof l.length=="number")this.length=b(this.gl,this.type,this.length,this.usage,l,m);else if(typeof l=="number"||l===void 0){if(m>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");l=l|0,l<=0&&(l=1),this.gl.bufferData(this.type,l|0,this.usage),this.length=l}else throw new Error("gl-buffer: Invalid data type")};function c(l,m,M,L){if(M=M||l.ARRAY_BUFFER,L=L||l.DYNAMIC_DRAW,M!==l.ARRAY_BUFFER&&M!==l.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(L!==l.DYNAMIC_DRAW&&L!==l.STATIC_DRAW&&L!==l.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 D=l.createBuffer(),A=new g(l,M,D,0,L);return A.update(m),A}v.exports=c},1140:function(v,y,r){var n=r(2858);v.exports=function(i,f){var g=i.positions,h=i.vectors,b={positions:[],vertexIntensity:[],vertexIntensityBounds:i.vertexIntensityBounds,vectors:[],cells:[],coneOffset:i.coneOffset,colormap:i.colormap};if(i.positions.length===0)return f&&(f[0]=[0,0,0],f[1]=[0,0,0]),b;for(var p=0,E=1/0,c=-1/0,l=1/0,m=-1/0,M=1/0,L=-1/0,D=null,A=null,C=[],S=1/0,o=!1,R=0;R<g.length;R++){var T=g[R];E=Math.min(T[0],E),c=Math.max(T[0],c),l=Math.min(T[1],l),m=Math.max(T[1],m),M=Math.min(T[2],M),L=Math.max(T[2],L);var O=h[R];if(n.length(O)>p&&(p=n.length(O)),R){var N=2*n.distance(D,T)/(n.length(A)+n.length(O));N?(S=Math.min(S,N),o=!1):o=!0}o||(D=T,A=O),C.push(O)}var H=[E,l,M],k=[c,m,L];f&&(f[0]=H,f[1]=k),p===0&&(p=1);var V=1/p;isFinite(S)||(S=1),b.vectorScale=S;var G=i.coneSize||.5;i.absoluteConeSize&&(G=i.absoluteConeSize*V),b.coneScale=G;for(var R=0,U=0;R<g.length;R++)for(var T=g[R],Y=T[0],ee=T[1],re=T[2],ie=C[R],se=n.length(ie)*V,ce=0,q=8;ce<q;ce++){b.positions.push([Y,ee,re,U++]),b.positions.push([Y,ee,re,U++]),b.positions.push([Y,ee,re,U++]),b.positions.push([Y,ee,re,U++]),b.positions.push([Y,ee,re,U++]),b.positions.push([Y,ee,re,U++]),b.vectors.push(ie),b.vectors.push(ie),b.vectors.push(ie),b.vectors.push(ie),b.vectors.push(ie),b.vectors.push(ie),b.vertexIntensity.push(se,se,se),b.vertexIntensity.push(se,se,se);var j=b.positions.length;b.cells.push([j-6,j-5,j-4],[j-3,j-2,j-1])}return b};var u=r(7234);v.exports.createMesh=r(5028),v.exports.createConeMesh=function(i,f){return v.exports.createMesh(i,f,{shaders:u,traceType:"cone"})}},5028:function(v,y,r){var n=r(5158),u=r(5827),i=r(2944),f=r(8931),g=r(104),h=r(7437),b=r(5050),p=r(9156),E=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function c(C,S,o,R,T,O,N,H,k,V,G){this.gl=C,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=S,this.dirty=!0,this.triShader=o,this.pickShader=R,this.trianglePositions=T,this.triangleVectors=O,this.triangleColors=H,this.triangleUVs=k,this.triangleIds=N,this.triangleVAO=V,this.triangleCount=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.traceType=G,this.tubeScale=1,this.coneScale=2,this.vectorScale=1,this.coneOffset=.25,this._model=E,this._view=E,this._projection=E,this._resolution=[1,1]}var l=c.prototype;l.isOpaque=function(){return this.opacity>=1},l.isTransparent=function(){return this.opacity<1},l.pickSlots=1,l.setPickBase=function(C){this.pickId=C};function m(C){for(var S=p({colormap:C,nshades:256,format:"rgba"}),o=new Uint8Array(256*4),R=0;R<256;++R){for(var T=S[R],O=0;O<3;++O)o[4*R+O]=T[O];o[4*R+3]=T[3]*255}return b(o,[256,256,4],[4,0,1])}function M(C){for(var S=C.length,o=new Array(S),R=0;R<S;++R)o[R]=C[R][2];return o}l.update=function(C){C=C||{};var S=this.gl;this.dirty=!0,"lightPosition"in C&&(this.lightPosition=C.lightPosition),"opacity"in C&&(this.opacity=C.opacity),"ambient"in C&&(this.ambientLight=C.ambient),"diffuse"in C&&(this.diffuseLight=C.diffuse),"specular"in C&&(this.specularLight=C.specular),"roughness"in C&&(this.roughness=C.roughness),"fresnel"in C&&(this.fresnel=C.fresnel),C.tubeScale!==void 0&&(this.tubeScale=C.tubeScale),C.vectorScale!==void 0&&(this.vectorScale=C.vectorScale),C.coneScale!==void 0&&(this.coneScale=C.coneScale),C.coneOffset!==void 0&&(this.coneOffset=C.coneOffset),C.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=S.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=S.LINEAR,this.texture.setPixels(m(C.colormap)),this.texture.generateMipmap());var o=C.cells,R=C.positions,T=C.vectors;if(!R||!o||!T)return;var O=[],N=[],H=[],k=[],V=[];this.cells=o,this.positions=R,this.vectors=T;var G=C.meshColor||[1,1,1,1],U=C.vertexIntensity,Y=1/0,ee=-1/0;if(U)if(C.vertexIntensityBounds)Y=+C.vertexIntensityBounds[0],ee=+C.vertexIntensityBounds[1];else for(var re=0;re<U.length;++re){var ie=U[re];Y=Math.min(Y,ie),ee=Math.max(ee,ie)}else for(var re=0;re<R.length;++re){var ie=R[re][2];Y=Math.min(Y,ie),ee=Math.max(ee,ie)}U?this.intensity=U:this.intensity=M(R),this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var re=0;re<R.length;++re)for(var se=R[re],ce=0;ce<3;++ce)isNaN(se[ce])||!isFinite(se[ce])||(this.bounds[0][ce]=Math.min(this.bounds[0][ce],se[ce]),this.bounds[1][ce]=Math.max(this.bounds[1][ce],se[ce]));var q=0;e:for(var re=0;re<o.length;++re){var j=o[re];switch(j.length){case 3:for(var ce=0;ce<3;++ce)for(var Z=j[ce],se=R[Z],Q=0;Q<3;++Q)if(isNaN(se[Q])||!isFinite(se[Q]))continue e;for(var ce=0;ce<3;++ce){var Z=j[2-ce],se=R[Z];O.push(se[0],se[1],se[2],se[3]);var ue=T[Z];N.push(ue[0],ue[1],ue[2],ue[3]||0);var fe=G;fe.length===3?H.push(fe[0],fe[1],fe[2],1):H.push(fe[0],fe[1],fe[2],fe[3]);var te;U?te=[(U[Z]-Y)/(ee-Y),0]:te=[(se[2]-Y)/(ee-Y),0],k.push(te[0],te[1]),V.push(re)}q+=1;break}}this.triangleCount=q,this.trianglePositions.update(O),this.triangleVectors.update(N),this.triangleColors.update(H),this.triangleUVs.update(k),this.triangleIds.update(new Uint32Array(V))},l.drawTransparent=l.draw=function(C){C=C||{};for(var S=this.gl,o=C.model||E,R=C.view||E,T=C.projection||E,O=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],N=0;N<3;++N)O[0][N]=Math.max(O[0][N],this.clipBounds[0][N]),O[1][N]=Math.min(O[1][N],this.clipBounds[1][N]);var H={model:o,view:R,projection:T,inverseModel:E.slice(),clipBounds:O,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,texture:0};H.inverseModel=h(H.inverseModel,H.model),S.disable(S.CULL_FACE),this.texture.bind(0);var k=new Array(16);g(k,H.view,H.model),g(k,H.projection,k),h(k,k);for(var N=0;N<3;++N)H.eyePosition[N]=k[12+N]/k[15];for(var V=k[15],N=0;N<3;++N)V+=this.lightPosition[N]*k[4*N+3];for(var N=0;N<3;++N){for(var G=k[12+N],U=0;U<3;++U)G+=k[4*U+N]*this.lightPosition[U];H.lightPosition[N]=G/V}if(this.triangleCount>0){var Y=this.triShader;Y.bind(),Y.uniforms=H,this.triangleVAO.bind(),S.drawArrays(S.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},l.drawPick=function(C){C=C||{};for(var S=this.gl,o=C.model||E,R=C.view||E,T=C.projection||E,O=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],N=0;N<3;++N)O[0][N]=Math.max(O[0][N],this.clipBounds[0][N]),O[1][N]=Math.min(O[1][N],this.clipBounds[1][N]);this._model=[].slice.call(o),this._view=[].slice.call(R),this._projection=[].slice.call(T),this._resolution=[S.drawingBufferWidth,S.drawingBufferHeight];var H={model:o,view:R,projection:T,clipBounds:O,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},k=this.pickShader;k.bind(),k.uniforms=H,this.triangleCount>0&&(this.triangleVAO.bind(),S.drawArrays(S.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},l.pick=function(C){if(!C||C.id!==this.pickId)return null;var S=C.value[0]+256*C.value[1]+65536*C.value[2],o=this.cells[S],R=this.positions[o[1]].slice(0,3),T={position:R,dataCoordinate:R,index:Math.floor(o[1]/48)};return this.traceType==="cone"?T.index=Math.floor(o[1]/48):this.traceType==="streamtube"&&(T.intensity=this.intensity[o[1]],T.velocity=this.vectors[o[1]].slice(0,3),T.divergence=this.vectors[o[1]][3],T.index=S),T},l.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 L(C,S){var o=n(C,S.meshShader.vertex,S.meshShader.fragment,null,S.meshShader.attributes);return o.attributes.position.location=0,o.attributes.color.location=2,o.attributes.uv.location=3,o.attributes.vector.location=4,o}function D(C,S){var o=n(C,S.pickShader.vertex,S.pickShader.fragment,null,S.pickShader.attributes);return o.attributes.position.location=0,o.attributes.id.location=1,o.attributes.vector.location=4,o}function A(C,S,o){var R=o.shaders;arguments.length===1&&(S=C,C=S.gl);var T=L(C,R),O=D(C,R),N=f(C,b(new Uint8Array([255,255,255,255]),[1,1,4]));N.generateMipmap(),N.minFilter=C.LINEAR_MIPMAP_LINEAR,N.magFilter=C.LINEAR;var H=u(C),k=u(C),V=u(C),G=u(C),U=u(C),Y=i(C,[{buffer:H,type:C.FLOAT,size:4},{buffer:U,type:C.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:V,type:C.FLOAT,size:4},{buffer:G,type:C.FLOAT,size:2},{buffer:k,type:C.FLOAT,size:4}]),ee=new c(C,N,T,O,H,k,U,V,G,Y,o.traceType||"cone");return ee.update(S),ee}v.exports=A},7234:function(v,y,r){var n=r(6832),u=n([`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;
}
`]),i=n([`#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;
}
`]),f=n([`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;
}
`]),g=n([`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);
}`]);y.meshShader={vertex:u,fragment:i,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},y.pickShader={vertex:f,fragment:g,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},1950:function(v){v.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(v,y,r){var n=r(1950);v.exports=function(i){return n[i]}},3110:function(v,y,r){v.exports=c;var n=r(5827),u=r(2944),i=r(7667),f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function g(l,m,M,L){this.gl=l,this.shader=L,this.buffer=m,this.vao=M,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 h=g.prototype;h.isOpaque=function(){return!this.hasAlpha},h.isTransparent=function(){return this.hasAlpha},h.drawTransparent=h.draw=function(l){var m=this.gl,M=this.shader.uniforms;this.shader.bind();var L=M.view=l.view||f,D=M.projection=l.projection||f;M.model=l.model||f,M.clipBounds=this.clipBounds,M.opacity=this.opacity;var A=L[12],C=L[13],S=L[14],o=L[15],R=l._ortho||!1,T=R?2:1,O=T*this.pixelRatio*(D[3]*A+D[7]*C+D[11]*S+D[15]*o)/m.drawingBufferHeight;this.vao.bind();for(var N=0;N<3;++N)m.lineWidth(this.lineWidth[N]*this.pixelRatio),M.capSize=this.capSize[N]*O,this.lineCount[N]&&m.drawArrays(m.LINES,this.lineOffset[N],this.lineCount[N]);this.vao.unbind()};function b(l,m){for(var M=0;M<3;++M)l[0][M]=Math.min(l[0][M],m[M]),l[1][M]=Math.max(l[1][M],m[M])}var p=function(){for(var l=new Array(3),m=0;m<3;++m){for(var M=[],L=1;L<=2;++L)for(var D=-1;D<=1;D+=2){var A=(L+m)%3,C=[0,0,0];C[A]=D,M.push(C)}l[m]=M}return l}();function E(l,m,M,L){for(var D=p[L],A=0;A<D.length;++A){var C=D[A];l.push(m[0],m[1],m[2],M[0],M[1],M[2],M[3],C[0],C[1],C[2])}return D.length}h.update=function(l){l=l||{},"lineWidth"in l&&(this.lineWidth=l.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in l&&(this.capSize=l.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),this.hasAlpha=!1,"opacity"in l&&(this.opacity=+l.opacity,this.opacity<1&&(this.hasAlpha=!0));var m=l.color||[[0,0,0],[0,0,0],[0,0,0]],M=l.position,L=l.error;if(Array.isArray(m[0])||(m=[m,m,m]),M&&L){var D=[],A=M.length,C=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var S=0;S<3;++S){this.lineOffset[S]=C;e:for(var o=0;o<A;++o){for(var R=M[o],T=0;T<3;++T)if(isNaN(R[T])||!isFinite(R[T]))continue e;var O=L[o],N=m[S];if(Array.isArray(N[0])&&(N=m[o]),N.length===3?N=[N[0],N[1],N[2],1]:N.length===4&&(N=[N[0],N[1],N[2],N[3]],!this.hasAlpha&&N[3]<1&&(this.hasAlpha=!0)),!(isNaN(O[0][S])||isNaN(O[1][S]))){if(O[0][S]<0){var H=R.slice();H[S]+=O[0][S],D.push(R[0],R[1],R[2],N[0],N[1],N[2],N[3],0,0,0,H[0],H[1],H[2],N[0],N[1],N[2],N[3],0,0,0),b(this.bounds,H),C+=2+E(D,H,N,S)}if(O[1][S]>0){var H=R.slice();H[S]+=O[1][S],D.push(R[0],R[1],R[2],N[0],N[1],N[2],N[3],0,0,0,H[0],H[1],H[2],N[0],N[1],N[2],N[3],0,0,0),b(this.bounds,H),C+=2+E(D,H,N,S)}}}this.lineCount[S]=C-this.lineOffset[S]}this.buffer.update(D)}},h.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function c(l){var m=l.gl,M=n(m),L=u(m,[{buffer:M,type:m.FLOAT,size:3,offset:0,stride:40},{buffer:M,type:m.FLOAT,size:4,offset:12,stride:40},{buffer:M,type:m.FLOAT,size:3,offset:28,stride:40}]),D=i(m);D.attributes.position.location=0,D.attributes.color.location=1,D.attributes.offset.location=2;var A=new g(m,M,L,D);return A.update(l),A}},7667:function(v,y,r){var n=r(6832),u=r(5158),i=n([`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;
}`]),f=n([`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;
}`]);v.exports=function(g){return u(g,i,f,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},4234:function(v,y,r){var n=r(8931);v.exports=C;var u=null,i,f,g,h;function b(S){var o=S.getParameter(S.FRAMEBUFFER_BINDING),R=S.getParameter(S.RENDERBUFFER_BINDING),T=S.getParameter(S.TEXTURE_BINDING_2D);return[o,R,T]}function p(S,o){S.bindFramebuffer(S.FRAMEBUFFER,o[0]),S.bindRenderbuffer(S.RENDERBUFFER,o[1]),S.bindTexture(S.TEXTURE_2D,o[2])}function E(S,o){var R=S.getParameter(o.MAX_COLOR_ATTACHMENTS_WEBGL);u=new Array(R+1);for(var T=0;T<=R;++T){for(var O=new Array(R),N=0;N<T;++N)O[N]=S.COLOR_ATTACHMENT0+N;for(var N=T;N<R;++N)O[N]=S.NONE;u[T]=O}}function c(S){switch(S){case i:throw new Error("gl-fbo: Framebuffer unsupported");case f:throw new Error("gl-fbo: Framebuffer incomplete attachment");case g:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case h:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function l(S,o,R,T,O,N){if(!T)return null;var H=n(S,o,R,O,T);return H.magFilter=S.NEAREST,H.minFilter=S.NEAREST,H.mipSamples=1,H.bind(),S.framebufferTexture2D(S.FRAMEBUFFER,N,S.TEXTURE_2D,H.handle,0),H}function m(S,o,R,T,O){var N=S.createRenderbuffer();return S.bindRenderbuffer(S.RENDERBUFFER,N),S.renderbufferStorage(S.RENDERBUFFER,T,o,R),S.framebufferRenderbuffer(S.FRAMEBUFFER,O,S.RENDERBUFFER,N),N}function M(S){var o=b(S.gl),R=S.gl,T=S.handle=R.createFramebuffer(),O=S._shape[0],N=S._shape[1],H=S.color.length,k=S._ext,V=S._useStencil,G=S._useDepth,U=S._colorType;R.bindFramebuffer(R.FRAMEBUFFER,T);for(var Y=0;Y<H;++Y)S.color[Y]=l(R,O,N,U,R.RGBA,R.COLOR_ATTACHMENT0+Y);H===0?(S._color_rb=m(R,O,N,R.RGBA4,R.COLOR_ATTACHMENT0),k&&k.drawBuffersWEBGL(u[0])):H>1&&k.drawBuffersWEBGL(u[H]);var ee=R.getExtension("WEBGL_depth_texture");ee?V?S.depth=l(R,O,N,ee.UNSIGNED_INT_24_8_WEBGL,R.DEPTH_STENCIL,R.DEPTH_STENCIL_ATTACHMENT):G&&(S.depth=l(R,O,N,R.UNSIGNED_SHORT,R.DEPTH_COMPONENT,R.DEPTH_ATTACHMENT)):G&&V?S._depth_rb=m(R,O,N,R.DEPTH_STENCIL,R.DEPTH_STENCIL_ATTACHMENT):G?S._depth_rb=m(R,O,N,R.DEPTH_COMPONENT16,R.DEPTH_ATTACHMENT):V&&(S._depth_rb=m(R,O,N,R.STENCIL_INDEX,R.STENCIL_ATTACHMENT));var re=R.checkFramebufferStatus(R.FRAMEBUFFER);if(re!==R.FRAMEBUFFER_COMPLETE){S._destroyed=!0,R.bindFramebuffer(R.FRAMEBUFFER,null),R.deleteFramebuffer(S.handle),S.handle=null,S.depth&&(S.depth.dispose(),S.depth=null),S._depth_rb&&(R.deleteRenderbuffer(S._depth_rb),S._depth_rb=null);for(var Y=0;Y<S.color.length;++Y)S.color[Y].dispose(),S.color[Y]=null;S._color_rb&&(R.deleteRenderbuffer(S._color_rb),S._color_rb=null),p(R,o),c(re)}p(R,o)}function L(S,o,R,T,O,N,H,k){this.gl=S,this._shape=[o|0,R|0],this._destroyed=!1,this._ext=k,this.color=new Array(O);for(var V=0;V<O;++V)this.color[V]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=T,this._useDepth=N,this._useStencil=H;var G=this,U=[o|0,R|0];Object.defineProperties(U,{0:{get:function(){return G._shape[0]},set:function(Y){return G.width=Y}},1:{get:function(){return G._shape[1]},set:function(Y){return G.height=Y}}}),this._shapeVector=U,M(this)}var D=L.prototype;function A(S,o,R){if(S._destroyed)throw new Error("gl-fbo: Can't resize destroyed FBO");if(!(S._shape[0]===o&&S._shape[1]===R)){var T=S.gl,O=T.getParameter(T.MAX_RENDERBUFFER_SIZE);if(o<0||o>O||R<0||R>O)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");S._shape[0]=o,S._shape[1]=R;for(var N=b(T),H=0;H<S.color.length;++H)S.color[H].shape=S._shape;S._color_rb&&(T.bindRenderbuffer(T.RENDERBUFFER,S._color_rb),T.renderbufferStorage(T.RENDERBUFFER,T.RGBA4,S._shape[0],S._shape[1])),S.depth&&(S.depth.shape=S._shape),S._depth_rb&&(T.bindRenderbuffer(T.RENDERBUFFER,S._depth_rb),S._useDepth&&S._useStencil?T.renderbufferStorage(T.RENDERBUFFER,T.DEPTH_STENCIL,S._shape[0],S._shape[1]):S._useDepth?T.renderbufferStorage(T.RENDERBUFFER,T.DEPTH_COMPONENT16,S._shape[0],S._shape[1]):S._useStencil&&T.renderbufferStorage(T.RENDERBUFFER,T.STENCIL_INDEX,S._shape[0],S._shape[1])),T.bindFramebuffer(T.FRAMEBUFFER,S.handle);var k=T.checkFramebufferStatus(T.FRAMEBUFFER);k!==T.FRAMEBUFFER_COMPLETE&&(S.dispose(),p(T,N),c(k)),p(T,N)}}Object.defineProperties(D,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(S){if(Array.isArray(S)||(S=[S|0,S|0]),S.length!==2)throw new Error("gl-fbo: Shape vector must be length 2");var o=S[0]|0,R=S[1]|0;return A(this,o,R),[o,R]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(S){return S=S|0,A(this,S,this._shape[1]),S},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(S){return S=S|0,A(this,this._shape[0],S),S},enumerable:!1}}),D.bind=function(){if(!this._destroyed){var S=this.gl;S.bindFramebuffer(S.FRAMEBUFFER,this.handle),S.viewport(0,0,this._shape[0],this._shape[1])}},D.dispose=function(){if(!this._destroyed){this._destroyed=!0;var S=this.gl;S.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(S.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var o=0;o<this.color.length;++o)this.color[o].dispose(),this.color[o]=null;this._color_rb&&(S.deleteRenderbuffer(this._color_rb),this._color_rb=null)}};function C(S,o,R,T){i||(i=S.FRAMEBUFFER_UNSUPPORTED,f=S.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,g=S.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,h=S.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var O=S.getExtension("WEBGL_draw_buffers");if(!u&&O&&E(S,O),Array.isArray(o)&&(T=R,R=o[1]|0,o=o[0]|0),typeof o!="number")throw new Error("gl-fbo: Missing shape parameter");var N=S.getParameter(S.MAX_RENDERBUFFER_SIZE);if(o<0||o>N||R<0||R>N)throw new Error("gl-fbo: Parameters are too large for FBO");T=T||{};var H=1;if("color"in T){if(H=Math.max(T.color|0,0),H<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(H>1)if(O){if(H>S.getParameter(O.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+H+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var k=S.UNSIGNED_BYTE,V=S.getExtension("OES_texture_float");if(T.float&&H>0){if(!V)throw new Error("gl-fbo: Context does not support floating point textures");k=S.FLOAT}else T.preferFloat&&H>0&&V&&(k=S.FLOAT);var G=!0;"depth"in T&&(G=!!T.depth);var U=!1;return"stencil"in T&&(U=!!T.stencil),new L(S,o,R,k,H,G,U,O)}},3530:function(v,y,r){var n=r(8974).sprintf,u=r(6603),i=r(9365),f=r(8008);v.exports=g;function g(h,b,p){var E=i(b)||"of unknown name (see npm glsl-shader-name)",c="unknown type";p!==void 0&&(c=p===u.FRAGMENT_SHADER?"fragment":"vertex");for(var l=n(`Error compiling %s shader %s:
`,c,E),m=n("%s%s",l,h),M=h.split(`
`),L={},D=0;D<M.length;D++){var A=M[D];if(!(A===""||A==="\0")){var C=parseInt(A.split(":")[2]);if(isNaN(C))throw new Error(n("Could not parse error: %s",A));L[C]=A}}for(var S=f(b).split(`
`),D=0;D<S.length;D++)if(!(!L[D+3]&&!L[D+2]&&!L[D+1])){var o=S[D];if(l+=o+`
`,L[D+1]){var R=L[D+1];R=R.substr(R.split(":",3).join(":").length+1).trim(),l+=n(`^^^ %s
`,R)}}return{long:l.trim(),short:m.trim()}}},6386:function(v,y,r){v.exports=c;var n=r(5070),u=r(9560),i=r(5306),f=r(5158),g=r(5827),h=r(1292);function b(l,m,M,L,D,A,C){this.plot=l,this.shader=m,this.pickShader=M,this.positionBuffer=L,this.weightBuffer=D,this.colorBuffer=A,this.idBuffer=C,this.xData=[],this.yData=[],this.shape=[0,0],this.bounds=[1/0,1/0,-1/0,-1/0],this.pickOffset=0}var p=b.prototype,E=[0,0,1,0,0,1,1,0,1,1,0,1];p.draw=function(){var l=[1,0,0,0,1,0,0,0,1];return function(){var m=this.plot,M=this.shader,L=this.bounds,D=this.numVertices;if(!(D<=0)){var A=m.gl,C=m.dataBox,S=L[2]-L[0],o=L[3]-L[1],R=C[2]-C[0],T=C[3]-C[1];l[0]=2*S/R,l[4]=2*o/T,l[6]=2*(L[0]-C[0])/R-1,l[7]=2*(L[1]-C[1])/T-1,M.bind();var O=M.uniforms;O.viewTransform=l,O.shape=this.shape;var N=M.attributes;this.positionBuffer.bind(),N.position.pointer(),this.weightBuffer.bind(),N.weight.pointer(A.UNSIGNED_BYTE,!1),this.colorBuffer.bind(),N.color.pointer(A.UNSIGNED_BYTE,!0),A.drawArrays(A.TRIANGLES,0,D)}}}(),p.drawPick=function(){var l=[1,0,0,0,1,0,0,0,1],m=[0,0,0,0];return function(M){var L=this.plot,D=this.pickShader,A=this.bounds,C=this.numVertices;if(!(C<=0)){var S=L.gl,o=L.dataBox,R=A[2]-A[0],T=A[3]-A[1],O=o[2]-o[0],N=o[3]-o[1];l[0]=2*R/O,l[4]=2*T/N,l[6]=2*(A[0]-o[0])/O-1,l[7]=2*(A[1]-o[1])/N-1;for(var H=0;H<4;++H)m[H]=M>>H*8&255;this.pickOffset=M,D.bind();var k=D.uniforms;k.viewTransform=l,k.pickOffset=m,k.shape=this.shape;var V=D.attributes;return this.positionBuffer.bind(),V.position.pointer(),this.weightBuffer.bind(),V.weight.pointer(S.UNSIGNED_BYTE,!1),this.idBuffer.bind(),V.pickId.pointer(S.UNSIGNED_BYTE,!1),S.drawArrays(S.TRIANGLES,0,C),M+this.shape[0]*this.shape[1]}}}(),p.pick=function(l,m,M){var L=this.pickOffset,D=this.shape[0]*this.shape[1];if(M<L||M>=L+D)return null;var A=M-L,C=this.xData,S=this.yData;return{object:this,pointId:A,dataCoord:[C[A%this.shape[0]],S[A/this.shape[0]|0]]}},p.update=function(l){l=l||{};var m=l.shape||[0,0],M=l.x||u(m[0]),L=l.y||u(m[1]),D=l.z||new Float32Array(m[0]*m[1]),A=l.zsmooth!==!1;this.xData=M,this.yData=L;var C=l.colorLevels||[0],S=l.colorValues||[0,0,0,1],o=C.length,R=this.bounds,T,O,N,H;A?(T=R[0]=M[0],O=R[1]=L[0],N=R[2]=M[M.length-1],H=R[3]=L[L.length-1]):(T=R[0]=M[0]+(M[1]-M[0])/2,O=R[1]=L[0]+(L[1]-L[0])/2,N=R[2]=M[M.length-1]+(M[M.length-1]-M[M.length-2])/2,H=R[3]=L[L.length-1]+(L[L.length-1]-L[L.length-2])/2);var k=1/(N-T),V=1/(H-O),G=m[0],U=m[1];this.shape=[G,U];var Y=(A?(G-1)*(U-1):G*U)*(E.length>>>1);this.numVertices=Y;for(var ee=i.mallocUint8(Y*4),re=i.mallocFloat32(Y*2),ie=i.mallocUint8(Y*2),se=i.mallocUint32(Y),ce=0,q=A?G-1:G,j=A?U-1:U,Z=0;Z<j;++Z){var Q,ue;A?(Q=V*(L[Z]-O),ue=V*(L[Z+1]-O)):(Q=Z<U-1?V*(L[Z]-(L[Z+1]-L[Z])/2-O):V*(L[Z]-(L[Z]-L[Z-1])/2-O),ue=Z<U-1?V*(L[Z]+(L[Z+1]-L[Z])/2-O):V*(L[Z]+(L[Z]-L[Z-1])/2-O));for(var fe=0;fe<q;++fe){var te,ne;A?(te=k*(M[fe]-T),ne=k*(M[fe+1]-T)):(te=fe<G-1?k*(M[fe]-(M[fe+1]-M[fe])/2-T):k*(M[fe]-(M[fe]-M[fe-1])/2-T),ne=fe<G-1?k*(M[fe]+(M[fe+1]-M[fe])/2-T):k*(M[fe]+(M[fe]-M[fe-1])/2-T));for(var ve=0;ve<E.length;ve+=2){var le=E[ve],xe=E[ve+1],Se=A?(Z+xe)*G+(fe+le):Z*G+fe,Re=D[Se],Ee=n.le(C,Re),Oe,Be,Le,Te;if(Ee<0)Oe=S[0],Be=S[1],Le=S[2],Te=S[3];else if(Ee===o-1)Oe=S[4*o-4],Be=S[4*o-3],Le=S[4*o-2],Te=S[4*o-1];else{var De=(Re-C[Ee])/(C[Ee+1]-C[Ee]),Ve=1-De,Ye=4*Ee,Ne=4*(Ee+1);Oe=Ve*S[Ye]+De*S[Ne],Be=Ve*S[Ye+1]+De*S[Ne+1],Le=Ve*S[Ye+2]+De*S[Ne+2],Te=Ve*S[Ye+3]+De*S[Ne+3]}ee[4*ce]=255*Oe,ee[4*ce+1]=255*Be,ee[4*ce+2]=255*Le,ee[4*ce+3]=255*Te,re[2*ce]=te*.5+ne*.5,re[2*ce+1]=Q*.5+ue*.5,ie[2*ce]=le,ie[2*ce+1]=xe,se[ce]=Z*G+fe,ce+=1}}}this.positionBuffer.update(re),this.weightBuffer.update(ie),this.colorBuffer.update(ee),this.idBuffer.update(se),i.free(re),i.free(ee),i.free(ie),i.free(se)},p.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.positionBuffer.dispose(),this.weightBuffer.dispose(),this.colorBuffer.dispose(),this.idBuffer.dispose(),this.plot.removeObject(this)};function c(l,m){var M=l.gl,L=f(M,h.vertex,h.fragment),D=f(M,h.pickVertex,h.pickFragment),A=g(M),C=g(M),S=g(M),o=g(M),R=new b(l,L,D,A,C,S,o);return R.update(m),l.addObject(R),R}},1292:function(v,y,r){var n=r(6832);v.exports={fragment:n([`precision lowp float;
#define GLSLIFY 1
varying vec4 fragColor;
void main() {
gl_FragColor = vec4(fragColor.rgb * fragColor.a, fragColor.a);
}
`]),vertex:n([`precision mediump float;
#define GLSLIFY 1
attribute vec2 position;
attribute vec4 color;
attribute vec2 weight;
uniform vec2 shape;
uniform mat3 viewTransform;
varying vec4 fragColor;
void main() {
vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);
fragColor = color;
gl_Position = vec4(vPosition.xy, 0, vPosition.z);
}
`]),pickFragment:n([`precision mediump float;
#define GLSLIFY 1
varying vec4 fragId;
varying vec2 vWeight;
uniform vec2 shape;
uniform vec4 pickOffset;
void main() {
vec2 d = step(.5, vWeight);
vec4 id = fragId + pickOffset;
id.x += d.x + d.y*shape.x;
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;
gl_FragColor = id/255.;
}
`]),pickVertex:n([`precision mediump float;
#define GLSLIFY 1
attribute vec2 position;
attribute vec4 pickId;
attribute vec2 weight;
uniform vec2 shape;
uniform mat3 viewTransform;
varying vec4 fragId;
varying vec2 vWeight;
void main() {
vWeight = weight;
fragId = pickId;
vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);
gl_Position = vec4(vPosition.xy, 0, vPosition.z);
}
`])}},248:function(v,y,r){var n=r(6832),u=r(5158),i=n([`precision highp float;
#define GLSLIFY 1
attribute vec3 position, nextPosition;
attribute float arcLength, lineWidth;
attribute vec4 color;
uniform vec2 screenShape;
uniform float pixelRatio;
uniform mat4 model, view, projection;
varying vec4 fragColor;
varying vec3 worldPosition;
varying float pixelArcLength;
vec4 project(vec3 p) {
return projection * view * model * vec4(p, 1.0);
}
void main() {
vec4 startPoint = project(position);
vec4 endPoint = project(nextPosition);
vec2 A = startPoint.xy / startPoint.w;
vec2 B = endPoint.xy / endPoint.w;
float clipAngle = atan(
(B.y - A.y) * screenShape.y,
(B.x - A.x) * screenShape.x
);
vec2 offset = 0.5 * pixelRatio * lineWidth * vec2(
sin(clipAngle),
-cos(clipAngle)
) / screenShape;
gl_Position = vec4(startPoint.xy + startPoint.w * offset, startPoint.zw);
worldPosition = position;
pixelArcLength = arcLength;
fragColor = color;
}
`]),f=n([`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 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;
}
`]),g=n([`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);
}`]),h=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];y.createShader=function(b){return u(b,i,f,null,h)},y.createPickShader=function(b){return u(b,i,g,null,h)}},6086:function(v,y,r){v.exports=S;var n=r(5827),u=r(2944),i=r(8931),f=new Uint8Array(4),g=new Float32Array(f.buffer);function h(o,R,T,O){return f[0]=O,f[1]=T,f[2]=R,f[3]=o,g[0]}var b=r(5070),p=r(5050),E=r(248),c=E.createShader,l=E.createPickShader,m=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function M(o,R){for(var T=0,O=0;O<3;++O){var N=o[O]-R[O];T+=N*N}return Math.sqrt(T)}function L(o){for(var R=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],T=0;T<3;++T)R[0][T]=Math.max(o[0][T],R[0][T]),R[1][T]=Math.min(o[1][T],R[1][T]);return R}function D(o,R,T,O){this.arcLength=o,this.position=R,this.index=T,this.dataCoordinate=O}function A(o,R,T,O,N,H){this.gl=o,this.shader=R,this.pickShader=T,this.buffer=O,this.vao=N,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=H,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var C=A.prototype;C.isTransparent=function(){return this.hasAlpha},C.isOpaque=function(){return!this.hasAlpha},C.pickSlots=1,C.setPickBase=function(o){this.pickId=o},C.drawTransparent=C.draw=function(o){if(this.vertexCount){var R=this.gl,T=this.shader,O=this.vao;T.bind(),T.uniforms={model:o.model||m,view:o.view||m,projection:o.projection||m,clipBounds:L(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[R.drawingBufferWidth,R.drawingBufferHeight],pixelRatio:this.pixelRatio},O.bind(),O.draw(R.TRIANGLE_STRIP,this.vertexCount),O.unbind()}},C.drawPick=function(o){if(this.vertexCount){var R=this.gl,T=this.pickShader,O=this.vao;T.bind(),T.uniforms={model:o.model||m,view:o.view||m,projection:o.projection||m,pickId:this.pickId,clipBounds:L(this.clipBounds),screenShape:[R.drawingBufferWidth,R.drawingBufferHeight],pixelRatio:this.pixelRatio},O.bind(),O.draw(R.TRIANGLE_STRIP,this.vertexCount),O.unbind()}},C.update=function(o){var R,T;this.dirty=!0;var O=!!o.connectGaps;"dashScale"in o&&(this.dashScale=o.dashScale),this.hasAlpha=!1,"opacity"in o&&(this.opacity=+o.opacity,this.opacity<1&&(this.hasAlpha=!0));var N=[],H=[],k=[],V=0,G=0,U=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],Y=o.position||o.positions;if(Y){var ee=o.color||o.colors||[0,0,0,1],re=o.lineWidth||1,ie=!1;e:for(R=1;R<Y.length;++R){var se=Y[R-1],ce=Y[R];for(H.push(V),k.push(se.slice()),T=0;T<3;++T){if(isNaN(se[T])||isNaN(ce[T])||!isFinite(se[T])||!isFinite(ce[T])){if(!O&&N.length>0){for(var q=0;q<24;++q)N.push(N[N.length-12]);G+=2,ie=!0}continue e}U[0][T]=Math.min(U[0][T],se[T],ce[T]),U[1][T]=Math.max(U[1][T],se[T],ce[T])}var j,Z;Array.isArray(ee[0])?(j=ee.length>R-1?ee[R-1]:ee.length>0?ee[ee.length-1]:[0,0,0,1],Z=ee.length>R?ee[R]:ee.length>0?ee[ee.length-1]:[0,0,0,1]):j=Z=ee,j.length===3&&(j=[j[0],j[1],j[2],1]),Z.length===3&&(Z=[Z[0],Z[1],Z[2],1]),!this.hasAlpha&&j[3]<1&&(this.hasAlpha=!0);var Q;Array.isArray(re)?Q=re.length>R-1?re[R-1]:re.length>0?re[re.length-1]:[0,0,0,1]:Q=re;var ue=V;if(V+=M(se,ce),ie){for(T=0;T<2;++T)N.push(se[0],se[1],se[2],ce[0],ce[1],ce[2],ue,Q,j[0],j[1],j[2],j[3]);G+=2,ie=!1}N.push(se[0],se[1],se[2],ce[0],ce[1],ce[2],ue,Q,j[0],j[1],j[2],j[3],se[0],se[1],se[2],ce[0],ce[1],ce[2],ue,-Q,j[0],j[1],j[2],j[3],ce[0],ce[1],ce[2],se[0],se[1],se[2],V,-Q,Z[0],Z[1],Z[2],Z[3],ce[0],ce[1],ce[2],se[0],se[1],se[2],V,Q,Z[0],Z[1],Z[2],Z[3]),G+=4}}if(this.buffer.update(N),H.push(V),k.push(Y[Y.length-1].slice()),this.bounds=U,this.vertexCount=G,this.points=k,this.arcLength=H,"dashes"in o){var fe=o.dashes,te=fe.slice();for(te.unshift(0),R=1;R<te.length;++R)te[R]=te[R-1]+te[R];var ne=p(new Array(256*4),[256,1,4]);for(R=0;R<256;++R){for(T=0;T<4;++T)ne.set(R,0,T,0);b.le(te,te[te.length-1]*R/255)&1?ne.set(R,0,0,0):ne.set(R,0,0,255)}this.texture.setPixels(ne)}},C.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},C.pick=function(o){if(!o||o.id!==this.pickId)return null;var R=h(o.value[0],o.value[1],o.value[2],0),T=b.le(this.arcLength,R);if(T<0)return null;if(T===this.arcLength.length-1)return new D(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),T);for(var O=this.points[T],N=this.points[Math.min(T+1,this.points.length-1)],H=(R-this.arcLength[T])/(this.arcLength[T+1]-this.arcLength[T]),k=1-H,V=[0,0,0],G=0;G<3;++G)V[G]=k*O[G]+H*N[G];var U=Math.min(H<.5?T:T+1,this.points.length-1);return new D(R,V,U,this.points[U])};function S(o){var R=o.gl||o.scene&&o.scene.gl,T=c(R);T.attributes.position.location=0,T.attributes.nextPosition.location=1,T.attributes.arcLength.location=2,T.attributes.lineWidth.location=3,T.attributes.color.location=4;var O=l(R);O.attributes.position.location=0,O.attributes.nextPosition.location=1,O.attributes.arcLength.location=2,O.attributes.lineWidth.location=3,O.attributes.color.location=4;for(var N=n(R),H=u(R,[{buffer:N,size:3,offset:0,stride:48},{buffer:N,size:3,offset:12,stride:48},{buffer:N,size:1,offset:24,stride:48},{buffer:N,size:1,offset:28,stride:48},{buffer:N,size:4,offset:32,stride:48}]),k=p(new Array(256*4),[256,1,4]),V=0;V<1024;++V)k.data[V]=255;var G=i(R,k);G.wrap=R.REPEAT;var U=new A(R,T,O,N,H,G);return U.update(o),U}},7332:function(v){v.exports=y;function y(r){var n=new Float32Array(16);return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],n[9]=r[9],n[10]=r[10],n[11]=r[11],n[12]=r[12],n[13]=r[13],n[14]=r[14],n[15]=r[15],n}},9823:function(v){v.exports=y;function y(){var r=new Float32Array(16);return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7787:function(v){v.exports=y;function y(r){var n=r[0],u=r[1],i=r[2],f=r[3],g=r[4],h=r[5],b=r[6],p=r[7],E=r[8],c=r[9],l=r[10],m=r[11],M=r[12],L=r[13],D=r[14],A=r[15],C=n*h-u*g,S=n*b-i*g,o=n*p-f*g,R=u*b-i*h,T=u*p-f*h,O=i*p-f*b,N=E*L-c*M,H=E*D-l*M,k=E*A-m*M,V=c*D-l*L,G=c*A-m*L,U=l*A-m*D;return C*U-S*G+o*V+R*k-T*H+O*N}},5950:function(v){v.exports=y;function y(r,n){var u=n[0],i=n[1],f=n[2],g=n[3],h=u+u,b=i+i,p=f+f,E=u*h,c=i*h,l=i*b,m=f*h,M=f*b,L=f*p,D=g*h,A=g*b,C=g*p;return r[0]=1-l-L,r[1]=c+C,r[2]=m-A,r[3]=0,r[4]=c-C,r[5]=1-E-L,r[6]=M+D,r[7]=0,r[8]=m+A,r[9]=M-D,r[10]=1-E-l,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7280:function(v){v.exports=y;function y(r,n,u){var i=n[0],f=n[1],g=n[2],h=n[3],b=i+i,p=f+f,E=g+g,c=i*b,l=i*p,m=i*E,M=f*p,L=f*E,D=g*E,A=h*b,C=h*p,S=h*E;return r[0]=1-(M+D),r[1]=l+S,r[2]=m-C,r[3]=0,r[4]=l-S,r[5]=1-(c+D),r[6]=L+A,r[7]=0,r[8]=m+C,r[9]=L-A,r[10]=1-(c+M),r[11]=0,r[12]=u[0],r[13]=u[1],r[14]=u[2],r[15]=1,r}},9947:function(v){v.exports=y;function y(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7437:function(v){v.exports=y;function y(r,n){var u=n[0],i=n[1],f=n[2],g=n[3],h=n[4],b=n[5],p=n[6],E=n[7],c=n[8],l=n[9],m=n[10],M=n[11],L=n[12],D=n[13],A=n[14],C=n[15],S=u*b-i*h,o=u*p-f*h,R=u*E-g*h,T=i*p-f*b,O=i*E-g*b,N=f*E-g*p,H=c*D-l*L,k=c*A-m*L,V=c*C-M*L,G=l*A-m*D,U=l*C-M*D,Y=m*C-M*A,ee=S*Y-o*U+R*G+T*V-O*k+N*H;return ee?(ee=1/ee,r[0]=(b*Y-p*U+E*G)*ee,r[1]=(f*U-i*Y-g*G)*ee,r[2]=(D*N-A*O+C*T)*ee,r[3]=(m*O-l*N-M*T)*ee,r[4]=(p*V-h*Y-E*k)*ee,r[5]=(u*Y-f*V+g*k)*ee,r[6]=(A*R-L*N-C*o)*ee,r[7]=(c*N-m*R+M*o)*ee,r[8]=(h*U-b*V+E*H)*ee,r[9]=(i*V-u*U-g*H)*ee,r[10]=(L*O-D*R+C*S)*ee,r[11]=(l*R-c*O-M*S)*ee,r[12]=(b*k-h*G-p*H)*ee,r[13]=(u*G-i*k+f*H)*ee,r[14]=(D*o-L*T-A*S)*ee,r[15]=(c*T-l*o+m*S)*ee,r):null}},3012:function(v,y,r){var n=r(9947);v.exports=u;function u(i,f,g,h){var b,p,E,c,l,m,M,L,D,A,C=f[0],S=f[1],o=f[2],R=h[0],T=h[1],O=h[2],N=g[0],H=g[1],k=g[2];return Math.abs(C-N)<1e-6&&Math.abs(S-H)<1e-6&&Math.abs(o-k)<1e-6?n(i):(M=C-N,L=S-H,D=o-k,A=1/Math.sqrt(M*M+L*L+D*D),M*=A,L*=A,D*=A,b=T*D-O*L,p=O*M-R*D,E=R*L-T*M,A=Math.sqrt(b*b+p*p+E*E),A?(A=1/A,b*=A,p*=A,E*=A):(b=0,p=0,E=0),c=L*E-D*p,l=D*b-M*E,m=M*p-L*b,A=Math.sqrt(c*c+l*l+m*m),A?(A=1/A,c*=A,l*=A,m*=A):(c=0,l=0,m=0),i[0]=b,i[1]=c,i[2]=M,i[3]=0,i[4]=p,i[5]=l,i[6]=L,i[7]=0,i[8]=E,i[9]=m,i[10]=D,i[11]=0,i[12]=-(b*C+p*S+E*o),i[13]=-(c*C+l*S+m*o),i[14]=-(M*C+L*S+D*o),i[15]=1,i)}},104:function(v){v.exports=y;function y(r,n,u){var i=n[0],f=n[1],g=n[2],h=n[3],b=n[4],p=n[5],E=n[6],c=n[7],l=n[8],m=n[9],M=n[10],L=n[11],D=n[12],A=n[13],C=n[14],S=n[15],o=u[0],R=u[1],T=u[2],O=u[3];return r[0]=o*i+R*b+T*l+O*D,r[1]=o*f+R*p+T*m+O*A,r[2]=o*g+R*E+T*M+O*C,r[3]=o*h+R*c+T*L+O*S,o=u[4],R=u[5],T=u[6],O=u[7],r[4]=o*i+R*b+T*l+O*D,r[5]=o*f+R*p+T*m+O*A,r[6]=o*g+R*E+T*M+O*C,r[7]=o*h+R*c+T*L+O*S,o=u[8],R=u[9],T=u[10],O=u[11],r[8]=o*i+R*b+T*l+O*D,r[9]=o*f+R*p+T*m+O*A,r[10]=o*g+R*E+T*M+O*C,r[11]=o*h+R*c+T*L+O*S,o=u[12],R=u[13],T=u[14],O=u[15],r[12]=o*i+R*b+T*l+O*D,r[13]=o*f+R*p+T*m+O*A,r[14]=o*g+R*E+T*M+O*C,r[15]=o*h+R*c+T*L+O*S,r}},5268:function(v){v.exports=y;function y(r,n,u,i,f,g,h){var b=1/(n-u),p=1/(i-f),E=1/(g-h);return r[0]=-2*b,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*p,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*E,r[11]=0,r[12]=(n+u)*b,r[13]=(f+i)*p,r[14]=(h+g)*E,r[15]=1,r}},1120:function(v){v.exports=y;function y(r,n,u,i,f){var g=1/Math.tan(n/2),h=1/(i-f);return r[0]=g/u,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=g,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(f+i)*h,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*f*i*h,r[15]=0,r}},4422:function(v){v.exports=y;function y(r,n,u,i){var f=i[0],g=i[1],h=i[2],b=Math.sqrt(f*f+g*g+h*h),p,E,c,l,m,M,L,D,A,C,S,o,R,T,O,N,H,k,V,G,U,Y,ee,re;return Math.abs(b)<1e-6?null:(b=1/b,f*=b,g*=b,h*=b,p=Math.sin(u),E=Math.cos(u),c=1-E,l=n[0],m=n[1],M=n[2],L=n[3],D=n[4],A=n[5],C=n[6],S=n[7],o=n[8],R=n[9],T=n[10],O=n[11],N=f*f*c+E,H=g*f*c+h*p,k=h*f*c-g*p,V=f*g*c-h*p,G=g*g*c+E,U=h*g*c+f*p,Y=f*h*c+g*p,ee=g*h*c-f*p,re=h*h*c+E,r[0]=l*N+D*H+o*k,r[1]=m*N+A*H+R*k,r[2]=M*N+C*H+T*k,r[3]=L*N+S*H+O*k,r[4]=l*V+D*G+o*U,r[5]=m*V+A*G+R*U,r[6]=M*V+C*G+T*U,r[7]=L*V+S*G+O*U,r[8]=l*Y+D*ee+o*re,r[9]=m*Y+A*ee+R*re,r[10]=M*Y+C*ee+T*re,r[11]=L*Y+S*ee+O*re,n!==r&&(r[12]=n[12],r[13]=n[13],r[14]=n[14],r[15]=n[15]),r)}},6109:function(v){v.exports=y;function y(r,n,u){var i=Math.sin(u),f=Math.cos(u),g=n[4],h=n[5],b=n[6],p=n[7],E=n[8],c=n[9],l=n[10],m=n[11];return n!==r&&(r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r[12]=n[12],r[13]=n[13],r[14]=n[14],r[15]=n[15]),r[4]=g*f+E*i,r[5]=h*f+c*i,r[6]=b*f+l*i,r[7]=p*f+m*i,r[8]=E*f-g*i,r[9]=c*f-h*i,r[10]=l*f-b*i,r[11]=m*f-p*i,r}},7115:function(v){v.exports=y;function y(r,n,u){var i=Math.sin(u),f=Math.cos(u),g=n[0],h=n[1],b=n[2],p=n[3],E=n[8],c=n[9],l=n[10],m=n[11];return n!==r&&(r[4]=n[4],r[5]=n[5],r[6]=n[6],r[7]=n[7],r[12]=n[12],r[13]=n[13],r[14]=n[14],r[15]=n[15]),r[0]=g*f-E*i,r[1]=h*f-c*i,r[2]=b*f-l*i,r[3]=p*f-m*i,r[8]=g*i+E*f,r[9]=h*i+c*f,r[10]=b*i+l*f,r[11]=p*i+m*f,r}},5240:function(v){v.exports=y;function y(r,n,u){var i=Math.sin(u),f=Math.cos(u),g=n[0],h=n[1],b=n[2],p=n[3],E=n[4],c=n[5],l=n[6],m=n[7];return n!==r&&(r[8]=n[8],r[9]=n[9],r[10]=n[10],r[11]=n[11],r[12]=n[12],r[13]=n[13],r[14]=n[14],r[15]=n[15]),r[0]=g*f+E*i,r[1]=h*f+c*i,r[2]=b*f+l*i,r[3]=p*f+m*i,r[4]=E*f-g*i,r[5]=c*f-h*i,r[6]=l*f-b*i,r[7]=m*f-p*i,r}},3668:function(v){v.exports=y;function y(r,n,u){var i=u[0],f=u[1],g=u[2];return r[0]=n[0]*i,r[1]=n[1]*i,r[2]=n[2]*i,r[3]=n[3]*i,r[4]=n[4]*f,r[5]=n[5]*f,r[6]=n[6]*f,r[7]=n[7]*f,r[8]=n[8]*g,r[9]=n[9]*g,r[10]=n[10]*g,r[11]=n[11]*g,r[12]=n[12],r[13]=n[13],r[14]=n[14],r[15]=n[15],r}},998:function(v){v.exports=y;function y(r,n,u){var i=u[0],f=u[1],g=u[2],h,b,p,E,c,l,m,M,L,D,A,C;return n===r?(r[12]=n[0]*i+n[4]*f+n[8]*g+n[12],r[13]=n[1]*i+n[5]*f+n[9]*g+n[13],r[14]=n[2]*i+n[6]*f+n[10]*g+n[14],r[15]=n[3]*i+n[7]*f+n[11]*g+n[15]):(h=n[0],b=n[1],p=n[2],E=n[3],c=n[4],l=n[5],m=n[6],M=n[7],L=n[8],D=n[9],A=n[10],C=n[11],r[0]=h,r[1]=b,r[2]=p,r[3]=E,r[4]=c,r[5]=l,r[6]=m,r[7]=M,r[8]=L,r[9]=D,r[10]=A,r[11]=C,r[12]=h*i+c*f+L*g+n[12],r[13]=b*i+l*f+D*g+n[13],r[14]=p*i+m*f+A*g+n[14],r[15]=E*i+M*f+C*g+n[15]),r}},2142:function(v){v.exports=y;function y(r,n){if(r===n){var u=n[1],i=n[2],f=n[3],g=n[6],h=n[7],b=n[11];r[1]=n[4],r[2]=n[8],r[3]=n[12],r[4]=u,r[6]=n[9],r[7]=n[13],r[8]=i,r[9]=g,r[11]=n[14],r[12]=f,r[13]=h,r[14]=b}else r[0]=n[0],r[1]=n[4],r[2]=n[8],r[3]=n[12],r[4]=n[1],r[5]=n[5],r[6]=n[9],r[7]=n[13],r[8]=n[2],r[9]=n[6],r[10]=n[10],r[11]=n[14],r[12]=n[3],r[13]=n[7],r[14]=n[11],r[15]=n[15];return r}},4340:function(v,y,r){var n=r(957),u=r(7309);v.exports=b;function i(p,E){for(var c=[0,0,0,0],l=0;l<4;++l)for(var m=0;m<4;++m)c[m]+=p[4*l+m]*E[l];return c}function f(p,E,c,l,m){for(var M=i(l,i(c,i(E,[p[0],p[1],p[2],1]))),L=0;L<3;++L)M[L]/=M[3];return[.5*m[0]*(1+M[0]),.5*m[1]*(1-M[1])]}function g(p,E){if(p.length===2){for(var c=0,l=0,m=0;m<2;++m)c+=Math.pow(E[m]-p[0][m],2),l+=Math.pow(E[m]-p[1][m],2);return c=Math.sqrt(c),l=Math.sqrt(l),c+l<1e-6?[1,0]:[l/(c+l),c/(l+c)]}else if(p.length===3){var M=[0,0];return u(p[0],p[1],p[2],E,M),n(p,M)}return[]}function h(p,E){for(var c=[0,0,0],l=0;l<p.length;++l)for(var m=p[l],M=E[l],L=0;L<3;++L)c[L]+=M*m[L];return c}function b(p,E,c,l,m,M){if(p.length===1)return[0,p[0].slice()];for(var L=new Array(p.length),D=0;D<p.length;++D)L[D]=f(p[D],c,l,m,M);for(var A=0,C=1/0,D=0;D<L.length;++D){for(var S=0,o=0;o<2;++o)S+=Math.pow(L[D][o]-E[o],2);S<C&&(C=S,A=D)}for(var R=g(L,E),T=0,D=0;D<3;++D){if(R[D]<-.001||R[D]>1.0001)return null;T+=R[D]}return Math.abs(T-1)>.001?null:[A,h(p,R),R]}},2056:function(v,y,r){var n=r(6832),u=n([`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;
}
`]),i=n([`#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;
}
`]),f=n([`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;
}`]),g=n([`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;
}`]),h=n([`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;
}`]),b=n([`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;
}`]),p=n([`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;
}`]),E=n([`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);
}`]),c=n([`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;
}`]),l=n([`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);
}`]),m=n([`precision highp float;
#define GLSLIFY 1
uniform vec3 contourColor;
void main() {
gl_FragColor = vec4(contourColor, 1.0);
}
`]);y.meshShader={vertex:u,fragment:i,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},y.wireShader={vertex:f,fragment:g,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},y.pointShader={vertex:h,fragment:b,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},y.pickShader={vertex:p,fragment:E,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},y.pointPickShader={vertex:c,fragment:E,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},y.contourShader={vertex:l,fragment:m,attributes:[{name:"position",type:"vec3"}]}},8116:function(v,y,r){var n=1e-6,u=1e-6,i=r(5158),f=r(5827),g=r(2944),h=r(8931),b=r(115),p=r(104),E=r(7437),c=r(5050),l=r(9156),m=r(7212),M=r(5306),L=r(2056),D=r(4340),A=L.meshShader,C=L.wireShader,S=L.pointShader,o=L.pickShader,R=L.pointPickShader,T=L.contourShader,O=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function N(q,j,Z,Q,ue,fe,te,ne,ve,le,xe,Se,Re,Ee,Oe,Be,Le,Te,De,Ve,Ye,Ne,Xe,ht,st,it,nt){this.gl=q,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=j,this.dirty=!0,this.triShader=Z,this.lineShader=Q,this.pointShader=ue,this.pickShader=fe,this.pointPickShader=te,this.contourShader=ne,this.trianglePositions=ve,this.triangleColors=xe,this.triangleNormals=Re,this.triangleUVs=Se,this.triangleIds=le,this.triangleVAO=Ee,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Oe,this.edgeColors=Le,this.edgeUVs=Te,this.edgeIds=Be,this.edgeVAO=De,this.edgeCount=0,this.pointPositions=Ve,this.pointColors=Ne,this.pointUVs=Xe,this.pointSizes=ht,this.pointIds=Ye,this.pointVAO=st,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=it,this.contourVAO=nt,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=O,this._view=O,this._projection=O,this._resolution=[1,1]}var H=N.prototype;H.isOpaque=function(){return!this.hasAlpha},H.isTransparent=function(){return this.hasAlpha},H.pickSlots=1,H.setPickBase=function(q){this.pickId=q};function k(q,j){if(!j||!j.length)return 1;for(var Z=0;Z<j.length;++Z){if(j.length<2)return 1;if(j[Z][0]===q)return j[Z][1];if(j[Z][0]>q&&Z>0){var Q=(j[Z][0]-q)/(j[Z][0]-j[Z-1][0]);return j[Z][1]*(1-Q)+Q*j[Z-1][1]}}return 1}function V(q,j){for(var Z=l({colormap:q,nshades:256,format:"rgba"}),Q=new Uint8Array(256*4),ue=0;ue<256;++ue){for(var fe=Z[ue],te=0;te<3;++te)Q[4*ue+te]=fe[te];j?Q[4*ue+3]=255*k(ue/255,j):Q[4*ue+3]=255*fe[3]}return c(Q,[256,256,4],[4,0,1])}function G(q){for(var j=q.length,Z=new Array(j),Q=0;Q<j;++Q)Z[Q]=q[Q][2];return Z}H.highlight=function(q){if(!q||!this.contourEnable){this.contourCount=0;return}for(var j=m(this.cells,this.intensity,q.intensity),Z=j.cells,Q=j.vertexIds,ue=j.vertexWeights,fe=Z.length,te=M.mallocFloat32(2*3*fe),ne=0,ve=0;ve<fe;++ve)for(var le=Z[ve],xe=0;xe<2;++xe){var Se=le[0];le.length===2&&(Se=le[xe]);for(var Re=Q[Se][0],Ee=Q[Se][1],Oe=ue[Se],Be=1-Oe,Le=this.positions[Re],Te=this.positions[Ee],De=0;De<3;++De)te[ne++]=Oe*Le[De]+Be*Te[De]}this.contourCount=ne/3|0,this.contourPositions.update(te.subarray(0,ne)),M.free(te)},H.update=function(q){q=q||{};var j=this.gl;this.dirty=!0,"contourEnable"in q&&(this.contourEnable=q.contourEnable),"contourColor"in q&&(this.contourColor=q.contourColor),"lineWidth"in q&&(this.lineWidth=q.lineWidth),"lightPosition"in q&&(this.lightPosition=q.lightPosition),this.hasAlpha=!1,"opacity"in q&&(this.opacity=q.opacity,this.opacity<1&&(this.hasAlpha=!0)),"opacityscale"in q&&(this.opacityscale=q.opacityscale,this.hasAlpha=!0),"ambient"in q&&(this.ambientLight=q.ambient),"diffuse"in q&&(this.diffuseLight=q.diffuse),"specular"in q&&(this.specularLight=q.specular),"roughness"in q&&(this.roughness=q.roughness),"fresnel"in q&&(this.fresnel=q.fresnel),q.texture?(this.texture.dispose(),this.texture=h(j,q.texture)):q.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=j.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=j.LINEAR,this.texture.setPixels(V(q.colormap,this.opacityscale)),this.texture.generateMipmap());var Z=q.cells,Q=q.positions;if(!Q||!Z)return;var ue=[],fe=[],te=[],ne=[],ve=[],le=[],xe=[],Se=[],Re=[],Ee=[],Oe=[],Be=[],Le=[],Te=[];this.cells=Z,this.positions=Q;var De=q.vertexNormals,Ve=q.cellNormals,Ye=q.vertexNormalsEpsilon===void 0?n:q.vertexNormalsEpsilon,Ne=q.faceNormalsEpsilon===void 0?u:q.faceNormalsEpsilon;q.useFacetNormals&&!Ve&&(Ve=b.faceNormals(Z,Q,Ne)),!Ve&&!De&&(De=b.vertexNormals(Z,Q,Ye));var Xe=q.vertexColors,ht=q.cellColors,st=q.meshColor||[1,1,1,1],it=q.vertexUVs,nt=q.vertexIntensity,pt=q.cellUVs,Tt=q.cellIntensity,Et=1/0,Dt=-1/0;if(!it&&!pt)if(nt)if(q.vertexIntensityBounds)Et=+q.vertexIntensityBounds[0],Dt=+q.vertexIntensityBounds[1];else for(var et=0;et<nt.length;++et){var Ue=nt[et];Et=Math.min(Et,Ue),Dt=Math.max(Dt,Ue)}else if(Tt)if(q.cellIntensityBounds)Et=+q.cellIntensityBounds[0],Dt=+q.cellIntensityBounds[1];else for(var et=0;et<Tt.length;++et){var Ue=Tt[et];Et=Math.min(Et,Ue),Dt=Math.max(Dt,Ue)}else for(var et=0;et<Q.length;++et){var Ue=Q[et][2];Et=Math.min(Et,Ue),Dt=Math.max(Dt,Ue)}nt?this.intensity=nt:Tt?this.intensity=Tt:this.intensity=G(Q),this.pickVertex=!(Tt||ht);var ze=q.pointSizes,rt=q.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var et=0;et<Q.length;++et)for(var lt=Q[et],Qe=0;Qe<3;++Qe)isNaN(lt[Qe])||!isFinite(lt[Qe])||(this.bounds[0][Qe]=Math.min(this.bounds[0][Qe],lt[Qe]),this.bounds[1][Qe]=Math.max(this.bounds[1][Qe],lt[Qe]));var Fe=0,Ce=0,pe=0;e:for(var et=0;et<Z.length;++et){var we=Z[et];switch(we.length){case 1:for(var Ae=we[0],lt=Q[Ae],Qe=0;Qe<3;++Qe)if(isNaN(lt[Qe])||!isFinite(lt[Qe]))continue e;Ee.push(lt[0],lt[1],lt[2]);var Pe;Xe?Pe=Xe[Ae]:ht?Pe=ht[et]:Pe=st,this.opacityscale&&nt?fe.push(Pe[0],Pe[1],Pe[2],this.opacity*k((nt[Ae]-Et)/(Dt-Et),this.opacityscale)):Pe.length===3?Oe.push(Pe[0],Pe[1],Pe[2],this.opacity):(Oe.push(Pe[0],Pe[1],Pe[2],Pe[3]*this.opacity),Pe[3]<1&&(this.hasAlpha=!0));var Ge;it?Ge=it[Ae]:nt?Ge=[(nt[Ae]-Et)/(Dt-Et),0]:pt?Ge=pt[et]:Tt?Ge=[(Tt[et]-Et)/(Dt-Et),0]:Ge=[(lt[2]-Et)/(Dt-Et),0],Be.push(Ge[0],Ge[1]),ze?Le.push(ze[Ae]):Le.push(rt),Te.push(et),pe+=1;break;case 2:for(var Qe=0;Qe<2;++Qe)for(var Ae=we[Qe],lt=Q[Ae],We=0;We<3;++We)if(isNaN(lt[We])||!isFinite(lt[We]))continue e;for(var Qe=0;Qe<2;++Qe){var Ae=we[Qe],lt=Q[Ae];le.push(lt[0],lt[1],lt[2]);var Pe;Xe?Pe=Xe[Ae]:ht?Pe=ht[et]:Pe=st,this.opacityscale&&nt?fe.push(Pe[0],Pe[1],Pe[2],this.opacity*k((nt[Ae]-Et)/(Dt-Et),this.opacityscale)):Pe.length===3?xe.push(Pe[0],Pe[1],Pe[2],this.opacity):(xe.push(Pe[0],Pe[1],Pe[2],Pe[3]*this.opacity),Pe[3]<1&&(this.hasAlpha=!0));var Ge;it?Ge=it[Ae]:nt?Ge=[(nt[Ae]-Et)/(Dt-Et),0]:pt?Ge=pt[et]:Tt?Ge=[(Tt[et]-Et)/(Dt-Et),0]:Ge=[(lt[2]-Et)/(Dt-Et),0],Se.push(Ge[0],Ge[1]),Re.push(et)}Ce+=1;break;case 3:for(var Qe=0;Qe<3;++Qe)for(var Ae=we[Qe],lt=Q[Ae],We=0;We<3;++We)if(isNaN(lt[We])||!isFinite(lt[We]))continue e;for(var Qe=0;Qe<3;++Qe){var Ae=we[2-Qe],lt=Q[Ae];ue.push(lt[0],lt[1],lt[2]);var Pe;Xe?Pe=Xe[Ae]:ht?Pe=ht[et]:Pe=st,Pe?this.opacityscale&&nt?fe.push(Pe[0],Pe[1],Pe[2],this.opacity*k((nt[Ae]-Et)/(Dt-Et),this.opacityscale)):Pe.length===3?fe.push(Pe[0],Pe[1],Pe[2],this.opacity):(fe.push(Pe[0],Pe[1],Pe[2],Pe[3]*this.opacity),Pe[3]<1&&(this.hasAlpha=!0)):fe.push(.5,.5,.5,1);var Ge;it?Ge=it[Ae]:nt?Ge=[(nt[Ae]-Et)/(Dt-Et),0]:pt?Ge=pt[et]:Tt?Ge=[(Tt[et]-Et)/(Dt-Et),0]:Ge=[(lt[2]-Et)/(Dt-Et),0],ne.push(Ge[0],Ge[1]);var tt;De?tt=De[Ae]:tt=Ve[et],te.push(tt[0],tt[1],tt[2]),ve.push(et)}Fe+=1;break}}this.pointCount=pe,this.edgeCount=Ce,this.triangleCount=Fe,this.pointPositions.update(Ee),this.pointColors.update(Oe),this.pointUVs.update(Be),this.pointSizes.update(Le),this.pointIds.update(new Uint32Array(Te)),this.edgePositions.update(le),this.edgeColors.update(xe),this.edgeUVs.update(Se),this.edgeIds.update(new Uint32Array(Re)),this.trianglePositions.update(ue),this.triangleColors.update(fe),this.triangleUVs.update(ne),this.triangleNormals.update(te),this.triangleIds.update(new Uint32Array(ve))},H.drawTransparent=H.draw=function(q){q=q||{};for(var j=this.gl,Z=q.model||O,Q=q.view||O,ue=q.projection||O,fe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],te=0;te<3;++te)fe[0][te]=Math.max(fe[0][te],this.clipBounds[0][te]),fe[1][te]=Math.min(fe[1][te],this.clipBounds[1][te]);var ne={model:Z,view:Q,projection:ue,inverseModel:O.slice(),clipBounds:fe,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],contourColor:this.contourColor,texture:0};ne.inverseModel=E(ne.inverseModel,ne.model),j.disable(j.CULL_FACE),this.texture.bind(0);var ve=new Array(16);p(ve,ne.view,ne.model),p(ve,ne.projection,ve),E(ve,ve);for(var te=0;te<3;++te)ne.eyePosition[te]=ve[12+te]/ve[15];for(var le=ve[15],te=0;te<3;++te)le+=this.lightPosition[te]*ve[4*te+3];for(var te=0;te<3;++te){for(var xe=ve[12+te],Se=0;Se<3;++Se)xe+=ve[4*Se+te]*this.lightPosition[Se];ne.lightPosition[te]=xe/le}if(this.triangleCount>0){var Re=this.triShader;Re.bind(),Re.uniforms=ne,this.triangleVAO.bind(),j.drawArrays(j.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var Re=this.lineShader;Re.bind(),Re.uniforms=ne,this.edgeVAO.bind(),j.lineWidth(this.lineWidth*this.pixelRatio),j.drawArrays(j.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var Re=this.pointShader;Re.bind(),Re.uniforms=ne,this.pointVAO.bind(),j.drawArrays(j.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var Re=this.contourShader;Re.bind(),Re.uniforms=ne,this.contourVAO.bind(),j.drawArrays(j.LINES,0,this.contourCount),this.contourVAO.unbind()}},H.drawPick=function(q){q=q||{};for(var j=this.gl,Z=q.model||O,Q=q.view||O,ue=q.projection||O,fe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],te=0;te<3;++te)fe[0][te]=Math.max(fe[0][te],this.clipBounds[0][te]),fe[1][te]=Math.min(fe[1][te],this.clipBounds[1][te]);this._model=[].slice.call(Z),this._view=[].slice.call(Q),this._projection=[].slice.call(ue),this._resolution=[j.drawingBufferWidth,j.drawingBufferHeight];var ne={model:Z,view:Q,projection:ue,clipBounds:fe,pickId:this.pickId/255},ve=this.pickShader;if(ve.bind(),ve.uniforms=ne,this.triangleCount>0&&(this.triangleVAO.bind(),j.drawArrays(j.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),j.lineWidth(this.lineWidth*this.pixelRatio),j.drawArrays(j.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var ve=this.pointPickShader;ve.bind(),ve.uniforms=ne,this.pointVAO.bind(),j.drawArrays(j.POINTS,0,this.pointCount),this.pointVAO.unbind()}},H.pick=function(q){if(!q||q.id!==this.pickId)return null;for(var j=q.value[0]+256*q.value[1]+65536*q.value[2],Z=this.cells[j],Q=this.positions,ue=new Array(Z.length),fe=0;fe<Z.length;++fe)ue[fe]=Q[Z[fe]];var te=q.coord[0],ne=q.coord[1];if(!this.pickVertex){var ve=this.positions[Z[0]],le=this.positions[Z[1]],xe=this.positions[Z[2]],Se=[(ve[0]+le[0]+xe[0])/3,(ve[1]+le[1]+xe[1])/3,(ve[2]+le[2]+xe[2])/3];return{_cellCenter:!0,position:[te,ne],index:j,cell:Z,cellId:j,intensity:this.intensity[j],dataCoordinate:Se}}var Re=D(ue,[te*this.pixelRatio,this._resolution[1]-ne*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!Re)return null;for(var Ee=Re[2],Oe=0,fe=0;fe<Z.length;++fe)Oe+=Ee[fe]*this.intensity[Z[fe]];return{position:Re[1],index:Z[Re[0]],cell:Z,cellId:j,intensity:Oe,dataCoordinate:this.positions[Z[Re[0]]]}},H.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.lineShader.dispose(),this.pointShader.dispose(),this.pickShader.dispose(),this.pointPickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose(),this.contourShader.dispose()};function U(q){var j=i(q,A.vertex,A.fragment);return j.attributes.position.location=0,j.attributes.color.location=2,j.attributes.uv.location=3,j.attributes.normal.location=4,j}function Y(q){var j=i(q,C.vertex,C.fragment);return j.attributes.position.location=0,j.attributes.color.location=2,j.attributes.uv.location=3,j}function ee(q){var j=i(q,S.vertex,S.fragment);return j.attributes.position.location=0,j.attributes.color.location=2,j.attributes.uv.location=3,j.attributes.pointSize.location=4,j}function re(q){var j=i(q,o.vertex,o.fragment);return j.attributes.position.location=0,j.attributes.id.location=1,j}function ie(q){var j=i(q,R.vertex,R.fragment);return j.attributes.position.location=0,j.attributes.id.location=1,j.attributes.pointSize.location=4,j}function se(q){var j=i(q,T.vertex,T.fragment);return j.attributes.position.location=0,j}function ce(q,j){arguments.length===1&&(j=q,q=j.gl);var Z=q.getExtension("OES_standard_derivatives")||q.getExtension("MOZ_OES_standard_derivatives")||q.getExtension("WEBKIT_OES_standard_derivatives");if(!Z)throw new Error("derivatives not supported");var Q=U(q),ue=Y(q),fe=ee(q),te=re(q),ne=ie(q),ve=se(q),le=h(q,c(new Uint8Array([255,255,255,255]),[1,1,4]));le.generateMipmap(),le.minFilter=q.LINEAR_MIPMAP_LINEAR,le.magFilter=q.LINEAR;var xe=f(q),Se=f(q),Re=f(q),Ee=f(q),Oe=f(q),Be=g(q,[{buffer:xe,type:q.FLOAT,size:3},{buffer:Oe,type:q.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Se,type:q.FLOAT,size:4},{buffer:Re,type:q.FLOAT,size:2},{buffer:Ee,type:q.FLOAT,size:3}]),Le=f(q),Te=f(q),De=f(q),Ve=f(q),Ye=g(q,[{buffer:Le,type:q.FLOAT,size:3},{buffer:Ve,type:q.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Te,type:q.FLOAT,size:4},{buffer:De,type:q.FLOAT,size:2}]),Ne=f(q),Xe=f(q),ht=f(q),st=f(q),it=f(q),nt=g(q,[{buffer:Ne,type:q.FLOAT,size:3},{buffer:it,type:q.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Xe,type:q.FLOAT,size:4},{buffer:ht,type:q.FLOAT,size:2},{buffer:st,type:q.FLOAT,size:1}]),pt=f(q),Tt=g(q,[{buffer:pt,type:q.FLOAT,size:3}]),Et=new N(q,le,Q,ue,fe,te,ne,ve,xe,Oe,Se,Re,Ee,Be,Le,Ve,Te,De,Ye,Ne,it,Xe,ht,st,nt,pt,Tt);return Et.update(j),Et}v.exports=ce},4554:function(v,y,r){v.exports=h;var n=r(5827),u=r(5158),i=r(2709);function f(b,p,E){this.plot=b,this.vbo=p,this.shader=E}var g=f.prototype;g.bind=function(){var b=this.shader;this.vbo.bind(),this.shader.bind(),b.attributes.coord.pointer(),b.uniforms.screenBox=this.plot.screenBox},g.drawBox=function(){var b=[0,0],p=[0,0];return function(E,c,l,m,M){var L=this.plot,D=this.shader,A=L.gl;b[0]=E,b[1]=c,p[0]=l,p[1]=m,D.uniforms.lo=b,D.uniforms.hi=p,D.uniforms.color=M,A.drawArrays(A.TRIANGLE_STRIP,0,4)}}(),g.dispose=function(){this.vbo.dispose(),this.shader.dispose()};function h(b){var p=b.gl,E=n(p,[0,0,0,1,1,0,1,1]),c=u(p,i.boxVert,i.lineFrag);return new f(b,E,c)}},3016:function(v,y,r){v.exports=p;var n=r(5827),u=r(5158),i=r(5070),f=r(2709);function g(E,c,l,m){this.plot=E,this.vbo=c,this.shader=l,this.tickShader=m,this.ticks=[[],[]]}function h(E,c){return E-c}var b=g.prototype;b.draw=function(){var E=[0,0],c=[0,0],l=[0,0];return function(){for(var m=this.plot,M=this.vbo,L=this.shader,D=this.ticks,A=m.gl,C=m._tickBounds,S=m.dataBox,o=m.viewBox,R=m.gridLineWidth,T=m.gridLineColor,O=m.gridLineEnable,N=m.pixelRatio,H=0;H<2;++H){var k=C[H],V=C[H+2],G=V-k,U=.5*(S[H+2]+S[H]),Y=S[H+2]-S[H];c[H]=2*G/Y,E[H]=2*(k-U)/Y}L.bind(),M.bind(),L.attributes.dataCoord.pointer(),L.uniforms.dataShift=E,L.uniforms.dataScale=c;for(var ee=0,H=0;H<2;++H){l[0]=l[1]=0,l[H]=1,L.uniforms.dataAxis=l,L.uniforms.lineWidth=R[H]/(o[H+2]-o[H])*N,L.uniforms.color=T[H];var re=D[H].length*6;O[H]&&re&&A.drawArrays(A.TRIANGLES,ee,re),ee+=re}}}(),b.drawTickMarks=function(){var E=[0,0],c=[0,0],l=[1,0],m=[0,1],M=[0,0],L=[0,0];return function(){for(var D=this.plot,A=this.vbo,C=this.tickShader,S=this.ticks,o=D.gl,R=D._tickBounds,T=D.dataBox,O=D.viewBox,N=D.pixelRatio,H=D.screenBox,k=H[2]-H[0],V=H[3]-H[1],G=O[2]-O[0],U=O[3]-O[1],Y=0;Y<2;++Y){var ee=R[Y],re=R[Y+2],ie=re-ee,se=.5*(T[Y+2]+T[Y]),ce=T[Y+2]-T[Y];c[Y]=2*ie/ce,E[Y]=2*(ee-se)/ce}c[0]*=G/k,E[0]*=G/k,c[1]*=U/V,E[1]*=U/V,C.bind(),A.bind(),C.attributes.dataCoord.pointer();var q=C.uniforms;q.dataShift=E,q.dataScale=c;var j=D.tickMarkLength,Z=D.tickMarkWidth,Q=D.tickMarkColor,ue=0,fe=S[0].length*6,te=Math.min(i.ge(S[0],(T[0]-R[0])/(R[2]-R[0]),h),S[0].length),ne=Math.min(i.gt(S[0],(T[2]-R[0])/(R[2]-R[0]),h),S[0].length),ve=ue+6*te,le=6*Math.max(0,ne-te),xe=Math.min(i.ge(S[1],(T[1]-R[1])/(R[3]-R[1]),h),S[1].length),Se=Math.min(i.gt(S[1],(T[3]-R[1])/(R[3]-R[1]),h),S[1].length),Re=fe+6*xe,Ee=6*Math.max(0,Se-xe);M[0]=2*(O[0]-j[1])/k-1,M[1]=(O[3]+O[1])/V-1,L[0]=j[1]*N/k,L[1]=Z[1]*N/V,Ee&&(q.color=Q[1],q.tickScale=L,q.dataAxis=m,q.screenOffset=M,o.drawArrays(o.TRIANGLES,Re,Ee)),M[0]=(O[2]+O[0])/k-1,M[1]=2*(O[1]-j[0])/V-1,L[0]=Z[0]*N/k,L[1]=j[0]*N/V,le&&(q.color=Q[0],q.tickScale=L,q.dataAxis=l,q.screenOffset=M,o.drawArrays(o.TRIANGLES,ve,le)),M[0]=2*(O[2]+j[3])/k-1,M[1]=(O[3]+O[1])/V-1,L[0]=j[3]*N/k,L[1]=Z[3]*N/V,Ee&&(q.color=Q[3],q.tickScale=L,q.dataAxis=m,q.screenOffset=M,o.drawArrays(o.TRIANGLES,Re,Ee)),M[0]=(O[2]+O[0])/k-1,M[1]=2*(O[3]+j[2])/V-1,L[0]=Z[2]*N/k,L[1]=j[2]*N/V,le&&(q.color=Q[2],q.tickScale=L,q.dataAxis=l,q.screenOffset=M,o.drawArrays(o.TRIANGLES,ve,le))}}(),b.update=function(){var E=[1,1,-1,-1,1,-1],c=[1,-1,1,1,-1,-1];return function(l){var m=l.ticks,M=l.bounds,L=new Float32Array(6*3*(m[0].length+m[1].length));this.plot.zeroLineEnable;for(var D=0,A=[[],[]],C=0;C<2;++C)for(var S=A[C],o=m[C],R=M[C],T=M[C+2],O=0;O<o.length;++O){var N=(o[O].x-R)/(T-R);S.push(N);for(var H=0;H<6;++H)L[D++]=N,L[D++]=E[H],L[D++]=c[H]}this.ticks=A,this.vbo.update(L)}}(),b.dispose=function(){this.vbo.dispose(),this.shader.dispose(),this.tickShader.dispose()};function p(E){var c=E.gl,l=n(c),m=u(c,f.gridVert,f.gridFrag),M=u(c,f.tickVert,f.gridFrag),L=new g(E,l,m,M);return L}},1154:function(v,y,r){v.exports=h;var n=r(5827),u=r(5158),i=r(2709);function f(b,p,E){this.plot=b,this.vbo=p,this.shader=E}var g=f.prototype;g.bind=function(){var b=this.shader;this.vbo.bind(),this.shader.bind(),b.attributes.coord.pointer(),b.uniforms.screenBox=this.plot.screenBox},g.drawLine=function(){var b=[0,0],p=[0,0];return function(E,c,l,m,M,L){var D=this.plot,A=this.shader,C=D.gl;b[0]=E,b[1]=c,p[0]=l,p[1]=m,A.uniforms.start=b,A.uniforms.end=p,A.uniforms.width=M*D.pixelRatio,A.uniforms.color=L,C.drawArrays(C.TRIANGLE_STRIP,0,4)}}(),g.dispose=function(){this.vbo.dispose(),this.shader.dispose()};function h(b){var p=b.gl,E=n(p,[-1,-1,-1,1,1,-1,1,1]),c=u(p,i.lineVert,i.lineFrag),l=new f(b,E,c);return l}},2709:function(v,y,r){var n=r(6832),u=n([`precision lowp float;
#define GLSLIFY 1
uniform vec4 color;
void main() {
gl_FragColor = vec4(color.xyz * color.w, color.w);
}
`]);v.exports={lineVert:n([`precision mediump float;
#define GLSLIFY 1
attribute vec2 coord;
uniform vec4 screenBox;
uniform vec2 start, end;
uniform float width;
vec2 perp(vec2 v) {
return vec2(v.y, -v.x);
}
vec2 screen(vec2 v) {
return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;
}
void main() {
vec2 delta = normalize(perp(start - end));
vec2 offset = mix(start, end, 0.5 * (coord.y+1.0));
gl_Position = vec4(screen(offset + 0.5 * width * delta * coord.x), 0, 1);
}
`]),lineFrag:u,textVert:n([`#define GLSLIFY 1
attribute vec3 textCoordinate;
uniform vec2 dataScale, dataShift, dataAxis, screenOffset, textScale;
uniform float angle;
void main() {
float dataOffset = textCoordinate.z;
vec2 glyphOffset = textCoordinate.xy;
mat2 glyphMatrix = mat2(cos(angle), sin(angle), -sin(angle), cos(angle));
vec2 screenCoordinate = dataAxis * (dataScale * dataOffset + dataShift) +
glyphMatrix * glyphOffset * textScale + screenOffset;
gl_Position = vec4(screenCoordinate, 0, 1);
}
`]),textFrag:u,gridVert:n([`precision mediump float;
#define GLSLIFY 1
attribute vec3 dataCoord;
uniform vec2 dataAxis, dataShift, dataScale;
uniform float lineWidth;
void main() {
vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);
pos += 10.0 * dataCoord.y * vec2(dataAxis.y, -dataAxis.x) + dataCoord.z * lineWidth;
gl_Position = vec4(pos, 0, 1);
}
`]),gridFrag:u,boxVert:n([`precision mediump float;
#define GLSLIFY 1
attribute vec2 coord;
uniform vec4 screenBox;
uniform vec2 lo, hi;
vec2 screen(vec2 v) {
return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;
}
void main() {
gl_Position = vec4(screen(mix(lo, hi, coord)), 0, 1);
}
`]),tickVert:n([`precision mediump float;
#define GLSLIFY 1
attribute vec3 dataCoord;
uniform vec2 dataAxis, dataShift, dataScale, screenOffset, tickScale;
void main() {
vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);
gl_Position = vec4(pos + tickScale*dataCoord.yz + screenOffset, 0, 1);
}
`])}},5613:function(v,y,r){v.exports=p;var n=r(5827),u=r(5158),i=r(6946),f=r(5070),g=r(2709);function h(E,c,l){this.plot=E,this.vbo=c,this.shader=l,this.tickOffset=[[],[]],this.tickX=[[],[]],this.labelOffset=[0,0],this.labelCount=[0,0]}var b=h.prototype;b.drawTicks=function(){var E=[0,0],c=[0,0],l=[0,0];return function(m){var M=this.plot,L=this.shader,D=this.tickX[m],A=this.tickOffset[m],C=M.gl,S=M.viewBox,o=M.dataBox,R=M.screenBox,T=M.pixelRatio,O=M.tickEnable,N=M.tickPad,H=M.tickColor,k=M.tickAngle,V=M.labelEnable,G=M.labelPad,U=M.labelColor,Y=M.labelAngle,ee=this.labelOffset[m],re=this.labelCount[m],ie=f.lt(D,o[m]),se=f.le(D,o[m+2]);E[0]=E[1]=0,E[m]=1,c[m]=(S[2+m]+S[m])/(R[2+m]-R[m])-1;var ce=2/R[2+(m^1)]-R[m^1];c[m^1]=ce*S[m^1]-1,O[m]&&(c[m^1]-=ce*T*N[m],ie<se&&A[se]>A[ie]&&(L.uniforms.dataAxis=E,L.uniforms.screenOffset=c,L.uniforms.color=H[m],L.uniforms.angle=k[m],C.drawArrays(C.TRIANGLES,A[ie],A[se]-A[ie]))),V[m]&&re&&(c[m^1]-=ce*T*G[m],L.uniforms.dataAxis=l,L.uniforms.screenOffset=c,L.uniforms.color=U[m],L.uniforms.angle=Y[m],C.drawArrays(C.TRIANGLES,ee,re)),c[m^1]=ce*S[2+(m^1)]-1,O[m+2]&&(c[m^1]+=ce*T*N[m+2],ie<se&&A[se]>A[ie]&&(L.uniforms.dataAxis=E,L.uniforms.screenOffset=c,L.uniforms.color=H[m+2],L.uniforms.angle=k[m+2],C.drawArrays(C.TRIANGLES,A[ie],A[se]-A[ie]))),V[m+2]&&re&&(c[m^1]+=ce*T*G[m+2],L.uniforms.dataAxis=l,L.uniforms.screenOffset=c,L.uniforms.color=U[m+2],L.uniforms.angle=Y[m+2],C.drawArrays(C.TRIANGLES,ee,re))}}(),b.drawTitle=function(){var E=[0,0],c=[0,0];return function(){var l=this.plot,m=this.shader,M=l.gl,L=l.screenBox,D=l.titleCenter,A=l.titleAngle,C=l.titleColor,S=l.pixelRatio;if(this.titleCount){for(var o=0;o<2;++o)c[o]=2*(D[o]*S-L[o])/(L[2+o]-L[o])-1;m.bind(),m.uniforms.dataAxis=E,m.uniforms.screenOffset=c,m.uniforms.angle=A,m.uniforms.color=C,M.drawArrays(M.TRIANGLES,this.titleOffset,this.titleCount)}}}(),b.bind=function(){var E=[0,0],c=[0,0],l=[0,0];return function(){var m=this.plot,M=this.shader,L=m._tickBounds,D=m.dataBox,A=m.screenBox,C=m.viewBox;M.bind();for(var S=0;S<2;++S){var o=L[S],R=L[S+2],T=R-o,O=.5*(D[S+2]+D[S]),N=D[S+2]-D[S],H=C[S],k=C[S+2],V=k-H,G=A[S],U=A[S+2],Y=U-G;c[S]=2*T/N*V/Y,E[S]=2*(o-O)/N*V/Y}l[1]=2*m.pixelRatio/(A[3]-A[1]),l[0]=l[1]*(A[3]-A[1])/(A[2]-A[0]),M.uniforms.dataScale=c,M.uniforms.dataShift=E,M.uniforms.textScale=l,this.vbo.bind(),M.attributes.textCoordinate.pointer()}}(),b.update=function(E){var c=[],l=E.ticks,m=E.bounds,M,L,D,A,C;for(C=0;C<2;++C){var S=[Math.floor(c.length/3)],o=[-1/0],R=l[C];for(M=0;M<R.length;++M){var T=R[M],O=T.x,N=T.text,H=T.font||"sans-serif";A=T.fontSize||12;for(var k=1/(m[C+2]-m[C]),V=m[C],G=N.split(`
`),U=0;U<G.length;U++)for(D=i(H,G[U]).data,L=0;L<D.length;L+=2)c.push(D[L]*A,-D[L+1]*A-U*A*1.2,(O-V)*k);S.push(Math.floor(c.length/3)),o.push(O)}this.tickOffset[C]=S,this.tickX[C]=o}for(C=0;C<2;++C){for(this.labelOffset[C]=Math.floor(c.length/3),D=i(E.labelFont[C],E.labels[C],{textAlign:"center"}).data,A=E.labelSize[C],M=0;M<D.length;M+=2)c.push(D[M]*A,-D[M+1]*A,0);this.labelCount[C]=Math.floor(c.length/3)-this.labelOffset[C]}for(this.titleOffset=Math.floor(c.length/3),D=i(E.titleFont,E.title).data,A=E.titleSize,M=0;M<D.length;M+=2)c.push(D[M]*A,-D[M+1]*A,0);this.titleCount=Math.floor(c.length/3)-this.titleOffset,this.vbo.update(c)},b.dispose=function(){this.vbo.dispose(),this.shader.dispose()};function p(E){var c=E.gl,l=n(c),m=u(c,g.textVert,g.textFrag),M=new h(E,l,m);return M}},2117:function(v,y,r){v.exports=c;var n=r(2611),u=r(3016),i=r(5613),f=r(1154),g=r(4554);function h(l,m){this.gl=l,this.pickBuffer=m,this.screenBox=[0,0,l.drawingBufferWidth,l.drawingBufferHeight],this.viewBox=[0,0,0,0],this.dataBox=[-10,-10,10,10],this.gridLineEnable=[!0,!0],this.gridLineWidth=[1,1],this.gridLineColor=[[0,0,0,1],[0,0,0,1]],this.pixelRatio=1,this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickEnable=[!0,!0,!0,!0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[15,15,15,15],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelEnable=[!0,!0,!0,!0],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.titleCenter=[0,0],this.titleEnable=!0,this.titleAngle=0,this.titleColor=[0,0,0,1],this.borderColor=[0,0,0,0],this.backgroundColor=[0,0,0,0],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[4,4],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderLineEnable=[!0,!0,!0,!0],this.borderLineWidth=[2,2,2,2],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.grid=null,this.text=null,this.line=null,this.box=null,this.objects=[],this.overlays=[],this._tickBounds=[1/0,1/0,-1/0,-1/0],this.static=!1,this.dirty=!1,this.pickDirty=!1,this.pickDelay=120,this.pickRadius=10,this._pickTimeout=null,this._drawPick=this.drawPick.bind(this),this._depthCounter=0}var b=h.prototype;b.setDirty=function(){this.dirty=this.pickDirty=!0},b.setOverlayDirty=function(){this.dirty=!0},b.nextDepthValue=function(){return this._depthCounter++/65536},b.draw=function(){return function(){var l=this.gl,m=this.screenBox,M=this.viewBox,L=this.dataBox,D=this.pixelRatio,A=this.grid,C=this.line,S=this.text,o=this.objects;if(this._depthCounter=0,this.pickDirty&&(this._pickTimeout&&clearTimeout(this._pickTimeout),this.pickDirty=!1,this._pickTimeout=setTimeout(this._drawPick,this.pickDelay)),!!this.dirty){if(this.dirty=!1,l.bindFramebuffer(l.FRAMEBUFFER,null),l.enable(l.SCISSOR_TEST),l.disable(l.DEPTH_TEST),l.depthFunc(l.LESS),l.depthMask(!1),l.enable(l.BLEND),l.blendEquation(l.FUNC_ADD,l.FUNC_ADD),l.blendFunc(l.ONE,l.ONE_MINUS_SRC_ALPHA),this.borderColor){l.scissor(m[0],m[1],m[2]-m[0],m[3]-m[1]);var R=this.borderColor;l.clearColor(R[0]*R[3],R[1]*R[3],R[2]*R[3],R[3]),l.clear(l.COLOR_BUFFER_BIT|l.DEPTH_BUFFER_BIT)}l.scissor(M[0],M[1],M[2]-M[0],M[3]-M[1]),l.viewport(M[0],M[1],M[2]-M[0],M[3]-M[1]);var T=this.backgroundColor;l.clearColor(T[0]*T[3],T[1]*T[3],T[2]*T[3],T[3]),l.clear(l.COLOR_BUFFER_BIT),A.draw();var O=this.zeroLineEnable,N=this.zeroLineColor,H=this.zeroLineWidth;if(O[0]||O[1]){C.bind();for(var k=0;k<2;++k)if(!(!O[k]||!(L[k]<=0&&L[k+2]>=0))){var V=m[k]-L[k]*(m[k+2]-m[k])/(L[k+2]-L[k]);k===0?C.drawLine(V,m[1],V,m[3],H[k],N[k]):C.drawLine(m[0],V,m[2],V,H[k],N[k])}}for(var k=0;k<o.length;++k)o[k].draw();l.viewport(m[0],m[1],m[2]-m[0],m[3]-m[1]),l.scissor(m[0],m[1],m[2]-m[0],m[3]-m[1]),this.grid.drawTickMarks(),C.bind();var G=this.borderLineEnable,U=this.borderLineWidth,Y=this.borderLineColor;G[1]&&C.drawLine(M[0],M[1]-.5*U[1]*D,M[0],M[3]+.5*U[3]*D,U[1],Y[1]),G[0]&&C.drawLine(M[0]-.5*U[0]*D,M[1],M[2]+.5*U[2]*D,M[1],U[0],Y[0]),G[3]&&C.drawLine(M[2],M[1]-.5*U[1]*D,M[2],M[3]+.5*U[3]*D,U[3],Y[3]),G[2]&&C.drawLine(M[0]-.5*U[0]*D,M[3],M[2]+.5*U[2]*D,M[3],U[2],Y[2]),S.bind();for(var k=0;k<2;++k)S.drawTicks(k);this.titleEnable&&S.drawTitle();for(var ee=this.overlays,k=0;k<ee.length;++k)ee[k].draw();l.disable(l.SCISSOR_TEST),l.disable(l.BLEND),l.depthMask(!0)}}}(),b.drawPick=function(){return function(){if(!this.static){var l=this.pickBuffer;this.gl,this._pickTimeout=null,l.begin();for(var m=1,M=this.objects,L=0;L<M.length;++L)m=M[L].drawPick(m);l.end()}}}(),b.pick=function(){return function(l,m){if(!this.static){var M=this.pixelRatio,L=this.pickPixelRatio,D=this.viewBox,A=Math.round((l-D[0]/M)*L)|0,C=Math.round((m-D[1]/M)*L)|0,S=this.pickBuffer.query(A,C,this.pickRadius);if(!S)return null;for(var o=S.id+(S.value[0]<<8)+(S.value[1]<<16)+(S.value[2]<<24),R=this.objects,T=0;T<R.length;++T){var O=R[T].pick(A,C,o);if(O)return O}return null}}}();function p(l){for(var m=l.slice(),M=0;M<m.length;++M)m[M]=m[M].slice();return m}function E(l,m){return l.x-m.x}b.setScreenBox=function(l){var m=this.screenBox,M=this.pixelRatio;m[0]=Math.round(l[0]*M)|0,m[1]=Math.round(l[1]*M)|0,m[2]=Math.round(l[2]*M)|0,m[3]=Math.round(l[3]*M)|0,this.setDirty()},b.setDataBox=function(l){var m=this.dataBox,M=m[0]!==l[0]||m[1]!==l[1]||m[2]!==l[2]||m[3]!==l[3];M&&(m[0]=l[0],m[1]=l[1],m[2]=l[2],m[3]=l[3],this.setDirty())},b.setViewBox=function(l){var m=this.pixelRatio,M=this.viewBox;M[0]=Math.round(l[0]*m)|0,M[1]=Math.round(l[1]*m)|0,M[2]=Math.round(l[2]*m)|0,M[3]=Math.round(l[3]*m)|0;var L=this.pickPixelRatio;this.pickBuffer.shape=[Math.round((l[2]-l[0])*L)|0,Math.round((l[3]-l[1])*L)|0],this.setDirty()},b.update=function(l){l=l||{};var m=this.gl;this.pixelRatio=l.pixelRatio||1;var M=this.pixelRatio;this.pickPixelRatio=Math.max(M,1),this.setScreenBox(l.screenBox||[0,0,m.drawingBufferWidth/M,m.drawingBufferHeight/M]),this.screenBox,this.setViewBox(l.viewBox||[.125*(this.screenBox[2]-this.screenBox[0])/M,.125*(this.screenBox[3]-this.screenBox[1])/M,.875*(this.screenBox[2]-this.screenBox[0])/M,.875*(this.screenBox[3]-this.screenBox[1])/M]);var L=this.viewBox,D=(L[2]-L[0])/(L[3]-L[1]);this.setDataBox(l.dataBox||[-10,-10/D,10,10/D]),this.borderColor=l.borderColor!==!1?(l.borderColor||[0,0,0,0]).slice():!1,this.backgroundColor=(l.backgroundColor||[0,0,0,0]).slice(),this.gridLineEnable=(l.gridLineEnable||[!0,!0]).slice(),this.gridLineWidth=(l.gridLineWidth||[1,1]).slice(),this.gridLineColor=p(l.gridLineColor||[[.5,.5,.5,1],[.5,.5,.5,1]]),this.zeroLineEnable=(l.zeroLineEnable||[!0,!0]).slice(),this.zeroLineWidth=(l.zeroLineWidth||[4,4]).slice(),this.zeroLineColor=p(l.zeroLineColor||[[0,0,0,1],[0,0,0,1]]),this.tickMarkLength=(l.tickMarkLength||[0,0,0,0]).slice(),this.tickMarkWidth=(l.tickMarkWidth||[0,0,0,0]).slice(),this.tickMarkColor=p(l.tickMarkColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.titleCenter=(l.titleCenter||[.5*(L[0]+L[2])/M,(L[3]+120)/M]).slice(),this.titleEnable=!("titleEnable"in l)||!!l.titleEnable,this.titleAngle=l.titleAngle||0,this.titleColor=(l.titleColor||[0,0,0,1]).slice(),this.labelPad=(l.labelPad||[15,15,15,15]).slice(),this.labelAngle=(l.labelAngle||[0,Math.PI/2,0,3*Math.PI/2]).slice(),this.labelEnable=(l.labelEnable||[!0,!0,!0,!0]).slice(),this.labelColor=p(l.labelColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.tickPad=(l.tickPad||[15,15,15,15]).slice(),this.tickAngle=(l.tickAngle||[0,0,0,0]).slice(),this.tickEnable=(l.tickEnable||[!0,!0,!0,!0]).slice(),this.tickColor=p(l.tickColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.borderLineEnable=(l.borderLineEnable||[!0,!0,!0,!0]).slice(),this.borderLineWidth=(l.borderLineWidth||[2,2,2,2]).slice(),this.borderLineColor=p(l.borderLineColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]);var A=l.ticks||[[],[]],C=this._tickBounds;C[0]=C[1]=1/0,C[2]=C[3]=-1/0;for(var S=0;S<2;++S){var o=A[S].slice(0);o.length!==0&&(o.sort(E),C[S]=Math.min(C[S],o[0].x),C[S+2]=Math.max(C[S+2],o[o.length-1].x))}this.grid.update({bounds:C,ticks:A}),this.text.update({bounds:C,ticks:A,labels:l.labels||["x","y"],labelSize:l.labelSize||[12,12],labelFont:l.labelFont||["sans-serif","sans-serif"],title:l.title||"",titleSize:l.titleSize||18,titleFont:l.titleFont||"sans-serif"}),this.static=!!l.static,this.setDirty()},b.dispose=function(){this.box.dispose(),this.grid.dispose(),this.text.dispose(),this.line.dispose();for(var l=this.objects.length-1;l>=0;--l)this.objects[l].dispose();this.objects.length=0;for(var l=this.overlays.length-1;l>=0;--l)this.overlays[l].dispose();this.overlays.length=0,this.gl=null},b.addObject=function(l){this.objects.indexOf(l)<0&&(this.objects.push(l),this.setDirty())},b.removeObject=function(l){for(var m=this.objects,M=0;M<m.length;++M)if(m[M]===l){m.splice(M,1),this.setDirty();break}},b.addOverlay=function(l){this.overlays.indexOf(l)<0&&(this.overlays.push(l),this.setOverlayDirty())},b.removeOverlay=function(l){for(var m=this.overlays,M=0;M<m.length;++M)if(m[M]===l){m.splice(M,1),this.setOverlayDirty();break}};function c(l){var m=l.gl,M=n(m,[m.drawingBufferWidth,m.drawingBufferHeight]),L=new h(m,M);return L.grid=u(L),L.text=i(L),L.line=f(L),L.box=g(L),L.update(l),L}},4296:function(v,y,r){v.exports=b;var n=r(8161),u=r(1152),i=r(6145),f=r(6475),g=r(2565),h=r(5233);function b(p,E){p=p||document.body,E=E||{};var c=[.01,1/0];"distanceLimits"in E&&(c[0]=E.distanceLimits[0],c[1]=E.distanceLimits[1]),"zoomMin"in E&&(c[0]=E.zoomMin),"zoomMax"in E&&(c[1]=E.zoomMax);var l=u({center:E.center||[0,0,0],up:E.up||[0,1,0],eye:E.eye||[0,0,10],mode:E.mode||"orbit",distanceLimits:c}),m=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=0,L=p.clientWidth,D=p.clientHeight,A={keyBindingMode:"rotate",enableWheel:!0,view:l,element:p,delay:E.delay||16,rotateSpeed:E.rotateSpeed||1,zoomSpeed:E.zoomSpeed||1,translateSpeed:E.translateSpeed||1,flipX:!!E.flipX,flipY:!!E.flipY,modes:l.modes,_ortho:E._ortho||E.projection&&E.projection.type==="orthographic"||!1,tick:function(){var C=n(),S=this.delay,o=C-2*S;l.idle(C-S),l.recalcMatrix(o),l.flush(C-(100+S*2));for(var R=!0,T=l.computedMatrix,O=0;O<16;++O)R=R&&m[O]===T[O],m[O]=T[O];var N=p.clientWidth===L&&p.clientHeight===D;return L=p.clientWidth,D=p.clientHeight,R?!N:(M=Math.exp(l.computedRadius[0]),!0)},lookAt:function(C,S,o){l.lookAt(l.lastT(),C,S,o)},rotate:function(C,S,o){l.rotate(l.lastT(),C,S,o)},pan:function(C,S,o){l.pan(l.lastT(),C,S,o)},translate:function(C,S,o){l.translate(l.lastT(),C,S,o)}};return Object.defineProperties(A,{matrix:{get:function(){return l.computedMatrix},set:function(C){return l.setMatrix(l.lastT(),C),l.computedMatrix},enumerable:!0},mode:{get:function(){return l.getMode()},set:function(C){var S=l.computedUp.slice(),o=l.computedEye.slice(),R=l.computedCenter.slice();if(l.setMode(C),C==="turntable"){var T=n();l._active.lookAt(T,o,R,S),l._active.lookAt(T+500,o,R,[0,0,1]),l._active.flush(T)}return l.getMode()},enumerable:!0},center:{get:function(){return l.computedCenter},set:function(C){return l.lookAt(l.lastT(),null,C),l.computedCenter},enumerable:!0},eye:{get:function(){return l.computedEye},set:function(C){return l.lookAt(l.lastT(),C),l.computedEye},enumerable:!0},up:{get:function(){return l.computedUp},set:function(C){return l.lookAt(l.lastT(),null,null,C),l.computedUp},enumerable:!0},distance:{get:function(){return M},set:function(C){return l.setDistance(l.lastT(),C),C},enumerable:!0},distanceLimits:{get:function(){return l.getDistanceLimits(c)},set:function(C){return l.setDistanceLimits(C),C},enumerable:!0}}),p.addEventListener("contextmenu",function(C){return C.preventDefault(),!1}),A._lastX=-1,A._lastY=-1,A._lastMods={shift:!1,control:!1,alt:!1,meta:!1},A.enableMouseListeners=function(){A.mouseListener=i(p,C),p.addEventListener("touchstart",function(S){var o=g(S.changedTouches[0],p);C(0,o[0],o[1],A._lastMods),C(1,o[0],o[1],A._lastMods)},h?{passive:!0}:!1),p.addEventListener("touchmove",function(S){var o=g(S.changedTouches[0],p);C(1,o[0],o[1],A._lastMods),S.preventDefault()},h?{passive:!1}:!1),p.addEventListener("touchend",function(S){C(0,A._lastX,A._lastY,A._lastMods)},h?{passive:!0}:!1);function C(S,o,R,T){var O=A.keyBindingMode;if(O!==!1){var N=O==="rotate",H=O==="pan",k=O==="zoom",V=!!T.control,G=!!T.alt,U=!!T.shift,Y=!!(S&1),ee=!!(S&2),re=!!(S&4),ie=1/p.clientHeight,se=ie*(o-A._lastX),ce=ie*(R-A._lastY),q=A.flipX?1:-1,j=A.flipY?1:-1,Z=Math.PI*A.rotateSpeed,Q=n();if(A._lastX!==-1&&A._lastY!==-1&&((N&&Y&&!V&&!G&&!U||Y&&!V&&!G&&U)&&l.rotate(Q,q*Z*se,-j*Z*ce,0),(H&&Y&&!V&&!G&&!U||ee||Y&&V&&!G&&!U)&&l.pan(Q,-A.translateSpeed*se*M,A.translateSpeed*ce*M,0),k&&Y&&!V&&!G&&!U||re||Y&&!V&&G&&!U)){var ue=-A.zoomSpeed*ce/window.innerHeight*(Q-l.lastT())*100;l.pan(Q,0,0,M*(Math.exp(ue)-1))}return A._lastX=o,A._lastY=R,A._lastMods=T,!0}}A.wheelListener=f(p,function(S,o){if(A.keyBindingMode!==!1&&A.enableWheel){var R=A.flipX?1:-1,T=A.flipY?1:-1,O=n();if(Math.abs(S)>Math.abs(o))l.rotate(O,0,0,-S*R*Math.PI*A.rotateSpeed/window.innerWidth);else if(!A._ortho){var N=-A.zoomSpeed*T*o/window.innerHeight*(O-l.lastT())/20;l.pan(O,0,0,M*(Math.exp(N)-1))}}},!0)},A.enableMouseListeners(),A}},8245:function(v,y,r){var n=r(6832),u=r(5158),i=n([`precision mediump float;
#define GLSLIFY 1
attribute vec2 position;
varying vec2 uv;
void main() {
uv = position;
gl_Position = vec4(position, 0, 1);
}`]),f=n([`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);
}`]);v.exports=function(g){return u(g,i,f,null,[{name:"position",type:"vec2"}])}},1059:function(v,y,r){var n=r(4296),u=r(7453),i=r(2771),f=r(6496),g=r(2611),h=r(4234),b=r(8126),p=r(6145),E=r(1120),c=r(5268),l=r(8245),m=r(2861)({tablet:!0,featureDetect:!0});v.exports={createScene:C,createCamera:n};function M(){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 L(o,R){var T=null;try{T=o.getContext("webgl",R),T||(T=o.getContext("experimental-webgl",R))}catch{return null}return T}function D(o){var R=Math.round(Math.log(Math.abs(o))/Math.log(10));if(R<0){var T=Math.round(Math.pow(10,-R));return Math.ceil(o*T)/T}else if(R>0){var T=Math.round(Math.pow(10,R));return Math.ceil(o/T)*T}return Math.ceil(o)}function A(o){return typeof o=="boolean"?o:!0}function C(o){o=o||{},o.camera=o.camera||{};var R=o.canvas;if(!R)if(R=document.createElement("canvas"),o.container){var T=o.container;T.appendChild(R)}else document.body.appendChild(R);var O=o.gl;if(O||(o.glOptions&&(m=!!o.glOptions.preserveDrawingBuffer),O=L(R,o.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:m})),!O)throw new Error("webgl not supported");var N=o.bounds||[[-10,-10,-10],[10,10,10]],H=new M,k=h(O,O.drawingBufferWidth,O.drawingBufferHeight,{preferFloat:!m}),V=l(O),G=o.cameraObject&&o.cameraObject._ortho===!0||o.camera.projection&&o.camera.projection.type==="orthographic"||!1,U={eye:o.camera.eye||[2,0,0],center:o.camera.center||[0,0,0],up:o.camera.up||[0,1,0],zoomMin:o.camera.zoomMax||.1,zoomMax:o.camera.zoomMin||100,mode:o.camera.mode||"turntable",_ortho:G},Y=o.axes||{},ee=u(O,Y);ee.enable=!Y.disable;var re=o.spikes||{},ie=f(O,re),se=[],ce=[],q=[],j=[],Z=!0,te=!0,Q=new Array(16),ue=new Array(16),fe={view:null,projection:Q,model:ue,_ortho:!1},te=!0,ne=[O.drawingBufferWidth,O.drawingBufferHeight],ve=o.cameraObject||n(R,U),le={gl:O,contextLost:!1,pixelRatio:o.pixelRatio||1,canvas:R,selection:H,camera:ve,axes:ee,axesPixels:null,spikes:ie,bounds:N,objects:se,shape:ne,aspect:o.aspectRatio||[1,1,1],pickRadius:o.pickRadius||10,zNear:o.zNear||.01,zFar:o.zFar||1e3,fovy:o.fovy||Math.PI/4,clearColor:o.clearColor||[0,0,0,0],autoResize:A(o.autoResize),autoBounds:A(o.autoBounds),autoScale:!!o.autoScale,autoCenter:A(o.autoCenter),clipToBounds:A(o.clipToBounds),snapToData:!!o.snapToData,onselect:o.onselect||null,onrender:o.onrender||null,onclick:o.onclick||null,cameraParams:fe,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(Ve){this.aspect[0]=Ve.x,this.aspect[1]=Ve.y,this.aspect[2]=Ve.z,te=!0},setBounds:function(Ve,Ye){this.bounds[0][Ve]=Ye.min,this.bounds[1][Ve]=Ye.max},setClearColor:function(Ve){this.clearColor=Ve},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)}},xe=[O.drawingBufferWidth/le.pixelRatio|0,O.drawingBufferHeight/le.pixelRatio|0];function Se(){if(!le._stopped&&le.autoResize){var Ve=R.parentNode,Ye=1,Ne=1;Ve&&Ve!==document.body?(Ye=Ve.clientWidth,Ne=Ve.clientHeight):(Ye=window.innerWidth,Ne=window.innerHeight);var Xe=Math.ceil(Ye*le.pixelRatio)|0,ht=Math.ceil(Ne*le.pixelRatio)|0;if(Xe!==R.width||ht!==R.height){R.width=Xe,R.height=ht;var st=R.style;st.position=st.position||"absolute",st.left="0px",st.top="0px",st.width=Ye+"px",st.height=Ne+"px",Z=!0}}}le.autoResize&&Se(),window.addEventListener("resize",Se);function Re(){for(var Ve=se.length,Ye=j.length,Ne=0;Ne<Ye;++Ne)q[Ne]=0;e:for(var Ne=0;Ne<Ve;++Ne){var Xe=se[Ne],ht=Xe.pickSlots;if(!ht){ce[Ne]=-1;continue}for(var st=0;st<Ye;++st)if(q[st]+ht<255){ce[Ne]=st,Xe.setPickBase(q[st]+1),q[st]+=ht;continue e}var it=g(O,ne);ce[Ne]=Ye,j.push(it),q.push(ht),Xe.setPickBase(1),Ye+=1}for(;Ye>0&&q[Ye-1]===0;)q.pop(),j.pop().dispose()}le.update=function(Ve){le._stopped||(Z=!0,te=!0)},le.add=function(Ve){le._stopped||(Ve.axes=ee,se.push(Ve),ce.push(-1),Z=!0,te=!0,Re())},le.remove=function(Ve){if(!le._stopped){var Ye=se.indexOf(Ve);Ye<0||(se.splice(Ye,1),ce.pop(),Z=!0,te=!0,Re())}},le.dispose=function(){if(!le._stopped&&(le._stopped=!0,window.removeEventListener("resize",Se),R.removeEventListener("webglcontextlost",Ee),le.mouseListener.enabled=!1,!le.contextLost)){ee.dispose(),ie.dispose();for(var Ve=0;Ve<se.length;++Ve)se[Ve].dispose();k.dispose();for(var Ve=0;Ve<j.length;++Ve)j[Ve].dispose();V.dispose(),O=null,ee=null,ie=null,se=[]}},le._mouseRotating=!1,le._prevButtons=0,le.enableMouseListeners=function(){le.mouseListener=p(R,function(Ve,Ye,Ne){if(!le._stopped){var Xe=j.length,ht=se.length,st=H.object;H.distance=1/0,H.mouse[0]=Ye,H.mouse[1]=Ne,H.object=null,H.screen=null,H.dataCoordinate=H.dataPosition=null;var it=!1;if(Ve&&le._prevButtons)le._mouseRotating=!0;else{le._mouseRotating&&(te=!0),le._mouseRotating=!1;for(var nt=0;nt<Xe;++nt){var pt=j[nt].query(Ye,xe[1]-Ne-1,le.pickRadius);if(pt){if(pt.distance>H.distance)continue;for(var Tt=0;Tt<ht;++Tt){var Et=se[Tt];if(ce[Tt]===nt){var Dt=Et.pick(pt);Dt&&(H.buttons=Ve,H.screen=pt.coord,H.distance=pt.distance,H.object=Et,H.index=Dt.distance,H.dataPosition=Dt.position,H.dataCoordinate=Dt.dataCoordinate,H.data=Dt,it=!0)}}}}}st&&st!==H.object&&(st.highlight&&st.highlight(null),Z=!0),H.object&&(H.object.highlight&&H.object.highlight(H.data),Z=!0),it=it||H.object!==st,it&&le.onselect&&le.onselect(H),Ve&1&&!(le._prevButtons&1)&&le.onclick&&le.onclick(H),le._prevButtons=Ve}})};function Ee(){if(le.contextLost)return!0;O.isContextLost()&&(le.contextLost=!0,le.mouseListener.enabled=!1,le.selection.object=null,le.oncontextloss&&le.oncontextloss())}R.addEventListener("webglcontextlost",Ee);function Oe(){if(!Ee()){O.colorMask(!0,!0,!0,!0),O.depthMask(!0),O.disable(O.BLEND),O.enable(O.DEPTH_TEST),O.depthFunc(O.LEQUAL);for(var Ve=se.length,Ye=j.length,Ne=0;Ne<Ye;++Ne){var Xe=j[Ne];Xe.shape=xe,Xe.begin();for(var ht=0;ht<Ve;++ht)if(ce[ht]===Ne){var st=se[ht];st.drawPick&&(st.pixelRatio=1,st.drawPick(fe))}Xe.end()}}}var Be=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],Le=[Be[0].slice(),Be[1].slice()];function Te(){if(!Ee()){Se();var Ve=le.camera.tick();fe.view=le.camera.matrix,Z=Z||Ve,te=te||Ve,ee.pixelRatio=le.pixelRatio,ie.pixelRatio=le.pixelRatio;var Ye=se.length,Ne=Be[0],Xe=Be[1];Ne[0]=Ne[1]=Ne[2]=1/0,Xe[0]=Xe[1]=Xe[2]=-1/0;for(var ht=0;ht<Ye;++ht){var st=se[ht];st.pixelRatio=le.pixelRatio,st.axes=le.axes,Z=Z||!!st.dirty,te=te||!!st.dirty;var it=st.bounds;if(it)for(var nt=it[0],pt=it[1],Tt=0;Tt<3;++Tt)Ne[Tt]=Math.min(Ne[Tt],nt[Tt]),Xe[Tt]=Math.max(Xe[Tt],pt[Tt])}var Et=le.bounds;if(le.autoBounds)for(var Tt=0;Tt<3;++Tt){if(Xe[Tt]<Ne[Tt])Ne[Tt]=-1,Xe[Tt]=1;else{Ne[Tt]===Xe[Tt]&&(Ne[Tt]-=1,Xe[Tt]+=1);var Dt=.05*(Xe[Tt]-Ne[Tt]);Ne[Tt]=Ne[Tt]-Dt,Xe[Tt]=Xe[Tt]+Dt}Et[0][Tt]=Ne[Tt],Et[1][Tt]=Xe[Tt]}for(var et=!1,Tt=0;Tt<3;++Tt)et=et||Le[0][Tt]!==Et[0][Tt]||Le[1][Tt]!==Et[1][Tt],Le[0][Tt]=Et[0][Tt],Le[1][Tt]=Et[1][Tt];if(te=te||et,Z=Z||et,!!Z){if(et){for(var Ue=[0,0,0],ht=0;ht<3;++ht)Ue[ht]=D((Et[1][ht]-Et[0][ht])/10);ee.autoTicks?ee.update({bounds:Et,tickSpacing:Ue}):ee.update({bounds:Et})}var ze=O.drawingBufferWidth,rt=O.drawingBufferHeight;ne[0]=ze,ne[1]=rt,xe[0]=Math.max(ze/le.pixelRatio,1)|0,xe[1]=Math.max(rt/le.pixelRatio,1)|0,S(le,G);for(var ht=0;ht<Ye;++ht){var st=se[ht];st.axesBounds=Et,le.clipToBounds&&(st.clipBounds=Et)}H.object&&(le.snapToData?ie.position=H.dataCoordinate:ie.position=H.dataPosition,ie.bounds=Et),te&&(te=!1,Oe()),le.axesPixels=i(le.axes,fe,ze,rt),le.onrender&&le.onrender(),O.bindFramebuffer(O.FRAMEBUFFER,null),O.viewport(0,0,ze,rt),le.clearRGBA(),O.depthMask(!0),O.colorMask(!0,!0,!0,!0),O.enable(O.DEPTH_TEST),O.depthFunc(O.LEQUAL),O.disable(O.BLEND),O.disable(O.CULL_FACE);var lt=!1;ee.enable&&(lt=lt||ee.isTransparent(),ee.draw(fe)),ie.axes=ee,H.object&&ie.draw(fe),O.disable(O.CULL_FACE);for(var ht=0;ht<Ye;++ht){var st=se[ht];st.axes=ee,st.pixelRatio=le.pixelRatio,st.isOpaque&&st.isOpaque()&&st.draw(fe),st.isTransparent&&st.isTransparent()&&(lt=!0)}if(lt){k.shape=ne,k.bind(),O.clear(O.DEPTH_BUFFER_BIT),O.colorMask(!1,!1,!1,!1),O.depthMask(!0),O.depthFunc(O.LESS),ee.enable&&ee.isTransparent()&&ee.drawTransparent(fe);for(var ht=0;ht<Ye;++ht){var st=se[ht];st.isOpaque&&st.isOpaque()&&st.draw(fe)}O.enable(O.BLEND),O.blendEquation(O.FUNC_ADD),O.blendFunc(O.ONE,O.ONE_MINUS_SRC_ALPHA),O.colorMask(!0,!0,!0,!0),O.depthMask(!1),O.clearColor(0,0,0,0),O.clear(O.COLOR_BUFFER_BIT),ee.isTransparent()&&ee.drawTransparent(fe);for(var ht=0;ht<Ye;++ht){var st=se[ht];st.isTransparent&&st.isTransparent()&&st.drawTransparent(fe)}O.bindFramebuffer(O.FRAMEBUFFER,null),O.blendFunc(O.ONE,O.ONE_MINUS_SRC_ALPHA),O.disable(O.DEPTH_TEST),V.bind(),k.color[0].bind(0),V.uniforms.accumBuffer=0,b(O),O.disable(O.BLEND)}Z=!1;for(var ht=0;ht<Ye;++ht)se[ht].dirty=!1}}}function De(){le._stopped||le.contextLost||(Te(),requestAnimationFrame(De))}return le.enableMouseListeners(),De(),le.redraw=function(){le._stopped||(Z=!0,Te())},le}function S(o,R){var T=o.bounds,O=o.cameraParams,N=O.projection,H=O.model,k=o.gl.drawingBufferWidth,V=o.gl.drawingBufferHeight,G=o.zNear,U=o.zFar,Y=o.fovy,ee=k/V;R?(c(N,-ee,ee,-1,1,G,U),O._ortho=!0):(E(N,Y,ee,G,U),O._ortho=!1);for(var re=0;re<16;++re)H[re]=0;H[15]=1;for(var ie=0,re=0;re<3;++re)ie=Math.max(ie,T[1][re]-T[0][re]);for(var re=0;re<3;++re)o.autoScale?H[5*re]=o.aspect[re]/(T[1][re]-T[0][re]):H[5*re]=1/ie,o.autoCenter&&(H[12+re]=-H[5*re]*.5*(T[0][re]+T[1][re]))}},8023:function(v,y,r){var n=r(6832);y.pointVertex=n([`precision mediump float;
#define GLSLIFY 1
attribute vec2 position;
uniform mat3 matrix;
uniform float pointSize;
uniform float pointCloud;
highp float rand(vec2 co) {
highp float a = 12.9898;
highp float b = 78.233;
highp float c = 43758.5453;
highp float d = dot(co.xy, vec2(a, b));
highp float e = mod(d, 3.14);
return fract(sin(e) * c);
}
void main() {
vec3 hgPosition = matrix * vec3(position, 1);
gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);
// if we don't jitter the point size a bit, overall point cloud
// saturation 'jumps' on zooming, which is disturbing and confusing
gl_PointSize = pointSize * ((19.5 + rand(position)) / 20.0);
if(pointCloud != 0.0) { // pointCloud is truthy
// get the same square surface as circle would be
gl_PointSize *= 0.886;
}
}`]),y.pointFragment=n([`precision mediump float;
#define GLSLIFY 1
uniform vec4 color, borderColor;
uniform float centerFraction;
uniform float pointCloud;
void main() {
float radius;
vec4 baseColor;
if(pointCloud != 0.0) { // pointCloud is truthy
if(centerFraction == 1.0) {
gl_FragColor = color;
} else {
gl_FragColor = mix(borderColor, color, centerFraction);
}
} else {
radius = length(2.0 * gl_PointCoord.xy - 1.0);
if(radius > 1.0) {
discard;
}
baseColor = mix(borderColor, color, step(radius, centerFraction));
gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);
}
}
`]),y.pickVertex=n([`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;
}
`]),y.pickFragment=n([`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(v,y,r){var n=r(5158),u=r(5827),i=r(5306),f=r(8023);v.exports=p;function g(E,c,l,m,M){this.plot=E,this.offsetBuffer=c,this.pickBuffer=l,this.shader=m,this.pickShader=M,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 h=g.prototype;h.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},h.update=function(E){var c;E=E||{};function l(S,o){return S in E?E[S]:o}this.sizeMin=l("sizeMin",.5),this.sizeMax=l("sizeMax",20),this.color=l("color",[1,0,0,1]).slice(),this.areaRatio=l("areaRatio",1),this.borderColor=l("borderColor",[0,0,0,1]).slice(),this.blend=l("blend",!1);var m=E.positions.length>>>1,M=E.positions instanceof Float32Array,L=E.idToIndex instanceof Int32Array&&E.idToIndex.length>=m,D=E.positions,A=M?D:i.mallocFloat32(D.length),C=L?E.idToIndex:i.mallocInt32(m);if(M||A.set(D),!L)for(A.set(D),c=0;c<m;c++)C[c]=c;this.points=D,this.offsetBuffer.update(A),this.pickBuffer.update(C),M||i.free(A),L||i.free(C),this.pointCount=m,this.pickOffset=0};function b(E,c){var l=0,m=E.length>>>1,M;for(M=0;M<m;M++){var L=E[M*2],D=E[M*2+1];L>=c[0]&&L<=c[2]&&D>=c[1]&&D<=c[3]&&l++}return l}h.unifiedDraw=function(){var E=[1,0,0,0,1,0,0,0,1],c=[0,0,0,0];return function(l){var m=l!==void 0,M=m?this.pickShader:this.shader,L=this.plot.gl,D=this.plot.dataBox;if(this.pointCount===0)return l;var A=D[2]-D[0],C=D[3]-D[1],S=b(this.points,D),o=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(S,.33333)));E[0]=2/A,E[4]=2/C,E[6]=-2*D[0]/A-1,E[7]=-2*D[1]/C-1,this.offsetBuffer.bind(),M.bind(),M.attributes.position.pointer(),M.uniforms.matrix=E,M.uniforms.color=this.color,M.uniforms.borderColor=this.borderColor,M.uniforms.pointCloud=o<5,M.uniforms.pointSize=o,M.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),m&&(c[0]=l&255,c[1]=l>>8&255,c[2]=l>>16&255,c[3]=l>>24&255,this.pickBuffer.bind(),M.attributes.pickId.pointer(L.UNSIGNED_BYTE),M.uniforms.pickOffset=c,this.pickOffset=l);var R=L.getParameter(L.BLEND),T=L.getParameter(L.DITHER);return R&&!this.blend&&L.disable(L.BLEND),T&&L.disable(L.DITHER),L.drawArrays(L.POINTS,0,this.pointCount),R&&!this.blend&&L.enable(L.BLEND),T&&L.enable(L.DITHER),l+this.pointCount}}(),h.draw=h.unifiedDraw,h.drawPick=h.unifiedDraw,h.pick=function(E,c,l){var m=this.pickOffset,M=this.pointCount;if(l<m||l>=m+M)return null;var L=l-m,D=this.points;return{object:this,pointId:L,dataCoord:[D[2*L],D[2*L+1]]}};function p(E,c){var l=E.gl,m=u(l),M=u(l),L=n(l,f.pointVertex,f.pointFragment),D=n(l,f.pickVertex,f.pickFragment),A=new g(E,m,M,L,D);return A.update(c),E.addObject(A),A}},6093:function(v){v.exports=y;function y(r,n,u,i){var f=n[0],g=n[1],h=n[2],b=n[3],p=u[0],E=u[1],c=u[2],l=u[3],m,M,L,D,A;return M=f*p+g*E+h*c+b*l,M<0&&(M=-M,p=-p,E=-E,c=-c,l=-l),1-M>1e-6?(m=Math.acos(M),L=Math.sin(m),D=Math.sin((1-i)*m)/L,A=Math.sin(i*m)/L):(D=1-i,A=i),r[0]=D*f+A*p,r[1]=D*g+A*E,r[2]=D*h+A*c,r[3]=D*b+A*l,r}},8240:function(v){v.exports=function(y){return!y&&y!==0?"":y.toString()}},4123:function(v,y,r){var n=r(875);v.exports=i;var u={};function i(f,g,h){var b=u[g];if(b||(b=u[g]={}),f in b)return b[f];var p={textAlign:"center",textBaseline:"middle",lineHeight:1,font:g,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};p.triangles=!0;var E=n(f,p);p.triangles=!1;var c=n(f,p),l,m;if(h&&h!==1){for(l=0;l<E.positions.length;++l)for(m=0;m<E.positions[l].length;++m)E.positions[l][m]/=h;for(l=0;l<c.positions.length;++l)for(m=0;m<c.positions[l].length;++m)c.positions[l][m]/=h}var M=[[1/0,1/0],[-1/0,-1/0]],L=c.positions.length;for(l=0;l<L;++l){var D=c.positions[l];for(m=0;m<2;++m)M[0][m]=Math.min(M[0][m],D[m]),M[1][m]=Math.max(M[1][m],D[m])}return b[f]=[E,c,M]}},9282:function(v,y,r){var n=r(5158),u=r(6832),i=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 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;
}
}`]),f=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;
}
}`]),g=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;
}
}
`]),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);
}
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;
}
`]),b=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);
}`]),p=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],E={vertex:i,fragment:h,attributes:p},c={vertex:f,fragment:h,attributes:p},l={vertex:g,fragment:h,attributes:p},m={vertex:i,fragment:b,attributes:p},M={vertex:f,fragment:b,attributes:p},L={vertex:g,fragment:b,attributes:p};function D(A,C){var S=n(A,C),o=S.attributes;return o.position.location=0,o.color.location=1,o.glyph.location=2,o.id.location=3,S}y.createPerspective=function(A){return D(A,E)},y.createOrtho=function(A){return D(A,c)},y.createProject=function(A){return D(A,l)},y.createPickPerspective=function(A){return D(A,m)},y.createPickOrtho=function(A){return D(A,M)},y.createPickProject=function(A){return D(A,L)}},2182:function(v,y,r){var n=r(3596),u=r(5827),i=r(2944),f=r(5306),g=r(104),h=r(9282),b=r(4123),p=r(8240),E=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];v.exports=ce;function c(q,j){var Z=q[0],Q=q[1],ue=q[2],fe=q[3];return q[0]=j[0]*Z+j[4]*Q+j[8]*ue+j[12]*fe,q[1]=j[1]*Z+j[5]*Q+j[9]*ue+j[13]*fe,q[2]=j[2]*Z+j[6]*Q+j[10]*ue+j[14]*fe,q[3]=j[3]*Z+j[7]*Q+j[11]*ue+j[15]*fe,q}function l(q,j,Z,Q){return c(Q,Q),c(Q,Q),c(Q,Q)}function m(q,j){this.index=q,this.dataCoordinate=this.position=j}function M(q){return q===!0||q>1?1:q}function L(q,j,Z,Q,ue,fe,te,ne,ve,le,xe,Se){this.gl=q,this.pixelRatio=1,this.shader=j,this.orthoShader=Z,this.projectShader=Q,this.pointBuffer=ue,this.colorBuffer=fe,this.glyphBuffer=te,this.idBuffer=ne,this.vao=ve,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=le,this.pickOrthoShader=xe,this.pickProjectShader=Se,this.points=[],this._selectResult=new m(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 D=L.prototype;D.pickSlots=1,D.setPickBase=function(q){this.pickId=q},D.isTransparent=function(){if(this.hasAlpha)return!0;for(var q=0;q<3;++q)if(this.axesProject[q]&&this.projectHasAlpha)return!0;return!1},D.isOpaque=function(){if(!this.hasAlpha)return!0;for(var q=0;q<3;++q)if(this.axesProject[q]&&!this.projectHasAlpha)return!0;return!1};var A=[0,0],C=[0,0,0],S=[0,0,0],o=[0,0,0,1],R=[0,0,0,1],T=E.slice(),O=[0,0,0],N=[[0,0,0],[0,0,0]];function H(q){return q[0]=q[1]=q[2]=0,q}function k(q,j){return q[0]=j[0],q[1]=j[1],q[2]=j[2],q[3]=1,q}function V(q,j,Z,Q){return q[0]=j[0],q[1]=j[1],q[2]=j[2],q[Z]=Q,q}function G(q){for(var j=N,Z=0;Z<2;++Z)for(var Q=0;Q<3;++Q)j[Z][Q]=Math.max(Math.min(q[Z][Q],1e8),-1e8);return j}function U(q,j,Z,Q){var ue=j.axesProject,fe=j.gl,te=q.uniforms,ne=Z.model||E,ve=Z.view||E,le=Z.projection||E,xe=j.axesBounds,Se=G(j.clipBounds),Re;j.axes&&j.axes.lastCubeProps?Re=j.axes.lastCubeProps.axis:Re=[1,1,1],A[0]=2/fe.drawingBufferWidth,A[1]=2/fe.drawingBufferHeight,q.bind(),te.view=ve,te.projection=le,te.screenSize=A,te.highlightId=j.highlightId,te.highlightScale=j.highlightScale,te.clipBounds=Se,te.pickGroup=j.pickId/255,te.pixelRatio=Q;for(var Ee=0;Ee<3;++Ee)if(ue[Ee]){te.scale=j.projectScale[Ee],te.opacity=j.projectOpacity[Ee];for(var Oe=T,Be=0;Be<16;++Be)Oe[Be]=0;for(var Be=0;Be<4;++Be)Oe[5*Be]=1;Oe[5*Ee]=0,Re[Ee]<0?Oe[12+Ee]=xe[0][Ee]:Oe[12+Ee]=xe[1][Ee],g(Oe,ne,Oe),te.model=Oe;var Le=(Ee+1)%3,Te=(Ee+2)%3,De=H(C),Ve=H(S);De[Le]=1,Ve[Te]=1;var Ye=l(le,ve,ne,k(o,De)),Ne=l(le,ve,ne,k(R,Ve));if(Math.abs(Ye[1])>Math.abs(Ne[1])){var Xe=Ye;Ye=Ne,Ne=Xe,Xe=De,De=Ve,Ve=Xe;var ht=Le;Le=Te,Te=ht}Ye[0]<0&&(De[Le]=-1),Ne[1]>0&&(Ve[Te]=-1);for(var st=0,it=0,Be=0;Be<4;++Be)st+=Math.pow(ne[4*Le+Be],2),it+=Math.pow(ne[4*Te+Be],2);De[Le]/=Math.sqrt(st),Ve[Te]/=Math.sqrt(it),te.axes[0]=De,te.axes[1]=Ve,te.fragClipBounds[0]=V(O,Se[0],Ee,-1e8),te.fragClipBounds[1]=V(O,Se[1],Ee,1e8),j.vao.bind(),j.vao.draw(fe.TRIANGLES,j.vertexCount),j.lineWidth>0&&(fe.lineWidth(j.lineWidth*Q),j.vao.draw(fe.LINES,j.lineVertexCount,j.vertexCount)),j.vao.unbind()}}var Y=[-1e8,-1e8,-1e8],ee=[1e8,1e8,1e8],re=[Y,ee];function ie(q,j,Z,Q,ue,fe,te){var ne=Z.gl;if((fe===Z.projectHasAlpha||te)&&U(j,Z,Q,ue),fe===Z.hasAlpha||te){q.bind();var ve=q.uniforms;ve.model=Q.model||E,ve.view=Q.view||E,ve.projection=Q.projection||E,A[0]=2/ne.drawingBufferWidth,A[1]=2/ne.drawingBufferHeight,ve.screenSize=A,ve.highlightId=Z.highlightId,ve.highlightScale=Z.highlightScale,ve.fragClipBounds=re,ve.clipBounds=Z.axes.bounds,ve.opacity=Z.opacity,ve.pickGroup=Z.pickId/255,ve.pixelRatio=ue,Z.vao.bind(),Z.vao.draw(ne.TRIANGLES,Z.vertexCount),Z.lineWidth>0&&(ne.lineWidth(Z.lineWidth*ue),Z.vao.draw(ne.LINES,Z.lineVertexCount,Z.vertexCount)),Z.vao.unbind()}}D.draw=function(q){var j=this.useOrtho?this.orthoShader:this.shader;ie(j,this.projectShader,this,q,this.pixelRatio,!1,!1)},D.drawTransparent=function(q){var j=this.useOrtho?this.orthoShader:this.shader;ie(j,this.projectShader,this,q,this.pixelRatio,!0,!1)},D.drawPick=function(q){var j=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;ie(j,this.pickProjectShader,this,q,1,!0,!0)},D.pick=function(q){if(!q||q.id!==this.pickId)return null;var j=q.value[2]+(q.value[1]<<8)+(q.value[0]<<16);if(j>=this.pointCount||j<0)return null;var Z=this.points[j],Q=this._selectResult;Q.index=j;for(var ue=0;ue<3;++ue)Q.position[ue]=Q.dataCoordinate[ue]=Z[ue];return Q},D.highlight=function(q){if(!q)this.highlightId=[1,1,1,1];else{var j=q.index,Z=j&255,Q=j>>8&255,ue=j>>16&255;this.highlightId=[Z/255,Q/255,ue/255,0]}};function se(q,j,Z,Q){var ue;Array.isArray(q)?j<q.length?ue=q[j]:ue=void 0:ue=q,ue=p(ue);var fe=!0;n(ue)&&(ue="▼",fe=!1);var te=b(ue,Z,Q);return{mesh:te[0],lines:te[1],bounds:te[2],visible:fe}}D.update=function(q){if(q=q||{},"perspective"in q&&(this.useOrtho=!q.perspective),"orthographic"in q&&(this.useOrtho=!!q.orthographic),"lineWidth"in q&&(this.lineWidth=q.lineWidth),"project"in q)if(Array.isArray(q.project))this.axesProject=q.project;else{var j=!!q.project;this.axesProject=[j,j,j]}if("projectScale"in q)if(Array.isArray(q.projectScale))this.projectScale=q.projectScale.slice();else{var Z=+q.projectScale;this.projectScale=[Z,Z,Z]}if(this.projectHasAlpha=!1,"projectOpacity"in q){if(Array.isArray(q.projectOpacity))this.projectOpacity=q.projectOpacity.slice();else{var Z=+q.projectOpacity;this.projectOpacity=[Z,Z,Z]}for(var Q=0;Q<3;++Q)this.projectOpacity[Q]=M(this.projectOpacity[Q]),this.projectOpacity[Q]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in q&&(this.opacity=M(q.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var ue=q.position,fe=q.font||"normal",te=q.alignment||[0,0],ne,ve;if(te.length===2)ne=te[0],ve=te[1];else{ne=[],ve=[];for(var Q=0;Q<te.length;++Q)ne[Q]=te[Q][0],ve[Q]=te[Q][1]}var le=[1/0,1/0,1/0],xe=[-1/0,-1/0,-1/0],Se=q.glyph,Re=q.color,Ee=q.size,Oe=q.angle,Be=q.lineColor,Le=-1,Te=0,De=0,Ve=0;if(ue.length){Ve=ue.length;e:for(var Q=0;Q<Ve;++Q){for(var Ye=ue[Q],Ne=0;Ne<3;++Ne)if(isNaN(Ye[Ne])||!isFinite(Ye[Ne]))continue e;var Xe=se(Se,Q,fe,this.pixelRatio),ht=Xe.mesh,st=Xe.lines,it=Xe.bounds;Te+=ht.cells.length*3,De+=st.edges.length*2}}var nt=Te+De,pt=f.mallocFloat(3*nt),Tt=f.mallocFloat(4*nt),Et=f.mallocFloat(2*nt),Dt=f.mallocUint32(nt);if(nt>0){var et=0,Ue=Te,ze=[0,0,0,1],rt=[0,0,0,1],lt=Array.isArray(Re)&&Array.isArray(Re[0]),Qe=Array.isArray(Be)&&Array.isArray(Be[0]);e:for(var Q=0;Q<Ve;++Q){Le+=1;for(var Ye=ue[Q],Ne=0;Ne<3;++Ne){if(isNaN(Ye[Ne])||!isFinite(Ye[Ne]))continue e;xe[Ne]=Math.max(xe[Ne],Ye[Ne]),le[Ne]=Math.min(le[Ne],Ye[Ne])}var Xe=se(Se,Q,fe,this.pixelRatio),ht=Xe.mesh,st=Xe.lines,it=Xe.bounds,Fe=Xe.visible;if(!Fe)ze=[1,1,1,0];else if(Array.isArray(Re)){var Ce;if(lt?Q<Re.length?Ce=Re[Q]:Ce=[0,0,0,0]:Ce=Re,Ce.length===3){for(var Ne=0;Ne<3;++Ne)ze[Ne]=Ce[Ne];ze[3]=1}else if(Ce.length===4){for(var Ne=0;Ne<4;++Ne)ze[Ne]=Ce[Ne];!this.hasAlpha&&Ce[3]<1&&(this.hasAlpha=!0)}}else ze[0]=ze[1]=ze[2]=0,ze[3]=1;if(!Fe)rt=[1,1,1,0];else if(Array.isArray(Be)){var Ce;if(Qe?Q<Be.length?Ce=Be[Q]:Ce=[0,0,0,0]:Ce=Be,Ce.length===3){for(var Ne=0;Ne<3;++Ne)rt[Ne]=Ce[Ne];rt[Ne]=1}else if(Ce.length===4){for(var Ne=0;Ne<4;++Ne)rt[Ne]=Ce[Ne];!this.hasAlpha&&Ce[3]<1&&(this.hasAlpha=!0)}}else rt[0]=rt[1]=rt[2]=0,rt[3]=1;var pe=.5;Fe?Array.isArray(Ee)?Q<Ee.length?pe=+Ee[Q]:pe=12:Ee?pe=+Ee:this.useOrtho&&(pe=12):pe=0;var we=0;Array.isArray(Oe)?Q<Oe.length?we=+Oe[Q]:we=0:Oe&&(we=+Oe);for(var Ae=Math.cos(we),Pe=Math.sin(we),Ye=ue[Q],Ne=0;Ne<3;++Ne)xe[Ne]=Math.max(xe[Ne],Ye[Ne]),le[Ne]=Math.min(le[Ne],Ye[Ne]);var Ge=ne,We=ve,Ge=0;Array.isArray(ne)?Q<ne.length?Ge=ne[Q]:Ge=0:ne&&(Ge=ne);var We=0;Array.isArray(ve)?Q<ve.length?We=ve[Q]:We=0:ve&&(We=ve),Ge*=Ge>0?1-it[0][0]:Ge<0?1+it[1][0]:1,We*=We>0?1-it[0][1]:We<0?1+it[1][1]:1;for(var tt=[Ge,We],Bt=ht.cells||[],Wt=ht.positions||[],Ne=0;Ne<Bt.length;++Ne)for(var ct=Bt[Ne],St=0;St<3;++St){for(var Pt=0;Pt<3;++Pt)pt[3*et+Pt]=Ye[Pt];for(var Pt=0;Pt<4;++Pt)Tt[4*et+Pt]=ze[Pt];Dt[et]=Le;var wt=Wt[ct[St]];Et[2*et]=pe*(Ae*wt[0]-Pe*wt[1]+tt[0]),Et[2*et+1]=pe*(Pe*wt[0]+Ae*wt[1]+tt[1]),et+=1}for(var Bt=st.edges,Wt=st.positions,Ne=0;Ne<Bt.length;++Ne)for(var ct=Bt[Ne],St=0;St<2;++St){for(var Pt=0;Pt<3;++Pt)pt[3*Ue+Pt]=Ye[Pt];for(var Pt=0;Pt<4;++Pt)Tt[4*Ue+Pt]=rt[Pt];Dt[Ue]=Le;var wt=Wt[ct[St]];Et[2*Ue]=pe*(Ae*wt[0]-Pe*wt[1]+tt[0]),Et[2*Ue+1]=pe*(Pe*wt[0]+Ae*wt[1]+tt[1]),Ue+=1}}}this.bounds=[le,xe],this.points=ue,this.pointCount=ue.length,this.vertexCount=Te,this.lineVertexCount=De,this.pointBuffer.update(pt),this.colorBuffer.update(Tt),this.glyphBuffer.update(Et),this.idBuffer.update(Dt),f.free(pt),f.free(Tt),f.free(Et),f.free(Dt)},D.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()};function ce(q){var j=q.gl,Z=h.createPerspective(j),Q=h.createOrtho(j),ue=h.createProject(j),fe=h.createPickPerspective(j),te=h.createPickOrtho(j),ne=h.createPickProject(j),ve=u(j),le=u(j),xe=u(j),Se=u(j),Re=i(j,[{buffer:ve,size:3,type:j.FLOAT},{buffer:le,size:4,type:j.FLOAT},{buffer:xe,size:2,type:j.FLOAT},{buffer:Se,size:4,type:j.UNSIGNED_BYTE,normalized:!0}]),Ee=new L(j,Z,Q,ue,ve,le,xe,Se,Re,fe,te,ne);return Ee.update(q),Ee}},1884:function(v,y,r){var n=r(6832);y.boxVertex=n([`precision mediump float;
#define GLSLIFY 1
attribute vec2 vertex;
uniform vec2 cornerA, cornerB;
void main() {
gl_Position = vec4(mix(cornerA, cornerB, vertex), 0, 1);
}
`]),y.boxFragment=n([`precision mediump float;
#define GLSLIFY 1
uniform vec4 color;
void main() {
gl_FragColor = color;
}
`])},6623:function(v,y,r){var n=r(5158),u=r(5827),i=r(1884);v.exports=h;function f(b,p,E){this.plot=b,this.boxBuffer=p,this.boxShader=E,this.enabled=!0,this.selectBox=[1/0,1/0,-1/0,-1/0],this.borderColor=[0,0,0,1],this.innerFill=!1,this.innerColor=[0,0,0,.25],this.outerFill=!0,this.outerColor=[0,0,0,.5],this.borderWidth=10}var g=f.prototype;g.draw=function(){if(this.enabled){var b=this.plot,p=this.selectBox,E=this.borderWidth;this.innerFill;var c=this.innerColor;this.outerFill;var l=this.outerColor,m=this.borderColor,M=b.box,L=b.screenBox,D=b.dataBox,A=b.viewBox,C=b.pixelRatio,S=(p[0]-D[0])*(A[2]-A[0])/(D[2]-D[0])+A[0],o=(p[1]-D[1])*(A[3]-A[1])/(D[3]-D[1])+A[1],R=(p[2]-D[0])*(A[2]-A[0])/(D[2]-D[0])+A[0],T=(p[3]-D[1])*(A[3]-A[1])/(D[3]-D[1])+A[1];if(S=Math.max(S,A[0]),o=Math.max(o,A[1]),R=Math.min(R,A[2]),T=Math.min(T,A[3]),!(R<S||T<o)){M.bind();var O=L[2]-L[0],N=L[3]-L[1];if(this.outerFill&&(M.drawBox(0,0,O,o,l),M.drawBox(0,o,S,T,l),M.drawBox(0,T,O,N,l),M.drawBox(R,o,O,T,l)),this.innerFill&&M.drawBox(S,o,R,T,c),E>0){var H=E*C;M.drawBox(S-H,o-H,R+H,o+H,m),M.drawBox(S-H,T-H,R+H,T+H,m),M.drawBox(S-H,o-H,S+H,T+H,m),M.drawBox(R-H,o-H,R+H,T+H,m)}}}},g.update=function(b){b=b||{},this.innerFill=!!b.innerFill,this.outerFill=!!b.outerFill,this.innerColor=(b.innerColor||[0,0,0,.5]).slice(),this.outerColor=(b.outerColor||[0,0,0,.5]).slice(),this.borderColor=(b.borderColor||[0,0,0,1]).slice(),this.borderWidth=b.borderWidth||0,this.selectBox=(b.selectBox||this.selectBox).slice()},g.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)};function h(b,p){var E=b.gl,c=u(E,[0,0,0,1,1,0,1,1]),l=n(E,i.boxVertex,i.boxFragment),m=new f(b,c,l);return m.update(p),b.addOverlay(m),m}},2611:function(v,y,r){v.exports=E;var n=r(4234),u=r(5306),i=r(5050),f=r(2288).nextPow2,g=function(c,l,m){for(var M=1e8,L=-1,D=-1,A=c.shape[0],C=c.shape[1],S=0;S<A;S++)for(var o=0;o<C;o++){var R=c.get(S,o,0),T=c.get(S,o,1),O=c.get(S,o,2),N=c.get(S,o,3);if(R<255||T<255||O<255||N<255){var H=l-S,k=m-o,V=H*H+k*k;V<M&&(M=V,L=S,D=o)}}return[L,D,M]};function h(c,l,m,M,L){this.coord=[c,l],this.id=m,this.value=M,this.distance=L}function b(c,l,m){this.gl=c,this.fbo=l,this.buffer=m,this._readTimeout=null;var M=this;this._readCallback=function(){M.gl&&(l.bind(),c.readPixels(0,0,l.shape[0],l.shape[1],c.RGBA,c.UNSIGNED_BYTE,M.buffer),M._readTimeout=null)}}var p=b.prototype;Object.defineProperty(p,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(c){if(this.gl){this.fbo.shape=c;var l=this.fbo.shape[0],m=this.fbo.shape[1];if(m*l*4>this.buffer.length){u.free(this.buffer);for(var M=this.buffer=u.mallocUint8(f(m*l*4)),L=0;L<m*l*4;++L)M[L]=255}return c}}}),p.begin=function(){var c=this.gl;this.shape,c&&(this.fbo.bind(),c.clearColor(1,1,1,1),c.clear(c.COLOR_BUFFER_BIT|c.DEPTH_BUFFER_BIT))},p.end=function(){var c=this.gl;c&&(c.bindFramebuffer(c.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},p.query=function(c,l,m){if(!this.gl)return null;var M=this.fbo.shape.slice();c=c|0,l=l|0,typeof m!="number"&&(m=1);var L=Math.min(Math.max(c-m,0),M[0])|0,D=Math.min(Math.max(c+m,0),M[0])|0,A=Math.min(Math.max(l-m,0),M[1])|0,C=Math.min(Math.max(l+m,0),M[1])|0;if(D<=L||C<=A)return null;var S=[D-L,C-A],o=i(this.buffer,[S[0],S[1],4],[4,M[0]*4,1],4*(L+M[0]*A)),R=g(o.hi(S[0],S[1],1),m,m),T=R[0],O=R[1];if(T<0||Math.pow(this.radius,2)<R[2])return null;var N=o.get(T,O,0),H=o.get(T,O,1),k=o.get(T,O,2),V=o.get(T,O,3);return new h(T+L|0,O+A|0,N,[H,k,V],Math.sqrt(R[2]))},p.dispose=function(){this.gl&&(this.fbo.dispose(),u.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))};function E(c,l){var m=l[0],M=l[1],L={},D=n(c,m,M,L),A=u.mallocUint8(m*M*4);return new b(c,D,A)}},5158:function(v,y,r){var n=r(9016),u=r(4280),i=r(3984),f=r(1628),g=r(2631),h=r(9068);function b(l){this.gl=l,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var p=b.prototype;p.bind=function(){this.program||this._relink();var l,m=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),M=this.gl.lastAttribCount;if(m>M)for(l=M;l<m;l++)this.gl.enableVertexAttribArray(l);else if(M>m)for(l=m;l<M;l++)this.gl.disableVertexAttribArray(l);this.gl.lastAttribCount=m,this.gl.useProgram(this.program)},p.dispose=function(){for(var l=this.gl.lastAttribCount,m=0;m<l;m++)this.gl.disableVertexAttribArray(m);this.gl.lastAttribCount=0,this._fref&&this._fref.dispose(),this._vref&&this._vref.dispose(),this.attributes=this.types=this.vertShader=this.fragShader=this.program=this._relink=this._fref=this._vref=null};function E(l,m){return l.name<m.name?-1:1}p.update=function(l,m,M,L){if(!m||arguments.length===1){var D=l;l=D.vertex,m=D.fragment,M=D.uniforms,L=D.attributes}var A=this,C=A.gl,S=A._vref;A._vref=f.shader(C,C.VERTEX_SHADER,l),S&&S.dispose(),A.vertShader=A._vref.shader;var o=this._fref;if(A._fref=f.shader(C,C.FRAGMENT_SHADER,m),o&&o.dispose(),A.fragShader=A._fref.shader,!M||!L){var R=C.createProgram();if(C.attachShader(R,A.fragShader),C.attachShader(R,A.vertShader),C.linkProgram(R),!C.getProgramParameter(R,C.LINK_STATUS)){var T=C.getProgramInfoLog(R);throw new h(T,"Error linking program:"+T)}M=M||g.uniforms(C,R),L=L||g.attributes(C,R),C.deleteProgram(R)}L=L.slice(),L.sort(E);var O=[],N=[],H=[],k;for(k=0;k<L.length;++k){var V=L[k];if(V.type.indexOf("mat")>=0){for(var G=V.type.charAt(V.type.length-1)|0,U=new Array(G),Y=0;Y<G;++Y)U[Y]=H.length,N.push(V.name+"["+Y+"]"),typeof V.location=="number"?H.push(V.location+Y):Array.isArray(V.location)&&V.location.length===G&&typeof V.location[Y]=="number"?H.push(V.location[Y]|0):H.push(-1);O.push({name:V.name,type:V.type,locations:U})}else O.push({name:V.name,type:V.type,locations:[H.length]}),N.push(V.name),typeof V.location=="number"?H.push(V.location|0):H.push(-1)}var ee=0;for(k=0;k<H.length;++k)if(H[k]<0){for(;H.indexOf(ee)>=0;)ee+=1;H[k]=ee}var re=new Array(M.length);function ie(){A.program=f.program(C,A._vref,A._fref,N,H);for(var se=0;se<M.length;++se)re[se]=C.getUniformLocation(A.program,M[se].name)}ie(),A._relink=ie,A.types={uniforms:i(M),attributes:i(L)},A.attributes=u(C,A,O,H),Object.defineProperty(A,"uniforms",n(C,A,M,re))};function c(l,m,M,L,D){var A=new b(l);return A.update(m,M,L,D),A}v.exports=c},9068:function(v){function y(r,n,u){this.shortMessage=n||"",this.longMessage=u||"",this.rawError=r||"",this.message="gl-shader: "+(n||r||"")+(u?`
`+u:""),this.stack=new Error().stack}y.prototype=new Error,y.prototype.name="GLError",y.prototype.constructor=y,v.exports=y},4280:function(v,y,r){v.exports=b;var n=r(9068);function u(p,E,c,l,m,M){this._gl=p,this._wrapper=E,this._index=c,this._locations=l,this._dimension=m,this._constFunc=M}var i=u.prototype;i.pointer=function(E,c,l,m){var M=this,L=M._gl,D=M._locations[M._index];L.vertexAttribPointer(D,M._dimension,E||L.FLOAT,!!c,l||0,m||0),L.enableVertexAttribArray(D)},i.set=function(p,E,c,l){return this._constFunc(this._locations[this._index],p,E,c,l)},Object.defineProperty(i,"location",{get:function(){return this._locations[this._index]},set:function(p){return p!==this._locations[this._index]&&(this._locations[this._index]=p|0,this._wrapper.program=null),p|0}});var f=[function(p,E,c){return c.length===void 0?p.vertexAttrib1f(E,c):p.vertexAttrib1fv(E,c)},function(p,E,c,l){return c.length===void 0?p.vertexAttrib2f(E,c,l):p.vertexAttrib2fv(E,c)},function(p,E,c,l,m){return c.length===void 0?p.vertexAttrib3f(E,c,l,m):p.vertexAttrib3fv(E,c)},function(p,E,c,l,m,M){return c.length===void 0?p.vertexAttrib4f(E,c,l,m,M):p.vertexAttrib4fv(E,c)}];function g(p,E,c,l,m,M,L){var D=f[m],A=new u(p,E,c,l,m,D);Object.defineProperty(M,L,{set:function(C){return p.disableVertexAttribArray(l[c]),D(p,l[c],C),C},get:function(){return A},enumerable:!0})}function h(p,E,c,l,m,M,L){for(var D=new Array(m),A=new Array(m),C=0;C<m;++C)g(p,E,c[C],l,m,D,C),A[C]=D[C];Object.defineProperty(D,"location",{set:function(R){if(Array.isArray(R))for(var T=0;T<m;++T)A[T].location=R[T];else for(var T=0;T<m;++T)A[T].location=R+T;return R},get:function(){for(var R=new Array(m),T=0;T<m;++T)R[T]=l[c[T]];return R},enumerable:!0}),D.pointer=function(R,T,O,N){R=R||p.FLOAT,T=!!T,O=O||m*m,N=N||0;for(var H=0;H<m;++H){var k=l[c[H]];p.vertexAttribPointer(k,m,R,T,O,N+H*m),p.enableVertexAttribArray(k)}};var S=new Array(m),o=p["vertexAttrib"+m+"fv"];Object.defineProperty(M,L,{set:function(R){for(var T=0;T<m;++T){var O=l[c[T]];if(p.disableVertexAttribArray(O),Array.isArray(R[0]))o.call(p,O,R[T]);else{for(var N=0;N<m;++N)S[N]=R[m*T+N];o.call(p,O,S)}}return R},get:function(){return D},enumerable:!0})}function b(p,E,c,l){for(var m={},M=0,L=c.length;M<L;++M){var D=c[M],A=D.name,C=D.type,S=D.locations;switch(C){case"bool":case"int":case"float":g(p,E,S[0],l,1,m,A);break;default:if(C.indexOf("vec")>=0){var o=C.charCodeAt(C.length-1)-48;if(o<2||o>4)throw new n("","Invalid data type for attribute "+A+": "+C);g(p,E,S[0],l,o,m,A)}else if(C.indexOf("mat")>=0){var o=C.charCodeAt(C.length-1)-48;if(o<2||o>4)throw new n("","Invalid data type for attribute "+A+": "+C);h(p,E,S,l,o,m,A)}else throw new n("","Unknown data type for attribute "+A+": "+C);break}}return m}},9016:function(v,y,r){var n=r(3984),u=r(9068);v.exports=g;function i(h){return function(){return h}}function f(h,b){for(var p=new Array(h),E=0;E<h;++E)p[E]=b;return p}function g(h,b,p,E){function c(C){return function(S,o,R){return S.getUniform(o.program,R[C])}}function l(C){return function(o){for(var R=m("",C),T=0;T<R.length;++T){var O=R[T],N=O[0],H=O[1];if(E[H]){var k=o;if(typeof N=="string"&&(N.indexOf(".")===0||N.indexOf("[")===0)){var V=N;if(N.indexOf(".")===0&&(V=N.slice(1)),V.indexOf("]")===V.length-1){var G=V.indexOf("["),U=V.slice(0,G),Y=V.slice(G+1,V.length-1);k=U?o[U][Y]:o[Y]}else k=o[V]}var ee=p[H].type,re;switch(ee){case"bool":case"int":case"sampler2D":case"samplerCube":h.uniform1i(E[H],k);break;case"float":h.uniform1f(E[H],k);break;default:var ie=ee.indexOf("vec");if(0<=ie&&ie<=1&&ee.length===4+ie){if(re=ee.charCodeAt(ee.length-1)-48,re<2||re>4)throw new u("","Invalid data type");switch(ee.charAt(0)){case"b":case"i":h["uniform"+re+"iv"](E[H],k);break;case"v":h["uniform"+re+"fv"](E[H],k);break;default:throw new u("","Unrecognized data type for vector "+name+": "+ee)}}else if(ee.indexOf("mat")===0&&ee.length===4){if(re=ee.charCodeAt(ee.length-1)-48,re<2||re>4)throw new u("","Invalid uniform dimension type for matrix "+name+": "+ee);h["uniformMatrix"+re+"fv"](E[H],!1,k);break}else throw new u("","Unknown uniform data type for "+name+": "+ee)}}}}}function m(C,S){if(typeof S!="object")return[[C,S]];var o=[];for(var R in S){var T=S[R],O=C;parseInt(R)+""===R?O+="["+R+"]":O+="."+R,typeof T=="object"?o.push.apply(o,m(O,T)):o.push([O,T])}return o}function M(C){switch(C){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var S=C.indexOf("vec");if(0<=S&&S<=1&&C.length===4+S){var o=C.charCodeAt(C.length-1)-48;if(o<2||o>4)throw new u("","Invalid data type");return C.charAt(0)==="b"?f(o,!1):f(o,0)}else if(C.indexOf("mat")===0&&C.length===4){var o=C.charCodeAt(C.length-1)-48;if(o<2||o>4)throw new u("","Invalid uniform dimension type for matrix "+name+": "+C);return f(o*o,0)}else throw new u("","Unknown uniform data type for "+name+": "+C)}}function L(C,S,o){if(typeof o=="object"){var R=D(o);Object.defineProperty(C,S,{get:i(R),set:l(o),enumerable:!0,configurable:!1})}else E[o]?Object.defineProperty(C,S,{get:c(o),set:l(o),enumerable:!0,configurable:!1}):C[S]=M(p[o].type)}function D(C){var S;if(Array.isArray(C)){S=new Array(C.length);for(var o=0;o<C.length;++o)L(S,o,C[o])}else{S={};for(var R in C)L(S,R,C[R])}return S}var A=n(p,!0);return{get:i(D(A)),set:l(A),enumerable:!0,configurable:!0}}},3984:function(v){v.exports=y;function y(r,n){for(var u={},i=0;i<r.length;++i)for(var f=r[i].name,g=f.split("."),h=u,b=0;b<g.length;++b){var p=g[b].split("[");if(p.length>1){p[0]in h||(h[p[0]]=[]),h=h[p[0]];for(var E=1;E<p.length;++E){var c=parseInt(p[E]);E<p.length-1||b<g.length-1?(c in h||(E<p.length-1?h[c]=[]:h[c]={}),h=h[c]):n?h[c]=i:h[c]=r[i].type}}else b<g.length-1?(p[0]in h||(h[p[0]]={}),h=h[p[0]]):n?h[p[0]]=i:h[p[0]]=r[i].type}return u}},2631:function(v,y){y.uniforms=i,y.attributes=f;var r={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},n=null;function u(g,h){if(!n){var b=Object.keys(r);n={};for(var p=0;p<b.length;++p){var E=b[p];n[g[E]]=r[E]}}return n[h]}function i(g,h){for(var b=g.getProgramParameter(h,g.ACTIVE_UNIFORMS),p=[],E=0;E<b;++E){var c=g.getActiveUniform(h,E);if(c){var l=u(g,c.type);if(c.size>1)for(var m=0;m<c.size;++m)p.push({name:c.name.replace("[0]","["+m+"]"),type:l});else p.push({name:c.name,type:l})}}return p}function f(g,h){for(var b=g.getProgramParameter(h,g.ACTIVE_ATTRIBUTES),p=[],E=0;E<b;++E){var c=g.getActiveAttrib(h,E);c&&p.push({name:c.name,type:u(g,c.type)})}return p}},1628:function(v,y,r){y.shader=m,y.program=M;var n=r(9068),u=r(3530),i=typeof WeakMap>"u"?r(4037):WeakMap,f=new i,g=0;function h(L,D,A,C,S,o,R){this.id=L,this.src=D,this.type=A,this.shader=C,this.count=o,this.programs=[],this.cache=R}h.prototype.dispose=function(){if(--this.count===0){for(var L=this.cache,D=L.gl,A=this.programs,C=0,S=A.length;C<S;++C){var o=L.programs[A[C]];o&&(delete L.programs[C],D.deleteProgram(o))}D.deleteShader(this.shader),delete L.shaders[this.type===D.FRAGMENT_SHADER|0][this.src]}};function b(L){this.gl=L,this.shaders=[{},{}],this.programs={}}var p=b.prototype;function E(L,D,A){var C=L.createShader(D);if(L.shaderSource(C,A),L.compileShader(C),!L.getShaderParameter(C,L.COMPILE_STATUS)){var S=L.getShaderInfoLog(C);try{var o=u(S,A,D)}catch(R){throw console.warn("Failed to format compiler error: "+R),new n(S,`Error compiling shader:
`+S)}throw new n(S,o.short,o.long)}return C}p.getShaderReference=function(L,D){var A=this.gl,C=this.shaders[L===A.FRAGMENT_SHADER|0],S=C[D];if(!S||!A.isShader(S.shader)){var o=E(A,L,D);S=C[D]=new h(g++,D,L,o,[],1,this)}else S.count+=1;return S};function c(L,D,A,C,S){var o=L.createProgram();L.attachShader(o,D),L.attachShader(o,A);for(var R=0;R<C.length;++R)L.bindAttribLocation(o,S[R],C[R]);if(L.linkProgram(o),!L.getProgramParameter(o,L.LINK_STATUS)){var T=L.getProgramInfoLog(o);throw new n(T,"Error linking program: "+T)}return o}p.getProgram=function(L,D,A,C){var S=[L.id,D.id,A.join(":"),C.join(":")].join("@"),o=this.programs[S];return(!o||!this.gl.isProgram(o))&&(this.programs[S]=o=c(this.gl,L.shader,D.shader,A,C),L.programs.push(S),D.programs.push(S)),o};function l(L){var D=f.get(L);return D||(D=new b(L),f.set(L,D)),D}function m(L,D,A){return l(L).getShaderReference(D,A)}function M(L,D,A,C,S){return l(L).getProgram(D,A,C,S)}},3050:function(v){v.exports=n;function y(u){this.plot=u,this.enable=[!0,!0,!1,!1],this.width=[1,1,1,1],this.color=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.center=[1/0,1/0]}var r=y.prototype;r.update=function(u){u=u||{},this.enable=(u.enable||[!0,!0,!1,!1]).slice(),this.width=(u.width||[1,1,1,1]).slice(),this.color=(u.color||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]).map(function(i){return i.slice()}),this.center=(u.center||[1/0,1/0]).slice(),this.plot.setOverlayDirty()},r.draw=function(){var u=this.enable,i=this.width,f=this.color,g=this.center,h=this.plot,b=h.line,p=h.dataBox,E=h.viewBox;if(b.bind(),p[0]<=g[0]&&g[0]<=p[2]&&p[1]<=g[1]&&g[1]<=p[3]){var c=E[0]+(g[0]-p[0])/(p[2]-p[0])*(E[2]-E[0]),l=E[1]+(g[1]-p[1])/(p[3]-p[1])*(E[3]-E[1]);u[0]&&b.drawLine(c,l,E[0],l,i[0],f[0]),u[1]&&b.drawLine(c,l,c,E[1],i[1],f[1]),u[2]&&b.drawLine(c,l,E[2],l,i[2],f[2]),u[3]&&b.drawLine(c,l,c,E[3],i[3],f[3])}},r.dispose=function(){this.plot.removeOverlay(this)};function n(u,i){var f=new y(u);return f.update(i),u.addOverlay(f),f}},3540:function(v,y,r){var n=r(6832),u=r(5158),i=n([`precision mediump float;
#define GLSLIFY 1
attribute vec3 position, color;
attribute float weight;
uniform mat4 model, view, projection;
uniform vec3 coordinates[3];
uniform vec4 colors[3];
uniform vec2 screenShape;
uniform float lineWidth;
varying vec4 fragColor;
void main() {
vec3 vertexPosition = mix(coordinates[0],
mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));
vec4 clipPos = projection * view * model * vec4(vertexPosition, 1.0);
vec2 clipOffset = (projection * view * model * vec4(color, 0.0)).xy;
vec2 delta = weight * clipOffset * screenShape;
vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;
gl_Position = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);
fragColor = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];
}
`]),f=n([`precision mediump float;
#define GLSLIFY 1
varying vec4 fragColor;
void main() {
gl_FragColor = fragColor;
}`]);v.exports=function(g){return u(g,i,f,null,[{name:"position",type:"vec3"},{name:"color",type:"vec3"},{name:"weight",type:"float"}])}},6496:function(v,y,r){var n=r(5827),u=r(2944),i=r(3540);v.exports=c;var f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function g(l,m,M,L){this.gl=l,this.buffer=m,this.vao=M,this.shader=L,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}var h=g.prototype,b=[0,0,0],p=[0,0,0],E=[0,0];h.isTransparent=function(){return!1},h.drawTransparent=function(l){},h.draw=function(l){var m=this.gl,M=this.vao,L=this.shader;M.bind(),L.bind();var D=l.model||f,A=l.view||f,C=l.projection||f,S;this.axes&&(S=this.axes.lastCubeProps.axis);for(var o=b,R=p,T=0;T<3;++T)S&&S[T]<0?(o[T]=this.bounds[0][T],R[T]=this.bounds[1][T]):(o[T]=this.bounds[1][T],R[T]=this.bounds[0][T]);E[0]=m.drawingBufferWidth,E[1]=m.drawingBufferHeight,L.uniforms.model=D,L.uniforms.view=A,L.uniforms.projection=C,L.uniforms.coordinates=[this.position,o,R],L.uniforms.colors=this.colors,L.uniforms.screenShape=E;for(var T=0;T<3;++T)L.uniforms.lineWidth=this.lineWidth[T]*this.pixelRatio,this.enabled[T]&&(M.draw(m.TRIANGLES,6,6*T),this.drawSides[T]&&M.draw(m.TRIANGLES,12,18+12*T));M.unbind()},h.update=function(l){l&&("bounds"in l&&(this.bounds=l.bounds),"position"in l&&(this.position=l.position),"lineWidth"in l&&(this.lineWidth=l.lineWidth),"colors"in l&&(this.colors=l.colors),"enabled"in l&&(this.enabled=l.enabled),"drawSides"in l&&(this.drawSides=l.drawSides))},h.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function c(l,m){var M=[];function L(o,R,T,O,N,H){var k=[o,R,T,0,0,0,1];k[O+3]=1,k[O]=N,M.push.apply(M,k),k[6]=-1,M.push.apply(M,k),k[O]=H,M.push.apply(M,k),M.push.apply(M,k),k[6]=1,M.push.apply(M,k),k[O]=N,M.push.apply(M,k)}L(0,0,0,0,0,1),L(0,0,0,1,0,1),L(0,0,0,2,0,1),L(1,0,0,1,-1,1),L(1,0,0,2,-1,1),L(0,1,0,0,-1,1),L(0,1,0,2,-1,1),L(0,0,1,0,-1,1),L(0,0,1,1,-1,1);var D=n(l,M),A=u(l,[{type:l.FLOAT,buffer:D,size:3,offset:0,stride:28},{type:l.FLOAT,buffer:D,size:3,offset:12,stride:28},{type:l.FLOAT,buffer:D,size:1,offset:24,stride:28}]),C=i(l);C.attributes.position.location=0,C.attributes.color.location=1,C.attributes.weight.location=2;var S=new g(l,D,A,C);return S.update(m),S}},9578:function(v,y,r){var n=r(6832),u=n([`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 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;
}
`]),i=n([`#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;
}
`]),f=n([`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;
}
`]),g=n([`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);
}`]);y.meshShader={vertex:u,fragment:i,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},y.pickShader={vertex:f,fragment:g,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7307:function(v,y,r){var n=r(2858),u=r(4020),i=["xyz","xzy","yxz","yzx","zxy","zyx"],f=function(M,L,D,A){for(var C=M.points,S=M.velocities,o=M.divergences,R=[],T=[],O=[],N=[],H=[],k=[],V=0,G=0,U=u.create(),Y=u.create(),ee=8,re=0;re<C.length;re++){var ie=C[re],se=S[re],ce=o[re];L===0&&(ce=D*.05),G=n.length(se)/A,U=u.create(),n.copy(U,se),U[3]=ce;for(var q=0;q<ee;q++)H[q]=[ie[0],ie[1],ie[2],q];if(N.length>0)for(var q=0;q<ee;q++){var j=(q+1)%ee;R.push(N[q],H[q],H[j],H[j],N[j],N[q]),O.push(Y,U,U,U,Y,Y),k.push(V,G,G,G,V,V);var Z=R.length;T.push([Z-6,Z-5,Z-4],[Z-3,Z-2,Z-1])}var Q=N;N=H,H=Q;var ue=Y;Y=U,U=ue;var fe=V;V=G,G=fe}return{positions:R,cells:T,vectors:O,vertexIntensity:k}},g=function(M,L,D,A){for(var C=0,S=0;S<M.length;S++)for(var o=M[S].velocities,R=0;R<o.length;R++)C=Math.max(C,n.length(o[R]));for(var T=M.map(function(re){return f(re,D,A,C)}),O=[],N=[],H=[],k=[],S=0;S<T.length;S++){var V=T[S],G=O.length;O=O.concat(V.positions),H=H.concat(V.vectors),k=k.concat(V.vertexIntensity);for(var R=0;R<V.cells.length;R++){var U=V.cells[R],Y=[];N.push(Y);for(var ee=0;ee<U.length;ee++)Y.push(U[ee]+G)}}return{positions:O,cells:N,vectors:H,vertexIntensity:k,colormap:L}},h=function(M,L){var D=M.length,A;for(A=0;A<D;A++){var C=M[A];if(C===L)return A;if(C>L)return A-1}return A},b=function(M,L,D){return M<L?L:M>D?D:M},p=function(M,L,D){var A=L.vectors,C=L.meshgrid,S=M[0],o=M[1],R=M[2],T=C[0].length,O=C[1].length,N=C[2].length,H=h(C[0],S),k=h(C[1],o),V=h(C[2],R),G=H+1,U=k+1,Y=V+1;if(H=b(H,0,T-1),G=b(G,0,T-1),k=b(k,0,O-1),U=b(U,0,O-1),V=b(V,0,N-1),Y=b(Y,0,N-1),H<0||k<0||V<0||G>T-1||U>O-1||Y>N-1)return n.create();var ee=C[0][H],re=C[0][G],ie=C[1][k],se=C[1][U],ce=C[2][V],q=C[2][Y],j=(S-ee)/(re-ee),Z=(o-ie)/(se-ie),Q=(R-ce)/(q-ce);isFinite(j)||(j=.5),isFinite(Z)||(Z=.5),isFinite(Q)||(Q=.5);var ue,fe,te,ne,ve,le;switch(D.reversedX&&(H=T-1-H,G=T-1-G),D.reversedY&&(k=O-1-k,U=O-1-U),D.reversedZ&&(V=N-1-V,Y=N-1-Y),D.filled){case 5:ve=V,le=Y,te=k*N,ne=U*N,ue=H*N*O,fe=G*N*O;break;case 4:ve=V,le=Y,ue=H*N,fe=G*N,te=k*N*T,ne=U*N*T;break;case 3:te=k,ne=U,ve=V*O,le=Y*O,ue=H*O*N,fe=G*O*N;break;case 2:te=k,ne=U,ue=H*O,fe=G*O,ve=V*O*T,le=Y*O*T;break;case 1:ue=H,fe=G,ve=V*T,le=Y*T,te=k*T*N,ne=U*T*N;break;default:ue=H,fe=G,te=k*T,ne=U*T,ve=V*T*O,le=Y*T*O;break}var xe=A[ue+te+ve],Se=A[ue+te+le],Re=A[ue+ne+ve],Ee=A[ue+ne+le],Oe=A[fe+te+ve],Be=A[fe+te+le],Le=A[fe+ne+ve],Te=A[fe+ne+le],De=n.create(),Ve=n.create(),Ye=n.create(),Ne=n.create();n.lerp(De,xe,Oe,j),n.lerp(Ve,Se,Be,j),n.lerp(Ye,Re,Le,j),n.lerp(Ne,Ee,Te,j);var Xe=n.create(),ht=n.create();n.lerp(Xe,De,Ye,Z),n.lerp(ht,Ve,Ne,Z);var st=n.create();return n.lerp(st,Xe,ht,Q),st},E=function(M){var L=1/0;M.sort(function(S,o){return S-o});for(var D=M.length,A=1;A<D;A++){var C=Math.abs(M[A]-M[A-1]);C<L&&(L=C)}return L},c=function(M){for(var L=[],D=[],A=[],C={},S={},o={},R=M.length,T=0;T<R;T++){var O=M[T],N=O[0],H=O[1],k=O[2];C[N]||(L.push(N),C[N]=!0),S[H]||(D.push(H),S[H]=!0),o[k]||(A.push(k),o[k]=!0)}var V=E(L),G=E(D),U=E(A),Y=Math.min(V,G,U);return isFinite(Y)?Y:1};v.exports=function(M,L){var D=M.startingPositions,A=M.maxLength||1e3,C=M.tubeSize||1,S=M.absoluteTubeSize,o=M.gridFill||"+x+y+z",R={};o.indexOf("-x")!==-1&&(R.reversedX=!0),o.indexOf("-y")!==-1&&(R.reversedY=!0),o.indexOf("-z")!==-1&&(R.reversedZ=!0),R.filled=i.indexOf(o.replace(/-/g,"").replace(/\+/g,""));var T=M.getVelocity||function(Be){return p(Be,M,R)},O=M.getDivergence||function(Be,Le){var Te=n.create(),De=1e-4;n.add(Te,Be,[De,0,0]);var Ve=T(Te);n.subtract(Ve,Ve,Le),n.scale(Ve,Ve,1/De),n.add(Te,Be,[0,De,0]);var Ye=T(Te);n.subtract(Ye,Ye,Le),n.scale(Ye,Ye,1/De),n.add(Te,Be,[0,0,De]);var Ne=T(Te);return n.subtract(Ne,Ne,Le),n.scale(Ne,Ne,1/De),n.add(Te,Ve,Ye),n.add(Te,Te,Ne),Te},N=[],H=L[0][0],k=L[0][1],V=L[0][2],G=L[1][0],U=L[1][1],Y=L[1][2],ee=function(Be){var Le=Be[0],Te=Be[1],De=Be[2];return!(Le<H||Le>G||Te<k||Te>U||De<V||De>Y)},re=n.distance(L[0],L[1]),ie=10*re/A,se=ie*ie,ce=1,q=0,j=D.length;j>1&&(ce=c(D));for(var Z=0;Z<j;Z++){var Q=n.create();n.copy(Q,D[Z]);var ue=[Q],fe=[],te=T(Q),ne=Q;fe.push(te);var ve=[],le=O(Q,te),xe=n.length(le);isFinite(xe)&&xe>q&&(q=xe),ve.push(xe),N.push({points:ue,velocities:fe,divergences:ve});for(var Se=0;Se<A*100&&ue.length<A&&ee(Q);){Se++;var Re=n.clone(te),Ee=n.squaredLength(Re);if(Ee===0)break;if(Ee>se&&n.scale(Re,Re,ie/Math.sqrt(Ee)),n.add(Re,Re,Q),te=T(Re),n.squaredDistance(ne,Re)-se>-1e-4*se){ue.push(Re),ne=Re,fe.push(te);var le=O(Re,te),xe=n.length(le);isFinite(xe)&&xe>q&&(q=xe),ve.push(xe)}Q=Re}}var Oe=g(N,M.colormap,q,ce);return S?Oe.tubeScale=S:(q===0&&(q=1),Oe.tubeScale=C*.5*ce/q),Oe};var l=r(9578),m=r(1140).createMesh;v.exports.createTubeMesh=function(M,L){return m(M,L,{shaders:l,traceType:"streamtube"})}},9054:function(v,y,r){var n=r(5158),u=r(6832),i=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);
}
`]),f=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;
}
`]),g=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);
}
`]),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);
}
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));
}
`]);y.createShader=function(b){var p=n(b,i,f,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p.attributes.normal.location=2,p},y.createPickShader=function(b){var p=n(b,i,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p.attributes.normal.location=2,p},y.createContourShader=function(b){var p=n(b,g,f,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p},y.createPickContourShader=function(b){var p=n(b,g,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p}},3754:function(v,y,r){v.exports=fe;var n=r(2288),u=r(5827),i=r(2944),f=r(8931),g=r(5306),h=r(9156),b=r(7498),p=r(7382),E=r(5050),c=r(4162),l=r(104),m=r(7437),M=r(5070),L=r(9144),D=r(9054),A=D.createShader,C=D.createContourShader,S=D.createPickShader,o=D.createPickContourShader,R=4*(4+3+3),T=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],O=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],N=[[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 te=0;te<3;++te){var ne=N[te],ve=(te+1)%3,le=(te+2)%3;ne[ve+0]=1,ne[le+3]=1,ne[te+6]=1}})();function H(te,ne,ve,le,xe){this.position=te,this.index=ne,this.uv=ve,this.level=le,this.dataCoordinate=xe}var k=256;function V(te,ne,ve,le,xe,Se,Re,Ee,Oe,Be,Le,Te,De,Ve,Ye){this.gl=te,this.shape=ne,this.bounds=ve,this.objectOffset=Ye,this.intensityBounds=[],this._shader=le,this._pickShader=xe,this._coordinateBuffer=Se,this._vao=Re,this._colorMap=Ee,this._contourShader=Oe,this._contourPickShader=Be,this._contourBuffer=Le,this._contourVAO=Te,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new H([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=De,this._dynamicVAO=Ve,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=[E(g.mallocFloat(1024),[0,0]),E(g.mallocFloat(1024),[0,0]),E(g.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 G=V.prototype;G.genColormap=function(te,ne){var ve=!1,le=p([h({colormap:te,nshades:k,format:"rgba"}).map(function(xe,Se){var Re=ne?U(Se/255,ne):xe[3];return Re<1&&(ve=!0),[xe[0],xe[1],xe[2],255*Re]})]);return b.divseq(le,255),this.hasAlphaScale=ve,le},G.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},G.isOpaque=function(){return!this.isTransparent()},G.pickSlots=1,G.setPickBase=function(te){this.pickId=te};function U(te,ne){if(!ne||!ne.length)return 1;for(var ve=0;ve<ne.length;++ve){if(ne.length<2)return 1;if(ne[ve][0]===te)return ne[ve][1];if(ne[ve][0]>te&&ve>0){var le=(ne[ve][0]-te)/(ne[ve][0]-ne[ve-1][0]);return ne[ve][1]*(1-le)+le*ne[ve-1][1]}}return 1}var Y=[0,0,0],ee={showSurface:!1,showContour:!1,projections:[T.slice(),T.slice(),T.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function re(te,ne){var ve,le,xe,Se=ne.axes&&ne.axes.lastCubeProps.axis||Y,Re=ne.showSurface,Ee=ne.showContour;for(ve=0;ve<3;++ve)for(Re=Re||ne.surfaceProject[ve],le=0;le<3;++le)Ee=Ee||ne.contourProject[ve][le];for(ve=0;ve<3;++ve){var Oe=ee.projections[ve];for(le=0;le<16;++le)Oe[le]=0;for(le=0;le<4;++le)Oe[5*le]=1;Oe[5*ve]=0,Oe[12+ve]=ne.axesBounds[+(Se[ve]>0)][ve],l(Oe,te.model,Oe);var Be=ee.clipBounds[ve];for(xe=0;xe<2;++xe)for(le=0;le<3;++le)Be[xe][le]=te.clipBounds[xe][le];Be[0][ve]=-1e8,Be[1][ve]=1e8}return ee.showSurface=Re,ee.showContour=Ee,ee}var ie={model:T,view:T,projection:T,inverseModel:T.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},se=T.slice(),ce=[1,0,0,0,1,0,0,0,1];function q(te,ne){te=te||{};var ve=this.gl;ve.disable(ve.CULL_FACE),this._colorMap.bind(0);var le=ie;le.model=te.model||T,le.view=te.view||T,le.projection=te.projection||T,le.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],le.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],le.objectOffset=this.objectOffset,le.contourColor=this.contourColor[0],le.inverseModel=m(le.inverseModel,le.model);for(var xe=0;xe<2;++xe)for(var Se=le.clipBounds[xe],Re=0;Re<3;++Re)Se[Re]=Math.min(Math.max(this.clipBounds[xe][Re],-1e8),1e8);le.kambient=this.ambientLight,le.kdiffuse=this.diffuseLight,le.kspecular=this.specularLight,le.roughness=this.roughness,le.fresnel=this.fresnel,le.opacity=this.opacity,le.height=0,le.permutation=ce,le.vertexColor=this.vertexColor;var Ee=se;for(l(Ee,le.view,le.model),l(Ee,le.projection,Ee),m(Ee,Ee),xe=0;xe<3;++xe)le.eyePosition[xe]=Ee[12+xe]/Ee[15];var Oe=Ee[15];for(xe=0;xe<3;++xe)Oe+=this.lightPosition[xe]*Ee[4*xe+3];for(xe=0;xe<3;++xe){var Be=Ee[12+xe];for(Re=0;Re<3;++Re)Be+=Ee[4*Re+xe]*this.lightPosition[Re];le.lightPosition[xe]=Be/Oe}var Le=re(le,this);if(Le.showSurface){for(this._shader.bind(),this._shader.uniforms=le,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(ve.TRIANGLES,this._vertexCount),xe=0;xe<3;++xe)!this.surfaceProject[xe]||!this.vertexCount||(this._shader.uniforms.model=Le.projections[xe],this._shader.uniforms.clipBounds=Le.clipBounds[xe],this._vao.draw(ve.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Le.showContour){var Te=this._contourShader;le.kambient=1,le.kdiffuse=0,le.kspecular=0,le.opacity=1,Te.bind(),Te.uniforms=le;var De=this._contourVAO;for(De.bind(),xe=0;xe<3;++xe)for(Te.uniforms.permutation=N[xe],ve.lineWidth(this.contourWidth[xe]*this.pixelRatio),Re=0;Re<this.contourLevels[xe].length;++Re)Re===this.highlightLevel[xe]?(Te.uniforms.contourColor=this.highlightColor[xe],Te.uniforms.contourTint=this.highlightTint[xe]):(Re===0||Re-1===this.highlightLevel[xe])&&(Te.uniforms.contourColor=this.contourColor[xe],Te.uniforms.contourTint=this.contourTint[xe]),this._contourCounts[xe][Re]&&(Te.uniforms.height=this.contourLevels[xe][Re],De.draw(ve.LINES,this._contourCounts[xe][Re],this._contourOffsets[xe][Re]));for(xe=0;xe<3;++xe)for(Te.uniforms.model=Le.projections[xe],Te.uniforms.clipBounds=Le.clipBounds[xe],Re=0;Re<3;++Re)if(this.contourProject[xe][Re]){Te.uniforms.permutation=N[Re],ve.lineWidth(this.contourWidth[Re]*this.pixelRatio);for(var Ve=0;Ve<this.contourLevels[Re].length;++Ve)Ve===this.highlightLevel[Re]?(Te.uniforms.contourColor=this.highlightColor[Re],Te.uniforms.contourTint=this.highlightTint[Re]):(Ve===0||Ve-1===this.highlightLevel[Re])&&(Te.uniforms.contourColor=this.contourColor[Re],Te.uniforms.contourTint=this.contourTint[Re]),this._contourCounts[Re][Ve]&&(Te.uniforms.height=this.contourLevels[Re][Ve],De.draw(ve.LINES,this._contourCounts[Re][Ve],this._contourOffsets[Re][Ve]))}for(De.unbind(),De=this._dynamicVAO,De.bind(),xe=0;xe<3;++xe)if(this._dynamicCounts[xe]!==0)for(Te.uniforms.model=le.model,Te.uniforms.clipBounds=le.clipBounds,Te.uniforms.permutation=N[xe],ve.lineWidth(this.dynamicWidth[xe]*this.pixelRatio),Te.uniforms.contourColor=this.dynamicColor[xe],Te.uniforms.contourTint=this.dynamicTint[xe],Te.uniforms.height=this.dynamicLevel[xe],De.draw(ve.LINES,this._dynamicCounts[xe],this._dynamicOffsets[xe]),Re=0;Re<3;++Re)this.contourProject[Re][xe]&&(Te.uniforms.model=Le.projections[Re],Te.uniforms.clipBounds=Le.clipBounds[Re],De.draw(ve.LINES,this._dynamicCounts[xe],this._dynamicOffsets[xe]));De.unbind()}}G.draw=function(te){return q.call(this,te,!1)},G.drawTransparent=function(te){return q.call(this,te,!0)};var j={model:T,view:T,projection:T,inverseModel:T,clipBounds:[[0,0,0],[0,0,0]],height:0,shape:[0,0],pickId:0,lowerBound:[0,0,0],upperBound:[0,0,0],zOffset:0,objectOffset:[0,0,0],permutation:[1,0,0,0,1,0,0,0,1],lightPosition:[0,0,0],eyePosition:[0,0,0]};G.drawPick=function(te){te=te||{};var ne=this.gl;ne.disable(ne.CULL_FACE);var ve=j;ve.model=te.model||T,ve.view=te.view||T,ve.projection=te.projection||T,ve.shape=this._field[2].shape,ve.pickId=this.pickId/255,ve.lowerBound=this.bounds[0],ve.upperBound=this.bounds[1],ve.objectOffset=this.objectOffset,ve.permutation=ce;for(var le=0;le<2;++le)for(var xe=ve.clipBounds[le],Se=0;Se<3;++Se)xe[Se]=Math.min(Math.max(this.clipBounds[le][Se],-1e8),1e8);var Re=re(ve,this);if(Re.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=ve,this._vao.bind(),this._vao.draw(ne.TRIANGLES,this._vertexCount),le=0;le<3;++le)this.surfaceProject[le]&&(this._pickShader.uniforms.model=Re.projections[le],this._pickShader.uniforms.clipBounds=Re.clipBounds[le],this._vao.draw(ne.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Re.showContour){var Ee=this._contourPickShader;Ee.bind(),Ee.uniforms=ve;var Oe=this._contourVAO;for(Oe.bind(),Se=0;Se<3;++Se)for(ne.lineWidth(this.contourWidth[Se]*this.pixelRatio),Ee.uniforms.permutation=N[Se],le=0;le<this.contourLevels[Se].length;++le)this._contourCounts[Se][le]&&(Ee.uniforms.height=this.contourLevels[Se][le],Oe.draw(ne.LINES,this._contourCounts[Se][le],this._contourOffsets[Se][le]));for(le=0;le<3;++le)for(Ee.uniforms.model=Re.projections[le],Ee.uniforms.clipBounds=Re.clipBounds[le],Se=0;Se<3;++Se)if(this.contourProject[le][Se]){Ee.uniforms.permutation=N[Se],ne.lineWidth(this.contourWidth[Se]*this.pixelRatio);for(var Be=0;Be<this.contourLevels[Se].length;++Be)this._contourCounts[Se][Be]&&(Ee.uniforms.height=this.contourLevels[Se][Be],Oe.draw(ne.LINES,this._contourCounts[Se][Be],this._contourOffsets[Se][Be]))}Oe.unbind()}},G.pick=function(te){if(!te||te.id!==this.pickId)return null;var ne=this._field[2].shape,ve=this._pickResult,le=ne[0]*(te.value[0]+(te.value[2]>>4)/16)/255,xe=Math.floor(le),Se=le-xe,Re=ne[1]*(te.value[1]+(te.value[2]&15)/16)/255,Ee=Math.floor(Re),Oe=Re-Ee;xe+=1,Ee+=1;var Be=ve.position;Be[0]=Be[1]=Be[2]=0;for(var Le=0;Le<2;++Le)for(var Te=Le?Se:1-Se,De=0;De<2;++De)for(var Ve=De?Oe:1-Oe,Ye=xe+Le,Ne=Ee+De,Xe=Te*Ve,ht=0;ht<3;++ht)Be[ht]+=this._field[ht].get(Ye,Ne)*Xe;for(var st=this._pickResult.level,it=0;it<3;++it)if(st[it]=M.le(this.contourLevels[it],Be[it]),st[it]<0)this.contourLevels[it].length>0&&(st[it]=0);else if(st[it]<this.contourLevels[it].length-1){var nt=this.contourLevels[it][st[it]],pt=this.contourLevels[it][st[it]+1];Math.abs(nt-Be[it])>Math.abs(pt-Be[it])&&(st[it]+=1)}for(ve.index[0]=Se<.5?xe:xe+1,ve.index[1]=Oe<.5?Ee:Ee+1,ve.uv[0]=le/ne[0],ve.uv[1]=Re/ne[1],ht=0;ht<3;++ht)ve.dataCoordinate[ht]=this._field[ht].get(ve.index[0],ve.index[1]);return ve},G.padField=function(te,ne){var ve=ne.shape.slice(),le=te.shape.slice();b.assign(te.lo(1,1).hi(ve[0],ve[1]),ne),b.assign(te.lo(1).hi(ve[0],1),ne.hi(ve[0],1)),b.assign(te.lo(1,le[1]-1).hi(ve[0],1),ne.lo(0,ve[1]-1).hi(ve[0],1)),b.assign(te.lo(0,1).hi(1,ve[1]),ne.hi(1)),b.assign(te.lo(le[0]-1,1).hi(1,ve[1]),ne.lo(ve[0]-1)),te.set(0,0,ne.get(0,0)),te.set(0,le[1]-1,ne.get(0,ve[1]-1)),te.set(le[0]-1,0,ne.get(ve[0]-1,0)),te.set(le[0]-1,le[1]-1,ne.get(ve[0]-1,ve[1]-1))};function Z(te,ne){return Array.isArray(te)?[ne(te[0]),ne(te[1]),ne(te[2])]:[ne(te),ne(te),ne(te)]}function Q(te){return Array.isArray(te)?te.length===3?[te[0],te[1],te[2],1]:[te[0],te[1],te[2],te[3]]:[0,0,0,1]}function ue(te){if(Array.isArray(te)){if(Array.isArray(te))return[Q(te[0]),Q(te[1]),Q(te[2])];var ne=Q(te);return[ne.slice(),ne.slice(),ne.slice()]}}G.update=function(te){te=te||{},this.objectOffset=te.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in te&&(this.contourWidth=Z(te.contourWidth,Number)),"showContour"in te&&(this.showContour=Z(te.showContour,Boolean)),"showSurface"in te&&(this.showSurface=!!te.showSurface),"contourTint"in te&&(this.contourTint=Z(te.contourTint,Boolean)),"contourColor"in te&&(this.contourColor=ue(te.contourColor)),"contourProject"in te&&(this.contourProject=Z(te.contourProject,function(kt){return Z(kt,Boolean)})),"surfaceProject"in te&&(this.surfaceProject=te.surfaceProject),"dynamicColor"in te&&(this.dynamicColor=ue(te.dynamicColor)),"dynamicTint"in te&&(this.dynamicTint=Z(te.dynamicTint,Number)),"dynamicWidth"in te&&(this.dynamicWidth=Z(te.dynamicWidth,Number)),"opacity"in te&&(this.opacity=te.opacity),"opacityscale"in te&&(this.opacityscale=te.opacityscale),"colorBounds"in te&&(this.colorBounds=te.colorBounds),"vertexColor"in te&&(this.vertexColor=te.vertexColor?1:0),"colormap"in te&&this._colorMap.setPixels(this.genColormap(te.colormap,this.opacityscale));var ne=te.field||te.coords&&te.coords[2]||null,ve=!1;if(ne||(this._field[2].shape[0]||this._field[2].shape[2]?ne=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):ne=this._field[2].hi(0,0)),"field"in te||"coords"in te){var le=(ne.shape[0]+2)*(ne.shape[1]+2);le>this._field[2].data.length&&(g.freeFloat(this._field[2].data),this._field[2].data=g.mallocFloat(n.nextPow2(le))),this._field[2]=E(this._field[2].data,[ne.shape[0]+2,ne.shape[1]+2]),this.padField(this._field[2],ne),this.shape=ne.shape.slice();for(var xe=this.shape,Se=0;Se<2;++Se)this._field[2].size>this._field[Se].data.length&&(g.freeFloat(this._field[Se].data),this._field[Se].data=g.mallocFloat(this._field[2].size)),this._field[Se]=E(this._field[Se].data,[xe[0]+2,xe[1]+2]);if(te.coords){var Re=te.coords;if(!Array.isArray(Re)||Re.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(Se=0;Se<2;++Se){var Ee=Re[Se];for(De=0;De<2;++De)if(Ee.shape[De]!==xe[De])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[Se],Ee)}}else if(te.ticks){var Oe=te.ticks;if(!Array.isArray(Oe)||Oe.length!==2)throw new Error("gl-surface: invalid ticks");for(Se=0;Se<2;++Se){var Be=Oe[Se];if((Array.isArray(Be)||Be.length)&&(Be=E(Be)),Be.shape[0]!==xe[Se])throw new Error("gl-surface: invalid tick length");var Le=E(Be.data,xe);Le.stride[Se]=Be.stride[0],Le.stride[Se^1]=0,this.padField(this._field[Se],Le)}}else{for(Se=0;Se<2;++Se){var Te=[0,0];Te[Se]=1,this._field[Se]=E(this._field[Se].data,[xe[0]+2,xe[1]+2],Te,0)}this._field[0].set(0,0,0);for(var De=0;De<xe[0];++De)this._field[0].set(De+1,0,De);for(this._field[0].set(xe[0]+1,0,xe[0]-1),this._field[1].set(0,0,0),De=0;De<xe[1];++De)this._field[1].set(0,De+1,De);this._field[1].set(0,xe[1]+1,xe[1]-1)}var Ve=this._field,Ye=E(g.mallocFloat(Ve[2].size*3*2),[3,xe[0]+2,xe[1]+2,2]);for(Se=0;Se<3;++Se)L(Ye.pick(Se),Ve[Se],"mirror");var Ne=E(g.mallocFloat(Ve[2].size*3),[xe[0]+2,xe[1]+2,3]);for(Se=0;Se<xe[0]+2;++Se)for(De=0;De<xe[1]+2;++De){var Xe=Ye.get(0,Se,De,0),ht=Ye.get(0,Se,De,1),st=Ye.get(1,Se,De,0),it=Ye.get(1,Se,De,1),nt=Ye.get(2,Se,De,0),pt=Ye.get(2,Se,De,1),Tt=st*pt-it*nt,Et=nt*ht-pt*Xe,Dt=Xe*it-ht*st,et=Math.sqrt(Tt*Tt+Et*Et+Dt*Dt);et<1e-8?(et=Math.max(Math.abs(Tt),Math.abs(Et),Math.abs(Dt)),et<1e-8?(Dt=1,Et=Tt=0,et=1):et=1/et):et=1/Math.sqrt(et),Ne.set(Se,De,0,Tt*et),Ne.set(Se,De,1,Et*et),Ne.set(Se,De,2,Dt*et)}g.free(Ye.data);var Ue=[1/0,1/0,1/0],ze=[-1/0,-1/0,-1/0],rt=1/0,lt=-1/0,Qe=(xe[0]-1)*(xe[1]-1)*6,Fe=g.mallocFloat(n.nextPow2(10*Qe)),Ce=0,pe=0;for(Se=0;Se<xe[0]-1;++Se){e:for(De=0;De<xe[1]-1;++De){for(var we=0;we<2;++we)for(var Ae=0;Ae<2;++Ae)for(var Pe=0;Pe<3;++Pe){var Ge=this._field[Pe].get(1+Se+we,1+De+Ae);if(isNaN(Ge)||!isFinite(Ge))continue e}for(Pe=0;Pe<6;++Pe){var We=Se+O[Pe][0],tt=De+O[Pe][1],ct=this._field[0].get(We+1,tt+1),St=this._field[1].get(We+1,tt+1);Ge=this._field[2].get(We+1,tt+1),Tt=Ne.get(We+1,tt+1,0),Et=Ne.get(We+1,tt+1,1),Dt=Ne.get(We+1,tt+1,2),te.intensity&&(Pt=te.intensity.get(We,tt));var Pt=te.intensity?te.intensity.get(We,tt):Ge+this.objectOffset[2];Fe[Ce++]=We,Fe[Ce++]=tt,Fe[Ce++]=ct,Fe[Ce++]=St,Fe[Ce++]=Ge,Fe[Ce++]=0,Fe[Ce++]=Pt,Fe[Ce++]=Tt,Fe[Ce++]=Et,Fe[Ce++]=Dt,Ue[0]=Math.min(Ue[0],ct+this.objectOffset[0]),Ue[1]=Math.min(Ue[1],St+this.objectOffset[1]),Ue[2]=Math.min(Ue[2],Ge+this.objectOffset[2]),rt=Math.min(rt,Pt),ze[0]=Math.max(ze[0],ct+this.objectOffset[0]),ze[1]=Math.max(ze[1],St+this.objectOffset[1]),ze[2]=Math.max(ze[2],Ge+this.objectOffset[2]),lt=Math.max(lt,Pt),pe+=1}}}for(te.intensityBounds&&(rt=+te.intensityBounds[0],lt=+te.intensityBounds[1]),Se=6;Se<Ce;Se+=10)Fe[Se]=(Fe[Se]-rt)/(lt-rt);this._vertexCount=pe,this._coordinateBuffer.update(Fe.subarray(0,Ce)),g.freeFloat(Fe),g.free(Ne.data),this.bounds=[Ue,ze],this.intensity=te.intensity||this._field[2],(this.intensityBounds[0]!==rt||this.intensityBounds[1]!==lt)&&(ve=!0),this.intensityBounds=[rt,lt]}if("levels"in te){var wt=te.levels;for(Array.isArray(wt[0])?wt=wt.slice():wt=[[],[],wt],Se=0;Se<3;++Se)wt[Se]=wt[Se].slice(),wt[Se].sort(function(kt,Qt){return kt-Qt});for(Se=0;Se<3;++Se)for(De=0;De<wt[Se].length;++De)wt[Se][De]-=this.objectOffset[Se];e:for(Se=0;Se<3;++Se){if(wt[Se].length!==this.contourLevels[Se].length){ve=!0;break}for(De=0;De<wt[Se].length;++De)if(wt[Se][De]!==this.contourLevels[Se][De]){ve=!0;break e}}this.contourLevels=wt}if(ve){Ve=this._field,xe=this.shape;for(var Bt=[],Wt=0;Wt<3;++Wt){var hr=this.contourLevels[Wt],gt=[],jt=[],Ut=[0,0,0];for(Se=0;Se<hr.length;++Se){var or=c(this._field[Wt],hr[Se]);gt.push(Bt.length/5|0),pe=0;e:for(De=0;De<or.cells.length;++De){var ur=or.cells[De];for(Pe=0;Pe<2;++Pe){var dt=or.positions[ur[Pe]],ut=dt[0],yt=Math.floor(ut)|0,Lt=ut-yt,Rt=dt[1],Nt=Math.floor(Rt)|0,Vt=Rt-Nt,Zt=!1;t:for(var qt=0;qt<3;++qt){Ut[qt]=0;var Jt=(Wt+qt+1)%3;for(we=0;we<2;++we){var nr=we?Lt:1-Lt;for(We=Math.min(Math.max(yt+we,0),xe[0])|0,Ae=0;Ae<2;++Ae){var Mr=Ae?Vt:1-Vt;if(tt=Math.min(Math.max(Nt+Ae,0),xe[1])|0,qt<2?Ge=this._field[Jt].get(We,tt):Ge=(this.intensity.get(We,tt)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite(Ge)||isNaN(Ge)){Zt=!0;break t}var Ke=nr*Mr;Ut[qt]+=Ke*Ge}}}if(!Zt)Bt.push(Ut[0],Ut[1],dt[0],dt[1],Ut[2]),pe+=1;else{if(Pe>0){for(var Ze=0;Ze<5;++Ze)Bt.pop();pe-=1}continue e}}}jt.push(pe)}this._contourOffsets[Wt]=gt,this._contourCounts[Wt]=jt}var zt=g.mallocFloat(Bt.length);for(Se=0;Se<Bt.length;++Se)zt[Se]=Bt[Se];this._contourBuffer.update(zt),g.freeFloat(zt)}},G.dispose=function(){this._shader.dispose(),this._vao.dispose(),this._coordinateBuffer.dispose(),this._colorMap.dispose(),this._contourBuffer.dispose(),this._contourVAO.dispose(),this._contourShader.dispose(),this._contourPickShader.dispose(),this._dynamicBuffer.dispose(),this._dynamicVAO.dispose();for(var te=0;te<3;++te)g.freeFloat(this._field[te].data)},G.highlight=function(te){var ne;if(!te){this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],this.highlightLevel=[-1,-1,-1];return}for(ne=0;ne<3;++ne)this.enableHighlight[ne]?this.highlightLevel[ne]=te.level[ne]:this.highlightLevel[ne]=-1;var ve;for(this.snapToData?ve=te.dataCoordinate:ve=te.position,ne=0;ne<3;++ne)ve[ne]-=this.objectOffset[ne];if(!((!this.enableDynamic[0]||ve[0]===this.dynamicLevel[0])&&(!this.enableDynamic[1]||ve[1]===this.dynamicLevel[1])&&(!this.enableDynamic[2]||ve[2]===this.dynamicLevel[2]))){for(var le=0,xe=this.shape,Se=g.mallocFloat(12*xe[0]*xe[1]),Re=0;Re<3;++Re){if(!this.enableDynamic[Re]){this.dynamicLevel[Re]=NaN,this._dynamicCounts[Re]=0;continue}this.dynamicLevel[Re]=ve[Re];var Ee=(Re+1)%3,Oe=(Re+2)%3,Be=this._field[Re],Le=this._field[Ee],Te=this._field[Oe],De=c(Be,ve[Re]),Ve=De.cells,Ye=De.positions;for(this._dynamicOffsets[Re]=le,ne=0;ne<Ve.length;++ne)for(var Ne=Ve[ne],Xe=0;Xe<2;++Xe){var ht=Ye[Ne[Xe]],st=+ht[0],it=st|0,nt=Math.min(it+1,xe[0])|0,pt=st-it,Tt=1-pt,Et=+ht[1],Dt=Et|0,et=Math.min(Dt+1,xe[1])|0,Ue=Et-Dt,ze=1-Ue,rt=Tt*ze,lt=Tt*Ue,Qe=pt*ze,Fe=pt*Ue,Ce=rt*Le.get(it,Dt)+lt*Le.get(it,et)+Qe*Le.get(nt,Dt)+Fe*Le.get(nt,et),pe=rt*Te.get(it,Dt)+lt*Te.get(it,et)+Qe*Te.get(nt,Dt)+Fe*Te.get(nt,et);if(isNaN(Ce)||isNaN(pe)){Xe&&(le-=1);break}Se[2*le+0]=Ce,Se[2*le+1]=pe,le+=1}this._dynamicCounts[Re]=le-this._dynamicOffsets[Re]}this._dynamicBuffer.update(Se.subarray(0,2*le)),g.freeFloat(Se)}};function fe(te){var ne=te.gl,ve=A(ne),le=S(ne),xe=C(ne),Se=o(ne),Re=u(ne),Ee=i(ne,[{buffer:Re,size:4,stride:R,offset:0},{buffer:Re,size:3,stride:R,offset:16},{buffer:Re,size:3,stride:R,offset:28}]),Oe=u(ne),Be=i(ne,[{buffer:Oe,size:4,stride:20,offset:0},{buffer:Oe,size:1,stride:20,offset:16}]),Le=u(ne),Te=i(ne,[{buffer:Le,size:2,type:ne.FLOAT}]),De=f(ne,1,k,ne.RGBA,ne.UNSIGNED_BYTE);De.minFilter=ne.LINEAR,De.magFilter=ne.LINEAR;var Ve=new V(ne,[0,0],[[0,0,0],[0,0,0]],ve,le,Re,Ee,De,xe,Se,Oe,Be,Le,Te,[0,0,0]),Ye={levels:[[],[],[]]};for(var Ne in te)Ye[Ne]=te[Ne];return Ye.colormap=Ye.colormap||"jet",Ve.update(Ye),Ve}},8931:function(v,y,r){var n=r(5050),u=r(7498),i=r(5306);v.exports=o;var f=null,g=null,h=null;function b(R){f=[R.LINEAR,R.NEAREST_MIPMAP_LINEAR,R.LINEAR_MIPMAP_NEAREST,R.LINEAR_MIPMAP_NEAREST],g=[R.NEAREST,R.LINEAR,R.NEAREST_MIPMAP_NEAREST,R.NEAREST_MIPMAP_LINEAR,R.LINEAR_MIPMAP_NEAREST,R.LINEAR_MIPMAP_LINEAR],h=[R.REPEAT,R.CLAMP_TO_EDGE,R.MIRRORED_REPEAT]}function p(R){return typeof HTMLCanvasElement<"u"&&R instanceof HTMLCanvasElement||typeof HTMLImageElement<"u"&&R instanceof HTMLImageElement||typeof HTMLVideoElement<"u"&&R instanceof HTMLVideoElement||typeof ImageData<"u"&&R instanceof ImageData}var E=function(R,T){u.muls(R,T,255)};function c(R,T,O){var N=R.gl,H=N.getParameter(N.MAX_TEXTURE_SIZE);if(T<0||T>H||O<0||O>H)throw new Error("gl-texture2d: Invalid texture size");return R._shape=[T,O],R.bind(),N.texImage2D(N.TEXTURE_2D,0,R.format,T,O,0,R.format,R.type,null),R._mipLevels=[0],R}function l(R,T,O,N,H,k){this.gl=R,this.handle=T,this.format=H,this.type=k,this._shape=[O,N],this._mipLevels=[0],this._magFilter=R.NEAREST,this._minFilter=R.NEAREST,this._wrapS=R.CLAMP_TO_EDGE,this._wrapT=R.CLAMP_TO_EDGE,this._anisoSamples=1;var V=this,G=[this._wrapS,this._wrapT];Object.defineProperties(G,[{get:function(){return V._wrapS},set:function(Y){return V.wrapS=Y}},{get:function(){return V._wrapT},set:function(Y){return V.wrapT=Y}}]),this._wrapVector=G;var U=[this._shape[0],this._shape[1]];Object.defineProperties(U,[{get:function(){return V._shape[0]},set:function(Y){return V.width=Y}},{get:function(){return V._shape[1]},set:function(Y){return V.height=Y}}]),this._shapeVector=U}var m=l.prototype;Object.defineProperties(m,{minFilter:{get:function(){return this._minFilter},set:function(R){this.bind();var T=this.gl;if(this.type===T.FLOAT&&f.indexOf(R)>=0&&(T.getExtension("OES_texture_float_linear")||(R=T.NEAREST)),g.indexOf(R)<0)throw new Error("gl-texture2d: Unknown filter mode "+R);return T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MIN_FILTER,R),this._minFilter=R}},magFilter:{get:function(){return this._magFilter},set:function(R){this.bind();var T=this.gl;if(this.type===T.FLOAT&&f.indexOf(R)>=0&&(T.getExtension("OES_texture_float_linear")||(R=T.NEAREST)),g.indexOf(R)<0)throw new Error("gl-texture2d: Unknown filter mode "+R);return T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MAG_FILTER,R),this._magFilter=R}},mipSamples:{get:function(){return this._anisoSamples},set:function(R){var T=this._anisoSamples;if(this._anisoSamples=Math.max(R,1)|0,T!==this._anisoSamples){var O=this.gl.getExtension("EXT_texture_filter_anisotropic");O&&this.gl.texParameterf(this.gl.TEXTURE_2D,O.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(R){if(this.bind(),h.indexOf(R)<0)throw new Error("gl-texture2d: Unknown wrap mode "+R);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,R),this._wrapS=R}},wrapT:{get:function(){return this._wrapT},set:function(R){if(this.bind(),h.indexOf(R)<0)throw new Error("gl-texture2d: Unknown wrap mode "+R);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,R),this._wrapT=R}},wrap:{get:function(){return this._wrapVector},set:function(R){if(Array.isArray(R)||(R=[R,R]),R.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var T=0;T<2;++T)if(h.indexOf(R[T])<0)throw new Error("gl-texture2d: Unknown wrap mode "+R);this._wrapS=R[0],this._wrapT=R[1];var O=this.gl;return this.bind(),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_WRAP_S,this._wrapS),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_WRAP_T,this._wrapT),R}},shape:{get:function(){return this._shapeVector},set:function(R){if(!Array.isArray(R))R=[R|0,R|0];else if(R.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return c(this,R[0]|0,R[1]|0),[R[0]|0,R[1]|0]}},width:{get:function(){return this._shape[0]},set:function(R){return R=R|0,c(this,R,this._shape[1]),R}},height:{get:function(){return this._shape[1]},set:function(R){return R=R|0,c(this,this._shape[0],R),R}}}),m.bind=function(R){var T=this.gl;return R!==void 0&&T.activeTexture(T.TEXTURE0+(R|0)),T.bindTexture(T.TEXTURE_2D,this.handle),R!==void 0?R|0:T.getParameter(T.ACTIVE_TEXTURE)-T.TEXTURE0},m.dispose=function(){this.gl.deleteTexture(this.handle)},m.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var R=Math.min(this._shape[0],this._shape[1]),T=0;R>0;++T,R>>>=1)this._mipLevels.indexOf(T)<0&&this._mipLevels.push(T)},m.setPixels=function(R,T,O,N){var H=this.gl;this.bind(),Array.isArray(T)?(N=O,O=T[1]|0,T=T[0]|0):(T=T||0,O=O||0),N=N||0;var k=p(R)?R:R.raw;if(k){var V=this._mipLevels.indexOf(N)<0;V?(H.texImage2D(H.TEXTURE_2D,0,this.format,this.format,this.type,k),this._mipLevels.push(N)):H.texSubImage2D(H.TEXTURE_2D,N,T,O,this.format,this.type,k)}else if(R.shape&&R.stride&&R.data){if(R.shape.length<2||T+R.shape[1]>this._shape[1]>>>N||O+R.shape[0]>this._shape[0]>>>N||T<0||O<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");L(H,T,O,N,this.format,this.type,this._mipLevels,R)}else throw new Error("gl-texture2d: Unsupported data type")};function M(R,T){return R.length===3?T[2]===1&&T[1]===R[0]*R[2]&&T[0]===R[2]:T[0]===1&&T[1]===R[0]}function L(R,T,O,N,H,k,V,G){var U=G.dtype,Y=G.shape.slice();if(Y.length<2||Y.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var ee=0,re=0,ie=M(Y,G.stride.slice());if(U==="float32"?ee=R.FLOAT:U==="float64"?(ee=R.FLOAT,ie=!1,U="float32"):U==="uint8"?ee=R.UNSIGNED_BYTE:(ee=R.UNSIGNED_BYTE,ie=!1,U="uint8"),Y.length===2)re=R.LUMINANCE,Y=[Y[0],Y[1],1],G=n(G.data,Y,[G.stride[0],G.stride[1],1],G.offset);else if(Y.length===3){if(Y[2]===1)re=R.ALPHA;else if(Y[2]===2)re=R.LUMINANCE_ALPHA;else if(Y[2]===3)re=R.RGB;else if(Y[2]===4)re=R.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");Y[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((re===R.LUMINANCE||re===R.ALPHA)&&(H===R.LUMINANCE||H===R.ALPHA)&&(re=H),re!==H)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var se=G.size,ce=V.indexOf(N)<0;if(ce&&V.push(N),ee===k&&ie)G.offset===0&&G.data.length===se?ce?R.texImage2D(R.TEXTURE_2D,N,H,Y[0],Y[1],0,H,k,G.data):R.texSubImage2D(R.TEXTURE_2D,N,T,O,Y[0],Y[1],H,k,G.data):ce?R.texImage2D(R.TEXTURE_2D,N,H,Y[0],Y[1],0,H,k,G.data.subarray(G.offset,G.offset+se)):R.texSubImage2D(R.TEXTURE_2D,N,T,O,Y[0],Y[1],H,k,G.data.subarray(G.offset,G.offset+se));else{var q;k===R.FLOAT?q=i.mallocFloat32(se):q=i.mallocUint8(se);var j=n(q,Y,[Y[2],Y[2]*Y[0],1]);ee===R.FLOAT&&k===R.UNSIGNED_BYTE?E(j,G):u.assign(j,G),ce?R.texImage2D(R.TEXTURE_2D,N,H,Y[0],Y[1],0,H,k,q.subarray(0,se)):R.texSubImage2D(R.TEXTURE_2D,N,T,O,Y[0],Y[1],H,k,q.subarray(0,se)),k===R.FLOAT?i.freeFloat32(q):i.freeUint8(q)}}function D(R){var T=R.createTexture();return R.bindTexture(R.TEXTURE_2D,T),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_MIN_FILTER,R.NEAREST),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_MAG_FILTER,R.NEAREST),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_S,R.CLAMP_TO_EDGE),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_T,R.CLAMP_TO_EDGE),T}function A(R,T,O,N,H){var k=R.getParameter(R.MAX_TEXTURE_SIZE);if(T<0||T>k||O<0||O>k)throw new Error("gl-texture2d: Invalid texture shape");if(H===R.FLOAT&&!R.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var V=D(R);return R.texImage2D(R.TEXTURE_2D,0,N,T,O,0,N,H,null),new l(R,V,T,O,N,H)}function C(R,T,O,N,H,k){var V=D(R);return R.texImage2D(R.TEXTURE_2D,0,H,H,k,T),new l(R,V,O,N,H,k)}function S(R,T){var O=T.dtype,N=T.shape.slice(),H=R.getParameter(R.MAX_TEXTURE_SIZE);if(N[0]<0||N[0]>H||N[1]<0||N[1]>H)throw new Error("gl-texture2d: Invalid texture size");var k=M(N,T.stride.slice()),V=0;O==="float32"?V=R.FLOAT:O==="float64"?(V=R.FLOAT,k=!1,O="float32"):O==="uint8"?V=R.UNSIGNED_BYTE:(V=R.UNSIGNED_BYTE,k=!1,O="uint8");var G=0;if(N.length===2)G=R.LUMINANCE,N=[N[0],N[1],1],T=n(T.data,N,[T.stride[0],T.stride[1],1],T.offset);else if(N.length===3)if(N[2]===1)G=R.ALPHA;else if(N[2]===2)G=R.LUMINANCE_ALPHA;else if(N[2]===3)G=R.RGB;else if(N[2]===4)G=R.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");V===R.FLOAT&&!R.getExtension("OES_texture_float")&&(V=R.UNSIGNED_BYTE,k=!1);var U,Y,ee=T.size;if(k)T.offset===0&&T.data.length===ee?U=T.data:U=T.data.subarray(T.offset,T.offset+ee);else{var re=[N[2],N[2]*N[0],1];Y=i.malloc(ee,O);var ie=n(Y,N,re,0);(O==="float32"||O==="float64")&&V===R.UNSIGNED_BYTE?E(ie,T):u.assign(ie,T),U=Y.subarray(0,ee)}var se=D(R);return R.texImage2D(R.TEXTURE_2D,0,G,N[0],N[1],0,G,V,U),k||i.free(Y),new l(R,se,N[0],N[1],G,V)}function o(R){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(f||b(R),typeof arguments[1]=="number")return A(R,arguments[1],arguments[2],arguments[3]||R.RGBA,arguments[4]||R.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return A(R,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||R.RGBA,arguments[3]||R.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var T=arguments[1],O=p(T)?T:T.raw;if(O)return C(R,O,T.width|0,T.height|0,arguments[2]||R.RGBA,arguments[3]||R.UNSIGNED_BYTE);if(T.shape&&T.data&&T.stride)return S(R,T)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},3056:function(v){function y(r,n,u){n?n.bind():r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,null);var i=r.getParameter(r.MAX_VERTEX_ATTRIBS)|0;if(u){if(u.length>i)throw new Error("gl-vao: Too many vertex attributes");for(var f=0;f<u.length;++f){var g=u[f];if(g.buffer){var h=g.buffer,b=g.size||4,p=g.type||r.FLOAT,E=!!g.normalized,c=g.stride||0,l=g.offset||0;h.bind(),r.enableVertexAttribArray(f),r.vertexAttribPointer(f,b,p,E,c,l)}else{if(typeof g=="number")r.vertexAttrib1f(f,g);else if(g.length===1)r.vertexAttrib1f(f,g[0]);else if(g.length===2)r.vertexAttrib2f(f,g[0],g[1]);else if(g.length===3)r.vertexAttrib3f(f,g[0],g[1],g[2]);else if(g.length===4)r.vertexAttrib4f(f,g[0],g[1],g[2],g[3]);else throw new Error("gl-vao: Invalid vertex attribute");r.disableVertexAttribArray(f)}}for(;f<i;++f)r.disableVertexAttribArray(f)}else{r.bindBuffer(r.ARRAY_BUFFER,null);for(var f=0;f<i;++f)r.disableVertexAttribArray(f)}}v.exports=y},7220:function(v,y,r){var n=r(3056);function u(f){this.gl=f,this._elements=null,this._attributes=null,this._elementsType=f.UNSIGNED_SHORT}u.prototype.bind=function(){n(this.gl,this._elements,this._attributes)},u.prototype.update=function(f,g,h){this._elements=g,this._attributes=f,this._elementsType=h||this.gl.UNSIGNED_SHORT},u.prototype.dispose=function(){},u.prototype.unbind=function(){},u.prototype.draw=function(f,g,h){h=h||0;var b=this.gl;this._elements?b.drawElements(f,g,this._elementsType,h):b.drawArrays(f,h,g)};function i(f){return new u(f)}v.exports=i},3778:function(v,y,r){var n=r(3056);function u(g,h,b,p,E,c){this.location=g,this.dimension=h,this.a=b,this.b=p,this.c=E,this.d=c}u.prototype.bind=function(g){switch(this.dimension){case 1:g.vertexAttrib1f(this.location,this.a);break;case 2:g.vertexAttrib2f(this.location,this.a,this.b);break;case 3:g.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:g.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d);break}};function i(g,h,b){this.gl=g,this._ext=h,this.handle=b,this._attribs=[],this._useElements=!1,this._elementsType=g.UNSIGNED_SHORT}i.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var g=0;g<this._attribs.length;++g)this._attribs[g].bind(this.gl)},i.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},i.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},i.prototype.update=function(g,h,b){if(this.bind(),n(this.gl,h,g),this.unbind(),this._attribs.length=0,g)for(var p=0;p<g.length;++p){var E=g[p];typeof E=="number"?this._attribs.push(new u(p,1,E)):Array.isArray(E)&&this._attribs.push(new u(p,E.length,E[0],E[1],E[2],E[3]))}this._useElements=!!h,this._elementsType=b||this.gl.UNSIGNED_SHORT},i.prototype.draw=function(g,h,b){b=b||0;var p=this.gl;this._useElements?p.drawElements(g,h,this._elementsType,b):p.drawArrays(g,b,h)};function f(g,h){return new i(g,h,h.createVertexArrayOES())}v.exports=f},2944:function(v,y,r){var n=r(3778),u=r(7220);function i(g){this.bindVertexArrayOES=g.bindVertexArray.bind(g),this.createVertexArrayOES=g.createVertexArray.bind(g),this.deleteVertexArrayOES=g.deleteVertexArray.bind(g)}function f(g,h,b,p){var E=g.createVertexArray?new i(g):g.getExtension("OES_vertex_array_object"),c;return E?c=n(g,E):c=u(g),c.update(h,b,p),c}v.exports=f},2598:function(v){v.exports=y;function y(r,n,u){return r[0]=n[0]+u[0],r[1]=n[1]+u[1],r[2]=n[2]+u[2],r}},5879:function(v,y,r){v.exports=f;var n=r(5415),u=r(899),i=r(9305);function f(g,h){var b=n(g[0],g[1],g[2]),p=n(h[0],h[1],h[2]);u(b,b),u(p,p);var E=i(b,p);return E>1?0:Math.acos(E)}},8827:function(v){v.exports=y;function y(r,n){return r[0]=Math.ceil(n[0]),r[1]=Math.ceil(n[1]),r[2]=Math.ceil(n[2]),r}},7622:function(v){v.exports=y;function y(r){var n=new Float32Array(3);return n[0]=r[0],n[1]=r[1],n[2]=r[2],n}},8782:function(v){v.exports=y;function y(r,n){return r[0]=n[0],r[1]=n[1],r[2]=n[2],r}},8501:function(v){v.exports=y;function y(){var r=new Float32Array(3);return r[0]=0,r[1]=0,r[2]=0,r}},903:function(v){v.exports=y;function y(r,n,u){var i=n[0],f=n[1],g=n[2],h=u[0],b=u[1],p=u[2];return r[0]=f*p-g*b,r[1]=g*h-i*p,r[2]=i*b-f*h,r}},5981:function(v,y,r){v.exports=r(8288)},8288:function(v){v.exports=y;function y(r,n){var u=n[0]-r[0],i=n[1]-r[1],f=n[2]-r[2];return Math.sqrt(u*u+i*i+f*f)}},8629:function(v,y,r){v.exports=r(7979)},7979:function(v){v.exports=y;function y(r,n,u){return r[0]=n[0]/u[0],r[1]=n[1]/u[1],r[2]=n[2]/u[2],r}},9305:function(v){v.exports=y;function y(r,n){return r[0]*n[0]+r[1]*n[1]+r[2]*n[2]}},154:function(v){v.exports=1e-6},4932:function(v,y,r){v.exports=u;var n=r(154);function u(i,f){var g=i[0],h=i[1],b=i[2],p=f[0],E=f[1],c=f[2];return Math.abs(g-p)<=n*Math.max(1,Math.abs(g),Math.abs(p))&&Math.abs(h-E)<=n*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(b-c)<=n*Math.max(1,Math.abs(b),Math.abs(c))}},5777:function(v){v.exports=y;function y(r,n){return r[0]===n[0]&&r[1]===n[1]&&r[2]===n[2]}},3306:function(v){v.exports=y;function y(r,n){return r[0]=Math.floor(n[0]),r[1]=Math.floor(n[1]),r[2]=Math.floor(n[2]),r}},7447:function(v,y,r){v.exports=u;var n=r(8501)();function u(i,f,g,h,b,p){var E,c;for(f||(f=3),g||(g=0),h?c=Math.min(h*f+g,i.length):c=i.length,E=g;E<c;E+=f)n[0]=i[E],n[1]=i[E+1],n[2]=i[E+2],b(n,n,p),i[E]=n[0],i[E+1]=n[1],i[E+2]=n[2];return i}},5415:function(v){v.exports=y;function y(r,n,u){var i=new Float32Array(3);return i[0]=r,i[1]=n,i[2]=u,i}},2858:function(v,y,r){v.exports={EPSILON:r(154),create:r(8501),clone:r(7622),angle:r(5879),fromValues:r(5415),copy:r(8782),set:r(831),equals:r(4932),exactEquals:r(5777),add:r(2598),subtract:r(911),sub:r(8921),multiply:r(105),mul:r(5733),divide:r(7979),div:r(8629),min:r(3605),max:r(1716),floor:r(3306),ceil:r(8827),round:r(1624),scale:r(5685),scaleAndAdd:r(6722),distance:r(8288),dist:r(5981),squaredDistance:r(6403),sqrDist:r(5294),length:r(4693),len:r(1468),squaredLength:r(4337),sqrLen:r(3303),negate:r(435),inverse:r(2073),normalize:r(899),dot:r(9305),cross:r(903),lerp:r(1868),random:r(6660),transformMat4:r(3255),transformMat3:r(9908),transformQuat:r(6568),rotateX:r(392),rotateY:r(3222),rotateZ:r(3388),forEach:r(7447)}},2073:function(v){v.exports=y;function y(r,n){return r[0]=1/n[0],r[1]=1/n[1],r[2]=1/n[2],r}},1468:function(v,y,r){v.exports=r(4693)},4693:function(v){v.exports=y;function y(r){var n=r[0],u=r[1],i=r[2];return Math.sqrt(n*n+u*u+i*i)}},1868:function(v){v.exports=y;function y(r,n,u,i){var f=n[0],g=n[1],h=n[2];return r[0]=f+i*(u[0]-f),r[1]=g+i*(u[1]-g),r[2]=h+i*(u[2]-h),r}},1716:function(v){v.exports=y;function y(r,n,u){return r[0]=Math.max(n[0],u[0]),r[1]=Math.max(n[1],u[1]),r[2]=Math.max(n[2],u[2]),r}},3605:function(v){v.exports=y;function y(r,n,u){return r[0]=Math.min(n[0],u[0]),r[1]=Math.min(n[1],u[1]),r[2]=Math.min(n[2],u[2]),r}},5733:function(v,y,r){v.exports=r(105)},105:function(v){v.exports=y;function y(r,n,u){return r[0]=n[0]*u[0],r[1]=n[1]*u[1],r[2]=n[2]*u[2],r}},435:function(v){v.exports=y;function y(r,n){return r[0]=-n[0],r[1]=-n[1],r[2]=-n[2],r}},899:function(v){v.exports=y;function y(r,n){var u=n[0],i=n[1],f=n[2],g=u*u+i*i+f*f;return g>0&&(g=1/Math.sqrt(g),r[0]=n[0]*g,r[1]=n[1]*g,r[2]=n[2]*g),r}},6660:function(v){v.exports=y;function y(r,n){n=n||1;var u=Math.random()*2*Math.PI,i=Math.random()*2-1,f=Math.sqrt(1-i*i)*n;return r[0]=Math.cos(u)*f,r[1]=Math.sin(u)*f,r[2]=i*n,r}},392:function(v){v.exports=y;function y(r,n,u,i){var f=u[1],g=u[2],h=n[1]-f,b=n[2]-g,p=Math.sin(i),E=Math.cos(i);return r[0]=n[0],r[1]=f+h*E-b*p,r[2]=g+h*p+b*E,r}},3222:function(v){v.exports=y;function y(r,n,u,i){var f=u[0],g=u[2],h=n[0]-f,b=n[2]-g,p=Math.sin(i),E=Math.cos(i);return r[0]=f+b*p+h*E,r[1]=n[1],r[2]=g+b*E-h*p,r}},3388:function(v){v.exports=y;function y(r,n,u,i){var f=u[0],g=u[1],h=n[0]-f,b=n[1]-g,p=Math.sin(i),E=Math.cos(i);return r[0]=f+h*E-b*p,r[1]=g+h*p+b*E,r[2]=n[2],r}},1624:function(v){v.exports=y;function y(r,n){return r[0]=Math.round(n[0]),r[1]=Math.round(n[1]),r[2]=Math.round(n[2]),r}},5685:function(v){v.exports=y;function y(r,n,u){return r[0]=n[0]*u,r[1]=n[1]*u,r[2]=n[2]*u,r}},6722:function(v){v.exports=y;function y(r,n,u,i){return r[0]=n[0]+u[0]*i,r[1]=n[1]+u[1]*i,r[2]=n[2]+u[2]*i,r}},831:function(v){v.exports=y;function y(r,n,u,i){return r[0]=n,r[1]=u,r[2]=i,r}},5294:function(v,y,r){v.exports=r(6403)},3303:function(v,y,r){v.exports=r(4337)},6403:function(v){v.exports=y;function y(r,n){var u=n[0]-r[0],i=n[1]-r[1],f=n[2]-r[2];return u*u+i*i+f*f}},4337:function(v){v.exports=y;function y(r){var n=r[0],u=r[1],i=r[2];return n*n+u*u+i*i}},8921:function(v,y,r){v.exports=r(911)},911:function(v){v.exports=y;function y(r,n,u){return r[0]=n[0]-u[0],r[1]=n[1]-u[1],r[2]=n[2]-u[2],r}},9908:function(v){v.exports=y;function y(r,n,u){var i=n[0],f=n[1],g=n[2];return r[0]=i*u[0]+f*u[3]+g*u[6],r[1]=i*u[1]+f*u[4]+g*u[7],r[2]=i*u[2]+f*u[5]+g*u[8],r}},3255:function(v){v.exports=y;function y(r,n,u){var i=n[0],f=n[1],g=n[2],h=u[3]*i+u[7]*f+u[11]*g+u[15];return h=h||1,r[0]=(u[0]*i+u[4]*f+u[8]*g+u[12])/h,r[1]=(u[1]*i+u[5]*f+u[9]*g+u[13])/h,r[2]=(u[2]*i+u[6]*f+u[10]*g+u[14])/h,r}},6568:function(v){v.exports=y;function y(r,n,u){var i=n[0],f=n[1],g=n[2],h=u[0],b=u[1],p=u[2],E=u[3],c=E*i+b*g-p*f,l=E*f+p*i-h*g,m=E*g+h*f-b*i,M=-h*i-b*f-p*g;return r[0]=c*E+M*-h+l*-p-m*-b,r[1]=l*E+M*-b+m*-h-c*-p,r[2]=m*E+M*-p+c*-b-l*-h,r}},3433:function(v){v.exports=y;function y(r,n,u){return r[0]=n[0]+u[0],r[1]=n[1]+u[1],r[2]=n[2]+u[2],r[3]=n[3]+u[3],r}},1413:function(v){v.exports=y;function y(r){var n=new Float32Array(4);return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n}},3470:function(v){v.exports=y;function y(r,n){return r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r}},5313:function(v){v.exports=y;function y(){var r=new Float32Array(4);return r[0]=0,r[1]=0,r[2]=0,r[3]=0,r}},5446:function(v){v.exports=y;function y(r,n){var u=n[0]-r[0],i=n[1]-r[1],f=n[2]-r[2],g=n[3]-r[3];return Math.sqrt(u*u+i*i+f*f+g*g)}},205:function(v){v.exports=y;function y(r,n,u){return r[0]=n[0]/u[0],r[1]=n[1]/u[1],r[2]=n[2]/u[2],r[3]=n[3]/u[3],r}},4242:function(v){v.exports=y;function y(r,n){return r[0]*n[0]+r[1]*n[1]+r[2]*n[2]+r[3]*n[3]}},5680:function(v){v.exports=y;function y(r,n,u,i){var f=new Float32Array(4);return f[0]=r,f[1]=n,f[2]=u,f[3]=i,f}},4020:function(v,y,r){v.exports={create:r(5313),clone:r(1413),fromValues:r(5680),copy:r(3470),set:r(6453),add:r(3433),subtract:r(2705),multiply:r(746),divide:r(205),min:r(2170),max:r(3030),scale:r(5510),scaleAndAdd:r(4224),distance:r(5446),squaredDistance:r(1542),length:r(8177),squaredLength:r(9037),negate:r(6459),inverse:r(8057),normalize:r(381),dot:r(4242),lerp:r(8746),random:r(3770),transformMat4:r(6342),transformQuat:r(5022)}},8057:function(v){v.exports=y;function y(r,n){return r[0]=1/n[0],r[1]=1/n[1],r[2]=1/n[2],r[3]=1/n[3],r}},8177:function(v){v.exports=y;function y(r){var n=r[0],u=r[1],i=r[2],f=r[3];return Math.sqrt(n*n+u*u+i*i+f*f)}},8746:function(v){v.exports=y;function y(r,n,u,i){var f=n[0],g=n[1],h=n[2],b=n[3];return r[0]=f+i*(u[0]-f),r[1]=g+i*(u[1]-g),r[2]=h+i*(u[2]-h),r[3]=b+i*(u[3]-b),r}},3030:function(v){v.exports=y;function y(r,n,u){return r[0]=Math.max(n[0],u[0]),r[1]=Math.max(n[1],u[1]),r[2]=Math.max(n[2],u[2]),r[3]=Math.max(n[3],u[3]),r}},2170:function(v){v.exports=y;function y(r,n,u){return r[0]=Math.min(n[0],u[0]),r[1]=Math.min(n[1],u[1]),r[2]=Math.min(n[2],u[2]),r[3]=Math.min(n[3],u[3]),r}},746:function(v){v.exports=y;function y(r,n,u){return r[0]=n[0]*u[0],r[1]=n[1]*u[1],r[2]=n[2]*u[2],r[3]=n[3]*u[3],r}},6459:function(v){v.exports=y;function y(r,n){return r[0]=-n[0],r[1]=-n[1],r[2]=-n[2],r[3]=-n[3],r}},381:function(v){v.exports=y;function y(r,n){var u=n[0],i=n[1],f=n[2],g=n[3],h=u*u+i*i+f*f+g*g;return h>0&&(h=1/Math.sqrt(h),r[0]=u*h,r[1]=i*h,r[2]=f*h,r[3]=g*h),r}},3770:function(v,y,r){var n=r(381),u=r(5510);v.exports=i;function i(f,g){return g=g||1,f[0]=Math.random(),f[1]=Math.random(),f[2]=Math.random(),f[3]=Math.random(),n(f,f),u(f,f,g),f}},5510:function(v){v.exports=y;function y(r,n,u){return r[0]=n[0]*u,r[1]=n[1]*u,r[2]=n[2]*u,r[3]=n[3]*u,r}},4224:function(v){v.exports=y;function y(r,n,u,i){return r[0]=n[0]+u[0]*i,r[1]=n[1]+u[1]*i,r[2]=n[2]+u[2]*i,r[3]=n[3]+u[3]*i,r}},6453:function(v){v.exports=y;function y(r,n,u,i,f){return r[0]=n,r[1]=u,r[2]=i,r[3]=f,r}},1542:function(v){v.exports=y;function y(r,n){var u=n[0]-r[0],i=n[1]-r[1],f=n[2]-r[2],g=n[3]-r[3];return u*u+i*i+f*f+g*g}},9037:function(v){v.exports=y;function y(r){var n=r[0],u=r[1],i=r[2],f=r[3];return n*n+u*u+i*i+f*f}},2705:function(v){v.exports=y;function y(r,n,u){return r[0]=n[0]-u[0],r[1]=n[1]-u[1],r[2]=n[2]-u[2],r[3]=n[3]-u[3],r}},6342:function(v){v.exports=y;function y(r,n,u){var i=n[0],f=n[1],g=n[2],h=n[3];return r[0]=u[0]*i+u[4]*f+u[8]*g+u[12]*h,r[1]=u[1]*i+u[5]*f+u[9]*g+u[13]*h,r[2]=u[2]*i+u[6]*f+u[10]*g+u[14]*h,r[3]=u[3]*i+u[7]*f+u[11]*g+u[15]*h,r}},5022:function(v){v.exports=y;function y(r,n,u){var i=n[0],f=n[1],g=n[2],h=u[0],b=u[1],p=u[2],E=u[3],c=E*i+b*g-p*f,l=E*f+p*i-h*g,m=E*g+h*f-b*i,M=-h*i-b*f-p*g;return r[0]=c*E+M*-h+l*-p-m*-b,r[1]=l*E+M*-b+m*-h-c*-p,r[2]=m*E+M*-p+c*-b-l*-h,r[3]=n[3],r}},9365:function(v,y,r){var n=r(8096),u=r(7896);v.exports=i;function i(f){for(var g=Array.isArray(f)?f:n(f),h=0;h<g.length;h++){var b=g[h];if(b.type==="preprocessor"){var p=b.data.match(/\#define\s+SHADER_NAME(_B64)?\s+(.+)$/);if(p&&p[2]){var E=p[1],c=p[2];return(E?u(c):c).trim()}}}}},3193:function(v,y,r){v.exports=T;var n=r(399),u=r(9746),i=r(9525),f=r(9458),g=r(3585),h=999,b=9999,p=0,E=1,c=2,l=3,m=4,M=5,L=6,D=7,A=8,C=9,S=10,o=11,R=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"];function T(O){var N=0,H=0,k=h,V,G,U=[],Y=[],ee=1,re=0,ie=0,se=!1,ce=!1,q="",j;O=O||{};var Z=i,Q=n;O.version==="300 es"&&(Z=g,Q=f);for(var ue={},fe={},N=0;N<Z.length;N++)ue[Z[N]]=!0;for(var N=0;N<Q.length;N++)fe[Q[N]]=!0;return function(Ye){return Y=[],Ye!==null?ne(Ye):ve()};function te(Ye){Ye.length&&Y.push({type:R[k],data:Ye,position:ie,line:ee,column:re})}function ne(Ye){N=0,Ye.toString&&(Ye=Ye.toString()),q+=Ye.replace(/\r\n/g,`
`),j=q.length;for(var Ne;V=q[N],N<j;){switch(Ne=N,k){case p:N=Ee();break;case E:N=Re();break;case c:N=Se();break;case l:N=Oe();break;case m:N=Te();break;case o:N=Le();break;case M:N=De();break;case b:N=Ve();break;case C:N=xe();break;case h:N=le();break}if(Ne!==N)switch(q[Ne]){case`
`:re=0,++ee;break;default:++re;break}}return H+=N,q=q.slice(N),Y}function ve(Ye){return U.length&&te(U.join("")),k=S,te("(eof)"),Y}function le(){return U=U.length?[]:U,G==="/"&&V==="*"?(ie=H+N-1,k=p,G=V,N+1):G==="/"&&V==="/"?(ie=H+N-1,k=E,G=V,N+1):V==="#"?(k=c,ie=H+N,N):/\s/.test(V)?(k=C,ie=H+N,N):(se=/\d/.test(V),ce=/[^\w_]/.test(V),ie=H+N,k=se?m:ce?l:b,N)}function xe(){return/[^\s]/g.test(V)?(te(U.join("")),k=h,N):(U.push(V),G=V,N+1)}function Se(){return(V==="\r"||V===`
`)&&G!=="\\"?(te(U.join("")),k=h,N):(U.push(V),G=V,N+1)}function Re(){return Se()}function Ee(){return V==="/"&&G==="*"?(U.push(V),te(U.join("")),k=h,N+1):(U.push(V),G=V,N+1)}function Oe(){if(G==="."&&/\d/.test(V))return k=M,N;if(G==="/"&&V==="*")return k=p,N;if(G==="/"&&V==="/")return k=E,N;if(V==="."&&U.length){for(;Be(U););return k=M,N}if(V===";"||V===")"||V==="("){if(U.length)for(;Be(U););return te(V),k=h,N+1}var Ye=U.length===2&&V!=="=";if(/[\w_\d\s]/.test(V)||Ye){for(;Be(U););return k=h,N}return U.push(V),G=V,N+1}function Be(Ye){var Ne=0,Xe,ht;do{if(Xe=u.indexOf(Ye.slice(0,Ye.length+Ne).join("")),ht=u[Xe],Xe===-1){if(Ne--+Ye.length>0)continue;ht=Ye.slice(0,1).join("")}return te(ht),ie+=ht.length,U=U.slice(ht.length),U.length}while(1)}function Le(){return/[^a-fA-F0-9]/.test(V)?(te(U.join("")),k=h,N):(U.push(V),G=V,N+1)}function Te(){return V==="."||/[eE]/.test(V)?(U.push(V),k=M,G=V,N+1):V==="x"&&U.length===1&&U[0]==="0"?(k=o,U.push(V),G=V,N+1):/[^\d]/.test(V)?(te(U.join("")),k=h,N):(U.push(V),G=V,N+1)}function De(){return V==="f"&&(U.push(V),G=V,N+=1),/[eE]/.test(V)||(V==="-"||V==="+")&&/[eE]/.test(G)?(U.push(V),G=V,N+1):/[^\d]/.test(V)?(te(U.join("")),k=h,N):(U.push(V),G=V,N+1)}function Ve(){if(/[^\d\w_]/.test(V)){var Ye=U.join("");return fe[Ye]?k=A:ue[Ye]?k=D:k=L,te(U.join("")),k=h,N}return U.push(V),G=V,N+1}}},3585:function(v,y,r){var n=r(9525);n=n.slice().filter(function(u){return!/^(gl\_|texture)/.test(u)}),v.exports=n.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(v){v.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(v,y,r){var n=r(399);v.exports=n.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(v){v.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(v){v.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},8096:function(v,y,r){var n=r(3193);v.exports=u;function u(i,f){var g=n(f),h=[];return h=h.concat(g(i)),h=h.concat(g(null)),h}},6832:function(v){v.exports=function(y){typeof y=="string"&&(y=[y]);for(var r=[].slice.call(arguments,1),n=[],u=0;u<y.length-1;u++)n.push(y[u],r[u]||"");return n.push(y[u]),n.join("")}},5233:function(v,y,r){var n=r(4846);function u(){var i=!1;try{var f=Object.defineProperty({},"passive",{get:function(){i=!0}});window.addEventListener("test",null,f),window.removeEventListener("test",null,f)}catch{i=!1}return i}v.exports=n&&u()},2183:function(v,y,r){v.exports=l;var n=r(417),u=r(8211).H;function i(m,M,L){this.vertices=m,this.adjacent=M,this.boundary=L,this.lastVisited=-1}i.prototype.flip=function(){var m=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=m;var M=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=M};function f(m,M,L){this.vertices=m,this.cell=M,this.index=L}function g(m,M){return u(m.vertices,M.vertices)}function h(m){return function(){var M=this.tuple;return m.apply(this,M)}}function b(m){var M=n[m+1];return M||(M=n),h(M)}var p=[];function E(m,M,L){this.dimension=m,this.vertices=M,this.simplices=L,this.interior=L.filter(function(C){return!C.boundary}),this.tuple=new Array(m+1);for(var D=0;D<=m;++D)this.tuple[D]=this.vertices[D];var A=p[m];A||(A=p[m]=b(m)),this.orient=A}var c=E.prototype;c.handleBoundaryDegeneracy=function(m,M){var L=this.dimension,D=this.vertices.length-1,A=this.tuple,C=this.vertices,S=[m];for(m.lastVisited=-D;S.length>0;){m=S.pop();for(var o=m.adjacent,R=0;R<=L;++R){var T=o[R];if(!(!T.boundary||T.lastVisited<=-D)){for(var O=T.vertices,N=0;N<=L;++N){var H=O[N];H<0?A[N]=M:A[N]=C[H]}var k=this.orient();if(k>0)return T;T.lastVisited=-D,k===0&&S.push(T)}}}return null},c.walk=function(m,M){var L=this.vertices.length-1,D=this.dimension,A=this.vertices,C=this.tuple,S=M?this.interior.length*Math.random()|0:this.interior.length-1,o=this.interior[S];e:for(;!o.boundary;){for(var R=o.vertices,T=o.adjacent,O=0;O<=D;++O)C[O]=A[R[O]];o.lastVisited=L;for(var O=0;O<=D;++O){var N=T[O];if(!(N.lastVisited>=L)){var H=C[O];C[O]=m;var k=this.orient();if(C[O]=H,k<0){o=N;continue e}else N.boundary?N.lastVisited=-L:N.lastVisited=L}}return}return o},c.addPeaks=function(m,M){var L=this.vertices.length-1,D=this.dimension,A=this.vertices,C=this.tuple,S=this.interior,o=this.simplices,R=[M];M.lastVisited=L,M.vertices[M.vertices.indexOf(-1)]=L,M.boundary=!1,S.push(M);for(var T=[];R.length>0;){var M=R.pop(),O=M.vertices,N=M.adjacent,H=O.indexOf(L);if(!(H<0)){for(var k=0;k<=D;++k)if(k!==H){var V=N[k];if(!(!V.boundary||V.lastVisited>=L)){var G=V.vertices;if(V.lastVisited!==-L){for(var U=0,Y=0;Y<=D;++Y)G[Y]<0?(U=Y,C[Y]=m):C[Y]=A[G[Y]];var ee=this.orient();if(ee>0){G[U]=L,V.boundary=!1,S.push(V),R.push(V),V.lastVisited=L;continue}else V.lastVisited=-L}var re=V.adjacent,ie=O.slice(),se=N.slice(),ce=new i(ie,se,!0);o.push(ce);var q=re.indexOf(M);if(!(q<0)){re[q]=ce,se[H]=V,ie[k]=-1,se[k]=M,N[k]=ce,ce.flip();for(var Y=0;Y<=D;++Y){var j=ie[Y];if(!(j<0||j===L)){for(var Z=new Array(D-1),Q=0,ue=0;ue<=D;++ue){var fe=ie[ue];fe<0||ue===Y||(Z[Q++]=fe)}T.push(new f(Z,ce,Y))}}}}}}}T.sort(g);for(var k=0;k+1<T.length;k+=2){var te=T[k],ne=T[k+1],ve=te.index,le=ne.index;ve<0||le<0||(te.cell.adjacent[te.index]=ne.cell,ne.cell.adjacent[ne.index]=te.cell)}},c.insert=function(m,M){var L=this.vertices;L.push(m);var D=this.walk(m,M);if(D){for(var A=this.dimension,C=this.tuple,S=0;S<=A;++S){var o=D.vertices[S];o<0?C[S]=m:C[S]=L[o]}var R=this.orient(C);R<0||R===0&&(D=this.handleBoundaryDegeneracy(D,m),!D)||this.addPeaks(m,D)}},c.boundary=function(){for(var m=this.dimension,M=[],L=this.simplices,D=L.length,A=0;A<D;++A){var C=L[A];if(C.boundary){for(var S=new Array(m),o=C.vertices,R=0,T=0,O=0;O<=m;++O)o[O]>=0?S[R++]=o[O]:T=O&1;if(T===(m&1)){var N=S[0];S[0]=S[1],S[1]=N}M.push(S)}}return M};function l(m,M){var L=m.length;if(L===0)throw new Error("Must have at least d+1 points");var D=m[0].length;if(L<=D)throw new Error("Must input at least d+1 points");var A=m.slice(0,D+1),C=n.apply(void 0,A);if(C===0)throw new Error("Input not in general position");for(var S=new Array(D+1),o=0;o<=D;++o)S[o]=o;C<0&&(S[0]=1,S[1]=0);for(var R=new i(S,new Array(D+1),!1),T=R.adjacent,O=new Array(D+2),o=0;o<=D;++o){for(var N=S.slice(),H=0;H<=D;++H)H===o&&(N[H]=-1);var k=N[0];N[0]=N[1],N[1]=k;var V=new i(N,new Array(D+1),!0);T[o]=V,O[o]=V}O[D+1]=R;for(var o=0;o<=D;++o)for(var N=T[o].vertices,G=T[o].adjacent,H=0;H<=D;++H){var U=N[H];if(U<0){G[H]=R;continue}for(var Y=0;Y<=D;++Y)T[Y].vertices.indexOf(U)<0&&(G[H]=T[Y])}for(var ee=new E(D,A,O),re=!!M,o=D+1;o<L;++o)ee.insert(m[o],re);return ee.boundary()}},9014:function(v,y,r){var n=r(5070),u=0,i=1,f=2;v.exports=R;function g(T,O,N,H,k){this.mid=T,this.left=O,this.right=N,this.leftPoints=H,this.rightPoints=k,this.count=(O?O.count:0)+(N?N.count:0)+H.length}var h=g.prototype;function b(T,O){T.mid=O.mid,T.left=O.left,T.right=O.right,T.leftPoints=O.leftPoints,T.rightPoints=O.rightPoints,T.count=O.count}function p(T,O){var N=C(O);T.mid=N.mid,T.left=N.left,T.right=N.right,T.leftPoints=N.leftPoints,T.rightPoints=N.rightPoints,T.count=N.count}function E(T,O){var N=T.intervals([]);N.push(O),p(T,N)}function c(T,O){var N=T.intervals([]),H=N.indexOf(O);return H<0?u:(N.splice(H,1),p(T,N),i)}h.intervals=function(T){return T.push.apply(T,this.leftPoints),this.left&&this.left.intervals(T),this.right&&this.right.intervals(T),T},h.insert=function(T){var O=this.count-this.leftPoints.length;if(this.count+=1,T[1]<this.mid)this.left?4*(this.left.count+1)>3*(O+1)?E(this,T):this.left.insert(T):this.left=C([T]);else if(T[0]>this.mid)this.right?4*(this.right.count+1)>3*(O+1)?E(this,T):this.right.insert(T):this.right=C([T]);else{var N=n.ge(this.leftPoints,T,D),H=n.ge(this.rightPoints,T,A);this.leftPoints.splice(N,0,T),this.rightPoints.splice(H,0,T)}},h.remove=function(T){var O=this.count-this.leftPoints;if(T[1]<this.mid){if(!this.left)return u;var N=this.right?this.right.count:0;if(4*N>3*(O-1))return c(this,T);var H=this.left.remove(T);return H===f?(this.left=null,this.count-=1,i):(H===i&&(this.count-=1),H)}else if(T[0]>this.mid){if(!this.right)return u;var k=this.left?this.left.count:0;if(4*k>3*(O-1))return c(this,T);var H=this.right.remove(T);return H===f?(this.right=null,this.count-=1,i):(H===i&&(this.count-=1),H)}else{if(this.count===1)return this.leftPoints[0]===T?f:u;if(this.leftPoints.length===1&&this.leftPoints[0]===T){if(this.left&&this.right){for(var V=this,G=this.left;G.right;)V=G,G=G.right;if(V===this)G.right=this.right;else{var U=this.left,H=this.right;V.count-=G.count,V.right=G.left,G.left=U,G.right=H}b(this,G),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?b(this,this.left):b(this,this.right);return i}for(var U=n.ge(this.leftPoints,T,D);U<this.leftPoints.length&&this.leftPoints[U][0]===T[0];++U)if(this.leftPoints[U]===T){this.count-=1,this.leftPoints.splice(U,1);for(var H=n.ge(this.rightPoints,T,A);H<this.rightPoints.length&&this.rightPoints[H][1]===T[1];++H)if(this.rightPoints[H]===T)return this.rightPoints.splice(H,1),i}return u}};function l(T,O,N){for(var H=0;H<T.length&&T[H][0]<=O;++H){var k=N(T[H]);if(k)return k}}function m(T,O,N){for(var H=T.length-1;H>=0&&T[H][1]>=O;--H){var k=N(T[H]);if(k)return k}}function M(T,O){for(var N=0;N<T.length;++N){var H=O(T[N]);if(H)return H}}h.queryPoint=function(T,O){if(T<this.mid){if(this.left){var N=this.left.queryPoint(T,O);if(N)return N}return l(this.leftPoints,T,O)}else if(T>this.mid){if(this.right){var N=this.right.queryPoint(T,O);if(N)return N}return m(this.rightPoints,T,O)}else return M(this.leftPoints,O)},h.queryInterval=function(T,O,N){if(T<this.mid&&this.left){var H=this.left.queryInterval(T,O,N);if(H)return H}if(O>this.mid&&this.right){var H=this.right.queryInterval(T,O,N);if(H)return H}return O<this.mid?l(this.leftPoints,O,N):T>this.mid?m(this.rightPoints,T,N):M(this.leftPoints,N)};function L(T,O){return T-O}function D(T,O){var N=T[0]-O[0];return N||T[1]-O[1]}function A(T,O){var N=T[1]-O[1];return N||T[0]-O[0]}function C(T){if(T.length===0)return null;for(var O=[],N=0;N<T.length;++N)O.push(T[N][0],T[N][1]);O.sort(L);for(var H=O[O.length>>1],k=[],V=[],G=[],N=0;N<T.length;++N){var U=T[N];U[1]<H?k.push(U):H<U[0]?V.push(U):G.push(U)}var Y=G,ee=G.slice();return Y.sort(D),ee.sort(A),new g(H,C(k),C(V),Y,ee)}function S(T){this.root=T}var o=S.prototype;o.insert=function(T){this.root?this.root.insert(T):this.root=new g(T[0],null,null,[T],[T])},o.remove=function(T){if(this.root){var O=this.root.remove(T);return O===f&&(this.root=null),O!==u}return!1},o.queryPoint=function(T,O){if(this.root)return this.root.queryPoint(T,O)},o.queryInterval=function(T,O,N){if(T<=O&&this.root)return this.root.queryInterval(T,O,N)},Object.defineProperty(o,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(o,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});function R(T){return!T||T.length===0?new S(null):new S(C(T))}},9560:function(v){function y(r){for(var n=new Array(r),u=0;u<r;++u)n[u]=u;return n}v.exports=y},4846:function(v){v.exports=!0},4780:function(v){/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/v.exports=function(n){return n!=null&&(y(n)||r(n)||!!n._isBuffer)};function y(n){return!!n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function r(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&y(n.slice(0,0))}},2861:function(v){v.exports=n,v.exports.isMobile=n,v.exports.default=n;var y=/(android|bb\d+|meego).+mobile|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|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/(android|bb\d+|meego).+mobile|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|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i;function n(u){u||(u={});var i=u.ua;if(!i&&typeof navigator<"u"&&(i=navigator.userAgent),i&&i.headers&&typeof i.headers["user-agent"]=="string"&&(i=i.headers["user-agent"]),typeof i!="string")return!1;var f=u.tablet?r.test(i):y.test(i);return!f&&u.tablet&&u.featureDetect&&navigator&&navigator.maxTouchPoints>1&&i.indexOf("Macintosh")!==-1&&i.indexOf("Safari")!==-1&&(f=!0),f}},3596:function(v){v.exports=function(y){for(var r=y.length,n,u=0;u<r;u++)if(n=y.charCodeAt(u),(n<9||n>13)&&n!==32&&n!==133&&n!==160&&n!==5760&&n!==6158&&(n<8192||n>8205)&&n!==8232&&n!==8233&&n!==8239&&n!==8287&&n!==8288&&n!==12288&&n!==65279)return!1;return!0}},3578:function(v){function y(r,n,u){return r*(1-u)+n*u}v.exports=y},7191:function(v,y,r){var n=r(4690),u=r(9823),i=r(7332),f=r(7787),g=r(7437),h=r(2142),b={length:r(4693),normalize:r(899),dot:r(9305),cross:r(903)},p=u(),E=u(),c=[0,0,0,0],l=[[0,0,0],[0,0,0],[0,0,0]],m=[0,0,0];v.exports=function(C,S,o,R,T,O){if(S||(S=[0,0,0]),o||(o=[0,0,0]),R||(R=[0,0,0]),T||(T=[0,0,0,1]),O||(O=[0,0,0,1]),!n(p,C)||(i(E,p),E[3]=0,E[7]=0,E[11]=0,E[15]=1,Math.abs(f(E)<1e-8)))return!1;var N=p[3],H=p[7],k=p[11],V=p[12],G=p[13],U=p[14],Y=p[15];if(N!==0||H!==0||k!==0){c[0]=N,c[1]=H,c[2]=k,c[3]=Y;var ee=g(E,E);if(!ee)return!1;h(E,E),M(T,c,E)}else T[0]=T[1]=T[2]=0,T[3]=1;if(S[0]=V,S[1]=G,S[2]=U,L(l,p),o[0]=b.length(l[0]),b.normalize(l[0],l[0]),R[0]=b.dot(l[0],l[1]),D(l[1],l[1],l[0],1,-R[0]),o[1]=b.length(l[1]),b.normalize(l[1],l[1]),R[0]/=o[1],R[1]=b.dot(l[0],l[2]),D(l[2],l[2],l[0],1,-R[1]),R[2]=b.dot(l[1],l[2]),D(l[2],l[2],l[1],1,-R[2]),o[2]=b.length(l[2]),b.normalize(l[2],l[2]),R[1]/=o[2],R[2]/=o[2],b.cross(m,l[1],l[2]),b.dot(l[0],m)<0)for(var re=0;re<3;re++)o[re]*=-1,l[re][0]*=-1,l[re][1]*=-1,l[re][2]*=-1;return O[0]=.5*Math.sqrt(Math.max(1+l[0][0]-l[1][1]-l[2][2],0)),O[1]=.5*Math.sqrt(Math.max(1-l[0][0]+l[1][1]-l[2][2],0)),O[2]=.5*Math.sqrt(Math.max(1-l[0][0]-l[1][1]+l[2][2],0)),O[3]=.5*Math.sqrt(Math.max(1+l[0][0]+l[1][1]+l[2][2],0)),l[2][1]>l[1][2]&&(O[0]=-O[0]),l[0][2]>l[2][0]&&(O[1]=-O[1]),l[1][0]>l[0][1]&&(O[2]=-O[2]),!0};function M(A,C,S){var o=C[0],R=C[1],T=C[2],O=C[3];return A[0]=S[0]*o+S[4]*R+S[8]*T+S[12]*O,A[1]=S[1]*o+S[5]*R+S[9]*T+S[13]*O,A[2]=S[2]*o+S[6]*R+S[10]*T+S[14]*O,A[3]=S[3]*o+S[7]*R+S[11]*T+S[15]*O,A}function L(A,C){A[0][0]=C[0],A[0][1]=C[1],A[0][2]=C[2],A[1][0]=C[4],A[1][1]=C[5],A[1][2]=C[6],A[2][0]=C[8],A[2][1]=C[9],A[2][2]=C[10]}function D(A,C,S,o,R){A[0]=C[0]*o+S[0]*R,A[1]=C[1]*o+S[1]*R,A[2]=C[2]*o+S[2]*R}},4690:function(v){v.exports=function(r,n){var u=n[15];if(u===0)return!1;for(var i=1/u,f=0;f<16;f++)r[f]=n[f]*i;return!0}},7649:function(v,y,r){var n=r(1868),u=r(1102),i=r(7191),f=r(7787),g=r(1116),h=c(),b=c(),p=c();v.exports=E;function E(M,L,D,A){if(f(L)===0||f(D)===0)return!1;var C=i(L,h.translate,h.scale,h.skew,h.perspective,h.quaternion),S=i(D,b.translate,b.scale,b.skew,b.perspective,b.quaternion);return!C||!S?!1:(n(p.translate,h.translate,b.translate,A),n(p.skew,h.skew,b.skew,A),n(p.scale,h.scale,b.scale,A),n(p.perspective,h.perspective,b.perspective,A),g(p.quaternion,h.quaternion,b.quaternion,A),u(M,p.translate,p.scale,p.skew,p.perspective,p.quaternion),!0)}function c(){return{translate:l(),scale:l(1),skew:l(),perspective:m(),quaternion:m()}}function l(M){return[M||0,M||0,M||0]}function m(){return[0,0,0,1]}},1102:function(v,y,r){var n={identity:r(9947),translate:r(998),multiply:r(104),create:r(9823),scale:r(3668),fromRotationTranslation:r(7280)};n.create();var u=n.create();v.exports=function(f,g,h,b,p,E){return n.identity(f),n.fromRotationTranslation(f,E,g),f[3]=p[0],f[7]=p[1],f[11]=p[2],f[15]=p[3],n.identity(u),b[2]!==0&&(u[9]=b[2],n.multiply(f,f,u)),b[1]!==0&&(u[9]=0,u[8]=b[1],n.multiply(f,f,u)),b[0]!==0&&(u[8]=0,u[4]=b[0],n.multiply(f,f,u)),n.scale(f,f,h),f}},9298:function(v,y,r){var n=r(5070),u=r(7649),i=r(7437),f=r(6109),g=r(7115),h=r(5240),b=r(3012),p=r(998);r(3668);var E=r(899),c=[0,0,0];v.exports=L;function l(D){this._components=D.slice(),this._time=[0],this.prevMatrix=D.slice(),this.nextMatrix=D.slice(),this.computedMatrix=D.slice(),this.computedInverse=D.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 m=l.prototype;m.recalcMatrix=function(D){var A=this._time,C=n.le(A,D),S=this.computedMatrix;if(!(C<0)){var o=this._components;if(C===A.length-1)for(var R=16*C,T=0;T<16;++T)S[T]=o[R++];else{for(var O=A[C+1]-A[C],R=16*C,N=this.prevMatrix,H=!0,T=0;T<16;++T)N[T]=o[R++];for(var k=this.nextMatrix,T=0;T<16;++T)k[T]=o[R++],H=H&&N[T]===k[T];if(O<1e-6||H)for(var T=0;T<16;++T)S[T]=N[T];else u(S,N,k,(D-A[C])/O)}var V=this.computedUp;V[0]=S[1],V[1]=S[5],V[2]=S[9],E(V,V);var G=this.computedInverse;i(G,S);var U=this.computedEye,Y=G[15];U[0]=G[12]/Y,U[1]=G[13]/Y,U[2]=G[14]/Y;for(var ee=this.computedCenter,re=Math.exp(this.computedRadius[0]),T=0;T<3;++T)ee[T]=U[T]-S[2+4*T]*re}},m.idle=function(D){if(!(D<this.lastT())){for(var A=this._components,C=A.length-16,S=0;S<16;++S)A.push(A[C++]);this._time.push(D)}},m.flush=function(D){var A=n.gt(this._time,D)-2;A<0||(this._time.splice(0,A),this._components.splice(0,16*A))},m.lastT=function(){return this._time[this._time.length-1]},m.lookAt=function(D,A,C,S){this.recalcMatrix(D),A=A||this.computedEye,C=C||c,S=S||this.computedUp,this.setMatrix(D,b(this.computedMatrix,A,C,S));for(var o=0,R=0;R<3;++R)o+=Math.pow(C[R]-A[R],2);o=Math.log(Math.sqrt(o)),this.computedRadius[0]=o},m.rotate=function(D,A,C,S){this.recalcMatrix(D);var o=this.computedInverse;A&&g(o,o,A),C&&f(o,o,C),S&&h(o,o,S),this.setMatrix(D,i(this.computedMatrix,o))};var M=[0,0,0];m.pan=function(D,A,C,S){M[0]=-(A||0),M[1]=-(C||0),M[2]=-(S||0),this.recalcMatrix(D);var o=this.computedInverse;p(o,o,M),this.setMatrix(D,i(o,o))},m.translate=function(D,A,C,S){M[0]=A||0,M[1]=C||0,M[2]=S||0,this.recalcMatrix(D);var o=this.computedMatrix;p(o,o,M),this.setMatrix(D,o)},m.setMatrix=function(D,A){if(!(D<this.lastT())){this._time.push(D);for(var C=0;C<16;++C)this._components.push(A[C])}},m.setDistance=function(D,A){this.computedRadius[0]=A},m.setDistanceLimits=function(D,A){var C=this._limits;C[0]=D,C[1]=A},m.getDistanceLimits=function(D){var A=this._limits;return D?(D[0]=A[0],D[1]=A[1],D):A};function L(D){D=D||{};var A=D.matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return new l(A)}},3266:function(v,y,r){v.exports=u;var n=r(417)[3];function u(i){var f=i.length;if(f<3){for(var m=new Array(f),g=0;g<f;++g)m[g]=g;return f===2&&i[0][0]===i[1][0]&&i[0][1]===i[1][1]?[0]:m}for(var h=new Array(f),g=0;g<f;++g)h[g]=g;h.sort(function(A,C){var S=i[A][0]-i[C][0];return S||i[A][1]-i[C][1]});for(var b=[h[0],h[1]],p=[h[0],h[1]],g=2;g<f;++g){for(var E=h[g],c=i[E],l=b.length;l>1&&n(i[b[l-2]],i[b[l-1]],c)<=0;)l-=1,b.pop();for(b.push(E),l=p.length;l>1&&n(i[p[l-2]],i[p[l-1]],c)>=0;)l-=1,p.pop();p.push(E)}for(var m=new Array(p.length+b.length-2),M=0,g=0,L=b.length;g<L;++g)m[M++]=b[g];for(var D=p.length-2;D>0;--D)m[M++]=p[D];return m}},6145:function(v,y,r){v.exports=u;var n=r(4110);function u(i,f){f||(f=i,i=window);var g=0,h=0,b=0,p={shift:!1,alt:!1,control:!1,meta:!1},E=!1;function c(T){var O=!1;return"altKey"in T&&(O=O||T.altKey!==p.alt,p.alt=!!T.altKey),"shiftKey"in T&&(O=O||T.shiftKey!==p.shift,p.shift=!!T.shiftKey),"ctrlKey"in T&&(O=O||T.ctrlKey!==p.control,p.control=!!T.ctrlKey),"metaKey"in T&&(O=O||T.metaKey!==p.meta,p.meta=!!T.metaKey),O}function l(T,O){var N=n.x(O),H=n.y(O);"buttons"in O&&(T=O.buttons|0),(T!==g||N!==h||H!==b||c(O))&&(g=T|0,h=N||0,b=H||0,f&&f(g,h,b,p))}function m(T){l(0,T)}function M(){(g||h||b||p.shift||p.alt||p.meta||p.control)&&(h=b=0,g=0,p.shift=p.alt=p.control=p.meta=!1,f&&f(0,0,0,p))}function L(T){c(T)&&f&&f(g,h,b,p)}function D(T){n.buttons(T)===0?l(0,T):l(g,T)}function A(T){l(g|n.buttons(T),T)}function C(T){l(g&~n.buttons(T),T)}function S(){E||(E=!0,i.addEventListener("mousemove",D),i.addEventListener("mousedown",A),i.addEventListener("mouseup",C),i.addEventListener("mouseleave",m),i.addEventListener("mouseenter",m),i.addEventListener("mouseout",m),i.addEventListener("mouseover",m),i.addEventListener("blur",M),i.addEventListener("keyup",L),i.addEventListener("keydown",L),i.addEventListener("keypress",L),i!==window&&(window.addEventListener("blur",M),window.addEventListener("keyup",L),window.addEventListener("keydown",L),window.addEventListener("keypress",L)))}function o(){E&&(E=!1,i.removeEventListener("mousemove",D),i.removeEventListener("mousedown",A),i.removeEventListener("mouseup",C),i.removeEventListener("mouseleave",m),i.removeEventListener("mouseenter",m),i.removeEventListener("mouseout",m),i.removeEventListener("mouseover",m),i.removeEventListener("blur",M),i.removeEventListener("keyup",L),i.removeEventListener("keydown",L),i.removeEventListener("keypress",L),i!==window&&(window.removeEventListener("blur",M),window.removeEventListener("keyup",L),window.removeEventListener("keydown",L),window.removeEventListener("keypress",L)))}S();var R={element:i};return Object.defineProperties(R,{enabled:{get:function(){return E},set:function(T){T?S():o()},enumerable:!0},buttons:{get:function(){return g},enumerable:!0},x:{get:function(){return h},enumerable:!0},y:{get:function(){return b},enumerable:!0},mods:{get:function(){return p},enumerable:!0}}),R}},2565:function(v){var y={left:0,top:0};v.exports=r;function r(u,i,f){i=i||u.currentTarget||u.srcElement,Array.isArray(f)||(f=[0,0]);var g=u.clientX||0,h=u.clientY||0,b=n(i);return f[0]=g-b.left,f[1]=h-b.top,f}function n(u){return u===window||u===document||u===document.body?y:u.getBoundingClientRect()}},4110:function(v,y){function r(f){if(typeof f=="object"){if("buttons"in f)return f.buttons;if("which"in f){var g=f.which;if(g===2)return 4;if(g===3)return 2;if(g>0)return 1<<g-1}else if("button"in f){var g=f.button;if(g===1)return 4;if(g===2)return 2;if(g>=0)return 1<<g}}return 0}y.buttons=r;function n(f){return f.target||f.srcElement||window}y.element=n;function u(f){if(typeof f=="object"){if("offsetX"in f)return f.offsetX;var g=n(f),h=g.getBoundingClientRect();return f.clientX-h.left}return 0}y.x=u;function i(f){if(typeof f=="object"){if("offsetY"in f)return f.offsetY;var g=n(f),h=g.getBoundingClientRect();return f.clientY-h.top}return 0}y.y=i},6475:function(v,y,r){var n=r(14);v.exports=u;function u(i,f,g){typeof i=="function"&&(g=!!f,f=i,i=window);var h=n("ex",i),b=function(p){g&&p.preventDefault();var E=p.deltaX||0,c=p.deltaY||0,l=p.deltaZ||0,m=p.deltaMode,M=1;switch(m){case 1:M=h;break;case 2:M=window.innerHeight;break}if(E*=M,c*=M,l*=M,E||c||l)return f(E,c,l,p)};return i.addEventListener("wheel",b),b}},9284:function(v,y,r){var n=r(5306);v.exports=f;var u={"false,0,1":function(h,b,p,E,c){return function(m,M,L,D){var A=m.shape[0]|0,C=m.shape[1]|0,S=m.data,o=m.offset|0,R=m.stride[0]|0,T=m.stride[1]|0,O=o,N,H=-R|0,k=0,V=-T|0,G=0,U=-R-T|0,Y=0,ee=R|0,re=T-R*A|0,ie=0,se=0,ce=0,q=2*A|0,j=E(q),Z=E(q),Q=0,ue=0,fe=-1,te=-1,ne=0,ve=-A|0,le=A|0,xe=0,Se=-A-1|0,Re=A-1|0,Ee=0,Oe=0,Be=0;for(ie=0;ie<A;++ie)j[Q++]=p(S[O],M,L,D),O+=ee;if(O+=re,C>0){if(se=1,j[Q++]=p(S[O],M,L,D),O+=ee,A>0)for(ie=1,N=S[O],ue=j[Q]=p(N,M,L,D),ne=j[Q+fe],xe=j[Q+ve],Ee=j[Q+Se],(ue!==ne||ue!==xe||ue!==Ee)&&(k=S[O+H],G=S[O+V],Y=S[O+U],h(ie,se,N,k,G,Y,ue,ne,xe,Ee,M,L,D),Oe=Z[Q]=ce++),Q+=1,O+=ee,ie=2;ie<A;++ie)N=S[O],ue=j[Q]=p(N,M,L,D),ne=j[Q+fe],xe=j[Q+ve],Ee=j[Q+Se],(ue!==ne||ue!==xe||ue!==Ee)&&(k=S[O+H],G=S[O+V],Y=S[O+U],h(ie,se,N,k,G,Y,ue,ne,xe,Ee,M,L,D),Oe=Z[Q]=ce++,Ee!==ne&&b(Z[Q+fe],Oe,Y,k,Ee,ne,M,L,D)),Q+=1,O+=ee;for(O+=re,Q=0,Be=fe,fe=te,te=Be,Be=ve,ve=le,le=Be,Be=Se,Se=Re,Re=Be,se=2;se<C;++se){if(j[Q++]=p(S[O],M,L,D),O+=ee,A>0)for(ie=1,N=S[O],ue=j[Q]=p(N,M,L,D),ne=j[Q+fe],xe=j[Q+ve],Ee=j[Q+Se],(ue!==ne||ue!==xe||ue!==Ee)&&(k=S[O+H],G=S[O+V],Y=S[O+U],h(ie,se,N,k,G,Y,ue,ne,xe,Ee,M,L,D),Oe=Z[Q]=ce++,Ee!==xe&&b(Z[Q+ve],Oe,G,Y,xe,Ee,M,L,D)),Q+=1,O+=ee,ie=2;ie<A;++ie)N=S[O],ue=j[Q]=p(N,M,L,D),ne=j[Q+fe],xe=j[Q+ve],Ee=j[Q+Se],(ue!==ne||ue!==xe||ue!==Ee)&&(k=S[O+H],G=S[O+V],Y=S[O+U],h(ie,se,N,k,G,Y,ue,ne,xe,Ee,M,L,D),Oe=Z[Q]=ce++,Ee!==xe&&b(Z[Q+ve],Oe,G,Y,xe,Ee,M,L,D),Ee!==ne&&b(Z[Q+fe],Oe,Y,k,Ee,ne,M,L,D)),Q+=1,O+=ee;se&1&&(Q=0),Be=fe,fe=te,te=Be,Be=ve,ve=le,le=Be,Be=Se,Se=Re,Re=Be,O+=re}}c(Z),c(j)}},"false,1,0":function(h,b,p,E,c){return function(m,M,L,D){var A=m.shape[0]|0,C=m.shape[1]|0,S=m.data,o=m.offset|0,R=m.stride[0]|0,T=m.stride[1]|0,O=o,N,H=-R|0,k=0,V=-T|0,G=0,U=-R-T|0,Y=0,ee=T|0,re=R-T*C|0,ie=0,se=0,ce=0,q=2*C|0,j=E(q),Z=E(q),Q=0,ue=0,fe=-1,te=-1,ne=0,ve=-C|0,le=C|0,xe=0,Se=-C-1|0,Re=C-1|0,Ee=0,Oe=0,Be=0;for(se=0;se<C;++se)j[Q++]=p(S[O],M,L,D),O+=ee;if(O+=re,A>0){if(ie=1,j[Q++]=p(S[O],M,L,D),O+=ee,C>0)for(se=1,N=S[O],ue=j[Q]=p(N,M,L,D),xe=j[Q+ve],ne=j[Q+fe],Ee=j[Q+Se],(ue!==xe||ue!==ne||ue!==Ee)&&(k=S[O+H],G=S[O+V],Y=S[O+U],h(ie,se,N,k,G,Y,ue,xe,ne,Ee,M,L,D),Oe=Z[Q]=ce++),Q+=1,O+=ee,se=2;se<C;++se)N=S[O],ue=j[Q]=p(N,M,L,D),xe=j[Q+ve],ne=j[Q+fe],Ee=j[Q+Se],(ue!==xe||ue!==ne||ue!==Ee)&&(k=S[O+H],G=S[O+V],Y=S[O+U],h(ie,se,N,k,G,Y,ue,xe,ne,Ee,M,L,D),Oe=Z[Q]=ce++,Ee!==ne&&b(Z[Q+fe],Oe,G,Y,ne,Ee,M,L,D)),Q+=1,O+=ee;for(O+=re,Q=0,Be=ve,ve=le,le=Be,Be=fe,fe=te,te=Be,Be=Se,Se=Re,Re=Be,ie=2;ie<A;++ie){if(j[Q++]=p(S[O],M,L,D),O+=ee,C>0)for(se=1,N=S[O],ue=j[Q]=p(N,M,L,D),xe=j[Q+ve],ne=j[Q+fe],Ee=j[Q+Se],(ue!==xe||ue!==ne||ue!==Ee)&&(k=S[O+H],G=S[O+V],Y=S[O+U],h(ie,se,N,k,G,Y,ue,xe,ne,Ee,M,L,D),Oe=Z[Q]=ce++,Ee!==xe&&b(Z[Q+ve],Oe,Y,k,Ee,xe,M,L,D)),Q+=1,O+=ee,se=2;se<C;++se)N=S[O],ue=j[Q]=p(N,M,L,D),xe=j[Q+ve],ne=j[Q+fe],Ee=j[Q+Se],(ue!==xe||ue!==ne||ue!==Ee)&&(k=S[O+H],G=S[O+V],Y=S[O+U],h(ie,se,N,k,G,Y,ue,xe,ne,Ee,M,L,D),Oe=Z[Q]=ce++,Ee!==ne&&b(Z[Q+fe],Oe,G,Y,ne,Ee,M,L,D),Ee!==xe&&b(Z[Q+ve],Oe,Y,k,Ee,xe,M,L,D)),Q+=1,O+=ee;ie&1&&(Q=0),Be=ve,ve=le,le=Be,Be=fe,fe=te,te=Be,Be=Se,Se=Re,Re=Be,O+=re}}c(Z),c(j)}}};function i(g,h,b,p,E,c){var l=[c,E].join(","),m=u[l];return m(g,h,b,n.mallocUint32,n.freeUint32)}function f(g){function h(M){throw new Error("ndarray-extract-contour: "+M)}typeof g!="object"&&h("Must specify arguments");var b=g.order;Array.isArray(b)||h("Must specify order");var p=g.arrayArguments||1;p<1&&h("Must have at least one array argument");var E=g.scalarArguments||0;E<0&&h("Scalar arg count must be > 0"),typeof g.vertex!="function"&&h("Must specify vertex creation function"),typeof g.cell!="function"&&h("Must specify cell creation function"),typeof g.phase!="function"&&h("Must specify phase function");for(var c=g.getters||[],l=new Array(p),m=0;m<p;++m)c.indexOf(m)>=0?l[m]=!0:l[m]=!1;return i(g.vertex,g.cell,g.phase,E,b,l)}},9144:function(v,y,r){var n=r(3094),u={zero:function(L,D,A,C){var S=L[0],o=A[0];C|=0;var R=0,T=o;for(R=0;R<S;++R)D[C]=0,C+=T},fdTemplate1:function(L,D,A,C,S,o,R){var T=L[0],O=A[0],N=o[0],H=-1*O,k=O;C|=0,R|=0;var V=0,G=O,U=N;for(V=0;V<T;++V)S[R]=.5*(D[C+H]-D[C+k]),C+=G,R+=U},fdTemplate2:function(L,D,A,C,S,o,R,T,O,N){var H=L[0],k=L[1],V=A[0],G=A[1],U=o[0],Y=o[1],ee=O[0],re=O[1],ie=-1*V,se=V,ce=-1*G,q=G;C|=0,R|=0,N|=0;var j=0,Z=0,Q=G,ue=V-k*G,fe=Y,te=U-k*Y,ne=re,ve=ee-k*re;for(Z=0;Z<H;++Z){for(j=0;j<k;++j)S[R]=.5*(D[C+ie]-D[C+se]),T[N]=.5*(D[C+ce]-D[C+q]),C+=Q,R+=fe,N+=ne;C+=ue,R+=te,N+=ve}}},i={cdiff:function(L){var D={};return function(C,S,o){var R=C.dtype,T=C.order,O=S.dtype,N=S.order,H=o.dtype,k=o.order,V=[R,T.join(),O,N.join(),H,k.join()].join(),G=D[V];return G||(D[V]=G=L([R,T,O,N,H,k])),G(C.shape.slice(0),C.data,C.stride,C.offset|0,S.data,S.stride,S.offset|0,o.data,o.stride,o.offset|0)}},zero:function(L){var D={};return function(C){var S=C.dtype,o=C.order,R=[S,o.join()].join(),T=D[R];return T||(D[R]=T=L([S,o])),T(C.shape.slice(0),C.data,C.stride,C.offset|0)}},fdTemplate1:function(L){var D={};return function(C,S){var o=C.dtype,R=C.order,T=S.dtype,O=S.order,N=[o,R.join(),T,O.join()].join(),H=D[N];return H||(D[N]=H=L([o,R,T,O])),H(C.shape.slice(0),C.data,C.stride,C.offset|0,S.data,S.stride,S.offset|0)}},fdTemplate2:function(L){var D={};return function(C,S,o){var R=C.dtype,T=C.order,O=S.dtype,N=S.order,H=o.dtype,k=o.order,V=[R,T.join(),O,N.join(),H,k.join()].join(),G=D[V];return G||(D[V]=G=L([R,T,O,N,H,k])),G(C.shape.slice(0),C.data,C.stride,C.offset|0,S.data,S.stride,S.offset|0,o.data,o.stride,o.offset|0)}}};function f(L){var D=i[L.funcName];return D(g.bind(void 0,L))}function g(L){return u[L.funcName]}function h(L){return f({funcName:L.funcName})}var b={},p={},E=h({funcName:"cdiff"}),c=h({funcName:"zero"});function l(L){return L in b?b[L]:b[L]=h({funcName:"fdTemplate"+L})}function m(L,D,A,C){return function(S,o){var R=o.shape.slice();return R[0]>2&&R[1]>2&&C(o.pick(-1,-1).lo(1,1).hi(R[0]-2,R[1]-2),S.pick(-1,-1,0).lo(1,1).hi(R[0]-2,R[1]-2),S.pick(-1,-1,1).lo(1,1).hi(R[0]-2,R[1]-2)),R[1]>2&&(A(o.pick(0,-1).lo(1).hi(R[1]-2),S.pick(0,-1,1).lo(1).hi(R[1]-2)),D(S.pick(0,-1,0).lo(1).hi(R[1]-2))),R[1]>2&&(A(o.pick(R[0]-1,-1).lo(1).hi(R[1]-2),S.pick(R[0]-1,-1,1).lo(1).hi(R[1]-2)),D(S.pick(R[0]-1,-1,0).lo(1).hi(R[1]-2))),R[0]>2&&(A(o.pick(-1,0).lo(1).hi(R[0]-2),S.pick(-1,0,0).lo(1).hi(R[0]-2)),D(S.pick(-1,0,1).lo(1).hi(R[0]-2))),R[0]>2&&(A(o.pick(-1,R[1]-1).lo(1).hi(R[0]-2),S.pick(-1,R[1]-1,0).lo(1).hi(R[0]-2)),D(S.pick(-1,R[1]-1,1).lo(1).hi(R[0]-2))),S.set(0,0,0,0),S.set(0,0,1,0),S.set(R[0]-1,0,0,0),S.set(R[0]-1,0,1,0),S.set(0,R[1]-1,0,0),S.set(0,R[1]-1,1,0),S.set(R[0]-1,R[1]-1,0,0),S.set(R[0]-1,R[1]-1,1,0),S}}function M(L){var D=L.join(),R=p[D];if(R)return R;for(var A=L.length,C=[E,c],S=1;S<=A;++S)C.push(l(S));var o=m,R=o.apply(void 0,C);return p[D]=R,R}v.exports=function(D,A,C){if(Array.isArray(C)||(typeof C=="string"?C=n(A.dimension,C):C=n(A.dimension,"clamp")),A.size===0)return D;if(A.dimension===0)return D.set(0),D;var S=M(C);return S(D,A)}},3581:function(v){function y(f,g){var h=Math.floor(g),b=g-h,p=0<=h&&h<f.shape[0],E=0<=h+1&&h+1<f.shape[0],c=p?+f.get(h):0,l=E?+f.get(h+1):0;return(1-b)*c+b*l}function r(f,g,h){var b=Math.floor(g),p=g-b,E=0<=b&&b<f.shape[0],c=0<=b+1&&b+1<f.shape[0],l=Math.floor(h),m=h-l,M=0<=l&&l<f.shape[1],L=0<=l+1&&l+1<f.shape[1],D=E&&M?f.get(b,l):0,A=E&&L?f.get(b,l+1):0,C=c&&M?f.get(b+1,l):0,S=c&&L?f.get(b+1,l+1):0;return(1-m)*((1-p)*D+p*C)+m*((1-p)*A+p*S)}function n(f,g,h,b){var p=Math.floor(g),E=g-p,c=0<=p&&p<f.shape[0],l=0<=p+1&&p+1<f.shape[0],m=Math.floor(h),M=h-m,L=0<=m&&m<f.shape[1],D=0<=m+1&&m+1<f.shape[1],A=Math.floor(b),C=b-A,S=0<=A&&A<f.shape[2],o=0<=A+1&&A+1<f.shape[2],R=c&&L&&S?f.get(p,m,A):0,T=c&&D&&S?f.get(p,m+1,A):0,O=l&&L&&S?f.get(p+1,m,A):0,N=l&&D&&S?f.get(p+1,m+1,A):0,H=c&&L&&o?f.get(p,m,A+1):0,k=c&&D&&o?f.get(p,m+1,A+1):0,V=l&&L&&o?f.get(p+1,m,A+1):0,G=l&&D&&o?f.get(p+1,m+1,A+1):0;return(1-C)*((1-M)*((1-E)*R+E*O)+M*((1-E)*T+E*N))+C*((1-M)*((1-E)*H+E*V)+M*((1-E)*k+E*G))}function u(f){var g=f.shape.length|0,h=new Array(g),b=new Array(g),p=new Array(g),E=new Array(g),c,l;for(c=0;c<g;++c)l=+arguments[c+1],h[c]=Math.floor(l),b[c]=l-h[c],p[c]=0<=h[c]&&h[c]<f.shape[c],E[c]=0<=h[c]+1&&h[c]+1<f.shape[c];var m=0,M,L,D;e:for(c=0;c<1<<g;++c){for(L=1,D=f.offset,M=0;M<g;++M)if(c&1<<M){if(!E[M])continue e;L*=b[M],D+=f.stride[M]*(h[M]+1)}else{if(!p[M])continue e;L*=1-b[M],D+=f.stride[M]*h[M]}m+=L*f.data[D]}return m}function i(f,g,h,b){switch(f.shape.length){case 0:return 0;case 1:return y(f,g);case 2:return r(f,g,h);case 3:return n(f,g,h,b);default:return u.apply(void 0,arguments)}}v.exports=i,v.exports.d1=y,v.exports.d2=r,v.exports.d3=n},7498:function(v,y){var r={"float64,2,1,0":function(){return function(p,E,c,l,m){var M=p[0],L=p[1],D=p[2],A=c[0],C=c[1],S=c[2];l|=0;var o=0,R=0,T=0,O=S,N=C-D*S,H=A-L*C;for(T=0;T<M;++T){for(R=0;R<L;++R){for(o=0;o<D;++o)E[l]/=m,l+=O;l+=N}l+=H}}},"uint8,2,0,1,float64,2,1,0":function(){return function(p,E,c,l,m,M,L,D){var A=p[0],C=p[1],S=p[2],o=c[0],R=c[1],T=c[2],O=M[0],N=M[1],H=M[2];l|=0,L|=0;for(var k=l,V=L,G=p[0]|0;G>0;){G<64?(A=G,G=0):(A=64,G-=64);for(var U=p[1]|0;U>0;){U<64?(C=U,U=0):(C=64,U-=64),l=k+G*o+U*R,L=V+G*O+U*N;var Y=0,ee=0,re=0,ie=T,se=o-S*T,ce=R-A*o,q=H,j=O-S*H,Z=N-A*O;for(re=0;re<C;++re){for(ee=0;ee<A;++ee){for(Y=0;Y<S;++Y)E[l]=m[L]*D,l+=ie,L+=q;l+=se,L+=j}l+=ce,L+=Z}}}}},"float32,1,0,float32,1,0":function(){return function(p,E,c,l,m,M,L){var D=p[0],A=p[1],C=c[0],S=c[1],o=M[0],R=M[1];l|=0,L|=0;var T=0,O=0,N=S,H=C-A*S,k=R,V=o-A*R;for(O=0;O<D;++O){for(T=0;T<A;++T)E[l]=m[L],l+=N,L+=k;l+=H,L+=V}}},"float32,1,0,float32,0,1":function(){return function(p,E,c,l,m,M,L){var D=p[0],A=p[1],C=c[0],S=c[1],o=M[0],R=M[1];l|=0,L|=0;for(var T=l,O=L,N=p[1]|0;N>0;){N<64?(A=N,N=0):(A=64,N-=64);for(var H=p[0]|0;H>0;){H<64?(D=H,H=0):(D=64,H-=64),l=T+N*S+H*C,L=O+N*R+H*o;var k=0,V=0,G=S,U=C-A*S,Y=R,ee=o-A*R;for(V=0;V<D;++V){for(k=0;k<A;++k)E[l]=m[L],l+=G,L+=Y;l+=U,L+=ee}}}}},"uint8,2,0,1,uint8,1,2,0":function(){return function(p,E,c,l,m,M,L){var D=p[0],A=p[1],C=p[2],S=c[0],o=c[1],R=c[2],T=M[0],O=M[1],N=M[2];l|=0,L|=0;for(var H=l,k=L,V=p[2]|0;V>0;){V<64?(C=V,V=0):(C=64,V-=64);for(var G=p[0]|0;G>0;){G<64?(D=G,G=0):(D=64,G-=64);for(var U=p[1]|0;U>0;){U<64?(A=U,U=0):(A=64,U-=64),l=H+V*R+G*S+U*o,L=k+V*N+G*T+U*O;var Y=0,ee=0,re=0,ie=R,se=S-C*R,ce=o-D*S,q=N,j=T-C*N,Z=O-D*T;for(re=0;re<A;++re){for(ee=0;ee<D;++ee){for(Y=0;Y<C;++Y)E[l]=m[L],l+=ie,L+=q;l+=se,L+=j}l+=ce,L+=Z}}}}}},"uint8,2,0,1,array,2,0,1":function(){return function(p,E,c,l,m,M,L){var D=p[0],A=p[1],C=p[2],S=c[0],o=c[1],R=c[2],T=M[0],O=M[1],N=M[2];l|=0,L|=0;var H=0,k=0,V=0,G=R,U=S-C*R,Y=o-D*S,ee=N,re=T-C*N,ie=O-D*T;for(V=0;V<A;++V){for(k=0;k<D;++k){for(H=0;H<C;++H)E[l]=m[L],l+=G,L+=ee;l+=U,L+=re}l+=Y,L+=ie}}}};function n(b,p){var E=p.join(","),c=r[E];return c()}var u=n,i={mul:function(b){var p={};return function(c,l,m){var M=c.dtype,L=c.order,D=l.dtype,A=l.order,C=m.dtype,S=m.order,o=[M,L.join(),D,A.join(),C,S.join()].join(),R=p[o];return R||(p[o]=R=b([M,L,D,A,C,S])),R(c.shape.slice(0),c.data,c.stride,c.offset|0,l.data,l.stride,l.offset|0,m.data,m.stride,m.offset|0)}},muls:function(b){var p={};return function(c,l,m){var M=c.dtype,L=c.order,D=l.dtype,A=l.order,C=[M,L.join(),D,A.join()].join(),S=p[C];return S||(p[C]=S=b([M,L,D,A])),S(c.shape.slice(0),c.data,c.stride,c.offset|0,l.data,l.stride,l.offset|0,m)}},mulseq:function(b){var p={};return function(c,l){var m=c.dtype,M=c.order,L=[m,M.join()].join(),D=p[L];return D||(p[L]=D=b([m,M])),D(c.shape.slice(0),c.data,c.stride,c.offset|0,l)}},div:function(b){var p={};return function(c,l,m){var M=c.dtype,L=c.order,D=l.dtype,A=l.order,C=m.dtype,S=m.order,o=[M,L.join(),D,A.join(),C,S.join()].join(),R=p[o];return R||(p[o]=R=b([M,L,D,A,C,S])),R(c.shape.slice(0),c.data,c.stride,c.offset|0,l.data,l.stride,l.offset|0,m.data,m.stride,m.offset|0)}},divs:function(b){var p={};return function(c,l,m){var M=c.dtype,L=c.order,D=l.dtype,A=l.order,C=[M,L.join(),D,A.join()].join(),S=p[C];return S||(p[C]=S=b([M,L,D,A])),S(c.shape.slice(0),c.data,c.stride,c.offset|0,l.data,l.stride,l.offset|0,m)}},divseq:function(b){var p={};return function(c,l){var m=c.dtype,M=c.order,L=[m,M.join()].join(),D=p[L];return D||(p[L]=D=b([m,M])),D(c.shape.slice(0),c.data,c.stride,c.offset|0,l)}},assign:function(b){var p={};return function(c,l){var m=c.dtype,M=c.order,L=l.dtype,D=l.order,A=[m,M.join(),L,D.join()].join(),C=p[A];return C||(p[A]=C=b([m,M,L,D])),C(c.shape.slice(0),c.data,c.stride,c.offset|0,l.data,l.stride,l.offset|0)}}};function f(b){var p=i[b.funcName];return p(u.bind(void 0,b))}function g(b){return f({funcName:b.funcName})}var h={mul:"*",div:"/"};(function(){for(var b in h)y[b]=g({funcName:b}),y[b+"s"]=g({funcName:b+"s"}),y[b+"seq"]=g({funcName:b+"seq"})})(),y.assign=g({funcName:"assign"})},7382:function(v,y,r){var n=r(5050),u=r(9262);v.exports=function(f,g){for(var h=[],b=f,p=1;Array.isArray(b);)h.push(b.length),p*=b.length,b=b[0];return h.length===0?n():(g||(g=n(new Float64Array(p),h)),u(g,f),g)}},9262:function(v){function y(){return function(g,h,b,p,E){var c=g[0],l=g[1],m=g[2],M=b[0],L=b[1],D=b[2],A=[0,0,0];p|=0;var C=0,S=0,o=0,R=D,T=L-m*D,O=M-l*L;for(o=0;o<c;++o){for(S=0;S<l;++S){for(C=0;C<m;++C){{var N=E,H;for(H=0;H<A.length-1;++H)N=N[A[H]];h[p]=N[A[A.length-1]]}p+=R,++A[2]}p+=T,A[2]-=m,++A[1]}p+=O,A[1]-=l,++A[0]}}}function r(){return y()}var n=r;function u(g){var h={};return function(p,E){var c=p.dtype,l=p.order,m=[c,l.join()].join(),M=h[m];return M||(h[m]=M=g([c,l])),M(p.shape.slice(0),p.data,p.stride,p.offset|0,E)}}function i(g){return u(n.bind(void 0,g))}function f(g){return i({funcName:g.funcName})}v.exports=f({funcName:"convert"})},8139:function(v,y,r){var n=r(5306);function u(E){switch(E){case"uint32":return[n.mallocUint32,n.freeUint32];default:return null}}var i={"uint32,1,0":function(E,c){return function(m,M,L,D,A,C,S,o,R,T,O){var N,H,k,V=m*A+D,G,U=E(o),Y,ee,re,ie;for(N=m+1;N<=M;++N){for(H=N,V+=A,k=V,Y=0,ee=V,G=0;G<o;++G)U[Y++]=L[ee],ee+=R;e:for(;H-- >m;){Y=0,ee=k-A;t:for(G=0;G<o;++G){if(re=L[ee],ie=U[Y],re<ie)break e;if(re>ie)break t;ee+=T,Y+=O}for(Y=k,ee=k-A,G=0;G<o;++G)L[Y]=L[ee],Y+=R,ee+=R;k-=A}for(Y=k,ee=0,G=0;G<o;++G)L[Y]=U[ee++],Y+=R}c(U)}}};function f(E,c){var l=u(c),m=[c,E].join(","),M=i[m];return l?M(l[0],l[1]):M()}var g={"uint32,1,0":function(E,c,l){return function m(M,L,D,A,C,S,o,R,T,O,N){var H=(L-M+1)/6|0,k=M+H,V=L-H,G=M+L>>1,U=G-H,Y=G+H,ee=k,re=U,ie=G,se=Y,ce=V,q=M+1,j=L-1,Z=!0,Q,ue,fe,te,ne,ve,le,xe,Se,Re=0,Ee=0,Oe=0,Be,Le,Te,De,Ve,Ye,Ne,Xe,ht,st,it,nt,pt,Tt,Et,Dt,et=R,Ue=c(et),ze=c(et);Le=C*ee,Te=C*re,Dt=A;e:for(Be=0;Be<R;++Be){if(le=Le+Dt,xe=Te+Dt,Oe=D[le]-D[xe],Oe>0){ue=ee,ee=re,re=ue;break e}if(Oe<0)break e;Dt+=O}Le=C*se,Te=C*ce,Dt=A;e:for(Be=0;Be<R;++Be){if(le=Le+Dt,xe=Te+Dt,Oe=D[le]-D[xe],Oe>0){ue=se,se=ce,ce=ue;break e}if(Oe<0)break e;Dt+=O}Le=C*ee,Te=C*ie,Dt=A;e:for(Be=0;Be<R;++Be){if(le=Le+Dt,xe=Te+Dt,Oe=D[le]-D[xe],Oe>0){ue=ee,ee=ie,ie=ue;break e}if(Oe<0)break e;Dt+=O}Le=C*re,Te=C*ie,Dt=A;e:for(Be=0;Be<R;++Be){if(le=Le+Dt,xe=Te+Dt,Oe=D[le]-D[xe],Oe>0){ue=re,re=ie,ie=ue;break e}if(Oe<0)break e;Dt+=O}Le=C*ee,Te=C*se,Dt=A;e:for(Be=0;Be<R;++Be){if(le=Le+Dt,xe=Te+Dt,Oe=D[le]-D[xe],Oe>0){ue=ee,ee=se,se=ue;break e}if(Oe<0)break e;Dt+=O}Le=C*ie,Te=C*se,Dt=A;e:for(Be=0;Be<R;++Be){if(le=Le+Dt,xe=Te+Dt,Oe=D[le]-D[xe],Oe>0){ue=ie,ie=se,se=ue;break e}if(Oe<0)break e;Dt+=O}Le=C*re,Te=C*ce,Dt=A;e:for(Be=0;Be<R;++Be){if(le=Le+Dt,xe=Te+Dt,Oe=D[le]-D[xe],Oe>0){ue=re,re=ce,ce=ue;break e}if(Oe<0)break e;Dt+=O}Le=C*re,Te=C*ie,Dt=A;e:for(Be=0;Be<R;++Be){if(le=Le+Dt,xe=Te+Dt,Oe=D[le]-D[xe],Oe>0){ue=re,re=ie,ie=ue;break e}if(Oe<0)break e;Dt+=O}Le=C*se,Te=C*ce,Dt=A;e:for(Be=0;Be<R;++Be){if(le=Le+Dt,xe=Te+Dt,Oe=D[le]-D[xe],Oe>0){ue=se,se=ce,ce=ue;break e}if(Oe<0)break e;Dt+=O}for(Le=C*ee,Te=C*re,De=C*ie,Ve=C*se,Ye=C*ce,Ne=C*k,Xe=C*G,ht=C*V,Et=0,Dt=A,Be=0;Be<R;++Be)le=Le+Dt,xe=Te+Dt,Se=De+Dt,st=Ve+Dt,it=Ye+Dt,nt=Ne+Dt,pt=Xe+Dt,Tt=ht+Dt,Ue[Et]=D[xe],ze[Et]=D[st],Z=Z&&Ue[Et]===ze[Et],fe=D[le],te=D[Se],ne=D[it],D[nt]=fe,D[pt]=te,D[Tt]=ne,++Et,Dt+=T;for(Le=C*U,Te=C*M,Dt=A,Be=0;Be<R;++Be)le=Le+Dt,xe=Te+Dt,D[le]=D[xe],Dt+=T;for(Le=C*Y,Te=C*L,Dt=A,Be=0;Be<R;++Be)le=Le+Dt,xe=Te+Dt,D[le]=D[xe],Dt+=T;if(Z)for(ve=q;ve<=j;++ve){le=A+ve*C,Et=0;e:for(Be=0;Be<R;++Be){if(Oe=D[le]-Ue[Et],Oe!==0)break e;Et+=N,le+=O}if(Oe!==0)if(Oe<0){if(ve!==q)for(Le=C*ve,Te=C*q,Dt=A,Be=0;Be<R;++Be)le=Le+Dt,xe=Te+Dt,Q=D[le],D[le]=D[xe],D[xe]=Q,Dt+=T;++q}else for(;;){le=A+j*C,Et=0;e:for(Be=0;Be<R;++Be){if(Oe=D[le]-Ue[Et],Oe!==0)break e;Et+=N,le+=O}if(Oe>0)j--;else if(Oe<0){for(Le=C*ve,Te=C*q,De=C*j,Dt=A,Be=0;Be<R;++Be)le=Le+Dt,xe=Te+Dt,Se=De+Dt,Q=D[le],D[le]=D[xe],D[xe]=D[Se],D[Se]=Q,Dt+=T;++q,--j;break}else{for(Le=C*ve,Te=C*j,Dt=A,Be=0;Be<R;++Be)le=Le+Dt,xe=Te+Dt,Q=D[le],D[le]=D[xe],D[xe]=Q,Dt+=T;--j;break}}}else for(ve=q;ve<=j;++ve){le=A+ve*C,Et=0;e:for(Be=0;Be<R;++Be){if(Re=D[le]-Ue[Et],Re!==0)break e;Et+=N,le+=O}if(Re<0){if(ve!==q)for(Le=C*ve,Te=C*q,Dt=A,Be=0;Be<R;++Be)le=Le+Dt,xe=Te+Dt,Q=D[le],D[le]=D[xe],D[xe]=Q,Dt+=T;++q}else{le=A+ve*C,Et=0;e:for(Be=0;Be<R;++Be){if(Ee=D[le]-ze[Et],Ee!==0)break e;Et+=N,le+=O}if(Ee>0)for(;;){le=A+j*C,Et=0;e:for(Be=0;Be<R;++Be){if(Oe=D[le]-ze[Et],Oe!==0)break e;Et+=N,le+=O}if(Oe>0){if(--j<ve)break;continue}else{le=A+j*C,Et=0;e:for(Be=0;Be<R;++Be){if(Oe=D[le]-Ue[Et],Oe!==0)break e;Et+=N,le+=O}if(Oe<0){for(Le=C*ve,Te=C*q,De=C*j,Dt=A,Be=0;Be<R;++Be)le=Le+Dt,xe=Te+Dt,Se=De+Dt,Q=D[le],D[le]=D[xe],D[xe]=D[Se],D[Se]=Q,Dt+=T;++q,--j}else{for(Le=C*ve,Te=C*j,Dt=A,Be=0;Be<R;++Be)le=Le+Dt,xe=Te+Dt,Q=D[le],D[le]=D[xe],D[xe]=Q,Dt+=T;--j}break}}}}for(Le=C*M,Te=C*(q-1),Et=0,Dt=A,Be=0;Be<R;++Be)le=Le+Dt,xe=Te+Dt,D[le]=D[xe],D[xe]=Ue[Et],++Et,Dt+=T;for(Le=C*L,Te=C*(j+1),Et=0,Dt=A,Be=0;Be<R;++Be)le=Le+Dt,xe=Te+Dt,D[le]=D[xe],D[xe]=ze[Et],++Et,Dt+=T;if(q-2-M<=32?E(M,q-2,D,A,C,S,o,R,T,O,N):m(M,q-2,D,A,C,S,o,R,T,O,N),L-(j+2)<=32?E(j+2,L,D,A,C,S,o,R,T,O,N):m(j+2,L,D,A,C,S,o,R,T,O,N),Z){l(Ue),l(ze);return}if(q<k&&j>V){e:for(;;){for(le=A+q*C,Et=0,Dt=A,Be=0;Be<R;++Be){if(D[le]!==Ue[Et])break e;++Et,le+=T}++q}e:for(;;){for(le=A+j*C,Et=0,Dt=A,Be=0;Be<R;++Be){if(D[le]!==ze[Et])break e;++Et,le+=T}--j}for(ve=q;ve<=j;++ve){le=A+ve*C,Et=0;e:for(Be=0;Be<R;++Be){if(Re=D[le]-Ue[Et],Re!==0)break e;Et+=N,le+=O}if(Re===0){if(ve!==q)for(Le=C*ve,Te=C*q,Dt=A,Be=0;Be<R;++Be)le=Le+Dt,xe=Te+Dt,Q=D[le],D[le]=D[xe],D[xe]=Q,Dt+=T;++q}else{le=A+ve*C,Et=0;e:for(Be=0;Be<R;++Be){if(Ee=D[le]-ze[Et],Ee!==0)break e;Et+=N,le+=O}if(Ee===0)for(;;){le=A+j*C,Et=0;e:for(Be=0;Be<R;++Be){if(Oe=D[le]-ze[Et],Oe!==0)break e;Et+=N,le+=O}if(Oe===0){if(--j<ve)break;continue}else{le=A+j*C,Et=0;e:for(Be=0;Be<R;++Be){if(Oe=D[le]-Ue[Et],Oe!==0)break e;Et+=N,le+=O}if(Oe<0){for(Le=C*ve,Te=C*q,De=C*j,Dt=A,Be=0;Be<R;++Be)le=Le+Dt,xe=Te+Dt,Se=De+Dt,Q=D[le],D[le]=D[xe],D[xe]=D[Se],D[Se]=Q,Dt+=T;++q,--j}else{for(Le=C*ve,Te=C*j,Dt=A,Be=0;Be<R;++Be)le=Le+Dt,xe=Te+Dt,Q=D[le],D[le]=D[xe],D[xe]=Q,Dt+=T;--j}break}}}}}l(Ue),l(ze),j-q<=32?E(q,j,D,A,C,S,o,R,T,O,N):m(q,j,D,A,C,S,o,R,T,O,N)}}};function h(E,c,l){var m=u(c),M=[c,E].join(","),L=g[M];return E.length>1&&m?L(l,m[0],m[1]):L(l)}var b={"uint32,1,0":function(E,c){return function(l){var m=l.data,M=l.offset|0,L=l.shape,D=l.stride,A=D[0]|0,C=L[0]|0,S=D[1]|0,o=L[1]|0,R=S,T=S,O=1;C<=32?E(0,C-1,m,M,A,S,C,o,R,T,O):c(0,C-1,m,M,A,S,C,o,R,T,O)}}};function p(E,c){var l=[c,E].join(","),m=b[l],M=f(E,c),L=h(E,c,M);return m(M,L)}v.exports=p},8729:function(v,y,r){var n=r(8139),u={};function i(f){var g=f.order,h=f.dtype,b=[g,h],p=b.join(":"),E=u[p];return E||(u[p]=E=n(g,h)),E(f),f}v.exports=i},5050:function(v,y,r){var n=r(4780),u=typeof Float64Array<"u";function i(c,l){return c[0]-l[0]}function f(){var c=this.stride,l=new Array(c.length),m;for(m=0;m<l.length;++m)l[m]=[Math.abs(c[m]),m];l.sort(i);var M=new Array(l.length);for(m=0;m<M.length;++m)M[m]=l[m][1];return M}var g={T:function(c){function l(M){this.data=M}var m=l.prototype;return m.dtype=c,m.index=function(){return-1},m.size=0,m.dimension=-1,m.shape=m.stride=m.order=[],m.lo=m.hi=m.transpose=m.step=function(){return new l(this.data)},m.get=m.set=function(){},m.pick=function(){return null},function(L){return new l(L)}},0:function(c,l){function m(L,D){this.data=L,this.offset=D}var M=m.prototype;return M.dtype=c,M.index=function(){return this.offset},M.dimension=0,M.size=1,M.shape=M.stride=M.order=[],M.lo=M.hi=M.transpose=M.step=function(){return new m(this.data,this.offset)},M.pick=function(){return l(this.data)},M.valueOf=M.get=function(){return c==="generic"?this.data.get(this.offset):this.data[this.offset]},M.set=function(D){return c==="generic"?this.data.set(this.offset,D):this.data[this.offset]=D},function(D,A,C,S){return new m(D,S)}},1:function(c,l,m){function M(D,A,C,S){this.data=D,this.shape=[A],this.stride=[C],this.offset=S|0}var L=M.prototype;return L.dtype=c,L.dimension=1,Object.defineProperty(L,"size",{get:function(){return this.shape[0]}}),L.order=[0],L.set=function(A,C){return c==="generic"?this.data.set(this.offset+this.stride[0]*A,C):this.data[this.offset+this.stride[0]*A]=C},L.get=function(A){return c==="generic"?this.data.get(this.offset+this.stride[0]*A):this.data[this.offset+this.stride[0]*A]},L.index=function(A){return this.offset+this.stride[0]*A},L.hi=function(A){return new M(this.data,typeof A!="number"||A<0?this.shape[0]:A|0,this.stride[0],this.offset)},L.lo=function(A){var C=this.offset,S=0,o=this.shape[0],R=this.stride[0];return typeof A=="number"&&A>=0&&(S=A|0,C+=R*S,o-=S),new M(this.data,o,R,C)},L.step=function(A){var C=this.shape[0],S=this.stride[0],o=this.offset,R=0,T=Math.ceil;return typeof A=="number"&&(R=A|0,R<0?(o+=S*(C-1),C=T(-C/R)):C=T(C/R),S*=R),new M(this.data,C,S,o)},L.transpose=function(A){A=A===void 0?0:A|0;var C=this.shape,S=this.stride;return new M(this.data,C[A],S[A],this.offset)},L.pick=function(A){var C=[],S=[],o=this.offset;typeof A=="number"&&A>=0?o=o+this.stride[0]*A|0:(C.push(this.shape[0]),S.push(this.stride[0]));var R=l[C.length+1];return R(this.data,C,S,o)},function(A,C,S,o){return new M(A,C[0],S[0],o)}},2:function(c,l,m){function M(D,A,C,S,o,R){this.data=D,this.shape=[A,C],this.stride=[S,o],this.offset=R|0}var L=M.prototype;return L.dtype=c,L.dimension=2,Object.defineProperty(L,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(L,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),L.set=function(A,C,S){return c==="generic"?this.data.set(this.offset+this.stride[0]*A+this.stride[1]*C,S):this.data[this.offset+this.stride[0]*A+this.stride[1]*C]=S},L.get=function(A,C){return c==="generic"?this.data.get(this.offset+this.stride[0]*A+this.stride[1]*C):this.data[this.offset+this.stride[0]*A+this.stride[1]*C]},L.index=function(A,C){return this.offset+this.stride[0]*A+this.stride[1]*C},L.hi=function(A,C){return new M(this.data,typeof A!="number"||A<0?this.shape[0]:A|0,typeof C!="number"||C<0?this.shape[1]:C|0,this.stride[0],this.stride[1],this.offset)},L.lo=function(A,C){var S=this.offset,o=0,R=this.shape[0],T=this.shape[1],O=this.stride[0],N=this.stride[1];return typeof A=="number"&&A>=0&&(o=A|0,S+=O*o,R-=o),typeof C=="number"&&C>=0&&(o=C|0,S+=N*o,T-=o),new M(this.data,R,T,O,N,S)},L.step=function(A,C){var S=this.shape[0],o=this.shape[1],R=this.stride[0],T=this.stride[1],O=this.offset,N=0,H=Math.ceil;return typeof A=="number"&&(N=A|0,N<0?(O+=R*(S-1),S=H(-S/N)):S=H(S/N),R*=N),typeof C=="number"&&(N=C|0,N<0?(O+=T*(o-1),o=H(-o/N)):o=H(o/N),T*=N),new M(this.data,S,o,R,T,O)},L.transpose=function(A,C){A=A===void 0?0:A|0,C=C===void 0?1:C|0;var S=this.shape,o=this.stride;return new M(this.data,S[A],S[C],o[A],o[C],this.offset)},L.pick=function(A,C){var S=[],o=[],R=this.offset;typeof A=="number"&&A>=0?R=R+this.stride[0]*A|0:(S.push(this.shape[0]),o.push(this.stride[0])),typeof C=="number"&&C>=0?R=R+this.stride[1]*C|0:(S.push(this.shape[1]),o.push(this.stride[1]));var T=l[S.length+1];return T(this.data,S,o,R)},function(A,C,S,o){return new M(A,C[0],C[1],S[0],S[1],o)}},3:function(c,l,m){function M(D,A,C,S,o,R,T,O){this.data=D,this.shape=[A,C,S],this.stride=[o,R,T],this.offset=O|0}var L=M.prototype;return L.dtype=c,L.dimension=3,Object.defineProperty(L,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(L,"order",{get:function(){var A=Math.abs(this.stride[0]),C=Math.abs(this.stride[1]),S=Math.abs(this.stride[2]);return A>C?C>S?[2,1,0]:A>S?[1,2,0]:[1,0,2]:A>S?[2,0,1]:S>C?[0,1,2]:[0,2,1]}}),L.set=function(A,C,S,o){return c==="generic"?this.data.set(this.offset+this.stride[0]*A+this.stride[1]*C+this.stride[2]*S,o):this.data[this.offset+this.stride[0]*A+this.stride[1]*C+this.stride[2]*S]=o},L.get=function(A,C,S){return c==="generic"?this.data.get(this.offset+this.stride[0]*A+this.stride[1]*C+this.stride[2]*S):this.data[this.offset+this.stride[0]*A+this.stride[1]*C+this.stride[2]*S]},L.index=function(A,C,S){return this.offset+this.stride[0]*A+this.stride[1]*C+this.stride[2]*S},L.hi=function(A,C,S){return new M(this.data,typeof A!="number"||A<0?this.shape[0]:A|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof S!="number"||S<0?this.shape[2]:S|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},L.lo=function(A,C,S){var o=this.offset,R=0,T=this.shape[0],O=this.shape[1],N=this.shape[2],H=this.stride[0],k=this.stride[1],V=this.stride[2];return typeof A=="number"&&A>=0&&(R=A|0,o+=H*R,T-=R),typeof C=="number"&&C>=0&&(R=C|0,o+=k*R,O-=R),typeof S=="number"&&S>=0&&(R=S|0,o+=V*R,N-=R),new M(this.data,T,O,N,H,k,V,o)},L.step=function(A,C,S){var o=this.shape[0],R=this.shape[1],T=this.shape[2],O=this.stride[0],N=this.stride[1],H=this.stride[2],k=this.offset,V=0,G=Math.ceil;return typeof A=="number"&&(V=A|0,V<0?(k+=O*(o-1),o=G(-o/V)):o=G(o/V),O*=V),typeof C=="number"&&(V=C|0,V<0?(k+=N*(R-1),R=G(-R/V)):R=G(R/V),N*=V),typeof S=="number"&&(V=S|0,V<0?(k+=H*(T-1),T=G(-T/V)):T=G(T/V),H*=V),new M(this.data,o,R,T,O,N,H,k)},L.transpose=function(A,C,S){A=A===void 0?0:A|0,C=C===void 0?1:C|0,S=S===void 0?2:S|0;var o=this.shape,R=this.stride;return new M(this.data,o[A],o[C],o[S],R[A],R[C],R[S],this.offset)},L.pick=function(A,C,S){var o=[],R=[],T=this.offset;typeof A=="number"&&A>=0?T=T+this.stride[0]*A|0:(o.push(this.shape[0]),R.push(this.stride[0])),typeof C=="number"&&C>=0?T=T+this.stride[1]*C|0:(o.push(this.shape[1]),R.push(this.stride[1])),typeof S=="number"&&S>=0?T=T+this.stride[2]*S|0:(o.push(this.shape[2]),R.push(this.stride[2]));var O=l[o.length+1];return O(this.data,o,R,T)},function(A,C,S,o){return new M(A,C[0],C[1],C[2],S[0],S[1],S[2],o)}},4:function(c,l,m){function M(D,A,C,S,o,R,T,O,N,H){this.data=D,this.shape=[A,C,S,o],this.stride=[R,T,O,N],this.offset=H|0}var L=M.prototype;return L.dtype=c,L.dimension=4,Object.defineProperty(L,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(L,"order",{get:m}),L.set=function(A,C,S,o,R){return c==="generic"?this.data.set(this.offset+this.stride[0]*A+this.stride[1]*C+this.stride[2]*S+this.stride[3]*o,R):this.data[this.offset+this.stride[0]*A+this.stride[1]*C+this.stride[2]*S+this.stride[3]*o]=R},L.get=function(A,C,S,o){return c==="generic"?this.data.get(this.offset+this.stride[0]*A+this.stride[1]*C+this.stride[2]*S+this.stride[3]*o):this.data[this.offset+this.stride[0]*A+this.stride[1]*C+this.stride[2]*S+this.stride[3]*o]},L.index=function(A,C,S,o){return this.offset+this.stride[0]*A+this.stride[1]*C+this.stride[2]*S+this.stride[3]*o},L.hi=function(A,C,S,o){return new M(this.data,typeof A!="number"||A<0?this.shape[0]:A|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof S!="number"||S<0?this.shape[2]:S|0,typeof o!="number"||o<0?this.shape[3]:o|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},L.lo=function(A,C,S,o){var R=this.offset,T=0,O=this.shape[0],N=this.shape[1],H=this.shape[2],k=this.shape[3],V=this.stride[0],G=this.stride[1],U=this.stride[2],Y=this.stride[3];return typeof A=="number"&&A>=0&&(T=A|0,R+=V*T,O-=T),typeof C=="number"&&C>=0&&(T=C|0,R+=G*T,N-=T),typeof S=="number"&&S>=0&&(T=S|0,R+=U*T,H-=T),typeof o=="number"&&o>=0&&(T=o|0,R+=Y*T,k-=T),new M(this.data,O,N,H,k,V,G,U,Y,R)},L.step=function(A,C,S,o){var R=this.shape[0],T=this.shape[1],O=this.shape[2],N=this.shape[3],H=this.stride[0],k=this.stride[1],V=this.stride[2],G=this.stride[3],U=this.offset,Y=0,ee=Math.ceil;return typeof A=="number"&&(Y=A|0,Y<0?(U+=H*(R-1),R=ee(-R/Y)):R=ee(R/Y),H*=Y),typeof C=="number"&&(Y=C|0,Y<0?(U+=k*(T-1),T=ee(-T/Y)):T=ee(T/Y),k*=Y),typeof S=="number"&&(Y=S|0,Y<0?(U+=V*(O-1),O=ee(-O/Y)):O=ee(O/Y),V*=Y),typeof o=="number"&&(Y=o|0,Y<0?(U+=G*(N-1),N=ee(-N/Y)):N=ee(N/Y),G*=Y),new M(this.data,R,T,O,N,H,k,V,G,U)},L.transpose=function(A,C,S,o){A=A===void 0?0:A|0,C=C===void 0?1:C|0,S=S===void 0?2:S|0,o=o===void 0?3:o|0;var R=this.shape,T=this.stride;return new M(this.data,R[A],R[C],R[S],R[o],T[A],T[C],T[S],T[o],this.offset)},L.pick=function(A,C,S,o){var R=[],T=[],O=this.offset;typeof A=="number"&&A>=0?O=O+this.stride[0]*A|0:(R.push(this.shape[0]),T.push(this.stride[0])),typeof C=="number"&&C>=0?O=O+this.stride[1]*C|0:(R.push(this.shape[1]),T.push(this.stride[1])),typeof S=="number"&&S>=0?O=O+this.stride[2]*S|0:(R.push(this.shape[2]),T.push(this.stride[2])),typeof o=="number"&&o>=0?O=O+this.stride[3]*o|0:(R.push(this.shape[3]),T.push(this.stride[3]));var N=l[R.length+1];return N(this.data,R,T,O)},function(A,C,S,o){return new M(A,C[0],C[1],C[2],C[3],S[0],S[1],S[2],S[3],o)}},5:function(l,m,M){function L(A,C,S,o,R,T,O,N,H,k,V,G){this.data=A,this.shape=[C,S,o,R,T],this.stride=[O,N,H,k,V],this.offset=G|0}var D=L.prototype;return D.dtype=l,D.dimension=5,Object.defineProperty(D,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(D,"order",{get:M}),D.set=function(C,S,o,R,T,O){return l==="generic"?this.data.set(this.offset+this.stride[0]*C+this.stride[1]*S+this.stride[2]*o+this.stride[3]*R+this.stride[4]*T,O):this.data[this.offset+this.stride[0]*C+this.stride[1]*S+this.stride[2]*o+this.stride[3]*R+this.stride[4]*T]=O},D.get=function(C,S,o,R,T){return l==="generic"?this.data.get(this.offset+this.stride[0]*C+this.stride[1]*S+this.stride[2]*o+this.stride[3]*R+this.stride[4]*T):this.data[this.offset+this.stride[0]*C+this.stride[1]*S+this.stride[2]*o+this.stride[3]*R+this.stride[4]*T]},D.index=function(C,S,o,R,T){return this.offset+this.stride[0]*C+this.stride[1]*S+this.stride[2]*o+this.stride[3]*R+this.stride[4]*T},D.hi=function(C,S,o,R,T){return new L(this.data,typeof C!="number"||C<0?this.shape[0]:C|0,typeof S!="number"||S<0?this.shape[1]:S|0,typeof o!="number"||o<0?this.shape[2]:o|0,typeof R!="number"||R<0?this.shape[3]:R|0,typeof T!="number"||T<0?this.shape[4]:T|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},D.lo=function(C,S,o,R,T){var O=this.offset,N=0,H=this.shape[0],k=this.shape[1],V=this.shape[2],G=this.shape[3],U=this.shape[4],Y=this.stride[0],ee=this.stride[1],re=this.stride[2],ie=this.stride[3],se=this.stride[4];return typeof C=="number"&&C>=0&&(N=C|0,O+=Y*N,H-=N),typeof S=="number"&&S>=0&&(N=S|0,O+=ee*N,k-=N),typeof o=="number"&&o>=0&&(N=o|0,O+=re*N,V-=N),typeof R=="number"&&R>=0&&(N=R|0,O+=ie*N,G-=N),typeof T=="number"&&T>=0&&(N=T|0,O+=se*N,U-=N),new L(this.data,H,k,V,G,U,Y,ee,re,ie,se,O)},D.step=function(C,S,o,R,T){var O=this.shape[0],N=this.shape[1],H=this.shape[2],k=this.shape[3],V=this.shape[4],G=this.stride[0],U=this.stride[1],Y=this.stride[2],ee=this.stride[3],re=this.stride[4],ie=this.offset,se=0,ce=Math.ceil;return typeof C=="number"&&(se=C|0,se<0?(ie+=G*(O-1),O=ce(-O/se)):O=ce(O/se),G*=se),typeof S=="number"&&(se=S|0,se<0?(ie+=U*(N-1),N=ce(-N/se)):N=ce(N/se),U*=se),typeof o=="number"&&(se=o|0,se<0?(ie+=Y*(H-1),H=ce(-H/se)):H=ce(H/se),Y*=se),typeof R=="number"&&(se=R|0,se<0?(ie+=ee*(k-1),k=ce(-k/se)):k=ce(k/se),ee*=se),typeof T=="number"&&(se=T|0,se<0?(ie+=re*(V-1),V=ce(-V/se)):V=ce(V/se),re*=se),new L(this.data,O,N,H,k,V,G,U,Y,ee,re,ie)},D.transpose=function(C,S,o,R,T){C=C===void 0?0:C|0,S=S===void 0?1:S|0,o=o===void 0?2:o|0,R=R===void 0?3:R|0,T=T===void 0?4:T|0;var O=this.shape,N=this.stride;return new L(this.data,O[C],O[S],O[o],O[R],O[T],N[C],N[S],N[o],N[R],N[T],this.offset)},D.pick=function(C,S,o,R,T){var O=[],N=[],H=this.offset;typeof C=="number"&&C>=0?H=H+this.stride[0]*C|0:(O.push(this.shape[0]),N.push(this.stride[0])),typeof S=="number"&&S>=0?H=H+this.stride[1]*S|0:(O.push(this.shape[1]),N.push(this.stride[1])),typeof o=="number"&&o>=0?H=H+this.stride[2]*o|0:(O.push(this.shape[2]),N.push(this.stride[2])),typeof R=="number"&&R>=0?H=H+this.stride[3]*R|0:(O.push(this.shape[3]),N.push(this.stride[3])),typeof T=="number"&&T>=0?H=H+this.stride[4]*T|0:(O.push(this.shape[4]),N.push(this.stride[4]));var k=m[O.length+1];return k(this.data,O,N,H)},function(C,S,o,R){return new L(C,S[0],S[1],S[2],S[3],S[4],o[0],o[1],o[2],o[3],o[4],R)}}};function h(c,l){var m=l===-1?"T":String(l),M=g[m];return l===-1?M(c):l===0?M(c,p[c][0]):M(c,p[c],f)}function b(c){if(n(c))return"buffer";if(u)switch(Object.prototype.toString.call(c)){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(c)?"array":"generic"}var p={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function E(c,l,m,M){if(c===void 0){var o=p.array[0];return o([])}else typeof c=="number"&&(c=[c]);l===void 0&&(l=[c.length]);var L=l.length;if(m===void 0){m=new Array(L);for(var D=L-1,A=1;D>=0;--D)m[D]=A,A*=l[D]}if(M===void 0){M=0;for(var D=0;D<L;++D)m[D]<0&&(M-=(l[D]-1)*m[D])}for(var C=b(c),S=p[C];S.length<=L+1;)S.push(h(C,S.length-1));var o=S[L+1];return o(c,l,m,M)}v.exports=E},8551:function(v,y,r){var n=r(8362),u=Math.pow(2,-1074),i=-1>>>0;v.exports=f;function f(g,h){if(isNaN(g)||isNaN(h))return NaN;if(g===h)return g;if(g===0)return h<0?-u:u;var b=n.hi(g),p=n.lo(g);return h>g==g>0?p===i?(b+=1,p=0):p+=1:p===0?(p=i,b-=1):p-=1,n.pack(p,b)}},115:function(v,y){var r=1e-6,n=1e-6;y.vertexNormals=function(u,i,f){for(var g=i.length,h=new Array(g),b=f===void 0?r:f,p=0;p<g;++p)h[p]=[0,0,0];for(var p=0;p<u.length;++p)for(var E=u[p],c=0,l=E[E.length-1],m=E[0],M=0;M<E.length;++M){c=l,l=m,m=E[(M+1)%E.length];for(var L=i[c],D=i[l],A=i[m],C=new Array(3),S=0,o=new Array(3),R=0,T=0;T<3;++T)C[T]=L[T]-D[T],S+=C[T]*C[T],o[T]=A[T]-D[T],R+=o[T]*o[T];if(S*R>b)for(var O=h[l],N=1/Math.sqrt(S*R),T=0;T<3;++T){var H=(T+1)%3,k=(T+2)%3;O[T]+=N*(o[H]*C[k]-o[k]*C[H])}}for(var p=0;p<g;++p){for(var O=h[p],V=0,T=0;T<3;++T)V+=O[T]*O[T];if(V>b)for(var N=1/Math.sqrt(V),T=0;T<3;++T)O[T]*=N;else for(var T=0;T<3;++T)O[T]=0}return h},y.faceNormals=function(u,i,f){for(var g=u.length,h=new Array(g),b=f===void 0?n:f,p=0;p<g;++p){for(var E=u[p],c=new Array(3),l=0;l<3;++l)c[l]=i[E[l]];for(var m=new Array(3),M=new Array(3),l=0;l<3;++l)m[l]=c[1][l]-c[0][l],M[l]=c[2][l]-c[0][l];for(var L=new Array(3),D=0,l=0;l<3;++l){var A=(l+1)%3,C=(l+2)%3;L[l]=m[A]*M[C]-m[C]*M[A],D+=L[l]*L[l]}D>b?D=1/Math.sqrt(D):D=0;for(var l=0;l<3;++l)L[l]*=D;h[p]=L}return h}},567:function(v){v.exports=y;function y(r,n,u,i,f,g,h,b,p,E){var c=n+g+E;if(l>0){var l=Math.sqrt(c+1);r[0]=.5*(h-p)/l,r[1]=.5*(b-i)/l,r[2]=.5*(u-g)/l,r[3]=.5*l}else{var m=Math.max(n,g,E),l=Math.sqrt(2*m-c+1);n>=m?(r[0]=.5*l,r[1]=.5*(f+u)/l,r[2]=.5*(b+i)/l,r[3]=.5*(h-p)/l):g>=m?(r[0]=.5*(u+f)/l,r[1]=.5*l,r[2]=.5*(p+h)/l,r[3]=.5*(b-i)/l):(r[0]=.5*(i+b)/l,r[1]=.5*(h+p)/l,r[2]=.5*l,r[3]=.5*(u-f)/l)}return r}},7774:function(v,y,r){v.exports=l;var n=r(8444),u=r(3012),i=r(5950),f=r(7437),g=r(567);function h(m,M,L){return Math.sqrt(Math.pow(m,2)+Math.pow(M,2)+Math.pow(L,2))}function b(m,M,L,D){return Math.sqrt(Math.pow(m,2)+Math.pow(M,2)+Math.pow(L,2)+Math.pow(D,2))}function p(m,M){var L=M[0],D=M[1],A=M[2],C=M[3],S=b(L,D,A,C);S>1e-6?(m[0]=L/S,m[1]=D/S,m[2]=A/S,m[3]=C/S):(m[0]=m[1]=m[2]=0,m[3]=1)}function E(m,M,L){this.radius=n([L]),this.center=n(M),this.rotation=n(m),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 c=E.prototype;c.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},c.recalcMatrix=function(m){this.radius.curve(m),this.center.curve(m),this.rotation.curve(m);var M=this.computedRotation;p(M,M);var L=this.computedMatrix;i(L,M);var D=this.computedCenter,A=this.computedEye,C=this.computedUp,S=Math.exp(this.computedRadius[0]);A[0]=D[0]+S*L[2],A[1]=D[1]+S*L[6],A[2]=D[2]+S*L[10],C[0]=L[1],C[1]=L[5],C[2]=L[9];for(var o=0;o<3;++o){for(var R=0,T=0;T<3;++T)R+=L[o+4*T]*A[T];L[12+o]=-R}},c.getMatrix=function(m,M){this.recalcMatrix(m);var L=this.computedMatrix;if(M){for(var D=0;D<16;++D)M[D]=L[D];return M}return L},c.idle=function(m){this.center.idle(m),this.radius.idle(m),this.rotation.idle(m)},c.flush=function(m){this.center.flush(m),this.radius.flush(m),this.rotation.flush(m)},c.pan=function(m,M,L,D){M=M||0,L=L||0,D=D||0,this.recalcMatrix(m);var A=this.computedMatrix,C=A[1],S=A[5],o=A[9],R=h(C,S,o);C/=R,S/=R,o/=R;var T=A[0],O=A[4],N=A[8],H=T*C+O*S+N*o;T-=C*H,O-=S*H,N-=o*H;var k=h(T,O,N);T/=k,O/=k,N/=k,A[2],A[6],A[10];var V=T*M+C*L,G=O*M+S*L,U=N*M+o*L;this.center.move(m,V,G,U);var Y=Math.exp(this.computedRadius[0]);Y=Math.max(1e-4,Y+D),this.radius.set(m,Math.log(Y))},c.rotate=function(m,M,L,D){this.recalcMatrix(m),M=M||0,L=L||0;var A=this.computedMatrix,C=A[0],S=A[4],o=A[8],R=A[1],T=A[5],O=A[9],N=A[2],H=A[6],k=A[10],V=M*C+L*R,G=M*S+L*T,U=M*o+L*O,Y=-(H*U-k*G),ee=-(k*V-N*U),re=-(N*G-H*V),ie=Math.sqrt(Math.max(0,1-Math.pow(Y,2)-Math.pow(ee,2)-Math.pow(re,2))),se=b(Y,ee,re,ie);se>1e-6?(Y/=se,ee/=se,re/=se,ie/=se):(Y=ee=re=0,ie=1);var ce=this.computedRotation,q=ce[0],j=ce[1],Z=ce[2],Q=ce[3],ue=q*ie+Q*Y+j*re-Z*ee,fe=j*ie+Q*ee+Z*Y-q*re,te=Z*ie+Q*re+q*ee-j*Y,ne=Q*ie-q*Y-j*ee-Z*re;if(D){Y=N,ee=H,re=k;var ve=Math.sin(D)/h(Y,ee,re);Y*=ve,ee*=ve,re*=ve,ie=Math.cos(M),ue=ue*ie+ne*Y+fe*re-te*ee,fe=fe*ie+ne*ee+te*Y-ue*re,te=te*ie+ne*re+ue*ee-fe*Y,ne=ne*ie-ue*Y-fe*ee-te*re}var le=b(ue,fe,te,ne);le>1e-6?(ue/=le,fe/=le,te/=le,ne/=le):(ue=fe=te=0,ne=1),this.rotation.set(m,ue,fe,te,ne)},c.lookAt=function(m,M,L,D){this.recalcMatrix(m),L=L||this.computedCenter,M=M||this.computedEye,D=D||this.computedUp;var A=this.computedMatrix;u(A,M,L,D);var C=this.computedRotation;g(C,A[0],A[1],A[2],A[4],A[5],A[6],A[8],A[9],A[10]),p(C,C),this.rotation.set(m,C[0],C[1],C[2],C[3]);for(var S=0,o=0;o<3;++o)S+=Math.pow(L[o]-M[o],2);this.radius.set(m,.5*Math.log(Math.max(S,1e-6))),this.center.set(m,L[0],L[1],L[2])},c.translate=function(m,M,L,D){this.center.move(m,M||0,L||0,D||0)},c.setMatrix=function(m,M){var L=this.computedRotation;g(L,M[0],M[1],M[2],M[4],M[5],M[6],M[8],M[9],M[10]),p(L,L),this.rotation.set(m,L[0],L[1],L[2],L[3]);var D=this.computedMatrix;f(D,M);var A=D[15];if(Math.abs(A)>1e-6){var C=D[12]/A,S=D[13]/A,o=D[14]/A;this.recalcMatrix(m);var R=Math.exp(this.computedRadius[0]);this.center.set(m,C-D[2]*R,S-D[6]*R,o-D[10]*R),this.radius.idle(m)}else this.center.idle(m),this.radius.idle(m)},c.setDistance=function(m,M){M>0&&this.radius.set(m,Math.log(M))},c.setDistanceLimits=function(m,M){m>0?m=Math.log(m):m=-1/0,M>0?M=Math.log(M):M=1/0,M=Math.max(M,m),this.radius.bounds[0][0]=m,this.radius.bounds[1][0]=M},c.getDistanceLimits=function(m){var M=this.radius.bounds;return m?(m[0]=Math.exp(M[0][0]),m[1]=Math.exp(M[1][0]),m):[Math.exp(M[0][0]),Math.exp(M[1][0])]},c.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]}},c.fromJSON=function(m){var M=this.lastT(),L=m.center;L&&this.center.set(M,L[0],L[1],L[2]);var D=m.rotation;D&&this.rotation.set(M,D[0],D[1],D[2],D[3]);var A=m.distance;A&&A>0&&this.radius.set(M,Math.log(A)),this.setDistanceLimits(m.zoomMin,m.zoomMax)};function l(m){m=m||{};var M=m.center||[0,0,0],L=m.rotation||[0,0,0,1],D=m.radius||1;M=[].slice.call(M,0,3),L=[].slice.call(L,0,4),p(L,L);var A=new E(L,M,Math.log(D));return A.setDistanceLimits(m.zoomMin,m.zoomMax),("eye"in m||"up"in m)&&A.lookAt(0,m.eye,m.center,m.up),A}},4930:function(v,y,r){/*!
* pad-left <https://github.com/jonschlinkert/pad-left>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT license.
*/var n=r(6184);v.exports=function(i,f,g){return g=typeof g<"u"?g+"":" ",n(g,f)+i}},4405:function(v){v.exports=function(r,n){n||(n=[0,""]),r=String(r);var u=parseFloat(r,10);return n[0]=u,n[1]=r.match(/[\d.\-\+]*\s*(.*)/)[1]||"",n}},4166:function(v,y,r){v.exports=u;var n=r(9398);function u(i,f){for(var g=f.length|0,h=i.length,b=[new Array(g),new Array(g)],p=0;p<g;++p)b[0][p]=[],b[1][p]=[];for(var p=0;p<h;++p){var E=i[p];b[0][E[0]].push(E),b[1][E[1]].push(E)}for(var c=[],p=0;p<g;++p)b[0][p].length+b[1][p].length===0&&c.push([p]);function l(S,o){var R=b[o][S[o]];R.splice(R.indexOf(S),1)}function m(S,o,R){for(var T,O,N,H=0;H<2;++H)if(b[H][o].length>0){T=b[H][o][0],N=H;break}O=T[N^1];for(var k=0;k<2;++k)for(var V=b[k][o],G=0;G<V.length;++G){var U=V[G],Y=U[k^1],ee=n(f[S],f[o],f[O],f[Y]);ee>0&&(T=U,O=Y,N=k)}return R||T&&l(T,N),O}function M(S,o){var R=b[o][S][0],T=[S];l(R,o);for(var O=R[o^1];;){for(;O!==S;)T.push(O),O=m(T[T.length-2],O,!1);if(b[0][S].length+b[1][S].length===0)break;var N=T[T.length-1],H=S,k=T[1],V=m(N,H,!0);if(n(f[N],f[H],f[k],f[V])<0)break;T.push(S),O=m(N,H)}return T}function L(S,o){return o[1]===o[o.length-1]}for(var p=0;p<g;++p)for(var D=0;D<2;++D){for(var A=[];b[D][p].length>0;){b[0][p].length;var C=M(p,D);L(A,C)?A.push.apply(A,C):(A.length>0&&c.push(A),A=C)}A.length>0&&c.push(A)}return c}},3959:function(v,y,r){v.exports=u;var n=r(8348);function u(i,f){for(var g=n(i,f.length),h=new Array(f.length),b=new Array(f.length),p=[],E=0;E<f.length;++E){var c=g[E].length;b[E]=c,h[E]=!0,c<=1&&p.push(E)}for(;p.length>0;){var l=p.pop();h[l]=!1;for(var m=g[l],E=0;E<m.length;++E){var M=m[E];--b[M]===0&&p.push(M)}}for(var L=new Array(f.length),D=[],E=0;E<f.length;++E)if(h[E]){var l=D.length;L[E]=l,D.push(f[E])}else L[E]=-1;for(var A=[],E=0;E<i.length;++E){var C=i[E];h[C[0]]&&h[C[1]]&&A.push([L[C[0]],L[C[1]]])}return[A,D]}},8040:function(v,y,r){v.exports=c;var n=r(8348),u=r(4166),i=r(211),f=r(9660),g=r(9662),h=r(1215),b=r(3959);function p(l,m){for(var M=new Array(l),L=0;L<l;++L)M[L]=m;return M}function E(l){for(var m=new Array(l),M=0;M<l;++M)m[M]=[];return m}function c(l,m){var ne=b(l,m);l=ne[0],m=ne[1];var M=m.length;l.length;for(var L=n(l,m.length),D=0;D<M;++D)if(L[D].length%2===1)throw new Error("planar-graph-to-polyline: graph must be manifold");var A=u(l,m);function C(Oe){for(var Be=Oe.length,Le=[0],Te=0;Te<Be;++Te){var De=m[Oe[Te]],Ve=m[Oe[(Te+1)%Be]],Ye=f(-De[0],De[1]),Ne=f(-De[0],Ve[1]),Xe=f(Ve[0],De[1]),ht=f(Ve[0],Ve[1]);Le=g(Le,g(g(Ye,Ne),g(Xe,ht)))}return Le[Le.length-1]>0}A=A.filter(C);for(var S=A.length,o=new Array(S),R=new Array(S),D=0;D<S;++D){o[D]=D;var T=new Array(S),O=A[D].map(function(Be){return m[Be]}),N=i([O]),H=0;e:for(var k=0;k<S;++k)if(T[k]=0,D!==k){for(var V=A[k],G=V.length,U=0;U<G;++U){var Y=N(m[V[U]]);if(Y!==0){Y<0&&(T[k]=1,H+=1);continue e}}T[k]=1,H+=1}R[D]=[H,D,T]}R.sort(function(Oe,Be){return Be[0]-Oe[0]});for(var D=0;D<S;++D)for(var T=R[D],ee=T[1],re=T[2],k=0;k<S;++k)re[k]&&(o[k]=ee);for(var ie=E(S),D=0;D<S;++D)ie[D].push(o[D]),ie[o[D]].push(D);for(var se={},ce=p(M,!1),D=0;D<S;++D)for(var V=A[D],G=V.length,k=0;k<G;++k){var q=V[k],j=V[(k+1)%G],Z=Math.min(q,j)+":"+Math.max(q,j);if(Z in se){var Q=se[Z];ie[Q].push(D),ie[D].push(Q),ce[q]=ce[j]=!0}else se[Z]=D}function ue(Oe){for(var Be=Oe.length,Le=0;Le<Be;++Le)if(!ce[Oe[Le]])return!1;return!0}for(var fe=[],te=p(S,-1),D=0;D<S;++D)o[D]===D&&!ue(A[D])?(fe.push(D),te[D]=0):te[D]=-1;for(var ne=[];fe.length>0;){var ve=fe.pop(),le=ie[ve];h(le,function(Oe,Be){return Oe-Be});var xe=le.length,Se=te[ve],Re;if(Se===0){var V=A[ve];Re=[V]}for(var D=0;D<xe;++D){var Ee=le[D];if(!(te[Ee]>=0)&&(te[Ee]=Se^1,fe.push(Ee),Se===0)){var V=A[Ee];ue(V)||(V.reverse(),Re.push(V))}}Se===0&&ne.push(Re)}return ne}},211:function(v,y,r){v.exports=m;var n=r(417)[3],u=r(4385),i=r(9014),f=r(5070);function g(){return!0}function h(M){return function(L,D){var A=M[L];return A?!!A.queryPoint(D,g):!1}}function b(M){for(var L={},D=0;D<M.length;++D){var A=M[D],C=A[0][0],S=A[0][1],o=A[1][1],R=[Math.min(S,o),Math.max(S,o)];C in L?L[C].push(R):L[C]=[R]}for(var T={},O=Object.keys(L),D=0;D<O.length;++D){var N=L[O[D]];T[O[D]]=i(N)}return h(T)}function p(M,L){return function(D){var A=f.le(L,D[0]);if(A<0)return 1;var C=M[A];if(!C)if(A>0&&L[A]===D[0])C=M[A-1];else return 1;for(var S=1;C;){var o=C.key,R=n(D,o[0],o[1]);if(o[0][0]<o[1][0])if(R<0)C=C.left;else if(R>0)S=-1,C=C.right;else return 0;else if(R>0)C=C.left;else if(R<0)S=1,C=C.right;else return 0}return S}}function E(M){return 1}function c(M){return function(D){return M(D[0],D[1])?0:1}}function l(M,L){return function(A){return M(A[0],A[1])?0:L(A)}}function m(M){for(var L=M.length,D=[],A=[],C=0;C<L;++C)for(var S=M[C],o=S.length,R=o-1,T=0;T<o;R=T++){var O=S[R],N=S[T];O[0]===N[0]?A.push([O,N]):D.push([O,N])}if(D.length===0)return A.length===0?E:c(b(A));var H=u(D),k=p(H.slabs,H.coordinates);return A.length===0?k:l(b(A),k)}},7309:function(v){var y=new Float64Array(4),r=new Float64Array(4),n=new Float64Array(4);function u(i,f,g,h,b){y.length<h.length&&(y=new Float64Array(h.length),r=new Float64Array(h.length),n=new Float64Array(h.length));for(var p=0;p<h.length;++p)y[p]=i[p]-h[p],r[p]=f[p]-i[p],n[p]=g[p]-i[p];for(var E=0,c=0,l=0,m=0,M=0,L=0,p=0;p<h.length;++p){var D=r[p],A=n[p],C=y[p];E+=D*D,c+=D*A,l+=A*A,m+=C*D,M+=C*A,L+=C*C}var S=Math.abs(E*l-c*c),o=c*M-l*m,R=c*m-E*M,T;if(o+R<=S)if(o<0)R<0&&m<0?(R=0,-m>=E?(o=1,T=E+2*m+L):(o=-m/E,T=m*o+L)):(o=0,M>=0?(R=0,T=L):-M>=l?(R=1,T=l+2*M+L):(R=-M/l,T=M*R+L));else if(R<0)R=0,m>=0?(o=0,T=L):-m>=E?(o=1,T=E+2*m+L):(o=-m/E,T=m*o+L);else{var O=1/S;o*=O,R*=O,T=o*(E*o+c*R+2*m)+R*(c*o+l*R+2*M)+L}else{var N,H,k,V;o<0?(N=c+m,H=l+M,H>N?(k=H-N,V=E-2*c+l,k>=V?(o=1,R=0,T=E+2*m+L):(o=k/V,R=1-o,T=o*(E*o+c*R+2*m)+R*(c*o+l*R+2*M)+L)):(o=0,H<=0?(R=1,T=l+2*M+L):M>=0?(R=0,T=L):(R=-M/l,T=M*R+L))):R<0?(N=c+M,H=E+m,H>N?(k=H-N,V=E-2*c+l,k>=V?(R=1,o=0,T=l+2*M+L):(R=k/V,o=1-R,T=o*(E*o+c*R+2*m)+R*(c*o+l*R+2*M)+L)):(R=0,H<=0?(o=1,T=E+2*m+L):m>=0?(o=0,T=L):(o=-m/E,T=m*o+L))):(k=l+M-c-m,k<=0?(o=0,R=1,T=l+2*M+L):(V=E-2*c+l,k>=V?(o=1,R=0,T=E+2*m+L):(o=k/V,R=1-o,T=o*(E*o+c*R+2*m)+R*(c*o+l*R+2*M)+L)))}for(var G=1-o-R,p=0;p<h.length;++p)b[p]=G*i[p]+o*f[p]+R*g[p];return T<0?0:T}v.exports=u},1116:function(v,y,r){v.exports=r(6093)},7584:function(v,y,r){var n=r(1539);v.exports=u;function u(i,f){for(var g=i.length,h=new Array(g),b=0;b<g;++b)h[b]=n(i[b],f[b]);return h}},2826:function(v,y,r){v.exports=u;var n=r(5125);function u(i){for(var f=new Array(i.length),g=0;g<i.length;++g)f[g]=n(i[g]);return f}},4469:function(v,y,r){var n=r(5125),u=r(3962);v.exports=i;function i(f,g){for(var h=n(g),b=f.length,p=new Array(b),E=0;E<b;++E)p[E]=u(f[E],h);return p}},6695:function(v,y,r){var n=r(4354);v.exports=u;function u(i,f){for(var g=i.length,h=new Array(g),b=0;b<g;++b)h[b]=n(i[b],f[b]);return h}},7037:function(v,y,r){var n=r(9209),u=r(1284),i=r(9887);v.exports=f;function f(g){g.sort(u);for(var h=g.length,b=0,p=0;p<h;++p){var E=g[p],c=i(E);if(c!==0){if(b>0){var l=g[b-1];if(n(E,l)===0&&i(l)!==c){b-=1;continue}}g[b++]=E}}return g.length=b,g}},6184:function(v){/*!
* repeat-string <https://github.com/jonschlinkert/repeat-string>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/var y="",r;v.exports=n;function n(u,i){if(typeof u!="string")throw new TypeError("expected a string");if(i===1)return u;if(i===2)return u+u;var f=u.length*i;if(r!==u||typeof r>"u")r=u,y="";else if(y.length>=f)return y.substr(0,f);for(;f>y.length&&i>1;)i&1&&(y+=u),i>>=1,u+=u;return y+=u,y=y.substr(0,f),y}},8161:function(v,y,r){v.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},402:function(v){v.exports=y;function y(r){for(var n=r.length,u=r[r.length-1],i=n,f=n-2;f>=0;--f){var g=u,h=r[f];u=g+h;var b=u-g,p=h-b;p&&(r[--i]=u,u=p)}for(var E=0,f=i;f<n;++f){var g=r[f],h=u;u=g+h;var b=u-g,p=h-b;p&&(r[E++]=p)}return r[E++]=u,r.length=E,r}},8167:function(v,y,r){var n=r(9660),u=r(9662),i=r(8289),f=r(402),g=6;function h(L,D,A,C){return function(o){return C(L(A(o[0][0],o[1][1]),A(-o[0][1],o[1][0])))}}function b(L,D,A,C){return function(o){return C(L(D(L(A(o[1][1],o[2][2]),A(-o[1][2],o[2][1])),o[0][0]),L(D(L(A(o[1][0],o[2][2]),A(-o[1][2],o[2][0])),-o[0][1]),D(L(A(o[1][0],o[2][1]),A(-o[1][1],o[2][0])),o[0][2]))))}}function p(L,D,A,C){return function(o){return C(L(L(D(L(D(L(A(o[2][2],o[3][3]),A(-o[2][3],o[3][2])),o[1][1]),L(D(L(A(o[2][1],o[3][3]),A(-o[2][3],o[3][1])),-o[1][2]),D(L(A(o[2][1],o[3][2]),A(-o[2][2],o[3][1])),o[1][3]))),o[0][0]),D(L(D(L(A(o[2][2],o[3][3]),A(-o[2][3],o[3][2])),o[1][0]),L(D(L(A(o[2][0],o[3][3]),A(-o[2][3],o[3][0])),-o[1][2]),D(L(A(o[2][0],o[3][2]),A(-o[2][2],o[3][0])),o[1][3]))),-o[0][1])),L(D(L(D(L(A(o[2][1],o[3][3]),A(-o[2][3],o[3][1])),o[1][0]),L(D(L(A(o[2][0],o[3][3]),A(-o[2][3],o[3][0])),-o[1][1]),D(L(A(o[2][0],o[3][1]),A(-o[2][1],o[3][0])),o[1][3]))),o[0][2]),D(L(D(L(A(o[2][1],o[3][2]),A(-o[2][2],o[3][1])),o[1][0]),L(D(L(A(o[2][0],o[3][2]),A(-o[2][2],o[3][0])),-o[1][1]),D(L(A(o[2][0],o[3][1]),A(-o[2][1],o[3][0])),o[1][2]))),-o[0][3]))))}}function E(L,D,A,C){return function(o){return C(L(L(D(L(L(D(L(D(L(A(o[3][3],o[4][4]),A(-o[3][4],o[4][3])),o[2][2]),L(D(L(A(o[3][2],o[4][4]),A(-o[3][4],o[4][2])),-o[2][3]),D(L(A(o[3][2],o[4][3]),A(-o[3][3],o[4][2])),o[2][4]))),o[1][1]),D(L(D(L(A(o[3][3],o[4][4]),A(-o[3][4],o[4][3])),o[2][1]),L(D(L(A(o[3][1],o[4][4]),A(-o[3][4],o[4][1])),-o[2][3]),D(L(A(o[3][1],o[4][3]),A(-o[3][3],o[4][1])),o[2][4]))),-o[1][2])),L(D(L(D(L(A(o[3][2],o[4][4]),A(-o[3][4],o[4][2])),o[2][1]),L(D(L(A(o[3][1],o[4][4]),A(-o[3][4],o[4][1])),-o[2][2]),D(L(A(o[3][1],o[4][2]),A(-o[3][2],o[4][1])),o[2][4]))),o[1][3]),D(L(D(L(A(o[3][2],o[4][3]),A(-o[3][3],o[4][2])),o[2][1]),L(D(L(A(o[3][1],o[4][3]),A(-o[3][3],o[4][1])),-o[2][2]),D(L(A(o[3][1],o[4][2]),A(-o[3][2],o[4][1])),o[2][3]))),-o[1][4]))),o[0][0]),D(L(L(D(L(D(L(A(o[3][3],o[4][4]),A(-o[3][4],o[4][3])),o[2][2]),L(D(L(A(o[3][2],o[4][4]),A(-o[3][4],o[4][2])),-o[2][3]),D(L(A(o[3][2],o[4][3]),A(-o[3][3],o[4][2])),o[2][4]))),o[1][0]),D(L(D(L(A(o[3][3],o[4][4]),A(-o[3][4],o[4][3])),o[2][0]),L(D(L(A(o[3][0],o[4][4]),A(-o[3][4],o[4][0])),-o[2][3]),D(L(A(o[3][0],o[4][3]),A(-o[3][3],o[4][0])),o[2][4]))),-o[1][2])),L(D(L(D(L(A(o[3][2],o[4][4]),A(-o[3][4],o[4][2])),o[2][0]),L(D(L(A(o[3][0],o[4][4]),A(-o[3][4],o[4][0])),-o[2][2]),D(L(A(o[3][0],o[4][2]),A(-o[3][2],o[4][0])),o[2][4]))),o[1][3]),D(L(D(L(A(o[3][2],o[4][3]),A(-o[3][3],o[4][2])),o[2][0]),L(D(L(A(o[3][0],o[4][3]),A(-o[3][3],o[4][0])),-o[2][2]),D(L(A(o[3][0],o[4][2]),A(-o[3][2],o[4][0])),o[2][3]))),-o[1][4]))),-o[0][1])),L(D(L(L(D(L(D(L(A(o[3][3],o[4][4]),A(-o[3][4],o[4][3])),o[2][1]),L(D(L(A(o[3][1],o[4][4]),A(-o[3][4],o[4][1])),-o[2][3]),D(L(A(o[3][1],o[4][3]),A(-o[3][3],o[4][1])),o[2][4]))),o[1][0]),D(L(D(L(A(o[3][3],o[4][4]),A(-o[3][4],o[4][3])),o[2][0]),L(D(L(A(o[3][0],o[4][4]),A(-o[3][4],o[4][0])),-o[2][3]),D(L(A(o[3][0],o[4][3]),A(-o[3][3],o[4][0])),o[2][4]))),-o[1][1])),L(D(L(D(L(A(o[3][1],o[4][4]),A(-o[3][4],o[4][1])),o[2][0]),L(D(L(A(o[3][0],o[4][4]),A(-o[3][4],o[4][0])),-o[2][1]),D(L(A(o[3][0],o[4][1]),A(-o[3][1],o[4][0])),o[2][4]))),o[1][3]),D(L(D(L(A(o[3][1],o[4][3]),A(-o[3][3],o[4][1])),o[2][0]),L(D(L(A(o[3][0],o[4][3]),A(-o[3][3],o[4][0])),-o[2][1]),D(L(A(o[3][0],o[4][1]),A(-o[3][1],o[4][0])),o[2][3]))),-o[1][4]))),o[0][2]),L(D(L(L(D(L(D(L(A(o[3][2],o[4][4]),A(-o[3][4],o[4][2])),o[2][1]),L(D(L(A(o[3][1],o[4][4]),A(-o[3][4],o[4][1])),-o[2][2]),D(L(A(o[3][1],o[4][2]),A(-o[3][2],o[4][1])),o[2][4]))),o[1][0]),D(L(D(L(A(o[3][2],o[4][4]),A(-o[3][4],o[4][2])),o[2][0]),L(D(L(A(o[3][0],o[4][4]),A(-o[3][4],o[4][0])),-o[2][2]),D(L(A(o[3][0],o[4][2]),A(-o[3][2],o[4][0])),o[2][4]))),-o[1][1])),L(D(L(D(L(A(o[3][1],o[4][4]),A(-o[3][4],o[4][1])),o[2][0]),L(D(L(A(o[3][0],o[4][4]),A(-o[3][4],o[4][0])),-o[2][1]),D(L(A(o[3][0],o[4][1]),A(-o[3][1],o[4][0])),o[2][4]))),o[1][2]),D(L(D(L(A(o[3][1],o[4][2]),A(-o[3][2],o[4][1])),o[2][0]),L(D(L(A(o[3][0],o[4][2]),A(-o[3][2],o[4][0])),-o[2][1]),D(L(A(o[3][0],o[4][1]),A(-o[3][1],o[4][0])),o[2][2]))),-o[1][4]))),-o[0][3]),D(L(L(D(L(D(L(A(o[3][2],o[4][3]),A(-o[3][3],o[4][2])),o[2][1]),L(D(L(A(o[3][1],o[4][3]),A(-o[3][3],o[4][1])),-o[2][2]),D(L(A(o[3][1],o[4][2]),A(-o[3][2],o[4][1])),o[2][3]))),o[1][0]),D(L(D(L(A(o[3][2],o[4][3]),A(-o[3][3],o[4][2])),o[2][0]),L(D(L(A(o[3][0],o[4][3]),A(-o[3][3],o[4][0])),-o[2][2]),D(L(A(o[3][0],o[4][2]),A(-o[3][2],o[4][0])),o[2][3]))),-o[1][1])),L(D(L(D(L(A(o[3][1],o[4][3]),A(-o[3][3],o[4][1])),o[2][0]),L(D(L(A(o[3][0],o[4][3]),A(-o[3][3],o[4][0])),-o[2][1]),D(L(A(o[3][0],o[4][1]),A(-o[3][1],o[4][0])),o[2][3]))),o[1][2]),D(L(D(L(A(o[3][1],o[4][2]),A(-o[3][2],o[4][1])),o[2][0]),L(D(L(A(o[3][0],o[4][2]),A(-o[3][2],o[4][0])),-o[2][1]),D(L(A(o[3][0],o[4][1]),A(-o[3][1],o[4][0])),o[2][2]))),-o[1][3]))),o[0][4])))))}}function c(L){var D=L===2?h:L===3?b:L===4?p:L===5?E:void 0;return D(u,i,n,f)}var l=[function(){return[0]},function(D){return[D[0][0]]}];function m(L,D,A,C,S,o,R,T){return function(N){switch(N.length){case 0:return L(N);case 1:return D(N);case 2:return A(N);case 3:return C(N);case 4:return S(N);case 5:return o(N)}var H=R[N.length];return H||(H=R[N.length]=T(N.length)),H(N)}}function M(){for(;l.length<g;)l.push(c(l.length));v.exports=m.apply(void 0,l.concat([l,c]));for(var L=0;L<l.length;++L)v.exports[L]=l[L]}M()},9130:function(v,y,r){var n=r(9660),u=r(9662);v.exports=i;function i(f,g){for(var h=n(f[0],g[0]),b=1;b<f.length;++b)h=u(h,n(f[b],g[b]));return h}},2227:function(v,y,r){var n=r(9660),u=r(9662),i=r(4078),f=r(8289),g=6;function h(S){var o=S===3?c:S===4?l:S===5?m:M;return o(u,i,n,f)}function b(){return 0}function p(){return 0}function E(){return 0}function c(S,o,R,T){function O(N,H,k){var V=R(N[0],N[0]),G=T(V,H[0]),U=T(V,k[0]),Y=R(H[0],H[0]),ee=T(Y,N[0]),re=T(Y,k[0]),ie=R(k[0],k[0]),se=T(ie,N[0]),ce=T(ie,H[0]),q=S(o(ce,re),o(ee,G)),j=o(se,U),Z=o(q,j);return Z[Z.length-1]}return O}function l(S,o,R,T){function O(N,H,k,V){var G=S(R(N[0],N[0]),R(N[1],N[1])),U=T(G,H[0]),Y=T(G,k[0]),ee=T(G,V[0]),re=S(R(H[0],H[0]),R(H[1],H[1])),ie=T(re,N[0]),se=T(re,k[0]),ce=T(re,V[0]),q=S(R(k[0],k[0]),R(k[1],k[1])),j=T(q,N[0]),Z=T(q,H[0]),Q=T(q,V[0]),ue=S(R(V[0],V[0]),R(V[1],V[1])),fe=T(ue,N[0]),te=T(ue,H[0]),ne=T(ue,k[0]),ve=S(S(T(o(ne,Q),H[1]),S(T(o(te,ce),-k[1]),T(o(Z,se),V[1]))),S(T(o(te,ce),N[1]),S(T(o(fe,ee),-H[1]),T(o(ie,U),V[1])))),le=S(S(T(o(ne,Q),N[1]),S(T(o(fe,ee),-k[1]),T(o(j,Y),V[1]))),S(T(o(Z,se),N[1]),S(T(o(j,Y),-H[1]),T(o(ie,U),k[1])))),xe=o(ve,le);return xe[xe.length-1]}return O}function m(S,o,R,T){function O(N,H,k,V,G){var U=S(R(N[0],N[0]),S(R(N[1],N[1]),R(N[2],N[2]))),Y=T(U,H[0]),ee=T(U,k[0]),re=T(U,V[0]),ie=T(U,G[0]),se=S(R(H[0],H[0]),S(R(H[1],H[1]),R(H[2],H[2]))),ce=T(se,N[0]),q=T(se,k[0]),j=T(se,V[0]),Z=T(se,G[0]),Q=S(R(k[0],k[0]),S(R(k[1],k[1]),R(k[2],k[2]))),ue=T(Q,N[0]),fe=T(Q,H[0]),te=T(Q,V[0]),ne=T(Q,G[0]),ve=S(R(V[0],V[0]),S(R(V[1],V[1]),R(V[2],V[2]))),le=T(ve,N[0]),xe=T(ve,H[0]),Se=T(ve,k[0]),Re=T(ve,G[0]),Ee=S(R(G[0],G[0]),S(R(G[1],G[1]),R(G[2],G[2]))),Oe=T(Ee,N[0]),Be=T(Ee,H[0]),Le=T(Ee,k[0]),Te=T(Ee,V[0]),De=S(S(S(T(S(T(o(Te,Re),k[1]),S(T(o(Le,ne),-V[1]),T(o(Se,te),G[1]))),H[2]),S(T(S(T(o(Te,Re),H[1]),S(T(o(Be,Z),-V[1]),T(o(xe,j),G[1]))),-k[2]),T(S(T(o(Le,ne),H[1]),S(T(o(Be,Z),-k[1]),T(o(fe,q),G[1]))),V[2]))),S(T(S(T(o(Se,te),H[1]),S(T(o(xe,j),-k[1]),T(o(fe,q),V[1]))),-G[2]),S(T(S(T(o(Te,Re),H[1]),S(T(o(Be,Z),-V[1]),T(o(xe,j),G[1]))),N[2]),T(S(T(o(Te,Re),N[1]),S(T(o(Oe,ie),-V[1]),T(o(le,re),G[1]))),-H[2])))),S(S(T(S(T(o(Be,Z),N[1]),S(T(o(Oe,ie),-H[1]),T(o(ce,Y),G[1]))),V[2]),S(T(S(T(o(xe,j),N[1]),S(T(o(le,re),-H[1]),T(o(ce,Y),V[1]))),-G[2]),T(S(T(o(Se,te),H[1]),S(T(o(xe,j),-k[1]),T(o(fe,q),V[1]))),N[2]))),S(T(S(T(o(Se,te),N[1]),S(T(o(le,re),-k[1]),T(o(ue,ee),V[1]))),-H[2]),S(T(S(T(o(xe,j),N[1]),S(T(o(le,re),-H[1]),T(o(ce,Y),V[1]))),k[2]),T(S(T(o(fe,q),N[1]),S(T(o(ue,ee),-H[1]),T(o(ce,Y),k[1]))),-V[2]))))),Ve=S(S(S(T(S(T(o(Te,Re),k[1]),S(T(o(Le,ne),-V[1]),T(o(Se,te),G[1]))),N[2]),T(S(T(o(Te,Re),N[1]),S(T(o(Oe,ie),-V[1]),T(o(le,re),G[1]))),-k[2])),S(T(S(T(o(Le,ne),N[1]),S(T(o(Oe,ie),-k[1]),T(o(ue,ee),G[1]))),V[2]),T(S(T(o(Se,te),N[1]),S(T(o(le,re),-k[1]),T(o(ue,ee),V[1]))),-G[2]))),S(S(T(S(T(o(Le,ne),H[1]),S(T(o(Be,Z),-k[1]),T(o(fe,q),G[1]))),N[2]),T(S(T(o(Le,ne),N[1]),S(T(o(Oe,ie),-k[1]),T(o(ue,ee),G[1]))),-H[2])),S(T(S(T(o(Be,Z),N[1]),S(T(o(Oe,ie),-H[1]),T(o(ce,Y),G[1]))),k[2]),T(S(T(o(fe,q),N[1]),S(T(o(ue,ee),-H[1]),T(o(ce,Y),k[1]))),-G[2])))),Ye=o(De,Ve);return Ye[Ye.length-1]}return O}function M(S,o,R,T){function O(N,H,k,V,G,U){var Y=S(S(R(N[0],N[0]),R(N[1],N[1])),S(R(N[2],N[2]),R(N[3],N[3]))),ee=T(Y,H[0]),re=T(Y,k[0]),ie=T(Y,V[0]),se=T(Y,G[0]),ce=T(Y,U[0]),q=S(S(R(H[0],H[0]),R(H[1],H[1])),S(R(H[2],H[2]),R(H[3],H[3]))),j=T(q,N[0]),Z=T(q,k[0]),Q=T(q,V[0]),ue=T(q,G[0]),fe=T(q,U[0]),te=S(S(R(k[0],k[0]),R(k[1],k[1])),S(R(k[2],k[2]),R(k[3],k[3]))),ne=T(te,N[0]),ve=T(te,H[0]),le=T(te,V[0]),xe=T(te,G[0]),Se=T(te,U[0]),Re=S(S(R(V[0],V[0]),R(V[1],V[1])),S(R(V[2],V[2]),R(V[3],V[3]))),Ee=T(Re,N[0]),Oe=T(Re,H[0]),Be=T(Re,k[0]),Le=T(Re,G[0]),Te=T(Re,U[0]),De=S(S(R(G[0],G[0]),R(G[1],G[1])),S(R(G[2],G[2]),R(G[3],G[3]))),Ve=T(De,N[0]),Ye=T(De,H[0]),Ne=T(De,k[0]),Xe=T(De,V[0]),ht=T(De,U[0]),st=S(S(R(U[0],U[0]),R(U[1],U[1])),S(R(U[2],U[2]),R(U[3],U[3]))),it=T(st,N[0]),nt=T(st,H[0]),pt=T(st,k[0]),Tt=T(st,V[0]),Et=T(st,G[0]),Dt=S(S(S(T(S(S(T(S(T(o(Et,ht),V[1]),S(T(o(Tt,Te),-G[1]),T(o(Xe,Le),U[1]))),k[2]),T(S(T(o(Et,ht),k[1]),S(T(o(pt,Se),-G[1]),T(o(Ne,xe),U[1]))),-V[2])),S(T(S(T(o(Tt,Te),k[1]),S(T(o(pt,Se),-V[1]),T(o(Be,le),U[1]))),G[2]),T(S(T(o(Xe,Le),k[1]),S(T(o(Ne,xe),-V[1]),T(o(Be,le),G[1]))),-U[2]))),H[3]),S(T(S(S(T(S(T(o(Et,ht),V[1]),S(T(o(Tt,Te),-G[1]),T(o(Xe,Le),U[1]))),H[2]),T(S(T(o(Et,ht),H[1]),S(T(o(nt,fe),-G[1]),T(o(Ye,ue),U[1]))),-V[2])),S(T(S(T(o(Tt,Te),H[1]),S(T(o(nt,fe),-V[1]),T(o(Oe,Q),U[1]))),G[2]),T(S(T(o(Xe,Le),H[1]),S(T(o(Ye,ue),-V[1]),T(o(Oe,Q),G[1]))),-U[2]))),-k[3]),T(S(S(T(S(T(o(Et,ht),k[1]),S(T(o(pt,Se),-G[1]),T(o(Ne,xe),U[1]))),H[2]),T(S(T(o(Et,ht),H[1]),S(T(o(nt,fe),-G[1]),T(o(Ye,ue),U[1]))),-k[2])),S(T(S(T(o(pt,Se),H[1]),S(T(o(nt,fe),-k[1]),T(o(ve,Z),U[1]))),G[2]),T(S(T(o(Ne,xe),H[1]),S(T(o(Ye,ue),-k[1]),T(o(ve,Z),G[1]))),-U[2]))),V[3]))),S(S(T(S(S(T(S(T(o(Tt,Te),k[1]),S(T(o(pt,Se),-V[1]),T(o(Be,le),U[1]))),H[2]),T(S(T(o(Tt,Te),H[1]),S(T(o(nt,fe),-V[1]),T(o(Oe,Q),U[1]))),-k[2])),S(T(S(T(o(pt,Se),H[1]),S(T(o(nt,fe),-k[1]),T(o(ve,Z),U[1]))),V[2]),T(S(T(o(Be,le),H[1]),S(T(o(Oe,Q),-k[1]),T(o(ve,Z),V[1]))),-U[2]))),-G[3]),T(S(S(T(S(T(o(Xe,Le),k[1]),S(T(o(Ne,xe),-V[1]),T(o(Be,le),G[1]))),H[2]),T(S(T(o(Xe,Le),H[1]),S(T(o(Ye,ue),-V[1]),T(o(Oe,Q),G[1]))),-k[2])),S(T(S(T(o(Ne,xe),H[1]),S(T(o(Ye,ue),-k[1]),T(o(ve,Z),G[1]))),V[2]),T(S(T(o(Be,le),H[1]),S(T(o(Oe,Q),-k[1]),T(o(ve,Z),V[1]))),-G[2]))),U[3])),S(T(S(S(T(S(T(o(Et,ht),V[1]),S(T(o(Tt,Te),-G[1]),T(o(Xe,Le),U[1]))),H[2]),T(S(T(o(Et,ht),H[1]),S(T(o(nt,fe),-G[1]),T(o(Ye,ue),U[1]))),-V[2])),S(T(S(T(o(Tt,Te),H[1]),S(T(o(nt,fe),-V[1]),T(o(Oe,Q),U[1]))),G[2]),T(S(T(o(Xe,Le),H[1]),S(T(o(Ye,ue),-V[1]),T(o(Oe,Q),G[1]))),-U[2]))),N[3]),T(S(S(T(S(T(o(Et,ht),V[1]),S(T(o(Tt,Te),-G[1]),T(o(Xe,Le),U[1]))),N[2]),T(S(T(o(Et,ht),N[1]),S(T(o(it,ce),-G[1]),T(o(Ve,se),U[1]))),-V[2])),S(T(S(T(o(Tt,Te),N[1]),S(T(o(it,ce),-V[1]),T(o(Ee,ie),U[1]))),G[2]),T(S(T(o(Xe,Le),N[1]),S(T(o(Ve,se),-V[1]),T(o(Ee,ie),G[1]))),-U[2]))),-H[3])))),S(S(S(T(S(S(T(S(T(o(Et,ht),H[1]),S(T(o(nt,fe),-G[1]),T(o(Ye,ue),U[1]))),N[2]),T(S(T(o(Et,ht),N[1]),S(T(o(it,ce),-G[1]),T(o(Ve,se),U[1]))),-H[2])),S(T(S(T(o(nt,fe),N[1]),S(T(o(it,ce),-H[1]),T(o(j,ee),U[1]))),G[2]),T(S(T(o(Ye,ue),N[1]),S(T(o(Ve,se),-H[1]),T(o(j,ee),G[1]))),-U[2]))),V[3]),T(S(S(T(S(T(o(Tt,Te),H[1]),S(T(o(nt,fe),-V[1]),T(o(Oe,Q),U[1]))),N[2]),T(S(T(o(Tt,Te),N[1]),S(T(o(it,ce),-V[1]),T(o(Ee,ie),U[1]))),-H[2])),S(T(S(T(o(nt,fe),N[1]),S(T(o(it,ce),-H[1]),T(o(j,ee),U[1]))),V[2]),T(S(T(o(Oe,Q),N[1]),S(T(o(Ee,ie),-H[1]),T(o(j,ee),V[1]))),-U[2]))),-G[3])),S(T(S(S(T(S(T(o(Xe,Le),H[1]),S(T(o(Ye,ue),-V[1]),T(o(Oe,Q),G[1]))),N[2]),T(S(T(o(Xe,Le),N[1]),S(T(o(Ve,se),-V[1]),T(o(Ee,ie),G[1]))),-H[2])),S(T(S(T(o(Ye,ue),N[1]),S(T(o(Ve,se),-H[1]),T(o(j,ee),G[1]))),V[2]),T(S(T(o(Oe,Q),N[1]),S(T(o(Ee,ie),-H[1]),T(o(j,ee),V[1]))),-G[2]))),U[3]),T(S(S(T(S(T(o(Tt,Te),k[1]),S(T(o(pt,Se),-V[1]),T(o(Be,le),U[1]))),H[2]),T(S(T(o(Tt,Te),H[1]),S(T(o(nt,fe),-V[1]),T(o(Oe,Q),U[1]))),-k[2])),S(T(S(T(o(pt,Se),H[1]),S(T(o(nt,fe),-k[1]),T(o(ve,Z),U[1]))),V[2]),T(S(T(o(Be,le),H[1]),S(T(o(Oe,Q),-k[1]),T(o(ve,Z),V[1]))),-U[2]))),N[3]))),S(S(T(S(S(T(S(T(o(Tt,Te),k[1]),S(T(o(pt,Se),-V[1]),T(o(Be,le),U[1]))),N[2]),T(S(T(o(Tt,Te),N[1]),S(T(o(it,ce),-V[1]),T(o(Ee,ie),U[1]))),-k[2])),S(T(S(T(o(pt,Se),N[1]),S(T(o(it,ce),-k[1]),T(o(ne,re),U[1]))),V[2]),T(S(T(o(Be,le),N[1]),S(T(o(Ee,ie),-k[1]),T(o(ne,re),V[1]))),-U[2]))),-H[3]),T(S(S(T(S(T(o(Tt,Te),H[1]),S(T(o(nt,fe),-V[1]),T(o(Oe,Q),U[1]))),N[2]),T(S(T(o(Tt,Te),N[1]),S(T(o(it,ce),-V[1]),T(o(Ee,ie),U[1]))),-H[2])),S(T(S(T(o(nt,fe),N[1]),S(T(o(it,ce),-H[1]),T(o(j,ee),U[1]))),V[2]),T(S(T(o(Oe,Q),N[1]),S(T(o(Ee,ie),-H[1]),T(o(j,ee),V[1]))),-U[2]))),k[3])),S(T(S(S(T(S(T(o(pt,Se),H[1]),S(T(o(nt,fe),-k[1]),T(o(ve,Z),U[1]))),N[2]),T(S(T(o(pt,Se),N[1]),S(T(o(it,ce),-k[1]),T(o(ne,re),U[1]))),-H[2])),S(T(S(T(o(nt,fe),N[1]),S(T(o(it,ce),-H[1]),T(o(j,ee),U[1]))),k[2]),T(S(T(o(ve,Z),N[1]),S(T(o(ne,re),-H[1]),T(o(j,ee),k[1]))),-U[2]))),-V[3]),T(S(S(T(S(T(o(Be,le),H[1]),S(T(o(Oe,Q),-k[1]),T(o(ve,Z),V[1]))),N[2]),T(S(T(o(Be,le),N[1]),S(T(o(Ee,ie),-k[1]),T(o(ne,re),V[1]))),-H[2])),S(T(S(T(o(Oe,Q),N[1]),S(T(o(Ee,ie),-H[1]),T(o(j,ee),V[1]))),k[2]),T(S(T(o(ve,Z),N[1]),S(T(o(ne,re),-H[1]),T(o(j,ee),k[1]))),-V[2]))),U[3]))))),et=S(S(S(T(S(S(T(S(T(o(Et,ht),V[1]),S(T(o(Tt,Te),-G[1]),T(o(Xe,Le),U[1]))),k[2]),T(S(T(o(Et,ht),k[1]),S(T(o(pt,Se),-G[1]),T(o(Ne,xe),U[1]))),-V[2])),S(T(S(T(o(Tt,Te),k[1]),S(T(o(pt,Se),-V[1]),T(o(Be,le),U[1]))),G[2]),T(S(T(o(Xe,Le),k[1]),S(T(o(Ne,xe),-V[1]),T(o(Be,le),G[1]))),-U[2]))),N[3]),S(T(S(S(T(S(T(o(Et,ht),V[1]),S(T(o(Tt,Te),-G[1]),T(o(Xe,Le),U[1]))),N[2]),T(S(T(o(Et,ht),N[1]),S(T(o(it,ce),-G[1]),T(o(Ve,se),U[1]))),-V[2])),S(T(S(T(o(Tt,Te),N[1]),S(T(o(it,ce),-V[1]),T(o(Ee,ie),U[1]))),G[2]),T(S(T(o(Xe,Le),N[1]),S(T(o(Ve,se),-V[1]),T(o(Ee,ie),G[1]))),-U[2]))),-k[3]),T(S(S(T(S(T(o(Et,ht),k[1]),S(T(o(pt,Se),-G[1]),T(o(Ne,xe),U[1]))),N[2]),T(S(T(o(Et,ht),N[1]),S(T(o(it,ce),-G[1]),T(o(Ve,se),U[1]))),-k[2])),S(T(S(T(o(pt,Se),N[1]),S(T(o(it,ce),-k[1]),T(o(ne,re),U[1]))),G[2]),T(S(T(o(Ne,xe),N[1]),S(T(o(Ve,se),-k[1]),T(o(ne,re),G[1]))),-U[2]))),V[3]))),S(S(T(S(S(T(S(T(o(Tt,Te),k[1]),S(T(o(pt,Se),-V[1]),T(o(Be,le),U[1]))),N[2]),T(S(T(o(Tt,Te),N[1]),S(T(o(it,ce),-V[1]),T(o(Ee,ie),U[1]))),-k[2])),S(T(S(T(o(pt,Se),N[1]),S(T(o(it,ce),-k[1]),T(o(ne,re),U[1]))),V[2]),T(S(T(o(Be,le),N[1]),S(T(o(Ee,ie),-k[1]),T(o(ne,re),V[1]))),-U[2]))),-G[3]),T(S(S(T(S(T(o(Xe,Le),k[1]),S(T(o(Ne,xe),-V[1]),T(o(Be,le),G[1]))),N[2]),T(S(T(o(Xe,Le),N[1]),S(T(o(Ve,se),-V[1]),T(o(Ee,ie),G[1]))),-k[2])),S(T(S(T(o(Ne,xe),N[1]),S(T(o(Ve,se),-k[1]),T(o(ne,re),G[1]))),V[2]),T(S(T(o(Be,le),N[1]),S(T(o(Ee,ie),-k[1]),T(o(ne,re),V[1]))),-G[2]))),U[3])),S(T(S(S(T(S(T(o(Et,ht),k[1]),S(T(o(pt,Se),-G[1]),T(o(Ne,xe),U[1]))),H[2]),T(S(T(o(Et,ht),H[1]),S(T(o(nt,fe),-G[1]),T(o(Ye,ue),U[1]))),-k[2])),S(T(S(T(o(pt,Se),H[1]),S(T(o(nt,fe),-k[1]),T(o(ve,Z),U[1]))),G[2]),T(S(T(o(Ne,xe),H[1]),S(T(o(Ye,ue),-k[1]),T(o(ve,Z),G[1]))),-U[2]))),N[3]),T(S(S(T(S(T(o(Et,ht),k[1]),S(T(o(pt,Se),-G[1]),T(o(Ne,xe),U[1]))),N[2]),T(S(T(o(Et,ht),N[1]),S(T(o(it,ce),-G[1]),T(o(Ve,se),U[1]))),-k[2])),S(T(S(T(o(pt,Se),N[1]),S(T(o(it,ce),-k[1]),T(o(ne,re),U[1]))),G[2]),T(S(T(o(Ne,xe),N[1]),S(T(o(Ve,se),-k[1]),T(o(ne,re),G[1]))),-U[2]))),-H[3])))),S(S(S(T(S(S(T(S(T(o(Et,ht),H[1]),S(T(o(nt,fe),-G[1]),T(o(Ye,ue),U[1]))),N[2]),T(S(T(o(Et,ht),N[1]),S(T(o(it,ce),-G[1]),T(o(Ve,se),U[1]))),-H[2])),S(T(S(T(o(nt,fe),N[1]),S(T(o(it,ce),-H[1]),T(o(j,ee),U[1]))),G[2]),T(S(T(o(Ye,ue),N[1]),S(T(o(Ve,se),-H[1]),T(o(j,ee),G[1]))),-U[2]))),k[3]),T(S(S(T(S(T(o(pt,Se),H[1]),S(T(o(nt,fe),-k[1]),T(o(ve,Z),U[1]))),N[2]),T(S(T(o(pt,Se),N[1]),S(T(o(it,ce),-k[1]),T(o(ne,re),U[1]))),-H[2])),S(T(S(T(o(nt,fe),N[1]),S(T(o(it,ce),-H[1]),T(o(j,ee),U[1]))),k[2]),T(S(T(o(ve,Z),N[1]),S(T(o(ne,re),-H[1]),T(o(j,ee),k[1]))),-U[2]))),-G[3])),S(T(S(S(T(S(T(o(Ne,xe),H[1]),S(T(o(Ye,ue),-k[1]),T(o(ve,Z),G[1]))),N[2]),T(S(T(o(Ne,xe),N[1]),S(T(o(Ve,se),-k[1]),T(o(ne,re),G[1]))),-H[2])),S(T(S(T(o(Ye,ue),N[1]),S(T(o(Ve,se),-H[1]),T(o(j,ee),G[1]))),k[2]),T(S(T(o(ve,Z),N[1]),S(T(o(ne,re),-H[1]),T(o(j,ee),k[1]))),-G[2]))),U[3]),T(S(S(T(S(T(o(Xe,Le),k[1]),S(T(o(Ne,xe),-V[1]),T(o(Be,le),G[1]))),H[2]),T(S(T(o(Xe,Le),H[1]),S(T(o(Ye,ue),-V[1]),T(o(Oe,Q),G[1]))),-k[2])),S(T(S(T(o(Ne,xe),H[1]),S(T(o(Ye,ue),-k[1]),T(o(ve,Z),G[1]))),V[2]),T(S(T(o(Be,le),H[1]),S(T(o(Oe,Q),-k[1]),T(o(ve,Z),V[1]))),-G[2]))),N[3]))),S(S(T(S(S(T(S(T(o(Xe,Le),k[1]),S(T(o(Ne,xe),-V[1]),T(o(Be,le),G[1]))),N[2]),T(S(T(o(Xe,Le),N[1]),S(T(o(Ve,se),-V[1]),T(o(Ee,ie),G[1]))),-k[2])),S(T(S(T(o(Ne,xe),N[1]),S(T(o(Ve,se),-k[1]),T(o(ne,re),G[1]))),V[2]),T(S(T(o(Be,le),N[1]),S(T(o(Ee,ie),-k[1]),T(o(ne,re),V[1]))),-G[2]))),-H[3]),T(S(S(T(S(T(o(Xe,Le),H[1]),S(T(o(Ye,ue),-V[1]),T(o(Oe,Q),G[1]))),N[2]),T(S(T(o(Xe,Le),N[1]),S(T(o(Ve,se),-V[1]),T(o(Ee,ie),G[1]))),-H[2])),S(T(S(T(o(Ye,ue),N[1]),S(T(o(Ve,se),-H[1]),T(o(j,ee),G[1]))),V[2]),T(S(T(o(Oe,Q),N[1]),S(T(o(Ee,ie),-H[1]),T(o(j,ee),V[1]))),-G[2]))),k[3])),S(T(S(S(T(S(T(o(Ne,xe),H[1]),S(T(o(Ye,ue),-k[1]),T(o(ve,Z),G[1]))),N[2]),T(S(T(o(Ne,xe),N[1]),S(T(o(Ve,se),-k[1]),T(o(ne,re),G[1]))),-H[2])),S(T(S(T(o(Ye,ue),N[1]),S(T(o(Ve,se),-H[1]),T(o(j,ee),G[1]))),k[2]),T(S(T(o(ve,Z),N[1]),S(T(o(ne,re),-H[1]),T(o(j,ee),k[1]))),-G[2]))),-V[3]),T(S(S(T(S(T(o(Be,le),H[1]),S(T(o(Oe,Q),-k[1]),T(o(ve,Z),V[1]))),N[2]),T(S(T(o(Be,le),N[1]),S(T(o(Ee,ie),-k[1]),T(o(ne,re),V[1]))),-H[2])),S(T(S(T(o(Oe,Q),N[1]),S(T(o(Ee,ie),-H[1]),T(o(j,ee),V[1]))),k[2]),T(S(T(o(ve,Z),N[1]),S(T(o(ne,re),-H[1]),T(o(j,ee),k[1]))),-V[2]))),G[3]))))),Ue=o(Dt,et);return Ue[Ue.length-1]}return O}var L=[b,p,E];function D(S){var o=L[S.length];return o||(o=L[S.length]=h(S.length)),o.apply(void 0,S)}function A(S,o,R,T,O,N,H,k){function V(G,U,Y,ee,re,ie){switch(arguments.length){case 0:case 1:return 0;case 2:return T(G,U);case 3:return O(G,U,Y);case 4:return N(G,U,Y,ee);case 5:return H(G,U,Y,ee,re);case 6:return k(G,U,Y,ee,re,ie)}for(var se=new Array(arguments.length),ce=0;ce<arguments.length;++ce)se[ce]=arguments[ce];return S(se)}return V}function C(){for(;L.length<=g;)L.push(h(L.length));v.exports=A.apply(void 0,[D].concat(L));for(var S=0;S<=g;++S)v.exports[S]=L[S]}C()},6606:function(v,y,r){var n=r(8167),u=6;function i(L){var D=L===2?h:L===3?b:L===4?p:L===5?E:c;return L<6?D(n[L]):D(n)}function f(){return[[0]]}function g(L,D){return[[D[0]],[L[0][0]]]}function h(L){return function(A,C){return[L([[+C[0],+A[0][1]],[+C[1],+A[1][1]]]),L([[+A[0][0],+C[0]],[+A[1][0],+C[1]]]),L(A)]}}function b(L){return function(A,C){return[L([[+C[0],+A[0][1],+A[0][2]],[+C[1],+A[1][1],+A[1][2]],[+C[2],+A[2][1],+A[2][2]]]),L([[+A[0][0],+C[0],+A[0][2]],[+A[1][0],+C[1],+A[1][2]],[+A[2][0],+C[2],+A[2][2]]]),L([[+A[0][0],+A[0][1],+C[0]],[+A[1][0],+A[1][1],+C[1]],[+A[2][0],+A[2][1],+C[2]]]),L(A)]}}function p(L){return function(A,C){return[L([[+C[0],+A[0][1],+A[0][2],+A[0][3]],[+C[1],+A[1][1],+A[1][2],+A[1][3]],[+C[2],+A[2][1],+A[2][2],+A[2][3]],[+C[3],+A[3][1],+A[3][2],+A[3][3]]]),L([[+A[0][0],+C[0],+A[0][2],+A[0][3]],[+A[1][0],+C[1],+A[1][2],+A[1][3]],[+A[2][0],+C[2],+A[2][2],+A[2][3]],[+A[3][0],+C[3],+A[3][2],+A[3][3]]]),L([[+A[0][0],+A[0][1],+C[0],+A[0][3]],[+A[1][0],+A[1][1],+C[1],+A[1][3]],[+A[2][0],+A[2][1],+C[2],+A[2][3]],[+A[3][0],+A[3][1],+C[3],+A[3][3]]]),L([[+A[0][0],+A[0][1],+A[0][2],+C[0]],[+A[1][0],+A[1][1],+A[1][2],+C[1]],[+A[2][0],+A[2][1],+A[2][2],+C[2]],[+A[3][0],+A[3][1],+A[3][2],+C[3]]]),L(A)]}}function E(L){return function(A,C){return[L([[+C[0],+A[0][1],+A[0][2],+A[0][3],+A[0][4]],[+C[1],+A[1][1],+A[1][2],+A[1][3],+A[1][4]],[+C[2],+A[2][1],+A[2][2],+A[2][3],+A[2][4]],[+C[3],+A[3][1],+A[3][2],+A[3][3],+A[3][4]],[+C[4],+A[4][1],+A[4][2],+A[4][3],+A[4][4]]]),L([[+A[0][0],+C[0],+A[0][2],+A[0][3],+A[0][4]],[+A[1][0],+C[1],+A[1][2],+A[1][3],+A[1][4]],[+A[2][0],+C[2],+A[2][2],+A[2][3],+A[2][4]],[+A[3][0],+C[3],+A[3][2],+A[3][3],+A[3][4]],[+A[4][0],+C[4],+A[4][2],+A[4][3],+A[4][4]]]),L([[+A[0][0],+A[0][1],+C[0],+A[0][3],+A[0][4]],[+A[1][0],+A[1][1],+C[1],+A[1][3],+A[1][4]],[+A[2][0],+A[2][1],+C[2],+A[2][3],+A[2][4]],[+A[3][0],+A[3][1],+C[3],+A[3][3],+A[3][4]],[+A[4][0],+A[4][1],+C[4],+A[4][3],+A[4][4]]]),L([[+A[0][0],+A[0][1],+A[0][2],+C[0],+A[0][4]],[+A[1][0],+A[1][1],+A[1][2],+C[1],+A[1][4]],[+A[2][0],+A[2][1],+A[2][2],+C[2],+A[2][4]],[+A[3][0],+A[3][1],+A[3][2],+C[3],+A[3][4]],[+A[4][0],+A[4][1],+A[4][2],+C[4],+A[4][4]]]),L([[+A[0][0],+A[0][1],+A[0][2],+A[0][3],+C[0]],[+A[1][0],+A[1][1],+A[1][2],+A[1][3],+C[1]],[+A[2][0],+A[2][1],+A[2][2],+A[2][3],+C[2]],[+A[3][0],+A[3][1],+A[3][2],+A[3][3],+C[3]],[+A[4][0],+A[4][1],+A[4][2],+A[4][3],+C[4]]]),L(A)]}}function c(L){return function(A,C){return[L([[+C[0],+A[0][1],+A[0][2],+A[0][3],+A[0][4],+A[0][5]],[+C[1],+A[1][1],+A[1][2],+A[1][3],+A[1][4],+A[1][5]],[+C[2],+A[2][1],+A[2][2],+A[2][3],+A[2][4],+A[2][5]],[+C[3],+A[3][1],+A[3][2],+A[3][3],+A[3][4],+A[3][5]],[+C[4],+A[4][1],+A[4][2],+A[4][3],+A[4][4],+A[4][5]],[+C[5],+A[5][1],+A[5][2],+A[5][3],+A[5][4],+A[5][5]]]),L([[+A[0][0],+C[0],+A[0][2],+A[0][3],+A[0][4],+A[0][5]],[+A[1][0],+C[1],+A[1][2],+A[1][3],+A[1][4],+A[1][5]],[+A[2][0],+C[2],+A[2][2],+A[2][3],+A[2][4],+A[2][5]],[+A[3][0],+C[3],+A[3][2],+A[3][3],+A[3][4],+A[3][5]],[+A[4][0],+C[4],+A[4][2],+A[4][3],+A[4][4],+A[4][5]],[+A[5][0],+C[5],+A[5][2],+A[5][3],+A[5][4],+A[5][5]]]),L([[+A[0][0],+A[0][1],+C[0],+A[0][3],+A[0][4],+A[0][5]],[+A[1][0],+A[1][1],+C[1],+A[1][3],+A[1][4],+A[1][5]],[+A[2][0],+A[2][1],+C[2],+A[2][3],+A[2][4],+A[2][5]],[+A[3][0],+A[3][1],+C[3],+A[3][3],+A[3][4],+A[3][5]],[+A[4][0],+A[4][1],+C[4],+A[4][3],+A[4][4],+A[4][5]],[+A[5][0],+A[5][1],+C[5],+A[5][3],+A[5][4],+A[5][5]]]),L([[+A[0][0],+A[0][1],+A[0][2],+C[0],+A[0][4],+A[0][5]],[+A[1][0],+A[1][1],+A[1][2],+C[1],+A[1][4],+A[1][5]],[+A[2][0],+A[2][1],+A[2][2],+C[2],+A[2][4],+A[2][5]],[+A[3][0],+A[3][1],+A[3][2],+C[3],+A[3][4],+A[3][5]],[+A[4][0],+A[4][1],+A[4][2],+C[4],+A[4][4],+A[4][5]],[+A[5][0],+A[5][1],+A[5][2],+C[5],+A[5][4],+A[5][5]]]),L([[+A[0][0],+A[0][1],+A[0][2],+A[0][3],+C[0],+A[0][5]],[+A[1][0],+A[1][1],+A[1][2],+A[1][3],+C[1],+A[1][5]],[+A[2][0],+A[2][1],+A[2][2],+A[2][3],+C[2],+A[2][5]],[+A[3][0],+A[3][1],+A[3][2],+A[3][3],+C[3],+A[3][5]],[+A[4][0],+A[4][1],+A[4][2],+A[4][3],+C[4],+A[4][5]],[+A[5][0],+A[5][1],+A[5][2],+A[5][3],+C[5],+A[5][5]]]),L([[+A[0][0],+A[0][1],+A[0][2],+A[0][3],+A[0][4],+C[0]],[+A[1][0],+A[1][1],+A[1][2],+A[1][3],+A[1][4],+C[1]],[+A[2][0],+A[2][1],+A[2][2],+A[2][3],+A[2][4],+C[2]],[+A[3][0],+A[3][1],+A[3][2],+A[3][3],+A[3][4],+C[3]],[+A[4][0],+A[4][1],+A[4][2],+A[4][3],+A[4][4],+C[4]],[+A[5][0],+A[5][1],+A[5][2],+A[5][3],+A[5][4],+C[5]]]),L(A)]}}var l=[f,g];function m(L,D,A,C,S,o,R,T){return function(N,H){switch(N.length){case 0:return L(N,H);case 1:return D(N,H);case 2:return A(N,H);case 3:return C(N,H);case 4:return S(N,H);case 5:return o(N,H)}var k=R[N.length];return k||(k=R[N.length]=T(N.length)),k(N,H)}}function M(){for(;l.length<u;)l.push(i(l.length));v.exports=m.apply(void 0,l.concat([l,i]));for(var L=0;L<u;++L)v.exports[L]=l[L]}M()},417:function(v,y,r){var n=r(9660),u=r(9662),i=r(8289),f=r(4078),g=5,h=11102230246251565e-32,b=(3+16*h)*h,p=(7+56*h)*h;function E(o,R,T,O){return function(H,k,V){var G=o(o(R(k[1],V[0]),R(-V[1],k[0])),o(R(H[1],k[0]),R(-k[1],H[0]))),U=o(R(H[1],V[0]),R(-V[1],H[0])),Y=O(G,U);return Y[Y.length-1]}}function c(o,R,T,O){return function(H,k,V,G){var U=o(o(T(o(R(V[1],G[0]),R(-G[1],V[0])),k[2]),o(T(o(R(k[1],G[0]),R(-G[1],k[0])),-V[2]),T(o(R(k[1],V[0]),R(-V[1],k[0])),G[2]))),o(T(o(R(k[1],G[0]),R(-G[1],k[0])),H[2]),o(T(o(R(H[1],G[0]),R(-G[1],H[0])),-k[2]),T(o(R(H[1],k[0]),R(-k[1],H[0])),G[2])))),Y=o(o(T(o(R(V[1],G[0]),R(-G[1],V[0])),H[2]),o(T(o(R(H[1],G[0]),R(-G[1],H[0])),-V[2]),T(o(R(H[1],V[0]),R(-V[1],H[0])),G[2]))),o(T(o(R(k[1],V[0]),R(-V[1],k[0])),H[2]),o(T(o(R(H[1],V[0]),R(-V[1],H[0])),-k[2]),T(o(R(H[1],k[0]),R(-k[1],H[0])),V[2])))),ee=O(U,Y);return ee[ee.length-1]}}function l(o,R,T,O){return function(H,k,V,G,U){var Y=o(o(o(T(o(T(o(R(G[1],U[0]),R(-U[1],G[0])),V[2]),o(T(o(R(V[1],U[0]),R(-U[1],V[0])),-G[2]),T(o(R(V[1],G[0]),R(-G[1],V[0])),U[2]))),k[3]),o(T(o(T(o(R(G[1],U[0]),R(-U[1],G[0])),k[2]),o(T(o(R(k[1],U[0]),R(-U[1],k[0])),-G[2]),T(o(R(k[1],G[0]),R(-G[1],k[0])),U[2]))),-V[3]),T(o(T(o(R(V[1],U[0]),R(-U[1],V[0])),k[2]),o(T(o(R(k[1],U[0]),R(-U[1],k[0])),-V[2]),T(o(R(k[1],V[0]),R(-V[1],k[0])),U[2]))),G[3]))),o(T(o(T(o(R(V[1],G[0]),R(-G[1],V[0])),k[2]),o(T(o(R(k[1],G[0]),R(-G[1],k[0])),-V[2]),T(o(R(k[1],V[0]),R(-V[1],k[0])),G[2]))),-U[3]),o(T(o(T(o(R(G[1],U[0]),R(-U[1],G[0])),k[2]),o(T(o(R(k[1],U[0]),R(-U[1],k[0])),-G[2]),T(o(R(k[1],G[0]),R(-G[1],k[0])),U[2]))),H[3]),T(o(T(o(R(G[1],U[0]),R(-U[1],G[0])),H[2]),o(T(o(R(H[1],U[0]),R(-U[1],H[0])),-G[2]),T(o(R(H[1],G[0]),R(-G[1],H[0])),U[2]))),-k[3])))),o(o(T(o(T(o(R(k[1],U[0]),R(-U[1],k[0])),H[2]),o(T(o(R(H[1],U[0]),R(-U[1],H[0])),-k[2]),T(o(R(H[1],k[0]),R(-k[1],H[0])),U[2]))),G[3]),o(T(o(T(o(R(k[1],G[0]),R(-G[1],k[0])),H[2]),o(T(o(R(H[1],G[0]),R(-G[1],H[0])),-k[2]),T(o(R(H[1],k[0]),R(-k[1],H[0])),G[2]))),-U[3]),T(o(T(o(R(V[1],G[0]),R(-G[1],V[0])),k[2]),o(T(o(R(k[1],G[0]),R(-G[1],k[0])),-V[2]),T(o(R(k[1],V[0]),R(-V[1],k[0])),G[2]))),H[3]))),o(T(o(T(o(R(V[1],G[0]),R(-G[1],V[0])),H[2]),o(T(o(R(H[1],G[0]),R(-G[1],H[0])),-V[2]),T(o(R(H[1],V[0]),R(-V[1],H[0])),G[2]))),-k[3]),o(T(o(T(o(R(k[1],G[0]),R(-G[1],k[0])),H[2]),o(T(o(R(H[1],G[0]),R(-G[1],H[0])),-k[2]),T(o(R(H[1],k[0]),R(-k[1],H[0])),G[2]))),V[3]),T(o(T(o(R(k[1],V[0]),R(-V[1],k[0])),H[2]),o(T(o(R(H[1],V[0]),R(-V[1],H[0])),-k[2]),T(o(R(H[1],k[0]),R(-k[1],H[0])),V[2]))),-G[3]))))),ee=o(o(o(T(o(T(o(R(G[1],U[0]),R(-U[1],G[0])),V[2]),o(T(o(R(V[1],U[0]),R(-U[1],V[0])),-G[2]),T(o(R(V[1],G[0]),R(-G[1],V[0])),U[2]))),H[3]),T(o(T(o(R(G[1],U[0]),R(-U[1],G[0])),H[2]),o(T(o(R(H[1],U[0]),R(-U[1],H[0])),-G[2]),T(o(R(H[1],G[0]),R(-G[1],H[0])),U[2]))),-V[3])),o(T(o(T(o(R(V[1],U[0]),R(-U[1],V[0])),H[2]),o(T(o(R(H[1],U[0]),R(-U[1],H[0])),-V[2]),T(o(R(H[1],V[0]),R(-V[1],H[0])),U[2]))),G[3]),T(o(T(o(R(V[1],G[0]),R(-G[1],V[0])),H[2]),o(T(o(R(H[1],G[0]),R(-G[1],H[0])),-V[2]),T(o(R(H[1],V[0]),R(-V[1],H[0])),G[2]))),-U[3]))),o(o(T(o(T(o(R(V[1],U[0]),R(-U[1],V[0])),k[2]),o(T(o(R(k[1],U[0]),R(-U[1],k[0])),-V[2]),T(o(R(k[1],V[0]),R(-V[1],k[0])),U[2]))),H[3]),T(o(T(o(R(V[1],U[0]),R(-U[1],V[0])),H[2]),o(T(o(R(H[1],U[0]),R(-U[1],H[0])),-V[2]),T(o(R(H[1],V[0]),R(-V[1],H[0])),U[2]))),-k[3])),o(T(o(T(o(R(k[1],U[0]),R(-U[1],k[0])),H[2]),o(T(o(R(H[1],U[0]),R(-U[1],H[0])),-k[2]),T(o(R(H[1],k[0]),R(-k[1],H[0])),U[2]))),V[3]),T(o(T(o(R(k[1],V[0]),R(-V[1],k[0])),H[2]),o(T(o(R(H[1],V[0]),R(-V[1],H[0])),-k[2]),T(o(R(H[1],k[0]),R(-k[1],H[0])),V[2]))),-U[3])))),re=O(Y,ee);return re[re.length-1]}}function m(o){var R=o===3?E:o===4?c:l;return R(u,n,i,f)}var M=m(3),L=m(4),D=[function(){return 0},function(){return 0},function(R,T){return T[0]-R[0]},function(R,T,O){var N=(R[1]-O[1])*(T[0]-O[0]),H=(R[0]-O[0])*(T[1]-O[1]),k=N-H,V;if(N>0){if(H<=0)return k;V=N+H}else if(N<0){if(H>=0)return k;V=-(N+H)}else return k;var G=b*V;return k>=G||k<=-G?k:M(R,T,O)},function(R,T,O,N){var H=R[0]-N[0],k=T[0]-N[0],V=O[0]-N[0],G=R[1]-N[1],U=T[1]-N[1],Y=O[1]-N[1],ee=R[2]-N[2],re=T[2]-N[2],ie=O[2]-N[2],se=k*Y,ce=V*U,q=V*G,j=H*Y,Z=H*U,Q=k*G,ue=ee*(se-ce)+re*(q-j)+ie*(Z-Q),fe=(Math.abs(se)+Math.abs(ce))*Math.abs(ee)+(Math.abs(q)+Math.abs(j))*Math.abs(re)+(Math.abs(Z)+Math.abs(Q))*Math.abs(ie),te=p*fe;return ue>te||-ue>te?ue:L(R,T,O,N)}];function A(o){var R=D[o.length];return R||(R=D[o.length]=m(o.length)),R.apply(void 0,o)}function C(o,R,T,O,N,H,k){return function(G,U,Y,ee,re){switch(arguments.length){case 0:case 1:return 0;case 2:return O(G,U);case 3:return N(G,U,Y);case 4:return H(G,U,Y,ee);case 5:return k(G,U,Y,ee,re)}for(var ie=new Array(arguments.length),se=0;se<arguments.length;++se)ie[se]=arguments[se];return o(ie)}}function S(){for(;D.length<=g;)D.push(m(D.length));v.exports=C.apply(void 0,[A].concat(D));for(var o=0;o<=g;++o)v.exports[o]=D[o]}S()},2019:function(v,y,r){var n=r(9662),u=r(8289);v.exports=i;function i(f,g){if(f.length===1)return u(g,f[0]);if(g.length===1)return u(f,g[0]);if(f.length===0||g.length===0)return[0];var h=[0];if(f.length<g.length)for(var b=0;b<f.length;++b)h=n(h,u(g,f[b]));else for(var b=0;b<g.length;++b)h=n(h,u(f,g[b]));return h}},8289:function(v,y,r){var n=r(9660),u=r(87);v.exports=i;function i(f,g){var h=f.length;if(h===1){var b=n(f[0],g);return b[0]?b:[b[1]]}var p=new Array(2*h),E=[.1,.1],c=[.1,.1],l=0;n(f[0],g,E),E[0]&&(p[l++]=E[0]);for(var m=1;m<h;++m){n(f[m],g,c);var M=E[1];u(M,c[0],E),E[0]&&(p[l++]=E[0]);var L=c[1],D=E[1],A=L+D,C=A-L,S=D-C;E[1]=A,S&&(p[l++]=S)}return E[1]&&(p[l++]=E[1]),l===0&&(p[l++]=0),p.length=l,p}},4434:function(v,y,r){v.exports=i;var n=r(417)[3];function u(f,g,h,b){for(var p=0;p<2;++p){var E=f[p],c=g[p],l=Math.min(E,c),m=Math.max(E,c),M=h[p],L=b[p],D=Math.min(M,L),A=Math.max(M,L);if(A<l||m<D)return!1}return!0}function i(f,g,h,b){var p=n(f,h,b),E=n(g,h,b);if(p>0&&E>0||p<0&&E<0)return!1;var c=n(h,f,g),l=n(b,f,g);return c>0&&l>0||c<0&&l<0?!1:p===0&&E===0&&c===0&&l===0?u(f,g,h,b):!0}},4078:function(v){v.exports=r;function y(n,u){var i=n+u,f=i-n,g=i-f,h=u-f,b=n-g,p=b+h;return p?[p,i]:[i]}function r(n,u){var i=n.length|0,f=u.length|0;if(i===1&&f===1)return y(n[0],-u[0]);var g=i+f,h=new Array(g),b=0,p=0,E=0,c=Math.abs,l=n[p],m=c(l),M=-u[E],L=c(M),D,A;m<L?(A=l,p+=1,p<i&&(l=n[p],m=c(l))):(A=M,E+=1,E<f&&(M=-u[E],L=c(M))),p<i&&m<L||E>=f?(D=l,p+=1,p<i&&(l=n[p],m=c(l))):(D=M,E+=1,E<f&&(M=-u[E],L=c(M)));for(var C=D+A,S=C-D,o=A-S,R=o,T=C,O,N,H,k,V;p<i&&E<f;)m<L?(D=l,p+=1,p<i&&(l=n[p],m=c(l))):(D=M,E+=1,E<f&&(M=-u[E],L=c(M))),A=R,C=D+A,S=C-D,o=A-S,o&&(h[b++]=o),O=T+C,N=O-T,H=O-N,k=C-N,V=T-H,R=V+k,T=O;for(;p<i;)D=l,A=R,C=D+A,S=C-D,o=A-S,o&&(h[b++]=o),O=T+C,N=O-T,H=O-N,k=C-N,V=T-H,R=V+k,T=O,p+=1,p<i&&(l=n[p]);for(;E<f;)D=M,A=R,C=D+A,S=C-D,o=A-S,o&&(h[b++]=o),O=T+C,N=O-T,H=O-N,k=C-N,V=T-H,R=V+k,T=O,E+=1,E<f&&(M=-u[E]);return R&&(h[b++]=R),T&&(h[b++]=T),b||(h[b++]=0),h.length=b,h}},9662:function(v){v.exports=r;function y(n,u){var i=n+u,f=i-n,g=i-f,h=u-f,b=n-g,p=b+h;return p?[p,i]:[i]}function r(n,u){var i=n.length|0,f=u.length|0;if(i===1&&f===1)return y(n[0],u[0]);var g=i+f,h=new Array(g),b=0,p=0,E=0,c=Math.abs,l=n[p],m=c(l),M=u[E],L=c(M),D,A;m<L?(A=l,p+=1,p<i&&(l=n[p],m=c(l))):(A=M,E+=1,E<f&&(M=u[E],L=c(M))),p<i&&m<L||E>=f?(D=l,p+=1,p<i&&(l=n[p],m=c(l))):(D=M,E+=1,E<f&&(M=u[E],L=c(M)));for(var C=D+A,S=C-D,o=A-S,R=o,T=C,O,N,H,k,V;p<i&&E<f;)m<L?(D=l,p+=1,p<i&&(l=n[p],m=c(l))):(D=M,E+=1,E<f&&(M=u[E],L=c(M))),A=R,C=D+A,S=C-D,o=A-S,o&&(h[b++]=o),O=T+C,N=O-T,H=O-N,k=C-N,V=T-H,R=V+k,T=O;for(;p<i;)D=l,A=R,C=D+A,S=C-D,o=A-S,o&&(h[b++]=o),O=T+C,N=O-T,H=O-N,k=C-N,V=T-H,R=V+k,T=O,p+=1,p<i&&(l=n[p]);for(;E<f;)D=M,A=R,C=D+A,S=C-D,o=A-S,o&&(h[b++]=o),O=T+C,N=O-T,H=O-N,k=C-N,V=T-H,R=V+k,T=O,E+=1,E<f&&(M=u[E]);return R&&(h[b++]=R),T&&(h[b++]=T),b||(h[b++]=0),h.length=b,h}},8691:function(v,y,r){v.exports=i;var n=r(2692),u=r(7037);function i(f){return u(n(f))}},7212:function(v,y,r){v.exports=l;var n=r(5050),u=r(5306),i=r(8729),f=r(1168);function g(m){for(var M=m.length,L=0,D=0;D<M;++D)L=Math.max(L,m[D].length)|0;return L-1}function h(m,M){for(var L=m.length,D=u.mallocUint8(L),A=0;A<L;++A)D[A]=m[A]<M|0;return D}function b(m,M){for(var L=m.length,D=M*(M+1)/2*L|0,A=u.mallocUint32(D*2),C=0,S=0;S<L;++S)for(var o=m[S],M=o.length,R=0;R<M;++R)for(var T=0;T<R;++T){var O=o[T],N=o[R];A[C++]=Math.min(O,N)|0,A[C++]=Math.max(O,N)|0}var H=C/2|0;i(n(A,[H,2]));for(var k=2,S=2;S<C;S+=2)A[S-2]===A[S]&&A[S-1]===A[S+1]||(A[k++]=A[S],A[k++]=A[S+1]);return n(A,[k/2|0,2])}function p(m,M,L,D){for(var A=m.data,C=m.shape[0],S=u.mallocDouble(C),o=0,R=0;R<C;++R){var T=A[2*R],O=A[2*R+1];if(L[T]!==L[O]){var N=M[T],H=M[O];A[2*o]=T,A[2*o+1]=O,S[o++]=(H-D)/(H-N)}}return m.shape[0]=o,n(S,[o])}function E(m,M){var L=u.mallocInt32(M*2),D=m.shape[0],A=m.data;L[0]=0;for(var C=0,S=0;S<D;++S){var o=A[2*S];if(o!==C){for(L[2*C+1]=S;++C<o;)L[2*C]=S,L[2*C+1]=S;L[2*C]=S}}for(L[2*C+1]=D;++C<M;)L[2*C]=L[2*C+1]=D;return L}function c(m){for(var M=m.shape[0]|0,L=m.data,D=new Array(M),A=0;A<M;++A)D[A]=[L[2*A],L[2*A+1]];return D}function l(m,M,L,D){L=L||0,typeof D>"u"&&(D=g(m));var A=m.length;if(A===0||D<1)return{cells:[],vertexIds:[],vertexWeights:[]};var C=h(M,+L),S=b(m,D),o=p(S,M,C,+L),R=E(S,M.length|0),T=f(D)(m,S.data,R,C),O=c(S),N=[].slice.call(o.data,0,o.shape[0]);return u.free(C),u.free(S.data),u.free(o.data),u.free(R),{cells:T,vertexIds:O,vertexWeights:N}}},1168:function(v){v.exports=r;var y=[function(){function u(i,f,g,h){for(var b=i.length,p=[],E=0;E<b;++E){var c=i[E];c.length}return p}return u},function(){function u(f,g,h,b){for(var p=Math.min(h,b)|0,E=Math.max(h,b)|0,c=f[2*p],l=f[2*p+1];c<l;){var m=c+l>>1,M=g[2*m+1];if(M===E)return m;E<M?l=m:c=m+1}return c}function i(f,g,h,b){for(var p=f.length,E=[],c=0;c<p;++c){var l=f[c],m=l.length;if(m===2){var M=(b[l[0]]<<0)+(b[l[1]]<<1);if(M===0||M===3)continue;switch(M){case 0:break;case 1:E.push([u(h,g,l[0],l[1])]);break;case 2:E.push([u(h,g,l[1],l[0])]);break}}}return E}return i},function(){function u(f,g,h,b){for(var p=Math.min(h,b)|0,E=Math.max(h,b)|0,c=f[2*p],l=f[2*p+1];c<l;){var m=c+l>>1,M=g[2*m+1];if(M===E)return m;E<M?l=m:c=m+1}return c}function i(f,g,h,b){for(var p=f.length,E=[],c=0;c<p;++c){var l=f[c],m=l.length;if(m===3){var M=(b[l[0]]<<0)+(b[l[1]]<<1)+(b[l[2]]<<2);if(M===0||M===7)continue;switch(M){case 0:break;case 1:E.push([u(h,g,l[0],l[2]),u(h,g,l[0],l[1])]);break;case 2:E.push([u(h,g,l[1],l[0]),u(h,g,l[1],l[2])]);break;case 3:E.push([u(h,g,l[0],l[2]),u(h,g,l[1],l[2])]);break;case 4:E.push([u(h,g,l[2],l[1]),u(h,g,l[2],l[0])]);break;case 5:E.push([u(h,g,l[2],l[1]),u(h,g,l[0],l[1])]);break;case 6:E.push([u(h,g,l[1],l[0]),u(h,g,l[2],l[0])]);break}}else if(m===2){var M=(b[l[0]]<<0)+(b[l[1]]<<1);if(M===0||M===3)continue;switch(M){case 0:break;case 1:E.push([u(h,g,l[0],l[1])]);break;case 2:E.push([u(h,g,l[1],l[0])]);break}}}return E}return i},function(){function u(f,g,h,b){for(var p=Math.min(h,b)|0,E=Math.max(h,b)|0,c=f[2*p],l=f[2*p+1];c<l;){var m=c+l>>1,M=g[2*m+1];if(M===E)return m;E<M?l=m:c=m+1}return c}function i(f,g,h,b){for(var p=f.length,E=[],c=0;c<p;++c){var l=f[c],m=l.length;if(m===4){var M=(b[l[0]]<<0)+(b[l[1]]<<1)+(b[l[2]]<<2)+(b[l[3]]<<3);if(M===0||M===15)continue;switch(M){case 0:break;case 1:E.push([u(h,g,l[0],l[1]),u(h,g,l[0],l[2]),u(h,g,l[0],l[3])]);break;case 2:E.push([u(h,g,l[1],l[2]),u(h,g,l[1],l[0]),u(h,g,l[1],l[3])]);break;case 3:E.push([u(h,g,l[1],l[2]),u(h,g,l[0],l[2]),u(h,g,l[0],l[3])],[u(h,g,l[1],l[3]),u(h,g,l[1],l[2]),u(h,g,l[0],l[3])]);break;case 4:E.push([u(h,g,l[2],l[0]),u(h,g,l[2],l[1]),u(h,g,l[2],l[3])]);break;case 5:E.push([u(h,g,l[0],l[1]),u(h,g,l[2],l[1]),u(h,g,l[0],l[3])],[u(h,g,l[2],l[1]),u(h,g,l[2],l[3]),u(h,g,l[0],l[3])]);break;case 6:E.push([u(h,g,l[2],l[0]),u(h,g,l[1],l[0]),u(h,g,l[1],l[3])],[u(h,g,l[2],l[3]),u(h,g,l[2],l[0]),u(h,g,l[1],l[3])]);break;case 7:E.push([u(h,g,l[0],l[3]),u(h,g,l[1],l[3]),u(h,g,l[2],l[3])]);break;case 8:E.push([u(h,g,l[3],l[1]),u(h,g,l[3],l[0]),u(h,g,l[3],l[2])]);break;case 9:E.push([u(h,g,l[3],l[1]),u(h,g,l[0],l[1]),u(h,g,l[0],l[2])],[u(h,g,l[3],l[2]),u(h,g,l[3],l[1]),u(h,g,l[0],l[2])]);break;case 10:E.push([u(h,g,l[1],l[0]),u(h,g,l[3],l[0]),u(h,g,l[1],l[2])],[u(h,g,l[3],l[0]),u(h,g,l[3],l[2]),u(h,g,l[1],l[2])]);break;case 11:E.push([u(h,g,l[1],l[2]),u(h,g,l[0],l[2]),u(h,g,l[3],l[2])]);break;case 12:E.push([u(h,g,l[3],l[0]),u(h,g,l[2],l[0]),u(h,g,l[2],l[1])],[u(h,g,l[3],l[1]),u(h,g,l[3],l[0]),u(h,g,l[2],l[1])]);break;case 13:E.push([u(h,g,l[0],l[1]),u(h,g,l[2],l[1]),u(h,g,l[3],l[1])]);break;case 14:E.push([u(h,g,l[2],l[0]),u(h,g,l[1],l[0]),u(h,g,l[3],l[0])]);break}}else if(m===3){var M=(b[l[0]]<<0)+(b[l[1]]<<1)+(b[l[2]]<<2);if(M===0||M===7)continue;switch(M){case 0:break;case 1:E.push([u(h,g,l[0],l[2]),u(h,g,l[0],l[1])]);break;case 2:E.push([u(h,g,l[1],l[0]),u(h,g,l[1],l[2])]);break;case 3:E.push([u(h,g,l[0],l[2]),u(h,g,l[1],l[2])]);break;case 4:E.push([u(h,g,l[2],l[1]),u(h,g,l[2],l[0])]);break;case 5:E.push([u(h,g,l[2],l[1]),u(h,g,l[0],l[1])]);break;case 6:E.push([u(h,g,l[1],l[0]),u(h,g,l[2],l[0])]);break}}else if(m===2){var M=(b[l[0]]<<0)+(b[l[1]]<<1);if(M===0||M===3)continue;switch(M){case 0:break;case 1:E.push([u(h,g,l[0],l[1])]);break;case 2:E.push([u(h,g,l[1],l[0])]);break}}}return E}return i}];function r(n){return y[n]()}},8211:function(v,y,r){r(2288),r(1731);function n(u,i){var f=u.length,g=u.length-i.length,h=Math.min;if(g)return g;switch(f){case 0:return 0;case 1:return u[0]-i[0];case 2:var l=u[0]+u[1]-i[0]-i[1];return l||h(u[0],u[1])-h(i[0],i[1]);case 3:var b=u[0]+u[1],p=i[0]+i[1];if(l=b+u[2]-(p+i[2]),l)return l;var E=h(u[0],u[1]),c=h(i[0],i[1]),l=h(E,u[2])-h(c,i[2]);return l||h(E+u[2],b)-h(c+i[2],p);default:var m=u.slice(0);m.sort();var M=i.slice(0);M.sort();for(var L=0;L<f;++L)if(g=m[L]-M[L],g)return g;return 0}}y.H=n},9392:function(v,y){var r=32;y.INT_BITS=r,y.INT_MAX=2147483647,y.INT_MIN=-1<<r-1,y.sign=function(i){return(i>0)-(i<0)},y.abs=function(i){var f=i>>r-1;return(i^f)-f},y.min=function(i,f){return f^(i^f)&-(i<f)},y.max=function(i,f){return i^(i^f)&-(i<f)},y.isPow2=function(i){return!(i&i-1)&&!!i},y.log2=function(i){var f,g;return f=(i>65535)<<4,i>>>=f,g=(i>255)<<3,i>>>=g,f|=g,g=(i>15)<<2,i>>>=g,f|=g,g=(i>3)<<1,i>>>=g,f|=g,f|i>>1},y.log10=function(i){return i>=1e9?9:i>=1e8?8:i>=1e7?7:i>=1e6?6:i>=1e5?5:i>=1e4?4:i>=1e3?3:i>=100?2:i>=10?1:0},y.popCount=function(i){return i=i-(i>>>1&1431655765),i=(i&858993459)+(i>>>2&858993459),(i+(i>>>4)&252645135)*16843009>>>24};function n(i){var f=32;return i&=-i,i&&f--,i&65535&&(f-=16),i&16711935&&(f-=8),i&252645135&&(f-=4),i&858993459&&(f-=2),i&1431655765&&(f-=1),f}y.countTrailingZeros=n,y.nextPow2=function(i){return i+=i===0,--i,i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i+1},y.prevPow2=function(i){return i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i-(i>>>1)},y.parity=function(i){return i^=i>>>16,i^=i>>>8,i^=i>>>4,i&=15,27030>>>i&1};var u=new Array(256);(function(i){for(var f=0;f<256;++f){var g=f,h=f,b=7;for(g>>>=1;g;g>>>=1)h<<=1,h|=g&1,--b;i[f]=h<<b&255}})(u),y.reverse=function(i){return u[i&255]<<24|u[i>>>8&255]<<16|u[i>>>16&255]<<8|u[i>>>24&255]},y.interleave2=function(i,f){return i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,i|f<<1},y.deinterleave2=function(i,f){return i=i>>>f&1431655765,i=(i|i>>>1)&858993459,i=(i|i>>>2)&252645135,i=(i|i>>>4)&16711935,i=(i|i>>>16)&65535,i<<16>>16},y.interleave3=function(i,f,g){return i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,i|=f<<1,g&=1023,g=(g|g<<16)&4278190335,g=(g|g<<8)&251719695,g=(g|g<<4)&3272356035,g=(g|g<<2)&1227133513,i|g<<2},y.deinterleave3=function(i,f){return i=i>>>f&1227133513,i=(i|i>>>2)&3272356035,i=(i|i>>>4)&251719695,i=(i|i>>>8)&4278190335,i=(i|i>>>16)&1023,i<<22>>22},y.nextCombination=function(i){var f=i|i-1;return f+1|(~f&-~f)-1>>>n(i)+1}},6656:function(v,y,r){var n=r(9392),u=r(9521);function i(o){for(var R=0,T=Math.max,O=0,N=o.length;O<N;++O)R=T(R,o[O].length);return R-1}y.dimension=i;function f(o){for(var R=-1,T=Math.max,O=0,N=o.length;O<N;++O)for(var H=o[O],k=0,V=H.length;k<V;++k)R=T(R,H[k]);return R+1}y.countVertices=f;function g(o){for(var R=new Array(o.length),T=0,O=o.length;T<O;++T)R[T]=o[T].slice(0);return R}y.cloneCells=g;function h(o,R){var T=o.length,O=o.length-R.length,N=Math.min;if(O)return O;switch(T){case 0:return 0;case 1:return o[0]-R[0];case 2:var U=o[0]+o[1]-R[0]-R[1];return U||N(o[0],o[1])-N(R[0],R[1]);case 3:var H=o[0]+o[1],k=R[0]+R[1];if(U=H+o[2]-(k+R[2]),U)return U;var V=N(o[0],o[1]),G=N(R[0],R[1]),U=N(V,o[2])-N(G,R[2]);return U||N(V+o[2],H)-N(G+R[2],k);default:var Y=o.slice(0);Y.sort();var ee=R.slice(0);ee.sort();for(var re=0;re<T;++re)if(O=Y[re]-ee[re],O)return O;return 0}}y.compareCells=h;function b(o,R){return h(o[0],R[0])}function p(o,R){if(R){for(var T=o.length,O=new Array(T),N=0;N<T;++N)O[N]=[o[N],R[N]];O.sort(b);for(var N=0;N<T;++N)o[N]=O[N][0],R[N]=O[N][1];return o}else return o.sort(h),o}y.normalize=p;function E(o){if(o.length===0)return[];for(var R=1,T=o.length,O=1;O<T;++O){var N=o[O];if(h(N,o[O-1])){if(O===R){R++;continue}o[R++]=N}}return o.length=R,o}y.unique=E;function c(o,R){for(var T=0,O=o.length-1,N=-1;T<=O;){var H=T+O>>1,k=h(o[H],R);k<=0?(k===0&&(N=H),T=H+1):k>0&&(O=H-1)}return N}y.findCell=c;function l(o,R){for(var T=new Array(o.length),O=0,N=T.length;O<N;++O)T[O]=[];for(var H=[],O=0,k=R.length;O<k;++O)for(var V=R[O],G=V.length,U=1,Y=1<<G;U<Y;++U){H.length=n.popCount(U);for(var ee=0,re=0;re<G;++re)U&1<<re&&(H[ee++]=V[re]);var ie=c(o,H);if(!(ie<0))for(;T[ie++].push(O),!(ie>=o.length||h(o[ie],H)!==0););}return T}y.incidence=l;function m(o,R){if(!R)return l(E(L(o,0)),o);for(var T=new Array(R),O=0;O<R;++O)T[O]=[];for(var O=0,N=o.length;O<N;++O)for(var H=o[O],k=0,V=H.length;k<V;++k)T[H[k]].push(O);return T}y.dual=m;function M(o){for(var R=[],T=0,O=o.length;T<O;++T)for(var N=o[T],H=N.length|0,k=1,V=1<<H;k<V;++k){for(var G=[],U=0;U<H;++U)k>>>U&1&&G.push(N[U]);R.push(G)}return p(R)}y.explode=M;function L(o,R){if(R<0)return[];for(var T=[],O=(1<<R+1)-1,N=0;N<o.length;++N)for(var H=o[N],k=O;k<1<<H.length;k=n.nextCombination(k)){for(var V=new Array(R+1),G=0,U=0;U<H.length;++U)k&1<<U&&(V[G++]=H[U]);T.push(V)}return p(T)}y.skeleton=L;function D(o){for(var R=[],T=0,O=o.length;T<O;++T)for(var N=o[T],H=0,k=N.length;H<k;++H){for(var V=new Array(N.length-1),G=0,U=0;G<k;++G)G!==H&&(V[U++]=N[G]);R.push(V)}return p(R)}y.boundary=D;function A(o,R){for(var T=new u(R),O=0;O<o.length;++O)for(var N=o[O],H=0;H<N.length;++H)for(var k=H+1;k<N.length;++k)T.link(N[H],N[k]);for(var V=[],G=T.ranks,O=0;O<G.length;++O)G[O]=-1;for(var O=0;O<o.length;++O){var U=T.find(o[O][0]);G[U]<0?(G[U]=V.length,V.push([o[O].slice(0)])):V[G[U]].push(o[O].slice(0))}return V}function C(o){for(var R=E(p(L(o,0))),T=new u(R.length),O=0;O<o.length;++O)for(var N=o[O],H=0;H<N.length;++H)for(var k=c(R,[N[H]]),V=H+1;V<N.length;++V)T.link(k,c(R,[N[V]]));for(var G=[],U=T.ranks,O=0;O<U.length;++O)U[O]=-1;for(var O=0;O<o.length;++O){var Y=T.find(c(R,[o[O][0]]));U[Y]<0?(U[Y]=G.length,G.push([o[O].slice(0)])):G[U[Y]].push(o[O].slice(0))}return G}function S(o,R){return R?A(o,R):C(o)}y.connectedComponents=S},9521:function(v){v.exports=y;function y(r){this.roots=new Array(r),this.ranks=new Array(r);for(var n=0;n<r;++n)this.roots[n]=n,this.ranks[n]=0}y.prototype.length=function(){return this.roots.length},y.prototype.makeSet=function(){var r=this.roots.length;return this.roots.push(r),this.ranks.push(0),r},y.prototype.find=function(r){for(var n=this.roots;n[r]!==r;){var u=n[r];n[r]=n[u],r=u}return r},y.prototype.link=function(r,n){var u=this.find(r),i=this.find(n);if(u!==i){var f=this.ranks,g=this.roots,h=f[u],b=f[i];h<b?g[u]=i:b<h?g[i]=u:(g[i]=u,++f[u])}}},8243:function(v,y,r){v.exports=f;var n=r(417),u=r(6656);function i(g,h,b){var p=Math.abs(n(g,h,b)),E=Math.sqrt(Math.pow(h[0]-b[0],2)+Math.pow(h[1]-b[1],2));return p/E}function f(g,h,b){for(var p=h.length,E=g.length,c=new Array(p),l=new Array(p),m=new Array(p),M=new Array(p),L=0;L<p;++L)c[L]=l[L]=-1,m[L]=1/0,M[L]=!1;for(var L=0;L<E;++L){var D=g[L];if(D.length!==2)throw new Error("Input must be a graph");var A=D[1],C=D[0];l[C]!==-1?l[C]=-2:l[C]=A,c[A]!==-1?c[A]=-2:c[A]=C}function S(q){if(M[q])return 1/0;var j=c[q],Z=l[q];return j<0||Z<0?1/0:i(h[q],h[j],h[Z])}function o(q,j){var Z=G[q],Q=G[j];G[q]=Q,G[j]=Z,U[Z]=j,U[Q]=q}function R(q){return m[G[q]]}function T(q){return q&1?q-1>>1:(q>>1)-1}function O(q){for(var j=R(q);;){var Z=j,Q=2*q+1,ue=2*(q+1),fe=q;if(Q<ee){var te=R(Q);te<Z&&(fe=Q,Z=te)}if(ue<ee){var ne=R(ue);ne<Z&&(fe=ue)}if(fe===q)return q;o(q,fe),q=fe}}function N(q){for(var j=R(q);q>0;){var Z=T(q);if(Z>=0){var Q=R(Z);if(j<Q){o(q,Z),q=Z;continue}}return q}}function H(){if(ee>0){var q=G[0];return o(0,ee-1),ee-=1,O(0),q}return-1}function k(q,j){var Z=G[q];return m[Z]===j?q:(m[Z]=-1/0,N(q),H(),m[Z]=j,ee+=1,N(ee-1))}function V(q){if(!M[q]){M[q]=!0;var j=c[q],Z=l[q];c[Z]>=0&&(c[Z]=j),l[j]>=0&&(l[j]=Z),U[j]>=0&&k(U[j],S(j)),U[Z]>=0&&k(U[Z],S(Z))}}for(var G=[],U=new Array(p),L=0;L<p;++L){var Y=m[L]=S(L);Y<1/0?(U[L]=G.length,G.push(L)):U[L]=-1}for(var ee=G.length,L=ee>>1;L>=0;--L)O(L);for(;;){var re=H();if(re<0||m[re]>b)break;V(re)}for(var ie=[],L=0;L<p;++L)M[L]||(U[L]=ie.length,ie.push(h[L].slice()));ie.length;function se(q,j){if(q[j]<0)return j;var Z=j,Q=j;do{var ue=q[Q];if(!M[Q]||ue<0||ue===Q||(Q=ue,ue=q[Q],!M[Q]||ue<0||ue===Q))break;Q=ue,Z=q[Z]}while(Z!==Q);for(var fe=j;fe!==Q;fe=q[fe])q[fe]=Q;return Q}var ce=[];return g.forEach(function(q){var j=se(c,q[0]),Z=se(l,q[1]);if(j>=0&&Z>=0&&j!==Z){var Q=U[j],ue=U[Z];Q!==ue&&ce.push([Q,ue])}}),u.unique(u.normalize(ce)),{positions:ie,edges:ce}}},6638:function(v,y,r){v.exports=i;var n=r(417);function u(f,g){var h,b;if(g[0][0]<g[1][0])h=g[0],b=g[1];else if(g[0][0]>g[1][0])h=g[1],b=g[0];else{var p=Math.min(f[0][1],f[1][1]),E=Math.max(f[0][1],f[1][1]),c=Math.min(g[0][1],g[1][1]),l=Math.max(g[0][1],g[1][1]);return E<c?E-c:p>l?p-l:E-l}var m,M;f[0][1]<f[1][1]?(m=f[0],M=f[1]):(m=f[1],M=f[0]);var L=n(b,h,m);return L||(L=n(b,h,M),L)?L:M-b}function i(f,g){var h,b;if(g[0][0]<g[1][0])h=g[0],b=g[1];else if(g[0][0]>g[1][0])h=g[1],b=g[0];else return u(g,f);var p,E;if(f[0][0]<f[1][0])p=f[0],E=f[1];else if(f[0][0]>f[1][0])p=f[1],E=f[0];else return-u(f,g);var c=n(h,b,E),l=n(h,b,p);if(c<0){if(l<=0)return c}else if(c>0){if(l>=0)return c}else if(l)return l;if(c=n(E,p,b),l=n(E,p,h),c<0){if(l<=0)return c}else if(c>0){if(l>=0)return c}else if(l)return l;return b[0]-E[0]}},4385:function(v,y,r){v.exports=l;var n=r(5070),u=r(7080),i=r(417),f=r(6638);function g(m,M,L){this.slabs=m,this.coordinates=M,this.horizontal=L}var h=g.prototype;function b(m,M){return m.y-M}function p(m,M){for(var L=null;m;){var D=m.key,A,C;D[0][0]<D[1][0]?(A=D[0],C=D[1]):(A=D[1],C=D[0]);var S=i(A,C,M);if(S<0)m=m.left;else if(S>0)if(M[0]!==D[1][0])L=m,m=m.right;else{var o=p(m.right,M);if(o)return o;m=m.left}else{if(M[0]!==D[1][0])return m;var o=p(m.right,M);if(o)return o;m=m.left}}return L}h.castUp=function(m){var M=n.le(this.coordinates,m[0]);if(M<0)return-1;this.slabs[M];var L=p(this.slabs[M],m),D=-1;if(L&&(D=L.value),this.coordinates[M]===m[0]){var A=null;if(L&&(A=L.key),M>0){var C=p(this.slabs[M-1],m);C&&(A?f(C.key,A)>0&&(A=C.key,D=C.value):(D=C.value,A=C.key))}var S=this.horizontal[M];if(S.length>0){var o=n.ge(S,m[1],b);if(o<S.length){var R=S[o];if(m[1]===R.y){if(R.closed)return R.index;for(;o<S.length-1&&S[o+1].y===m[1];)if(o=o+1,R=S[o],R.closed)return R.index;if(R.y===m[1]&&!R.start){if(o=o+1,o>=S.length)return D;R=S[o]}}if(R.start)if(A){var T=i(A[0],A[1],[m[0],R.y]);A[0][0]>A[1][0]&&(T=-T),T>0&&(D=R.index)}else D=R.index;else R.y!==m[1]&&(D=R.index)}}}return D};function E(m,M,L,D){this.y=m,this.index=M,this.start=L,this.closed=D}function c(m,M,L,D){this.x=m,this.segment=M,this.create=L,this.index=D}function l(m){for(var M=m.length,L=2*M,D=new Array(L),A=0;A<M;++A){var C=m[A],S=C[0][0]<C[1][0];D[2*A]=new c(C[0][0],C,S,A),D[2*A+1]=new c(C[1][0],C,!S,A)}D.sort(function(V,G){var U=V.x-G.x;return U||(U=V.create-G.create,U)?U:Math.min(V.segment[0][1],V.segment[1][1])-Math.min(G.segment[0][1],G.segment[1][1])});for(var o=u(f),R=[],T=[],O=[],A=0;A<L;){for(var N=D[A].x,H=[];A<L;){var k=D[A];if(k.x!==N)break;A+=1,k.segment[0][0]===k.x&&k.segment[1][0]===k.x?k.create&&(k.segment[0][1]<k.segment[1][1]?(H.push(new E(k.segment[0][1],k.index,!0,!0)),H.push(new E(k.segment[1][1],k.index,!1,!1))):(H.push(new E(k.segment[1][1],k.index,!0,!1)),H.push(new E(k.segment[0][1],k.index,!1,!0)))):k.create?o=o.insert(k.segment,k.index):o=o.remove(k.segment)}R.push(o.root),T.push(N),O.push(H)}return new g(R,T,O)}},4670:function(v,y,r){var n=r(9130),u=r(9662);v.exports=g,v.exports.positive=h,v.exports.negative=b;function i(p,E){var c=u(n(p,E),[E[E.length-1]]);return c[c.length-1]}function f(p,E,c,l){var m=l-E,M=-E/m;M<0?M=0:M>1&&(M=1);for(var L=1-M,D=p.length,A=new Array(D),C=0;C<D;++C)A[C]=M*p[C]+L*c[C];return A}function g(p,E){for(var c=[],l=[],m=i(p[p.length-1],E),M=p[p.length-1],L=p[0],D=0;D<p.length;++D,M=L){L=p[D];var A=i(L,E);if(m<0&&A>0||m>0&&A<0){var C=f(M,A,L,m);c.push(C),l.push(C.slice())}A<0?l.push(L.slice()):A>0?c.push(L.slice()):(c.push(L.slice()),l.push(L.slice())),m=A}return{positive:c,negative:l}}function h(p,E){for(var c=[],l=i(p[p.length-1],E),m=p[p.length-1],M=p[0],L=0;L<p.length;++L,m=M){M=p[L];var D=i(M,E);(l<0&&D>0||l>0&&D<0)&&c.push(f(m,D,M,l)),D>=0&&c.push(M.slice()),l=D}return c}function b(p,E){for(var c=[],l=i(p[p.length-1],E),m=p[p.length-1],M=p[0],L=0;L<p.length;++L,m=M){M=p[L];var D=i(M,E);(l<0&&D>0||l>0&&D<0)&&c.push(f(m,D,M,l)),D<=0&&c.push(M.slice()),l=D}return c}},8974:function(v,y,r){var n;(function(){var u={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_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 i(p){return g(b(p),arguments)}function f(p,E){return i.apply(null,[p].concat(E||[]))}function g(p,E){var c=1,l=p.length,m,M="",L,D,A,C,S,o,R,T;for(L=0;L<l;L++)if(typeof p[L]=="string")M+=p[L];else if(typeof p[L]=="object"){if(A=p[L],A.keys)for(m=E[c],D=0;D<A.keys.length;D++){if(m==null)throw new Error(i('[sprintf] Cannot access property "%s" of undefined value "%s"',A.keys[D],A.keys[D-1]));m=m[A.keys[D]]}else A.param_no?m=E[A.param_no]:m=E[c++];if(u.not_type.test(A.type)&&u.not_primitive.test(A.type)&&m instanceof Function&&(m=m()),u.numeric_arg.test(A.type)&&typeof m!="number"&&isNaN(m))throw new TypeError(i("[sprintf] expecting number but found %T",m));switch(u.number.test(A.type)&&(R=m>=0),A.type){case"b":m=parseInt(m,10).toString(2);break;case"c":m=String.fromCharCode(parseInt(m,10));break;case"d":case"i":m=parseInt(m,10);break;case"j":m=JSON.stringify(m,null,A.width?parseInt(A.width):0);break;case"e":m=A.precision?parseFloat(m).toExponential(A.precision):parseFloat(m).toExponential();break;case"f":m=A.precision?parseFloat(m).toFixed(A.precision):parseFloat(m);break;case"g":m=A.precision?String(Number(m.toPrecision(A.precision))):parseFloat(m);break;case"o":m=(parseInt(m,10)>>>0).toString(8);break;case"s":m=String(m),m=A.precision?m.substring(0,A.precision):m;break;case"t":m=String(!!m),m=A.precision?m.substring(0,A.precision):m;break;case"T":m=Object.prototype.toString.call(m).slice(8,-1).toLowerCase(),m=A.precision?m.substring(0,A.precision):m;break;case"u":m=parseInt(m,10)>>>0;break;case"v":m=m.valueOf(),m=A.precision?m.substring(0,A.precision):m;break;case"x":m=(parseInt(m,10)>>>0).toString(16);break;case"X":m=(parseInt(m,10)>>>0).toString(16).toUpperCase();break}u.json.test(A.type)?M+=m:(u.number.test(A.type)&&(!R||A.sign)?(T=R?"+":"-",m=m.toString().replace(u.sign,"")):T="",S=A.pad_char?A.pad_char==="0"?"0":A.pad_char.charAt(1):" ",o=A.width-(T+m).length,C=A.width&&o>0?S.repeat(o):"",M+=A.align?T+m+C:S==="0"?T+C+m:C+T+m)}return M}var h=Object.create(null);function b(p){if(h[p])return h[p];for(var E=p,c,l=[],m=0;E;){if((c=u.text.exec(E))!==null)l.push(c[0]);else if((c=u.modulo.exec(E))!==null)l.push("%");else if((c=u.placeholder.exec(E))!==null){if(c[2]){m|=1;var M=[],L=c[2],D=[];if((D=u.key.exec(L))!==null)for(M.push(D[1]);(L=L.substring(D[0].length))!=="";)if((D=u.key_access.exec(L))!==null)M.push(D[1]);else if((D=u.index_access.exec(L))!==null)M.push(D[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");c[2]=M}else m|=2;if(m===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");l.push({placeholder:c[0],param_no:c[1],keys:c[2],sign:c[3],pad_char:c[4],align:c[5],width:c[6],precision:c[7],type:c[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");E=E.substring(c[0].length)}return h[p]=l}y.sprintf=i,y.vsprintf=f,typeof window<"u"&&(window.sprintf=i,window.vsprintf=f,n=function(){return{sprintf:i,vsprintf:f}}.call(y,r,y,v),n!==void 0&&(v.exports=n))})()},4162:function(v,y,r){v.exports=b;var n=r(9284),u=r(9584),i={"2d":function(p,E,c){var l=p({order:E,scalarArguments:3,getters:c==="generic"?[0]:void 0,phase:function(M,L,D,A){return M>A|0},vertex:function(M,L,D,A,C,S,o,R,T,O,N,H,k){var V=(o<<0)+(R<<1)+(T<<2)+(O<<3)|0;if(!(V===0||V===15))switch(V){case 0:N.push([M-.5,L-.5]);break;case 1:N.push([M-.25-.25*(A+D-2*k)/(D-A),L-.25-.25*(C+D-2*k)/(D-C)]);break;case 2:N.push([M-.75-.25*(-A-D+2*k)/(A-D),L-.25-.25*(S+A-2*k)/(A-S)]);break;case 3:N.push([M-.5,L-.5-.5*(C+D+S+A-4*k)/(D-C+A-S)]);break;case 4:N.push([M-.25-.25*(S+C-2*k)/(C-S),L-.75-.25*(-C-D+2*k)/(C-D)]);break;case 5:N.push([M-.5-.5*(A+D+S+C-4*k)/(D-A+C-S),L-.5]);break;case 6:N.push([M-.5-.25*(-A-D+S+C)/(A-D+C-S),L-.5-.25*(-C-D+S+A)/(C-D+A-S)]);break;case 7:N.push([M-.75-.25*(S+C-2*k)/(C-S),L-.75-.25*(S+A-2*k)/(A-S)]);break;case 8:N.push([M-.75-.25*(-S-C+2*k)/(S-C),L-.75-.25*(-S-A+2*k)/(S-A)]);break;case 9:N.push([M-.5-.25*(A+D+-S-C)/(D-A+S-C),L-.5-.25*(C+D+-S-A)/(D-C+S-A)]);break;case 10:N.push([M-.5-.5*(-A-D+-S-C+4*k)/(A-D+S-C),L-.5]);break;case 11:N.push([M-.25-.25*(-S-C+2*k)/(S-C),L-.75-.25*(C+D-2*k)/(D-C)]);break;case 12:N.push([M-.5,L-.5-.5*(-C-D+-S-A+4*k)/(C-D+S-A)]);break;case 13:N.push([M-.75-.25*(A+D-2*k)/(D-A),L-.25-.25*(-S-A+2*k)/(S-A)]);break;case 14:N.push([M-.25-.25*(-A-D+2*k)/(A-D),L-.25-.25*(-C-D+2*k)/(C-D)]);break;case 15:N.push([M-.5,L-.5]);break}},cell:function(M,L,D,A,C,S,o,R,T){C?R.push([M,L]):R.push([L,M])}});return function(m,M){var L=[],D=[];return l(m,L,D,M),{positions:L,cells:D}}}};function f(p,E){var c=p.length+"d",l=i[c];if(l)return l(n,p,E)}function g(p,E){for(var c=u(p,E),l=c.length,m=new Array(l),M=new Array(l),L=0;L<l;++L)m[L]=[c[L]],M[L]=[L];return{positions:m,cells:M}}var h={};function b(p,m){if(p.dimension<=0)return{positions:[],cells:[]};if(p.dimension===1)return g(p,m);var c=p.order.join()+"-"+p.dtype,l=h[c],m=+m||0;return l||(l=h[c]=f(p.order,p.dtype)),l(p,m)}},6946:function(v,y,r){v.exports=g;var n=r(875),u=window||d.global||{},i=u.__TEXT_CACHE||{};u.__TEXT_CACHE={};function f(h){for(var b=h.cells,p=h.positions,E=new Float32Array(b.length*6),c=0,l=0,m=0;m<b.length;++m)for(var M=b[m],L=0;L<3;++L){var D=p[M[L]];E[c++]=D[0],E[c++]=D[1]+1.4,l=Math.max(D[0],l)}return{data:E,shape:l}}function g(h,b,E){var E=E||{},c=i[h];c||(c=i[h]={" ":{data:new Float32Array(0),shape:.2}});var l=c[b];if(!l)if(b.length<=1||!/\d/.test(b))l=c[b]=f(n(b,{triangles:!0,font:h,textAlign:E.textAlign||"left",textBaseline:"alphabetic",styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}}));else{for(var m=b.split(/(\d|\s)/),M=new Array(m.length),L=0,D=0,A=0;A<m.length;++A)M[A]=g(h,m[A]),L+=M[A].data.length,D+=M[A].shape,A>0&&(D+=.02);for(var C=new Float32Array(L),S=0,o=-.5*D,A=0;A<M.length;++A){for(var R=M[A].data,T=0;T<R.length;T+=2)C[S++]=R[T]+o,C[S++]=R[T+1];o+=M[A].shape+.02}l=c[b]={data:C,shape:D}}return l}},14:function(v,y,r){var n=r(4405);v.exports=g;var u=96;function i(h,b){var p=n(getComputedStyle(h).getPropertyValue(b));return p[0]*g(p[1],h)}function f(h,b){var p=document.createElement("div");p.style["font-size"]="128"+h,b.appendChild(p);var E=i(p,"font-size")/128;return b.removeChild(p),E}function g(h,b){switch(b=b||document.body,h=(h||"px").trim().toLowerCase(),(b===window||b===document)&&(b=document.body),h){case"%":return b.clientHeight/100;case"ch":case"ex":return f(h,b);case"em":return i(b,"font-size");case"rem":return i(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 u;case"cm":return u/2.54;case"mm":return u/25.4;case"pt":return u/72;case"pc":return u/6}return 1}},3440:function(v,y,r){v.exports=M;var n=r(8444),u=r(7437),i=r(4422),f=r(903),g=r(899),h=r(9305);function b(L,D,A){return Math.sqrt(Math.pow(L,2)+Math.pow(D,2)+Math.pow(A,2))}function p(L){return Math.min(1,Math.max(-1,L))}function E(L){var D=Math.abs(L[0]),A=Math.abs(L[1]),C=Math.abs(L[2]),S=[0,0,0];D>Math.max(A,C)?S[2]=1:A>Math.max(D,C)?S[0]=1:S[1]=1;for(var o=0,R=0,T=0;T<3;++T)o+=L[T]*L[T],R+=S[T]*L[T];for(var T=0;T<3;++T)S[T]-=R/o*L[T];return g(S,S),S}function c(L,D,A,C,S,o,R,T){this.center=n(A),this.up=n(C),this.right=n(S),this.radius=n([o]),this.angle=n([R,T]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(L,D),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 O=0;O<16;++O)this.computedMatrix[O]=.5;this.recalcMatrix(0)}var l=c.prototype;l.setDistanceLimits=function(L,D){L>0?L=Math.log(L):L=-1/0,D>0?D=Math.log(D):D=1/0,D=Math.max(D,L),this.radius.bounds[0][0]=L,this.radius.bounds[1][0]=D},l.getDistanceLimits=function(L){var D=this.radius.bounds[0];return L?(L[0]=Math.exp(D[0][0]),L[1]=Math.exp(D[1][0]),L):[Math.exp(D[0][0]),Math.exp(D[1][0])]},l.recalcMatrix=function(L){this.center.curve(L),this.up.curve(L),this.right.curve(L),this.radius.curve(L),this.angle.curve(L);for(var D=this.computedUp,A=this.computedRight,C=0,S=0,o=0;o<3;++o)S+=D[o]*A[o],C+=D[o]*D[o];for(var R=Math.sqrt(C),T=0,o=0;o<3;++o)A[o]-=D[o]*S/C,T+=A[o]*A[o],D[o]/=R;for(var O=Math.sqrt(T),o=0;o<3;++o)A[o]/=O;var N=this.computedToward;f(N,D,A),g(N,N);for(var H=Math.exp(this.computedRadius[0]),k=this.computedAngle[0],V=this.computedAngle[1],G=Math.cos(k),U=Math.sin(k),Y=Math.cos(V),ee=Math.sin(V),re=this.computedCenter,ie=G*Y,se=U*Y,ce=ee,q=-G*ee,j=-U*ee,Z=Y,Q=this.computedEye,ue=this.computedMatrix,o=0;o<3;++o){var fe=ie*A[o]+se*N[o]+ce*D[o];ue[4*o+1]=q*A[o]+j*N[o]+Z*D[o],ue[4*o+2]=fe,ue[4*o+3]=0}var te=ue[1],ne=ue[5],ve=ue[9],le=ue[2],xe=ue[6],Se=ue[10],Re=ne*Se-ve*xe,Ee=ve*le-te*Se,Oe=te*xe-ne*le,Be=b(Re,Ee,Oe);Re/=Be,Ee/=Be,Oe/=Be,ue[0]=Re,ue[4]=Ee,ue[8]=Oe;for(var o=0;o<3;++o)Q[o]=re[o]+ue[2+4*o]*H;for(var o=0;o<3;++o){for(var T=0,Le=0;Le<3;++Le)T+=ue[o+4*Le]*Q[Le];ue[12+o]=-T}ue[15]=1},l.getMatrix=function(L,D){this.recalcMatrix(L);var A=this.computedMatrix;if(D){for(var C=0;C<16;++C)D[C]=A[C];return D}return A};var m=[0,0,0];l.rotate=function(L,D,A,C){if(this.angle.move(L,D,A),C){this.recalcMatrix(L);var S=this.computedMatrix;m[0]=S[2],m[1]=S[6],m[2]=S[10];for(var o=this.computedUp,R=this.computedRight,T=this.computedToward,O=0;O<3;++O)S[4*O]=o[O],S[4*O+1]=R[O],S[4*O+2]=T[O];i(S,S,C,m);for(var O=0;O<3;++O)o[O]=S[4*O],R[O]=S[4*O+1];this.up.set(L,o[0],o[1],o[2]),this.right.set(L,R[0],R[1],R[2])}},l.pan=function(L,D,A,C){D=D||0,A=A||0,C=C||0,this.recalcMatrix(L);var S=this.computedMatrix;Math.exp(this.computedRadius[0]);var o=S[1],R=S[5],T=S[9],O=b(o,R,T);o/=O,R/=O,T/=O;var N=S[0],H=S[4],k=S[8],V=N*o+H*R+k*T;N-=o*V,H-=R*V,k-=T*V;var G=b(N,H,k);N/=G,H/=G,k/=G;var U=N*D+o*A,Y=H*D+R*A,ee=k*D+T*A;this.center.move(L,U,Y,ee);var re=Math.exp(this.computedRadius[0]);re=Math.max(1e-4,re+C),this.radius.set(L,Math.log(re))},l.translate=function(L,D,A,C){this.center.move(L,D||0,A||0,C||0)},l.setMatrix=function(L,D,A,C){var S=1;typeof A=="number"&&(S=A|0),(S<0||S>3)&&(S=1);var o=(S+2)%3;D||(this.recalcMatrix(L),D=this.computedMatrix);var R=D[S],T=D[S+4],O=D[S+8];if(C){var H=Math.abs(R),k=Math.abs(T),V=Math.abs(O),G=Math.max(H,k,V);H===G?(R=R<0?-1:1,T=O=0):V===G?(O=O<0?-1:1,R=T=0):(T=T<0?-1:1,R=O=0)}else{var N=b(R,T,O);R/=N,T/=N,O/=N}var U=D[o],Y=D[o+4],ee=D[o+8],re=U*R+Y*T+ee*O;U-=R*re,Y-=T*re,ee-=O*re;var ie=b(U,Y,ee);U/=ie,Y/=ie,ee/=ie;var se=T*ee-O*Y,ce=O*U-R*ee,q=R*Y-T*U,j=b(se,ce,q);se/=j,ce/=j,q/=j,this.center.jump(L,Ye,Ne,Xe),this.radius.idle(L),this.up.jump(L,R,T,O),this.right.jump(L,U,Y,ee);var Z,Q;if(S===2){var ue=D[1],fe=D[5],te=D[9],ne=ue*U+fe*Y+te*ee,ve=ue*se+fe*ce+te*q;Re<0?Z=-Math.PI/2:Z=Math.PI/2,Q=Math.atan2(ve,ne)}else{var le=D[2],xe=D[6],Se=D[10],Re=le*R+xe*T+Se*O,Ee=le*U+xe*Y+Se*ee,Oe=le*se+xe*ce+Se*q;Z=Math.asin(p(Re)),Q=Math.atan2(Oe,Ee)}this.angle.jump(L,Q,Z),this.recalcMatrix(L);var Be=D[2],Le=D[6],Te=D[10],De=this.computedMatrix;u(De,D);var Ve=De[15],Ye=De[12]/Ve,Ne=De[13]/Ve,Xe=De[14]/Ve,ht=Math.exp(this.computedRadius[0]);this.center.jump(L,Ye-Be*ht,Ne-Le*ht,Xe-Te*ht)},l.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},l.idle=function(L){this.center.idle(L),this.up.idle(L),this.right.idle(L),this.radius.idle(L),this.angle.idle(L)},l.flush=function(L){this.center.flush(L),this.up.flush(L),this.right.flush(L),this.radius.flush(L),this.angle.flush(L)},l.setDistance=function(L,D){D>0&&this.radius.set(L,Math.log(D))},l.lookAt=function(L,D,A,C){this.recalcMatrix(L),D=D||this.computedEye,A=A||this.computedCenter,C=C||this.computedUp;var S=C[0],o=C[1],R=C[2],T=b(S,o,R);if(!(T<1e-6)){S/=T,o/=T,R/=T;var O=D[0]-A[0],N=D[1]-A[1],H=D[2]-A[2],k=b(O,N,H);if(!(k<1e-6)){O/=k,N/=k,H/=k;var V=this.computedRight,G=V[0],U=V[1],Y=V[2],ee=S*G+o*U+R*Y;G-=ee*S,U-=ee*o,Y-=ee*R;var re=b(G,U,Y);if(!(re<.01&&(G=o*H-R*N,U=R*O-S*H,Y=S*N-o*O,re=b(G,U,Y),re<1e-6))){G/=re,U/=re,Y/=re,this.up.set(L,S,o,R),this.right.set(L,G,U,Y),this.center.set(L,A[0],A[1],A[2]),this.radius.set(L,Math.log(k));var ie=o*Y-R*U,se=R*G-S*Y,ce=S*U-o*G,q=b(ie,se,ce);ie/=q,se/=q,ce/=q;var j=S*O+o*N+R*H,Z=G*O+U*N+Y*H,Q=ie*O+se*N+ce*H,ue=Math.asin(p(j)),fe=Math.atan2(Q,Z),te=this.angle._state,ne=te[te.length-1],ve=te[te.length-2];ne=ne%(2*Math.PI);var le=Math.abs(ne+2*Math.PI-fe),xe=Math.abs(ne-fe),Se=Math.abs(ne-2*Math.PI-fe);le<xe&&(ne+=2*Math.PI),Se<xe&&(ne-=2*Math.PI),this.angle.jump(this.angle.lastT(),ne,ve),this.angle.set(L,fe,ue)}}}};function M(L){L=L||{};var D=L.center||[0,0,0],A=L.up||[0,1,0],C=L.right||E(A),S=L.radius||1,o=L.theta||0,R=L.phi||0;if(D=[].slice.call(D,0,3),A=[].slice.call(A,0,3),g(A,A),C=[].slice.call(C,0,3),g(C,C),"eye"in L){var T=L.eye,O=[T[0]-D[0],T[1]-D[1],T[2]-D[2]];f(C,O,A),b(C[0],C[1],C[2])<1e-6?C=E(A):g(C,C),S=b(O[0],O[1],O[2]);var N=h(A,O)/S,H=h(C,O)/S;R=Math.acos(N),o=Math.acos(H)}return S=Math.log(S),new c(L.zoomMin,L.zoomMax,D,A,C,S,o,R)}},9660:function(v){v.exports=r;var y=+(Math.pow(2,27)+1);function r(n,u,i){var f=n*u,g=y*n,h=g-n,b=g-h,p=n-b,E=y*u,c=E-u,l=E-c,m=u-l,M=f-b*l,L=M-p*l,D=L-b*m,A=p*m-D;return i?(i[0]=A,i[1]=f,i):[A,f]}},87:function(v){v.exports=y;function y(r,n,u){var i=r+n,f=i-r,g=i-f,h=n-f,b=r-g;return u?(u[0]=b+h,u[1]=i,u):[b+h,i]}},5306:function(v,y,r){var n=r(2288),u=r(3094),i=r(2146).lW;r.g.__TYPEDARRAY_POOL||(r.g.__TYPEDARRAY_POOL={UINT8:u([32,0]),UINT16:u([32,0]),UINT32:u([32,0]),BIGUINT64:u([32,0]),INT8:u([32,0]),INT16:u([32,0]),INT32:u([32,0]),BIGINT64:u([32,0]),FLOAT:u([32,0]),DOUBLE:u([32,0]),DATA:u([32,0]),UINT8C:u([32,0]),BUFFER:u([32,0])});var f=typeof Uint8ClampedArray<"u",g=typeof BigUint64Array<"u",h=typeof BigInt64Array<"u",b=r.g.__TYPEDARRAY_POOL;b.UINT8C||(b.UINT8C=u([32,0])),b.BIGUINT64||(b.BIGUINT64=u([32,0])),b.BIGINT64||(b.BIGINT64=u([32,0])),b.BUFFER||(b.BUFFER=u([32,0]));var p=b.DATA,E=b.BUFFER;y.free=function(G){if(i.isBuffer(G))E[n.log2(G.length)].push(G);else{if(Object.prototype.toString.call(G)!=="[object ArrayBuffer]"&&(G=G.buffer),!G)return;var U=G.length||G.byteLength,Y=n.log2(U)|0;p[Y].push(G)}};function c(V){if(V){var G=V.length||V.byteLength,U=n.log2(G);p[U].push(V)}}function l(V){c(V.buffer)}y.freeUint8=y.freeUint16=y.freeUint32=y.freeBigUint64=y.freeInt8=y.freeInt16=y.freeInt32=y.freeBigInt64=y.freeFloat32=y.freeFloat=y.freeFloat64=y.freeDouble=y.freeUint8Clamped=y.freeDataView=l,y.freeArrayBuffer=c,y.freeBuffer=function(G){E[n.log2(G.length)].push(G)},y.malloc=function(G,U){if(U===void 0||U==="arraybuffer")return m(G);switch(U){case"uint8":return M(G);case"uint16":return L(G);case"uint32":return D(G);case"int8":return A(G);case"int16":return C(G);case"int32":return S(G);case"float":case"float32":return o(G);case"double":case"float64":return R(G);case"uint8_clamped":return T(G);case"bigint64":return N(G);case"biguint64":return O(G);case"buffer":return k(G);case"data":case"dataview":return H(G);default:return null}return null};function m(G){var G=n.nextPow2(G),U=n.log2(G),Y=p[U];return Y.length>0?Y.pop():new ArrayBuffer(G)}y.mallocArrayBuffer=m;function M(V){return new Uint8Array(m(V),0,V)}y.mallocUint8=M;function L(V){return new Uint16Array(m(2*V),0,V)}y.mallocUint16=L;function D(V){return new Uint32Array(m(4*V),0,V)}y.mallocUint32=D;function A(V){return new Int8Array(m(V),0,V)}y.mallocInt8=A;function C(V){return new Int16Array(m(2*V),0,V)}y.mallocInt16=C;function S(V){return new Int32Array(m(4*V),0,V)}y.mallocInt32=S;function o(V){return new Float32Array(m(4*V),0,V)}y.mallocFloat32=y.mallocFloat=o;function R(V){return new Float64Array(m(8*V),0,V)}y.mallocFloat64=y.mallocDouble=R;function T(V){return f?new Uint8ClampedArray(m(V),0,V):M(V)}y.mallocUint8Clamped=T;function O(V){return g?new BigUint64Array(m(8*V),0,V):null}y.mallocBigUint64=O;function N(V){return h?new BigInt64Array(m(8*V),0,V):null}y.mallocBigInt64=N;function H(V){return new DataView(m(V),0,V)}y.mallocDataView=H;function k(V){V=n.nextPow2(V);var G=n.log2(V),U=E[G];return U.length>0?U.pop():new i(V)}y.mallocBuffer=k,y.clearCache=function(){for(var G=0;G<32;++G)b.UINT8[G].length=0,b.UINT16[G].length=0,b.UINT32[G].length=0,b.INT8[G].length=0,b.INT16[G].length=0,b.INT32[G].length=0,b.FLOAT[G].length=0,b.DOUBLE[G].length=0,b.BIGUINT64[G].length=0,b.BIGINT64[G].length=0,b.UINT8C[G].length=0,p[G].length=0,E[G].length=0}},1731:function(v){v.exports=y;function y(n){this.roots=new Array(n),this.ranks=new Array(n);for(var u=0;u<n;++u)this.roots[u]=u,this.ranks[u]=0}var r=y.prototype;Object.defineProperty(r,"length",{get:function(){return this.roots.length}}),r.makeSet=function(){var n=this.roots.length;return this.roots.push(n),this.ranks.push(0),n},r.find=function(n){for(var u=n,i=this.roots;i[n]!==n;)n=i[n];for(;i[u]!==n;){var f=i[u];i[u]=n,u=f}return n},r.link=function(n,u){var i=this.find(n),f=this.find(u);if(i!==f){var g=this.ranks,h=this.roots,b=g[i],p=g[f];b<p?h[i]=f:p<b?h[f]=i:(h[f]=i,++g[i])}}},1215:function(v){function y(u,i){for(var f=1,g=u.length,h=u[0],b=u[0],p=1;p<g;++p)if(b=h,h=u[p],i(h,b)){if(p===f){f++;continue}u[f++]=h}return u.length=f,u}function r(u){for(var i=1,f=u.length,g=u[0],h=u[0],b=1;b<f;++b,h=g)if(h=g,g=u[b],g!==h){if(b===i){i++;continue}u[i++]=g}return u.length=i,u}function n(u,i,f){return u.length===0?u:i?(f||u.sort(i),y(u,i)):(f||u.sort(),r(u))}v.exports=n},875:function(v,y,r){v.exports=f;var n=r(712),u=null,i=null;typeof document<"u"&&(u=document.createElement("canvas"),u.width=8192,u.height=1024,i=u.getContext("2d"));function f(g,h){return(typeof h!="object"||h===null)&&(h={}),n(g,h.canvas||u,h.context||i,h)}},712:function(v,y,r){v.exports=N,v.exports.processPixels=O;var n=r(4162),u=r(5050),i=r(8243),f=r(197),g=r(7761),h=r(8040),b="b",p="b|",E="i",c="i|",l="sup",m="+",M="+1",L="sub",D="-",A="-1";function C(H,k,V,G){for(var U="<"+H+">",Y="</"+H+">",ee=U.length,re=Y.length,ie=k[0]===m||k[0]===D,se=0,ce=-re;se>-1&&(se=V.indexOf(U,se),!(se===-1||(ce=V.indexOf(Y,se+ee),ce===-1)||ce<=se));){for(var q=se;q<ce+re;++q)if(q<se+ee||q>=ce)G[q]=null,V=V.substr(0,q)+" "+V.substr(q+1);else if(G[q]!==null){var j=G[q].indexOf(k[0]);j===-1?G[q]+=k:ie&&(G[q]=G[q].substr(0,j+1)+(1+parseInt(G[q][j+1]))+G[q].substr(j+2))}var Z=se+ee,Q=V.substr(Z,ce-Z),ue=Q.indexOf(U);ue!==-1?se=ue:se=ce+re}return G}function S(H,k,V){for(var G=k.textAlign||"start",U=k.textBaseline||"alphabetic",Y=[1<<30,1<<30],ee=[0,0],re=H.length,ie=0;ie<re;++ie)for(var se=H[ie],ce=0;ce<2;++ce)Y[ce]=Math.min(Y[ce],se[ce])|0,ee[ce]=Math.max(ee[ce],se[ce])|0;var q=0;switch(G){case"center":q=-.5*(Y[0]+ee[0]);break;case"right":case"end":q=-ee[0];break;case"left":case"start":q=-Y[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+G+"'")}var j=0;switch(U){case"hanging":case"top":j=-Y[1];break;case"middle":j=-.5*(Y[1]+ee[1]);break;case"alphabetic":case"ideographic":j=-3*V;break;case"bottom":j=-ee[1];break;default:throw new Error("vectorize-text: Unrecoginized textBaseline: '"+U+"'")}var Z=1/V;return"lineHeight"in k?Z*=+k.lineHeight:"width"in k?Z=k.width/(ee[0]-Y[0]):"height"in k&&(Z=k.height/(ee[1]-Y[1])),H.map(function(Q){return[Z*(Q[0]+q),Z*(Q[1]+j)]})}function o(H,k,V,G,U,Y){V=V.replace(/\n/g,""),Y.breaklines===!0?V=V.replace(/\<br\>/g,`
`):V=V.replace(/\<br\>/g," ");var ee="",re=[];for(ne=0;ne<V.length;++ne)re[ne]=ee;Y.bolds===!0&&(re=C(b,p,V,re)),Y.italics===!0&&(re=C(E,c,V,re)),Y.superscripts===!0&&(re=C(l,M,V,re)),Y.subscripts===!0&&(re=C(L,A,V,re));var ie=[],se="";for(ne=0;ne<V.length;++ne)re[ne]!==null&&(se+=V[ne],ie.push(re[ne]));var ce=se.split(`
`),q=ce.length,j=Math.round(U*G),Z=G,Q=G*2,ue=0,fe=q*j+Q;H.height<fe&&(H.height=fe),k.fillStyle="#000",k.fillRect(0,0,H.width,H.height),k.fillStyle="#fff";var te,ne,ve,le,xe,Se=0,Re="";function Ee(){if(Re!==""){var Xe=k.measureText(Re).width;k.fillText(Re,Z+ve,Q+le),ve+=Xe}}function Oe(){return""+Math.round(xe)+"px "}function Be(Xe,ht){var st=""+k.font;if(Y.subscripts===!0){var it=Xe.indexOf(D),nt=ht.indexOf(D),pt=it>-1?parseInt(Xe[1+it]):0,Tt=nt>-1?parseInt(ht[1+nt]):0;pt!==Tt&&(st=st.replace(Oe(),"?px "),xe*=Math.pow(.75,Tt-pt),st=st.replace("?px ",Oe())),le+=.25*j*(Tt-pt)}if(Y.superscripts===!0){var Et=Xe.indexOf(m),Dt=ht.indexOf(m),et=Et>-1?parseInt(Xe[1+Et]):0,Ue=Dt>-1?parseInt(ht[1+Dt]):0;et!==Ue&&(st=st.replace(Oe(),"?px "),xe*=Math.pow(.75,Ue-et),st=st.replace("?px ",Oe())),le-=.25*j*(Ue-et)}if(Y.bolds===!0){var ze=Xe.indexOf(p)>-1,rt=ht.indexOf(p)>-1;!ze&&rt&&(lt?st=st.replace("italic ","italic bold "):st="bold "+st),ze&&!rt&&(st=st.replace("bold ",""))}if(Y.italics===!0){var lt=Xe.indexOf(c)>-1,Qe=ht.indexOf(c)>-1;!lt&&Qe&&(st="italic "+st),lt&&!Qe&&(st=st.replace("italic ",""))}k.font=st}for(te=0;te<q;++te){var Le=ce[te]+`
`;for(ve=0,le=te*j,xe=G,Re="",ne=0;ne<Le.length;++ne){var Te=ne+Se<ie.length?ie[ne+Se]:ie[ie.length-1];ee===Te?Re+=Le[ne]:(Ee(),Re=Le[ne],Te!==void 0&&(Be(ee,Te),ee=Te))}Ee(),Se+=Le.length;var De=Math.round(ve+2*Z)|0;ue<De&&(ue=De)}var Ve=ue,Ye=Q+j*q,Ne=u(k.getImageData(0,0,Ve,Ye).data,[Ye,Ve,4]);return Ne.pick(-1,-1,0).transpose(1,0)}function R(H,k){var V=n(H,128);return k?i(V.cells,V.positions,.25):{edges:V.cells,positions:V.positions}}function T(H,k,V,G){var U=R(H,G),Y=S(U.positions,k,V),ee=U.edges,re=k.orientation==="ccw";if(f(Y,ee),k.polygons||k.polygon||k.polyline){for(var ie=h(ee,Y),se=new Array(ie.length),ce=0;ce<ie.length;++ce){for(var q=ie[ce],j=new Array(q.length),Z=0;Z<q.length;++Z){for(var Q=q[Z],ue=new Array(Q.length),fe=0;fe<Q.length;++fe)ue[fe]=Y[Q[fe]].slice();re&&ue.reverse(),j[Z]=ue}se[ce]=j}return se}else return k.triangles||k.triangulate||k.triangle?{cells:g(Y,ee,{delaunay:!1,exterior:!1,interior:!0}),positions:Y}:{edges:ee,positions:Y}}function O(H,k,V){try{return T(H,k,V,!0)}catch{}try{return T(H,k,V,!1)}catch{}return k.polygons||k.polyline||k.polygon?[]:k.triangles||k.triangulate||k.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}function N(H,k,V,G){var U=64,Y=1.25,ee={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};G&&(G.size&&G.size>0&&(U=G.size),G.lineSpacing&&G.lineSpacing>0&&(Y=G.lineSpacing),G.styletags&&G.styletags.breaklines&&(ee.breaklines=!!G.styletags.breaklines),G.styletags&&G.styletags.bolds&&(ee.bolds=!!G.styletags.bolds),G.styletags&&G.styletags.italics&&(ee.italics=!!G.styletags.italics),G.styletags&&G.styletags.subscripts&&(ee.subscripts=!!G.styletags.subscripts),G.styletags&&G.styletags.superscripts&&(ee.superscripts=!!G.styletags.superscripts)),V.font=[G.fontStyle,G.fontVariant,G.fontWeight,U+"px",G.font].filter(function(ie){return ie}).join(" "),V.textAlign="start",V.textBaseline="alphabetic",V.direction="ltr";var re=o(k,V,H,U,Y,ee);return O(re,G,U)}},5346:function(v){(function(){if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function r(R){R.permitHostObjects___&&R.permitHostObjects___(r)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=r);var n=!1;if(typeof WeakMap=="function"){var u=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var i=new u,f=Object.freeze({});if(i.set(f,1),i.get(f)!==1)n=!0;else{v.exports=WeakMap;return}}}var g=Object.getOwnPropertyNames,h=Object.defineProperty,b=Object.isExtensible,p="weakmap:",E=p+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var c=new ArrayBuffer(25),l=new Uint8Array(c);crypto.getRandomValues(l),E=p+"rand:"+Array.prototype.map.call(l,function(R){return(R%36).toString(36)}).join("")+"___"}function m(R){return!(R.substr(0,p.length)==p&&R.substr(R.length-3)==="___")}if(h(Object,"getOwnPropertyNames",{value:function(T){return g(T).filter(m)}}),"getPropertyNames"in Object){var M=Object.getPropertyNames;h(Object,"getPropertyNames",{value:function(T){return M(T).filter(m)}})}function L(R){if(R!==Object(R))throw new TypeError("Not an object: "+R);var T=R[E];if(T&&T.key===R)return T;if(b(R)){T={key:R};try{return h(R,E,{value:T,writable:!1,enumerable:!1,configurable:!1}),T}catch{return}}}(function(){var R=Object.freeze;h(Object,"freeze",{value:function(H){return L(H),R(H)}});var T=Object.seal;h(Object,"seal",{value:function(H){return L(H),T(H)}});var O=Object.preventExtensions;h(Object,"preventExtensions",{value:function(H){return L(H),O(H)}})})();function D(R){return R.prototype=null,Object.freeze(R)}var A=!1;function C(){!A&&typeof console<"u"&&(A=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var S=0,o=function(){this instanceof o||C();var R=[],T=[],O=S++;function N(G,U){var Y,ee=L(G);return ee?O in ee?ee[O]:U:(Y=R.indexOf(G),Y>=0?T[Y]:U)}function H(G){var U=L(G);return U?O in U:R.indexOf(G)>=0}function k(G,U){var Y,ee=L(G);return ee?ee[O]=U:(Y=R.indexOf(G),Y>=0?T[Y]=U:(Y=R.length,T[Y]=U,R[Y]=G)),this}function V(G){var U=L(G),Y,ee;return U?O in U&&delete U[O]:(Y=R.indexOf(G),Y<0?!1:(ee=R.length-1,R[Y]=void 0,T[Y]=T[ee],R[Y]=R[ee],R.length=ee,T.length=ee,!0))}return Object.create(o.prototype,{get___:{value:D(N)},has___:{value:D(H)},set___:{value:D(k)},delete___:{value:D(V)}})};o.prototype=Object.create(Object.prototype,{get:{value:function(T,O){return this.get___(T,O)},writable:!0,configurable:!0},has:{value:function(T){return this.has___(T)},writable:!0,configurable:!0},set:{value:function(T,O){return this.set___(T,O)},writable:!0,configurable:!0},delete:{value:function(T){return this.delete___(T)},writable:!0,configurable:!0}}),typeof u=="function"?function(){n&&typeof Proxy<"u"&&(Proxy=void 0);function R(){this instanceof o||C();var T=new u,O=void 0,N=!1;function H(U,Y){return O?T.has(U)?T.get(U):O.get___(U,Y):T.get(U,Y)}function k(U){return T.has(U)||(O?O.has___(U):!1)}var V;n?V=function(U,Y){return T.set(U,Y),T.has(U)||(O||(O=new o),O.set(U,Y)),this}:V=function(U,Y){if(N)try{T.set(U,Y)}catch{O||(O=new o),O.set___(U,Y)}else T.set(U,Y);return this};function G(U){var Y=!!T.delete(U);return O&&O.delete___(U)||Y}return Object.create(o.prototype,{get___:{value:D(H)},has___:{value:D(k)},set___:{value:D(V)},delete___:{value:D(G)},permitHostObjects___:{value:D(function(U){if(U===r)N=!0;else throw new Error("bogus call to permitHostObjects___")})}})}R.prototype=o.prototype,v.exports=R,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),v.exports=o)})()},9222:function(v,y,r){var n=r(7178);v.exports=u;function u(){var i={};return function(f){if((typeof f!="object"||f===null)&&typeof f!="function")throw new Error("Weakmap-shim: Key must be object");var g=f.valueOf(i);return g&&g.identity===i?g:n(f,i)}}},7178:function(v){v.exports=y;function y(r,n){var u={identity:n},i=r.valueOf;return Object.defineProperty(r,"valueOf",{value:function(f){return f!==n?i.apply(this,arguments):u},writable:!0}),u}},4037:function(v,y,r){var n=r(9222);v.exports=u;function u(){var i=n();return{get:function(f,g){var h=i(f);return h.hasOwnProperty("value")?h.value:g},set:function(f,g){return i(f).value=g,this},has:function(f){return"value"in i(f)},delete:function(f){return delete i(f).value}}}},6183:function(v){function y(){return function(g,h,b,p,E,c){var l=g[0],m=b[0],M=[0],L=m;p|=0;var D=0,A=m;for(D=0;D<l;++D){{var C=h[p]-c,S=h[p+L]-c;C>=0!=S>=0&&E.push(M[0]+.5+.5*(C+S)/(C-S))}p+=A,++M[0]}}}function r(){return y()}var n=r;function u(g){var h={};return function(p,E,c){var l=p.dtype,m=p.order,M=[l,m.join()].join(),L=h[M];return L||(h[M]=L=g([l,m])),L(p.shape.slice(0),p.data,p.stride,p.offset|0,E,c)}}function i(g){return u(n.bind(void 0,g))}function f(g){return i({funcName:g.funcName})}v.exports=f({funcName:"zeroCrossings"})},9584:function(v,y,r){v.exports=u;var n=r(6183);function u(i,f){var g=[];return f=+f||0,n(i.hi(i.shape[0]-1),g,f),g}},6601:function(){}},a={};function _(v){var y=a[v];if(y!==void 0)return y.exports;var r=a[v]={id:v,loaded:!1,exports:{}};return P[v].call(r.exports,r,r.exports,_),r.loaded=!0,r.exports}(function(){_.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){_.nmd=function(v){return v.paths=[],v.children||(v.children=[]),v}}();var x=_(7386);return x}()})},12856:function(z,B,e){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/function d(et,Ue){if(!(et instanceof Ue))throw new TypeError("Cannot call a class as a function")}function P(et,Ue){for(var ze=0;ze<Ue.length;ze++){var rt=Ue[ze];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,rt.key,rt)}}function a(et,Ue,ze){return Ue&&P(et.prototype,Ue),ze&&P(et,ze),Object.defineProperty(et,"prototype",{writable:!1}),et}function _(et,Ue){if(typeof Ue!="function"&&Ue!==null)throw new TypeError("Super expression must either be null or a function");et.prototype=Object.create(Ue&&Ue.prototype,{constructor:{value:et,writable:!0,configurable:!0}}),Object.defineProperty(et,"prototype",{writable:!1}),Ue&&x(et,Ue)}function x(et,Ue){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(rt,lt){return rt.__proto__=lt,rt},x(et,Ue)}function v(et){var Ue=n();return function(){var rt=u(et),lt;if(Ue){var Qe=u(this).constructor;lt=Reflect.construct(rt,arguments,Qe)}else lt=rt.apply(this,arguments);return y(this,lt)}}function y(et,Ue){if(Ue&&(i(Ue)==="object"||typeof Ue=="function"))return Ue;if(Ue!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return r(et)}function r(et){if(et===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et}function n(){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 u(et){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(ze){return ze.__proto__||Object.getPrototypeOf(ze)},u(et)}function i(et){return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ue){return typeof Ue}:function(Ue){return Ue&&typeof Symbol=="function"&&Ue.constructor===Symbol&&Ue!==Symbol.prototype?"symbol":typeof Ue},i(et)}var f=e(95341),g=e(95280),h=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;B.Buffer=c,B.SlowBuffer=T,B.INSPECT_MAX_BYTES=50;var b=2147483647;B.kMaxLength=b,c.TYPED_ARRAY_SUPPORT=p(),!c.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 p(){try{var et=new Uint8Array(1),Ue={foo:function(){return 42}};return Object.setPrototypeOf(Ue,Uint8Array.prototype),Object.setPrototypeOf(et,Ue),et.foo()===42}catch{return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function E(et){if(et>b)throw new RangeError('The value "'+et+'" is invalid for option "size"');var Ue=new Uint8Array(et);return Object.setPrototypeOf(Ue,c.prototype),Ue}function c(et,Ue,ze){if(typeof et=="number"){if(typeof Ue=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return L(et)}return l(et,Ue,ze)}c.poolSize=8192;function l(et,Ue,ze){if(typeof et=="string")return D(et,Ue);if(ArrayBuffer.isView(et))return C(et);if(et==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+i(et));if(nt(et,ArrayBuffer)||et&&nt(et.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(nt(et,SharedArrayBuffer)||et&&nt(et.buffer,SharedArrayBuffer)))return S(et,Ue,ze);if(typeof et=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var rt=et.valueOf&&et.valueOf();if(rt!=null&&rt!==et)return c.from(rt,Ue,ze);var lt=o(et);if(lt)return lt;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof et[Symbol.toPrimitive]=="function")return c.from(et[Symbol.toPrimitive]("string"),Ue,ze);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+i(et))}c.from=function(et,Ue,ze){return l(et,Ue,ze)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array);function m(et){if(typeof et!="number")throw new TypeError('"size" argument must be of type number');if(et<0)throw new RangeError('The value "'+et+'" is invalid for option "size"')}function M(et,Ue,ze){return m(et),et<=0?E(et):Ue!==void 0?typeof ze=="string"?E(et).fill(Ue,ze):E(et).fill(Ue):E(et)}c.alloc=function(et,Ue,ze){return M(et,Ue,ze)};function L(et){return m(et),E(et<0?0:R(et)|0)}c.allocUnsafe=function(et){return L(et)},c.allocUnsafeSlow=function(et){return L(et)};function D(et,Ue){if((typeof Ue!="string"||Ue==="")&&(Ue="utf8"),!c.isEncoding(Ue))throw new TypeError("Unknown encoding: "+Ue);var ze=O(et,Ue)|0,rt=E(ze),lt=rt.write(et,Ue);return lt!==ze&&(rt=rt.slice(0,lt)),rt}function A(et){for(var Ue=et.length<0?0:R(et.length)|0,ze=E(Ue),rt=0;rt<Ue;rt+=1)ze[rt]=et[rt]&255;return ze}function C(et){if(nt(et,Uint8Array)){var Ue=new Uint8Array(et);return S(Ue.buffer,Ue.byteOffset,Ue.byteLength)}return A(et)}function S(et,Ue,ze){if(Ue<0||et.byteLength<Ue)throw new RangeError('"offset" is outside of buffer bounds');if(et.byteLength<Ue+(ze||0))throw new RangeError('"length" is outside of buffer bounds');var rt;return Ue===void 0&&ze===void 0?rt=new Uint8Array(et):ze===void 0?rt=new Uint8Array(et,Ue):rt=new Uint8Array(et,Ue,ze),Object.setPrototypeOf(rt,c.prototype),rt}function o(et){if(c.isBuffer(et)){var Ue=R(et.length)|0,ze=E(Ue);return ze.length===0||et.copy(ze,0,0,Ue),ze}if(et.length!==void 0)return typeof et.length!="number"||pt(et.length)?E(0):A(et);if(et.type==="Buffer"&&Array.isArray(et.data))return A(et.data)}function R(et){if(et>=b)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+b.toString(16)+" bytes");return et|0}function T(et){return+et!=et&&(et=0),c.alloc(+et)}c.isBuffer=function(Ue){return Ue!=null&&Ue._isBuffer===!0&&Ue!==c.prototype},c.compare=function(Ue,ze){if(nt(Ue,Uint8Array)&&(Ue=c.from(Ue,Ue.offset,Ue.byteLength)),nt(ze,Uint8Array)&&(ze=c.from(ze,ze.offset,ze.byteLength)),!c.isBuffer(Ue)||!c.isBuffer(ze))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Ue===ze)return 0;for(var rt=Ue.length,lt=ze.length,Qe=0,Fe=Math.min(rt,lt);Qe<Fe;++Qe)if(Ue[Qe]!==ze[Qe]){rt=Ue[Qe],lt=ze[Qe];break}return rt<lt?-1:lt<rt?1:0},c.isEncoding=function(Ue){switch(String(Ue).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(Ue,ze){if(!Array.isArray(Ue))throw new TypeError('"list" argument must be an Array of Buffers');if(Ue.length===0)return c.alloc(0);var rt;if(ze===void 0)for(ze=0,rt=0;rt<Ue.length;++rt)ze+=Ue[rt].length;var lt=c.allocUnsafe(ze),Qe=0;for(rt=0;rt<Ue.length;++rt){var Fe=Ue[rt];if(nt(Fe,Uint8Array))Qe+Fe.length>lt.length?(c.isBuffer(Fe)||(Fe=c.from(Fe)),Fe.copy(lt,Qe)):Uint8Array.prototype.set.call(lt,Fe,Qe);else if(c.isBuffer(Fe))Fe.copy(lt,Qe);else throw new TypeError('"list" argument must be an Array of Buffers');Qe+=Fe.length}return lt};function O(et,Ue){if(c.isBuffer(et))return et.length;if(ArrayBuffer.isView(et)||nt(et,ArrayBuffer))return et.byteLength;if(typeof et!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+i(et));var ze=et.length,rt=arguments.length>2&&arguments[2]===!0;if(!rt&&ze===0)return 0;for(var lt=!1;;)switch(Ue){case"ascii":case"latin1":case"binary":return ze;case"utf8":case"utf-8":return Ne(et).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ze*2;case"hex":return ze>>>1;case"base64":return st(et).length;default:if(lt)return rt?-1:Ne(et).length;Ue=(""+Ue).toLowerCase(),lt=!0}}c.byteLength=O;function N(et,Ue,ze){var rt=!1;if((Ue===void 0||Ue<0)&&(Ue=0),Ue>this.length||((ze===void 0||ze>this.length)&&(ze=this.length),ze<=0)||(ze>>>=0,Ue>>>=0,ze<=Ue))return"";for(et||(et="utf8");;)switch(et){case"hex":return Q(this,Ue,ze);case"utf8":case"utf-8":return se(this,Ue,ze);case"ascii":return j(this,Ue,ze);case"latin1":case"binary":return Z(this,Ue,ze);case"base64":return ie(this,Ue,ze);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue(this,Ue,ze);default:if(rt)throw new TypeError("Unknown encoding: "+et);et=(et+"").toLowerCase(),rt=!0}}c.prototype._isBuffer=!0;function H(et,Ue,ze){var rt=et[Ue];et[Ue]=et[ze],et[ze]=rt}c.prototype.swap16=function(){var Ue=this.length;if(Ue%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ze=0;ze<Ue;ze+=2)H(this,ze,ze+1);return this},c.prototype.swap32=function(){var Ue=this.length;if(Ue%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var ze=0;ze<Ue;ze+=4)H(this,ze,ze+3),H(this,ze+1,ze+2);return this},c.prototype.swap64=function(){var Ue=this.length;if(Ue%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var ze=0;ze<Ue;ze+=8)H(this,ze,ze+7),H(this,ze+1,ze+6),H(this,ze+2,ze+5),H(this,ze+3,ze+4);return this},c.prototype.toString=function(){var Ue=this.length;return Ue===0?"":arguments.length===0?se(this,0,Ue):N.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(Ue){if(!c.isBuffer(Ue))throw new TypeError("Argument must be a Buffer");return this===Ue?!0:c.compare(this,Ue)===0},c.prototype.inspect=function(){var Ue="",ze=B.INSPECT_MAX_BYTES;return Ue=this.toString("hex",0,ze).replace(/(.{2})/g,"$1 ").trim(),this.length>ze&&(Ue+=" ... "),"<Buffer "+Ue+">"},h&&(c.prototype[h]=c.prototype.inspect),c.prototype.compare=function(Ue,ze,rt,lt,Qe){if(nt(Ue,Uint8Array)&&(Ue=c.from(Ue,Ue.offset,Ue.byteLength)),!c.isBuffer(Ue))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+i(Ue));if(ze===void 0&&(ze=0),rt===void 0&&(rt=Ue?Ue.length:0),lt===void 0&&(lt=0),Qe===void 0&&(Qe=this.length),ze<0||rt>Ue.length||lt<0||Qe>this.length)throw new RangeError("out of range index");if(lt>=Qe&&ze>=rt)return 0;if(lt>=Qe)return-1;if(ze>=rt)return 1;if(ze>>>=0,rt>>>=0,lt>>>=0,Qe>>>=0,this===Ue)return 0;for(var Fe=Qe-lt,Ce=rt-ze,pe=Math.min(Fe,Ce),we=this.slice(lt,Qe),Ae=Ue.slice(ze,rt),Pe=0;Pe<pe;++Pe)if(we[Pe]!==Ae[Pe]){Fe=we[Pe],Ce=Ae[Pe];break}return Fe<Ce?-1:Ce<Fe?1:0};function k(et,Ue,ze,rt,lt){if(et.length===0)return-1;if(typeof ze=="string"?(rt=ze,ze=0):ze>2147483647?ze=2147483647:ze<-2147483648&&(ze=-2147483648),ze=+ze,pt(ze)&&(ze=lt?0:et.length-1),ze<0&&(ze=et.length+ze),ze>=et.length){if(lt)return-1;ze=et.length-1}else if(ze<0)if(lt)ze=0;else return-1;if(typeof Ue=="string"&&(Ue=c.from(Ue,rt)),c.isBuffer(Ue))return Ue.length===0?-1:V(et,Ue,ze,rt,lt);if(typeof Ue=="number")return Ue=Ue&255,typeof Uint8Array.prototype.indexOf=="function"?lt?Uint8Array.prototype.indexOf.call(et,Ue,ze):Uint8Array.prototype.lastIndexOf.call(et,Ue,ze):V(et,[Ue],ze,rt,lt);throw new TypeError("val must be string, number or Buffer")}function V(et,Ue,ze,rt,lt){var Qe=1,Fe=et.length,Ce=Ue.length;if(rt!==void 0&&(rt=String(rt).toLowerCase(),rt==="ucs2"||rt==="ucs-2"||rt==="utf16le"||rt==="utf-16le")){if(et.length<2||Ue.length<2)return-1;Qe=2,Fe/=2,Ce/=2,ze/=2}function pe(We,tt){return Qe===1?We[tt]:We.readUInt16BE(tt*Qe)}var we;if(lt){var Ae=-1;for(we=ze;we<Fe;we++)if(pe(et,we)===pe(Ue,Ae===-1?0:we-Ae)){if(Ae===-1&&(Ae=we),we-Ae+1===Ce)return Ae*Qe}else Ae!==-1&&(we-=we-Ae),Ae=-1}else for(ze+Ce>Fe&&(ze=Fe-Ce),we=ze;we>=0;we--){for(var Pe=!0,Ge=0;Ge<Ce;Ge++)if(pe(et,we+Ge)!==pe(Ue,Ge)){Pe=!1;break}if(Pe)return we}return-1}c.prototype.includes=function(Ue,ze,rt){return this.indexOf(Ue,ze,rt)!==-1},c.prototype.indexOf=function(Ue,ze,rt){return k(this,Ue,ze,rt,!0)},c.prototype.lastIndexOf=function(Ue,ze,rt){return k(this,Ue,ze,rt,!1)};function G(et,Ue,ze,rt){ze=Number(ze)||0;var lt=et.length-ze;rt?(rt=Number(rt),rt>lt&&(rt=lt)):rt=lt;var Qe=Ue.length;rt>Qe/2&&(rt=Qe/2);var Fe;for(Fe=0;Fe<rt;++Fe){var Ce=parseInt(Ue.substr(Fe*2,2),16);if(pt(Ce))return Fe;et[ze+Fe]=Ce}return Fe}function U(et,Ue,ze,rt){return it(Ne(Ue,et.length-ze),et,ze,rt)}function Y(et,Ue,ze,rt){return it(Xe(Ue),et,ze,rt)}function ee(et,Ue,ze,rt){return it(st(Ue),et,ze,rt)}function re(et,Ue,ze,rt){return it(ht(Ue,et.length-ze),et,ze,rt)}c.prototype.write=function(Ue,ze,rt,lt){if(ze===void 0)lt="utf8",rt=this.length,ze=0;else if(rt===void 0&&typeof ze=="string")lt=ze,rt=this.length,ze=0;else if(isFinite(ze))ze=ze>>>0,isFinite(rt)?(rt=rt>>>0,lt===void 0&&(lt="utf8")):(lt=rt,rt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Qe=this.length-ze;if((rt===void 0||rt>Qe)&&(rt=Qe),Ue.length>0&&(rt<0||ze<0)||ze>this.length)throw new RangeError("Attempt to write outside buffer bounds");lt||(lt="utf8");for(var Fe=!1;;)switch(lt){case"hex":return G(this,Ue,ze,rt);case"utf8":case"utf-8":return U(this,Ue,ze,rt);case"ascii":case"latin1":case"binary":return Y(this,Ue,ze,rt);case"base64":return ee(this,Ue,ze,rt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,Ue,ze,rt);default:if(Fe)throw new TypeError("Unknown encoding: "+lt);lt=(""+lt).toLowerCase(),Fe=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ie(et,Ue,ze){return Ue===0&&ze===et.length?f.fromByteArray(et):f.fromByteArray(et.slice(Ue,ze))}function se(et,Ue,ze){ze=Math.min(et.length,ze);for(var rt=[],lt=Ue;lt<ze;){var Qe=et[lt],Fe=null,Ce=Qe>239?4:Qe>223?3:Qe>191?2:1;if(lt+Ce<=ze){var pe=void 0,we=void 0,Ae=void 0,Pe=void 0;switch(Ce){case 1:Qe<128&&(Fe=Qe);break;case 2:pe=et[lt+1],(pe&192)===128&&(Pe=(Qe&31)<<6|pe&63,Pe>127&&(Fe=Pe));break;case 3:pe=et[lt+1],we=et[lt+2],(pe&192)===128&&(we&192)===128&&(Pe=(Qe&15)<<12|(pe&63)<<6|we&63,Pe>2047&&(Pe<55296||Pe>57343)&&(Fe=Pe));break;case 4:pe=et[lt+1],we=et[lt+2],Ae=et[lt+3],(pe&192)===128&&(we&192)===128&&(Ae&192)===128&&(Pe=(Qe&15)<<18|(pe&63)<<12|(we&63)<<6|Ae&63,Pe>65535&&Pe<1114112&&(Fe=Pe))}}Fe===null?(Fe=65533,Ce=1):Fe>65535&&(Fe-=65536,rt.push(Fe>>>10&1023|55296),Fe=56320|Fe&1023),rt.push(Fe),lt+=Ce}return q(rt)}var ce=4096;function q(et){var Ue=et.length;if(Ue<=ce)return String.fromCharCode.apply(String,et);for(var ze="",rt=0;rt<Ue;)ze+=String.fromCharCode.apply(String,et.slice(rt,rt+=ce));return ze}function j(et,Ue,ze){var rt="";ze=Math.min(et.length,ze);for(var lt=Ue;lt<ze;++lt)rt+=String.fromCharCode(et[lt]&127);return rt}function Z(et,Ue,ze){var rt="";ze=Math.min(et.length,ze);for(var lt=Ue;lt<ze;++lt)rt+=String.fromCharCode(et[lt]);return rt}function Q(et,Ue,ze){var rt=et.length;(!Ue||Ue<0)&&(Ue=0),(!ze||ze<0||ze>rt)&&(ze=rt);for(var lt="",Qe=Ue;Qe<ze;++Qe)lt+=Tt[et[Qe]];return lt}function ue(et,Ue,ze){for(var rt=et.slice(Ue,ze),lt="",Qe=0;Qe<rt.length-1;Qe+=2)lt+=String.fromCharCode(rt[Qe]+rt[Qe+1]*256);return lt}c.prototype.slice=function(Ue,ze){var rt=this.length;Ue=~~Ue,ze=ze===void 0?rt:~~ze,Ue<0?(Ue+=rt,Ue<0&&(Ue=0)):Ue>rt&&(Ue=rt),ze<0?(ze+=rt,ze<0&&(ze=0)):ze>rt&&(ze=rt),ze<Ue&&(ze=Ue);var lt=this.subarray(Ue,ze);return Object.setPrototypeOf(lt,c.prototype),lt};function fe(et,Ue,ze){if(et%1!==0||et<0)throw new RangeError("offset is not uint");if(et+Ue>ze)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(Ue,ze,rt){Ue=Ue>>>0,ze=ze>>>0,rt||fe(Ue,ze,this.length);for(var lt=this[Ue],Qe=1,Fe=0;++Fe<ze&&(Qe*=256);)lt+=this[Ue+Fe]*Qe;return lt},c.prototype.readUintBE=c.prototype.readUIntBE=function(Ue,ze,rt){Ue=Ue>>>0,ze=ze>>>0,rt||fe(Ue,ze,this.length);for(var lt=this[Ue+--ze],Qe=1;ze>0&&(Qe*=256);)lt+=this[Ue+--ze]*Qe;return lt},c.prototype.readUint8=c.prototype.readUInt8=function(Ue,ze){return Ue=Ue>>>0,ze||fe(Ue,1,this.length),this[Ue]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(Ue,ze){return Ue=Ue>>>0,ze||fe(Ue,2,this.length),this[Ue]|this[Ue+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(Ue,ze){return Ue=Ue>>>0,ze||fe(Ue,2,this.length),this[Ue]<<8|this[Ue+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(Ue,ze){return Ue=Ue>>>0,ze||fe(Ue,4,this.length),(this[Ue]|this[Ue+1]<<8|this[Ue+2]<<16)+this[Ue+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(Ue,ze){return Ue=Ue>>>0,ze||fe(Ue,4,this.length),this[Ue]*16777216+(this[Ue+1]<<16|this[Ue+2]<<8|this[Ue+3])},c.prototype.readBigUInt64LE=Et(function(Ue){Ue=Ue>>>0,Te(Ue,"offset");var ze=this[Ue],rt=this[Ue+7];(ze===void 0||rt===void 0)&&De(Ue,this.length-8);var lt=ze+this[++Ue]*Math.pow(2,8)+this[++Ue]*Math.pow(2,16)+this[++Ue]*Math.pow(2,24),Qe=this[++Ue]+this[++Ue]*Math.pow(2,8)+this[++Ue]*Math.pow(2,16)+rt*Math.pow(2,24);return BigInt(lt)+(BigInt(Qe)<<BigInt(32))}),c.prototype.readBigUInt64BE=Et(function(Ue){Ue=Ue>>>0,Te(Ue,"offset");var ze=this[Ue],rt=this[Ue+7];(ze===void 0||rt===void 0)&&De(Ue,this.length-8);var lt=ze*Math.pow(2,24)+this[++Ue]*Math.pow(2,16)+this[++Ue]*Math.pow(2,8)+this[++Ue],Qe=this[++Ue]*Math.pow(2,24)+this[++Ue]*Math.pow(2,16)+this[++Ue]*Math.pow(2,8)+rt;return(BigInt(lt)<<BigInt(32))+BigInt(Qe)}),c.prototype.readIntLE=function(Ue,ze,rt){Ue=Ue>>>0,ze=ze>>>0,rt||fe(Ue,ze,this.length);for(var lt=this[Ue],Qe=1,Fe=0;++Fe<ze&&(Qe*=256);)lt+=this[Ue+Fe]*Qe;return Qe*=128,lt>=Qe&&(lt-=Math.pow(2,8*ze)),lt},c.prototype.readIntBE=function(Ue,ze,rt){Ue=Ue>>>0,ze=ze>>>0,rt||fe(Ue,ze,this.length);for(var lt=ze,Qe=1,Fe=this[Ue+--lt];lt>0&&(Qe*=256);)Fe+=this[Ue+--lt]*Qe;return Qe*=128,Fe>=Qe&&(Fe-=Math.pow(2,8*ze)),Fe},c.prototype.readInt8=function(Ue,ze){return Ue=Ue>>>0,ze||fe(Ue,1,this.length),this[Ue]&128?(255-this[Ue]+1)*-1:this[Ue]},c.prototype.readInt16LE=function(Ue,ze){Ue=Ue>>>0,ze||fe(Ue,2,this.length);var rt=this[Ue]|this[Ue+1]<<8;return rt&32768?rt|4294901760:rt},c.prototype.readInt16BE=function(Ue,ze){Ue=Ue>>>0,ze||fe(Ue,2,this.length);var rt=this[Ue+1]|this[Ue]<<8;return rt&32768?rt|4294901760:rt},c.prototype.readInt32LE=function(Ue,ze){return Ue=Ue>>>0,ze||fe(Ue,4,this.length),this[Ue]|this[Ue+1]<<8|this[Ue+2]<<16|this[Ue+3]<<24},c.prototype.readInt32BE=function(Ue,ze){return Ue=Ue>>>0,ze||fe(Ue,4,this.length),this[Ue]<<24|this[Ue+1]<<16|this[Ue+2]<<8|this[Ue+3]},c.prototype.readBigInt64LE=Et(function(Ue){Ue=Ue>>>0,Te(Ue,"offset");var ze=this[Ue],rt=this[Ue+7];(ze===void 0||rt===void 0)&&De(Ue,this.length-8);var lt=this[Ue+4]+this[Ue+5]*Math.pow(2,8)+this[Ue+6]*Math.pow(2,16)+(rt<<24);return(BigInt(lt)<<BigInt(32))+BigInt(ze+this[++Ue]*Math.pow(2,8)+this[++Ue]*Math.pow(2,16)+this[++Ue]*Math.pow(2,24))}),c.prototype.readBigInt64BE=Et(function(Ue){Ue=Ue>>>0,Te(Ue,"offset");var ze=this[Ue],rt=this[Ue+7];(ze===void 0||rt===void 0)&&De(Ue,this.length-8);var lt=(ze<<24)+this[++Ue]*Math.pow(2,16)+this[++Ue]*Math.pow(2,8)+this[++Ue];return(BigInt(lt)<<BigInt(32))+BigInt(this[++Ue]*Math.pow(2,24)+this[++Ue]*Math.pow(2,16)+this[++Ue]*Math.pow(2,8)+rt)}),c.prototype.readFloatLE=function(Ue,ze){return Ue=Ue>>>0,ze||fe(Ue,4,this.length),g.read(this,Ue,!0,23,4)},c.prototype.readFloatBE=function(Ue,ze){return Ue=Ue>>>0,ze||fe(Ue,4,this.length),g.read(this,Ue,!1,23,4)},c.prototype.readDoubleLE=function(Ue,ze){return Ue=Ue>>>0,ze||fe(Ue,8,this.length),g.read(this,Ue,!0,52,8)},c.prototype.readDoubleBE=function(Ue,ze){return Ue=Ue>>>0,ze||fe(Ue,8,this.length),g.read(this,Ue,!1,52,8)};function te(et,Ue,ze,rt,lt,Qe){if(!c.isBuffer(et))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ue>lt||Ue<Qe)throw new RangeError('"value" argument is out of bounds');if(ze+rt>et.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(Ue,ze,rt,lt){if(Ue=+Ue,ze=ze>>>0,rt=rt>>>0,!lt){var Qe=Math.pow(2,8*rt)-1;te(this,Ue,ze,rt,Qe,0)}var Fe=1,Ce=0;for(this[ze]=Ue&255;++Ce<rt&&(Fe*=256);)this[ze+Ce]=Ue/Fe&255;return ze+rt},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(Ue,ze,rt,lt){if(Ue=+Ue,ze=ze>>>0,rt=rt>>>0,!lt){var Qe=Math.pow(2,8*rt)-1;te(this,Ue,ze,rt,Qe,0)}var Fe=rt-1,Ce=1;for(this[ze+Fe]=Ue&255;--Fe>=0&&(Ce*=256);)this[ze+Fe]=Ue/Ce&255;return ze+rt},c.prototype.writeUint8=c.prototype.writeUInt8=function(Ue,ze,rt){return Ue=+Ue,ze=ze>>>0,rt||te(this,Ue,ze,1,255,0),this[ze]=Ue&255,ze+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(Ue,ze,rt){return Ue=+Ue,ze=ze>>>0,rt||te(this,Ue,ze,2,65535,0),this[ze]=Ue&255,this[ze+1]=Ue>>>8,ze+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(Ue,ze,rt){return Ue=+Ue,ze=ze>>>0,rt||te(this,Ue,ze,2,65535,0),this[ze]=Ue>>>8,this[ze+1]=Ue&255,ze+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(Ue,ze,rt){return Ue=+Ue,ze=ze>>>0,rt||te(this,Ue,ze,4,4294967295,0),this[ze+3]=Ue>>>24,this[ze+2]=Ue>>>16,this[ze+1]=Ue>>>8,this[ze]=Ue&255,ze+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(Ue,ze,rt){return Ue=+Ue,ze=ze>>>0,rt||te(this,Ue,ze,4,4294967295,0),this[ze]=Ue>>>24,this[ze+1]=Ue>>>16,this[ze+2]=Ue>>>8,this[ze+3]=Ue&255,ze+4};function ne(et,Ue,ze,rt,lt){Le(Ue,rt,lt,et,ze,7);var Qe=Number(Ue&BigInt(4294967295));et[ze++]=Qe,Qe=Qe>>8,et[ze++]=Qe,Qe=Qe>>8,et[ze++]=Qe,Qe=Qe>>8,et[ze++]=Qe;var Fe=Number(Ue>>BigInt(32)&BigInt(4294967295));return et[ze++]=Fe,Fe=Fe>>8,et[ze++]=Fe,Fe=Fe>>8,et[ze++]=Fe,Fe=Fe>>8,et[ze++]=Fe,ze}function ve(et,Ue,ze,rt,lt){Le(Ue,rt,lt,et,ze,7);var Qe=Number(Ue&BigInt(4294967295));et[ze+7]=Qe,Qe=Qe>>8,et[ze+6]=Qe,Qe=Qe>>8,et[ze+5]=Qe,Qe=Qe>>8,et[ze+4]=Qe;var Fe=Number(Ue>>BigInt(32)&BigInt(4294967295));return et[ze+3]=Fe,Fe=Fe>>8,et[ze+2]=Fe,Fe=Fe>>8,et[ze+1]=Fe,Fe=Fe>>8,et[ze]=Fe,ze+8}c.prototype.writeBigUInt64LE=Et(function(Ue){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ne(this,Ue,ze,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=Et(function(Ue){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ve(this,Ue,ze,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(Ue,ze,rt,lt){if(Ue=+Ue,ze=ze>>>0,!lt){var Qe=Math.pow(2,8*rt-1);te(this,Ue,ze,rt,Qe-1,-Qe)}var Fe=0,Ce=1,pe=0;for(this[ze]=Ue&255;++Fe<rt&&(Ce*=256);)Ue<0&&pe===0&&this[ze+Fe-1]!==0&&(pe=1),this[ze+Fe]=(Ue/Ce>>0)-pe&255;return ze+rt},c.prototype.writeIntBE=function(Ue,ze,rt,lt){if(Ue=+Ue,ze=ze>>>0,!lt){var Qe=Math.pow(2,8*rt-1);te(this,Ue,ze,rt,Qe-1,-Qe)}var Fe=rt-1,Ce=1,pe=0;for(this[ze+Fe]=Ue&255;--Fe>=0&&(Ce*=256);)Ue<0&&pe===0&&this[ze+Fe+1]!==0&&(pe=1),this[ze+Fe]=(Ue/Ce>>0)-pe&255;return ze+rt},c.prototype.writeInt8=function(Ue,ze,rt){return Ue=+Ue,ze=ze>>>0,rt||te(this,Ue,ze,1,127,-128),Ue<0&&(Ue=255+Ue+1),this[ze]=Ue&255,ze+1},c.prototype.writeInt16LE=function(Ue,ze,rt){return Ue=+Ue,ze=ze>>>0,rt||te(this,Ue,ze,2,32767,-32768),this[ze]=Ue&255,this[ze+1]=Ue>>>8,ze+2},c.prototype.writeInt16BE=function(Ue,ze,rt){return Ue=+Ue,ze=ze>>>0,rt||te(this,Ue,ze,2,32767,-32768),this[ze]=Ue>>>8,this[ze+1]=Ue&255,ze+2},c.prototype.writeInt32LE=function(Ue,ze,rt){return Ue=+Ue,ze=ze>>>0,rt||te(this,Ue,ze,4,2147483647,-2147483648),this[ze]=Ue&255,this[ze+1]=Ue>>>8,this[ze+2]=Ue>>>16,this[ze+3]=Ue>>>24,ze+4},c.prototype.writeInt32BE=function(Ue,ze,rt){return Ue=+Ue,ze=ze>>>0,rt||te(this,Ue,ze,4,2147483647,-2147483648),Ue<0&&(Ue=4294967295+Ue+1),this[ze]=Ue>>>24,this[ze+1]=Ue>>>16,this[ze+2]=Ue>>>8,this[ze+3]=Ue&255,ze+4},c.prototype.writeBigInt64LE=Et(function(Ue){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ne(this,Ue,ze,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=Et(function(Ue){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ve(this,Ue,ze,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function le(et,Ue,ze,rt,lt,Qe){if(ze+rt>et.length)throw new RangeError("Index out of range");if(ze<0)throw new RangeError("Index out of range")}function xe(et,Ue,ze,rt,lt){return Ue=+Ue,ze=ze>>>0,lt||le(et,Ue,ze,4),g.write(et,Ue,ze,rt,23,4),ze+4}c.prototype.writeFloatLE=function(Ue,ze,rt){return xe(this,Ue,ze,!0,rt)},c.prototype.writeFloatBE=function(Ue,ze,rt){return xe(this,Ue,ze,!1,rt)};function Se(et,Ue,ze,rt,lt){return Ue=+Ue,ze=ze>>>0,lt||le(et,Ue,ze,8),g.write(et,Ue,ze,rt,52,8),ze+8}c.prototype.writeDoubleLE=function(Ue,ze,rt){return Se(this,Ue,ze,!0,rt)},c.prototype.writeDoubleBE=function(Ue,ze,rt){return Se(this,Ue,ze,!1,rt)},c.prototype.copy=function(Ue,ze,rt,lt){if(!c.isBuffer(Ue))throw new TypeError("argument should be a Buffer");if(rt||(rt=0),!lt&&lt!==0&&(lt=this.length),ze>=Ue.length&&(ze=Ue.length),ze||(ze=0),lt>0&&lt<rt&&(lt=rt),lt===rt||Ue.length===0||this.length===0)return 0;if(ze<0)throw new RangeError("targetStart out of bounds");if(rt<0||rt>=this.length)throw new RangeError("Index out of range");if(lt<0)throw new RangeError("sourceEnd out of bounds");lt>this.length&&(lt=this.length),Ue.length-ze<lt-rt&&(lt=Ue.length-ze+rt);var Qe=lt-rt;return this===Ue&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(ze,rt,lt):Uint8Array.prototype.set.call(Ue,this.subarray(rt,lt),ze),Qe},c.prototype.fill=function(Ue,ze,rt,lt){if(typeof Ue=="string"){if(typeof ze=="string"?(lt=ze,ze=0,rt=this.length):typeof rt=="string"&&(lt=rt,rt=this.length),lt!==void 0&&typeof lt!="string")throw new TypeError("encoding must be a string");if(typeof lt=="string"&&!c.isEncoding(lt))throw new TypeError("Unknown encoding: "+lt);if(Ue.length===1){var Qe=Ue.charCodeAt(0);(lt==="utf8"&&Qe<128||lt==="latin1")&&(Ue=Qe)}}else typeof Ue=="number"?Ue=Ue&255:typeof Ue=="boolean"&&(Ue=Number(Ue));if(ze<0||this.length<ze||this.length<rt)throw new RangeError("Out of range index");if(rt<=ze)return this;ze=ze>>>0,rt=rt===void 0?this.length:rt>>>0,Ue||(Ue=0);var Fe;if(typeof Ue=="number")for(Fe=ze;Fe<rt;++Fe)this[Fe]=Ue;else{var Ce=c.isBuffer(Ue)?Ue:c.from(Ue,lt),pe=Ce.length;if(pe===0)throw new TypeError('The value "'+Ue+'" is invalid for argument "value"');for(Fe=0;Fe<rt-ze;++Fe)this[Fe+ze]=Ce[Fe%pe]}return this};var Re={};function Ee(et,Ue,ze){Re[et]=function(rt){_(Qe,rt);var lt=v(Qe);function Qe(){var Fe;return d(this,Qe),Fe=lt.call(this),Object.defineProperty(r(Fe),"message",{value:Ue.apply(r(Fe),arguments),writable:!0,configurable:!0}),Fe.name="".concat(Fe.name," [").concat(et,"]"),Fe.stack,delete Fe.name,Fe}return a(Qe,[{key:"code",get:function(){return et},set:function(Ce){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Ce,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(et,"]: ").concat(this.message)}}]),Qe}(ze)}Ee("ERR_BUFFER_OUT_OF_BOUNDS",function(et){return et?"".concat(et," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),Ee("ERR_INVALID_ARG_TYPE",function(et,Ue){return'The "'.concat(et,'" argument must be of type number. Received type ').concat(i(Ue))},TypeError),Ee("ERR_OUT_OF_RANGE",function(et,Ue,ze){var rt='The value of "'.concat(et,'" is out of range.'),lt=ze;return Number.isInteger(ze)&&Math.abs(ze)>Math.pow(2,32)?lt=Oe(String(ze)):typeof ze=="bigint"&&(lt=String(ze),(ze>Math.pow(BigInt(2),BigInt(32))||ze<-Math.pow(BigInt(2),BigInt(32)))&&(lt=Oe(lt)),lt+="n"),rt+=" It must be ".concat(Ue,". Received ").concat(lt),rt},RangeError);function Oe(et){for(var Ue="",ze=et.length,rt=et[0]==="-"?1:0;ze>=rt+4;ze-=3)Ue="_".concat(et.slice(ze-3,ze)).concat(Ue);return"".concat(et.slice(0,ze)).concat(Ue)}function Be(et,Ue,ze){Te(Ue,"offset"),(et[Ue]===void 0||et[Ue+ze]===void 0)&&De(Ue,et.length-(ze+1))}function Le(et,Ue,ze,rt,lt,Qe){if(et>ze||et<Ue){var Fe=typeof Ue=="bigint"?"n":"",Ce;throw Qe>3?Ue===0||Ue===BigInt(0)?Ce=">= 0".concat(Fe," and < 2").concat(Fe," ** ").concat((Qe+1)*8).concat(Fe):Ce=">= -(2".concat(Fe," ** ").concat((Qe+1)*8-1).concat(Fe,") and < 2 ** ")+"".concat((Qe+1)*8-1).concat(Fe):Ce=">= ".concat(Ue).concat(Fe," and <= ").concat(ze).concat(Fe),new Re.ERR_OUT_OF_RANGE("value",Ce,et)}Be(rt,lt,Qe)}function Te(et,Ue){if(typeof et!="number")throw new Re.ERR_INVALID_ARG_TYPE(Ue,"number",et)}function De(et,Ue,ze){throw Math.floor(et)!==et?(Te(et,ze),new Re.ERR_OUT_OF_RANGE(ze||"offset","an integer",et)):Ue<0?new Re.ERR_BUFFER_OUT_OF_BOUNDS:new Re.ERR_OUT_OF_RANGE(ze||"offset",">= ".concat(ze?1:0," and <= ").concat(Ue),et)}var Ve=/[^+/0-9A-Za-z-_]/g;function Ye(et){if(et=et.split("=")[0],et=et.trim().replace(Ve,""),et.length<2)return"";for(;et.length%4!==0;)et=et+"=";return et}function Ne(et,Ue){Ue=Ue||1/0;for(var ze,rt=et.length,lt=null,Qe=[],Fe=0;Fe<rt;++Fe){if(ze=et.charCodeAt(Fe),ze>55295&&ze<57344){if(!lt){if(ze>56319){(Ue-=3)>-1&&Qe.push(239,191,189);continue}else if(Fe+1===rt){(Ue-=3)>-1&&Qe.push(239,191,189);continue}lt=ze;continue}if(ze<56320){(Ue-=3)>-1&&Qe.push(239,191,189),lt=ze;continue}ze=(lt-55296<<10|ze-56320)+65536}else lt&&(Ue-=3)>-1&&Qe.push(239,191,189);if(lt=null,ze<128){if((Ue-=1)<0)break;Qe.push(ze)}else if(ze<2048){if((Ue-=2)<0)break;Qe.push(ze>>6|192,ze&63|128)}else if(ze<65536){if((Ue-=3)<0)break;Qe.push(ze>>12|224,ze>>6&63|128,ze&63|128)}else if(ze<1114112){if((Ue-=4)<0)break;Qe.push(ze>>18|240,ze>>12&63|128,ze>>6&63|128,ze&63|128)}else throw new Error("Invalid code point")}return Qe}function Xe(et){for(var Ue=[],ze=0;ze<et.length;++ze)Ue.push(et.charCodeAt(ze)&255);return Ue}function ht(et,Ue){for(var ze,rt,lt,Qe=[],Fe=0;Fe<et.length&&!((Ue-=2)<0);++Fe)ze=et.charCodeAt(Fe),rt=ze>>8,lt=ze%256,Qe.push(lt),Qe.push(rt);return Qe}function st(et){return f.toByteArray(Ye(et))}function it(et,Ue,ze,rt){var lt;for(lt=0;lt<rt&&!(lt+ze>=Ue.length||lt>=et.length);++lt)Ue[lt+ze]=et[lt];return lt}function nt(et,Ue){return et instanceof Ue||et!=null&&et.constructor!=null&&et.constructor.name!=null&&et.constructor.name===Ue.name}function pt(et){return et!==et}var Tt=function(){for(var et="0123456789abcdef",Ue=new Array(256),ze=0;ze<16;++ze)for(var rt=ze*16,lt=0;lt<16;++lt)Ue[rt+lt]=et[ze]+et[lt];return Ue}();function Et(et){return typeof BigInt>"u"?Dt:et}function Dt(){throw new Error("BigInt not supported")}},35791:function(z){z.exports=P,z.exports.isMobile=P,z.exports.default=P;var B=/(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|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,e=/CrOS/,d=/android|ipad|playbook|silk/i;function P(a){a||(a={});var _=a.ua;if(!_&&typeof navigator<"u"&&(_=navigator.userAgent),_&&_.headers&&typeof _.headers["user-agent"]=="string"&&(_=_.headers["user-agent"]),typeof _!="string")return!1;var x=B.test(_)&&!e.test(_)||!!a.tablet&&d.test(_);return!x&&a.tablet&&a.featureDetect&&navigator&&navigator.maxTouchPoints>1&&_.indexOf("Macintosh")!==-1&&_.indexOf("Safari")!==-1&&(x=!0),x}},86781:function(z,B,e){e.r(B),e.d(B,{sankeyCenter:function(){return u},sankeyCircular:function(){return R},sankeyJustify:function(){return n},sankeyLeft:function(){return y},sankeyRight:function(){return r}});var d=e(33064),P=e(15140),a=e(45879),_=e(2502),x=e.n(_);function v(Ee){return Ee.target.depth}function y(Ee){return Ee.depth}function r(Ee,Oe){return Oe-1-Ee.height}function n(Ee,Oe){return Ee.sourceLinks.length?Ee.depth:Oe-1}function u(Ee){return Ee.targetLinks.length?Ee.depth:Ee.sourceLinks.length?(0,d.VV)(Ee.sourceLinks,v)-1:0}function i(Ee){return function(){return Ee}}var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ee){return typeof Ee}:function(Ee){return Ee&&typeof Symbol=="function"&&Ee.constructor===Symbol&&Ee!==Symbol.prototype?"symbol":typeof Ee};function g(Ee,Oe){return b(Ee.source,Oe.source)||Ee.index-Oe.index}function h(Ee,Oe){return b(Ee.target,Oe.target)||Ee.index-Oe.index}function b(Ee,Oe){return Ee.partOfCycle===Oe.partOfCycle?Ee.y0-Oe.y0:Ee.circularLinkType==="top"||Oe.circularLinkType==="bottom"?-1:1}function p(Ee){return Ee.value}function E(Ee){return(Ee.y0+Ee.y1)/2}function c(Ee){return E(Ee.source)}function l(Ee){return E(Ee.target)}function m(Ee){return Ee.index}function M(Ee){return Ee.nodes}function L(Ee){return Ee.links}function D(Ee,Oe){var Be=Ee.get(Oe);if(!Be)throw new Error("missing: "+Oe);return Be}function A(Ee,Oe){return Oe(Ee)}var C=25,S=10,o=.3;function R(){var Ee=0,Oe=0,Be=1,Le=1,Te=24,De,Ve=m,Ye=n,Ne=M,Xe=L,ht=32,st=2,it,nt=null;function pt(){var lt={nodes:Ne.apply(null,arguments),links:Xe.apply(null,arguments)};Tt(lt),T(lt,Ve,nt),Et(lt),Ue(lt),O(lt,Ve),ze(lt,ht,Ve),rt(lt);for(var Qe=4,Fe=0;Fe<Qe;Fe++)ne(lt,Le,Ve),ve(lt,Le,Ve),ue(lt,Oe,Le,Ve),ne(lt,Le,Ve),ve(lt,Le,Ve);return Re(lt,Oe,Le),U(lt,st,Le,Ve),lt}pt.nodeId=function(lt){return arguments.length?(Ve=typeof lt=="function"?lt:i(lt),pt):Ve},pt.nodeAlign=function(lt){return arguments.length?(Ye=typeof lt=="function"?lt:i(lt),pt):Ye},pt.nodeWidth=function(lt){return arguments.length?(Te=+lt,pt):Te},pt.nodePadding=function(lt){return arguments.length?(De=+lt,pt):De},pt.nodes=function(lt){return arguments.length?(Ne=typeof lt=="function"?lt:i(lt),pt):Ne},pt.links=function(lt){return arguments.length?(Xe=typeof lt=="function"?lt:i(lt),pt):Xe},pt.size=function(lt){return arguments.length?(Ee=Oe=0,Be=+lt[0],Le=+lt[1],pt):[Be-Ee,Le-Oe]},pt.extent=function(lt){return arguments.length?(Ee=+lt[0][0],Be=+lt[1][0],Oe=+lt[0][1],Le=+lt[1][1],pt):[[Ee,Oe],[Be,Le]]},pt.iterations=function(lt){return arguments.length?(ht=+lt,pt):ht},pt.circularLinkGap=function(lt){return arguments.length?(st=+lt,pt):st},pt.nodePaddingRatio=function(lt){return arguments.length?(it=+lt,pt):it},pt.sortNodes=function(lt){return arguments.length?(nt=lt,pt):nt},pt.update=function(lt){return O(lt,Ve),rt(lt),lt.links.forEach(function(Qe){Qe.circular&&(Qe.circularLinkType=Qe.y0+Qe.y1<Le?"top":"bottom",Qe.source.circularLinkType=Qe.circularLinkType,Qe.target.circularLinkType=Qe.circularLinkType)}),ne(lt,Le,Ve,!1),ve(lt,Le,Ve),U(lt,st,Le,Ve),lt};function Tt(lt){lt.nodes.forEach(function(Fe,Ce){Fe.index=Ce,Fe.sourceLinks=[],Fe.targetLinks=[]});var Qe=(0,P.UI)(lt.nodes,Ve);return lt.links.forEach(function(Fe,Ce){Fe.index=Ce;var pe=Fe.source,we=Fe.target;(typeof pe>"u"?"undefined":f(pe))!=="object"&&(pe=Fe.source=D(Qe,pe)),(typeof we>"u"?"undefined":f(we))!=="object"&&(we=Fe.target=D(Qe,we)),pe.sourceLinks.push(Fe),we.targetLinks.push(Fe)}),lt}function Et(lt){lt.nodes.forEach(function(Qe){Qe.partOfCycle=!1,Qe.value=Math.max((0,d.Sm)(Qe.sourceLinks,p),(0,d.Sm)(Qe.targetLinks,p)),Qe.sourceLinks.forEach(function(Fe){Fe.circular&&(Qe.partOfCycle=!0,Qe.circularLinkType=Fe.circularLinkType)}),Qe.targetLinks.forEach(function(Fe){Fe.circular&&(Qe.partOfCycle=!0,Qe.circularLinkType=Fe.circularLinkType)})})}function Dt(lt){var Qe=0,Fe=0,Ce=0,pe=0,we=(0,d.Fp)(lt.nodes,function(Ae){return Ae.column});return lt.links.forEach(function(Ae){Ae.circular&&(Ae.circularLinkType=="top"?Qe=Qe+Ae.width:Fe=Fe+Ae.width,Ae.target.column==0&&(pe=pe+Ae.width),Ae.source.column==we&&(Ce=Ce+Ae.width))}),Qe=Qe>0?Qe+C+S:Qe,Fe=Fe>0?Fe+C+S:Fe,Ce=Ce>0?Ce+C+S:Ce,pe=pe>0?pe+C+S:pe,{top:Qe,bottom:Fe,left:pe,right:Ce}}function et(lt,Qe){var Fe=(0,d.Fp)(lt.nodes,function(We){return We.column}),Ce=Be-Ee,pe=Le-Oe,we=Ce+Qe.right+Qe.left,Ae=pe+Qe.top+Qe.bottom,Pe=Ce/we,Ge=pe/Ae;return Ee=Ee*Pe+Qe.left,Be=Qe.right==0?Be:Be*Pe,Oe=Oe*Ge+Qe.top,Le=Le*Ge,lt.nodes.forEach(function(We){We.x0=Ee+We.column*((Be-Ee-Te)/Fe),We.x1=We.x0+Te}),Ge}function Ue(lt){var Qe,Fe,Ce;for(Qe=lt.nodes,Fe=[],Ce=0;Qe.length;++Ce,Qe=Fe,Fe=[])Qe.forEach(function(pe){pe.depth=Ce,pe.sourceLinks.forEach(function(we){Fe.indexOf(we.target)<0&&!we.circular&&Fe.push(we.target)})});for(Qe=lt.nodes,Fe=[],Ce=0;Qe.length;++Ce,Qe=Fe,Fe=[])Qe.forEach(function(pe){pe.height=Ce,pe.targetLinks.forEach(function(we){Fe.indexOf(we.source)<0&&!we.circular&&Fe.push(we.source)})});lt.nodes.forEach(function(pe){pe.column=Math.floor(Ye.call(null,pe,Ce))})}function ze(lt,Qe,Fe){var Ce=(0,P.b1)().key(function(We){return We.column}).sortKeys(d.j2).entries(lt.nodes).map(function(We){return We.values});Ae(Fe),Ge();for(var pe=1,we=Qe;we>0;--we)Pe(pe*=.99,Fe),Ge();function Ae(We){if(it){var tt=1/0;Ce.forEach(function(wt){var Bt=Le*it/(wt.length+1);tt=Bt<tt?Bt:tt}),De=tt}var ct=(0,d.VV)(Ce,function(wt){return(Le-Oe-(wt.length-1)*De)/(0,d.Sm)(wt,p)});ct=ct*o,lt.links.forEach(function(wt){wt.width=wt.value*ct});var St=Dt(lt),Pt=et(lt,St);ct=ct*Pt,lt.links.forEach(function(wt){wt.width=wt.value*ct}),Ce.forEach(function(wt){var Bt=wt.length;wt.forEach(function(Wt,hr){Wt.depth==Ce.length-1&&Bt==1||Wt.depth==0&&Bt==1?(Wt.y0=Le/2-Wt.value*ct,Wt.y1=Wt.y0+Wt.value*ct):Wt.partOfCycle?k(Wt,We)==0?(Wt.y0=Le/2+hr,Wt.y1=Wt.y0+Wt.value*ct):Wt.circularLinkType=="top"?(Wt.y0=Oe+hr,Wt.y1=Wt.y0+Wt.value*ct):(Wt.y0=Le-Wt.value*ct-hr,Wt.y1=Wt.y0+Wt.value*ct):St.top==0||St.bottom==0?(Wt.y0=(Le-Oe)/Bt*hr,Wt.y1=Wt.y0+Wt.value*ct):(Wt.y0=(Le-Oe)/2-Bt/2+hr,Wt.y1=Wt.y0+Wt.value*ct)})})}function Pe(We,tt){var ct=Ce.length;Ce.forEach(function(St){var Pt=St.length,wt=St[0].depth;St.forEach(function(Bt){var Wt;if((Bt.sourceLinks.length||Bt.targetLinks.length)&&!(Bt.partOfCycle&&k(Bt,tt)>0))if(wt==0&&Pt==1)Wt=Bt.y1-Bt.y0,Bt.y0=Le/2-Wt/2,Bt.y1=Le/2+Wt/2;else if(wt==ct-1&&Pt==1)Wt=Bt.y1-Bt.y0,Bt.y0=Le/2-Wt/2,Bt.y1=Le/2+Wt/2;else{var hr=0,gt=(0,d.J6)(Bt.sourceLinks,l),jt=(0,d.J6)(Bt.targetLinks,c);gt&&jt?hr=(gt+jt)/2:hr=gt||jt;var Ut=(hr-E(Bt))*We;Bt.y0+=Ut,Bt.y1+=Ut}})})}function Ge(){Ce.forEach(function(We){var tt,ct,St=Oe,Pt=We.length,wt;for(We.sort(b),wt=0;wt<Pt;++wt)tt=We[wt],ct=St-tt.y0,ct>0&&(tt.y0+=ct,tt.y1+=ct),St=tt.y1+De;if(ct=St-De-Le,ct>0)for(St=tt.y0-=ct,tt.y1-=ct,wt=Pt-2;wt>=0;--wt)tt=We[wt],ct=tt.y1+De-St,ct>0&&(tt.y0-=ct,tt.y1-=ct),St=tt.y0})}}function rt(lt){lt.nodes.forEach(function(Qe){Qe.sourceLinks.sort(h),Qe.targetLinks.sort(g)}),lt.nodes.forEach(function(Qe){var Fe=Qe.y0,Ce=Fe,pe=Qe.y1,we=pe;Qe.sourceLinks.forEach(function(Ae){Ae.circular?(Ae.y0=pe-Ae.width/2,pe=pe-Ae.width):(Ae.y0=Fe+Ae.width/2,Fe+=Ae.width)}),Qe.targetLinks.forEach(function(Ae){Ae.circular?(Ae.y1=we-Ae.width/2,we=we-Ae.width):(Ae.y1=Ce+Ae.width/2,Ce+=Ae.width)})})}return pt}function T(Ee,Oe,Be){var Le=0;if(Be===null){for(var Te=[],De=0;De<Ee.links.length;De++){var Ve=Ee.links[De],Ye=Ve.source.index,Ne=Ve.target.index;Te[Ye]||(Te[Ye]=[]),Te[Ne]||(Te[Ne]=[]),Te[Ye].indexOf(Ne)===-1&&Te[Ye].push(Ne)}var Xe=x()(Te);Xe.sort(function(nt,pt){return nt.length-pt.length});var ht={};for(De=0;De<Xe.length;De++){var st=Xe[De],it=st.slice(-2);ht[it[0]]||(ht[it[0]]={}),ht[it[0]][it[1]]=!0}Ee.links.forEach(function(nt){var pt=nt.target.index,Tt=nt.source.index;pt===Tt||ht[Tt]&&ht[Tt][pt]?(nt.circular=!0,nt.circularLinkID=Le,Le=Le+1):nt.circular=!1})}else Ee.links.forEach(function(nt){nt.source[Be]<nt.target[Be]?nt.circular=!1:(nt.circular=!0,nt.circularLinkID=Le,Le=Le+1)})}function O(Ee,Oe){var Be=0,Le=0;Ee.links.forEach(function(Te){Te.circular&&(Te.source.circularLinkType||Te.target.circularLinkType?Te.circularLinkType=Te.source.circularLinkType?Te.source.circularLinkType:Te.target.circularLinkType:Te.circularLinkType=Be<Le?"top":"bottom",Te.circularLinkType=="top"?Be=Be+1:Le=Le+1,Ee.nodes.forEach(function(De){(A(De,Oe)==A(Te.source,Oe)||A(De,Oe)==A(Te.target,Oe))&&(De.circularLinkType=Te.circularLinkType)}))}),Ee.links.forEach(function(Te){Te.circular&&(Te.source.circularLinkType==Te.target.circularLinkType&&(Te.circularLinkType=Te.source.circularLinkType),Se(Te,Oe)&&(Te.circularLinkType=Te.source.circularLinkType))})}function N(Ee){var Oe=Math.abs(Ee.y1-Ee.y0),Be=Math.abs(Ee.target.x0-Ee.source.x1);return Math.atan(Be/Oe)}function H(Ee,Oe){return Ee.source.column<Oe.target.column?!1:!(Ee.target.column>Oe.source.column)}function k(Ee,Oe){var Be=0;Ee.sourceLinks.forEach(function(Te){Be=Te.circular&&!Se(Te,Oe)?Be+1:Be});var Le=0;return Ee.targetLinks.forEach(function(Te){Le=Te.circular&&!Se(Te,Oe)?Le+1:Le}),Be+Le}function V(Ee){var Oe=Ee.source.sourceLinks,Be=0;Oe.forEach(function(De){Be=De.circular?Be+1:Be});var Le=Ee.target.targetLinks,Te=0;return Le.forEach(function(De){Te=De.circular?Te+1:Te}),!(Be>1||Te>1)}function G(Ee,Oe,Be){return Ee.sort(ee),Ee.forEach(function(Le,Te){var De=0;if(Se(Le,Be)&&V(Le))Le.circularPathData.verticalBuffer=De+Le.width/2;else{var Ve=0;for(Ve;Ve<Te;Ve++)if(H(Ee[Te],Ee[Ve])){var Ye=Ee[Ve].circularPathData.verticalBuffer+Ee[Ve].width/2+Oe;De=Ye>De?Ye:De}Le.circularPathData.verticalBuffer=De+Le.width/2}}),Ee}function U(Ee,Oe,Be,Le){var Te=5,De=(0,d.VV)(Ee.links,function(Ne){return Ne.source.y0});Ee.links.forEach(function(Ne){Ne.circular&&(Ne.circularPathData={})});var Ve=Ee.links.filter(function(Ne){return Ne.circularLinkType=="top"});G(Ve,Oe,Le);var Ye=Ee.links.filter(function(Ne){return Ne.circularLinkType=="bottom"});G(Ye,Oe,Le),Ee.links.forEach(function(Ne){if(Ne.circular){if(Ne.circularPathData.arcRadius=Ne.width+S,Ne.circularPathData.leftNodeBuffer=Te,Ne.circularPathData.rightNodeBuffer=Te,Ne.circularPathData.sourceWidth=Ne.source.x1-Ne.source.x0,Ne.circularPathData.sourceX=Ne.source.x0+Ne.circularPathData.sourceWidth,Ne.circularPathData.targetX=Ne.target.x0,Ne.circularPathData.sourceY=Ne.y0,Ne.circularPathData.targetY=Ne.y1,Se(Ne,Le)&&V(Ne))Ne.circularPathData.leftSmallArcRadius=S+Ne.width/2,Ne.circularPathData.leftLargeArcRadius=S+Ne.width/2,Ne.circularPathData.rightSmallArcRadius=S+Ne.width/2,Ne.circularPathData.rightLargeArcRadius=S+Ne.width/2,Ne.circularLinkType=="bottom"?(Ne.circularPathData.verticalFullExtent=Ne.source.y1+C+Ne.circularPathData.verticalBuffer,Ne.circularPathData.verticalLeftInnerExtent=Ne.circularPathData.verticalFullExtent-Ne.circularPathData.leftLargeArcRadius,Ne.circularPathData.verticalRightInnerExtent=Ne.circularPathData.verticalFullExtent-Ne.circularPathData.rightLargeArcRadius):(Ne.circularPathData.verticalFullExtent=Ne.source.y0-C-Ne.circularPathData.verticalBuffer,Ne.circularPathData.verticalLeftInnerExtent=Ne.circularPathData.verticalFullExtent+Ne.circularPathData.leftLargeArcRadius,Ne.circularPathData.verticalRightInnerExtent=Ne.circularPathData.verticalFullExtent+Ne.circularPathData.rightLargeArcRadius);else{var Xe=Ne.source.column,ht=Ne.circularLinkType,st=Ee.links.filter(function(pt){return pt.source.column==Xe&&pt.circularLinkType==ht});Ne.circularLinkType=="bottom"?st.sort(ie):st.sort(re);var it=0;st.forEach(function(pt,Tt){pt.circularLinkID==Ne.circularLinkID&&(Ne.circularPathData.leftSmallArcRadius=S+Ne.width/2+it,Ne.circularPathData.leftLargeArcRadius=S+Ne.width/2+Tt*Oe+it),it=it+pt.width}),Xe=Ne.target.column,st=Ee.links.filter(function(pt){return pt.target.column==Xe&&pt.circularLinkType==ht}),Ne.circularLinkType=="bottom"?st.sort(ce):st.sort(se),it=0,st.forEach(function(pt,Tt){pt.circularLinkID==Ne.circularLinkID&&(Ne.circularPathData.rightSmallArcRadius=S+Ne.width/2+it,Ne.circularPathData.rightLargeArcRadius=S+Ne.width/2+Tt*Oe+it),it=it+pt.width}),Ne.circularLinkType=="bottom"?(Ne.circularPathData.verticalFullExtent=Math.max(Be,Ne.source.y1,Ne.target.y1)+C+Ne.circularPathData.verticalBuffer,Ne.circularPathData.verticalLeftInnerExtent=Ne.circularPathData.verticalFullExtent-Ne.circularPathData.leftLargeArcRadius,Ne.circularPathData.verticalRightInnerExtent=Ne.circularPathData.verticalFullExtent-Ne.circularPathData.rightLargeArcRadius):(Ne.circularPathData.verticalFullExtent=De-C-Ne.circularPathData.verticalBuffer,Ne.circularPathData.verticalLeftInnerExtent=Ne.circularPathData.verticalFullExtent+Ne.circularPathData.leftLargeArcRadius,Ne.circularPathData.verticalRightInnerExtent=Ne.circularPathData.verticalFullExtent+Ne.circularPathData.rightLargeArcRadius)}Ne.circularPathData.leftInnerExtent=Ne.circularPathData.sourceX+Ne.circularPathData.leftNodeBuffer,Ne.circularPathData.rightInnerExtent=Ne.circularPathData.targetX-Ne.circularPathData.rightNodeBuffer,Ne.circularPathData.leftFullExtent=Ne.circularPathData.sourceX+Ne.circularPathData.leftLargeArcRadius+Ne.circularPathData.leftNodeBuffer,Ne.circularPathData.rightFullExtent=Ne.circularPathData.targetX-Ne.circularPathData.rightLargeArcRadius-Ne.circularPathData.rightNodeBuffer}if(Ne.circular)Ne.path=Y(Ne);else{var nt=(0,a.h5)().source(function(pt){var Tt=pt.source.x0+(pt.source.x1-pt.source.x0),Et=pt.y0;return[Tt,Et]}).target(function(pt){var Tt=pt.target.x0,Et=pt.y1;return[Tt,Et]});Ne.path=nt(Ne)}})}function Y(Ee){var Oe="";return Ee.circularLinkType=="top"?Oe="M"+Ee.circularPathData.sourceX+" "+Ee.circularPathData.sourceY+" L"+Ee.circularPathData.leftInnerExtent+" "+Ee.circularPathData.sourceY+" A"+Ee.circularPathData.leftLargeArcRadius+" "+Ee.circularPathData.leftSmallArcRadius+" 0 0 0 "+Ee.circularPathData.leftFullExtent+" "+(Ee.circularPathData.sourceY-Ee.circularPathData.leftSmallArcRadius)+" L"+Ee.circularPathData.leftFullExtent+" "+Ee.circularPathData.verticalLeftInnerExtent+" A"+Ee.circularPathData.leftLargeArcRadius+" "+Ee.circularPathData.leftLargeArcRadius+" 0 0 0 "+Ee.circularPathData.leftInnerExtent+" "+Ee.circularPathData.verticalFullExtent+" L"+Ee.circularPathData.rightInnerExtent+" "+Ee.circularPathData.verticalFullExtent+" A"+Ee.circularPathData.rightLargeArcRadius+" "+Ee.circularPathData.rightLargeArcRadius+" 0 0 0 "+Ee.circularPathData.rightFullExtent+" "+Ee.circularPathData.verticalRightInnerExtent+" L"+Ee.circularPathData.rightFullExtent+" "+(Ee.circularPathData.targetY-Ee.circularPathData.rightSmallArcRadius)+" A"+Ee.circularPathData.rightLargeArcRadius+" "+Ee.circularPathData.rightSmallArcRadius+" 0 0 0 "+Ee.circularPathData.rightInnerExtent+" "+Ee.circularPathData.targetY+" L"+Ee.circularPathData.targetX+" "+Ee.circularPathData.targetY:Oe="M"+Ee.circularPathData.sourceX+" "+Ee.circularPathData.sourceY+" L"+Ee.circularPathData.leftInnerExtent+" "+Ee.circularPathData.sourceY+" A"+Ee.circularPathData.leftLargeArcRadius+" "+Ee.circularPathData.leftSmallArcRadius+" 0 0 1 "+Ee.circularPathData.leftFullExtent+" "+(Ee.circularPathData.sourceY+Ee.circularPathData.leftSmallArcRadius)+" L"+Ee.circularPathData.leftFullExtent+" "+Ee.circularPathData.verticalLeftInnerExtent+" A"+Ee.circularPathData.leftLargeArcRadius+" "+Ee.circularPathData.leftLargeArcRadius+" 0 0 1 "+Ee.circularPathData.leftInnerExtent+" "+Ee.circularPathData.verticalFullExtent+" L"+Ee.circularPathData.rightInnerExtent+" "+Ee.circularPathData.verticalFullExtent+" A"+Ee.circularPathData.rightLargeArcRadius+" "+Ee.circularPathData.rightLargeArcRadius+" 0 0 1 "+Ee.circularPathData.rightFullExtent+" "+Ee.circularPathData.verticalRightInnerExtent+" L"+Ee.circularPathData.rightFullExtent+" "+(Ee.circularPathData.targetY+Ee.circularPathData.rightSmallArcRadius)+" A"+Ee.circularPathData.rightLargeArcRadius+" "+Ee.circularPathData.rightSmallArcRadius+" 0 0 1 "+Ee.circularPathData.rightInnerExtent+" "+Ee.circularPathData.targetY+" L"+Ee.circularPathData.targetX+" "+Ee.circularPathData.targetY,Oe}function ee(Ee,Oe){return q(Ee)==q(Oe)?Ee.circularLinkType=="bottom"?ie(Ee,Oe):re(Ee,Oe):q(Oe)-q(Ee)}function re(Ee,Oe){return Ee.y0-Oe.y0}function ie(Ee,Oe){return Oe.y0-Ee.y0}function se(Ee,Oe){return Ee.y1-Oe.y1}function ce(Ee,Oe){return Oe.y1-Ee.y1}function q(Ee){return Ee.target.column-Ee.source.column}function j(Ee){return Ee.target.x0-Ee.source.x1}function Z(Ee,Oe){var Be=N(Ee),Le=j(Oe)/Math.tan(Be),Te=xe(Ee)=="up"?Ee.y1+Le:Ee.y1-Le;return Te}function Q(Ee,Oe){var Be=N(Ee),Le=j(Oe)/Math.tan(Be),Te=xe(Ee)=="up"?Ee.y1-Le:Ee.y1+Le;return Te}function ue(Ee,Oe,Be,Le){Ee.links.forEach(function(Te){if(!Te.circular&&Te.target.column-Te.source.column>1){var De=Te.source.column+1,Ve=Te.target.column-1,Ye=1,Ne=Ve-De+1;for(Ye=1;De<=Ve;De++,Ye++)Ee.nodes.forEach(function(Xe){if(Xe.column==De){var ht=Ye/(Ne+1),st=Math.pow(1-ht,3),it=3*ht*Math.pow(1-ht,2),nt=3*Math.pow(ht,2)*(1-ht),pt=Math.pow(ht,3),Tt=st*Te.y0+it*Te.y0+nt*Te.y1+pt*Te.y1,Et=Tt-Te.width/2,Dt=Tt+Te.width/2,et;Et>Xe.y0&&Et<Xe.y1?(et=Xe.y1-Et+10,et=Xe.circularLinkType=="bottom"?et:-et,Xe=te(Xe,et,Oe,Be),Ee.nodes.forEach(function(Ue){A(Ue,Le)==A(Xe,Le)||Ue.column!=Xe.column||fe(Xe,Ue)&&te(Ue,et,Oe,Be)})):Dt>Xe.y0&&Dt<Xe.y1?(et=Dt-Xe.y0+10,Xe=te(Xe,et,Oe,Be),Ee.nodes.forEach(function(Ue){A(Ue,Le)==A(Xe,Le)||Ue.column!=Xe.column||Ue.y0<Xe.y1&&Ue.y1>Xe.y1&&te(Ue,et,Oe,Be)})):Et<Xe.y0&&Dt>Xe.y1&&(et=Dt-Xe.y0+10,Xe=te(Xe,et,Oe,Be),Ee.nodes.forEach(function(Ue){A(Ue,Le)==A(Xe,Le)||Ue.column!=Xe.column||Ue.y0<Xe.y1&&Ue.y1>Xe.y1&&te(Ue,et,Oe,Be)}))}})}})}function fe(Ee,Oe){return Ee.y0>Oe.y0&&Ee.y0<Oe.y1||Ee.y1>Oe.y0&&Ee.y1<Oe.y1?!0:Ee.y0<Oe.y0&&Ee.y1>Oe.y1}function te(Ee,Oe,Be,Le){return Ee.y0+Oe>=Be&&Ee.y1+Oe<=Le&&(Ee.y0=Ee.y0+Oe,Ee.y1=Ee.y1+Oe,Ee.targetLinks.forEach(function(Te){Te.y1=Te.y1+Oe}),Ee.sourceLinks.forEach(function(Te){Te.y0=Te.y0+Oe})),Ee}function ne(Ee,Oe,Be,Le){Ee.nodes.forEach(function(Te){Le&&Te.y+(Te.y1-Te.y0)>Oe&&(Te.y=Te.y-(Te.y+(Te.y1-Te.y0)-Oe));var De=Ee.links.filter(function(Ne){return A(Ne.source,Be)==A(Te,Be)}),Ve=De.length;Ve>1&&De.sort(function(Ne,Xe){if(!Ne.circular&&!Xe.circular){if(Ne.target.column==Xe.target.column)return Ne.y1-Xe.y1;if(le(Ne,Xe)){if(Ne.target.column>Xe.target.column){var ht=Q(Xe,Ne);return Ne.y1-ht}if(Xe.target.column>Ne.target.column){var st=Q(Ne,Xe);return st-Xe.y1}}else return Ne.y1-Xe.y1}if(Ne.circular&&!Xe.circular)return Ne.circularLinkType=="top"?-1:1;if(Xe.circular&&!Ne.circular)return Xe.circularLinkType=="top"?1:-1;if(Ne.circular&&Xe.circular)return Ne.circularLinkType===Xe.circularLinkType&&Ne.circularLinkType=="top"?Ne.target.column===Xe.target.column?Ne.target.y1-Xe.target.y1:Xe.target.column-Ne.target.column:Ne.circularLinkType===Xe.circularLinkType&&Ne.circularLinkType=="bottom"?Ne.target.column===Xe.target.column?Xe.target.y1-Ne.target.y1:Ne.target.column-Xe.target.column:Ne.circularLinkType=="top"?-1:1});var Ye=Te.y0;De.forEach(function(Ne){Ne.y0=Ye+Ne.width/2,Ye=Ye+Ne.width}),De.forEach(function(Ne,Xe){if(Ne.circularLinkType=="bottom"){var ht=Xe+1,st=0;for(ht;ht<Ve;ht++)st=st+De[ht].width;Ne.y0=Te.y1-st-Ne.width/2}})})}function ve(Ee,Oe,Be){Ee.nodes.forEach(function(Le){var Te=Ee.links.filter(function(Ye){return A(Ye.target,Be)==A(Le,Be)}),De=Te.length;De>1&&Te.sort(function(Ye,Ne){if(!Ye.circular&&!Ne.circular){if(Ye.source.column==Ne.source.column)return Ye.y0-Ne.y0;if(le(Ye,Ne)){if(Ne.source.column<Ye.source.column){var Xe=Z(Ne,Ye);return Ye.y0-Xe}if(Ye.source.column<Ne.source.column){var ht=Z(Ye,Ne);return ht-Ne.y0}}else return Ye.y0-Ne.y0}if(Ye.circular&&!Ne.circular)return Ye.circularLinkType=="top"?-1:1;if(Ne.circular&&!Ye.circular)return Ne.circularLinkType=="top"?1:-1;if(Ye.circular&&Ne.circular)return Ye.circularLinkType===Ne.circularLinkType&&Ye.circularLinkType=="top"?Ye.source.column===Ne.source.column?Ye.source.y1-Ne.source.y1:Ye.source.column-Ne.source.column:Ye.circularLinkType===Ne.circularLinkType&&Ye.circularLinkType=="bottom"?Ye.source.column===Ne.source.column?Ye.source.y1-Ne.source.y1:Ne.source.column-Ye.source.column:Ye.circularLinkType=="top"?-1:1});var Ve=Le.y0;Te.forEach(function(Ye){Ye.y1=Ve+Ye.width/2,Ve=Ve+Ye.width}),Te.forEach(function(Ye,Ne){if(Ye.circularLinkType=="bottom"){var Xe=Ne+1,ht=0;for(Xe;Xe<De;Xe++)ht=ht+Te[Xe].width;Ye.y1=Le.y1-ht-Ye.width/2}})})}function le(Ee,Oe){return xe(Ee)==xe(Oe)}function xe(Ee){return Ee.y0-Ee.y1>0?"up":"down"}function Se(Ee,Oe){return A(Ee.source,Oe)==A(Ee.target,Oe)}function Re(Ee,Oe,Be){var Le=Ee.nodes,Te=Ee.links,De=!1,Ve=!1;if(Te.forEach(function(it){it.circularLinkType=="top"?De=!0:it.circularLinkType=="bottom"&&(Ve=!0)}),De==!1||Ve==!1){var Ye=(0,d.VV)(Le,function(it){return it.y0}),Ne=(0,d.Fp)(Le,function(it){return it.y1}),Xe=Ne-Ye,ht=Be-Oe,st=ht/Xe;Le.forEach(function(it){var nt=(it.y1-it.y0)*st;it.y0=(it.y0-Ye)*st,it.y1=it.y0+nt}),Te.forEach(function(it){it.y0=(it.y0-Ye)*st,it.y1=(it.y1-Ye)*st,it.width=it.width*st})}}},30838:function(z,B,e){e.r(B),e.d(B,{sankey:function(){return m},sankeyCenter:function(){return y},sankeyJustify:function(){return v},sankeyLeft:function(){return _},sankeyLinkHorizontal:function(){return A},sankeyRight:function(){return x}});var d=e(33064),P=e(15140);function a(C){return C.target.depth}function _(C){return C.depth}function x(C,S){return S-1-C.height}function v(C,S){return C.sourceLinks.length?C.depth:S-1}function y(C){return C.targetLinks.length?C.depth:C.sourceLinks.length?(0,d.VV)(C.sourceLinks,a)-1:0}function r(C){return function(){return C}}function n(C,S){return i(C.source,S.source)||C.index-S.index}function u(C,S){return i(C.target,S.target)||C.index-S.index}function i(C,S){return C.y0-S.y0}function f(C){return C.value}function g(C){return(C.y0+C.y1)/2}function h(C){return g(C.source)*C.value}function b(C){return g(C.target)*C.value}function p(C){return C.index}function E(C){return C.nodes}function c(C){return C.links}function l(C,S){var o=C.get(S);if(!o)throw new Error("missing: "+S);return o}function m(){var C=0,S=0,o=1,R=1,T=24,O=8,N=p,H=v,k=E,V=c,G=32,U=2/3;function Y(){var q={nodes:k.apply(null,arguments),links:V.apply(null,arguments)};return ee(q),re(q),ie(q),se(q),ce(q),q}Y.update=function(q){return ce(q),q},Y.nodeId=function(q){return arguments.length?(N=typeof q=="function"?q:r(q),Y):N},Y.nodeAlign=function(q){return arguments.length?(H=typeof q=="function"?q:r(q),Y):H},Y.nodeWidth=function(q){return arguments.length?(T=+q,Y):T},Y.nodePadding=function(q){return arguments.length?(O=+q,Y):O},Y.nodes=function(q){return arguments.length?(k=typeof q=="function"?q:r(q),Y):k},Y.links=function(q){return arguments.length?(V=typeof q=="function"?q:r(q),Y):V},Y.size=function(q){return arguments.length?(C=S=0,o=+q[0],R=+q[1],Y):[o-C,R-S]},Y.extent=function(q){return arguments.length?(C=+q[0][0],o=+q[1][0],S=+q[0][1],R=+q[1][1],Y):[[C,S],[o,R]]},Y.iterations=function(q){return arguments.length?(G=+q,Y):G};function ee(q){q.nodes.forEach(function(Z,Q){Z.index=Q,Z.sourceLinks=[],Z.targetLinks=[]});var j=(0,P.UI)(q.nodes,N);q.links.forEach(function(Z,Q){Z.index=Q;var ue=Z.source,fe=Z.target;typeof ue!="object"&&(ue=Z.source=l(j,ue)),typeof fe!="object"&&(fe=Z.target=l(j,fe)),ue.sourceLinks.push(Z),fe.targetLinks.push(Z)})}function re(q){q.nodes.forEach(function(j){j.value=Math.max((0,d.Sm)(j.sourceLinks,f),(0,d.Sm)(j.targetLinks,f))})}function ie(q){var j,Z,Q;for(j=q.nodes,Z=[],Q=0;j.length;++Q,j=Z,Z=[])j.forEach(function(fe){fe.depth=Q,fe.sourceLinks.forEach(function(te){Z.indexOf(te.target)<0&&Z.push(te.target)})});for(j=q.nodes,Z=[],Q=0;j.length;++Q,j=Z,Z=[])j.forEach(function(fe){fe.height=Q,fe.targetLinks.forEach(function(te){Z.indexOf(te.source)<0&&Z.push(te.source)})});var ue=(o-C-T)/(Q-1);q.nodes.forEach(function(fe){fe.x1=(fe.x0=C+Math.max(0,Math.min(Q-1,Math.floor(H.call(null,fe,Q))))*ue)+T})}function se(q){var j=(0,P.b1)().key(function(ve){return ve.x0}).sortKeys(d.j2).entries(q.nodes).map(function(ve){return ve.values});ue(),ne();for(var Z=1,Q=G;Q>0;--Q)te(Z*=.99),ne(),fe(Z),ne();function ue(){var ve=(0,d.Fp)(j,function(Se){return Se.length}),le=U*(R-S)/(ve-1);O>le&&(O=le);var xe=(0,d.VV)(j,function(Se){return(R-S-(Se.length-1)*O)/(0,d.Sm)(Se,f)});j.forEach(function(Se){Se.forEach(function(Re,Ee){Re.y1=(Re.y0=Ee)+Re.value*xe})}),q.links.forEach(function(Se){Se.width=Se.value*xe})}function fe(ve){j.forEach(function(le){le.forEach(function(xe){if(xe.targetLinks.length){var Se=((0,d.Sm)(xe.targetLinks,h)/(0,d.Sm)(xe.targetLinks,f)-g(xe))*ve;xe.y0+=Se,xe.y1+=Se}})})}function te(ve){j.slice().reverse().forEach(function(le){le.forEach(function(xe){if(xe.sourceLinks.length){var Se=((0,d.Sm)(xe.sourceLinks,b)/(0,d.Sm)(xe.sourceLinks,f)-g(xe))*ve;xe.y0+=Se,xe.y1+=Se}})})}function ne(){j.forEach(function(ve){var le,xe,Se=S,Re=ve.length,Ee;for(ve.sort(i),Ee=0;Ee<Re;++Ee)le=ve[Ee],xe=Se-le.y0,xe>0&&(le.y0+=xe,le.y1+=xe),Se=le.y1+O;if(xe=Se-O-R,xe>0)for(Se=le.y0-=xe,le.y1-=xe,Ee=Re-2;Ee>=0;--Ee)le=ve[Ee],xe=le.y1+O-Se,xe>0&&(le.y0-=xe,le.y1-=xe),Se=le.y0})}}function ce(q){q.nodes.forEach(function(j){j.sourceLinks.sort(u),j.targetLinks.sort(n)}),q.nodes.forEach(function(j){var Z=j.y0,Q=Z;j.sourceLinks.forEach(function(ue){ue.y0=Z+ue.width/2,Z+=ue.width}),j.targetLinks.forEach(function(ue){ue.y1=Q+ue.width/2,Q+=ue.width})})}return Y}var M=e(45879);function L(C){return[C.source.x1,C.y0]}function D(C){return[C.target.x0,C.y1]}function A(){return(0,M.h5)().source(L).target(D)}},39898:function(z,B,e){var d,P;(function(){var a={version:"3.8.0"},_=[].slice,x=function(he){return _.call(he)},v=self.document;function y(he){return he&&(he.ownerDocument||he.document||he).documentElement}function r(he){return he&&(he.ownerDocument&&he.ownerDocument.defaultView||he.document&&he||he.defaultView)}if(v)try{x(v.documentElement.childNodes)[0].nodeType}catch{x=function(_e){for(var He=_e.length,qe=new Array(He);He--;)qe[He]=_e[He];return qe}}if(Date.now||(Date.now=function(){return+new Date}),v)try{v.createElement("DIV").style.setProperty("opacity",0,"")}catch{var n=this.Element.prototype,u=n.setAttribute,i=n.setAttributeNS,f=this.CSSStyleDeclaration.prototype,g=f.setProperty;n.setAttribute=function(_e,He){u.call(this,_e,He+"")},n.setAttributeNS=function(_e,He,qe){i.call(this,_e,He,qe+"")},f.setProperty=function(_e,He,qe){g.call(this,_e,He+"",qe)}}a.ascending=h;function h(he,_e){return he<_e?-1:he>_e?1:he>=_e?0:NaN}a.descending=function(he,_e){return _e<he?-1:_e>he?1:_e>=he?0:NaN},a.min=function(he,_e){var He=-1,qe=he.length,at,ft;if(arguments.length===1){for(;++He<qe;)if((ft=he[He])!=null&&ft>=ft){at=ft;break}for(;++He<qe;)(ft=he[He])!=null&&at>ft&&(at=ft)}else{for(;++He<qe;)if((ft=_e.call(he,he[He],He))!=null&&ft>=ft){at=ft;break}for(;++He<qe;)(ft=_e.call(he,he[He],He))!=null&&at>ft&&(at=ft)}return at},a.max=function(he,_e){var He=-1,qe=he.length,at,ft;if(arguments.length===1){for(;++He<qe;)if((ft=he[He])!=null&&ft>=ft){at=ft;break}for(;++He<qe;)(ft=he[He])!=null&&ft>at&&(at=ft)}else{for(;++He<qe;)if((ft=_e.call(he,he[He],He))!=null&&ft>=ft){at=ft;break}for(;++He<qe;)(ft=_e.call(he,he[He],He))!=null&&ft>at&&(at=ft)}return at},a.extent=function(he,_e){var He=-1,qe=he.length,at,ft,Ft;if(arguments.length===1){for(;++He<qe;)if((ft=he[He])!=null&&ft>=ft){at=Ft=ft;break}for(;++He<qe;)(ft=he[He])!=null&&(at>ft&&(at=ft),Ft<ft&&(Ft=ft))}else{for(;++He<qe;)if((ft=_e.call(he,he[He],He))!=null&&ft>=ft){at=Ft=ft;break}for(;++He<qe;)(ft=_e.call(he,he[He],He))!=null&&(at>ft&&(at=ft),Ft<ft&&(Ft=ft))}return[at,Ft]};function b(he){return he===null?NaN:+he}function p(he){return!isNaN(he)}a.sum=function(he,_e){var He=0,qe=he.length,at,ft=-1;if(arguments.length===1)for(;++ft<qe;)p(at=+he[ft])&&(He+=at);else for(;++ft<qe;)p(at=+_e.call(he,he[ft],ft))&&(He+=at);return He},a.mean=function(he,_e){var He=0,qe=he.length,at,ft=-1,Ft=qe;if(arguments.length===1)for(;++ft<qe;)p(at=b(he[ft]))?He+=at:--Ft;else for(;++ft<qe;)p(at=b(_e.call(he,he[ft],ft)))?He+=at:--Ft;if(Ft)return He/Ft},a.quantile=function(he,_e){var He=(he.length-1)*_e+1,qe=Math.floor(He),at=+he[qe-1],ft=He-qe;return ft?at+ft*(he[qe]-at):at},a.median=function(he,_e){var He=[],qe=he.length,at,ft=-1;if(arguments.length===1)for(;++ft<qe;)p(at=b(he[ft]))&&He.push(at);else for(;++ft<qe;)p(at=b(_e.call(he,he[ft],ft)))&&He.push(at);if(He.length)return a.quantile(He.sort(h),.5)},a.variance=function(he,_e){var He=he.length,qe=0,at,ft,Ft=0,xt=-1,Xt=0;if(arguments.length===1)for(;++xt<He;)p(at=b(he[xt]))&&(ft=at-qe,qe+=ft/++Xt,Ft+=ft*(at-qe));else for(;++xt<He;)p(at=b(_e.call(he,he[xt],xt)))&&(ft=at-qe,qe+=ft/++Xt,Ft+=ft*(at-qe));if(Xt>1)return Ft/(Xt-1)},a.deviation=function(){var he=a.variance.apply(this,arguments);return he&&Math.sqrt(he)};function E(he){return{left:function(_e,He,qe,at){for(arguments.length<3&&(qe=0),arguments.length<4&&(at=_e.length);qe<at;){var ft=qe+at>>>1;he(_e[ft],He)<0?qe=ft+1:at=ft}return qe},right:function(_e,He,qe,at){for(arguments.length<3&&(qe=0),arguments.length<4&&(at=_e.length);qe<at;){var ft=qe+at>>>1;he(_e[ft],He)>0?at=ft:qe=ft+1}return qe}}}var c=E(h);a.bisectLeft=c.left,a.bisect=a.bisectRight=c.right,a.bisector=function(he){return E(he.length===1?function(_e,He){return h(he(_e),He)}:he)},a.shuffle=function(he,_e,He){(qe=arguments.length)<3&&(He=he.length,qe<2&&(_e=0));for(var qe=He-_e,at,ft;qe;)ft=Math.random()*qe--|0,at=he[qe+_e],he[qe+_e]=he[ft+_e],he[ft+_e]=at;return he},a.permute=function(he,_e){for(var He=_e.length,qe=new Array(He);He--;)qe[He]=he[_e[He]];return qe},a.pairs=function(he){for(var _e=0,He=he.length-1,qe=he[0],at=new Array(He<0?0:He);_e<He;)at[_e]=[qe,qe=he[++_e]];return at},a.transpose=function(he){if(!(ft=he.length))return[];for(var _e=-1,He=a.min(he,l),qe=new Array(He);++_e<He;)for(var at=-1,ft,Ft=qe[_e]=new Array(ft);++at<ft;)Ft[at]=he[at][_e];return qe};function l(he){return he.length}a.zip=function(){return a.transpose(arguments)},a.keys=function(he){var _e=[];for(var He in he)_e.push(He);return _e},a.values=function(he){var _e=[];for(var He in he)_e.push(he[He]);return _e},a.entries=function(he){var _e=[];for(var He in he)_e.push({key:He,value:he[He]});return _e},a.merge=function(he){for(var _e=he.length,He,qe=-1,at=0,ft,Ft;++qe<_e;)at+=he[qe].length;for(ft=new Array(at);--_e>=0;)for(Ft=he[_e],He=Ft.length;--He>=0;)ft[--at]=Ft[He];return ft};var m=Math.abs;a.range=function(he,_e,He){if(arguments.length<3&&(He=1,arguments.length<2&&(_e=he,he=0)),(_e-he)/He===1/0)throw new Error("infinite range");var qe=[],at=M(m(He)),ft=-1,Ft;if(he*=at,_e*=at,He*=at,He<0)for(;(Ft=he+He*++ft)>_e;)qe.push(Ft/at);else for(;(Ft=he+He*++ft)<_e;)qe.push(Ft/at);return qe};function M(he){for(var _e=1;he*_e%1;)_e*=10;return _e}function L(he,_e){for(var He in _e)Object.defineProperty(he.prototype,He,{value:_e[He],enumerable:!1})}a.map=function(he,_e){var He=new D;if(he instanceof D)he.forEach(function(xt,Xt){He.set(xt,Xt)});else if(Array.isArray(he)){var qe=-1,at=he.length,ft;if(arguments.length===1)for(;++qe<at;)He.set(qe,he[qe]);else for(;++qe<at;)He.set(_e.call(he,ft=he[qe],qe),ft)}else for(var Ft in he)He.set(Ft,he[Ft]);return He};function D(){this._=Object.create(null)}var A="__proto__",C="\0";L(D,{has:R,get:function(he){return this._[S(he)]},set:function(he,_e){return this._[S(he)]=_e},remove:T,keys:O,values:function(){var he=[];for(var _e in this._)he.push(this._[_e]);return he},entries:function(){var he=[];for(var _e in this._)he.push({key:o(_e),value:this._[_e]});return he},size:N,empty:H,forEach:function(he){for(var _e in this._)he.call(this,o(_e),this._[_e])}});function S(he){return(he+="")===A||he[0]===C?C+he:he}function o(he){return(he+="")[0]===C?he.slice(1):he}function R(he){return S(he)in this._}function T(he){return(he=S(he))in this._&&delete this._[he]}function O(){var he=[];for(var _e in this._)he.push(o(_e));return he}function N(){var he=0;for(var _e in this._)++he;return he}function H(){for(var he in this._)return!1;return!0}a.nest=function(){var he={},_e=[],He=[],qe,at;function ft(xt,Xt,rr){if(rr>=_e.length)return at?at.call(he,Xt):qe?Xt.sort(qe):Xt;for(var ar=-1,Pr=Xt.length,Cr=_e[rr++],jr,en,Ir,Hr=new D,Xr;++ar<Pr;)(Xr=Hr.get(jr=Cr(en=Xt[ar])))?Xr.push(en):Hr.set(jr,[en]);return xt?(en=xt(),Ir=function(tn,un){en.set(tn,ft(xt,un,rr))}):(en={},Ir=function(tn,un){en[tn]=ft(xt,un,rr)}),Hr.forEach(Ir),en}function Ft(xt,Xt){if(Xt>=_e.length)return xt;var rr=[],ar=He[Xt++];return xt.forEach(function(Pr,Cr){rr.push({key:Pr,values:Ft(Cr,Xt)})}),ar?rr.sort(function(Pr,Cr){return ar(Pr.key,Cr.key)}):rr}return he.map=function(xt,Xt){return ft(Xt,xt,0)},he.entries=function(xt){return Ft(ft(a.map,xt,0),0)},he.key=function(xt){return _e.push(xt),he},he.sortKeys=function(xt){return He[_e.length-1]=xt,he},he.sortValues=function(xt){return qe=xt,he},he.rollup=function(xt){return at=xt,he},he},a.set=function(he){var _e=new k;if(he)for(var He=0,qe=he.length;He<qe;++He)_e.add(he[He]);return _e};function k(){this._=Object.create(null)}L(k,{has:R,add:function(he){return this._[S(he+="")]=!0,he},remove:T,values:O,size:N,empty:H,forEach:function(he){for(var _e in this._)he.call(this,o(_e))}}),a.behavior={};function V(he){return he}a.rebind=function(he,_e){for(var He=1,qe=arguments.length,at;++He<qe;)he[at=arguments[He]]=G(he,_e,_e[at]);return he};function G(he,_e,He){return function(){var qe=He.apply(_e,arguments);return qe===_e?he:qe}}function U(he,_e){if(_e in he)return _e;_e=_e.charAt(0).toUpperCase()+_e.slice(1);for(var He=0,qe=Y.length;He<qe;++He){var at=Y[He]+_e;if(at in he)return at}}var Y=["webkit","ms","moz","Moz","o","O"];function ee(){}a.dispatch=function(){for(var he=new re,_e=-1,He=arguments.length;++_e<He;)he[arguments[_e]]=ie(he);return he};function re(){}re.prototype.on=function(he,_e){var He=he.indexOf("."),qe="";if(He>=0&&(qe=he.slice(He+1),he=he.slice(0,He)),he)return arguments.length<2?this[he].on(qe):this[he].on(qe,_e);if(arguments.length===2){if(_e==null)for(he in this)this.hasOwnProperty(he)&&this[he].on(qe,null);return this}};function ie(he){var _e=[],He=new D;function qe(){for(var at=_e,ft=-1,Ft=at.length,xt;++ft<Ft;)(xt=at[ft].on)&&xt.apply(this,arguments);return he}return qe.on=function(at,ft){var Ft=He.get(at),xt;return arguments.length<2?Ft&&Ft.on:(Ft&&(Ft.on=null,_e=_e.slice(0,xt=_e.indexOf(Ft)).concat(_e.slice(xt+1)),He.remove(at)),ft&&_e.push(He.set(at,{on:ft})),he)},qe}a.event=null;function se(){a.event.preventDefault()}function ce(){for(var he=a.event,_e;_e=he.sourceEvent;)he=_e;return he}function q(he){for(var _e=new re,He=0,qe=arguments.length;++He<qe;)_e[arguments[He]]=ie(_e);return _e.of=function(at,ft){return function(Ft){try{var xt=Ft.sourceEvent=a.event;Ft.target=he,a.event=Ft,_e[Ft.type].apply(at,ft)}finally{a.event=xt}}},_e}a.requote=function(he){return he.replace(j,"\\$&")};var j=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Z={}.__proto__?function(he,_e){he.__proto__=_e}:function(he,_e){for(var He in _e)he[He]=_e[He]};function Q(he){return Z(he,ne),he}var ue=function(he,_e){return _e.querySelector(he)},fe=function(he,_e){return _e.querySelectorAll(he)},te=function(he,_e){var He=he.matches||he[U(he,"matchesSelector")];return te=function(qe,at){return He.call(qe,at)},te(he,_e)};typeof Sizzle=="function"&&(ue=function(he,_e){return Sizzle(he,_e)[0]||null},fe=Sizzle,te=Sizzle.matchesSelector),a.selection=function(){return a.select(v.documentElement)};var ne=a.selection.prototype=[];ne.select=function(he){var _e=[],He,qe,at,ft;he=ve(he);for(var Ft=-1,xt=this.length;++Ft<xt;){_e.push(He=[]),He.parentNode=(at=this[Ft]).parentNode;for(var Xt=-1,rr=at.length;++Xt<rr;)(ft=at[Xt])?(He.push(qe=he.call(ft,ft.__data__,Xt,Ft)),qe&&"__data__"in ft&&(qe.__data__=ft.__data__)):He.push(null)}return Q(_e)};function ve(he){return typeof he=="function"?he:function(){return ue(he,this)}}ne.selectAll=function(he){var _e=[],He,qe;he=le(he);for(var at=-1,ft=this.length;++at<ft;)for(var Ft=this[at],xt=-1,Xt=Ft.length;++xt<Xt;)(qe=Ft[xt])&&(_e.push(He=x(he.call(qe,qe.__data__,xt,at))),He.parentNode=qe);return Q(_e)};function le(he){return typeof he=="function"?he:function(){return fe(he,this)}}var xe="http://www.w3.org/1999/xhtml",Se={svg:"http://www.w3.org/2000/svg",xhtml:xe,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};a.ns={prefix:Se,qualify:function(he){var _e=he.indexOf(":"),He=he;return _e>=0&&(He=he.slice(0,_e))!=="xmlns"&&(he=he.slice(_e+1)),Se.hasOwnProperty(He)?{space:Se[He],local:he}:he}},ne.attr=function(he,_e){if(arguments.length<2){if(typeof he=="string"){var He=this.node();return he=a.ns.qualify(he),he.local?He.getAttributeNS(he.space,he.local):He.getAttribute(he)}for(_e in he)this.each(Re(_e,he[_e]));return this}return this.each(Re(he,_e))};function Re(he,_e){he=a.ns.qualify(he);function He(){this.removeAttribute(he)}function qe(){this.removeAttributeNS(he.space,he.local)}function at(){this.setAttribute(he,_e)}function ft(){this.setAttributeNS(he.space,he.local,_e)}function Ft(){var Xt=_e.apply(this,arguments);Xt==null?this.removeAttribute(he):this.setAttribute(he,Xt)}function xt(){var Xt=_e.apply(this,arguments);Xt==null?this.removeAttributeNS(he.space,he.local):this.setAttributeNS(he.space,he.local,Xt)}return _e==null?he.local?qe:He:typeof _e=="function"?he.local?xt:Ft:he.local?ft:at}function Ee(he){return he.trim().replace(/\s+/g," ")}ne.classed=function(he,_e){if(arguments.length<2){if(typeof he=="string"){var He=this.node(),qe=(he=Be(he)).length,at=-1;if(_e=He.classList){for(;++at<qe;)if(!_e.contains(he[at]))return!1}else for(_e=He.getAttribute("class");++at<qe;)if(!Oe(he[at]).test(_e))return!1;return!0}for(_e in he)this.each(Le(_e,he[_e]));return this}return this.each(Le(he,_e))};function Oe(he){return new RegExp("(?:^|\\s+)"+a.requote(he)+"(?:\\s+|$)","g")}function Be(he){return(he+"").trim().split(/^|\s+/)}function Le(he,_e){he=Be(he).map(Te);var He=he.length;function qe(){for(var ft=-1;++ft<He;)he[ft](this,_e)}function at(){for(var ft=-1,Ft=_e.apply(this,arguments);++ft<He;)he[ft](this,Ft)}return typeof _e=="function"?at:qe}function Te(he){var _e=Oe(he);return function(He,qe){if(at=He.classList)return qe?at.add(he):at.remove(he);var at=He.getAttribute("class")||"";qe?(_e.lastIndex=0,_e.test(at)||He.setAttribute("class",Ee(at+" "+he))):He.setAttribute("class",Ee(at.replace(_e," ")))}}ne.style=function(he,_e,He){var qe=arguments.length;if(qe<3){if(typeof he!="string"){qe<2&&(_e="");for(He in he)this.each(De(He,he[He],_e));return this}if(qe<2){var at=this.node();return r(at).getComputedStyle(at,null).getPropertyValue(he)}He=""}return this.each(De(he,_e,He))};function De(he,_e,He){function qe(){this.style.removeProperty(he)}function at(){this.style.setProperty(he,_e,He)}function ft(){var Ft=_e.apply(this,arguments);Ft==null?this.style.removeProperty(he):this.style.setProperty(he,Ft,He)}return _e==null?qe:typeof _e=="function"?ft:at}ne.property=function(he,_e){if(arguments.length<2){if(typeof he=="string")return this.node()[he];for(_e in he)this.each(Ve(_e,he[_e]));return this}return this.each(Ve(he,_e))};function Ve(he,_e){function He(){delete this[he]}function qe(){this[he]=_e}function at(){var ft=_e.apply(this,arguments);ft==null?delete this[he]:this[he]=ft}return _e==null?He:typeof _e=="function"?at:qe}ne.text=function(he){return arguments.length?this.each(typeof he=="function"?function(){var _e=he.apply(this,arguments);this.textContent=_e??""}:he==null?function(){this.textContent=""}:function(){this.textContent=he}):this.node().textContent},ne.html=function(he){return arguments.length?this.each(typeof he=="function"?function(){var _e=he.apply(this,arguments);this.innerHTML=_e??""}:he==null?function(){this.innerHTML=""}:function(){this.innerHTML=he}):this.node().innerHTML},ne.append=function(he){return he=Ye(he),this.select(function(){return this.appendChild(he.apply(this,arguments))})};function Ye(he){function _e(){var qe=this.ownerDocument,at=this.namespaceURI;return at===xe&&qe.documentElement.namespaceURI===xe?qe.createElement(he):qe.createElementNS(at,he)}function He(){return this.ownerDocument.createElementNS(he.space,he.local)}return typeof he=="function"?he:(he=a.ns.qualify(he)).local?He:_e}ne.insert=function(he,_e){return he=Ye(he),_e=ve(_e),this.select(function(){return this.insertBefore(he.apply(this,arguments),_e.apply(this,arguments)||null)})},ne.remove=function(){return this.each(Ne)};function Ne(){var he=this.parentNode;he&&he.removeChild(this)}ne.data=function(he,_e){var He=-1,qe=this.length,at,ft;if(!arguments.length){for(he=new Array(qe=(at=this[0]).length);++He<qe;)(ft=at[He])&&(he[He]=ft.__data__);return he}function Ft(ar,Pr){var Cr,jr=ar.length,en=Pr.length,Ir=Math.min(jr,en),Hr=new Array(en),Xr=new Array(en),tn=new Array(jr),un,Zr;if(_e){var Nn=new D,Wn=new Array(jr),Kn;for(Cr=-1;++Cr<jr;)(un=ar[Cr])&&(Nn.has(Kn=_e.call(un,un.__data__,Cr))?tn[Cr]=un:Nn.set(Kn,un),Wn[Cr]=Kn);for(Cr=-1;++Cr<en;)(un=Nn.get(Kn=_e.call(Pr,Zr=Pr[Cr],Cr)))?un!==!0&&(Hr[Cr]=un,un.__data__=Zr):Xr[Cr]=Xe(Zr),Nn.set(Kn,!0);for(Cr=-1;++Cr<jr;)Cr in Wn&&Nn.get(Wn[Cr])!==!0&&(tn[Cr]=ar[Cr])}else{for(Cr=-1;++Cr<Ir;)un=ar[Cr],Zr=Pr[Cr],un?(un.__data__=Zr,Hr[Cr]=un):Xr[Cr]=Xe(Zr);for(;Cr<en;++Cr)Xr[Cr]=Xe(Pr[Cr]);for(;Cr<jr;++Cr)tn[Cr]=ar[Cr]}Xr.update=Hr,Xr.parentNode=Hr.parentNode=tn.parentNode=ar.parentNode,xt.push(Xr),Xt.push(Hr),rr.push(tn)}var xt=nt([]),Xt=Q([]),rr=Q([]);if(typeof he=="function")for(;++He<qe;)Ft(at=this[He],he.call(at,at.parentNode.__data__,He));else for(;++He<qe;)Ft(at=this[He],he);return Xt.enter=function(){return xt},Xt.exit=function(){return rr},Xt};function Xe(he){return{__data__:he}}ne.datum=function(he){return arguments.length?this.property("__data__",he):this.property("__data__")},ne.filter=function(he){var _e=[],He,qe,at;typeof he!="function"&&(he=ht(he));for(var ft=0,Ft=this.length;ft<Ft;ft++){_e.push(He=[]),He.parentNode=(qe=this[ft]).parentNode;for(var xt=0,Xt=qe.length;xt<Xt;xt++)(at=qe[xt])&&he.call(at,at.__data__,xt,ft)&&He.push(at)}return Q(_e)};function ht(he){return function(){return te(this,he)}}ne.order=function(){for(var he=-1,_e=this.length;++he<_e;)for(var He=this[he],qe=He.length-1,at=He[qe],ft;--qe>=0;)(ft=He[qe])&&(at&&at!==ft.nextSibling&&at.parentNode.insertBefore(ft,at),at=ft);return this},ne.sort=function(he){he=st.apply(this,arguments);for(var _e=-1,He=this.length;++_e<He;)this[_e].sort(he);return this.order()};function st(he){return arguments.length||(he=h),function(_e,He){return _e&&He?he(_e.__data__,He.__data__):!_e-!He}}ne.each=function(he){return it(this,function(_e,He,qe){he.call(_e,_e.__data__,He,qe)})};function it(he,_e){for(var He=0,qe=he.length;He<qe;He++)for(var at=he[He],ft=0,Ft=at.length,xt;ft<Ft;ft++)(xt=at[ft])&&_e(xt,ft,He);return he}ne.call=function(he){var _e=x(arguments);return he.apply(_e[0]=this,_e),this},ne.empty=function(){return!this.node()},ne.node=function(){for(var he=0,_e=this.length;he<_e;he++)for(var He=this[he],qe=0,at=He.length;qe<at;qe++){var ft=He[qe];if(ft)return ft}return null},ne.size=function(){var he=0;return it(this,function(){++he}),he};function nt(he){return Z(he,pt),he}var pt=[];a.selection.enter=nt,a.selection.enter.prototype=pt,pt.append=ne.append,pt.empty=ne.empty,pt.node=ne.node,pt.call=ne.call,pt.size=ne.size,pt.select=function(he){for(var _e=[],He,qe,at,ft,Ft,xt=-1,Xt=this.length;++xt<Xt;){at=(ft=this[xt]).update,_e.push(He=[]),He.parentNode=ft.parentNode;for(var rr=-1,ar=ft.length;++rr<ar;)(Ft=ft[rr])?(He.push(at[rr]=qe=he.call(ft.parentNode,Ft.__data__,rr,xt)),qe.__data__=Ft.__data__):He.push(null)}return Q(_e)},pt.insert=function(he,_e){return arguments.length<2&&(_e=Tt(this)),ne.insert.call(this,he,_e)};function Tt(he){var _e,He;return function(qe,at,ft){var Ft=he[ft].update,xt=Ft.length,Xt;for(ft!=He&&(He=ft,_e=0),at>=_e&&(_e=at+1);!(Xt=Ft[_e])&&++_e<xt;);return Xt}}a.select=function(he){var _e;return typeof he=="string"?(_e=[ue(he,v)],_e.parentNode=v.documentElement):(_e=[he],_e.parentNode=y(he)),Q([_e])},a.selectAll=function(he){var _e;return typeof he=="string"?(_e=x(fe(he,v)),_e.parentNode=v.documentElement):(_e=x(he),_e.parentNode=null),Q([_e])},ne.on=function(he,_e,He){var qe=arguments.length;if(qe<3){if(typeof he!="string"){qe<2&&(_e=!1);for(He in he)this.each(Et(He,he[He],_e));return this}if(qe<2)return(qe=this.node()["__on"+he])&&qe._;He=!1}return this.each(Et(he,_e,He))};function Et(he,_e,He){var qe="__on"+he,at=he.indexOf("."),ft=et;at>0&&(he=he.slice(0,at));var Ft=Dt.get(he);Ft&&(he=Ft,ft=Ue);function xt(){var ar=this[qe];ar&&(this.removeEventListener(he,ar,ar.$),delete this[qe])}function Xt(){var ar=ft(_e,x(arguments));xt.call(this),this.addEventListener(he,this[qe]=ar,ar.$=He),ar._=_e}function rr(){var ar=new RegExp("^__on([^.]+)"+a.requote(he)+"$"),Pr;for(var Cr in this)if(Pr=Cr.match(ar)){var jr=this[Cr];this.removeEventListener(Pr[1],jr,jr.$),delete this[Cr]}}return at?_e?Xt:xt:_e?ee:rr}var Dt=a.map({mouseenter:"mouseover",mouseleave:"mouseout"});v&&Dt.forEach(function(he){"on"+he in v&&Dt.remove(he)});function et(he,_e){return function(He){var qe=a.event;a.event=He,_e[0]=this.__data__;try{he.apply(this,_e)}finally{a.event=qe}}}function Ue(he,_e){var He=et(he,_e);return function(qe){var at=this,ft=qe.relatedTarget;(!ft||ft!==at&&!(ft.compareDocumentPosition(at)&8))&&He.call(at,qe)}}var ze,rt=0;function lt(he){var _e=".dragsuppress-"+ ++rt,He="click"+_e,qe=a.select(r(he)).on("touchmove"+_e,se).on("dragstart"+_e,se).on("selectstart"+_e,se);if(ze==null&&(ze="onselectstart"in he?!1:U(he.style,"userSelect")),ze){var at=y(he).style,ft=at[ze];at[ze]="none"}return function(Ft){if(qe.on(_e,null),ze&&(at[ze]=ft),Ft){var xt=function(){qe.on(He,null)};qe.on(He,function(){se(),xt()},!0),setTimeout(xt,0)}}}a.mouse=function(he){return Fe(he,ce())};var Qe=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Fe(he,_e){_e.changedTouches&&(_e=_e.changedTouches[0]);var He=he.ownerSVGElement||he;if(He.createSVGPoint){var qe=He.createSVGPoint();if(Qe<0){var at=r(he);if(at.scrollX||at.scrollY){He=a.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var ft=He[0][0].getScreenCTM();Qe=!(ft.f||ft.e),He.remove()}}return Qe?(qe.x=_e.pageX,qe.y=_e.pageY):(qe.x=_e.clientX,qe.y=_e.clientY),qe=qe.matrixTransform(he.getScreenCTM().inverse()),[qe.x,qe.y]}var Ft=he.getBoundingClientRect();return[_e.clientX-Ft.left-he.clientLeft,_e.clientY-Ft.top-he.clientTop]}a.touch=function(he,_e,He){if(arguments.length<3&&(He=_e,_e=ce().changedTouches),_e){for(var qe=0,at=_e.length,ft;qe<at;++qe)if((ft=_e[qe]).identifier===He)return Fe(he,ft)}},a.behavior.drag=function(){var he=q(at,"drag","dragstart","dragend"),_e=null,He=ft(ee,a.mouse,r,"mousemove","mouseup"),qe=ft(Ce,a.touch,V,"touchmove","touchend");function at(){this.on("mousedown.drag",He).on("touchstart.drag",qe)}function ft(Ft,xt,Xt,rr,ar){return function(){var Pr=this,Cr=a.event.target.correspondingElement||a.event.target,jr=Pr.parentNode,en=he.of(Pr,arguments),Ir=0,Hr=Ft(),Xr=".drag"+(Hr==null?"":"-"+Hr),tn,un=a.select(Xt(Cr)).on(rr+Xr,Wn).on(ar+Xr,Kn),Zr=lt(Cr),Nn=xt(jr,Hr);_e?(tn=_e.apply(Pr,arguments),tn=[tn.x-Nn[0],tn.y-Nn[1]]):tn=[0,0],en({type:"dragstart"});function Wn(){var na=xt(jr,Hr),wa,ba;na&&(wa=na[0]-Nn[0],ba=na[1]-Nn[1],Ir|=wa|ba,Nn=na,en({type:"drag",x:na[0]+tn[0],y:na[1]+tn[1],dx:wa,dy:ba}))}function Kn(){xt(jr,Hr)&&(un.on(rr+Xr,null).on(ar+Xr,null),Zr(Ir),en({type:"dragend"}))}}}return at.origin=function(Ft){return arguments.length?(_e=Ft,at):_e},a.rebind(at,he,"on")};function Ce(){return a.event.changedTouches[0].identifier}a.touches=function(he,_e){return arguments.length<2&&(_e=ce().touches),_e?x(_e).map(function(He){var qe=Fe(he,He);return qe.identifier=He.identifier,qe}):[]};var pe=1e-6,we=pe*pe,Ae=Math.PI,Pe=2*Ae,Ge=Pe-pe,We=Ae/2,tt=Ae/180,ct=180/Ae;function St(he,_e,He){return(_e[0]-he[0])*(He[1]-he[1])-(_e[1]-he[1])*(He[0]-he[0])}function Pt(he){return he>1?We:he<-1?-We:Math.asin(he)}function wt(he){return((he=Math.exp(he))-1/he)/2}function Bt(he){return((he=Math.exp(he))+1/he)/2}function Wt(he){return((he=Math.exp(2*he))-1)/(he+1)}var hr=Math.SQRT2,gt=2,jt=4;a.interpolateZoom=function(he,_e){var He=he[0],qe=he[1],at=he[2],ft=_e[0],Ft=_e[1],xt=_e[2],Xt=ft-He,rr=Ft-qe,ar=Xt*Xt+rr*rr,Pr,Cr;if(ar<we)Cr=Math.log(xt/at)/hr,Pr=function(tn){return[He+tn*Xt,qe+tn*rr,at*Math.exp(hr*tn*Cr)]};else{var jr=Math.sqrt(ar),en=(xt*xt-at*at+jt*ar)/(2*at*gt*jr),Ir=(xt*xt-at*at-jt*ar)/(2*xt*gt*jr),Hr=Math.log(Math.sqrt(en*en+1)-en),Xr=Math.log(Math.sqrt(Ir*Ir+1)-Ir);Cr=(Xr-Hr)/hr,Pr=function(tn){var un=tn*Cr,Zr=Bt(Hr),Nn=at/(gt*jr)*(Zr*Wt(hr*un+Hr)-wt(Hr));return[He+Nn*Xt,qe+Nn*rr,at*Zr/Bt(hr*un+Hr)]}}return Pr.duration=Cr*1e3,Pr},a.behavior.zoom=function(){var he={x:0,y:0,k:1},_e,He,qe,at=[960,500],ft=Ut,Ft=250,xt=0,Xt="mousedown.zoom",rr="mousemove.zoom",ar="mouseup.zoom",Pr,Cr="touchstart.zoom",jr,en=q(un,"zoomstart","zoom","zoomend"),Ir,Hr,Xr,tn;ur||(ur="onwheel"in v?(or=function(){return-a.event.deltaY*(a.event.deltaMode?120:1)},"wheel"):"onmousewheel"in v?(or=function(){return a.event.wheelDelta},"mousewheel"):(or=function(){return-a.event.detail},"MozMousePixelScroll"));function un(Bn){Bn.on(Xt,Ha).on(ur+".zoom",si).on("dblclick.zoom",gi).on(Cr,ri)}un.event=function(Bn){Bn.each(function(){var Va=en.of(this,arguments),Ba=he;_r?a.select(this).transition().each("start.zoom",function(){he=this.__chart__||{x:0,y:0,k:1},ba(Va)}).tween("zoom:zoom",function(){var Ja=at[0],Ri=at[1],ji=He?He[0]:Ja/2,qi=He?He[1]:Ri/2,Mi=a.interpolateZoom([(ji-he.x)/he.k,(qi-he.y)/he.k,Ja/he.k],[(ji-Ba.x)/Ba.k,(qi-Ba.y)/Ba.k,Ja/Ba.k]);return function(mi){var ma=Mi(mi),Ca=Ja/ma[2];this.__chart__=he={x:ji-ma[0]*Ca,y:qi-ma[1]*Ca,k:Ca},Wa(Va)}}).each("interrupt.zoom",function(){Pa(Va)}).each("end.zoom",function(){Pa(Va)}):(this.__chart__=he,ba(Va),Wa(Va),Pa(Va))})},un.translate=function(Bn){return arguments.length?(he={x:+Bn[0],y:+Bn[1],k:he.k},wa(),un):[he.x,he.y]},un.scale=function(Bn){return arguments.length?(he={x:he.x,y:he.y,k:null},Wn(+Bn),wa(),un):he.k},un.scaleExtent=function(Bn){return arguments.length?(ft=Bn==null?Ut:[+Bn[0],+Bn[1]],un):ft},un.center=function(Bn){return arguments.length?(qe=Bn&&[+Bn[0],+Bn[1]],un):qe},un.size=function(Bn){return arguments.length?(at=Bn&&[+Bn[0],+Bn[1]],un):at},un.duration=function(Bn){return arguments.length?(Ft=+Bn,un):Ft},un.x=function(Bn){return arguments.length?(Hr=Bn,Ir=Bn.copy(),he={x:0,y:0,k:1},un):Hr},un.y=function(Bn){return arguments.length?(tn=Bn,Xr=Bn.copy(),he={x:0,y:0,k:1},un):tn};function Zr(Bn){return[(Bn[0]-he.x)/he.k,(Bn[1]-he.y)/he.k]}function Nn(Bn){return[Bn[0]*he.k+he.x,Bn[1]*he.k+he.y]}function Wn(Bn){he.k=Math.max(ft[0],Math.min(ft[1],Bn))}function Kn(Bn,Va){Va=Nn(Va),he.x+=Bn[0]-Va[0],he.y+=Bn[1]-Va[1]}function na(Bn,Va,Ba,Ja){Bn.__chart__={x:he.x,y:he.y,k:he.k},Wn(Math.pow(2,Ja)),Kn(He=Va,Ba),Bn=a.select(Bn),Ft>0&&(Bn=Bn.transition().duration(Ft)),Bn.call(un.event)}function wa(){Hr&&Hr.domain(Ir.range().map(function(Bn){return(Bn-he.x)/he.k}).map(Ir.invert)),tn&&tn.domain(Xr.range().map(function(Bn){return(Bn-he.y)/he.k}).map(Xr.invert))}function ba(Bn){xt++||Bn({type:"zoomstart"})}function Wa(Bn){wa(),Bn({type:"zoom",scale:he.k,translate:[he.x,he.y]})}function Pa(Bn){--xt||(Bn({type:"zoomend"}),He=null)}function Ha(){var Bn=this,Va=en.of(Bn,arguments),Ba=0,Ja=a.select(r(Bn)).on(rr,qi).on(ar,Mi),Ri=Zr(a.mouse(Bn)),ji=lt(Bn);Ht.call(Bn),ba(Va);function qi(){Ba=1,Kn(a.mouse(Bn),Ri),Wa(Va)}function Mi(){Ja.on(rr,null).on(ar,null),ji(Ba),Pa(Va)}}function ri(){var Bn=this,Va=en.of(Bn,arguments),Ba={},Ja=0,Ri,ji=".zoom-"+a.event.changedTouches[0].identifier,qi="touchmove"+ji,Mi="touchend"+ji,mi=[],ma=a.select(Bn),Ca=lt(Bn);Qi(),ba(Va),ma.on(Xt,null).on(Cr,Qi);function Ci(){var Oo=a.touches(Bn);return Ri=he.k,Oo.forEach(function(Fi){Fi.identifier in Ba&&(Ba[Fi.identifier]=Zr(Fi))}),Oo}function Qi(){var Oo=a.event.target;a.select(Oo).on(qi,ts).on(Mi,ho),mi.push(Oo);for(var Fi=a.event.changedTouches,ls=0,Ai=Fi.length;ls<Ai;++ls)Ba[Fi[ls].identifier]=null;var Ws=Ci(),us=Date.now();if(Ws.length===1){if(us-jr<500){var Qa=Ws[0];na(Bn,Qa,Ba[Qa.identifier],Math.floor(Math.log(he.k)/Math.LN2)+1),se()}jr=us}else if(Ws.length>1){var Qa=Ws[0],Li=Ws[1],yh=Qa[0]-Li[0],Pc=Qa[1]-Li[1];Ja=yh*yh+Pc*Pc}}function ts(){var Oo=a.touches(Bn),Fi,ls,Ai,Ws;Ht.call(Bn);for(var us=0,Qa=Oo.length;us<Qa;++us,Ws=null)if(Ai=Oo[us],Ws=Ba[Ai.identifier]){if(ls)break;Fi=Ai,ls=Ws}if(Ws){var Li=(Li=Ai[0]-Fi[0])*Li+(Li=Ai[1]-Fi[1])*Li,yh=Ja&&Math.sqrt(Li/Ja);Fi=[(Fi[0]+Ai[0])/2,(Fi[1]+Ai[1])/2],ls=[(ls[0]+Ws[0])/2,(ls[1]+Ws[1])/2],Wn(yh*Ri)}jr=null,Kn(Fi,ls),Wa(Va)}function ho(){if(a.event.touches.length){for(var Oo=a.event.changedTouches,Fi=0,ls=Oo.length;Fi<ls;++Fi)delete Ba[Oo[Fi].identifier];for(var Ai in Ba)return void Ci()}a.selectAll(mi).on(ji,null),ma.on(Xt,Ha).on(Cr,ri),Ca(),Pa(Va)}}function si(){var Bn=en.of(this,arguments);Pr?clearTimeout(Pr):(Ht.call(this),_e=Zr(He=qe||a.mouse(this)),ba(Bn)),Pr=setTimeout(function(){Pr=null,Pa(Bn)},50),se(),Wn(Math.pow(2,or()*.002)*he.k),Kn(He,_e),Wa(Bn)}function gi(){var Bn=a.mouse(this),Va=Math.log(he.k)/Math.LN2;na(this,Bn,Zr(Bn),a.event.shiftKey?Math.ceil(Va)-1:Math.floor(Va)+1)}return a.rebind(un,en,"on")};var Ut=[0,1/0],or,ur;a.color=dt;function dt(){}dt.prototype.toString=function(){return this.rgb()+""},a.hsl=ut;function ut(he,_e,He){return this instanceof ut?(this.h=+he,this.s=+_e,void(this.l=+He)):arguments.length<2?he instanceof ut?new ut(he.h,he.s,he.l):Tr(""+he,pr,ut):new ut(he,_e,He)}var yt=ut.prototype=new dt;yt.brighter=function(he){return he=Math.pow(.7,arguments.length?he:1),new ut(this.h,this.s,this.l/he)},yt.darker=function(he){return he=Math.pow(.7,arguments.length?he:1),new ut(this.h,this.s,he*this.l)},yt.rgb=function(){return Lt(this.h,this.s,this.l)};function Lt(he,_e,He){var qe,at;he=isNaN(he)?0:(he%=360)<0?he+360:he,_e=isNaN(_e)||_e<0?0:_e>1?1:_e,He=He<0?0:He>1?1:He,at=He<=.5?He*(1+_e):He+_e-He*_e,qe=2*He-at;function ft(xt){return xt>360?xt-=360:xt<0&&(xt+=360),xt<60?qe+(at-qe)*xt/60:xt<180?at:xt<240?qe+(at-qe)*(240-xt)/60:qe}function Ft(xt){return Math.round(ft(xt)*255)}return new fr(Ft(he+120),Ft(he),Ft(he-120))}a.hcl=Rt;function Rt(he,_e,He){return this instanceof Rt?(this.h=+he,this.c=+_e,void(this.l=+He)):arguments.length<2?he instanceof Rt?new Rt(he.h,he.c,he.l):he instanceof Zt?zt(he.l,he.a,he.b):zt((he=Kr((he=a.rgb(he)).r,he.g,he.b)).l,he.a,he.b):new Rt(he,_e,He)}var Nt=Rt.prototype=new dt;Nt.brighter=function(he){return new Rt(this.h,this.c,Math.min(100,this.l+qt*(arguments.length?he:1)))},Nt.darker=function(he){return new Rt(this.h,this.c,Math.max(0,this.l-qt*(arguments.length?he:1)))},Nt.rgb=function(){return Vt(this.h,this.c,this.l).rgb()};function Vt(he,_e,He){return isNaN(he)&&(he=0),isNaN(_e)&&(_e=0),new Zt(He,Math.cos(he*=tt)*_e,Math.sin(he)*_e)}a.lab=Zt;function Zt(he,_e,He){return this instanceof Zt?(this.l=+he,this.a=+_e,void(this.b=+He)):arguments.length<2?he instanceof Zt?new Zt(he.l,he.a,he.b):he instanceof Rt?Vt(he.h,he.c,he.l):Kr((he=fr(he)).r,he.g,he.b):new Zt(he,_e,He)}var qt=18,Jt=.95047,nr=1,Mr=1.08883,Ke=Zt.prototype=new dt;Ke.brighter=function(he){return new Zt(Math.min(100,this.l+qt*(arguments.length?he:1)),this.a,this.b)},Ke.darker=function(he){return new Zt(Math.max(0,this.l-qt*(arguments.length?he:1)),this.a,this.b)},Ke.rgb=function(){return Ze(this.l,this.a,this.b)};function Ze(he,_e,He){var qe=(he+16)/116,at=qe+_e/500,ft=qe-He/200;return at=kt(at)*Jt,qe=kt(qe)*nr,ft=kt(ft)*Mr,new fr(cr(3.2404542*at-1.5371385*qe-.4985314*ft),cr(-.969266*at+1.8760108*qe+.041556*ft),cr(.0556434*at-.2040259*qe+1.0572252*ft))}function zt(he,_e,He){return he>0?new Rt(Math.atan2(He,_e)*ct,Math.sqrt(_e*_e+He*He),he):new Rt(NaN,NaN,he)}function kt(he){return he>.206893034?he*he*he:(he-.13793103448275862)/7.787037}function Qt(he){return he>.008856?Math.pow(he,.3333333333333333):7.787037*he+.13793103448275862}function cr(he){return Math.round(255*(he<=.00304?12.92*he:1.055*Math.pow(he,.4166666666666667)-.055))}a.rgb=fr;function fr(he,_e,He){return this instanceof fr?(this.r=~~he,this.g=~~_e,void(this.b=~~He)):arguments.length<2?he instanceof fr?new fr(he.r,he.g,he.b):Tr(""+he,fr,Lt):new fr(he,_e,He)}function ir(he){return new fr(he>>16,he>>8&255,he&255)}function Yt(he){return ir(he)+""}var gr=fr.prototype=new dt;gr.brighter=function(he){he=Math.pow(.7,arguments.length?he:1);var _e=this.r,He=this.g,qe=this.b,at=30;return!_e&&!He&&!qe?new fr(at,at,at):(_e&&_e<at&&(_e=at),He&&He<at&&(He=at),qe&&qe<at&&(qe=at),new fr(Math.min(255,_e/he),Math.min(255,He/he),Math.min(255,qe/he)))},gr.darker=function(he){return he=Math.pow(.7,arguments.length?he:1),new fr(he*this.r,he*this.g,he*this.b)},gr.hsl=function(){return pr(this.r,this.g,this.b)},gr.toString=function(){return"#"+yr(this.r)+yr(this.g)+yr(this.b)};function yr(he){return he<16?"0"+Math.max(0,he).toString(16):Math.min(255,he).toString(16)}function Tr(he,_e,He){var qe=0,at=0,ft=0,Ft,xt,Xt;if(Ft=/([a-z]+)\((.*)\)/.exec(he=he.toLowerCase()),Ft)switch(xt=Ft[2].split(","),Ft[1]){case"hsl":return He(parseFloat(xt[0]),parseFloat(xt[1])/100,parseFloat(xt[2])/100);case"rgb":return _e(Nr(xt[0]),Nr(xt[1]),Nr(xt[2]))}return(Xt=Sn.get(he))?_e(Xt.r,Xt.g,Xt.b):(he!=null&&he.charAt(0)==="#"&&!isNaN(Xt=parseInt(he.slice(1),16))&&(he.length===4?(qe=(Xt&3840)>>4,qe=qe>>4|qe,at=Xt&240,at=at>>4|at,ft=Xt&15,ft=ft<<4|ft):he.length===7&&(qe=(Xt&16711680)>>16,at=(Xt&65280)>>8,ft=Xt&255)),_e(qe,at,ft))}function pr(he,_e,He){var qe=Math.min(he/=255,_e/=255,He/=255),at=Math.max(he,_e,He),ft=at-qe,Ft,xt,Xt=(at+qe)/2;return ft?(xt=Xt<.5?ft/(at+qe):ft/(2-at-qe),he==at?Ft=(_e-He)/ft+(_e<He?6:0):_e==at?Ft=(He-he)/ft+2:Ft=(he-_e)/ft+4,Ft*=60):(Ft=NaN,xt=Xt>0&&Xt<1?0:Ft),new ut(Ft,xt,Xt)}function Kr(he,_e,He){he=Or(he),_e=Or(_e),He=Or(He);var qe=Qt((.4124564*he+.3575761*_e+.1804375*He)/Jt),at=Qt((.2126729*he+.7151522*_e+.072175*He)/nr),ft=Qt((.0193339*he+.119192*_e+.9503041*He)/Mr);return Zt(116*at-16,500*(qe-at),200*(at-ft))}function Or(he){return(he/=255)<=.04045?he/12.92:Math.pow((he+.055)/1.055,2.4)}function Nr(he){var _e=parseFloat(he);return he.charAt(he.length-1)==="%"?Math.round(_e*2.55):_e}var Sn=a.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});Sn.forEach(function(he,_e){Sn.set(he,ir(_e))});function Jr(he){return typeof he=="function"?he:function(){return he}}a.functor=Jr,a.xhr=xn(V);function xn(he){return function(_e,He,qe){return arguments.length===2&&typeof He=="function"&&(qe=He,He=null),Dn(_e,He,he,qe)}}function Dn(he,_e,He,qe){var at={},ft=a.dispatch("beforesend","progress","load","error"),Ft={},xt=new XMLHttpRequest,Xt=null;self.XDomainRequest&&!("withCredentials"in xt)&&/^(http(s)?:)?\/\//.test(he)&&(xt=new XDomainRequest),"onload"in xt?xt.onload=xt.onerror=rr:xt.onreadystatechange=function(){xt.readyState>3&&rr()};function rr(){var ar=xt.status,Pr;if(!ar&&Ar(xt)||ar>=200&&ar<300||ar===304){try{Pr=He.call(at,xt)}catch(Cr){ft.error.call(at,Cr);return}ft.load.call(at,Pr)}else ft.error.call(at,xt)}return xt.onprogress=function(ar){var Pr=a.event;a.event=ar;try{ft.progress.call(at,xt)}finally{a.event=Pr}},at.header=function(ar,Pr){return ar=(ar+"").toLowerCase(),arguments.length<2?Ft[ar]:(Pr==null?delete Ft[ar]:Ft[ar]=Pr+"",at)},at.mimeType=function(ar){return arguments.length?(_e=ar==null?null:ar+"",at):_e},at.responseType=function(ar){return arguments.length?(Xt=ar,at):Xt},at.response=function(ar){return He=ar,at},["get","post"].forEach(function(ar){at[ar]=function(){return at.send.apply(at,[ar].concat(x(arguments)))}}),at.send=function(ar,Pr,Cr){if(arguments.length===2&&typeof Pr=="function"&&(Cr=Pr,Pr=null),xt.open(ar,he,!0),_e!=null&&!("accept"in Ft)&&(Ft.accept=_e+",*/*"),xt.setRequestHeader)for(var jr in Ft)xt.setRequestHeader(jr,Ft[jr]);return _e!=null&&xt.overrideMimeType&&xt.overrideMimeType(_e),Xt!=null&&(xt.responseType=Xt),Cr!=null&&at.on("error",Cr).on("load",function(en){Cr(null,en)}),ft.beforesend.call(at,xt),xt.send(Pr??null),at},at.abort=function(){return xt.abort(),at},a.rebind(at,ft,"on"),qe==null?at:at.get(mr(qe))}function mr(he){return he.length===1?function(_e,He){he(_e==null?He:null)}:he}function Ar(he){var _e=he.responseType;return _e&&_e!=="text"?he.response:he.responseText}a.dsv=function(he,_e){var He=new RegExp('["'+he+`
]`),qe=he.charCodeAt(0);function at(rr,ar,Pr){arguments.length<3&&(Pr=ar,ar=null);var Cr=Dn(rr,_e,ar==null?ft:Ft(ar),Pr);return Cr.row=function(jr){return arguments.length?Cr.response((ar=jr)==null?ft:Ft(jr)):ar},Cr}function ft(rr){return at.parse(rr.responseText)}function Ft(rr){return function(ar){return at.parse(ar.responseText,rr)}}at.parse=function(rr,ar){var Pr;return at.parseRows(rr,function(Cr,jr){if(Pr)return Pr(Cr,jr-1);var en=function(Ir){for(var Hr={},Xr=Cr.length,tn=0;tn<Xr;++tn)Hr[Cr[tn]]=Ir[tn];return Hr};Pr=ar?function(Ir,Hr){return ar(en(Ir),Hr)}:en})},at.parseRows=function(rr,ar){var Pr={},Cr={},jr=[],en=rr.length,Ir=0,Hr=0,Xr,tn;function un(){if(Ir>=en)return Cr;if(tn)return tn=!1,Pr;var Nn=Ir;if(rr.charCodeAt(Nn)===34){for(var Wn=Nn;Wn++<en;)if(rr.charCodeAt(Wn)===34){if(rr.charCodeAt(Wn+1)!==34)break;++Wn}Ir=Wn+2;var Kn=rr.charCodeAt(Wn+1);return Kn===13?(tn=!0,rr.charCodeAt(Wn+2)===10&&++Ir):Kn===10&&(tn=!0),rr.slice(Nn+1,Wn).replace(/""/g,'"')}for(;Ir<en;){var Kn=rr.charCodeAt(Ir++),na=1;if(Kn===10)tn=!0;else if(Kn===13)tn=!0,rr.charCodeAt(Ir)===10&&(++Ir,++na);else if(Kn!==qe)continue;return rr.slice(Nn,Ir-na)}return rr.slice(Nn)}for(;(Xr=un())!==Cr;){for(var Zr=[];Xr!==Pr&&Xr!==Cr;)Zr.push(Xr),Xr=un();ar&&(Zr=ar(Zr,Hr++))==null||jr.push(Zr)}return jr},at.format=function(rr){if(Array.isArray(rr[0]))return at.formatRows(rr);var ar=new k,Pr=[];return rr.forEach(function(Cr){for(var jr in Cr)ar.has(jr)||Pr.push(ar.add(jr))}),[Pr.map(Xt).join(he)].concat(rr.map(function(Cr){return Pr.map(function(jr){return Xt(Cr[jr])}).join(he)})).join(`
`)},at.formatRows=function(rr){return rr.map(xt).join(`
`)};function xt(rr){return rr.map(Xt).join(he)}function Xt(rr){return He.test(rr)?'"'+rr.replace(/\"/g,'""')+'"':rr}return at},a.csv=a.dsv(",","text/csv"),a.tsv=a.dsv(" ","text/tab-separated-values");var zr,Br,on,mn,Tn=this[U(this,"requestAnimationFrame")]||function(he){setTimeout(he,17)};a.timer=function(){An.apply(this,arguments)};function An(he,_e,He){var qe=arguments.length;qe<2&&(_e=0),qe<3&&(He=Date.now());var at=He+_e,ft={c:he,t:at,n:null};return Br?Br.n=ft:zr=ft,Br=ft,on||(mn=clearTimeout(mn),on=1,Tn(Fn)),ft}function Fn(){var he=Jn(),_e=ta()-he;_e>24?(isFinite(_e)&&(clearTimeout(mn),mn=setTimeout(Fn,_e)),on=0):(on=1,Tn(Fn))}a.timer.flush=function(){Jn(),ta()};function Jn(){for(var he=Date.now(),_e=zr;_e;)he>=_e.t&&_e.c(he-_e.t)&&(_e.c=null),_e=_e.n;return he}function ta(){for(var he,_e=zr,He=1/0;_e;)_e.c?(_e.t<He&&(He=_e.t),_e=(he=_e).n):_e=he?he.n=_e.n:zr=_e.n;return Br=he,He}a.round=function(he,_e){return _e?Math.round(he*(_e=Math.pow(10,_e)))/_e:Math.round(he)},a.geom={};function sa(he){return he[0]}function ha(he){return he[1]}a.geom.hull=function(he){var _e=sa,He=ha;if(arguments.length)return qe(he);function qe(at){if(at.length<3)return[];var ft=Jr(_e),Ft=Jr(He),xt,Xt=at.length,rr=[],ar=[];for(xt=0;xt<Xt;xt++)rr.push([+ft.call(this,at[xt],xt),+Ft.call(this,at[xt],xt),xt]);for(rr.sort(Dr),xt=0;xt<Xt;xt++)ar.push([rr[xt][0],-rr[xt][1]]);var Pr=la(rr),Cr=la(ar),jr=Cr[0]===Pr[0],en=Cr[Cr.length-1]===Pr[Pr.length-1],Ir=[];for(xt=Pr.length-1;xt>=0;--xt)Ir.push(at[rr[Pr[xt]][2]]);for(xt=+jr;xt<Cr.length-en;++xt)Ir.push(at[rr[Cr[xt]][2]]);return Ir}return qe.x=function(at){return arguments.length?(_e=at,qe):_e},qe.y=function(at){return arguments.length?(He=at,qe):He},qe};function la(he){for(var _e=he.length,He=[0,1],qe=2,at=2;at<_e;at++){for(;qe>1&&St(he[He[qe-2]],he[He[qe-1]],he[at])<=0;)--qe;He[qe++]=at}return He.slice(0,qe)}function Dr(he,_e){return he[0]-_e[0]||he[1]-_e[1]}a.geom.polygon=function(he){return Z(he,sn),he};var sn=a.geom.polygon.prototype=[];sn.area=function(){for(var he=-1,_e=this.length,He,qe=this[_e-1],at=0;++he<_e;)He=qe,qe=this[he],at+=He[1]*qe[0]-He[0]*qe[1];return at*.5},sn.centroid=function(he){var _e=-1,He=this.length,qe=0,at=0,ft,Ft=this[He-1],xt;for(arguments.length||(he=-1/(6*this.area()));++_e<He;)ft=Ft,Ft=this[_e],xt=ft[0]*Ft[1]-Ft[0]*ft[1],qe+=(ft[0]+Ft[0])*xt,at+=(ft[1]+Ft[1])*xt;return[qe*he,at*he]},sn.clip=function(he){for(var _e,He=Un(he),qe=-1,at=this.length-Un(this),ft,Ft,xt=this[at-1],Xt,rr,ar;++qe<at;){for(_e=he.slice(),he.length=0,Xt=this[qe],rr=_e[(Ft=_e.length-He)-1],ft=-1;++ft<Ft;)ar=_e[ft],nn(ar,xt,Xt)?(nn(rr,xt,Xt)||he.push(dn(rr,ar,xt,Xt)),he.push(ar)):nn(rr,xt,Xt)&&he.push(dn(rr,ar,xt,Xt)),rr=ar;He&&he.push(he[0]),xt=Xt}return he};function nn(he,_e,He){return(He[0]-_e[0])*(he[1]-_e[1])<(He[1]-_e[1])*(he[0]-_e[0])}function dn(he,_e,He,qe){var at=he[0],ft=He[0],Ft=_e[0]-at,xt=qe[0]-ft,Xt=he[1],rr=He[1],ar=_e[1]-Xt,Pr=qe[1]-rr,Cr=(xt*(Xt-rr)-Pr*(at-ft))/(Pr*Ft-xt*ar);return[at+Cr*Ft,Xt+Cr*ar]}function Un(he){var _e=he[0],He=he[he.length-1];return!(_e[0]-He[0]||_e[1]-He[1])}var Ln,Pn,Vn,aa=[],Da,$a,$t=[];function Sr(){Fo(this),this.edge=this.site=this.circle=null}function an(he){var _e=aa.pop()||new Sr;return _e.site=he,_e}function cn(he){Yn(he),Vn.remove(he),aa.push(he),Fo(he)}function hn(he){var _e=he.circle,He=_e.x,qe=_e.cy,at={x:He,y:qe},ft=he.P,Ft=he.N,xt=[he];cn(he);for(var Xt=ft;Xt.circle&&m(He-Xt.circle.x)<pe&&m(qe-Xt.circle.cy)<pe;)ft=Xt.P,xt.unshift(Xt),cn(Xt),Xt=ft;xt.unshift(Xt),Yn(Xt);for(var rr=Ft;rr.circle&&m(He-rr.circle.x)<pe&&m(qe-rr.circle.cy)<pe;)Ft=rr.N,xt.push(rr),cn(rr),rr=Ft;xt.push(rr),Yn(rr);var ar=xt.length,Pr;for(Pr=1;Pr<ar;++Pr)rr=xt[Pr],Xt=xt[Pr-1],ga(rr.edge,Xt.site,rr.site,at);Xt=xt[0],rr=xt[ar-1],rr.edge=ia(Xt.site,rr.site,null,at),kn(Xt),kn(rr)}function _n(he){for(var _e=he.x,He=he.y,qe,at,ft,Ft,xt=Vn._;xt;)if(ft=wn(xt,He)-_e,ft>pe)xt=xt.L;else if(Ft=_e-fn(xt,He),Ft>pe){if(!xt.R){qe=xt;break}xt=xt.R}else{ft>-pe?(qe=xt.P,at=xt):Ft>-pe?(qe=xt,at=xt.N):qe=at=xt;break}var Xt=an(he);if(Vn.insert(qe,Xt),!(!qe&&!at)){if(qe===at){Yn(qe),at=an(qe.site),Vn.insert(Xt,at),Xt.edge=at.edge=ia(qe.site,Xt.site),kn(qe),kn(at);return}if(!at){Xt.edge=ia(qe.site,Xt.site);return}Yn(qe),Yn(at);var rr=qe.site,ar=rr.x,Pr=rr.y,Cr=he.x-ar,jr=he.y-Pr,en=at.site,Ir=en.x-ar,Hr=en.y-Pr,Xr=2*(Cr*Hr-jr*Ir),tn=Cr*Cr+jr*jr,un=Ir*Ir+Hr*Hr,Zr={x:(Hr*tn-jr*un)/Xr+ar,y:(Cr*un-Ir*tn)/Xr+Pr};ga(at.edge,rr,en,Zr),Xt.edge=ia(rr,he,null,Zr),at.edge=ia(he,en,null,Zr),kn(qe),kn(at)}}function wn(he,_e){var He=he.site,qe=He.x,at=He.y,ft=at-_e;if(!ft)return qe;var Ft=he.P;if(!Ft)return-1/0;He=Ft.site;var xt=He.x,Xt=He.y,rr=Xt-_e;if(!rr)return xt;var ar=xt-qe,Pr=1/ft-1/rr,Cr=ar/rr;return Pr?(-Cr+Math.sqrt(Cr*Cr-2*Pr*(ar*ar/(-2*rr)-Xt+rr/2+at-ft/2)))/Pr+qe:(qe+xt)/2}function fn(he,_e){var He=he.N;if(He)return wn(He,_e);var qe=he.site;return qe.y===_e?qe.x:1/0}function Rr(he){this.site=he,this.edges=[]}Rr.prototype.prepare=function(){for(var he=this.edges,_e=he.length,He;_e--;)He=he[_e].edge,(!He.b||!He.a)&&he.splice(_e,1);return he.sort(kr),he.length};function Lr(he){for(var _e=he[0][0],He=he[1][0],qe=he[0][1],at=he[1][1],ft,Ft,xt,Xt,rr=Pn,ar=rr.length,Pr,Cr,jr,en,Ir,Hr;ar--;)if(Pr=rr[ar],!(!Pr||!Pr.prepare()))for(jr=Pr.edges,en=jr.length,Cr=0;Cr<en;)Hr=jr[Cr].end(),xt=Hr.x,Xt=Hr.y,Ir=jr[++Cr%en].start(),ft=Ir.x,Ft=Ir.y,(m(xt-ft)>pe||m(Xt-Ft)>pe)&&(jr.splice(Cr,0,new uo(oa(Pr.site,Hr,m(xt-_e)<pe&&at-Xt>pe?{x:_e,y:m(ft-_e)<pe?Ft:at}:m(Xt-at)<pe&&He-xt>pe?{x:m(Ft-at)<pe?ft:He,y:at}:m(xt-He)<pe&&Xt-qe>pe?{x:He,y:m(ft-He)<pe?Ft:qe}:m(Xt-qe)<pe&&xt-_e>pe?{x:m(Ft-qe)<pe?ft:_e,y:qe}:null),Pr.site,null)),++en)}function kr(he,_e){return _e.angle-he.angle}function vn(){Fo(this),this.x=this.y=this.arc=this.site=this.cy=null}function kn(he){var _e=he.P,He=he.N;if(!(!_e||!He)){var qe=_e.site,at=he.site,ft=He.site;if(qe!==ft){var Ft=at.x,xt=at.y,Xt=qe.x-Ft,rr=qe.y-xt,ar=ft.x-Ft,Hr=ft.y-xt,Pr=2*(Xt*Hr-rr*ar);if(!(Pr>=-we)){var Cr=Xt*Xt+rr*rr,jr=ar*ar+Hr*Hr,en=(Hr*Cr-rr*jr)/Pr,Ir=(Xt*jr-ar*Cr)/Pr,Hr=Ir+xt,Xr=$t.pop()||new vn;Xr.arc=he,Xr.site=at,Xr.x=en+Ft,Xr.y=Hr+Math.sqrt(en*en+Ir*Ir),Xr.cy=Hr,he.circle=Xr;for(var tn=null,un=$a._;un;)if(Xr.y<un.y||Xr.y===un.y&&Xr.x<=un.x)if(un.L)un=un.L;else{tn=un.P;break}else if(un.R)un=un.R;else{tn=un;break}$a.insert(tn,Xr),tn||(Da=Xr)}}}}function Yn(he){var _e=he.circle;_e&&(_e.P||(Da=_e.N),$a.remove(_e),$t.push(_e),Fo(_e),he.circle=null)}function pn(he,_e,He,qe){return function(at){var ft=at.a,Ft=at.b,xt=ft.x,Xt=ft.y,rr=Ft.x,ar=Ft.y,Pr=0,Cr=1,jr=rr-xt,en=ar-Xt,Ir;if(Ir=he-xt,!(!jr&&Ir>0)){if(Ir/=jr,jr<0){if(Ir<Pr)return;Ir<Cr&&(Cr=Ir)}else if(jr>0){if(Ir>Cr)return;Ir>Pr&&(Pr=Ir)}if(Ir=He-xt,!(!jr&&Ir<0)){if(Ir/=jr,jr<0){if(Ir>Cr)return;Ir>Pr&&(Pr=Ir)}else if(jr>0){if(Ir<Pr)return;Ir<Cr&&(Cr=Ir)}if(Ir=_e-Xt,!(!en&&Ir>0)){if(Ir/=en,en<0){if(Ir<Pr)return;Ir<Cr&&(Cr=Ir)}else if(en>0){if(Ir>Cr)return;Ir>Pr&&(Pr=Ir)}if(Ir=qe-Xt,!(!en&&Ir<0)){if(Ir/=en,en<0){if(Ir>Cr)return;Ir>Pr&&(Pr=Ir)}else if(en>0){if(Ir<Pr)return;Ir<Cr&&(Cr=Ir)}return Pr>0&&(at.a={x:xt+Pr*jr,y:Xt+Pr*en}),Cr<1&&(at.b={x:xt+Cr*jr,y:Xt+Cr*en}),at}}}}}}function zn(he){for(var _e=Ln,He=pn(he[0][0],he[0][1],he[1][0],he[1][1]),qe=_e.length,at;qe--;)at=_e[qe],(!qn(at,he)||!He(at)||m(at.a.x-at.b.x)<pe&&m(at.a.y-at.b.y)<pe)&&(at.a=at.b=null,_e.splice(qe,1))}function qn(he,_e){var He=he.b;if(He)return!0;var qe=he.a,at=_e[0][0],ft=_e[1][0],Ft=_e[0][1],xt=_e[1][1],Xt=he.l,rr=he.r,ar=Xt.x,Pr=Xt.y,Cr=rr.x,jr=rr.y,en=(ar+Cr)/2,Ir=(Pr+jr)/2,Hr,Xr;if(jr===Pr){if(en<at||en>=ft)return;if(ar>Cr){if(!qe)qe={x:en,y:Ft};else if(qe.y>=xt)return;He={x:en,y:xt}}else{if(!qe)qe={x:en,y:xt};else if(qe.y<Ft)return;He={x:en,y:Ft}}}else if(Hr=(ar-Cr)/(jr-Pr),Xr=Ir-Hr*en,Hr<-1||Hr>1)if(ar>Cr){if(!qe)qe={x:(Ft-Xr)/Hr,y:Ft};else if(qe.y>=xt)return;He={x:(xt-Xr)/Hr,y:xt}}else{if(!qe)qe={x:(xt-Xr)/Hr,y:xt};else if(qe.y<Ft)return;He={x:(Ft-Xr)/Hr,y:Ft}}else if(Pr<jr){if(!qe)qe={x:at,y:Hr*at+Xr};else if(qe.x>=ft)return;He={x:ft,y:Hr*ft+Xr}}else{if(!qe)qe={x:ft,y:Hr*ft+Xr};else if(qe.x<at)return;He={x:at,y:Hr*at+Xr}}return he.a=qe,he.b=He,!0}function ua(he,_e){this.l=he,this.r=_e,this.a=this.b=null}function ia(he,_e,He,qe){var at=new ua(he,_e);return Ln.push(at),He&&ga(at,he,_e,He),qe&&ga(at,_e,he,qe),Pn[he.i].edges.push(new uo(at,he,_e)),Pn[_e.i].edges.push(new uo(at,_e,he)),at}function oa(he,_e,He){var qe=new ua(he,null);return qe.a=_e,qe.b=He,Ln.push(qe),qe}function ga(he,_e,He,qe){!he.a&&!he.b?(he.a=qe,he.l=_e,he.r=He):he.l===He?he.b=qe:he.a=qe}function uo(he,_e,He){var qe=he.a,at=he.b;this.edge=he,this.site=_e,this.angle=He?Math.atan2(He.y-_e.y,He.x-_e.x):he.l===_e?Math.atan2(at.x-qe.x,qe.y-at.y):Math.atan2(qe.x-at.x,at.y-qe.y)}uo.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}};function Co(){this._=null}function Fo(he){he.U=he.C=he.L=he.R=he.P=he.N=null}Co.prototype={insert:function(he,_e){var He,qe,at;if(he){if(_e.P=he,_e.N=he.N,he.N&&(he.N.P=_e),he.N=_e,he.R){for(he=he.R;he.L;)he=he.L;he.L=_e}else he.R=_e;He=he}else this._?(he=ic(this._),_e.P=null,_e.N=he,he.P=he.L=_e,He=he):(_e.P=_e.N=null,this._=_e,He=null);for(_e.L=_e.R=null,_e.U=He,_e.C=!0,he=_e;He&&He.C;)qe=He.U,He===qe.L?(at=qe.R,at&&at.C?(He.C=at.C=!1,qe.C=!0,he=qe):(he===He.R&&(Ho(this,He),he=He,He=he.U),He.C=!1,qe.C=!0,ko(this,qe))):(at=qe.L,at&&at.C?(He.C=at.C=!1,qe.C=!0,he=qe):(he===He.L&&(ko(this,He),he=He,He=he.U),He.C=!1,qe.C=!0,Ho(this,qe))),He=he.U;this._.C=!1},remove:function(he){he.N&&(he.N.P=he.P),he.P&&(he.P.N=he.N),he.N=he.P=null;var _e=he.U,He,qe=he.L,at=he.R,ft,Ft;if(qe?at?ft=ic(at):ft=qe:ft=at,_e?_e.L===he?_e.L=ft:_e.R=ft:this._=ft,qe&&at?(Ft=ft.C,ft.C=he.C,ft.L=qe,qe.U=ft,ft!==at?(_e=ft.U,ft.U=he.U,he=ft.R,_e.L=he,ft.R=at,at.U=ft):(ft.U=_e,_e=ft,he=ft.R)):(Ft=he.C,he=ft),he&&(he.U=_e),!Ft){if(he&&he.C){he.C=!1;return}do{if(he===this._)break;if(he===_e.L){if(He=_e.R,He.C&&(He.C=!1,_e.C=!0,Ho(this,_e),He=_e.R),He.L&&He.L.C||He.R&&He.R.C){(!He.R||!He.R.C)&&(He.L.C=!1,He.C=!0,ko(this,He),He=_e.R),He.C=_e.C,_e.C=He.R.C=!1,Ho(this,_e),he=this._;break}}else if(He=_e.L,He.C&&(He.C=!1,_e.C=!0,ko(this,_e),He=_e.L),He.L&&He.L.C||He.R&&He.R.C){(!He.L||!He.L.C)&&(He.R.C=!1,He.C=!0,Ho(this,He),He=_e.L),He.C=_e.C,_e.C=He.L.C=!1,ko(this,_e),he=this._;break}He.C=!0,he=_e,_e=_e.U}while(!he.C);he&&(he.C=!1)}}};function Ho(he,_e){var He=_e,qe=_e.R,at=He.U;at?at.L===He?at.L=qe:at.R=qe:he._=qe,qe.U=at,He.U=qe,He.R=qe.L,He.R&&(He.R.U=He),qe.L=He}function ko(he,_e){var He=_e,qe=_e.L,at=He.U;at?at.L===He?at.L=qe:at.R=qe:he._=qe,qe.U=at,He.U=qe,He.L=qe.R,He.L&&(He.L.U=He),qe.R=He}function ic(he){for(;he.L;)he=he.L;return he}function oi(he,_e){var He=he.sort(Yu).pop(),qe,at,ft;for(Ln=[],Pn=new Array(he.length),Vn=new Co,$a=new Co;;)if(ft=Da,He&&(!ft||He.y<ft.y||He.y===ft.y&&He.x<ft.x))(He.x!==qe||He.y!==at)&&(Pn[He.i]=new Rr(He),_n(He),qe=He.x,at=He.y),He=he.pop();else if(ft)hn(ft.arc);else break;_e&&(zn(_e),Lr(_e));var Ft={cells:Pn,edges:Ln};return Vn=$a=Ln=Pn=null,Ft}function Yu(he,_e){return _e.y-he.y||_e.x-he.x}a.geom.voronoi=function(he){var _e=sa,He=ha,qe=_e,at=He,ft=pu;if(he)return Ft(he);function Ft(Xt){var rr=new Array(Xt.length),ar=ft[0][0],Pr=ft[0][1],Cr=ft[1][0],jr=ft[1][1];return oi(xt(Xt),ft).cells.forEach(function(en,Ir){var Hr=en.edges,Xr=en.site,tn=rr[Ir]=Hr.length?Hr.map(function(un){var Zr=un.start();return[Zr.x,Zr.y]}):Xr.x>=ar&&Xr.x<=Cr&&Xr.y>=Pr&&Xr.y<=jr?[[ar,jr],[Cr,jr],[Cr,Pr],[ar,Pr]]:[];tn.point=Xt[Ir]}),rr}function xt(Xt){return Xt.map(function(rr,ar){return{x:Math.round(qe(rr,ar)/pe)*pe,y:Math.round(at(rr,ar)/pe)*pe,i:ar}})}return Ft.links=function(Xt){return oi(xt(Xt)).edges.filter(function(rr){return rr.l&&rr.r}).map(function(rr){return{source:Xt[rr.l.i],target:Xt[rr.r.i]}})},Ft.triangles=function(Xt){var rr=[];return oi(xt(Xt)).cells.forEach(function(ar,Pr){for(var Cr=ar.site,jr=ar.edges.sort(kr),en=-1,Ir=jr.length,Hr,Xr=jr[Ir-1].edge,tn=Xr.l===Cr?Xr.r:Xr.l;++en<Ir;)Hr=tn,Xr=jr[en].edge,tn=Xr.l===Cr?Xr.r:Xr.l,Pr<Hr.i&&Pr<tn.i&&fo(Cr,Hr,tn)<0&&rr.push([Xt[Pr],Xt[Hr.i],Xt[tn.i]])}),rr},Ft.x=function(Xt){return arguments.length?(qe=Jr(_e=Xt),Ft):_e},Ft.y=function(Xt){return arguments.length?(at=Jr(He=Xt),Ft):He},Ft.clipExtent=function(Xt){return arguments.length?(ft=Xt??pu,Ft):ft===pu?null:ft},Ft.size=function(Xt){return arguments.length?Ft.clipExtent(Xt&&[[0,0],Xt]):ft===pu?null:ft&&ft[1]},Ft};var pu=[[-1e6,-1e6],[1e6,1e6]];function fo(he,_e,He){return(he.x-He.x)*(_e.y-he.y)-(he.x-_e.x)*(He.y-he.y)}a.geom.delaunay=function(he){return a.geom.voronoi().triangles(he)},a.geom.quadtree=function(he,_e,He,qe,at){var ft=sa,Ft=ha,xt;if(xt=arguments.length)return ft=Vo,Ft=qc,xt===3&&(at=He,qe=_e,He=_e=0),Xt(he);function Xt(rr){var ar,Pr=Jr(ft),Cr=Jr(Ft),jr,en,Ir,Hr,Xr,tn,un,Zr;if(_e!=null)Xr=_e,tn=He,un=qe,Zr=at;else if(un=Zr=-(Xr=tn=1/0),jr=[],en=[],Hr=rr.length,xt)for(Ir=0;Ir<Hr;++Ir)ar=rr[Ir],ar.x<Xr&&(Xr=ar.x),ar.y<tn&&(tn=ar.y),ar.x>un&&(un=ar.x),ar.y>Zr&&(Zr=ar.y),jr.push(ar.x),en.push(ar.y);else for(Ir=0;Ir<Hr;++Ir){var Nn=+Pr(ar=rr[Ir],Ir),Wn=+Cr(ar,Ir);Nn<Xr&&(Xr=Nn),Wn<tn&&(tn=Wn),Nn>un&&(un=Nn),Wn>Zr&&(Zr=Wn),jr.push(Nn),en.push(Wn)}var Kn=un-Xr,na=Zr-tn;Kn>na?Zr=tn+Kn:un=Xr+na;function wa(Pa,Ha,ri,si,gi,Bn,Va,Ba){if(!(isNaN(ri)||isNaN(si)))if(Pa.leaf){var Ja=Pa.x,Ri=Pa.y;if(Ja!=null)if(m(Ja-ri)+m(Ri-si)<.01)ba(Pa,Ha,ri,si,gi,Bn,Va,Ba);else{var ji=Pa.point;Pa.x=Pa.y=Pa.point=null,ba(Pa,ji,Ja,Ri,gi,Bn,Va,Ba),ba(Pa,Ha,ri,si,gi,Bn,Va,Ba)}else Pa.x=ri,Pa.y=si,Pa.point=Ha}else ba(Pa,Ha,ri,si,gi,Bn,Va,Ba)}function ba(Pa,Ha,ri,si,gi,Bn,Va,Ba){var Ja=(gi+Va)*.5,Ri=(Bn+Ba)*.5,ji=ri>=Ja,qi=si>=Ri,Mi=qi<<1|ji;Pa.leaf=!1,Pa=Pa.nodes[Mi]||(Pa.nodes[Mi]=Xu()),ji?gi=Ja:Va=Ja,qi?Bn=Ri:Ba=Ri,wa(Pa,Ha,ri,si,gi,Bn,Va,Ba)}var Wa=Xu();if(Wa.add=function(Pa){wa(Wa,Pa,+Pr(Pa,++Ir),+Cr(Pa,Ir),Xr,tn,un,Zr)},Wa.visit=function(Pa){Ni(Pa,Wa,Xr,tn,un,Zr)},Wa.find=function(Pa){return Zu(Wa,Pa[0],Pa[1],Xr,tn,un,Zr)},Ir=-1,_e==null){for(;++Ir<Hr;)wa(Wa,rr[Ir],jr[Ir],en[Ir],Xr,tn,un,Zr);--Ir}else rr.forEach(Wa.add);return jr=en=rr=ar=null,Wa}return Xt.x=function(rr){return arguments.length?(ft=rr,Xt):ft},Xt.y=function(rr){return arguments.length?(Ft=rr,Xt):Ft},Xt.extent=function(rr){return arguments.length?(rr==null?_e=He=qe=at=null:(_e=+rr[0][0],He=+rr[0][1],qe=+rr[1][0],at=+rr[1][1]),Xt):_e==null?null:[[_e,He],[qe,at]]},Xt.size=function(rr){return arguments.length?(rr==null?_e=He=qe=at=null:(_e=He=0,qe=+rr[0],at=+rr[1]),Xt):_e==null?null:[qe-_e,at-He]},Xt};function Vo(he){return he.x}function qc(he){return he.y}function Xu(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function Ni(he,_e,He,qe,at,ft){if(!he(_e,He,qe,at,ft)){var Ft=(He+at)*.5,xt=(qe+ft)*.5,Xt=_e.nodes;Xt[0]&&Ni(he,Xt[0],He,qe,Ft,xt),Xt[1]&&Ni(he,Xt[1],Ft,qe,at,xt),Xt[2]&&Ni(he,Xt[2],He,xt,Ft,ft),Xt[3]&&Ni(he,Xt[3],Ft,xt,at,ft)}}function Zu(he,_e,He,qe,at,ft,Ft){var xt=1/0,Xt;return function rr(ar,Pr,Cr,jr,en){if(!(Pr>ft||Cr>Ft||jr<qe||en<at)){if(Ir=ar.point){var Ir,Hr=_e-ar.x,Xr=He-ar.y,tn=Hr*Hr+Xr*Xr;if(tn<xt){var un=Math.sqrt(xt=tn);qe=_e-un,at=He-un,ft=_e+un,Ft=He+un,Xt=Ir}}for(var Zr=ar.nodes,Nn=(Pr+jr)*.5,Wn=(Cr+en)*.5,Kn=_e>=Nn,na=He>=Wn,wa=na<<1|Kn,ba=wa+4;wa<ba;++wa)if(ar=Zr[wa&3])switch(wa&3){case 0:rr(ar,Pr,Cr,Nn,Wn);break;case 1:rr(ar,Nn,Cr,jr,Wn);break;case 2:rr(ar,Pr,Wn,Nn,en);break;case 3:rr(ar,Nn,Wn,jr,en);break}}}(he,qe,at,ft,Ft),Xt}a.interpolateRgb=Qo;function Qo(he,_e){he=a.rgb(he),_e=a.rgb(_e);var He=he.r,qe=he.g,at=he.b,ft=_e.r-He,Ft=_e.g-qe,xt=_e.b-at;return function(Xt){return"#"+yr(Math.round(He+ft*Xt))+yr(Math.round(qe+Ft*Xt))+yr(Math.round(at+xt*Xt))}}a.interpolateObject=no;function no(he,_e){var He={},qe={},at;for(at in he)at in _e?He[at]=rl(he[at],_e[at]):qe[at]=he[at];for(at in _e)at in he||(qe[at]=_e[at]);return function(ft){for(at in He)qe[at]=He[at](ft);return qe}}a.interpolateNumber=qo;function qo(he,_e){return he=+he,_e=+_e,function(He){return he*(1-He)+_e*He}}a.interpolateString=Lo;function Lo(he,_e){var He=os.lastIndex=zs.lastIndex=0,qe,at,ft,Ft=-1,xt=[],Xt=[];for(he=he+"",_e=_e+"";(qe=os.exec(he))&&(at=zs.exec(_e));)(ft=at.index)>He&&(ft=_e.slice(He,ft),xt[Ft]?xt[Ft]+=ft:xt[++Ft]=ft),(qe=qe[0])===(at=at[0])?xt[Ft]?xt[Ft]+=at:xt[++Ft]=at:(xt[++Ft]=null,Xt.push({i:Ft,x:qo(qe,at)})),He=zs.lastIndex;return He<_e.length&&(ft=_e.slice(He),xt[Ft]?xt[Ft]+=ft:xt[++Ft]=ft),xt.length<2?Xt[0]?(_e=Xt[0].x,function(rr){return _e(rr)+""}):function(){return _e}:(_e=Xt.length,function(rr){for(var ar=0,Pr;ar<_e;++ar)xt[(Pr=Xt[ar]).i]=Pr.x(rr);return xt.join("")})}var os=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zs=new RegExp(os.source,"g");a.interpolate=rl;function rl(he,_e){for(var He=a.interpolators.length,qe;--He>=0&&!(qe=a.interpolators[He](he,_e)););return qe}a.interpolators=[function(he,_e){var He=typeof _e;return(He==="string"?Sn.has(_e.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(_e)?Qo:Lo:_e instanceof dt?Qo:Array.isArray(_e)?po:He==="object"&&isNaN(_e)?no:qo)(he,_e)}],a.interpolateArray=po;function po(he,_e){var He=[],qe=[],at=he.length,ft=_e.length,Ft=Math.min(he.length,_e.length),xt;for(xt=0;xt<Ft;++xt)He.push(rl(he[xt],_e[xt]));for(;xt<at;++xt)qe[xt]=he[xt];for(;xt<ft;++xt)qe[xt]=_e[xt];return function(Xt){for(xt=0;xt<Ft;++xt)qe[xt]=He[xt](Xt);return qe}}var eh=function(){return V},Ns=a.map({linear:eh,poly:ju,quad:function(){return sc},cubic:function(){return lc},sin:function(){return sv},exp:function(){return lv},circle:function(){return uv},elastic:uc,back:fv,bounce:function(){return cv}}),go=a.map({in:V,out:nl,"in-out":Bs,"out-in":function(he){return Bs(nl(he))}});a.ease=function(he){var _e=he.indexOf("-"),He=_e>=0?he.slice(0,_e):he,qe=_e>=0?he.slice(_e+1):"in";return He=Ns.get(He)||eh,qe=go.get(qe)||V,oc(qe(He.apply(null,_.call(arguments,1))))};function oc(he){return function(_e){return _e<=0?0:_e>=1?1:he(_e)}}function nl(he){return function(_e){return 1-he(1-_e)}}function Bs(he){return function(_e){return .5*(_e<.5?he(2*_e):2-he(2-2*_e))}}function sc(he){return he*he}function lc(he){return he*he*he}function ov(he){if(he<=0)return 0;if(he>=1)return 1;var _e=he*he,He=_e*he;return 4*(he<.5?He:3*(he-_e)+He-.75)}function ju(he){return function(_e){return Math.pow(_e,he)}}function sv(he){return 1-Math.cos(he*We)}function lv(he){return Math.pow(2,10*(he-1))}function uv(he){return 1-Math.sqrt(1-he*he)}function uc(he,_e){var He;return arguments.length<2&&(_e=.45),arguments.length?He=_e/Pe*Math.asin(1/he):(he=1,He=_e/4),function(qe){return 1+he*Math.pow(2,-10*qe)*Math.sin((qe-He)*Pe/_e)}}function fv(he){return he||(he=1.70158),function(_e){return _e*_e*((he+1)*_e-he)}}function cv(he){return he<.36363636363636365?7.5625*he*he:he<.7272727272727273?7.5625*(he-=.5454545454545454)*he+.75:he<.9090909090909091?7.5625*(he-=.8181818181818182)*he+.9375:7.5625*(he-=.9545454545454546)*he+.984375}a.interpolateHcl=th;function th(he,_e){he=a.hcl(he),_e=a.hcl(_e);var He=he.h,qe=he.c,at=he.l,ft=_e.h-He,Ft=_e.c-qe,xt=_e.l-at;return isNaN(Ft)&&(Ft=0,qe=isNaN(qe)?_e.c:qe),isNaN(ft)?(ft=0,He=isNaN(He)?_e.h:He):ft>180?ft-=360:ft<-180&&(ft+=360),function(Xt){return Vt(He+ft*Xt,qe+Ft*Xt,at+xt*Xt)+""}}a.interpolateHsl=hv;function hv(he,_e){he=a.hsl(he),_e=a.hsl(_e);var He=he.h,qe=he.s,at=he.l,ft=_e.h-He,Ft=_e.s-qe,xt=_e.l-at;return isNaN(Ft)&&(Ft=0,qe=isNaN(qe)?_e.s:qe),isNaN(ft)?(ft=0,He=isNaN(He)?_e.h:He):ft>180?ft-=360:ft<-180&&(ft+=360),function(Xt){return Lt(He+ft*Xt,qe+Ft*Xt,at+xt*Xt)+""}}a.interpolateLab=vv;function vv(he,_e){he=a.lab(he),_e=a.lab(_e);var He=he.l,qe=he.a,at=he.b,ft=_e.l-He,Ft=_e.a-qe,xt=_e.b-at;return function(Xt){return Ze(He+ft*Xt,qe+Ft*Xt,at+xt*Xt)+""}}a.interpolateRound=fc;function fc(he,_e){return _e-=he,function(He){return Math.round(he+_e*He)}}a.transform=function(he){var _e=v.createElementNS(a.ns.prefix.svg,"g");return(a.transform=function(He){if(He!=null){_e.setAttribute("transform",He);var qe=_e.transform.baseVal.consolidate()}return new Wl(qe?qe.matrix:dv)})(he)};function Wl(he){var _e=[he.a,he.b],He=[he.c,he.d],qe=gu(_e),at=Yl(_e,He),ft=gu(Lf(He,_e,-at))||0;_e[0]*He[1]<He[0]*_e[1]&&(_e[0]*=-1,_e[1]*=-1,qe*=-1,at*=-1),this.rotate=(qe?Math.atan2(_e[1],_e[0]):Math.atan2(-He[0],He[1]))*ct,this.translate=[he.e,he.f],this.scale=[qe,ft],this.skew=ft?Math.atan2(at,ft)*ct:0}Wl.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};function Yl(he,_e){return he[0]*_e[0]+he[1]*_e[1]}function gu(he){var _e=Math.sqrt(Yl(he,he));return _e&&(he[0]/=_e,he[1]/=_e),_e}function Lf(he,_e,He){return he[0]+=He*_e[0],he[1]+=He*_e[1],he}var dv={a:1,b:0,c:0,d:1,e:0,f:0};a.interpolateTransform=Xl;function al(he){return he.length?he.pop()+",":""}function rh(he,_e,He,qe){if(he[0]!==_e[0]||he[1]!==_e[1]){var at=He.push("translate(",null,",",null,")");qe.push({i:at-4,x:qo(he[0],_e[0])},{i:at-2,x:qo(he[1],_e[1])})}else(_e[0]||_e[1])&&He.push("translate("+_e+")")}function cc(he,_e,He,qe){he!==_e?(he-_e>180?_e+=360:_e-he>180&&(he+=360),qe.push({i:He.push(al(He)+"rotate(",null,")")-2,x:qo(he,_e)})):_e&&He.push(al(He)+"rotate("+_e+")")}function pv(he,_e,He,qe){he!==_e?qe.push({i:He.push(al(He)+"skewX(",null,")")-2,x:qo(he,_e)}):_e&&He.push(al(He)+"skewX("+_e+")")}function ss(he,_e,He,qe){if(he[0]!==_e[0]||he[1]!==_e[1]){var at=He.push(al(He)+"scale(",null,",",null,")");qe.push({i:at-4,x:qo(he[0],_e[0])},{i:at-2,x:qo(he[1],_e[1])})}else(_e[0]!==1||_e[1]!==1)&&He.push(al(He)+"scale("+_e+")")}function Xl(he,_e){var He=[],qe=[];return he=a.transform(he),_e=a.transform(_e),rh(he.translate,_e.translate,He,qe),cc(he.rotate,_e.rotate,He,qe),pv(he.skew,_e.skew,He,qe),ss(he.scale,_e.scale,He,qe),he=_e=null,function(at){for(var ft=-1,Ft=qe.length,xt;++ft<Ft;)He[(xt=qe[ft]).i]=xt.x(at);return He.join("")}}function Ku(he,_e){return _e=(_e-=he=+he)||1/_e,function(He){return(He-he)/_e}}function yu(he,_e){return _e=(_e-=he=+he)||1/_e,function(He){return Math.max(0,Math.min(1,(He-he)/_e))}}a.layout={},a.layout.bundle=function(){return function(he){for(var _e=[],He=-1,qe=he.length;++He<qe;)_e.push(Us(he[He]));return _e}};function Us(he){for(var _e=he.source,He=he.target,qe=hc(_e,He),at=[_e];_e!==qe;)_e=_e.parent,at.push(_e);for(var ft=at.length;He!==qe;)at.splice(ft,0,He),He=He.parent;return at}function il(he){for(var _e=[],He=he.parent;He!=null;)_e.push(he),he=He,He=He.parent;return _e.push(he),_e}function hc(he,_e){if(he===_e)return he;for(var He=il(he),qe=il(_e),at=He.pop(),ft=qe.pop(),Ft=null;at===ft;)Ft=at,at=He.pop(),ft=qe.pop();return Ft}a.layout.chord=function(){var he={},_e,He,qe,at,ft=0,Ft,xt,Xt;function rr(){var Pr={},Cr=[],jr=a.range(at),en=[],Ir,Hr,Xr,tn,un;for(_e=[],He=[],Ir=0,tn=-1;++tn<at;){for(Hr=0,un=-1;++un<at;)Hr+=qe[tn][un];Cr.push(Hr),en.push(a.range(at)),Ir+=Hr}for(Ft&&jr.sort(function(Wa,Pa){return Ft(Cr[Wa],Cr[Pa])}),xt&&en.forEach(function(Wa,Pa){Wa.sort(function(Ha,ri){return xt(qe[Pa][Ha],qe[Pa][ri])})}),Ir=(Pe-ft*at)/Ir,Hr=0,tn=-1;++tn<at;){for(Xr=Hr,un=-1;++un<at;){var Zr=jr[tn],Nn=en[Zr][un],Wn=qe[Zr][Nn],Kn=Hr,na=Hr+=Wn*Ir;Pr[Zr+"-"+Nn]={index:Zr,subindex:Nn,startAngle:Kn,endAngle:na,value:Wn}}He[Zr]={index:Zr,startAngle:Xr,endAngle:Hr,value:Cr[Zr]},Hr+=ft}for(tn=-1;++tn<at;)for(un=tn-1;++un<at;){var wa=Pr[tn+"-"+un],ba=Pr[un+"-"+tn];(wa.value||ba.value)&&_e.push(wa.value<ba.value?{source:ba,target:wa}:{source:wa,target:ba})}Xt&&ar()}function ar(){_e.sort(function(Pr,Cr){return Xt((Pr.source.value+Pr.target.value)/2,(Cr.source.value+Cr.target.value)/2)})}return he.matrix=function(Pr){return arguments.length?(at=(qe=Pr)&&qe.length,_e=He=null,he):qe},he.padding=function(Pr){return arguments.length?(ft=Pr,_e=He=null,he):ft},he.sortGroups=function(Pr){return arguments.length?(Ft=Pr,_e=He=null,he):Ft},he.sortSubgroups=function(Pr){return arguments.length?(xt=Pr,_e=null,he):xt},he.sortChords=function(Pr){return arguments.length?(Xt=Pr,_e&&ar(),he):Xt},he.chords=function(){return _e||rr(),_e},he.groups=function(){return He||rr(),He},he},a.layout.force=function(){var he={},_e=a.dispatch("start","tick","end"),He,qe=[1,1],at,ft,Ft=.9,xt=xu,Xt=nh,rr=-30,ar=ah,Pr=.1,Cr=.64,jr=[],en=[],Ir,Hr,Xr;function tn(Zr){return function(Nn,Wn,Kn,na){if(Nn.point!==Zr){var wa=Nn.cx-Zr.x,ba=Nn.cy-Zr.y,Wa=na-Wn,Pa=wa*wa+ba*ba;if(Wa*Wa/Cr<Pa){if(Pa<ar){var Ha=Nn.charge/Pa;Zr.px-=wa*Ha,Zr.py-=ba*Ha}return!0}if(Nn.point&&Pa&&Pa<ar){var Ha=Nn.pointCharge/Pa;Zr.px-=wa*Ha,Zr.py-=ba*Ha}}return!Nn.charge}}he.tick=function(){if((ft*=.99)<.005)return He=null,_e.end({type:"end",alpha:ft=0}),!0;var Zr=jr.length,Nn=en.length,Wn,Kn,na,wa,ba,Wa,Pa,Ha,ri;for(Kn=0;Kn<Nn;++Kn)na=en[Kn],wa=na.source,ba=na.target,Ha=ba.x-wa.x,ri=ba.y-wa.y,(Wa=Ha*Ha+ri*ri)&&(Wa=ft*Hr[Kn]*((Wa=Math.sqrt(Wa))-Ir[Kn])/Wa,Ha*=Wa,ri*=Wa,ba.x-=Ha*(Pa=wa.weight+ba.weight?wa.weight/(wa.weight+ba.weight):.5),ba.y-=ri*Pa,wa.x+=Ha*(Pa=1-Pa),wa.y+=ri*Pa);if((Pa=ft*Pr)&&(Ha=qe[0]/2,ri=qe[1]/2,Kn=-1,Pa))for(;++Kn<Zr;)na=jr[Kn],na.x+=(Ha-na.x)*Pa,na.y+=(ri-na.y)*Pa;if(rr)for(Pf(Wn=a.geom.quadtree(jr),ft,Xr),Kn=-1;++Kn<Zr;)(na=jr[Kn]).fixed||Wn.visit(tn(na));for(Kn=-1;++Kn<Zr;)na=jr[Kn],na.fixed?(na.x=na.px,na.y=na.py):(na.x-=(na.px-(na.px=na.x))*Ft,na.y-=(na.py-(na.py=na.y))*Ft);_e.tick({type:"tick",alpha:ft})},he.nodes=function(Zr){return arguments.length?(jr=Zr,he):jr},he.links=function(Zr){return arguments.length?(en=Zr,he):en},he.size=function(Zr){return arguments.length?(qe=Zr,he):qe},he.linkDistance=function(Zr){return arguments.length?(xt=typeof Zr=="function"?Zr:+Zr,he):xt},he.distance=he.linkDistance,he.linkStrength=function(Zr){return arguments.length?(Xt=typeof Zr=="function"?Zr:+Zr,he):Xt},he.friction=function(Zr){return arguments.length?(Ft=+Zr,he):Ft},he.charge=function(Zr){return arguments.length?(rr=typeof Zr=="function"?Zr:+Zr,he):rr},he.chargeDistance=function(Zr){return arguments.length?(ar=Zr*Zr,he):Math.sqrt(ar)},he.gravity=function(Zr){return arguments.length?(Pr=+Zr,he):Pr},he.theta=function(Zr){return arguments.length?(Cr=Zr*Zr,he):Math.sqrt(Cr)},he.alpha=function(Zr){return arguments.length?(Zr=+Zr,ft?Zr>0?ft=Zr:(He.c=null,He.t=NaN,He=null,_e.end({type:"end",alpha:ft=0})):Zr>0&&(_e.start({type:"start",alpha:ft=Zr}),He=An(he.tick)),he):ft},he.start=function(){var Zr,Nn=jr.length,Wn=en.length,Kn=qe[0],na=qe[1],wa,ba;for(Zr=0;Zr<Nn;++Zr)(ba=jr[Zr]).index=Zr,ba.weight=0;for(Zr=0;Zr<Wn;++Zr)ba=en[Zr],typeof ba.source=="number"&&(ba.source=jr[ba.source]),typeof ba.target=="number"&&(ba.target=jr[ba.target]),++ba.source.weight,++ba.target.weight;for(Zr=0;Zr<Nn;++Zr)ba=jr[Zr],isNaN(ba.x)&&(ba.x=Wa("x",Kn)),isNaN(ba.y)&&(ba.y=Wa("y",na)),isNaN(ba.px)&&(ba.px=ba.x),isNaN(ba.py)&&(ba.py=ba.y);if(Ir=[],typeof xt=="function")for(Zr=0;Zr<Wn;++Zr)Ir[Zr]=+xt.call(this,en[Zr],Zr);else for(Zr=0;Zr<Wn;++Zr)Ir[Zr]=xt;if(Hr=[],typeof Xt=="function")for(Zr=0;Zr<Wn;++Zr)Hr[Zr]=+Xt.call(this,en[Zr],Zr);else for(Zr=0;Zr<Wn;++Zr)Hr[Zr]=Xt;if(Xr=[],typeof rr=="function")for(Zr=0;Zr<Nn;++Zr)Xr[Zr]=+rr.call(this,jr[Zr],Zr);else for(Zr=0;Zr<Nn;++Zr)Xr[Zr]=rr;function Wa(Pa,Ha){if(!wa){for(wa=new Array(Nn),gi=0;gi<Nn;++gi)wa[gi]=[];for(gi=0;gi<Wn;++gi){var ri=en[gi];wa[ri.source.index].push(ri.target),wa[ri.target.index].push(ri.source)}}for(var si=wa[Zr],gi=-1,Bn=si.length,Va;++gi<Bn;)if(!isNaN(Va=si[gi][Pa]))return Va;return Math.random()*Ha}return he.resume()},he.resume=function(){return he.alpha(.1)},he.stop=function(){return he.alpha(0)},he.drag=function(){if(at||(at=a.behavior.drag().origin(V).on("dragstart.force",mu).on("drag.force",un).on("dragend.force",Al)),!arguments.length)return at;this.on("mouseover.force",Zi).on("mouseout.force",vc).call(at)};function un(Zr){Zr.px=a.event.x,Zr.py=a.event.y,he.resume()}return a.rebind(he,_e,"on")};function mu(he){he.fixed|=2}function Al(he){he.fixed&=-7}function Zi(he){he.fixed|=4,he.px=he.x,he.py=he.y}function vc(he){he.fixed&=-5}function Pf(he,_e,He){var qe=0,at=0;if(he.charge=0,!he.leaf)for(var ft=he.nodes,Ft=ft.length,xt=-1,Xt;++xt<Ft;)Xt=ft[xt],Xt!=null&&(Pf(Xt,_e,He),he.charge+=Xt.charge,qe+=Xt.charge*Xt.cx,at+=Xt.charge*Xt.cy);if(he.point){he.leaf||(he.point.x+=Math.random()-.5,he.point.y+=Math.random()-.5);var rr=_e*He[he.point.index];he.charge+=he.pointCharge=rr,qe+=rr*he.point.x,at+=rr*he.point.y}he.cx=qe/he.charge,he.cy=at/he.charge}var xu=20,nh=1,ah=1/0;a.layout.hierarchy=function(){var he=dc,_e=_f,He=gv;function qe(at){var ft=[at],Ft=[],xt;for(at.depth=0;(xt=ft.pop())!=null;)if(Ft.push(xt),(rr=_e.call(qe,xt,xt.depth))&&(Xt=rr.length)){for(var Xt,rr,ar;--Xt>=0;)ft.push(ar=rr[Xt]),ar.parent=xt,ar.depth=xt.depth+1;He&&(xt.value=0),xt.children=rr}else He&&(xt.value=+He.call(qe,xt,xt.depth)||0),delete xt.children;return co(at,function(Pr){var Cr,jr;he&&(Cr=Pr.children)&&Cr.sort(he),He&&(jr=Pr.parent)&&(jr.value+=Pr.value)}),Ft}return qe.sort=function(at){return arguments.length?(he=at,qe):he},qe.children=function(at){return arguments.length?(_e=at,qe):_e},qe.value=function(at){return arguments.length?(He=at,qe):He},qe.revalue=function(at){return He&&(wu(at,function(ft){ft.children&&(ft.value=0)}),co(at,function(ft){var Ft;ft.children||(ft.value=+He.call(qe,ft,ft.depth)||0),(Ft=ft.parent)&&(Ft.value+=ft.value)})),at},qe};function bu(he,_e){return a.rebind(he,_e,"sort","children","value"),he.nodes=he,he.links=yv,he}function wu(he,_e){for(var He=[he];(he=He.pop())!=null;)if(_e(he),(at=he.children)&&(qe=at.length))for(var qe,at;--qe>=0;)He.push(at[qe])}function co(he,_e){for(var He=[he],qe=[];(he=He.pop())!=null;)if(qe.push(he),(Ft=he.children)&&(ft=Ft.length))for(var at=-1,ft,Ft;++at<ft;)He.push(Ft[at]);for(;(he=qe.pop())!=null;)_e(he)}function _f(he){return he.children}function gv(he){return he.value}function dc(he,_e){return _e.value-he.value}function yv(he){return a.merge(he.map(function(_e){return(_e.children||[]).map(function(He){return{source:_e,target:He}})}))}a.layout.partition=function(){var he=a.layout.hierarchy(),_e=[1,1];function He(ft,Ft,xt,Xt){var rr=ft.children;if(ft.x=Ft,ft.y=ft.depth*Xt,ft.dx=xt,ft.dy=Xt,rr&&(Pr=rr.length)){var ar=-1,Pr,Cr,jr;for(xt=ft.value?xt/ft.value:0;++ar<Pr;)He(Cr=rr[ar],Ft,jr=Cr.value*xt,Xt),Ft+=jr}}function qe(ft){var Ft=ft.children,xt=0;if(Ft&&(rr=Ft.length))for(var Xt=-1,rr;++Xt<rr;)xt=Math.max(xt,qe(Ft[Xt]));return 1+xt}function at(ft,Ft){var xt=he.call(this,ft,Ft);return He(xt[0],0,_e[0],_e[1]/qe(xt[0])),xt}return at.size=function(ft){return arguments.length?(_e=ft,at):_e},bu(at,he)},a.layout.pie=function(){var he=Number,_e=Rf,He=0,qe=Pe,at=0;function ft(Ft){var xt=Ft.length,Xt=Ft.map(function(tn,un){return+he.call(ft,tn,un)}),rr=+(typeof He=="function"?He.apply(this,arguments):He),ar=(typeof qe=="function"?qe.apply(this,arguments):qe)-rr,Pr=Math.min(Math.abs(ar)/xt,+(typeof at=="function"?at.apply(this,arguments):at)),Cr=Pr*(ar<0?-1:1),jr=a.sum(Xt),en=jr?(ar-xt*Cr)/jr:0,Ir=a.range(xt),Hr=[],Xr;return _e!=null&&Ir.sort(_e===Rf?function(tn,un){return Xt[un]-Xt[tn]}:function(tn,un){return _e(Ft[tn],Ft[un])}),Ir.forEach(function(tn){Hr[tn]={data:Ft[tn],value:Xr=Xt[tn],startAngle:rr,endAngle:rr+=Xr*en+Cr,padAngle:Pr}}),Hr}return ft.value=function(Ft){return arguments.length?(he=Ft,ft):he},ft.sort=function(Ft){return arguments.length?(_e=Ft,ft):_e},ft.startAngle=function(Ft){return arguments.length?(He=Ft,ft):He},ft.endAngle=function(Ft){return arguments.length?(qe=Ft,ft):qe},ft.padAngle=function(Ft){return arguments.length?(at=Ft,ft):at},ft};var Rf={};a.layout.stack=function(){var he=V,_e=Df,He=mc,qe=gc,at=Ju,ft=pc;function Ft(xt,Xt){if(!(en=xt.length))return xt;var rr=xt.map(function(tn,un){return he.call(Ft,tn,un)}),ar=rr.map(function(tn){return tn.map(function(un,Zr){return[at.call(Ft,un,Zr),ft.call(Ft,un,Zr)]})}),Pr=_e.call(Ft,ar,Xt);rr=a.permute(rr,Pr),ar=a.permute(ar,Pr);var Cr=He.call(Ft,ar,Xt),jr=rr[0].length,en,Ir,Hr,Xr;for(Hr=0;Hr<jr;++Hr)for(qe.call(Ft,rr[0][Hr],Xr=Cr[Hr],ar[0][Hr][1]),Ir=1;Ir<en;++Ir)qe.call(Ft,rr[Ir][Hr],Xr+=ar[Ir-1][Hr][1],ar[Ir][Hr][1]);return xt}return Ft.values=function(xt){return arguments.length?(he=xt,Ft):he},Ft.order=function(xt){return arguments.length?(_e=typeof xt=="function"?xt:$u.get(xt)||Df,Ft):_e},Ft.offset=function(xt){return arguments.length?(He=typeof xt=="function"?xt:yc.get(xt)||mc,Ft):He},Ft.x=function(xt){return arguments.length?(at=xt,Ft):at},Ft.y=function(xt){return arguments.length?(ft=xt,Ft):ft},Ft.out=function(xt){return arguments.length?(qe=xt,Ft):qe},Ft};function Ju(he){return he.x}function pc(he){return he.y}function gc(he,_e,He){he.y0=_e,he.y=He}var $u=a.map({"inside-out":function(he){var _e=he.length,He,qe,at=he.map(wi),ft=he.map(ih),Ft=a.range(_e).sort(function(Pr,Cr){return at[Pr]-at[Cr]}),xt=0,Xt=0,rr=[],ar=[];for(He=0;He<_e;++He)qe=Ft[He],xt<Xt?(xt+=ft[qe],rr.push(qe)):(Xt+=ft[qe],ar.push(qe));return ar.reverse().concat(rr)},reverse:function(he){return a.range(he.length).reverse()},default:Df}),yc=a.map({silhouette:function(he){var _e=he.length,He=he[0].length,qe=[],at=0,ft,Ft,xt,Xt=[];for(Ft=0;Ft<He;++Ft){for(ft=0,xt=0;ft<_e;ft++)xt+=he[ft][Ft][1];xt>at&&(at=xt),qe.push(xt)}for(Ft=0;Ft<He;++Ft)Xt[Ft]=(at-qe[Ft])/2;return Xt},wiggle:function(he){var _e=he.length,He=he[0],qe=He.length,at,ft,Ft,xt,Xt,rr,ar,Pr,Cr,jr=[];for(jr[0]=Pr=Cr=0,ft=1;ft<qe;++ft){for(at=0,xt=0;at<_e;++at)xt+=he[at][ft][1];for(at=0,Xt=0,ar=He[ft][0]-He[ft-1][0];at<_e;++at){for(Ft=0,rr=(he[at][ft][1]-he[at][ft-1][1])/(2*ar);Ft<at;++Ft)rr+=(he[Ft][ft][1]-he[Ft][ft-1][1])/ar;Xt+=rr*he[at][ft][1]}jr[ft]=Pr-=xt?Xt/xt*ar:0,Pr<Cr&&(Cr=Pr)}for(ft=0;ft<qe;++ft)jr[ft]-=Cr;return jr},expand:function(he){var _e=he.length,He=he[0].length,qe=1/_e,at,ft,Ft,xt=[];for(ft=0;ft<He;++ft){for(at=0,Ft=0;at<_e;at++)Ft+=he[at][ft][1];if(Ft)for(at=0;at<_e;at++)he[at][ft][1]/=Ft;else for(at=0;at<_e;at++)he[at][ft][1]=qe}for(ft=0;ft<He;++ft)xt[ft]=0;return xt},zero:mc});function Df(he){return a.range(he.length)}function mc(he){for(var _e=-1,He=he[0].length,qe=[];++_e<He;)qe[_e]=0;return qe}function wi(he){for(var _e=1,He=0,qe=he[0][1],at,ft=he.length;_e<ft;++_e)(at=he[_e][1])>qe&&(He=_e,qe=at);return He}function ih(he){return he.reduce(xs,0)}function xs(he,_e){return he+_e[1]}a.layout.histogram=function(){var he=!0,_e=Number,He=xc,qe=Tu;function at(ft,Cr){for(var xt=[],Xt=ft.map(_e,this),rr=He.call(this,Xt,Cr),ar=qe.call(this,rr,Xt,Cr),Pr,Cr=-1,jr=Xt.length,en=ar.length-1,Ir=he?1:1/jr,Hr;++Cr<en;)Pr=xt[Cr]=[],Pr.dx=ar[Cr+1]-(Pr.x=ar[Cr]),Pr.y=0;if(en>0)for(Cr=-1;++Cr<jr;)Hr=Xt[Cr],Hr>=rr[0]&&Hr<=rr[1]&&(Pr=xt[a.bisect(ar,Hr,1,en)-1],Pr.y+=Ir,Pr.push(ft[Cr]));return xt}return at.value=function(ft){return arguments.length?(_e=ft,at):_e},at.range=function(ft){return arguments.length?(He=Jr(ft),at):He},at.bins=function(ft){return arguments.length?(qe=typeof ft=="number"?function(Ft){return Zl(Ft,ft)}:Jr(ft),at):qe},at.frequency=function(ft){return arguments.length?(he=!!ft,at):he},at};function Tu(he,_e){return Zl(he,Math.ceil(Math.log(_e.length)/Math.LN2+1))}function Zl(he,_e){for(var He=-1,qe=+he[0],at=(he[1]-qe)/_e,ft=[];++He<=_e;)ft[He]=at*He+qe;return ft}function xc(he){return[a.min(he),a.max(he)]}a.layout.pack=function(){var he=a.layout.hierarchy().sort(Ji),_e=0,He=[1,1],qe;function at(ft,Ft){var xt=he.call(this,ft,Ft),Xt=xt[0],rr=He[0],ar=He[1],Pr=qe==null?Math.sqrt:typeof qe=="function"?qe:function(){return qe};if(Xt.x=Xt.y=0,co(Xt,function(jr){jr.r=+Pr(jr.value)}),co(Xt,sl),_e){var Cr=_e*(qe?1:Math.max(2*Xt.r/rr,2*Xt.r/ar))/2;co(Xt,function(jr){jr.r+=Cr}),co(Xt,sl),co(Xt,function(jr){jr.r-=Cr})}return Ml(Xt,rr/2,ar/2,qe?1:1/Math.max(2*Xt.r/rr,2*Xt.r/ar)),xt}return at.size=function(ft){return arguments.length?(He=ft,at):He},at.radius=function(ft){return arguments.length?(qe=ft==null||typeof ft=="function"?ft:+ft,at):qe},at.padding=function(ft){return arguments.length?(_e=+ft,at):_e},bu(at,he)};function Ji(he,_e){return he.value-_e.value}function Qu(he,_e){var He=he._pack_next;he._pack_next=_e,_e._pack_prev=he,_e._pack_next=He,He._pack_prev=_e}function Go(he,_e){he._pack_next=_e,_e._pack_prev=he}function ol(he,_e){var He=_e.x-he.x,qe=_e.y-he.y,at=he.r+_e.r;return .999*at*at>He*He+qe*qe}function sl(he){if(!(_e=he.children)||!(Cr=_e.length))return;var _e,He=1/0,qe=-1/0,at=1/0,ft=-1/0,Ft,xt,Xt,rr,ar,Pr,Cr;function jr(Zr){He=Math.min(Zr.x-Zr.r,He),qe=Math.max(Zr.x+Zr.r,qe),at=Math.min(Zr.y-Zr.r,at),ft=Math.max(Zr.y+Zr.r,ft)}if(_e.forEach(Sl),Ft=_e[0],Ft.x=-Ft.r,Ft.y=0,jr(Ft),Cr>1&&(xt=_e[1],xt.x=xt.r,xt.y=0,jr(xt),Cr>2))for(Xt=_e[2],bs(Ft,xt,Xt),jr(Xt),Qu(Ft,Xt),Ft._pack_prev=Xt,Qu(Xt,xt),xt=Ft._pack_next,rr=3;rr<Cr;rr++){bs(Ft,xt,Xt=_e[rr]);var en=0,Ir=1,Hr=1;for(ar=xt._pack_next;ar!==xt;ar=ar._pack_next,Ir++)if(ol(ar,Xt)){en=1;break}if(en==1)for(Pr=Ft._pack_prev;Pr!==ar._pack_prev&&!ol(Pr,Xt);Pr=Pr._pack_prev,Hr++);en?(Ir<Hr||Ir==Hr&&xt.r<Ft.r?Go(Ft,xt=ar):Go(Ft=Pr,xt),rr--):(Qu(Ft,Xt),xt=Xt,jr(Xt))}var Xr=(He+qe)/2,tn=(at+ft)/2,un=0;for(rr=0;rr<Cr;rr++)Xt=_e[rr],Xt.x-=Xr,Xt.y-=tn,un=Math.max(un,Xt.r+Math.sqrt(Xt.x*Xt.x+Xt.y*Xt.y));he.r=un,_e.forEach(El)}function Sl(he){he._pack_next=he._pack_prev=he}function El(he){delete he._pack_next,delete he._pack_prev}function Ml(he,_e,He,qe){var at=he.children;if(he.x=_e+=qe*he.x,he.y=He+=qe*he.y,he.r*=qe,at)for(var ft=-1,Ft=at.length;++ft<Ft;)Ml(at[ft],_e,He,qe)}function bs(he,_e,He){var qe=he.r+He.r,at=_e.x-he.x,ft=_e.y-he.y;if(qe&&(at||ft)){var Ft=_e.r+He.r,xt=at*at+ft*ft;Ft*=Ft,qe*=qe;var Xt=.5+(qe-Ft)/(2*xt),rr=Math.sqrt(Math.max(0,2*Ft*(qe+xt)-(qe-=xt)*qe-Ft*Ft))/(2*xt);He.x=he.x+Xt*at+rr*ft,He.y=he.y+Xt*ft-rr*at}else He.x=he.x+qe,He.y=he.y}a.layout.tree=function(){var he=a.layout.hierarchy().sort(null).value(null),_e=Hs,He=[1,1],qe=null;function at(ar,Pr){var Cr=he.call(this,ar,Pr),jr=Cr[0],en=ft(jr);if(co(en,Ft),en.parent.m=-en.z,wu(en,xt),qe)wu(jr,rr);else{var Ir=jr,Hr=jr,Xr=jr;wu(jr,function(Nn){Nn.x<Ir.x&&(Ir=Nn),Nn.x>Hr.x&&(Hr=Nn),Nn.depth>Xr.depth&&(Xr=Nn)});var tn=_e(Ir,Hr)/2-Ir.x,un=He[0]/(Hr.x+_e(Hr,Ir)/2+tn),Zr=He[1]/(Xr.depth||1);wu(jr,function(Nn){Nn.x=(Nn.x+tn)*un,Nn.y=Nn.depth*Zr})}return Cr}function ft(ar){for(var Pr={A:null,children:[ar]},Cr=[Pr],jr;(jr=Cr.pop())!=null;)for(var en=jr.children,Ir,Hr=0,Xr=en.length;Hr<Xr;++Hr)Cr.push((en[Hr]=Ir={_:en[Hr],parent:jr,children:(Ir=en[Hr].children)&&Ir.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:Hr}).a=Ir);return Pr.children[0]}function Ft(ar){var Pr=ar.children,Cr=ar.parent.children,jr=ar.i?Cr[ar.i-1]:null;if(Pr.length){mv(ar);var en=(Pr[0].z+Pr[Pr.length-1].z)/2;jr?(ar.z=jr.z+_e(ar._,jr._),ar.m=ar.z-en):ar.z=en}else jr&&(ar.z=jr.z+_e(ar._,jr._));ar.parent.A=Xt(ar,jr,ar.parent.A||Cr[0])}function xt(ar){ar._.x=ar.z+ar.parent.m,ar.m+=ar.parent.m}function Xt(ar,Pr,Cr){if(Pr){for(var jr=ar,en=ar,Ir=Pr,Hr=jr.parent.children[0],Xr=jr.m,tn=en.m,un=Ir.m,Zr=Hr.m,Nn;Ir=ef(Ir),jr=qu(jr),Ir&&jr;)Hr=qu(Hr),en=ef(en),en.a=ar,Nn=Ir.z+un-jr.z-Xr+_e(Ir._,jr._),Nn>0&&(If(xv(Ir,ar,Cr),ar,Nn),Xr+=Nn,tn+=Nn),un+=Ir.m,Xr+=jr.m,Zr+=Hr.m,tn+=en.m;Ir&&!ef(en)&&(en.t=Ir,en.m+=un-tn),jr&&!qu(Hr)&&(Hr.t=jr,Hr.m+=Xr-Zr,Cr=ar)}return Cr}function rr(ar){ar.x*=He[0],ar.y=ar.depth*He[1]}return at.separation=function(ar){return arguments.length?(_e=ar,at):_e},at.size=function(ar){return arguments.length?(qe=(He=ar)==null?rr:null,at):qe?null:He},at.nodeSize=function(ar){return arguments.length?(qe=(He=ar)==null?null:rr,at):qe?He:null},bu(at,he)};function Hs(he,_e){return he.parent==_e.parent?1:2}function qu(he){var _e=he.children;return _e.length?_e[0]:he.t}function ef(he){var _e=he.children,He;return(He=_e.length)?_e[He-1]:he.t}function If(he,_e,He){var qe=He/(_e.i-he.i);_e.c-=qe,_e.s+=He,he.c+=qe,_e.z+=He,_e.m+=He}function mv(he){for(var _e=0,He=0,qe=he.children,at=qe.length,ft;--at>=0;)ft=qe[at],ft.z+=_e,ft.m+=_e,_e+=ft.s+(He+=ft.c)}function xv(he,_e,He){return he.a.parent===_e.parent?he.a:He}a.layout.cluster=function(){var he=a.layout.hierarchy().sort(null).value(null),_e=Hs,He=[1,1],qe=!1;function at(ft,Ft){var xt=he.call(this,ft,Ft),Xt=xt[0],rr,ar=0;co(Xt,function(Ir){var Hr=Ir.children;Hr&&Hr.length?(Ir.x=wv(Hr),Ir.y=bv(Hr)):(Ir.x=rr?ar+=_e(Ir,rr):0,Ir.y=0,rr=Ir)});var Pr=Ff(Xt),Cr=oh(Xt),jr=Pr.x-_e(Pr,Cr)/2,en=Cr.x+_e(Cr,Pr)/2;return co(Xt,qe?function(Ir){Ir.x=(Ir.x-Xt.x)*He[0],Ir.y=(Xt.y-Ir.y)*He[1]}:function(Ir){Ir.x=(Ir.x-jr)/(en-jr)*He[0],Ir.y=(1-(Xt.y?Ir.y/Xt.y:1))*He[1]}),xt}return at.separation=function(ft){return arguments.length?(_e=ft,at):_e},at.size=function(ft){return arguments.length?(qe=(He=ft)==null,at):qe?null:He},at.nodeSize=function(ft){return arguments.length?(qe=(He=ft)!=null,at):qe?He:null},bu(at,he)};function bv(he){return 1+a.max(he,function(_e){return _e.y})}function wv(he){return he.reduce(function(_e,He){return _e+He.x},0)/he.length}function Ff(he){var _e=he.children;return _e&&_e.length?Ff(_e[0]):he}function oh(he){var _e=he.children,He;return _e&&(He=_e.length)?oh(_e[He-1]):he}a.layout.treemap=function(){var he=a.layout.hierarchy(),_e=Math.round,He=[1,1],qe=null,at=Au,ft=!1,Ft,xt="squarify",Xt=.5*(1+Math.sqrt(5));function rr(Ir,Hr){for(var Xr=-1,tn=Ir.length,un,Zr;++Xr<tn;)Zr=(un=Ir[Xr]).value*(Hr<0?0:Hr),un.area=isNaN(Zr)||Zr<=0?0:Zr}function ar(Ir){var Hr=Ir.children;if(Hr&&Hr.length){var Xr=at(Ir),tn=[],un=Hr.slice(),Zr,Nn=1/0,Wn,Kn=xt==="slice"?Xr.dx:xt==="dice"?Xr.dy:xt==="slice-dice"?Ir.depth&1?Xr.dy:Xr.dx:Math.min(Xr.dx,Xr.dy),na;for(rr(un,Xr.dx*Xr.dy/Ir.value),tn.area=0;(na=un.length)>0;)tn.push(Zr=un[na-1]),tn.area+=Zr.area,xt!=="squarify"||(Wn=Cr(tn,Kn))<=Nn?(un.pop(),Nn=Wn):(tn.area-=tn.pop().area,jr(tn,Kn,Xr,!1),Kn=Math.min(Xr.dx,Xr.dy),tn.length=tn.area=0,Nn=1/0);tn.length&&(jr(tn,Kn,Xr,!0),tn.length=tn.area=0),Hr.forEach(ar)}}function Pr(Ir){var Hr=Ir.children;if(Hr&&Hr.length){var Xr=at(Ir),tn=Hr.slice(),un,Zr=[];for(rr(tn,Xr.dx*Xr.dy/Ir.value),Zr.area=0;un=tn.pop();)Zr.push(un),Zr.area+=un.area,un.z!=null&&(jr(Zr,un.z?Xr.dx:Xr.dy,Xr,!tn.length),Zr.length=Zr.area=0);Hr.forEach(Pr)}}function Cr(Ir,Hr){for(var Xr=Ir.area,tn,un=0,Zr=1/0,Nn=-1,Wn=Ir.length;++Nn<Wn;)(tn=Ir[Nn].area)&&(tn<Zr&&(Zr=tn),tn>un&&(un=tn));return Xr*=Xr,Hr*=Hr,Xr?Math.max(Hr*un*Xt/Xr,Xr/(Hr*Zr*Xt)):1/0}function jr(Ir,Hr,Xr,tn){var un=-1,Zr=Ir.length,Nn=Xr.x,Wn=Xr.y,Kn=Hr?_e(Ir.area/Hr):0,na;if(Hr==Xr.dx){for((tn||Kn>Xr.dy)&&(Kn=Xr.dy);++un<Zr;)na=Ir[un],na.x=Nn,na.y=Wn,na.dy=Kn,Nn+=na.dx=Math.min(Xr.x+Xr.dx-Nn,Kn?_e(na.area/Kn):0);na.z=!0,na.dx+=Xr.x+Xr.dx-Nn,Xr.y+=Kn,Xr.dy-=Kn}else{for((tn||Kn>Xr.dx)&&(Kn=Xr.dx);++un<Zr;)na=Ir[un],na.x=Nn,na.y=Wn,na.dx=Kn,Wn+=na.dy=Math.min(Xr.y+Xr.dy-Wn,Kn?_e(na.area/Kn):0);na.z=!1,na.dy+=Xr.y+Xr.dy-Wn,Xr.x+=Kn,Xr.dx-=Kn}}function en(Ir){var Hr=Ft||he(Ir),Xr=Hr[0];return Xr.x=Xr.y=0,Xr.value?(Xr.dx=He[0],Xr.dy=He[1]):Xr.dx=Xr.dy=0,Ft&&he.revalue(Xr),rr([Xr],Xr.dx*Xr.dy/Xr.value),(Ft?Pr:ar)(Xr),ft&&(Ft=Hr),Hr}return en.size=function(Ir){return arguments.length?(He=Ir,en):He},en.padding=function(Ir){if(!arguments.length)return qe;function Hr(un){var Zr=Ir.call(en,un,un.depth);return Zr==null?Au(un):yo(un,typeof Zr=="number"?[Zr,Zr,Zr,Zr]:Zr)}function Xr(un){return yo(un,Ir)}var tn;return at=(qe=Ir)==null?Au:(tn=typeof Ir)=="function"?Hr:(tn==="number"&&(Ir=[Ir,Ir,Ir,Ir]),Xr),en},en.round=function(Ir){return arguments.length?(_e=Ir?Math.round:Number,en):_e!=Number},en.sticky=function(Ir){return arguments.length?(ft=Ir,Ft=null,en):ft},en.ratio=function(Ir){return arguments.length?(Xt=Ir,en):Xt},en.mode=function(Ir){return arguments.length?(xt=Ir+"",en):xt},bu(en,he)};function Au(he){return{x:he.x,y:he.y,dx:he.dx,dy:he.dy}}function yo(he,_e){var He=he.x+_e[3],qe=he.y+_e[0],at=he.dx-_e[1]-_e[3],ft=he.dy-_e[0]-_e[2];return at<0&&(He+=at/2,at=0),ft<0&&(qe+=ft/2,ft=0),{x:He,y:qe,dx:at,dy:ft}}a.random={normal:function(he,_e){var He=arguments.length;return He<2&&(_e=1),He<1&&(he=0),function(){var qe,at,ft;do qe=Math.random()*2-1,at=Math.random()*2-1,ft=qe*qe+at*at;while(!ft||ft>1);return he+_e*qe*Math.sqrt(-2*Math.log(ft)/ft)}},logNormal:function(){var he=a.random.normal.apply(a,arguments);return function(){return Math.exp(he())}},bates:function(he){var _e=a.random.irwinHall(he);return function(){return _e()/he}},irwinHall:function(he){return function(){for(var _e=0,He=0;He<he;He++)_e+=Math.random();return _e}}},a.scale={};function Wo(he){var _e=he[0],He=he[he.length-1];return _e<He?[_e,He]:[He,_e]}function tf(he){return he.rangeExtent?he.rangeExtent():Wo(he.range())}function jl(he,_e,He,qe){var at=He(he[0],he[1]),ft=qe(_e[0],_e[1]);return function(Ft){return ft(at(Ft))}}function rf(he,_e){var He=0,qe=he.length-1,at=he[He],ft=he[qe],Ft;return ft<at&&(Ft=He,He=qe,qe=Ft,Ft=at,at=ft,ft=Ft),he[He]=_e.floor(at),he[qe]=_e.ceil(ft),he}function kf(he){return he?{floor:function(_e){return Math.floor(_e/he)*he},ceil:function(_e){return Math.ceil(_e/he)*he}}:Tv}var Tv={floor:V,ceil:V};function sh(he,_e,He,qe){var at=[],ft=[],Ft=0,xt=Math.min(he.length,_e.length)-1;for(he[xt]<he[0]&&(he=he.slice().reverse(),_e=_e.slice().reverse());++Ft<=xt;)at.push(He(he[Ft-1],he[Ft])),ft.push(qe(_e[Ft-1],_e[Ft]));return function(Xt){var rr=a.bisect(he,Xt,1,xt)-1;return ft[rr](at[rr](Xt))}}a.scale.linear=function(){return lh([0,1],[0,1],rl,!1)};function lh(he,_e,He,qe){var at,ft;function Ft(){var Xt=Math.min(he.length,_e.length)>2?sh:jl,rr=qe?yu:Ku;return at=Xt(he,_e,rr,He),ft=Xt(_e,he,rr,rl),xt}function xt(Xt){return at(Xt)}return xt.invert=function(Xt){return ft(Xt)},xt.domain=function(Xt){return arguments.length?(he=Xt.map(Number),Ft()):he},xt.range=function(Xt){return arguments.length?(_e=Xt,Ft()):_e},xt.rangeRound=function(Xt){return xt.range(Xt).interpolate(fc)},xt.clamp=function(Xt){return arguments.length?(qe=Xt,Ft()):qe},xt.interpolate=function(Xt){return arguments.length?(He=Xt,Ft()):He},xt.ticks=function(Xt){return Vs(he,Xt)},xt.tickFormat=function(Xt,rr){return d3_scale_linearTickFormat(he,Xt,rr)},xt.nice=function(Xt){return Cl(he,Xt),Ft()},xt.copy=function(){return lh(he,_e,He,qe)},Ft()}function bc(he,_e){return a.rebind(he,_e,"range","rangeRound","interpolate","clamp")}function Cl(he,_e){return rf(he,kf($i(he,_e)[2])),rf(he,kf($i(he,_e)[2])),he}function $i(he,_e){_e==null&&(_e=10);var He=Wo(he),qe=He[1]-He[0],at=Math.pow(10,Math.floor(Math.log(qe/_e)/Math.LN10)),ft=_e/qe*at;return ft<=.15?at*=10:ft<=.35?at*=5:ft<=.75&&(at*=2),He[0]=Math.ceil(He[0]/at)*at,He[1]=Math.floor(He[1]/at)*at+at*.5,He[2]=at,He}function Vs(he,_e){return a.range.apply(a,$i(he,_e))}a.scale.log=function(){return wc(a.scale.linear().domain([0,1]),10,!0,[1,10])};function wc(he,_e,He,qe){function at(xt){return(He?Math.log(xt<0?0:xt):-Math.log(xt>0?0:-xt))/Math.log(_e)}function ft(xt){return He?Math.pow(_e,xt):-Math.pow(_e,-xt)}function Ft(xt){return he(at(xt))}return Ft.invert=function(xt){return ft(he.invert(xt))},Ft.domain=function(xt){return arguments.length?(He=xt[0]>=0,he.domain((qe=xt.map(Number)).map(at)),Ft):qe},Ft.base=function(xt){return arguments.length?(_e=+xt,he.domain(qe.map(at)),Ft):_e},Ft.nice=function(){var xt=rf(qe.map(at),He?Math:uh);return he.domain(xt),qe=xt.map(ft),Ft},Ft.ticks=function(){var xt=Wo(qe),Xt=[],rr=xt[0],ar=xt[1],Pr=Math.floor(at(rr)),Cr=Math.ceil(at(ar)),jr=_e%1?2:_e;if(isFinite(Cr-Pr)){if(He){for(;Pr<Cr;Pr++)for(var en=1;en<jr;en++)Xt.push(ft(Pr)*en);Xt.push(ft(Pr))}else for(Xt.push(ft(Pr));Pr++<Cr;)for(var en=jr-1;en>0;en--)Xt.push(ft(Pr)*en);for(Pr=0;Xt[Pr]<rr;Pr++);for(Cr=Xt.length;Xt[Cr-1]>ar;Cr--);Xt=Xt.slice(Pr,Cr)}return Xt},Ft.copy=function(){return wc(he.copy(),_e,He,qe)},bc(Ft,he)}var uh={floor:function(he){return-Math.ceil(-he)},ceil:function(he){return-Math.floor(-he)}};a.scale.pow=function(){return Kl(a.scale.linear(),1,[0,1])};function Kl(he,_e,He){var qe=Of(_e),at=Of(1/_e);function ft(Ft){return he(qe(Ft))}return ft.invert=function(Ft){return at(he.invert(Ft))},ft.domain=function(Ft){return arguments.length?(he.domain((He=Ft.map(Number)).map(qe)),ft):He},ft.ticks=function(Ft){return Vs(He,Ft)},ft.tickFormat=function(Ft,xt){return d3_scale_linearTickFormat(He,Ft,xt)},ft.nice=function(Ft){return ft.domain(Cl(He,Ft))},ft.exponent=function(Ft){return arguments.length?(qe=Of(_e=Ft),at=Of(1/_e),he.domain(He.map(qe)),ft):_e},ft.copy=function(){return Kl(he.copy(),_e,He)},bc(ft,he)}function Of(he){return function(_e){return _e<0?-Math.pow(-_e,he):Math.pow(_e,he)}}a.scale.sqrt=function(){return a.scale.pow().exponent(.5)},a.scale.ordinal=function(){return ws([],{t:"range",a:[[]]})};function ws(he,_e){var He,qe,at;function ft(xt){return qe[((He.get(xt)||(_e.t==="range"?He.set(xt,he.push(xt)):NaN))-1)%qe.length]}function Ft(xt,Xt){return a.range(he.length).map(function(rr){return xt+Xt*rr})}return ft.domain=function(xt){if(!arguments.length)return he;he=[],He=new D;for(var Xt=-1,rr=xt.length,ar;++Xt<rr;)He.has(ar=xt[Xt])||He.set(ar,he.push(ar));return ft[_e.t].apply(ft,_e.a)},ft.range=function(xt){return arguments.length?(qe=xt,at=0,_e={t:"range",a:arguments},ft):qe},ft.rangePoints=function(xt,Xt){arguments.length<2&&(Xt=0);var rr=xt[0],ar=xt[1],Pr=he.length<2?(rr=(rr+ar)/2,0):(ar-rr)/(he.length-1+Xt);return qe=Ft(rr+Pr*Xt/2,Pr),at=0,_e={t:"rangePoints",a:arguments},ft},ft.rangeRoundPoints=function(xt,Xt){arguments.length<2&&(Xt=0);var rr=xt[0],ar=xt[1],Pr=he.length<2?(rr=ar=Math.round((rr+ar)/2),0):(ar-rr)/(he.length-1+Xt)|0;return qe=Ft(rr+Math.round(Pr*Xt/2+(ar-rr-(he.length-1+Xt)*Pr)/2),Pr),at=0,_e={t:"rangeRoundPoints",a:arguments},ft},ft.rangeBands=function(xt,Xt,rr){arguments.length<2&&(Xt=0),arguments.length<3&&(rr=Xt);var ar=xt[1]<xt[0],Pr=xt[ar-0],Cr=xt[1-ar],jr=(Cr-Pr)/(he.length-Xt+2*rr);return qe=Ft(Pr+jr*rr,jr),ar&&qe.reverse(),at=jr*(1-Xt),_e={t:"rangeBands",a:arguments},ft},ft.rangeRoundBands=function(xt,Xt,rr){arguments.length<2&&(Xt=0),arguments.length<3&&(rr=Xt);var ar=xt[1]<xt[0],Pr=xt[ar-0],Cr=xt[1-ar],jr=Math.floor((Cr-Pr)/(he.length-Xt+2*rr));return qe=Ft(Pr+Math.round((Cr-Pr-(he.length-Xt)*jr)/2),jr),ar&&qe.reverse(),at=Math.round(jr*(1-Xt)),_e={t:"rangeRoundBands",a:arguments},ft},ft.rangeBand=function(){return at},ft.rangeExtent=function(){return Wo(_e.a[0])},ft.copy=function(){return ws(he,_e)},ft.domain(he)}a.scale.category10=function(){return a.scale.ordinal().range(zf)},a.scale.category20=function(){return a.scale.ordinal().range(ll)},a.scale.category20b=function(){return a.scale.ordinal().range(ul)},a.scale.category20c=function(){return a.scale.ordinal().range(Tc)};var zf=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Yt),ll=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Yt),ul=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Yt),Tc=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Yt);a.scale.quantile=function(){return Su([],[])};function Su(he,_e){var He;function qe(){var ft=0,Ft=_e.length;for(He=[];++ft<Ft;)He[ft-1]=a.quantile(he,ft/Ft);return at}function at(ft){if(!isNaN(ft=+ft))return _e[a.bisect(He,ft)]}return at.domain=function(ft){return arguments.length?(he=ft.map(b).filter(p).sort(h),qe()):he},at.range=function(ft){return arguments.length?(_e=ft,qe()):_e},at.quantiles=function(){return He},at.invertExtent=function(ft){return ft=_e.indexOf(ft),ft<0?[NaN,NaN]:[ft>0?He[ft-1]:he[0],ft<He.length?He[ft]:he[he.length-1]]},at.copy=function(){return Su(he,_e)},qe()}a.scale.quantize=function(){return pi(0,1,[0,1])};function pi(he,_e,He){var qe,at;function ft(xt){return He[Math.max(0,Math.min(at,Math.floor(qe*(xt-he))))]}function Ft(){return qe=He.length/(_e-he),at=He.length-1,ft}return ft.domain=function(xt){return arguments.length?(he=+xt[0],_e=+xt[xt.length-1],Ft()):[he,_e]},ft.range=function(xt){return arguments.length?(He=xt,Ft()):He},ft.invertExtent=function(xt){return xt=He.indexOf(xt),xt=xt<0?NaN:xt/qe+he,[xt,xt+1/qe]},ft.copy=function(){return pi(he,_e,He)},Ft()}a.scale.threshold=function(){return Jl([.5],[0,1])};function Jl(he,_e){function He(qe){if(qe<=qe)return _e[a.bisect(he,qe)]}return He.domain=function(qe){return arguments.length?(he=qe,He):he},He.range=function(qe){return arguments.length?(_e=qe,He):_e},He.invertExtent=function(qe){return qe=_e.indexOf(qe),[he[qe-1],he[qe]]},He.copy=function(){return Jl(he,_e)},He}a.scale.identity=function(){return Nf([0,1])};function Nf(he){function _e(He){return+He}return _e.invert=_e,_e.domain=_e.range=function(He){return arguments.length?(he=He.map(_e),_e):he},_e.ticks=function(He){return Vs(he,He)},_e.tickFormat=function(He,qe){return d3_scale_linearTickFormat(he,He,qe)},_e.copy=function(){return Nf(he)},_e}a.svg={};function Bf(){return 0}a.svg.arc=function(){var he=Av,_e=Ac,He=Bf,qe=Ll,at=Eu,ft=Sc,Ft=fh;function xt(){var rr=Math.max(0,+he.apply(this,arguments)),ar=Math.max(0,+_e.apply(this,arguments)),Pr=at.apply(this,arguments)-We,Cr=ft.apply(this,arguments)-We,jr=Math.abs(Cr-Pr),en=Pr>Cr?0:1;if(ar<rr&&(Ir=ar,ar=rr,rr=Ir),jr>=Ge)return Xt(ar,en)+(rr?Xt(rr,1-en):"")+"Z";var Ir,Hr,Xr,tn,un=0,Zr=0,Nn,Wn,Kn,na,wa,ba,Wa,Pa,Ha=[];if((tn=(+Ft.apply(this,arguments)||0)/2)&&(Xr=qe===Ll?Math.sqrt(rr*rr+ar*ar):+qe.apply(this,arguments),en||(Zr*=-1),ar&&(Zr=Pt(Xr/ar*Math.sin(tn))),rr&&(un=Pt(Xr/rr*Math.sin(tn)))),ar){Nn=ar*Math.cos(Pr+Zr),Wn=ar*Math.sin(Pr+Zr),Kn=ar*Math.cos(Cr-Zr),na=ar*Math.sin(Cr-Zr);var ri=Math.abs(Cr-Pr-2*Zr)<=Ae?0:1;if(Zr&&fl(Nn,Wn,Kn,na)===en^ri){var si=(Pr+Cr)/2;Nn=ar*Math.cos(si),Wn=ar*Math.sin(si),Kn=na=null}}else Nn=Wn=0;if(rr){wa=rr*Math.cos(Cr-un),ba=rr*Math.sin(Cr-un),Wa=rr*Math.cos(Pr+un),Pa=rr*Math.sin(Pr+un);var gi=Math.abs(Pr-Cr+2*un)<=Ae?0:1;if(un&&fl(wa,ba,Wa,Pa)===1-en^gi){var Bn=(Pr+Cr)/2;wa=rr*Math.cos(Bn),ba=rr*Math.sin(Bn),Wa=Pa=null}}else wa=ba=0;if(jr>pe&&(Ir=Math.min(Math.abs(ar-rr)/2,+He.apply(this,arguments)))>.001){Hr=rr<ar^en?0:1;var Va=Ir,Ba=Ir;if(jr<Ae){var Ja=Wa==null?[wa,ba]:Kn==null?[Nn,Wn]:dn([Nn,Wn],[Wa,Pa],[Kn,na],[wa,ba]),Ri=Nn-Ja[0],ji=Wn-Ja[1],qi=Kn-Ja[0],Mi=na-Ja[1],mi=1/Math.sin(Math.acos((Ri*qi+ji*Mi)/(Math.sqrt(Ri*Ri+ji*ji)*Math.sqrt(qi*qi+Mi*Mi)))/2),ma=Math.sqrt(Ja[0]*Ja[0]+Ja[1]*Ja[1]);Ba=Math.min(Ir,(rr-ma)/(mi-1)),Va=Math.min(Ir,(ar-ma)/(mi+1))}if(Kn!=null){var Ca=Pl(Wa==null?[wa,ba]:[Wa,Pa],[Nn,Wn],ar,Va,en),Ci=Pl([Kn,na],[wa,ba],ar,Va,en);Ir===Va?Ha.push("M",Ca[0],"A",Va,",",Va," 0 0,",Hr," ",Ca[1],"A",ar,",",ar," 0 ",1-en^fl(Ca[1][0],Ca[1][1],Ci[1][0],Ci[1][1]),",",en," ",Ci[1],"A",Va,",",Va," 0 0,",Hr," ",Ci[0]):Ha.push("M",Ca[0],"A",Va,",",Va," 0 1,",Hr," ",Ci[0])}else Ha.push("M",Nn,",",Wn);if(Wa!=null){var Qi=Pl([Nn,Wn],[Wa,Pa],rr,-Ba,en),ts=Pl([wa,ba],Kn==null?[Nn,Wn]:[Kn,na],rr,-Ba,en);Ir===Ba?Ha.push("L",ts[0],"A",Ba,",",Ba," 0 0,",Hr," ",ts[1],"A",rr,",",rr," 0 ",en^fl(ts[1][0],ts[1][1],Qi[1][0],Qi[1][1]),",",1-en," ",Qi[1],"A",Ba,",",Ba," 0 0,",Hr," ",Qi[0]):Ha.push("L",ts[0],"A",Ba,",",Ba," 0 0,",Hr," ",Qi[0])}else Ha.push("L",wa,",",ba)}else Ha.push("M",Nn,",",Wn),Kn!=null&&Ha.push("A",ar,",",ar," 0 ",ri,",",en," ",Kn,",",na),Ha.push("L",wa,",",ba),Wa!=null&&Ha.push("A",rr,",",rr," 0 ",gi,",",1-en," ",Wa,",",Pa);return Ha.push("Z"),Ha.join("")}function Xt(rr,ar){return"M0,"+rr+"A"+rr+","+rr+" 0 1,"+ar+" 0,"+-rr+"A"+rr+","+rr+" 0 1,"+ar+" 0,"+rr}return xt.innerRadius=function(rr){return arguments.length?(he=Jr(rr),xt):he},xt.outerRadius=function(rr){return arguments.length?(_e=Jr(rr),xt):_e},xt.cornerRadius=function(rr){return arguments.length?(He=Jr(rr),xt):He},xt.padRadius=function(rr){return arguments.length?(qe=rr==Ll?Ll:Jr(rr),xt):qe},xt.startAngle=function(rr){return arguments.length?(at=Jr(rr),xt):at},xt.endAngle=function(rr){return arguments.length?(ft=Jr(rr),xt):ft},xt.padAngle=function(rr){return arguments.length?(Ft=Jr(rr),xt):Ft},xt.centroid=function(){var rr=(+he.apply(this,arguments)+ +_e.apply(this,arguments))/2,ar=(+at.apply(this,arguments)+ +ft.apply(this,arguments))/2-We;return[Math.cos(ar)*rr,Math.sin(ar)*rr]},xt};var Ll="auto";function Av(he){return he.innerRadius}function Ac(he){return he.outerRadius}function Eu(he){return he.startAngle}function Sc(he){return he.endAngle}function fh(he){return he&&he.padAngle}function fl(he,_e,He,qe){return(he-He)*_e-(_e-qe)*he>0?0:1}function Pl(he,_e,He,qe,at){var ft=he[0]-_e[0],Ft=he[1]-_e[1],xt=(at?qe:-qe)/Math.sqrt(ft*ft+Ft*Ft),Xt=xt*Ft,rr=-xt*ft,ar=he[0]+Xt,Pr=he[1]+rr,Cr=_e[0]+Xt,jr=_e[1]+rr,en=(ar+Cr)/2,Ir=(Pr+jr)/2,Hr=Cr-ar,Xr=jr-Pr,tn=Hr*Hr+Xr*Xr,un=He-qe,Zr=ar*jr-Cr*Pr,Nn=(Xr<0?-1:1)*Math.sqrt(Math.max(0,un*un*tn-Zr*Zr)),Wn=(Zr*Xr-Hr*Nn)/tn,Kn=(-Zr*Hr-Xr*Nn)/tn,na=(Zr*Xr+Hr*Nn)/tn,wa=(-Zr*Hr+Xr*Nn)/tn,ba=Wn-en,Wa=Kn-Ir,Pa=na-en,Ha=wa-Ir;return ba*ba+Wa*Wa>Pa*Pa+Ha*Ha&&(Wn=na,Kn=wa),[[Wn-Xt,Kn-rr],[Wn*He/un,Kn*He/un]]}function $l(){return!0}function Ql(he){var _e=sa,He=ha,qe=$l,at=es,ft=at.key,Ft=.7;function xt(Xt){var rr=[],ar=[],Pr=-1,Cr=Xt.length,jr,en=Jr(_e),Ir=Jr(He);function Hr(){rr.push("M",at(he(ar),Ft))}for(;++Pr<Cr;)qe.call(this,jr=Xt[Pr],Pr)?ar.push([+en.call(this,jr,Pr),+Ir.call(this,jr,Pr)]):ar.length&&(Hr(),ar=[]);return ar.length&&Hr(),rr.length?rr.join(""):null}return xt.x=function(Xt){return arguments.length?(_e=Xt,xt):_e},xt.y=function(Xt){return arguments.length?(He=Xt,xt):He},xt.defined=function(Xt){return arguments.length?(qe=Xt,xt):qe},xt.interpolate=function(Xt){return arguments.length?(typeof Xt=="function"?ft=at=Xt:ft=(at=Yo.get(Xt)||es).key,xt):ft},xt.tension=function(Xt){return arguments.length?(Ft=Xt,xt):Ft},xt}a.svg.line=function(){return Ql(V)};var Yo=a.map({linear:es,"linear-closed":ql,step:ch,"step-before":Mu,"step-after":Uf,basis:cl,"basis-open":Sv,"basis-closed":Mc,bundle:Hf,cardinal:Ec,"cardinal-open":hh,"cardinal-closed":Ts,monotone:Cc});Yo.forEach(function(he,_e){_e.key=he,_e.closed=/-closed$/.test(he)});function es(he){return he.length>1?he.join("L"):he+"Z"}function ql(he){return he.join("L")+"Z"}function ch(he){for(var _e=0,He=he.length,qe=he[0],at=[qe[0],",",qe[1]];++_e<He;)at.push("H",(qe[0]+(qe=he[_e])[0])/2,"V",qe[1]);return He>1&&at.push("H",qe[0]),at.join("")}function Mu(he){for(var _e=0,He=he.length,qe=he[0],at=[qe[0],",",qe[1]];++_e<He;)at.push("V",(qe=he[_e])[1],"H",qe[0]);return at.join("")}function Uf(he){for(var _e=0,He=he.length,qe=he[0],at=[qe[0],",",qe[1]];++_e<He;)at.push("H",(qe=he[_e])[0],"V",qe[1]);return at.join("")}function hh(he,_e){return he.length<4?es(he):he[1]+_l(he.slice(1,-1),nf(he,_e))}function Ts(he,_e){return he.length<3?ql(he):he[0]+_l((he.push(he[0]),he),nf([he[he.length-2]].concat(he,[he[1]]),_e))}function Ec(he,_e){return he.length<3?es(he):he[0]+_l(he,nf(he,_e))}function _l(he,_e){if(_e.length<1||he.length!=_e.length&&he.length!=_e.length+2)return es(he);var He=he.length!=_e.length,qe="",at=he[0],ft=he[1],Ft=_e[0],xt=Ft,Xt=1;if(He&&(qe+="Q"+(ft[0]-Ft[0]*2/3)+","+(ft[1]-Ft[1]*2/3)+","+ft[0]+","+ft[1],at=he[1],Xt=2),_e.length>1){xt=_e[1],ft=he[Xt],Xt++,qe+="C"+(at[0]+Ft[0])+","+(at[1]+Ft[1])+","+(ft[0]-xt[0])+","+(ft[1]-xt[1])+","+ft[0]+","+ft[1];for(var rr=2;rr<_e.length;rr++,Xt++)ft=he[Xt],xt=_e[rr],qe+="S"+(ft[0]-xt[0])+","+(ft[1]-xt[1])+","+ft[0]+","+ft[1]}if(He){var ar=he[Xt];qe+="Q"+(ft[0]+xt[0]*2/3)+","+(ft[1]+xt[1]*2/3)+","+ar[0]+","+ar[1]}return qe}function nf(he,_e){for(var He=[],qe=(1-_e)/2,at,ft=he[0],Ft=he[1],xt=1,Xt=he.length;++xt<Xt;)at=ft,ft=Ft,Ft=he[xt],He.push([qe*(Ft[0]-at[0]),qe*(Ft[1]-at[1])]);return He}function cl(he){if(he.length<3)return es(he);var _e=1,He=he.length,qe=he[0],at=qe[0],ft=qe[1],Ft=[at,at,at,(qe=he[1])[0]],xt=[ft,ft,ft,qe[1]],Xt=[at,",",ft,"L",Po(Gs,Ft),",",Po(Gs,xt)];for(he.push(he[He-1]);++_e<=He;)qe=he[_e],Ft.shift(),Ft.push(qe[0]),xt.shift(),xt.push(qe[1]),of(Xt,Ft,xt);return he.pop(),Xt.push("L",qe),Xt.join("")}function Sv(he){if(he.length<4)return es(he);for(var _e=[],He=-1,qe=he.length,at,ft=[0],Ft=[0];++He<3;)at=he[He],ft.push(at[0]),Ft.push(at[1]);for(_e.push(Po(Gs,ft)+","+Po(Gs,Ft)),--He;++He<qe;)at=he[He],ft.shift(),ft.push(at[0]),Ft.shift(),Ft.push(at[1]),of(_e,ft,Ft);return _e.join("")}function Mc(he){for(var _e,He=-1,qe=he.length,at=qe+4,ft,Ft=[],xt=[];++He<4;)ft=he[He%qe],Ft.push(ft[0]),xt.push(ft[1]);for(_e=[Po(Gs,Ft),",",Po(Gs,xt)],--He;++He<at;)ft=he[He%qe],Ft.shift(),Ft.push(ft[0]),xt.shift(),xt.push(ft[1]),of(_e,Ft,xt);return _e.join("")}function Hf(he,_e){var He=he.length-1;if(He)for(var qe=he[0][0],at=he[0][1],ft=he[He][0]-qe,Ft=he[He][1]-at,xt=-1,Xt,rr;++xt<=He;)Xt=he[xt],rr=xt/He,Xt[0]=_e*Xt[0]+(1-_e)*(qe+rr*ft),Xt[1]=_e*Xt[1]+(1-_e)*(at+rr*Ft);return cl(he)}function Po(he,_e){return he[0]*_e[0]+he[1]*_e[1]+he[2]*_e[2]+he[3]*_e[3]}var vh=[0,2/3,1/3,0],af=[0,1/3,2/3,0],Gs=[0,1/6,2/3,1/6];function of(he,_e,He){he.push("C",Po(vh,_e),",",Po(vh,He),",",Po(af,_e),",",Po(af,He),",",Po(Gs,_e),",",Po(Gs,He))}function Rl(he,_e){return(_e[1]-he[1])/(_e[0]-he[0])}function Vf(he){for(var _e=0,He=he.length-1,qe=[],at=he[0],ft=he[1],Ft=qe[0]=Rl(at,ft);++_e<He;)qe[_e]=(Ft+(Ft=Rl(at=ft,ft=he[_e+1])))/2;return qe[_e]=Ft,qe}function dh(he){for(var _e=[],He,qe,at,ft,Ft=Vf(he),xt=-1,Xt=he.length-1;++xt<Xt;)He=Rl(he[xt],he[xt+1]),m(He)<pe?Ft[xt]=Ft[xt+1]=0:(qe=Ft[xt]/He,at=Ft[xt+1]/He,ft=qe*qe+at*at,ft>9&&(ft=He*3/Math.sqrt(ft),Ft[xt]=ft*qe,Ft[xt+1]=ft*at));for(xt=-1;++xt<=Xt;)ft=(he[Math.min(Xt,xt+1)][0]-he[Math.max(0,xt-1)][0])/(6*(1+Ft[xt]*Ft[xt])),_e.push([ft||0,Ft[xt]*ft||0]);return _e}function Cc(he){return he.length<3?es(he):he[0]+_l(he,dh(he))}a.svg.line.radial=function(){var he=Ql(Lc);return he.radius=he.x,delete he.x,he.angle=he.y,delete he.y,he};function Lc(he){for(var _e,He=-1,qe=he.length,at,ft;++He<qe;)_e=he[He],at=_e[0],ft=_e[1]-We,_e[0]=at*Math.cos(ft),_e[1]=at*Math.sin(ft);return he}function eu(he){var _e=sa,He=sa,qe=0,at=ha,ft=$l,Ft=es,xt=Ft.key,Xt=Ft,rr="L",ar=.7;function Pr(Cr){var jr=[],en=[],Ir=[],Hr=-1,Xr=Cr.length,tn,un=Jr(_e),Zr=Jr(qe),Nn=_e===He?function(){return Kn}:Jr(He),Wn=qe===at?function(){return na}:Jr(at),Kn,na;function wa(){jr.push("M",Ft(he(Ir),ar),rr,Xt(he(en.reverse()),ar),"Z")}for(;++Hr<Xr;)ft.call(this,tn=Cr[Hr],Hr)?(en.push([Kn=+un.call(this,tn,Hr),na=+Zr.call(this,tn,Hr)]),Ir.push([+Nn.call(this,tn,Hr),+Wn.call(this,tn,Hr)])):en.length&&(wa(),en=[],Ir=[]);return en.length&&wa(),jr.length?jr.join(""):null}return Pr.x=function(Cr){return arguments.length?(_e=He=Cr,Pr):He},Pr.x0=function(Cr){return arguments.length?(_e=Cr,Pr):_e},Pr.x1=function(Cr){return arguments.length?(He=Cr,Pr):He},Pr.y=function(Cr){return arguments.length?(qe=at=Cr,Pr):at},Pr.y0=function(Cr){return arguments.length?(qe=Cr,Pr):qe},Pr.y1=function(Cr){return arguments.length?(at=Cr,Pr):at},Pr.defined=function(Cr){return arguments.length?(ft=Cr,Pr):ft},Pr.interpolate=function(Cr){return arguments.length?(typeof Cr=="function"?xt=Ft=Cr:xt=(Ft=Yo.get(Cr)||es).key,Xt=Ft.reverse||Ft,rr=Ft.closed?"M":"L",Pr):xt},Pr.tension=function(Cr){return arguments.length?(ar=Cr,Pr):ar},Pr}Mu.reverse=Uf,Uf.reverse=Mu,a.svg.area=function(){return eu(V)},a.svg.area.radial=function(){var he=eu(Lc);return he.radius=he.x,delete he.x,he.innerRadius=he.x0,delete he.x0,he.outerRadius=he.x1,delete he.x1,he.angle=he.y,delete he.y,he.startAngle=he.y0,delete he.y0,he.endAngle=he.y1,delete he.y1,he};function Gf(he){return he.source}function sf(he){return he.target}a.svg.chord=function(){var he=Gf,_e=sf,He=ph,qe=Eu,at=Sc;function ft(ar,Pr){var Cr=Ft(this,he,ar,Pr),jr=Ft(this,_e,ar,Pr);return"M"+Cr.p0+Xt(Cr.r,Cr.p1,Cr.a1-Cr.a0)+(xt(Cr,jr)?rr(Cr.r,Cr.p1,Cr.r,Cr.p0):rr(Cr.r,Cr.p1,jr.r,jr.p0)+Xt(jr.r,jr.p1,jr.a1-jr.a0)+rr(jr.r,jr.p1,Cr.r,Cr.p0))+"Z"}function Ft(ar,Pr,Cr,jr){var en=Pr.call(ar,Cr,jr),Ir=He.call(ar,en,jr),Hr=qe.call(ar,en,jr)-We,Xr=at.call(ar,en,jr)-We;return{r:Ir,a0:Hr,a1:Xr,p0:[Ir*Math.cos(Hr),Ir*Math.sin(Hr)],p1:[Ir*Math.cos(Xr),Ir*Math.sin(Xr)]}}function xt(ar,Pr){return ar.a0==Pr.a0&&ar.a1==Pr.a1}function Xt(ar,Pr,Cr){return"A"+ar+","+ar+" 0 "+ +(Cr>Ae)+",1 "+Pr}function rr(ar,Pr,Cr,jr){return"Q 0,0 "+jr}return ft.radius=function(ar){return arguments.length?(He=Jr(ar),ft):He},ft.source=function(ar){return arguments.length?(he=Jr(ar),ft):he},ft.target=function(ar){return arguments.length?(_e=Jr(ar),ft):_e},ft.startAngle=function(ar){return arguments.length?(qe=Jr(ar),ft):qe},ft.endAngle=function(ar){return arguments.length?(at=Jr(ar),ft):at},ft};function ph(he){return he.radius}a.svg.diagonal=function(){var he=Gf,_e=sf,He=lf;function qe(at,ft){var Ft=he.call(this,at,ft),xt=_e.call(this,at,ft),Xt=(Ft.y+xt.y)/2,rr=[Ft,{x:Ft.x,y:Xt},{x:xt.x,y:Xt},xt];return rr=rr.map(He),"M"+rr[0]+"C"+rr[1]+" "+rr[2]+" "+rr[3]}return qe.source=function(at){return arguments.length?(he=Jr(at),qe):he},qe.target=function(at){return arguments.length?(_e=Jr(at),qe):_e},qe.projection=function(at){return arguments.length?(He=at,qe):He},qe};function lf(he){return[he.x,he.y]}a.svg.diagonal.radial=function(){var he=a.svg.diagonal(),_e=lf,He=he.projection;return he.projection=function(qe){return arguments.length?He(gh(_e=qe)):_e},he};function gh(he){return function(){var _e=he.apply(this,arguments),He=_e[0],qe=_e[1]-We;return[He*Math.cos(qe),He*Math.sin(qe)]}}a.svg.symbol=function(){var he=ot,_e=Je;function He(qe,at){return(At.get(he.call(this,qe,at))||bt)(_e.call(this,qe,at))}return He.type=function(qe){return arguments.length?(he=Jr(qe),He):he},He.size=function(qe){return arguments.length?(_e=Jr(qe),He):_e},He};function Je(){return 64}function ot(){return"circle"}function bt(he){var _e=Math.sqrt(he/Ae);return"M0,"+_e+"A"+_e+","+_e+" 0 1,1 0,"+-_e+"A"+_e+","+_e+" 0 1,1 0,"+_e+"Z"}var At=a.map({circle:bt,cross:function(he){var _e=Math.sqrt(he/5)/2;return"M"+-3*_e+","+-_e+"H"+-_e+"V"+-3*_e+"H"+_e+"V"+-_e+"H"+3*_e+"V"+_e+"H"+_e+"V"+3*_e+"H"+-_e+"V"+_e+"H"+-3*_e+"Z"},diamond:function(he){var _e=Math.sqrt(he/(2*It)),He=_e*It;return"M0,"+-_e+"L"+He+",0 0,"+_e+" "+-He+",0Z"},square:function(he){var _e=Math.sqrt(he)/2;return"M"+-_e+","+-_e+"L"+_e+","+-_e+" "+_e+","+_e+" "+-_e+","+_e+"Z"},"triangle-down":function(he){var _e=Math.sqrt(he/Ot),He=_e*Ot/2;return"M0,"+He+"L"+_e+","+-He+" "+-_e+","+-He+"Z"},"triangle-up":function(he){var _e=Math.sqrt(he/Ot),He=_e*Ot/2;return"M0,"+-He+"L"+_e+","+He+" "+-_e+","+He+"Z"}});a.svg.symbolTypes=At.keys();var Ot=Math.sqrt(3),It=Math.tan(30*tt);ne.transition=function(he){for(var _e=_r||++Er,He=bn(he),qe=[],at,ft,Ft=Yr||{time:Date.now(),ease:ov,delay:0,duration:250},xt=-1,Xt=this.length;++xt<Xt;){qe.push(at=[]);for(var rr=this[xt],ar=-1,Pr=rr.length;++ar<Pr;)(ft=rr[ar])&&Rn(ft,ar,He,_e,Ft),at.push(ft)}return xr(qe,He,_e)},ne.interrupt=function(he){return this.each(he==null?Ht:dr(bn(he)))};var Ht=dr(bn());function dr(he){return function(){var _e,He,qe;(_e=this[he])&&(qe=_e[He=_e.active])&&(qe.timer.c=null,qe.timer.t=NaN,--_e.count?delete _e[He]:delete this[he],_e.active+=.5,qe.event&&qe.event.interrupt.call(this,this.__data__,qe.index))}}function xr(he,_e,He){return Z(he,sr),he.namespace=_e,he.id=He,he}var sr=[],Er=0,_r,Yr;sr.call=ne.call,sr.empty=ne.empty,sr.node=ne.node,sr.size=ne.size,a.transition=function(he,_e){return he&&he.transition?_r?he.transition(_e):he:a.selection().transition(he)},a.transition.prototype=sr,sr.select=function(he){var _e=this.id,He=this.namespace,qe=[],at,ft,Ft;he=ve(he);for(var xt=-1,Xt=this.length;++xt<Xt;){qe.push(at=[]);for(var rr=this[xt],ar=-1,Pr=rr.length;++ar<Pr;)(Ft=rr[ar])&&(ft=he.call(Ft,Ft.__data__,ar,xt))?("__data__"in Ft&&(ft.__data__=Ft.__data__),Rn(ft,ar,He,_e,Ft[He][_e]),at.push(ft)):at.push(null)}return xr(qe,He,_e)},sr.selectAll=function(he){var _e=this.id,He=this.namespace,qe=[],at,ft,Ft,xt,Xt;he=le(he);for(var rr=-1,ar=this.length;++rr<ar;)for(var Pr=this[rr],Cr=-1,jr=Pr.length;++Cr<jr;)if(Ft=Pr[Cr]){Xt=Ft[He][_e],ft=he.call(Ft,Ft.__data__,Cr,rr),qe.push(at=[]);for(var en=-1,Ir=ft.length;++en<Ir;)(xt=ft[en])&&Rn(xt,en,He,_e,Xt),at.push(xt)}return xr(qe,He,_e)},sr.filter=function(he){var _e=[],He,qe,at;typeof he!="function"&&(he=ht(he));for(var ft=0,Ft=this.length;ft<Ft;ft++){_e.push(He=[]);for(var qe=this[ft],xt=0,Xt=qe.length;xt<Xt;xt++)(at=qe[xt])&&he.call(at,at.__data__,xt,ft)&&He.push(at)}return xr(_e,this.namespace,this.id)},sr.tween=function(he,_e){var He=this.id,qe=this.namespace;return arguments.length<2?this.node()[qe][He].tween.get(he):it(this,_e==null?function(at){at[qe][He].tween.remove(he)}:function(at){at[qe][He].tween.set(he,_e)})};function $r(he,_e,He,qe){var at=he.id,ft=he.namespace;return it(he,typeof He=="function"?function(Ft,xt,Xt){Ft[ft][at].tween.set(_e,qe(He.call(Ft,Ft.__data__,xt,Xt)))}:(He=qe(He),function(Ft){Ft[ft][at].tween.set(_e,He)}))}sr.attr=function(he,_e){if(arguments.length<2){for(_e in he)this.attr(_e,he[_e]);return this}var He=he=="transform"?Xl:rl,qe=a.ns.qualify(he);function at(){this.removeAttribute(qe)}function ft(){this.removeAttributeNS(qe.space,qe.local)}function Ft(Xt){return Xt==null?at:(Xt+="",function(){var rr=this.getAttribute(qe),ar;return rr!==Xt&&(ar=He(rr,Xt),function(Pr){this.setAttribute(qe,ar(Pr))})})}function xt(Xt){return Xt==null?ft:(Xt+="",function(){var rr=this.getAttributeNS(qe.space,qe.local),ar;return rr!==Xt&&(ar=He(rr,Xt),function(Pr){this.setAttributeNS(qe.space,qe.local,ar(Pr))})})}return $r(this,"attr."+he,_e,qe.local?xt:Ft)},sr.attrTween=function(he,_e){var He=a.ns.qualify(he);function qe(ft,Ft){var xt=_e.call(this,ft,Ft,this.getAttribute(He));return xt&&function(Xt){this.setAttribute(He,xt(Xt))}}function at(ft,Ft){var xt=_e.call(this,ft,Ft,this.getAttributeNS(He.space,He.local));return xt&&function(Xt){this.setAttributeNS(He.space,He.local,xt(Xt))}}return this.tween("attr."+he,He.local?at:qe)},sr.style=function(he,_e,He){var qe=arguments.length;if(qe<3){if(typeof he!="string"){qe<2&&(_e="");for(He in he)this.style(He,he[He],_e);return this}He=""}function at(){this.style.removeProperty(he)}function ft(Ft){return Ft==null?at:(Ft+="",function(){var xt=r(this).getComputedStyle(this,null).getPropertyValue(he),Xt;return xt!==Ft&&(Xt=rl(xt,Ft),function(rr){this.style.setProperty(he,Xt(rr),He)})})}return $r(this,"style."+he,_e,ft)},sr.styleTween=function(he,_e,He){arguments.length<3&&(He="");function qe(at,ft){var Ft=_e.call(this,at,ft,r(this).getComputedStyle(this,null).getPropertyValue(he));return Ft&&function(xt){this.style.setProperty(he,Ft(xt),He)}}return this.tween("style."+he,qe)},sr.text=function(he){return $r(this,"text",he,gn)};function gn(he){return he==null&&(he=""),function(){this.textContent=he}}sr.remove=function(){var he=this.namespace;return this.each("end.transition",function(){var _e;this[he].count<2&&(_e=this.parentNode)&&_e.removeChild(this)})},sr.ease=function(he){var _e=this.id,He=this.namespace;return arguments.length<1?this.node()[He][_e].ease:(typeof he!="function"&&(he=a.ease.apply(a,arguments)),it(this,function(qe){qe[He][_e].ease=he}))},sr.delay=function(he){var _e=this.id,He=this.namespace;return arguments.length<1?this.node()[He][_e].delay:it(this,typeof he=="function"?function(qe,at,ft){qe[He][_e].delay=+he.call(qe,qe.__data__,at,ft)}:(he=+he,function(qe){qe[He][_e].delay=he}))},sr.duration=function(he){var _e=this.id,He=this.namespace;return arguments.length<1?this.node()[He][_e].duration:it(this,typeof he=="function"?function(qe,at,ft){qe[He][_e].duration=Math.max(1,he.call(qe,qe.__data__,at,ft))}:(he=Math.max(1,he),function(qe){qe[He][_e].duration=he}))},sr.each=function(he,_e){var He=this.id,qe=this.namespace;if(arguments.length<2){var at=Yr,ft=_r;try{_r=He,it(this,function(Ft,xt,Xt){Yr=Ft[qe][He],he.call(Ft,Ft.__data__,xt,Xt)})}finally{Yr=at,_r=ft}}else it(this,function(Ft){var xt=Ft[qe][He];(xt.event||(xt.event=a.dispatch("start","end","interrupt"))).on(he,_e)});return this},sr.transition=function(){for(var he=this.id,_e=++Er,He=this.namespace,qe=[],at,ft,Ft,xt,Xt=0,rr=this.length;Xt<rr;Xt++){qe.push(at=[]);for(var ft=this[Xt],ar=0,Pr=ft.length;ar<Pr;ar++)(Ft=ft[ar])&&(xt=Ft[He][he],Rn(Ft,ar,He,_e,{time:xt.time,ease:xt.ease,delay:xt.delay+xt.duration,duration:xt.duration})),at.push(Ft)}return xr(qe,He,_e)};function bn(he){return he==null?"__transition__":"__transition_"+he+"__"}function Rn(he,_e,He,qe,at){var ft=he[He]||(he[He]={active:0,count:0}),Ft=ft[qe],xt,Xt,rr,ar,Pr;function Cr(Ir){var Hr=Ft.delay;if(Xt.t=Hr+xt,Hr<=Ir)return jr(Ir-Hr);Xt.c=jr}function jr(Ir){var Hr=ft.active,Xr=ft[Hr];Xr&&(Xr.timer.c=null,Xr.timer.t=NaN,--ft.count,delete ft[Hr],Xr.event&&Xr.event.interrupt.call(he,he.__data__,Xr.index));for(var tn in ft)if(+tn<qe){var un=ft[tn];un.timer.c=null,un.timer.t=NaN,--ft.count,delete ft[tn]}Xt.c=en,An(function(){return Xt.c&&en(Ir||1)&&(Xt.c=null,Xt.t=NaN),1},0,xt),ft.active=qe,Ft.event&&Ft.event.start.call(he,he.__data__,_e),Pr=[],Ft.tween.forEach(function(Zr,Nn){(Nn=Nn.call(he,he.__data__,_e))&&Pr.push(Nn)}),ar=Ft.ease,rr=Ft.duration}function en(Ir){for(var Hr=Ir/rr,Xr=ar(Hr),tn=Pr.length;tn>0;)Pr[--tn].call(he,Xr);if(Hr>=1)return Ft.event&&Ft.event.end.call(he,he.__data__,_e),--ft.count?delete ft[qe]:delete he[He],1}Ft||(xt=at.time,Xt=An(Cr,0,xt),Ft=ft[qe]={tween:new D,time:xt,timer:Xt,delay:at.delay,duration:at.duration,ease:at.ease,index:_e},at=null,++ft.count)}a.svg.axis=function(){var he=a.scale.linear(),_e=da,He=6,qe=6,at=3,ft=[10],Ft=null,xt;function Xt(rr){rr.each(function(){var ar=a.select(this),Pr=this.__chart__||he,Cr=this.__chart__=he.copy(),jr=Ft??(Cr.ticks?Cr.ticks.apply(Cr,ft):Cr.domain()),en=xt??(Cr.tickFormat?Cr.tickFormat.apply(Cr,ft):V),Ir=ar.selectAll(".tick").data(jr,Cr),Hr=Ir.enter().insert("g",".domain").attr("class","tick").style("opacity",pe),Xr=a.transition(Ir.exit()).style("opacity",pe).remove(),tn=a.transition(Ir.order()).style("opacity",1),un=Math.max(He,0)+at,Zr,Nn=tf(Cr),Wn=ar.selectAll(".domain").data([0]),Kn=(Wn.enter().append("path").attr("class","domain"),a.transition(Wn));Hr.append("line"),Hr.append("text");var na=Hr.select("line"),wa=tn.select("line"),ba=Ir.select("text").text(en),Wa=Hr.select("text"),Pa=tn.select("text"),Ha=_e==="top"||_e==="left"?-1:1,ri,si,gi,Bn;if(_e==="bottom"||_e==="top"?(Zr=Ia,ri="x",gi="y",si="x2",Bn="y2",ba.attr("dy",Ha<0?"0em":".71em").style("text-anchor","middle"),Kn.attr("d","M"+Nn[0]+","+Ha*qe+"V0H"+Nn[1]+"V"+Ha*qe)):(Zr=Fa,ri="y",gi="x",si="y2",Bn="x2",ba.attr("dy",".32em").style("text-anchor",Ha<0?"end":"start"),Kn.attr("d","M"+Ha*qe+","+Nn[0]+"H0V"+Nn[1]+"H"+Ha*qe)),na.attr(Bn,Ha*He),Wa.attr(gi,Ha*un),wa.attr(si,0).attr(Bn,Ha*He),Pa.attr(ri,0).attr(gi,Ha*un),Cr.rangeBand){var Va=Cr,Ba=Va.rangeBand()/2;Pr=Cr=function(Ja){return Va(Ja)+Ba}}else Pr.rangeBand?Pr=Cr:Xr.call(Zr,Cr,Pr);Hr.call(Zr,Pr,Cr),tn.call(Zr,Cr,Cr)})}return Xt.scale=function(rr){return arguments.length?(he=rr,Xt):he},Xt.orient=function(rr){return arguments.length?(_e=rr in _a?rr+"":da,Xt):_e},Xt.ticks=function(){return arguments.length?(ft=x(arguments),Xt):ft},Xt.tickValues=function(rr){return arguments.length?(Ft=rr,Xt):Ft},Xt.tickFormat=function(rr){return arguments.length?(xt=rr,Xt):xt},Xt.tickSize=function(rr){var ar=arguments.length;return ar?(He=+rr,qe=+arguments[ar-1],Xt):He},Xt.innerTickSize=function(rr){return arguments.length?(He=+rr,Xt):He},Xt.outerTickSize=function(rr){return arguments.length?(qe=+rr,Xt):qe},Xt.tickPadding=function(rr){return arguments.length?(at=+rr,Xt):at},Xt.tickSubdivide=function(){return arguments.length&&Xt},Xt};var da="bottom",_a={top:1,right:1,bottom:1,left:1};function Ia(he,_e,He){he.attr("transform",function(qe){var at=_e(qe);return"translate("+(isFinite(at)?at:He(qe))+",0)"})}function Fa(he,_e,He){he.attr("transform",function(qe){var at=_e(qe);return"translate(0,"+(isFinite(at)?at:He(qe))+")"})}a.svg.brush=function(){var he=q(ar,"brushstart","brush","brushend"),_e=null,He=null,qe=[0,0],at=[0,0],ft,Ft,xt=!0,Xt=!0,rr=ci[0];function ar(Ir){Ir.each(function(){var Hr=a.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",en).on("touchstart.brush",en),Xr=Hr.selectAll(".background").data([0]);Xr.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Hr.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var tn=Hr.selectAll(".resize").data(rr,V);tn.exit().remove(),tn.enter().append("g").attr("class",function(Wn){return"resize "+Wn}).style("cursor",function(Wn){return za[Wn]}).append("rect").attr("x",function(Wn){return/[ew]$/.test(Wn)?-3:null}).attr("y",function(Wn){return/^[ns]/.test(Wn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),tn.style("display",ar.empty()?"none":null);var un=a.transition(Hr),Zr=a.transition(Xr),Nn;_e&&(Nn=tf(_e),Zr.attr("x",Nn[0]).attr("width",Nn[1]-Nn[0]),Cr(un)),He&&(Nn=tf(He),Zr.attr("y",Nn[0]).attr("height",Nn[1]-Nn[0]),jr(un)),Pr(un)})}ar.event=function(Ir){Ir.each(function(){var Hr=he.of(this,arguments),Xr={x:qe,y:at,i:ft,j:Ft},tn=this.__chart__||Xr;this.__chart__=Xr,_r?a.select(this).transition().each("start.brush",function(){ft=tn.i,Ft=tn.j,qe=tn.x,at=tn.y,Hr({type:"brushstart"})}).tween("brush:brush",function(){var un=po(qe,Xr.x),Zr=po(at,Xr.y);return ft=Ft=null,function(Nn){qe=Xr.x=un(Nn),at=Xr.y=Zr(Nn),Hr({type:"brush",mode:"resize"})}}).each("end.brush",function(){ft=Xr.i,Ft=Xr.j,Hr({type:"brush",mode:"resize"}),Hr({type:"brushend"})}):(Hr({type:"brushstart"}),Hr({type:"brush",mode:"resize"}),Hr({type:"brushend"}))})};function Pr(Ir){Ir.selectAll(".resize").attr("transform",function(Hr){return"translate("+qe[+/e$/.test(Hr)]+","+at[+/^s/.test(Hr)]+")"})}function Cr(Ir){Ir.select(".extent").attr("x",qe[0]),Ir.selectAll(".extent,.n>rect,.s>rect").attr("width",qe[1]-qe[0])}function jr(Ir){Ir.select(".extent").attr("y",at[0]),Ir.selectAll(".extent,.e>rect,.w>rect").attr("height",at[1]-at[0])}function en(){var Ir=this,Hr=a.select(a.event.target),Xr=he.of(Ir,arguments),tn=a.select(Ir),un=Hr.datum(),Zr=!/^(n|s)$/.test(un)&&_e,Nn=!/^(e|w)$/.test(un)&&He,Wn=Hr.classed("extent"),Kn=lt(Ir),na,wa=a.mouse(Ir),ba,Wa=a.select(r(Ir)).on("keydown.brush",ri).on("keyup.brush",si);if(a.event.changedTouches?Wa.on("touchmove.brush",gi).on("touchend.brush",Va):Wa.on("mousemove.brush",gi).on("mouseup.brush",Va),tn.interrupt().selectAll("*").interrupt(),Wn)wa[0]=qe[0]-wa[0],wa[1]=at[0]-wa[1];else if(un){var Pa=+/w$/.test(un),Ha=+/^n/.test(un);ba=[qe[1-Pa]-wa[0],at[1-Ha]-wa[1]],wa[0]=qe[Pa],wa[1]=at[Ha]}else a.event.altKey&&(na=wa.slice());tn.style("pointer-events","none").selectAll(".resize").style("display",null),a.select("body").style("cursor",Hr.style("cursor")),Xr({type:"brushstart"}),gi();function ri(){a.event.keyCode==32&&(Wn||(na=null,wa[0]-=qe[1],wa[1]-=at[1],Wn=2),se())}function si(){a.event.keyCode==32&&Wn==2&&(wa[0]+=qe[1],wa[1]+=at[1],Wn=0,se())}function gi(){var Ba=a.mouse(Ir),Ja=!1;ba&&(Ba[0]+=ba[0],Ba[1]+=ba[1]),Wn||(a.event.altKey?(na||(na=[(qe[0]+qe[1])/2,(at[0]+at[1])/2]),wa[0]=qe[+(Ba[0]<na[0])],wa[1]=at[+(Ba[1]<na[1])]):na=null),Zr&&Bn(Ba,_e,0)&&(Cr(tn),Ja=!0),Nn&&Bn(Ba,He,1)&&(jr(tn),Ja=!0),Ja&&(Pr(tn),Xr({type:"brush",mode:Wn?"move":"resize"}))}function Bn(Ba,Ja,Ri){var ji=tf(Ja),qi=ji[0],Mi=ji[1],mi=wa[Ri],ma=Ri?at:qe,Ca=ma[1]-ma[0],Ci,Qi;if(Wn&&(qi-=mi,Mi-=Ca+mi),Ci=(Ri?Xt:xt)?Math.max(qi,Math.min(Mi,Ba[Ri])):Ba[Ri],Wn?Qi=(Ci+=mi)+Ca:(na&&(mi=Math.max(qi,Math.min(Mi,2*na[Ri]-Ci))),mi<Ci?(Qi=Ci,Ci=mi):Qi=mi),ma[0]!=Ci||ma[1]!=Qi)return Ri?Ft=null:ft=null,ma[0]=Ci,ma[1]=Qi,!0}function Va(){gi(),tn.style("pointer-events","all").selectAll(".resize").style("display",ar.empty()?"none":null),a.select("body").style("cursor",null),Wa.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),Kn(),Xr({type:"brushend"})}}return ar.x=function(Ir){return arguments.length?(_e=Ir,rr=ci[!_e<<1|!He],ar):_e},ar.y=function(Ir){return arguments.length?(He=Ir,rr=ci[!_e<<1|!He],ar):He},ar.clamp=function(Ir){return arguments.length?(_e&&He?(xt=!!Ir[0],Xt=!!Ir[1]):_e?xt=!!Ir:He&&(Xt=!!Ir),ar):_e&&He?[xt,Xt]:_e?xt:He?Xt:null},ar.extent=function(Ir){var Hr,Xr,tn,un,Zr;return arguments.length?(_e&&(Hr=Ir[0],Xr=Ir[1],He&&(Hr=Hr[0],Xr=Xr[0]),ft=[Hr,Xr],_e.invert&&(Hr=_e(Hr),Xr=_e(Xr)),Xr<Hr&&(Zr=Hr,Hr=Xr,Xr=Zr),(Hr!=qe[0]||Xr!=qe[1])&&(qe=[Hr,Xr])),He&&(tn=Ir[0],un=Ir[1],_e&&(tn=tn[1],un=un[1]),Ft=[tn,un],He.invert&&(tn=He(tn),un=He(un)),un<tn&&(Zr=tn,tn=un,un=Zr),(tn!=at[0]||un!=at[1])&&(at=[tn,un])),ar):(_e&&(ft?(Hr=ft[0],Xr=ft[1]):(Hr=qe[0],Xr=qe[1],_e.invert&&(Hr=_e.invert(Hr),Xr=_e.invert(Xr)),Xr<Hr&&(Zr=Hr,Hr=Xr,Xr=Zr))),He&&(Ft?(tn=Ft[0],un=Ft[1]):(tn=at[0],un=at[1],He.invert&&(tn=He.invert(tn),un=He.invert(un)),un<tn&&(Zr=tn,tn=un,un=Zr))),_e&&He?[[Hr,tn],[Xr,un]]:_e?[Hr,Xr]:He&&[tn,un])},ar.clear=function(){return ar.empty()||(qe=[0,0],at=[0,0],ft=Ft=null),ar},ar.empty=function(){return!!_e&&qe[0]==qe[1]||!!He&&at[0]==at[1]},a.rebind(ar,he,"on")};var za={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},ci=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];a.text=xn(function(he){return he.responseText}),a.json=function(he,_e){return Dn(he,"application/json",Bi,_e)};function Bi(he){return JSON.parse(he.responseText)}a.html=function(he,_e){return Dn(he,"text/html",Ti,_e)};function Ti(he){var _e=v.createRange();return _e.selectNode(v.body),_e.createContextualFragment(he.responseText)}a.xml=xn(function(he){return he.responseXML}),d=a,P=typeof d=="function"?d.call(B,e,B,z):d,P!==void 0&&(z.exports=P)}).apply(self)},88294:function(z,B,e){z.exports=e(62849)},62849:function(z,B,e){var d=e(91358),P=e(53435),a=e(18863),_=e(21527),x=e(71299),v=e(46775),y=e(30120),r=e(64941),n=e(90660),u=e(27084),i=1073741824;z.exports=function(h,b){b||(b={}),h=y(h,"float64"),b=x(b,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});var p=v(b.maxDepth,255),E=v(b.bounds,_(h,2));E[0]===E[2]&&E[2]++,E[1]===E[3]&&E[3]++;var c=f(h,E),l=h.length>>>1,m;b.dtype||(b.dtype="array"),typeof b.dtype=="string"?m=new(n(b.dtype))(l):b.dtype&&(m=b.dtype,Array.isArray(m)&&(m.length=l));for(var M=0;M<l;++M)m[M]=M;var L=[],D=[],A=[],C=[];H(0,0,1,m,0,1);for(var S=0,o=0;o<L.length;o++){var R=L[o];if(m.set)m.set(R,S);else for(var T=0,O=R.length;T<O;T++)m[T+S]=R[T];var N=S+L[o].length;C[o]=[S,N],S=N}return m.range=k,m;function H(U,Y,ee,re,ie,se){if(!re.length)return null;var ce=L[ie]||(L[ie]=[]),q=A[ie]||(A[ie]=[]),j=D[ie]||(D[ie]=[]),Z=ce.length;if(ie++,ie>p||se>i){for(var Q=0;Q<re.length;Q++)ce.push(re[Q]),q.push(se),j.push(null,null,null,null);return Z}if(ce.push(re[0]),q.push(se),re.length<=1)return j.push(null,null,null,null),Z;for(var ue=ee*.5,fe=U+ue,te=Y+ue,ne=[],ve=[],le=[],xe=[],Se=1,Re=re.length;Se<Re;Se++){var Ee=re[Se],Oe=c[Ee*2],Be=c[Ee*2+1];Oe<fe?Be<te?ne.push(Ee):ve.push(Ee):Be<te?le.push(Ee):xe.push(Ee)}return se<<=2,j.push(H(U,Y,ue,ne,ie,se),H(U,te,ue,ve,ie,se+1),H(fe,Y,ue,le,ie,se+2),H(fe,te,ue,xe,ie,se+3)),Z}function k(){for(var U=[],Y=arguments.length;Y--;)U[Y]=arguments[Y];var ee;if(r(U[U.length-1])){var re=U.pop();!U.length&&(re.x!=null||re.l!=null||re.left!=null)&&(U=[re],ee={}),ee=x(re,{level:"level maxLevel",d:"d diam diameter r radius px pxSize pixel pixelSize maxD size minSize",lod:"lod details ranges offsets"})}else ee={};U.length||(U=E);var ie=a.apply(void 0,U),se=[Math.min(ie.x,ie.x+ie.width),Math.min(ie.y,ie.y+ie.height),Math.max(ie.x,ie.x+ie.width),Math.max(ie.y,ie.y+ie.height)],ce=se[0],q=se[1],j=se[2],Z=se[3],Q=f([ce,q,j,Z],E),ue=Q[0],fe=Q[1],te=Q[2],ne=Q[3],ve=v(ee.level,L.length);if(ee.d!=null){var le;typeof ee.d=="number"?le=[ee.d,ee.d]:ee.d.length&&(le=ee.d),ve=Math.min(Math.max(Math.ceil(-u(Math.abs(le[0])/(E[2]-E[0]))),Math.ceil(-u(Math.abs(le[1])/(E[3]-E[1])))),ve)}if(ve=Math.min(ve,L.length),ee.lod)return V(ue,fe,te,ne,ve);var xe=[];Se(0,0,1,0,0,1);function Se(Ee,Oe,Be,Le,Te,De){if(!(Te===null||De===null)){var Ve=Ee+Be,Ye=Oe+Be;if(!(ue>Ve||fe>Ye||te<Ee||ne<Oe)&&!(Le>=ve)&&Te!==De){var Ne=L[Le];De===void 0&&(De=Ne.length);for(var Xe=Te;Xe<De;Xe++){var ht=Ne[Xe],st=h[ht*2],it=h[ht*2+1];st>=ce&&st<=j&&it>=q&&it<=Z&&xe.push(ht)}var nt=D[Le],pt=nt[Te*4+0],Tt=nt[Te*4+1],Et=nt[Te*4+2],Dt=nt[Te*4+3],et=Re(nt,Te+1),Ue=Be*.5,ze=Le+1;Se(Ee,Oe,Ue,ze,pt,Tt||Et||Dt||et),Se(Ee,Oe+Ue,Ue,ze,Tt,Et||Dt||et),Se(Ee+Ue,Oe,Ue,ze,Et,Dt||et),Se(Ee+Ue,Oe+Ue,Ue,ze,Dt,et)}}}function Re(Ee,Oe){for(var Be=null,Le=0;Be===null;)if(Be=Ee[Oe*4+Le],Le++,Le>Ee.length)return null;return Be}return xe}function V(U,Y,ee,re,ie){for(var se=[],ce=0;ce<ie;ce++){var q=A[ce],j=C[ce][0],Z=G(U,Y,ce),Q=G(ee,re,ce),ue=d.ge(q,Z),fe=d.gt(q,Q,ue,q.length-1);se[ce]=[ue+j,fe+j]}return se}function G(U,Y,ee){for(var re=1,ie=.5,se=.5,ce=.5,q=0;q<ee;q++)re<<=2,re+=U<ie?Y<se?0:1:Y<se?2:3,ce*=.5,ie+=U<ie?-ce:ce,se+=Y<se?-ce:ce;return re}};function f(g,h){for(var b=h[0],p=h[1],E=h[2],c=h[3],l=1/(E-b),m=1/(c-p),M=new Array(g.length),L=0,D=g.length/2;L<D;L++)M[2*L]=P((g[2*L]-b)*l,0,1),M[2*L+1]=P((g[2*L+1]-p)*m,0,1);return M}},30774:function(z,B,e){Object.defineProperty(B,"__esModule",{value:!0});var d=e(60302),P=6378137;function a(r){return d.geomReduce(r,function(n,u){return n+_(u)},0)}B.default=a;function _(r){var n=0,u;switch(r.type){case"Polygon":return x(r.coordinates);case"MultiPolygon":for(u=0;u<r.coordinates.length;u++)n+=x(r.coordinates[u]);return n;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function x(r){var n=0;if(r&&r.length>0){n+=Math.abs(v(r[0]));for(var u=1;u<r.length;u++)n-=Math.abs(v(r[u]))}return n}function v(r){var n,u,i,f,g,h,b,p=0,E=r.length;if(E>2){for(b=0;b<E;b++)b===E-2?(f=E-2,g=E-1,h=0):b===E-1?(f=E-1,g=0,h=1):(f=b,g=b+1,h=b+2),n=r[f],u=r[g],i=r[h],p+=(y(i[0])-y(n[0]))*Math.sin(y(u[1]));p=p*P*P/2}return p}function y(r){return r*Math.PI/180}},23132:function(z,B){Object.defineProperty(B,"__esModule",{value:!0}),B.earthRadius=63710088e-1,B.factors={centimeters:B.earthRadius*100,centimetres:B.earthRadius*100,degrees:B.earthRadius/111325,feet:B.earthRadius*3.28084,inches:B.earthRadius*39.37,kilometers:B.earthRadius/1e3,kilometres:B.earthRadius/1e3,meters:B.earthRadius,metres:B.earthRadius,miles:B.earthRadius/1609.344,millimeters:B.earthRadius*1e3,millimetres:B.earthRadius*1e3,nauticalmiles:B.earthRadius/1852,radians:1,yards:B.earthRadius*1.0936},B.unitsFactors={centimeters:100,centimetres:100,degrees:8982708286548395e-21,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:.0006213711922373339,millimeters:1e3,millimetres:1e3,nauticalmiles:.0005399568034557236,radians:1/B.earthRadius,yards:1.0936133},B.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function e(S,o,R){R===void 0&&(R={});var T={type:"Feature"};return(R.id===0||R.id)&&(T.id=R.id),R.bbox&&(T.bbox=R.bbox),T.properties=o||{},T.geometry=S,T}B.feature=e;function d(S,o,R){switch(S){case"Point":return P(o).geometry;case"LineString":return v(o).geometry;case"Polygon":return _(o).geometry;case"MultiPoint":return u(o).geometry;case"MultiLineString":return n(o).geometry;case"MultiPolygon":return i(o).geometry;default:throw new Error(S+" is invalid")}}B.geometry=d;function P(S,o,R){if(R===void 0&&(R={}),!S)throw new Error("coordinates is required");if(!Array.isArray(S))throw new Error("coordinates must be an Array");if(S.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!L(S[0])||!L(S[1]))throw new Error("coordinates must contain numbers");var T={type:"Point",coordinates:S};return e(T,o,R)}B.point=P;function a(S,o,R){return R===void 0&&(R={}),r(S.map(function(T){return P(T,o)}),R)}B.points=a;function _(S,o,R){R===void 0&&(R={});for(var T=0,O=S;T<O.length;T++){var N=O[T];if(N.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var H=0;H<N[N.length-1].length;H++)if(N[N.length-1][H]!==N[0][H])throw new Error("First and last Position are not equivalent.")}var k={type:"Polygon",coordinates:S};return e(k,o,R)}B.polygon=_;function x(S,o,R){return R===void 0&&(R={}),r(S.map(function(T){return _(T,o)}),R)}B.polygons=x;function v(S,o,R){if(R===void 0&&(R={}),S.length<2)throw new Error("coordinates must be an array of two or more positions");var T={type:"LineString",coordinates:S};return e(T,o,R)}B.lineString=v;function y(S,o,R){return R===void 0&&(R={}),r(S.map(function(T){return v(T,o)}),R)}B.lineStrings=y;function r(S,o){o===void 0&&(o={});var R={type:"FeatureCollection"};return o.id&&(R.id=o.id),o.bbox&&(R.bbox=o.bbox),R.features=S,R}B.featureCollection=r;function n(S,o,R){R===void 0&&(R={});var T={type:"MultiLineString",coordinates:S};return e(T,o,R)}B.multiLineString=n;function u(S,o,R){R===void 0&&(R={});var T={type:"MultiPoint",coordinates:S};return e(T,o,R)}B.multiPoint=u;function i(S,o,R){R===void 0&&(R={});var T={type:"MultiPolygon",coordinates:S};return e(T,o,R)}B.multiPolygon=i;function f(S,o,R){R===void 0&&(R={});var T={type:"GeometryCollection",geometries:S};return e(T,o,R)}B.geometryCollection=f;function g(S,o){if(o===void 0&&(o=0),o&&!(o>=0))throw new Error("precision must be a positive number");var R=Math.pow(10,o||0);return Math.round(S*R)/R}B.round=g;function h(S,o){o===void 0&&(o="kilometers");var R=B.factors[o];if(!R)throw new Error(o+" units is invalid");return S*R}B.radiansToLength=h;function b(S,o){o===void 0&&(o="kilometers");var R=B.factors[o];if(!R)throw new Error(o+" units is invalid");return S/R}B.lengthToRadians=b;function p(S,o){return c(b(S,o))}B.lengthToDegrees=p;function E(S){var o=S%360;return o<0&&(o+=360),o}B.bearingToAzimuth=E;function c(S){var o=S%(2*Math.PI);return o*180/Math.PI}B.radiansToDegrees=c;function l(S){var o=S%360;return o*Math.PI/180}B.degreesToRadians=l;function m(S,o,R){if(o===void 0&&(o="kilometers"),R===void 0&&(R="kilometers"),!(S>=0))throw new Error("length must be a positive number");return h(b(S,o),R)}B.convertLength=m;function M(S,o,R){if(o===void 0&&(o="meters"),R===void 0&&(R="kilometers"),!(S>=0))throw new Error("area must be a positive number");var T=B.areaFactors[o];if(!T)throw new Error("invalid original units");var O=B.areaFactors[R];if(!O)throw new Error("invalid final units");return S/T*O}B.convertArea=M;function L(S){return!isNaN(S)&&S!==null&&!Array.isArray(S)}B.isNumber=L;function D(S){return!!S&&S.constructor===Object}B.isObject=D;function A(S){if(!S)throw new Error("bbox is required");if(!Array.isArray(S))throw new Error("bbox must be an Array");if(S.length!==4&&S.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");S.forEach(function(o){if(!L(o))throw new Error("bbox must only contain numbers")})}B.validateBBox=A;function C(S){if(!S)throw new Error("id is required");if(["string","number"].indexOf(typeof S)===-1)throw new Error("id must be a number or a string")}B.validateId=C},60302:function(z,B,e){Object.defineProperty(B,"__esModule",{value:!0});var d=e(23132);function P(l,m,M){if(l!==null)for(var L,D,A,C,S,o,R,T=0,O=0,N,H=l.type,k=H==="FeatureCollection",V=H==="Feature",G=k?l.features.length:1,U=0;U<G;U++){R=k?l.features[U].geometry:V?l.geometry:l,N=R?R.type==="GeometryCollection":!1,S=N?R.geometries.length:1;for(var Y=0;Y<S;Y++){var ee=0,re=0;if(C=N?R.geometries[Y]:R,C!==null){o=C.coordinates;var ie=C.type;switch(T=M&&(ie==="Polygon"||ie==="MultiPolygon")?1:0,ie){case null:break;case"Point":if(m(o,O,U,ee,re)===!1)return!1;O++,ee++;break;case"LineString":case"MultiPoint":for(L=0;L<o.length;L++){if(m(o[L],O,U,ee,re)===!1)return!1;O++,ie==="MultiPoint"&&ee++}ie==="LineString"&&ee++;break;case"Polygon":case"MultiLineString":for(L=0;L<o.length;L++){for(D=0;D<o[L].length-T;D++){if(m(o[L][D],O,U,ee,re)===!1)return!1;O++}ie==="MultiLineString"&&ee++,ie==="Polygon"&&re++}ie==="Polygon"&&ee++;break;case"MultiPolygon":for(L=0;L<o.length;L++){for(re=0,D=0;D<o[L].length;D++){for(A=0;A<o[L][D].length-T;A++){if(m(o[L][D][A],O,U,ee,re)===!1)return!1;O++}re++}ee++}break;case"GeometryCollection":for(L=0;L<C.geometries.length;L++)if(P(C.geometries[L],m,M)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function a(l,m,M,L){var D=M;return P(l,function(A,C,S,o,R){C===0&&M===void 0?D=A:D=m(D,A,C,S,o,R)},L),D}function _(l,m){var M;switch(l.type){case"FeatureCollection":for(M=0;M<l.features.length&&m(l.features[M].properties,M)!==!1;M++);break;case"Feature":m(l.properties,0);break}}function x(l,m,M){var L=M;return _(l,function(D,A){A===0&&M===void 0?L=D:L=m(L,D,A)}),L}function v(l,m){if(l.type==="Feature")m(l,0);else if(l.type==="FeatureCollection")for(var M=0;M<l.features.length&&m(l.features[M],M)!==!1;M++);}function y(l,m,M){var L=M;return v(l,function(D,A){A===0&&M===void 0?L=D:L=m(L,D,A)}),L}function r(l){var m=[];return P(l,function(M){m.push(M)}),m}function n(l,m){var M,L,D,A,C,S,o,R,T,O,N=0,H=l.type==="FeatureCollection",k=l.type==="Feature",V=H?l.features.length:1;for(M=0;M<V;M++){for(S=H?l.features[M].geometry:k?l.geometry:l,R=H?l.features[M].properties:k?l.properties:{},T=H?l.features[M].bbox:k?l.bbox:void 0,O=H?l.features[M].id:k?l.id:void 0,o=S?S.type==="GeometryCollection":!1,C=o?S.geometries.length:1,D=0;D<C;D++){if(A=o?S.geometries[D]:S,A===null){if(m(null,N,R,T,O)===!1)return!1;continue}switch(A.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(m(A,N,R,T,O)===!1)return!1;break}case"GeometryCollection":{for(L=0;L<A.geometries.length;L++)if(m(A.geometries[L],N,R,T,O)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}N++}}function u(l,m,M){var L=M;return n(l,function(D,A,C,S,o){A===0&&M===void 0?L=D:L=m(L,D,A,C,S,o)}),L}function i(l,m){n(l,function(M,L,D,A,C){var S=M===null?null:M.type;switch(S){case null:case"Point":case"LineString":case"Polygon":return m(d.feature(M,D,{bbox:A,id:C}),L,0)===!1?!1:void 0}var o;switch(S){case"MultiPoint":o="Point";break;case"MultiLineString":o="LineString";break;case"MultiPolygon":o="Polygon";break}for(var R=0;R<M.coordinates.length;R++){var T=M.coordinates[R],O={type:o,coordinates:T};if(m(d.feature(O,D),L,R)===!1)return!1}})}function f(l,m,M){var L=M;return i(l,function(D,A,C){A===0&&C===0&&M===void 0?L=D:L=m(L,D,A,C)}),L}function g(l,m){i(l,function(M,L,D){var A=0;if(M.geometry){var C=M.geometry.type;if(!(C==="Point"||C==="MultiPoint")){var S,o=0,R=0,T=0;if(P(M,function(O,N,H,k,V){if(S===void 0||L>o||k>R||V>T){S=O,o=L,R=k,T=V,A=0;return}var G=d.lineString([S,O],M.properties);if(m(G,L,D,V,A)===!1)return!1;A++,S=O})===!1)return!1}}})}function h(l,m,M){var L=M,D=!1;return g(l,function(A,C,S,o,R){D===!1&&M===void 0?L=A:L=m(L,A,C,S,o,R),D=!0}),L}function b(l,m){if(!l)throw new Error("geojson is required");i(l,function(M,L,D){if(M.geometry!==null){var A=M.geometry.type,C=M.geometry.coordinates;switch(A){case"LineString":if(m(M,L,D,0,0)===!1)return!1;break;case"Polygon":for(var S=0;S<C.length;S++)if(m(d.lineString(C[S],M.properties),L,D,S)===!1)return!1;break}}})}function p(l,m,M){var L=M;return b(l,function(D,A,C,S){A===0&&M===void 0?L=D:L=m(L,D,A,C,S)}),L}function E(l,m){if(m=m||{},!d.isObject(m))throw new Error("options is invalid");var M=m.featureIndex||0,L=m.multiFeatureIndex||0,D=m.geometryIndex||0,A=m.segmentIndex||0,C=m.properties,S;switch(l.type){case"FeatureCollection":M<0&&(M=l.features.length+M),C=C||l.features[M].properties,S=l.features[M].geometry;break;case"Feature":C=C||l.properties,S=l.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":S=l;break;default:throw new Error("geojson is invalid")}if(S===null)return null;var o=S.coordinates;switch(S.type){case"Point":case"MultiPoint":return null;case"LineString":return A<0&&(A=o.length+A-1),d.lineString([o[A],o[A+1]],C,m);case"Polygon":return D<0&&(D=o.length+D),A<0&&(A=o[D].length+A-1),d.lineString([o[D][A],o[D][A+1]],C,m);case"MultiLineString":return L<0&&(L=o.length+L),A<0&&(A=o[L].length+A-1),d.lineString([o[L][A],o[L][A+1]],C,m);case"MultiPolygon":return L<0&&(L=o.length+L),D<0&&(D=o[L].length+D),A<0&&(A=o[L][D].length-A-1),d.lineString([o[L][D][A],o[L][D][A+1]],C,m)}throw new Error("geojson is invalid")}function c(l,m){if(m=m||{},!d.isObject(m))throw new Error("options is invalid");var M=m.featureIndex||0,L=m.multiFeatureIndex||0,D=m.geometryIndex||0,A=m.coordIndex||0,C=m.properties,S;switch(l.type){case"FeatureCollection":M<0&&(M=l.features.length+M),C=C||l.features[M].properties,S=l.features[M].geometry;break;case"Feature":C=C||l.properties,S=l.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":S=l;break;default:throw new Error("geojson is invalid")}if(S===null)return null;var o=S.coordinates;switch(S.type){case"Point":return d.point(o,C,m);case"MultiPoint":return L<0&&(L=o.length+L),d.point(o[L],C,m);case"LineString":return A<0&&(A=o.length+A),d.point(o[A],C,m);case"Polygon":return D<0&&(D=o.length+D),A<0&&(A=o[D].length+A),d.point(o[D][A],C,m);case"MultiLineString":return L<0&&(L=o.length+L),A<0&&(A=o[L].length+A),d.point(o[L][A],C,m);case"MultiPolygon":return L<0&&(L=o.length+L),D<0&&(D=o[L].length+D),A<0&&(A=o[L][D].length-A),d.point(o[L][D][A],C,m)}throw new Error("geojson is invalid")}B.coordEach=P,B.coordReduce=a,B.propEach=_,B.propReduce=x,B.featureEach=v,B.featureReduce=y,B.coordAll=r,B.geomEach=n,B.geomReduce=u,B.flattenEach=i,B.flattenReduce=f,B.segmentEach=g,B.segmentReduce=h,B.lineEach=b,B.lineReduce=p,B.findSegment=E,B.findPoint=c},85268:function(z,B,e){Object.defineProperty(B,"__esModule",{value:!0});var d=e(27138);function P(a){var _=[1/0,1/0,-1/0,-1/0];return d.coordEach(a,function(x){_[0]>x[0]&&(_[0]=x[0]),_[1]>x[1]&&(_[1]=x[1]),_[2]<x[0]&&(_[2]=x[0]),_[3]<x[1]&&(_[3]=x[1])}),_}P.default=P,B.default=P},94228:function(z,B){Object.defineProperty(B,"__esModule",{value:!0}),B.earthRadius=63710088e-1,B.factors={centimeters:B.earthRadius*100,centimetres:B.earthRadius*100,degrees:B.earthRadius/111325,feet:B.earthRadius*3.28084,inches:B.earthRadius*39.37,kilometers:B.earthRadius/1e3,kilometres:B.earthRadius/1e3,meters:B.earthRadius,metres:B.earthRadius,miles:B.earthRadius/1609.344,millimeters:B.earthRadius*1e3,millimetres:B.earthRadius*1e3,nauticalmiles:B.earthRadius/1852,radians:1,yards:B.earthRadius*1.0936},B.unitsFactors={centimeters:100,centimetres:100,degrees:8982708286548395e-21,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:.0006213711922373339,millimeters:1e3,millimetres:1e3,nauticalmiles:.0005399568034557236,radians:1/B.earthRadius,yards:1.0936133},B.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function e(S,o,R){R===void 0&&(R={});var T={type:"Feature"};return(R.id===0||R.id)&&(T.id=R.id),R.bbox&&(T.bbox=R.bbox),T.properties=o||{},T.geometry=S,T}B.feature=e;function d(S,o,R){switch(S){case"Point":return P(o).geometry;case"LineString":return v(o).geometry;case"Polygon":return _(o).geometry;case"MultiPoint":return u(o).geometry;case"MultiLineString":return n(o).geometry;case"MultiPolygon":return i(o).geometry;default:throw new Error(S+" is invalid")}}B.geometry=d;function P(S,o,R){if(R===void 0&&(R={}),!S)throw new Error("coordinates is required");if(!Array.isArray(S))throw new Error("coordinates must be an Array");if(S.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!L(S[0])||!L(S[1]))throw new Error("coordinates must contain numbers");var T={type:"Point",coordinates:S};return e(T,o,R)}B.point=P;function a(S,o,R){return R===void 0&&(R={}),r(S.map(function(T){return P(T,o)}),R)}B.points=a;function _(S,o,R){R===void 0&&(R={});for(var T=0,O=S;T<O.length;T++){var N=O[T];if(N.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var H=0;H<N[N.length-1].length;H++)if(N[N.length-1][H]!==N[0][H])throw new Error("First and last Position are not equivalent.")}var k={type:"Polygon",coordinates:S};return e(k,o,R)}B.polygon=_;function x(S,o,R){return R===void 0&&(R={}),r(S.map(function(T){return _(T,o)}),R)}B.polygons=x;function v(S,o,R){if(R===void 0&&(R={}),S.length<2)throw new Error("coordinates must be an array of two or more positions");var T={type:"LineString",coordinates:S};return e(T,o,R)}B.lineString=v;function y(S,o,R){return R===void 0&&(R={}),r(S.map(function(T){return v(T,o)}),R)}B.lineStrings=y;function r(S,o){o===void 0&&(o={});var R={type:"FeatureCollection"};return o.id&&(R.id=o.id),o.bbox&&(R.bbox=o.bbox),R.features=S,R}B.featureCollection=r;function n(S,o,R){R===void 0&&(R={});var T={type:"MultiLineString",coordinates:S};return e(T,o,R)}B.multiLineString=n;function u(S,o,R){R===void 0&&(R={});var T={type:"MultiPoint",coordinates:S};return e(T,o,R)}B.multiPoint=u;function i(S,o,R){R===void 0&&(R={});var T={type:"MultiPolygon",coordinates:S};return e(T,o,R)}B.multiPolygon=i;function f(S,o,R){R===void 0&&(R={});var T={type:"GeometryCollection",geometries:S};return e(T,o,R)}B.geometryCollection=f;function g(S,o){if(o===void 0&&(o=0),o&&!(o>=0))throw new Error("precision must be a positive number");var R=Math.pow(10,o||0);return Math.round(S*R)/R}B.round=g;function h(S,o){o===void 0&&(o="kilometers");var R=B.factors[o];if(!R)throw new Error(o+" units is invalid");return S*R}B.radiansToLength=h;function b(S,o){o===void 0&&(o="kilometers");var R=B.factors[o];if(!R)throw new Error(o+" units is invalid");return S/R}B.lengthToRadians=b;function p(S,o){return c(b(S,o))}B.lengthToDegrees=p;function E(S){var o=S%360;return o<0&&(o+=360),o}B.bearingToAzimuth=E;function c(S){var o=S%(2*Math.PI);return o*180/Math.PI}B.radiansToDegrees=c;function l(S){var o=S%360;return o*Math.PI/180}B.degreesToRadians=l;function m(S,o,R){if(o===void 0&&(o="kilometers"),R===void 0&&(R="kilometers"),!(S>=0))throw new Error("length must be a positive number");return h(b(S,o),R)}B.convertLength=m;function M(S,o,R){if(o===void 0&&(o="meters"),R===void 0&&(R="kilometers"),!(S>=0))throw new Error("area must be a positive number");var T=B.areaFactors[o];if(!T)throw new Error("invalid original units");var O=B.areaFactors[R];if(!O)throw new Error("invalid final units");return S/T*O}B.convertArea=M;function L(S){return!isNaN(S)&&S!==null&&!Array.isArray(S)}B.isNumber=L;function D(S){return!!S&&S.constructor===Object}B.isObject=D;function A(S){if(!S)throw new Error("bbox is required");if(!Array.isArray(S))throw new Error("bbox must be an Array");if(S.length!==4&&S.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");S.forEach(function(o){if(!L(o))throw new Error("bbox must only contain numbers")})}B.validateBBox=A;function C(S){if(!S)throw new Error("id is required");if(["string","number"].indexOf(typeof S)===-1)throw new Error("id must be a number or a string")}B.validateId=C},27138:function(z,B,e){Object.defineProperty(B,"__esModule",{value:!0});var d=e(94228);function P(l,m,M){if(l!==null)for(var L,D,A,C,S,o,R,T=0,O=0,N,H=l.type,k=H==="FeatureCollection",V=H==="Feature",G=k?l.features.length:1,U=0;U<G;U++){R=k?l.features[U].geometry:V?l.geometry:l,N=R?R.type==="GeometryCollection":!1,S=N?R.geometries.length:1;for(var Y=0;Y<S;Y++){var ee=0,re=0;if(C=N?R.geometries[Y]:R,C!==null){o=C.coordinates;var ie=C.type;switch(T=M&&(ie==="Polygon"||ie==="MultiPolygon")?1:0,ie){case null:break;case"Point":if(m(o,O,U,ee,re)===!1)return!1;O++,ee++;break;case"LineString":case"MultiPoint":for(L=0;L<o.length;L++){if(m(o[L],O,U,ee,re)===!1)return!1;O++,ie==="MultiPoint"&&ee++}ie==="LineString"&&ee++;break;case"Polygon":case"MultiLineString":for(L=0;L<o.length;L++){for(D=0;D<o[L].length-T;D++){if(m(o[L][D],O,U,ee,re)===!1)return!1;O++}ie==="MultiLineString"&&ee++,ie==="Polygon"&&re++}ie==="Polygon"&&ee++;break;case"MultiPolygon":for(L=0;L<o.length;L++){for(re=0,D=0;D<o[L].length;D++){for(A=0;A<o[L][D].length-T;A++){if(m(o[L][D][A],O,U,ee,re)===!1)return!1;O++}re++}ee++}break;case"GeometryCollection":for(L=0;L<C.geometries.length;L++)if(P(C.geometries[L],m,M)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function a(l,m,M,L){var D=M;return P(l,function(A,C,S,o,R){C===0&&M===void 0?D=A:D=m(D,A,C,S,o,R)},L),D}function _(l,m){var M;switch(l.type){case"FeatureCollection":for(M=0;M<l.features.length&&m(l.features[M].properties,M)!==!1;M++);break;case"Feature":m(l.properties,0);break}}function x(l,m,M){var L=M;return _(l,function(D,A){A===0&&M===void 0?L=D:L=m(L,D,A)}),L}function v(l,m){if(l.type==="Feature")m(l,0);else if(l.type==="FeatureCollection")for(var M=0;M<l.features.length&&m(l.features[M],M)!==!1;M++);}function y(l,m,M){var L=M;return v(l,function(D,A){A===0&&M===void 0?L=D:L=m(L,D,A)}),L}function r(l){var m=[];return P(l,function(M){m.push(M)}),m}function n(l,m){var M,L,D,A,C,S,o,R,T,O,N=0,H=l.type==="FeatureCollection",k=l.type==="Feature",V=H?l.features.length:1;for(M=0;M<V;M++){for(S=H?l.features[M].geometry:k?l.geometry:l,R=H?l.features[M].properties:k?l.properties:{},T=H?l.features[M].bbox:k?l.bbox:void 0,O=H?l.features[M].id:k?l.id:void 0,o=S?S.type==="GeometryCollection":!1,C=o?S.geometries.length:1,D=0;D<C;D++){if(A=o?S.geometries[D]:S,A===null){if(m(null,N,R,T,O)===!1)return!1;continue}switch(A.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(m(A,N,R,T,O)===!1)return!1;break}case"GeometryCollection":{for(L=0;L<A.geometries.length;L++)if(m(A.geometries[L],N,R,T,O)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}N++}}function u(l,m,M){var L=M;return n(l,function(D,A,C,S,o){A===0&&M===void 0?L=D:L=m(L,D,A,C,S,o)}),L}function i(l,m){n(l,function(M,L,D,A,C){var S=M===null?null:M.type;switch(S){case null:case"Point":case"LineString":case"Polygon":return m(d.feature(M,D,{bbox:A,id:C}),L,0)===!1?!1:void 0}var o;switch(S){case"MultiPoint":o="Point";break;case"MultiLineString":o="LineString";break;case"MultiPolygon":o="Polygon";break}for(var R=0;R<M.coordinates.length;R++){var T=M.coordinates[R],O={type:o,coordinates:T};if(m(d.feature(O,D),L,R)===!1)return!1}})}function f(l,m,M){var L=M;return i(l,function(D,A,C){A===0&&C===0&&M===void 0?L=D:L=m(L,D,A,C)}),L}function g(l,m){i(l,function(M,L,D){var A=0;if(M.geometry){var C=M.geometry.type;if(!(C==="Point"||C==="MultiPoint")){var S,o=0,R=0,T=0;if(P(M,function(O,N,H,k,V){if(S===void 0||L>o||k>R||V>T){S=O,o=L,R=k,T=V,A=0;return}var G=d.lineString([S,O],M.properties);if(m(G,L,D,V,A)===!1)return!1;A++,S=O})===!1)return!1}}})}function h(l,m,M){var L=M,D=!1;return g(l,function(A,C,S,o,R){D===!1&&M===void 0?L=A:L=m(L,A,C,S,o,R),D=!0}),L}function b(l,m){if(!l)throw new Error("geojson is required");i(l,function(M,L,D){if(M.geometry!==null){var A=M.geometry.type,C=M.geometry.coordinates;switch(A){case"LineString":if(m(M,L,D,0,0)===!1)return!1;break;case"Polygon":for(var S=0;S<C.length;S++)if(m(d.lineString(C[S],M.properties),L,D,S)===!1)return!1;break}}})}function p(l,m,M){var L=M;return b(l,function(D,A,C,S){A===0&&M===void 0?L=D:L=m(L,D,A,C,S)}),L}function E(l,m){if(m=m||{},!d.isObject(m))throw new Error("options is invalid");var M=m.featureIndex||0,L=m.multiFeatureIndex||0,D=m.geometryIndex||0,A=m.segmentIndex||0,C=m.properties,S;switch(l.type){case"FeatureCollection":M<0&&(M=l.features.length+M),C=C||l.features[M].properties,S=l.features[M].geometry;break;case"Feature":C=C||l.properties,S=l.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":S=l;break;default:throw new Error("geojson is invalid")}if(S===null)return null;var o=S.coordinates;switch(S.type){case"Point":case"MultiPoint":return null;case"LineString":return A<0&&(A=o.length+A-1),d.lineString([o[A],o[A+1]],C,m);case"Polygon":return D<0&&(D=o.length+D),A<0&&(A=o[D].length+A-1),d.lineString([o[D][A],o[D][A+1]],C,m);case"MultiLineString":return L<0&&(L=o.length+L),A<0&&(A=o[L].length+A-1),d.lineString([o[L][A],o[L][A+1]],C,m);case"MultiPolygon":return L<0&&(L=o.length+L),D<0&&(D=o[L].length+D),A<0&&(A=o[L][D].length-A-1),d.lineString([o[L][D][A],o[L][D][A+1]],C,m)}throw new Error("geojson is invalid")}function c(l,m){if(m=m||{},!d.isObject(m))throw new Error("options is invalid");var M=m.featureIndex||0,L=m.multiFeatureIndex||0,D=m.geometryIndex||0,A=m.coordIndex||0,C=m.properties,S;switch(l.type){case"FeatureCollection":M<0&&(M=l.features.length+M),C=C||l.features[M].properties,S=l.features[M].geometry;break;case"Feature":C=C||l.properties,S=l.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":S=l;break;default:throw new Error("geojson is invalid")}if(S===null)return null;var o=S.coordinates;switch(S.type){case"Point":return d.point(o,C,m);case"MultiPoint":return L<0&&(L=o.length+L),d.point(o[L],C,m);case"LineString":return A<0&&(A=o.length+A),d.point(o[A],C,m);case"Polygon":return D<0&&(D=o.length+D),A<0&&(A=o[D].length+A),d.point(o[D][A],C,m);case"MultiLineString":return L<0&&(L=o.length+L),A<0&&(A=o[L].length+A),d.point(o[L][A],C,m);case"MultiPolygon":return L<0&&(L=o.length+L),D<0&&(D=o[L].length+D),A<0&&(A=o[L][D].length-A),d.point(o[L][D][A],C,m)}throw new Error("geojson is invalid")}B.coordEach=P,B.coordReduce=a,B.propEach=_,B.propReduce=x,B.featureEach=v,B.featureReduce=y,B.coordAll=r,B.geomEach=n,B.geomReduce=u,B.flattenEach=i,B.flattenReduce=f,B.segmentEach=g,B.segmentReduce=h,B.lineEach=b,B.lineReduce=p,B.findSegment=E,B.findPoint=c},29261:function(z,B,e){Object.defineProperty(B,"__esModule",{value:!0});var d=e(88553),P=e(64182);function a(_,x){x===void 0&&(x={});var v=0,y=0,r=0;return d.coordEach(_,function(n){v+=n[0],y+=n[1],r++}),P.point([v/r,y/r],x.properties)}B.default=a},64182:function(z,B){Object.defineProperty(B,"__esModule",{value:!0}),B.earthRadius=63710088e-1,B.factors={centimeters:B.earthRadius*100,centimetres:B.earthRadius*100,degrees:B.earthRadius/111325,feet:B.earthRadius*3.28084,inches:B.earthRadius*39.37,kilometers:B.earthRadius/1e3,kilometres:B.earthRadius/1e3,meters:B.earthRadius,metres:B.earthRadius,miles:B.earthRadius/1609.344,millimeters:B.earthRadius*1e3,millimetres:B.earthRadius*1e3,nauticalmiles:B.earthRadius/1852,radians:1,yards:B.earthRadius/1.0936},B.unitsFactors={centimeters:100,centimetres:100,degrees:8982708286548395e-21,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:.0006213711922373339,millimeters:1e3,millimetres:1e3,nauticalmiles:.0005399568034557236,radians:1/B.earthRadius,yards:.91441111923921},B.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function e(k,V,G){G===void 0&&(G={});var U={type:"Feature"};return(G.id===0||G.id)&&(U.id=G.id),G.bbox&&(U.bbox=G.bbox),U.properties=V||{},U.geometry=k,U}B.feature=e;function d(k,V,G){switch(k){case"Point":return P(V).geometry;case"LineString":return v(V).geometry;case"Polygon":return _(V).geometry;case"MultiPoint":return u(V).geometry;case"MultiLineString":return n(V).geometry;case"MultiPolygon":return i(V).geometry;default:throw new Error(k+" is invalid")}}B.geometry=d;function P(k,V,G){G===void 0&&(G={});var U={type:"Point",coordinates:k};return e(U,V,G)}B.point=P;function a(k,V,G){return G===void 0&&(G={}),r(k.map(function(U){return P(U,V)}),G)}B.points=a;function _(k,V,G){G===void 0&&(G={});for(var U=0,Y=k;U<Y.length;U++){var ee=Y[U];if(ee.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var re=0;re<ee[ee.length-1].length;re++)if(ee[ee.length-1][re]!==ee[0][re])throw new Error("First and last Position are not equivalent.")}var ie={type:"Polygon",coordinates:k};return e(ie,V,G)}B.polygon=_;function x(k,V,G){return G===void 0&&(G={}),r(k.map(function(U){return _(U,V)}),G)}B.polygons=x;function v(k,V,G){if(G===void 0&&(G={}),k.length<2)throw new Error("coordinates must be an array of two or more positions");var U={type:"LineString",coordinates:k};return e(U,V,G)}B.lineString=v;function y(k,V,G){return G===void 0&&(G={}),r(k.map(function(U){return v(U,V)}),G)}B.lineStrings=y;function r(k,V){V===void 0&&(V={});var G={type:"FeatureCollection"};return V.id&&(G.id=V.id),V.bbox&&(G.bbox=V.bbox),G.features=k,G}B.featureCollection=r;function n(k,V,G){G===void 0&&(G={});var U={type:"MultiLineString",coordinates:k};return e(U,V,G)}B.multiLineString=n;function u(k,V,G){G===void 0&&(G={});var U={type:"MultiPoint",coordinates:k};return e(U,V,G)}B.multiPoint=u;function i(k,V,G){G===void 0&&(G={});var U={type:"MultiPolygon",coordinates:k};return e(U,V,G)}B.multiPolygon=i;function f(k,V,G){G===void 0&&(G={});var U={type:"GeometryCollection",geometries:k};return e(U,V,G)}B.geometryCollection=f;function g(k,V){if(V===void 0&&(V=0),V&&!(V>=0))throw new Error("precision must be a positive number");var G=Math.pow(10,V||0);return Math.round(k*G)/G}B.round=g;function h(k,V){V===void 0&&(V="kilometers");var G=B.factors[V];if(!G)throw new Error(V+" units is invalid");return k*G}B.radiansToLength=h;function b(k,V){V===void 0&&(V="kilometers");var G=B.factors[V];if(!G)throw new Error(V+" units is invalid");return k/G}B.lengthToRadians=b;function p(k,V){return c(b(k,V))}B.lengthToDegrees=p;function E(k){var V=k%360;return V<0&&(V+=360),V}B.bearingToAzimuth=E;function c(k){var V=k%(2*Math.PI);return V*180/Math.PI}B.radiansToDegrees=c;function l(k){var V=k%360;return V*Math.PI/180}B.degreesToRadians=l;function m(k,V,G){if(V===void 0&&(V="kilometers"),G===void 0&&(G="kilometers"),!(k>=0))throw new Error("length must be a positive number");return h(b(k,V),G)}B.convertLength=m;function M(k,V,G){if(V===void 0&&(V="meters"),G===void 0&&(G="kilometers"),!(k>=0))throw new Error("area must be a positive number");var U=B.areaFactors[V];if(!U)throw new Error("invalid original units");var Y=B.areaFactors[G];if(!Y)throw new Error("invalid final units");return k/U*Y}B.convertArea=M;function L(k){return!isNaN(k)&&k!==null&&!Array.isArray(k)&&!/^\s*$/.test(k)}B.isNumber=L;function D(k){return!!k&&k.constructor===Object}B.isObject=D;function A(k){if(!k)throw new Error("bbox is required");if(!Array.isArray(k))throw new Error("bbox must be an Array");if(k.length!==4&&k.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");k.forEach(function(V){if(!L(V))throw new Error("bbox must only contain numbers")})}B.validateBBox=A;function C(k){if(!k)throw new Error("id is required");if(["string","number"].indexOf(typeof k)===-1)throw new Error("id must be a number or a string")}B.validateId=C;function S(){throw new Error("method has been renamed to `radiansToDegrees`")}B.radians2degrees=S;function o(){throw new Error("method has been renamed to `degreesToRadians`")}B.degrees2radians=o;function R(){throw new Error("method has been renamed to `lengthToDegrees`")}B.distanceToDegrees=R;function T(){throw new Error("method has been renamed to `lengthToRadians`")}B.distanceToRadians=T;function O(){throw new Error("method has been renamed to `radiansToLength`")}B.radiansToDistance=O;function N(){throw new Error("method has been renamed to `bearingToAzimuth`")}B.bearingToAngle=N;function H(){throw new Error("method has been renamed to `convertLength`")}B.convertDistance=H},88553:function(z,B,e){Object.defineProperty(B,"__esModule",{value:!0});var d=e(64182);function P(l,m,M){if(l!==null)for(var L,D,A,C,S,o,R,T=0,O=0,N,H=l.type,k=H==="FeatureCollection",V=H==="Feature",G=k?l.features.length:1,U=0;U<G;U++){R=k?l.features[U].geometry:V?l.geometry:l,N=R?R.type==="GeometryCollection":!1,S=N?R.geometries.length:1;for(var Y=0;Y<S;Y++){var ee=0,re=0;if(C=N?R.geometries[Y]:R,C!==null){o=C.coordinates;var ie=C.type;switch(T=M&&(ie==="Polygon"||ie==="MultiPolygon")?1:0,ie){case null:break;case"Point":if(m(o,O,U,ee,re)===!1)return!1;O++,ee++;break;case"LineString":case"MultiPoint":for(L=0;L<o.length;L++){if(m(o[L],O,U,ee,re)===!1)return!1;O++,ie==="MultiPoint"&&ee++}ie==="LineString"&&ee++;break;case"Polygon":case"MultiLineString":for(L=0;L<o.length;L++){for(D=0;D<o[L].length-T;D++){if(m(o[L][D],O,U,ee,re)===!1)return!1;O++}ie==="MultiLineString"&&ee++,ie==="Polygon"&&re++}ie==="Polygon"&&ee++;break;case"MultiPolygon":for(L=0;L<o.length;L++){for(re=0,D=0;D<o[L].length;D++){for(A=0;A<o[L][D].length-T;A++){if(m(o[L][D][A],O,U,ee,re)===!1)return!1;O++}re++}ee++}break;case"GeometryCollection":for(L=0;L<C.geometries.length;L++)if(P(C.geometries[L],m,M)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function a(l,m,M,L){var D=M;return P(l,function(A,C,S,o,R){C===0&&M===void 0?D=A:D=m(D,A,C,S,o,R)},L),D}function _(l,m){var M;switch(l.type){case"FeatureCollection":for(M=0;M<l.features.length&&m(l.features[M].properties,M)!==!1;M++);break;case"Feature":m(l.properties,0);break}}function x(l,m,M){var L=M;return _(l,function(D,A){A===0&&M===void 0?L=D:L=m(L,D,A)}),L}function v(l,m){if(l.type==="Feature")m(l,0);else if(l.type==="FeatureCollection")for(var M=0;M<l.features.length&&m(l.features[M],M)!==!1;M++);}function y(l,m,M){var L=M;return v(l,function(D,A){A===0&&M===void 0?L=D:L=m(L,D,A)}),L}function r(l){var m=[];return P(l,function(M){m.push(M)}),m}function n(l,m){var M,L,D,A,C,S,o,R,T,O,N=0,H=l.type==="FeatureCollection",k=l.type==="Feature",V=H?l.features.length:1;for(M=0;M<V;M++){for(S=H?l.features[M].geometry:k?l.geometry:l,R=H?l.features[M].properties:k?l.properties:{},T=H?l.features[M].bbox:k?l.bbox:void 0,O=H?l.features[M].id:k?l.id:void 0,o=S?S.type==="GeometryCollection":!1,C=o?S.geometries.length:1,D=0;D<C;D++){if(A=o?S.geometries[D]:S,A===null){if(m(null,N,R,T,O)===!1)return!1;continue}switch(A.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(m(A,N,R,T,O)===!1)return!1;break}case"GeometryCollection":{for(L=0;L<A.geometries.length;L++)if(m(A.geometries[L],N,R,T,O)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}N++}}function u(l,m,M){var L=M;return n(l,function(D,A,C,S,o){A===0&&M===void 0?L=D:L=m(L,D,A,C,S,o)}),L}function i(l,m){n(l,function(M,L,D,A,C){var S=M===null?null:M.type;switch(S){case null:case"Point":case"LineString":case"Polygon":return m(d.feature(M,D,{bbox:A,id:C}),L,0)===!1?!1:void 0}var o;switch(S){case"MultiPoint":o="Point";break;case"MultiLineString":o="LineString";break;case"MultiPolygon":o="Polygon";break}for(var R=0;R<M.coordinates.length;R++){var T=M.coordinates[R],O={type:o,coordinates:T};if(m(d.feature(O,D),L,R)===!1)return!1}})}function f(l,m,M){var L=M;return i(l,function(D,A,C){A===0&&C===0&&M===void 0?L=D:L=m(L,D,A,C)}),L}function g(l,m){i(l,function(M,L,D){var A=0;if(M.geometry){var C=M.geometry.type;if(!(C==="Point"||C==="MultiPoint")){var S,o=0,R=0,T=0;if(P(M,function(O,N,H,k,V){if(S===void 0||L>o||k>R||V>T){S=O,o=L,R=k,T=V,A=0;return}var G=d.lineString([S,O],M.properties);if(m(G,L,D,V,A)===!1)return!1;A++,S=O})===!1)return!1}}})}function h(l,m,M){var L=M,D=!1;return g(l,function(A,C,S,o,R){D===!1&&M===void 0?L=A:L=m(L,A,C,S,o,R),D=!0}),L}function b(l,m){if(!l)throw new Error("geojson is required");i(l,function(M,L,D){if(M.geometry!==null){var A=M.geometry.type,C=M.geometry.coordinates;switch(A){case"LineString":if(m(M,L,D,0,0)===!1)return!1;break;case"Polygon":for(var S=0;S<C.length;S++)if(m(d.lineString(C[S],M.properties),L,D,S)===!1)return!1;break}}})}function p(l,m,M){var L=M;return b(l,function(D,A,C,S){A===0&&M===void 0?L=D:L=m(L,D,A,C,S)}),L}function E(l,m){if(m=m||{},!d.isObject(m))throw new Error("options is invalid");var M=m.featureIndex||0,L=m.multiFeatureIndex||0,D=m.geometryIndex||0,A=m.segmentIndex||0,C=m.properties,S;switch(l.type){case"FeatureCollection":M<0&&(M=l.features.length+M),C=C||l.features[M].properties,S=l.features[M].geometry;break;case"Feature":C=C||l.properties,S=l.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":S=l;break;default:throw new Error("geojson is invalid")}if(S===null)return null;var o=S.coordinates;switch(S.type){case"Point":case"MultiPoint":return null;case"LineString":return A<0&&(A=o.length+A-1),d.lineString([o[A],o[A+1]],C,m);case"Polygon":return D<0&&(D=o.length+D),A<0&&(A=o[D].length+A-1),d.lineString([o[D][A],o[D][A+1]],C,m);case"MultiLineString":return L<0&&(L=o.length+L),A<0&&(A=o[L].length+A-1),d.lineString([o[L][A],o[L][A+1]],C,m);case"MultiPolygon":return L<0&&(L=o.length+L),D<0&&(D=o[L].length+D),A<0&&(A=o[L][D].length-A-1),d.lineString([o[L][D][A],o[L][D][A+1]],C,m)}throw new Error("geojson is invalid")}function c(l,m){if(m=m||{},!d.isObject(m))throw new Error("options is invalid");var M=m.featureIndex||0,L=m.multiFeatureIndex||0,D=m.geometryIndex||0,A=m.coordIndex||0,C=m.properties,S;switch(l.type){case"FeatureCollection":M<0&&(M=l.features.length+M),C=C||l.features[M].properties,S=l.features[M].geometry;break;case"Feature":C=C||l.properties,S=l.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":S=l;break;default:throw new Error("geojson is invalid")}if(S===null)return null;var o=S.coordinates;switch(S.type){case"Point":return d.point(o,C,m);case"MultiPoint":return L<0&&(L=o.length+L),d.point(o[L],C,m);case"LineString":return A<0&&(A=o.length+A),d.point(o[A],C,m);case"Polygon":return D<0&&(D=o.length+D),A<0&&(A=o[D].length+A),d.point(o[D][A],C,m);case"MultiLineString":return L<0&&(L=o.length+L),A<0&&(A=o[L].length+A),d.point(o[L][A],C,m);case"MultiPolygon":return L<0&&(L=o.length+L),D<0&&(D=o[L].length+D),A<0&&(A=o[L][D].length-A),d.point(o[L][D][A],C,m)}throw new Error("geojson is invalid")}B.coordEach=P,B.coordReduce=a,B.propEach=_,B.propReduce=x,B.featureEach=v,B.featureReduce=y,B.coordAll=r,B.geomEach=n,B.geomReduce=u,B.flattenEach=i,B.flattenReduce=f,B.segmentEach=g,B.segmentReduce=h,B.lineEach=b,B.lineReduce=p,B.findSegment=E,B.findPoint=c},65185:function(z){z.exports=B;function B(e){var d=0,P=0,a=0,_=0;return e.map(function(x){x=x.slice();var v=x[0],y=v.toUpperCase();if(v!=y)switch(x[0]=y,v){case"a":x[6]+=a,x[7]+=_;break;case"v":x[1]+=_;break;case"h":x[1]+=a;break;default:for(var r=1;r<x.length;)x[r++]+=a,x[r++]+=_}switch(y){case"Z":a=d,_=P;break;case"H":a=x[1];break;case"V":_=x[1];break;case"M":a=d=x[1],_=P=x[2];break;default:a=x[x.length-2],_=x[x.length-1]}return x})}},21527:function(z){z.exports=B;function B(e,d){if(!e||e.length==null)throw Error("Argument should be an array");d==null?d=1:d=Math.floor(d);for(var P=Array(d*2),a=0;a<d;a++){for(var _=-1/0,x=1/0,v=a,y=e.length;v<y;v+=d)e[v]>_&&(_=e[v]),e[v]<x&&(x=e[v]);P[a]=x,P[d+a]=_}return P}},24696:function(z){z.exports=function(e,d,P){if(e.filter)return e.filter(d,P);if(e==null)throw new TypeError;if(typeof d!="function")throw new TypeError;for(var a=[],_=0;_<e.length;_++)if(B.call(e,_)){var x=e[_];d.call(P,x,_,e)&&a.push(x)}return a};var B=Object.prototype.hasOwnProperty},6851:function(z){z.exports=function(B,e,d){if(typeof Array.prototype.findIndex=="function")return B.findIndex(e,d);if(typeof e!="function")throw new TypeError("predicate must be a function");var P=Object(B),a=P.length;if(a===0)return-1;for(var _=0;_<a;_++)if(e.call(d,P[_],_,P))return _;return-1}},54:function(z,B,e){var d=e(21527);z.exports=P;function P(a,_,x){if(!a||a.length==null)throw Error("Argument should be an array");_==null&&(_=1),x==null&&(x=d(a,_));for(var v=0;v<_;v++){var y=x[_+v],r=x[v],n=v,u=a.length;if(y===1/0&&r===-1/0)for(n=v;n<u;n+=_)a[n]=a[n]===y?1:a[n]===r?0:.5;else if(y===1/0)for(n=v;n<u;n+=_)a[n]=a[n]===y?1:0;else if(r===-1/0)for(n=v;n<u;n+=_)a[n]=a[n]===r?0:1;else{var i=y-r;for(n=v;n<u;n+=_)isNaN(a[n])||(a[n]=i===0?.5:(a[n]-r)/i)}}return a}},57471:function(z){z.exports=function(e,d){var P=typeof e=="number",a=typeof d=="number";P&&!a?(d=e,e=0):!P&&!a&&(e=0,d=0),e=e|0,d=d|0;var _=d-e;if(_<0)throw new Error("array length must be positive");for(var x=new Array(_),v=0,y=e;v<_;v++,y++)x[v]=y;return x}},32791:function(z,B,e){var d=e(90386);function P(re){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?P=function(se){return typeof se}:P=function(se){return se&&typeof Symbol=="function"&&se.constructor===Symbol&&se!==Symbol.prototype?"symbol":typeof se},P(re)}function a(re,ie){if(!(re instanceof ie))throw new TypeError("Cannot call a class as a function")}var _=e(79616),x=_.codes,v=x.ERR_AMBIGUOUS_ARGUMENT,y=x.ERR_INVALID_ARG_TYPE,r=x.ERR_INVALID_ARG_VALUE,n=x.ERR_INVALID_RETURN_VALUE,u=x.ERR_MISSING_ARGS,i=e(73894),f=e(43827),g=f.inspect,h=e(43827).types,b=h.isPromise,p=h.isRegExp,E=Object.assign?Object.assign:e(73523).assign,c=Object.is?Object.is:e(64003),l,m;function M(){var re=e(74061);l=re.isDeepEqual,m=re.isDeepStrictEqual}var L=!1,D=z.exports=R,A={};function C(re){throw re.message instanceof Error?re.message:new i(re)}function S(re,ie,se,ce,q){var j=arguments.length,Z;if(j===0)Z="Failed";else if(j===1)se=re,re=void 0;else{if(L===!1){L=!0;var Q=d.emitWarning?d.emitWarning:console.warn.bind(console);Q("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}j===2&&(ce="!=")}if(se instanceof Error)throw se;var ue={actual:re,expected:ie,operator:ce===void 0?"fail":ce,stackStartFn:q||S};se!==void 0&&(ue.message=se);var fe=new i(ue);throw Z&&(fe.message=Z,fe.generatedMessage=!0),fe}D.fail=S,D.AssertionError=i;function o(re,ie,se,ce){if(!se){var q=!1;if(ie===0)q=!0,ce="No value argument passed to `assert.ok()`";else if(ce instanceof Error)throw ce;var j=new i({actual:se,expected:!0,message:ce,operator:"==",stackStartFn:re});throw j.generatedMessage=q,j}}function R(){for(var re=arguments.length,ie=new Array(re),se=0;se<re;se++)ie[se]=arguments[se];o.apply(void 0,[R,ie.length].concat(ie))}D.ok=R,D.equal=function re(ie,se,ce){if(arguments.length<2)throw new u("actual","expected");ie!=se&&C({actual:ie,expected:se,message:ce,operator:"==",stackStartFn:re})},D.notEqual=function re(ie,se,ce){if(arguments.length<2)throw new u("actual","expected");ie==se&&C({actual:ie,expected:se,message:ce,operator:"!=",stackStartFn:re})},D.deepEqual=function re(ie,se,ce){if(arguments.length<2)throw new u("actual","expected");l===void 0&&M(),l(ie,se)||C({actual:ie,expected:se,message:ce,operator:"deepEqual",stackStartFn:re})},D.notDeepEqual=function re(ie,se,ce){if(arguments.length<2)throw new u("actual","expected");l===void 0&&M(),l(ie,se)&&C({actual:ie,expected:se,message:ce,operator:"notDeepEqual",stackStartFn:re})},D.deepStrictEqual=function re(ie,se,ce){if(arguments.length<2)throw new u("actual","expected");l===void 0&&M(),m(ie,se)||C({actual:ie,expected:se,message:ce,operator:"deepStrictEqual",stackStartFn:re})},D.notDeepStrictEqual=T;function T(re,ie,se){if(arguments.length<2)throw new u("actual","expected");l===void 0&&M(),m(re,ie)&&C({actual:re,expected:ie,message:se,operator:"notDeepStrictEqual",stackStartFn:T})}D.strictEqual=function re(ie,se,ce){if(arguments.length<2)throw new u("actual","expected");c(ie,se)||C({actual:ie,expected:se,message:ce,operator:"strictEqual",stackStartFn:re})},D.notStrictEqual=function re(ie,se,ce){if(arguments.length<2)throw new u("actual","expected");c(ie,se)&&C({actual:ie,expected:se,message:ce,operator:"notStrictEqual",stackStartFn:re})};var O=function re(ie,se,ce){var q=this;a(this,re),se.forEach(function(j){j in ie&&(ce!==void 0&&typeof ce[j]=="string"&&p(ie[j])&&ie[j].test(ce[j])?q[j]=ce[j]:q[j]=ie[j])})};function N(re,ie,se,ce,q,j){if(!(se in re)||!m(re[se],ie[se])){if(!ce){var Z=new O(re,q),Q=new O(ie,q,re),ue=new i({actual:Z,expected:Q,operator:"deepStrictEqual",stackStartFn:j});throw ue.actual=re,ue.expected=ie,ue.operator=j.name,ue}C({actual:re,expected:ie,message:ce,operator:j.name,stackStartFn:j})}}function H(re,ie,se,ce){if(typeof ie!="function"){if(p(ie))return ie.test(re);if(arguments.length===2)throw new y("expected",["Function","RegExp"],ie);if(P(re)!=="object"||re===null){var q=new i({actual:re,expected:ie,message:se,operator:"deepStrictEqual",stackStartFn:ce});throw q.operator=ce.name,q}var j=Object.keys(ie);if(ie instanceof Error)j.push("name","message");else if(j.length===0)throw new r("error",ie,"may not be an empty object");return l===void 0&&M(),j.forEach(function(Z){typeof re[Z]=="string"&&p(ie[Z])&&ie[Z].test(re[Z])||N(re,ie,Z,se,j,ce)}),!0}return ie.prototype!==void 0&&re instanceof ie?!0:Error.isPrototypeOf(ie)?!1:ie.call({},re)===!0}function k(re){if(typeof re!="function")throw new y("fn","Function",re);try{re()}catch(ie){return ie}return A}function V(re){return b(re)||re!==null&&P(re)==="object"&&typeof re.then=="function"&&typeof re.catch=="function"}function G(re){return Promise.resolve().then(function(){var ie;if(typeof re=="function"){if(ie=re(),!V(ie))throw new n("instance of Promise","promiseFn",ie)}else if(V(re))ie=re;else throw new y("promiseFn",["Function","Promise"],re);return Promise.resolve().then(function(){return ie}).then(function(){return A}).catch(function(se){return se})})}function U(re,ie,se,ce){if(typeof se=="string"){if(arguments.length===4)throw new y("error",["Object","Error","Function","RegExp"],se);if(P(ie)==="object"&&ie!==null){if(ie.message===se)throw new v("error/message",'The error message "'.concat(ie.message,'" is identical to the message.'))}else if(ie===se)throw new v("error/message",'The error "'.concat(ie,'" is identical to the message.'));ce=se,se=void 0}else if(se!=null&&P(se)!=="object"&&typeof se!="function")throw new y("error",["Object","Error","Function","RegExp"],se);if(ie===A){var q="";se&&se.name&&(q+=" (".concat(se.name,")")),q+=ce?": ".concat(ce):".";var j=re.name==="rejects"?"rejection":"exception";C({actual:void 0,expected:se,operator:re.name,message:"Missing expected ".concat(j).concat(q),stackStartFn:re})}if(se&&!H(ie,se,ce,re))throw ie}function Y(re,ie,se,ce){if(ie!==A){if(typeof se=="string"&&(ce=se,se=void 0),!se||H(ie,se)){var q=ce?": ".concat(ce):".",j=re.name==="doesNotReject"?"rejection":"exception";C({actual:ie,expected:se,operator:re.name,message:"Got unwanted ".concat(j).concat(q,`
`)+'Actual message: "'.concat(ie&&ie.message,'"'),stackStartFn:re})}throw ie}}D.throws=function re(ie){for(var se=arguments.length,ce=new Array(se>1?se-1:0),q=1;q<se;q++)ce[q-1]=arguments[q];U.apply(void 0,[re,k(ie)].concat(ce))},D.rejects=function re(ie){for(var se=arguments.length,ce=new Array(se>1?se-1:0),q=1;q<se;q++)ce[q-1]=arguments[q];return G(ie).then(function(j){return U.apply(void 0,[re,j].concat(ce))})},D.doesNotThrow=function re(ie){for(var se=arguments.length,ce=new Array(se>1?se-1:0),q=1;q<se;q++)ce[q-1]=arguments[q];Y.apply(void 0,[re,k(ie)].concat(ce))},D.doesNotReject=function re(ie){for(var se=arguments.length,ce=new Array(se>1?se-1:0),q=1;q<se;q++)ce[q-1]=arguments[q];return G(ie).then(function(j){return Y.apply(void 0,[re,j].concat(ce))})},D.ifError=function re(ie){if(ie!=null){var se="ifError got unwanted exception: ";P(ie)==="object"&&typeof ie.message=="string"?ie.message.length===0&&ie.constructor?se+=ie.constructor.name:se+=ie.message:se+=g(ie);var ce=new i({actual:ie,expected:null,operator:"ifError",message:se,stackStartFn:re}),q=ie.stack;if(typeof q=="string"){var j=q.split(`
`);j.shift();for(var Z=ce.stack.split(`
`),Q=0;Q<j.length;Q++){var ue=Z.indexOf(j[Q]);if(ue!==-1){Z=Z.slice(0,ue);break}}ce.stack="".concat(Z.join(`
`),`
`).concat(j.join(`
`))}throw ce}};function ee(){for(var re=arguments.length,ie=new Array(re),se=0;se<re;se++)ie[se]=arguments[se];o.apply(void 0,[ee,ie.length].concat(ie))}D.strict=E(ee,D,{equal:D.strictEqual,deepEqual:D.deepStrictEqual,notEqual:D.notStrictEqual,notDeepEqual:D.notDeepStrictEqual}),D.strict.strict=D.strict},73894:function(z,B,e){var d=e(90386);function P(k){for(var V=1;V<arguments.length;V++){var G=arguments[V]!=null?arguments[V]:{},U=Object.keys(G);typeof Object.getOwnPropertySymbols=="function"&&(U=U.concat(Object.getOwnPropertySymbols(G).filter(function(Y){return Object.getOwnPropertyDescriptor(G,Y).enumerable}))),U.forEach(function(Y){a(k,Y,G[Y])})}return k}function a(k,V,G){return V in k?Object.defineProperty(k,V,{value:G,enumerable:!0,configurable:!0,writable:!0}):k[V]=G,k}function _(k,V){if(!(k instanceof V))throw new TypeError("Cannot call a class as a function")}function x(k,V){for(var G=0;G<V.length;G++){var U=V[G];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(k,U.key,U)}}function v(k,V,G){return V&&x(k.prototype,V),G&&x(k,G),k}function y(k,V){return V&&(p(V)==="object"||typeof V=="function")?V:r(k)}function r(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function n(k,V){if(typeof V!="function"&&V!==null)throw new TypeError("Super expression must either be null or a function");k.prototype=Object.create(V&&V.prototype,{constructor:{value:k,writable:!0,configurable:!0}}),V&&h(k,V)}function u(k){var V=typeof Map=="function"?new Map:void 0;return u=function(U){if(U===null||!g(U))return U;if(typeof U!="function")throw new TypeError("Super expression must either be null or a function");if(typeof V<"u"){if(V.has(U))return V.get(U);V.set(U,Y)}function Y(){return f(U,arguments,b(this).constructor)}return Y.prototype=Object.create(U.prototype,{constructor:{value:Y,enumerable:!1,writable:!0,configurable:!0}}),h(Y,U)},u(k)}function i(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function f(k,V,G){return i()?f=Reflect.construct:f=function(Y,ee,re){var ie=[null];ie.push.apply(ie,ee);var se=Function.bind.apply(Y,ie),ce=new se;return re&&h(ce,re.prototype),ce},f.apply(null,arguments)}function g(k){return Function.toString.call(k).indexOf("[native code]")!==-1}function h(k,V){return h=Object.setPrototypeOf||function(U,Y){return U.__proto__=Y,U},h(k,V)}function b(k){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(G){return G.__proto__||Object.getPrototypeOf(G)},b(k)}function p(k){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?p=function(G){return typeof G}:p=function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},p(k)}var E=e(43827),c=E.inspect,l=e(79616),m=l.codes.ERR_INVALID_ARG_TYPE;function M(k,V,G){return(G===void 0||G>k.length)&&(G=k.length),k.substring(G-V.length,G)===V}function L(k,V){if(V=Math.floor(V),k.length==0||V==0)return"";var G=k.length*V;for(V=Math.floor(Math.log(V)/Math.log(2));V;)k+=k,V--;return k+=k.substring(0,G-k.length),k}var D="",A="",C="",S="",o={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:"},R=10;function T(k){var V=Object.keys(k),G=Object.create(Object.getPrototypeOf(k));return V.forEach(function(U){G[U]=k[U]}),Object.defineProperty(G,"message",{value:k.message}),G}function O(k){return c(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function N(k,V,G){var U="",Y="",ee=0,re="",ie=!1,se=O(k),ce=se.split(`
`),q=O(V).split(`
`),j=0,Z="";if(G==="strictEqual"&&p(k)==="object"&&p(V)==="object"&&k!==null&&V!==null&&(G="strictEqualObject"),ce.length===1&&q.length===1&&ce[0]!==q[0]){var Q=ce[0].length+q[0].length;if(Q<=R){if((p(k)!=="object"||k===null)&&(p(V)!=="object"||V===null)&&(k!==0||V!==0))return"".concat(o[G],`
`)+"".concat(ce[0]," !== ").concat(q[0],`
`)}else if(G!=="strictEqualObject"){var ue=d.stderr&&d.stderr.isTTY?d.stderr.columns:80;if(Q<ue){for(;ce[0][j]===q[0][j];)j++;j>2&&(Z=`
`.concat(L(" ",j),"^"),j=0)}}}for(var fe=ce[ce.length-1],te=q[q.length-1];fe===te&&(j++<2?re=`
`.concat(fe).concat(re):U=fe,ce.pop(),q.pop(),!(ce.length===0||q.length===0));)fe=ce[ce.length-1],te=q[q.length-1];var ne=Math.max(ce.length,q.length);if(ne===0){var ve=se.split(`
`);if(ve.length>30)for(ve[26]="".concat(D,"...").concat(S);ve.length>27;)ve.pop();return"".concat(o.notIdentical,`
`).concat(ve.join(`
`),`
`)}j>3&&(re=`
`.concat(D,"...").concat(S).concat(re),ie=!0),U!==""&&(re=`
`.concat(U).concat(re),U="");var le=0,xe=o[G]+`
`.concat(A,"+ actual").concat(S," ").concat(C,"- expected").concat(S),Se=" ".concat(D,"...").concat(S," Lines skipped");for(j=0;j<ne;j++){var Re=j-ee;if(ce.length<j+1)Re>1&&j>2&&(Re>4?(Y+=`
`.concat(D,"...").concat(S),ie=!0):Re>3&&(Y+=`
`.concat(q[j-2]),le++),Y+=`
`.concat(q[j-1]),le++),ee=j,U+=`
`.concat(C,"-").concat(S," ").concat(q[j]),le++;else if(q.length<j+1)Re>1&&j>2&&(Re>4?(Y+=`
`.concat(D,"...").concat(S),ie=!0):Re>3&&(Y+=`
`.concat(ce[j-2]),le++),Y+=`
`.concat(ce[j-1]),le++),ee=j,Y+=`
`.concat(A,"+").concat(S," ").concat(ce[j]),le++;else{var Ee=q[j],Oe=ce[j],Be=Oe!==Ee&&(!M(Oe,",")||Oe.slice(0,-1)!==Ee);Be&&M(Ee,",")&&Ee.slice(0,-1)===Oe&&(Be=!1,Oe+=","),Be?(Re>1&&j>2&&(Re>4?(Y+=`
`.concat(D,"...").concat(S),ie=!0):Re>3&&(Y+=`
`.concat(ce[j-2]),le++),Y+=`
`.concat(ce[j-1]),le++),ee=j,Y+=`
`.concat(A,"+").concat(S," ").concat(Oe),U+=`
`.concat(C,"-").concat(S," ").concat(Ee),le+=2):(Y+=U,U="",(Re===1||j===0)&&(Y+=`
`.concat(Oe),le++))}if(le>20&&j<ne-2)return"".concat(xe).concat(Se,`
`).concat(Y,`
`).concat(D,"...").concat(S).concat(U,`
`)+"".concat(D,"...").concat(S)}return"".concat(xe).concat(ie?Se:"",`
`).concat(Y).concat(U).concat(re).concat(Z)}var H=function(k){n(V,k);function V(G){var U;if(_(this,V),p(G)!=="object"||G===null)throw new m("options","Object",G);var Y=G.message,ee=G.operator,re=G.stackStartFn,ie=G.actual,se=G.expected,ce=Error.stackTraceLimit;if(Error.stackTraceLimit=0,Y!=null)U=y(this,b(V).call(this,String(Y)));else if(d.stderr&&d.stderr.isTTY&&(d.stderr&&d.stderr.getColorDepth&&d.stderr.getColorDepth()!==1?(D="\x1B[34m",A="\x1B[32m",S="\x1B[39m",C="\x1B[31m"):(D="",A="",S="",C="")),p(ie)==="object"&&ie!==null&&p(se)==="object"&&se!==null&&"stack"in ie&&ie instanceof Error&&"stack"in se&&se instanceof Error&&(ie=T(ie),se=T(se)),ee==="deepStrictEqual"||ee==="strictEqual")U=y(this,b(V).call(this,N(ie,se,ee)));else if(ee==="notDeepStrictEqual"||ee==="notStrictEqual"){var q=o[ee],j=O(ie).split(`
`);if(ee==="notStrictEqual"&&p(ie)==="object"&&ie!==null&&(q=o.notStrictEqualObject),j.length>30)for(j[26]="".concat(D,"...").concat(S);j.length>27;)j.pop();j.length===1?U=y(this,b(V).call(this,"".concat(q," ").concat(j[0]))):U=y(this,b(V).call(this,"".concat(q,`
`).concat(j.join(`
`),`
`)))}else{var Z=O(ie),Q="",ue=o[ee];ee==="notDeepEqual"||ee==="notEqual"?(Z="".concat(o[ee],`
`).concat(Z),Z.length>1024&&(Z="".concat(Z.slice(0,1021),"..."))):(Q="".concat(O(se)),Z.length>512&&(Z="".concat(Z.slice(0,509),"...")),Q.length>512&&(Q="".concat(Q.slice(0,509),"...")),ee==="deepEqual"||ee==="equal"?Z="".concat(ue,`
`).concat(Z,`
should equal
`):Q=" ".concat(ee," ").concat(Q)),U=y(this,b(V).call(this,"".concat(Z).concat(Q)))}return Error.stackTraceLimit=ce,U.generatedMessage=!Y,Object.defineProperty(r(U),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),U.code="ERR_ASSERTION",U.actual=ie,U.expected=se,U.operator=ee,Error.captureStackTrace&&Error.captureStackTrace(r(U),re),U.stack,U.name="AssertionError",y(U)}return v(V,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:c.custom,value:function(U,Y){return c(this,P({},Y,{customInspect:!1,depth:0}))}}]),V}(u(Error));z.exports=H},79616:function(z,B,e){function d(p){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(c){return typeof c}:d=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},d(p)}function P(p,E){if(!(p instanceof E))throw new TypeError("Cannot call a class as a function")}function a(p,E){return E&&(d(E)==="object"||typeof E=="function")?E:_(p)}function _(p){if(p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p}function x(p){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},x(p)}function v(p,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function");p.prototype=Object.create(E&&E.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),E&&y(p,E)}function y(p,E){return y=Object.setPrototypeOf||function(l,m){return l.__proto__=m,l},y(p,E)}var r={},n,u;function i(p,E,c){c||(c=Error);function l(M,L,D){return typeof E=="string"?E:E(M,L,D)}var m=function(M){v(L,M);function L(D,A,C){var S;return P(this,L),S=a(this,x(L).call(this,l(D,A,C))),S.code=p,S}return L}(c);r[p]=m}function f(p,E){if(Array.isArray(p)){var c=p.length;return p=p.map(function(l){return String(l)}),c>2?"one of ".concat(E," ").concat(p.slice(0,c-1).join(", "),", or ")+p[c-1]:c===2?"one of ".concat(E," ").concat(p[0]," or ").concat(p[1]):"of ".concat(E," ").concat(p[0])}else return"of ".concat(E," ").concat(String(p))}function g(p,E,c){return p.substr(!c||c<0?0:+c,E.length)===E}function h(p,E,c){return(c===void 0||c>p.length)&&(c=p.length),p.substring(c-E.length,c)===E}function b(p,E,c){return typeof c!="number"&&(c=0),c+E.length>p.length?!1:p.indexOf(E,c)!==-1}i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(p,E,c){n===void 0&&(n=e(32791)),n(typeof p=="string","'name' must be a string");var l;typeof E=="string"&&g(E,"not ")?(l="must not be",E=E.replace(/^not /,"")):l="must be";var m;if(h(p," argument"))m="The ".concat(p," ").concat(l," ").concat(f(E,"type"));else{var M=b(p,".")?"property":"argument";m='The "'.concat(p,'" ').concat(M," ").concat(l," ").concat(f(E,"type"))}return m+=". Received type ".concat(d(c)),m},TypeError),i("ERR_INVALID_ARG_VALUE",function(p,E){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";u===void 0&&(u=e(43827));var l=u.inspect(E);return l.length>128&&(l="".concat(l.slice(0,128),"...")),"The argument '".concat(p,"' ").concat(c,". Received ").concat(l)},TypeError),i("ERR_INVALID_RETURN_VALUE",function(p,E,c){var l;return c&&c.constructor&&c.constructor.name?l="instance of ".concat(c.constructor.name):l="type ".concat(d(c)),"Expected ".concat(p,' to be returned from the "').concat(E,'"')+" function but got ".concat(l,".")},TypeError),i("ERR_MISSING_ARGS",function(){for(var p=arguments.length,E=new Array(p),c=0;c<p;c++)E[c]=arguments[c];n===void 0&&(n=e(32791)),n(E.length>0,"At least one arg needs to be specified");var l="The ",m=E.length;switch(E=E.map(function(M){return'"'.concat(M,'"')}),m){case 1:l+="".concat(E[0]," argument");break;case 2:l+="".concat(E[0]," and ").concat(E[1]," arguments");break;default:l+=E.slice(0,m-1).join(", "),l+=", and ".concat(E[m-1]," arguments");break}return"".concat(l," must be specified")},TypeError),z.exports.codes=r},74061:function(z,B,e){function d(Le,Te){return _(Le)||a(Le,Te)||P()}function P(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function a(Le,Te){var De=[],Ve=!0,Ye=!1,Ne=void 0;try{for(var Xe=Le[Symbol.iterator](),ht;!(Ve=(ht=Xe.next()).done)&&(De.push(ht.value),!(Te&&De.length===Te));Ve=!0);}catch(st){Ye=!0,Ne=st}finally{try{!Ve&&Xe.return!=null&&Xe.return()}finally{if(Ye)throw Ne}}return De}function _(Le){if(Array.isArray(Le))return Le}function x(Le){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?x=function(De){return typeof De}:x=function(De){return De&&typeof Symbol=="function"&&De.constructor===Symbol&&De!==Symbol.prototype?"symbol":typeof De},x(Le)}var v=/a/g.flags!==void 0,y=function(Te){var De=[];return Te.forEach(function(Ve){return De.push(Ve)}),De},r=function(Te){var De=[];return Te.forEach(function(Ve,Ye){return De.push([Ye,Ve])}),De},n=Object.is?Object.is:e(64003),u=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},i=Number.isNaN?Number.isNaN:e(15567);function f(Le){return Le.call.bind(Le)}var g=f(Object.prototype.hasOwnProperty),h=f(Object.prototype.propertyIsEnumerable),b=f(Object.prototype.toString),p=e(43827).types,E=p.isAnyArrayBuffer,c=p.isArrayBufferView,l=p.isDate,m=p.isMap,M=p.isRegExp,L=p.isSet,D=p.isNativeError,A=p.isBoxedPrimitive,C=p.isNumberObject,S=p.isStringObject,o=p.isBooleanObject,R=p.isBigIntObject,T=p.isSymbolObject,O=p.isFloat32Array,N=p.isFloat64Array;function H(Le){if(Le.length===0||Le.length>10)return!0;for(var Te=0;Te<Le.length;Te++){var De=Le.charCodeAt(Te);if(De<48||De>57)return!0}return Le.length===10&&Le>=Math.pow(2,32)}function k(Le){return Object.keys(Le).filter(H).concat(u(Le).filter(Object.prototype.propertyIsEnumerable.bind(Le)))}/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/function V(Le,Te){if(Le===Te)return 0;for(var De=Le.length,Ve=Te.length,Ye=0,Ne=Math.min(De,Ve);Ye<Ne;++Ye)if(Le[Ye]!==Te[Ye]){De=Le[Ye],Ve=Te[Ye];break}return De<Ve?-1:Ve<De?1:0}var G=!0,U=!1,Y=0,ee=1,re=2,ie=3;function se(Le,Te){return v?Le.source===Te.source&&Le.flags===Te.flags:RegExp.prototype.toString.call(Le)===RegExp.prototype.toString.call(Te)}function ce(Le,Te){if(Le.byteLength!==Te.byteLength)return!1;for(var De=0;De<Le.byteLength;De++)if(Le[De]!==Te[De])return!1;return!0}function q(Le,Te){return Le.byteLength!==Te.byteLength?!1:V(new Uint8Array(Le.buffer,Le.byteOffset,Le.byteLength),new Uint8Array(Te.buffer,Te.byteOffset,Te.byteLength))===0}function j(Le,Te){return Le.byteLength===Te.byteLength&&V(new Uint8Array(Le),new Uint8Array(Te))===0}function Z(Le,Te){return C(Le)?C(Te)&&n(Number.prototype.valueOf.call(Le),Number.prototype.valueOf.call(Te)):S(Le)?S(Te)&&String.prototype.valueOf.call(Le)===String.prototype.valueOf.call(Te):o(Le)?o(Te)&&Boolean.prototype.valueOf.call(Le)===Boolean.prototype.valueOf.call(Te):R(Le)?R(Te)&&BigInt.prototype.valueOf.call(Le)===BigInt.prototype.valueOf.call(Te):T(Te)&&Symbol.prototype.valueOf.call(Le)===Symbol.prototype.valueOf.call(Te)}function Q(Le,Te,De,Ve){if(Le===Te)return Le!==0?!0:De?n(Le,Te):!0;if(De){if(x(Le)!=="object")return typeof Le=="number"&&i(Le)&&i(Te);if(x(Te)!=="object"||Le===null||Te===null||Object.getPrototypeOf(Le)!==Object.getPrototypeOf(Te))return!1}else{if(Le===null||x(Le)!=="object")return Te===null||x(Te)!=="object"?Le==Te:!1;if(Te===null||x(Te)!=="object")return!1}var Ye=b(Le),Ne=b(Te);if(Ye!==Ne)return!1;if(Array.isArray(Le)){if(Le.length!==Te.length)return!1;var Xe=k(Le),ht=k(Te);return Xe.length!==ht.length?!1:fe(Le,Te,De,Ve,ee,Xe)}if(Ye==="[object Object]"&&(!m(Le)&&m(Te)||!L(Le)&&L(Te)))return!1;if(l(Le)){if(!l(Te)||Date.prototype.getTime.call(Le)!==Date.prototype.getTime.call(Te))return!1}else if(M(Le)){if(!M(Te)||!se(Le,Te))return!1}else if(D(Le)||Le instanceof Error){if(Le.message!==Te.message||Le.name!==Te.name)return!1}else if(c(Le)){if(!De&&(O(Le)||N(Le))){if(!ce(Le,Te))return!1}else if(!q(Le,Te))return!1;var st=k(Le),it=k(Te);return st.length!==it.length?!1:fe(Le,Te,De,Ve,Y,st)}else{if(L(Le))return!L(Te)||Le.size!==Te.size?!1:fe(Le,Te,De,Ve,re);if(m(Le))return!m(Te)||Le.size!==Te.size?!1:fe(Le,Te,De,Ve,ie);if(E(Le)){if(!j(Le,Te))return!1}else if(A(Le)&&!Z(Le,Te))return!1}return fe(Le,Te,De,Ve,Y)}function ue(Le,Te){return Te.filter(function(De){return h(Le,De)})}function fe(Le,Te,De,Ve,Ye,Ne){if(arguments.length===5){Ne=Object.keys(Le);var Xe=Object.keys(Te);if(Ne.length!==Xe.length)return!1}for(var ht=0;ht<Ne.length;ht++)if(!g(Te,Ne[ht]))return!1;if(De&&arguments.length===5){var st=u(Le);if(st.length!==0){var it=0;for(ht=0;ht<st.length;ht++){var nt=st[ht];if(h(Le,nt)){if(!h(Te,nt))return!1;Ne.push(nt),it++}else if(h(Te,nt))return!1}var pt=u(Te);if(st.length!==pt.length&&ue(Te,pt).length!==it)return!1}else{var Tt=u(Te);if(Tt.length!==0&&ue(Te,Tt).length!==0)return!1}}if(Ne.length===0&&(Ye===Y||Ye===ee&&Le.length===0||Le.size===0))return!0;if(Ve===void 0)Ve={val1:new Map,val2:new Map,position:0};else{var Et=Ve.val1.get(Le);if(Et!==void 0){var Dt=Ve.val2.get(Te);if(Dt!==void 0)return Et===Dt}Ve.position++}Ve.val1.set(Le,Ve.position),Ve.val2.set(Te,Ve.position);var et=Ee(Le,Te,De,Ne,Ve,Ye);return Ve.val1.delete(Le),Ve.val2.delete(Te),et}function te(Le,Te,De,Ve){for(var Ye=y(Le),Ne=0;Ne<Ye.length;Ne++){var Xe=Ye[Ne];if(Q(Te,Xe,De,Ve))return Le.delete(Xe),!0}return!1}function ne(Le){switch(x(Le)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":Le=+Le;case"number":if(i(Le))return!1}return!0}function ve(Le,Te,De){var Ve=ne(De);return Ve??(Te.has(Ve)&&!Le.has(Ve))}function le(Le,Te,De,Ve,Ye){var Ne=ne(De);if(Ne!=null)return Ne;var Xe=Te.get(Ne);return Xe===void 0&&!Te.has(Ne)||!Q(Ve,Xe,!1,Ye)?!1:!Le.has(Ne)&&Q(Ve,Xe,!1,Ye)}function xe(Le,Te,De,Ve){for(var Ye=null,Ne=y(Le),Xe=0;Xe<Ne.length;Xe++){var ht=Ne[Xe];if(x(ht)==="object"&&ht!==null)Ye===null&&(Ye=new Set),Ye.add(ht);else if(!Te.has(ht)){if(De||!ve(Le,Te,ht))return!1;Ye===null&&(Ye=new Set),Ye.add(ht)}}if(Ye!==null){for(var st=y(Te),it=0;it<st.length;it++){var nt=st[it];if(x(nt)==="object"&&nt!==null){if(!te(Ye,nt,De,Ve))return!1}else if(!De&&!Le.has(nt)&&!te(Ye,nt,De,Ve))return!1}return Ye.size===0}return!0}function Se(Le,Te,De,Ve,Ye,Ne){for(var Xe=y(Le),ht=0;ht<Xe.length;ht++){var st=Xe[ht];if(Q(De,st,Ye,Ne)&&Q(Ve,Te.get(st),Ye,Ne))return Le.delete(st),!0}return!1}function Re(Le,Te,De,Ve){for(var Ye=null,Ne=r(Le),Xe=0;Xe<Ne.length;Xe++){var ht=d(Ne[Xe],2),st=ht[0],it=ht[1];if(x(st)==="object"&&st!==null)Ye===null&&(Ye=new Set),Ye.add(st);else{var nt=Te.get(st);if(nt===void 0&&!Te.has(st)||!Q(it,nt,De,Ve)){if(De||!le(Le,Te,st,it,Ve))return!1;Ye===null&&(Ye=new Set),Ye.add(st)}}}if(Ye!==null){for(var pt=r(Te),Tt=0;Tt<pt.length;Tt++){var Et=d(pt[Tt],2),st=Et[0],Dt=Et[1];if(x(st)==="object"&&st!==null){if(!Se(Ye,Le,st,Dt,De,Ve))return!1}else if(!De&&(!Le.has(st)||!Q(Le.get(st),Dt,!1,Ve))&&!Se(Ye,Le,st,Dt,!1,Ve))return!1}return Ye.size===0}return!0}function Ee(Le,Te,De,Ve,Ye,Ne){var Xe=0;if(Ne===re){if(!xe(Le,Te,De,Ye))return!1}else if(Ne===ie){if(!Re(Le,Te,De,Ye))return!1}else if(Ne===ee)for(;Xe<Le.length;Xe++)if(g(Le,Xe)){if(!g(Te,Xe)||!Q(Le[Xe],Te[Xe],De,Ye))return!1}else{if(g(Te,Xe))return!1;for(var ht=Object.keys(Le);Xe<ht.length;Xe++){var st=ht[Xe];if(!g(Te,st)||!Q(Le[st],Te[st],De,Ye))return!1}return ht.length===Object.keys(Te).length}for(Xe=0;Xe<Ve.length;Xe++){var it=Ve[Xe];if(!Q(Le[it],Te[it],De,Ye))return!1}return!0}function Oe(Le,Te){return Q(Le,Te,U)}function Be(Le,Te){return Q(Le,Te,G)}z.exports={isDeepEqual:Oe,isDeepStrictEqual:Be}},95341:function(z,B){B.byteLength=y,B.toByteArray=n,B.fromByteArray=f;for(var e=[],d=[],P=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_=0,x=a.length;_<x;++_)e[_]=a[_],d[a.charCodeAt(_)]=_;d["-".charCodeAt(0)]=62,d["_".charCodeAt(0)]=63;function v(g){var h=g.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var b=g.indexOf("=");b===-1&&(b=h);var p=b===h?0:4-b%4;return[b,p]}function y(g){var h=v(g),b=h[0],p=h[1];return(b+p)*3/4-p}function r(g,h,b){return(h+b)*3/4-b}function n(g){var h,b=v(g),p=b[0],E=b[1],c=new P(r(g,p,E)),l=0,m=E>0?p-4:p,M;for(M=0;M<m;M+=4)h=d[g.charCodeAt(M)]<<18|d[g.charCodeAt(M+1)]<<12|d[g.charCodeAt(M+2)]<<6|d[g.charCodeAt(M+3)],c[l++]=h>>16&255,c[l++]=h>>8&255,c[l++]=h&255;return E===2&&(h=d[g.charCodeAt(M)]<<2|d[g.charCodeAt(M+1)]>>4,c[l++]=h&255),E===1&&(h=d[g.charCodeAt(M)]<<10|d[g.charCodeAt(M+1)]<<4|d[g.charCodeAt(M+2)]>>2,c[l++]=h>>8&255,c[l++]=h&255),c}function u(g){return e[g>>18&63]+e[g>>12&63]+e[g>>6&63]+e[g&63]}function i(g,h,b){for(var p,E=[],c=h;c<b;c+=3)p=(g[c]<<16&16711680)+(g[c+1]<<8&65280)+(g[c+2]&255),E.push(u(p));return E.join("")}function f(g){for(var h,b=g.length,p=b%3,E=[],c=16383,l=0,m=b-p;l<m;l+=c)E.push(i(g,l,l+c>m?m:l+c));return p===1?(h=g[b-1],E.push(e[h>>2]+e[h<<4&63]+"==")):p===2&&(h=(g[b-2]<<8)+g[b-1],E.push(e[h>>10]+e[h>>4&63]+e[h<<2&63]+"=")),E.join("")}},91358:function(z){function B(x,v,y,r,n){for(var u=n+1;r<=n;){var i=r+n>>>1,f=x[i],g=y!==void 0?y(f,v):f-v;g>=0?(u=i,n=i-1):r=i+1}return u}function e(x,v,y,r,n){for(var u=n+1;r<=n;){var i=r+n>>>1,f=x[i],g=y!==void 0?y(f,v):f-v;g>0?(u=i,n=i-1):r=i+1}return u}function d(x,v,y,r,n){for(var u=r-1;r<=n;){var i=r+n>>>1,f=x[i],g=y!==void 0?y(f,v):f-v;g<0?(u=i,r=i+1):n=i-1}return u}function P(x,v,y,r,n){for(var u=r-1;r<=n;){var i=r+n>>>1,f=x[i],g=y!==void 0?y(f,v):f-v;g<=0?(u=i,r=i+1):n=i-1}return u}function a(x,v,y,r,n){for(;r<=n;){var u=r+n>>>1,i=x[u],f=y!==void 0?y(i,v):i-v;if(f===0)return u;f<=0?r=u+1:n=u-1}return-1}function _(x,v,y,r,n,u){return typeof y=="function"?u(x,v,y,r===void 0?0:r|0,n===void 0?x.length-1:n|0):u(x,v,void 0,y===void 0?0:y|0,r===void 0?x.length-1:r|0)}z.exports={ge:function(x,v,y,r,n){return _(x,v,y,r,n,B)},gt:function(x,v,y,r,n){return _(x,v,y,r,n,e)},lt:function(x,v,y,r,n){return _(x,v,y,r,n,d)},le:function(x,v,y,r,n){return _(x,v,y,r,n,P)},eq:function(x,v,y,r,n){return _(x,v,y,r,n,a)}}},13547:function(z,B){var e=32;B.INT_BITS=e,B.INT_MAX=2147483647,B.INT_MIN=-1<<e-1,B.sign=function(a){return(a>0)-(a<0)},B.abs=function(a){var _=a>>e-1;return(a^_)-_},B.min=function(a,_){return _^(a^_)&-(a<_)},B.max=function(a,_){return a^(a^_)&-(a<_)},B.isPow2=function(a){return!(a&a-1)&&!!a},B.log2=function(a){var _,x;return _=(a>65535)<<4,a>>>=_,x=(a>255)<<3,a>>>=x,_|=x,x=(a>15)<<2,a>>>=x,_|=x,x=(a>3)<<1,a>>>=x,_|=x,_|a>>1},B.log10=function(a){return a>=1e9?9:a>=1e8?8:a>=1e7?7:a>=1e6?6:a>=1e5?5:a>=1e4?4:a>=1e3?3:a>=100?2:a>=10?1:0},B.popCount=function(a){return a=a-(a>>>1&1431655765),a=(a&858993459)+(a>>>2&858993459),(a+(a>>>4)&252645135)*16843009>>>24};function d(a){var _=32;return a&=-a,a&&_--,a&65535&&(_-=16),a&16711935&&(_-=8),a&252645135&&(_-=4),a&858993459&&(_-=2),a&1431655765&&(_-=1),_}B.countTrailingZeros=d,B.nextPow2=function(a){return a+=a===0,--a,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a+1},B.prevPow2=function(a){return a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a-(a>>>1)},B.parity=function(a){return a^=a>>>16,a^=a>>>8,a^=a>>>4,a&=15,27030>>>a&1};var P=new Array(256);(function(a){for(var _=0;_<256;++_){var x=_,v=_,y=7;for(x>>>=1;x;x>>>=1)v<<=1,v|=x&1,--y;a[_]=v<<y&255}})(P),B.reverse=function(a){return P[a&255]<<24|P[a>>>8&255]<<16|P[a>>>16&255]<<8|P[a>>>24&255]},B.interleave2=function(a,_){return a&=65535,a=(a|a<<8)&16711935,a=(a|a<<4)&252645135,a=(a|a<<2)&858993459,a=(a|a<<1)&1431655765,_&=65535,_=(_|_<<8)&16711935,_=(_|_<<4)&252645135,_=(_|_<<2)&858993459,_=(_|_<<1)&1431655765,a|_<<1},B.deinterleave2=function(a,_){return a=a>>>_&1431655765,a=(a|a>>>1)&858993459,a=(a|a>>>2)&252645135,a=(a|a>>>4)&16711935,a=(a|a>>>16)&65535,a<<16>>16},B.interleave3=function(a,_,x){return a&=1023,a=(a|a<<16)&4278190335,a=(a|a<<8)&251719695,a=(a|a<<4)&3272356035,a=(a|a<<2)&1227133513,_&=1023,_=(_|_<<16)&4278190335,_=(_|_<<8)&251719695,_=(_|_<<4)&3272356035,_=(_|_<<2)&1227133513,a|=_<<1,x&=1023,x=(x|x<<16)&4278190335,x=(x|x<<8)&251719695,x=(x|x<<4)&3272356035,x=(x|x<<2)&1227133513,a|x<<2},B.deinterleave3=function(a,_){return a=a>>>_&1227133513,a=(a|a>>>2)&3272356035,a=(a|a>>>4)&251719695,a=(a|a>>>8)&4278190335,a=(a|a>>>16)&1023,a<<22>>22},B.nextCombination=function(a){var _=a|a-1;return _+1|(~_&-~_)-1>>>d(a)+1}},44781:function(z,B,e){var d=e(53435);z.exports=a;var P=1e20;function a(v,y){y||(y={});var r=y.cutoff==null?.25:y.cutoff,n=y.radius==null?8:y.radius,u=y.channel||0,i,f,g,h,b,p,E,c,l,m,M;if(ArrayBuffer.isView(v)||Array.isArray(v)){if(!y.width||!y.height)throw Error("For raw data width and height should be provided by options");i=y.width,f=y.height,h=v,y.stride?p=y.stride:p=Math.floor(v.length/i/f)}else window.HTMLCanvasElement&&v instanceof window.HTMLCanvasElement?(c=v,E=c.getContext("2d"),i=c.width,f=c.height,l=E.getImageData(0,0,i,f),h=l.data,p=4):window.CanvasRenderingContext2D&&v instanceof window.CanvasRenderingContext2D?(c=v.canvas,E=v,i=c.width,f=c.height,l=E.getImageData(0,0,i,f),h=l.data,p=4):window.ImageData&&v instanceof window.ImageData&&(l=v,i=v.width,f=v.height,h=l.data,p=4);if(g=Math.max(i,f),window.Uint8ClampedArray&&h instanceof window.Uint8ClampedArray||window.Uint8Array&&h instanceof window.Uint8Array)for(b=h,h=Array(i*f),m=0,M=b.length;m<M;m++)h[m]=b[m*p+u]/255;else if(p!==1)throw Error("Raw data can have only 1 value per pixel");var L=Array(i*f),D=Array(i*f),A=Array(g),C=Array(g),S=Array(g+1),o=Array(g);for(m=0,M=i*f;m<M;m++){var R=h[m];L[m]=R===1?0:R===0?P:Math.pow(Math.max(0,.5-R),2),D[m]=R===1?P:R===0?0:Math.pow(Math.max(0,R-.5),2)}_(L,i,f,A,C,o,S),_(D,i,f,A,C,o,S);var T=window.Float32Array?new Float32Array(i*f):new Array(i*f);for(m=0,M=i*f;m<M;m++)T[m]=d(1-((L[m]-D[m])/n+r),0,1);return T}function _(v,y,r,n,u,i,f){for(var g=0;g<y;g++){for(var h=0;h<r;h++)n[h]=v[h*y+g];for(x(n,u,i,f,r),h=0;h<r;h++)v[h*y+g]=u[h]}for(h=0;h<r;h++){for(g=0;g<y;g++)n[g]=v[h*y+g];for(x(n,u,i,f,y),g=0;g<y;g++)v[h*y+g]=Math.sqrt(u[g])}}function x(v,y,r,n,u){r[0]=0,n[0]=-P,n[1]=+P;for(var i=1,f=0;i<u;i++){for(var g=(v[i]+i*i-(v[r[f]]+r[f]*r[f]))/(2*i-2*r[f]);g<=n[f];)f--,g=(v[i]+i*i-(v[r[f]]+r[f]*r[f]))/(2*i-2*r[f]);f++,r[f]=i,n[f]=g,n[f+1]=+P}for(i=0,f=0;i<u;i++){for(;n[f+1]<i;)f++;y[i]=(i-r[f])*(i-r[f])+v[r[f]]}}},68222:function(z,B,e){var d=e(77575),P=e(68318),a=P("%Function.prototype.apply%"),_=P("%Function.prototype.call%"),x=P("%Reflect.apply%",!0)||d.call(_,a),v=P("%Object.defineProperty%",!0);if(v)try{v({},"a",{value:1})}catch{v=null}z.exports=function(){return x(d,_,arguments)};var y=function(){return x(d,a,arguments)};v?v(z.exports,"apply",{value:y}):z.exports.apply=y},53435:function(z){z.exports=B;function B(e,d,P){return d<P?e<d?d:e>P?P:e:e<P?P:e>d?d:e}},6475:function(z,B,e){var d=e(53435);z.exports=P,z.exports.to=P,z.exports.from=a;function P(_,x){x==null&&(x=!0);var v=_[0],y=_[1],r=_[2],n=_[3];n==null&&(n=x?1:255),x&&(v*=255,y*=255,r*=255,n*=255),v=d(v,0,255)&255,y=d(y,0,255)&255,r=d(r,0,255)&255,n=d(n,0,255)&255;var u=v*16777216+(y<<16)+(r<<8)+n;return u}function a(_,x){_=+_;var v=_>>>24,y=(_&16711680)>>>16,r=(_&65280)>>>8,n=_&255;return x===!1?[v,y,r,n]:[v/255,y/255,r/255,n/255]}},76857:function(z){z.exports={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]}},25075:function(z,B,e){var d=e(36652),P=e(53435),a=e(90660);z.exports=function(v,y){(y==="float"||!y)&&(y="array"),y==="uint"&&(y="uint8"),y==="uint_clamped"&&(y="uint8_clamped");var r=a(y),n=new r(4),u=y!=="uint8"&&y!=="uint8_clamped";return(!v.length||typeof v=="string")&&(v=d(v),v[0]/=255,v[1]/=255,v[2]/=255),_(v)?(n[0]=v[0],n[1]=v[1],n[2]=v[2],n[3]=v[3]!=null?v[3]:255,u&&(n[0]/=255,n[1]/=255,n[2]/=255,n[3]/=255),n):(u?(n[0]=v[0],n[1]=v[1],n[2]=v[2],n[3]=v[3]!=null?v[3]:1):(n[0]=P(Math.floor(v[0]*255),0,255),n[1]=P(Math.floor(v[1]*255),0,255),n[2]=P(Math.floor(v[2]*255),0,255),n[3]=v[3]==null?255:P(Math.floor(v[3]*255),0,255)),n)};function _(x){return!!(x instanceof Uint8Array||x instanceof Uint8ClampedArray||Array.isArray(x)&&(x[0]>1||x[0]===0)&&(x[1]>1||x[1]===0)&&(x[2]>1||x[2]===0)&&(!x[3]||x[3]>1))}},90736:function(z,B,e){var d=e(76857),P=e(10973),a=e(46775);z.exports=x;var _={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function x(v){var y,r=[],n=1,u;if(typeof v=="string")if(d[v])r=d[v].slice(),u="rgb";else if(v==="transparent")n=0,u="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(v)){var i=v.slice(1),f=i.length,g=f<=4;n=1,g?(r=[parseInt(i[0]+i[0],16),parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16)],f===4&&(n=parseInt(i[3]+i[3],16)/255)):(r=[parseInt(i[0]+i[1],16),parseInt(i[2]+i[3],16),parseInt(i[4]+i[5],16)],f===8&&(n=parseInt(i[6]+i[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),u="rgb"}else if(y=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(v)){var h=y[1],b=h==="rgb",i=h.replace(/a$/,"");u=i;var f=i==="cmyk"?4:i==="gray"?1:3;r=y[2].trim().split(/\s*,\s*/).map(function(l,m){if(/%$/.test(l))return m===f?parseFloat(l)/100:i==="rgb"?parseFloat(l)*255/100:parseFloat(l);if(i[m]==="h"){if(/deg$/.test(l))return parseFloat(l);if(_[l]!==void 0)return _[l]}return parseFloat(l)}),h===i&&r.push(1),n=b||r[f]===void 0?1:r[f],r=r.slice(0,f)}else v.length>10&&/[0-9](?:\s|\/)/.test(v)&&(r=v.match(/([0-9]+)/g).map(function(E){return parseFloat(E)}),u=v.match(/([a-z])/ig).join("").toLowerCase());else if(!isNaN(v))u="rgb",r=[v>>>16,(v&65280)>>>8,v&255];else if(P(v)){var p=a(v.r,v.red,v.R,null);p!==null?(u="rgb",r=[p,a(v.g,v.green,v.G),a(v.b,v.blue,v.B)]):(u="hsl",r=[a(v.h,v.hue,v.H),a(v.s,v.saturation,v.S),a(v.l,v.lightness,v.L,v.b,v.brightness)]),n=a(v.a,v.alpha,v.opacity,1),v.opacity!=null&&(n/=100)}else(Array.isArray(v)||e.g.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(v))&&(r=[v[0],v[1],v[2]],u="rgb",n=v.length===4?v[3]:1);return{space:u,values:r,alpha:n}}},36652:function(z,B,e){var d=e(90736),P=e(80009),a=e(53435);z.exports=function(x){var v,y=d(x);return y.space?(v=Array(3),v[0]=a(y.values[0],0,255),v[1]=a(y.values[1],0,255),v[2]=a(y.values[2],0,255),y.space[0]==="h"&&(v=P.rgb(v)),v.push(a(y.alpha,0,1)),v):[]}},80009:function(z,B,e){var d=e(6866);z.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(P){var a=P[0]/360,_=P[1]/100,x=P[2]/100,v,y,r,n,u;if(_===0)return u=x*255,[u,u,u];x<.5?y=x*(1+_):y=x+_-x*_,v=2*x-y,n=[0,0,0];for(var i=0;i<3;i++)r=a+.3333333333333333*-(i-1),r<0?r++:r>1&&r--,6*r<1?u=v+(y-v)*6*r:2*r<1?u=y:3*r<2?u=v+(y-v)*(.6666666666666666-r)*6:u=v,n[i]=u*255;return n}},d.hsl=function(P){var a=P[0]/255,_=P[1]/255,x=P[2]/255,v=Math.min(a,_,x),y=Math.max(a,_,x),r=y-v,n,u,i;return y===v?n=0:a===y?n=(_-x)/r:_===y?n=2+(x-a)/r:x===y&&(n=4+(a-_)/r),n=Math.min(n*60,360),n<0&&(n+=360),i=(v+y)/2,y===v?u=0:i<=.5?u=r/(y+v):u=r/(2-y-v),[n,u*100,i*100]}},6866:function(z){z.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},24138:function(z){z.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|ç)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|é)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|é)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|ã)o.?tom(e|é)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},72791:function(z,B,e){z.exports={parse:e(41004),stringify:e(53313)}},63625:function(z,B,e){var d=e(40402);z.exports={isSize:function(a){return/^[\d\.]/.test(a)||a.indexOf("/")!==-1||d.indexOf(a)!==-1}}},41004:function(z,B,e){var d=e(90448),P=e(38732),a=e(41901),_=e(15659),x=e(96209),v=e(83794),y=e(99011),r=e(63625).isSize;z.exports=u;var n=u.cache={};function u(f){if(typeof f!="string")throw new Error("Font argument must be a string.");if(n[f])return n[f];if(f==="")throw new Error("Cannot parse an empty string.");if(a.indexOf(f)!==-1)return n[f]={system:f};for(var g={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},h=y(f,/\s+/),b;b=h.shift();){if(P.indexOf(b)!==-1)return["style","variant","weight","stretch"].forEach(function(E){g[E]=b}),n[f]=g;if(x.indexOf(b)!==-1){g.style=b;continue}if(b==="normal"||b==="small-caps"){g.variant=b;continue}if(v.indexOf(b)!==-1){g.stretch=b;continue}if(_.indexOf(b)!==-1){g.weight=b;continue}if(r(b)){var p=y(b,"/");if(g.size=p[0],p[1]!=null?g.lineHeight=i(p[1]):h[0]==="/"&&(h.shift(),g.lineHeight=i(h.shift())),!h.length)throw new Error("Missing required font-family.");return g.family=y(h.join(" "),/\s*,\s*/).map(d),n[f]=g}throw new Error("Unknown or unsupported font token: "+b)}throw new Error("Missing required font-size.")}function i(f){var g=parseFloat(f);return g.toString()===f?g:f}},53313:function(z,B,e){var d=e(71299),P=e(63625).isSize,a=f(e(38732)),_=f(e(41901)),x=f(e(15659)),v=f(e(96209)),y=f(e(83794)),r={normal:1,"small-caps":1},n={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},u={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};z.exports=function(h){if(h=d(h,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"}),h.system)return h.system&&i(h.system,_),h.system;if(i(h.style,v),i(h.variant,r),i(h.weight,x),i(h.stretch,y),h.size==null&&(h.size=u.size),typeof h.size=="number"&&(h.size+="px"),!P)throw Error("Bad size value `"+h.size+"`");h.family||(h.family=u.family),Array.isArray(h.family)&&(h.family.length||(h.family=[u.family]),h.family=h.family.map(function(p){return n[p]?p:'"'+p+'"'}).join(", "));var b=[];return b.push(h.style),h.variant!==h.style&&b.push(h.variant),h.weight!==h.variant&&h.weight!==h.style&&b.push(h.weight),h.stretch!==h.weight&&h.stretch!==h.variant&&h.stretch!==h.style&&b.push(h.stretch),b.push(h.size+(h.lineHeight==null||h.lineHeight==="normal"||h.lineHeight+""=="1"?"":"/"+h.lineHeight)),b.push(h.family),b.filter(Boolean).join(" ")};function i(g,h){if(g&&!h[g]&&!a[g])throw Error("Unknown keyword `"+g+"`");return g}function f(g){for(var h={},b=0;b<g.length;b++)h[g[b]]=1;return h}},55174:function(z,B,e){var d=e(24582),P=e(10424),a=e(82527),_=e(19012),x=e(21780),v=e(16906),y=Function.prototype.bind,r=Object.defineProperty,n=Object.prototype.hasOwnProperty,u;u=function(i,f,g){var h=P(f)&&a(f.value),b;return b=_(f),delete b.writable,delete b.value,b.get=function(){return!g.overwriteDefinition&&n.call(this,i)?h:(f.value=y.call(h,g.resolveContext?g.resolveContext(this):this),r(this,i,f),this[i])},b},z.exports=function(i){var f=x(arguments[1]);return d(f.resolveContext)&&a(f.resolveContext),v(i,function(g,h){return u(h,g,f)})}},62072:function(z,B,e){var d=e(24582),P=e(84985),a=e(95879),_=e(21780),x=e(66741),v=z.exports=function(y,r){var n,u,i,f,g;return arguments.length<2||typeof y!="string"?(f=r,r=y,y=null):f=arguments[2],d(y)?(n=x.call(y,"c"),u=x.call(y,"e"),i=x.call(y,"w")):(n=i=!0,u=!1),g={value:r,configurable:n,enumerable:u,writable:i},f?a(_(f),g):g};v.gs=function(y,r,n){var u,i,f,g;return typeof y!="string"?(f=n,n=r,r=y,y=null):f=arguments[3],d(r)?P(r)?d(n)?P(n)||(f=n,n=void 0):n=void 0:(f=r,r=n=void 0):r=void 0,d(y)?(u=x.call(y,"c"),i=x.call(y,"e")):(u=!0,i=!1),g={get:r,set:n,configurable:u,enumerable:i},f?a(_(f),g):g}},33064:function(z,B,e){e.d(B,{j2:function(){return d},Fp:function(){return _},J6:function(){return v},TS:function(){return y},VV:function(){return r},w6:function(){return n},Sm:function(){return u}});function d(i,f){return i<f?-1:i>f?1:i>=f?0:NaN}function P(i){return i.length===1&&(i=a(i)),{left:function(f,g,h,b){for(h==null&&(h=0),b==null&&(b=f.length);h<b;){var p=h+b>>>1;i(f[p],g)<0?h=p+1:b=p}return h},right:function(f,g,h,b){for(h==null&&(h=0),b==null&&(b=f.length);h<b;){var p=h+b>>>1;i(f[p],g)>0?b=p:h=p+1}return h}}}function a(i){return function(f,g){return d(i(f),g)}}P(d);function _(i,f){var g=i.length,h=-1,b,p;if(f==null){for(;++h<g;)if((b=i[h])!=null&&b>=b)for(p=b;++h<g;)(b=i[h])!=null&&b>p&&(p=b)}else for(;++h<g;)if((b=f(i[h],h,i))!=null&&b>=b)for(p=b;++h<g;)(b=f(i[h],h,i))!=null&&b>p&&(p=b);return p}function x(i){return i===null?NaN:+i}function v(i,f){var g=i.length,h=g,b=-1,p,E=0;if(f==null)for(;++b<g;)isNaN(p=x(i[b]))?--h:E+=p;else for(;++b<g;)isNaN(p=x(f(i[b],b,i)))?--h:E+=p;if(h)return E/h}function y(i){for(var f=i.length,g,h=-1,b=0,p,E;++h<f;)b+=i[h].length;for(p=new Array(b);--f>=0;)for(E=i[f],g=E.length;--g>=0;)p[--b]=E[g];return p}function r(i,f){var g=i.length,h=-1,b,p;if(f==null){for(;++h<g;)if((b=i[h])!=null&&b>=b)for(p=b;++h<g;)(b=i[h])!=null&&p>b&&(p=b)}else for(;++h<g;)if((b=f(i[h],h,i))!=null&&b>=b)for(p=b;++h<g;)(b=f(i[h],h,i))!=null&&p>b&&(p=b);return p}function n(i,f,g){i=+i,f=+f,g=(b=arguments.length)<2?(f=i,i=0,1):b<3?1:+g;for(var h=-1,b=Math.max(0,Math.ceil((f-i)/g))|0,p=new Array(b);++h<b;)p[h]=i+h*g;return p}function u(i,f){var g=i.length,h=-1,b,p=0;if(f==null)for(;++h<g;)(b=+i[h])&&(p+=b);else for(;++h<g;)(b=+f(i[h],h,i))&&(p+=b);return p}},15140:function(z,B,e){e.d(B,{UI:function(){return _},b1:function(){return x}});var d="$";function P(){}P.prototype=a.prototype={constructor:P,has:function(f){return d+f in this},get:function(f){return this[d+f]},set:function(f,g){return this[d+f]=g,this},remove:function(f){var g=d+f;return g in this&&delete this[g]},clear:function(){for(var f in this)f[0]===d&&delete this[f]},keys:function(){var f=[];for(var g in this)g[0]===d&&f.push(g.slice(1));return f},values:function(){var f=[];for(var g in this)g[0]===d&&f.push(this[g]);return f},entries:function(){var f=[];for(var g in this)g[0]===d&&f.push({key:g.slice(1),value:this[g]});return f},size:function(){var f=0;for(var g in this)g[0]===d&&++f;return f},empty:function(){for(var f in this)if(f[0]===d)return!1;return!0},each:function(f){for(var g in this)g[0]===d&&f(this[g],g.slice(1),this)}};function a(f,g){var h=new P;if(f instanceof P)f.each(function(l,m){h.set(m,l)});else if(Array.isArray(f)){var b=-1,p=f.length,E;if(g==null)for(;++b<p;)h.set(b,f[b]);else for(;++b<p;)h.set(g(E=f[b],b,f),E)}else if(f)for(var c in f)h.set(c,f[c]);return h}var _=a;function x(){var f=[],g=[],h,b,p;function E(l,m,M,L){if(m>=f.length)return h!=null&&l.sort(h),b!=null?b(l):l;for(var D=-1,A=l.length,C=f[m++],S,o,R=_(),T,O=M();++D<A;)(T=R.get(S=C(o=l[D])+""))?T.push(o):R.set(S,[o]);return R.each(function(N,H){L(O,H,E(N,m,M,L))}),O}function c(l,m){if(++m>f.length)return l;var M,L=g[m-1];return b!=null&&m>=f.length?M=l.entries():(M=[],l.each(function(D,A){M.push({key:A,values:c(D,m)})})),L!=null?M.sort(function(D,A){return L(D.key,A.key)}):M}return p={object:function(l){return E(l,0,v,y)},map:function(l){return E(l,0,r,n)},entries:function(l){return c(E(l,0,r,n),0)},key:function(l){return f.push(l),p},sortKeys:function(l){return g[f.length-1]=l,p},sortValues:function(l){return h=l,p},rollup:function(l){return b=l,p}}}function v(){return{}}function y(f,g,h){f[g]=h}function r(){return _()}function n(f,g,h){f.set(g,h)}function u(){}var i=_.prototype;u.prototype={constructor:u,has:i.has,add:function(f){return f+="",this[d+f]=f,this},remove:i.remove,clear:i.clear,values:i.keys,size:i.size,empty:i.empty,each:i.each}},49887:function(z,B,e){e.r(B),e.d(B,{forceCenter:function(){return d},forceCollide:function(){return R},forceLink:function(){return H},forceManyBody:function(){return Xe},forceRadial:function(){return ht},forceSimulation:function(){return Ne},forceX:function(){return st},forceY:function(){return it}});function d(nt,pt){var Tt;nt==null&&(nt=0),pt==null&&(pt=0);function Et(){var Dt,et=Tt.length,Ue,ze=0,rt=0;for(Dt=0;Dt<et;++Dt)Ue=Tt[Dt],ze+=Ue.x,rt+=Ue.y;for(ze=ze/et-nt,rt=rt/et-pt,Dt=0;Dt<et;++Dt)Ue=Tt[Dt],Ue.x-=ze,Ue.y-=rt}return Et.initialize=function(Dt){Tt=Dt},Et.x=function(Dt){return arguments.length?(nt=+Dt,Et):nt},Et.y=function(Dt){return arguments.length?(pt=+Dt,Et):pt},Et}function P(nt){return function(){return nt}}function a(){return(Math.random()-.5)*1e-6}function _(nt){var pt=+this._x.call(null,nt),Tt=+this._y.call(null,nt);return x(this.cover(pt,Tt),pt,Tt,nt)}function x(nt,pt,Tt,Et){if(isNaN(pt)||isNaN(Tt))return nt;var Dt,et=nt._root,Ue={data:Et},ze=nt._x0,rt=nt._y0,lt=nt._x1,Qe=nt._y1,Fe,Ce,pe,we,Ae,Pe,Ge,We;if(!et)return nt._root=Ue,nt;for(;et.length;)if((Ae=pt>=(Fe=(ze+lt)/2))?ze=Fe:lt=Fe,(Pe=Tt>=(Ce=(rt+Qe)/2))?rt=Ce:Qe=Ce,Dt=et,!(et=et[Ge=Pe<<1|Ae]))return Dt[Ge]=Ue,nt;if(pe=+nt._x.call(null,et.data),we=+nt._y.call(null,et.data),pt===pe&&Tt===we)return Ue.next=et,Dt?Dt[Ge]=Ue:nt._root=Ue,nt;do Dt=Dt?Dt[Ge]=new Array(4):nt._root=new Array(4),(Ae=pt>=(Fe=(ze+lt)/2))?ze=Fe:lt=Fe,(Pe=Tt>=(Ce=(rt+Qe)/2))?rt=Ce:Qe=Ce;while((Ge=Pe<<1|Ae)===(We=(we>=Ce)<<1|pe>=Fe));return Dt[We]=et,Dt[Ge]=Ue,nt}function v(nt){var pt,Tt,Et=nt.length,Dt,et,Ue=new Array(Et),ze=new Array(Et),rt=1/0,lt=1/0,Qe=-1/0,Fe=-1/0;for(Tt=0;Tt<Et;++Tt)isNaN(Dt=+this._x.call(null,pt=nt[Tt]))||isNaN(et=+this._y.call(null,pt))||(Ue[Tt]=Dt,ze[Tt]=et,Dt<rt&&(rt=Dt),Dt>Qe&&(Qe=Dt),et<lt&&(lt=et),et>Fe&&(Fe=et));if(rt>Qe||lt>Fe)return this;for(this.cover(rt,lt).cover(Qe,Fe),Tt=0;Tt<Et;++Tt)x(this,Ue[Tt],ze[Tt],nt[Tt]);return this}function y(nt,pt){if(isNaN(nt=+nt)||isNaN(pt=+pt))return this;var Tt=this._x0,Et=this._y0,Dt=this._x1,et=this._y1;if(isNaN(Tt))Dt=(Tt=Math.floor(nt))+1,et=(Et=Math.floor(pt))+1;else{for(var Ue=Dt-Tt,ze=this._root,rt,lt;Tt>nt||nt>=Dt||Et>pt||pt>=et;)switch(lt=(pt<Et)<<1|nt<Tt,rt=new Array(4),rt[lt]=ze,ze=rt,Ue*=2,lt){case 0:Dt=Tt+Ue,et=Et+Ue;break;case 1:Tt=Dt-Ue,et=Et+Ue;break;case 2:Dt=Tt+Ue,Et=et-Ue;break;case 3:Tt=Dt-Ue,Et=et-Ue;break}this._root&&this._root.length&&(this._root=ze)}return this._x0=Tt,this._y0=Et,this._x1=Dt,this._y1=et,this}function r(){var nt=[];return this.visit(function(pt){if(!pt.length)do nt.push(pt.data);while(pt=pt.next)}),nt}function n(nt){return arguments.length?this.cover(+nt[0][0],+nt[0][1]).cover(+nt[1][0],+nt[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function u(nt,pt,Tt,Et,Dt){this.node=nt,this.x0=pt,this.y0=Tt,this.x1=Et,this.y1=Dt}function i(nt,pt,Tt){var Et,Dt=this._x0,et=this._y0,Ue,ze,rt,lt,Qe=this._x1,Fe=this._y1,Ce=[],pe=this._root,we,Ae;for(pe&&Ce.push(new u(pe,Dt,et,Qe,Fe)),Tt==null?Tt=1/0:(Dt=nt-Tt,et=pt-Tt,Qe=nt+Tt,Fe=pt+Tt,Tt*=Tt);we=Ce.pop();)if(!(!(pe=we.node)||(Ue=we.x0)>Qe||(ze=we.y0)>Fe||(rt=we.x1)<Dt||(lt=we.y1)<et))if(pe.length){var Pe=(Ue+rt)/2,Ge=(ze+lt)/2;Ce.push(new u(pe[3],Pe,Ge,rt,lt),new u(pe[2],Ue,Ge,Pe,lt),new u(pe[1],Pe,ze,rt,Ge),new u(pe[0],Ue,ze,Pe,Ge)),(Ae=(pt>=Ge)<<1|nt>=Pe)&&(we=Ce[Ce.length-1],Ce[Ce.length-1]=Ce[Ce.length-1-Ae],Ce[Ce.length-1-Ae]=we)}else{var We=nt-+this._x.call(null,pe.data),tt=pt-+this._y.call(null,pe.data),ct=We*We+tt*tt;if(ct<Tt){var St=Math.sqrt(Tt=ct);Dt=nt-St,et=pt-St,Qe=nt+St,Fe=pt+St,Et=pe.data}}return Et}function f(nt){if(isNaN(Qe=+this._x.call(null,nt))||isNaN(Fe=+this._y.call(null,nt)))return this;var pt,Tt=this._root,Et,Dt,et,Ue=this._x0,ze=this._y0,rt=this._x1,lt=this._y1,Qe,Fe,Ce,pe,we,Ae,Pe,Ge;if(!Tt)return this;if(Tt.length)for(;;){if((we=Qe>=(Ce=(Ue+rt)/2))?Ue=Ce:rt=Ce,(Ae=Fe>=(pe=(ze+lt)/2))?ze=pe:lt=pe,pt=Tt,!(Tt=Tt[Pe=Ae<<1|we]))return this;if(!Tt.length)break;(pt[Pe+1&3]||pt[Pe+2&3]||pt[Pe+3&3])&&(Et=pt,Ge=Pe)}for(;Tt.data!==nt;)if(Dt=Tt,!(Tt=Tt.next))return this;return(et=Tt.next)&&delete Tt.next,Dt?(et?Dt.next=et:delete Dt.next,this):pt?(et?pt[Pe]=et:delete pt[Pe],(Tt=pt[0]||pt[1]||pt[2]||pt[3])&&Tt===(pt[3]||pt[2]||pt[1]||pt[0])&&!Tt.length&&(Et?Et[Ge]=Tt:this._root=Tt),this):(this._root=et,this)}function g(nt){for(var pt=0,Tt=nt.length;pt<Tt;++pt)this.remove(nt[pt]);return this}function h(){return this._root}function b(){var nt=0;return this.visit(function(pt){if(!pt.length)do++nt;while(pt=pt.next)}),nt}function p(nt){var pt=[],Tt,Et=this._root,Dt,et,Ue,ze,rt;for(Et&&pt.push(new u(Et,this._x0,this._y0,this._x1,this._y1));Tt=pt.pop();)if(!nt(Et=Tt.node,et=Tt.x0,Ue=Tt.y0,ze=Tt.x1,rt=Tt.y1)&&Et.length){var lt=(et+ze)/2,Qe=(Ue+rt)/2;(Dt=Et[3])&&pt.push(new u(Dt,lt,Qe,ze,rt)),(Dt=Et[2])&&pt.push(new u(Dt,et,Qe,lt,rt)),(Dt=Et[1])&&pt.push(new u(Dt,lt,Ue,ze,Qe)),(Dt=Et[0])&&pt.push(new u(Dt,et,Ue,lt,Qe))}return this}function E(nt){var pt=[],Tt=[],Et;for(this._root&&pt.push(new u(this._root,this._x0,this._y0,this._x1,this._y1));Et=pt.pop();){var Dt=Et.node;if(Dt.length){var et,Ue=Et.x0,ze=Et.y0,rt=Et.x1,lt=Et.y1,Qe=(Ue+rt)/2,Fe=(ze+lt)/2;(et=Dt[0])&&pt.push(new u(et,Ue,ze,Qe,Fe)),(et=Dt[1])&&pt.push(new u(et,Qe,ze,rt,Fe)),(et=Dt[2])&&pt.push(new u(et,Ue,Fe,Qe,lt)),(et=Dt[3])&&pt.push(new u(et,Qe,Fe,rt,lt))}Tt.push(Et)}for(;Et=Tt.pop();)nt(Et.node,Et.x0,Et.y0,Et.x1,Et.y1);return this}function c(nt){return nt[0]}function l(nt){return arguments.length?(this._x=nt,this):this._x}function m(nt){return nt[1]}function M(nt){return arguments.length?(this._y=nt,this):this._y}function L(nt,pt,Tt){var Et=new D(pt??c,Tt??m,NaN,NaN,NaN,NaN);return nt==null?Et:Et.addAll(nt)}function D(nt,pt,Tt,Et,Dt,et){this._x=nt,this._y=pt,this._x0=Tt,this._y0=Et,this._x1=Dt,this._y1=et,this._root=void 0}function A(nt){for(var pt={data:nt.data},Tt=pt;nt=nt.next;)Tt=Tt.next={data:nt.data};return pt}var C=L.prototype=D.prototype;C.copy=function(){var nt=new D(this._x,this._y,this._x0,this._y0,this._x1,this._y1),pt=this._root,Tt,Et;if(!pt)return nt;if(!pt.length)return nt._root=A(pt),nt;for(Tt=[{source:pt,target:nt._root=new Array(4)}];pt=Tt.pop();)for(var Dt=0;Dt<4;++Dt)(Et=pt.source[Dt])&&(Et.length?Tt.push({source:Et,target:pt.target[Dt]=new Array(4)}):pt.target[Dt]=A(Et));return nt},C.add=_,C.addAll=v,C.cover=y,C.data=r,C.extent=n,C.find=i,C.remove=f,C.removeAll=g,C.root=h,C.size=b,C.visit=p,C.visitAfter=E,C.x=l,C.y=M;function S(nt){return nt.x+nt.vx}function o(nt){return nt.y+nt.vy}function R(nt){var pt,Tt,Et=1,Dt=1;typeof nt!="function"&&(nt=P(nt==null?1:+nt));function et(){for(var rt,lt=pt.length,Qe,Fe,Ce,pe,we,Ae,Pe=0;Pe<Dt;++Pe)for(Qe=L(pt,S,o).visitAfter(Ue),rt=0;rt<lt;++rt)Fe=pt[rt],we=Tt[Fe.index],Ae=we*we,Ce=Fe.x+Fe.vx,pe=Fe.y+Fe.vy,Qe.visit(Ge);function Ge(We,tt,ct,St,Pt){var wt=We.data,Bt=We.r,Wt=we+Bt;if(wt){if(wt.index>Fe.index){var hr=Ce-wt.x-wt.vx,gt=pe-wt.y-wt.vy,jt=hr*hr+gt*gt;jt<Wt*Wt&&(hr===0&&(hr=a(),jt+=hr*hr),gt===0&&(gt=a(),jt+=gt*gt),jt=(Wt-(jt=Math.sqrt(jt)))/jt*Et,Fe.vx+=(hr*=jt)*(Wt=(Bt*=Bt)/(Ae+Bt)),Fe.vy+=(gt*=jt)*Wt,wt.vx-=hr*(Wt=1-Wt),wt.vy-=gt*Wt)}return}return tt>Ce+Wt||St<Ce-Wt||ct>pe+Wt||Pt<pe-Wt}}function Ue(rt){if(rt.data)return rt.r=Tt[rt.data.index];for(var lt=rt.r=0;lt<4;++lt)rt[lt]&&rt[lt].r>rt.r&&(rt.r=rt[lt].r)}function ze(){if(pt){var rt,lt=pt.length,Qe;for(Tt=new Array(lt),rt=0;rt<lt;++rt)Qe=pt[rt],Tt[Qe.index]=+nt(Qe,rt,pt)}}return et.initialize=function(rt){pt=rt,ze()},et.iterations=function(rt){return arguments.length?(Dt=+rt,et):Dt},et.strength=function(rt){return arguments.length?(Et=+rt,et):Et},et.radius=function(rt){return arguments.length?(nt=typeof rt=="function"?rt:P(+rt),ze(),et):nt},et}var T=e(15140);function O(nt){return nt.index}function N(nt,pt){var Tt=nt.get(pt);if(!Tt)throw new Error("missing: "+pt);return Tt}function H(nt){var pt=O,Tt=Qe,Et,Dt=P(30),et,Ue,ze,rt,lt=1;nt==null&&(nt=[]);function Qe(Ae){return 1/Math.min(ze[Ae.source.index],ze[Ae.target.index])}function Fe(Ae){for(var Pe=0,Ge=nt.length;Pe<lt;++Pe)for(var We=0,tt,ct,St,Pt,wt,Bt,Wt;We<Ge;++We)tt=nt[We],ct=tt.source,St=tt.target,Pt=St.x+St.vx-ct.x-ct.vx||a(),wt=St.y+St.vy-ct.y-ct.vy||a(),Bt=Math.sqrt(Pt*Pt+wt*wt),Bt=(Bt-et[We])/Bt*Ae*Et[We],Pt*=Bt,wt*=Bt,St.vx-=Pt*(Wt=rt[We]),St.vy-=wt*Wt,ct.vx+=Pt*(Wt=1-Wt),ct.vy+=wt*Wt}function Ce(){if(Ue){var Ae,Pe=Ue.length,Ge=nt.length,We=(0,T.UI)(Ue,pt),tt;for(Ae=0,ze=new Array(Pe);Ae<Ge;++Ae)tt=nt[Ae],tt.index=Ae,typeof tt.source!="object"&&(tt.source=N(We,tt.source)),typeof tt.target!="object"&&(tt.target=N(We,tt.target)),ze[tt.source.index]=(ze[tt.source.index]||0)+1,ze[tt.target.index]=(ze[tt.target.index]||0)+1;for(Ae=0,rt=new Array(Ge);Ae<Ge;++Ae)tt=nt[Ae],rt[Ae]=ze[tt.source.index]/(ze[tt.source.index]+ze[tt.target.index]);Et=new Array(Ge),pe(),et=new Array(Ge),we()}}function pe(){if(Ue)for(var Ae=0,Pe=nt.length;Ae<Pe;++Ae)Et[Ae]=+Tt(nt[Ae],Ae,nt)}function we(){if(Ue)for(var Ae=0,Pe=nt.length;Ae<Pe;++Ae)et[Ae]=+Dt(nt[Ae],Ae,nt)}return Fe.initialize=function(Ae){Ue=Ae,Ce()},Fe.links=function(Ae){return arguments.length?(nt=Ae,Ce(),Fe):nt},Fe.id=function(Ae){return arguments.length?(pt=Ae,Fe):pt},Fe.iterations=function(Ae){return arguments.length?(lt=+Ae,Fe):lt},Fe.strength=function(Ae){return arguments.length?(Tt=typeof Ae=="function"?Ae:P(+Ae),pe(),Fe):Tt},Fe.distance=function(Ae){return arguments.length?(Dt=typeof Ae=="function"?Ae:P(+Ae),we(),Fe):Dt},Fe}var k={value:function(){}};function V(){for(var nt=0,pt=arguments.length,Tt={},Et;nt<pt;++nt){if(!(Et=arguments[nt]+"")||Et in Tt||/[\s.]/.test(Et))throw new Error("illegal type: "+Et);Tt[Et]=[]}return new G(Tt)}function G(nt){this._=nt}function U(nt,pt){return nt.trim().split(/^|\s+/).map(function(Tt){var Et="",Dt=Tt.indexOf(".");if(Dt>=0&&(Et=Tt.slice(Dt+1),Tt=Tt.slice(0,Dt)),Tt&&!pt.hasOwnProperty(Tt))throw new Error("unknown type: "+Tt);return{type:Tt,name:Et}})}G.prototype=V.prototype={constructor:G,on:function(nt,pt){var Tt=this._,Et=U(nt+"",Tt),Dt,et=-1,Ue=Et.length;if(arguments.length<2){for(;++et<Ue;)if((Dt=(nt=Et[et]).type)&&(Dt=Y(Tt[Dt],nt.name)))return Dt;return}if(pt!=null&&typeof pt!="function")throw new Error("invalid callback: "+pt);for(;++et<Ue;)if(Dt=(nt=Et[et]).type)Tt[Dt]=ee(Tt[Dt],nt.name,pt);else if(pt==null)for(Dt in Tt)Tt[Dt]=ee(Tt[Dt],nt.name,null);return this},copy:function(){var nt={},pt=this._;for(var Tt in pt)nt[Tt]=pt[Tt].slice();return new G(nt)},call:function(nt,pt){if((Dt=arguments.length-2)>0)for(var Tt=new Array(Dt),Et=0,Dt,et;Et<Dt;++Et)Tt[Et]=arguments[Et+2];if(!this._.hasOwnProperty(nt))throw new Error("unknown type: "+nt);for(et=this._[nt],Et=0,Dt=et.length;Et<Dt;++Et)et[Et].value.apply(pt,Tt)},apply:function(nt,pt,Tt){if(!this._.hasOwnProperty(nt))throw new Error("unknown type: "+nt);for(var Et=this._[nt],Dt=0,et=Et.length;Dt<et;++Dt)Et[Dt].value.apply(pt,Tt)}};function Y(nt,pt){for(var Tt=0,Et=nt.length,Dt;Tt<Et;++Tt)if((Dt=nt[Tt]).name===pt)return Dt.value}function ee(nt,pt,Tt){for(var Et=0,Dt=nt.length;Et<Dt;++Et)if(nt[Et].name===pt){nt[Et]=k,nt=nt.slice(0,Et).concat(nt.slice(Et+1));break}return Tt!=null&&nt.push({name:pt,value:Tt}),nt}var re=V,ie=0,se=0,ce=0,q=1e3,j,Z,Q=0,ue=0,fe=0,te=typeof performance=="object"&&performance.now?performance:Date,ne=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(nt){setTimeout(nt,17)};function ve(){return ue||(ne(le),ue=te.now()+fe)}function le(){ue=0}function xe(){this._call=this._time=this._next=null}xe.prototype=Se.prototype={constructor:xe,restart:function(nt,pt,Tt){if(typeof nt!="function")throw new TypeError("callback is not a function");Tt=(Tt==null?ve():+Tt)+(pt==null?0:+pt),!this._next&&Z!==this&&(Z?Z._next=this:j=this,Z=this),this._call=nt,this._time=Tt,Le()},stop:function(){this._call&&(this._call=null,this._time=1/0,Le())}};function Se(nt,pt,Tt){var Et=new xe;return Et.restart(nt,pt,Tt),Et}function Re(){ve(),++ie;for(var nt=j,pt;nt;)(pt=ue-nt._time)>=0&&nt._call.call(null,pt),nt=nt._next;--ie}function Ee(){ue=(Q=te.now())+fe,ie=se=0;try{Re()}finally{ie=0,Be(),ue=0}}function Oe(){var nt=te.now(),pt=nt-Q;pt>q&&(fe-=pt,Q=nt)}function Be(){for(var nt,pt=j,Tt,Et=1/0;pt;)pt._call?(Et>pt._time&&(Et=pt._time),nt=pt,pt=pt._next):(Tt=pt._next,pt._next=null,pt=nt?nt._next=Tt:j=Tt);Z=nt,Le(Et)}function Le(nt){if(!ie){se&&(se=clearTimeout(se));var pt=nt-ue;pt>24?(nt<1/0&&(se=setTimeout(Ee,nt-te.now()-fe)),ce&&(ce=clearInterval(ce))):(ce||(Q=te.now(),ce=setInterval(Oe,q)),ie=1,ne(Ee))}}function Te(nt){return nt.x}function De(nt){return nt.y}var Ve=10,Ye=Math.PI*(3-Math.sqrt(5));function Ne(nt){var pt,Tt=1,Et=.001,Dt=1-Math.pow(Et,1/300),et=0,Ue=.6,ze=(0,T.UI)(),rt=Se(Qe),lt=re("tick","end");nt==null&&(nt=[]);function Qe(){Fe(),lt.call("tick",pt),Tt<Et&&(rt.stop(),lt.call("end",pt))}function Fe(we){var Ae,Pe=nt.length,Ge;we===void 0&&(we=1);for(var We=0;We<we;++We)for(Tt+=(et-Tt)*Dt,ze.each(function(tt){tt(Tt)}),Ae=0;Ae<Pe;++Ae)Ge=nt[Ae],Ge.fx==null?Ge.x+=Ge.vx*=Ue:(Ge.x=Ge.fx,Ge.vx=0),Ge.fy==null?Ge.y+=Ge.vy*=Ue:(Ge.y=Ge.fy,Ge.vy=0);return pt}function Ce(){for(var we=0,Ae=nt.length,Pe;we<Ae;++we){if(Pe=nt[we],Pe.index=we,Pe.fx!=null&&(Pe.x=Pe.fx),Pe.fy!=null&&(Pe.y=Pe.fy),isNaN(Pe.x)||isNaN(Pe.y)){var Ge=Ve*Math.sqrt(we),We=we*Ye;Pe.x=Ge*Math.cos(We),Pe.y=Ge*Math.sin(We)}(isNaN(Pe.vx)||isNaN(Pe.vy))&&(Pe.vx=Pe.vy=0)}}function pe(we){return we.initialize&&we.initialize(nt),we}return Ce(),pt={tick:Fe,restart:function(){return rt.restart(Qe),pt},stop:function(){return rt.stop(),pt},nodes:function(we){return arguments.length?(nt=we,Ce(),ze.each(pe),pt):nt},alpha:function(we){return arguments.length?(Tt=+we,pt):Tt},alphaMin:function(we){return arguments.length?(Et=+we,pt):Et},alphaDecay:function(we){return arguments.length?(Dt=+we,pt):+Dt},alphaTarget:function(we){return arguments.length?(et=+we,pt):et},velocityDecay:function(we){return arguments.length?(Ue=1-we,pt):1-Ue},force:function(we,Ae){return arguments.length>1?(Ae==null?ze.remove(we):ze.set(we,pe(Ae)),pt):ze.get(we)},find:function(we,Ae,Pe){var Ge=0,We=nt.length,tt,ct,St,Pt,wt;for(Pe==null?Pe=1/0:Pe*=Pe,Ge=0;Ge<We;++Ge)Pt=nt[Ge],tt=we-Pt.x,ct=Ae-Pt.y,St=tt*tt+ct*ct,St<Pe&&(wt=Pt,Pe=St);return wt},on:function(we,Ae){return arguments.length>1?(lt.on(we,Ae),pt):lt.on(we)}}}function Xe(){var nt,pt,Tt,Et=P(-30),Dt,et=1,Ue=1/0,ze=.81;function rt(Ce){var pe,we=nt.length,Ae=L(nt,Te,De).visitAfter(Qe);for(Tt=Ce,pe=0;pe<we;++pe)pt=nt[pe],Ae.visit(Fe)}function lt(){if(nt){var Ce,pe=nt.length,we;for(Dt=new Array(pe),Ce=0;Ce<pe;++Ce)we=nt[Ce],Dt[we.index]=+Et(we,Ce,nt)}}function Qe(Ce){var pe=0,we,Ae,Pe=0,Ge,We,tt;if(Ce.length){for(Ge=We=tt=0;tt<4;++tt)(we=Ce[tt])&&(Ae=Math.abs(we.value))&&(pe+=we.value,Pe+=Ae,Ge+=Ae*we.x,We+=Ae*we.y);Ce.x=Ge/Pe,Ce.y=We/Pe}else{we=Ce,we.x=we.data.x,we.y=we.data.y;do pe+=Dt[we.data.index];while(we=we.next)}Ce.value=pe}function Fe(Ce,pe,we,Ae){if(!Ce.value)return!0;var Pe=Ce.x-pt.x,Ge=Ce.y-pt.y,We=Ae-pe,tt=Pe*Pe+Ge*Ge;if(We*We/ze<tt)return tt<Ue&&(Pe===0&&(Pe=a(),tt+=Pe*Pe),Ge===0&&(Ge=a(),tt+=Ge*Ge),tt<et&&(tt=Math.sqrt(et*tt)),pt.vx+=Pe*Ce.value*Tt/tt,pt.vy+=Ge*Ce.value*Tt/tt),!0;if(Ce.length||tt>=Ue)return;(Ce.data!==pt||Ce.next)&&(Pe===0&&(Pe=a(),tt+=Pe*Pe),Ge===0&&(Ge=a(),tt+=Ge*Ge),tt<et&&(tt=Math.sqrt(et*tt)));do Ce.data!==pt&&(We=Dt[Ce.data.index]*Tt/tt,pt.vx+=Pe*We,pt.vy+=Ge*We);while(Ce=Ce.next)}return rt.initialize=function(Ce){nt=Ce,lt()},rt.strength=function(Ce){return arguments.length?(Et=typeof Ce=="function"?Ce:P(+Ce),lt(),rt):Et},rt.distanceMin=function(Ce){return arguments.length?(et=Ce*Ce,rt):Math.sqrt(et)},rt.distanceMax=function(Ce){return arguments.length?(Ue=Ce*Ce,rt):Math.sqrt(Ue)},rt.theta=function(Ce){return arguments.length?(ze=Ce*Ce,rt):Math.sqrt(ze)},rt}function ht(nt,pt,Tt){var Et,Dt=P(.1),et,Ue;typeof nt!="function"&&(nt=P(+nt)),pt==null&&(pt=0),Tt==null&&(Tt=0);function ze(lt){for(var Qe=0,Fe=Et.length;Qe<Fe;++Qe){var Ce=Et[Qe],pe=Ce.x-pt||1e-6,we=Ce.y-Tt||1e-6,Ae=Math.sqrt(pe*pe+we*we),Pe=(Ue[Qe]-Ae)*et[Qe]*lt/Ae;Ce.vx+=pe*Pe,Ce.vy+=we*Pe}}function rt(){if(Et){var lt,Qe=Et.length;for(et=new Array(Qe),Ue=new Array(Qe),lt=0;lt<Qe;++lt)Ue[lt]=+nt(Et[lt],lt,Et),et[lt]=isNaN(Ue[lt])?0:+Dt(Et[lt],lt,Et)}}return ze.initialize=function(lt){Et=lt,rt()},ze.strength=function(lt){return arguments.length?(Dt=typeof lt=="function"?lt:P(+lt),rt(),ze):Dt},ze.radius=function(lt){return arguments.length?(nt=typeof lt=="function"?lt:P(+lt),rt(),ze):nt},ze.x=function(lt){return arguments.length?(pt=+lt,ze):pt},ze.y=function(lt){return arguments.length?(Tt=+lt,ze):Tt},ze}function st(nt){var pt=P(.1),Tt,Et,Dt;typeof nt!="function"&&(nt=P(nt==null?0:+nt));function et(ze){for(var rt=0,lt=Tt.length,Qe;rt<lt;++rt)Qe=Tt[rt],Qe.vx+=(Dt[rt]-Qe.x)*Et[rt]*ze}function Ue(){if(Tt){var ze,rt=Tt.length;for(Et=new Array(rt),Dt=new Array(rt),ze=0;ze<rt;++ze)Et[ze]=isNaN(Dt[ze]=+nt(Tt[ze],ze,Tt))?0:+pt(Tt[ze],ze,Tt)}}return et.initialize=function(ze){Tt=ze,Ue()},et.strength=function(ze){return arguments.length?(pt=typeof ze=="function"?ze:P(+ze),Ue(),et):pt},et.x=function(ze){return arguments.length?(nt=typeof ze=="function"?ze:P(+ze),Ue(),et):nt},et}function it(nt){var pt=P(.1),Tt,Et,Dt;typeof nt!="function"&&(nt=P(nt==null?0:+nt));function et(ze){for(var rt=0,lt=Tt.length,Qe;rt<lt;++rt)Qe=Tt[rt],Qe.vy+=(Dt[rt]-Qe.y)*Et[rt]*ze}function Ue(){if(Tt){var ze,rt=Tt.length;for(Et=new Array(rt),Dt=new Array(rt),ze=0;ze<rt;++ze)Et[ze]=isNaN(Dt[ze]=+nt(Tt[ze],ze,Tt))?0:+pt(Tt[ze],ze,Tt)}}return et.initialize=function(ze){Tt=ze,Ue()},et.strength=function(ze){return arguments.length?(pt=typeof ze=="function"?ze:P(+ze),Ue(),et):pt},et.y=function(ze){return arguments.length?(nt=typeof ze=="function"?ze:P(+ze),Ue(),et):nt},et}},60721:function(z,B,e){e.d(B,{WU:function(){return l},FF:function(){return E}});function d(M){return Math.abs(M=Math.round(M))>=1e21?M.toLocaleString("en").replace(/,/g,""):M.toString(10)}function P(M,L){if((D=(M=L?M.toExponential(L-1):M.toExponential()).indexOf("e"))<0)return null;var D,A=M.slice(0,D);return[A.length>1?A[0]+A.slice(2):A,+M.slice(D+1)]}function a(M){return M=P(Math.abs(M)),M?M[1]:NaN}function _(M,L){return function(D,A){for(var C=D.length,S=[],o=0,R=M[0],T=0;C>0&&R>0&&(T+R+1>A&&(R=Math.max(1,A-T)),S.push(D.substring(C-=R,C+R)),!((T+=R+1)>A));)R=M[o=(o+1)%M.length];return S.reverse().join(L)}}function x(M){return function(L){return L.replace(/[0-9]/g,function(D){return M[+D]})}}var v=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function y(M){if(!(L=v.exec(M)))throw new Error("invalid format: "+M);var L;return new r({fill:L[1],align:L[2],sign:L[3],symbol:L[4],zero:L[5],width:L[6],comma:L[7],precision:L[8]&&L[8].slice(1),trim:L[9],type:L[10]})}y.prototype=r.prototype;function r(M){this.fill=M.fill===void 0?" ":M.fill+"",this.align=M.align===void 0?">":M.align+"",this.sign=M.sign===void 0?"-":M.sign+"",this.symbol=M.symbol===void 0?"":M.symbol+"",this.zero=!!M.zero,this.width=M.width===void 0?void 0:+M.width,this.comma=!!M.comma,this.precision=M.precision===void 0?void 0:+M.precision,this.trim=!!M.trim,this.type=M.type===void 0?"":M.type+""}r.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 n(M){e:for(var L=M.length,D=1,A=-1,C;D<L;++D)switch(M[D]){case".":A=C=D;break;case"0":A===0&&(A=D),C=D;break;default:if(!+M[D])break e;A>0&&(A=0);break}return A>0?M.slice(0,A)+M.slice(C+1):M}var u;function i(M,L){var D=P(M,L);if(!D)return M+"";var A=D[0],C=D[1],S=C-(u=Math.max(-8,Math.min(8,Math.floor(C/3)))*3)+1,o=A.length;return S===o?A:S>o?A+new Array(S-o+1).join("0"):S>0?A.slice(0,S)+"."+A.slice(S):"0."+new Array(1-S).join("0")+P(M,Math.max(0,L+S-1))[0]}function f(M,L){var D=P(M,L);if(!D)return M+"";var A=D[0],C=D[1];return C<0?"0."+new Array(-C).join("0")+A:A.length>C+1?A.slice(0,C+1)+"."+A.slice(C+1):A+new Array(C-A.length+2).join("0")}var g={"%":function(M,L){return(M*100).toFixed(L)},b:function(M){return Math.round(M).toString(2)},c:function(M){return M+""},d,e:function(M,L){return M.toExponential(L)},f:function(M,L){return M.toFixed(L)},g:function(M,L){return M.toPrecision(L)},o:function(M){return Math.round(M).toString(8)},p:function(M,L){return f(M*100,L)},r:f,s:i,X:function(M){return Math.round(M).toString(16).toUpperCase()},x:function(M){return Math.round(M).toString(16)}};function h(M){return M}var b=Array.prototype.map,p=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function E(M){var L=M.grouping===void 0||M.thousands===void 0?h:_(b.call(M.grouping,Number),M.thousands+""),D=M.currency===void 0?"":M.currency[0]+"",A=M.currency===void 0?"":M.currency[1]+"",C=M.decimal===void 0?".":M.decimal+"",S=M.numerals===void 0?h:x(b.call(M.numerals,String)),o=M.percent===void 0?"%":M.percent+"",R=M.minus===void 0?"-":M.minus+"",T=M.nan===void 0?"NaN":M.nan+"";function O(H){H=y(H);var k=H.fill,V=H.align,G=H.sign,U=H.symbol,Y=H.zero,ee=H.width,re=H.comma,ie=H.precision,se=H.trim,ce=H.type;ce==="n"?(re=!0,ce="g"):g[ce]||(ie===void 0&&(ie=12),se=!0,ce="g"),(Y||k==="0"&&V==="=")&&(Y=!0,k="0",V="=");var q=U==="$"?D:U==="#"&&/[boxX]/.test(ce)?"0"+ce.toLowerCase():"",j=U==="$"?A:/[%p]/.test(ce)?o:"",Z=g[ce],Q=/[defgprs%]/.test(ce);ie=ie===void 0?6:/[gprs]/.test(ce)?Math.max(1,Math.min(21,ie)):Math.max(0,Math.min(20,ie));function ue(fe){var te=q,ne=j,ve,le,xe;if(ce==="c")ne=Z(fe)+ne,fe="";else{fe=+fe;var Se=fe<0||1/fe<0;if(fe=isNaN(fe)?T:Z(Math.abs(fe),ie),se&&(fe=n(fe)),Se&&+fe==0&&G!=="+"&&(Se=!1),te=(Se?G==="("?G:R:G==="-"||G==="("?"":G)+te,ne=(ce==="s"?p[8+u/3]:"")+ne+(Se&&G==="("?")":""),Q){for(ve=-1,le=fe.length;++ve<le;)if(xe=fe.charCodeAt(ve),48>xe||xe>57){ne=(xe===46?C+fe.slice(ve+1):fe.slice(ve))+ne,fe=fe.slice(0,ve);break}}}re&&!Y&&(fe=L(fe,1/0));var Re=te.length+fe.length+ne.length,Ee=Re<ee?new Array(ee-Re+1).join(k):"";switch(re&&Y&&(fe=L(Ee+fe,Ee.length?ee-ne.length:1/0),Ee=""),V){case"<":fe=te+fe+ne+Ee;break;case"=":fe=te+Ee+fe+ne;break;case"^":fe=Ee.slice(0,Re=Ee.length>>1)+te+fe+ne+Ee.slice(Re);break;default:fe=Ee+te+fe+ne;break}return S(fe)}return ue.toString=function(){return H+""},ue}function N(H,k){var V=O((H=y(H),H.type="f",H)),G=Math.max(-8,Math.min(8,Math.floor(a(k)/3)))*3,U=Math.pow(10,-G),Y=p[8+G/3];return function(ee){return V(U*ee)+Y}}return{format:O,formatPrefix:N}}var c,l;m({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function m(M){return c=E(M),l=c.format,c.formatPrefix,c}},65704:function(z,B,e){e.r(B),e.d(B,{geoAiry:function(){return Y},geoAiryRaw:function(){return U},geoAitoff:function(){return re},geoAitoffRaw:function(){return ee},geoArmadillo:function(){return se},geoArmadilloRaw:function(){return ie},geoAugust:function(){return q},geoAugustRaw:function(){return ce},geoBaker:function(){return ue},geoBakerRaw:function(){return Q},geoBerghaus:function(){return ne},geoBerghausRaw:function(){return te},geoBertin1953:function(){return Be},geoBertin1953Raw:function(){return Oe},geoBoggs:function(){return ht},geoBoggsRaw:function(){return Xe},geoBonne:function(){return Tt},geoBonneRaw:function(){return pt},geoBottomley:function(){return Dt},geoBottomleyRaw:function(){return Et},geoBromley:function(){return Ue},geoBromleyRaw:function(){return et},geoChamberlin:function(){return Ae},geoChamberlinAfrica:function(){return we},geoChamberlinRaw:function(){return Ce},geoCollignon:function(){return Ge},geoCollignonRaw:function(){return Pe},geoCraig:function(){return tt},geoCraigRaw:function(){return We},geoCraster:function(){return Pt},geoCrasterRaw:function(){return St},geoCylindricalEqualArea:function(){return Bt},geoCylindricalEqualAreaRaw:function(){return wt},geoCylindricalStereographic:function(){return hr},geoCylindricalStereographicRaw:function(){return Wt},geoEckert1:function(){return jt},geoEckert1Raw:function(){return gt},geoEckert2:function(){return or},geoEckert2Raw:function(){return Ut},geoEckert3:function(){return dt},geoEckert3Raw:function(){return ur},geoEckert4:function(){return yt},geoEckert4Raw:function(){return ut},geoEckert5:function(){return Rt},geoEckert5Raw:function(){return Lt},geoEckert6:function(){return Vt},geoEckert6Raw:function(){return Nt},geoEisenlohr:function(){return Jt},geoEisenlohrRaw:function(){return qt},geoFahey:function(){return Ke},geoFaheyRaw:function(){return Mr},geoFoucaut:function(){return zt},geoFoucautRaw:function(){return Ze},geoFoucautSinusoidal:function(){return Qt},geoFoucautSinusoidalRaw:function(){return kt},geoGilbert:function(){return gr},geoGingery:function(){return Kr},geoGingeryRaw:function(){return yr},geoGinzburg4:function(){return Sn},geoGinzburg4Raw:function(){return Nr},geoGinzburg5:function(){return xn},geoGinzburg5Raw:function(){return Jr},geoGinzburg6:function(){return mr},geoGinzburg6Raw:function(){return Dn},geoGinzburg8:function(){return zr},geoGinzburg8Raw:function(){return Ar},geoGinzburg9:function(){return on},geoGinzburg9Raw:function(){return Br},geoGringorten:function(){return Jn},geoGringortenQuincuncial:function(){return Tv},geoGringortenRaw:function(){return Tn},geoGuyou:function(){return dn},geoGuyouRaw:function(){return Dr},geoHammer:function(){return Se},geoHammerRaw:function(){return le},geoHammerRetroazimuthal:function(){return Vn},geoHammerRetroazimuthalRaw:function(){return Ln},geoHealpix:function(){return fn},geoHealpixRaw:function(){return an},geoHill:function(){return Lr},geoHillRaw:function(){return Rr},geoHomolosine:function(){return zn},geoHomolosineRaw:function(){return pn},geoHufnagel:function(){return ua},geoHufnagelRaw:function(){return qn},geoHyperelliptical:function(){return uo},geoHyperellipticalRaw:function(){return ga},geoInterrupt:function(){return ko},geoInterruptedBoggs:function(){return oi},geoInterruptedHomolosine:function(){return pu},geoInterruptedMollweide:function(){return Vo},geoInterruptedMollweideHemispheres:function(){return Xu},geoInterruptedQuarticAuthalic:function(){return hc},geoInterruptedSinuMollweide:function(){return Zu},geoInterruptedSinusoidal:function(){return no},geoKavrayskiy7:function(){return Lo},geoKavrayskiy7Raw:function(){return qo},geoLagrange:function(){return zs},geoLagrangeRaw:function(){return os},geoLarrivee:function(){return eh},geoLarriveeRaw:function(){return po},geoLaskowski:function(){return go},geoLaskowskiRaw:function(){return Ns},geoLittrow:function(){return nl},geoLittrowRaw:function(){return oc},geoLoximuthal:function(){return sc},geoLoximuthalRaw:function(){return Bs},geoMiller:function(){return ov},geoMillerRaw:function(){return lc},geoModifiedStereographic:function(){return Wl},geoModifiedStereographicAlaska:function(){return cv},geoModifiedStereographicGs48:function(){return th},geoModifiedStereographicGs50:function(){return hv},geoModifiedStereographicLee:function(){return fc},geoModifiedStereographicMiller:function(){return vv},geoModifiedStereographicRaw:function(){return ju},geoMollweide:function(){return Ve},geoMollweideRaw:function(){return De},geoMtFlatPolarParabolic:function(){return dv},geoMtFlatPolarParabolicRaw:function(){return Lf},geoMtFlatPolarQuartic:function(){return rh},geoMtFlatPolarQuarticRaw:function(){return al},geoMtFlatPolarSinusoidal:function(){return pv},geoMtFlatPolarSinusoidalRaw:function(){return cc},geoNaturalEarth:function(){return ss.Z},geoNaturalEarth2:function(){return Ku},geoNaturalEarth2Raw:function(){return Xl},geoNaturalEarthRaw:function(){return ss.K},geoNellHammer:function(){return Us},geoNellHammerRaw:function(){return yu},geoNicolosi:function(){return Al},geoNicolosiRaw:function(){return mu},geoPatterson:function(){return gv},geoPattersonRaw:function(){return _f},geoPeirceQuincuncial:function(){return sh},geoPierceQuincuncial:function(){return sh},geoPolyconic:function(){return yv},geoPolyconicRaw:function(){return dc},geoPolyhedral:function(){return wi},geoPolyhedralButterfly:function(){return ol},geoPolyhedralCollignon:function(){return El},geoPolyhedralWaterman:function(){return Ml},geoProject:function(){return bv},geoQuantize:function(){return lh},geoQuincuncial:function(){return kf},geoRectangularPolyconic:function(){return Cl},geoRectangularPolyconicRaw:function(){return bc},geoRobinson:function(){return wc},geoRobinsonRaw:function(){return Vs},geoSatellite:function(){return Of},geoSatelliteRaw:function(){return Kl},geoSinuMollweide:function(){return Yn},geoSinuMollweideRaw:function(){return kn},geoSinusoidal:function(){return nt},geoSinusoidalRaw:function(){return it},geoStitch:function(){return Ql},geoTimes:function(){return es},geoTimesRaw:function(){return Yo},geoTwoPointAzimuthal:function(){return Uf},geoTwoPointAzimuthalRaw:function(){return ch},geoTwoPointAzimuthalUsa:function(){return Mu},geoTwoPointEquidistant:function(){return Ec},geoTwoPointEquidistantRaw:function(){return hh},geoTwoPointEquidistantUsa:function(){return Ts},geoVanDerGrinten:function(){return nf},geoVanDerGrinten2:function(){return Sv},geoVanDerGrinten2Raw:function(){return cl},geoVanDerGrinten3:function(){return Hf},geoVanDerGrinten3Raw:function(){return Mc},geoVanDerGrinten4:function(){return vh},geoVanDerGrinten4Raw:function(){return Po},geoVanDerGrintenRaw:function(){return _l},geoWagner:function(){return of},geoWagner4:function(){return Lc},geoWagner4Raw:function(){return Cc},geoWagner6:function(){return Gf},geoWagner6Raw:function(){return eu},geoWagner7:function(){return Rl},geoWagnerRaw:function(){return Gs},geoWiechel:function(){return ph},geoWiechelRaw:function(){return sf},geoWinkel3:function(){return gh},geoWinkel3Raw:function(){return lf}});var d=e(15002),P=Math.abs,a=Math.atan,_=Math.atan2,x=Math.cos,v=Math.exp,y=Math.floor,r=Math.log,n=Math.max,u=Math.min,i=Math.pow,f=Math.round,g=Math.sign||function(Je){return Je>0?1:Je<0?-1:0},h=Math.sin,b=Math.tan,p=1e-6,E=1e-12,c=Math.PI,l=c/2,m=c/4,M=Math.SQRT1_2,L=O(2),D=O(c),A=c*2,C=180/c,S=c/180;function o(Je){return Je?Je/Math.sin(Je):1}function R(Je){return Je>1?l:Je<-1?-l:Math.asin(Je)}function T(Je){return Je>1?0:Je<-1?c:Math.acos(Je)}function O(Je){return Je>0?Math.sqrt(Je):0}function N(Je){return Je=v(2*Je),(Je-1)/(Je+1)}function H(Je){return(v(Je)-v(-Je))/2}function k(Je){return(v(Je)+v(-Je))/2}function V(Je){return r(Je+O(Je*Je+1))}function G(Je){return r(Je+O(Je*Je-1))}function U(Je){var ot=b(Je/2),bt=2*r(x(Je/2))/(ot*ot);function At(Ot,It){var Ht=x(Ot),dr=x(It),xr=h(It),sr=dr*Ht,Er=-((1-sr?r((1+sr)/2)/(1-sr):-.5)+bt/(1+sr));return[Er*dr*h(Ot),Er*xr]}return At.invert=function(Ot,It){var Ht=O(Ot*Ot+It*It),dr=-Je/2,xr=50,sr;if(!Ht)return[0,0];do{var Er=dr/2,_r=x(Er),Yr=h(Er),$r=Yr/_r,gn=-r(P(_r));dr-=sr=(2/$r*gn-bt*$r-Ht)/(-gn/(Yr*Yr)+1-bt/(2*_r*_r))*(_r<0?.7:1)}while(P(sr)>p&&--xr>0);var bn=h(dr);return[_(Ot*bn,Ht*x(dr)),R(It*bn/Ht)]},At}function Y(){var Je=l,ot=(0,d.r)(U),bt=ot(Je);return bt.radius=function(At){return arguments.length?ot(Je=At*S):Je*C},bt.scale(179.976).clipAngle(147)}function ee(Je,ot){var bt=x(ot),At=o(T(bt*x(Je/=2)));return[2*bt*h(Je)*At,h(ot)*At]}ee.invert=function(Je,ot){if(!(Je*Je+4*ot*ot>c*c+p)){var bt=Je,At=ot,Ot=25;do{var It=h(bt),Ht=h(bt/2),dr=x(bt/2),xr=h(At),sr=x(At),Er=h(2*At),_r=xr*xr,Yr=sr*sr,$r=Ht*Ht,gn=1-Yr*dr*dr,bn=gn?T(sr*dr)*O(Rn=1/gn):Rn=0,Rn,da=2*bn*sr*Ht-Je,_a=bn*xr-ot,Ia=Rn*(Yr*$r+bn*sr*dr*_r),Fa=Rn*(.5*It*Er-bn*2*xr*Ht),za=Rn*.25*(Er*Ht-bn*xr*Yr*It),ci=Rn*(_r*dr+bn*$r*sr),Bi=Fa*za-ci*Ia;if(!Bi)break;var Ti=(_a*Fa-da*ci)/Bi,he=(da*za-_a*Ia)/Bi;bt-=Ti,At-=he}while((P(Ti)>p||P(he)>p)&&--Ot>0);return[bt,At]}};function re(){return(0,d.Z)(ee).scale(152.63)}function ie(Je){var ot=h(Je),bt=x(Je),At=Je>=0?1:-1,Ot=b(At*Je),It=(1+ot-bt)/2;function Ht(dr,xr){var sr=x(xr),Er=x(dr/=2);return[(1+sr)*h(dr),(At*xr>-_(Er,Ot)-.001?0:-At*10)+It+h(xr)*bt-(1+sr)*ot*Er]}return Ht.invert=function(dr,xr){var sr=0,Er=0,_r=50;do{var Yr=x(sr),$r=h(sr),gn=x(Er),bn=h(Er),Rn=1+gn,da=Rn*$r-dr,_a=It+bn*bt-Rn*ot*Yr-xr,Ia=Rn*Yr/2,Fa=-$r*bn,za=ot*Rn*$r/2,ci=bt*gn+ot*Yr*bn,Bi=Fa*za-ci*Ia,Ti=(_a*Fa-da*ci)/Bi/2,he=(da*za-_a*Ia)/Bi;P(he)>2&&(he/=2),sr-=Ti,Er-=he}while((P(Ti)>p||P(he)>p)&&--_r>0);return At*Er>-_(x(sr),Ot)-.001?[sr*2,Er]:null},Ht}function se(){var Je=20*S,ot=Je>=0?1:-1,bt=b(ot*Je),At=(0,d.r)(ie),Ot=At(Je),It=Ot.stream;return Ot.parallel=function(Ht){return arguments.length?(bt=b((ot=(Je=Ht*S)>=0?1:-1)*Je),At(Je)):Je*C},Ot.stream=function(Ht){var dr=Ot.rotate(),xr=It(Ht),sr=(Ot.rotate([0,0]),It(Ht)),Er=Ot.precision();return Ot.rotate(dr),xr.sphere=function(){sr.polygonStart(),sr.lineStart();for(var _r=ot*-180;ot*_r<180;_r+=ot*90)sr.point(_r,ot*90);if(Je)for(;ot*(_r-=3*ot*Er)>=-180;)sr.point(_r,ot*-_(x(_r*S/2),bt)*C);sr.lineEnd(),sr.polygonEnd()},xr},Ot.scale(218.695).center([0,28.0974])}function ce(Je,ot){var bt=b(ot/2),At=O(1-bt*bt),Ot=1+At*x(Je/=2),It=h(Je)*At/Ot,Ht=bt/Ot,dr=It*It,xr=Ht*Ht;return[1.3333333333333333*It*(3+dr-3*xr),1.3333333333333333*Ht*(3+3*dr-xr)]}ce.invert=function(Je,ot){if(Je*=.375,ot*=.375,!Je&&P(ot)>1)return null;var bt=Je*Je,At=ot*ot,Ot=1+bt+At,It=O((Ot-O(Ot*Ot-4*ot*ot))/2),Ht=R(It)/3,dr=It?G(P(ot/It))/3:V(P(Je))/3,xr=x(Ht),sr=k(dr),Er=sr*sr-xr*xr;return[g(Je)*2*_(H(dr)*xr,.25-Er),g(ot)*2*_(sr*h(Ht),.25+Er)]};function q(){return(0,d.Z)(ce).scale(66.1603)}var j=O(8),Z=r(1+L);function Q(Je,ot){var bt=P(ot);return bt<m?[Je,r(b(m+ot/2))]:[Je*x(bt)*(2*L-1/h(bt)),g(ot)*(2*L*(bt-m)-r(b(bt/2)))]}Q.invert=function(Je,ot){if((It=P(ot))<Z)return[Je,2*a(v(ot))-l];var bt=m,At=25,Ot,It;do{var Ht=x(bt/2),dr=b(bt/2);bt-=Ot=(j*(bt-m)-r(dr)-It)/(j-Ht*Ht/(2*dr))}while(P(Ot)>E&&--At>0);return[Je/(x(bt)*(j-1/h(bt))),g(ot)*bt]};function ue(){return(0,d.Z)(Q).scale(112.314)}var fe=e(17889);function te(Je){var ot=2*c/Je;function bt(At,Ot){var It=(0,fe.N)(At,Ot);if(P(At)>l){var Ht=_(It[1],It[0]),dr=O(It[0]*It[0]+It[1]*It[1]),xr=ot*f((Ht-l)/ot)+l,sr=_(h(Ht-=xr),2-x(Ht));Ht=xr+R(c/dr*h(sr))-sr,It[0]=dr*x(Ht),It[1]=dr*h(Ht)}return It}return bt.invert=function(At,Ot){var It=O(At*At+Ot*Ot);if(It>l){var Ht=_(Ot,At),dr=ot*f((Ht-l)/ot)+l,xr=Ht>dr?-1:1,sr=It*x(dr-Ht),Er=1/b(xr*T((sr-c)/O(c*(c-2*sr)+It*It)));Ht=dr+2*a((Er+xr*O(Er*Er-3))/3),At=It*x(Ht),Ot=It*h(Ht)}return fe.N.invert(At,Ot)},bt}function ne(){var Je=5,ot=(0,d.r)(te),bt=ot(Je),At=bt.stream,Ot=.01,It=-x(Ot*S),Ht=h(Ot*S);return bt.lobes=function(dr){return arguments.length?ot(Je=+dr):Je},bt.stream=function(dr){var xr=bt.rotate(),sr=At(dr),Er=(bt.rotate([0,0]),At(dr));return bt.rotate(xr),sr.sphere=function(){Er.polygonStart(),Er.lineStart();for(var _r=0,Yr=360/Je,$r=2*c/Je,gn=90-180/Je,bn=l;_r<Je;++_r,gn-=Yr,bn-=$r)Er.point(_(Ht*x(bn),It)*C,R(Ht*h(bn))*C),gn<-90?(Er.point(-90,-180-gn-Ot),Er.point(-90,-180-gn+Ot)):(Er.point(90,gn+Ot),Er.point(90,gn-Ot));Er.lineEnd(),Er.polygonEnd()},sr},bt.scale(87.8076).center([0,17.1875]).clipAngle(179.999)}var ve=e(12956);function le(Je,ot){if(arguments.length<2&&(ot=Je),ot===1)return ve.l;if(ot===1/0)return xe;function bt(At,Ot){var It=(0,ve.l)(At/ot,Ot);return It[0]*=Je,It}return bt.invert=function(At,Ot){var It=ve.l.invert(At/Je,Ot);return It[0]*=ot,It},bt}function xe(Je,ot){return[Je*x(ot)/x(ot/=2),2*h(ot)]}xe.invert=function(Je,ot){var bt=2*R(ot/2);return[Je*x(bt/2)/x(bt),bt]};function Se(){var Je=2,ot=(0,d.r)(le),bt=ot(Je);return bt.coefficient=function(At){return arguments.length?ot(Je=+At):Je},bt.scale(169.529)}function Re(Je,ot,bt){var At=100,Ot,It,Ht;bt=bt===void 0?0:+bt,ot=+ot;do It=Je(bt),Ht=Je(bt+p),It===Ht&&(Ht=It+p),bt-=Ot=-1*p*(It-ot)/(It-Ht);while(At-- >0&&P(Ot)>p);return At<0?NaN:bt}function Ee(Je,ot,bt){return ot===void 0&&(ot=40),bt===void 0&&(bt=E),function(At,Ot,It,Ht){var dr,xr,sr;It=It===void 0?0:+It,Ht=Ht===void 0?0:+Ht;for(var Er=0;Er<ot;Er++){var _r=Je(It,Ht),Yr=_r[0]-At,$r=_r[1]-Ot;if(P(Yr)<bt&&P($r)<bt)break;var gn=Yr*Yr+$r*$r;if(gn>dr){It-=xr/=2,Ht-=sr/=2;continue}dr=gn;var bn=(It>0?-1:1)*bt,Rn=(Ht>0?-1:1)*bt,da=Je(It+bn,Ht),_a=Je(It,Ht+Rn),Ia=(da[0]-_r[0])/bn,Fa=(da[1]-_r[1])/bn,za=(_a[0]-_r[0])/Rn,ci=(_a[1]-_r[1])/Rn,Bi=ci*Ia-Fa*za,Ti=(P(Bi)<.5?.5:1)/Bi;if(xr=($r*za-Yr*ci)*Ti,sr=(Yr*Fa-$r*Ia)*Ti,It+=xr,Ht+=sr,P(xr)<bt&&P(sr)<bt)break}return[It,Ht]}}function Oe(){var Je=le(1.68,2),ot=1.4,bt=12;function At(Ot,It){if(Ot+It<-ot){var Ht=(Ot-It+1.6)*(Ot+It+ot)/8;Ot+=Ht,It-=.8*Ht*h(It+c/2)}var dr=Je(Ot,It),xr=(1-x(Ot*It))/bt;return dr[1]<0&&(dr[0]*=1+xr),dr[1]>0&&(dr[1]*=1+xr/1.5*dr[0]*dr[0]),dr}return At.invert=Ee(At),At}function Be(){return(0,d.Z)(Oe()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Le(Je,ot){var bt=Je*h(ot),At=30,Ot;do ot-=Ot=(ot+h(ot)-bt)/(1+x(ot));while(P(Ot)>p&&--At>0);return ot/2}function Te(Je,ot,bt){function At(Ot,It){return[Je*Ot*x(It=Le(bt,It)),ot*h(It)]}return At.invert=function(Ot,It){return It=R(It/ot),[Ot/(Je*x(It)),R((2*It+h(2*It))/bt)]},At}var De=Te(L/l,L,c);function Ve(){return(0,d.Z)(De).scale(169.529)}var Ye=2.00276,Ne=1.11072;function Xe(Je,ot){var bt=Le(c,ot);return[Ye*Je/(1/x(ot)+Ne/x(bt)),(ot+L*h(bt))/Ye]}Xe.invert=function(Je,ot){var bt=Ye*ot,At=ot<0?-m:m,Ot=25,It,Ht;do Ht=bt-L*h(At),At-=It=(h(2*At)+2*At-c*h(Ht))/(2*x(2*At)+2+c*x(Ht)*L*x(At));while(P(It)>p&&--Ot>0);return Ht=bt-L*h(At),[Je*(1/x(Ht)+Ne/x(At))/Ye,Ht]};function ht(){return(0,d.Z)(Xe).scale(160.857)}function st(Je){var ot=0,bt=(0,d.r)(Je),At=bt(ot);return At.parallel=function(Ot){return arguments.length?bt(ot=Ot*S):ot*C},At}function it(Je,ot){return[Je*x(ot),ot]}it.invert=function(Je,ot){return[Je/x(ot),ot]};function nt(){return(0,d.Z)(it).scale(152.63)}function pt(Je){if(!Je)return it;var ot=1/b(Je);function bt(At,Ot){var It=ot+Je-Ot,Ht=It&&At*x(Ot)/It;return[It*h(Ht),ot-It*x(Ht)]}return bt.invert=function(At,Ot){var It=O(At*At+(Ot=ot-Ot)*Ot),Ht=ot+Je-It;return[It/x(Ht)*_(At,Ot),Ht]},bt}function Tt(){return st(pt).scale(123.082).center([0,26.1441]).parallel(45)}function Et(Je){function ot(bt,At){var Ot=l-At,It=Ot&&bt*Je*h(Ot)/Ot;return[Ot*h(It)/Je,l-Ot*x(It)]}return ot.invert=function(bt,At){var Ot=bt*Je,It=l-At,Ht=O(Ot*Ot+It*It),dr=_(Ot,It);return[(Ht?Ht/h(Ht):1)*dr/Je,l-Ht]},ot}function Dt(){var Je=.5,ot=(0,d.r)(Et),bt=ot(Je);return bt.fraction=function(At){return arguments.length?ot(Je=+At):Je},bt.scale(158.837)}var et=Te(1,4/c,c);function Ue(){return(0,d.Z)(et).scale(152.63)}var ze=e(66624),rt=e(49386);function lt(Je,ot,bt,At,Ot,It){var Ht=x(It),dr;if(P(Je)>1||P(It)>1)dr=T(bt*Ot+ot*At*Ht);else{var xr=h(Je/2),sr=h(It/2);dr=2*R(O(xr*xr+ot*At*sr*sr))}return P(dr)>p?[dr,_(At*h(It),ot*Ot-bt*At*Ht)]:[0,0]}function Qe(Je,ot,bt){return T((Je*Je+ot*ot-bt*bt)/(2*Je*ot))}function Fe(Je){return Je-2*c*y((Je+c)/(2*c))}function Ce(Je,ot,bt){for(var At=[[Je[0],Je[1],h(Je[1]),x(Je[1])],[ot[0],ot[1],h(ot[1]),x(ot[1])],[bt[0],bt[1],h(bt[1]),x(bt[1])]],Ot=At[2],It,Ht=0;Ht<3;++Ht,Ot=It)It=At[Ht],Ot.v=lt(It[1]-Ot[1],Ot[3],Ot[2],It[3],It[2],It[0]-Ot[0]),Ot.point=[0,0];var dr=Qe(At[0].v[0],At[2].v[0],At[1].v[0]),xr=Qe(At[0].v[0],At[1].v[0],At[2].v[0]),sr=c-dr;At[2].point[1]=0,At[0].point[0]=-(At[1].point[0]=At[0].v[0]/2);var Er=[At[2].point[0]=At[0].point[0]+At[2].v[0]*x(dr),2*(At[0].point[1]=At[1].point[1]=At[2].v[0]*h(dr))];function _r(Yr,$r){var gn=h($r),bn=x($r),Rn=new Array(3),da;for(da=0;da<3;++da){var _a=At[da];if(Rn[da]=lt($r-_a[1],_a[3],_a[2],bn,gn,Yr-_a[0]),!Rn[da][0])return _a.point;Rn[da][1]=Fe(Rn[da][1]-_a.v[1])}var Ia=Er.slice();for(da=0;da<3;++da){var Fa=da==2?0:da+1,za=Qe(At[da].v[0],Rn[da][0],Rn[Fa][0]);Rn[da][1]<0&&(za=-za),da?da==1?(za=xr-za,Ia[0]-=Rn[da][0]*x(za),Ia[1]-=Rn[da][0]*h(za)):(za=sr-za,Ia[0]+=Rn[da][0]*x(za),Ia[1]+=Rn[da][0]*h(za)):(Ia[0]+=Rn[da][0]*x(za),Ia[1]-=Rn[da][0]*h(za))}return Ia[0]/=3,Ia[1]/=3,Ia}return _r}function pe(Je){return Je[0]*=S,Je[1]*=S,Je}function we(){return Ae([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ae(Je,ot,bt){var At=(0,ze.Z)({type:"MultiPoint",coordinates:[Je,ot,bt]}),Ot=[-At[0],-At[1]],It=(0,rt.Z)(Ot),Ht=Ce(pe(It(Je)),pe(It(ot)),pe(It(bt)));Ht.invert=Ee(Ht);var dr=(0,d.Z)(Ht).rotate(Ot),xr=dr.center;return delete dr.rotate,dr.center=function(sr){return arguments.length?xr(It(sr)):It.invert(xr())},dr.clipAngle(90)}function Pe(Je,ot){var bt=O(1-h(ot));return[2/D*Je*bt,D*(1-bt)]}Pe.invert=function(Je,ot){var bt=(bt=ot/D-1)*bt;return[bt>0?Je*O(c/bt)/2:0,R(1-bt)]};function Ge(){return(0,d.Z)(Pe).scale(95.6464).center([0,30])}function We(Je){var ot=b(Je);function bt(At,Ot){return[At,(At?At/h(At):1)*(h(Ot)*x(At)-ot*x(Ot))]}return bt.invert=ot?function(At,Ot){At&&(Ot*=h(At)/At);var It=x(At);return[At,2*_(O(It*It+ot*ot-Ot*Ot)-It,ot-Ot)]}:function(At,Ot){return[At,R(At?Ot*b(At)/At:Ot)]},bt}function tt(){return st(We).scale(249.828).clipAngle(90)}var ct=O(3);function St(Je,ot){return[ct*Je*(2*x(2*ot/3)-1)/D,ct*D*h(ot/3)]}St.invert=function(Je,ot){var bt=3*R(ot/(ct*D));return[D*Je/(ct*(2*x(2*bt/3)-1)),bt]};function Pt(){return(0,d.Z)(St).scale(156.19)}function wt(Je){var ot=x(Je);function bt(At,Ot){return[At*ot,h(Ot)/ot]}return bt.invert=function(At,Ot){return[At/ot,R(Ot*ot)]},bt}function Bt(){return st(wt).parallel(38.58).scale(195.044)}function Wt(Je){var ot=x(Je);function bt(At,Ot){return[At*ot,(1+ot)*b(Ot/2)]}return bt.invert=function(At,Ot){return[At/ot,a(Ot/(1+ot))*2]},bt}function hr(){return st(Wt).scale(124.75)}function gt(Je,ot){var bt=O(8/(3*c));return[bt*Je*(1-P(ot)/c),bt*ot]}gt.invert=function(Je,ot){var bt=O(8/(3*c)),At=ot/bt;return[Je/(bt*(1-P(At)/c)),At]};function jt(){return(0,d.Z)(gt).scale(165.664)}function Ut(Je,ot){var bt=O(4-3*h(P(ot)));return[2/O(6*c)*Je*bt,g(ot)*O(2*c/3)*(2-bt)]}Ut.invert=function(Je,ot){var bt=2-P(ot)/O(2*c/3);return[Je*O(6*c)/(2*bt),g(ot)*R((4-bt*bt)/3)]};function or(){return(0,d.Z)(Ut).scale(165.664)}function ur(Je,ot){var bt=O(c*(4+c));return[2/bt*Je*(1+O(1-4*ot*ot/(c*c))),4/bt*ot]}ur.invert=function(Je,ot){var bt=O(c*(4+c))/2;return[Je*bt/(1+O(1-ot*ot*(4+c)/(4*c))),ot*bt/2]};function dt(){return(0,d.Z)(ur).scale(180.739)}function ut(Je,ot){var bt=(2+l)*h(ot);ot/=2;for(var At=0,Ot=1/0;At<10&&P(Ot)>p;At++){var It=x(ot);ot-=Ot=(ot+h(ot)*(It+2)-bt)/(2*It*(1+It))}return[2/O(c*(4+c))*Je*(1+x(ot)),2*O(c/(4+c))*h(ot)]}ut.invert=function(Je,ot){var bt=ot*O((4+c)/c)/2,At=R(bt),Ot=x(At);return[Je/(2/O(c*(4+c))*(1+Ot)),R((At+bt*(Ot+2))/(2+l))]};function yt(){return(0,d.Z)(ut).scale(180.739)}function Lt(Je,ot){return[Je*(1+x(ot))/O(2+c),2*ot/O(2+c)]}Lt.invert=function(Je,ot){var bt=O(2+c),At=ot*bt/2;return[bt*Je/(1+x(At)),At]};function Rt(){return(0,d.Z)(Lt).scale(173.044)}function Nt(Je,ot){for(var bt=(1+l)*h(ot),At=0,Ot=1/0;At<10&&P(Ot)>p;At++)ot-=Ot=(ot+h(ot)-bt)/(1+x(ot));return bt=O(2+c),[Je*(1+x(ot))/bt,2*ot/bt]}Nt.invert=function(Je,ot){var bt=1+l,At=O(bt/2);return[Je*2*At/(1+x(ot*=At)),R((ot+h(ot))/bt)]};function Vt(){return(0,d.Z)(Nt).scale(173.044)}var Zt=3+2*L;function qt(Je,ot){var bt=h(Je/=2),At=x(Je),Ot=O(x(ot)),It=x(ot/=2),Ht=h(ot)/(It+L*At*Ot),dr=O(2/(1+Ht*Ht)),xr=O((L*It+(At+bt)*Ot)/(L*It+(At-bt)*Ot));return[Zt*(dr*(xr-1/xr)-2*r(xr)),Zt*(dr*Ht*(xr+1/xr)-2*a(Ht))]}qt.invert=function(Je,ot){if(!(It=ce.invert(Je/1.2,ot*1.065)))return null;var bt=It[0],At=It[1],Ot=20,It;Je/=Zt,ot/=Zt;do{var Ht=bt/2,dr=At/2,xr=h(Ht),sr=x(Ht),Er=h(dr),_r=x(dr),Yr=x(At),$r=O(Yr),gn=Er/(_r+L*sr*$r),bn=gn*gn,Rn=O(2/(1+bn)),da=L*_r+(sr+xr)*$r,_a=L*_r+(sr-xr)*$r,Ia=da/_a,Fa=O(Ia),za=Fa-1/Fa,ci=Fa+1/Fa,Bi=Rn*za-2*r(Fa)-Je,Ti=Rn*gn*ci-2*a(gn)-ot,he=Er&&M*$r*xr*bn/Er,_e=(L*sr*_r+$r)/(2*(_r+L*sr*$r)*(_r+L*sr*$r)*$r),He=-.5*gn*Rn*Rn*Rn,qe=He*he,at=He*_e,ft=(ft=2*_r+L*$r*(sr-xr))*ft*Fa,Ft=(L*sr*_r*$r+Yr)/ft,xt=-(L*xr*Er)/($r*ft),Xt=za*qe-2*Ft/Fa+Rn*(Ft+Ft/Ia),rr=za*at-2*xt/Fa+Rn*(xt+xt/Ia),ar=gn*ci*qe-2*he/(1+bn)+Rn*ci*he+Rn*gn*(Ft-Ft/Ia),Pr=gn*ci*at-2*_e/(1+bn)+Rn*ci*_e+Rn*gn*(xt-xt/Ia),Cr=rr*ar-Pr*Xt;if(!Cr)break;var jr=(Ti*rr-Bi*Pr)/Cr,en=(Bi*ar-Ti*Xt)/Cr;bt-=jr,At=n(-l,u(l,At-en))}while((P(jr)>p||P(en)>p)&&--Ot>0);return P(P(At)-l)<p?[0,At]:Ot&&[bt,At]};function Jt(){return(0,d.Z)(qt).scale(62.5271)}var nr=x(35*S);function Mr(Je,ot){var bt=b(ot/2);return[Je*nr*O(1-bt*bt),(1+nr)*bt]}Mr.invert=function(Je,ot){var bt=ot/(1+nr);return[Je&&Je/(nr*O(1-bt*bt)),2*a(bt)]};function Ke(){return(0,d.Z)(Mr).scale(137.152)}function Ze(Je,ot){var bt=ot/2,At=x(bt);return[2*Je/D*x(ot)*At*At,D*b(bt)]}Ze.invert=function(Je,ot){var bt=a(ot/D),At=x(bt),Ot=2*bt;return[Je*D/2/(x(Ot)*At*At),Ot]};function zt(){return(0,d.Z)(Ze).scale(135.264)}function kt(Je){var ot=1-Je,bt=It(c,0)[0]-It(-c,0)[0],At=It(0,l)[1]-It(0,-l)[1],Ot=O(2*At/bt);function It(xr,sr){var Er=x(sr),_r=h(sr);return[Er/(ot+Je*Er)*xr,ot*sr+Je*_r]}function Ht(xr,sr){var Er=It(xr,sr);return[Er[0]*Ot,Er[1]/Ot]}function dr(xr){return Ht(0,xr)[1]}return Ht.invert=function(xr,sr){var Er=Re(dr,sr),_r=xr/Ot*(Je+ot/x(Er));return[_r,Er]},Ht}function Qt(){var Je=.5,ot=(0,d.r)(kt),bt=ot(Je);return bt.alpha=function(At){return arguments.length?ot(Je=+At):Je},bt.scale(168.725)}var cr=e(57962),fr=e(97492);function ir(Je){return[Je[0]/2,R(b(Je[1]/2*S))*C]}function Yt(Je){return[Je[0]*2,2*a(h(Je[1]*S))*C]}function gr(Je){Je==null&&(Je=cr.Z);var ot=Je(),bt=(0,fr.Z)().scale(C).precision(0).clipAngle(null).translate([0,0]);function At(It){return ot(ir(It))}ot.invert&&(At.invert=function(It){return Yt(ot.invert(It))}),At.stream=function(It){var Ht=ot.stream(It),dr=bt.stream({point:function(xr,sr){Ht.point(xr/2,R(b(-sr/2*S))*C)},lineStart:function(){Ht.lineStart()},lineEnd:function(){Ht.lineEnd()},polygonStart:function(){Ht.polygonStart()},polygonEnd:function(){Ht.polygonEnd()}});return dr.sphere=Ht.sphere,dr};function Ot(It){At[It]=function(){return arguments.length?(ot[It].apply(ot,arguments),At):ot[It]()}}return At.rotate=function(It){return arguments.length?(bt.rotate(It),At):bt.rotate()},At.center=function(It){return arguments.length?(ot.center(ir(It)),At):Yt(ot.center())},Ot("angle"),Ot("clipAngle"),Ot("clipExtent"),Ot("fitExtent"),Ot("fitHeight"),Ot("fitSize"),Ot("fitWidth"),Ot("scale"),Ot("translate"),Ot("precision"),At.scale(249.5)}function yr(Je,ot){var bt=2*c/ot,At=Je*Je;function Ot(It,Ht){var dr=(0,fe.N)(It,Ht),xr=dr[0],sr=dr[1],Er=xr*xr+sr*sr;if(Er>At){var _r=O(Er),Yr=_(sr,xr),$r=bt*f(Yr/bt),gn=Yr-$r,bn=Je*x(gn),Rn=(Je*h(gn)-gn*h(bn))/(l-bn),da=Tr(gn,Rn),_a=(c-Je)/pr(da,bn,c);xr=_r;var Ia=50,Fa;do xr-=Fa=(Je+pr(da,bn,xr)*_a-_r)/(da(xr)*_a);while(P(Fa)>p&&--Ia>0);sr=gn*h(xr),xr<l&&(sr-=Rn*(xr-l));var za=h($r),ci=x($r);dr[0]=xr*ci-sr*za,dr[1]=xr*za+sr*ci}return dr}return Ot.invert=function(It,Ht){var dr=It*It+Ht*Ht;if(dr>At){var xr=O(dr),sr=_(Ht,It),Er=bt*f(sr/bt),_r=sr-Er;It=xr*x(_r),Ht=xr*h(_r);for(var Yr=It-l,$r=h(It),gn=Ht/$r,bn=It<l?1/0:0,Rn=10;;){var da=Je*h(gn),_a=Je*x(gn),Ia=h(_a),Fa=l-_a,za=(da-gn*Ia)/Fa,ci=Tr(gn,za);if(P(bn)<E||!--Rn)break;gn-=bn=(gn*$r-za*Yr-Ht)/($r-Yr*2*(Fa*(_a+gn*da*x(_a)-Ia)-da*(da-gn*Ia))/(Fa*Fa))}xr=Je+pr(ci,_a,It)*(c-Je)/pr(ci,_a,c),sr=Er+gn,It=xr*x(sr),Ht=xr*h(sr)}return fe.N.invert(It,Ht)},Ot}function Tr(Je,ot){return function(bt){var At=Je*x(bt);return bt<l&&(At-=ot),O(1+At*At)}}function pr(Je,ot,bt){for(var At=50,Ot=(bt-ot)/At,It=Je(ot)+Je(bt),Ht=1,dr=ot;Ht<At;++Ht)It+=2*Je(dr+=Ot);return It*.5*Ot}function Kr(){var Je=6,ot=30*S,bt=x(ot),At=h(ot),Ot=(0,d.r)(yr),It=Ot(ot,Je),Ht=It.stream,dr=.01,xr=-x(dr*S),sr=h(dr*S);return It.radius=function(Er){return arguments.length?(bt=x(ot=Er*S),At=h(ot),Ot(ot,Je)):ot*C},It.lobes=function(Er){return arguments.length?Ot(ot,Je=+Er):Je},It.stream=function(Er){var _r=It.rotate(),Yr=Ht(Er),$r=(It.rotate([0,0]),Ht(Er));return It.rotate(_r),Yr.sphere=function(){$r.polygonStart(),$r.lineStart();for(var gn=0,bn=2*c/Je,Rn=0;gn<Je;++gn,Rn-=bn)$r.point(_(sr*x(Rn),xr)*C,R(sr*h(Rn))*C),$r.point(_(At*x(Rn-bn/2),bt)*C,R(At*h(Rn-bn/2))*C);$r.lineEnd(),$r.polygonEnd()},Yr},It.rotate([90,-40]).scale(91.7095).clipAngle(179.999)}function Or(Je,ot,bt,At,Ot,It,Ht,dr){arguments.length<8&&(dr=0);function xr(sr,Er){if(!Er)return[Je*sr/c,0];var _r=Er*Er,Yr=Je+_r*(ot+_r*(bt+_r*At)),$r=Er*(Ot-1+_r*(It-dr+_r*Ht)),gn=(Yr*Yr+$r*$r)/(2*$r),bn=sr*R(Yr/gn)/c;return[gn*h(bn),Er*(1+_r*dr)+gn*(1-x(bn))]}return xr.invert=function(sr,Er){var _r=c*sr/Je,Yr=Er,$r,gn,bn=50;do{var Rn=Yr*Yr,da=Je+Rn*(ot+Rn*(bt+Rn*At)),_a=Yr*(Ot-1+Rn*(It-dr+Rn*Ht)),Ia=da*da+_a*_a,Fa=2*_a,za=Ia/Fa,ci=za*za,Bi=R(da/za)/c,Ti=_r*Bi,he=da*da,_e=(2*ot+Rn*(4*bt+Rn*6*At))*Yr,He=Ot+Rn*(3*It+Rn*5*Ht),qe=2*(da*_e+_a*(He-1)),at=2*(He-1),ft=(qe*Fa-Ia*at)/(Fa*Fa),Ft=x(Ti),xt=h(Ti),Xt=za*Ft,rr=za*xt,ar=_r/c*(1/O(1-he/ci))*(_e*za-da*ft)/ci,Pr=rr-sr,Cr=Yr*(1+Rn*dr)+za-Xt-Er,jr=ft*xt+Xt*ar,en=Xt*Bi,Ir=1+ft-(ft*Ft-rr*ar),Hr=rr*Bi,Xr=jr*Hr-Ir*en;if(!Xr)break;_r-=$r=(Cr*jr-Pr*Ir)/Xr,Yr-=gn=(Pr*Hr-Cr*en)/Xr}while((P($r)>p||P(gn)>p)&&--bn>0);return[_r,Yr]},xr}var Nr=Or(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Sn(){return(0,d.Z)(Nr).scale(149.995)}var Jr=Or(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function xn(){return(0,d.Z)(Jr).scale(153.93)}var Dn=Or(5/6*c,-.62636,-.0344,0,1.3493,-.05524,0,.045);function mr(){return(0,d.Z)(Dn).scale(130.945)}function Ar(Je,ot){var bt=Je*Je,At=ot*ot;return[Je*(1-.162388*At)*(.87-952426e-9*bt*bt),ot*(1+At/12)]}Ar.invert=function(Je,ot){var bt=Je,At=ot,Ot=50,It;do{var Ht=At*At;At-=It=(At*(1+Ht/12)-ot)/(1+Ht/4)}while(P(It)>p&&--Ot>0);Ot=50,Je/=1-.162388*Ht;do{var dr=(dr=bt*bt)*dr;bt-=It=(bt*(.87-952426e-9*dr)-Je)/(.87-.00476213*dr)}while(P(It)>p&&--Ot>0);return[bt,At]};function zr(){return(0,d.Z)(Ar).scale(131.747)}var Br=Or(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function on(){return(0,d.Z)(Br).scale(131.087)}function mn(Je){var ot=Je(l,0)[0]-Je(-l,0)[0];function bt(At,Ot){var It=At>0?-.5:.5,Ht=Je(At+It*c,Ot);return Ht[0]-=It*ot,Ht}return Je.invert&&(bt.invert=function(At,Ot){var It=At>0?-.5:.5,Ht=Je.invert(At+It*ot,Ot),dr=Ht[0]-It*c;return dr<-c?dr+=2*c:dr>c&&(dr-=2*c),Ht[0]=dr,Ht}),bt}function Tn(Je,ot){var bt=g(Je),At=g(ot),Ot=x(ot),It=x(Je)*Ot,Ht=h(Je)*Ot,dr=h(At*ot);Je=P(_(Ht,dr)),ot=R(It),P(Je-l)>p&&(Je%=l);var xr=An(Je>c/4?l-Je:Je,ot);return Je>c/4&&(dr=xr[0],xr[0]=-xr[1],xr[1]=-dr),xr[0]*=bt,xr[1]*=-At,xr}Tn.invert=function(Je,ot){P(Je)>1&&(Je=g(Je)*2-Je),P(ot)>1&&(ot=g(ot)*2-ot);var bt=g(Je),At=g(ot),Ot=-bt*Je,It=-At*ot,Ht=It/Ot<1,dr=Fn(Ht?It:Ot,Ht?Ot:It),xr=dr[0],sr=dr[1],Er=x(sr);return Ht&&(xr=-l-xr),[bt*(_(h(xr)*Er,-h(sr))+c),At*R(x(xr)*Er)]};function An(Je,ot){if(ot===l)return[0,0];var bt=h(ot),At=bt*bt,Ot=At*At,It=1+Ot,Ht=1+3*Ot,dr=1-Ot,xr=R(1/O(It)),sr=dr+At*It*xr,Er=(1-bt)/sr,_r=O(Er),Yr=Er*It,$r=O(Yr),gn=_r*dr,bn,Rn;if(Je===0)return[0,-(gn+At*$r)];var da=x(ot),_a=1/da,Ia=2*bt*da,Fa=(-3*At+xr*Ht)*Ia,za=(-sr*da-(1-bt)*Fa)/(sr*sr),ci=.5*za/_r,Bi=dr*ci-2*At*_r*Ia,Ti=At*It*za+Er*Ht*Ia,he=-_a*Ia,_e=-_a*Ti,He=-2*_a*Bi,qe=4*Je/c,at;if(Je>.222*c||ot<c/4&&Je>.175*c){if(bn=(gn+At*O(Yr*(1+Ot)-gn*gn))/(1+Ot),Je>c/4)return[bn,bn];var ft=bn,Ft=.5*bn;bn=.5*(Ft+ft),Rn=50;do{var xt=O(Yr-bn*bn),Xt=bn*(He+he*xt)+_e*R(bn/$r)-qe;if(!Xt)break;Xt<0?Ft=bn:ft=bn,bn=.5*(Ft+ft)}while(P(ft-Ft)>p&&--Rn>0)}else{bn=p,Rn=25;do{var rr=bn*bn,ar=O(Yr-rr),Pr=He+he*ar,Cr=bn*Pr+_e*R(bn/$r)-qe,jr=Pr+(_e-he*rr)/ar;bn-=at=ar?Cr/jr:0}while(P(at)>p&&--Rn>0)}return[bn,-gn-At*O(Yr-bn*bn)]}function Fn(Je,ot){for(var bt=0,At=1,Ot=.5,It=50;;){var Ht=Ot*Ot,dr=O(Ot),xr=R(1/O(1+Ht)),sr=1-Ht+Ot*(1+Ht)*xr,Er=(1-dr)/sr,_r=O(Er),Yr=Er*(1+Ht),$r=_r*(1-Ht),gn=Yr-Je*Je,bn=O(gn),Rn=ot+$r+Ot*bn;if(P(At-bt)<E||--It===0||Rn===0)break;Rn>0?bt=Ot:At=Ot,Ot=.5*(bt+At)}if(!It)return null;var da=R(dr),_a=x(da),Ia=1/_a,Fa=2*dr*_a,za=(-3*Ot+xr*(1+3*Ht))*Fa,ci=(-sr*_a-(1-dr)*za)/(sr*sr),Bi=.5*ci/_r,Ti=(1-Ht)*Bi-2*Ot*_r*Fa,he=-2*Ia*Ti,_e=-Ia*Fa,He=-Ia*(Ot*(1+Ht)*ci+Er*(1+3*Ht)*Fa);return[c/4*(Je*(he+_e*bn)+He*R(Je/O(Yr))),da]}function Jn(){return(0,d.Z)(mn(Tn)).scale(239.75)}function ta(Je,ot,bt){var At,Ot,It;return Je?(At=sa(Je,bt),ot?(Ot=sa(ot,1-bt),It=Ot[1]*Ot[1]+bt*At[0]*At[0]*Ot[0]*Ot[0],[[At[0]*Ot[2]/It,At[1]*At[2]*Ot[0]*Ot[1]/It],[At[1]*Ot[1]/It,-At[0]*At[2]*Ot[0]*Ot[2]/It],[At[2]*Ot[1]*Ot[2]/It,-bt*At[0]*At[1]*Ot[0]/It]]):[[At[0],0],[At[1],0],[At[2],0]]):(Ot=sa(ot,1-bt),[[0,Ot[0]/Ot[1]],[1/Ot[1],0],[Ot[2]/Ot[1],0]])}function sa(Je,ot){var bt,At,Ot,It,Ht;if(ot<p)return It=h(Je),At=x(Je),bt=ot*(Je-It*At)/4,[It-bt*At,At+bt*It,1-ot*It*It/2,Je-bt];if(ot>=1-p)return bt=(1-ot)/4,At=k(Je),It=N(Je),Ot=1/At,Ht=At*H(Je),[It+bt*(Ht-Je)/(At*At),Ot-bt*It*Ot*(Ht-Je),Ot+bt*It*Ot*(Ht+Je),2*a(v(Je))-l+bt*(Ht-Je)/At];var dr=[1,0,0,0,0,0,0,0,0],xr=[O(ot),0,0,0,0,0,0,0,0],sr=0;for(At=O(1-ot),Ht=1;P(xr[sr]/dr[sr])>p&&sr<8;)bt=dr[sr++],xr[sr]=(bt-At)/2,dr[sr]=(bt+At)/2,At=O(bt*At),Ht*=2;Ot=Ht*dr[sr]*Je;do It=xr[sr]*h(At=Ot)/dr[sr],Ot=(R(It)+Ot)/2;while(--sr);return[h(Ot),It=x(Ot),It/x(Ot-At),Ot]}function ha(Je,ot,bt){var At=P(Je),Ot=P(ot),It=H(Ot);if(At){var Ht=1/h(At),dr=1/(b(At)*b(At)),xr=-(dr+bt*(It*It*Ht*Ht)-1+bt),sr=(bt-1)*dr,Er=(-xr+O(xr*xr-4*sr))/2;return[la(a(1/O(Er)),bt)*g(Je),la(a(O((Er/dr-1)/bt)),1-bt)*g(ot)]}return[0,la(a(It),1-bt)*g(ot)]}function la(Je,ot){if(!ot)return Je;if(ot===1)return r(b(Je/2+m));for(var bt=1,At=O(1-ot),Ot=O(ot),It=0;P(Ot)>p;It++){if(Je%c){var Ht=a(At*b(Je)/bt);Ht<0&&(Ht+=c),Je+=Ht+~~(Je/c)*c}else Je+=Je;Ot=(bt+At)/2,At=O(bt*At),Ot=((bt=Ot)-At)/2}return Je/(i(2,It)*bt)}function Dr(Je,ot){var bt=(L-1)/(L+1),At=O(1-bt*bt),Ot=la(l,At*At),It=-1,Ht=r(b(c/4+P(ot)/2)),dr=v(It*Ht)/O(bt),xr=sn(dr*x(It*Je),dr*h(It*Je)),sr=ha(xr[0],xr[1],At*At);return[-sr[1],(ot>=0?1:-1)*(.5*Ot-sr[0])]}function sn(Je,ot){var bt=Je*Je,At=ot+1,Ot=1-bt-ot*ot;return[.5*((Je>=0?l:-l)-_(Ot,2*Je)),-.25*r(Ot*Ot+4*bt)+.5*r(At*At+bt)]}function nn(Je,ot){var bt=ot[0]*ot[0]+ot[1]*ot[1];return[(Je[0]*ot[0]+Je[1]*ot[1])/bt,(Je[1]*ot[0]-Je[0]*ot[1])/bt]}Dr.invert=function(Je,ot){var bt=(L-1)/(L+1),At=O(1-bt*bt),Ot=la(l,At*At),It=-1,Ht=ta(.5*Ot-ot,-Je,At*At),dr=nn(Ht[0],Ht[1]),xr=_(dr[1],dr[0])/It;return[xr,2*a(v(.5/It*r(bt*dr[0]*dr[0]+bt*dr[1]*dr[1])))-l]};function dn(){return(0,d.Z)(mn(Dr)).scale(151.496)}var Un=e(7613);function Ln(Je){var ot=h(Je),bt=x(Je),At=Pn(Je);At.invert=Pn(-Je);function Ot(It,Ht){var dr=At(It,Ht);It=dr[0],Ht=dr[1];var xr=h(Ht),sr=x(Ht),Er=x(It),_r=T(ot*xr+bt*sr*Er),Yr=h(_r),$r=P(Yr)>p?_r/Yr:1;return[$r*bt*h(It),(P(It)>l?$r:-$r)*(ot*sr-bt*xr*Er)]}return Ot.invert=function(It,Ht){var dr=O(It*It+Ht*Ht),xr=-h(dr),sr=x(dr),Er=dr*sr,_r=-Ht*xr,Yr=dr*ot,$r=O(Er*Er+_r*_r-Yr*Yr),gn=_(Er*Yr+_r*$r,_r*Yr-Er*$r),bn=(dr>l?-1:1)*_(It*xr,dr*x(gn)*sr+Ht*h(gn)*xr);return At.invert(bn,gn)},Ot}function Pn(Je){var ot=h(Je),bt=x(Je);return function(At,Ot){var It=x(Ot),Ht=x(At)*It,dr=h(At)*It,xr=h(Ot);return[_(dr,Ht*bt-xr*ot),R(xr*bt+Ht*ot)]}}function Vn(){var Je=0,ot=(0,d.r)(Ln),bt=ot(Je),At=bt.rotate,Ot=bt.stream,It=(0,Un.Z)();return bt.parallel=function(Ht){if(!arguments.length)return Je*C;var dr=bt.rotate();return ot(Je=Ht*S).rotate(dr)},bt.rotate=function(Ht){return arguments.length?(At.call(bt,[Ht[0],Ht[1]-Je*C]),It.center([-Ht[0],-Ht[1]]),bt):(Ht=At.call(bt),Ht[1]+=Je*C,Ht)},bt.stream=function(Ht){return Ht=Ot(Ht),Ht.sphere=function(){Ht.polygonStart();var dr=.01,xr=It.radius(90-dr)().coordinates[0],sr=xr.length-1,Er=-1,_r;for(Ht.lineStart();++Er<sr;)Ht.point((_r=xr[Er])[0],_r[1]);for(Ht.lineEnd(),xr=It.radius(90+dr)().coordinates[0],sr=xr.length-1,Ht.lineStart();--Er>=0;)Ht.point((_r=xr[Er])[0],_r[1]);Ht.lineEnd(),Ht.polygonEnd()},Ht},bt.scale(79.4187).parallel(45).clipAngle(179.999)}var aa=e(33064),Da=e(72736),$a=3,$t=R(1-1/$a)*C,Sr=wt(0);function an(Je){var ot=$t*S,bt=Pe(c,ot)[0]-Pe(-c,ot)[0],At=Sr(0,ot)[1],Ot=Pe(0,ot)[1],It=D-Ot,Ht=A/Je,dr=4/A,xr=At+It*It*4/A;function sr(Er,_r){var Yr,$r=P(_r);if($r>ot){var gn=u(Je-1,n(0,y((Er+c)/Ht)));Er+=c*(Je-1)/Je-gn*Ht,Yr=Pe(Er,$r),Yr[0]=Yr[0]*A/bt-A*(Je-1)/(2*Je)+gn*A/Je,Yr[1]=At+(Yr[1]-Ot)*4*It/A,_r<0&&(Yr[1]=-Yr[1])}else Yr=Sr(Er,_r);return Yr[0]*=dr,Yr[1]/=xr,Yr}return sr.invert=function(Er,_r){Er/=dr,_r*=xr;var Yr=P(_r);if(Yr>At){var $r=u(Je-1,n(0,y((Er+c)/Ht)));Er=(Er+c*(Je-1)/Je-$r*Ht)*bt/A;var gn=Pe.invert(Er,.25*(Yr-At)*A/It+Ot);return gn[0]-=c*(Je-1)/Je-$r*Ht,_r<0&&(gn[1]=-gn[1]),gn}return Sr.invert(Er,_r)},sr}function cn(Je,ot){return[Je,ot&1?90-p:$t]}function hn(Je,ot){return[Je,ot&1?-90+p:-$t]}function _n(Je){return[Je[0]*(1-p),Je[1]]}function wn(Je){var ot=[].concat((0,aa.w6)(-180,180+Je/2,Je).map(cn),(0,aa.w6)(180,-180-Je/2,-Je).map(hn));return{type:"Polygon",coordinates:[Je===180?ot.map(_n):ot]}}function fn(){var Je=4,ot=(0,d.r)(an),bt=ot(Je),At=bt.stream;return bt.lobes=function(Ot){return arguments.length?ot(Je=+Ot):Je},bt.stream=function(Ot){var It=bt.rotate(),Ht=At(Ot),dr=(bt.rotate([0,0]),At(Ot));return bt.rotate(It),Ht.sphere=function(){(0,Da.Z)(wn(180/Je),dr)},Ht},bt.scale(239.75)}function Rr(Je){var ot=1+Je,bt=h(1/ot),At=R(bt),Ot=2*O(c/(It=c+4*At*ot)),It,Ht=.5*Ot*(ot+O(Je*(2+Je))),dr=Je*Je,xr=ot*ot;function sr(Er,_r){var Yr=1-h(_r),$r,gn;if(Yr&&Yr<2){var bn=l-_r,Rn=25,da;do{var _a=h(bn),Ia=x(bn),Fa=At+_(_a,ot-Ia),za=1+xr-2*ot*Ia;bn-=da=(bn-dr*At-ot*_a+za*Fa-.5*Yr*It)/(2*ot*_a*Fa)}while(P(da)>E&&--Rn>0);$r=Ot*O(za),gn=Er*Fa/c}else $r=Ot*(Je+Yr),gn=Er*At/c;return[$r*h(gn),Ht-$r*x(gn)]}return sr.invert=function(Er,_r){var Yr=Er*Er+(_r-=Ht)*_r,$r=(1+xr-Yr/(Ot*Ot))/(2*ot),gn=T($r),bn=h(gn),Rn=At+_(bn,ot-$r);return[R(Er/O(Yr))*c/Rn,R(1-2*(gn-dr*At-ot*bn+(1+xr-2*ot*$r)*Rn)/It)]},sr}function Lr(){var Je=1,ot=(0,d.r)(Rr),bt=ot(Je);return bt.ratio=function(At){return arguments.length?ot(Je=+At):Je},bt.scale(167.774).center([0,18.67])}var kr=.7109889596207567,vn=.0528035274542;function kn(Je,ot){return ot>-kr?(Je=De(Je,ot),Je[1]+=vn,Je):it(Je,ot)}kn.invert=function(Je,ot){return ot>-kr?De.invert(Je,ot-vn):it.invert(Je,ot)};function Yn(){return(0,d.Z)(kn).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function pn(Je,ot){return P(ot)>kr?(Je=De(Je,ot),Je[1]-=ot>0?vn:-vn,Je):it(Je,ot)}pn.invert=function(Je,ot){return P(ot)>kr?De.invert(Je,ot+(ot>0?vn:-vn)):it.invert(Je,ot)};function zn(){return(0,d.Z)(pn).scale(152.63)}function qn(Je,ot,bt,At){var Ot=O(4*c/(2*bt+(1+Je-ot/2)*h(2*bt)+(Je+ot)/2*h(4*bt)+ot/2*h(6*bt))),It=O(At*h(bt)*O((1+Je*x(2*bt)+ot*x(4*bt))/(1+Je+ot))),Ht=bt*xr(1);function dr(_r){return O(1+Je*x(2*_r)+ot*x(4*_r))}function xr(_r){var Yr=_r*bt;return(2*Yr+(1+Je-ot/2)*h(2*Yr)+(Je+ot)/2*h(4*Yr)+ot/2*h(6*Yr))/bt}function sr(_r){return dr(_r)*h(_r)}var Er=function(_r,Yr){var $r=bt*Re(xr,Ht*h(Yr)/bt,Yr/c);isNaN($r)&&($r=bt*g(Yr));var gn=Ot*dr($r);return[gn*It*_r/c*x($r),gn/It*h($r)]};return Er.invert=function(_r,Yr){var $r=Re(sr,Yr*It/Ot);return[_r*c/(x($r)*Ot*It*dr($r)),R(bt*xr($r/bt)/Ht)]},bt===0&&(Ot=O(At/c),Er=function(_r,Yr){return[_r*Ot,h(Yr)/Ot]},Er.invert=function(_r,Yr){return[_r/Ot,R(Yr*Ot)]}),Er}function ua(){var Je=1,ot=0,bt=45*S,At=2,Ot=(0,d.r)(qn),It=Ot(Je,ot,bt,At);return It.a=function(Ht){return arguments.length?Ot(Je=+Ht,ot,bt,At):Je},It.b=function(Ht){return arguments.length?Ot(Je,ot=+Ht,bt,At):ot},It.psiMax=function(Ht){return arguments.length?Ot(Je,ot,bt=+Ht*S,At):bt*C},It.ratio=function(Ht){return arguments.length?Ot(Je,ot,bt,At=+Ht):At},It.scale(180.739)}function ia(Je,ot,bt,At,Ot,It,Ht,dr,xr,sr,Er){if(Er.nanEncountered)return NaN;var _r,Yr,$r,gn,bn,Rn,da,_a,Ia,Fa;if(_r=bt-ot,Yr=Je(ot+_r*.25),$r=Je(bt-_r*.25),isNaN(Yr)){Er.nanEncountered=!0;return}if(isNaN($r)){Er.nanEncountered=!0;return}return gn=_r*(At+4*Yr+Ot)/12,bn=_r*(Ot+4*$r+It)/12,Rn=gn+bn,Fa=(Rn-Ht)/15,sr>xr?(Er.maxDepthCount++,Rn+Fa):Math.abs(Fa)<dr?Rn+Fa:(da=ot+_r*.5,_a=ia(Je,ot,da,At,Yr,Ot,gn,dr*.5,xr,sr+1,Er),isNaN(_a)?(Er.nanEncountered=!0,NaN):(Ia=ia(Je,da,bt,Ot,$r,It,bn,dr*.5,xr,sr+1,Er),isNaN(Ia)?(Er.nanEncountered=!0,NaN):_a+Ia))}function oa(Je,ot,bt,At,Ot){var It={maxDepthCount:0,nanEncountered:!1};At===void 0&&(At=1e-8),Ot===void 0&&(Ot=20);var Ht=Je(ot),dr=Je(.5*(ot+bt)),xr=Je(bt),sr=(Ht+4*dr+xr)*(bt-ot)/6,Er=ia(Je,ot,bt,Ht,dr,xr,sr,At,Ot,1,It);return Er}function ga(Je,ot,bt){function At($r){return Je+(1-Je)*i(1-i($r,ot),1/ot)}function Ot($r){return oa(At,0,$r,1e-4)}for(var It=1/Ot(1),Ht=1e3,dr=(1+1e-8)*It,xr=[],sr=0;sr<=Ht;sr++)xr.push(Ot(sr/Ht)*dr);function Er($r){var gn=0,bn=Ht,Rn=Ht>>1;do xr[Rn]>$r?bn=Rn:gn=Rn,Rn=gn+bn>>1;while(Rn>gn);var da=xr[Rn+1]-xr[Rn];return da&&(da=($r-xr[Rn+1])/da),(Rn+1+da)/Ht}var _r=2*Er(1)/c*It/bt,Yr=function($r,gn){var bn=Er(P(h(gn))),Rn=At(bn)*$r;return bn/=_r,[Rn,gn>=0?bn:-bn]};return Yr.invert=function($r,gn){var bn;return gn*=_r,P(gn)<1&&(bn=g(gn)*R(Ot(P(gn))*It)),[$r/At(P(gn)),bn]},Yr}function uo(){var Je=0,ot=2.5,bt=1.183136,At=(0,d.r)(ga),Ot=At(Je,ot,bt);return Ot.alpha=function(It){return arguments.length?At(Je=+It,ot,bt):Je},Ot.k=function(It){return arguments.length?At(Je,ot=+It,bt):ot},Ot.gamma=function(It){return arguments.length?At(Je,ot,bt=+It):bt},Ot.scale(152.63)}function Co(Je,ot){return P(Je[0]-ot[0])<p&&P(Je[1]-ot[1])<p}function Fo(Je,ot){for(var bt=-1,At=Je.length,Ot=Je[0],It,Ht,dr,xr=[];++bt<At;){It=Je[bt],Ht=(It[0]-Ot[0])/ot,dr=(It[1]-Ot[1])/ot;for(var sr=0;sr<ot;++sr)xr.push([Ot[0]+sr*Ht,Ot[1]+sr*dr]);Ot=It}return xr.push(It),xr}function Ho(Je){var ot=[],bt,At,Ot,It,Ht,dr,xr,sr=Je[0].length;for(xr=0;xr<sr;++xr)bt=Je[0][xr],At=bt[0][0],Ot=bt[0][1],It=bt[1][1],Ht=bt[2][0],dr=bt[2][1],ot.push(Fo([[At+p,Ot+p],[At+p,It-p],[Ht-p,It-p],[Ht-p,dr+p]],30));for(xr=Je[1].length-1;xr>=0;--xr)bt=Je[1][xr],At=bt[0][0],Ot=bt[0][1],It=bt[1][1],Ht=bt[2][0],dr=bt[2][1],ot.push(Fo([[Ht-p,dr-p],[Ht-p,It+p],[At+p,It+p],[At+p,Ot-p]],30));return{type:"Polygon",coordinates:[(0,aa.TS)(ot)]}}function ko(Je,ot,bt){var At,Ot;function It(xr,sr){for(var Er=sr<0?-1:1,_r=ot[+(sr<0)],Yr=0,$r=_r.length-1;Yr<$r&&xr>_r[Yr][2][0];++Yr);var gn=Je(xr-_r[Yr][1][0],sr);return gn[0]+=Je(_r[Yr][1][0],Er*sr>Er*_r[Yr][0][1]?_r[Yr][0][1]:sr)[0],gn}bt?It.invert=bt(It):Je.invert&&(It.invert=function(xr,sr){for(var Er=Ot[+(sr<0)],_r=ot[+(sr<0)],Yr=0,$r=Er.length;Yr<$r;++Yr){var gn=Er[Yr];if(gn[0][0]<=xr&&xr<gn[1][0]&&gn[0][1]<=sr&&sr<gn[1][1]){var bn=Je.invert(xr-Je(_r[Yr][1][0],0)[0],sr);return bn[0]+=_r[Yr][1][0],Co(It(bn[0],bn[1]),[xr,sr])?bn:null}}});var Ht=(0,d.Z)(It),dr=Ht.stream;return Ht.stream=function(xr){var sr=Ht.rotate(),Er=dr(xr),_r=(Ht.rotate([0,0]),dr(xr));return Ht.rotate(sr),Er.sphere=function(){(0,Da.Z)(At,_r)},Er},Ht.lobes=function(xr){return arguments.length?(At=Ho(xr),ot=xr.map(function(sr){return sr.map(function(Er){return[[Er[0][0]*S,Er[0][1]*S],[Er[1][0]*S,Er[1][1]*S],[Er[2][0]*S,Er[2][1]*S]]})}),Ot=ot.map(function(sr){return sr.map(function(Er){var _r=Je(Er[0][0],Er[0][1])[0],Yr=Je(Er[2][0],Er[2][1])[0],$r=Je(Er[1][0],Er[0][1])[1],gn=Je(Er[1][0],Er[1][1])[1],bn;return $r>gn&&(bn=$r,$r=gn,gn=bn),[[_r,$r],[Yr,gn]]})}),Ht):ot.map(function(sr){return sr.map(function(Er){return[[Er[0][0]*C,Er[0][1]*C],[Er[1][0]*C,Er[1][1]*C],[Er[2][0]*C,Er[2][1]*C]]})})},ot!=null&&Ht.lobes(ot),Ht}var ic=[[[[-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 oi(){return ko(Xe,ic).scale(160.857)}var Yu=[[[[-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 pu(){return ko(pn,Yu).scale(152.63)}var fo=[[[[-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 Vo(){return ko(De,fo).scale(169.529)}var qc=[[[[-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 Xu(){return ko(De,qc).scale(169.529).rotate([20,0])}var Ni=[[[[-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 Zu(){return ko(kn,Ni,Ee).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Qo=[[[[-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 no(){return ko(it,Qo).scale(152.63).rotate([-20,0])}function qo(Je,ot){return[3/A*Je*O(c*c/3-ot*ot),ot]}qo.invert=function(Je,ot){return[A/3*Je/O(c*c/3-ot*ot),ot]};function Lo(){return(0,d.Z)(qo).scale(158.837)}function os(Je){function ot(bt,At){if(P(P(At)-l)<p)return[0,At<0?-2:2];var Ot=h(At),It=i((1+Ot)/(1-Ot),Je/2),Ht=.5*(It+1/It)+x(bt*=Je);return[2*h(bt)/Ht,(It-1/It)/Ht]}return ot.invert=function(bt,At){var Ot=P(At);if(P(Ot-2)<p)return bt?null:[0,g(At)*l];if(Ot>2)return null;bt/=2,At/=2;var It=bt*bt,Ht=At*At,dr=2*At/(1+It+Ht);return dr=i((1+dr)/(1-dr),1/Je),[_(2*bt,1-It-Ht)/Je,R((dr-1)/(dr+1))]},ot}function zs(){var Je=.5,ot=(0,d.r)(os),bt=ot(Je);return bt.spacing=function(At){return arguments.length?ot(Je=+At):Je},bt.scale(124.75)}var rl=c/L;function po(Je,ot){return[Je*(1+O(x(ot)))/2,ot/(x(ot/2)*x(Je/6))]}po.invert=function(Je,ot){var bt=P(Je),At=P(ot),Ot=p,It=l;At<rl?It*=At/rl:Ot+=6*T(rl/At);for(var Ht=0;Ht<25;Ht++){var dr=h(It),xr=O(x(It)),sr=h(It/2),Er=x(It/2),_r=h(Ot/6),Yr=x(Ot/6),$r=.5*Ot*(1+xr)-bt,gn=It/(Er*Yr)-At,bn=xr?-.25*Ot*dr/xr:0,Rn=.5*(1+xr),da=(1+.5*It*sr/Er)/(Er*Yr),_a=It/Er*(_r/6)/(Yr*Yr),Ia=bn*_a-da*Rn,Fa=($r*_a-gn*Rn)/Ia,za=(gn*bn-$r*da)/Ia;if(It-=Fa,Ot-=za,P(Fa)<p&&P(za)<p)break}return[Je<0?-Ot:Ot,ot<0?-It:It]};function eh(){return(0,d.Z)(po).scale(97.2672)}function Ns(Je,ot){var bt=Je*Je,At=ot*ot;return[Je*(.975534+At*(-.119161+bt*-.0143059+At*-.0547009)),ot*(1.00384+bt*(.0802894+At*-.02855+bt*199025e-9)+At*(.0998909+At*-.0491032))]}Ns.invert=function(Je,ot){var bt=g(Je)*c,At=ot/2,Ot=50;do{var It=bt*bt,Ht=At*At,dr=bt*At,xr=bt*(.975534+Ht*(-.119161+It*-.0143059+Ht*-.0547009))-Je,sr=At*(1.00384+It*(.0802894+Ht*-.02855+It*199025e-9)+Ht*(.0998909+Ht*-.0491032))-ot,Er=.975534-Ht*(.119161+3*It*.0143059+Ht*.0547009),_r=-dr*(2*.119161+4*.0547009*Ht+2*.0143059*It),Yr=dr*(2*.0802894+4*199025e-9*It+2*-.02855*Ht),$r=1.00384+It*(.0802894+199025e-9*It)+Ht*(3*(.0998909-.02855*It)-5*.0491032*Ht),gn=_r*Yr-$r*Er,bn=(sr*_r-xr*$r)/gn,Rn=(xr*Yr-sr*Er)/gn;bt-=bn,At-=Rn}while((P(bn)>p||P(Rn)>p)&&--Ot>0);return Ot&&[bt,At]};function go(){return(0,d.Z)(Ns).scale(139.98)}function oc(Je,ot){return[h(Je)/x(ot),b(ot)*x(Je)]}oc.invert=function(Je,ot){var bt=Je*Je,At=ot*ot,Ot=At+1,It=bt+Ot,Ht=Je?M*O((It-O(It*It-4*bt))/bt):1/O(Ot);return[R(Je*Ht),g(ot)*T(Ht)]};function nl(){return(0,d.Z)(oc).scale(144.049).clipAngle(89.999)}function Bs(Je){var ot=x(Je),bt=b(m+Je/2);function At(Ot,It){var Ht=It-Je,dr=P(Ht)<p?Ot*ot:P(dr=m+It/2)<p||P(P(dr)-l)<p?0:Ot*Ht/r(b(dr)/bt);return[dr,Ht]}return At.invert=function(Ot,It){var Ht,dr=It+Je;return[P(It)<p?Ot/ot:P(Ht=m+dr/2)<p||P(P(Ht)-l)<p?0:Ot*r(b(Ht)/bt)/It,dr]},At}function sc(){return st(Bs).parallel(40).scale(158.837)}function lc(Je,ot){return[Je,1.25*r(b(m+.4*ot))]}lc.invert=function(Je,ot){return[Je,2.5*a(v(.8*ot))-.625*c]};function ov(){return(0,d.Z)(lc).scale(108.318)}function ju(Je){var ot=Je.length-1;function bt(At,Ot){for(var It=x(Ot),Ht=2/(1+It*x(At)),dr=Ht*It*h(At),xr=Ht*h(Ot),sr=ot,Er=Je[sr],_r=Er[0],Yr=Er[1],$r;--sr>=0;)Er=Je[sr],_r=Er[0]+dr*($r=_r)-xr*Yr,Yr=Er[1]+dr*Yr+xr*$r;return _r=dr*($r=_r)-xr*Yr,Yr=dr*Yr+xr*$r,[_r,Yr]}return bt.invert=function(At,Ot){var It=20,Ht=At,dr=Ot;do{for(var xr=ot,sr=Je[xr],Er=sr[0],_r=sr[1],Yr=0,$r=0,gn;--xr>=0;)sr=Je[xr],Yr=Er+Ht*(gn=Yr)-dr*$r,$r=_r+Ht*$r+dr*gn,Er=sr[0]+Ht*(gn=Er)-dr*_r,_r=sr[1]+Ht*_r+dr*gn;Yr=Er+Ht*(gn=Yr)-dr*$r,$r=_r+Ht*$r+dr*gn,Er=Ht*(gn=Er)-dr*_r-At,_r=Ht*_r+dr*gn-Ot;var bn=Yr*Yr+$r*$r,Rn,da;Ht-=Rn=(Er*Yr+_r*$r)/bn,dr-=da=(_r*Yr-Er*$r)/bn}while(P(Rn)+P(da)>p*p&&--It>0);if(It){var _a=O(Ht*Ht+dr*dr),Ia=2*a(_a*.5),Fa=h(Ia);return[_(Ht*Fa,_a*x(Ia)),_a?R(dr*Fa/_a):0]}},bt}var sv=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],lv=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],uv=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],uc=[[.9245,0],[0,0],[.01943,0]],fv=[[.721316,0],[0,0],[-.00881625,-.00617325]];function cv(){return Wl(sv,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function th(){return Wl(lv,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function hv(){return Wl(uv,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function vv(){return Wl(uc,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function fc(){return Wl(fv,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Wl(Je,ot){var bt=(0,d.Z)(ju(Je)).rotate(ot).clipAngle(90),At=(0,rt.Z)(ot),Ot=bt.center;return delete bt.rotate,bt.center=function(It){return arguments.length?Ot(At(It)):At.invert(Ot())},bt}var Yl=O(6),gu=O(7);function Lf(Je,ot){var bt=R(7*h(ot)/(3*Yl));return[Yl*Je*(2*x(2*bt/3)-1)/gu,9*h(bt/3)/gu]}Lf.invert=function(Je,ot){var bt=3*R(ot*gu/9);return[Je*gu/(Yl*(2*x(2*bt/3)-1)),R(h(bt)*3*Yl/7)]};function dv(){return(0,d.Z)(Lf).scale(164.859)}function al(Je,ot){for(var bt=(1+M)*h(ot),At=ot,Ot=0,It;Ot<25&&(At-=It=(h(At/2)+h(At)-bt)/(.5*x(At/2)+x(At)),!(P(It)<p));Ot++);return[Je*(1+2*x(At)/x(At/2))/(3*L),2*O(3)*h(At/2)/O(2+L)]}al.invert=function(Je,ot){var bt=ot*O(2+L)/(2*O(3)),At=2*R(bt);return[3*L*Je/(1+2*x(At)/x(At/2)),R((bt+h(At))/(1+M))]};function rh(){return(0,d.Z)(al).scale(188.209)}function cc(Je,ot){for(var bt=O(6/(4+c)),At=(1+c/4)*h(ot),Ot=ot/2,It=0,Ht;It<25&&(Ot-=Ht=(Ot/2+h(Ot)-At)/(.5+x(Ot)),!(P(Ht)<p));It++);return[bt*(.5+x(Ot))*Je/1.5,bt*Ot]}cc.invert=function(Je,ot){var bt=O(6/(4+c)),At=ot/bt;return P(P(At)-l)<p&&(At=At<0?-l:l),[1.5*Je/(bt*(.5+x(At))),R((At/2+h(At))/(1+c/4))]};function pv(){return(0,d.Z)(cc).scale(166.518)}var ss=e(26867);function Xl(Je,ot){var bt=ot*ot,At=bt*bt,Ot=bt*At;return[Je*(.84719-.13063*bt+Ot*Ot*(-.04515+.05494*bt-.02326*At+.00331*Ot)),ot*(1.01183+At*At*(-.02625+.01926*bt-.00396*At))]}Xl.invert=function(Je,ot){var bt=ot,At=25,Ot,It,Ht,dr;do It=bt*bt,Ht=It*It,bt-=Ot=(bt*(1.01183+Ht*Ht*(-.02625+.01926*It-.00396*Ht))-ot)/(1.01183+Ht*Ht*(-.23625+.21186*It+-.05148*Ht));while(P(Ot)>E&&--At>0);return It=bt*bt,Ht=It*It,dr=It*Ht,[Je/(.84719-.13063*It+dr*dr*(-.04515+.05494*It-.02326*Ht+.00331*dr)),bt]};function Ku(){return(0,d.Z)(Xl).scale(175.295)}function yu(Je,ot){return[Je*(1+x(ot))/2,2*(ot-b(ot/2))]}yu.invert=function(Je,ot){for(var bt=ot/2,At=0,Ot=1/0;At<10&&P(Ot)>p;++At){var It=x(ot/2);ot-=Ot=(ot-b(ot/2)-bt)/(1-.5/(It*It))}return[2*Je/(1+x(ot)),ot]};function Us(){return(0,d.Z)(yu).scale(152.63)}var il=[[[[-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 hc(){return ko(le(1/0),il).rotate([20,0]).scale(152.63)}function mu(Je,ot){var bt=h(ot),At=x(ot),Ot=g(Je);if(Je===0||P(ot)===l)return[0,ot];if(ot===0)return[Je,0];if(P(Je)===l)return[Je*At,l*bt];var It=c/(2*Je)-2*Je/c,Ht=2*ot/c,dr=(1-Ht*Ht)/(bt-Ht),xr=It*It,sr=dr*dr,Er=1+xr/sr,_r=1+sr/xr,Yr=(It*bt/dr-It/2)/Er,$r=(sr*bt/xr+dr/2)/_r,gn=Yr*Yr+At*At/Er,bn=$r*$r-(sr*bt*bt/xr+dr*bt-1)/_r;return[l*(Yr+O(gn)*Ot),l*($r+O(bn<0?0:bn)*g(-ot*It)*Ot)]}mu.invert=function(Je,ot){Je/=l,ot/=l;var bt=Je*Je,At=ot*ot,Ot=bt+At,It=c*c;return[Je?(Ot-1+O((1-Ot)*(1-Ot)+4*bt))/(2*Je)*l:0,Re(function(Ht){return Ot*(c*h(Ht)-2*Ht)*c+4*Ht*Ht*(ot-h(Ht))+2*c*Ht-It*ot},0)]};function Al(){return(0,d.Z)(mu).scale(127.267)}var Zi=1.0148,vc=.23185,Pf=-.14499,xu=.02406,nh=Zi,ah=5*vc,bu=7*Pf,wu=9*xu,co=1.790857183;function _f(Je,ot){var bt=ot*ot;return[Je,ot*(Zi+bt*bt*(vc+bt*(Pf+xu*bt)))]}_f.invert=function(Je,ot){ot>co?ot=co:ot<-co&&(ot=-co);var bt=ot,At;do{var Ot=bt*bt;bt-=At=(bt*(Zi+Ot*Ot*(vc+Ot*(Pf+xu*Ot)))-ot)/(nh+Ot*Ot*(ah+Ot*(bu+wu*Ot)))}while(P(At)>p);return[Je,bt]};function gv(){return(0,d.Z)(_f).scale(139.319)}function dc(Je,ot){if(P(ot)<p)return[Je,0];var bt=b(ot),At=Je*h(ot);return[h(At)/bt,ot+(1-x(At))/bt]}dc.invert=function(Je,ot){if(P(ot)<p)return[Je,0];var bt=Je*Je+ot*ot,At=ot*.5,Ot=10,It;do{var Ht=b(At),dr=1/x(At),xr=bt-2*ot*At+At*At;At-=It=(Ht*xr+2*(At-ot))/(2+xr*dr*dr+2*(At-ot)*Ht)}while(P(It)>p&&--Ot>0);return Ht=b(At),[(P(ot)<P(At+1/Ht)?R(Je*Ht):g(ot)*g(Je)*(T(P(Je*Ht))+l))/h(At),At]};function yv(){return(0,d.Z)(dc).scale(103.74)}var Rf=e(77338),Ju=e(83074);function pc(Je,ot){var bt=yc(Je[1],Je[0]),At=yc(ot[1],ot[0]),Ot=mc(bt,At),It=Df(bt)/Df(At);return $u([1,0,Je[0][0],0,1,Je[0][1]],$u([It,0,0,0,It,0],$u([x(Ot),h(Ot),0,-h(Ot),x(Ot),0],[1,0,-ot[0][0],0,1,-ot[0][1]])))}function gc(Je){var ot=1/(Je[0]*Je[4]-Je[1]*Je[3]);return[ot*Je[4],-ot*Je[1],ot*(Je[1]*Je[5]-Je[2]*Je[4]),-ot*Je[3],ot*Je[0],ot*(Je[2]*Je[3]-Je[0]*Je[5])]}function $u(Je,ot){return[Je[0]*ot[0]+Je[1]*ot[3],Je[0]*ot[1]+Je[1]*ot[4],Je[0]*ot[2]+Je[1]*ot[5]+Je[2],Je[3]*ot[0]+Je[4]*ot[3],Je[3]*ot[1]+Je[4]*ot[4],Je[3]*ot[2]+Je[4]*ot[5]+Je[5]]}function yc(Je,ot){return[Je[0]-ot[0],Je[1]-ot[1]]}function Df(Je){return O(Je[0]*Je[0]+Je[1]*Je[1])}function mc(Je,ot){return _(Je[0]*ot[1]-Je[1]*ot[0],Je[0]*ot[0]+Je[1]*ot[1])}function wi(Je,ot,bt){At(Je,{transform:null});function At(sr,Er){if(sr.edges=Zl(sr.face),Er.face){var _r=sr.shared=Tu(sr.face,Er.face),Yr=pc(_r.map(Er.project),_r.map(sr.project));sr.transform=Er.transform?$u(Er.transform,Yr):Yr;for(var $r=Er.edges,gn=0,bn=$r.length;gn<bn;++gn)xs(_r[0],$r[gn][1])&&xs(_r[1],$r[gn][0])&&($r[gn]=sr),xs(_r[0],$r[gn][0])&&xs(_r[1],$r[gn][1])&&($r[gn]=sr);for($r=sr.edges,gn=0,bn=$r.length;gn<bn;++gn)xs(_r[0],$r[gn][0])&&xs(_r[1],$r[gn][1])&&($r[gn]=Er),xs(_r[0],$r[gn][1])&&xs(_r[1],$r[gn][0])&&($r[gn]=Er)}else sr.transform=Er.transform;return sr.children&&sr.children.forEach(function(Rn){At(Rn,sr)}),sr}function Ot(sr,Er){var _r=ot(sr,Er),Yr=_r.project([sr*C,Er*C]),$r;return($r=_r.transform)?[$r[0]*Yr[0]+$r[1]*Yr[1]+$r[2],-($r[3]*Yr[0]+$r[4]*Yr[1]+$r[5])]:(Yr[1]=-Yr[1],Yr)}xc(Je)&&(Ot.invert=function(sr,Er){var _r=It(Je,[sr,-Er]);return _r&&(_r[0]*=S,_r[1]*=S,_r)});function It(sr,Er){var _r=sr.project.invert,Yr=sr.transform,$r=Er;if(Yr&&(Yr=gc(Yr),$r=[Yr[0]*$r[0]+Yr[1]*$r[1]+Yr[2],Yr[3]*$r[0]+Yr[4]*$r[1]+Yr[5]]),_r&&sr===Ht(gn=_r($r)))return gn;for(var gn,bn=sr.children,Rn=0,da=bn&&bn.length;Rn<da;++Rn)if(gn=It(bn[Rn],Er))return gn}function Ht(sr){return ot(sr[0]*S,sr[1]*S)}var dr=(0,d.Z)(Ot),xr=dr.stream;return dr.stream=function(sr){var Er=dr.rotate(),_r=xr(sr),Yr=(dr.rotate([0,0]),xr(sr));return dr.rotate(Er),_r.sphere=function(){Yr.polygonStart(),Yr.lineStart(),ih(Yr,Je),Yr.lineEnd(),Yr.polygonEnd()},_r},dr.angle(bt==null?-30:bt*C)}function ih(Je,ot,bt){var At,Ot=ot.edges,It=Ot.length,Ht,dr={type:"MultiPoint",coordinates:ot.face},xr=ot.face.filter(function(bn){return P(bn[1])!==90}),sr=(0,Rf.Z)({type:"MultiPoint",coordinates:xr}),Er=!1,_r=-1,Yr=sr[1][0]-sr[0][0],$r=Yr===180||Yr===360?[(sr[0][0]+sr[1][0])/2,(sr[0][1]+sr[1][1])/2]:(0,ze.Z)(dr);if(bt)for(;++_r<It&&Ot[_r]!==bt;);++_r;for(var gn=0;gn<It;++gn)Ht=Ot[(gn+_r)%It],Array.isArray(Ht)?(Er||(Je.point((At=(0,Ju.Z)(Ht[0],$r)(p))[0],At[1]),Er=!0),Je.point((At=(0,Ju.Z)(Ht[1],$r)(p))[0],At[1])):(Er=!1,Ht!==bt&&ih(Je,Ht,ot))}function xs(Je,ot){return Je&&ot&&Je[0]===ot[0]&&Je[1]===ot[1]}function Tu(Je,ot){for(var bt,At,Ot=Je.length,It=null,Ht=0;Ht<Ot;++Ht){bt=Je[Ht];for(var dr=ot.length;--dr>=0;)if(At=ot[dr],bt[0]===At[0]&&bt[1]===At[1]){if(It)return[It,bt];It=bt}}}function Zl(Je){for(var ot=Je.length,bt=[],At=Je[ot-1],Ot=0;Ot<ot;++Ot)bt.push([At,At=Je[Ot]]);return bt}function xc(Je){return Je.project.invert||Je.children&&Je.children.some(xc)}var Ji=e(98936),Qu=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],Go=[[0,2,1],[0,3,2],[5,1,2],[5,2,3],[0,1,4],[0,4,3],[5,4,1],[5,3,4]].map(function(Je){return Je.map(function(ot){return Qu[ot]})});function ol(Je){Je=Je||function(bt){var At=(0,ze.Z)({type:"MultiPoint",coordinates:bt});return(0,Ji.Z)().scale(1).translate([0,0]).rotate([-At[0],-At[1]])};var ot=Go.map(function(bt){return{face:bt,project:Je(bt)}});return[-1,0,0,1,0,1,4,5].forEach(function(bt,At){var Ot=ot[bt];Ot&&(Ot.children||(Ot.children=[])).push(ot[At])}),wi(ot[0],function(bt,At){return ot[bt<-c/2?At<0?6:4:bt<0?At<0?2:0:bt<c/2?At<0?3:1:At<0?7:5]}).angle(-30).scale(101.858).center([0,45])}var sl=2/O(3);function Sl(Je,ot){var bt=Pe(Je,ot);return[bt[0]*sl,bt[1]]}Sl.invert=function(Je,ot){return Pe.invert(Je/sl,ot)};function El(Je){Je=Je||function(bt){var At=(0,ze.Z)({type:"MultiPoint",coordinates:bt});return(0,d.Z)(Sl).translate([0,0]).scale(1).rotate(At[1]>0?[-At[0],0]:[180-At[0],180])};var ot=Go.map(function(bt){return{face:bt,project:Je(bt)}});return[-1,0,0,1,0,1,4,5].forEach(function(bt,At){var Ot=ot[bt];Ot&&(Ot.children||(Ot.children=[])).push(ot[At])}),wi(ot[0],function(bt,At){return ot[bt<-c/2?At<0?6:4:bt<0?At<0?2:0:bt<c/2?At<0?3:1:At<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])}function Ml(Je){Je=Je||function(Ht){var dr=Ht.length===6?(0,ze.Z)({type:"MultiPoint",coordinates:Ht}):Ht[0];return(0,Ji.Z)().scale(1).translate([0,0]).rotate([-dr[0],-dr[1]])};var ot=Go.map(function(Ht){for(var dr=Ht.map(ef),xr=dr.length,sr=dr[xr-1],Er,_r=[],Yr=0;Yr<xr;++Yr)Er=dr[Yr],_r.push(qu([sr[0]*.9486832980505138+Er[0]*.31622776601683794,sr[1]*.9486832980505138+Er[1]*.31622776601683794,sr[2]*.9486832980505138+Er[2]*.31622776601683794]),qu([Er[0]*.9486832980505138+sr[0]*.31622776601683794,Er[1]*.9486832980505138+sr[1]*.31622776601683794,Er[2]*.9486832980505138+sr[2]*.31622776601683794])),sr=Er;return _r}),bt=[],At=[-1,0,0,1,0,1,4,5];ot.forEach(function(Ht,dr){for(var xr=Go[dr],sr=xr.length,Er=bt[dr]=[],_r=0;_r<sr;++_r)ot.push([xr[_r],Ht[(_r*2+2)%(2*sr)],Ht[(_r*2+1)%(2*sr)]]),At.push(dr),Er.push(Hs(ef(Ht[(_r*2+2)%(2*sr)]),ef(Ht[(_r*2+1)%(2*sr)])))});var Ot=ot.map(function(Ht){return{project:Je(Ht),face:Ht}});At.forEach(function(Ht,dr){var xr=Ot[Ht];xr&&(xr.children||(xr.children=[])).push(Ot[dr])});function It(Ht,dr){var xr=x(dr),sr=[xr*x(Ht),xr*h(Ht),h(dr)],Er=Ht<-c/2?dr<0?6:4:Ht<0?dr<0?2:0:Ht<c/2?dr<0?3:1:dr<0?7:5,_r=bt[Er];return Ot[bs(_r[0],sr)<0?8+3*Er:bs(_r[1],sr)<0?8+3*Er+1:bs(_r[2],sr)<0?8+3*Er+2:Er]}return wi(Ot[0],It).angle(-30).scale(110.625).center([0,45])}function bs(Je,ot){for(var bt=0,At=Je.length,Ot=0;bt<At;++bt)Ot+=Je[bt]*ot[bt];return Ot}function Hs(Je,ot){return[Je[1]*ot[2]-Je[2]*ot[1],Je[2]*ot[0]-Je[0]*ot[2],Je[0]*ot[1]-Je[1]*ot[0]]}function qu(Je){return[_(Je[1],Je[0])*C,R(n(-1,u(1,Je[2])))*C]}function ef(Je){var ot=Je[0]*S,bt=Je[1]*S,At=x(bt);return[At*x(ot),At*h(ot),h(bt)]}function If(){}function mv(Je){if((bt=Je.length)<4)return!1;for(var ot=0,bt,At=Je[bt-1][1]*Je[0][0]-Je[bt-1][0]*Je[0][1];++ot<bt;)At+=Je[ot-1][1]*Je[ot][0]-Je[ot-1][0]*Je[ot][1];return At<=0}function xv(Je,ot){for(var bt=ot[0],At=ot[1],Ot=!1,It=0,Ht=Je.length,dr=Ht-1;It<Ht;dr=It++){var xr=Je[It],sr=xr[0],Er=xr[1],_r=Je[dr],Yr=_r[0],$r=_r[1];Er>At^$r>At&&bt<(Yr-sr)*(At-Er)/($r-Er)+sr&&(Ot=!Ot)}return Ot}function bv(Je,ot){var bt=ot.stream,At;if(!bt)throw new Error("invalid projection");switch(Je&&Je.type){case"Feature":At=Ff;break;case"FeatureCollection":At=wv;break;default:At=Au;break}return At(Je,bt)}function wv(Je,ot){return{type:"FeatureCollection",features:Je.features.map(function(bt){return Ff(bt,ot)})}}function Ff(Je,ot){return{type:"Feature",id:Je.id,properties:Je.properties,geometry:Au(Je.geometry,ot)}}function oh(Je,ot){return{type:"GeometryCollection",geometries:Je.geometries.map(function(bt){return Au(bt,ot)})}}function Au(Je,ot){if(!Je)return null;if(Je.type==="GeometryCollection")return oh(Je,ot);var bt;switch(Je.type){case"Point":bt=tf;break;case"MultiPoint":bt=tf;break;case"LineString":bt=jl;break;case"MultiLineString":bt=jl;break;case"Polygon":bt=rf;break;case"MultiPolygon":bt=rf;break;case"Sphere":bt=rf;break;default:return null}return(0,Da.Z)(Je,ot(bt)),bt.result()}var yo=[],Wo=[],tf={point:function(Je,ot){yo.push([Je,ot])},result:function(){var Je=yo.length?yo.length<2?{type:"Point",coordinates:yo[0]}:{type:"MultiPoint",coordinates:yo}:null;return yo=[],Je}},jl={lineStart:If,point:function(Je,ot){yo.push([Je,ot])},lineEnd:function(){yo.length&&(Wo.push(yo),yo=[])},result:function(){var Je=Wo.length?Wo.length<2?{type:"LineString",coordinates:Wo[0]}:{type:"MultiLineString",coordinates:Wo}:null;return Wo=[],Je}},rf={polygonStart:If,lineStart:If,point:function(Je,ot){yo.push([Je,ot])},lineEnd:function(){var Je=yo.length;if(Je){do yo.push(yo[0].slice());while(++Je<4);Wo.push(yo),yo=[]}},polygonEnd:If,result:function(){if(!Wo.length)return null;var Je=[],ot=[];return Wo.forEach(function(bt){mv(bt)?Je.push([bt]):ot.push(bt)}),ot.forEach(function(bt){var At=bt[0];Je.some(function(Ot){if(xv(Ot[0],At))return Ot.push(bt),!0})||Je.push([bt])}),Wo=[],Je.length?Je.length>1?{type:"MultiPolygon",coordinates:Je}:{type:"Polygon",coordinates:Je[0]}:null}};function kf(Je){var ot=Je(l,0)[0]-Je(-l,0)[0];function bt(At,Ot){var It=P(At)<l,Ht=Je(It?At:At>0?At-c:At+c,Ot),dr=(Ht[0]-Ht[1])*M,xr=(Ht[0]+Ht[1])*M;if(It)return[dr,xr];var sr=ot*M,Er=dr>0^xr>0?-1:1;return[Er*dr-g(xr)*sr,Er*xr-g(dr)*sr]}return Je.invert&&(bt.invert=function(At,Ot){var It=(At+Ot)*M,Ht=(Ot-At)*M,dr=P(It)<.5*ot&&P(Ht)<.5*ot;if(!dr){var xr=ot*M,sr=It>0^Ht>0?-1:1,Er=-sr*At+(Ht>0?1:-1)*xr,_r=-sr*Ot+(It>0?1:-1)*xr;It=(-Er-_r)*M,Ht=(Er-_r)*M}var Yr=Je.invert(It,Ht);return dr||(Yr[0]+=It>0?c:-c),Yr}),(0,d.Z)(bt).rotate([-90,-90,45]).clipAngle(179.999)}function Tv(){return kf(Tn).scale(176.423)}function sh(){return kf(Dr).scale(111.48)}function lh(Je,ot){if(!(0<=(ot=+ot)&&ot<=20))throw new Error("invalid digits");function bt(sr){var Er=sr.length,_r=2,Yr=new Array(Er);for(Yr[0]=+sr[0].toFixed(ot),Yr[1]=+sr[1].toFixed(ot);_r<Er;)Yr[_r]=sr[_r],++_r;return Yr}function At(sr){return sr.map(bt)}function Ot(sr){for(var Er=bt(sr[0]),_r=[Er],Yr=1;Yr<sr.length;Yr++){var $r=bt(sr[Yr]);($r.length>2||$r[0]!=Er[0]||$r[1]!=Er[1])&&(_r.push($r),Er=$r)}return _r.length===1&&sr.length>1&&_r.push(bt(sr[sr.length-1])),_r}function It(sr){return sr.map(Ot)}function Ht(sr){if(sr==null)return sr;var Er;switch(sr.type){case"GeometryCollection":Er={type:"GeometryCollection",geometries:sr.geometries.map(Ht)};break;case"Point":Er={type:"Point",coordinates:bt(sr.coordinates)};break;case"MultiPoint":Er={type:sr.type,coordinates:At(sr.coordinates)};break;case"LineString":Er={type:sr.type,coordinates:Ot(sr.coordinates)};break;case"MultiLineString":case"Polygon":Er={type:sr.type,coordinates:It(sr.coordinates)};break;case"MultiPolygon":Er={type:"MultiPolygon",coordinates:sr.coordinates.map(It)};break;default:return sr}return sr.bbox!=null&&(Er.bbox=sr.bbox),Er}function dr(sr){var Er={type:"Feature",properties:sr.properties,geometry:Ht(sr.geometry)};return sr.id!=null&&(Er.id=sr.id),sr.bbox!=null&&(Er.bbox=sr.bbox),Er}if(Je!=null)switch(Je.type){case"Feature":return dr(Je);case"FeatureCollection":{var xr={type:"FeatureCollection",features:Je.features.map(dr)};return Je.bbox!=null&&(xr.bbox=Je.bbox),xr}default:return Ht(Je)}return Je}function bc(Je){var ot=h(Je);function bt(At,Ot){var It=ot?b(At*ot/2)/ot:At/2;if(!Ot)return[2*It,-Je];var Ht=2*a(It*h(Ot)),dr=1/b(Ot);return[h(Ht)*dr,Ot+(1-x(Ht))*dr-Je]}return bt.invert=function(At,Ot){if(P(Ot+=Je)<p)return[ot?2*a(ot*At/2)/ot:At,0];var It=At*At+Ot*Ot,Ht=0,dr=10,xr;do{var sr=b(Ht),Er=1/x(Ht),_r=It-2*Ot*Ht+Ht*Ht;Ht-=xr=(sr*_r+2*(Ht-Ot))/(2+_r*Er*Er+2*(Ht-Ot)*sr)}while(P(xr)>p&&--dr>0);var Yr=At*(sr=b(Ht)),$r=b(P(Ot)<P(Ht+1/sr)?R(Yr)*.5:T(Yr)*.5+c/4)/h(Ht);return[ot?2*a(ot*$r)/ot:2*$r,Ht]},bt}function Cl(){return st(bc).scale(131.215)}var $i=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];$i.forEach(function(Je){Je[1]*=1.0144});function Vs(Je,ot){var bt=u(18,P(ot)*36/c),At=y(bt),Ot=bt-At,It=(_r=$i[At])[0],Ht=_r[1],dr=(_r=$i[++At])[0],xr=_r[1],sr=(_r=$i[u(19,++At)])[0],Er=_r[1],_r;return[Je*(dr+Ot*(sr-It)/2+Ot*Ot*(sr-2*dr+It)/2),(ot>0?l:-l)*(xr+Ot*(Er-Ht)/2+Ot*Ot*(Er-2*xr+Ht)/2)]}Vs.invert=function(Je,ot){var bt=ot/l,At=bt*90,Ot=u(18,P(At/5)),It=n(0,y(Ot));do{var Ht=$i[It][1],dr=$i[It+1][1],xr=$i[u(19,It+2)][1],sr=xr-Ht,Er=xr-2*dr+Ht,_r=2*(P(bt)-dr)/sr,Yr=Er/sr,$r=_r*(1-Yr*_r*(1-2*Yr*_r));if($r>=0||It===1){At=(ot>=0?5:-5)*($r+Ot);var gn=50,bn;do Ot=u(18,P(At)/5),It=y(Ot),$r=Ot-It,Ht=$i[It][1],dr=$i[It+1][1],xr=$i[u(19,It+2)][1],At-=(bn=(ot>=0?l:-l)*(dr+$r*(xr-Ht)/2+$r*$r*(xr-2*dr+Ht)/2)-ot)*C;while(P(bn)>E&&--gn>0);break}}while(--It>=0);var Rn=$i[It][0],da=$i[It+1][0],_a=$i[u(19,It+2)][0];return[Je/(da+$r*(_a-Rn)/2+$r*$r*(_a-2*da+Rn)/2),At*S]};function wc(){return(0,d.Z)(Vs).scale(152.63)}function uh(Je){function ot(bt,At){var Ot=x(At),It=(Je-1)/(Je-Ot*x(bt));return[It*Ot*h(bt),It*h(At)]}return ot.invert=function(bt,At){var Ot=bt*bt+At*At,It=O(Ot),Ht=(Je-O(1-Ot*(Je+1)/(Je-1)))/((Je-1)/It+It/(Je-1));return[_(bt*Ht,It*O(1-Ht*Ht)),It?R(At*Ht/It):0]},ot}function Kl(Je,ot){var bt=uh(Je);if(!ot)return bt;var At=x(ot),Ot=h(ot);function It(Ht,dr){var xr=bt(Ht,dr),sr=xr[1],Er=sr*Ot/(Je-1)+At;return[xr[0]*At/Er,sr/Er]}return It.invert=function(Ht,dr){var xr=(Je-1)/(Je-1-dr*Ot);return bt.invert(xr*Ht,xr*dr*At)},It}function Of(){var Je=2,ot=0,bt=(0,d.r)(Kl),At=bt(Je,ot);return At.distance=function(Ot){return arguments.length?bt(Je=+Ot,ot):Je},At.tilt=function(Ot){return arguments.length?bt(Je,ot=Ot*S):ot*C},At.scale(432.147).clipAngle(T(1/Je)*C-1e-6)}var ws=1e-4,zf=1e4,ll=-180,ul=ll+ws,Tc=180,Su=Tc-ws,pi=-90,Jl=pi+ws,Nf=90,Bf=Nf-ws;function Ll(Je){return Je.length>0}function Av(Je){return Math.floor(Je*zf)/zf}function Ac(Je){return Je===pi||Je===Nf?[0,Je]:[ll,Av(Je)]}function Eu(Je){var ot=Je[0],bt=Je[1],At=!1;return ot<=ul?(ot=ll,At=!0):ot>=Su&&(ot=Tc,At=!0),bt<=Jl?(bt=pi,At=!0):bt>=Bf&&(bt=Nf,At=!0),At?[ot,bt]:Je}function Sc(Je){return Je.map(Eu)}function fh(Je,ot,bt){for(var At=0,Ot=Je.length;At<Ot;++At){var It=Je[At].slice();bt.push({index:-1,polygon:ot,ring:It});for(var Ht=0,dr=It.length;Ht<dr;++Ht){var xr=It[Ht],sr=xr[0],Er=xr[1];if(sr<=ul||sr>=Su||Er<=Jl||Er>=Bf){It[Ht]=Eu(xr);for(var _r=Ht+1;_r<dr;++_r){var Yr=It[_r],$r=Yr[0],gn=Yr[1];if($r>ul&&$r<Su&&gn>Jl&&gn<Bf)break}if(_r===Ht+1)continue;if(Ht){var bn={index:-1,polygon:ot,ring:It.slice(0,Ht+1)};bn.ring[bn.ring.length-1]=Ac(Er),bt[bt.length-1]=bn}else bt.pop();if(_r>=dr)break;bt.push({index:-1,polygon:ot,ring:It=It.slice(_r-1)}),It[0]=Ac(It[0][1]),Ht=-1,dr=It.length}}}}function fl(Je){var ot,bt=Je.length,At={},Ot={},It,Ht,dr,xr,sr;for(ot=0;ot<bt;++ot){if(It=Je[ot],Ht=It.ring[0],xr=It.ring[It.ring.length-1],Ht[0]===xr[0]&&Ht[1]===xr[1]){It.polygon.push(It.ring),Je[ot]=null;continue}It.index=ot,At[Ht]=Ot[xr]=It}for(ot=0;ot<bt;++ot)if(It=Je[ot],It){if(Ht=It.ring[0],xr=It.ring[It.ring.length-1],dr=Ot[Ht],sr=At[xr],delete At[Ht],delete Ot[xr],Ht[0]===xr[0]&&Ht[1]===xr[1]){It.polygon.push(It.ring);continue}dr?(delete Ot[Ht],delete At[dr.ring[0]],dr.ring.pop(),Je[dr.index]=null,It={index:-1,polygon:dr.polygon,ring:dr.ring.concat(It.ring)},dr===sr?It.polygon.push(It.ring):(It.index=bt++,Je.push(At[It.ring[0]]=Ot[It.ring[It.ring.length-1]]=It))):sr?(delete At[xr],delete Ot[sr.ring[sr.ring.length-1]],It.ring.pop(),It={index:bt++,polygon:sr.polygon,ring:It.ring.concat(sr.ring)},Je[sr.index]=null,Je.push(At[It.ring[0]]=Ot[It.ring[It.ring.length-1]]=It)):(It.ring.push(It.ring[0]),It.polygon.push(It.ring))}}function Pl(Je){var ot={type:"Feature",geometry:$l(Je.geometry)};return Je.id!=null&&(ot.id=Je.id),Je.bbox!=null&&(ot.bbox=Je.bbox),Je.properties!=null&&(ot.properties=Je.properties),ot}function $l(Je){if(Je==null)return Je;var ot,bt,At,Ot;switch(Je.type){case"GeometryCollection":ot={type:"GeometryCollection",geometries:Je.geometries.map($l)};break;case"Point":ot={type:"Point",coordinates:Eu(Je.coordinates)};break;case"MultiPoint":case"LineString":ot={type:Je.type,coordinates:Sc(Je.coordinates)};break;case"MultiLineString":ot={type:"MultiLineString",coordinates:Je.coordinates.map(Sc)};break;case"Polygon":{var It=[];fh(Je.coordinates,It,bt=[]),fl(bt),ot={type:"Polygon",coordinates:It};break}case"MultiPolygon":{bt=[],At=-1,Ot=Je.coordinates.length;for(var Ht=new Array(Ot);++At<Ot;)fh(Je.coordinates[At],Ht[At]=[],bt);fl(bt),ot={type:"MultiPolygon",coordinates:Ht.filter(Ll)};break}default:return Je}return Je.bbox!=null&&(ot.bbox=Je.bbox),ot}function Ql(Je){if(Je==null)return Je;switch(Je.type){case"Feature":return Pl(Je);case"FeatureCollection":{var ot={type:"FeatureCollection",features:Je.features.map(Pl)};return Je.bbox!=null&&(ot.bbox=Je.bbox),ot}default:return $l(Je)}}function Yo(Je,ot){var bt=b(ot/2),At=h(m*bt);return[Je*(.74482-.34588*At*At),1.70711*bt]}Yo.invert=function(Je,ot){var bt=ot/1.70711,At=h(m*bt);return[Je/(.74482-.34588*At*At),2*a(bt)]};function es(){return(0,d.Z)(Yo).scale(146.153)}function ql(Je,ot,bt){var At=(0,Ju.Z)(ot,bt),Ot=At(.5),It=(0,rt.Z)([-Ot[0],-Ot[1]])(ot),Ht=At.distance/2,dr=-R(h(It[1]*S)/h(Ht)),xr=[-Ot[0],-Ot[1],-(It[0]>0?c-dr:dr)*C],sr=(0,d.Z)(Je(Ht)).rotate(xr),Er=(0,rt.Z)(xr),_r=sr.center;return delete sr.rotate,sr.center=function(Yr){return arguments.length?_r(Er(Yr)):Er.invert(_r())},sr.clipAngle(90)}function ch(Je){var ot=x(Je);function bt(At,Ot){var It=(0,Ji.M)(At,Ot);return It[0]*=ot,It}return bt.invert=function(At,Ot){return Ji.M.invert(At/ot,Ot)},bt}function Mu(){return Uf([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Uf(Je,ot){return ql(ch,Je,ot)}function hh(Je){if(!(Je*=2))return fe.N;var ot=-Je/2,bt=-ot,At=Je*Je,Ot=b(bt),It=.5/h(bt);function Ht(dr,xr){var sr=T(x(xr)*x(dr-ot)),Er=T(x(xr)*x(dr-bt)),_r=xr<0?-1:1;return sr*=sr,Er*=Er,[(sr-Er)/(2*Je),_r*O(4*At*Er-(At-sr+Er)*(At-sr+Er))/(2*Je)]}return Ht.invert=function(dr,xr){var sr=xr*xr,Er=x(O(sr+(Yr=dr+ot)*Yr)),_r=x(O(sr+(Yr=dr+bt)*Yr)),Yr,$r;return[_($r=Er-_r,Yr=(Er+_r)*Ot),(xr<0?-1:1)*T(O(Yr*Yr+$r*$r)*It)]},Ht}function Ts(){return Ec([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Ec(Je,ot){return ql(hh,Je,ot)}function _l(Je,ot){if(P(ot)<p)return[Je,0];var bt=P(ot/l),At=R(bt);if(P(Je)<p||P(P(ot)-l)<p)return[0,g(ot)*c*b(At/2)];var Ot=x(At),It=P(c/Je-Je/c)/2,Ht=It*It,dr=Ot/(bt+Ot-1),xr=dr*(2/bt-1),sr=xr*xr,Er=sr+Ht,_r=dr-sr,Yr=Ht+dr;return[g(Je)*c*(It*_r+O(Ht*_r*_r-Er*(dr*dr-sr)))/Er,g(ot)*c*(xr*Yr-It*O((Ht+1)*Er-Yr*Yr))/Er]}_l.invert=function(Je,ot){if(P(ot)<p)return[Je,0];if(P(Je)<p)return[0,l*h(2*a(ot/c))];var bt=(Je/=c)*Je,At=(ot/=c)*ot,Ot=bt+At,It=Ot*Ot,Ht=-P(ot)*(1+Ot),dr=Ht-2*At+bt,xr=-2*Ht+1+2*At+It,sr=At/xr+(2*dr*dr*dr/(xr*xr*xr)-9*Ht*dr/(xr*xr))/27,Er=(Ht-dr*dr/(3*xr))/xr,_r=2*O(-Er/3),Yr=T(3*sr/(Er*_r))/3;return[c*(Ot-1+O(1+2*(bt-At)+It))/(2*Je),g(ot)*c*(-_r*x(Yr+c/3)-dr/(3*xr))]};function nf(){return(0,d.Z)(_l).scale(79.4183)}function cl(Je,ot){if(P(ot)<p)return[Je,0];var bt=P(ot/l),At=R(bt);if(P(Je)<p||P(P(ot)-l)<p)return[0,g(ot)*c*b(At/2)];var Ot=x(At),It=P(c/Je-Je/c)/2,Ht=It*It,dr=Ot*(O(1+Ht)-It*Ot)/(1+Ht*bt*bt);return[g(Je)*c*dr,g(ot)*c*O(1-dr*(2*It+dr))]}cl.invert=function(Je,ot){if(!Je)return[0,l*h(2*a(ot/c))];var bt=P(Je/c),At=(1-bt*bt-(ot/=c)*ot)/(2*bt),Ot=At*At,It=O(Ot+1);return[g(Je)*c*(It-At),g(ot)*l*h(2*_(O((1-2*At*bt)*(At+It)-bt),O(It+At+bt)))]};function Sv(){return(0,d.Z)(cl).scale(79.4183)}function Mc(Je,ot){if(P(ot)<p)return[Je,0];var bt=ot/l,At=R(bt);if(P(Je)<p||P(P(ot)-l)<p)return[0,c*b(At/2)];var Ot=(c/Je-Je/c)/2,It=bt/(1+x(At));return[c*(g(Je)*O(Ot*Ot+1-It*It)-Ot),c*It]}Mc.invert=function(Je,ot){if(!ot)return[Je,0];var bt=ot/c,At=(c*c*(1-bt*bt)-Je*Je)/(2*c*Je);return[Je?c*(g(Je)*O(At*At+1)-At):0,l*h(2*a(bt))]};function Hf(){return(0,d.Z)(Mc).scale(79.4183)}function Po(Je,ot){if(!ot)return[Je,0];var bt=P(ot);if(!Je||bt===l)return[0,ot];var At=bt/l,Ot=At*At,It=(8*At-Ot*(Ot+2)-5)/(2*Ot*(At-1)),Ht=It*It,dr=At*It,xr=Ot+Ht+2*dr,sr=At+3*It,Er=Je/l,_r=Er+1/Er,Yr=g(P(Je)-l)*O(_r*_r-4),$r=Yr*Yr,gn=xr*(Ot+Ht*$r-1)+(1-Ot)*(Ot*(sr*sr+4*Ht)+12*dr*Ht+4*Ht*Ht),bn=(Yr*(xr+Ht-1)+2*O(gn))/(4*xr+$r);return[g(Je)*l*bn,g(ot)*l*O(1+Yr*P(bn)-bn*bn)]}Po.invert=function(Je,ot){var bt;if(!Je||!ot)return[Je,ot];ot/=c;var At=g(Je)*Je/l,Ot=(At*At-1+4*ot*ot)/P(At),It=Ot*Ot,Ht=2*ot,dr=50;do{var xr=Ht*Ht,sr=(8*Ht-xr*(xr+2)-5)/(2*xr*(Ht-1)),Er=(3*Ht-xr*Ht-10)/(2*xr*Ht),_r=sr*sr,Yr=Ht*sr,$r=Ht+sr,gn=$r*$r,bn=Ht+3*sr,Rn=gn*(xr+_r*It-1)+(1-xr)*(xr*(bn*bn+4*_r)+_r*(12*Yr+4*_r)),da=-2*$r*(4*Yr*_r+(1-4*xr+3*xr*xr)*(1+Er)+_r*(-6+14*xr-It+(-8+8*xr-2*It)*Er)+Yr*(-8+12*xr+(-10+10*xr-It)*Er)),_a=O(Rn),Ia=Ot*(gn+_r-1)+2*_a-At*(4*gn+It),Fa=Ot*(2*sr*Er+2*$r*(1+Er))+da/_a-8*$r*(Ot*(-1+_r+gn)+2*_a)*(1+Er)/(It+4*gn);Ht-=bt=Ia/Fa}while(bt>p&&--dr>0);return[g(Je)*(O(Ot*Ot+4)+Ot)*c/4,l*Ht]};function vh(){return(0,d.Z)(Po).scale(127.16)}function af(Je,ot,bt,At,Ot){function It(Ht,dr){var xr=bt*h(At*dr),sr=O(1-xr*xr),Er=O(2/(1+sr*x(Ht*=Ot)));return[Je*sr*Er*h(Ht),ot*xr*Er]}return It.invert=function(Ht,dr){var xr=Ht/Je,sr=dr/ot,Er=O(xr*xr+sr*sr),_r=2*R(Er/2);return[_(Ht*b(_r),Je*Er)/Ot,Er&&R(dr*h(_r)/(ot*bt*Er))/At]},It}function Gs(Je,ot,bt,At){var Ot=c/3;Je=n(Je,p),ot=n(ot,p),Je=u(Je,l),ot=u(ot,c-p),bt=n(bt,0),bt=u(bt,100-p),At=n(At,p);var It=bt/100+1,Ht=At/100,dr=T(It*x(Ot))/Ot,xr=h(Je)/h(dr*l),sr=ot/c,Er=O(Ht*h(Je/2)/h(ot/2)),_r=Er/O(sr*xr*dr),Yr=1/(Er*O(sr*xr*dr));return af(_r,Yr,xr,dr,sr)}function of(){var Je=65*S,ot=60*S,bt=20,At=200,Ot=(0,d.r)(Gs),It=Ot(Je,ot,bt,At);return It.poleline=function(Ht){return arguments.length?Ot(Je=+Ht*S,ot,bt,At):Je*C},It.parallels=function(Ht){return arguments.length?Ot(Je,ot=+Ht*S,bt,At):ot*C},It.inflation=function(Ht){return arguments.length?Ot(Je,ot,bt=+Ht,At):bt},It.ratio=function(Ht){return arguments.length?Ot(Je,ot,bt,At=+Ht):At},It.scale(163.775)}function Rl(){return of().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Vf=4*c+3*O(3),dh=2*O(2*c*O(3)/Vf),Cc=Te(dh*O(3)/c,dh,Vf/6);function Lc(){return(0,d.Z)(Cc).scale(176.84)}function eu(Je,ot){return[Je*O(1-3*ot*ot/(c*c)),ot]}eu.invert=function(Je,ot){return[Je/O(1-3*ot*ot/(c*c)),ot]};function Gf(){return(0,d.Z)(eu).scale(152.63)}function sf(Je,ot){var bt=x(ot),At=x(Je)*bt,Ot=1-At,It=x(Je=_(h(Je)*bt,-h(ot))),Ht=h(Je);return bt=O(1-At*At),[Ht*bt-It*Ot,-It*bt-Ht*Ot]}sf.invert=function(Je,ot){var bt=(Je*Je+ot*ot)/-2,At=O(-bt*(2+bt)),Ot=ot*bt+Je*At,It=Je*bt-ot*At,Ht=O(It*It+Ot*Ot);return[_(At*Ot,Ht*(1+bt)),Ht?-R(At*It/Ht):0]};function ph(){return(0,d.Z)(sf).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}function lf(Je,ot){var bt=ee(Je,ot);return[(bt[0]+Je/l)/2,(bt[1]+ot)/2]}lf.invert=function(Je,ot){var bt=Je,At=ot,Ot=25;do{var It=x(At),Ht=h(At),dr=h(2*At),xr=Ht*Ht,sr=It*It,Er=h(bt),_r=x(bt/2),Yr=h(bt/2),$r=Yr*Yr,gn=1-sr*_r*_r,bn=gn?T(It*_r)*O(Rn=1/gn):Rn=0,Rn,da=.5*(2*bn*It*Yr+bt/l)-Je,_a=.5*(bn*Ht+At)-ot,Ia=.5*Rn*(sr*$r+bn*It*_r*xr)+.5/l,Fa=Rn*(Er*dr/4-bn*Ht*Yr),za=.125*Rn*(dr*Yr-bn*Ht*sr*Er),ci=.5*Rn*(xr*_r+bn*$r*It)+.5,Bi=Fa*za-ci*Ia,Ti=(_a*Fa-da*ci)/Bi,he=(da*za-_a*Ia)/Bi;bt-=Ti,At-=he}while((P(Ti)>p||P(he)>p)&&--Ot>0);return[bt,At]};function gh(){return(0,d.Z)(lf).scale(158.837)}},33940:function(z,B,e){e.d(B,{Z:function(){return d}});function d(){return new P}function P(){this.reset()}P.prototype={constructor:P,reset:function(){this.s=this.t=0},add:function(x){_(a,x,this.t),_(this,a.s,this.s),this.s?this.t+=a.t:this.s=a.t},valueOf:function(){return this.s}};var a=new P;function _(x,v,y){var r=x.s=v+y,n=r-v,u=r-n;x.t=v-u+(y-n)}},97860:function(z,B,e){e.d(B,{L9:function(){return x},ZP:function(){return E},gL:function(){return f}});var d=e(33940),P=e(39695),a=e(73182),_=e(72736),x=(0,d.Z)(),v=(0,d.Z)(),y,r,n,u,i,f={point:a.Z,lineStart:a.Z,lineEnd:a.Z,polygonStart:function(){x.reset(),f.lineStart=g,f.lineEnd=h},polygonEnd:function(){var c=+x;v.add(c<0?P.BZ+c:c),this.lineStart=this.lineEnd=this.point=a.Z},sphere:function(){v.add(P.BZ)}};function g(){f.point=b}function h(){p(y,r)}function b(c,l){f.point=p,y=c,r=l,c*=P.uR,l*=P.uR,n=c,u=(0,P.mC)(l=l/2+P.pu),i=(0,P.O$)(l)}function p(c,l){c*=P.uR,l*=P.uR,l=l/2+P.pu;var m=c-n,M=m>=0?1:-1,L=M*m,D=(0,P.mC)(l),A=(0,P.O$)(l),C=i*A,S=u*D+C*(0,P.mC)(L),o=C*M*(0,P.O$)(L);x.add((0,P.fv)(o,S)),n=c,u=D,i=A}function E(c){return v.reset(),(0,_.Z)(c,f),v*2}},77338:function(z,B,e){e.d(B,{Z:function(){return R}});var d=e(33940),P=e(97860),a=e(7620),_=e(39695),x=e(72736),v,y,r,n,u,i,f,g,h=(0,d.Z)(),b,p,E={point:c,lineStart:m,lineEnd:M,polygonStart:function(){E.point=L,E.lineStart=D,E.lineEnd=A,h.reset(),P.gL.polygonStart()},polygonEnd:function(){P.gL.polygonEnd(),E.point=c,E.lineStart=m,E.lineEnd=M,P.L9<0?(v=-(r=180),y=-(n=90)):h>_.Ho?n=90:h<-_.Ho&&(y=-90),p[0]=v,p[1]=r},sphere:function(){v=-(r=180),y=-(n=90)}};function c(T,O){b.push(p=[v=T,r=T]),O<y&&(y=O),O>n&&(n=O)}function l(T,O){var N=(0,a.Og)([T*_.uR,O*_.uR]);if(g){var H=(0,a.T5)(g,N),k=[H[1],-H[0],0],V=(0,a.T5)(k,H);(0,a.iJ)(V),V=(0,a.Y1)(V);var G=T-u,U=G>0?1:-1,Y=V[0]*_.RW*U,ee,re=(0,_.Wn)(G)>180;re^(U*u<Y&&Y<U*T)?(ee=V[1]*_.RW,ee>n&&(n=ee)):(Y=(Y+360)%360-180,re^(U*u<Y&&Y<U*T)?(ee=-V[1]*_.RW,ee<y&&(y=ee)):(O<y&&(y=O),O>n&&(n=O))),re?T<u?C(v,T)>C(v,r)&&(r=T):C(T,r)>C(v,r)&&(v=T):r>=v?(T<v&&(v=T),T>r&&(r=T)):T>u?C(v,T)>C(v,r)&&(r=T):C(T,r)>C(v,r)&&(v=T)}else b.push(p=[v=T,r=T]);O<y&&(y=O),O>n&&(n=O),g=N,u=T}function m(){E.point=l}function M(){p[0]=v,p[1]=r,E.point=c,g=null}function L(T,O){if(g){var N=T-u;h.add((0,_.Wn)(N)>180?N+(N>0?360:-360):N)}else i=T,f=O;P.gL.point(T,O),l(T,O)}function D(){P.gL.lineStart()}function A(){L(i,f),P.gL.lineEnd(),(0,_.Wn)(h)>_.Ho&&(v=-(r=180)),p[0]=v,p[1]=r,g=null}function C(T,O){return(O-=T)<0?O+360:O}function S(T,O){return T[0]-O[0]}function o(T,O){return T[0]<=T[1]?T[0]<=O&&O<=T[1]:O<T[0]||T[1]<O}function R(T){var O,N,H,k,V,G,U;if(n=r=-(v=y=1/0),b=[],(0,x.Z)(T,E),N=b.length){for(b.sort(S),O=1,H=b[0],V=[H];O<N;++O)k=b[O],o(H,k[0])||o(H,k[1])?(C(H[0],k[1])>C(H[0],H[1])&&(H[1]=k[1]),C(k[0],H[1])>C(H[0],H[1])&&(H[0]=k[0])):V.push(H=k);for(G=-1/0,N=V.length-1,O=0,H=V[N];O<=N;H=k,++O)k=V[O],(U=C(H[1],k[0]))>G&&(G=U,v=k[0],r=H[1])}return b=p=null,v===1/0||y===1/0?[[NaN,NaN],[NaN,NaN]]:[[v,y],[r,n]]}},7620:function(z,B,e){e.d(B,{Og:function(){return a},T:function(){return y},T5:function(){return x},Y1:function(){return P},iJ:function(){return r},j9:function(){return _},s0:function(){return v}});var d=e(39695);function P(n){return[(0,d.fv)(n[1],n[0]),(0,d.ZR)(n[2])]}function a(n){var u=n[0],i=n[1],f=(0,d.mC)(i);return[f*(0,d.mC)(u),f*(0,d.O$)(u),(0,d.O$)(i)]}function _(n,u){return n[0]*u[0]+n[1]*u[1]+n[2]*u[2]}function x(n,u){return[n[1]*u[2]-n[2]*u[1],n[2]*u[0]-n[0]*u[2],n[0]*u[1]-n[1]*u[0]]}function v(n,u){n[0]+=u[0],n[1]+=u[1],n[2]+=u[2]}function y(n,u){return[n[0]*u,n[1]*u,n[2]*u]}function r(n){var u=(0,d._b)(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=u,n[1]/=u,n[2]/=u}},66624:function(z,B,e){e.d(B,{Z:function(){return N}});var d=e(39695),P=e(73182),a=e(72736),_,x,v,y,r,n,u,i,f,g,h,b,p,E,c,l,m={sphere:P.Z,point:M,lineStart:D,lineEnd:S,polygonStart:function(){m.lineStart=o,m.lineEnd=R},polygonEnd:function(){m.lineStart=D,m.lineEnd=S}};function M(H,k){H*=d.uR,k*=d.uR;var V=(0,d.mC)(k);L(V*(0,d.mC)(H),V*(0,d.O$)(H),(0,d.O$)(k))}function L(H,k,V){++_,v+=(H-v)/_,y+=(k-y)/_,r+=(V-r)/_}function D(){m.point=A}function A(H,k){H*=d.uR,k*=d.uR;var V=(0,d.mC)(k);E=V*(0,d.mC)(H),c=V*(0,d.O$)(H),l=(0,d.O$)(k),m.point=C,L(E,c,l)}function C(H,k){H*=d.uR,k*=d.uR;var V=(0,d.mC)(k),G=V*(0,d.mC)(H),U=V*(0,d.O$)(H),Y=(0,d.O$)(k),ee=(0,d.fv)((0,d._b)((ee=c*Y-l*U)*ee+(ee=l*G-E*Y)*ee+(ee=E*U-c*G)*ee),E*G+c*U+l*Y);x+=ee,n+=ee*(E+(E=G)),u+=ee*(c+(c=U)),i+=ee*(l+(l=Y)),L(E,c,l)}function S(){m.point=M}function o(){m.point=T}function R(){O(b,p),m.point=M}function T(H,k){b=H,p=k,H*=d.uR,k*=d.uR,m.point=O;var V=(0,d.mC)(k);E=V*(0,d.mC)(H),c=V*(0,d.O$)(H),l=(0,d.O$)(k),L(E,c,l)}function O(H,k){H*=d.uR,k*=d.uR;var V=(0,d.mC)(k),G=V*(0,d.mC)(H),U=V*(0,d.O$)(H),Y=(0,d.O$)(k),ee=c*Y-l*U,re=l*G-E*Y,ie=E*U-c*G,se=(0,d._b)(ee*ee+re*re+ie*ie),ce=(0,d.ZR)(se),q=se&&-ce/se;f+=q*ee,g+=q*re,h+=q*ie,x+=ce,n+=ce*(E+(E=G)),u+=ce*(c+(c=U)),i+=ce*(l+(l=Y)),L(E,c,l)}function N(H){_=x=v=y=r=n=u=i=f=g=h=0,(0,a.Z)(H,m);var k=f,V=g,G=h,U=k*k+V*V+G*G;return U<d.aW&&(k=n,V=u,G=i,x<d.Ho&&(k=v,V=y,G=r),U=k*k+V*V+G*G,U<d.aW)?[NaN,NaN]:[(0,d.fv)(V,k)*d.RW,(0,d.ZR)(G/(0,d._b)(U))*d.RW]}},7613:function(z,B,e){e.d(B,{m:function(){return x},Z:function(){return y}});var d=e(7620);function P(r){return function(){return r}}var a=e(39695),_=e(49386);function x(r,n,u,i,f,g){if(u){var h=(0,a.mC)(n),b=(0,a.O$)(n),p=i*u;f==null?(f=n+i*a.BZ,g=n-p/2):(f=v(h,f),g=v(h,g),(i>0?f<g:f>g)&&(f+=i*a.BZ));for(var E,c=f;i>0?c>g:c<g;c-=p)E=(0,d.Y1)([h,-b*(0,a.mC)(c),-b*(0,a.O$)(c)]),r.point(E[0],E[1])}}function v(r,n){n=(0,d.Og)(n),n[0]-=r,(0,d.iJ)(n);var u=(0,a.Kh)(-n[1]);return((-n[2]<0?-u:u)+a.BZ-a.Ho)%a.BZ}function y(){var r=P([0,0]),n=P(90),u=P(6),i,f,g={point:h};function h(p,E){i.push(p=f(p,E)),p[0]*=a.RW,p[1]*=a.RW}function b(){var p=r.apply(this,arguments),E=n.apply(this,arguments)*a.uR,c=u.apply(this,arguments)*a.uR;return i=[],f=(0,_.I)(-p[0]*a.uR,-p[1]*a.uR,0).invert,x(g,E,c,1),p={type:"Polygon",coordinates:[i]},i=f=null,p}return b.center=function(p){return arguments.length?(r=typeof p=="function"?p:P([+p[0],+p[1]]),b):r},b.radius=function(p){return arguments.length?(n=typeof p=="function"?p:P(+p),b):n},b.precision=function(p){return arguments.length?(u=typeof p=="function"?p:P(+p),b):u},b}},87070:function(z,B,e){var d=e(97023),P=e(39695);B.Z=(0,d.Z)(function(){return!0},a,x,[-P.pi,-P.ou]);function a(v){var y=NaN,r=NaN,n=NaN,u;return{lineStart:function(){v.lineStart(),u=1},point:function(i,f){var g=i>0?P.pi:-P.pi,h=(0,P.Wn)(i-y);(0,P.Wn)(h-P.pi)<P.Ho?(v.point(y,r=(r+f)/2>0?P.ou:-P.ou),v.point(n,r),v.lineEnd(),v.lineStart(),v.point(g,r),v.point(i,r),u=0):n!==g&&h>=P.pi&&((0,P.Wn)(y-n)<P.Ho&&(y-=n*P.Ho),(0,P.Wn)(i-g)<P.Ho&&(i-=g*P.Ho),r=_(y,r,i,f),v.point(n,r),v.lineEnd(),v.lineStart(),v.point(g,r),u=0),v.point(y=i,r=f),n=g},lineEnd:function(){v.lineEnd(),y=r=NaN},clean:function(){return 2-u}}}function _(v,y,r,n){var u,i,f=(0,P.O$)(v-r);return(0,P.Wn)(f)>P.Ho?(0,P.z4)(((0,P.O$)(y)*(i=(0,P.mC)(n))*(0,P.O$)(r)-(0,P.O$)(n)*(u=(0,P.mC)(y))*(0,P.O$)(v))/(u*i*f)):(y+n)/2}function x(v,y,r,n){var u;if(v==null)u=r*P.ou,n.point(-P.pi,u),n.point(0,u),n.point(P.pi,u),n.point(P.pi,0),n.point(P.pi,-u),n.point(0,-u),n.point(-P.pi,-u),n.point(-P.pi,0),n.point(-P.pi,u);else if((0,P.Wn)(v[0]-y[0])>P.Ho){var i=v[0]<y[0]?P.pi:-P.pi;u=r*i/2,n.point(-i,u),n.point(0,u),n.point(i,u)}else n.point(y[0],y[1])}},85272:function(z,B,e){e.d(B,{Z:function(){return P}});var d=e(73182);function P(){var a=[],_;return{point:function(x,v,y){_.push([x,v,y])},lineStart:function(){a.push(_=[])},lineEnd:d.Z,rejoin:function(){a.length>1&&a.push(a.pop().concat(a.shift()))},result:function(){var x=a;return a=[],_=null,x}}}},1457:function(z,B,e){e.d(B,{Z:function(){return v}});var d=e(7620),P=e(7613),a=e(39695),_=e(67108),x=e(97023);function v(y){var r=(0,a.mC)(y),n=6*a.uR,u=r>0,i=(0,a.Wn)(r)>a.Ho;function f(E,c,l,m){(0,P.m)(m,y,n,l,E,c)}function g(E,c){return(0,a.mC)(E)*(0,a.mC)(c)>r}function h(E){var c,l,m,M,L;return{lineStart:function(){M=m=!1,L=1},point:function(D,A){var C=[D,A],S,o=g(D,A),R=u?o?0:p(D,A):o?p(D+(D<0?a.pi:-a.pi),A):0;if(!c&&(M=m=o)&&E.lineStart(),o!==m&&(S=b(c,C),(!S||(0,_.Z)(c,S)||(0,_.Z)(C,S))&&(C[2]=1)),o!==m)L=0,o?(E.lineStart(),S=b(C,c),E.point(S[0],S[1])):(S=b(c,C),E.point(S[0],S[1],2),E.lineEnd()),c=S;else if(i&&c&&u^o){var T;!(R&l)&&(T=b(C,c,!0))&&(L=0,u?(E.lineStart(),E.point(T[0][0],T[0][1]),E.point(T[1][0],T[1][1]),E.lineEnd()):(E.point(T[1][0],T[1][1]),E.lineEnd(),E.lineStart(),E.point(T[0][0],T[0][1],3)))}o&&(!c||!(0,_.Z)(c,C))&&E.point(C[0],C[1]),c=C,m=o,l=R},lineEnd:function(){m&&E.lineEnd(),c=null},clean:function(){return L|(M&&m)<<1}}}function b(E,c,l){var m=(0,d.Og)(E),M=(0,d.Og)(c),L=[1,0,0],D=(0,d.T5)(m,M),A=(0,d.j9)(D,D),C=D[0],S=A-C*C;if(!S)return!l&&E;var o=r*A/S,R=-r*C/S,T=(0,d.T5)(L,D),O=(0,d.T)(L,o),N=(0,d.T)(D,R);(0,d.s0)(O,N);var H=T,k=(0,d.j9)(O,H),V=(0,d.j9)(H,H),G=k*k-V*((0,d.j9)(O,O)-1);if(!(G<0)){var U=(0,a._b)(G),Y=(0,d.T)(H,(-k-U)/V);if((0,d.s0)(Y,O),Y=(0,d.Y1)(Y),!l)return Y;var ee=E[0],re=c[0],ie=E[1],se=c[1],ce;re<ee&&(ce=ee,ee=re,re=ce);var q=re-ee,j=(0,a.Wn)(q-a.pi)<a.Ho,Z=j||q<a.Ho;if(!j&&se<ie&&(ce=ie,ie=se,se=ce),Z?j?ie+se>0^Y[1]<((0,a.Wn)(Y[0]-ee)<a.Ho?ie:se):ie<=Y[1]&&Y[1]<=se:q>a.pi^(ee<=Y[0]&&Y[0]<=re)){var Q=(0,d.T)(H,(-k+U)/V);return(0,d.s0)(Q,O),[Y,(0,d.Y1)(Q)]}}}function p(E,c){var l=u?y:a.pi-y,m=0;return E<-l?m|=1:E>l&&(m|=2),c<-l?m|=4:c>l&&(m|=8),m}return(0,x.Z)(g,h,f,u?[0,-y]:[-a.pi,y-a.pi])}},97023:function(z,B,e){e.d(B,{Z:function(){return v}});var d=e(85272),P=e(46225),a=e(39695),_=e(23071),x=e(33064);function v(n,u,i,f){return function(g){var h=u(g),b=(0,d.Z)(),p=u(b),E=!1,c,l,m,M={point:L,lineStart:A,lineEnd:C,polygonStart:function(){M.point=S,M.lineStart=o,M.lineEnd=R,l=[],c=[]},polygonEnd:function(){M.point=L,M.lineStart=A,M.lineEnd=C,l=(0,x.TS)(l);var T=(0,_.Z)(c,f);l.length?(E||(g.polygonStart(),E=!0),(0,P.Z)(l,r,T,i,g)):T&&(E||(g.polygonStart(),E=!0),g.lineStart(),i(null,null,1,g),g.lineEnd()),E&&(g.polygonEnd(),E=!1),l=c=null},sphere:function(){g.polygonStart(),g.lineStart(),i(null,null,1,g),g.lineEnd(),g.polygonEnd()}};function L(T,O){n(T,O)&&g.point(T,O)}function D(T,O){h.point(T,O)}function A(){M.point=D,h.lineStart()}function C(){M.point=L,h.lineEnd()}function S(T,O){m.push([T,O]),p.point(T,O)}function o(){p.lineStart(),m=[]}function R(){S(m[0][0],m[0][1]),p.lineEnd();var T=p.clean(),O=b.result(),N,H=O.length,k,V,G;if(m.pop(),c.push(m),m=null,!!H){if(T&1){if(V=O[0],(k=V.length-1)>0){for(E||(g.polygonStart(),E=!0),g.lineStart(),N=0;N<k;++N)g.point((G=V[N])[0],G[1]);g.lineEnd()}return}H>1&&T&2&&O.push(O.pop().concat(O.shift())),l.push(O.filter(y))}}return M}}function y(n){return n.length>1}function r(n,u){return((n=n.x)[0]<0?n[1]-a.ou-a.Ho:a.ou-n[1])-((u=u.x)[0]<0?u[1]-a.ou-a.Ho:a.ou-u[1])}},87605:function(z,B,e){e.d(B,{Z:function(){return r}});var d=e(39695),P=e(85272);function a(n,u,i,f,g,h){var b=n[0],p=n[1],E=u[0],c=u[1],l=0,m=1,M=E-b,L=c-p,D;if(D=i-b,!(!M&&D>0)){if(D/=M,M<0){if(D<l)return;D<m&&(m=D)}else if(M>0){if(D>m)return;D>l&&(l=D)}if(D=g-b,!(!M&&D<0)){if(D/=M,M<0){if(D>m)return;D>l&&(l=D)}else if(M>0){if(D<l)return;D<m&&(m=D)}if(D=f-p,!(!L&&D>0)){if(D/=L,L<0){if(D<l)return;D<m&&(m=D)}else if(L>0){if(D>m)return;D>l&&(l=D)}if(D=h-p,!(!L&&D<0)){if(D/=L,L<0){if(D>m)return;D>l&&(l=D)}else if(L>0){if(D<l)return;D<m&&(m=D)}return l>0&&(n[0]=b+l*M,n[1]=p+l*L),m<1&&(u[0]=b+m*M,u[1]=p+m*L),!0}}}}}var _=e(46225),x=e(33064),v=1e9,y=-v;function r(n,u,i,f){function g(c,l){return n<=c&&c<=i&&u<=l&&l<=f}function h(c,l,m,M){var L=0,D=0;if(c==null||(L=b(c,m))!==(D=b(l,m))||E(c,l)<0^m>0)do M.point(L===0||L===3?n:i,L>1?f:u);while((L=(L+m+4)%4)!==D);else M.point(l[0],l[1])}function b(c,l){return(0,d.Wn)(c[0]-n)<d.Ho?l>0?0:3:(0,d.Wn)(c[0]-i)<d.Ho?l>0?2:1:(0,d.Wn)(c[1]-u)<d.Ho?l>0?1:0:l>0?3:2}function p(c,l){return E(c.x,l.x)}function E(c,l){var m=b(c,1),M=b(l,1);return m!==M?m-M:m===0?l[1]-c[1]:m===1?c[0]-l[0]:m===2?c[1]-l[1]:l[0]-c[0]}return function(c){var l=c,m=(0,P.Z)(),M,L,D,A,C,S,o,R,T,O,N,H={point:k,lineStart:Y,lineEnd:ee,polygonStart:G,polygonEnd:U};function k(ie,se){g(ie,se)&&l.point(ie,se)}function V(){for(var ie=0,se=0,ce=L.length;se<ce;++se)for(var q=L[se],j=1,Z=q.length,Q=q[0],ue,fe,te=Q[0],ne=Q[1];j<Z;++j)ue=te,fe=ne,Q=q[j],te=Q[0],ne=Q[1],fe<=f?ne>f&&(te-ue)*(f-fe)>(ne-fe)*(n-ue)&&++ie:ne<=f&&(te-ue)*(f-fe)<(ne-fe)*(n-ue)&&--ie;return ie}function G(){l=m,M=[],L=[],N=!0}function U(){var ie=V(),se=N&&ie,ce=(M=(0,x.TS)(M)).length;(se||ce)&&(c.polygonStart(),se&&(c.lineStart(),h(null,null,1,c),c.lineEnd()),ce&&(0,_.Z)(M,p,ie,h,c),c.polygonEnd()),l=c,M=L=D=null}function Y(){H.point=re,L&&L.push(D=[]),O=!0,T=!1,o=R=NaN}function ee(){M&&(re(A,C),S&&T&&m.rejoin(),M.push(m.result())),H.point=k,T&&l.lineEnd()}function re(ie,se){var ce=g(ie,se);if(L&&D.push([ie,se]),O)A=ie,C=se,S=ce,O=!1,ce&&(l.lineStart(),l.point(ie,se));else if(ce&&T)l.point(ie,se);else{var q=[o=Math.max(y,Math.min(v,o)),R=Math.max(y,Math.min(v,R))],j=[ie=Math.max(y,Math.min(v,ie)),se=Math.max(y,Math.min(v,se))];a(q,j,n,u,i,f)?(T||(l.lineStart(),l.point(q[0],q[1])),l.point(j[0],j[1]),ce||l.lineEnd(),N=!1):ce&&(l.lineStart(),l.point(ie,se),N=!1)}o=ie,R=se,T=ce}return H}}},46225:function(z,B,e){e.d(B,{Z:function(){return _}});var d=e(67108),P=e(39695);function a(v,y,r,n){this.x=v,this.z=y,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function _(v,y,r,n,u){var i=[],f=[],g,h;if(v.forEach(function(m){if(!((M=m.length-1)<=0)){var M,L=m[0],D=m[M],A;if((0,d.Z)(L,D)){if(!L[2]&&!D[2]){for(u.lineStart(),g=0;g<M;++g)u.point((L=m[g])[0],L[1]);u.lineEnd();return}D[0]+=2*P.Ho}i.push(A=new a(L,m,null,!0)),f.push(A.o=new a(L,null,A,!1)),i.push(A=new a(D,m,null,!1)),f.push(A.o=new a(D,null,A,!0))}}),!!i.length){for(f.sort(y),x(i),x(f),g=0,h=f.length;g<h;++g)f[g].e=r=!r;for(var b=i[0],p,E;;){for(var c=b,l=!0;c.v;)if((c=c.n)===b)return;p=c.z,u.lineStart();do{if(c.v=c.o.v=!0,c.e){if(l)for(g=0,h=p.length;g<h;++g)u.point((E=p[g])[0],E[1]);else n(c.x,c.n.x,1,u);c=c.n}else{if(l)for(p=c.p.z,g=p.length-1;g>=0;--g)u.point((E=p[g])[0],E[1]);else n(c.x,c.p.x,-1,u);c=c.p}c=c.o,p=c.z,l=!l}while(!c.v);u.lineEnd()}}}function x(v){if(y=v.length){for(var y,r=0,n=v[0],u;++r<y;)n.n=u=v[r],u.p=n,n=u;n.n=u=v[0],u.p=n}}},96059:function(z,B,e){e.d(B,{Z:function(){return d}});function d(P,a){function _(x,v){return x=P(x,v),a(x[0],x[1])}return P.invert&&a.invert&&(_.invert=function(x,v){return x=a.invert(x,v),x&&P.invert(x[0],x[1])}),_}},8593:function(z,B,e){e.d(B,{Z:function(){return d}});function d(P){return P}},27362:function(z,B,e){e.r(B),e.d(B,{geoAlbers:function(){return or},geoAlbersUsa:function(){return ut},geoArea:function(){return d.ZP},geoAzimuthalEqualArea:function(){return yt.Z},geoAzimuthalEqualAreaRaw:function(){return yt.l},geoAzimuthalEquidistant:function(){return Lt.Z},geoAzimuthalEquidistantRaw:function(){return Lt.N},geoBounds:function(){return P.Z},geoCentroid:function(){return a.Z},geoCircle:function(){return _.Z},geoClipAntimeridian:function(){return x.Z},geoClipCircle:function(){return v.Z},geoClipExtent:function(){return r},geoClipRectangle:function(){return y.Z},geoConicConformal:function(){return nr},geoConicConformalRaw:function(){return Jt},geoConicEqualArea:function(){return Ut},geoConicEqualAreaRaw:function(){return jt},geoConicEquidistant:function(){return Ze},geoConicEquidistantRaw:function(){return Ke},geoContains:function(){return G},geoDistance:function(){return S},geoEqualEarth:function(){return gr},geoEqualEarthRaw:function(){return Yt},geoEquirectangular:function(){return Mr.Z},geoEquirectangularRaw:function(){return Mr.k},geoGnomonic:function(){return yr.Z},geoGnomonicRaw:function(){return yr.M},geoGraticule:function(){return re},geoGraticule10:function(){return ie},geoIdentity:function(){return pr},geoInterpolate:function(){return se.Z},geoLength:function(){return D},geoMercator:function(){return Vt},geoMercatorRaw:function(){return Nt},geoNaturalEarth1:function(){return Kr.Z},geoNaturalEarth1Raw:function(){return Kr.K},geoOrthographic:function(){return Or.Z},geoOrthographicRaw:function(){return Or.I},geoPath:function(){return Bt},geoProjection:function(){return Wt.Z},geoProjectionMutator:function(){return Wt.r},geoRotation:function(){return Rt.Z},geoStereographic:function(){return Jr},geoStereographicRaw:function(){return Sn},geoStream:function(){return g.Z},geoTransform:function(){return Tr.Z},geoTransverseMercator:function(){return Dn},geoTransverseMercatorRaw:function(){return xn}});var d=e(97860),P=e(77338),a=e(66624),_=e(7613),x=e(87070),v=e(1457),y=e(87605);function r(){var mr=0,Ar=0,zr=960,Br=500,on,mn,Tn;return Tn={stream:function(An){return on&&mn===An?on:on=(0,y.Z)(mr,Ar,zr,Br)(mn=An)},extent:function(An){return arguments.length?(mr=+An[0][0],Ar=+An[0][1],zr=+An[1][0],Br=+An[1][1],on=mn=null,Tn):[[mr,Ar],[zr,Br]]}}}var n=e(23071),u=e(33940),i=e(39695),f=e(73182),g=e(72736),h=(0,u.Z)(),b,p,E,c={sphere:f.Z,point:f.Z,lineStart:l,lineEnd:f.Z,polygonStart:f.Z,polygonEnd:f.Z};function l(){c.point=M,c.lineEnd=m}function m(){c.point=c.lineEnd=f.Z}function M(mr,Ar){mr*=i.uR,Ar*=i.uR,b=mr,p=(0,i.O$)(Ar),E=(0,i.mC)(Ar),c.point=L}function L(mr,Ar){mr*=i.uR,Ar*=i.uR;var zr=(0,i.O$)(Ar),Br=(0,i.mC)(Ar),on=(0,i.Wn)(mr-b),mn=(0,i.mC)(on),Tn=(0,i.O$)(on),An=Br*Tn,Fn=E*zr-p*Br*mn,Jn=p*zr+E*Br*mn;h.add((0,i.fv)((0,i._b)(An*An+Fn*Fn),Jn)),b=mr,p=zr,E=Br}function D(mr){return h.reset(),(0,g.Z)(mr,c),+h}var A=[null,null],C={type:"LineString",coordinates:A};function S(mr,Ar){return A[0]=mr,A[1]=Ar,D(C)}var o={Feature:function(mr,Ar){return T(mr.geometry,Ar)},FeatureCollection:function(mr,Ar){for(var zr=mr.features,Br=-1,on=zr.length;++Br<on;)if(T(zr[Br].geometry,Ar))return!0;return!1}},R={Sphere:function(){return!0},Point:function(mr,Ar){return O(mr.coordinates,Ar)},MultiPoint:function(mr,Ar){for(var zr=mr.coordinates,Br=-1,on=zr.length;++Br<on;)if(O(zr[Br],Ar))return!0;return!1},LineString:function(mr,Ar){return N(mr.coordinates,Ar)},MultiLineString:function(mr,Ar){for(var zr=mr.coordinates,Br=-1,on=zr.length;++Br<on;)if(N(zr[Br],Ar))return!0;return!1},Polygon:function(mr,Ar){return H(mr.coordinates,Ar)},MultiPolygon:function(mr,Ar){for(var zr=mr.coordinates,Br=-1,on=zr.length;++Br<on;)if(H(zr[Br],Ar))return!0;return!1},GeometryCollection:function(mr,Ar){for(var zr=mr.geometries,Br=-1,on=zr.length;++Br<on;)if(T(zr[Br],Ar))return!0;return!1}};function T(mr,Ar){return mr&&R.hasOwnProperty(mr.type)?R[mr.type](mr,Ar):!1}function O(mr,Ar){return S(mr,Ar)===0}function N(mr,Ar){for(var zr,Br,on,mn=0,Tn=mr.length;mn<Tn;mn++){if(Br=S(mr[mn],Ar),Br===0||mn>0&&(on=S(mr[mn],mr[mn-1]),on>0&&zr<=on&&Br<=on&&(zr+Br-on)*(1-Math.pow((zr-Br)/on,2))<i.aW*on))return!0;zr=Br}return!1}function H(mr,Ar){return!!(0,n.Z)(mr.map(k),V(Ar))}function k(mr){return mr=mr.map(V),mr.pop(),mr}function V(mr){return[mr[0]*i.uR,mr[1]*i.uR]}function G(mr,Ar){return(mr&&o.hasOwnProperty(mr.type)?o[mr.type]:T)(mr,Ar)}var U=e(33064);function Y(mr,Ar,zr){var Br=(0,U.w6)(mr,Ar-i.Ho,zr).concat(Ar);return function(on){return Br.map(function(mn){return[on,mn]})}}function ee(mr,Ar,zr){var Br=(0,U.w6)(mr,Ar-i.Ho,zr).concat(Ar);return function(on){return Br.map(function(mn){return[mn,on]})}}function re(){var mr,Ar,zr,Br,on,mn,Tn,An,Fn=10,Jn=Fn,ta=90,sa=360,ha,la,Dr,sn,nn=2.5;function dn(){return{type:"MultiLineString",coordinates:Un()}}function Un(){return(0,U.w6)((0,i.mD)(Br/ta)*ta,zr,ta).map(Dr).concat((0,U.w6)((0,i.mD)(An/sa)*sa,Tn,sa).map(sn)).concat((0,U.w6)((0,i.mD)(Ar/Fn)*Fn,mr,Fn).filter(function(Ln){return(0,i.Wn)(Ln%ta)>i.Ho}).map(ha)).concat((0,U.w6)((0,i.mD)(mn/Jn)*Jn,on,Jn).filter(function(Ln){return(0,i.Wn)(Ln%sa)>i.Ho}).map(la))}return dn.lines=function(){return Un().map(function(Ln){return{type:"LineString",coordinates:Ln}})},dn.outline=function(){return{type:"Polygon",coordinates:[Dr(Br).concat(sn(Tn).slice(1),Dr(zr).reverse().slice(1),sn(An).reverse().slice(1))]}},dn.extent=function(Ln){return arguments.length?dn.extentMajor(Ln).extentMinor(Ln):dn.extentMinor()},dn.extentMajor=function(Ln){return arguments.length?(Br=+Ln[0][0],zr=+Ln[1][0],An=+Ln[0][1],Tn=+Ln[1][1],Br>zr&&(Ln=Br,Br=zr,zr=Ln),An>Tn&&(Ln=An,An=Tn,Tn=Ln),dn.precision(nn)):[[Br,An],[zr,Tn]]},dn.extentMinor=function(Ln){return arguments.length?(Ar=+Ln[0][0],mr=+Ln[1][0],mn=+Ln[0][1],on=+Ln[1][1],Ar>mr&&(Ln=Ar,Ar=mr,mr=Ln),mn>on&&(Ln=mn,mn=on,on=Ln),dn.precision(nn)):[[Ar,mn],[mr,on]]},dn.step=function(Ln){return arguments.length?dn.stepMajor(Ln).stepMinor(Ln):dn.stepMinor()},dn.stepMajor=function(Ln){return arguments.length?(ta=+Ln[0],sa=+Ln[1],dn):[ta,sa]},dn.stepMinor=function(Ln){return arguments.length?(Fn=+Ln[0],Jn=+Ln[1],dn):[Fn,Jn]},dn.precision=function(Ln){return arguments.length?(nn=+Ln,ha=Y(mn,on,90),la=ee(Ar,mr,nn),Dr=Y(An,Tn,90),sn=ee(Br,zr,nn),dn):nn},dn.extentMajor([[-180,-90+i.Ho],[180,90-i.Ho]]).extentMinor([[-180,-80-i.Ho],[180,80+i.Ho]])}function ie(){return re()()}var se=e(83074),ce=e(8593),q=(0,u.Z)(),j=(0,u.Z)(),Z,Q,ue,fe,te={point:f.Z,lineStart:f.Z,lineEnd:f.Z,polygonStart:function(){te.lineStart=ne,te.lineEnd=xe},polygonEnd:function(){te.lineStart=te.lineEnd=te.point=f.Z,q.add((0,i.Wn)(j)),j.reset()},result:function(){var mr=q/2;return q.reset(),mr}};function ne(){te.point=ve}function ve(mr,Ar){te.point=le,Z=ue=mr,Q=fe=Ar}function le(mr,Ar){j.add(fe*mr-ue*Ar),ue=mr,fe=Ar}function xe(){le(Z,Q)}var Se=te,Re=e(3559),Ee=0,Oe=0,Be=0,Le=0,Te=0,De=0,Ve=0,Ye=0,Ne=0,Xe,ht,st,it,nt={point:pt,lineStart:Tt,lineEnd:et,polygonStart:function(){nt.lineStart=Ue,nt.lineEnd=ze},polygonEnd:function(){nt.point=pt,nt.lineStart=Tt,nt.lineEnd=et},result:function(){var mr=Ne?[Ve/Ne,Ye/Ne]:De?[Le/De,Te/De]:Be?[Ee/Be,Oe/Be]:[NaN,NaN];return Ee=Oe=Be=Le=Te=De=Ve=Ye=Ne=0,mr}};function pt(mr,Ar){Ee+=mr,Oe+=Ar,++Be}function Tt(){nt.point=Et}function Et(mr,Ar){nt.point=Dt,pt(st=mr,it=Ar)}function Dt(mr,Ar){var zr=mr-st,Br=Ar-it,on=(0,i._b)(zr*zr+Br*Br);Le+=on*(st+mr)/2,Te+=on*(it+Ar)/2,De+=on,pt(st=mr,it=Ar)}function et(){nt.point=pt}function Ue(){nt.point=rt}function ze(){lt(Xe,ht)}function rt(mr,Ar){nt.point=lt,pt(Xe=st=mr,ht=it=Ar)}function lt(mr,Ar){var zr=mr-st,Br=Ar-it,on=(0,i._b)(zr*zr+Br*Br);Le+=on*(st+mr)/2,Te+=on*(it+Ar)/2,De+=on,on=it*mr-st*Ar,Ve+=on*(st+mr),Ye+=on*(it+Ar),Ne+=on*3,pt(st=mr,it=Ar)}var Qe=nt;function Fe(mr){this._context=mr}Fe.prototype={_radius:4.5,pointRadius:function(mr){return this._radius=mr,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(mr,Ar){switch(this._point){case 0:{this._context.moveTo(mr,Ar),this._point=1;break}case 1:{this._context.lineTo(mr,Ar);break}default:{this._context.moveTo(mr+this._radius,Ar),this._context.arc(mr,Ar,this._radius,0,i.BZ);break}}},result:f.Z};var Ce=(0,u.Z)(),pe,we,Ae,Pe,Ge,We={point:f.Z,lineStart:function(){We.point=tt},lineEnd:function(){pe&&ct(we,Ae),We.point=f.Z},polygonStart:function(){pe=!0},polygonEnd:function(){pe=null},result:function(){var mr=+Ce;return Ce.reset(),mr}};function tt(mr,Ar){We.point=ct,we=Pe=mr,Ae=Ge=Ar}function ct(mr,Ar){Pe-=mr,Ge-=Ar,Ce.add((0,i._b)(Pe*Pe+Ge*Ge)),Pe=mr,Ge=Ar}var St=We;function Pt(){this._string=[]}Pt.prototype={_radius:4.5,_circle:wt(4.5),pointRadius:function(mr){return(mr=+mr)!==this._radius&&(this._radius=mr,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(mr,Ar){switch(this._point){case 0:{this._string.push("M",mr,",",Ar),this._point=1;break}case 1:{this._string.push("L",mr,",",Ar);break}default:{this._circle==null&&(this._circle=wt(this._radius)),this._string.push("M",mr,",",Ar,this._circle);break}}},result:function(){if(this._string.length){var mr=this._string.join("");return this._string=[],mr}else return null}};function wt(mr){return"m0,"+mr+"a"+mr+","+mr+" 0 1,1 0,"+-2*mr+"a"+mr+","+mr+" 0 1,1 0,"+2*mr+"z"}function Bt(mr,Ar){var zr=4.5,Br,on;function mn(Tn){return Tn&&(typeof zr=="function"&&on.pointRadius(+zr.apply(this,arguments)),(0,g.Z)(Tn,Br(on))),on.result()}return mn.area=function(Tn){return(0,g.Z)(Tn,Br(Se)),Se.result()},mn.measure=function(Tn){return(0,g.Z)(Tn,Br(St)),St.result()},mn.bounds=function(Tn){return(0,g.Z)(Tn,Br(Re.Z)),Re.Z.result()},mn.centroid=function(Tn){return(0,g.Z)(Tn,Br(Qe)),Qe.result()},mn.projection=function(Tn){return arguments.length?(Br=Tn==null?(mr=null,ce.Z):(mr=Tn).stream,mn):mr},mn.context=function(Tn){return arguments.length?(on=Tn==null?(Ar=null,new Pt):new Fe(Ar=Tn),typeof zr!="function"&&on.pointRadius(zr),mn):Ar},mn.pointRadius=function(Tn){return arguments.length?(zr=typeof Tn=="function"?Tn:(on.pointRadius(+Tn),+Tn),mn):zr},mn.projection(mr).context(Ar)}var Wt=e(15002);function hr(mr){var Ar=0,zr=i.pi/3,Br=(0,Wt.r)(mr),on=Br(Ar,zr);return on.parallels=function(mn){return arguments.length?Br(Ar=mn[0]*i.uR,zr=mn[1]*i.uR):[Ar*i.RW,zr*i.RW]},on}function gt(mr){var Ar=(0,i.mC)(mr);function zr(Br,on){return[Br*Ar,(0,i.O$)(on)/Ar]}return zr.invert=function(Br,on){return[Br/Ar,(0,i.ZR)(on*Ar)]},zr}function jt(mr,Ar){var zr=(0,i.O$)(mr),Br=(zr+(0,i.O$)(Ar))/2;if((0,i.Wn)(Br)<i.Ho)return gt(mr);var on=1+zr*(2*Br-zr),mn=(0,i._b)(on)/Br;function Tn(An,Fn){var Jn=(0,i._b)(on-2*Br*(0,i.O$)(Fn))/Br;return[Jn*(0,i.O$)(An*=Br),mn-Jn*(0,i.mC)(An)]}return Tn.invert=function(An,Fn){var Jn=mn-Fn,ta=(0,i.fv)(An,(0,i.Wn)(Jn))*(0,i.Xx)(Jn);return Jn*Br<0&&(ta-=i.pi*(0,i.Xx)(An)*(0,i.Xx)(Jn)),[ta/Br,(0,i.ZR)((on-(An*An+Jn*Jn)*Br*Br)/(2*Br))]},Tn}function Ut(){return hr(jt).scale(155.424).center([0,33.6442])}function or(){return Ut().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}var ur=e(47589);function dt(mr){var Ar=mr.length;return{point:function(zr,Br){for(var on=-1;++on<Ar;)mr[on].point(zr,Br)},sphere:function(){for(var zr=-1;++zr<Ar;)mr[zr].sphere()},lineStart:function(){for(var zr=-1;++zr<Ar;)mr[zr].lineStart()},lineEnd:function(){for(var zr=-1;++zr<Ar;)mr[zr].lineEnd()},polygonStart:function(){for(var zr=-1;++zr<Ar;)mr[zr].polygonStart()},polygonEnd:function(){for(var zr=-1;++zr<Ar;)mr[zr].polygonEnd()}}}function ut(){var mr,Ar,zr=or(),Br,on=Ut().rotate([154,0]).center([-2,58.5]).parallels([55,65]),mn,Tn=Ut().rotate([157,0]).center([-3,19.9]).parallels([8,18]),An,Fn,Jn={point:function(ha,la){Fn=[ha,la]}};function ta(ha){var la=ha[0],Dr=ha[1];return Fn=null,Br.point(la,Dr),Fn||(mn.point(la,Dr),Fn)||(An.point(la,Dr),Fn)}ta.invert=function(ha){var la=zr.scale(),Dr=zr.translate(),sn=(ha[0]-Dr[0])/la,nn=(ha[1]-Dr[1])/la;return(nn>=.12&&nn<.234&&sn>=-.425&&sn<-.214?on:nn>=.166&&nn<.234&&sn>=-.214&&sn<-.115?Tn:zr).invert(ha)},ta.stream=function(ha){return mr&&Ar===ha?mr:mr=dt([zr.stream(Ar=ha),on.stream(ha),Tn.stream(ha)])},ta.precision=function(ha){return arguments.length?(zr.precision(ha),on.precision(ha),Tn.precision(ha),sa()):zr.precision()},ta.scale=function(ha){return arguments.length?(zr.scale(ha),on.scale(ha*.35),Tn.scale(ha),ta.translate(zr.translate())):zr.scale()},ta.translate=function(ha){if(!arguments.length)return zr.translate();var la=zr.scale(),Dr=+ha[0],sn=+ha[1];return Br=zr.translate(ha).clipExtent([[Dr-.455*la,sn-.238*la],[Dr+.455*la,sn+.238*la]]).stream(Jn),mn=on.translate([Dr-.307*la,sn+.201*la]).clipExtent([[Dr-.425*la+i.Ho,sn+.12*la+i.Ho],[Dr-.214*la-i.Ho,sn+.234*la-i.Ho]]).stream(Jn),An=Tn.translate([Dr-.205*la,sn+.212*la]).clipExtent([[Dr-.214*la+i.Ho,sn+.166*la+i.Ho],[Dr-.115*la-i.Ho,sn+.234*la-i.Ho]]).stream(Jn),sa()},ta.fitExtent=function(ha,la){return(0,ur.qg)(ta,ha,la)},ta.fitSize=function(ha,la){return(0,ur.mF)(ta,ha,la)},ta.fitWidth=function(ha,la){return(0,ur.V6)(ta,ha,la)},ta.fitHeight=function(ha,la){return(0,ur.rf)(ta,ha,la)};function sa(){return mr=Ar=null,ta}return ta.scale(1070)}var yt=e(12956),Lt=e(17889),Rt=e(49386);function Nt(mr,Ar){return[mr,(0,i.cM)((0,i.OR)((i.ou+Ar)/2))]}Nt.invert=function(mr,Ar){return[mr,2*(0,i.z4)((0,i.Qq)(Ar))-i.ou]};function Vt(){return Zt(Nt).scale(961/i.BZ)}function Zt(mr){var Ar=(0,Wt.Z)(mr),zr=Ar.center,Br=Ar.scale,on=Ar.translate,mn=Ar.clipExtent,Tn=null,An,Fn,Jn;Ar.scale=function(sa){return arguments.length?(Br(sa),ta()):Br()},Ar.translate=function(sa){return arguments.length?(on(sa),ta()):on()},Ar.center=function(sa){return arguments.length?(zr(sa),ta()):zr()},Ar.clipExtent=function(sa){return arguments.length?(sa==null?Tn=An=Fn=Jn=null:(Tn=+sa[0][0],An=+sa[0][1],Fn=+sa[1][0],Jn=+sa[1][1]),ta()):Tn==null?null:[[Tn,An],[Fn,Jn]]};function ta(){var sa=i.pi*Br(),ha=Ar((0,Rt.Z)(Ar.rotate()).invert([0,0]));return mn(Tn==null?[[ha[0]-sa,ha[1]-sa],[ha[0]+sa,ha[1]+sa]]:mr===Nt?[[Math.max(ha[0]-sa,Tn),An],[Math.min(ha[0]+sa,Fn),Jn]]:[[Tn,Math.max(ha[1]-sa,An)],[Fn,Math.min(ha[1]+sa,Jn)]])}return ta()}function qt(mr){return(0,i.OR)((i.ou+mr)/2)}function Jt(mr,Ar){var zr=(0,i.mC)(mr),Br=mr===Ar?(0,i.O$)(mr):(0,i.cM)(zr/(0,i.mC)(Ar))/(0,i.cM)(qt(Ar)/qt(mr)),on=zr*(0,i.sQ)(qt(mr),Br)/Br;if(!Br)return Nt;function mn(Tn,An){on>0?An<-i.ou+i.Ho&&(An=-i.ou+i.Ho):An>i.ou-i.Ho&&(An=i.ou-i.Ho);var Fn=on/(0,i.sQ)(qt(An),Br);return[Fn*(0,i.O$)(Br*Tn),on-Fn*(0,i.mC)(Br*Tn)]}return mn.invert=function(Tn,An){var Fn=on-An,Jn=(0,i.Xx)(Br)*(0,i._b)(Tn*Tn+Fn*Fn),ta=(0,i.fv)(Tn,(0,i.Wn)(Fn))*(0,i.Xx)(Fn);return Fn*Br<0&&(ta-=i.pi*(0,i.Xx)(Tn)*(0,i.Xx)(Fn)),[ta/Br,2*(0,i.z4)((0,i.sQ)(on/Jn,1/Br))-i.ou]},mn}function nr(){return hr(Jt).scale(109.5).parallels([30,30])}var Mr=e(97492);function Ke(mr,Ar){var zr=(0,i.mC)(mr),Br=mr===Ar?(0,i.O$)(mr):(zr-(0,i.mC)(Ar))/(Ar-mr),on=zr/Br+mr;if((0,i.Wn)(Br)<i.Ho)return Mr.k;function mn(Tn,An){var Fn=on-An,Jn=Br*Tn;return[Fn*(0,i.O$)(Jn),on-Fn*(0,i.mC)(Jn)]}return mn.invert=function(Tn,An){var Fn=on-An,Jn=(0,i.fv)(Tn,(0,i.Wn)(Fn))*(0,i.Xx)(Fn);return Fn*Br<0&&(Jn-=i.pi*(0,i.Xx)(Tn)*(0,i.Xx)(Fn)),[Jn/Br,on-(0,i.Xx)(Br)*(0,i._b)(Tn*Tn+Fn*Fn)]},mn}function Ze(){return hr(Ke).scale(131.154).center([0,13.9389])}var zt=1.340264,kt=-.081106,Qt=893e-6,cr=.003796,fr=(0,i._b)(3)/2,ir=12;function Yt(mr,Ar){var zr=(0,i.ZR)(fr*(0,i.O$)(Ar)),Br=zr*zr,on=Br*Br*Br;return[mr*(0,i.mC)(zr)/(fr*(zt+3*kt*Br+on*(7*Qt+9*cr*Br))),zr*(zt+kt*Br+on*(Qt+cr*Br))]}Yt.invert=function(mr,Ar){for(var zr=Ar,Br=zr*zr,on=Br*Br*Br,mn=0,Tn,An,Fn;mn<ir&&(An=zr*(zt+kt*Br+on*(Qt+cr*Br))-Ar,Fn=zt+3*kt*Br+on*(7*Qt+9*cr*Br),zr-=Tn=An/Fn,Br=zr*zr,on=Br*Br*Br,!((0,i.Wn)(Tn)<i.aW));++mn);return[fr*mr*(zt+3*kt*Br+on*(7*Qt+9*cr*Br))/(0,i.mC)(zr),(0,i.ZR)((0,i.O$)(zr)/fr)]};function gr(){return(0,Wt.Z)(Yt).scale(177.158)}var yr=e(98936),Tr=e(64684);function pr(){var mr=1,Ar=0,zr=0,Br=1,on=1,mn=0,Tn,An,Fn=null,Jn,ta,sa,ha=1,la=1,Dr=(0,Tr.l)({point:function(Pn,Vn){var aa=Ln([Pn,Vn]);this.stream.point(aa[0],aa[1])}}),sn=ce.Z,nn,dn;function Un(){return ha=mr*Br,la=mr*on,nn=dn=null,Ln}function Ln(Pn){var Vn=Pn[0]*ha,aa=Pn[1]*la;if(mn){var Da=aa*Tn-Vn*An;Vn=Vn*Tn+aa*An,aa=Da}return[Vn+Ar,aa+zr]}return Ln.invert=function(Pn){var Vn=Pn[0]-Ar,aa=Pn[1]-zr;if(mn){var Da=aa*Tn+Vn*An;Vn=Vn*Tn-aa*An,aa=Da}return[Vn/ha,aa/la]},Ln.stream=function(Pn){return nn&&dn===Pn?nn:nn=Dr(sn(dn=Pn))},Ln.postclip=function(Pn){return arguments.length?(sn=Pn,Fn=Jn=ta=sa=null,Un()):sn},Ln.clipExtent=function(Pn){return arguments.length?(sn=Pn==null?(Fn=Jn=ta=sa=null,ce.Z):(0,y.Z)(Fn=+Pn[0][0],Jn=+Pn[0][1],ta=+Pn[1][0],sa=+Pn[1][1]),Un()):Fn==null?null:[[Fn,Jn],[ta,sa]]},Ln.scale=function(Pn){return arguments.length?(mr=+Pn,Un()):mr},Ln.translate=function(Pn){return arguments.length?(Ar=+Pn[0],zr=+Pn[1],Un()):[Ar,zr]},Ln.angle=function(Pn){return arguments.length?(mn=Pn%360*i.uR,An=(0,i.O$)(mn),Tn=(0,i.mC)(mn),Un()):mn*i.RW},Ln.reflectX=function(Pn){return arguments.length?(Br=Pn?-1:1,Un()):Br<0},Ln.reflectY=function(Pn){return arguments.length?(on=Pn?-1:1,Un()):on<0},Ln.fitExtent=function(Pn,Vn){return(0,ur.qg)(Ln,Pn,Vn)},Ln.fitSize=function(Pn,Vn){return(0,ur.mF)(Ln,Pn,Vn)},Ln.fitWidth=function(Pn,Vn){return(0,ur.V6)(Ln,Pn,Vn)},Ln.fitHeight=function(Pn,Vn){return(0,ur.rf)(Ln,Pn,Vn)},Ln}var Kr=e(26867),Or=e(57962),Nr=e(25382);function Sn(mr,Ar){var zr=(0,i.mC)(Ar),Br=1+(0,i.mC)(mr)*zr;return[zr*(0,i.O$)(mr)/Br,(0,i.O$)(Ar)/Br]}Sn.invert=(0,Nr.O)(function(mr){return 2*(0,i.z4)(mr)});function Jr(){return(0,Wt.Z)(Sn).scale(250).clipAngle(142)}function xn(mr,Ar){return[(0,i.cM)((0,i.OR)((i.ou+Ar)/2)),-mr]}xn.invert=function(mr,Ar){return[-Ar,2*(0,i.z4)((0,i.Qq)(mr))-i.ou]};function Dn(){var mr=Zt(xn),Ar=mr.center,zr=mr.rotate;return mr.center=function(Br){return arguments.length?Ar([-Br[1],Br[0]]):(Br=Ar(),[Br[1],-Br[0]])},mr.rotate=function(Br){return arguments.length?zr([Br[0],Br[1],Br.length>2?Br[2]+90:90]):(Br=zr(),[Br[0],Br[1],Br[2]-90])},zr([0,0,90]).scale(159.155)}},83074:function(z,B,e){e.d(B,{Z:function(){return P}});var d=e(39695);function P(a,_){var x=a[0]*d.uR,v=a[1]*d.uR,y=_[0]*d.uR,r=_[1]*d.uR,n=(0,d.mC)(v),u=(0,d.O$)(v),i=(0,d.mC)(r),f=(0,d.O$)(r),g=n*(0,d.mC)(x),h=n*(0,d.O$)(x),b=i*(0,d.mC)(y),p=i*(0,d.O$)(y),E=2*(0,d.ZR)((0,d._b)((0,d.Jy)(r-v)+n*i*(0,d.Jy)(y-x))),c=(0,d.O$)(E),l=E?function(m){var M=(0,d.O$)(m*=E)/c,L=(0,d.O$)(E-m)/c,D=L*g+M*b,A=L*h+M*p,C=L*u+M*f;return[(0,d.fv)(A,D)*d.RW,(0,d.fv)(C,(0,d._b)(D*D+A*A))*d.RW]}:function(){return[x*d.RW,v*d.RW]};return l.distance=E,l}},39695:function(z,B,e){e.d(B,{BZ:function(){return v},Ho:function(){return d},Jy:function(){return D},Kh:function(){return M},O$:function(){return E},OR:function(){return m},Qq:function(){return h},RW:function(){return y},Wn:function(){return n},Xx:function(){return c},ZR:function(){return L},_b:function(){return l},aW:function(){return P},cM:function(){return b},fv:function(){return i},mC:function(){return f},mD:function(){return g},ou:function(){return _},pi:function(){return a},pu:function(){return x},sQ:function(){return p},uR:function(){return r},z4:function(){return u}});var d=1e-6,P=1e-12,a=Math.PI,_=a/2,x=a/4,v=a*2,y=180/a,r=a/180,n=Math.abs,u=Math.atan,i=Math.atan2,f=Math.cos,g=Math.ceil,h=Math.exp,b=Math.log,p=Math.pow,E=Math.sin,c=Math.sign||function(A){return A>0?1:A<0?-1:0},l=Math.sqrt,m=Math.tan;function M(A){return A>1?0:A<-1?a:Math.acos(A)}function L(A){return A>1?_:A<-1?-_:Math.asin(A)}function D(A){return(A=E(A/2))*A}},73182:function(z,B,e){e.d(B,{Z:function(){return d}});function d(){}},3559:function(z,B,e){var d=e(73182),P=1/0,a=P,_=-P,x=_,v={point:y,lineStart:d.Z,lineEnd:d.Z,polygonStart:d.Z,polygonEnd:d.Z,result:function(){var r=[[P,a],[_,x]];return _=x=-(a=P=1/0),r}};function y(r,n){r<P&&(P=r),r>_&&(_=r),n<a&&(a=n),n>x&&(x=n)}B.Z=v},67108:function(z,B,e){e.d(B,{Z:function(){return P}});var d=e(39695);function P(a,_){return(0,d.Wn)(a[0]-_[0])<d.Ho&&(0,d.Wn)(a[1]-_[1])<d.Ho}},23071:function(z,B,e){e.d(B,{Z:function(){return v}});var d=e(33940),P=e(7620),a=e(39695),_=(0,d.Z)();function x(y){return(0,a.Wn)(y[0])<=a.pi?y[0]:(0,a.Xx)(y[0])*(((0,a.Wn)(y[0])+a.pi)%a.BZ-a.pi)}function v(y,r){var n=x(r),u=r[1],i=(0,a.O$)(u),f=[(0,a.O$)(n),-(0,a.mC)(n),0],g=0,h=0;_.reset(),i===1?u=a.ou+a.Ho:i===-1&&(u=-a.ou-a.Ho);for(var b=0,p=y.length;b<p;++b)if(c=(E=y[b]).length)for(var E,c,l=E[c-1],m=x(l),M=l[1]/2+a.pu,L=(0,a.O$)(M),D=(0,a.mC)(M),A=0;A<c;++A,m=S,L=R,D=T,l=C){var C=E[A],S=x(C),o=C[1]/2+a.pu,R=(0,a.O$)(o),T=(0,a.mC)(o),O=S-m,N=O>=0?1:-1,H=N*O,k=H>a.pi,V=L*R;if(_.add((0,a.fv)(V*N*(0,a.O$)(H),D*T+V*(0,a.mC)(H))),g+=k?O+N*a.BZ:O,k^m>=n^S>=n){var G=(0,P.T5)((0,P.Og)(l),(0,P.Og)(C));(0,P.iJ)(G);var U=(0,P.T5)(f,G);(0,P.iJ)(U);var Y=(k^O>=0?-1:1)*(0,a.ZR)(U[2]);(u>Y||u===Y&&(G[0]||G[1]))&&(h+=k^O>=0?1:-1)}}return(g<-a.Ho||g<a.Ho&&_<-a.Ho)^h&1}},25382:function(z,B,e){e.d(B,{O:function(){return a},W:function(){return P}});var d=e(39695);function P(_){return function(x,v){var y=(0,d.mC)(x),r=(0,d.mC)(v),n=_(y*r);return[n*r*(0,d.O$)(x),n*(0,d.O$)(v)]}}function a(_){return function(x,v){var y=(0,d._b)(x*x+v*v),r=_(y),n=(0,d.O$)(r),u=(0,d.mC)(r);return[(0,d.fv)(x*n,y*u),(0,d.ZR)(y&&v*n/y)]}}},12956:function(z,B,e){e.d(B,{Z:function(){return x},l:function(){return _}});var d=e(39695),P=e(25382),a=e(15002),_=(0,P.W)(function(v){return(0,d._b)(2/(1+v))});_.invert=(0,P.O)(function(v){return 2*(0,d.ZR)(v/2)});function x(){return(0,a.Z)(_).scale(124.75).clipAngle(179.999)}},17889:function(z,B,e){e.d(B,{N:function(){return _},Z:function(){return x}});var d=e(39695),P=e(25382),a=e(15002),_=(0,P.W)(function(v){return(v=(0,d.Kh)(v))&&v/(0,d.O$)(v)});_.invert=(0,P.O)(function(v){return v});function x(){return(0,a.Z)(_).scale(79.4188).clipAngle(179.999)}},97492:function(z,B,e){e.d(B,{Z:function(){return a},k:function(){return P}});var d=e(15002);function P(_,x){return[_,x]}P.invert=P;function a(){return(0,d.Z)(P).scale(152.63)}},47589:function(z,B,e){e.d(B,{V6:function(){return v},mF:function(){return x},qg:function(){return _},rf:function(){return y}});var d=e(72736),P=e(3559);function a(r,n,u){var i=r.clipExtent&&r.clipExtent();return r.scale(150).translate([0,0]),i!=null&&r.clipExtent(null),(0,d.Z)(u,r.stream(P.Z)),n(P.Z.result()),i!=null&&r.clipExtent(i),r}function _(r,n,u){return a(r,function(i){var f=n[1][0]-n[0][0],g=n[1][1]-n[0][1],h=Math.min(f/(i[1][0]-i[0][0]),g/(i[1][1]-i[0][1])),b=+n[0][0]+(f-h*(i[1][0]+i[0][0]))/2,p=+n[0][1]+(g-h*(i[1][1]+i[0][1]))/2;r.scale(150*h).translate([b,p])},u)}function x(r,n,u){return _(r,[[0,0],n],u)}function v(r,n,u){return a(r,function(i){var f=+n,g=f/(i[1][0]-i[0][0]),h=(f-g*(i[1][0]+i[0][0]))/2,b=-g*i[0][1];r.scale(150*g).translate([h,b])},u)}function y(r,n,u){return a(r,function(i){var f=+n,g=f/(i[1][1]-i[0][1]),h=-g*i[0][0],b=(f-g*(i[1][1]+i[0][1]))/2;r.scale(150*g).translate([h,b])},u)}},98936:function(z,B,e){e.d(B,{M:function(){return _},Z:function(){return x}});var d=e(39695),P=e(25382),a=e(15002);function _(v,y){var r=(0,d.mC)(y),n=(0,d.mC)(v)*r;return[r*(0,d.O$)(v)/n,(0,d.O$)(y)/n]}_.invert=(0,P.O)(d.z4);function x(){return(0,a.Z)(_).scale(144.049).clipAngle(60)}},15002:function(z,B,e){e.d(B,{Z:function(){return m},r:function(){return M}});var d=e(87070),P=e(1457),a=e(87605),_=e(96059),x=e(8593),v=e(39695),y=e(49386),r=e(64684),n=e(47589),u=e(7620),i=16,f=(0,v.mC)(30*v.uR);function g(L,D){return+D?b(L,D):h(L)}function h(L){return(0,r.l)({point:function(D,A){D=L(D,A),this.stream.point(D[0],D[1])}})}function b(L,D){function A(C,S,o,R,T,O,N,H,k,V,G,U,Y,ee){var re=N-C,ie=H-S,se=re*re+ie*ie;if(se>4*D&&Y--){var ce=R+V,q=T+G,j=O+U,Z=(0,v._b)(ce*ce+q*q+j*j),Q=(0,v.ZR)(j/=Z),ue=(0,v.Wn)((0,v.Wn)(j)-1)<v.Ho||(0,v.Wn)(o-k)<v.Ho?(o+k)/2:(0,v.fv)(q,ce),fe=L(ue,Q),te=fe[0],ne=fe[1],ve=te-C,le=ne-S,xe=ie*ve-re*le;(xe*xe/se>D||(0,v.Wn)((re*ve+ie*le)/se-.5)>.3||R*V+T*G+O*U<f)&&(A(C,S,o,R,T,O,te,ne,ue,ce/=Z,q/=Z,j,Y,ee),ee.point(te,ne),A(te,ne,ue,ce,q,j,N,H,k,V,G,U,Y,ee))}}return function(C){var S,o,R,T,O,N,H,k,V,G,U,Y,ee={point:re,lineStart:ie,lineEnd:ce,polygonStart:function(){C.polygonStart(),ee.lineStart=q},polygonEnd:function(){C.polygonEnd(),ee.lineStart=ie}};function re(Q,ue){Q=L(Q,ue),C.point(Q[0],Q[1])}function ie(){k=NaN,ee.point=se,C.lineStart()}function se(Q,ue){var fe=(0,u.Og)([Q,ue]),te=L(Q,ue);A(k,V,H,G,U,Y,k=te[0],V=te[1],H=Q,G=fe[0],U=fe[1],Y=fe[2],i,C),C.point(k,V)}function ce(){ee.point=re,C.lineEnd()}function q(){ie(),ee.point=j,ee.lineEnd=Z}function j(Q,ue){se(S=Q,ue),o=k,R=V,T=G,O=U,N=Y,ee.point=se}function Z(){A(k,V,H,G,U,Y,o,R,S,T,O,N,i,C),ee.lineEnd=ce,ce()}return ee}}var p=(0,r.l)({point:function(L,D){this.stream.point(L*v.uR,D*v.uR)}});function E(L){return(0,r.l)({point:function(D,A){var C=L(D,A);return this.stream.point(C[0],C[1])}})}function c(L,D,A,C,S){function o(R,T){return R*=C,T*=S,[D+L*R,A-L*T]}return o.invert=function(R,T){return[(R-D)/L*C,(A-T)/L*S]},o}function l(L,D,A,C,S,o){var R=(0,v.mC)(o),T=(0,v.O$)(o),O=R*L,N=T*L,H=R/L,k=T/L,V=(T*A-R*D)/L,G=(T*D+R*A)/L;function U(Y,ee){return Y*=C,ee*=S,[O*Y-N*ee+D,A-N*Y-O*ee]}return U.invert=function(Y,ee){return[C*(H*Y-k*ee+V),S*(G-k*Y-H*ee)]},U}function m(L){return M(function(){return L})()}function M(L){var D,A=150,C=480,S=250,o=0,R=0,T=0,O=0,N=0,H,k=0,V=1,G=1,U=null,Y=d.Z,ee=null,re,ie,se,ce=x.Z,q=.5,j,Z,Q,ue,fe;function te(xe){return Q(xe[0]*v.uR,xe[1]*v.uR)}function ne(xe){return xe=Q.invert(xe[0],xe[1]),xe&&[xe[0]*v.RW,xe[1]*v.RW]}te.stream=function(xe){return ue&&fe===xe?ue:ue=p(E(H)(Y(j(ce(fe=xe)))))},te.preclip=function(xe){return arguments.length?(Y=xe,U=void 0,le()):Y},te.postclip=function(xe){return arguments.length?(ce=xe,ee=re=ie=se=null,le()):ce},te.clipAngle=function(xe){return arguments.length?(Y=+xe?(0,P.Z)(U=xe*v.uR):(U=null,d.Z),le()):U*v.RW},te.clipExtent=function(xe){return arguments.length?(ce=xe==null?(ee=re=ie=se=null,x.Z):(0,a.Z)(ee=+xe[0][0],re=+xe[0][1],ie=+xe[1][0],se=+xe[1][1]),le()):ee==null?null:[[ee,re],[ie,se]]},te.scale=function(xe){return arguments.length?(A=+xe,ve()):A},te.translate=function(xe){return arguments.length?(C=+xe[0],S=+xe[1],ve()):[C,S]},te.center=function(xe){return arguments.length?(o=xe[0]%360*v.uR,R=xe[1]%360*v.uR,ve()):[o*v.RW,R*v.RW]},te.rotate=function(xe){return arguments.length?(T=xe[0]%360*v.uR,O=xe[1]%360*v.uR,N=xe.length>2?xe[2]%360*v.uR:0,ve()):[T*v.RW,O*v.RW,N*v.RW]},te.angle=function(xe){return arguments.length?(k=xe%360*v.uR,ve()):k*v.RW},te.reflectX=function(xe){return arguments.length?(V=xe?-1:1,ve()):V<0},te.reflectY=function(xe){return arguments.length?(G=xe?-1:1,ve()):G<0},te.precision=function(xe){return arguments.length?(j=g(Z,q=xe*xe),le()):(0,v._b)(q)},te.fitExtent=function(xe,Se){return(0,n.qg)(te,xe,Se)},te.fitSize=function(xe,Se){return(0,n.mF)(te,xe,Se)},te.fitWidth=function(xe,Se){return(0,n.V6)(te,xe,Se)},te.fitHeight=function(xe,Se){return(0,n.rf)(te,xe,Se)};function ve(){var xe=l(A,0,0,V,G,k).apply(null,D(o,R)),Se=(k?l:c)(A,C-xe[0],S-xe[1],V,G,k);return H=(0,y.I)(T,O,N),Z=(0,_.Z)(D,Se),Q=(0,_.Z)(H,Z),j=g(Z,q),le()}function le(){return ue=fe=null,te}return function(){return D=L.apply(this,arguments),te.invert=D.invert&&ne,ve()}}},26867:function(z,B,e){e.d(B,{K:function(){return a},Z:function(){return _}});var d=e(15002),P=e(39695);function a(x,v){var y=v*v,r=y*y;return[x*(.8707-.131979*y+r*(-.013791+r*(.003971*y-.001529*r))),v*(1.007226+y*(.015085+r*(-.044475+.028874*y-.005916*r)))]}a.invert=function(x,v){var y=v,r=25,n;do{var u=y*y,i=u*u;y-=n=(y*(1.007226+u*(.015085+i*(-.044475+.028874*u-.005916*i)))-v)/(1.007226+u*(.045255+i*(-.311325+.259866*u-.06507600000000001*i)))}while((0,P.Wn)(n)>P.Ho&&--r>0);return[x/(.8707+(u=y*y)*(-.131979+u*(-.013791+u*u*u*(.003971-.001529*u)))),y]};function _(){return(0,d.Z)(a).scale(175.295)}},57962:function(z,B,e){e.d(B,{I:function(){return _},Z:function(){return x}});var d=e(39695),P=e(25382),a=e(15002);function _(v,y){return[(0,d.mC)(y)*(0,d.O$)(v),(0,d.O$)(y)]}_.invert=(0,P.O)(d.ZR);function x(){return(0,a.Z)(_).scale(249.5).clipAngle(90+d.Ho)}},49386:function(z,B,e){e.d(B,{I:function(){return _},Z:function(){return r}});var d=e(96059),P=e(39695);function a(n,u){return[(0,P.Wn)(n)>P.pi?n+Math.round(-n/P.BZ)*P.BZ:n,u]}a.invert=a;function _(n,u,i){return(n%=P.BZ)?u||i?(0,d.Z)(v(n),y(u,i)):v(n):u||i?y(u,i):a}function x(n){return function(u,i){return u+=n,[u>P.pi?u-P.BZ:u<-P.pi?u+P.BZ:u,i]}}function v(n){var u=x(n);return u.invert=x(-n),u}function y(n,u){var i=(0,P.mC)(n),f=(0,P.O$)(n),g=(0,P.mC)(u),h=(0,P.O$)(u);function b(p,E){var c=(0,P.mC)(E),l=(0,P.mC)(p)*c,m=(0,P.O$)(p)*c,M=(0,P.O$)(E),L=M*i+l*f;return[(0,P.fv)(m*g-L*h,l*i-M*f),(0,P.ZR)(L*g+m*h)]}return b.invert=function(p,E){var c=(0,P.mC)(E),l=(0,P.mC)(p)*c,m=(0,P.O$)(p)*c,M=(0,P.O$)(E),L=M*g-m*h;return[(0,P.fv)(m*g+M*h,l*i+L*f),(0,P.ZR)(L*i-l*f)]},b}function r(n){n=_(n[0]*P.uR,n[1]*P.uR,n.length>2?n[2]*P.uR:0);function u(i){return i=n(i[0]*P.uR,i[1]*P.uR),i[0]*=P.RW,i[1]*=P.RW,i}return u.invert=function(i){return i=n.invert(i[0]*P.uR,i[1]*P.uR),i[0]*=P.RW,i[1]*=P.RW,i},u}},72736:function(z,B,e){e.d(B,{Z:function(){return v}});function d(y,r){y&&a.hasOwnProperty(y.type)&&a[y.type](y,r)}var P={Feature:function(y,r){d(y.geometry,r)},FeatureCollection:function(y,r){for(var n=y.features,u=-1,i=n.length;++u<i;)d(n[u].geometry,r)}},a={Sphere:function(y,r){r.sphere()},Point:function(y,r){y=y.coordinates,r.point(y[0],y[1],y[2])},MultiPoint:function(y,r){for(var n=y.coordinates,u=-1,i=n.length;++u<i;)y=n[u],r.point(y[0],y[1],y[2])},LineString:function(y,r){_(y.coordinates,r,0)},MultiLineString:function(y,r){for(var n=y.coordinates,u=-1,i=n.length;++u<i;)_(n[u],r,0)},Polygon:function(y,r){x(y.coordinates,r)},MultiPolygon:function(y,r){for(var n=y.coordinates,u=-1,i=n.length;++u<i;)x(n[u],r)},GeometryCollection:function(y,r){for(var n=y.geometries,u=-1,i=n.length;++u<i;)d(n[u],r)}};function _(y,r,n){var u=-1,i=y.length-n,f;for(r.lineStart();++u<i;)f=y[u],r.point(f[0],f[1],f[2]);r.lineEnd()}function x(y,r){var n=-1,u=y.length;for(r.polygonStart();++n<u;)_(y[n],r,1);r.polygonEnd()}function v(y,r){y&&P.hasOwnProperty(y.type)?P[y.type](y,r):d(y,r)}},64684:function(z,B,e){e.d(B,{Z:function(){return d},l:function(){return P}});function d(_){return{stream:P(_)}}function P(_){return function(x){var v=new a;for(var y in _)v[y]=_[y];return v.stream=x,v}}function a(){}a.prototype={constructor:a,point:function(_,x){this.stream.point(_,x)},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()}}},674:function(z,B,e){e.r(B),e.d(B,{cluster:function(){return r},hierarchy:function(){return L},pack:function(){return ne},packEnclose:function(){return O},packSiblings:function(){return j},partition:function(){return Ee},stratify:function(){return Ve},tree:function(){return Tt},treemap:function(){return ze},treemapBinary:function(){return rt},treemapDice:function(){return Re},treemapResquarify:function(){return Qe},treemapSlice:function(){return Et},treemapSliceDice:function(){return lt},treemapSquarify:function(){return Ue}});function d(Fe,Ce){return Fe.parent===Ce.parent?1:2}function P(Fe){return Fe.reduce(a,0)/Fe.length}function a(Fe,Ce){return Fe+Ce.x}function _(Fe){return 1+Fe.reduce(x,0)}function x(Fe,Ce){return Math.max(Fe,Ce.y)}function v(Fe){for(var Ce;Ce=Fe.children;)Fe=Ce[0];return Fe}function y(Fe){for(var Ce;Ce=Fe.children;)Fe=Ce[Ce.length-1];return Fe}function r(){var Fe=d,Ce=1,pe=1,we=!1;function Ae(Pe){var Ge,We=0;Pe.eachAfter(function(wt){var Bt=wt.children;Bt?(wt.x=P(Bt),wt.y=_(Bt)):(wt.x=Ge?We+=Fe(wt,Ge):0,wt.y=0,Ge=wt)});var tt=v(Pe),ct=y(Pe),St=tt.x-Fe(tt,ct)/2,Pt=ct.x+Fe(ct,tt)/2;return Pe.eachAfter(we?function(wt){wt.x=(wt.x-Pe.x)*Ce,wt.y=(Pe.y-wt.y)*pe}:function(wt){wt.x=(wt.x-St)/(Pt-St)*Ce,wt.y=(1-(Pe.y?wt.y/Pe.y:1))*pe})}return Ae.separation=function(Pe){return arguments.length?(Fe=Pe,Ae):Fe},Ae.size=function(Pe){return arguments.length?(we=!1,Ce=+Pe[0],pe=+Pe[1],Ae):we?null:[Ce,pe]},Ae.nodeSize=function(Pe){return arguments.length?(we=!0,Ce=+Pe[0],pe=+Pe[1],Ae):we?[Ce,pe]:null},Ae}function n(Fe){var Ce=0,pe=Fe.children,we=pe&&pe.length;if(!we)Ce=1;else for(;--we>=0;)Ce+=pe[we].value;Fe.value=Ce}function u(){return this.eachAfter(n)}function i(Fe){var Ce=this,pe,we=[Ce],Ae,Pe,Ge;do for(pe=we.reverse(),we=[];Ce=pe.pop();)if(Fe(Ce),Ae=Ce.children,Ae)for(Pe=0,Ge=Ae.length;Pe<Ge;++Pe)we.push(Ae[Pe]);while(we.length);return this}function f(Fe){for(var Ce=this,pe=[Ce],we,Ae;Ce=pe.pop();)if(Fe(Ce),we=Ce.children,we)for(Ae=we.length-1;Ae>=0;--Ae)pe.push(we[Ae]);return this}function g(Fe){for(var Ce=this,pe=[Ce],we=[],Ae,Pe,Ge;Ce=pe.pop();)if(we.push(Ce),Ae=Ce.children,Ae)for(Pe=0,Ge=Ae.length;Pe<Ge;++Pe)pe.push(Ae[Pe]);for(;Ce=we.pop();)Fe(Ce);return this}function h(Fe){return this.eachAfter(function(Ce){for(var pe=+Fe(Ce.data)||0,we=Ce.children,Ae=we&&we.length;--Ae>=0;)pe+=we[Ae].value;Ce.value=pe})}function b(Fe){return this.eachBefore(function(Ce){Ce.children&&Ce.children.sort(Fe)})}function p(Fe){for(var Ce=this,pe=E(Ce,Fe),we=[Ce];Ce!==pe;)Ce=Ce.parent,we.push(Ce);for(var Ae=we.length;Fe!==pe;)we.splice(Ae,0,Fe),Fe=Fe.parent;return we}function E(Fe,Ce){if(Fe===Ce)return Fe;var pe=Fe.ancestors(),we=Ce.ancestors(),Ae=null;for(Fe=pe.pop(),Ce=we.pop();Fe===Ce;)Ae=Fe,Fe=pe.pop(),Ce=we.pop();return Ae}function c(){for(var Fe=this,Ce=[Fe];Fe=Fe.parent;)Ce.push(Fe);return Ce}function l(){var Fe=[];return this.each(function(Ce){Fe.push(Ce)}),Fe}function m(){var Fe=[];return this.eachBefore(function(Ce){Ce.children||Fe.push(Ce)}),Fe}function M(){var Fe=this,Ce=[];return Fe.each(function(pe){pe!==Fe&&Ce.push({source:pe.parent,target:pe})}),Ce}function L(Fe,Ce){var pe=new o(Fe),we=+Fe.value&&(pe.value=Fe.value),Ae,Pe=[pe],Ge,We,tt,ct;for(Ce==null&&(Ce=A);Ae=Pe.pop();)if(we&&(Ae.value=+Ae.data.value),(We=Ce(Ae.data))&&(ct=We.length))for(Ae.children=new Array(ct),tt=ct-1;tt>=0;--tt)Pe.push(Ge=Ae.children[tt]=new o(We[tt])),Ge.parent=Ae,Ge.depth=Ae.depth+1;return pe.eachBefore(S)}function D(){return L(this).eachBefore(C)}function A(Fe){return Fe.children}function C(Fe){Fe.data=Fe.data.data}function S(Fe){var Ce=0;do Fe.height=Ce;while((Fe=Fe.parent)&&Fe.height<++Ce)}function o(Fe){this.data=Fe,this.depth=this.height=0,this.parent=null}o.prototype=L.prototype={constructor:o,count:u,each:i,eachAfter:g,eachBefore:f,sum:h,sort:b,path:p,ancestors:c,descendants:l,leaves:m,links:M,copy:D};var R=Array.prototype.slice;function T(Fe){for(var Ce=Fe.length,pe,we;Ce;)we=Math.random()*Ce--|0,pe=Fe[Ce],Fe[Ce]=Fe[we],Fe[we]=pe;return Fe}function O(Fe){for(var Ce=0,pe=(Fe=T(R.call(Fe))).length,we=[],Ae,Pe;Ce<pe;)Ae=Fe[Ce],Pe&&k(Pe,Ae)?++Ce:(Pe=G(we=N(we,Ae)),Ce=0);return Pe}function N(Fe,Ce){var pe,we;if(V(Ce,Fe))return[Ce];for(pe=0;pe<Fe.length;++pe)if(H(Ce,Fe[pe])&&V(Y(Fe[pe],Ce),Fe))return[Fe[pe],Ce];for(pe=0;pe<Fe.length-1;++pe)for(we=pe+1;we<Fe.length;++we)if(H(Y(Fe[pe],Fe[we]),Ce)&&H(Y(Fe[pe],Ce),Fe[we])&&H(Y(Fe[we],Ce),Fe[pe])&&V(ee(Fe[pe],Fe[we],Ce),Fe))return[Fe[pe],Fe[we],Ce];throw new Error}function H(Fe,Ce){var pe=Fe.r-Ce.r,we=Ce.x-Fe.x,Ae=Ce.y-Fe.y;return pe<0||pe*pe<we*we+Ae*Ae}function k(Fe,Ce){var pe=Fe.r-Ce.r+1e-6,we=Ce.x-Fe.x,Ae=Ce.y-Fe.y;return pe>0&&pe*pe>we*we+Ae*Ae}function V(Fe,Ce){for(var pe=0;pe<Ce.length;++pe)if(!k(Fe,Ce[pe]))return!1;return!0}function G(Fe){switch(Fe.length){case 1:return U(Fe[0]);case 2:return Y(Fe[0],Fe[1]);case 3:return ee(Fe[0],Fe[1],Fe[2])}}function U(Fe){return{x:Fe.x,y:Fe.y,r:Fe.r}}function Y(Fe,Ce){var pe=Fe.x,we=Fe.y,Ae=Fe.r,Pe=Ce.x,Ge=Ce.y,We=Ce.r,tt=Pe-pe,ct=Ge-we,St=We-Ae,Pt=Math.sqrt(tt*tt+ct*ct);return{x:(pe+Pe+tt/Pt*St)/2,y:(we+Ge+ct/Pt*St)/2,r:(Pt+Ae+We)/2}}function ee(Fe,Ce,pe){var we=Fe.x,Ae=Fe.y,Pe=Fe.r,Ge=Ce.x,We=Ce.y,tt=Ce.r,ct=pe.x,St=pe.y,Pt=pe.r,wt=we-Ge,Bt=we-ct,Wt=Ae-We,hr=Ae-St,gt=tt-Pe,jt=Pt-Pe,Ut=we*we+Ae*Ae-Pe*Pe,or=Ut-Ge*Ge-We*We+tt*tt,ur=Ut-ct*ct-St*St+Pt*Pt,dt=Bt*Wt-wt*hr,ut=(Wt*ur-hr*or)/(dt*2)-we,yt=(hr*gt-Wt*jt)/dt,Lt=(Bt*or-wt*ur)/(dt*2)-Ae,Rt=(wt*jt-Bt*gt)/dt,Nt=yt*yt+Rt*Rt-1,Vt=2*(Pe+ut*yt+Lt*Rt),Zt=ut*ut+Lt*Lt-Pe*Pe,qt=-(Nt?(Vt+Math.sqrt(Vt*Vt-4*Nt*Zt))/(2*Nt):Zt/Vt);return{x:we+ut+yt*qt,y:Ae+Lt+Rt*qt,r:qt}}function re(Fe,Ce,pe){var we=Fe.x-Ce.x,Ae,Pe,Ge=Fe.y-Ce.y,We,tt,ct=we*we+Ge*Ge;ct?(Pe=Ce.r+pe.r,Pe*=Pe,tt=Fe.r+pe.r,tt*=tt,Pe>tt?(Ae=(ct+tt-Pe)/(2*ct),We=Math.sqrt(Math.max(0,tt/ct-Ae*Ae)),pe.x=Fe.x-Ae*we-We*Ge,pe.y=Fe.y-Ae*Ge+We*we):(Ae=(ct+Pe-tt)/(2*ct),We=Math.sqrt(Math.max(0,Pe/ct-Ae*Ae)),pe.x=Ce.x+Ae*we-We*Ge,pe.y=Ce.y+Ae*Ge+We*we)):(pe.x=Ce.x+pe.r,pe.y=Ce.y)}function ie(Fe,Ce){var pe=Fe.r+Ce.r-1e-6,we=Ce.x-Fe.x,Ae=Ce.y-Fe.y;return pe>0&&pe*pe>we*we+Ae*Ae}function se(Fe){var Ce=Fe._,pe=Fe.next._,we=Ce.r+pe.r,Ae=(Ce.x*pe.r+pe.x*Ce.r)/we,Pe=(Ce.y*pe.r+pe.y*Ce.r)/we;return Ae*Ae+Pe*Pe}function ce(Fe){this._=Fe,this.next=null,this.previous=null}function q(Fe){if(!(Ae=Fe.length))return 0;var Ce,pe,we,Ae,Pe,Ge,We,tt,ct,St,Pt;if(Ce=Fe[0],Ce.x=0,Ce.y=0,!(Ae>1))return Ce.r;if(pe=Fe[1],Ce.x=-pe.r,pe.x=Ce.r,pe.y=0,!(Ae>2))return Ce.r+pe.r;re(pe,Ce,we=Fe[2]),Ce=new ce(Ce),pe=new ce(pe),we=new ce(we),Ce.next=we.previous=pe,pe.next=Ce.previous=we,we.next=pe.previous=Ce;e:for(We=3;We<Ae;++We){re(Ce._,pe._,we=Fe[We]),we=new ce(we),tt=pe.next,ct=Ce.previous,St=pe._.r,Pt=Ce._.r;do if(St<=Pt){if(ie(tt._,we._)){pe=tt,Ce.next=pe,pe.previous=Ce,--We;continue e}St+=tt._.r,tt=tt.next}else{if(ie(ct._,we._)){Ce=ct,Ce.next=pe,pe.previous=Ce,--We;continue e}Pt+=ct._.r,ct=ct.previous}while(tt!==ct.next);for(we.previous=Ce,we.next=pe,Ce.next=pe.previous=pe=we,Pe=se(Ce);(we=we.next)!==pe;)(Ge=se(we))<Pe&&(Ce=we,Pe=Ge);pe=Ce.next}for(Ce=[pe._],we=pe;(we=we.next)!==pe;)Ce.push(we._);for(we=O(Ce),We=0;We<Ae;++We)Ce=Fe[We],Ce.x-=we.x,Ce.y-=we.y;return we.r}function j(Fe){return q(Fe),Fe}function Z(Fe){return Fe==null?null:Q(Fe)}function Q(Fe){if(typeof Fe!="function")throw new Error;return Fe}function ue(){return 0}function fe(Fe){return function(){return Fe}}function te(Fe){return Math.sqrt(Fe.value)}function ne(){var Fe=null,Ce=1,pe=1,we=ue;function Ae(Pe){return Pe.x=Ce/2,Pe.y=pe/2,Fe?Pe.eachBefore(ve(Fe)).eachAfter(le(we,.5)).eachBefore(xe(1)):Pe.eachBefore(ve(te)).eachAfter(le(ue,1)).eachAfter(le(we,Pe.r/Math.min(Ce,pe))).eachBefore(xe(Math.min(Ce,pe)/(2*Pe.r))),Pe}return Ae.radius=function(Pe){return arguments.length?(Fe=Z(Pe),Ae):Fe},Ae.size=function(Pe){return arguments.length?(Ce=+Pe[0],pe=+Pe[1],Ae):[Ce,pe]},Ae.padding=function(Pe){return arguments.length?(we=typeof Pe=="function"?Pe:fe(+Pe),Ae):we},Ae}function ve(Fe){return function(Ce){Ce.children||(Ce.r=Math.max(0,+Fe(Ce)||0))}}function le(Fe,Ce){return function(pe){if(we=pe.children){var we,Ae,Pe=we.length,Ge=Fe(pe)*Ce||0,We;if(Ge)for(Ae=0;Ae<Pe;++Ae)we[Ae].r+=Ge;if(We=q(we),Ge)for(Ae=0;Ae<Pe;++Ae)we[Ae].r-=Ge;pe.r=We+Ge}}}function xe(Fe){return function(Ce){var pe=Ce.parent;Ce.r*=Fe,pe&&(Ce.x=pe.x+Fe*Ce.x,Ce.y=pe.y+Fe*Ce.y)}}function Se(Fe){Fe.x0=Math.round(Fe.x0),Fe.y0=Math.round(Fe.y0),Fe.x1=Math.round(Fe.x1),Fe.y1=Math.round(Fe.y1)}function Re(Fe,Ce,pe,we,Ae){for(var Pe=Fe.children,Ge,We=-1,tt=Pe.length,ct=Fe.value&&(we-Ce)/Fe.value;++We<tt;)Ge=Pe[We],Ge.y0=pe,Ge.y1=Ae,Ge.x0=Ce,Ge.x1=Ce+=Ge.value*ct}function Ee(){var Fe=1,Ce=1,pe=0,we=!1;function Ae(Ge){var We=Ge.height+1;return Ge.x0=Ge.y0=pe,Ge.x1=Fe,Ge.y1=Ce/We,Ge.eachBefore(Pe(Ce,We)),we&&Ge.eachBefore(Se),Ge}function Pe(Ge,We){return function(tt){tt.children&&Re(tt,tt.x0,Ge*(tt.depth+1)/We,tt.x1,Ge*(tt.depth+2)/We);var ct=tt.x0,St=tt.y0,Pt=tt.x1-pe,wt=tt.y1-pe;Pt<ct&&(ct=Pt=(ct+Pt)/2),wt<St&&(St=wt=(St+wt)/2),tt.x0=ct,tt.y0=St,tt.x1=Pt,tt.y1=wt}}return Ae.round=function(Ge){return arguments.length?(we=!!Ge,Ae):we},Ae.size=function(Ge){return arguments.length?(Fe=+Ge[0],Ce=+Ge[1],Ae):[Fe,Ce]},Ae.padding=function(Ge){return arguments.length?(pe=+Ge,Ae):pe},Ae}var Oe="$",Be={depth:-1},Le={};function Te(Fe){return Fe.id}function De(Fe){return Fe.parentId}function Ve(){var Fe=Te,Ce=De;function pe(we){var Ae,Pe,Ge=we.length,We,tt,ct,St=new Array(Ge),Pt,wt,Bt={};for(Pe=0;Pe<Ge;++Pe)Ae=we[Pe],ct=St[Pe]=new o(Ae),(Pt=Fe(Ae,Pe,we))!=null&&(Pt+="")&&(wt=Oe+(ct.id=Pt),Bt[wt]=wt in Bt?Le:ct);for(Pe=0;Pe<Ge;++Pe)if(ct=St[Pe],Pt=Ce(we[Pe],Pe,we),Pt==null||!(Pt+="")){if(We)throw new Error("multiple roots");We=ct}else{if(tt=Bt[Oe+Pt],!tt)throw new Error("missing: "+Pt);if(tt===Le)throw new Error("ambiguous: "+Pt);tt.children?tt.children.push(ct):tt.children=[ct],ct.parent=tt}if(!We)throw new Error("no root");if(We.parent=Be,We.eachBefore(function(Wt){Wt.depth=Wt.parent.depth+1,--Ge}).eachBefore(S),We.parent=null,Ge>0)throw new Error("cycle");return We}return pe.id=function(we){return arguments.length?(Fe=Q(we),pe):Fe},pe.parentId=function(we){return arguments.length?(Ce=Q(we),pe):Ce},pe}function Ye(Fe,Ce){return Fe.parent===Ce.parent?1:2}function Ne(Fe){var Ce=Fe.children;return Ce?Ce[0]:Fe.t}function Xe(Fe){var Ce=Fe.children;return Ce?Ce[Ce.length-1]:Fe.t}function ht(Fe,Ce,pe){var we=pe/(Ce.i-Fe.i);Ce.c-=we,Ce.s+=pe,Fe.c+=we,Ce.z+=pe,Ce.m+=pe}function st(Fe){for(var Ce=0,pe=0,we=Fe.children,Ae=we.length,Pe;--Ae>=0;)Pe=we[Ae],Pe.z+=Ce,Pe.m+=Ce,Ce+=Pe.s+(pe+=Pe.c)}function it(Fe,Ce,pe){return Fe.a.parent===Ce.parent?Fe.a:pe}function nt(Fe,Ce){this._=Fe,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=Ce}nt.prototype=Object.create(o.prototype);function pt(Fe){for(var Ce=new nt(Fe,0),pe,we=[Ce],Ae,Pe,Ge,We;pe=we.pop();)if(Pe=pe._.children)for(pe.children=new Array(We=Pe.length),Ge=We-1;Ge>=0;--Ge)we.push(Ae=pe.children[Ge]=new nt(Pe[Ge],Ge)),Ae.parent=pe;return(Ce.parent=new nt(null,0)).children=[Ce],Ce}function Tt(){var Fe=Ye,Ce=1,pe=1,we=null;function Ae(ct){var St=pt(ct);if(St.eachAfter(Pe),St.parent.m=-St.z,St.eachBefore(Ge),we)ct.eachBefore(tt);else{var Pt=ct,wt=ct,Bt=ct;ct.eachBefore(function(Ut){Ut.x<Pt.x&&(Pt=Ut),Ut.x>wt.x&&(wt=Ut),Ut.depth>Bt.depth&&(Bt=Ut)});var Wt=Pt===wt?1:Fe(Pt,wt)/2,hr=Wt-Pt.x,gt=Ce/(wt.x+Wt+hr),jt=pe/(Bt.depth||1);ct.eachBefore(function(Ut){Ut.x=(Ut.x+hr)*gt,Ut.y=Ut.depth*jt})}return ct}function Pe(ct){var St=ct.children,Pt=ct.parent.children,wt=ct.i?Pt[ct.i-1]:null;if(St){st(ct);var Bt=(St[0].z+St[St.length-1].z)/2;wt?(ct.z=wt.z+Fe(ct._,wt._),ct.m=ct.z-Bt):ct.z=Bt}else wt&&(ct.z=wt.z+Fe(ct._,wt._));ct.parent.A=We(ct,wt,ct.parent.A||Pt[0])}function Ge(ct){ct._.x=ct.z+ct.parent.m,ct.m+=ct.parent.m}function We(ct,St,Pt){if(St){for(var wt=ct,Bt=ct,Wt=St,hr=wt.parent.children[0],gt=wt.m,jt=Bt.m,Ut=Wt.m,or=hr.m,ur;Wt=Xe(Wt),wt=Ne(wt),Wt&&wt;)hr=Ne(hr),Bt=Xe(Bt),Bt.a=ct,ur=Wt.z+Ut-wt.z-gt+Fe(Wt._,wt._),ur>0&&(ht(it(Wt,ct,Pt),ct,ur),gt+=ur,jt+=ur),Ut+=Wt.m,gt+=wt.m,or+=hr.m,jt+=Bt.m;Wt&&!Xe(Bt)&&(Bt.t=Wt,Bt.m+=Ut-jt),wt&&!Ne(hr)&&(hr.t=wt,hr.m+=gt-or,Pt=ct)}return Pt}function tt(ct){ct.x*=Ce,ct.y=ct.depth*pe}return Ae.separation=function(ct){return arguments.length?(Fe=ct,Ae):Fe},Ae.size=function(ct){return arguments.length?(we=!1,Ce=+ct[0],pe=+ct[1],Ae):we?null:[Ce,pe]},Ae.nodeSize=function(ct){return arguments.length?(we=!0,Ce=+ct[0],pe=+ct[1],Ae):we?[Ce,pe]:null},Ae}function Et(Fe,Ce,pe,we,Ae){for(var Pe=Fe.children,Ge,We=-1,tt=Pe.length,ct=Fe.value&&(Ae-pe)/Fe.value;++We<tt;)Ge=Pe[We],Ge.x0=Ce,Ge.x1=we,Ge.y0=pe,Ge.y1=pe+=Ge.value*ct}var Dt=(1+Math.sqrt(5))/2;function et(Fe,Ce,pe,we,Ae,Pe){for(var Ge=[],We=Ce.children,tt,ct,St=0,Pt=0,wt=We.length,Bt,Wt,hr=Ce.value,gt,jt,Ut,or,ur,dt,ut;St<wt;){Bt=Ae-pe,Wt=Pe-we;do gt=We[Pt++].value;while(!gt&&Pt<wt);for(jt=Ut=gt,dt=Math.max(Wt/Bt,Bt/Wt)/(hr*Fe),ut=gt*gt*dt,ur=Math.max(Ut/ut,ut/jt);Pt<wt;++Pt){if(gt+=ct=We[Pt].value,ct<jt&&(jt=ct),ct>Ut&&(Ut=ct),ut=gt*gt*dt,or=Math.max(Ut/ut,ut/jt),or>ur){gt-=ct;break}ur=or}Ge.push(tt={value:gt,dice:Bt<Wt,children:We.slice(St,Pt)}),tt.dice?Re(tt,pe,we,Ae,hr?we+=Wt*gt/hr:Pe):Et(tt,pe,we,hr?pe+=Bt*gt/hr:Ae,Pe),hr-=gt,St=Pt}return Ge}var Ue=function Fe(Ce){function pe(we,Ae,Pe,Ge,We){et(Ce,we,Ae,Pe,Ge,We)}return pe.ratio=function(we){return Fe((we=+we)>1?we:1)},pe}(Dt);function ze(){var Fe=Ue,Ce=!1,pe=1,we=1,Ae=[0],Pe=ue,Ge=ue,We=ue,tt=ue,ct=ue;function St(wt){return wt.x0=wt.y0=0,wt.x1=pe,wt.y1=we,wt.eachBefore(Pt),Ae=[0],Ce&&wt.eachBefore(Se),wt}function Pt(wt){var Bt=Ae[wt.depth],Wt=wt.x0+Bt,hr=wt.y0+Bt,gt=wt.x1-Bt,jt=wt.y1-Bt;gt<Wt&&(Wt=gt=(Wt+gt)/2),jt<hr&&(hr=jt=(hr+jt)/2),wt.x0=Wt,wt.y0=hr,wt.x1=gt,wt.y1=jt,wt.children&&(Bt=Ae[wt.depth+1]=Pe(wt)/2,Wt+=ct(wt)-Bt,hr+=Ge(wt)-Bt,gt-=We(wt)-Bt,jt-=tt(wt)-Bt,gt<Wt&&(Wt=gt=(Wt+gt)/2),jt<hr&&(hr=jt=(hr+jt)/2),Fe(wt,Wt,hr,gt,jt))}return St.round=function(wt){return arguments.length?(Ce=!!wt,St):Ce},St.size=function(wt){return arguments.length?(pe=+wt[0],we=+wt[1],St):[pe,we]},St.tile=function(wt){return arguments.length?(Fe=Q(wt),St):Fe},St.padding=function(wt){return arguments.length?St.paddingInner(wt).paddingOuter(wt):St.paddingInner()},St.paddingInner=function(wt){return arguments.length?(Pe=typeof wt=="function"?wt:fe(+wt),St):Pe},St.paddingOuter=function(wt){return arguments.length?St.paddingTop(wt).paddingRight(wt).paddingBottom(wt).paddingLeft(wt):St.paddingTop()},St.paddingTop=function(wt){return arguments.length?(Ge=typeof wt=="function"?wt:fe(+wt),St):Ge},St.paddingRight=function(wt){return arguments.length?(We=typeof wt=="function"?wt:fe(+wt),St):We},St.paddingBottom=function(wt){return arguments.length?(tt=typeof wt=="function"?wt:fe(+wt),St):tt},St.paddingLeft=function(wt){return arguments.length?(ct=typeof wt=="function"?wt:fe(+wt),St):ct},St}function rt(Fe,Ce,pe,we,Ae){var Pe=Fe.children,Ge,We=Pe.length,tt,ct=new Array(We+1);for(ct[0]=tt=Ge=0;Ge<We;++Ge)ct[Ge+1]=tt+=Pe[Ge].value;St(0,We,Fe.value,Ce,pe,we,Ae);function St(Pt,wt,Bt,Wt,hr,gt,jt){if(Pt>=wt-1){var Ut=Pe[Pt];Ut.x0=Wt,Ut.y0=hr,Ut.x1=gt,Ut.y1=jt;return}for(var or=ct[Pt],ur=Bt/2+or,dt=Pt+1,ut=wt-1;dt<ut;){var yt=dt+ut>>>1;ct[yt]<ur?dt=yt+1:ut=yt}ur-ct[dt-1]<ct[dt]-ur&&Pt+1<dt&&--dt;var Lt=ct[dt]-or,Rt=Bt-Lt;if(gt-Wt>jt-hr){var Nt=(Wt*Rt+gt*Lt)/Bt;St(Pt,dt,Lt,Wt,hr,Nt,jt),St(dt,wt,Rt,Nt,hr,gt,jt)}else{var Vt=(hr*Rt+jt*Lt)/Bt;St(Pt,dt,Lt,Wt,hr,gt,Vt),St(dt,wt,Rt,Wt,Vt,gt,jt)}}}function lt(Fe,Ce,pe,we,Ae){(Fe.depth&1?Et:Re)(Fe,Ce,pe,we,Ae)}var Qe=function Fe(Ce){function pe(we,Ae,Pe,Ge,We){if((tt=we._squarify)&&tt.ratio===Ce)for(var tt,ct,St,Pt,wt=-1,Bt,Wt=tt.length,hr=we.value;++wt<Wt;){for(ct=tt[wt],St=ct.children,Pt=ct.value=0,Bt=St.length;Pt<Bt;++Pt)ct.value+=St[Pt].value;ct.dice?Re(ct,Ae,Pe,Ge,Pe+=(We-Pe)*ct.value/hr):Et(ct,Ae,Pe,Ae+=(Ge-Ae)*ct.value/hr,We),hr-=ct.value}else we._squarify=tt=et(Ce,we,Ae,Pe,Ge,We),tt.ratio=Ce}return pe.ratio=function(we){return Fe((we=+we)>1?we:1)},pe}(Dt)},45879:function(z,B,e){e.d(B,{h5:function(){return p}});var d=Math.PI,P=2*d,a=1e-6,_=P-a;function x(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function v(){return new x}x.prototype=v.prototype={constructor:x,moveTo:function(E,c){this._+="M"+(this._x0=this._x1=+E)+","+(this._y0=this._y1=+c)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(E,c){this._+="L"+(this._x1=+E)+","+(this._y1=+c)},quadraticCurveTo:function(E,c,l,m){this._+="Q"+ +E+","+ +c+","+(this._x1=+l)+","+(this._y1=+m)},bezierCurveTo:function(E,c,l,m,M,L){this._+="C"+ +E+","+ +c+","+ +l+","+ +m+","+(this._x1=+M)+","+(this._y1=+L)},arcTo:function(E,c,l,m,M){E=+E,c=+c,l=+l,m=+m,M=+M;var L=this._x1,D=this._y1,A=l-E,C=m-c,S=L-E,o=D-c,R=S*S+o*o;if(M<0)throw new Error("negative radius: "+M);if(this._x1===null)this._+="M"+(this._x1=E)+","+(this._y1=c);else if(R>a)if(!(Math.abs(o*A-C*S)>a)||!M)this._+="L"+(this._x1=E)+","+(this._y1=c);else{var T=l-L,O=m-D,N=A*A+C*C,H=T*T+O*O,k=Math.sqrt(N),V=Math.sqrt(R),G=M*Math.tan((d-Math.acos((N+R-H)/(2*k*V)))/2),U=G/V,Y=G/k;Math.abs(U-1)>a&&(this._+="L"+(E+U*S)+","+(c+U*o)),this._+="A"+M+","+M+",0,0,"+ +(o*T>S*O)+","+(this._x1=E+Y*A)+","+(this._y1=c+Y*C)}},arc:function(E,c,l,m,M,L){E=+E,c=+c,l=+l,L=!!L;var D=l*Math.cos(m),A=l*Math.sin(m),C=E+D,S=c+A,o=1^L,R=L?m-M:M-m;if(l<0)throw new Error("negative radius: "+l);this._x1===null?this._+="M"+C+","+S:(Math.abs(this._x1-C)>a||Math.abs(this._y1-S)>a)&&(this._+="L"+C+","+S),l&&(R<0&&(R=R%P+P),R>_?this._+="A"+l+","+l+",0,1,"+o+","+(E-D)+","+(c-A)+"A"+l+","+l+",0,1,"+o+","+(this._x1=C)+","+(this._y1=S):R>a&&(this._+="A"+l+","+l+",0,"+ +(R>=d)+","+o+","+(this._x1=E+l*Math.cos(M))+","+(this._y1=c+l*Math.sin(M))))},rect:function(E,c,l,m){this._+="M"+(this._x0=this._x1=+E)+","+(this._y0=this._y1=+c)+"h"+ +l+"v"+ +m+"h"+-l+"Z"},toString:function(){return this._}};var y=v,r=Array.prototype.slice;function n(E){return function(){return E}}function u(E){return E[0]}function i(E){return E[1]}function f(E){return E.source}function g(E){return E.target}function h(E){var c=f,l=g,m=u,M=i,L=null;function D(){var A,C=r.call(arguments),S=c.apply(this,C),o=l.apply(this,C);if(L||(L=A=y()),E(L,+m.apply(this,(C[0]=S,C)),+M.apply(this,C),+m.apply(this,(C[0]=o,C)),+M.apply(this,C)),A)return L=null,A+""||null}return D.source=function(A){return arguments.length?(c=A,D):c},D.target=function(A){return arguments.length?(l=A,D):l},D.x=function(A){return arguments.length?(m=typeof A=="function"?A:n(+A),D):m},D.y=function(A){return arguments.length?(M=typeof A=="function"?A:n(+A),D):M},D.context=function(A){return arguments.length?(L=A??null,D):L},D}function b(E,c,l,m,M){E.moveTo(c,l),E.bezierCurveTo(c=(c+m)/2,l,c,M,m,M)}function p(){return h(b)}},84096:function(z,B,e){e.d(B,{i$:function(){return rt},Dq:function(){return u},g0:function(){return lt}});var d=e(58176),P=e(48480),a=e(59879),_=e(82301),x=e(34823),v=e(79791);function y(Fe){if(0<=Fe.y&&Fe.y<100){var Ce=new Date(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L);return Ce.setFullYear(Fe.y),Ce}return new Date(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L)}function r(Fe){if(0<=Fe.y&&Fe.y<100){var Ce=new Date(Date.UTC(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L));return Ce.setUTCFullYear(Fe.y),Ce}return new Date(Date.UTC(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L))}function n(Fe,Ce,pe){return{y:Fe,m:Ce,d:pe,H:0,M:0,S:0,L:0}}function u(Fe){var Ce=Fe.dateTime,pe=Fe.date,we=Fe.time,Ae=Fe.periods,Pe=Fe.days,Ge=Fe.shortDays,We=Fe.months,tt=Fe.shortMonths,ct=E(Ae),St=c(Ae),Pt=E(Pe),wt=c(Pe),Bt=E(Ge),Wt=c(Ge),hr=E(We),gt=c(We),jt=E(tt),Ut=c(tt),or={a:Ke,A:Ze,b:zt,B:kt,c:null,d:re,e:re,f:j,H:ie,I:se,j:ce,L:q,m:Z,M:Q,p:Qt,q:cr,Q:et,s:Ue,S:ue,u:fe,U:te,V:ne,w:ve,W:le,x:null,X:null,y:xe,Y:Se,Z:Re,"%":Dt},ur={a:fr,A:ir,b:Yt,B:gr,c:null,d:Ee,e:Ee,f:De,H:Oe,I:Be,j:Le,L:Te,m:Ve,M:Ye,p:yr,q:Tr,Q:et,s:Ue,S:Ne,u:Xe,U:ht,V:st,w:it,W:nt,x:null,X:null,y:pt,Y:Tt,Z:Et,"%":Dt},dt={a:Nt,A:Vt,b:Zt,B:qt,c:Jt,d:T,e:T,f:G,H:N,I:N,j:O,L:V,m:R,M:H,p:Rt,q:o,Q:Y,s:ee,S:k,u:m,U:M,V:L,w:l,W:D,x:nr,X:Mr,y:C,Y:A,Z:S,"%":U};or.x=ut(pe,or),or.X=ut(we,or),or.c=ut(Ce,or),ur.x=ut(pe,ur),ur.X=ut(we,ur),ur.c=ut(Ce,ur);function ut(pr,Kr){return function(Or){var Nr=[],Sn=-1,Jr=0,xn=pr.length,Dn,mr,Ar;for(Or instanceof Date||(Or=new Date(+Or));++Sn<xn;)pr.charCodeAt(Sn)===37&&(Nr.push(pr.slice(Jr,Sn)),(mr=i[Dn=pr.charAt(++Sn)])!=null?Dn=pr.charAt(++Sn):mr=Dn==="e"?" ":"0",(Ar=Kr[Dn])&&(Dn=Ar(Or,mr)),Nr.push(Dn),Jr=Sn+1);return Nr.push(pr.slice(Jr,Sn)),Nr.join("")}}function yt(pr,Kr){return function(Or){var Nr=n(1900,void 0,1),Sn=Lt(Nr,pr,Or+="",0),Jr,xn;if(Sn!=Or.length)return null;if("Q"in Nr)return new Date(Nr.Q);if("s"in Nr)return new Date(Nr.s*1e3+("L"in Nr?Nr.L:0));if(Kr&&!("Z"in Nr)&&(Nr.Z=0),"p"in Nr&&(Nr.H=Nr.H%12+Nr.p*12),Nr.m===void 0&&(Nr.m="q"in Nr?Nr.q:0),"V"in Nr){if(Nr.V<1||Nr.V>53)return null;"w"in Nr||(Nr.w=1),"Z"in Nr?(Jr=r(n(Nr.y,0,1)),xn=Jr.getUTCDay(),Jr=xn>4||xn===0?d.l6.ceil(Jr):(0,d.l6)(Jr),Jr=P.Z.offset(Jr,(Nr.V-1)*7),Nr.y=Jr.getUTCFullYear(),Nr.m=Jr.getUTCMonth(),Nr.d=Jr.getUTCDate()+(Nr.w+6)%7):(Jr=y(n(Nr.y,0,1)),xn=Jr.getDay(),Jr=xn>4||xn===0?a.wA.ceil(Jr):(0,a.wA)(Jr),Jr=_.Z.offset(Jr,(Nr.V-1)*7),Nr.y=Jr.getFullYear(),Nr.m=Jr.getMonth(),Nr.d=Jr.getDate()+(Nr.w+6)%7)}else("W"in Nr||"U"in Nr)&&("w"in Nr||(Nr.w="u"in Nr?Nr.u%7:"W"in Nr?1:0),xn="Z"in Nr?r(n(Nr.y,0,1)).getUTCDay():y(n(Nr.y,0,1)).getDay(),Nr.m=0,Nr.d="W"in Nr?(Nr.w+6)%7+Nr.W*7-(xn+5)%7:Nr.w+Nr.U*7-(xn+6)%7);return"Z"in Nr?(Nr.H+=Nr.Z/100|0,Nr.M+=Nr.Z%100,r(Nr)):y(Nr)}}function Lt(pr,Kr,Or,Nr){for(var Sn=0,Jr=Kr.length,xn=Or.length,Dn,mr;Sn<Jr;){if(Nr>=xn)return-1;if(Dn=Kr.charCodeAt(Sn++),Dn===37){if(Dn=Kr.charAt(Sn++),mr=dt[Dn in i?Kr.charAt(Sn++):Dn],!mr||(Nr=mr(pr,Or,Nr))<0)return-1}else if(Dn!=Or.charCodeAt(Nr++))return-1}return Nr}function Rt(pr,Kr,Or){var Nr=ct.exec(Kr.slice(Or));return Nr?(pr.p=St[Nr[0].toLowerCase()],Or+Nr[0].length):-1}function Nt(pr,Kr,Or){var Nr=Bt.exec(Kr.slice(Or));return Nr?(pr.w=Wt[Nr[0].toLowerCase()],Or+Nr[0].length):-1}function Vt(pr,Kr,Or){var Nr=Pt.exec(Kr.slice(Or));return Nr?(pr.w=wt[Nr[0].toLowerCase()],Or+Nr[0].length):-1}function Zt(pr,Kr,Or){var Nr=jt.exec(Kr.slice(Or));return Nr?(pr.m=Ut[Nr[0].toLowerCase()],Or+Nr[0].length):-1}function qt(pr,Kr,Or){var Nr=hr.exec(Kr.slice(Or));return Nr?(pr.m=gt[Nr[0].toLowerCase()],Or+Nr[0].length):-1}function Jt(pr,Kr,Or){return Lt(pr,Ce,Kr,Or)}function nr(pr,Kr,Or){return Lt(pr,pe,Kr,Or)}function Mr(pr,Kr,Or){return Lt(pr,we,Kr,Or)}function Ke(pr){return Ge[pr.getDay()]}function Ze(pr){return Pe[pr.getDay()]}function zt(pr){return tt[pr.getMonth()]}function kt(pr){return We[pr.getMonth()]}function Qt(pr){return Ae[+(pr.getHours()>=12)]}function cr(pr){return 1+~~(pr.getMonth()/3)}function fr(pr){return Ge[pr.getUTCDay()]}function ir(pr){return Pe[pr.getUTCDay()]}function Yt(pr){return tt[pr.getUTCMonth()]}function gr(pr){return We[pr.getUTCMonth()]}function yr(pr){return Ae[+(pr.getUTCHours()>=12)]}function Tr(pr){return 1+~~(pr.getUTCMonth()/3)}return{format:function(pr){var Kr=ut(pr+="",or);return Kr.toString=function(){return pr},Kr},parse:function(pr){var Kr=yt(pr+="",!1);return Kr.toString=function(){return pr},Kr},utcFormat:function(pr){var Kr=ut(pr+="",ur);return Kr.toString=function(){return pr},Kr},utcParse:function(pr){var Kr=yt(pr+="",!0);return Kr.toString=function(){return pr},Kr}}}var i={"-":"",_:" ",0:"0"},f=/^\s*\d+/,g=/^%/,h=/[\\^$*+?|[\]().{}]/g;function b(Fe,Ce,pe){var we=Fe<0?"-":"",Ae=(we?-Fe:Fe)+"",Pe=Ae.length;return we+(Pe<pe?new Array(pe-Pe+1).join(Ce)+Ae:Ae)}function p(Fe){return Fe.replace(h,"\\$&")}function E(Fe){return new RegExp("^(?:"+Fe.map(p).join("|")+")","i")}function c(Fe){for(var Ce={},pe=-1,we=Fe.length;++pe<we;)Ce[Fe[pe].toLowerCase()]=pe;return Ce}function l(Fe,Ce,pe){var we=f.exec(Ce.slice(pe,pe+1));return we?(Fe.w=+we[0],pe+we[0].length):-1}function m(Fe,Ce,pe){var we=f.exec(Ce.slice(pe,pe+1));return we?(Fe.u=+we[0],pe+we[0].length):-1}function M(Fe,Ce,pe){var we=f.exec(Ce.slice(pe,pe+2));return we?(Fe.U=+we[0],pe+we[0].length):-1}function L(Fe,Ce,pe){var we=f.exec(Ce.slice(pe,pe+2));return we?(Fe.V=+we[0],pe+we[0].length):-1}function D(Fe,Ce,pe){var we=f.exec(Ce.slice(pe,pe+2));return we?(Fe.W=+we[0],pe+we[0].length):-1}function A(Fe,Ce,pe){var we=f.exec(Ce.slice(pe,pe+4));return we?(Fe.y=+we[0],pe+we[0].length):-1}function C(Fe,Ce,pe){var we=f.exec(Ce.slice(pe,pe+2));return we?(Fe.y=+we[0]+(+we[0]>68?1900:2e3),pe+we[0].length):-1}function S(Fe,Ce,pe){var we=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Ce.slice(pe,pe+6));return we?(Fe.Z=we[1]?0:-(we[2]+(we[3]||"00")),pe+we[0].length):-1}function o(Fe,Ce,pe){var we=f.exec(Ce.slice(pe,pe+1));return we?(Fe.q=we[0]*3-3,pe+we[0].length):-1}function R(Fe,Ce,pe){var we=f.exec(Ce.slice(pe,pe+2));return we?(Fe.m=we[0]-1,pe+we[0].length):-1}function T(Fe,Ce,pe){var we=f.exec(Ce.slice(pe,pe+2));return we?(Fe.d=+we[0],pe+we[0].length):-1}function O(Fe,Ce,pe){var we=f.exec(Ce.slice(pe,pe+3));return we?(Fe.m=0,Fe.d=+we[0],pe+we[0].length):-1}function N(Fe,Ce,pe){var we=f.exec(Ce.slice(pe,pe+2));return we?(Fe.H=+we[0],pe+we[0].length):-1}function H(Fe,Ce,pe){var we=f.exec(Ce.slice(pe,pe+2));return we?(Fe.M=+we[0],pe+we[0].length):-1}function k(Fe,Ce,pe){var we=f.exec(Ce.slice(pe,pe+2));return we?(Fe.S=+we[0],pe+we[0].length):-1}function V(Fe,Ce,pe){var we=f.exec(Ce.slice(pe,pe+3));return we?(Fe.L=+we[0],pe+we[0].length):-1}function G(Fe,Ce,pe){var we=f.exec(Ce.slice(pe,pe+6));return we?(Fe.L=Math.floor(we[0]/1e3),pe+we[0].length):-1}function U(Fe,Ce,pe){var we=g.exec(Ce.slice(pe,pe+1));return we?pe+we[0].length:-1}function Y(Fe,Ce,pe){var we=f.exec(Ce.slice(pe));return we?(Fe.Q=+we[0],pe+we[0].length):-1}function ee(Fe,Ce,pe){var we=f.exec(Ce.slice(pe));return we?(Fe.s=+we[0],pe+we[0].length):-1}function re(Fe,Ce){return b(Fe.getDate(),Ce,2)}function ie(Fe,Ce){return b(Fe.getHours(),Ce,2)}function se(Fe,Ce){return b(Fe.getHours()%12||12,Ce,2)}function ce(Fe,Ce){return b(1+_.Z.count((0,x.Z)(Fe),Fe),Ce,3)}function q(Fe,Ce){return b(Fe.getMilliseconds(),Ce,3)}function j(Fe,Ce){return q(Fe,Ce)+"000"}function Z(Fe,Ce){return b(Fe.getMonth()+1,Ce,2)}function Q(Fe,Ce){return b(Fe.getMinutes(),Ce,2)}function ue(Fe,Ce){return b(Fe.getSeconds(),Ce,2)}function fe(Fe){var Ce=Fe.getDay();return Ce===0?7:Ce}function te(Fe,Ce){return b(a.OM.count((0,x.Z)(Fe)-1,Fe),Ce,2)}function ne(Fe,Ce){var pe=Fe.getDay();return Fe=pe>=4||pe===0?(0,a.bL)(Fe):a.bL.ceil(Fe),b(a.bL.count((0,x.Z)(Fe),Fe)+((0,x.Z)(Fe).getDay()===4),Ce,2)}function ve(Fe){return Fe.getDay()}function le(Fe,Ce){return b(a.wA.count((0,x.Z)(Fe)-1,Fe),Ce,2)}function xe(Fe,Ce){return b(Fe.getFullYear()%100,Ce,2)}function Se(Fe,Ce){return b(Fe.getFullYear()%1e4,Ce,4)}function Re(Fe){var Ce=Fe.getTimezoneOffset();return(Ce>0?"-":(Ce*=-1,"+"))+b(Ce/60|0,"0",2)+b(Ce%60,"0",2)}function Ee(Fe,Ce){return b(Fe.getUTCDate(),Ce,2)}function Oe(Fe,Ce){return b(Fe.getUTCHours(),Ce,2)}function Be(Fe,Ce){return b(Fe.getUTCHours()%12||12,Ce,2)}function Le(Fe,Ce){return b(1+P.Z.count((0,v.Z)(Fe),Fe),Ce,3)}function Te(Fe,Ce){return b(Fe.getUTCMilliseconds(),Ce,3)}function De(Fe,Ce){return Te(Fe,Ce)+"000"}function Ve(Fe,Ce){return b(Fe.getUTCMonth()+1,Ce,2)}function Ye(Fe,Ce){return b(Fe.getUTCMinutes(),Ce,2)}function Ne(Fe,Ce){return b(Fe.getUTCSeconds(),Ce,2)}function Xe(Fe){var Ce=Fe.getUTCDay();return Ce===0?7:Ce}function ht(Fe,Ce){return b(d.Ox.count((0,v.Z)(Fe)-1,Fe),Ce,2)}function st(Fe,Ce){var pe=Fe.getUTCDay();return Fe=pe>=4||pe===0?(0,d.hB)(Fe):d.hB.ceil(Fe),b(d.hB.count((0,v.Z)(Fe),Fe)+((0,v.Z)(Fe).getUTCDay()===4),Ce,2)}function it(Fe){return Fe.getUTCDay()}function nt(Fe,Ce){return b(d.l6.count((0,v.Z)(Fe)-1,Fe),Ce,2)}function pt(Fe,Ce){return b(Fe.getUTCFullYear()%100,Ce,2)}function Tt(Fe,Ce){return b(Fe.getUTCFullYear()%1e4,Ce,4)}function Et(){return"+0000"}function Dt(){return"%"}function et(Fe){return+Fe}function Ue(Fe){return Math.floor(+Fe/1e3)}var ze,rt,lt;Qe({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 Qe(Fe){return ze=u(Fe),rt=ze.format,ze.parse,lt=ze.utcFormat,ze.utcParse,ze}},82301:function(z,B,e){e.d(B,{a:function(){return _}});var d=e(30052),P=e(54263),a=(0,d.Z)(function(x){x.setHours(0,0,0,0)},function(x,v){x.setDate(x.getDate()+v)},function(x,v){return(v-x-(v.getTimezoneOffset()-x.getTimezoneOffset())*P.yB)/P.UD},function(x){return x.getDate()-1});B.Z=a;var _=a.range},54263:function(z,B,e){e.d(B,{UD:function(){return _},Y2:function(){return a},Ym:function(){return d},iM:function(){return x},yB:function(){return P}});var d=1e3,P=6e4,a=36e5,_=864e5,x=6048e5},81041:function(z,B,e){e.r(B),e.d(B,{timeDay:function(){return b.Z},timeDays:function(){return b.a},timeFriday:function(){return p.mC},timeFridays:function(){return p.b$},timeHour:function(){return g},timeHours:function(){return h},timeInterval:function(){return d.Z},timeMillisecond:function(){return a},timeMilliseconds:function(){return _},timeMinute:function(){return u},timeMinutes:function(){return i},timeMonday:function(){return p.wA},timeMondays:function(){return p.bJ},timeMonth:function(){return c},timeMonths:function(){return l},timeSaturday:function(){return p.EY},timeSaturdays:function(){return p.Ff},timeSecond:function(){return y},timeSeconds:function(){return r},timeSunday:function(){return p.OM},timeSundays:function(){return p.vm},timeThursday:function(){return p.bL},timeThursdays:function(){return p.$t},timeTuesday:function(){return p.sy},timeTuesdays:function(){return p.aU},timeWednesday:function(){return p.zg},timeWednesdays:function(){return p.Ld},timeWeek:function(){return p.OM},timeWeeks:function(){return p.vm},timeYear:function(){return m.Z},timeYears:function(){return m.g},utcDay:function(){return o.Z},utcDays:function(){return o.y},utcFriday:function(){return R.QQ},utcFridays:function(){return R.fz},utcHour:function(){return C},utcHours:function(){return S},utcMillisecond:function(){return a},utcMilliseconds:function(){return _},utcMinute:function(){return L},utcMinutes:function(){return D},utcMonday:function(){return R.l6},utcMondays:function(){return R.$3},utcMonth:function(){return O},utcMonths:function(){return N},utcSaturday:function(){return R.g4},utcSaturdays:function(){return R.Q_},utcSecond:function(){return y},utcSeconds:function(){return r},utcSunday:function(){return R.Ox},utcSundays:function(){return R.SU},utcThursday:function(){return R.hB},utcThursdays:function(){return R.xj},utcTuesday:function(){return R.J1},utcTuesdays:function(){return R.DK},utcWednesday:function(){return R.b3},utcWednesdays:function(){return R.uy},utcWeek:function(){return R.Ox},utcWeeks:function(){return R.SU},utcYear:function(){return H.Z},utcYears:function(){return H.D}});var d=e(30052),P=(0,d.Z)(function(){},function(k,V){k.setTime(+k+V)},function(k,V){return V-k});P.every=function(k){return k=Math.floor(k),!isFinite(k)||!(k>0)?null:k>1?(0,d.Z)(function(V){V.setTime(Math.floor(V/k)*k)},function(V,G){V.setTime(+V+G*k)},function(V,G){return(G-V)/k}):P};var a=P,_=P.range,x=e(54263),v=(0,d.Z)(function(k){k.setTime(k-k.getMilliseconds())},function(k,V){k.setTime(+k+V*x.Ym)},function(k,V){return(V-k)/x.Ym},function(k){return k.getUTCSeconds()}),y=v,r=v.range,n=(0,d.Z)(function(k){k.setTime(k-k.getMilliseconds()-k.getSeconds()*x.Ym)},function(k,V){k.setTime(+k+V*x.yB)},function(k,V){return(V-k)/x.yB},function(k){return k.getMinutes()}),u=n,i=n.range,f=(0,d.Z)(function(k){k.setTime(k-k.getMilliseconds()-k.getSeconds()*x.Ym-k.getMinutes()*x.yB)},function(k,V){k.setTime(+k+V*x.Y2)},function(k,V){return(V-k)/x.Y2},function(k){return k.getHours()}),g=f,h=f.range,b=e(82301),p=e(59879),E=(0,d.Z)(function(k){k.setDate(1),k.setHours(0,0,0,0)},function(k,V){k.setMonth(k.getMonth()+V)},function(k,V){return V.getMonth()-k.getMonth()+(V.getFullYear()-k.getFullYear())*12},function(k){return k.getMonth()}),c=E,l=E.range,m=e(34823),M=(0,d.Z)(function(k){k.setUTCSeconds(0,0)},function(k,V){k.setTime(+k+V*x.yB)},function(k,V){return(V-k)/x.yB},function(k){return k.getUTCMinutes()}),L=M,D=M.range,A=(0,d.Z)(function(k){k.setUTCMinutes(0,0,0)},function(k,V){k.setTime(+k+V*x.Y2)},function(k,V){return(V-k)/x.Y2},function(k){return k.getUTCHours()}),C=A,S=A.range,o=e(48480),R=e(58176),T=(0,d.Z)(function(k){k.setUTCDate(1),k.setUTCHours(0,0,0,0)},function(k,V){k.setUTCMonth(k.getUTCMonth()+V)},function(k,V){return V.getUTCMonth()-k.getUTCMonth()+(V.getUTCFullYear()-k.getUTCFullYear())*12},function(k){return k.getUTCMonth()}),O=T,N=T.range,H=e(79791)},30052:function(z,B,e){e.d(B,{Z:function(){return a}});var d=new Date,P=new Date;function a(_,x,v,y){function r(n){return _(n=arguments.length===0?new Date:new Date(+n)),n}return r.floor=function(n){return _(n=new Date(+n)),n},r.ceil=function(n){return _(n=new Date(n-1)),x(n,1),_(n),n},r.round=function(n){var u=r(n),i=r.ceil(n);return n-u<i-n?u:i},r.offset=function(n,u){return x(n=new Date(+n),u==null?1:Math.floor(u)),n},r.range=function(n,u,i){var f=[],g;if(n=r.ceil(n),i=i==null?1:Math.floor(i),!(n<u)||!(i>0))return f;do f.push(g=new Date(+n)),x(n,i),_(n);while(g<n&&n<u);return f},r.filter=function(n){return a(function(u){if(u>=u)for(;_(u),!n(u);)u.setTime(u-1)},function(u,i){if(u>=u)if(i<0)for(;++i<=0;)for(;x(u,-1),!n(u););else for(;--i>=0;)for(;x(u,1),!n(u););})},v&&(r.count=function(n,u){return d.setTime(+n),P.setTime(+u),_(d),_(P),Math.floor(v(d,P))},r.every=function(n){return n=Math.floor(n),!isFinite(n)||!(n>0)?null:n>1?r.filter(y?function(u){return y(u)%n===0}:function(u){return r.count(0,u)%n===0}):r}),r}},48480:function(z,B,e){e.d(B,{y:function(){return _}});var d=e(30052),P=e(54263),a=(0,d.Z)(function(x){x.setUTCHours(0,0,0,0)},function(x,v){x.setUTCDate(x.getUTCDate()+v)},function(x,v){return(v-x)/P.UD},function(x){return x.getUTCDate()-1});B.Z=a;var _=a.range},58176:function(z,B,e){e.d(B,{$3:function(){return f},DK:function(){return g},J1:function(){return v},Ox:function(){return _},QQ:function(){return n},Q_:function(){return E},SU:function(){return i},b3:function(){return y},fz:function(){return p},g4:function(){return u},hB:function(){return r},l6:function(){return x},uy:function(){return h},xj:function(){return b}});var d=e(30052),P=e(54263);function a(c){return(0,d.Z)(function(l){l.setUTCDate(l.getUTCDate()-(l.getUTCDay()+7-c)%7),l.setUTCHours(0,0,0,0)},function(l,m){l.setUTCDate(l.getUTCDate()+m*7)},function(l,m){return(m-l)/P.iM})}var _=a(0),x=a(1),v=a(2),y=a(3),r=a(4),n=a(5),u=a(6),i=_.range,f=x.range,g=v.range,h=y.range,b=r.range,p=n.range,E=u.range},79791:function(z,B,e){e.d(B,{D:function(){return a}});var d=e(30052),P=(0,d.Z)(function(_){_.setUTCMonth(0,1),_.setUTCHours(0,0,0,0)},function(_,x){_.setUTCFullYear(_.getUTCFullYear()+x)},function(_,x){return x.getUTCFullYear()-_.getUTCFullYear()},function(_){return _.getUTCFullYear()});P.every=function(_){return!isFinite(_=Math.floor(_))||!(_>0)?null:(0,d.Z)(function(x){x.setUTCFullYear(Math.floor(x.getUTCFullYear()/_)*_),x.setUTCMonth(0,1),x.setUTCHours(0,0,0,0)},function(x,v){x.setUTCFullYear(x.getUTCFullYear()+v*_)})},B.Z=P;var a=P.range},59879:function(z,B,e){e.d(B,{$t:function(){return b},EY:function(){return u},Ff:function(){return E},Ld:function(){return h},OM:function(){return _},aU:function(){return g},b$:function(){return p},bJ:function(){return f},bL:function(){return r},mC:function(){return n},sy:function(){return v},vm:function(){return i},wA:function(){return x},zg:function(){return y}});var d=e(30052),P=e(54263);function a(c){return(0,d.Z)(function(l){l.setDate(l.getDate()-(l.getDay()+7-c)%7),l.setHours(0,0,0,0)},function(l,m){l.setDate(l.getDate()+m*7)},function(l,m){return(m-l-(m.getTimezoneOffset()-l.getTimezoneOffset())*P.yB)/P.iM})}var _=a(0),x=a(1),v=a(2),y=a(3),r=a(4),n=a(5),u=a(6),i=_.range,f=x.range,g=v.range,h=y.range,b=r.range,p=n.range,E=u.range},34823:function(z,B,e){e.d(B,{g:function(){return a}});var d=e(30052),P=(0,d.Z)(function(_){_.setMonth(0,1),_.setHours(0,0,0,0)},function(_,x){_.setFullYear(_.getFullYear()+x)},function(_,x){return x.getFullYear()-_.getFullYear()},function(_){return _.getFullYear()});P.every=function(_){return!isFinite(_=Math.floor(_))||!(_>0)?null:(0,d.Z)(function(x){x.setFullYear(Math.floor(x.getFullYear()/_)*_),x.setMonth(0,1),x.setHours(0,0,0,0)},function(x,v){x.setFullYear(x.getFullYear()+v*_)})},B.Z=P;var a=P.range},17045:function(z,B,e){var d=e(8709),P=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",a=Object.prototype.toString,_=Array.prototype.concat,x=Object.defineProperty,v=function(i){return typeof i=="function"&&a.call(i)==="[object Function]"},y=function(){var i={};try{x(i,"x",{enumerable:!1,value:i});for(var f in i)return!1;return i.x===i}catch{return!1}},r=x&&y(),n=function(i,f,g,h){f in i&&(!v(h)||!h())||(r?x(i,f,{configurable:!0,enumerable:!1,value:g,writable:!0}):i[f]=g)},u=function(i,f){var g=arguments.length>2?arguments[2]:{},h=d(f);P&&(h=_.call(h,Object.getOwnPropertySymbols(f)));for(var b=0;b<h.length;b+=1)n(i,h[b],f[h[b]],g[h[b]])};u.supportsDescriptors=!!r,z.exports=u},46775:function(z){z.exports=function(){for(var B=0;B<arguments.length;B++)if(arguments[B]!==void 0)return arguments[B]}},53545:function(z){z.exports=P;var B=P.canvas=document.createElement("canvas"),e=B.getContext("2d"),d=a([32,126]);P.createPairs=a,P.ascii=d;function P(_,x){Array.isArray(_)&&(_=_.join(", "));var v={},y,r=16,n=.05;x&&(x.length===2&&typeof x[0]=="number"?y=a(x):Array.isArray(x)?y=x:(x.o?y=a(x.o):x.pairs&&(y=x.pairs),x.fontSize&&(r=x.fontSize),x.threshold!=null&&(n=x.threshold))),y||(y=d),e.font=r+"px "+_;for(var u=0;u<y.length;u++){var i=y[u],f=e.measureText(i[0]).width+e.measureText(i[1]).width,g=e.measureText(i).width;if(Math.abs(f-g)>r*n){var h=(g-f)/r;v[i]=h*1e3}}return v}function a(_){for(var x=[],v=_[0];v<=_[1];v++)for(var y=String.fromCharCode(v),r=_[0];r<_[1];r++){var n=String.fromCharCode(r),u=y+n;x.push(u)}return x}},31457:function(z,B,e){var d=e(65185),P=e(18625),a={M:"moveTo",C:"bezierCurveTo"};z.exports=function(_,x){_.beginPath(),P(d(x)).forEach(function(v){var y=v[0],r=v.slice(1);_[a[y]].apply(_,r)}),_.closePath()}},90660:function(z){z.exports=function(B){switch(B){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}}},12129:function(z){function B(P,a,_){var x=P[_]|0;if(x<=0)return[];var v=new Array(x),y;if(_===P.length-1)for(y=0;y<x;++y)v[y]=a;else for(y=0;y<x;++y)v[y]=B(P,a,_+1);return v}function e(P,a){var _,x;for(_=new Array(P),x=0;x<P;++x)_[x]=a;return _}function d(P,a){switch(typeof a>"u"&&(a=0),typeof P){case"number":if(P>0)return e(P|0,a);break;case"object":if(typeof P.length=="number")return B(P,a,0);break}return[]}z.exports=d},11474:function(z){z.exports=B,z.exports.default=B;function B(N,H,k){k=k||2;var V=H&&H.length,G=V?H[0]*k:N.length,U=e(N,0,G,k,!0),Y=[];if(!U||U.next===U.prev)return Y;var ee,re,ie,se,ce,q,j;if(V&&(U=y(N,H,U,k)),N.length>80*k){ee=ie=N[0],re=se=N[1];for(var Z=k;Z<G;Z+=k)ce=N[Z],q=N[Z+1],ce<ee&&(ee=ce),q<re&&(re=q),ce>ie&&(ie=ce),q>se&&(se=q);j=Math.max(ie-ee,se-re),j=j!==0?1/j:0}return P(U,Y,k,ee,re,j),Y}function e(N,H,k,V,G){var U,Y;if(G===O(N,H,k,V)>0)for(U=H;U<k;U+=V)Y=o(U,N[U],N[U+1],Y);else for(U=k-V;U>=H;U-=V)Y=o(U,N[U],N[U+1],Y);return Y&&l(Y,Y.next)&&(R(Y),Y=Y.next),Y}function d(N,H){if(!N)return N;H||(H=N);var k=N,V;do if(V=!1,!k.steiner&&(l(k,k.next)||c(k.prev,k,k.next)===0)){if(R(k),k=H=k.prev,k===k.next)break;V=!0}else k=k.next;while(V||k!==H);return H}function P(N,H,k,V,G,U,Y){if(N){!Y&&U&&f(N,V,G,U);for(var ee=N,re,ie;N.prev!==N.next;){if(re=N.prev,ie=N.next,U?_(N,V,G,U):a(N)){H.push(re.i/k),H.push(N.i/k),H.push(ie.i/k),R(N),N=ie.next,ee=ie.next;continue}if(N=ie,N===ee){Y?Y===1?(N=x(d(N),H,k),P(N,H,k,V,G,U,2)):Y===2&&v(N,H,k,V,G,U):P(d(N),H,k,V,G,U,1);break}}}}function a(N){var H=N.prev,k=N,V=N.next;if(c(H,k,V)>=0)return!1;for(var G=N.next.next;G!==N.prev;){if(p(H.x,H.y,k.x,k.y,V.x,V.y,G.x,G.y)&&c(G.prev,G,G.next)>=0)return!1;G=G.next}return!0}function _(N,H,k,V){var G=N.prev,U=N,Y=N.next;if(c(G,U,Y)>=0)return!1;for(var ee=G.x<U.x?G.x<Y.x?G.x:Y.x:U.x<Y.x?U.x:Y.x,re=G.y<U.y?G.y<Y.y?G.y:Y.y:U.y<Y.y?U.y:Y.y,ie=G.x>U.x?G.x>Y.x?G.x:Y.x:U.x>Y.x?U.x:Y.x,se=G.y>U.y?G.y>Y.y?G.y:Y.y:U.y>Y.y?U.y:Y.y,ce=h(ee,re,H,k,V),q=h(ie,se,H,k,V),j=N.prevZ,Z=N.nextZ;j&&j.z>=ce&&Z&&Z.z<=q;){if(j!==N.prev&&j!==N.next&&p(G.x,G.y,U.x,U.y,Y.x,Y.y,j.x,j.y)&&c(j.prev,j,j.next)>=0||(j=j.prevZ,Z!==N.prev&&Z!==N.next&&p(G.x,G.y,U.x,U.y,Y.x,Y.y,Z.x,Z.y)&&c(Z.prev,Z,Z.next)>=0))return!1;Z=Z.nextZ}for(;j&&j.z>=ce;){if(j!==N.prev&&j!==N.next&&p(G.x,G.y,U.x,U.y,Y.x,Y.y,j.x,j.y)&&c(j.prev,j,j.next)>=0)return!1;j=j.prevZ}for(;Z&&Z.z<=q;){if(Z!==N.prev&&Z!==N.next&&p(G.x,G.y,U.x,U.y,Y.x,Y.y,Z.x,Z.y)&&c(Z.prev,Z,Z.next)>=0)return!1;Z=Z.nextZ}return!0}function x(N,H,k){var V=N;do{var G=V.prev,U=V.next.next;!l(G,U)&&m(G,V,V.next,U)&&A(G,U)&&A(U,G)&&(H.push(G.i/k),H.push(V.i/k),H.push(U.i/k),R(V),R(V.next),V=N=U),V=V.next}while(V!==N);return d(V)}function v(N,H,k,V,G,U){var Y=N;do{for(var ee=Y.next.next;ee!==Y.prev;){if(Y.i!==ee.i&&E(Y,ee)){var re=S(Y,ee);Y=d(Y,Y.next),re=d(re,re.next),P(Y,H,k,V,G,U),P(re,H,k,V,G,U);return}ee=ee.next}Y=Y.next}while(Y!==N)}function y(N,H,k,V){var G=[],U,Y,ee,re,ie;for(U=0,Y=H.length;U<Y;U++)ee=H[U]*V,re=U<Y-1?H[U+1]*V:N.length,ie=e(N,ee,re,V,!1),ie===ie.next&&(ie.steiner=!0),G.push(b(ie));for(G.sort(r),U=0;U<G.length;U++)n(G[U],k),k=d(k,k.next);return k}function r(N,H){return N.x-H.x}function n(N,H){if(H=u(N,H),H){var k=S(H,N);d(H,H.next),d(k,k.next)}}function u(N,H){var k=H,V=N.x,G=N.y,U=-1/0,Y;do{if(G<=k.y&&G>=k.next.y&&k.next.y!==k.y){var ee=k.x+(G-k.y)*(k.next.x-k.x)/(k.next.y-k.y);if(ee<=V&&ee>U){if(U=ee,ee===V){if(G===k.y)return k;if(G===k.next.y)return k.next}Y=k.x<k.next.x?k:k.next}}k=k.next}while(k!==H);if(!Y)return null;if(V===U)return Y;var re=Y,ie=Y.x,se=Y.y,ce=1/0,q;k=Y;do V>=k.x&&k.x>=ie&&V!==k.x&&p(G<se?V:U,G,ie,se,G<se?U:V,G,k.x,k.y)&&(q=Math.abs(G-k.y)/(V-k.x),A(k,N)&&(q<ce||q===ce&&(k.x>Y.x||k.x===Y.x&&i(Y,k)))&&(Y=k,ce=q)),k=k.next;while(k!==re);return Y}function i(N,H){return c(N.prev,N,H.prev)<0&&c(H.next,N,N.next)<0}function f(N,H,k,V){var G=N;do G.z===null&&(G.z=h(G.x,G.y,H,k,V)),G.prevZ=G.prev,G.nextZ=G.next,G=G.next;while(G!==N);G.prevZ.nextZ=null,G.prevZ=null,g(G)}function g(N){var H,k,V,G,U,Y,ee,re,ie=1;do{for(k=N,N=null,U=null,Y=0;k;){for(Y++,V=k,ee=0,H=0;H<ie&&(ee++,V=V.nextZ,!!V);H++);for(re=ie;ee>0||re>0&&V;)ee!==0&&(re===0||!V||k.z<=V.z)?(G=k,k=k.nextZ,ee--):(G=V,V=V.nextZ,re--),U?U.nextZ=G:N=G,G.prevZ=U,U=G;k=V}U.nextZ=null,ie*=2}while(Y>1);return N}function h(N,H,k,V,G){return N=32767*(N-k)*G,H=32767*(H-V)*G,N=(N|N<<8)&16711935,N=(N|N<<4)&252645135,N=(N|N<<2)&858993459,N=(N|N<<1)&1431655765,H=(H|H<<8)&16711935,H=(H|H<<4)&252645135,H=(H|H<<2)&858993459,H=(H|H<<1)&1431655765,N|H<<1}function b(N){var H=N,k=N;do(H.x<k.x||H.x===k.x&&H.y<k.y)&&(k=H),H=H.next;while(H!==N);return k}function p(N,H,k,V,G,U,Y,ee){return(G-Y)*(H-ee)-(N-Y)*(U-ee)>=0&&(N-Y)*(V-ee)-(k-Y)*(H-ee)>=0&&(k-Y)*(U-ee)-(G-Y)*(V-ee)>=0}function E(N,H){return N.next.i!==H.i&&N.prev.i!==H.i&&!D(N,H)&&(A(N,H)&&A(H,N)&&C(N,H)&&(c(N.prev,N,H.prev)||c(N,H.prev,H))||l(N,H)&&c(N.prev,N,N.next)>0&&c(H.prev,H,H.next)>0)}function c(N,H,k){return(H.y-N.y)*(k.x-H.x)-(H.x-N.x)*(k.y-H.y)}function l(N,H){return N.x===H.x&&N.y===H.y}function m(N,H,k,V){var G=L(c(N,H,k)),U=L(c(N,H,V)),Y=L(c(k,V,N)),ee=L(c(k,V,H));return!!(G!==U&&Y!==ee||G===0&&M(N,k,H)||U===0&&M(N,V,H)||Y===0&&M(k,N,V)||ee===0&&M(k,H,V))}function M(N,H,k){return H.x<=Math.max(N.x,k.x)&&H.x>=Math.min(N.x,k.x)&&H.y<=Math.max(N.y,k.y)&&H.y>=Math.min(N.y,k.y)}function L(N){return N>0?1:N<0?-1:0}function D(N,H){var k=N;do{if(k.i!==N.i&&k.next.i!==N.i&&k.i!==H.i&&k.next.i!==H.i&&m(k,k.next,N,H))return!0;k=k.next}while(k!==N);return!1}function A(N,H){return c(N.prev,N,N.next)<0?c(N,H,N.next)>=0&&c(N,N.prev,H)>=0:c(N,H,N.prev)<0||c(N,N.next,H)<0}function C(N,H){var k=N,V=!1,G=(N.x+H.x)/2,U=(N.y+H.y)/2;do k.y>U!=k.next.y>U&&k.next.y!==k.y&&G<(k.next.x-k.x)*(U-k.y)/(k.next.y-k.y)+k.x&&(V=!V),k=k.next;while(k!==N);return V}function S(N,H){var k=new T(N.i,N.x,N.y),V=new T(H.i,H.x,H.y),G=N.next,U=H.prev;return N.next=H,H.prev=N,k.next=G,G.prev=k,V.next=k,k.prev=V,U.next=V,V.prev=U,V}function o(N,H,k,V){var G=new T(N,H,k);return V?(G.next=V.next,G.prev=V,V.next.prev=G,V.next=G):(G.prev=G,G.next=G),G}function R(N){N.next.prev=N.prev,N.prev.next=N.next,N.prevZ&&(N.prevZ.nextZ=N.nextZ),N.nextZ&&(N.nextZ.prevZ=N.prevZ)}function T(N,H,k){this.i=N,this.x=H,this.y=k,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}B.deviation=function(N,H,k,V){var G=H&&H.length,U=G?H[0]*k:N.length,Y=Math.abs(O(N,0,U,k));if(G)for(var ee=0,re=H.length;ee<re;ee++){var ie=H[ee]*k,se=ee<re-1?H[ee+1]*k:N.length;Y-=Math.abs(O(N,ie,se,k))}var ce=0;for(ee=0;ee<V.length;ee+=3){var q=V[ee]*k,j=V[ee+1]*k,Z=V[ee+2]*k;ce+=Math.abs((N[q]-N[Z])*(N[j+1]-N[q+1])-(N[q]-N[j])*(N[Z+1]-N[q+1]))}return Y===0&&ce===0?0:Math.abs((ce-Y)/Y)};function O(N,H,k,V){for(var G=0,U=H,Y=k-V;U<k;U+=V)G+=(N[Y]-N[U])*(N[U+1]+N[Y+1]),Y=U;return G}B.flatten=function(N){for(var H=N[0][0].length,k={vertices:[],holes:[],dimensions:H},V=0,G=0;G<N.length;G++){for(var U=0;U<N[G].length;U++)for(var Y=0;Y<H;Y++)k.vertices.push(N[G][U][Y]);G>0&&(V+=N[G-1].length,k.holes.push(V))}return k}},2502:function(z,B,e){var d=e(68664);z.exports=function(a,_){var x=[],v=[],y=[],r={},n=[],u;function i(M){y[M]=!1,r.hasOwnProperty(M)&&Object.keys(r[M]).forEach(function(L){delete r[M][L],y[L]&&i(L)})}function f(M){var L=!1;v.push(M),y[M]=!0;var D,A;for(D=0;D<n[M].length;D++)A=n[M][D],A===u?(g(u,v),L=!0):y[A]||(L=f(A));if(L)i(M);else for(D=0;D<n[M].length;D++){A=n[M][D];var C=r[A];C||(C={},r[A]=C),C[A]=!0}return v.pop(),L}function g(M,L){var D=[].concat(L).concat(M);_?_(f):x.push(D)}function h(M){for(var L=0;L<a.length;L++)L<M&&(a[L]=[]),a[L]=a[L].filter(function(D){return D>=M})}function b(M){h(M);for(var L=a,D=d(L),A=D.components.filter(function(N){return N.length>1}),C=1/0,S,o=0;o<A.length;o++)for(var R=0;R<A[o].length;R++)A[o][R]<C&&(C=A[o][R],S=o);var T=A[S];if(!T)return!1;var O=a.map(function(N,H){return T.indexOf(H)===-1?[]:N.filter(function(k){return T.indexOf(k)!==-1})});return{leastVertex:C,adjList:O}}u=0;for(var p=a.length;u<p;){var E=b(u);if(u=E.leastVertex,n=E.adjList,n){for(var c=0;c<n.length;c++)for(var l=0;l<n[c].length;l++){var m=n[c][l];y[+m]=!1,r[m]={}}f(u),u=u+1}else u=p}if(!_)return x}},72943:function(z,B,e){var d,P=TypeError,a=Object.getOwnPropertyDescriptor;if(a)try{a({},"")}catch{a=null}var _=function(){throw new P},x=a?function(){try{return arguments.callee,_}catch{try{return a(arguments,"callee").get}catch{return _}}}():_,v=e(57877)(),y=Object.getPrototypeOf||function(l){return l.__proto__},r=d,n=d,u=d,i=typeof Uint8Array>"u"?d:y(Uint8Array),f={"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?d:ArrayBuffer,"%ArrayBufferPrototype%":typeof ArrayBuffer>"u"?d:ArrayBuffer.prototype,"%ArrayIteratorPrototype%":v?y([][Symbol.iterator]()):d,"%ArrayPrototype%":Array.prototype,"%ArrayProto_entries%":Array.prototype.entries,"%ArrayProto_forEach%":Array.prototype.forEach,"%ArrayProto_keys%":Array.prototype.keys,"%ArrayProto_values%":Array.prototype.values,"%AsyncFromSyncIteratorPrototype%":d,"%AsyncFunction%":n,"%AsyncFunctionPrototype%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":u,"%AsyncGeneratorPrototype%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":typeof Atomics>"u"?d:Atomics,"%Boolean%":Boolean,"%BooleanPrototype%":Boolean.prototype,"%DataView%":typeof DataView>"u"?d:DataView,"%DataViewPrototype%":typeof DataView>"u"?d:DataView.prototype,"%Date%":Date,"%DatePrototype%":Date.prototype,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%ErrorPrototype%":Error.prototype,"%eval%":eval,"%EvalError%":EvalError,"%EvalErrorPrototype%":EvalError.prototype,"%Float32Array%":typeof Float32Array>"u"?d:Float32Array,"%Float32ArrayPrototype%":typeof Float32Array>"u"?d:Float32Array.prototype,"%Float64Array%":typeof Float64Array>"u"?d:Float64Array,"%Float64ArrayPrototype%":typeof Float64Array>"u"?d:Float64Array.prototype,"%Function%":Function,"%FunctionPrototype%":Function.prototype,"%Generator%":d,"%GeneratorFunction%":r,"%GeneratorPrototype%":d,"%Int8Array%":typeof Int8Array>"u"?d:Int8Array,"%Int8ArrayPrototype%":typeof Int8Array>"u"?d:Int8Array.prototype,"%Int16Array%":typeof Int16Array>"u"?d:Int16Array,"%Int16ArrayPrototype%":typeof Int16Array>"u"?d:Int8Array.prototype,"%Int32Array%":typeof Int32Array>"u"?d:Int32Array,"%Int32ArrayPrototype%":typeof Int32Array>"u"?d:Int32Array.prototype,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":v?y(y([][Symbol.iterator]())):d,"%JSON%":typeof JSON=="object"?JSON:d,"%JSONParse%":typeof JSON=="object"?JSON.parse:d,"%Map%":typeof Map>"u"?d:Map,"%MapIteratorPrototype%":typeof Map>"u"||!v?d:y(new Map()[Symbol.iterator]()),"%MapPrototype%":typeof Map>"u"?d:Map.prototype,"%Math%":Math,"%Number%":Number,"%NumberPrototype%":Number.prototype,"%Object%":Object,"%ObjectPrototype%":Object.prototype,"%ObjProto_toString%":Object.prototype.toString,"%ObjProto_valueOf%":Object.prototype.valueOf,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?d:Promise,"%PromisePrototype%":typeof Promise>"u"?d:Promise.prototype,"%PromiseProto_then%":typeof Promise>"u"?d:Promise.prototype.then,"%Promise_all%":typeof Promise>"u"?d:Promise.all,"%Promise_reject%":typeof Promise>"u"?d:Promise.reject,"%Promise_resolve%":typeof Promise>"u"?d:Promise.resolve,"%Proxy%":typeof Proxy>"u"?d:Proxy,"%RangeError%":RangeError,"%RangeErrorPrototype%":RangeError.prototype,"%ReferenceError%":ReferenceError,"%ReferenceErrorPrototype%":ReferenceError.prototype,"%Reflect%":typeof Reflect>"u"?d:Reflect,"%RegExp%":RegExp,"%RegExpPrototype%":RegExp.prototype,"%Set%":typeof Set>"u"?d:Set,"%SetIteratorPrototype%":typeof Set>"u"||!v?d:y(new Set()[Symbol.iterator]()),"%SetPrototype%":typeof Set>"u"?d:Set.prototype,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?d:SharedArrayBuffer,"%SharedArrayBufferPrototype%":typeof SharedArrayBuffer>"u"?d:SharedArrayBuffer.prototype,"%String%":String,"%StringIteratorPrototype%":v?y(""[Symbol.iterator]()):d,"%StringPrototype%":String.prototype,"%Symbol%":v?Symbol:d,"%SymbolPrototype%":v?Symbol.prototype:d,"%SyntaxError%":SyntaxError,"%SyntaxErrorPrototype%":SyntaxError.prototype,"%ThrowTypeError%":x,"%TypedArray%":i,"%TypedArrayPrototype%":i?i.prototype:d,"%TypeError%":P,"%TypeErrorPrototype%":P.prototype,"%Uint8Array%":typeof Uint8Array>"u"?d:Uint8Array,"%Uint8ArrayPrototype%":typeof Uint8Array>"u"?d:Uint8Array.prototype,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?d:Uint8ClampedArray,"%Uint8ClampedArrayPrototype%":typeof Uint8ClampedArray>"u"?d:Uint8ClampedArray.prototype,"%Uint16Array%":typeof Uint16Array>"u"?d:Uint16Array,"%Uint16ArrayPrototype%":typeof Uint16Array>"u"?d:Uint16Array.prototype,"%Uint32Array%":typeof Uint32Array>"u"?d:Uint32Array,"%Uint32ArrayPrototype%":typeof Uint32Array>"u"?d:Uint32Array.prototype,"%URIError%":URIError,"%URIErrorPrototype%":URIError.prototype,"%WeakMap%":typeof WeakMap>"u"?d:WeakMap,"%WeakMapPrototype%":typeof WeakMap>"u"?d:WeakMap.prototype,"%WeakSet%":typeof WeakSet>"u"?d:WeakSet,"%WeakSetPrototype%":typeof WeakSet>"u"?d:WeakSet.prototype},g=e(77575),h=g.call(Function.call,String.prototype.replace),b=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,p=/\\(\\)?/g,E=function(m){var M=[];return h(m,b,function(L,D,A,C){M[M.length]=A?h(C,p,"$1"):D||L}),M},c=function(m,M){if(!(m in f))throw new SyntaxError("intrinsic "+m+" does not exist!");if(typeof f[m]>"u"&&!M)throw new P("intrinsic "+m+" exists, but is not available. Please file an issue!");return f[m]};z.exports=function(m,M){if(typeof m!="string"||m.length===0)throw new TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof M!="boolean")throw new TypeError('"allowMissing" argument must be a boolean');for(var L=E(m),D=c("%"+(L.length>0?L[0]:"")+"%",M),A=1;A<L.length;A+=1)if(D!=null)if(a&&A+1>=L.length){var C=a(D,L[A]);if(!M&&!(L[A]in D))throw new P("base intrinsic for "+m+" exists, but the property is not available.");D=C?C.get||C.value:D[L[A]]}else D=D[L[A]];return D}},84671:function(z,B,e){var d=e(77575),P=e(72943),a=P("%Function%"),_=a.apply,x=a.call;z.exports=function(){return d.apply(x,arguments)},z.exports.apply=function(){return d.apply(_,arguments)}},92978:function(z,B,e){var d=e(72943),P=e(84671),a=P(d("String.prototype.indexOf"));z.exports=function(x,v){var y=d(x,!!v);return typeof y=="function"&&a(x,".prototype.")?P(y):y}},67295:function(z,B,e){var d=e(72943),P=d("%Object.getOwnPropertyDescriptor%");if(P)try{P([],"length")}catch{P=null}z.exports=P},16134:function(z,B,e){var d=e(36672);z.exports=function(){return d(this).length=0,this}},4892:function(z,B,e){z.exports=e(64404)()?Array.from:e(49441)},64404:function(z){z.exports=function(){var B=Array.from,e,d;return typeof B!="function"?!1:(e=["raz","dwa"],d=B(e),Boolean(d&&d!==e&&d[1]==="dwa"))}},49441:function(z,B,e){var d=e(8260).iterator,P=e(73051),a=e(33717),_=e(35976),x=e(78513),v=e(36672),y=e(95296),r=e(87963),n=Array.isArray,u=Function.prototype.call,i={configurable:!0,enumerable:!0,writable:!0,value:null},f=Object.defineProperty;z.exports=function(g){var h=arguments[1],b=arguments[2],p,E,c,l,m,M,L,D,A,C;if(g=Object(v(g)),y(h)&&x(h),!this||this===Array||!a(this)){if(!h){if(P(g))return m=g.length,m!==1?Array.apply(null,g):(l=new Array(1),l[0]=g[0],l);if(n(g)){for(l=new Array(m=g.length),E=0;E<m;++E)l[E]=g[E];return l}}l=[]}else p=this;if(!n(g)){if((A=g[d])!==void 0){for(L=x(A).call(g),p&&(l=new p),D=L.next(),E=0;!D.done;)C=h?u.call(h,b,D.value,E):D.value,p?(i.value=C,f(l,E,i)):l[E]=C,D=L.next(),++E;m=E}else if(r(g)){for(m=g.length,p&&(l=new p),E=0,c=0;E<m;++E)C=g[E],E+1<m&&(M=C.charCodeAt(0),M>=55296&&M<=56319&&(C+=g[++E])),C=h?u.call(h,b,C,c):C,p?(i.value=C,f(l,c,i)):l[c]=C,++c;m=c}}if(m===void 0)for(m=_(g.length),p&&(l=new p(m)),E=0;E<m;++E)C=h?u.call(h,b,g[E],E):g[E],p?(i.value=C,f(l,E,i)):l[E]=C;return p&&(i.value=null,l.length=m),l}},73051:function(z){var B=Object.prototype.toString,e=B.call(function(){return arguments}());z.exports=function(d){return B.call(d)===e}},33717:function(z){var B=Object.prototype.toString,e=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);z.exports=function(d){return typeof d=="function"&&e(B.call(d))}},52345:function(z){z.exports=function(){}},9953:function(z,B,e){z.exports=e(90436)()?Math.sign:e(6069)},90436:function(z){z.exports=function(){var B=Math.sign;return typeof B!="function"?!1:B(10)===1&&B(-20)===-1}},6069:function(z){z.exports=function(B){return B=Number(B),isNaN(B)||B===0?B:B>0?1:-1}},56247:function(z,B,e){var d=e(9953),P=Math.abs,a=Math.floor;z.exports=function(_){return isNaN(_)?0:(_=Number(_),_===0||!isFinite(_)?_:d(_)*a(P(_)))}},35976:function(z,B,e){var d=e(56247),P=Math.max;z.exports=function(a){return P(0,d(a))}},67260:function(z,B,e){var d=e(78513),P=e(36672),a=Function.prototype.bind,_=Function.prototype.call,x=Object.keys,v=Object.prototype.propertyIsEnumerable;z.exports=function(y,r){return function(n,u){var i,f=arguments[2],g=arguments[3];return n=Object(P(n)),d(u),i=x(n),g&&i.sort(typeof g=="function"?a.call(g,n):void 0),typeof y!="function"&&(y=i[y]),_.call(y,i,function(h,b){return v.call(n,h)?_.call(u,f,n[h],h,n,b):r})}}},95879:function(z,B,e){z.exports=e(73583)()?Object.assign:e(34205)},73583:function(z){z.exports=function(){var B=Object.assign,e;return typeof B!="function"?!1:(e={foo:"raz"},B(e,{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},34205:function(z,B,e){var d=e(68700),P=e(36672),a=Math.max;z.exports=function(_,x){var v,y,r=a(arguments.length,2),n;for(_=Object(P(_)),n=function(u){try{_[u]=x[u]}catch(i){v||(v=i)}},y=1;y<r;++y)x=arguments[y],d(x).forEach(n);if(v!==void 0)throw v;return _}},19012:function(z,B,e){var d=e(4892),P=e(95879),a=e(36672);z.exports=function(_){var x=Object(a(_)),v=arguments[1],y=Object(arguments[2]);if(x!==_&&!v)return x;var r={};return v?d(v,function(n){(y.ensure||n in _)&&(r[n]=_[n])}):P(r,_),r}},52818:function(z,B,e){var d=Object.create,P;e(33247)()||(P=e(51882)),z.exports=function(){var a,_,x;return!P||P.level!==1?d:(a={},_={},x={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(v){if(v==="__proto__"){_[v]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}_[v]=x}),Object.defineProperties(a,_),Object.defineProperty(P,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:a}),function(v,y){return d(v===null?a:v,y)})}()},96437:function(z,B,e){z.exports=e(67260)("forEach")},99611:function(z,B,e){var d=e(95296),P={function:!0,object:!0};z.exports=function(a){return d(a)&&P[typeof a]||!1}},95296:function(z,B,e){var d=e(52345)();z.exports=function(P){return P!==d&&P!==null}},68700:function(z,B,e){z.exports=e(13895)()?Object.keys:e(25217)},13895:function(z){z.exports=function(){try{return Object.keys("primitive"),!0}catch{return!1}}},25217:function(z,B,e){var d=e(95296),P=Object.keys;z.exports=function(a){return P(d(a)?Object(a):a)}},16906:function(z,B,e){var d=e(78513),P=e(96437),a=Function.prototype.call;z.exports=function(_,x){var v={},y=arguments[2];return d(x),P(_,function(r,n,u,i){v[n]=a.call(x,y,r,n,u,i)}),v}},21780:function(z,B,e){var d=e(95296),P=Array.prototype.forEach,a=Object.create,_=function(x,v){var y;for(y in x)v[y]=x[y]};z.exports=function(x){var v=a(null);return P.call(arguments,function(y){d(y)&&_(Object(y),v)}),v}},1496:function(z,B,e){z.exports=e(33247)()?Object.setPrototypeOf:e(51882)},33247:function(z){var B=Object.create,e=Object.getPrototypeOf,d={};z.exports=function(){var P=Object.setPrototypeOf,a=arguments[0]||B;return typeof P!="function"?!1:e(P(a(null),d))===d}},51882:function(z,B,e){var d=e(99611),P=e(36672),a=Object.prototype.isPrototypeOf,_=Object.defineProperty,x={configurable:!0,enumerable:!1,writable:!0,value:void 0},v;v=function(y,r){if(P(y),r===null||d(r))return y;throw new TypeError("Prototype must be null or an object")},z.exports=function(y){var r,n;return y?(y.level===2?y.set?(n=y.set,r=function(u,i){return n.call(v(u,i),i),u}):r=function(u,i){return v(u,i).__proto__=i,u}:r=function u(i,f){var g;return v(i,f),g=a.call(u.nullPolyfill,i),g&&delete u.nullPolyfill.__proto__,f===null&&(f=u.nullPolyfill),i.__proto__=f,g&&_(u.nullPolyfill,"__proto__",x),i},Object.defineProperty(r,"level",{configurable:!1,enumerable:!1,writable:!1,value:y.level})):null}(function(){var y=Object.create(null),r={},n,u=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(u){try{n=u.set,n.call(y,r)}catch{}if(Object.getPrototypeOf(y)===r)return{set:n,level:2}}return y.__proto__=r,Object.getPrototypeOf(y)===r?{level:2}:(y={},y.__proto__=r,Object.getPrototypeOf(y)===r?{level:1}:!1)}()),e(52818)},78513:function(z){z.exports=function(B){if(typeof B!="function")throw new TypeError(B+" is not a function");return B}},98976:function(z,B,e){var d=e(99611);z.exports=function(P){if(!d(P))throw new TypeError(P+" is not an Object");return P}},36672:function(z,B,e){var d=e(95296);z.exports=function(P){if(!d(P))throw new TypeError("Cannot use null or undefined");return P}},66741:function(z,B,e){z.exports=e(17557)()?String.prototype.contains:e(60381)},17557:function(z){var B="razdwatrzy";z.exports=function(){return typeof B.contains!="function"?!1:B.contains("dwa")===!0&&B.contains("foo")===!1}},60381:function(z){var B=String.prototype.indexOf;z.exports=function(e){return B.call(this,e,arguments[1])>-1}},87963:function(z){var B=Object.prototype.toString,e=B.call("");z.exports=function(d){return typeof d=="string"||d&&typeof d=="object"&&(d instanceof String||B.call(d)===e)||!1}},43043:function(z){var B=Object.create(null),e=Math.random;z.exports=function(){var d;do d=e().toString(36).slice(2);while(B[d]);return d}},32411:function(z,B,e){var d=e(1496),P=e(66741),a=e(62072),_=e(8260),x=e(95426),v=Object.defineProperty,y;y=z.exports=function(r,n){if(!(this instanceof y))throw new TypeError("Constructor requires 'new'");x.call(this,r),n?P.call(n,"key+value")?n="key+value":P.call(n,"key")?n="key":n="value":n="value",v(this,"__kind__",a("",n))},d&&d(y,x),delete y.prototype.constructor,y.prototype=Object.create(x.prototype,{_resolve:a(function(r){return this.__kind__==="value"?this.__list__[r]:this.__kind__==="key+value"?[r,this.__list__[r]]:r})}),v(y.prototype,_.toStringTag,a("c","Array Iterator"))},27515:function(z,B,e){var d=e(73051),P=e(78513),a=e(87963),_=e(66661),x=Array.isArray,v=Function.prototype.call,y=Array.prototype.some;z.exports=function(r,n){var u,i=arguments[2],f,g,h,b,p,E,c;if(x(r)||d(r)?u="array":a(r)?u="string":r=_(r),P(n),g=function(){h=!0},u==="array"){y.call(r,function(l){return v.call(n,i,l,g),h});return}if(u==="string"){for(p=r.length,b=0;b<p&&(E=r[b],b+1<p&&(c=E.charCodeAt(0),c>=55296&&c<=56319&&(E+=r[++b])),v.call(n,i,E,g),!h);++b);return}for(f=r.next();!f.done;){if(v.call(n,i,f.value,g),h)return;f=r.next()}}},66661:function(z,B,e){var d=e(73051),P=e(87963),a=e(32411),_=e(259),x=e(58095),v=e(8260).iterator;z.exports=function(y){return typeof x(y)[v]=="function"?y[v]():d(y)?new a(y):P(y)?new _(y):new a(y)}},95426:function(z,B,e){var d=e(16134),P=e(95879),a=e(78513),_=e(36672),x=e(62072),v=e(55174),y=e(8260),r=Object.defineProperty,n=Object.defineProperties,u;z.exports=u=function(i,f){if(!(this instanceof u))throw new TypeError("Constructor requires 'new'");n(this,{__list__:x("w",_(i)),__context__:x("w",f),__nextIndex__:x("w",0)}),f&&(a(f.on),f.on("_add",this._onAdd),f.on("_delete",this._onDelete),f.on("_clear",this._onClear))},delete u.prototype.constructor,n(u.prototype,P({_next:x(function(){var i;if(this.__list__){if(this.__redo__&&(i=this.__redo__.shift(),i!==void 0))return i;if(this.__nextIndex__<this.__list__.length)return this.__nextIndex__++;this._unBind()}}),next:x(function(){return this._createResult(this._next())}),_createResult:x(function(i){return i===void 0?{done:!0,value:void 0}:{done:!1,value:this._resolve(i)}}),_resolve:x(function(i){return this.__list__[i]}),_unBind:x(function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off("_add",this._onAdd),this.__context__.off("_delete",this._onDelete),this.__context__.off("_clear",this._onClear),this.__context__=null)}),toString:x(function(){return"[object "+(this[y.toStringTag]||"Object")+"]"})},v({_onAdd:x(function(i){if(!(i>=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){r(this,"__redo__",x("c",[i]));return}this.__redo__.forEach(function(f,g){f>=i&&(this.__redo__[g]=++f)},this),this.__redo__.push(i)}}),_onDelete:x(function(i){var f;i>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(f=this.__redo__.indexOf(i),f!==-1&&this.__redo__.splice(f,1),this.__redo__.forEach(function(g,h){g>i&&(this.__redo__[h]=--g)},this)))}),_onClear:x(function(){this.__redo__&&d.call(this.__redo__),this.__nextIndex__=0})}))),r(u.prototype,y.iterator,x(function(){return this}))},35940:function(z,B,e){var d=e(73051),P=e(95296),a=e(87963),_=e(8260).iterator,x=Array.isArray;z.exports=function(v){return P(v)?x(v)||a(v)||d(v)?!0:typeof v[_]=="function":!1}},259:function(z,B,e){var d=e(1496),P=e(62072),a=e(8260),_=e(95426),x=Object.defineProperty,v;v=z.exports=function(y){if(!(this instanceof v))throw new TypeError("Constructor requires 'new'");y=String(y),_.call(this,y),x(this,"__length__",P("",y.length))},d&&d(v,_),delete v.prototype.constructor,v.prototype=Object.create(_.prototype,{_next:P(function(){if(this.__list__){if(this.__nextIndex__<this.__length__)return this.__nextIndex__++;this._unBind()}}),_resolve:P(function(y){var r=this.__list__[y],n;return this.__nextIndex__===this.__length__?r:(n=r.charCodeAt(0),n>=55296&&n<=56319?r+this.__list__[this.__nextIndex__++]:r)})}),x(v.prototype,a.toStringTag,P("c","String Iterator"))},58095:function(z,B,e){var d=e(35940);z.exports=function(P){if(!d(P))throw new TypeError(P+" is not iterable");return P}},73523:function(z){function B(d,P){if(d==null)throw new TypeError("Cannot convert first argument to object");for(var a=Object(d),_=1;_<arguments.length;_++){var x=arguments[_];if(x!=null)for(var v=Object.keys(Object(x)),y=0,r=v.length;y<r;y++){var n=v[y],u=Object.getOwnPropertyDescriptor(x,n);u!==void 0&&u.enumerable&&(a[n]=x[n])}}return a}function e(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:B})}z.exports={assign:B,polyfill:e}},8260:function(z,B,e){z.exports=e(69711)()?e(94908).Symbol:e(18415)},69711:function(z,B,e){var d=e(94908),P={object:!0,symbol:!0};z.exports=function(){var a=d.Symbol,_;if(typeof a!="function")return!1;_=a("test symbol");try{String(_)}catch{return!1}return!(!P[typeof a.iterator]||!P[typeof a.toPrimitive]||!P[typeof a.toStringTag])}},82276:function(z){z.exports=function(B){return B?typeof B=="symbol"?!0:!B.constructor||B.constructor.name!=="Symbol"?!1:B[B.constructor.toStringTag]==="Symbol":!1}},29366:function(z,B,e){var d=e(62072),P=Object.create,a=Object.defineProperty,_=Object.prototype,x=P(null);z.exports=function(v){for(var y=0,r,n;x[v+(y||"")];)++y;return v+=y||"",x[v]=!0,r="@@"+v,a(_,r,d.gs(null,function(u){n||(n=!0,a(this,r,d(u)),n=!1)})),r}},92842:function(z,B,e){var d=e(62072),P=e(94908).Symbol;z.exports=function(a){return Object.defineProperties(a,{hasInstance:d("",P&&P.hasInstance||a("hasInstance")),isConcatSpreadable:d("",P&&P.isConcatSpreadable||a("isConcatSpreadable")),iterator:d("",P&&P.iterator||a("iterator")),match:d("",P&&P.match||a("match")),replace:d("",P&&P.replace||a("replace")),search:d("",P&&P.search||a("search")),species:d("",P&&P.species||a("species")),split:d("",P&&P.split||a("split")),toPrimitive:d("",P&&P.toPrimitive||a("toPrimitive")),toStringTag:d("",P&&P.toStringTag||a("toStringTag")),unscopables:d("",P&&P.unscopables||a("unscopables"))})}},13304:function(z,B,e){var d=e(62072),P=e(53308),a=Object.create(null);z.exports=function(_){return Object.defineProperties(_,{for:d(function(x){return a[x]?a[x]:a[x]=_(String(x))}),keyFor:d(function(x){var v;P(x);for(v in a)if(a[v]===x)return v})})}},18415:function(z,B,e){var d=e(62072),P=e(53308),a=e(94908).Symbol,_=e(29366),x=e(92842),v=e(13304),y=Object.create,r=Object.defineProperties,n=Object.defineProperty,u,i,f;if(typeof a=="function")try{String(a()),f=!0}catch{}else a=null;i=function(h){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return u(h)},z.exports=u=function g(h){var b;if(this instanceof g)throw new TypeError("Symbol is not a constructor");return f?a(h):(b=y(i.prototype),h=h===void 0?"":String(h),r(b,{__description__:d("",h),__name__:d("",_(h))}))},x(u),v(u),r(i.prototype,{constructor:d(u),toString:d("",function(){return this.__name__})}),r(u.prototype,{toString:d(function(){return"Symbol ("+P(this).__description__+")"}),valueOf:d(function(){return P(this)})}),n(u.prototype,u.toPrimitive,d("",function(){var g=P(this);return typeof g=="symbol"?g:g.toString()})),n(u.prototype,u.toStringTag,d("c","Symbol")),n(i.prototype,u.toStringTag,d("c",u.prototype[u.toStringTag])),n(i.prototype,u.toPrimitive,d("c",u.prototype[u.toPrimitive]))},53308:function(z,B,e){var d=e(82276);z.exports=function(P){if(!d(P))throw new TypeError(P+" is not a symbol");return P}},83522:function(z,B,e){z.exports=e(96402)()?WeakMap:e(329)},96402:function(z){z.exports=function(){var B,e;if(typeof WeakMap!="function")return!1;try{B=new WeakMap([[e={},"one"],[{},"two"],[{},"three"]])}catch{return!1}return!(String(B)!=="[object WeakMap]"||typeof B.set!="function"||B.set({},1)!==B||typeof B.delete!="function"||typeof B.has!="function"||B.get(e)!=="one")}},96416:function(z){z.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()},329:function(z,B,e){var d=e(95296),P=e(1496),a=e(98976),_=e(36672),x=e(43043),v=e(62072),y=e(66661),r=e(27515),n=e(8260).toStringTag,u=e(96416),i=Array.isArray,f=Object.defineProperty,g=Object.prototype.hasOwnProperty,h=Object.getPrototypeOf,b;z.exports=b=function(){var p=arguments[0],E;if(!(this instanceof b))throw new TypeError("Constructor requires 'new'");return E=u&&P&&WeakMap!==b?P(new WeakMap,h(this)):this,d(p)&&(i(p)||(p=y(p))),f(E,"__weakMapData__",v("c","$weakMap$"+x())),p&&r(p,function(c){_(c),E.set(c[0],c[1])}),E},u&&(P&&P(b,WeakMap),b.prototype=Object.create(WeakMap.prototype,{constructor:v(b)})),Object.defineProperties(b.prototype,{delete:v(function(p){return g.call(a(p),this.__weakMapData__)?(delete p[this.__weakMapData__],!0):!1}),get:v(function(p){if(g.call(a(p),this.__weakMapData__))return p[this.__weakMapData__]}),has:v(function(p){return g.call(a(p),this.__weakMapData__)}),set:v(function(p,E){return f(a(p),this.__weakMapData__,v("c",E)),this}),toString:v(function(){return"[object WeakMap]"})}),f(b.prototype,n,v("c","WeakMap"))},15398:function(z){var B=typeof Reflect=="object"?Reflect:null,e=B&&typeof B.apply=="function"?B.apply:function(m,M,L){return Function.prototype.apply.call(m,M,L)},d;B&&typeof B.ownKeys=="function"?d=B.ownKeys:Object.getOwnPropertySymbols?d=function(m){return Object.getOwnPropertyNames(m).concat(Object.getOwnPropertySymbols(m))}:d=function(m){return Object.getOwnPropertyNames(m)};function P(l){console&&console.warn&&console.warn(l)}var a=Number.isNaN||function(m){return m!==m};function _(){_.init.call(this)}z.exports=_,z.exports.once=p,_.EventEmitter=_,_.prototype._events=void 0,_.prototype._eventsCount=0,_.prototype._maxListeners=void 0;var x=10;function v(l){if(typeof l!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof l)}Object.defineProperty(_,"defaultMaxListeners",{enumerable:!0,get:function(){return x},set:function(l){if(typeof l!="number"||l<0||a(l))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+l+".");x=l}}),_.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},_.prototype.setMaxListeners=function(m){if(typeof m!="number"||m<0||a(m))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+m+".");return this._maxListeners=m,this};function y(l){return l._maxListeners===void 0?_.defaultMaxListeners:l._maxListeners}_.prototype.getMaxListeners=function(){return y(this)},_.prototype.emit=function(m){for(var M=[],L=1;L<arguments.length;L++)M.push(arguments[L]);var D=m==="error",A=this._events;if(A!==void 0)D=D&&A.error===void 0;else if(!D)return!1;if(D){var C;if(M.length>0&&(C=M[0]),C instanceof Error)throw C;var S=new Error("Unhandled error."+(C?" ("+C.message+")":""));throw S.context=C,S}var o=A[m];if(o===void 0)return!1;if(typeof o=="function")e(o,this,M);else for(var R=o.length,T=g(o,R),L=0;L<R;++L)e(T[L],this,M);return!0};function r(l,m,M,L){var D,A,C;if(v(M),A=l._events,A===void 0?(A=l._events=Object.create(null),l._eventsCount=0):(A.newListener!==void 0&&(l.emit("newListener",m,M.listener?M.listener:M),A=l._events),C=A[m]),C===void 0)C=A[m]=M,++l._eventsCount;else if(typeof C=="function"?C=A[m]=L?[M,C]:[C,M]:L?C.unshift(M):C.push(M),D=y(l),D>0&&C.length>D&&!C.warned){C.warned=!0;var S=new Error("Possible EventEmitter memory leak detected. "+C.length+" "+String(m)+" listeners added. Use emitter.setMaxListeners() to increase limit");S.name="MaxListenersExceededWarning",S.emitter=l,S.type=m,S.count=C.length,P(S)}return l}_.prototype.addListener=function(m,M){return r(this,m,M,!1)},_.prototype.on=_.prototype.addListener,_.prototype.prependListener=function(m,M){return r(this,m,M,!0)};function n(){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 u(l,m,M){var L={fired:!1,wrapFn:void 0,target:l,type:m,listener:M},D=n.bind(L);return D.listener=M,L.wrapFn=D,D}_.prototype.once=function(m,M){return v(M),this.on(m,u(this,m,M)),this},_.prototype.prependOnceListener=function(m,M){return v(M),this.prependListener(m,u(this,m,M)),this},_.prototype.removeListener=function(m,M){var L,D,A,C,S;if(v(M),D=this._events,D===void 0)return this;if(L=D[m],L===void 0)return this;if(L===M||L.listener===M)--this._eventsCount===0?this._events=Object.create(null):(delete D[m],D.removeListener&&this.emit("removeListener",m,L.listener||M));else if(typeof L!="function"){for(A=-1,C=L.length-1;C>=0;C--)if(L[C]===M||L[C].listener===M){S=L[C].listener,A=C;break}if(A<0)return this;A===0?L.shift():h(L,A),L.length===1&&(D[m]=L[0]),D.removeListener!==void 0&&this.emit("removeListener",m,S||M)}return this},_.prototype.off=_.prototype.removeListener,_.prototype.removeAllListeners=function(m){var M,L,D;if(L=this._events,L===void 0)return this;if(L.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):L[m]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete L[m]),this;if(arguments.length===0){var A=Object.keys(L),C;for(D=0;D<A.length;++D)C=A[D],C!=="removeListener"&&this.removeAllListeners(C);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(M=L[m],typeof M=="function")this.removeListener(m,M);else if(M!==void 0)for(D=M.length-1;D>=0;D--)this.removeListener(m,M[D]);return this};function i(l,m,M){var L=l._events;if(L===void 0)return[];var D=L[m];return D===void 0?[]:typeof D=="function"?M?[D.listener||D]:[D]:M?b(D):g(D,D.length)}_.prototype.listeners=function(m){return i(this,m,!0)},_.prototype.rawListeners=function(m){return i(this,m,!1)},_.listenerCount=function(l,m){return typeof l.listenerCount=="function"?l.listenerCount(m):f.call(l,m)},_.prototype.listenerCount=f;function f(l){var m=this._events;if(m!==void 0){var M=m[l];if(typeof M=="function")return 1;if(M!==void 0)return M.length}return 0}_.prototype.eventNames=function(){return this._eventsCount>0?d(this._events):[]};function g(l,m){for(var M=new Array(m),L=0;L<m;++L)M[L]=l[L];return M}function h(l,m){for(;m+1<l.length;m++)l[m]=l[m+1];l.pop()}function b(l){for(var m=new Array(l.length),M=0;M<m.length;++M)m[M]=l[M].listener||l[M];return m}function p(l,m){return new Promise(function(M,L){function D(C){l.removeListener(m,A),L(C)}function A(){typeof l.removeListener=="function"&&l.removeListener("error",D),M([].slice.call(arguments))}c(l,m,A,{once:!0}),m!=="error"&&E(l,D,{once:!0})})}function E(l,m,M){typeof l.on=="function"&&c(l,"error",m,M)}function c(l,m,M,L){if(typeof l.on=="function")L.once?l.once(m,M):l.on(m,M);else if(typeof l.addEventListener=="function")l.addEventListener(m,function D(A){L.once&&l.removeEventListener(m,D),M(A)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof l)}},60774:function(z){var B=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};z.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return B()}try{return __global__||B()}finally{delete Object.prototype.__global__}}()},94908:function(z,B,e){z.exports=e(51152)()?globalThis:e(60774)},51152:function(z){z.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}},92770:function(z,B,e){var d=e(18546);z.exports=function(P){var a=typeof P;if(a==="string"){var _=P;if(P=+P,P===0&&d(_))return!1}else if(a!=="number")return!1;return P-P<1}},30120:function(z,B,e){var d=e(90660);z.exports=P;function P(a,_,x){if(!a)throw new TypeError("must specify data as first parameter");if(x=+(x||0)|0,Array.isArray(a)&&a[0]&&typeof a[0][0]=="number"){var v=a[0].length,y=a.length*v,r,n,u,i;(!_||typeof _=="string")&&(_=new(d(_||"float32"))(y+x));var f=_.length-x;if(y!==f)throw new Error("source length "+y+" ("+v+"x"+a.length+") does not match destination length "+f);for(r=0,u=x;r<a.length;r++)for(n=0;n<v;n++)_[u++]=a[r][n]===null?NaN:a[r][n]}else if(!_||typeof _=="string"){var g=d(_||"float32");if(Array.isArray(a)||_==="array")for(_=new g(a.length+x),r=0,u=x,i=_.length;u<i;u++,r++)_[u]=a[r]===null?NaN:a[r];else x===0?_=new g(a):(_=new g(a.length+x),_.set(a,x))}else _.set(a,x);return _}},68016:function(z,B,e){var d=e(53313),P=[32,126];z.exports=a;function a(_){_=_||{};var x=_.shape?_.shape:_.canvas?[_.canvas.width,_.canvas.height]:[512,512],v=_.canvas||document.createElement("canvas"),y=_.font,r=typeof _.step=="number"?[_.step,_.step]:_.step||[32,32],n=_.chars||P;if(y&&typeof y!="string"&&(y=d(y)),!Array.isArray(n))n=String(n).split("");else if(n.length===2&&typeof n[0]=="number"&&typeof n[1]=="number"){for(var u=[],i=n[0],f=0;i<=n[1];i++)u[f++]=String.fromCharCode(i);n=u}x=x.slice(),v.width=x[0],v.height=x[1];var g=v.getContext("2d");g.fillStyle="#000",g.fillRect(0,0,v.width,v.height),g.font=y,g.textAlign="center",g.textBaseline="middle",g.fillStyle="#fff";for(var h=r[0]/2,b=r[1]/2,i=0;i<n.length;i++)g.fillText(n[i],h,b),(h+=r[0])>x[0]-r[0]/2&&(h=r[0]/2,b+=r[1]);return v}},32879:function(z){z.exports=B,B.canvas=document.createElement("canvas"),B.cache={};function B(n,_){_||(_={}),(typeof n=="string"||Array.isArray(n))&&(_.family=n);var x=Array.isArray(_.family)?_.family.join(", "):_.family;if(!x)throw Error("`family` must be defined");var v=_.size||_.fontSize||_.em||48,y=_.weight||_.fontWeight||"",r=_.style||_.fontStyle||"",n=[r,y,v].join(" ")+"px "+x,u=_.origin||"top";if(B.cache[x]&&v<=B.cache[x].em)return e(B.cache[x],u);var i=_.canvas||B.canvas,f=i.getContext("2d"),g={upper:_.upper!==void 0?_.upper:"H",lower:_.lower!==void 0?_.lower:"x",descent:_.descent!==void 0?_.descent:"p",ascent:_.ascent!==void 0?_.ascent:"h",tittle:_.tittle!==void 0?_.tittle:"i",overshoot:_.overshoot!==void 0?_.overshoot:"O"},h=Math.ceil(v*1.5);i.height=h,i.width=h*.5,f.font=n;var b="H",p={top:0};f.clearRect(0,0,h,h),f.textBaseline="top",f.fillStyle="black",f.fillText(b,0,0);var E=d(f.getImageData(0,0,h,h));f.clearRect(0,0,h,h),f.textBaseline="bottom",f.fillText(b,0,h);var c=d(f.getImageData(0,0,h,h));p.lineHeight=p.bottom=h-c+E,f.clearRect(0,0,h,h),f.textBaseline="alphabetic",f.fillText(b,0,h);var l=d(f.getImageData(0,0,h,h)),m=h-l-1+E;p.baseline=p.alphabetic=m,f.clearRect(0,0,h,h),f.textBaseline="middle",f.fillText(b,0,h*.5);var M=d(f.getImageData(0,0,h,h));p.median=p.middle=h-M-1+E-h*.5,f.clearRect(0,0,h,h),f.textBaseline="hanging",f.fillText(b,0,h*.5);var L=d(f.getImageData(0,0,h,h));p.hanging=h-L-1+E-h*.5,f.clearRect(0,0,h,h),f.textBaseline="ideographic",f.fillText(b,0,h);var D=d(f.getImageData(0,0,h,h));if(p.ideographic=h-D-1+E,g.upper&&(f.clearRect(0,0,h,h),f.textBaseline="top",f.fillText(g.upper,0,0),p.upper=d(f.getImageData(0,0,h,h)),p.capHeight=p.baseline-p.upper),g.lower&&(f.clearRect(0,0,h,h),f.textBaseline="top",f.fillText(g.lower,0,0),p.lower=d(f.getImageData(0,0,h,h)),p.xHeight=p.baseline-p.lower),g.tittle&&(f.clearRect(0,0,h,h),f.textBaseline="top",f.fillText(g.tittle,0,0),p.tittle=d(f.getImageData(0,0,h,h))),g.ascent&&(f.clearRect(0,0,h,h),f.textBaseline="top",f.fillText(g.ascent,0,0),p.ascent=d(f.getImageData(0,0,h,h))),g.descent&&(f.clearRect(0,0,h,h),f.textBaseline="top",f.fillText(g.descent,0,0),p.descent=P(f.getImageData(0,0,h,h))),g.overshoot){f.clearRect(0,0,h,h),f.textBaseline="top",f.fillText(g.overshoot,0,0);var A=P(f.getImageData(0,0,h,h));p.overshoot=A-m}for(var C in p)p[C]/=v;return p.em=v,B.cache[x]=p,e(p,u)}function e(a,_){var x={};typeof _=="string"&&(_=a[_]);for(var v in a)v!=="em"&&(x[v]=a[v]-_);return x}function d(a){for(var _=a.height,x=a.data,v=3;v<x.length;v+=4)if(x[v]!==0)return Math.floor((v-3)*.25/_)}function P(a){for(var _=a.height,x=a.data,v=x.length-1;v>0;v-=4)if(x[v]!==0)return Math.floor((v-3)*.25/_)}},86165:function(z){var B=Object.prototype.hasOwnProperty,e=Object.prototype.toString;z.exports=function(P,a,_){if(e.call(a)!=="[object Function]")throw new TypeError("iterator must be a function");var x=P.length;if(x===+x)for(var v=0;v<x;v++)a.call(_,P[v],v,P);else for(var y in P)B.call(P,y)&&a.call(_,P[y],y,P)}},73047:function(z){var B="Function.prototype.bind called on incompatible ",e=Array.prototype.slice,d=Object.prototype.toString,P="[object Function]";z.exports=function(_){var x=this;if(typeof x!="function"||d.call(x)!==P)throw new TypeError(B+x);for(var v=e.call(arguments,1),y,r=function(){if(this instanceof y){var g=x.apply(this,v.concat(e.call(arguments)));return Object(g)===g?g:this}else return x.apply(_,v.concat(e.call(arguments)))},n=Math.max(0,x.length-v.length),u=[],i=0;i<n;i++)u.push("$"+i);if(y=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")(r),x.prototype){var f=function(){};f.prototype=x.prototype,y.prototype=new f,f.prototype=null}return y}},77575:function(z,B,e){var d=e(73047);z.exports=Function.prototype.bind||d},86249:function(z){z.exports=B;function B(e,d){if(typeof e!="string")throw new TypeError("must specify type string");if(d=d||{},typeof document>"u"&&!d.canvas)return null;var P=d.canvas||document.createElement("canvas");typeof d.width=="number"&&(P.width=d.width),typeof d.height=="number"&&(P.height=d.height);var a=d,_;try{var x=[e];e.indexOf("webgl")===0&&x.push("experimental-"+e);for(var v=0;v<x.length;v++)if(_=P.getContext(x[v],a),_)return _}catch{_=null}return _||null}},68318:function(z,B,e){var d,P=SyntaxError,a=Function,_=TypeError,x=function(o){try{return Function('"use strict"; return ('+o+").constructor;")()}catch{}},v=Object.getOwnPropertyDescriptor;if(v)try{v({},"")}catch{v=null}var y=function(){throw new _},r=v?function(){try{return arguments.callee,y}catch{try{return v(arguments,"callee").get}catch{return y}}}():y,n=e(57877)(),u=Object.getPrototypeOf||function(o){return o.__proto__},i=x("async function* () {}"),f=i?i.prototype:d,g=f?f.prototype:d,h=typeof Uint8Array>"u"?d:u(Uint8Array),b={"%AggregateError%":typeof AggregateError>"u"?d:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?d:ArrayBuffer,"%ArrayIteratorPrototype%":n?u([][Symbol.iterator]()):d,"%AsyncFromSyncIteratorPrototype%":d,"%AsyncFunction%":x("async function () {}"),"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":i,"%AsyncIteratorPrototype%":g?u(g):d,"%Atomics%":typeof Atomics>"u"?d:Atomics,"%BigInt%":typeof BigInt>"u"?d:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?d:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?d:Float32Array,"%Float64Array%":typeof Float64Array>"u"?d:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?d:FinalizationRegistry,"%Function%":a,"%GeneratorFunction%":x("function* () {}"),"%Int8Array%":typeof Int8Array>"u"?d:Int8Array,"%Int16Array%":typeof Int16Array>"u"?d:Int16Array,"%Int32Array%":typeof Int32Array>"u"?d:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":n?u(u([][Symbol.iterator]())):d,"%JSON%":typeof JSON=="object"?JSON:d,"%Map%":typeof Map>"u"?d:Map,"%MapIteratorPrototype%":typeof Map>"u"||!n?d:u(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?d:Promise,"%Proxy%":typeof Proxy>"u"?d:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?d:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?d:Set,"%SetIteratorPrototype%":typeof Set>"u"||!n?d:u(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?d:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":n?u(""[Symbol.iterator]()):d,"%Symbol%":n?Symbol:d,"%SyntaxError%":P,"%ThrowTypeError%":r,"%TypedArray%":h,"%TypeError%":_,"%Uint8Array%":typeof Uint8Array>"u"?d:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?d:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?d:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?d:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?d:WeakMap,"%WeakRef%":typeof WeakRef>"u"?d:WeakRef,"%WeakSet%":typeof WeakSet>"u"?d:WeakSet},p={"%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"]},E=e(77575),c=e(35065),l=E.call(Function.call,Array.prototype.concat),m=E.call(Function.apply,Array.prototype.splice),M=E.call(Function.call,String.prototype.replace),L=E.call(Function.call,String.prototype.slice),D=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,A=/\\(\\)?/g,C=function(R){var T=L(R,0,1),O=L(R,-1);if(T==="%"&&O!=="%")throw new P("invalid intrinsic syntax, expected closing `%`");if(O==="%"&&T!=="%")throw new P("invalid intrinsic syntax, expected opening `%`");var N=[];return M(R,D,function(H,k,V,G){N[N.length]=V?M(G,A,"$1"):k||H}),N},S=function(R,T){var O=R,N;if(c(p,O)&&(N=p[O],O="%"+N[0]+"%"),c(b,O)){var H=b[O];if(typeof H>"u"&&!T)throw new _("intrinsic "+R+" exists, but is not available. Please file an issue!");return{alias:N,name:O,value:H}}throw new P("intrinsic "+R+" does not exist!")};z.exports=function(R,T){if(typeof R!="string"||R.length===0)throw new _("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof T!="boolean")throw new _('"allowMissing" argument must be a boolean');var O=C(R),N=O.length>0?O[0]:"",H=S("%"+N+"%",T),k=H.name,V=H.value,G=!1,U=H.alias;U&&(N=U[0],m(O,l([0,1],U)));for(var Y=1,ee=!0;Y<O.length;Y+=1){var re=O[Y],ie=L(re,0,1),se=L(re,-1);if((ie==='"'||ie==="'"||ie==="`"||se==='"'||se==="'"||se==="`")&&ie!==se)throw new P("property names with quotes must have matching quotes");if((re==="constructor"||!ee)&&(G=!0),N+="."+re,k="%"+N+"%",c(b,k))V=b[k];else if(V!=null){if(!(re in V)){if(!T)throw new _("base intrinsic for "+R+" exists, but the property is not available.");return}if(v&&Y+1>=O.length){var ce=v(V,re);ee=!!ce,ee&&"get"in ce&&!("originalValue"in ce.get)?V=ce.get:V=V[re]}else ee=c(V,re),V=V[re];ee&&!G&&(b[k]=V)}}return V}},85400:function(z){z.exports=B;function B(e,d){var P=d[0],a=d[1],_=d[2],x=d[3],v=d[4],y=d[5],r=d[6],n=d[7],u=d[8],i=d[9],f=d[10],g=d[11],h=d[12],b=d[13],p=d[14],E=d[15];return e[0]=y*(f*E-g*p)-i*(r*E-n*p)+b*(r*g-n*f),e[1]=-(a*(f*E-g*p)-i*(_*E-x*p)+b*(_*g-x*f)),e[2]=a*(r*E-n*p)-y*(_*E-x*p)+b*(_*n-x*r),e[3]=-(a*(r*g-n*f)-y*(_*g-x*f)+i*(_*n-x*r)),e[4]=-(v*(f*E-g*p)-u*(r*E-n*p)+h*(r*g-n*f)),e[5]=P*(f*E-g*p)-u*(_*E-x*p)+h*(_*g-x*f),e[6]=-(P*(r*E-n*p)-v*(_*E-x*p)+h*(_*n-x*r)),e[7]=P*(r*g-n*f)-v*(_*g-x*f)+u*(_*n-x*r),e[8]=v*(i*E-g*b)-u*(y*E-n*b)+h*(y*g-n*i),e[9]=-(P*(i*E-g*b)-u*(a*E-x*b)+h*(a*g-x*i)),e[10]=P*(y*E-n*b)-v*(a*E-x*b)+h*(a*n-x*y),e[11]=-(P*(y*g-n*i)-v*(a*g-x*i)+u*(a*n-x*y)),e[12]=-(v*(i*p-f*b)-u*(y*p-r*b)+h*(y*f-r*i)),e[13]=P*(i*p-f*b)-u*(a*p-_*b)+h*(a*f-_*i),e[14]=-(P*(y*p-r*b)-v*(a*p-_*b)+h*(a*r-_*y)),e[15]=P*(y*f-r*i)-v*(a*f-_*i)+u*(a*r-_*y),e}},42331:function(z){z.exports=B;function B(e){var d=new Float32Array(16);return d[0]=e[0],d[1]=e[1],d[2]=e[2],d[3]=e[3],d[4]=e[4],d[5]=e[5],d[6]=e[6],d[7]=e[7],d[8]=e[8],d[9]=e[9],d[10]=e[10],d[11]=e[11],d[12]=e[12],d[13]=e[13],d[14]=e[14],d[15]=e[15],d}},31042:function(z){z.exports=B;function B(e,d){return e[0]=d[0],e[1]=d[1],e[2]=d[2],e[3]=d[3],e[4]=d[4],e[5]=d[5],e[6]=d[6],e[7]=d[7],e[8]=d[8],e[9]=d[9],e[10]=d[10],e[11]=d[11],e[12]=d[12],e[13]=d[13],e[14]=d[14],e[15]=d[15],e}},11902:function(z){z.exports=B;function B(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},89887:function(z){z.exports=B;function B(e){var d=e[0],P=e[1],a=e[2],_=e[3],x=e[4],v=e[5],y=e[6],r=e[7],n=e[8],u=e[9],i=e[10],f=e[11],g=e[12],h=e[13],b=e[14],p=e[15],E=d*v-P*x,c=d*y-a*x,l=d*r-_*x,m=P*y-a*v,M=P*r-_*v,L=a*r-_*y,D=n*h-u*g,A=n*b-i*g,C=n*p-f*g,S=u*b-i*h,o=u*p-f*h,R=i*p-f*b;return E*R-c*o+l*S+m*C-M*A+L*D}},27812:function(z){z.exports=B;function B(e,d){var P=d[0],a=d[1],_=d[2],x=d[3],v=P+P,y=a+a,r=_+_,n=P*v,u=a*v,i=a*y,f=_*v,g=_*y,h=_*r,b=x*v,p=x*y,E=x*r;return e[0]=1-i-h,e[1]=u+E,e[2]=f-p,e[3]=0,e[4]=u-E,e[5]=1-n-h,e[6]=g+b,e[7]=0,e[8]=f+p,e[9]=g-b,e[10]=1-n-i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},34045:function(z){z.exports=B;function B(e,d,P){var a,_,x,v=P[0],y=P[1],r=P[2],n=Math.sqrt(v*v+y*y+r*r);return Math.abs(n)<1e-6?null:(n=1/n,v*=n,y*=n,r*=n,a=Math.sin(d),_=Math.cos(d),x=1-_,e[0]=v*v*x+_,e[1]=y*v*x+r*a,e[2]=r*v*x-y*a,e[3]=0,e[4]=v*y*x-r*a,e[5]=y*y*x+_,e[6]=r*y*x+v*a,e[7]=0,e[8]=v*r*x+y*a,e[9]=y*r*x-v*a,e[10]=r*r*x+_,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}},45973:function(z){z.exports=B;function B(e,d,P){var a=d[0],_=d[1],x=d[2],v=d[3],y=a+a,r=_+_,n=x+x,u=a*y,i=a*r,f=a*n,g=_*r,h=_*n,b=x*n,p=v*y,E=v*r,c=v*n;return e[0]=1-(g+b),e[1]=i+c,e[2]=f-E,e[3]=0,e[4]=i-c,e[5]=1-(u+b),e[6]=h+p,e[7]=0,e[8]=f+E,e[9]=h-p,e[10]=1-(u+g),e[11]=0,e[12]=P[0],e[13]=P[1],e[14]=P[2],e[15]=1,e}},81472:function(z){z.exports=B;function B(e,d){return e[0]=d[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=d[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=d[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},14669:function(z){z.exports=B;function B(e,d){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=d[0],e[13]=d[1],e[14]=d[2],e[15]=1,e}},75262:function(z){z.exports=B;function B(e,d){var P=Math.sin(d),a=Math.cos(d);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=P,e[7]=0,e[8]=0,e[9]=-P,e[10]=a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},331:function(z){z.exports=B;function B(e,d){var P=Math.sin(d),a=Math.cos(d);return e[0]=a,e[1]=0,e[2]=-P,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=P,e[9]=0,e[10]=a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},11049:function(z){z.exports=B;function B(e,d){var P=Math.sin(d),a=Math.cos(d);return e[0]=a,e[1]=P,e[2]=0,e[3]=0,e[4]=-P,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},75195:function(z){z.exports=B;function B(e,d,P,a,_,x,v){var y=1/(P-d),r=1/(_-a),n=1/(x-v);return e[0]=x*2*y,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=x*2*r,e[6]=0,e[7]=0,e[8]=(P+d)*y,e[9]=(_+a)*r,e[10]=(v+x)*n,e[11]=-1,e[12]=0,e[13]=0,e[14]=v*x*2*n,e[15]=0,e}},71551:function(z){z.exports=B;function B(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},79576:function(z,B,e){z.exports={create:e(11902),clone:e(42331),copy:e(31042),identity:e(71551),transpose:e(88654),invert:e(95874),adjoint:e(85400),determinant:e(89887),multiply:e(91362),translate:e(31283),scale:e(10789),rotate:e(65074),rotateX:e(35545),rotateY:e(94918),rotateZ:e(15692),fromRotation:e(34045),fromRotationTranslation:e(45973),fromScaling:e(81472),fromTranslation:e(14669),fromXRotation:e(75262),fromYRotation:e(331),fromZRotation:e(11049),fromQuat:e(27812),frustum:e(75195),perspective:e(7864),perspectiveFromFieldOfView:e(35279),ortho:e(60378),lookAt:e(65551),str:e(6726)}},95874:function(z){z.exports=B;function B(e,d){var P=d[0],a=d[1],_=d[2],x=d[3],v=d[4],y=d[5],r=d[6],n=d[7],u=d[8],i=d[9],f=d[10],g=d[11],h=d[12],b=d[13],p=d[14],E=d[15],c=P*y-a*v,l=P*r-_*v,m=P*n-x*v,M=a*r-_*y,L=a*n-x*y,D=_*n-x*r,A=u*b-i*h,C=u*p-f*h,S=u*E-g*h,o=i*p-f*b,R=i*E-g*b,T=f*E-g*p,O=c*T-l*R+m*o+M*S-L*C+D*A;return O?(O=1/O,e[0]=(y*T-r*R+n*o)*O,e[1]=(_*R-a*T-x*o)*O,e[2]=(b*D-p*L+E*M)*O,e[3]=(f*L-i*D-g*M)*O,e[4]=(r*S-v*T-n*C)*O,e[5]=(P*T-_*S+x*C)*O,e[6]=(p*m-h*D-E*l)*O,e[7]=(u*D-f*m+g*l)*O,e[8]=(v*R-y*S+n*A)*O,e[9]=(a*S-P*R-x*A)*O,e[10]=(h*L-b*m+E*c)*O,e[11]=(i*m-u*L-g*c)*O,e[12]=(y*C-v*o-r*A)*O,e[13]=(P*o-a*C+_*A)*O,e[14]=(b*l-h*M-p*c)*O,e[15]=(u*M-i*l+f*c)*O,e):null}},65551:function(z,B,e){var d=e(71551);z.exports=P;function P(a,_,x,v){var y,r,n,u,i,f,g,h,b,p,E=_[0],c=_[1],l=_[2],m=v[0],M=v[1],L=v[2],D=x[0],A=x[1],C=x[2];return Math.abs(E-D)<1e-6&&Math.abs(c-A)<1e-6&&Math.abs(l-C)<1e-6?d(a):(g=E-D,h=c-A,b=l-C,p=1/Math.sqrt(g*g+h*h+b*b),g*=p,h*=p,b*=p,y=M*b-L*h,r=L*g-m*b,n=m*h-M*g,p=Math.sqrt(y*y+r*r+n*n),p?(p=1/p,y*=p,r*=p,n*=p):(y=0,r=0,n=0),u=h*n-b*r,i=b*y-g*n,f=g*r-h*y,p=Math.sqrt(u*u+i*i+f*f),p?(p=1/p,u*=p,i*=p,f*=p):(u=0,i=0,f=0),a[0]=y,a[1]=u,a[2]=g,a[3]=0,a[4]=r,a[5]=i,a[6]=h,a[7]=0,a[8]=n,a[9]=f,a[10]=b,a[11]=0,a[12]=-(y*E+r*c+n*l),a[13]=-(u*E+i*c+f*l),a[14]=-(g*E+h*c+b*l),a[15]=1,a)}},91362:function(z){z.exports=B;function B(e,d,P){var a=d[0],_=d[1],x=d[2],v=d[3],y=d[4],r=d[5],n=d[6],u=d[7],i=d[8],f=d[9],g=d[10],h=d[11],b=d[12],p=d[13],E=d[14],c=d[15],l=P[0],m=P[1],M=P[2],L=P[3];return e[0]=l*a+m*y+M*i+L*b,e[1]=l*_+m*r+M*f+L*p,e[2]=l*x+m*n+M*g+L*E,e[3]=l*v+m*u+M*h+L*c,l=P[4],m=P[5],M=P[6],L=P[7],e[4]=l*a+m*y+M*i+L*b,e[5]=l*_+m*r+M*f+L*p,e[6]=l*x+m*n+M*g+L*E,e[7]=l*v+m*u+M*h+L*c,l=P[8],m=P[9],M=P[10],L=P[11],e[8]=l*a+m*y+M*i+L*b,e[9]=l*_+m*r+M*f+L*p,e[10]=l*x+m*n+M*g+L*E,e[11]=l*v+m*u+M*h+L*c,l=P[12],m=P[13],M=P[14],L=P[15],e[12]=l*a+m*y+M*i+L*b,e[13]=l*_+m*r+M*f+L*p,e[14]=l*x+m*n+M*g+L*E,e[15]=l*v+m*u+M*h+L*c,e}},60378:function(z){z.exports=B;function B(e,d,P,a,_,x,v){var y=1/(d-P),r=1/(a-_),n=1/(x-v);return e[0]=-2*y,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*r,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*n,e[11]=0,e[12]=(d+P)*y,e[13]=(_+a)*r,e[14]=(v+x)*n,e[15]=1,e}},7864:function(z){z.exports=B;function B(e,d,P,a,_){var x=1/Math.tan(d/2),v=1/(a-_);return e[0]=x/P,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=x,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(_+a)*v,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*_*a*v,e[15]=0,e}},35279:function(z){z.exports=B;function B(e,d,P,a){var _=Math.tan(d.upDegrees*Math.PI/180),x=Math.tan(d.downDegrees*Math.PI/180),v=Math.tan(d.leftDegrees*Math.PI/180),y=Math.tan(d.rightDegrees*Math.PI/180),r=2/(v+y),n=2/(_+x);return e[0]=r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=0,e[7]=0,e[8]=-((v-y)*r*.5),e[9]=(_-x)*n*.5,e[10]=a/(P-a),e[11]=-1,e[12]=0,e[13]=0,e[14]=a*P/(P-a),e[15]=0,e}},65074:function(z){z.exports=B;function B(e,d,P,a){var _=a[0],x=a[1],v=a[2],y=Math.sqrt(_*_+x*x+v*v),r,n,u,i,f,g,h,b,p,E,c,l,m,M,L,D,A,C,S,o,R,T,O,N;return Math.abs(y)<1e-6?null:(y=1/y,_*=y,x*=y,v*=y,r=Math.sin(P),n=Math.cos(P),u=1-n,i=d[0],f=d[1],g=d[2],h=d[3],b=d[4],p=d[5],E=d[6],c=d[7],l=d[8],m=d[9],M=d[10],L=d[11],D=_*_*u+n,A=x*_*u+v*r,C=v*_*u-x*r,S=_*x*u-v*r,o=x*x*u+n,R=v*x*u+_*r,T=_*v*u+x*r,O=x*v*u-_*r,N=v*v*u+n,e[0]=i*D+b*A+l*C,e[1]=f*D+p*A+m*C,e[2]=g*D+E*A+M*C,e[3]=h*D+c*A+L*C,e[4]=i*S+b*o+l*R,e[5]=f*S+p*o+m*R,e[6]=g*S+E*o+M*R,e[7]=h*S+c*o+L*R,e[8]=i*T+b*O+l*N,e[9]=f*T+p*O+m*N,e[10]=g*T+E*O+M*N,e[11]=h*T+c*O+L*N,d!==e&&(e[12]=d[12],e[13]=d[13],e[14]=d[14],e[15]=d[15]),e)}},35545:function(z){z.exports=B;function B(e,d,P){var a=Math.sin(P),_=Math.cos(P),x=d[4],v=d[5],y=d[6],r=d[7],n=d[8],u=d[9],i=d[10],f=d[11];return d!==e&&(e[0]=d[0],e[1]=d[1],e[2]=d[2],e[3]=d[3],e[12]=d[12],e[13]=d[13],e[14]=d[14],e[15]=d[15]),e[4]=x*_+n*a,e[5]=v*_+u*a,e[6]=y*_+i*a,e[7]=r*_+f*a,e[8]=n*_-x*a,e[9]=u*_-v*a,e[10]=i*_-y*a,e[11]=f*_-r*a,e}},94918:function(z){z.exports=B;function B(e,d,P){var a=Math.sin(P),_=Math.cos(P),x=d[0],v=d[1],y=d[2],r=d[3],n=d[8],u=d[9],i=d[10],f=d[11];return d!==e&&(e[4]=d[4],e[5]=d[5],e[6]=d[6],e[7]=d[7],e[12]=d[12],e[13]=d[13],e[14]=d[14],e[15]=d[15]),e[0]=x*_-n*a,e[1]=v*_-u*a,e[2]=y*_-i*a,e[3]=r*_-f*a,e[8]=x*a+n*_,e[9]=v*a+u*_,e[10]=y*a+i*_,e[11]=r*a+f*_,e}},15692:function(z){z.exports=B;function B(e,d,P){var a=Math.sin(P),_=Math.cos(P),x=d[0],v=d[1],y=d[2],r=d[3],n=d[4],u=d[5],i=d[6],f=d[7];return d!==e&&(e[8]=d[8],e[9]=d[9],e[10]=d[10],e[11]=d[11],e[12]=d[12],e[13]=d[13],e[14]=d[14],e[15]=d[15]),e[0]=x*_+n*a,e[1]=v*_+u*a,e[2]=y*_+i*a,e[3]=r*_+f*a,e[4]=n*_-x*a,e[5]=u*_-v*a,e[6]=i*_-y*a,e[7]=f*_-r*a,e}},10789:function(z){z.exports=B;function B(e,d,P){var a=P[0],_=P[1],x=P[2];return e[0]=d[0]*a,e[1]=d[1]*a,e[2]=d[2]*a,e[3]=d[3]*a,e[4]=d[4]*_,e[5]=d[5]*_,e[6]=d[6]*_,e[7]=d[7]*_,e[8]=d[8]*x,e[9]=d[9]*x,e[10]=d[10]*x,e[11]=d[11]*x,e[12]=d[12],e[13]=d[13],e[14]=d[14],e[15]=d[15],e}},6726:function(z){z.exports=B;function B(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}},31283:function(z){z.exports=B;function B(e,d,P){var a=P[0],_=P[1],x=P[2],v,y,r,n,u,i,f,g,h,b,p,E;return d===e?(e[12]=d[0]*a+d[4]*_+d[8]*x+d[12],e[13]=d[1]*a+d[5]*_+d[9]*x+d[13],e[14]=d[2]*a+d[6]*_+d[10]*x+d[14],e[15]=d[3]*a+d[7]*_+d[11]*x+d[15]):(v=d[0],y=d[1],r=d[2],n=d[3],u=d[4],i=d[5],f=d[6],g=d[7],h=d[8],b=d[9],p=d[10],E=d[11],e[0]=v,e[1]=y,e[2]=r,e[3]=n,e[4]=u,e[5]=i,e[6]=f,e[7]=g,e[8]=h,e[9]=b,e[10]=p,e[11]=E,e[12]=v*a+u*_+h*x+d[12],e[13]=y*a+i*_+b*x+d[13],e[14]=r*a+f*_+p*x+d[14],e[15]=n*a+g*_+E*x+d[15]),e}},88654:function(z){z.exports=B;function B(e,d){if(e===d){var P=d[1],a=d[2],_=d[3],x=d[6],v=d[7],y=d[11];e[1]=d[4],e[2]=d[8],e[3]=d[12],e[4]=P,e[6]=d[9],e[7]=d[13],e[8]=a,e[9]=x,e[11]=d[14],e[12]=_,e[13]=v,e[14]=y}else e[0]=d[0],e[1]=d[4],e[2]=d[8],e[3]=d[12],e[4]=d[1],e[5]=d[5],e[6]=d[9],e[7]=d[13],e[8]=d[2],e[9]=d[6],e[10]=d[10],e[11]=d[14],e[12]=d[3],e[13]=d[7],e[14]=d[11],e[15]=d[15];return e}},42505:function(z,B,e){var d=e(72791),P=e(71299),a=e(98580),_=e(12018),x=e(83522),v=e(25075),y=e(68016),r=e(58404),n=e(18863),u=e(10973),i=e(25677),f=e(75686),g=e(53545),h=e(56131),b=e(32879),p=e(30120),E=e(13547),c=E.nextPow2,l=new x,m=!1;if(document.body){var M=document.body.appendChild(document.createElement("div"));M.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(M).fontStretch&&(m=!0),document.body.removeChild(M)}var L=function(C){D(C)?(C={regl:C},this.gl=C.regl._gl):this.gl=_(C),this.shader=l.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=C.regl||a({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(),l.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(u(C)?C:{})};L.prototype.createShader=function(){var C=this.regl,S=C({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:C.prop("count"),offset:C.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:C.this("sizeBuffer")},width:{offset:0,stride:8,buffer:C.this("sizeBuffer")},char:C.this("charBuffer"),position:C.this("position")},uniforms:{atlasSize:function(R,T){return[T.atlas.width,T.atlas.height]},atlasDim:function(R,T){return[T.atlas.cols,T.atlas.rows]},atlas:function(R,T){return T.atlas.texture},charStep:function(R,T){return T.atlas.step},em:function(R,T){return T.atlas.em},color:C.prop("color"),opacity:C.prop("opacity"),viewport:C.this("viewportArray"),scale:C.this("scale"),align:C.prop("align"),baseline:C.prop("baseline"),translate:C.this("translate"),positionOffset:C.prop("positionOffset")},primitive:"points",viewport:C.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;
}`}),o={};return{regl:C,draw:S,atlas:o}},L.prototype.update=function(C){var S=this;if(typeof C=="string")C={text:C};else if(!C)return;C=P(C,{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),C.opacity!=null&&(Array.isArray(C.opacity)?this.opacity=C.opacity.map(function(Ne){return parseFloat(Ne)}):this.opacity=parseFloat(C.opacity)),C.viewport!=null&&(this.viewport=n(C.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]),C.kerning!=null&&(this.kerning=C.kerning),C.offset!=null&&(typeof C.offset=="number"&&(C.offset=[C.offset,0]),this.positionOffset=p(C.offset)),C.direction&&(this.direction=C.direction),C.range&&(this.range=C.range,this.scale=[1/(C.range[2]-C.range[0]),1/(C.range[3]-C.range[1])],this.translate=[-C.range[0],-C.range[1]]),C.scale&&(this.scale=C.scale),C.translate&&(this.translate=C.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!C.font&&(C.font=L.baseFontSize+"px sans-serif");var o=!1,R=!1;if(C.font&&(Array.isArray(C.font)?C.font:[C.font]).forEach(function(Ne,Xe){if(typeof Ne=="string")try{Ne=d.parse(Ne)}catch{Ne=d.parse(L.baseFontSize+"px "+Ne)}else Ne=d.parse(d.stringify(Ne));var ht=d.stringify({size:L.baseFontSize,family:Ne.family,stretch:m?Ne.stretch:void 0,variant:Ne.variant,weight:Ne.weight,style:Ne.style}),st=i(Ne.size),it=Math.round(st[0]*f(st[1]));if(it!==S.fontSize[Xe]&&(R=!0,S.fontSize[Xe]=it),(!S.font[Xe]||ht!=S.font[Xe].baseString)&&(o=!0,S.font[Xe]=L.fonts[ht],!S.font[Xe])){var nt=Ne.family.join(", "),pt=[Ne.style];Ne.style!=Ne.variant&&pt.push(Ne.variant),Ne.variant!=Ne.weight&&pt.push(Ne.weight),m&&Ne.weight!=Ne.stretch&&pt.push(Ne.stretch),S.font[Xe]={baseString:ht,family:nt,weight:Ne.weight,stretch:Ne.stretch,style:Ne.style,variant:Ne.variant,width:{},kerning:{},metrics:b(nt,{origin:"top",fontSize:L.baseFontSize,fontStyle:pt.join(" ")})},L.fonts[ht]=S.font[Xe]}}),(o||R)&&this.font.forEach(function(Ne,Xe){var ht=d.stringify({size:S.fontSize[Xe],family:Ne.family,stretch:m?Ne.stretch:void 0,variant:Ne.variant,weight:Ne.weight,style:Ne.style});if(S.fontAtlas[Xe]=S.shader.atlas[ht],!S.fontAtlas[Xe]){var st=Ne.metrics;S.shader.atlas[ht]=S.fontAtlas[Xe]={fontString:ht,step:Math.ceil(S.fontSize[Xe]*st.bottom*.5)*2,em:S.fontSize[Xe],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:S.regl.texture()}}C.text==null&&(C.text=S.text)}),typeof C.text=="string"&&C.position&&C.position.length>2){for(var T=Array(C.position.length*.5),O=0;O<T.length;O++)T[O]=C.text;C.text=T}var N;if(C.text!=null||o){if(this.textOffsets=[0],Array.isArray(C.text)){this.count=C.text[0].length,this.counts=[this.count];for(var H=1;H<C.text.length;H++)this.textOffsets[H]=this.textOffsets[H-1]+C.text[H-1].length,this.count+=C.text[H].length,this.counts.push(C.text[H].length);this.text=C.text.join("")}else this.text=C.text,this.count=this.text.length,this.counts=[this.count];N=[],this.font.forEach(function(Ne,Xe){L.atlasContext.font=Ne.baseString;for(var ht=S.fontAtlas[Xe],st=0;st<S.text.length;st++){var it=S.text.charAt(st);if(ht.ids[it]==null&&(ht.ids[it]=ht.chars.length,ht.chars.push(it),N.push(it)),Ne.width[it]==null&&(Ne.width[it]=L.atlasContext.measureText(it).width/L.baseFontSize,S.kerning)){var nt=[];for(var pt in Ne.width)nt.push(pt+it,it+pt);h(Ne.kerning,g(Ne.family,{pairs:nt}))}}})}if(C.position)if(C.position.length>2){for(var k=!C.position[0].length,V=r.mallocFloat(this.count*2),G=0,U=0;G<this.counts.length;G++){var Y=this.counts[G];if(k)for(var ee=0;ee<Y;ee++)V[U++]=C.position[G*2],V[U++]=C.position[G*2+1];else for(var re=0;re<Y;re++)V[U++]=C.position[G][0],V[U++]=C.position[G][1]}this.position.call?this.position({type:"float",data:V}):this.position=this.regl.buffer({type:"float",data:V}),r.freeFloat(V)}else this.position.destroy&&this.position.destroy(),this.position={constant:C.position};if(C.text||o){var ie=r.mallocUint8(this.count),se=r.mallocFloat(this.count*2);this.textWidth=[];for(var ce=0,q=0;ce<this.counts.length;ce++){for(var j=this.counts[ce],Z=this.font[ce]||this.font[0],Q=this.fontAtlas[ce]||this.fontAtlas[0],ue=0;ue<j;ue++){var fe=this.text.charAt(q),te=this.text.charAt(q-1);if(ie[q]=Q.ids[fe],se[q*2]=Z.width[fe],ue){var ne=se[q*2-2],ve=se[q*2],le=se[q*2-1],xe=le+ne*.5+ve*.5;if(this.kerning){var Se=Z.kerning[te+fe];Se&&(xe+=Se*.001)}se[q*2+1]=xe}else se[q*2+1]=se[q*2]*.5;q++}this.textWidth.push(se.length?se[q*2-2]*.5+se[q*2-1]:0)}C.align||(C.align=this.align),this.charBuffer({data:ie,type:"uint8",usage:"stream"}),this.sizeBuffer({data:se,type:"float",usage:"stream"}),r.freeUint8(ie),r.freeFloat(se),N.length&&this.font.forEach(function(Ne,Xe){var ht=S.fontAtlas[Xe],st=ht.step,it=Math.floor(L.maxAtlasSize/st),nt=Math.min(it,ht.chars.length),pt=Math.ceil(ht.chars.length/nt),Tt=c(nt*st),Et=c(pt*st);ht.width=Tt,ht.height=Et,ht.rows=pt,ht.cols=nt,ht.em&&ht.texture({data:y({canvas:L.atlasCanvas,font:ht.fontString,chars:ht.chars,shape:[Tt,Et],step:[st,st]})})})}if(C.align&&(this.align=C.align,this.alignOffset=this.textWidth.map(function(Ne,Xe){var ht=Array.isArray(S.align)?S.align.length>1?S.align[Xe]:S.align[0]:S.align;if(typeof ht=="number")return ht;switch(ht){case"right":case"end":return-Ne;case"center":case"centre":case"middle":return-Ne*.5}return 0})),this.baseline==null&&C.baseline==null&&(C.baseline=0),C.baseline!=null&&(this.baseline=C.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(Ne,Xe){var ht=(S.font[Xe]||S.font[0]).metrics,st=0;return st+=ht.bottom*.5,typeof Ne=="number"?st+=Ne-ht.baseline:st+=-ht[Ne],st*=-1,st})),C.color!=null)if(C.color||(C.color="transparent"),typeof C.color=="string"||!isNaN(C.color))this.color=v(C.color,"uint8");else{var Re;if(typeof C.color[0]=="number"&&C.color.length>this.counts.length){var Ee=C.color.length;Re=r.mallocUint8(Ee);for(var Oe=(C.color.subarray||C.color.slice).bind(C.color),Be=0;Be<Ee;Be+=4)Re.set(v(Oe(Be,Be+4),"uint8"),Be)}else{var Le=C.color.length;Re=r.mallocUint8(Le*4);for(var Te=0;Te<Le;Te++)Re.set(v(C.color[Te]||0,"uint8"),Te*4)}this.color=Re}if(C.position||C.text||C.color||C.baseline||C.align||C.font||C.offset||C.opacity){var De=this.color.length>4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(De){var Ve=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(Ve);for(var Ye=0;Ye<this.batch.length;Ye++)this.batch[Ye]={count:this.counts.length>1?this.counts[Ye]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Ye]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(Ye*4,Ye*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Ye]:this.opacity,baseline:this.baselineOffset[Ye]!=null?this.baselineOffset[Ye]:this.baselineOffset[0],align:this.align?this.alignOffset[Ye]!=null?this.alignOffset[Ye]:this.alignOffset[0]:0,atlas:this.fontAtlas[Ye]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(Ye*2,Ye*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=[]}},L.prototype.destroy=function(){},L.prototype.kerning=!0,L.prototype.position={constant:new Float32Array(2)},L.prototype.translate=null,L.prototype.scale=null,L.prototype.font=null,L.prototype.text="",L.prototype.positionOffset=[0,0],L.prototype.opacity=1,L.prototype.color=new Uint8Array([0,0,0,255]),L.prototype.alignOffset=[0,0],L.maxAtlasSize=1024,L.atlasCanvas=document.createElement("canvas"),L.atlasContext=L.atlasCanvas.getContext("2d",{alpha:!1}),L.baseFontSize=64,L.fonts={};function D(A){return typeof A=="function"&&A._gl&&A.prop&&A.texture&&A.buffer}z.exports=L},12018:function(z,B,e){var d=e(71299);z.exports=function(r){if(r?typeof r=="string"&&(r={container:r}):r={},a(r)?r={container:r}:_(r)?r={container:r}:x(r)?r={gl:r}:r=d(r,{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),r.pixelRatio||(r.pixelRatio=e.g.pixelRatio||1),r.gl)return r.gl;if(r.canvas&&(r.container=r.canvas.parentNode),r.container){if(typeof r.container=="string"){var n=document.querySelector(r.container);if(!n)throw Error("Element "+r.container+" is not found");r.container=n}a(r.container)?(r.canvas=r.container,r.container=r.canvas.parentNode):r.canvas||(r.canvas=v(),r.container.appendChild(r.canvas),P(r))}else if(!r.canvas)if(typeof document<"u")r.container=document.body||document.documentElement,r.canvas=v(),r.container.appendChild(r.canvas),P(r);else throw Error("Not DOM environment. Use headless-gl.");return r.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(u){try{r.gl=r.canvas.getContext(u,r.attrs)}catch{}return r.gl}),r.gl};function P(y){if(y.container)if(y.container==document.body)document.body.style.width||(y.canvas.width=y.width||y.pixelRatio*e.g.innerWidth),document.body.style.height||(y.canvas.height=y.height||y.pixelRatio*e.g.innerHeight);else{var r=y.container.getBoundingClientRect();y.canvas.width=y.width||r.right-r.left,y.canvas.height=y.height||r.bottom-r.top}}function a(y){return typeof y.getContext=="function"&&"width"in y&&"height"in y}function _(y){return typeof y.nodeName=="string"&&typeof y.appendChild=="function"&&typeof y.getBoundingClientRect=="function"}function x(y){return typeof y.drawArrays=="function"||typeof y.drawElements=="function"}function v(){var y=document.createElement("canvas");return y.style.position="absolute",y.style.top=0,y.style.left=0,y}},56068:function(z){z.exports=function(B){typeof B=="string"&&(B=[B]);for(var e=[].slice.call(arguments,1),d=[],P=0;P<B.length-1;P++)d.push(B[P],e[P]||"");return d.push(B[P]),d.join("")}},57035:function(z,B,e){var d=e(54404),P;typeof e.g.matchMedia=="function"?P=!e.g.matchMedia("(hover: none)").matches:P=d,z.exports=P},38520:function(z,B,e){var d=e(54404);function P(){var a=!1;try{var _=Object.defineProperty({},"passive",{get:function(){a=!0}});window.addEventListener("test",null,_),window.removeEventListener("test",null,_)}catch{a=!1}return a}z.exports=d&&P()},57877:function(z,B,e){var d=typeof Symbol<"u"&&Symbol,P=e(35638);z.exports=function(){return typeof d!="function"||typeof Symbol!="function"||typeof d("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:P()}},35638:function(z){z.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},d=Symbol("test"),P=Object(d);if(typeof d=="string"||Object.prototype.toString.call(d)!=="[object Symbol]"||Object.prototype.toString.call(P)!=="[object Symbol]")return!1;var a=42;e[d]=a;for(d in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var _=Object.getOwnPropertySymbols(e);if(_.length!==1||_[0]!==d||!Object.prototype.propertyIsEnumerable.call(e,d))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var x=Object.getOwnPropertyDescriptor(e,d);if(x.value!==a||x.enumerable!==!0)return!1}return!0}},84543:function(z,B,e){var d=e(35638);z.exports=function(){return d()&&!!Symbol.toStringTag}},35065:function(z,B,e){var d=e(77575);z.exports=d.call(Function.call,Object.prototype.hasOwnProperty)},95280:function(z,B){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */B.read=function(e,d,P,a,_){var x,v,y=_*8-a-1,r=(1<<y)-1,n=r>>1,u=-7,i=P?_-1:0,f=P?-1:1,g=e[d+i];for(i+=f,x=g&(1<<-u)-1,g>>=-u,u+=y;u>0;x=x*256+e[d+i],i+=f,u-=8);for(v=x&(1<<-u)-1,x>>=-u,u+=a;u>0;v=v*256+e[d+i],i+=f,u-=8);if(x===0)x=1-n;else{if(x===r)return v?NaN:(g?-1:1)*(1/0);v=v+Math.pow(2,a),x=x-n}return(g?-1:1)*v*Math.pow(2,x-a)},B.write=function(e,d,P,a,_,x){var v,y,r,n=x*8-_-1,u=(1<<n)-1,i=u>>1,f=_===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=a?0:x-1,h=a?1:-1,b=d<0||d===0&&1/d<0?1:0;for(d=Math.abs(d),isNaN(d)||d===1/0?(y=isNaN(d)?1:0,v=u):(v=Math.floor(Math.log(d)/Math.LN2),d*(r=Math.pow(2,-v))<1&&(v--,r*=2),v+i>=1?d+=f/r:d+=f*Math.pow(2,1-i),d*r>=2&&(v++,r/=2),v+i>=u?(y=0,v=u):v+i>=1?(y=(d*r-1)*Math.pow(2,_),v=v+i):(y=d*Math.pow(2,i-1)*Math.pow(2,_),v=0));_>=8;e[P+g]=y&255,g+=h,y/=256,_-=8);for(v=v<<_|y,n+=_;n>0;e[P+g]=v&255,g+=h,v/=256,n-=8);e[P+g-h]|=b*128}},42018:function(z){typeof Object.create=="function"?z.exports=function(e,d){d&&(e.super_=d,e.prototype=Object.create(d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:z.exports=function(e,d){if(d){e.super_=d;var P=function(){};P.prototype=d.prototype,e.prototype=new P,e.prototype.constructor=e}}},47216:function(z){var B=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",e=Object.prototype.toString,d=function(x){return B&&x&&typeof x=="object"&&Symbol.toStringTag in x?!1:e.call(x)==="[object Arguments]"},P=function(x){return d(x)?!0:x!==null&&typeof x=="object"&&typeof x.length=="number"&&x.length>=0&&e.call(x)!=="[object Array]"&&e.call(x.callee)==="[object Function]"},a=function(){return d(arguments)}();d.isLegacyArguments=P,z.exports=a?d:P},54404:function(z){z.exports=!0},65481:function(z,B,e){var d=Object.prototype.toString,P=Function.prototype.toString,a=/^\s*(?:function)?\*/,_=e(84543)(),x=Object.getPrototypeOf,v=function(){if(!_)return!1;try{return Function("return function*() {}")()}catch{}},y;z.exports=function(n){if(typeof n!="function")return!1;if(a.test(P.call(n)))return!0;if(!_){var u=d.call(n);return u==="[object GeneratorFunction]"}if(!x)return!1;if(typeof y>"u"){var i=v();y=i?x(i):!1}return x(n)===y}},62683:function(z){z.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},64274:function(z){z.exports=function(e){return e!==e}},15567:function(z,B,e){var d=e(68222),P=e(17045),a=e(64274),_=e(14922),x=e(22442),v=d(_(),Number);P(v,{getPolyfill:_,implementation:a,shim:x}),z.exports=v},14922:function(z,B,e){var d=e(64274);z.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:d}},22442:function(z,B,e){var d=e(17045),P=e(14922);z.exports=function(){var _=P();return d(Number,{isNaN:_},{isNaN:function(){return Number.isNaN!==_}}),_}},64941:function(z){z.exports=function(B){var e=typeof B;return B!==null&&(e==="object"||e==="function")}},10973:function(z){var B=Object.prototype.toString;z.exports=function(e){var d;return B.call(e)==="[object Object]"&&(d=Object.getPrototypeOf(e),d===null||d===Object.getPrototypeOf({}))}},18546:function(z){z.exports=function(B){for(var e=B.length,d,P=0;P<e;P++)if(d=B.charCodeAt(P),(d<9||d>13)&&d!==32&&d!==133&&d!==160&&d!==5760&&d!==6158&&(d<8192||d>8205)&&d!==8232&&d!==8233&&d!==8239&&d!==8287&&d!==8288&&d!==12288&&d!==65279)return!1;return!0}},89546:function(z){z.exports=function(e){return typeof e!="string"?!1:(e=e.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e)&&/[\dz]$/i.test(e)&&e.length>4))}},9187:function(z,B,e){var d=e(86165),P=e(72077),a=e(92978),_=a("Object.prototype.toString"),x=e(57877)(),v=x&&typeof Symbol.toStringTag=="symbol",y=P(),r=a("Array.prototype.indexOf",!0)||function(b,p){for(var E=0;E<b.length;E+=1)if(b[E]===p)return E;return-1},n=a("String.prototype.slice"),u={},i=e(67295),f=Object.getPrototypeOf;v&&i&&f&&d(y,function(h){var b=new e.g[h];if(!(Symbol.toStringTag in b))throw new EvalError("this engine has support for Symbol.toStringTag, but "+h+" does not have the property! Please report this.");var p=f(b),E=i(p,Symbol.toStringTag);if(!E){var c=f(p);E=i(c,Symbol.toStringTag)}u[h]=E.get});var g=function(b){var p=!1;return d(u,function(E,c){if(!p)try{p=E.call(b)===c}catch{}}),p};z.exports=function(b){if(!b||typeof b!="object")return!1;if(!v){var p=n(_(b),8,-1);return r(y,p)>-1}return i?g(b):!1}},44517:function(z){(function(B,e){z.exports=e()})(this,function(){var B,e,d;function P(a,_){if(!B)B=_;else if(!e)e=_;else{var x="var sharedChunk = {}; ("+B+")(sharedChunk); ("+e+")(sharedChunk);",v={};B(v),d=_(v),d.workerUrl=window.URL.createObjectURL(new Blob([x],{type:"text/javascript"}))}}return P(["exports"],function(a){function _(I,F){return F={exports:{}},I(F,F.exports),F.exports}var x="1.10.1",v=y;function y(I,F,X,oe){this.cx=3*I,this.bx=3*(X-I)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*F,this.by=3*(oe-F)-this.cy,this.ay=1-this.cy-this.by,this.p1x=I,this.p1y=oe,this.p2x=X,this.p2y=oe}y.prototype.sampleCurveX=function(I){return((this.ax*I+this.bx)*I+this.cx)*I},y.prototype.sampleCurveY=function(I){return((this.ay*I+this.by)*I+this.cy)*I},y.prototype.sampleCurveDerivativeX=function(I){return(3*this.ax*I+2*this.bx)*I+this.cx},y.prototype.solveCurveX=function(I,F){typeof F>"u"&&(F=1e-6);var X,oe,ye,Me,Ie;for(ye=I,Ie=0;Ie<8;Ie++){if(Me=this.sampleCurveX(ye)-I,Math.abs(Me)<F)return ye;var $e=this.sampleCurveDerivativeX(ye);if(Math.abs($e)<1e-6)break;ye=ye-Me/$e}if(X=0,oe=1,ye=I,ye<X)return X;if(ye>oe)return oe;for(;X<oe;){if(Me=this.sampleCurveX(ye),Math.abs(Me-I)<F)return ye;I>Me?X=ye:oe=ye,ye=(oe-X)*.5+X}return ye},y.prototype.solve=function(I,F){return this.sampleCurveY(this.solveCurveX(I,F))};var r=n;function n(I,F){this.x=I,this.y=F}n.prototype={clone:function(){return new n(this.x,this.y)},add:function(I){return this.clone()._add(I)},sub:function(I){return this.clone()._sub(I)},multByPoint:function(I){return this.clone()._multByPoint(I)},divByPoint:function(I){return this.clone()._divByPoint(I)},mult:function(I){return this.clone()._mult(I)},div:function(I){return this.clone()._div(I)},rotate:function(I){return this.clone()._rotate(I)},rotateAround:function(I,F){return this.clone()._rotateAround(I,F)},matMult:function(I){return this.clone()._matMult(I)},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(I){return this.x===I.x&&this.y===I.y},dist:function(I){return Math.sqrt(this.distSqr(I))},distSqr:function(I){var F=I.x-this.x,X=I.y-this.y;return F*F+X*X},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(I){return Math.atan2(this.y-I.y,this.x-I.x)},angleWith:function(I){return this.angleWithSep(I.x,I.y)},angleWithSep:function(I,F){return Math.atan2(this.x*F-this.y*I,this.x*I+this.y*F)},_matMult:function(I){var F=I[0]*this.x+I[1]*this.y,X=I[2]*this.x+I[3]*this.y;return this.x=F,this.y=X,this},_add:function(I){return this.x+=I.x,this.y+=I.y,this},_sub:function(I){return this.x-=I.x,this.y-=I.y,this},_mult:function(I){return this.x*=I,this.y*=I,this},_div:function(I){return this.x/=I,this.y/=I,this},_multByPoint:function(I){return this.x*=I.x,this.y*=I.y,this},_divByPoint:function(I){return this.x/=I.x,this.y/=I.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var I=this.y;return this.y=this.x,this.x=-I,this},_rotate:function(I){var F=Math.cos(I),X=Math.sin(I),oe=F*this.x-X*this.y,ye=X*this.x+F*this.y;return this.x=oe,this.y=ye,this},_rotateAround:function(I,F){var X=Math.cos(I),oe=Math.sin(I),ye=F.x+X*(this.x-F.x)-oe*(this.y-F.y),Me=F.y+oe*(this.x-F.x)+X*(this.y-F.y);return this.x=ye,this.y=Me,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(I){return I instanceof n?I:Array.isArray(I)?new n(I[0],I[1]):I};function u(I,F){if(Array.isArray(I)){if(!Array.isArray(F)||I.length!==F.length)return!1;for(var X=0;X<I.length;X++)if(!u(I[X],F[X]))return!1;return!0}if(typeof I=="object"&&I!==null&&F!==null){if(typeof F!="object")return!1;var oe=Object.keys(I);if(oe.length!==Object.keys(F).length)return!1;for(var ye in I)if(!u(I[ye],F[ye]))return!1;return!0}return I===F}function i(I){if(I<=0)return 0;if(I>=1)return 1;var F=I*I,X=F*I;return 4*(I<.5?X:3*(I-F)+X-.75)}function f(I,F,X,oe){var ye=new v(I,F,X,oe);return function(Me){return ye.solve(Me)}}var g=f(.25,.1,.25,1);function h(I,F,X){return Math.min(X,Math.max(F,I))}function b(I,F,X){var oe=X-F,ye=((I-F)%oe+oe)%oe+F;return ye===F?X:ye}function p(I,F,X){if(!I.length)return X(null,[]);var oe=I.length,ye=new Array(I.length),Me=null;I.forEach(function(Ie,$e){F(Ie,function(mt,Ct){mt&&(Me=mt),ye[$e]=Ct,--oe===0&&X(Me,ye)})})}function E(I){var F=[];for(var X in I)F.push(I[X]);return F}function c(I,F){var X=[];for(var oe in I)oe in F||X.push(oe);return X}function l(I){for(var F=[],X=arguments.length-1;X-- >0;)F[X]=arguments[X+1];for(var oe=0,ye=F;oe<ye.length;oe+=1){var Me=ye[oe];for(var Ie in Me)I[Ie]=Me[Ie]}return I}function m(I,F){for(var X={},oe=0;oe<F.length;oe++){var ye=F[oe];ye in I&&(X[ye]=I[ye])}return X}var M=1;function L(){return M++}function D(){function I(F){return F?(F^Math.random()*16>>F/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,I)}return I()}function A(I){return I?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(I):!1}function C(I,F){I.forEach(function(X){F[X]&&(F[X]=F[X].bind(F))})}function S(I,F){return I.indexOf(F,I.length-F.length)!==-1}function o(I,F,X){var oe={};for(var ye in I)oe[ye]=F.call(X||this,I[ye],ye,I);return oe}function R(I,F,X){var oe={};for(var ye in I)F.call(X||this,I[ye],ye,I)&&(oe[ye]=I[ye]);return oe}function T(I){return Array.isArray(I)?I.map(T):typeof I=="object"&&I?o(I,T):I}function O(I,F){for(var X=0;X<I.length;X++)if(F.indexOf(I[X])>=0)return!0;return!1}var N={};function H(I){N[I]||(typeof console<"u"&&console.warn(I),N[I]=!0)}function k(I,F,X){return(X.y-I.y)*(F.x-I.x)>(F.y-I.y)*(X.x-I.x)}function V(I){for(var F=0,X=0,oe=I.length,ye=oe-1,Me=void 0,Ie=void 0;X<oe;ye=X++)Me=I[X],Ie=I[ye],F+=(Ie.x-Me.x)*(Me.y+Ie.y);return F}function G(I){var F=I[0],X=I[1],oe=I[2];return X+=90,X*=Math.PI/180,oe*=Math.PI/180,{x:F*Math.cos(X)*Math.sin(oe),y:F*Math.sin(X)*Math.sin(oe),z:F*Math.cos(oe)}}function U(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function Y(I){var F=/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,X={};if(I.replace(F,function(ye,Me,Ie,$e){var mt=Ie||$e;return X[Me]=mt?mt.toLowerCase():!0,""}),X["max-age"]){var oe=parseInt(X["max-age"],10);isNaN(oe)?delete X["max-age"]:X["max-age"]=oe}return X}var ee=null;function re(I){if(ee==null){var F=I.navigator?I.navigator.userAgent:null;ee=!!I.safari||!!(F&&(/\b(iPad|iPhone|iPod)\b/.test(F)||F.match("Safari")&&!F.match("Chrome")))}return ee}function ie(I){try{var F=self[I];return F.setItem("_mapbox_test_",1),F.removeItem("_mapbox_test_"),!0}catch{return!1}}function se(I){return self.btoa(encodeURIComponent(I).replace(/%([0-9A-F]{2})/g,function(F,X){return String.fromCharCode(Number("0x"+X))}))}function ce(I){return decodeURIComponent(self.atob(I).split("").map(function(F){return"%"+("00"+F.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var q=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),j=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,Z=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,Q,ue,fe={now:q,frame:function(F){var X=j(F);return{cancel:function(){return Z(X)}}},getImageData:function(F,X){X===void 0&&(X=0);var oe=self.document.createElement("canvas"),ye=oe.getContext("2d");if(!ye)throw new Error("failed to create canvas 2d context");return oe.width=F.width,oe.height=F.height,ye.drawImage(F,0,0,F.width,F.height),ye.getImageData(-X,-X,F.width+2*X,F.height+2*X)},resolveURL:function(F){return Q||(Q=self.document.createElement("a")),Q.href=F,Q.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return self.matchMedia?(ue==null&&(ue=self.matchMedia("(prefers-reduced-motion: reduce)")),ue.matches):!1}},te={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},ne={supported:!1,testSupport:Re},ve,le=!1,xe,Se=!1;self.document&&(xe=self.document.createElement("img"),xe.onload=function(){ve&&Ee(ve),ve=null,Se=!0},xe.onerror=function(){le=!0,ve=null},xe.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function Re(I){le||!xe||(Se?Ee(I):ve=I)}function Ee(I){var F=I.createTexture();I.bindTexture(I.TEXTURE_2D,F);try{if(I.texImage2D(I.TEXTURE_2D,0,I.RGBA,I.RGBA,I.UNSIGNED_BYTE,xe),I.isContextLost())return;ne.supported=!0}catch{}I.deleteTexture(F),le=!0}var Oe="01";function Be(){for(var I="1",F="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",X="",oe=0;oe<10;oe++)X+=F[Math.floor(Math.random()*62)];var ye=12*60*60*1e3,Me=[I,Oe,X].join(""),Ie=Date.now()+ye;return{token:Me,tokenExpiresAt:Ie}}var Le=function(F,X){this._transformRequestFn=F,this._customAccessToken=X,this._createSkuToken()};Le.prototype._createSkuToken=function(){var F=Be();this._skuToken=F.token,this._skuTokenExpiresAt=F.tokenExpiresAt},Le.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Le.prototype.transformRequest=function(F,X){return this._transformRequestFn?this._transformRequestFn(F,X)||{url:F}:{url:F}},Le.prototype.normalizeStyleURL=function(F,X){if(!Te(F))return F;var oe=ht(F);return oe.path="/styles/v1"+oe.path,this._makeAPIURL(oe,this._customAccessToken||X)},Le.prototype.normalizeGlyphsURL=function(F,X){if(!Te(F))return F;var oe=ht(F);return oe.path="/fonts/v1"+oe.path,this._makeAPIURL(oe,this._customAccessToken||X)},Le.prototype.normalizeSourceURL=function(F,X){if(!Te(F))return F;var oe=ht(F);return oe.path="/v4/"+oe.authority+".json",oe.params.push("secure"),this._makeAPIURL(oe,this._customAccessToken||X)},Le.prototype.normalizeSpriteURL=function(F,X,oe,ye){var Me=ht(F);return Te(F)?(Me.path="/styles/v1"+Me.path+"/sprite"+X+oe,this._makeAPIURL(Me,this._customAccessToken||ye)):(Me.path+=""+X+oe,st(Me))},Le.prototype.normalizeTileURL=function(F,X){if(this._isSkuTokenExpired()&&this._createSkuToken(),F&&!Te(F))return F;var oe=ht(F),ye=/(\.(png|jpg)\d*)(?=$)/,Me=/^.+\/v4\//,Ie=fe.devicePixelRatio>=2||X===512?"@2x":"",$e=ne.supported?".webp":"$1";oe.path=oe.path.replace(ye,""+Ie+$e),oe.path=oe.path.replace(Me,"/"),oe.path="/v4"+oe.path;var mt=this._customAccessToken||Ne(oe.params)||te.ACCESS_TOKEN;return te.REQUIRE_ACCESS_TOKEN&&mt&&this._skuToken&&oe.params.push("sku="+this._skuToken),this._makeAPIURL(oe,mt)},Le.prototype.canonicalizeTileURL=function(F,X){var oe="/v4/",ye=/\.[\w]+$/,Me=ht(F);if(!Me.path.match(/(^\/v4\/)/)||!Me.path.match(ye))return F;var Ie="mapbox://tiles/";Ie+=Me.path.replace(oe,"");var $e=Me.params;return X&&($e=$e.filter(function(mt){return!mt.match(/^access_token=/)})),$e.length&&(Ie+="?"+$e.join("&")),Ie},Le.prototype.canonicalizeTileset=function(F,X){for(var oe=X?Te(X):!1,ye=[],Me=0,Ie=F.tiles||[];Me<Ie.length;Me+=1){var $e=Ie[Me];Ve($e)?ye.push(this.canonicalizeTileURL($e,oe)):ye.push($e)}return ye},Le.prototype._makeAPIURL=function(F,X){var oe="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",ye=ht(te.API_URL);if(F.protocol=ye.protocol,F.authority=ye.authority,ye.path!=="/"&&(F.path=""+ye.path+F.path),!te.REQUIRE_ACCESS_TOKEN)return st(F);if(X=X||te.ACCESS_TOKEN,!X)throw new Error("An API access token is required to use Mapbox GL. "+oe);if(X[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+oe);return F.params=F.params.filter(function(Me){return Me.indexOf("access_token")===-1}),F.params.push("access_token="+X),st(F)};function Te(I){return I.indexOf("mapbox:")===0}var De=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function Ve(I){return De.test(I)}function Ye(I){return I.indexOf("sku=")>0&&Ve(I)}function Ne(I){for(var F=0,X=I;F<X.length;F+=1){var oe=X[F],ye=oe.match(/^access_token=(.*)$/);if(ye)return ye[1]}return null}var Xe=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function ht(I){var F=I.match(Xe);if(!F)throw new Error("Unable to parse URL object");return{protocol:F[1],authority:F[2],path:F[3]||"/",params:F[4]?F[4].split("&"):[]}}function st(I){var F=I.params.length?"?"+I.params.join("&"):"";return I.protocol+"://"+I.authority+I.path+F}var it="mapbox.eventData";function nt(I){if(!I)return null;var F=I.split(".");if(!F||F.length!==3)return null;try{var X=JSON.parse(ce(F[1]));return X}catch{return null}}var pt=function(F){this.type=F,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};pt.prototype.getStorageKey=function(F){var X=nt(te.ACCESS_TOKEN),oe="";return X&&X.u?oe=se(X.u):oe=te.ACCESS_TOKEN||"",F?it+"."+F+":"+oe:it+":"+oe},pt.prototype.fetchEventData=function(){var F=ie("localStorage"),X=this.getStorageKey(),oe=this.getStorageKey("uuid");if(F)try{var ye=self.localStorage.getItem(X);ye&&(this.eventData=JSON.parse(ye));var Me=self.localStorage.getItem(oe);Me&&(this.anonId=Me)}catch{H("Unable to read from LocalStorage")}},pt.prototype.saveEventData=function(){var F=ie("localStorage"),X=this.getStorageKey(),oe=this.getStorageKey("uuid");if(F)try{self.localStorage.setItem(oe,this.anonId),Object.keys(this.eventData).length>=1&&self.localStorage.setItem(X,JSON.stringify(this.eventData))}catch{H("Unable to write to LocalStorage")}},pt.prototype.processRequests=function(F){},pt.prototype.postEvent=function(F,X,oe,ye){var Me=this;if(te.EVENTS_URL){var Ie=ht(te.EVENTS_URL);Ie.params.push("access_token="+(ye||te.ACCESS_TOKEN||""));var $e={event:this.type,created:new Date(F).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:x,skuId:Oe,userId:this.anonId},mt=X?l($e,X):$e,Ct={url:st(Ie),headers:{"Content-Type":"text/plain"},body:JSON.stringify([mt])};this.pendingRequest=Rt(Ct,function(_t){Me.pendingRequest=null,oe(_t),Me.saveEventData(),Me.processRequests(ye)})}},pt.prototype.queueRequest=function(F,X){this.queue.push(F),this.processRequests(X)};var Tt=function(I){function F(){I.call(this,"map.load"),this.success={},this.skuToken=""}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.postMapLoadEvent=function(oe,ye,Me,Ie){this.skuToken=Me,(te.EVENTS_URL&&Ie||te.ACCESS_TOKEN&&Array.isArray(oe)&&oe.some(function($e){return Te($e)||Ve($e)}))&&this.queueRequest({id:ye,timestamp:Date.now()},Ie)},F.prototype.processRequests=function(oe){var ye=this;if(!(this.pendingRequest||this.queue.length===0)){var Me=this.queue.shift(),Ie=Me.id,$e=Me.timestamp;Ie&&this.success[Ie]||(this.anonId||this.fetchEventData(),A(this.anonId)||(this.anonId=D()),this.postEvent($e,{skuToken:this.skuToken},function(mt){mt||Ie&&(ye.success[Ie]=!0)},oe))}},F}(pt),Et=function(I){function F(X){I.call(this,"appUserTurnstile"),this._customAccessToken=X}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.postTurnstileEvent=function(oe,ye){te.EVENTS_URL&&te.ACCESS_TOKEN&&Array.isArray(oe)&&oe.some(function(Me){return Te(Me)||Ve(Me)})&&this.queueRequest(Date.now(),ye)},F.prototype.processRequests=function(oe){var ye=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var Me=nt(te.ACCESS_TOKEN),Ie=Me?Me.u:te.ACCESS_TOKEN,$e=Ie!==this.eventData.tokenU;A(this.anonId)||(this.anonId=D(),$e=!0);var mt=this.queue.shift();if(this.eventData.lastSuccess){var Ct=new Date(this.eventData.lastSuccess),_t=new Date(mt),Kt=(mt-this.eventData.lastSuccess)/(24*60*60*1e3);$e=$e||Kt>=1||Kt<-1||Ct.getDate()!==_t.getDate()}else $e=!0;if(!$e)return this.processRequests();this.postEvent(mt,{"enabled.telemetry":!1},function(lr){lr||(ye.eventData.lastSuccess=mt,ye.eventData.tokenU=Ie)},oe)}},F}(pt),Dt=new Et,et=Dt.postTurnstileEvent.bind(Dt),Ue=new Tt,ze=Ue.postMapLoadEvent.bind(Ue),rt="mapbox-tiles",lt=500,Qe=50,Fe=1e3*60*7,Ce;function pe(){self.caches&&!Ce&&(Ce=self.caches.open(rt))}var we;function Ae(I,F){if(we===void 0)try{new Response(new ReadableStream),we=!0}catch{we=!1}we?F(I.body):I.blob().then(F)}function Pe(I,F,X){if(pe(),!!Ce){var oe={status:F.status,statusText:F.statusText,headers:new self.Headers};F.headers.forEach(function(Ie,$e){return oe.headers.set($e,Ie)});var ye=Y(F.headers.get("Cache-Control")||"");if(!ye["no-store"]){ye["max-age"]&&oe.headers.set("Expires",new Date(X+ye["max-age"]*1e3).toUTCString());var Me=new Date(oe.headers.get("Expires")).getTime()-X;Me<Fe||Ae(F,function(Ie){var $e=new self.Response(Ie,oe);pe(),Ce&&Ce.then(function(mt){return mt.put(Ge(I.url),$e)}).catch(function(mt){return H(mt.message)})})}}}function Ge(I){var F=I.indexOf("?");return F<0?I:I.slice(0,F)}function We(I,F){if(pe(),!Ce)return F(null);var X=Ge(I.url);Ce.then(function(oe){oe.match(X).then(function(ye){var Me=tt(ye);oe.delete(X),Me&&oe.put(X,ye.clone()),F(null,ye,Me)}).catch(F)}).catch(F)}function tt(I){if(!I)return!1;var F=new Date(I.headers.get("Expires")||0),X=Y(I.headers.get("Cache-Control")||"");return F>Date.now()&&!X["no-cache"]}var ct=1/0;function St(I){ct++,ct>Qe&&(I.getActor().send("enforceCacheSizeLimit",lt),ct=0)}function Pt(I){pe(),Ce&&Ce.then(function(F){F.keys().then(function(X){for(var oe=0;oe<X.length-I;oe++)F.delete(X[oe])})})}function wt(I){var F=self.caches.delete(rt);I&&F.catch(I).then(function(){return I()})}function Bt(I,F){lt=I,Qe=F}var Wt;function hr(){return Wt==null&&(Wt=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext("2d")&&typeof self.createImageBitmap=="function"),Wt}var gt={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(gt);var jt=function(I){function F(X,oe,ye){oe===401&&Ve(ye)&&(X+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),I.call(this,X),this.status=oe,this.url=ye,this.name=this.constructor.name,this.message=X}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},F}(Error),Ut=U()?function(){return self.worker&&self.worker.referrer}:function(){return(self.location.protocol==="blob:"?self.parent:self).location.href},or=function(I){return/^file:/.test(I)||/^file:/.test(Ut())&&!/^\w+:/.test(I)};function ur(I,F){var X=new self.AbortController,oe=new self.Request(I.url,{method:I.method||"GET",body:I.body,credentials:I.credentials,headers:I.headers,referrer:Ut(),signal:X.signal}),ye=!1,Me=!1,Ie=Ye(oe.url);I.type==="json"&&oe.headers.set("Accept","application/json");var $e=function(Ct,_t,Kt){if(!Me){if(Ct&&Ct.message!=="SecurityError"&&H(Ct),_t&&Kt)return mt(_t);var lr=Date.now();self.fetch(oe).then(function(tr){if(tr.ok){var wr=Ie?tr.clone():null;return mt(tr,wr,lr)}else return F(new jt(tr.statusText,tr.status,I.url))}).catch(function(tr){tr.code!==20&&F(new Error(tr.message))})}},mt=function(Ct,_t,Kt){(I.type==="arrayBuffer"?Ct.arrayBuffer():I.type==="json"?Ct.json():Ct.text()).then(function(lr){Me||(_t&&Kt&&Pe(oe,_t,Kt),ye=!0,F(null,lr,Ct.headers.get("Cache-Control"),Ct.headers.get("Expires")))}).catch(function(lr){Me||F(new Error(lr.message))})};return Ie?We(oe,$e):$e(null,null),{cancel:function(){Me=!0,ye||X.abort()}}}function dt(I,F){var X=new self.XMLHttpRequest;X.open(I.method||"GET",I.url,!0),I.type==="arrayBuffer"&&(X.responseType="arraybuffer");for(var oe in I.headers)X.setRequestHeader(oe,I.headers[oe]);return I.type==="json"&&(X.responseType="text",X.setRequestHeader("Accept","application/json")),X.withCredentials=I.credentials==="include",X.onerror=function(){F(new Error(X.statusText))},X.onload=function(){if((X.status>=200&&X.status<300||X.status===0)&&X.response!==null){var ye=X.response;if(I.type==="json")try{ye=JSON.parse(X.response)}catch(Me){return F(Me)}F(null,ye,X.getResponseHeader("Cache-Control"),X.getResponseHeader("Expires"))}else F(new jt(X.statusText,X.status,I.url))},X.send(I.body),{cancel:function(){return X.abort()}}}var ut=function(I,F){if(!or(I.url)){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return ur(I,F);if(U()&&self.worker&&self.worker.actor){var X=!0;return self.worker.actor.send("getResource",I,F,void 0,X)}}return dt(I,F)},yt=function(I,F){return ut(l(I,{type:"json"}),F)},Lt=function(I,F){return ut(l(I,{type:"arrayBuffer"}),F)},Rt=function(I,F){return ut(l(I,{method:"POST"}),F)};function Nt(I){var F=self.document.createElement("a");return F.href=I,F.protocol===self.document.location.protocol&&F.host===self.document.location.host}var Vt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Zt(I,F,X,oe){var ye=new self.Image,Me=self.URL;ye.onload=function(){F(null,ye),Me.revokeObjectURL(ye.src)},ye.onerror=function(){return F(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 Ie=new self.Blob([new Uint8Array(I)],{type:"image/png"});ye.cacheControl=X,ye.expires=oe,ye.src=I.byteLength?Me.createObjectURL(Ie):Vt}function qt(I,F){var X=new self.Blob([new Uint8Array(I)],{type:"image/png"});self.createImageBitmap(X).then(function(oe){F(null,oe)}).catch(function(oe){F(new Error("Could not load image because of "+oe.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var Jt,nr,Mr=function(){Jt=[],nr=0};Mr();var Ke=function(I,F){if(ne.supported&&(I.headers||(I.headers={}),I.headers.accept="image/webp,*/*"),nr>=te.MAX_PARALLEL_IMAGE_REQUESTS){var X={requestParameters:I,callback:F,cancelled:!1,cancel:function(){this.cancelled=!0}};return Jt.push(X),X}nr++;var oe=!1,ye=function(){if(!oe)for(oe=!0,nr--;Jt.length&&nr<te.MAX_PARALLEL_IMAGE_REQUESTS;){var Ie=Jt.shift(),$e=Ie.requestParameters,mt=Ie.callback,Ct=Ie.cancelled;Ct||(Ie.cancel=Ke($e,mt).cancel)}},Me=Lt(I,function(Ie,$e,mt,Ct){ye(),Ie?F(Ie):$e&&(hr()?qt($e,F):Zt($e,F,mt,Ct))});return{cancel:function(){Me.cancel(),ye()}}},Ze=function(I,F){var X=self.document.createElement("video");X.muted=!0,X.onloadstart=function(){F(null,X)};for(var oe=0;oe<I.length;oe++){var ye=self.document.createElement("source");Nt(I[oe])||(X.crossOrigin="Anonymous"),ye.src=I[oe],X.appendChild(ye)}return{cancel:function(){}}};function zt(I,F,X){var oe=X[I]&&X[I].indexOf(F)!==-1;oe||(X[I]=X[I]||[],X[I].push(F))}function kt(I,F,X){if(X&&X[I]){var oe=X[I].indexOf(F);oe!==-1&&X[I].splice(oe,1)}}var Qt=function(F,X){X===void 0&&(X={}),l(this,X),this.type=F},cr=function(I){function F(X,oe){oe===void 0&&(oe={}),I.call(this,"error",l({error:X},oe))}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F}(Qt),fr=function(){};fr.prototype.on=function(F,X){return this._listeners=this._listeners||{},zt(F,X,this._listeners),this},fr.prototype.off=function(F,X){return kt(F,X,this._listeners),kt(F,X,this._oneTimeListeners),this},fr.prototype.once=function(F,X){return this._oneTimeListeners=this._oneTimeListeners||{},zt(F,X,this._oneTimeListeners),this},fr.prototype.fire=function(F,X){typeof F=="string"&&(F=new Qt(F,X||{}));var oe=F.type;if(this.listens(oe)){F.target=this;for(var ye=this._listeners&&this._listeners[oe]?this._listeners[oe].slice():[],Me=0,Ie=ye;Me<Ie.length;Me+=1){var $e=Ie[Me];$e.call(this,F)}for(var mt=this._oneTimeListeners&&this._oneTimeListeners[oe]?this._oneTimeListeners[oe].slice():[],Ct=0,_t=mt;Ct<_t.length;Ct+=1){var Kt=_t[Ct];kt(oe,Kt,this._oneTimeListeners),Kt.call(this,F)}var lr=this._eventedParent;lr&&(l(F,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),lr.fire(F))}else F instanceof cr&&console.error(F.error);return this},fr.prototype.listens=function(F){return this._listeners&&this._listeners[F]&&this._listeners[F].length>0||this._oneTimeListeners&&this._oneTimeListeners[F]&&this._oneTimeListeners[F].length>0||this._eventedParent&&this._eventedParent.listens(F)},fr.prototype.setEventedParent=function(F,X){return this._eventedParent=F,this._eventedParentData=X,this};var ir=8,Yt={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"}},gr={"*":{type:"source"}},yr=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Tr={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"},"*":{type:"*"}},pr={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"},"*":{type:"*"}},Kr={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"},"*":{type:"*"}},Or={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},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},Nr={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"}}},Sn={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"}}},Jr={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"}},xn=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Dn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},mr={"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"}},Ar={"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"}},zr={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Br={"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"}},on={"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"}},mn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Tn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},An={type:"array",value:"*"},Fn={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},Jn={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},ta={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},sa={type:"array",value:"*",minimum:1},ha={type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},la={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}},Dr=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],sn={"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"}},nn={"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"}},dn={"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"}},Un={"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"}},Ln={"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"}},Pn={"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"}},Vn={"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"}},aa={"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"}},Da={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},$a={"*":{type:"string"}},$t={$version:ir,$root:Yt,sources:gr,source:yr,source_vector:Tr,source_raster:pr,source_raster_dem:Kr,source_geojson:Or,source_video:Nr,source_image:Sn,layer:Jr,layout:xn,layout_background:Dn,layout_fill:mr,layout_circle:Ar,layout_heatmap:zr,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:Br,layout_symbol:on,layout_raster:mn,layout_hillshade:Tn,filter:An,filter_operator:Fn,geometry_type:Jn,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:ta,expression:sa,expression_name:ha,light:la,paint:Dr,paint_fill:sn,"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:nn,paint_circle:dn,paint_heatmap:Un,paint_symbol:Ln,paint_raster:Pn,paint_hillshade:Vn,paint_background:aa,transition:Da,"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:$a},Sr=function(F,X,oe,ye){this.message=(F?F+": ":"")+oe,ye&&(this.identifier=ye),X!=null&&X.__line__&&(this.line=X.__line__)};function an(I){var F=I.key,X=I.value;return X?[new Sr(F,X,"constants have been deprecated as of v8")]:[]}function cn(I){for(var F=[],X=arguments.length-1;X-- >0;)F[X]=arguments[X+1];for(var oe=0,ye=F;oe<ye.length;oe+=1){var Me=ye[oe];for(var Ie in Me)I[Ie]=Me[Ie]}return I}function hn(I){return I instanceof Number||I instanceof String||I instanceof Boolean?I.valueOf():I}function _n(I){if(Array.isArray(I))return I.map(_n);if(I instanceof Object&&!(I instanceof Number||I instanceof String||I instanceof Boolean)){var F={};for(var X in I)F[X]=_n(I[X]);return F}return hn(I)}var wn=function(I){function F(X,oe){I.call(this,oe),this.message=oe,this.key=X}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F}(Error),fn=function(F,X){X===void 0&&(X=[]),this.parent=F,this.bindings={};for(var oe=0,ye=X;oe<ye.length;oe+=1){var Me=ye[oe],Ie=Me[0],$e=Me[1];this.bindings[Ie]=$e}};fn.prototype.concat=function(F){return new fn(this,F)},fn.prototype.get=function(F){if(this.bindings[F])return this.bindings[F];if(this.parent)return this.parent.get(F);throw new Error(F+" not found in scope.")},fn.prototype.has=function(F){return this.bindings[F]?!0:this.parent?this.parent.has(F):!1};var Rr={kind:"null"},Lr={kind:"number"},kr={kind:"string"},vn={kind:"boolean"},kn={kind:"color"},Yn={kind:"object"},pn={kind:"value"},zn={kind:"error"},qn={kind:"collator"},ua={kind:"formatted"},ia={kind:"resolvedImage"};function oa(I,F){return{kind:"array",itemType:I,N:F}}function ga(I){if(I.kind==="array"){var F=ga(I.itemType);return typeof I.N=="number"?"array<"+F+", "+I.N+">":I.itemType.kind==="value"?"array":"array<"+F+">"}else return I.kind}var uo=[Rr,Lr,kr,vn,kn,ua,Yn,oa(pn),ia];function Co(I,F){if(F.kind==="error")return null;if(I.kind==="array"){if(F.kind==="array"&&(F.N===0&&F.itemType.kind==="value"||!Co(I.itemType,F.itemType))&&(typeof I.N!="number"||I.N===F.N))return null}else{if(I.kind===F.kind)return null;if(I.kind==="value")for(var X=0,oe=uo;X<oe.length;X+=1){var ye=oe[X];if(!Co(ye,F))return null}}return"Expected "+ga(I)+" but found "+ga(F)+" instead."}function Fo(I,F){return F.some(function(X){return X.kind===I.kind})}function Ho(I,F){return F.some(function(X){return X==="null"?I===null:X==="array"?Array.isArray(I):X==="object"?I&&!Array.isArray(I)&&typeof I=="object":X===typeof I})}var ko=_(function(I,F){var X={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function oe(Ct){return Ct=Math.round(Ct),Ct<0?0:Ct>255?255:Ct}function ye(Ct){return Ct<0?0:Ct>1?1:Ct}function Me(Ct){return Ct[Ct.length-1]==="%"?oe(parseFloat(Ct)/100*255):oe(parseInt(Ct))}function Ie(Ct){return Ct[Ct.length-1]==="%"?ye(parseFloat(Ct)/100):ye(parseFloat(Ct))}function $e(Ct,_t,Kt){return Kt<0?Kt+=1:Kt>1&&(Kt-=1),Kt*6<1?Ct+(_t-Ct)*Kt*6:Kt*2<1?_t:Kt*3<2?Ct+(_t-Ct)*(2/3-Kt)*6:Ct}function mt(Ct){var _t=Ct.replace(/ /g,"").toLowerCase();if(_t in X)return X[_t].slice();if(_t[0]==="#"){if(_t.length===4){var Kt=parseInt(_t.substr(1),16);return Kt>=0&&Kt<=4095?[(Kt&3840)>>4|(Kt&3840)>>8,Kt&240|(Kt&240)>>4,Kt&15|(Kt&15)<<4,1]:null}else if(_t.length===7){var Kt=parseInt(_t.substr(1),16);return Kt>=0&&Kt<=16777215?[(Kt&16711680)>>16,(Kt&65280)>>8,Kt&255,1]:null}return null}var lr=_t.indexOf("("),tr=_t.indexOf(")");if(lr!==-1&&tr+1===_t.length){var wr=_t.substr(0,lr),Ur=_t.substr(lr+1,tr-(lr+1)).split(","),rn=1;switch(wr){case"rgba":if(Ur.length!==4)return null;rn=Ie(Ur.pop());case"rgb":return Ur.length!==3?null:[Me(Ur[0]),Me(Ur[1]),Me(Ur[2]),rn];case"hsla":if(Ur.length!==4)return null;rn=Ie(Ur.pop());case"hsl":if(Ur.length!==3)return null;var qr=(parseFloat(Ur[0])%360+360)%360/360,Mn=Ie(Ur[1]),yn=Ie(Ur[2]),En=yn<=.5?yn*(Mn+1):yn+Mn-yn*Mn,In=yn*2-En;return[oe($e(In,En,qr+1/3)*255),oe($e(In,En,qr)*255),oe($e(In,En,qr-1/3)*255),rn];default:return null}}return null}try{F.parseCSSColor=mt}catch{}}),ic=ko.parseCSSColor,oi=function(F,X,oe,ye){ye===void 0&&(ye=1),this.r=F,this.g=X,this.b=oe,this.a=ye};oi.parse=function(F){if(F){if(F instanceof oi)return F;if(typeof F=="string"){var X=ic(F);if(X)return new oi(X[0]/255*X[3],X[1]/255*X[3],X[2]/255*X[3],X[3])}}},oi.prototype.toString=function(){var F=this.toArray(),X=F[0],oe=F[1],ye=F[2],Me=F[3];return"rgba("+Math.round(X)+","+Math.round(oe)+","+Math.round(ye)+","+Me+")"},oi.prototype.toArray=function(){var F=this,X=F.r,oe=F.g,ye=F.b,Me=F.a;return Me===0?[0,0,0,0]:[X*255/Me,oe*255/Me,ye*255/Me,Me]},oi.black=new oi(0,0,0,1),oi.white=new oi(1,1,1,1),oi.transparent=new oi(0,0,0,0),oi.red=new oi(1,0,0,1);var Yu=function(F,X,oe){F?this.sensitivity=X?"variant":"case":this.sensitivity=X?"accent":"base",this.locale=oe,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Yu.prototype.compare=function(F,X){return this.collator.compare(F,X)},Yu.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var pu=function(F,X,oe,ye,Me){this.text=F,this.image=X,this.scale=oe,this.fontStack=ye,this.textColor=Me},fo=function(F){this.sections=F};fo.fromString=function(F){return new fo([new pu(F,null,null,null,null)])},fo.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(F){return F.text.length!==0||F.image&&F.image.name.length!==0})},fo.factory=function(F){return F instanceof fo?F:fo.fromString(F)},fo.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(F){return F.text}).join("")},fo.prototype.serialize=function(){for(var F=["format"],X=0,oe=this.sections;X<oe.length;X+=1){var ye=oe[X];if(ye.image){F.push(["image",ye.image.name]);continue}F.push(ye.text);var Me={};ye.fontStack&&(Me["text-font"]=["literal",ye.fontStack.split(",")]),ye.scale&&(Me["font-scale"]=ye.scale),ye.textColor&&(Me["text-color"]=["rgba"].concat(ye.textColor.toArray())),F.push(Me)}return F};var Vo=function(F){this.name=F.name,this.available=F.available};Vo.prototype.toString=function(){return this.name},Vo.fromString=function(F){return F?new Vo({name:F,available:!1}):null},Vo.prototype.serialize=function(){return["image",this.name]};function qc(I,F,X,oe){if(!(typeof I=="number"&&I>=0&&I<=255&&typeof F=="number"&&F>=0&&F<=255&&typeof X=="number"&&X>=0&&X<=255)){var ye=typeof oe=="number"?[I,F,X,oe]:[I,F,X];return"Invalid rgba value ["+ye.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof oe>"u"||typeof oe=="number"&&oe>=0&&oe<=1?null:"Invalid rgba value ["+[I,F,X,oe].join(", ")+"]: 'a' must be between 0 and 1."}function Xu(I){if(I===null)return!0;if(typeof I=="string")return!0;if(typeof I=="boolean")return!0;if(typeof I=="number")return!0;if(I instanceof oi)return!0;if(I instanceof Yu)return!0;if(I instanceof fo)return!0;if(I instanceof Vo)return!0;if(Array.isArray(I)){for(var F=0,X=I;F<X.length;F+=1){var oe=X[F];if(!Xu(oe))return!1}return!0}else if(typeof I=="object"){for(var ye in I)if(!Xu(I[ye]))return!1;return!0}else return!1}function Ni(I){if(I===null)return Rr;if(typeof I=="string")return kr;if(typeof I=="boolean")return vn;if(typeof I=="number")return Lr;if(I instanceof oi)return kn;if(I instanceof Yu)return qn;if(I instanceof fo)return ua;if(I instanceof Vo)return ia;if(Array.isArray(I)){for(var F=I.length,X,oe=0,ye=I;oe<ye.length;oe+=1){var Me=ye[oe],Ie=Ni(Me);if(!X)X=Ie;else{if(X===Ie)continue;X=pn;break}}return oa(X||pn,F)}else return Yn}function Zu(I){var F=typeof I;return I===null?"":F==="string"||F==="number"||F==="boolean"?String(I):I instanceof oi||I instanceof fo||I instanceof Vo?I.toString():JSON.stringify(I)}var Qo=function(F,X){this.type=F,this.value=X};Qo.parse=function(F,X){if(F.length!==2)return X.error("'literal' expression requires exactly one argument, but found "+(F.length-1)+" instead.");if(!Xu(F[1]))return X.error("invalid value");var oe=F[1],ye=Ni(oe),Me=X.expectedType;return ye.kind==="array"&&ye.N===0&&Me&&Me.kind==="array"&&(typeof Me.N!="number"||Me.N===0)&&(ye=Me),new Qo(ye,oe)},Qo.prototype.evaluate=function(){return this.value},Qo.prototype.eachChild=function(){},Qo.prototype.outputDefined=function(){return!0},Qo.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof oi?["rgba"].concat(this.value.toArray()):this.value instanceof fo?this.value.serialize():this.value};var no=function(F){this.name="ExpressionEvaluationError",this.message=F};no.prototype.toJSON=function(){return this.message};var qo={string:kr,number:Lr,boolean:vn,object:Yn},Lo=function(F,X){this.type=F,this.args=X};Lo.parse=function(F,X){if(F.length<2)return X.error("Expected at least one argument.");var oe=1,ye,Me=F[0];if(Me==="array"){var Ie;if(F.length>2){var $e=F[1];if(typeof $e!="string"||!($e in qo)||$e==="object")return X.error('The item type argument of "array" must be one of string, number, boolean',1);Ie=qo[$e],oe++}else Ie=pn;var mt;if(F.length>3){if(F[2]!==null&&(typeof F[2]!="number"||F[2]<0||F[2]!==Math.floor(F[2])))return X.error('The length argument to "array" must be a positive integer literal',2);mt=F[2],oe++}ye=oa(Ie,mt)}else ye=qo[Me];for(var Ct=[];oe<F.length;oe++){var _t=X.parse(F[oe],oe,pn);if(!_t)return null;Ct.push(_t)}return new Lo(ye,Ct)},Lo.prototype.evaluate=function(F){for(var X=0;X<this.args.length;X++){var oe=this.args[X].evaluate(F),ye=Co(this.type,Ni(oe));if(ye){if(X===this.args.length-1)throw new no("Expected value to be of type "+ga(this.type)+", but found "+ga(Ni(oe))+" instead.")}else return oe}return null},Lo.prototype.eachChild=function(F){this.args.forEach(F)},Lo.prototype.outputDefined=function(){return this.args.every(function(F){return F.outputDefined()})},Lo.prototype.serialize=function(){var F=this.type,X=[F.kind];if(F.kind==="array"){var oe=F.itemType;if(oe.kind==="string"||oe.kind==="number"||oe.kind==="boolean"){X.push(oe.kind);var ye=F.N;(typeof ye=="number"||this.args.length>1)&&X.push(ye)}}return X.concat(this.args.map(function(Me){return Me.serialize()}))};var os=function(F){this.type=ua,this.sections=F};os.parse=function(F,X){if(F.length<2)return X.error("Expected at least one argument.");var oe=F[1];if(!Array.isArray(oe)&&typeof oe=="object")return X.error("First argument must be an image or text section.");for(var ye=[],Me=!1,Ie=1;Ie<=F.length-1;++Ie){var $e=F[Ie];if(Me&&typeof $e=="object"&&!Array.isArray($e)){Me=!1;var mt=null;if($e["font-scale"]&&(mt=X.parse($e["font-scale"],1,Lr),!mt))return null;var Ct=null;if($e["text-font"]&&(Ct=X.parse($e["text-font"],1,oa(kr)),!Ct))return null;var _t=null;if($e["text-color"]&&(_t=X.parse($e["text-color"],1,kn),!_t))return null;var Kt=ye[ye.length-1];Kt.scale=mt,Kt.font=Ct,Kt.textColor=_t}else{var lr=X.parse(F[Ie],1,pn);if(!lr)return null;var tr=lr.type.kind;if(tr!=="string"&&tr!=="value"&&tr!=="null"&&tr!=="resolvedImage")return X.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Me=!0,ye.push({content:lr,scale:null,font:null,textColor:null})}}return new os(ye)},os.prototype.evaluate=function(F){var X=function(oe){var ye=oe.content.evaluate(F);return Ni(ye)===ia?new pu("",ye,null,null,null):new pu(Zu(ye),null,oe.scale?oe.scale.evaluate(F):null,oe.font?oe.font.evaluate(F).join(","):null,oe.textColor?oe.textColor.evaluate(F):null)};return new fo(this.sections.map(X))},os.prototype.eachChild=function(F){for(var X=0,oe=this.sections;X<oe.length;X+=1){var ye=oe[X];F(ye.content),ye.scale&&F(ye.scale),ye.font&&F(ye.font),ye.textColor&&F(ye.textColor)}},os.prototype.outputDefined=function(){return!1},os.prototype.serialize=function(){for(var F=["format"],X=0,oe=this.sections;X<oe.length;X+=1){var ye=oe[X];F.push(ye.content.serialize());var Me={};ye.scale&&(Me["font-scale"]=ye.scale.serialize()),ye.font&&(Me["text-font"]=ye.font.serialize()),ye.textColor&&(Me["text-color"]=ye.textColor.serialize()),F.push(Me)}return F};var zs=function(F){this.type=ia,this.input=F};zs.parse=function(F,X){if(F.length!==2)return X.error("Expected two arguments.");var oe=X.parse(F[1],1,kr);return oe?new zs(oe):X.error("No image name provided.")},zs.prototype.evaluate=function(F){var X=this.input.evaluate(F),oe=Vo.fromString(X);return oe&&F.availableImages&&(oe.available=F.availableImages.indexOf(X)>-1),oe},zs.prototype.eachChild=function(F){F(this.input)},zs.prototype.outputDefined=function(){return!1},zs.prototype.serialize=function(){return["image",this.input.serialize()]};var rl={"to-boolean":vn,"to-color":kn,"to-number":Lr,"to-string":kr},po=function(F,X){this.type=F,this.args=X};po.parse=function(F,X){if(F.length<2)return X.error("Expected at least one argument.");var oe=F[0];if((oe==="to-boolean"||oe==="to-string")&&F.length!==2)return X.error("Expected one argument.");for(var ye=rl[oe],Me=[],Ie=1;Ie<F.length;Ie++){var $e=X.parse(F[Ie],Ie,pn);if(!$e)return null;Me.push($e)}return new po(ye,Me)},po.prototype.evaluate=function(F){if(this.type.kind==="boolean")return Boolean(this.args[0].evaluate(F));if(this.type.kind==="color"){for(var X,oe,ye=0,Me=this.args;ye<Me.length;ye+=1){var Ie=Me[ye];if(X=Ie.evaluate(F),oe=null,X instanceof oi)return X;if(typeof X=="string"){var $e=F.parseColor(X);if($e)return $e}else if(Array.isArray(X)&&(X.length<3||X.length>4?oe="Invalid rbga value "+JSON.stringify(X)+": expected an array containing either three or four numeric values.":oe=qc(X[0],X[1],X[2],X[3]),!oe))return new oi(X[0]/255,X[1]/255,X[2]/255,X[3])}throw new no(oe||"Could not parse color from value '"+(typeof X=="string"?X:String(JSON.stringify(X)))+"'")}else if(this.type.kind==="number"){for(var mt=null,Ct=0,_t=this.args;Ct<_t.length;Ct+=1){var Kt=_t[Ct];if(mt=Kt.evaluate(F),mt===null)return 0;var lr=Number(mt);if(!isNaN(lr))return lr}throw new no("Could not convert "+JSON.stringify(mt)+" to number.")}else return this.type.kind==="formatted"?fo.fromString(Zu(this.args[0].evaluate(F))):this.type.kind==="resolvedImage"?Vo.fromString(Zu(this.args[0].evaluate(F))):Zu(this.args[0].evaluate(F))},po.prototype.eachChild=function(F){this.args.forEach(F)},po.prototype.outputDefined=function(){return this.args.every(function(F){return F.outputDefined()})},po.prototype.serialize=function(){if(this.type.kind==="formatted")return new os([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new zs(this.args[0]).serialize();var F=["to-"+this.type.kind];return this.eachChild(function(X){F.push(X.serialize())}),F};var eh=["Unknown","Point","LineString","Polygon"],Ns=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};Ns.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},Ns.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?eh[this.feature.type]:this.feature.type:null},Ns.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Ns.prototype.canonicalID=function(){return this.canonical},Ns.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Ns.prototype.parseColor=function(F){var X=this._parseColorCache[F];return X||(X=this._parseColorCache[F]=oi.parse(F)),X};var go=function(F,X,oe,ye){this.name=F,this.type=X,this._evaluate=oe,this.args=ye};go.prototype.evaluate=function(F){return this._evaluate(F,this.args)},go.prototype.eachChild=function(F){this.args.forEach(F)},go.prototype.outputDefined=function(){return!1},go.prototype.serialize=function(){return[this.name].concat(this.args.map(function(F){return F.serialize()}))},go.parse=function(F,X){var oe,ye=F[0],Me=go.definitions[ye];if(!Me)return X.error('Unknown expression "'+ye+'". If you wanted a literal array, use ["literal", [...]].',0);for(var Ie=Array.isArray(Me)?Me[0]:Me.type,$e=Array.isArray(Me)?[[Me[1],Me[2]]]:Me.overloads,mt=$e.filter(function(Aa){var Ma=Aa[0];return!Array.isArray(Ma)||Ma.length===F.length-1}),Ct=null,_t=0,Kt=mt;_t<Kt.length;_t+=1){var lr=Kt[_t],tr=lr[0],wr=lr[1];Ct=new il(X.registry,X.path,null,X.scope);for(var Ur=[],rn=!1,qr=1;qr<F.length;qr++){var Mn=F[qr],yn=Array.isArray(tr)?tr[qr-1]:tr.type,En=Ct.parse(Mn,1+Ur.length,yn);if(!En){rn=!0;break}Ur.push(En)}if(!rn){if(Array.isArray(tr)&&tr.length!==Ur.length){Ct.error("Expected "+tr.length+" arguments, but found "+Ur.length+" instead.");continue}for(var In=0;In<Ur.length;In++){var Hn=Array.isArray(tr)?tr[In]:tr.type,Qn=Ur[In];Ct.concat(In+1).checkSubtype(Hn,Qn.type)}if(Ct.errors.length===0)return new go(ye,Ie,wr,Ur)}}if(mt.length===1)(oe=X.errors).push.apply(oe,Ct.errors);else{for(var $n=mt.length?mt:$e,La=$n.map(function(Aa){var Ma=Aa[0];return oc(Ma)}).join(" | "),va=[],xa=1;xa<F.length;xa++){var Ga=X.parse(F[xa],1+va.length);if(!Ga)return null;va.push(ga(Ga.type))}X.error("Expected arguments of type "+La+", but found ("+va.join(", ")+") instead.")}return null},go.register=function(F,X){go.definitions=X;for(var oe in X)F[oe]=go};function oc(I){return Array.isArray(I)?"("+I.map(ga).join(", ")+")":"("+ga(I.type)+"...)"}var nl=function(F,X,oe){this.type=qn,this.locale=oe,this.caseSensitive=F,this.diacriticSensitive=X};nl.parse=function(F,X){if(F.length!==2)return X.error("Expected one argument.");var oe=F[1];if(typeof oe!="object"||Array.isArray(oe))return X.error("Collator options argument must be an object.");var ye=X.parse(oe["case-sensitive"]===void 0?!1:oe["case-sensitive"],1,vn);if(!ye)return null;var Me=X.parse(oe["diacritic-sensitive"]===void 0?!1:oe["diacritic-sensitive"],1,vn);if(!Me)return null;var Ie=null;return oe.locale&&(Ie=X.parse(oe.locale,1,kr),!Ie)?null:new nl(ye,Me,Ie)},nl.prototype.evaluate=function(F){return new Yu(this.caseSensitive.evaluate(F),this.diacriticSensitive.evaluate(F),this.locale?this.locale.evaluate(F):null)},nl.prototype.eachChild=function(F){F(this.caseSensitive),F(this.diacriticSensitive),this.locale&&F(this.locale)},nl.prototype.outputDefined=function(){return!1},nl.prototype.serialize=function(){var F={};return F["case-sensitive"]=this.caseSensitive.serialize(),F["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(F.locale=this.locale.serialize()),["collator",F]};var Bs=8192;function sc(I,F){I[0]=Math.min(I[0],F[0]),I[1]=Math.min(I[1],F[1]),I[2]=Math.max(I[2],F[0]),I[3]=Math.max(I[3],F[1])}function lc(I){return(180+I)/360}function ov(I){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+I*Math.PI/360)))/360}function ju(I,F){return!(I[0]<=F[0]||I[2]>=F[2]||I[1]<=F[1]||I[3]>=F[3])}function sv(I,F){var X=lc(I[0]),oe=ov(I[1]),ye=Math.pow(2,F.z);return[Math.round(X*ye*Bs),Math.round(oe*ye*Bs)]}function lv(I,F,X){var oe=I[0]-F[0],ye=I[1]-F[1],Me=I[0]-X[0],Ie=I[1]-X[1];return oe*Ie-Me*ye===0&&oe*Me<=0&&ye*Ie<=0}function uv(I,F,X){return F[1]>I[1]!=X[1]>I[1]&&I[0]<(X[0]-F[0])*(I[1]-F[1])/(X[1]-F[1])+F[0]}function uc(I,F){for(var X=!1,oe=0,ye=F.length;oe<ye;oe++)for(var Me=F[oe],Ie=0,$e=Me.length;Ie<$e-1;Ie++){if(lv(I,Me[Ie],Me[Ie+1]))return!1;uv(I,Me[Ie],Me[Ie+1])&&(X=!X)}return X}function fv(I,F){for(var X=0;X<F.length;X++)if(uc(I,F[X]))return!0;return!1}function cv(I,F){return I[0]*F[1]-I[1]*F[0]}function th(I,F,X,oe){var ye=I[0]-X[0],Me=I[1]-X[1],Ie=F[0]-X[0],$e=F[1]-X[1],mt=oe[0]-X[0],Ct=oe[1]-X[1],_t=ye*Ct-mt*Me,Kt=Ie*Ct-mt*$e;return _t>0&&Kt<0||_t<0&&Kt>0}function hv(I,F,X,oe){var ye=[F[0]-I[0],F[1]-I[1]],Me=[oe[0]-X[0],oe[1]-X[1]];return cv(Me,ye)===0?!1:!!(th(I,F,X,oe)&&th(X,oe,I,F))}function vv(I,F,X){for(var oe=0,ye=X;oe<ye.length;oe+=1)for(var Me=ye[oe],Ie=0;Ie<Me.length-1;++Ie)if(hv(I,F,Me[Ie],Me[Ie+1]))return!0;return!1}function fc(I,F){for(var X=0;X<I.length;++X)if(!uc(I[X],F))return!1;for(var oe=0;oe<I.length-1;++oe)if(vv(I[oe],I[oe+1],F))return!1;return!0}function Wl(I,F){for(var X=0;X<F.length;X++)if(fc(I,F[X]))return!0;return!1}function Yl(I,F,X){for(var oe=[],ye=0;ye<I.length;ye++){for(var Me=[],Ie=0;Ie<I[ye].length;Ie++){var $e=sv(I[ye][Ie],X);sc(F,$e),Me.push($e)}oe.push(Me)}return oe}function gu(I,F,X){for(var oe=[],ye=0;ye<I.length;ye++){var Me=Yl(I[ye],F,X);oe.push(Me)}return oe}function Lf(I,F,X,oe){if(I[0]<X[0]||I[0]>X[2]){var ye=oe*.5,Me=I[0]-X[0]>ye?-oe:X[0]-I[0]>ye?oe:0;Me===0&&(Me=I[0]-X[2]>ye?-oe:X[2]-I[0]>ye?oe:0),I[0]+=Me}sc(F,I)}function dv(I){I[0]=I[1]=1/0,I[2]=I[3]=-1/0}function al(I,F,X,oe){for(var ye=Math.pow(2,oe.z)*Bs,Me=[oe.x*Bs,oe.y*Bs],Ie=[],$e=0,mt=I;$e<mt.length;$e+=1)for(var Ct=mt[$e],_t=0,Kt=Ct;_t<Kt.length;_t+=1){var lr=Kt[_t],tr=[lr.x+Me[0],lr.y+Me[1]];Lf(tr,F,X,ye),Ie.push(tr)}return Ie}function rh(I,F,X,oe){for(var ye=Math.pow(2,oe.z)*Bs,Me=[oe.x*Bs,oe.y*Bs],Ie=[],$e=0,mt=I;$e<mt.length;$e+=1){for(var Ct=mt[$e],_t=[],Kt=0,lr=Ct;Kt<lr.length;Kt+=1){var tr=lr[Kt],wr=[tr.x+Me[0],tr.y+Me[1]];sc(F,wr),_t.push(wr)}Ie.push(_t)}if(F[2]-F[0]<=ye/2){dv(F);for(var Ur=0,rn=Ie;Ur<rn.length;Ur+=1)for(var qr=rn[Ur],Mn=0,yn=qr;Mn<yn.length;Mn+=1){var En=yn[Mn];Lf(En,F,X,ye)}}return Ie}function cc(I,F){var X=[1/0,1/0,-1/0,-1/0],oe=[1/0,1/0,-1/0,-1/0],ye=I.canonicalID();if(F.type==="Polygon"){var Me=Yl(F.coordinates,oe,ye),Ie=al(I.geometry(),X,oe,ye);if(!ju(X,oe))return!1;for(var $e=0,mt=Ie;$e<mt.length;$e+=1){var Ct=mt[$e];if(!uc(Ct,Me))return!1}}if(F.type==="MultiPolygon"){var _t=gu(F.coordinates,oe,ye),Kt=al(I.geometry(),X,oe,ye);if(!ju(X,oe))return!1;for(var lr=0,tr=Kt;lr<tr.length;lr+=1){var wr=tr[lr];if(!fv(wr,_t))return!1}}return!0}function pv(I,F){var X=[1/0,1/0,-1/0,-1/0],oe=[1/0,1/0,-1/0,-1/0],ye=I.canonicalID();if(F.type==="Polygon"){var Me=Yl(F.coordinates,oe,ye),Ie=rh(I.geometry(),X,oe,ye);if(!ju(X,oe))return!1;for(var $e=0,mt=Ie;$e<mt.length;$e+=1){var Ct=mt[$e];if(!fc(Ct,Me))return!1}}if(F.type==="MultiPolygon"){var _t=gu(F.coordinates,oe,ye),Kt=rh(I.geometry(),X,oe,ye);if(!ju(X,oe))return!1;for(var lr=0,tr=Kt;lr<tr.length;lr+=1){var wr=tr[lr];if(!Wl(wr,_t))return!1}}return!0}var ss=function(F,X){this.type=vn,this.geojson=F,this.geometries=X};ss.parse=function(F,X){if(F.length!==2)return X.error("'within' expression requires exactly one argument, but found "+(F.length-1)+" instead.");if(Xu(F[1])){var oe=F[1];if(oe.type==="FeatureCollection")for(var ye=0;ye<oe.features.length;++ye){var Me=oe.features[ye].geometry.type;if(Me==="Polygon"||Me==="MultiPolygon")return new ss(oe,oe.features[ye].geometry)}else if(oe.type==="Feature"){var Ie=oe.geometry.type;if(Ie==="Polygon"||Ie==="MultiPolygon")return new ss(oe,oe.geometry)}else if(oe.type==="Polygon"||oe.type==="MultiPolygon")return new ss(oe,oe)}return X.error("'within' expression requires valid geojson object that contains polygon geometry type.")},ss.prototype.evaluate=function(F){if(F.geometry()!=null&&F.canonicalID()!=null){if(F.geometryType()==="Point")return cc(F,this.geometries);if(F.geometryType()==="LineString")return pv(F,this.geometries)}return!1},ss.prototype.eachChild=function(){},ss.prototype.outputDefined=function(){return!0},ss.prototype.serialize=function(){return["within",this.geojson]};function Xl(I){if(I instanceof go){if(I.name==="get"&&I.args.length===1)return!1;if(I.name==="feature-state")return!1;if(I.name==="has"&&I.args.length===1)return!1;if(I.name==="properties"||I.name==="geometry-type"||I.name==="id")return!1;if(/^filter-/.test(I.name))return!1}if(I instanceof ss)return!1;var F=!0;return I.eachChild(function(X){F&&!Xl(X)&&(F=!1)}),F}function Ku(I){if(I instanceof go&&I.name==="feature-state")return!1;var F=!0;return I.eachChild(function(X){F&&!Ku(X)&&(F=!1)}),F}function yu(I,F){if(I instanceof go&&F.indexOf(I.name)>=0)return!1;var X=!0;return I.eachChild(function(oe){X&&!yu(oe,F)&&(X=!1)}),X}var Us=function(F,X){this.type=X.type,this.name=F,this.boundExpression=X};Us.parse=function(F,X){if(F.length!==2||typeof F[1]!="string")return X.error("'var' expression requires exactly one string literal argument.");var oe=F[1];return X.scope.has(oe)?new Us(oe,X.scope.get(oe)):X.error('Unknown variable "'+oe+'". Make sure "'+oe+'" has been bound in an enclosing "let" expression before using it.',1)},Us.prototype.evaluate=function(F){return this.boundExpression.evaluate(F)},Us.prototype.eachChild=function(){},Us.prototype.outputDefined=function(){return!1},Us.prototype.serialize=function(){return["var",this.name]};var il=function(F,X,oe,ye,Me){X===void 0&&(X=[]),ye===void 0&&(ye=new fn),Me===void 0&&(Me=[]),this.registry=F,this.path=X,this.key=X.map(function(Ie){return"["+Ie+"]"}).join(""),this.scope=ye,this.errors=Me,this.expectedType=oe};il.prototype.parse=function(F,X,oe,ye,Me){return Me===void 0&&(Me={}),X?this.concat(X,oe,ye)._parse(F,Me):this._parse(F,Me)},il.prototype._parse=function(F,X){(F===null||typeof F=="string"||typeof F=="boolean"||typeof F=="number")&&(F=["literal",F]);function oe(_t,Kt,lr){return lr==="assert"?new Lo(Kt,[_t]):lr==="coerce"?new po(Kt,[_t]):_t}if(Array.isArray(F)){if(F.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var ye=F[0];if(typeof ye!="string")return this.error("Expression name must be a string, but found "+typeof ye+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var Me=this.registry[ye];if(Me){var Ie=Me.parse(F,this);if(!Ie)return null;if(this.expectedType){var $e=this.expectedType,mt=Ie.type;if(($e.kind==="string"||$e.kind==="number"||$e.kind==="boolean"||$e.kind==="object"||$e.kind==="array")&&mt.kind==="value")Ie=oe(Ie,$e,X.typeAnnotation||"assert");else if(($e.kind==="color"||$e.kind==="formatted"||$e.kind==="resolvedImage")&&(mt.kind==="value"||mt.kind==="string"))Ie=oe(Ie,$e,X.typeAnnotation||"coerce");else if(this.checkSubtype($e,mt))return null}if(!(Ie instanceof Qo)&&Ie.type.kind!=="resolvedImage"&&hc(Ie)){var Ct=new Ns;try{Ie=new Qo(Ie.type,Ie.evaluate(Ct))}catch(_t){return this.error(_t.message),null}}return Ie}return this.error('Unknown expression "'+ye+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof F>"u"?this.error("'undefined' value invalid. Use null instead."):typeof F=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof F+" instead.")},il.prototype.concat=function(F,X,oe){var ye=typeof F=="number"?this.path.concat(F):this.path,Me=oe?this.scope.concat(oe):this.scope;return new il(this.registry,ye,X||null,Me,this.errors)},il.prototype.error=function(F){for(var X=[],oe=arguments.length-1;oe-- >0;)X[oe]=arguments[oe+1];var ye=""+this.key+X.map(function(Me){return"["+Me+"]"}).join("");this.errors.push(new wn(ye,F))},il.prototype.checkSubtype=function(F,X){var oe=Co(F,X);return oe&&this.error(oe),oe};function hc(I){if(I instanceof Us)return hc(I.boundExpression);if(I instanceof go&&I.name==="error")return!1;if(I instanceof nl)return!1;if(I instanceof ss)return!1;var F=I instanceof po||I instanceof Lo,X=!0;return I.eachChild(function(oe){F?X=X&&hc(oe):X=X&&oe instanceof Qo}),X?Xl(I)&&yu(I,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function mu(I,F){for(var X=I.length-1,oe=0,ye=X,Me=0,Ie,$e;oe<=ye;)if(Me=Math.floor((oe+ye)/2),Ie=I[Me],$e=I[Me+1],Ie<=F){if(Me===X||F<$e)return Me;oe=Me+1}else if(Ie>F)ye=Me-1;else throw new no("Input is not a number.");return 0}var Al=function(F,X,oe){this.type=F,this.input=X,this.labels=[],this.outputs=[];for(var ye=0,Me=oe;ye<Me.length;ye+=1){var Ie=Me[ye],$e=Ie[0],mt=Ie[1];this.labels.push($e),this.outputs.push(mt)}};Al.parse=function(F,X){if(F.length-1<4)return X.error("Expected at least 4 arguments, but found only "+(F.length-1)+".");if((F.length-1)%2!==0)return X.error("Expected an even number of arguments.");var oe=X.parse(F[1],1,Lr);if(!oe)return null;var ye=[],Me=null;X.expectedType&&X.expectedType.kind!=="value"&&(Me=X.expectedType);for(var Ie=1;Ie<F.length;Ie+=2){var $e=Ie===1?-1/0:F[Ie],mt=F[Ie+1],Ct=Ie,_t=Ie+1;if(typeof $e!="number")return X.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Ct);if(ye.length&&ye[ye.length-1][0]>=$e)return X.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Ct);var Kt=X.parse(mt,_t,Me);if(!Kt)return null;Me=Me||Kt.type,ye.push([$e,Kt])}return new Al(Me,oe,ye)},Al.prototype.evaluate=function(F){var X=this.labels,oe=this.outputs;if(X.length===1)return oe[0].evaluate(F);var ye=this.input.evaluate(F);if(ye<=X[0])return oe[0].evaluate(F);var Me=X.length;if(ye>=X[Me-1])return oe[Me-1].evaluate(F);var Ie=mu(X,ye);return oe[Ie].evaluate(F)},Al.prototype.eachChild=function(F){F(this.input);for(var X=0,oe=this.outputs;X<oe.length;X+=1){var ye=oe[X];F(ye)}},Al.prototype.outputDefined=function(){return this.outputs.every(function(F){return F.outputDefined()})},Al.prototype.serialize=function(){for(var F=["step",this.input.serialize()],X=0;X<this.labels.length;X++)X>0&&F.push(this.labels[X]),F.push(this.outputs[X].serialize());return F};function Zi(I,F,X){return I*(1-X)+F*X}function vc(I,F,X){return new oi(Zi(I.r,F.r,X),Zi(I.g,F.g,X),Zi(I.b,F.b,X),Zi(I.a,F.a,X))}function Pf(I,F,X){return I.map(function(oe,ye){return Zi(oe,F[ye],X)})}var xu=Object.freeze({__proto__:null,number:Zi,color:vc,array:Pf}),nh=.95047,ah=1,bu=1.08883,wu=4/29,co=6/29,_f=3*co*co,gv=co*co*co,dc=Math.PI/180,yv=180/Math.PI;function Rf(I){return I>gv?Math.pow(I,.3333333333333333):I/_f+wu}function Ju(I){return I>co?I*I*I:_f*(I-wu)}function pc(I){return 255*(I<=.0031308?12.92*I:1.055*Math.pow(I,.4166666666666667)-.055)}function gc(I){return I/=255,I<=.04045?I/12.92:Math.pow((I+.055)/1.055,2.4)}function $u(I){var F=gc(I.r),X=gc(I.g),oe=gc(I.b),ye=Rf((.4124564*F+.3575761*X+.1804375*oe)/nh),Me=Rf((.2126729*F+.7151522*X+.072175*oe)/ah),Ie=Rf((.0193339*F+.119192*X+.9503041*oe)/bu);return{l:116*Me-16,a:500*(ye-Me),b:200*(Me-Ie),alpha:I.a}}function yc(I){var F=(I.l+16)/116,X=isNaN(I.a)?F:F+I.a/500,oe=isNaN(I.b)?F:F-I.b/200;return F=ah*Ju(F),X=nh*Ju(X),oe=bu*Ju(oe),new oi(pc(3.2404542*X-1.5371385*F-.4985314*oe),pc(-.969266*X+1.8760108*F+.041556*oe),pc(.0556434*X-.2040259*F+1.0572252*oe),I.alpha)}function Df(I,F,X){return{l:Zi(I.l,F.l,X),a:Zi(I.a,F.a,X),b:Zi(I.b,F.b,X),alpha:Zi(I.alpha,F.alpha,X)}}function mc(I){var F=$u(I),X=F.l,oe=F.a,ye=F.b,Me=Math.atan2(ye,oe)*yv;return{h:Me<0?Me+360:Me,c:Math.sqrt(oe*oe+ye*ye),l:X,alpha:I.a}}function wi(I){var F=I.h*dc,X=I.c,oe=I.l;return yc({l:oe,a:Math.cos(F)*X,b:Math.sin(F)*X,alpha:I.alpha})}function ih(I,F,X){var oe=F-I;return I+X*(oe>180||oe<-180?oe-360*Math.round(oe/360):oe)}function xs(I,F,X){return{h:ih(I.h,F.h,X),c:Zi(I.c,F.c,X),l:Zi(I.l,F.l,X),alpha:Zi(I.alpha,F.alpha,X)}}var Tu={forward:$u,reverse:yc,interpolate:Df},Zl={forward:mc,reverse:wi,interpolate:xs},xc=Object.freeze({__proto__:null,lab:Tu,hcl:Zl}),Ji=function(F,X,oe,ye,Me){this.type=F,this.operator=X,this.interpolation=oe,this.input=ye,this.labels=[],this.outputs=[];for(var Ie=0,$e=Me;Ie<$e.length;Ie+=1){var mt=$e[Ie],Ct=mt[0],_t=mt[1];this.labels.push(Ct),this.outputs.push(_t)}};Ji.interpolationFactor=function(F,X,oe,ye){var Me=0;if(F.name==="exponential")Me=Qu(X,F.base,oe,ye);else if(F.name==="linear")Me=Qu(X,1,oe,ye);else if(F.name==="cubic-bezier"){var Ie=F.controlPoints,$e=new v(Ie[0],Ie[1],Ie[2],Ie[3]);Me=$e.solve(Qu(X,1,oe,ye))}return Me},Ji.parse=function(F,X){var oe=F[0],ye=F[1],Me=F[2],Ie=F.slice(3);if(!Array.isArray(ye)||ye.length===0)return X.error("Expected an interpolation type expression.",1);if(ye[0]==="linear")ye={name:"linear"};else if(ye[0]==="exponential"){var $e=ye[1];if(typeof $e!="number")return X.error("Exponential interpolation requires a numeric base.",1,1);ye={name:"exponential",base:$e}}else if(ye[0]==="cubic-bezier"){var mt=ye.slice(1);if(mt.length!==4||mt.some(function(qr){return typeof qr!="number"||qr<0||qr>1}))return X.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);ye={name:"cubic-bezier",controlPoints:mt}}else return X.error("Unknown interpolation type "+String(ye[0]),1,0);if(F.length-1<4)return X.error("Expected at least 4 arguments, but found only "+(F.length-1)+".");if((F.length-1)%2!==0)return X.error("Expected an even number of arguments.");if(Me=X.parse(Me,2,Lr),!Me)return null;var Ct=[],_t=null;oe==="interpolate-hcl"||oe==="interpolate-lab"?_t=kn:X.expectedType&&X.expectedType.kind!=="value"&&(_t=X.expectedType);for(var Kt=0;Kt<Ie.length;Kt+=2){var lr=Ie[Kt],tr=Ie[Kt+1],wr=Kt+3,Ur=Kt+4;if(typeof lr!="number")return X.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',wr);if(Ct.length&&Ct[Ct.length-1][0]>=lr)return X.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',wr);var rn=X.parse(tr,Ur,_t);if(!rn)return null;_t=_t||rn.type,Ct.push([lr,rn])}return _t.kind!=="number"&&_t.kind!=="color"&&!(_t.kind==="array"&&_t.itemType.kind==="number"&&typeof _t.N=="number")?X.error("Type "+ga(_t)+" is not interpolatable."):new Ji(_t,oe,ye,Me,Ct)},Ji.prototype.evaluate=function(F){var X=this.labels,oe=this.outputs;if(X.length===1)return oe[0].evaluate(F);var ye=this.input.evaluate(F);if(ye<=X[0])return oe[0].evaluate(F);var Me=X.length;if(ye>=X[Me-1])return oe[Me-1].evaluate(F);var Ie=mu(X,ye),$e=X[Ie],mt=X[Ie+1],Ct=Ji.interpolationFactor(this.interpolation,ye,$e,mt),_t=oe[Ie].evaluate(F),Kt=oe[Ie+1].evaluate(F);return this.operator==="interpolate"?xu[this.type.kind.toLowerCase()](_t,Kt,Ct):this.operator==="interpolate-hcl"?Zl.reverse(Zl.interpolate(Zl.forward(_t),Zl.forward(Kt),Ct)):Tu.reverse(Tu.interpolate(Tu.forward(_t),Tu.forward(Kt),Ct))},Ji.prototype.eachChild=function(F){F(this.input);for(var X=0,oe=this.outputs;X<oe.length;X+=1){var ye=oe[X];F(ye)}},Ji.prototype.outputDefined=function(){return this.outputs.every(function(F){return F.outputDefined()})},Ji.prototype.serialize=function(){var F;this.interpolation.name==="linear"?F=["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?F=["linear"]:F=["exponential",this.interpolation.base]:F=["cubic-bezier"].concat(this.interpolation.controlPoints);for(var X=[this.operator,F,this.input.serialize()],oe=0;oe<this.labels.length;oe++)X.push(this.labels[oe],this.outputs[oe].serialize());return X};function Qu(I,F,X,oe){var ye=oe-X,Me=I-X;return ye===0?0:F===1?Me/ye:(Math.pow(F,Me)-1)/(Math.pow(F,ye)-1)}var Go=function(F,X){this.type=F,this.args=X};Go.parse=function(F,X){if(F.length<2)return X.error("Expectected at least one argument.");var oe=null,ye=X.expectedType;ye&&ye.kind!=="value"&&(oe=ye);for(var Me=[],Ie=0,$e=F.slice(1);Ie<$e.length;Ie+=1){var mt=$e[Ie],Ct=X.parse(mt,1+Me.length,oe,void 0,{typeAnnotation:"omit"});if(!Ct)return null;oe=oe||Ct.type,Me.push(Ct)}var _t=ye&&Me.some(function(Kt){return Co(ye,Kt.type)});return _t?new Go(pn,Me):new Go(oe,Me)},Go.prototype.evaluate=function(F){for(var X=null,oe=0,ye,Me=0,Ie=this.args;Me<Ie.length;Me+=1){var $e=Ie[Me];if(oe++,X=$e.evaluate(F),X&&X instanceof Vo&&!X.available&&(ye||(ye=X.name),X=null,oe===this.args.length&&(X=ye)),X!==null)break}return X},Go.prototype.eachChild=function(F){this.args.forEach(F)},Go.prototype.outputDefined=function(){return this.args.every(function(F){return F.outputDefined()})},Go.prototype.serialize=function(){var F=["coalesce"];return this.eachChild(function(X){F.push(X.serialize())}),F};var ol=function(F,X){this.type=X.type,this.bindings=[].concat(F),this.result=X};ol.prototype.evaluate=function(F){return this.result.evaluate(F)},ol.prototype.eachChild=function(F){for(var X=0,oe=this.bindings;X<oe.length;X+=1){var ye=oe[X];F(ye[1])}F(this.result)},ol.parse=function(F,X){if(F.length<4)return X.error("Expected at least 3 arguments, but found "+(F.length-1)+" instead.");for(var oe=[],ye=1;ye<F.length-1;ye+=2){var Me=F[ye];if(typeof Me!="string")return X.error("Expected string, but found "+typeof Me+" instead.",ye);if(/[^a-zA-Z0-9_]/.test(Me))return X.error("Variable names must contain only alphanumeric characters or '_'.",ye);var Ie=X.parse(F[ye+1],ye+1);if(!Ie)return null;oe.push([Me,Ie])}var $e=X.parse(F[F.length-1],F.length-1,X.expectedType,oe);return $e?new ol(oe,$e):null},ol.prototype.outputDefined=function(){return this.result.outputDefined()},ol.prototype.serialize=function(){for(var F=["let"],X=0,oe=this.bindings;X<oe.length;X+=1){var ye=oe[X],Me=ye[0],Ie=ye[1];F.push(Me,Ie.serialize())}return F.push(this.result.serialize()),F};var sl=function(F,X,oe){this.type=F,this.index=X,this.input=oe};sl.parse=function(F,X){if(F.length!==3)return X.error("Expected 2 arguments, but found "+(F.length-1)+" instead.");var oe=X.parse(F[1],1,Lr),ye=X.parse(F[2],2,oa(X.expectedType||pn));if(!oe||!ye)return null;var Me=ye.type;return new sl(Me.itemType,oe,ye)},sl.prototype.evaluate=function(F){var X=this.index.evaluate(F),oe=this.input.evaluate(F);if(X<0)throw new no("Array index out of bounds: "+X+" < 0.");if(X>=oe.length)throw new no("Array index out of bounds: "+X+" > "+(oe.length-1)+".");if(X!==Math.floor(X))throw new no("Array index must be an integer, but found "+X+" instead.");return oe[X]},sl.prototype.eachChild=function(F){F(this.index),F(this.input)},sl.prototype.outputDefined=function(){return!1},sl.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Sl=function(F,X){this.type=vn,this.needle=F,this.haystack=X};Sl.parse=function(F,X){if(F.length!==3)return X.error("Expected 2 arguments, but found "+(F.length-1)+" instead.");var oe=X.parse(F[1],1,pn),ye=X.parse(F[2],2,pn);return!oe||!ye?null:Fo(oe.type,[vn,kr,Lr,Rr,pn])?new Sl(oe,ye):X.error("Expected first argument to be of type boolean, string, number or null, but found "+ga(oe.type)+" instead")},Sl.prototype.evaluate=function(F){var X=this.needle.evaluate(F),oe=this.haystack.evaluate(F);if(!oe)return!1;if(!Ho(X,["boolean","string","number","null"]))throw new no("Expected first argument to be of type boolean, string, number or null, but found "+ga(Ni(X))+" instead.");if(!Ho(oe,["string","array"]))throw new no("Expected second argument to be of type array or string, but found "+ga(Ni(oe))+" instead.");return oe.indexOf(X)>=0},Sl.prototype.eachChild=function(F){F(this.needle),F(this.haystack)},Sl.prototype.outputDefined=function(){return!0},Sl.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var El=function(F,X,oe){this.type=Lr,this.needle=F,this.haystack=X,this.fromIndex=oe};El.parse=function(F,X){if(F.length<=2||F.length>=5)return X.error("Expected 3 or 4 arguments, but found "+(F.length-1)+" instead.");var oe=X.parse(F[1],1,pn),ye=X.parse(F[2],2,pn);if(!oe||!ye)return null;if(!Fo(oe.type,[vn,kr,Lr,Rr,pn]))return X.error("Expected first argument to be of type boolean, string, number or null, but found "+ga(oe.type)+" instead");if(F.length===4){var Me=X.parse(F[3],3,Lr);return Me?new El(oe,ye,Me):null}else return new El(oe,ye)},El.prototype.evaluate=function(F){var X=this.needle.evaluate(F),oe=this.haystack.evaluate(F);if(!Ho(X,["boolean","string","number","null"]))throw new no("Expected first argument to be of type boolean, string, number or null, but found "+ga(Ni(X))+" instead.");if(!Ho(oe,["string","array"]))throw new no("Expected second argument to be of type array or string, but found "+ga(Ni(oe))+" instead.");if(this.fromIndex){var ye=this.fromIndex.evaluate(F);return oe.indexOf(X,ye)}return oe.indexOf(X)},El.prototype.eachChild=function(F){F(this.needle),F(this.haystack),this.fromIndex&&F(this.fromIndex)},El.prototype.outputDefined=function(){return!1},El.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var F=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),F]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Ml=function(F,X,oe,ye,Me,Ie){this.inputType=F,this.type=X,this.input=oe,this.cases=ye,this.outputs=Me,this.otherwise=Ie};Ml.parse=function(F,X){if(F.length<5)return X.error("Expected at least 4 arguments, but found only "+(F.length-1)+".");if(F.length%2!==1)return X.error("Expected an even number of arguments.");var oe,ye;X.expectedType&&X.expectedType.kind!=="value"&&(ye=X.expectedType);for(var Me={},Ie=[],$e=2;$e<F.length-1;$e+=2){var mt=F[$e],Ct=F[$e+1];Array.isArray(mt)||(mt=[mt]);var _t=X.concat($e);if(mt.length===0)return _t.error("Expected at least one branch label.");for(var Kt=0,lr=mt;Kt<lr.length;Kt+=1){var tr=lr[Kt];if(typeof tr!="number"&&typeof tr!="string")return _t.error("Branch labels must be numbers or strings.");if(typeof tr=="number"&&Math.abs(tr)>Number.MAX_SAFE_INTEGER)return _t.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof tr=="number"&&Math.floor(tr)!==tr)return _t.error("Numeric branch labels must be integer values.");if(!oe)oe=Ni(tr);else if(_t.checkSubtype(oe,Ni(tr)))return null;if(typeof Me[String(tr)]<"u")return _t.error("Branch labels must be unique.");Me[String(tr)]=Ie.length}var wr=X.parse(Ct,$e,ye);if(!wr)return null;ye=ye||wr.type,Ie.push(wr)}var Ur=X.parse(F[1],1,pn);if(!Ur)return null;var rn=X.parse(F[F.length-1],F.length-1,ye);return!rn||Ur.type.kind!=="value"&&X.concat(1).checkSubtype(oe,Ur.type)?null:new Ml(oe,ye,Ur,Me,Ie,rn)},Ml.prototype.evaluate=function(F){var X=this.input.evaluate(F),oe=Ni(X)===this.inputType&&this.outputs[this.cases[X]]||this.otherwise;return oe.evaluate(F)},Ml.prototype.eachChild=function(F){F(this.input),this.outputs.forEach(F),F(this.otherwise)},Ml.prototype.outputDefined=function(){return this.outputs.every(function(F){return F.outputDefined()})&&this.otherwise.outputDefined()},Ml.prototype.serialize=function(){for(var F=this,X=["match",this.input.serialize()],oe=Object.keys(this.cases).sort(),ye=[],Me={},Ie=0,$e=oe;Ie<$e.length;Ie+=1){var mt=$e[Ie],Ct=Me[this.cases[mt]];Ct===void 0?(Me[this.cases[mt]]=ye.length,ye.push([this.cases[mt],[mt]])):ye[Ct][1].push(mt)}for(var _t=function(Ur){return F.inputType.kind==="number"?Number(Ur):Ur},Kt=0,lr=ye;Kt<lr.length;Kt+=1){var tr=lr[Kt],Ct=tr[0],wr=tr[1];wr.length===1?X.push(_t(wr[0])):X.push(wr.map(_t)),X.push(this.outputs[outputIndex$1].serialize())}return X.push(this.otherwise.serialize()),X};var bs=function(F,X,oe){this.type=F,this.branches=X,this.otherwise=oe};bs.parse=function(F,X){if(F.length<4)return X.error("Expected at least 3 arguments, but found only "+(F.length-1)+".");if(F.length%2!==0)return X.error("Expected an odd number of arguments.");var oe;X.expectedType&&X.expectedType.kind!=="value"&&(oe=X.expectedType);for(var ye=[],Me=1;Me<F.length-1;Me+=2){var Ie=X.parse(F[Me],Me,vn);if(!Ie)return null;var $e=X.parse(F[Me+1],Me+1,oe);if(!$e)return null;ye.push([Ie,$e]),oe=oe||$e.type}var mt=X.parse(F[F.length-1],F.length-1,oe);return mt?new bs(oe,ye,mt):null},bs.prototype.evaluate=function(F){for(var X=0,oe=this.branches;X<oe.length;X+=1){var ye=oe[X],Me=ye[0],Ie=ye[1];if(Me.evaluate(F))return Ie.evaluate(F)}return this.otherwise.evaluate(F)},bs.prototype.eachChild=function(F){for(var X=0,oe=this.branches;X<oe.length;X+=1){var ye=oe[X],Me=ye[0],Ie=ye[1];F(Me),F(Ie)}F(this.otherwise)},bs.prototype.outputDefined=function(){return this.branches.every(function(F){F[0];var X=F[1];return X.outputDefined()})&&this.otherwise.outputDefined()},bs.prototype.serialize=function(){var F=["case"];return this.eachChild(function(X){F.push(X.serialize())}),F};var Hs=function(F,X,oe,ye){this.type=F,this.input=X,this.beginIndex=oe,this.endIndex=ye};Hs.parse=function(F,X){if(F.length<=2||F.length>=5)return X.error("Expected 3 or 4 arguments, but found "+(F.length-1)+" instead.");var oe=X.parse(F[1],1,pn),ye=X.parse(F[2],2,Lr);if(!oe||!ye)return null;if(!Fo(oe.type,[oa(pn),kr,pn]))return X.error("Expected first argument to be of type array or string, but found "+ga(oe.type)+" instead");if(F.length===4){var Me=X.parse(F[3],3,Lr);return Me?new Hs(oe.type,oe,ye,Me):null}else return new Hs(oe.type,oe,ye)},Hs.prototype.evaluate=function(F){var X=this.input.evaluate(F),oe=this.beginIndex.evaluate(F);if(!Ho(X,["string","array"]))throw new no("Expected first argument to be of type array or string, but found "+ga(Ni(X))+" instead.");if(this.endIndex){var ye=this.endIndex.evaluate(F);return X.slice(oe,ye)}return X.slice(oe)},Hs.prototype.eachChild=function(F){F(this.input),F(this.beginIndex),this.endIndex&&F(this.endIndex)},Hs.prototype.outputDefined=function(){return!1},Hs.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var F=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),F]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function qu(I,F){return I==="=="||I==="!="?F.kind==="boolean"||F.kind==="string"||F.kind==="number"||F.kind==="null"||F.kind==="value":F.kind==="string"||F.kind==="number"||F.kind==="value"}function ef(I,F,X){return F===X}function If(I,F,X){return F!==X}function mv(I,F,X){return F<X}function xv(I,F,X){return F>X}function bv(I,F,X){return F<=X}function wv(I,F,X){return F>=X}function Ff(I,F,X,oe){return oe.compare(F,X)===0}function oh(I,F,X,oe){return!Ff(I,F,X,oe)}function Au(I,F,X,oe){return oe.compare(F,X)<0}function yo(I,F,X,oe){return oe.compare(F,X)>0}function Wo(I,F,X,oe){return oe.compare(F,X)<=0}function tf(I,F,X,oe){return oe.compare(F,X)>=0}function jl(I,F,X){var oe=I!=="=="&&I!=="!=";return function(){function ye(Me,Ie,$e){this.type=vn,this.lhs=Me,this.rhs=Ie,this.collator=$e,this.hasUntypedArgument=Me.type.kind==="value"||Ie.type.kind==="value"}return ye.parse=function(Ie,$e){if(Ie.length!==3&&Ie.length!==4)return $e.error("Expected two or three arguments.");var mt=Ie[0],Ct=$e.parse(Ie[1],1,pn);if(!Ct)return null;if(!qu(mt,Ct.type))return $e.concat(1).error('"'+mt+`" comparisons are not supported for type '`+ga(Ct.type)+"'.");var _t=$e.parse(Ie[2],2,pn);if(!_t)return null;if(!qu(mt,_t.type))return $e.concat(2).error('"'+mt+`" comparisons are not supported for type '`+ga(_t.type)+"'.");if(Ct.type.kind!==_t.type.kind&&Ct.type.kind!=="value"&&_t.type.kind!=="value")return $e.error("Cannot compare types '"+ga(Ct.type)+"' and '"+ga(_t.type)+"'.");oe&&(Ct.type.kind==="value"&&_t.type.kind!=="value"?Ct=new Lo(_t.type,[Ct]):Ct.type.kind!=="value"&&_t.type.kind==="value"&&(_t=new Lo(Ct.type,[_t])));var Kt=null;if(Ie.length===4){if(Ct.type.kind!=="string"&&_t.type.kind!=="string"&&Ct.type.kind!=="value"&&_t.type.kind!=="value")return $e.error("Cannot use collator to compare non-string types.");if(Kt=$e.parse(Ie[3],3,qn),!Kt)return null}return new ye(Ct,_t,Kt)},ye.prototype.evaluate=function(Ie){var $e=this.lhs.evaluate(Ie),mt=this.rhs.evaluate(Ie);if(oe&&this.hasUntypedArgument){var Ct=Ni($e),_t=Ni(mt);if(Ct.kind!==_t.kind||!(Ct.kind==="string"||Ct.kind==="number"))throw new no('Expected arguments for "'+I+'" to be (string, string) or (number, number), but found ('+Ct.kind+", "+_t.kind+") instead.")}if(this.collator&&!oe&&this.hasUntypedArgument){var Kt=Ni($e),lr=Ni(mt);if(Kt.kind!=="string"||lr.kind!=="string")return F(Ie,$e,mt)}return this.collator?X(Ie,$e,mt,this.collator.evaluate(Ie)):F(Ie,$e,mt)},ye.prototype.eachChild=function(Ie){Ie(this.lhs),Ie(this.rhs),this.collator&&Ie(this.collator)},ye.prototype.outputDefined=function(){return!0},ye.prototype.serialize=function(){var Ie=[I];return this.eachChild(function($e){Ie.push($e.serialize())}),Ie},ye}()}var rf=jl("==",ef,Ff),kf=jl("!=",If,oh),Tv=jl("<",mv,Au),sh=jl(">",xv,yo),lh=jl("<=",bv,Wo),bc=jl(">=",wv,tf),Cl=function(F,X,oe,ye,Me){this.type=kr,this.number=F,this.locale=X,this.currency=oe,this.minFractionDigits=ye,this.maxFractionDigits=Me};Cl.parse=function(F,X){if(F.length!==3)return X.error("Expected two arguments.");var oe=X.parse(F[1],1,Lr);if(!oe)return null;var ye=F[2];if(typeof ye!="object"||Array.isArray(ye))return X.error("NumberFormat options argument must be an object.");var Me=null;if(ye.locale&&(Me=X.parse(ye.locale,1,kr),!Me))return null;var Ie=null;if(ye.currency&&(Ie=X.parse(ye.currency,1,kr),!Ie))return null;var $e=null;if(ye["min-fraction-digits"]&&($e=X.parse(ye["min-fraction-digits"],1,Lr),!$e))return null;var mt=null;return ye["max-fraction-digits"]&&(mt=X.parse(ye["max-fraction-digits"],1,Lr),!mt)?null:new Cl(oe,Me,Ie,$e,mt)},Cl.prototype.evaluate=function(F){return new Intl.NumberFormat(this.locale?this.locale.evaluate(F):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(F):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(F):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(F):void 0}).format(this.number.evaluate(F))},Cl.prototype.eachChild=function(F){F(this.number),this.locale&&F(this.locale),this.currency&&F(this.currency),this.minFractionDigits&&F(this.minFractionDigits),this.maxFractionDigits&&F(this.maxFractionDigits)},Cl.prototype.outputDefined=function(){return!1},Cl.prototype.serialize=function(){var F={};return this.locale&&(F.locale=this.locale.serialize()),this.currency&&(F.currency=this.currency.serialize()),this.minFractionDigits&&(F["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(F["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),F]};var $i=function(F){this.type=Lr,this.input=F};$i.parse=function(F,X){if(F.length!==2)return X.error("Expected 1 argument, but found "+(F.length-1)+" instead.");var oe=X.parse(F[1],1);return oe?oe.type.kind!=="array"&&oe.type.kind!=="string"&&oe.type.kind!=="value"?X.error("Expected argument of type string or array, but found "+ga(oe.type)+" instead."):new $i(oe):null},$i.prototype.evaluate=function(F){var X=this.input.evaluate(F);if(typeof X=="string")return X.length;if(Array.isArray(X))return X.length;throw new no("Expected value to be of type string or array, but found "+ga(Ni(X))+" instead.")},$i.prototype.eachChild=function(F){F(this.input)},$i.prototype.outputDefined=function(){return!1},$i.prototype.serialize=function(){var F=["length"];return this.eachChild(function(X){F.push(X.serialize())}),F};var Vs={"==":rf,"!=":kf,">":sh,"<":Tv,">=":bc,"<=":lh,array:Lo,at:sl,boolean:Lo,case:bs,coalesce:Go,collator:nl,format:os,image:zs,in:Sl,"index-of":El,interpolate:Ji,"interpolate-hcl":Ji,"interpolate-lab":Ji,length:$i,let:ol,literal:Qo,match:Ml,number:Lo,"number-format":Cl,object:Lo,slice:Hs,step:Al,string:Lo,"to-boolean":po,"to-color":po,"to-number":po,"to-string":po,var:Us,within:ss};function wc(I,F){var X=F[0],oe=F[1],ye=F[2],Me=F[3];X=X.evaluate(I),oe=oe.evaluate(I),ye=ye.evaluate(I);var Ie=Me?Me.evaluate(I):1,$e=qc(X,oe,ye,Ie);if($e)throw new no($e);return new oi(X/255*Ie,oe/255*Ie,ye/255*Ie,Ie)}function uh(I,F){return I in F}function Kl(I,F){var X=F[I];return typeof X>"u"?null:X}function Of(I,F,X,oe){for(;X<=oe;){var ye=X+oe>>1;if(F[ye]===I)return!0;F[ye]>I?oe=ye-1:X=ye+1}return!1}function ws(I){return{type:I}}go.register(Vs,{error:[zn,[kr],function(I,F){var X=F[0];throw new no(X.evaluate(I))}],typeof:[kr,[pn],function(I,F){var X=F[0];return ga(Ni(X.evaluate(I)))}],"to-rgba":[oa(Lr,4),[kn],function(I,F){var X=F[0];return X.evaluate(I).toArray()}],rgb:[kn,[Lr,Lr,Lr],wc],rgba:[kn,[Lr,Lr,Lr,Lr],wc],has:{type:vn,overloads:[[[kr],function(I,F){var X=F[0];return uh(X.evaluate(I),I.properties())}],[[kr,Yn],function(I,F){var X=F[0],oe=F[1];return uh(X.evaluate(I),oe.evaluate(I))}]]},get:{type:pn,overloads:[[[kr],function(I,F){var X=F[0];return Kl(X.evaluate(I),I.properties())}],[[kr,Yn],function(I,F){var X=F[0],oe=F[1];return Kl(X.evaluate(I),oe.evaluate(I))}]]},"feature-state":[pn,[kr],function(I,F){var X=F[0];return Kl(X.evaluate(I),I.featureState||{})}],properties:[Yn,[],function(I){return I.properties()}],"geometry-type":[kr,[],function(I){return I.geometryType()}],id:[pn,[],function(I){return I.id()}],zoom:[Lr,[],function(I){return I.globals.zoom}],"heatmap-density":[Lr,[],function(I){return I.globals.heatmapDensity||0}],"line-progress":[Lr,[],function(I){return I.globals.lineProgress||0}],accumulated:[pn,[],function(I){return I.globals.accumulated===void 0?null:I.globals.accumulated}],"+":[Lr,ws(Lr),function(I,F){for(var X=0,oe=0,ye=F;oe<ye.length;oe+=1){var Me=ye[oe];X+=Me.evaluate(I)}return X}],"*":[Lr,ws(Lr),function(I,F){for(var X=1,oe=0,ye=F;oe<ye.length;oe+=1){var Me=ye[oe];X*=Me.evaluate(I)}return X}],"-":{type:Lr,overloads:[[[Lr,Lr],function(I,F){var X=F[0],oe=F[1];return X.evaluate(I)-oe.evaluate(I)}],[[Lr],function(I,F){var X=F[0];return-X.evaluate(I)}]]},"/":[Lr,[Lr,Lr],function(I,F){var X=F[0],oe=F[1];return X.evaluate(I)/oe.evaluate(I)}],"%":[Lr,[Lr,Lr],function(I,F){var X=F[0],oe=F[1];return X.evaluate(I)%oe.evaluate(I)}],ln2:[Lr,[],function(){return Math.LN2}],pi:[Lr,[],function(){return Math.PI}],e:[Lr,[],function(){return Math.E}],"^":[Lr,[Lr,Lr],function(I,F){var X=F[0],oe=F[1];return Math.pow(X.evaluate(I),oe.evaluate(I))}],sqrt:[Lr,[Lr],function(I,F){var X=F[0];return Math.sqrt(X.evaluate(I))}],log10:[Lr,[Lr],function(I,F){var X=F[0];return Math.log(X.evaluate(I))/Math.LN10}],ln:[Lr,[Lr],function(I,F){var X=F[0];return Math.log(X.evaluate(I))}],log2:[Lr,[Lr],function(I,F){var X=F[0];return Math.log(X.evaluate(I))/Math.LN2}],sin:[Lr,[Lr],function(I,F){var X=F[0];return Math.sin(X.evaluate(I))}],cos:[Lr,[Lr],function(I,F){var X=F[0];return Math.cos(X.evaluate(I))}],tan:[Lr,[Lr],function(I,F){var X=F[0];return Math.tan(X.evaluate(I))}],asin:[Lr,[Lr],function(I,F){var X=F[0];return Math.asin(X.evaluate(I))}],acos:[Lr,[Lr],function(I,F){var X=F[0];return Math.acos(X.evaluate(I))}],atan:[Lr,[Lr],function(I,F){var X=F[0];return Math.atan(X.evaluate(I))}],min:[Lr,ws(Lr),function(I,F){return Math.min.apply(Math,F.map(function(X){return X.evaluate(I)}))}],max:[Lr,ws(Lr),function(I,F){return Math.max.apply(Math,F.map(function(X){return X.evaluate(I)}))}],abs:[Lr,[Lr],function(I,F){var X=F[0];return Math.abs(X.evaluate(I))}],round:[Lr,[Lr],function(I,F){var X=F[0],oe=X.evaluate(I);return oe<0?-Math.round(-oe):Math.round(oe)}],floor:[Lr,[Lr],function(I,F){var X=F[0];return Math.floor(X.evaluate(I))}],ceil:[Lr,[Lr],function(I,F){var X=F[0];return Math.ceil(X.evaluate(I))}],"filter-==":[vn,[kr,pn],function(I,F){var X=F[0],oe=F[1];return I.properties()[X.value]===oe.value}],"filter-id-==":[vn,[pn],function(I,F){var X=F[0];return I.id()===X.value}],"filter-type-==":[vn,[kr],function(I,F){var X=F[0];return I.geometryType()===X.value}],"filter-<":[vn,[kr,pn],function(I,F){var X=F[0],oe=F[1],ye=I.properties()[X.value],Me=oe.value;return typeof ye==typeof Me&&ye<Me}],"filter-id-<":[vn,[pn],function(I,F){var X=F[0],oe=I.id(),ye=X.value;return typeof oe==typeof ye&&oe<ye}],"filter->":[vn,[kr,pn],function(I,F){var X=F[0],oe=F[1],ye=I.properties()[X.value],Me=oe.value;return typeof ye==typeof Me&&ye>Me}],"filter-id->":[vn,[pn],function(I,F){var X=F[0],oe=I.id(),ye=X.value;return typeof oe==typeof ye&&oe>ye}],"filter-<=":[vn,[kr,pn],function(I,F){var X=F[0],oe=F[1],ye=I.properties()[X.value],Me=oe.value;return typeof ye==typeof Me&&ye<=Me}],"filter-id-<=":[vn,[pn],function(I,F){var X=F[0],oe=I.id(),ye=X.value;return typeof oe==typeof ye&&oe<=ye}],"filter->=":[vn,[kr,pn],function(I,F){var X=F[0],oe=F[1],ye=I.properties()[X.value],Me=oe.value;return typeof ye==typeof Me&&ye>=Me}],"filter-id->=":[vn,[pn],function(I,F){var X=F[0],oe=I.id(),ye=X.value;return typeof oe==typeof ye&&oe>=ye}],"filter-has":[vn,[pn],function(I,F){var X=F[0];return X.value in I.properties()}],"filter-has-id":[vn,[],function(I){return I.id()!==null&&I.id()!==void 0}],"filter-type-in":[vn,[oa(kr)],function(I,F){var X=F[0];return X.value.indexOf(I.geometryType())>=0}],"filter-id-in":[vn,[oa(pn)],function(I,F){var X=F[0];return X.value.indexOf(I.id())>=0}],"filter-in-small":[vn,[kr,oa(pn)],function(I,F){var X=F[0],oe=F[1];return oe.value.indexOf(I.properties()[X.value])>=0}],"filter-in-large":[vn,[kr,oa(pn)],function(I,F){var X=F[0],oe=F[1];return Of(I.properties()[X.value],oe.value,0,oe.value.length-1)}],all:{type:vn,overloads:[[[vn,vn],function(I,F){var X=F[0],oe=F[1];return X.evaluate(I)&&oe.evaluate(I)}],[ws(vn),function(I,F){for(var X=0,oe=F;X<oe.length;X+=1){var ye=oe[X];if(!ye.evaluate(I))return!1}return!0}]]},any:{type:vn,overloads:[[[vn,vn],function(I,F){var X=F[0],oe=F[1];return X.evaluate(I)||oe.evaluate(I)}],[ws(vn),function(I,F){for(var X=0,oe=F;X<oe.length;X+=1){var ye=oe[X];if(ye.evaluate(I))return!0}return!1}]]},"!":[vn,[vn],function(I,F){var X=F[0];return!X.evaluate(I)}],"is-supported-script":[vn,[kr],function(I,F){var X=F[0],oe=I.globals&&I.globals.isSupportedScript;return oe?oe(X.evaluate(I)):!0}],upcase:[kr,[kr],function(I,F){var X=F[0];return X.evaluate(I).toUpperCase()}],downcase:[kr,[kr],function(I,F){var X=F[0];return X.evaluate(I).toLowerCase()}],concat:[kr,ws(pn),function(I,F){return F.map(function(X){return Zu(X.evaluate(I))}).join("")}],"resolved-locale":[kr,[qn],function(I,F){var X=F[0];return X.evaluate(I).resolvedLocale()}]});function zf(I){return{result:"success",value:I}}function ll(I){return{result:"error",value:I}}function ul(I){return I["property-type"]==="data-driven"||I["property-type"]==="cross-faded-data-driven"}function Tc(I){return!!I.expression&&I.expression.parameters.indexOf("zoom")>-1}function Su(I){return!!I.expression&&I.expression.interpolated}function pi(I){return I instanceof Number?"number":I instanceof String?"string":I instanceof Boolean?"boolean":Array.isArray(I)?"array":I===null?"null":typeof I}function Jl(I){return typeof I=="object"&&I!==null&&!Array.isArray(I)}function Nf(I){return I}function Bf(I,F){var X=F.type==="color",oe=I.stops&&typeof I.stops[0][0]=="object",ye=oe||I.property!==void 0,Me=oe||!ye,Ie=I.type||(Su(F)?"exponential":"interval");if(X&&(I=cn({},I),I.stops&&(I.stops=I.stops.map(function($n){return[$n[0],oi.parse($n[1])]})),I.default?I.default=oi.parse(I.default):I.default=oi.parse(F.default)),I.colorSpace&&I.colorSpace!=="rgb"&&!xc[I.colorSpace])throw new Error("Unknown color space: "+I.colorSpace);var $e,mt,Ct;if(Ie==="exponential")$e=Eu;else if(Ie==="interval")$e=Ac;else if(Ie==="categorical"){$e=Av,mt=Object.create(null);for(var _t=0,Kt=I.stops;_t<Kt.length;_t+=1){var lr=Kt[_t];mt[lr[0]]=lr[1]}Ct=typeof I.stops[0][0]}else if(Ie==="identity")$e=Sc;else throw new Error('Unknown function type "'+Ie+'"');if(oe){for(var tr={},wr=[],Ur=0;Ur<I.stops.length;Ur++){var rn=I.stops[Ur],qr=rn[0].zoom;tr[qr]===void 0&&(tr[qr]={zoom:qr,type:I.type,property:I.property,default:I.default,stops:[]},wr.push(qr)),tr[qr].stops.push([rn[0].value,rn[1]])}for(var Mn=[],yn=0,En=wr;yn<En.length;yn+=1){var In=En[yn];Mn.push([tr[In].zoom,Bf(tr[In],F)])}var Hn={name:"linear"};return{kind:"composite",interpolationType:Hn,interpolationFactor:Ji.interpolationFactor.bind(void 0,Hn),zoomStops:Mn.map(function($n){return $n[0]}),evaluate:function(La,va){var xa=La.zoom;return Eu({stops:Mn,base:I.base},F,xa).evaluate(xa,va)}}}else if(Me){var Qn=Ie==="exponential"?{name:"exponential",base:I.base!==void 0?I.base:1}:null;return{kind:"camera",interpolationType:Qn,interpolationFactor:Ji.interpolationFactor.bind(void 0,Qn),zoomStops:I.stops.map(function($n){return $n[0]}),evaluate:function($n){var La=$n.zoom;return $e(I,F,La,mt,Ct)}}}else return{kind:"source",evaluate:function(La,va){var xa=va&&va.properties?va.properties[I.property]:void 0;return xa===void 0?Ll(I.default,F.default):$e(I,F,xa,mt,Ct)}}}function Ll(I,F,X){if(I!==void 0)return I;if(F!==void 0)return F;if(X!==void 0)return X}function Av(I,F,X,oe,ye){var Me=typeof X===ye?oe[X]:void 0;return Ll(Me,I.default,F.default)}function Ac(I,F,X){if(pi(X)!=="number")return Ll(I.default,F.default);var oe=I.stops.length;if(oe===1||X<=I.stops[0][0])return I.stops[0][1];if(X>=I.stops[oe-1][0])return I.stops[oe-1][1];var ye=mu(I.stops.map(function(Me){return Me[0]}),X);return I.stops[ye][1]}function Eu(I,F,X){var oe=I.base!==void 0?I.base:1;if(pi(X)!=="number")return Ll(I.default,F.default);var ye=I.stops.length;if(ye===1||X<=I.stops[0][0])return I.stops[0][1];if(X>=I.stops[ye-1][0])return I.stops[ye-1][1];var Me=mu(I.stops.map(function(Kt){return Kt[0]}),X),Ie=fh(X,oe,I.stops[Me][0],I.stops[Me+1][0]),$e=I.stops[Me][1],mt=I.stops[Me+1][1],Ct=xu[F.type]||Nf;if(I.colorSpace&&I.colorSpace!=="rgb"){var _t=xc[I.colorSpace];Ct=function(Kt,lr){return _t.reverse(_t.interpolate(_t.forward(Kt),_t.forward(lr),Ie))}}return typeof $e.evaluate=="function"?{evaluate:function(){for(var lr=[],tr=arguments.length;tr--;)lr[tr]=arguments[tr];var wr=$e.evaluate.apply(void 0,lr),Ur=mt.evaluate.apply(void 0,lr);if(!(wr===void 0||Ur===void 0))return Ct(wr,Ur,Ie)}}:Ct($e,mt,Ie)}function Sc(I,F,X){return F.type==="color"?X=oi.parse(X):F.type==="formatted"?X=fo.fromString(X.toString()):F.type==="resolvedImage"?X=Vo.fromString(X.toString()):pi(X)!==F.type&&(F.type!=="enum"||!F.values[X])&&(X=void 0),Ll(X,I.default,F.default)}function fh(I,F,X,oe){var ye=oe-X,Me=I-X;return ye===0?0:F===1?Me/ye:(Math.pow(F,Me)-1)/(Math.pow(F,ye)-1)}var fl=function(F,X){this.expression=F,this._warningHistory={},this._evaluator=new Ns,this._defaultValue=X?hh(X):null,this._enumValues=X&&X.type==="enum"?X.values:null};fl.prototype.evaluateWithoutErrorHandling=function(F,X,oe,ye,Me,Ie){return this._evaluator.globals=F,this._evaluator.feature=X,this._evaluator.featureState=oe,this._evaluator.canonical=ye,this._evaluator.availableImages=Me||null,this._evaluator.formattedSection=Ie,this.expression.evaluate(this._evaluator)},fl.prototype.evaluate=function(F,X,oe,ye,Me,Ie){this._evaluator.globals=F,this._evaluator.feature=X||null,this._evaluator.featureState=oe||null,this._evaluator.canonical=ye,this._evaluator.availableImages=Me||null,this._evaluator.formattedSection=Ie||null;try{var $e=this.expression.evaluate(this._evaluator);if($e==null||typeof $e=="number"&&$e!==$e)return this._defaultValue;if(this._enumValues&&!($e in this._enumValues))throw new no("Expected value to be one of "+Object.keys(this._enumValues).map(function(mt){return JSON.stringify(mt)}).join(", ")+", but found "+JSON.stringify($e)+" instead.");return $e}catch(mt){return this._warningHistory[mt.message]||(this._warningHistory[mt.message]=!0,typeof console<"u"&&console.warn(mt.message)),this._defaultValue}};function Pl(I){return Array.isArray(I)&&I.length>0&&typeof I[0]=="string"&&I[0]in Vs}function $l(I,F){var X=new il(Vs,[],F?Uf(F):void 0),oe=X.parse(I,void 0,void 0,void 0,F&&F.type==="string"?{typeAnnotation:"coerce"}:void 0);return oe?zf(new fl(oe,F)):ll(X.errors)}var Ql=function(F,X){this.kind=F,this._styleExpression=X,this.isStateDependent=F!=="constant"&&!Ku(X.expression)};Ql.prototype.evaluateWithoutErrorHandling=function(F,X,oe,ye,Me,Ie){return this._styleExpression.evaluateWithoutErrorHandling(F,X,oe,ye,Me,Ie)},Ql.prototype.evaluate=function(F,X,oe,ye,Me,Ie){return this._styleExpression.evaluate(F,X,oe,ye,Me,Ie)};var Yo=function(F,X,oe,ye){this.kind=F,this.zoomStops=oe,this._styleExpression=X,this.isStateDependent=F!=="camera"&&!Ku(X.expression),this.interpolationType=ye};Yo.prototype.evaluateWithoutErrorHandling=function(F,X,oe,ye,Me,Ie){return this._styleExpression.evaluateWithoutErrorHandling(F,X,oe,ye,Me,Ie)},Yo.prototype.evaluate=function(F,X,oe,ye,Me,Ie){return this._styleExpression.evaluate(F,X,oe,ye,Me,Ie)},Yo.prototype.interpolationFactor=function(F,X,oe){return this.interpolationType?Ji.interpolationFactor(this.interpolationType,F,X,oe):0};function es(I,F){if(I=$l(I,F),I.result==="error")return I;var X=I.value.expression,oe=Xl(X);if(!oe&&!ul(F))return ll([new wn("","data expressions not supported")]);var ye=yu(X,["zoom"]);if(!ye&&!Tc(F))return ll([new wn("","zoom expressions not supported")]);var Me=Mu(X);if(!Me&&!ye)return ll([new wn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(Me instanceof wn)return ll([Me]);if(Me instanceof Ji&&!Su(F))return ll([new wn("",'"interpolate" expressions cannot be used with this property')]);if(!Me)return zf(oe?new Ql("constant",I.value):new Ql("source",I.value));var Ie=Me instanceof Ji?Me.interpolation:void 0;return zf(oe?new Yo("camera",I.value,Me.labels,Ie):new Yo("composite",I.value,Me.labels,Ie))}var ql=function(F,X){this._parameters=F,this._specification=X,cn(this,Bf(this._parameters,this._specification))};ql.deserialize=function(F){return new ql(F._parameters,F._specification)},ql.serialize=function(F){return{_parameters:F._parameters,_specification:F._specification}};function ch(I,F){if(Jl(I))return new ql(I,F);if(Pl(I)){var X=es(I,F);if(X.result==="error")throw new Error(X.value.map(function(ye){return ye.key+": "+ye.message}).join(", "));return X.value}else{var oe=I;return typeof I=="string"&&F.type==="color"&&(oe=oi.parse(I)),{kind:"constant",evaluate:function(){return oe}}}}function Mu(I){var F=null;if(I instanceof ol)F=Mu(I.result);else if(I instanceof Go)for(var X=0,oe=I.args;X<oe.length;X+=1){var ye=oe[X];if(F=Mu(ye),F)break}else(I instanceof Al||I instanceof Ji)&&I.input instanceof go&&I.input.name==="zoom"&&(F=I);return F instanceof wn||I.eachChild(function(Me){var Ie=Mu(Me);Ie instanceof wn?F=Ie:!F&&Ie?F=new wn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):F&&Ie&&F!==Ie&&(F=new wn("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),F}function Uf(I){var F={color:kn,string:kr,number:Lr,enum:kr,boolean:vn,formatted:ua,resolvedImage:ia};return I.type==="array"?oa(F[I.value]||pn,I.length):F[I.type]}function hh(I){return I.type==="color"&&Jl(I.default)?new oi(0,0,0,0):I.type==="color"?oi.parse(I.default)||null:I.default===void 0?null:I.default}function Ts(I){var F=I.key,X=I.value,oe=I.valueSpec||{},ye=I.objectElementValidators||{},Me=I.style,Ie=I.styleSpec,$e=[],mt=pi(X);if(mt!=="object")return[new Sr(F,X,"object expected, "+mt+" found")];for(var Ct in X){var _t=Ct.split(".")[0],Kt=oe[_t]||oe["*"],lr=void 0;if(ye[_t])lr=ye[_t];else if(oe[_t])lr=sr;else if(ye["*"])lr=ye["*"];else if(oe["*"])lr=sr;else{$e.push(new Sr(F,X[Ct],'unknown property "'+Ct+'"'));continue}$e=$e.concat(lr({key:(F&&F+".")+Ct,value:X[Ct],valueSpec:Kt,style:Me,styleSpec:Ie,object:X,objectKey:Ct},X))}for(var tr in oe)ye[tr]||oe[tr].required&&oe[tr].default===void 0&&X[tr]===void 0&&$e.push(new Sr(F,X,'missing required property "'+tr+'"'));return $e}function Ec(I){var F=I.value,X=I.valueSpec,oe=I.style,ye=I.styleSpec,Me=I.key,Ie=I.arrayElementValidator||sr;if(pi(F)!=="array")return[new Sr(Me,F,"array expected, "+pi(F)+" found")];if(X.length&&F.length!==X.length)return[new Sr(Me,F,"array length "+X.length+" expected, length "+F.length+" found")];if(X["min-length"]&&F.length<X["min-length"])return[new Sr(Me,F,"array length at least "+X["min-length"]+" expected, length "+F.length+" found")];var $e={type:X.value,values:X.values};ye.$version<7&&($e.function=X.function),pi(X.value)==="object"&&($e=X.value);for(var mt=[],Ct=0;Ct<F.length;Ct++)mt=mt.concat(Ie({array:F,arrayIndex:Ct,value:F[Ct],valueSpec:$e,style:oe,styleSpec:ye,key:Me+"["+Ct+"]"}));return mt}function _l(I){var F=I.key,X=I.value,oe=I.valueSpec,ye=pi(X);return ye==="number"&&X!==X&&(ye="NaN"),ye!=="number"?[new Sr(F,X,"number expected, "+ye+" found")]:"minimum"in oe&&X<oe.minimum?[new Sr(F,X,X+" is less than the minimum value "+oe.minimum)]:"maximum"in oe&&X>oe.maximum?[new Sr(F,X,X+" is greater than the maximum value "+oe.maximum)]:[]}function nf(I){var F=I.valueSpec,X=hn(I.value.type),oe,ye={},Me,Ie,$e=X!=="categorical"&&I.value.property===void 0,mt=!$e,Ct=pi(I.value.stops)==="array"&&pi(I.value.stops[0])==="array"&&pi(I.value.stops[0][0])==="object",_t=Ts({key:I.key,value:I.value,valueSpec:I.styleSpec.function,style:I.style,styleSpec:I.styleSpec,objectElementValidators:{stops:Kt,default:wr}});return X==="identity"&&$e&&_t.push(new Sr(I.key,I.value,'missing required property "property"')),X!=="identity"&&!I.value.stops&&_t.push(new Sr(I.key,I.value,'missing required property "stops"')),X==="exponential"&&I.valueSpec.expression&&!Su(I.valueSpec)&&_t.push(new Sr(I.key,I.value,"exponential functions not supported")),I.styleSpec.$version>=8&&(mt&&!ul(I.valueSpec)?_t.push(new Sr(I.key,I.value,"property functions not supported")):$e&&!Tc(I.valueSpec)&&_t.push(new Sr(I.key,I.value,"zoom functions not supported"))),(X==="categorical"||Ct)&&I.value.property===void 0&&_t.push(new Sr(I.key,I.value,'"property" property is required')),_t;function Kt(Ur){if(X==="identity")return[new Sr(Ur.key,Ur.value,'identity function may not have a "stops" property')];var rn=[],qr=Ur.value;return rn=rn.concat(Ec({key:Ur.key,value:qr,valueSpec:Ur.valueSpec,style:Ur.style,styleSpec:Ur.styleSpec,arrayElementValidator:lr})),pi(qr)==="array"&&qr.length===0&&rn.push(new Sr(Ur.key,qr,"array must have at least one stop")),rn}function lr(Ur){var rn=[],qr=Ur.value,Mn=Ur.key;if(pi(qr)!=="array")return[new Sr(Mn,qr,"array expected, "+pi(qr)+" found")];if(qr.length!==2)return[new Sr(Mn,qr,"array length 2 expected, length "+qr.length+" found")];if(Ct){if(pi(qr[0])!=="object")return[new Sr(Mn,qr,"object expected, "+pi(qr[0])+" found")];if(qr[0].zoom===void 0)return[new Sr(Mn,qr,"object stop key must have zoom")];if(qr[0].value===void 0)return[new Sr(Mn,qr,"object stop key must have value")];if(Ie&&Ie>hn(qr[0].zoom))return[new Sr(Mn,qr[0].zoom,"stop zoom values must appear in ascending order")];hn(qr[0].zoom)!==Ie&&(Ie=hn(qr[0].zoom),Me=void 0,ye={}),rn=rn.concat(Ts({key:Mn+"[0]",value:qr[0],valueSpec:{zoom:{}},style:Ur.style,styleSpec:Ur.styleSpec,objectElementValidators:{zoom:_l,value:tr}}))}else rn=rn.concat(tr({key:Mn+"[0]",value:qr[0],valueSpec:{},style:Ur.style,styleSpec:Ur.styleSpec},qr));return Pl(_n(qr[1]))?rn.concat([new Sr(Mn+"[1]",qr[1],"expressions are not allowed in function stops.")]):rn.concat(sr({key:Mn+"[1]",value:qr[1],valueSpec:F,style:Ur.style,styleSpec:Ur.styleSpec}))}function tr(Ur,rn){var qr=pi(Ur.value),Mn=hn(Ur.value),yn=Ur.value!==null?Ur.value:rn;if(!oe)oe=qr;else if(qr!==oe)return[new Sr(Ur.key,yn,qr+" stop domain type must match previous stop domain type "+oe)];if(qr!=="number"&&qr!=="string"&&qr!=="boolean")return[new Sr(Ur.key,yn,"stop domain value must be a number, string, or boolean")];if(qr!=="number"&&X!=="categorical"){var En="number expected, "+qr+" found";return ul(F)&&X===void 0&&(En+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Sr(Ur.key,yn,En)]}return X==="categorical"&&qr==="number"&&(!isFinite(Mn)||Math.floor(Mn)!==Mn)?[new Sr(Ur.key,yn,"integer expected, found "+Mn)]:X!=="categorical"&&qr==="number"&&Me!==void 0&&Mn<Me?[new Sr(Ur.key,yn,"stop domain values must appear in ascending order")]:(Me=Mn,X==="categorical"&&Mn in ye?[new Sr(Ur.key,yn,"stop domain values must be unique")]:(ye[Mn]=!0,[]))}function wr(Ur){return sr({key:Ur.key,value:Ur.value,valueSpec:F,style:Ur.style,styleSpec:Ur.styleSpec})}}function cl(I){var F=(I.expressionContext==="property"?es:$l)(_n(I.value),I.valueSpec);if(F.result==="error")return F.value.map(function(oe){return new Sr(""+I.key+oe.key,I.value,oe.message)});var X=F.value.expression||F.value._styleExpression.expression;if(I.expressionContext==="property"&&I.propertyKey==="text-font"&&!X.outputDefined())return[new Sr(I.key,I.value,'Invalid data expression for "'+I.propertyKey+'". Output values must be contained as literals within the expression.')];if(I.expressionContext==="property"&&I.propertyType==="layout"&&!Ku(X))return[new Sr(I.key,I.value,'"feature-state" data expressions are not supported with layout properties.')];if(I.expressionContext==="filter"&&!Ku(X))return[new Sr(I.key,I.value,'"feature-state" data expressions are not supported with filters.')];if(I.expressionContext&&I.expressionContext.indexOf("cluster")===0){if(!yu(X,["zoom","feature-state"]))return[new Sr(I.key,I.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(I.expressionContext==="cluster-initial"&&!Xl(X))return[new Sr(I.key,I.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Sv(I){var F=I.value,X=I.key,oe=pi(F);return oe!=="boolean"?[new Sr(X,F,"boolean expected, "+oe+" found")]:[]}function Mc(I){var F=I.key,X=I.value,oe=pi(X);return oe!=="string"?[new Sr(F,X,"color expected, "+oe+" found")]:ic(X)===null?[new Sr(F,X,'color expected, "'+X+'" found')]:[]}function Hf(I){var F=I.key,X=I.value,oe=I.valueSpec,ye=[];return Array.isArray(oe.values)?oe.values.indexOf(hn(X))===-1&&ye.push(new Sr(F,X,"expected one of ["+oe.values.join(", ")+"], "+JSON.stringify(X)+" found")):Object.keys(oe.values).indexOf(hn(X))===-1&&ye.push(new Sr(F,X,"expected one of ["+Object.keys(oe.values).join(", ")+"], "+JSON.stringify(X)+" found")),ye}function Po(I){if(I===!0||I===!1)return!0;if(!Array.isArray(I)||I.length===0)return!1;switch(I[0]){case"has":return I.length>=2&&I[1]!=="$id"&&I[1]!=="$type";case"in":return I.length>=3&&(typeof I[1]!="string"||Array.isArray(I[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return I.length!==3||Array.isArray(I[1])||Array.isArray(I[2]);case"any":case"all":for(var F=0,X=I.slice(1);F<X.length;F+=1){var oe=X[F];if(!Po(oe)&&typeof oe!="boolean")return!1}return!0;default:return!0}}var vh={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function af(I){if(I==null)return{filter:function(){return!0},needGeometry:!1};Po(I)||(I=Rl(I));var F=$l(I,vh);if(F.result==="error")throw new Error(F.value.map(function(oe){return oe.key+": "+oe.message}).join(", "));var X=of(I);return{filter:function(oe,ye,Me){return F.value.evaluate(oe,ye,{},Me)},needGeometry:X}}function Gs(I,F){return I<F?-1:I>F?1:0}function of(I){if(!Array.isArray(I))return!1;if(I[0]==="within")return!0;for(var F=1;F<I.length;F++)if(of(I[F]))return!0;return!1}function Rl(I){if(!I)return!0;var F=I[0];if(I.length<=1)return F!=="any";var X=F==="=="?Vf(I[1],I[2],"=="):F==="!="?eu(Vf(I[1],I[2],"==")):F==="<"||F===">"||F==="<="||F===">="?Vf(I[1],I[2],F):F==="any"?dh(I.slice(1)):F==="all"?["all"].concat(I.slice(1).map(Rl)):F==="none"?["all"].concat(I.slice(1).map(Rl).map(eu)):F==="in"?Cc(I[1],I.slice(2)):F==="!in"?eu(Cc(I[1],I.slice(2))):F==="has"?Lc(I[1]):F==="!has"?eu(Lc(I[1])):F==="within"?I:!0;return X}function Vf(I,F,X){switch(I){case"$type":return["filter-type-"+X,F];case"$id":return["filter-id-"+X,F];default:return["filter-"+X,I,F]}}function dh(I){return["any"].concat(I.map(Rl))}function Cc(I,F){if(F.length===0)return!1;switch(I){case"$type":return["filter-type-in",["literal",F]];case"$id":return["filter-id-in",["literal",F]];default:return F.length>200&&!F.some(function(X){return typeof X!=typeof F[0]})?["filter-in-large",I,["literal",F.sort(Gs)]]:["filter-in-small",I,["literal",F]]}}function Lc(I){switch(I){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",I]}}function eu(I){return["!",I]}function Gf(I){return Po(_n(I.value))?cl(cn({},I,{expressionContext:"filter",valueSpec:{value:"boolean"}})):sf(I)}function sf(I){var F=I.value,X=I.key;if(pi(F)!=="array")return[new Sr(X,F,"array expected, "+pi(F)+" found")];var oe=I.styleSpec,ye,Me=[];if(F.length<1)return[new Sr(X,F,"filter array must have at least 1 element")];switch(Me=Me.concat(Hf({key:X+"[0]",value:F[0],valueSpec:oe.filter_operator,style:I.style,styleSpec:I.styleSpec})),hn(F[0])){case"<":case"<=":case">":case">=":F.length>=2&&hn(F[1])==="$type"&&Me.push(new Sr(X,F,'"$type" cannot be use with operator "'+F[0]+'"'));case"==":case"!=":F.length!==3&&Me.push(new Sr(X,F,'filter array for operator "'+F[0]+'" must have 3 elements'));case"in":case"!in":F.length>=2&&(ye=pi(F[1]),ye!=="string"&&Me.push(new Sr(X+"[1]",F[1],"string expected, "+ye+" found")));for(var Ie=2;Ie<F.length;Ie++)ye=pi(F[Ie]),hn(F[1])==="$type"?Me=Me.concat(Hf({key:X+"["+Ie+"]",value:F[Ie],valueSpec:oe.geometry_type,style:I.style,styleSpec:I.styleSpec})):ye!=="string"&&ye!=="number"&&ye!=="boolean"&&Me.push(new Sr(X+"["+Ie+"]",F[Ie],"string, number, or boolean expected, "+ye+" found"));break;case"any":case"all":case"none":for(var $e=1;$e<F.length;$e++)Me=Me.concat(sf({key:X+"["+$e+"]",value:F[$e],style:I.style,styleSpec:I.styleSpec}));break;case"has":case"!has":ye=pi(F[1]),F.length!==2?Me.push(new Sr(X,F,'filter array for "'+F[0]+'" operator must have 2 elements')):ye!=="string"&&Me.push(new Sr(X+"[1]",F[1],"string expected, "+ye+" found"));break;case"within":ye=pi(F[1]),F.length!==2?Me.push(new Sr(X,F,'filter array for "'+F[0]+'" operator must have 2 elements')):ye!=="object"&&Me.push(new Sr(X+"[1]",F[1],"object expected, "+ye+" found"));break}return Me}function ph(I,F){var X=I.key,oe=I.style,ye=I.styleSpec,Me=I.value,Ie=I.objectKey,$e=ye[F+"_"+I.layerType];if(!$e)return[];var mt=Ie.match(/^(.*)-transition$/);if(F==="paint"&&mt&&$e[mt[1]]&&$e[mt[1]].transition)return sr({key:X,value:Me,valueSpec:ye.transition,style:oe,styleSpec:ye});var Ct=I.valueSpec||$e[Ie];if(!Ct)return[new Sr(X,Me,'unknown property "'+Ie+'"')];var _t;if(pi(Me)==="string"&&ul(Ct)&&!Ct.tokens&&(_t=/^{([^}]+)}$/.exec(Me)))return[new Sr(X,Me,'"'+Ie+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(_t[1])+" }`.")];var Kt=[];return I.layerType==="symbol"&&(Ie==="text-field"&&oe&&!oe.glyphs&&Kt.push(new Sr(X,Me,'use of "text-field" requires a style "glyphs" property')),Ie==="text-font"&&Jl(_n(Me))&&hn(Me.type)==="identity"&&Kt.push(new Sr(X,Me,'"text-font" does not support identity functions'))),Kt.concat(sr({key:I.key,value:Me,valueSpec:Ct,style:oe,styleSpec:ye,expressionContext:"property",propertyType:F,propertyKey:Ie}))}function lf(I){return ph(I,"paint")}function gh(I){return ph(I,"layout")}function Je(I){var F=[],X=I.value,oe=I.key,ye=I.style,Me=I.styleSpec;!X.type&&!X.ref&&F.push(new Sr(oe,X,'either "type" or "ref" is required'));var Ie=hn(X.type),$e=hn(X.ref);if(X.id)for(var mt=hn(X.id),Ct=0;Ct<I.arrayIndex;Ct++){var _t=ye.layers[Ct];hn(_t.id)===mt&&F.push(new Sr(oe,X.id,'duplicate layer id "'+X.id+'", previously used at line '+_t.id.__line__))}if("ref"in X){["type","source","source-layer","filter","layout"].forEach(function(wr){wr in X&&F.push(new Sr(oe,X[wr],'"'+wr+'" is prohibited for ref layers'))});var Kt;ye.layers.forEach(function(wr){hn(wr.id)===$e&&(Kt=wr)}),Kt?Kt.ref?F.push(new Sr(oe,X.ref,"ref cannot reference another ref layer")):Ie=hn(Kt.type):F.push(new Sr(oe,X.ref,'ref layer "'+$e+'" not found'))}else if(Ie!=="background")if(!X.source)F.push(new Sr(oe,X,'missing required property "source"'));else{var lr=ye.sources&&ye.sources[X.source],tr=lr&&hn(lr.type);lr?tr==="vector"&&Ie==="raster"?F.push(new Sr(oe,X.source,'layer "'+X.id+'" requires a raster source')):tr==="raster"&&Ie!=="raster"?F.push(new Sr(oe,X.source,'layer "'+X.id+'" requires a vector source')):tr==="vector"&&!X["source-layer"]?F.push(new Sr(oe,X,'layer "'+X.id+'" must specify a "source-layer"')):tr==="raster-dem"&&Ie!=="hillshade"?F.push(new Sr(oe,X.source,"raster-dem source can only be used with layer type 'hillshade'.")):Ie==="line"&&X.paint&&X.paint["line-gradient"]&&(tr!=="geojson"||!lr.lineMetrics)&&F.push(new Sr(oe,X,'layer "'+X.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):F.push(new Sr(oe,X.source,'source "'+X.source+'" not found'))}return F=F.concat(Ts({key:oe,value:X,valueSpec:Me.layer,style:I.style,styleSpec:I.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return sr({key:oe+".type",value:X.type,valueSpec:Me.layer.type,style:I.style,styleSpec:I.styleSpec,object:X,objectKey:"type"})},filter:Gf,layout:function(Ur){return Ts({layer:X,key:Ur.key,value:Ur.value,style:Ur.style,styleSpec:Ur.styleSpec,objectElementValidators:{"*":function(qr){return gh(cn({layerType:Ie},qr))}}})},paint:function(Ur){return Ts({layer:X,key:Ur.key,value:Ur.value,style:Ur.style,styleSpec:Ur.styleSpec,objectElementValidators:{"*":function(qr){return lf(cn({layerType:Ie},qr))}}})}}})),F}function ot(I){var F=I.value,X=I.key,oe=pi(F);return oe!=="string"?[new Sr(X,F,"string expected, "+oe+" found")]:[]}var bt={promoteId:Ot};function At(I){var F=I.value,X=I.key,oe=I.styleSpec,ye=I.style;if(!F.type)return[new Sr(X,F,'"type" is required')];var Me=hn(F.type),Ie;switch(Me){case"vector":case"raster":case"raster-dem":return Ie=Ts({key:X,value:F,valueSpec:oe["source_"+Me.replace("-","_")],style:I.style,styleSpec:oe,objectElementValidators:bt}),Ie;case"geojson":if(Ie=Ts({key:X,value:F,valueSpec:oe.source_geojson,style:ye,styleSpec:oe,objectElementValidators:bt}),F.cluster)for(var $e in F.clusterProperties){var mt=F.clusterProperties[$e],Ct=mt[0],_t=mt[1],Kt=typeof Ct=="string"?[Ct,["accumulated"],["get",$e]]:Ct;Ie.push.apply(Ie,cl({key:X+"."+$e+".map",value:_t,expressionContext:"cluster-map"})),Ie.push.apply(Ie,cl({key:X+"."+$e+".reduce",value:Kt,expressionContext:"cluster-reduce"}))}return Ie;case"video":return Ts({key:X,value:F,valueSpec:oe.source_video,style:ye,styleSpec:oe});case"image":return Ts({key:X,value:F,valueSpec:oe.source_image,style:ye,styleSpec:oe});case"canvas":return[new Sr(X,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Hf({key:X+".type",value:F.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:ye,styleSpec:oe})}}function Ot(I){var F=I.key,X=I.value;if(pi(X)==="string")return ot({key:F,value:X});var oe=[];for(var ye in X)oe.push.apply(oe,ot({key:F+"."+ye,value:X[ye]}));return oe}function It(I){var F=I.value,X=I.styleSpec,oe=X.light,ye=I.style,Me=[],Ie=pi(F);if(F===void 0)return Me;if(Ie!=="object")return Me=Me.concat([new Sr("light",F,"object expected, "+Ie+" found")]),Me;for(var $e in F){var mt=$e.match(/^(.*)-transition$/);mt&&oe[mt[1]]&&oe[mt[1]].transition?Me=Me.concat(sr({key:$e,value:F[$e],valueSpec:X.transition,style:ye,styleSpec:X})):oe[$e]?Me=Me.concat(sr({key:$e,value:F[$e],valueSpec:oe[$e],style:ye,styleSpec:X})):Me=Me.concat([new Sr($e,F[$e],'unknown property "'+$e+'"')])}return Me}function Ht(I){return ot(I).length===0?[]:cl(I)}function dr(I){return ot(I).length===0?[]:cl(I)}var xr={"*":function(){return[]},array:Ec,boolean:Sv,number:_l,color:Mc,constants:an,enum:Hf,filter:Gf,function:nf,layer:Je,object:Ts,source:At,light:It,string:ot,formatted:Ht,resolvedImage:dr};function sr(I){var F=I.value,X=I.valueSpec,oe=I.styleSpec;if(X.expression&&Jl(hn(F)))return nf(I);if(X.expression&&Pl(_n(F)))return cl(I);if(X.type&&xr[X.type])return xr[X.type](I);var ye=Ts(cn({},I,{valueSpec:X.type?oe[X.type]:X}));return ye}function Er(I){var F=I.value,X=I.key,oe=ot(I);return oe.length||(F.indexOf("{fontstack}")===-1&&oe.push(new Sr(X,F,'"glyphs" url must include a "{fontstack}" token')),F.indexOf("{range}")===-1&&oe.push(new Sr(X,F,'"glyphs" url must include a "{range}" token'))),oe}function _r(I,F){F===void 0&&(F=$t);var X=[];return X=X.concat(sr({key:"",value:I,valueSpec:F.$root,styleSpec:F,style:I,objectElementValidators:{glyphs:Er,"*":function(){return[]}}})),I.constants&&(X=X.concat(an({key:"constants",value:I.constants,style:I,styleSpec:F}))),Yr(X)}_r.source=$r(At),_r.light=$r(It),_r.layer=$r(Je),_r.filter=$r(Gf),_r.paintProperty=$r(lf),_r.layoutProperty=$r(gh);function Yr(I){return[].concat(I).sort(function(F,X){return F.line-X.line})}function $r(I){return function(){for(var F=[],X=arguments.length;X--;)F[X]=arguments[X];return Yr(I.apply(this,F))}}var gn=_r,bn=gn.light,Rn=gn.paintProperty,da=gn.layoutProperty;function _a(I,F){var X=!1;if(F&&F.length)for(var oe=0,ye=F;oe<ye.length;oe+=1){var Me=ye[oe];I.fire(new cr(new Error(Me.message))),X=!0}return X}var Ia=za,Fa=3;function za(I,F,X){var oe=this.cells=[];if(I instanceof ArrayBuffer){this.arrayBuffer=I;var ye=new Int32Array(this.arrayBuffer);I=ye[0],F=ye[1],X=ye[2],this.d=F+2*X;for(var Me=0;Me<this.d*this.d;Me++){var Ie=ye[Fa+Me],$e=ye[Fa+Me+1];oe.push(Ie===$e?null:ye.subarray(Ie,$e))}var mt=ye[Fa+oe.length],Ct=ye[Fa+oe.length+1];this.keys=ye.subarray(mt,Ct),this.bboxes=ye.subarray(Ct),this.insert=this._insertReadonly}else{this.d=F+2*X;for(var _t=0;_t<this.d*this.d;_t++)oe.push([]);this.keys=[],this.bboxes=[]}this.n=F,this.extent=I,this.padding=X,this.scale=F/I,this.uid=0;var Kt=X/F*I;this.min=-Kt,this.max=I+Kt}za.prototype.insert=function(I,F,X,oe,ye){this._forEachCell(F,X,oe,ye,this._insertCell,this.uid++),this.keys.push(I),this.bboxes.push(F),this.bboxes.push(X),this.bboxes.push(oe),this.bboxes.push(ye)},za.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},za.prototype._insertCell=function(I,F,X,oe,ye,Me){this.cells[ye].push(Me)},za.prototype.query=function(I,F,X,oe,ye){var Me=this.min,Ie=this.max;if(I<=Me&&F<=Me&&Ie<=X&&Ie<=oe&&!ye)return Array.prototype.slice.call(this.keys);var $e=[],mt={};return this._forEachCell(I,F,X,oe,this._queryCell,$e,mt,ye),$e},za.prototype._queryCell=function(I,F,X,oe,ye,Me,Ie,$e){var mt=this.cells[ye];if(mt!==null)for(var Ct=this.keys,_t=this.bboxes,Kt=0;Kt<mt.length;Kt++){var lr=mt[Kt];if(Ie[lr]===void 0){var tr=lr*4;($e?$e(_t[tr+0],_t[tr+1],_t[tr+2],_t[tr+3]):I<=_t[tr+2]&&F<=_t[tr+3]&&X>=_t[tr+0]&&oe>=_t[tr+1])?(Ie[lr]=!0,Me.push(Ct[lr])):Ie[lr]=!1}}},za.prototype._forEachCell=function(I,F,X,oe,ye,Me,Ie,$e){for(var mt=this._convertToCellCoord(I),Ct=this._convertToCellCoord(F),_t=this._convertToCellCoord(X),Kt=this._convertToCellCoord(oe),lr=mt;lr<=_t;lr++)for(var tr=Ct;tr<=Kt;tr++){var wr=this.d*tr+lr;if(!($e&&!$e(this._convertFromCellCoord(lr),this._convertFromCellCoord(tr),this._convertFromCellCoord(lr+1),this._convertFromCellCoord(tr+1)))&&ye.call(this,I,F,X,oe,wr,Me,Ie,$e))return}},za.prototype._convertFromCellCoord=function(I){return(I-this.padding)/this.scale},za.prototype._convertToCellCoord=function(I){return Math.max(0,Math.min(this.d-1,Math.floor(I*this.scale)+this.padding))},za.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var I=this.cells,F=Fa+this.cells.length+1+1,X=0,oe=0;oe<this.cells.length;oe++)X+=this.cells[oe].length;var ye=new Int32Array(F+X+this.keys.length+this.bboxes.length);ye[0]=this.extent,ye[1]=this.n,ye[2]=this.padding;for(var Me=F,Ie=0;Ie<I.length;Ie++){var $e=I[Ie];ye[Fa+Ie]=Me,ye.set($e,Me),Me+=$e.length}return ye[Fa+I.length]=Me,ye.set(this.keys,Me),Me+=this.keys.length,ye[Fa+I.length+1]=Me,ye.set(this.bboxes,Me),Me+=this.bboxes.length,ye.buffer};var ci=self.ImageData,Bi=self.ImageBitmap,Ti={};function he(I,F,X){X===void 0&&(X={}),Object.defineProperty(F,"_classRegistryKey",{value:I,writeable:!1}),Ti[I]={klass:F,omit:X.omit||[],shallow:X.shallow||[]}}he("Object",Object),Ia.serialize=function(F,X){var oe=F.toArrayBuffer();return X&&X.push(oe),{buffer:oe}},Ia.deserialize=function(F){return new Ia(F.buffer)},he("Grid",Ia),he("Color",oi),he("Error",Error),he("ResolvedImage",Vo),he("StylePropertyFunction",ql),he("StyleExpression",fl,{omit:["_evaluator"]}),he("ZoomDependentExpression",Yo),he("ZoomConstantExpression",Ql),he("CompoundExpression",go,{omit:["_evaluate"]});for(var _e in Vs)Vs[_e]._classRegistryKey||he("Expression_"+_e,Vs[_e]);function He(I){return I&&typeof ArrayBuffer<"u"&&(I instanceof ArrayBuffer||I.constructor&&I.constructor.name==="ArrayBuffer")}function qe(I){return Bi&&I instanceof Bi}function at(I,F){if(I==null||typeof I=="boolean"||typeof I=="number"||typeof I=="string"||I instanceof Boolean||I instanceof Number||I instanceof String||I instanceof Date||I instanceof RegExp)return I;if(He(I)||qe(I))return F&&F.push(I),I;if(ArrayBuffer.isView(I)){var X=I;return F&&F.push(X.buffer),X}if(I instanceof ci)return F&&F.push(I.data.buffer),I;if(Array.isArray(I)){for(var oe=[],ye=0,Me=I;ye<Me.length;ye+=1){var Ie=Me[ye];oe.push(at(Ie,F))}return oe}if(typeof I=="object"){var $e=I.constructor,mt=$e._classRegistryKey;if(!mt)throw new Error("can't serialize object of unregistered class");var Ct=$e.serialize?$e.serialize(I,F):{};if(!$e.serialize){for(var _t in I)if(I.hasOwnProperty(_t)&&!(Ti[mt].omit.indexOf(_t)>=0)){var Kt=I[_t];Ct[_t]=Ti[mt].shallow.indexOf(_t)>=0?Kt:at(Kt,F)}I instanceof Error&&(Ct.message=I.message)}if(Ct.$name)throw new Error("$name property is reserved for worker serialization logic.");return mt!=="Object"&&(Ct.$name=mt),Ct}throw new Error("can't serialize object of type "+typeof I)}function ft(I){if(I==null||typeof I=="boolean"||typeof I=="number"||typeof I=="string"||I instanceof Boolean||I instanceof Number||I instanceof String||I instanceof Date||I instanceof RegExp||He(I)||qe(I)||ArrayBuffer.isView(I)||I instanceof ci)return I;if(Array.isArray(I))return I.map(ft);if(typeof I=="object"){var F=I.$name||"Object",X=Ti[F],oe=X.klass;if(!oe)throw new Error("can't deserialize unregistered class "+F);if(oe.deserialize)return oe.deserialize(I);for(var ye=Object.create(oe.prototype),Me=0,Ie=Object.keys(I);Me<Ie.length;Me+=1){var $e=Ie[Me];if($e!=="$name"){var mt=I[$e];ye[$e]=Ti[F].shallow.indexOf($e)>=0?mt:ft(mt)}}return ye}throw new Error("can't deserialize object of type "+typeof I)}var Ft=function(){this.first=!0};Ft.prototype.update=function(F,X){var oe=Math.floor(F);return this.first?(this.first=!1,this.lastIntegerZoom=oe,this.lastIntegerZoomTime=0,this.lastZoom=F,this.lastFloorZoom=oe,!0):(this.lastFloorZoom>oe?(this.lastIntegerZoom=oe+1,this.lastIntegerZoomTime=X):this.lastFloorZoom<oe&&(this.lastIntegerZoom=oe,this.lastIntegerZoomTime=X),F!==this.lastZoom?(this.lastZoom=F,this.lastFloorZoom=oe,!0):!1)};var xt={"Latin-1 Supplement":function(I){return I>=128&&I<=255},Arabic:function(I){return I>=1536&&I<=1791},"Arabic Supplement":function(I){return I>=1872&&I<=1919},"Arabic Extended-A":function(I){return I>=2208&&I<=2303},"Hangul Jamo":function(I){return I>=4352&&I<=4607},"Unified Canadian Aboriginal Syllabics":function(I){return I>=5120&&I<=5759},Khmer:function(I){return I>=6016&&I<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(I){return I>=6320&&I<=6399},"General Punctuation":function(I){return I>=8192&&I<=8303},"Letterlike Symbols":function(I){return I>=8448&&I<=8527},"Number Forms":function(I){return I>=8528&&I<=8591},"Miscellaneous Technical":function(I){return I>=8960&&I<=9215},"Control Pictures":function(I){return I>=9216&&I<=9279},"Optical Character Recognition":function(I){return I>=9280&&I<=9311},"Enclosed Alphanumerics":function(I){return I>=9312&&I<=9471},"Geometric Shapes":function(I){return I>=9632&&I<=9727},"Miscellaneous Symbols":function(I){return I>=9728&&I<=9983},"Miscellaneous Symbols and Arrows":function(I){return I>=11008&&I<=11263},"CJK Radicals Supplement":function(I){return I>=11904&&I<=12031},"Kangxi Radicals":function(I){return I>=12032&&I<=12255},"Ideographic Description Characters":function(I){return I>=12272&&I<=12287},"CJK Symbols and Punctuation":function(I){return I>=12288&&I<=12351},Hiragana:function(I){return I>=12352&&I<=12447},Katakana:function(I){return I>=12448&&I<=12543},Bopomofo:function(I){return I>=12544&&I<=12591},"Hangul Compatibility Jamo":function(I){return I>=12592&&I<=12687},Kanbun:function(I){return I>=12688&&I<=12703},"Bopomofo Extended":function(I){return I>=12704&&I<=12735},"CJK Strokes":function(I){return I>=12736&&I<=12783},"Katakana Phonetic Extensions":function(I){return I>=12784&&I<=12799},"Enclosed CJK Letters and Months":function(I){return I>=12800&&I<=13055},"CJK Compatibility":function(I){return I>=13056&&I<=13311},"CJK Unified Ideographs Extension A":function(I){return I>=13312&&I<=19903},"Yijing Hexagram Symbols":function(I){return I>=19904&&I<=19967},"CJK Unified Ideographs":function(I){return I>=19968&&I<=40959},"Yi Syllables":function(I){return I>=40960&&I<=42127},"Yi Radicals":function(I){return I>=42128&&I<=42191},"Hangul Jamo Extended-A":function(I){return I>=43360&&I<=43391},"Hangul Syllables":function(I){return I>=44032&&I<=55215},"Hangul Jamo Extended-B":function(I){return I>=55216&&I<=55295},"Private Use Area":function(I){return I>=57344&&I<=63743},"CJK Compatibility Ideographs":function(I){return I>=63744&&I<=64255},"Arabic Presentation Forms-A":function(I){return I>=64336&&I<=65023},"Vertical Forms":function(I){return I>=65040&&I<=65055},"CJK Compatibility Forms":function(I){return I>=65072&&I<=65103},"Small Form Variants":function(I){return I>=65104&&I<=65135},"Arabic Presentation Forms-B":function(I){return I>=65136&&I<=65279},"Halfwidth and Fullwidth Forms":function(I){return I>=65280&&I<=65519}};function Xt(I){for(var F=0,X=I;F<X.length;F+=1){var oe=X[F];if(Cr(oe.charCodeAt(0)))return!0}return!1}function rr(I){for(var F=0,X=I;F<X.length;F+=1){var oe=X[F];if(!ar(oe.charCodeAt(0)))return!1}return!0}function ar(I){return!(xt.Arabic(I)||xt["Arabic Supplement"](I)||xt["Arabic Extended-A"](I)||xt["Arabic Presentation Forms-A"](I)||xt["Arabic Presentation Forms-B"](I))}function Pr(I){return I<11904?!1:!!(xt["Bopomofo Extended"](I)||xt.Bopomofo(I)||xt["CJK Compatibility Forms"](I)||xt["CJK Compatibility Ideographs"](I)||xt["CJK Compatibility"](I)||xt["CJK Radicals Supplement"](I)||xt["CJK Strokes"](I)||xt["CJK Symbols and Punctuation"](I)||xt["CJK Unified Ideographs Extension A"](I)||xt["CJK Unified Ideographs"](I)||xt["Enclosed CJK Letters and Months"](I)||xt["Halfwidth and Fullwidth Forms"](I)||xt.Hiragana(I)||xt["Ideographic Description Characters"](I)||xt["Kangxi Radicals"](I)||xt["Katakana Phonetic Extensions"](I)||xt.Katakana(I)||xt["Vertical Forms"](I)||xt["Yi Radicals"](I)||xt["Yi Syllables"](I))}function Cr(I){return I===746||I===747?!0:I<4352?!1:!!(xt["Bopomofo Extended"](I)||xt.Bopomofo(I)||xt["CJK Compatibility Forms"](I)&&!(I>=65097&&I<=65103)||xt["CJK Compatibility Ideographs"](I)||xt["CJK Compatibility"](I)||xt["CJK Radicals Supplement"](I)||xt["CJK Strokes"](I)||xt["CJK Symbols and Punctuation"](I)&&!(I>=12296&&I<=12305)&&!(I>=12308&&I<=12319)&&I!==12336||xt["CJK Unified Ideographs Extension A"](I)||xt["CJK Unified Ideographs"](I)||xt["Enclosed CJK Letters and Months"](I)||xt["Hangul Compatibility Jamo"](I)||xt["Hangul Jamo Extended-A"](I)||xt["Hangul Jamo Extended-B"](I)||xt["Hangul Jamo"](I)||xt["Hangul Syllables"](I)||xt.Hiragana(I)||xt["Ideographic Description Characters"](I)||xt.Kanbun(I)||xt["Kangxi Radicals"](I)||xt["Katakana Phonetic Extensions"](I)||xt.Katakana(I)&&I!==12540||xt["Halfwidth and Fullwidth Forms"](I)&&I!==65288&&I!==65289&&I!==65293&&!(I>=65306&&I<=65310)&&I!==65339&&I!==65341&&I!==65343&&!(I>=65371&&I<=65503)&&I!==65507&&!(I>=65512&&I<=65519)||xt["Small Form Variants"](I)&&!(I>=65112&&I<=65118)&&!(I>=65123&&I<=65126)||xt["Unified Canadian Aboriginal Syllabics"](I)||xt["Unified Canadian Aboriginal Syllabics Extended"](I)||xt["Vertical Forms"](I)||xt["Yijing Hexagram Symbols"](I)||xt["Yi Syllables"](I)||xt["Yi Radicals"](I))}function jr(I){return!!(xt["Latin-1 Supplement"](I)&&(I===167||I===169||I===174||I===177||I===188||I===189||I===190||I===215||I===247)||xt["General Punctuation"](I)&&(I===8214||I===8224||I===8225||I===8240||I===8241||I===8251||I===8252||I===8258||I===8263||I===8264||I===8265||I===8273)||xt["Letterlike Symbols"](I)||xt["Number Forms"](I)||xt["Miscellaneous Technical"](I)&&(I>=8960&&I<=8967||I>=8972&&I<=8991||I>=8996&&I<=9e3||I===9003||I>=9085&&I<=9114||I>=9150&&I<=9165||I===9167||I>=9169&&I<=9179||I>=9186&&I<=9215)||xt["Control Pictures"](I)&&I!==9251||xt["Optical Character Recognition"](I)||xt["Enclosed Alphanumerics"](I)||xt["Geometric Shapes"](I)||xt["Miscellaneous Symbols"](I)&&!(I>=9754&&I<=9759)||xt["Miscellaneous Symbols and Arrows"](I)&&(I>=11026&&I<=11055||I>=11088&&I<=11097||I>=11192&&I<=11243)||xt["CJK Symbols and Punctuation"](I)||xt.Katakana(I)||xt["Private Use Area"](I)||xt["CJK Compatibility Forms"](I)||xt["Small Form Variants"](I)||xt["Halfwidth and Fullwidth Forms"](I)||I===8734||I===8756||I===8757||I>=9984&&I<=10087||I>=10102&&I<=10131||I===65532||I===65533)}function en(I){return!(Cr(I)||jr(I))}function Ir(I){return xt.Arabic(I)||xt["Arabic Supplement"](I)||xt["Arabic Extended-A"](I)||xt["Arabic Presentation Forms-A"](I)||xt["Arabic Presentation Forms-B"](I)}function Hr(I){return I>=1424&&I<=2303||xt["Arabic Presentation Forms-A"](I)||xt["Arabic Presentation Forms-B"](I)}function Xr(I,F){return!(!F&&Hr(I)||I>=2304&&I<=3583||I>=3840&&I<=4255||xt.Khmer(I))}function tn(I){for(var F=0,X=I;F<X.length;F+=1){var oe=X[F];if(Hr(oe.charCodeAt(0)))return!0}return!1}function un(I,F){for(var X=0,oe=I;X<oe.length;X+=1){var ye=oe[X];if(!Xr(ye.charCodeAt(0),F))return!1}return!0}var Zr={unavailable:"unavailable",deferred:"deferred",loading:"loading",loaded:"loaded",error:"error"},Nn=null,Wn=Zr.unavailable,Kn=null,na=function(I){I&&typeof I=="string"&&I.indexOf("NetworkError")>-1&&(Wn=Zr.error),Nn&&Nn(I)};function wa(){ba.fire(new Qt("pluginStateChange",{pluginStatus:Wn,pluginURL:Kn}))}var ba=new fr,Wa=function(){return Wn},Pa=function(I){return I({pluginStatus:Wn,pluginURL:Kn}),ba.on("pluginStateChange",I),I},Ha=function(I,F,X){if(X===void 0&&(X=!1),Wn===Zr.deferred||Wn===Zr.loading||Wn===Zr.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");Kn=fe.resolveURL(I),Wn=Zr.deferred,Nn=F,wa(),X||ri()},ri=function(){if(Wn!==Zr.deferred||!Kn)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Wn=Zr.loading,wa(),Kn&&Lt({url:Kn},function(I){I?na(I):(Wn=Zr.loaded,wa())})},si={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Wn===Zr.loaded||si.applyArabicShaping!=null},isLoading:function(){return Wn===Zr.loading},setState:function(F){Wn=F.pluginStatus,Kn=F.pluginURL},isParsed:function(){return si.applyArabicShaping!=null&&si.processBidirectionalText!=null&&si.processStyledBidirectionalText!=null},getPluginURL:function(){return Kn}},gi=function(){!si.isLoading()&&!si.isLoaded()&&Wa()==="deferred"&&ri()},Bn=function(F,X){this.zoom=F,X?(this.now=X.now,this.fadeDuration=X.fadeDuration,this.zoomHistory=X.zoomHistory,this.transition=X.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ft,this.transition={})};Bn.prototype.isSupportedScript=function(F){return un(F,si.isLoaded())},Bn.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Bn.prototype.getCrossfadeParameters=function(){var F=this.zoom,X=F-Math.floor(F),oe=this.crossFadingFactor();return F>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:X+(1-X)*oe}:{fromScale:.5,toScale:1,t:1-(1-oe)*X}};var Va=function(F,X){this.property=F,this.value=X,this.expression=ch(X===void 0?F.specification.default:X,F.specification)};Va.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},Va.prototype.possiblyEvaluate=function(F,X,oe){return this.property.possiblyEvaluate(this,F,X,oe)};var Ba=function(F){this.property=F,this.value=new Va(F,void 0)};Ba.prototype.transitioned=function(F,X){return new Ri(this.property,this.value,X,l({},F.transition,this.transition),F.now)},Ba.prototype.untransitioned=function(){return new Ri(this.property,this.value,null,{},0)};var Ja=function(F){this._properties=F,this._values=Object.create(F.defaultTransitionablePropertyValues)};Ja.prototype.getValue=function(F){return T(this._values[F].value.value)},Ja.prototype.setValue=function(F,X){this._values.hasOwnProperty(F)||(this._values[F]=new Ba(this._values[F].property)),this._values[F].value=new Va(this._values[F].property,X===null?void 0:T(X))},Ja.prototype.getTransition=function(F){return T(this._values[F].transition)},Ja.prototype.setTransition=function(F,X){this._values.hasOwnProperty(F)||(this._values[F]=new Ba(this._values[F].property)),this._values[F].transition=T(X)||void 0},Ja.prototype.serialize=function(){for(var F={},X=0,oe=Object.keys(this._values);X<oe.length;X+=1){var ye=oe[X],Me=this.getValue(ye);Me!==void 0&&(F[ye]=Me);var Ie=this.getTransition(ye);Ie!==void 0&&(F[ye+"-transition"]=Ie)}return F},Ja.prototype.transitioned=function(F,X){for(var oe=new ji(this._properties),ye=0,Me=Object.keys(this._values);ye<Me.length;ye+=1){var Ie=Me[ye];oe._values[Ie]=this._values[Ie].transitioned(F,X._values[Ie])}return oe},Ja.prototype.untransitioned=function(){for(var F=new ji(this._properties),X=0,oe=Object.keys(this._values);X<oe.length;X+=1){var ye=oe[X];F._values[ye]=this._values[ye].untransitioned()}return F};var Ri=function(F,X,oe,ye,Me){this.property=F,this.value=X,this.begin=Me+ye.delay||0,this.end=this.begin+ye.duration||0,F.specification.transition&&(ye.delay||ye.duration)&&(this.prior=oe)};Ri.prototype.possiblyEvaluate=function(F,X,oe){var ye=F.now||0,Me=this.value.possiblyEvaluate(F,X,oe),Ie=this.prior;if(Ie){if(ye>this.end)return this.prior=null,Me;if(this.value.isDataDriven())return this.prior=null,Me;if(ye<this.begin)return Ie.possiblyEvaluate(F,X,oe);var $e=(ye-this.begin)/(this.end-this.begin);return this.property.interpolate(Ie.possiblyEvaluate(F,X,oe),Me,i($e))}else return Me};var ji=function(F){this._properties=F,this._values=Object.create(F.defaultTransitioningPropertyValues)};ji.prototype.possiblyEvaluate=function(F,X,oe){for(var ye=new mi(this._properties),Me=0,Ie=Object.keys(this._values);Me<Ie.length;Me+=1){var $e=Ie[Me];ye._values[$e]=this._values[$e].possiblyEvaluate(F,X,oe)}return ye},ji.prototype.hasTransition=function(){for(var F=0,X=Object.keys(this._values);F<X.length;F+=1){var oe=X[F];if(this._values[oe].prior)return!0}return!1};var qi=function(F){this._properties=F,this._values=Object.create(F.defaultPropertyValues)};qi.prototype.getValue=function(F){return T(this._values[F].value)},qi.prototype.setValue=function(F,X){this._values[F]=new Va(this._values[F].property,X===null?void 0:T(X))},qi.prototype.serialize=function(){for(var F={},X=0,oe=Object.keys(this._values);X<oe.length;X+=1){var ye=oe[X],Me=this.getValue(ye);Me!==void 0&&(F[ye]=Me)}return F},qi.prototype.possiblyEvaluate=function(F,X,oe){for(var ye=new mi(this._properties),Me=0,Ie=Object.keys(this._values);Me<Ie.length;Me+=1){var $e=Ie[Me];ye._values[$e]=this._values[$e].possiblyEvaluate(F,X,oe)}return ye};var Mi=function(F,X,oe){this.property=F,this.value=X,this.parameters=oe};Mi.prototype.isConstant=function(){return this.value.kind==="constant"},Mi.prototype.constantOr=function(F){return this.value.kind==="constant"?this.value.value:F},Mi.prototype.evaluate=function(F,X,oe,ye){return this.property.evaluate(this.value,this.parameters,F,X,oe,ye)};var mi=function(F){this._properties=F,this._values=Object.create(F.defaultPossiblyEvaluatedValues)};mi.prototype.get=function(F){return this._values[F]};var ma=function(F){this.specification=F};ma.prototype.possiblyEvaluate=function(F,X){return F.expression.evaluate(X)},ma.prototype.interpolate=function(F,X,oe){var ye=xu[this.specification.type];return ye?ye(F,X,oe):F};var Ca=function(F,X){this.specification=F,this.overrides=X};Ca.prototype.possiblyEvaluate=function(F,X,oe,ye){return F.expression.kind==="constant"||F.expression.kind==="camera"?new Mi(this,{kind:"constant",value:F.expression.evaluate(X,null,{},oe,ye)},X):new Mi(this,F.expression,X)},Ca.prototype.interpolate=function(F,X,oe){if(F.value.kind!=="constant"||X.value.kind!=="constant")return F;if(F.value.value===void 0||X.value.value===void 0)return new Mi(this,{kind:"constant",value:void 0},F.parameters);var ye=xu[this.specification.type];return ye?new Mi(this,{kind:"constant",value:ye(F.value.value,X.value.value,oe)},F.parameters):F},Ca.prototype.evaluate=function(F,X,oe,ye,Me,Ie){return F.kind==="constant"?F.value:F.evaluate(X,oe,ye,Me,Ie)};var Ci=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.possiblyEvaluate=function(oe,ye,Me,Ie){if(oe.value===void 0)return new Mi(this,{kind:"constant",value:void 0},ye);if(oe.expression.kind==="constant"){var $e=oe.expression.evaluate(ye,null,{},Me,Ie),mt=oe.property.specification.type==="resolvedImage",Ct=mt&&typeof $e!="string"?$e.name:$e,_t=this._calculate(Ct,Ct,Ct,ye);return new Mi(this,{kind:"constant",value:_t},ye)}else if(oe.expression.kind==="camera"){var Kt=this._calculate(oe.expression.evaluate({zoom:ye.zoom-1}),oe.expression.evaluate({zoom:ye.zoom}),oe.expression.evaluate({zoom:ye.zoom+1}),ye);return new Mi(this,{kind:"constant",value:Kt},ye)}else return new Mi(this,oe.expression,ye)},F.prototype.evaluate=function(oe,ye,Me,Ie,$e,mt){if(oe.kind==="source"){var Ct=oe.evaluate(ye,Me,Ie,$e,mt);return this._calculate(Ct,Ct,Ct,ye)}else return oe.kind==="composite"?this._calculate(oe.evaluate({zoom:Math.floor(ye.zoom)-1},Me,Ie),oe.evaluate({zoom:Math.floor(ye.zoom)},Me,Ie),oe.evaluate({zoom:Math.floor(ye.zoom)+1},Me,Ie),ye):oe.value},F.prototype._calculate=function(oe,ye,Me,Ie){var $e=Ie.zoom;return $e>Ie.zoomHistory.lastIntegerZoom?{from:oe,to:ye}:{from:Me,to:ye}},F.prototype.interpolate=function(oe){return oe},F}(Ca),Qi=function(F){this.specification=F};Qi.prototype.possiblyEvaluate=function(F,X,oe,ye){if(F.value!==void 0)if(F.expression.kind==="constant"){var Me=F.expression.evaluate(X,null,{},oe,ye);return this._calculate(Me,Me,Me,X)}else return this._calculate(F.expression.evaluate(new Bn(Math.floor(X.zoom-1),X)),F.expression.evaluate(new Bn(Math.floor(X.zoom),X)),F.expression.evaluate(new Bn(Math.floor(X.zoom+1),X)),X)},Qi.prototype._calculate=function(F,X,oe,ye){var Me=ye.zoom;return Me>ye.zoomHistory.lastIntegerZoom?{from:F,to:X}:{from:oe,to:X}},Qi.prototype.interpolate=function(F){return F};var ts=function(F){this.specification=F};ts.prototype.possiblyEvaluate=function(F,X,oe,ye){return!!F.expression.evaluate(X,null,{},oe,ye)},ts.prototype.interpolate=function(){return!1};var ho=function(F){this.properties=F,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var X in F){var oe=F[X];oe.specification.overridable&&this.overridableProperties.push(X);var ye=this.defaultPropertyValues[X]=new Va(oe,void 0),Me=this.defaultTransitionablePropertyValues[X]=new Ba(oe);this.defaultTransitioningPropertyValues[X]=Me.untransitioned(),this.defaultPossiblyEvaluatedValues[X]=ye.possiblyEvaluate({})}};he("DataDrivenProperty",Ca),he("DataConstantProperty",ma),he("CrossFadedDataDrivenProperty",Ci),he("CrossFadedProperty",Qi),he("ColorRampProperty",ts);var Oo="-transition",Fi=function(I){function F(X,oe){if(I.call(this),this.id=X.id,this.type=X.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},X.type!=="custom"&&(X=X,this.metadata=X.metadata,this.minzoom=X.minzoom,this.maxzoom=X.maxzoom,X.type!=="background"&&(this.source=X.source,this.sourceLayer=X["source-layer"],this.filter=X.filter),oe.layout&&(this._unevaluatedLayout=new qi(oe.layout)),oe.paint)){this._transitionablePaint=new Ja(oe.paint);for(var ye in X.paint)this.setPaintProperty(ye,X.paint[ye],{validate:!1});for(var Me in X.layout)this.setLayoutProperty(Me,X.layout[Me],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new mi(oe.paint)}}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},F.prototype.getLayoutProperty=function(oe){return oe==="visibility"?this.visibility:this._unevaluatedLayout.getValue(oe)},F.prototype.setLayoutProperty=function(oe,ye,Me){if(Me===void 0&&(Me={}),ye!=null){var Ie="layers."+this.id+".layout."+oe;if(this._validate(da,Ie,oe,ye,Me))return}if(oe==="visibility"){this.visibility=ye;return}this._unevaluatedLayout.setValue(oe,ye)},F.prototype.getPaintProperty=function(oe){return S(oe,Oo)?this._transitionablePaint.getTransition(oe.slice(0,-Oo.length)):this._transitionablePaint.getValue(oe)},F.prototype.setPaintProperty=function(oe,ye,Me){if(Me===void 0&&(Me={}),ye!=null){var Ie="layers."+this.id+".paint."+oe;if(this._validate(Rn,Ie,oe,ye,Me))return!1}if(S(oe,Oo))return this._transitionablePaint.setTransition(oe.slice(0,-Oo.length),ye||void 0),!1;var $e=this._transitionablePaint._values[oe],mt=$e.property.specification["property-type"]==="cross-faded-data-driven",Ct=$e.value.isDataDriven(),_t=$e.value;this._transitionablePaint.setValue(oe,ye),this._handleSpecialPaintPropertyUpdate(oe);var Kt=this._transitionablePaint._values[oe].value,lr=Kt.isDataDriven();return lr||Ct||mt||this._handleOverridablePaintPropertyUpdate(oe,_t,Kt)},F.prototype._handleSpecialPaintPropertyUpdate=function(oe){},F.prototype._handleOverridablePaintPropertyUpdate=function(oe,ye,Me){return!1},F.prototype.isHidden=function(oe){return this.minzoom&&oe<this.minzoom||this.maxzoom&&oe>=this.maxzoom?!0:this.visibility==="none"},F.prototype.updateTransitions=function(oe){this._transitioningPaint=this._transitionablePaint.transitioned(oe,this._transitioningPaint)},F.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},F.prototype.recalculate=function(oe,ye){oe.getCrossfadeParameters&&(this._crossfadeParameters=oe.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(oe,void 0,ye)),this.paint=this._transitioningPaint.possiblyEvaluate(oe,void 0,ye)},F.prototype.serialize=function(){var oe={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&&(oe.layout=oe.layout||{},oe.layout.visibility=this.visibility),R(oe,function(ye,Me){return ye!==void 0&&!(Me==="layout"&&!Object.keys(ye).length)&&!(Me==="paint"&&!Object.keys(ye).length)})},F.prototype._validate=function(oe,ye,Me,Ie,$e){return $e===void 0&&($e={}),$e&&$e.validate===!1?!1:_a(this,oe.call(gn,{key:ye,layerType:this.type,objectKey:Me,value:Ie,styleSpec:$t,style:{glyphs:!0,sprite:!0}}))},F.prototype.is3D=function(){return!1},F.prototype.isTileClipped=function(){return!1},F.prototype.hasOffscreenPass=function(){return!1},F.prototype.resize=function(){},F.prototype.isStateDependent=function(){for(var oe in this.paint._values){var ye=this.paint.get(oe);if(!(!(ye instanceof Mi)||!ul(ye.property.specification))&&(ye.value.kind==="source"||ye.value.kind==="composite")&&ye.value.isStateDependent)return!0}return!1},F}(fr),ls={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Ai=function(F,X){this._structArray=F,this._pos1=X*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Ws=128,us=5,Qa=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};Qa.serialize=function(F,X){return F._trim(),X&&(F.isTransferred=!0,X.push(F.arrayBuffer)),{length:F.length,arrayBuffer:F.arrayBuffer}},Qa.deserialize=function(F){var X=Object.create(this.prototype);return X.arrayBuffer=F.arrayBuffer,X.length=F.length,X.capacity=F.arrayBuffer.byteLength/X.bytesPerElement,X._refreshViews(),X},Qa.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Qa.prototype.clear=function(){this.length=0},Qa.prototype.resize=function(F){this.reserve(F),this.length=F},Qa.prototype.reserve=function(F){if(F>this.capacity){this.capacity=Math.max(F,Math.floor(this.capacity*us),Ws),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var X=this.uint8;this._refreshViews(),X&&this.uint8.set(X)}},Qa.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function Li(I,F){F===void 0&&(F=1);var X=0,oe=0,ye=I.map(function(Ie){var $e=yh(Ie.type),mt=X=Pc(X,Math.max(F,$e)),Ct=Ie.components||1;return oe=Math.max(oe,$e),X+=$e*Ct,{name:Ie.name,type:Ie.type,components:Ct,offset:mt}}),Me=Pc(X,Math.max(oe,F));return{members:ye,size:Me,alignment:F}}function yh(I){return ls[I].BYTES_PER_ELEMENT}function Pc(I,F){return Math.ceil(I/F)*F}var Ev=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(oe,ye){var Me=this.length;return this.resize(Me+1),this.emplace(Me,oe,ye)},F.prototype.emplace=function(oe,ye,Me){var Ie=oe*2;return this.int16[Ie+0]=ye,this.int16[Ie+1]=Me,oe},F}(Qa);Ev.prototype.bytesPerElement=4,he("StructArrayLayout2i4",Ev);var Wf=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(oe,ye,Me,Ie){var $e=this.length;return this.resize($e+1),this.emplace($e,oe,ye,Me,Ie)},F.prototype.emplace=function(oe,ye,Me,Ie,$e){var mt=oe*4;return this.int16[mt+0]=ye,this.int16[mt+1]=Me,this.int16[mt+2]=Ie,this.int16[mt+3]=$e,oe},F}(Qa);Wf.prototype.bytesPerElement=8,he("StructArrayLayout4i8",Wf);var mh=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(oe,ye,Me,Ie,$e,mt){var Ct=this.length;return this.resize(Ct+1),this.emplace(Ct,oe,ye,Me,Ie,$e,mt)},F.prototype.emplace=function(oe,ye,Me,Ie,$e,mt,Ct){var _t=oe*6;return this.int16[_t+0]=ye,this.int16[_t+1]=Me,this.int16[_t+2]=Ie,this.int16[_t+3]=$e,this.int16[_t+4]=mt,this.int16[_t+5]=Ct,oe},F}(Qa);mh.prototype.bytesPerElement=12,he("StructArrayLayout2i4i12",mh);var fd=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(oe,ye,Me,Ie,$e,mt){var Ct=this.length;return this.resize(Ct+1),this.emplace(Ct,oe,ye,Me,Ie,$e,mt)},F.prototype.emplace=function(oe,ye,Me,Ie,$e,mt,Ct){var _t=oe*4,Kt=oe*8;return this.int16[_t+0]=ye,this.int16[_t+1]=Me,this.uint8[Kt+4]=Ie,this.uint8[Kt+5]=$e,this.uint8[Kt+6]=mt,this.uint8[Kt+7]=Ct,oe},F}(Qa);fd.prototype.bytesPerElement=8,he("StructArrayLayout2i4ub8",fd);var As=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(oe,ye,Me,Ie,$e,mt,Ct,_t,Kt,lr){var tr=this.length;return this.resize(tr+1),this.emplace(tr,oe,ye,Me,Ie,$e,mt,Ct,_t,Kt,lr)},F.prototype.emplace=function(oe,ye,Me,Ie,$e,mt,Ct,_t,Kt,lr,tr){var wr=oe*9,Ur=oe*18;return this.uint16[wr+0]=ye,this.uint16[wr+1]=Me,this.uint16[wr+2]=Ie,this.uint16[wr+3]=$e,this.uint16[wr+4]=mt,this.uint16[wr+5]=Ct,this.uint16[wr+6]=_t,this.uint16[wr+7]=Kt,this.uint8[Ur+16]=lr,this.uint8[Ur+17]=tr,oe},F}(Qa);As.prototype.bytesPerElement=18,he("StructArrayLayout8ui2ub18",As);var Yf=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(oe,ye,Me,Ie,$e,mt,Ct,_t,Kt,lr,tr,wr){var Ur=this.length;return this.resize(Ur+1),this.emplace(Ur,oe,ye,Me,Ie,$e,mt,Ct,_t,Kt,lr,tr,wr)},F.prototype.emplace=function(oe,ye,Me,Ie,$e,mt,Ct,_t,Kt,lr,tr,wr,Ur){var rn=oe*12;return this.int16[rn+0]=ye,this.int16[rn+1]=Me,this.int16[rn+2]=Ie,this.int16[rn+3]=$e,this.uint16[rn+4]=mt,this.uint16[rn+5]=Ct,this.uint16[rn+6]=_t,this.uint16[rn+7]=Kt,this.int16[rn+8]=lr,this.int16[rn+9]=tr,this.int16[rn+10]=wr,this.int16[rn+11]=Ur,oe},F}(Qa);Yf.prototype.bytesPerElement=24,he("StructArrayLayout4i4ui4i24",Yf);var C0=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},F.prototype.emplaceBack=function(oe,ye,Me){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,oe,ye,Me)},F.prototype.emplace=function(oe,ye,Me,Ie){var $e=oe*3;return this.float32[$e+0]=ye,this.float32[$e+1]=Me,this.float32[$e+2]=Ie,oe},F}(Qa);C0.prototype.bytesPerElement=12,he("StructArrayLayout3f12",C0);var L0=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},F.prototype.emplaceBack=function(oe){var ye=this.length;return this.resize(ye+1),this.emplace(ye,oe)},F.prototype.emplace=function(oe,ye){var Me=oe*1;return this.uint32[Me+0]=ye,oe},F}(Qa);L0.prototype.bytesPerElement=4,he("StructArrayLayout1ul4",L0);var Mv=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.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)},F.prototype.emplaceBack=function(oe,ye,Me,Ie,$e,mt,Ct,_t,Kt){var lr=this.length;return this.resize(lr+1),this.emplace(lr,oe,ye,Me,Ie,$e,mt,Ct,_t,Kt)},F.prototype.emplace=function(oe,ye,Me,Ie,$e,mt,Ct,_t,Kt,lr){var tr=oe*10,wr=oe*5;return this.int16[tr+0]=ye,this.int16[tr+1]=Me,this.int16[tr+2]=Ie,this.int16[tr+3]=$e,this.int16[tr+4]=mt,this.int16[tr+5]=Ct,this.uint32[wr+3]=_t,this.uint16[tr+8]=Kt,this.uint16[tr+9]=lr,oe},F}(Qa);Mv.prototype.bytesPerElement=20,he("StructArrayLayout6i1ul2ui20",Mv);var cd=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(oe,ye,Me,Ie,$e,mt){var Ct=this.length;return this.resize(Ct+1),this.emplace(Ct,oe,ye,Me,Ie,$e,mt)},F.prototype.emplace=function(oe,ye,Me,Ie,$e,mt,Ct){var _t=oe*6;return this.int16[_t+0]=ye,this.int16[_t+1]=Me,this.int16[_t+2]=Ie,this.int16[_t+3]=$e,this.int16[_t+4]=mt,this.int16[_t+5]=Ct,oe},F}(Qa);cd.prototype.bytesPerElement=12,he("StructArrayLayout2i2i2i12",cd);var uf=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(oe,ye,Me,Ie,$e){var mt=this.length;return this.resize(mt+1),this.emplace(mt,oe,ye,Me,Ie,$e)},F.prototype.emplace=function(oe,ye,Me,Ie,$e,mt){var Ct=oe*4,_t=oe*8;return this.float32[Ct+0]=ye,this.float32[Ct+1]=Me,this.float32[Ct+2]=Ie,this.int16[_t+6]=$e,this.int16[_t+7]=mt,oe},F}(Qa);uf.prototype.bytesPerElement=16,he("StructArrayLayout2f1f2i16",uf);var Ys=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},F.prototype.emplaceBack=function(oe,ye,Me,Ie){var $e=this.length;return this.resize($e+1),this.emplace($e,oe,ye,Me,Ie)},F.prototype.emplace=function(oe,ye,Me,Ie,$e){var mt=oe*12,Ct=oe*3;return this.uint8[mt+0]=ye,this.uint8[mt+1]=Me,this.float32[Ct+1]=Ie,this.float32[Ct+2]=$e,oe},F}(Qa);Ys.prototype.bytesPerElement=12,he("StructArrayLayout2ub2f12",Ys);var ff=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(oe,ye,Me){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,oe,ye,Me)},F.prototype.emplace=function(oe,ye,Me,Ie){var $e=oe*3;return this.uint16[$e+0]=ye,this.uint16[$e+1]=Me,this.uint16[$e+2]=Ie,oe},F}(Qa);ff.prototype.bytesPerElement=6,he("StructArrayLayout3ui6",ff);var Cv=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.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)},F.prototype.emplaceBack=function(oe,ye,Me,Ie,$e,mt,Ct,_t,Kt,lr,tr,wr,Ur,rn,qr,Mn,yn){var En=this.length;return this.resize(En+1),this.emplace(En,oe,ye,Me,Ie,$e,mt,Ct,_t,Kt,lr,tr,wr,Ur,rn,qr,Mn,yn)},F.prototype.emplace=function(oe,ye,Me,Ie,$e,mt,Ct,_t,Kt,lr,tr,wr,Ur,rn,qr,Mn,yn,En){var In=oe*24,Hn=oe*12,Qn=oe*48;return this.int16[In+0]=ye,this.int16[In+1]=Me,this.uint16[In+2]=Ie,this.uint16[In+3]=$e,this.uint32[Hn+2]=mt,this.uint32[Hn+3]=Ct,this.uint32[Hn+4]=_t,this.uint16[In+10]=Kt,this.uint16[In+11]=lr,this.uint16[In+12]=tr,this.float32[Hn+7]=wr,this.float32[Hn+8]=Ur,this.uint8[Qn+36]=rn,this.uint8[Qn+37]=qr,this.uint8[Qn+38]=Mn,this.uint32[Hn+10]=yn,this.int16[In+22]=En,oe},F}(Qa);Cv.prototype.bytesPerElement=48,he("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Cv);var hd=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.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)},F.prototype.emplaceBack=function(oe,ye,Me,Ie,$e,mt,Ct,_t,Kt,lr,tr,wr,Ur,rn,qr,Mn,yn,En,In,Hn,Qn,$n,La,va,xa,Ga,Aa,Ma){var ja=this.length;return this.resize(ja+1),this.emplace(ja,oe,ye,Me,Ie,$e,mt,Ct,_t,Kt,lr,tr,wr,Ur,rn,qr,Mn,yn,En,In,Hn,Qn,$n,La,va,xa,Ga,Aa,Ma)},F.prototype.emplace=function(oe,ye,Me,Ie,$e,mt,Ct,_t,Kt,lr,tr,wr,Ur,rn,qr,Mn,yn,En,In,Hn,Qn,$n,La,va,xa,Ga,Aa,Ma,ja){var Ua=oe*34,li=oe*17;return this.int16[Ua+0]=ye,this.int16[Ua+1]=Me,this.int16[Ua+2]=Ie,this.int16[Ua+3]=$e,this.int16[Ua+4]=mt,this.int16[Ua+5]=Ct,this.int16[Ua+6]=_t,this.int16[Ua+7]=Kt,this.uint16[Ua+8]=lr,this.uint16[Ua+9]=tr,this.uint16[Ua+10]=wr,this.uint16[Ua+11]=Ur,this.uint16[Ua+12]=rn,this.uint16[Ua+13]=qr,this.uint16[Ua+14]=Mn,this.uint16[Ua+15]=yn,this.uint16[Ua+16]=En,this.uint16[Ua+17]=In,this.uint16[Ua+18]=Hn,this.uint16[Ua+19]=Qn,this.uint16[Ua+20]=$n,this.uint16[Ua+21]=La,this.uint16[Ua+22]=va,this.uint32[li+12]=xa,this.float32[li+13]=Ga,this.float32[li+14]=Aa,this.float32[li+15]=Ma,this.float32[li+16]=ja,oe},F}(Qa);hd.prototype.bytesPerElement=68,he("StructArrayLayout8i15ui1ul4f68",hd);var xh=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},F.prototype.emplaceBack=function(oe){var ye=this.length;return this.resize(ye+1),this.emplace(ye,oe)},F.prototype.emplace=function(oe,ye){var Me=oe*1;return this.float32[Me+0]=ye,oe},F}(Qa);xh.prototype.bytesPerElement=4,he("StructArrayLayout1f4",xh);var P0=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(oe,ye,Me){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,oe,ye,Me)},F.prototype.emplace=function(oe,ye,Me,Ie){var $e=oe*3;return this.int16[$e+0]=ye,this.int16[$e+1]=Me,this.int16[$e+2]=Ie,oe},F}(Qa);P0.prototype.bytesPerElement=6,he("StructArrayLayout3i6",P0);var Xf=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(oe,ye,Me){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,oe,ye,Me)},F.prototype.emplace=function(oe,ye,Me,Ie){var $e=oe*2,mt=oe*4;return this.uint32[$e+0]=ye,this.uint16[mt+2]=Me,this.uint16[mt+3]=Ie,oe},F}(Qa);Xf.prototype.bytesPerElement=8,he("StructArrayLayout1ul2ui8",Xf);var Lv=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(oe,ye){var Me=this.length;return this.resize(Me+1),this.emplace(Me,oe,ye)},F.prototype.emplace=function(oe,ye,Me){var Ie=oe*2;return this.uint16[Ie+0]=ye,this.uint16[Ie+1]=Me,oe},F}(Qa);Lv.prototype.bytesPerElement=4,he("StructArrayLayout2ui4",Lv);var bh=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(oe){var ye=this.length;return this.resize(ye+1),this.emplace(ye,oe)},F.prototype.emplace=function(oe,ye){var Me=oe*1;return this.uint16[Me+0]=ye,oe},F}(Qa);bh.prototype.bytesPerElement=2,he("StructArrayLayout1ui2",bh);var Zf=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},F.prototype.emplaceBack=function(oe,ye){var Me=this.length;return this.resize(Me+1),this.emplace(Me,oe,ye)},F.prototype.emplace=function(oe,ye,Me){var Ie=oe*2;return this.float32[Ie+0]=ye,this.float32[Ie+1]=Me,oe},F}(Qa);Zf.prototype.bytesPerElement=8,he("StructArrayLayout2f8",Zf);var _0=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},F.prototype.emplaceBack=function(oe,ye,Me,Ie){var $e=this.length;return this.resize($e+1),this.emplace($e,oe,ye,Me,Ie)},F.prototype.emplace=function(oe,ye,Me,Ie,$e){var mt=oe*4;return this.float32[mt+0]=ye,this.float32[mt+1]=Me,this.float32[mt+2]=Ie,this.float32[mt+3]=$e,oe},F}(Qa);_0.prototype.bytesPerElement=16,he("StructArrayLayout4f16",_0);var sg=function(I){function F(){I.apply(this,arguments)}I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F;var X={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 X.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},X.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},X.x1.get=function(){return this._structArray.int16[this._pos2+2]},X.y1.get=function(){return this._structArray.int16[this._pos2+3]},X.x2.get=function(){return this._structArray.int16[this._pos2+4]},X.y2.get=function(){return this._structArray.int16[this._pos2+5]},X.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},X.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},X.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},X.anchorPoint.get=function(){return new r(this.anchorPointX,this.anchorPointY)},Object.defineProperties(F.prototype,X),F}(Ai);sg.prototype.size=20;var jf=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.get=function(oe){return new sg(this,oe)},F}(Mv);he("CollisionBoxArray",jf);var R0=function(I){function F(){I.apply(this,arguments)}I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F;var X={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 X.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},X.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},X.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},X.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},X.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},X.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},X.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},X.segment.get=function(){return this._structArray.uint16[this._pos2+10]},X.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},X.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},X.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},X.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},X.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},X.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},X.placedOrientation.set=function(oe){this._structArray.uint8[this._pos1+37]=oe},X.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},X.hidden.set=function(oe){this._structArray.uint8[this._pos1+38]=oe},X.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},X.crossTileID.set=function(oe){this._structArray.uint32[this._pos4+10]=oe},X.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(F.prototype,X),F}(Ai);R0.prototype.size=48;var wh=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.get=function(oe){return new R0(this,oe)},F}(Cv);he("PlacedSymbolArray",wh);var lg=function(I){function F(){I.apply(this,arguments)}I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F;var X={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 X.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},X.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},X.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},X.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},X.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},X.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},X.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},X.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},X.key.get=function(){return this._structArray.uint16[this._pos2+8]},X.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},X.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},X.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},X.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},X.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},X.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},X.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},X.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},X.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},X.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},X.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},X.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},X.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},X.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},X.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},X.crossTileID.set=function(oe){this._structArray.uint32[this._pos4+12]=oe},X.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},X.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},X.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},X.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(F.prototype,X),F}(Ai);lg.prototype.size=68;var ug=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.get=function(oe){return new lg(this,oe)},F}(hd);he("SymbolInstanceArray",ug);var tu=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.getoffsetX=function(oe){return this.float32[oe*1+0]},F}(xh);he("GlyphOffsetArray",tu);var fg=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.getx=function(oe){return this.int16[oe*3+0]},F.prototype.gety=function(oe){return this.int16[oe*3+1]},F.prototype.gettileUnitDistanceFromAnchor=function(oe){return this.int16[oe*3+2]},F}(P0);he("SymbolLineVertexArray",fg);var cg=function(I){function F(){I.apply(this,arguments)}I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F;var X={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return X.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},X.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},X.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(F.prototype,X),F}(Ai);cg.prototype.size=8;var D0=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.get=function(oe){return new cg(this,oe)},F}(Xf);he("FeatureIndexArray",D0);var hg=Li([{name:"a_pos",components:2,type:"Int16"}],4),ge=hg.members,J=function(F){F===void 0&&(F=[]),this.segments=F};J.prototype.prepareSegment=function(F,X,oe,ye){var Me=this.segments[this.segments.length-1];return F>J.MAX_VERTEX_ARRAY_LENGTH&&H("Max vertices per segment is "+J.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+F),(!Me||Me.vertexLength+F>J.MAX_VERTEX_ARRAY_LENGTH||Me.sortKey!==ye)&&(Me={vertexOffset:X.length,primitiveOffset:oe.length,vertexLength:0,primitiveLength:0},ye!==void 0&&(Me.sortKey=ye),this.segments.push(Me)),Me},J.prototype.get=function(){return this.segments},J.prototype.destroy=function(){for(var F=0,X=this.segments;F<X.length;F+=1){var oe=X[F];for(var ye in oe.vaos)oe.vaos[ye].destroy()}},J.simpleSegment=function(F,X,oe,ye){return new J([{vertexOffset:F,primitiveOffset:X,vertexLength:oe,primitiveLength:ye,vaos:{},sortKey:0}])},J.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,he("SegmentVector",J);function me(I,F){return I=h(Math.floor(I),0,255),F=h(Math.floor(F),0,255),256*I+F}var ae=Li([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint8"},{name:"a_pixel_ratio_to",components:1,type:"Uint8"}]),be=_(function(I){function F(X,oe){var ye,Me,Ie,$e,mt,Ct,_t,Kt;for(ye=X.length&3,Me=X.length-ye,Ie=oe,mt=3432918353,Ct=461845907,Kt=0;Kt<Me;)_t=X.charCodeAt(Kt)&255|(X.charCodeAt(++Kt)&255)<<8|(X.charCodeAt(++Kt)&255)<<16|(X.charCodeAt(++Kt)&255)<<24,++Kt,_t=(_t&65535)*mt+(((_t>>>16)*mt&65535)<<16)&4294967295,_t=_t<<15|_t>>>17,_t=(_t&65535)*Ct+(((_t>>>16)*Ct&65535)<<16)&4294967295,Ie^=_t,Ie=Ie<<13|Ie>>>19,$e=(Ie&65535)*5+(((Ie>>>16)*5&65535)<<16)&4294967295,Ie=($e&65535)+27492+((($e>>>16)+58964&65535)<<16);switch(_t=0,ye){case 3:_t^=(X.charCodeAt(Kt+2)&255)<<16;case 2:_t^=(X.charCodeAt(Kt+1)&255)<<8;case 1:_t^=X.charCodeAt(Kt)&255,_t=(_t&65535)*mt+(((_t>>>16)*mt&65535)<<16)&4294967295,_t=_t<<15|_t>>>17,_t=(_t&65535)*Ct+(((_t>>>16)*Ct&65535)<<16)&4294967295,Ie^=_t}return Ie^=X.length,Ie^=Ie>>>16,Ie=(Ie&65535)*2246822507+(((Ie>>>16)*2246822507&65535)<<16)&4294967295,Ie^=Ie>>>13,Ie=(Ie&65535)*3266489909+(((Ie>>>16)*3266489909&65535)<<16)&4294967295,Ie^=Ie>>>16,Ie>>>0}I.exports=F}),ke=_(function(I){function F(X,oe){for(var ye=X.length,Me=oe^ye,Ie=0,$e;ye>=4;)$e=X.charCodeAt(Ie)&255|(X.charCodeAt(++Ie)&255)<<8|(X.charCodeAt(++Ie)&255)<<16|(X.charCodeAt(++Ie)&255)<<24,$e=($e&65535)*1540483477+((($e>>>16)*1540483477&65535)<<16),$e^=$e>>>24,$e=($e&65535)*1540483477+((($e>>>16)*1540483477&65535)<<16),Me=(Me&65535)*1540483477+(((Me>>>16)*1540483477&65535)<<16)^$e,ye-=4,++Ie;switch(ye){case 3:Me^=(X.charCodeAt(Ie+2)&255)<<16;case 2:Me^=(X.charCodeAt(Ie+1)&255)<<8;case 1:Me^=X.charCodeAt(Ie)&255,Me=(Me&65535)*1540483477+(((Me>>>16)*1540483477&65535)<<16)}return Me^=Me>>>13,Me=(Me&65535)*1540483477+(((Me>>>16)*1540483477&65535)<<16),Me^=Me>>>15,Me>>>0}I.exports=F}),je=be,vt=be,Mt=ke;je.murmur3=vt,je.murmur2=Mt;var Gt=function(){this.ids=[],this.positions=[],this.indexed=!1};Gt.prototype.add=function(F,X,oe,ye){this.ids.push(vr(F)),this.positions.push(X,oe,ye)},Gt.prototype.getPositions=function(F){for(var X=vr(F),oe=0,ye=this.ids.length-1;oe<ye;){var Me=oe+ye>>1;this.ids[Me]>=X?ye=Me:oe=Me+1}for(var Ie=[];this.ids[oe]===X;){var $e=this.positions[3*oe],mt=this.positions[3*oe+1],Ct=this.positions[3*oe+2];Ie.push({index:$e,start:mt,end:Ct}),oe++}return Ie},Gt.serialize=function(F,X){var oe=new Float64Array(F.ids),ye=new Uint32Array(F.positions);return br(oe,ye,0,oe.length-1),X&&X.push(oe.buffer,ye.buffer),{ids:oe,positions:ye}},Gt.deserialize=function(F){var X=new Gt;return X.ids=F.ids,X.positions=F.positions,X.indexed=!0,X};var er=Math.pow(2,53)-1;function vr(I){var F=+I;return!isNaN(F)&&F<=er?F:je(String(I))}function br(I,F,X,oe){for(;X<oe;){for(var ye=I[X+oe>>1],Me=X-1,Ie=oe+1;;){do Me++;while(I[Me]<ye);do Ie--;while(I[Ie]>ye);if(Me>=Ie)break;Fr(I,Me,Ie),Fr(F,3*Me,3*Ie),Fr(F,3*Me+1,3*Ie+1),Fr(F,3*Me+2,3*Ie+2)}Ie-X<oe-Ie?(br(I,F,X,Ie),X=Ie+1):(br(I,F,Ie+1,oe),oe=Ie)}}function Fr(I,F,X){var oe=I[F];I[F]=I[X],I[X]=oe}he("FeaturePositionMap",Gt);var Gr=function(F,X){this.gl=F.gl,this.location=X},Wr=function(I){function F(X,oe){I.call(this,X,oe),this.current=0}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.set=function(oe){this.current!==oe&&(this.current=oe,this.gl.uniform1i(this.location,oe))},F}(Gr),Vr=function(I){function F(X,oe){I.call(this,X,oe),this.current=0}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.set=function(oe){this.current!==oe&&(this.current=oe,this.gl.uniform1f(this.location,oe))},F}(Gr),Qr=function(I){function F(X,oe){I.call(this,X,oe),this.current=[0,0]}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.set=function(oe){(oe[0]!==this.current[0]||oe[1]!==this.current[1])&&(this.current=oe,this.gl.uniform2f(this.location,oe[0],oe[1]))},F}(Gr),ln=function(I){function F(X,oe){I.call(this,X,oe),this.current=[0,0,0]}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.set=function(oe){(oe[0]!==this.current[0]||oe[1]!==this.current[1]||oe[2]!==this.current[2])&&(this.current=oe,this.gl.uniform3f(this.location,oe[0],oe[1],oe[2]))},F}(Gr),Cn=function(I){function F(X,oe){I.call(this,X,oe),this.current=[0,0,0,0]}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.set=function(oe){(oe[0]!==this.current[0]||oe[1]!==this.current[1]||oe[2]!==this.current[2]||oe[3]!==this.current[3])&&(this.current=oe,this.gl.uniform4f(this.location,oe[0],oe[1],oe[2],oe[3]))},F}(Gr),On=function(I){function F(X,oe){I.call(this,X,oe),this.current=oi.transparent}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.set=function(oe){(oe.r!==this.current.r||oe.g!==this.current.g||oe.b!==this.current.b||oe.a!==this.current.a)&&(this.current=oe,this.gl.uniform4f(this.location,oe.r,oe.g,oe.b,oe.a))},F}(Gr),Xn=new Float32Array(16),jn=function(I){function F(X,oe){I.call(this,X,oe),this.current=Xn}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.set=function(oe){if(oe[12]!==this.current[12]||oe[0]!==this.current[0]){this.current=oe,this.gl.uniformMatrix4fv(this.location,!1,oe);return}for(var ye=1;ye<16;ye++)if(oe[ye]!==this.current[ye]){this.current=oe,this.gl.uniformMatrix4fv(this.location,!1,oe);break}},F}(Gr);function Zn(I){return[me(255*I.r,255*I.g),me(255*I.b,255*I.a)]}var ra=function(F,X,oe){this.value=F,this.uniformNames=X.map(function(ye){return"u_"+ye}),this.type=oe};ra.prototype.setUniform=function(F,X,oe){F.set(oe.constantOr(this.value))},ra.prototype.getBinding=function(F,X,oe){return this.type==="color"?new On(F,X):new Vr(F,X)};var ca=function(F,X){this.uniformNames=X.map(function(oe){return"u_"+oe}),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};ca.prototype.setConstantPatternPositions=function(F,X){this.pixelRatioFrom=X.pixelRatio,this.pixelRatioTo=F.pixelRatio,this.patternFrom=X.tlbr,this.patternTo=F.tlbr},ca.prototype.setUniform=function(F,X,oe,ye){var Me=ye==="u_pattern_to"?this.patternTo:ye==="u_pattern_from"?this.patternFrom:ye==="u_pixel_ratio_to"?this.pixelRatioTo:ye==="u_pixel_ratio_from"?this.pixelRatioFrom:null;Me&&F.set(Me)},ca.prototype.getBinding=function(F,X,oe){return oe.substr(0,9)==="u_pattern"?new Cn(F,X):new Vr(F,X)};var fa=function(F,X,oe,ye){this.expression=F,this.type=oe,this.maxValue=0,this.paintVertexAttributes=X.map(function(Me){return{name:"a_"+Me,type:"Float32",components:oe==="color"?2:1,offset:0}}),this.paintVertexArray=new ye};fa.prototype.populatePaintArray=function(F,X,oe,ye,Me){var Ie=this.paintVertexArray.length,$e=this.expression.evaluate(new Bn(0),X,{},ye,[],Me);this.paintVertexArray.resize(F),this._setPaintValue(Ie,F,$e)},fa.prototype.updatePaintArray=function(F,X,oe,ye){var Me=this.expression.evaluate({zoom:0},oe,ye);this._setPaintValue(F,X,Me)},fa.prototype._setPaintValue=function(F,X,oe){if(this.type==="color")for(var ye=Zn(oe),Me=F;Me<X;Me++)this.paintVertexArray.emplace(Me,ye[0],ye[1]);else{for(var Ie=F;Ie<X;Ie++)this.paintVertexArray.emplace(Ie,oe);this.maxValue=Math.max(this.maxValue,Math.abs(oe))}},fa.prototype.upload=function(F){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=F.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},fa.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var ya=function(F,X,oe,ye,Me,Ie){this.expression=F,this.uniformNames=X.map(function($e){return"u_"+$e+"_t"}),this.type=oe,this.useIntegerZoom=ye,this.zoom=Me,this.maxValue=0,this.paintVertexAttributes=X.map(function($e){return{name:"a_"+$e,type:"Float32",components:oe==="color"?4:2,offset:0}}),this.paintVertexArray=new Ie};ya.prototype.populatePaintArray=function(F,X,oe,ye,Me){var Ie=this.expression.evaluate(new Bn(this.zoom),X,{},ye,[],Me),$e=this.expression.evaluate(new Bn(this.zoom+1),X,{},ye,[],Me),mt=this.paintVertexArray.length;this.paintVertexArray.resize(F),this._setPaintValue(mt,F,Ie,$e)},ya.prototype.updatePaintArray=function(F,X,oe,ye){var Me=this.expression.evaluate({zoom:this.zoom},oe,ye),Ie=this.expression.evaluate({zoom:this.zoom+1},oe,ye);this._setPaintValue(F,X,Me,Ie)},ya.prototype._setPaintValue=function(F,X,oe,ye){if(this.type==="color")for(var Me=Zn(oe),Ie=Zn(ye),$e=F;$e<X;$e++)this.paintVertexArray.emplace($e,Me[0],Me[1],Ie[0],Ie[1]);else{for(var mt=F;mt<X;mt++)this.paintVertexArray.emplace(mt,oe,ye);this.maxValue=Math.max(this.maxValue,Math.abs(oe),Math.abs(ye))}},ya.prototype.upload=function(F){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=F.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},ya.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},ya.prototype.setUniform=function(F,X){var oe=this.useIntegerZoom?Math.floor(X.zoom):X.zoom,ye=h(this.expression.interpolationFactor(oe,this.zoom,this.zoom+1),0,1);F.set(ye)},ya.prototype.getBinding=function(F,X,oe){return new Vr(F,X)};var Ta=function(F,X,oe,ye,Me,Ie){this.expression=F,this.type=X,this.useIntegerZoom=oe,this.zoom=ye,this.layerId=Ie,this.zoomInPaintVertexArray=new Me,this.zoomOutPaintVertexArray=new Me};Ta.prototype.populatePaintArray=function(F,X,oe){var ye=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(F),this.zoomOutPaintVertexArray.resize(F),this._setPaintValues(ye,F,X.patterns&&X.patterns[this.layerId],oe)},Ta.prototype.updatePaintArray=function(F,X,oe,ye,Me){this._setPaintValues(F,X,oe.patterns&&oe.patterns[this.layerId],Me)},Ta.prototype._setPaintValues=function(F,X,oe,ye){if(!(!ye||!oe)){var Me=oe.min,Ie=oe.mid,$e=oe.max,mt=ye[Me],Ct=ye[Ie],_t=ye[$e];if(!(!mt||!Ct||!_t))for(var Kt=F;Kt<X;Kt++)this.zoomInPaintVertexArray.emplace(Kt,Ct.tl[0],Ct.tl[1],Ct.br[0],Ct.br[1],mt.tl[0],mt.tl[1],mt.br[0],mt.br[1],Ct.pixelRatio,mt.pixelRatio),this.zoomOutPaintVertexArray.emplace(Kt,Ct.tl[0],Ct.tl[1],Ct.br[0],Ct.br[1],_t.tl[0],_t.tl[1],_t.br[0],_t.br[1],Ct.pixelRatio,_t.pixelRatio)}},Ta.prototype.upload=function(F){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=F.createVertexBuffer(this.zoomInPaintVertexArray,ae.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=F.createVertexBuffer(this.zoomOutPaintVertexArray,ae.members,this.expression.isStateDependent))},Ta.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var ka=function(F,X,oe,ye){this.binders={},this.layoutAttributes=ye,this._buffers=[];var Me=[];for(var Ie in F.paint._values)if(oe(Ie)){var $e=F.paint.get(Ie);if(!(!($e instanceof Mi)||!ul($e.property.specification))){var mt=hi(Ie,F.type),Ct=$e.value,_t=$e.property.specification.type,Kt=$e.property.useIntegerZoom,lr=$e.property.specification["property-type"],tr=lr==="cross-faded"||lr==="cross-faded-data-driven";if(Ct.kind==="constant")this.binders[Ie]=tr?new ca(Ct.value,mt):new ra(Ct.value,mt,_t),Me.push("/u_"+Ie);else if(Ct.kind==="source"||tr){var wr=qa(Ie,_t,"source");this.binders[Ie]=tr?new Ta(Ct,_t,Kt,X,wr,F.id):new fa(Ct,mt,_t,wr),Me.push("/a_"+Ie)}else{var Ur=qa(Ie,_t,"composite");this.binders[Ie]=new ya(Ct,mt,_t,Kt,X,Ur),Me.push("/z_"+Ie)}}}this.cacheKey=Me.sort().join("")};ka.prototype.getMaxValue=function(F){var X=this.binders[F];return X instanceof fa||X instanceof ya?X.maxValue:0},ka.prototype.populatePaintArrays=function(F,X,oe,ye,Me){for(var Ie in this.binders){var $e=this.binders[Ie];($e instanceof fa||$e instanceof ya||$e instanceof Ta)&&$e.populatePaintArray(F,X,oe,ye,Me)}},ka.prototype.setConstantPatternPositions=function(F,X){for(var oe in this.binders){var ye=this.binders[oe];ye instanceof ca&&ye.setConstantPatternPositions(F,X)}},ka.prototype.updatePaintArrays=function(F,X,oe,ye,Me){var Ie=!1;for(var $e in F)for(var mt=X.getPositions($e),Ct=0,_t=mt;Ct<_t.length;Ct+=1){var Kt=_t[Ct],lr=oe.feature(Kt.index);for(var tr in this.binders){var wr=this.binders[tr];if((wr instanceof fa||wr instanceof ya||wr instanceof Ta)&&wr.expression.isStateDependent===!0){var Ur=ye.paint.get(tr);wr.expression=Ur.value,wr.updatePaintArray(Kt.start,Kt.end,lr,F[$e],Me),Ie=!0}}}return Ie},ka.prototype.defines=function(){var F=[];for(var X in this.binders){var oe=this.binders[X];(oe instanceof ra||oe instanceof ca)&&F.push.apply(F,oe.uniformNames.map(function(ye){return"#define HAS_UNIFORM_"+ye}))}return F},ka.prototype.getPaintVertexBuffers=function(){return this._buffers},ka.prototype.getUniforms=function(F,X){var oe=[];for(var ye in this.binders){var Me=this.binders[ye];if(Me instanceof ra||Me instanceof ca||Me instanceof ya)for(var Ie=0,$e=Me.uniformNames;Ie<$e.length;Ie+=1){var mt=$e[Ie];if(X[mt]){var Ct=Me.getBinding(F,X[mt],mt);oe.push({name:mt,property:ye,binding:Ct})}}}return oe},ka.prototype.setUniforms=function(F,X,oe,ye){for(var Me=0,Ie=X;Me<Ie.length;Me+=1){var $e=Ie[Me],mt=$e.name,Ct=$e.property,_t=$e.binding;this.binders[Ct].setUniform(_t,ye,oe.get(Ct),mt)}},ka.prototype.updatePaintBuffers=function(F){this._buffers=[];for(var X in this.binders){var oe=this.binders[X];if(F&&oe instanceof Ta){var ye=F.fromScale===2?oe.zoomInPaintVertexBuffer:oe.zoomOutPaintVertexBuffer;ye&&this._buffers.push(ye)}else(oe instanceof fa||oe instanceof ya)&&oe.paintVertexBuffer&&this._buffers.push(oe.paintVertexBuffer)}},ka.prototype.upload=function(F){for(var X in this.binders){var oe=this.binders[X];(oe instanceof fa||oe instanceof ya||oe instanceof Ta)&&oe.upload(F)}this.updatePaintBuffers()},ka.prototype.destroy=function(){for(var F in this.binders){var X=this.binders[F];(X instanceof fa||X instanceof ya||X instanceof Ta)&&X.destroy()}};var Ya=function(F,X,oe,ye){ye===void 0&&(ye=function(){return!0}),this.programConfigurations={};for(var Me=0,Ie=X;Me<Ie.length;Me+=1){var $e=Ie[Me];this.programConfigurations[$e.id]=new ka($e,oe,ye,F)}this.needsUpload=!1,this._featureMap=new Gt,this._bufferOffset=0};Ya.prototype.populatePaintArrays=function(F,X,oe,ye,Me,Ie){for(var $e in this.programConfigurations)this.programConfigurations[$e].populatePaintArrays(F,X,ye,Me,Ie);X.id!==void 0&&this._featureMap.add(X.id,oe,this._bufferOffset,F),this._bufferOffset=F,this.needsUpload=!0},Ya.prototype.updatePaintArrays=function(F,X,oe,ye){for(var Me=0,Ie=oe;Me<Ie.length;Me+=1){var $e=Ie[Me];this.needsUpload=this.programConfigurations[$e.id].updatePaintArrays(F,this._featureMap,X,$e,ye)||this.needsUpload}},Ya.prototype.get=function(F){return this.programConfigurations[F]},Ya.prototype.upload=function(F){if(this.needsUpload){for(var X in this.programConfigurations)this.programConfigurations[X].upload(F);this.needsUpload=!1}},Ya.prototype.destroy=function(){for(var F in this.programConfigurations)this.programConfigurations[F].destroy()};function hi(I,F){var X={"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]};return X[I]||[I.replace(F+"-","").replace(/-/g,"_")]}function Za(I){var F={"line-pattern":{source:As,composite:As},"fill-pattern":{source:As,composite:As},"fill-extrusion-pattern":{source:As,composite:As}};return F[I]}function qa(I,F,X){var oe={color:{source:Zf,composite:_0},number:{source:xh,composite:Zf}},ye=Za(I);return ye&&ye[X]||oe[F][X]}he("ConstantBinder",ra),he("CrossFadedConstantBinder",ca),he("SourceExpressionBinder",fa),he("CrossFadedCompositeBinder",Ta),he("CompositeExpressionBinder",ya),he("ProgramConfiguration",ka,{omit:["_buffers"]}),he("ProgramConfigurationSet",Ya);var Ra=8192;function vi(I){return{min:-1*Math.pow(2,I-1),max:Math.pow(2,I-1)-1}}var yi=vi(15);function xi(I){for(var F=Ra/I.extent,X=I.loadGeometry(),oe=0;oe<X.length;oe++)for(var ye=X[oe],Me=0;Me<ye.length;Me++){var Ie=ye[Me];Ie.x=Math.round(Ie.x*F),Ie.y=Math.round(Ie.y*F),(Ie.x<yi.min||Ie.x>yi.max||Ie.y<yi.min||Ie.y>yi.max)&&(H("Geometry exceeds allowed extent, reduce your vector tile buffer size"),Ie.x=h(Ie.x,yi.min,yi.max),Ie.y=h(Ie.y,yi.min,yi.max))}return X}function ti(I,F,X,oe,ye){I.emplaceBack(F*2+(oe+1)/2,X*2+(ye+1)/2)}var Pi=function(F){this.zoom=F.zoom,this.overscaling=F.overscaling,this.layers=F.layers,this.layerIds=this.layers.map(function(X){return X.id}),this.index=F.index,this.hasPattern=!1,this.layoutVertexArray=new Ev,this.indexArray=new ff,this.segments=new J,this.programConfigurations=new Ya(ge,F.layers,F.zoom),this.stateDependentLayerIds=this.layers.filter(function(X){return X.isStateDependent()}).map(function(X){return X.id})};Pi.prototype.populate=function(F,X,oe){var ye=this.layers[0],Me=[],Ie=null;ye.type==="circle"&&(Ie=ye.layout.get("circle-sort-key"));for(var $e=0,mt=F;$e<mt.length;$e+=1){var Ct=mt[$e],_t=Ct.feature,Kt=Ct.id,lr=Ct.index,tr=Ct.sourceLayerIndex,wr=this.layers[0]._featureFilter.needGeometry,Ur={type:_t.type,id:Kt,properties:_t.properties,geometry:wr?xi(_t):[]};if(this.layers[0]._featureFilter.filter(new Bn(this.zoom),Ur,oe)){wr||(Ur.geometry=xi(_t));var rn=Ie?Ie.evaluate(Ur,{},oe):void 0,qr={id:Kt,properties:_t.properties,type:_t.type,sourceLayerIndex:tr,index:lr,geometry:Ur.geometry,patterns:{},sortKey:rn};Me.push(qr)}}Ie&&Me.sort(function(va,xa){return va.sortKey-xa.sortKey});for(var Mn=0,yn=Me;Mn<yn.length;Mn+=1){var En=yn[Mn],In=En,Hn=In.geometry,Qn=In.index,$n=In.sourceLayerIndex,La=F[Qn].feature;this.addFeature(En,Hn,Qn,oe),X.featureIndex.insert(La,Hn,Qn,$n,this.index)}},Pi.prototype.update=function(F,X,oe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(F,X,this.stateDependentLayers,oe)},Pi.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Pi.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Pi.prototype.upload=function(F){this.uploaded||(this.layoutVertexBuffer=F.createVertexBuffer(this.layoutVertexArray,ge),this.indexBuffer=F.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(F),this.uploaded=!0},Pi.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Pi.prototype.addFeature=function(F,X,oe,ye){for(var Me=0,Ie=X;Me<Ie.length;Me+=1)for(var $e=Ie[Me],mt=0,Ct=$e;mt<Ct.length;mt+=1){var _t=Ct[mt],Kt=_t.x,lr=_t.y;if(!(Kt<0||Kt>=Ra||lr<0||lr>=Ra)){var tr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,F.sortKey),wr=tr.vertexLength;ti(this.layoutVertexArray,Kt,lr,-1,-1),ti(this.layoutVertexArray,Kt,lr,1,-1),ti(this.layoutVertexArray,Kt,lr,1,1),ti(this.layoutVertexArray,Kt,lr,-1,1),this.indexArray.emplaceBack(wr,wr+1,wr+2),this.indexArray.emplaceBack(wr,wr+3,wr+2),tr.vertexLength+=4,tr.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,F,oe,{},ye)},he("CircleBucket",Pi,{omit:["layers"]});function Xa(I,F){for(var X=0;X<I.length;X++)if(Ss(F,I[X]))return!0;for(var oe=0;oe<F.length;oe++)if(Ss(I,F[oe]))return!0;return!!Il(I,F)}function ni(I,F,X){return!!(Ss(I,F)||Lu(F,I,X))}function eo(I,F){if(I.length===1)return Pu(F,I[0]);for(var X=0;X<F.length;X++)for(var oe=F[X],ye=0;ye<oe.length;ye++)if(Ss(I,oe[ye]))return!0;for(var Me=0;Me<I.length;Me++)if(Pu(F,I[Me]))return!0;for(var Ie=0;Ie<F.length;Ie++)if(Il(I,F[Ie]))return!0;return!1}function mo(I,F,X){for(var oe=0;oe<F.length;oe++){var ye=F[oe];if(I.length>=3){for(var Me=0;Me<ye.length;Me++)if(Ss(I,ye[Me]))return!0}if(Dl(I,ye,X))return!0}return!1}function Dl(I,F,X){if(I.length>1){if(Il(I,F))return!0;for(var oe=0;oe<F.length;oe++)if(Lu(F[oe],I,X))return!0}for(var ye=0;ye<I.length;ye++)if(Lu(I[ye],F,X))return!0;return!1}function Il(I,F){if(I.length===0||F.length===0)return!1;for(var X=0;X<I.length-1;X++)for(var oe=I[X],ye=I[X+1],Me=0;Me<F.length-1;Me++){var Ie=F[Me],$e=F[Me+1];if(Cu(oe,ye,Ie,$e))return!0}return!1}function Cu(I,F,X,oe){return k(I,X,oe)!==k(F,X,oe)&&k(I,F,X)!==k(I,F,oe)}function Lu(I,F,X){var oe=X*X;if(F.length===1)return I.distSqr(F[0])<oe;for(var ye=1;ye<F.length;ye++){var Me=F[ye-1],Ie=F[ye];if(cf(I,Me,Ie)<oe)return!0}return!1}function cf(I,F,X){var oe=F.distSqr(X);if(oe===0)return I.distSqr(F);var ye=((I.x-F.x)*(X.x-F.x)+(I.y-F.y)*(X.y-F.y))/oe;return ye<0?I.distSqr(F):ye>1?I.distSqr(X):I.distSqr(X.sub(F)._mult(ye)._add(F))}function Pu(I,F){for(var X=!1,oe,ye,Me,Ie=0;Ie<I.length;Ie++){oe=I[Ie];for(var $e=0,mt=oe.length-1;$e<oe.length;mt=$e++)ye=oe[$e],Me=oe[mt],ye.y>F.y!=Me.y>F.y&&F.x<(Me.x-ye.x)*(F.y-ye.y)/(Me.y-ye.y)+ye.x&&(X=!X)}return X}function Ss(I,F){for(var X=!1,oe=0,ye=I.length-1;oe<I.length;ye=oe++){var Me=I[oe],Ie=I[ye];Me.y>F.y!=Ie.y>F.y&&F.x<(Ie.x-Me.x)*(F.y-Me.y)/(Ie.y-Me.y)+Me.x&&(X=!X)}return X}function Kf(I,F,X,oe,ye){for(var Me=0,Ie=I;Me<Ie.length;Me+=1){var $e=Ie[Me];if(F<=$e.x&&X<=$e.y&&oe>=$e.x&&ye>=$e.y)return!0}var mt=[new r(F,X),new r(F,ye),new r(oe,ye),new r(oe,X)];if(I.length>2)for(var Ct=0,_t=mt;Ct<_t.length;Ct+=1){var Kt=_t[Ct];if(Ss(I,Kt))return!0}for(var lr=0;lr<I.length-1;lr++){var tr=I[lr],wr=I[lr+1];if(rs(tr,wr,mt))return!0}return!1}function rs(I,F,X){var oe=X[0],ye=X[2];if(I.x<oe.x&&F.x<oe.x||I.x>ye.x&&F.x>ye.x||I.y<oe.y&&F.y<oe.y||I.y>ye.y&&F.y>ye.y)return!1;var Me=k(I,F,X[0]);return Me!==k(I,F,X[1])||Me!==k(I,F,X[2])||Me!==k(I,F,X[3])}function hl(I,F,X){var oe=F.paint.get(I).value;return oe.kind==="constant"?oe.value:X.programConfigurations.get(F.id).getMaxValue(I)}function _u(I){return Math.sqrt(I[0]*I[0]+I[1]*I[1])}function ru(I,F,X,oe,ye){if(!F[0]&&!F[1])return I;var Me=r.convert(F)._mult(ye);X==="viewport"&&Me._rotate(-oe);for(var Ie=[],$e=0;$e<I.length;$e++){var mt=I[$e];Ie.push(mt.sub(Me))}return Ie}var Ru=new ho({"circle-sort-key":new Ca($t.layout_circle["circle-sort-key"])}),vd=new ho({"circle-radius":new Ca($t.paint_circle["circle-radius"]),"circle-color":new Ca($t.paint_circle["circle-color"]),"circle-blur":new Ca($t.paint_circle["circle-blur"]),"circle-opacity":new Ca($t.paint_circle["circle-opacity"]),"circle-translate":new ma($t.paint_circle["circle-translate"]),"circle-translate-anchor":new ma($t.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new ma($t.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new ma($t.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Ca($t.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Ca($t.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Ca($t.paint_circle["circle-stroke-opacity"])}),_c={paint:vd,layout:Ru},Xo=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var I=arguments,F=0,X=arguments.length;X--;)F+=I[X]*I[X];return Math.sqrt(F)});function Pv(){var I=new Xo(4);return Xo!=Float32Array&&(I[1]=0,I[2]=0),I[0]=1,I[3]=1,I}function fs(I,F,X){var oe=F[0],ye=F[1],Me=F[2],Ie=F[3],$e=Math.sin(X),mt=Math.cos(X);return I[0]=oe*mt+Me*$e,I[1]=ye*mt+Ie*$e,I[2]=oe*-$e+Me*mt,I[3]=ye*-$e+Ie*mt,I}function _v(){var I=new Xo(9);return Xo!=Float32Array&&(I[1]=0,I[2]=0,I[3]=0,I[5]=0,I[6]=0,I[7]=0),I[0]=1,I[4]=1,I[8]=1,I}function dd(I,F){var X=Math.sin(F),oe=Math.cos(F);return I[0]=oe,I[1]=X,I[2]=0,I[3]=-X,I[4]=oe,I[5]=0,I[6]=0,I[7]=0,I[8]=1,I}function pd(){var I=new Xo(16);return Xo!=Float32Array&&(I[1]=0,I[2]=0,I[3]=0,I[4]=0,I[6]=0,I[7]=0,I[8]=0,I[9]=0,I[11]=0,I[12]=0,I[13]=0,I[14]=0),I[0]=1,I[5]=1,I[10]=1,I[15]=1,I}function vg(I){var F=new Xo(16);return F[0]=I[0],F[1]=I[1],F[2]=I[2],F[3]=I[3],F[4]=I[4],F[5]=I[5],F[6]=I[6],F[7]=I[7],F[8]=I[8],F[9]=I[9],F[10]=I[10],F[11]=I[11],F[12]=I[12],F[13]=I[13],F[14]=I[14],F[15]=I[15],F}function gd(I){return I[0]=1,I[1]=0,I[2]=0,I[3]=0,I[4]=0,I[5]=1,I[6]=0,I[7]=0,I[8]=0,I[9]=0,I[10]=1,I[11]=0,I[12]=0,I[13]=0,I[14]=0,I[15]=1,I}function Th(I,F){var X=F[0],oe=F[1],ye=F[2],Me=F[3],Ie=F[4],$e=F[5],mt=F[6],Ct=F[7],_t=F[8],Kt=F[9],lr=F[10],tr=F[11],wr=F[12],Ur=F[13],rn=F[14],qr=F[15],Mn=X*$e-oe*Ie,yn=X*mt-ye*Ie,En=X*Ct-Me*Ie,In=oe*mt-ye*$e,Hn=oe*Ct-Me*$e,Qn=ye*Ct-Me*mt,$n=_t*Ur-Kt*wr,La=_t*rn-lr*wr,va=_t*qr-tr*wr,xa=Kt*rn-lr*Ur,Ga=Kt*qr-tr*Ur,Aa=lr*qr-tr*rn,Ma=Mn*Aa-yn*Ga+En*xa+In*va-Hn*La+Qn*$n;return Ma?(Ma=1/Ma,I[0]=($e*Aa-mt*Ga+Ct*xa)*Ma,I[1]=(ye*Ga-oe*Aa-Me*xa)*Ma,I[2]=(Ur*Qn-rn*Hn+qr*In)*Ma,I[3]=(lr*Hn-Kt*Qn-tr*In)*Ma,I[4]=(mt*va-Ie*Aa-Ct*La)*Ma,I[5]=(X*Aa-ye*va+Me*La)*Ma,I[6]=(rn*En-wr*Qn-qr*yn)*Ma,I[7]=(_t*Qn-lr*En+tr*yn)*Ma,I[8]=(Ie*Ga-$e*va+Ct*$n)*Ma,I[9]=(oe*va-X*Ga-Me*$n)*Ma,I[10]=(wr*Hn-Ur*En+qr*Mn)*Ma,I[11]=(Kt*En-_t*Hn-tr*Mn)*Ma,I[12]=($e*La-Ie*xa-mt*$n)*Ma,I[13]=(X*xa-oe*La+ye*$n)*Ma,I[14]=(Ur*yn-wr*In-rn*Mn)*Ma,I[15]=(_t*In-Kt*yn+lr*Mn)*Ma,I):null}function Ah(I,F,X){var oe=F[0],ye=F[1],Me=F[2],Ie=F[3],$e=F[4],mt=F[5],Ct=F[6],_t=F[7],Kt=F[8],lr=F[9],tr=F[10],wr=F[11],Ur=F[12],rn=F[13],qr=F[14],Mn=F[15],yn=X[0],En=X[1],In=X[2],Hn=X[3];return I[0]=yn*oe+En*$e+In*Kt+Hn*Ur,I[1]=yn*ye+En*mt+In*lr+Hn*rn,I[2]=yn*Me+En*Ct+In*tr+Hn*qr,I[3]=yn*Ie+En*_t+In*wr+Hn*Mn,yn=X[4],En=X[5],In=X[6],Hn=X[7],I[4]=yn*oe+En*$e+In*Kt+Hn*Ur,I[5]=yn*ye+En*mt+In*lr+Hn*rn,I[6]=yn*Me+En*Ct+In*tr+Hn*qr,I[7]=yn*Ie+En*_t+In*wr+Hn*Mn,yn=X[8],En=X[9],In=X[10],Hn=X[11],I[8]=yn*oe+En*$e+In*Kt+Hn*Ur,I[9]=yn*ye+En*mt+In*lr+Hn*rn,I[10]=yn*Me+En*Ct+In*tr+Hn*qr,I[11]=yn*Ie+En*_t+In*wr+Hn*Mn,yn=X[12],En=X[13],In=X[14],Hn=X[15],I[12]=yn*oe+En*$e+In*Kt+Hn*Ur,I[13]=yn*ye+En*mt+In*lr+Hn*rn,I[14]=yn*Me+En*Ct+In*tr+Hn*qr,I[15]=yn*Ie+En*_t+In*wr+Hn*Mn,I}function ao(I,F,X){var oe=X[0],ye=X[1],Me=X[2],Ie,$e,mt,Ct,_t,Kt,lr,tr,wr,Ur,rn,qr;return F===I?(I[12]=F[0]*oe+F[4]*ye+F[8]*Me+F[12],I[13]=F[1]*oe+F[5]*ye+F[9]*Me+F[13],I[14]=F[2]*oe+F[6]*ye+F[10]*Me+F[14],I[15]=F[3]*oe+F[7]*ye+F[11]*Me+F[15]):(Ie=F[0],$e=F[1],mt=F[2],Ct=F[3],_t=F[4],Kt=F[5],lr=F[6],tr=F[7],wr=F[8],Ur=F[9],rn=F[10],qr=F[11],I[0]=Ie,I[1]=$e,I[2]=mt,I[3]=Ct,I[4]=_t,I[5]=Kt,I[6]=lr,I[7]=tr,I[8]=wr,I[9]=Ur,I[10]=rn,I[11]=qr,I[12]=Ie*oe+_t*ye+wr*Me+F[12],I[13]=$e*oe+Kt*ye+Ur*Me+F[13],I[14]=mt*oe+lr*ye+rn*Me+F[14],I[15]=Ct*oe+tr*ye+qr*Me+F[15]),I}function Xs(I,F,X){var oe=X[0],ye=X[1],Me=X[2];return I[0]=F[0]*oe,I[1]=F[1]*oe,I[2]=F[2]*oe,I[3]=F[3]*oe,I[4]=F[4]*ye,I[5]=F[5]*ye,I[6]=F[6]*ye,I[7]=F[7]*ye,I[8]=F[8]*Me,I[9]=F[9]*Me,I[10]=F[10]*Me,I[11]=F[11]*Me,I[12]=F[12],I[13]=F[13],I[14]=F[14],I[15]=F[15],I}function Zs(I,F,X){var oe=Math.sin(X),ye=Math.cos(X),Me=F[4],Ie=F[5],$e=F[6],mt=F[7],Ct=F[8],_t=F[9],Kt=F[10],lr=F[11];return F!==I&&(I[0]=F[0],I[1]=F[1],I[2]=F[2],I[3]=F[3],I[12]=F[12],I[13]=F[13],I[14]=F[14],I[15]=F[15]),I[4]=Me*ye+Ct*oe,I[5]=Ie*ye+_t*oe,I[6]=$e*ye+Kt*oe,I[7]=mt*ye+lr*oe,I[8]=Ct*ye-Me*oe,I[9]=_t*ye-Ie*oe,I[10]=Kt*ye-$e*oe,I[11]=lr*ye-mt*oe,I}function yd(I,F,X){var oe=Math.sin(X),ye=Math.cos(X),Me=F[0],Ie=F[1],$e=F[2],mt=F[3],Ct=F[4],_t=F[5],Kt=F[6],lr=F[7];return F!==I&&(I[8]=F[8],I[9]=F[9],I[10]=F[10],I[11]=F[11],I[12]=F[12],I[13]=F[13],I[14]=F[14],I[15]=F[15]),I[0]=Me*ye+Ct*oe,I[1]=Ie*ye+_t*oe,I[2]=$e*ye+Kt*oe,I[3]=mt*ye+lr*oe,I[4]=Ct*ye-Me*oe,I[5]=_t*ye-Ie*oe,I[6]=Kt*ye-$e*oe,I[7]=lr*ye-mt*oe,I}function I0(I,F,X,oe,ye){var Me=1/Math.tan(F/2),Ie;return I[0]=Me/X,I[1]=0,I[2]=0,I[3]=0,I[4]=0,I[5]=Me,I[6]=0,I[7]=0,I[8]=0,I[9]=0,I[11]=-1,I[12]=0,I[13]=0,I[15]=0,ye!=null&&ye!==1/0?(Ie=1/(oe-ye),I[10]=(ye+oe)*Ie,I[14]=2*ye*oe*Ie):(I[10]=-1,I[14]=-2*oe),I}function By(I,F,X,oe,ye,Me,Ie){var $e=1/(F-X),mt=1/(oe-ye),Ct=1/(Me-Ie);return I[0]=-2*$e,I[1]=0,I[2]=0,I[3]=0,I[4]=0,I[5]=-2*mt,I[6]=0,I[7]=0,I[8]=0,I[9]=0,I[10]=2*Ct,I[11]=0,I[12]=(F+X)*$e,I[13]=(ye+oe)*mt,I[14]=(Ie+Me)*Ct,I[15]=1,I}var Uy=Ah;function Rv(){var I=new Xo(3);return Xo!=Float32Array&&(I[0]=0,I[1]=0,I[2]=0),I}function Hy(I){var F=new Xo(3);return F[0]=I[0],F[1]=I[1],F[2]=I[2],F}function md(I,F,X){return I[0]=F[0]+X[0],I[1]=F[1]+X[1],I[2]=F[2]+X[2],I}function Vy(I,F,X){return I[0]=F[0]-X[0],I[1]=F[1]-X[1],I[2]=F[2]-X[2],I}function Gy(I,F,X){return I[0]=F[0]*X,I[1]=F[1]*X,I[2]=F[2]*X,I}function F0(I,F){var X=F[0],oe=F[1],ye=F[2],Me=X*X+oe*oe+ye*ye;return Me>0&&(Me=1/Math.sqrt(Me)),I[0]=F[0]*Me,I[1]=F[1]*Me,I[2]=F[2]*Me,I}function NE(I,F){return I[0]*F[0]+I[1]*F[1]+I[2]*F[2]}function BE(I,F,X){var oe=F[0],ye=F[1],Me=F[2],Ie=X[0],$e=X[1],mt=X[2];return I[0]=ye*mt-Me*$e,I[1]=Me*Ie-oe*mt,I[2]=oe*$e-ye*Ie,I}function UE(I,F,X){var oe=F[0],ye=F[1],Me=F[2];return I[0]=oe*X[0]+ye*X[3]+Me*X[6],I[1]=oe*X[1]+ye*X[4]+Me*X[7],I[2]=oe*X[2]+ye*X[5]+Me*X[8],I}var HE=Vy;(function(){var I=Rv();return function(F,X,oe,ye,Me,Ie){var $e,mt;for(X||(X=3),oe||(oe=0),ye?mt=Math.min(ye*X+oe,F.length):mt=F.length,$e=oe;$e<mt;$e+=X)I[0]=F[$e],I[1]=F[$e+1],I[2]=F[$e+2],Me(I,I,Ie),F[$e]=I[0],F[$e+1]=I[1],F[$e+2]=I[2];return F}})();function VE(){var I=new Xo(4);return Xo!=Float32Array&&(I[0]=0,I[1]=0,I[2]=0,I[3]=0),I}function GE(I,F,X){return I[0]=F[0]*X,I[1]=F[1]*X,I[2]=F[2]*X,I[3]=F[3]*X,I}function WE(I,F){return I[0]*F[0]+I[1]*F[1]+I[2]*F[2]+I[3]*F[3]}function dg(I,F,X){var oe=F[0],ye=F[1],Me=F[2],Ie=F[3];return I[0]=X[0]*oe+X[4]*ye+X[8]*Me+X[12]*Ie,I[1]=X[1]*oe+X[5]*ye+X[9]*Me+X[13]*Ie,I[2]=X[2]*oe+X[6]*ye+X[10]*Me+X[14]*Ie,I[3]=X[3]*oe+X[7]*ye+X[11]*Me+X[15]*Ie,I}(function(){var I=VE();return function(F,X,oe,ye,Me,Ie){var $e,mt;for(X||(X=4),oe||(oe=0),ye?mt=Math.min(ye*X+oe,F.length):mt=F.length,$e=oe;$e<mt;$e+=X)I[0]=F[$e],I[1]=F[$e+1],I[2]=F[$e+2],I[3]=F[$e+3],Me(I,I,Ie),F[$e]=I[0],F[$e+1]=I[1],F[$e+2]=I[2],F[$e+3]=I[3];return F}})();function YE(){var I=new Xo(2);return Xo!=Float32Array&&(I[0]=0,I[1]=0),I}function XE(I){var F=I[0],X=I[1];return F*F+X*X}var ZE=XE;(function(){var I=YE();return function(F,X,oe,ye,Me,Ie){var $e,mt;for(X||(X=2),oe||(oe=0),ye?mt=Math.min(ye*X+oe,F.length):mt=F.length,$e=oe;$e<mt;$e+=X)I[0]=F[$e],I[1]=F[$e+1],Me(I,I,Ie),F[$e]=I[0],F[$e+1]=I[1];return F}})();var jE=function(I){function F(X){I.call(this,X,_c)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.createBucket=function(oe){return new Pi(oe)},F.prototype.queryRadius=function(oe){var ye=oe;return hl("circle-radius",this,ye)+hl("circle-stroke-width",this,ye)+_u(this.paint.get("circle-translate"))},F.prototype.queryIntersectsFeature=function(oe,ye,Me,Ie,$e,mt,Ct,_t){for(var Kt=ru(oe,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),mt.angle,Ct),lr=this.paint.get("circle-radius").evaluate(ye,Me),tr=this.paint.get("circle-stroke-width").evaluate(ye,Me),wr=lr+tr,Ur=this.paint.get("circle-pitch-alignment")==="map",rn=Ur?Kt:KE(Kt,_t),qr=Ur?wr*Ct:wr,Mn=0,yn=Ie;Mn<yn.length;Mn+=1)for(var En=yn[Mn],In=0,Hn=En;In<Hn.length;In+=1){var Qn=Hn[In],$n=Ur?Qn:Y3(Qn,_t),La=qr,va=dg([],[Qn.x,Qn.y,0,1],_t);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?La*=va[3]/mt.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(La*=mt.cameraToCenterDistance/va[3]),ni(rn,$n,La))return!0}return!1},F}(Fi);function Y3(I,F){var X=dg([],[I.x,I.y,0,1],F);return new r(X[0]/X[3],X[1]/X[3])}function KE(I,F){return I.map(function(X){return Y3(X,F)})}var X3=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F}(Pi);he("HeatmapBucket",X3,{omit:["layers"]});function Wy(I,F,X,oe){var ye=F.width,Me=F.height;if(!oe)oe=new Uint8Array(ye*Me*X);else if(oe instanceof Uint8ClampedArray)oe=new Uint8Array(oe.buffer);else if(oe.length!==ye*Me*X)throw new RangeError("mismatched image size");return I.width=ye,I.height=Me,I.data=oe,I}function Z3(I,F,X){var oe=F.width,ye=F.height;if(!(oe===I.width&&ye===I.height)){var Me=Wy({},{width:oe,height:ye},X);Yy(I,Me,{x:0,y:0},{x:0,y:0},{width:Math.min(I.width,oe),height:Math.min(I.height,ye)},X),I.width=oe,I.height=ye,I.data=Me.data}}function Yy(I,F,X,oe,ye,Me){if(ye.width===0||ye.height===0)return F;if(ye.width>I.width||ye.height>I.height||X.x>I.width-ye.width||X.y>I.height-ye.height)throw new RangeError("out of range source coordinates for image copy");if(ye.width>F.width||ye.height>F.height||oe.x>F.width-ye.width||oe.y>F.height-ye.height)throw new RangeError("out of range destination coordinates for image copy");for(var Ie=I.data,$e=F.data,mt=0;mt<ye.height;mt++)for(var Ct=((X.y+mt)*I.width+X.x)*Me,_t=((oe.y+mt)*F.width+oe.x)*Me,Kt=0;Kt<ye.width*Me;Kt++)$e[_t+Kt]=Ie[Ct+Kt];return F}var Dv=function(F,X){Wy(this,F,1,X)};Dv.prototype.resize=function(F){Z3(this,F,1)},Dv.prototype.clone=function(){return new Dv({width:this.width,height:this.height},new Uint8Array(this.data))},Dv.copy=function(F,X,oe,ye,Me){Yy(F,X,oe,ye,Me,1)};var js=function(F,X){Wy(this,F,4,X)};js.prototype.resize=function(F){Z3(this,F,4)},js.prototype.replace=function(F,X){X?this.data.set(F):F instanceof Uint8ClampedArray?this.data=new Uint8Array(F.buffer):this.data=F},js.prototype.clone=function(){return new js({width:this.width,height:this.height},new Uint8Array(this.data))},js.copy=function(F,X,oe,ye,Me){Yy(F,X,oe,ye,Me,4)},he("AlphaImage",Dv),he("RGBAImage",js);var JE=new ho({"heatmap-radius":new Ca($t.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Ca($t.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new ma($t.paint_heatmap["heatmap-intensity"]),"heatmap-color":new ts($t.paint_heatmap["heatmap-color"]),"heatmap-opacity":new ma($t.paint_heatmap["heatmap-opacity"])}),$E={paint:JE};function j3(I,F){for(var X=new Uint8Array(1024),oe={},ye=0,Me=0;ye<256;ye++,Me+=4){oe[F]=ye/255;var Ie=I.evaluate(oe);X[Me+0]=Math.floor(Ie.r*255/Ie.a),X[Me+1]=Math.floor(Ie.g*255/Ie.a),X[Me+2]=Math.floor(Ie.b*255/Ie.a),X[Me+3]=Math.floor(Ie.a*255)}return new js({width:256,height:1},X)}var QE=function(I){function F(X){I.call(this,X,$E),this._updateColorRamp()}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.createBucket=function(oe){return new X3(oe)},F.prototype._handleSpecialPaintPropertyUpdate=function(oe){oe==="heatmap-color"&&this._updateColorRamp()},F.prototype._updateColorRamp=function(){var oe=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=j3(oe,"heatmapDensity"),this.colorRampTexture=null},F.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},F.prototype.queryRadius=function(){return 0},F.prototype.queryIntersectsFeature=function(){return!1},F.prototype.hasOffscreenPass=function(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"},F}(Fi),qE=new ho({"hillshade-illumination-direction":new ma($t.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new ma($t.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new ma($t.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new ma($t.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new ma($t.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new ma($t.paint_hillshade["hillshade-accent-color"])}),e6={paint:qE},t6=function(I){function F(X){I.call(this,X,e6)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.hasOffscreenPass=function(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"},F}(Fi),r6=Li([{name:"a_pos",components:2,type:"Int16"}],4),K3=r6.members,Xy=pg,n6=pg;function pg(I,F,X){X=X||2;var oe=F&&F.length,ye=oe?F[0]*X:I.length,Me=J3(I,0,ye,X,!0),Ie=[];if(!Me||Me.next===Me.prev)return Ie;var $e,mt,Ct,_t,Kt,lr,tr;if(oe&&(Me=l6(I,F,Me,X)),I.length>80*X){$e=Ct=I[0],mt=_t=I[1];for(var wr=X;wr<ye;wr+=X)Kt=I[wr],lr=I[wr+1],Kt<$e&&($e=Kt),lr<mt&&(mt=lr),Kt>Ct&&(Ct=Kt),lr>_t&&(_t=lr);tr=Math.max(Ct-$e,_t-mt),tr=tr!==0?1/tr:0}return k0(Me,Ie,X,$e,mt,tr),Ie}function J3(I,F,X,oe,ye){var Me,Ie;if(ye===Ky(I,F,X,oe)>0)for(Me=F;Me<X;Me+=oe)Ie=q3(Me,I[Me],I[Me+1],Ie);else for(Me=X-oe;Me>=F;Me-=oe)Ie=q3(Me,I[Me],I[Me+1],Ie);return Ie&&gg(Ie,Ie.next)&&(z0(Ie),Ie=Ie.next),Ie}function Sh(I,F){if(!I)return I;F||(F=I);var X=I,oe;do if(oe=!1,!X.steiner&&(gg(X,X.next)||xo(X.prev,X,X.next)===0)){if(z0(X),X=F=X.prev,X===X.next)break;oe=!0}else X=X.next;while(oe||X!==F);return F}function k0(I,F,X,oe,ye,Me,Ie){if(I){!Ie&&Me&&v6(I,oe,ye,Me);for(var $e=I,mt,Ct;I.prev!==I.next;){if(mt=I.prev,Ct=I.next,Me?i6(I,oe,ye,Me):a6(I)){F.push(mt.i/X),F.push(I.i/X),F.push(Ct.i/X),z0(I),I=Ct.next,$e=Ct.next;continue}if(I=Ct,I===$e){Ie?Ie===1?(I=o6(Sh(I),F,X),k0(I,F,X,oe,ye,Me,2)):Ie===2&&s6(I,F,X,oe,ye,Me):k0(Sh(I),F,X,oe,ye,Me,1);break}}}}function a6(I){var F=I.prev,X=I,oe=I.next;if(xo(F,X,oe)>=0)return!1;for(var ye=I.next.next;ye!==I.prev;){if(xd(F.x,F.y,X.x,X.y,oe.x,oe.y,ye.x,ye.y)&&xo(ye.prev,ye,ye.next)>=0)return!1;ye=ye.next}return!0}function i6(I,F,X,oe){var ye=I.prev,Me=I,Ie=I.next;if(xo(ye,Me,Ie)>=0)return!1;for(var $e=ye.x<Me.x?ye.x<Ie.x?ye.x:Ie.x:Me.x<Ie.x?Me.x:Ie.x,mt=ye.y<Me.y?ye.y<Ie.y?ye.y:Ie.y:Me.y<Ie.y?Me.y:Ie.y,Ct=ye.x>Me.x?ye.x>Ie.x?ye.x:Ie.x:Me.x>Ie.x?Me.x:Ie.x,_t=ye.y>Me.y?ye.y>Ie.y?ye.y:Ie.y:Me.y>Ie.y?Me.y:Ie.y,Kt=Zy($e,mt,F,X,oe),lr=Zy(Ct,_t,F,X,oe),tr=I.prevZ,wr=I.nextZ;tr&&tr.z>=Kt&&wr&&wr.z<=lr;){if(tr!==I.prev&&tr!==I.next&&xd(ye.x,ye.y,Me.x,Me.y,Ie.x,Ie.y,tr.x,tr.y)&&xo(tr.prev,tr,tr.next)>=0||(tr=tr.prevZ,wr!==I.prev&&wr!==I.next&&xd(ye.x,ye.y,Me.x,Me.y,Ie.x,Ie.y,wr.x,wr.y)&&xo(wr.prev,wr,wr.next)>=0))return!1;wr=wr.nextZ}for(;tr&&tr.z>=Kt;){if(tr!==I.prev&&tr!==I.next&&xd(ye.x,ye.y,Me.x,Me.y,Ie.x,Ie.y,tr.x,tr.y)&&xo(tr.prev,tr,tr.next)>=0)return!1;tr=tr.prevZ}for(;wr&&wr.z<=lr;){if(wr!==I.prev&&wr!==I.next&&xd(ye.x,ye.y,Me.x,Me.y,Ie.x,Ie.y,wr.x,wr.y)&&xo(wr.prev,wr,wr.next)>=0)return!1;wr=wr.nextZ}return!0}function o6(I,F,X){var oe=I;do{var ye=oe.prev,Me=oe.next.next;!gg(ye,Me)&&$3(ye,oe,oe.next,Me)&&O0(ye,Me)&&O0(Me,ye)&&(F.push(ye.i/X),F.push(oe.i/X),F.push(Me.i/X),z0(oe),z0(oe.next),oe=I=Me),oe=oe.next}while(oe!==I);return Sh(oe)}function s6(I,F,X,oe,ye,Me){var Ie=I;do{for(var $e=Ie.next.next;$e!==Ie.prev;){if(Ie.i!==$e.i&&g6(Ie,$e)){var mt=Q3(Ie,$e);Ie=Sh(Ie,Ie.next),mt=Sh(mt,mt.next),k0(Ie,F,X,oe,ye,Me),k0(mt,F,X,oe,ye,Me);return}$e=$e.next}Ie=Ie.next}while(Ie!==I)}function l6(I,F,X,oe){var ye=[],Me,Ie,$e,mt,Ct;for(Me=0,Ie=F.length;Me<Ie;Me++)$e=F[Me]*oe,mt=Me<Ie-1?F[Me+1]*oe:I.length,Ct=J3(I,$e,mt,oe,!1),Ct===Ct.next&&(Ct.steiner=!0),ye.push(p6(Ct));for(ye.sort(u6),Me=0;Me<ye.length;Me++)f6(ye[Me],X),X=Sh(X,X.next);return X}function u6(I,F){return I.x-F.x}function f6(I,F){if(F=c6(I,F),F){var X=Q3(F,I);Sh(F,F.next),Sh(X,X.next)}}function c6(I,F){var X=F,oe=I.x,ye=I.y,Me=-1/0,Ie;do{if(ye<=X.y&&ye>=X.next.y&&X.next.y!==X.y){var $e=X.x+(ye-X.y)*(X.next.x-X.x)/(X.next.y-X.y);if($e<=oe&&$e>Me){if(Me=$e,$e===oe){if(ye===X.y)return X;if(ye===X.next.y)return X.next}Ie=X.x<X.next.x?X:X.next}}X=X.next}while(X!==F);if(!Ie)return null;if(oe===Me)return Ie;var mt=Ie,Ct=Ie.x,_t=Ie.y,Kt=1/0,lr;X=Ie;do oe>=X.x&&X.x>=Ct&&oe!==X.x&&xd(ye<_t?oe:Me,ye,Ct,_t,ye<_t?Me:oe,ye,X.x,X.y)&&(lr=Math.abs(ye-X.y)/(oe-X.x),O0(X,I)&&(lr<Kt||lr===Kt&&(X.x>Ie.x||X.x===Ie.x&&h6(Ie,X)))&&(Ie=X,Kt=lr)),X=X.next;while(X!==mt);return Ie}function h6(I,F){return xo(I.prev,I,F.prev)<0&&xo(F.next,I,I.next)<0}function v6(I,F,X,oe){var ye=I;do ye.z===null&&(ye.z=Zy(ye.x,ye.y,F,X,oe)),ye.prevZ=ye.prev,ye.nextZ=ye.next,ye=ye.next;while(ye!==I);ye.prevZ.nextZ=null,ye.prevZ=null,d6(ye)}function d6(I){var F,X,oe,ye,Me,Ie,$e,mt,Ct=1;do{for(X=I,I=null,Me=null,Ie=0;X;){for(Ie++,oe=X,$e=0,F=0;F<Ct&&($e++,oe=oe.nextZ,!!oe);F++);for(mt=Ct;$e>0||mt>0&&oe;)$e!==0&&(mt===0||!oe||X.z<=oe.z)?(ye=X,X=X.nextZ,$e--):(ye=oe,oe=oe.nextZ,mt--),Me?Me.nextZ=ye:I=ye,ye.prevZ=Me,Me=ye;X=oe}Me.nextZ=null,Ct*=2}while(Ie>1);return I}function Zy(I,F,X,oe,ye){return I=32767*(I-X)*ye,F=32767*(F-oe)*ye,I=(I|I<<8)&16711935,I=(I|I<<4)&252645135,I=(I|I<<2)&858993459,I=(I|I<<1)&1431655765,F=(F|F<<8)&16711935,F=(F|F<<4)&252645135,F=(F|F<<2)&858993459,F=(F|F<<1)&1431655765,I|F<<1}function p6(I){var F=I,X=I;do(F.x<X.x||F.x===X.x&&F.y<X.y)&&(X=F),F=F.next;while(F!==I);return X}function xd(I,F,X,oe,ye,Me,Ie,$e){return(ye-Ie)*(F-$e)-(I-Ie)*(Me-$e)>=0&&(I-Ie)*(oe-$e)-(X-Ie)*(F-$e)>=0&&(X-Ie)*(Me-$e)-(ye-Ie)*(oe-$e)>=0}function g6(I,F){return I.next.i!==F.i&&I.prev.i!==F.i&&!y6(I,F)&&(O0(I,F)&&O0(F,I)&&m6(I,F)&&(xo(I.prev,I,F.prev)||xo(I,F.prev,F))||gg(I,F)&&xo(I.prev,I,I.next)>0&&xo(F.prev,F,F.next)>0)}function xo(I,F,X){return(F.y-I.y)*(X.x-F.x)-(F.x-I.x)*(X.y-F.y)}function gg(I,F){return I.x===F.x&&I.y===F.y}function $3(I,F,X,oe){var ye=mg(xo(I,F,X)),Me=mg(xo(I,F,oe)),Ie=mg(xo(X,oe,I)),$e=mg(xo(X,oe,F));return!!(ye!==Me&&Ie!==$e||ye===0&&yg(I,X,F)||Me===0&&yg(I,oe,F)||Ie===0&&yg(X,I,oe)||$e===0&&yg(X,F,oe))}function yg(I,F,X){return F.x<=Math.max(I.x,X.x)&&F.x>=Math.min(I.x,X.x)&&F.y<=Math.max(I.y,X.y)&&F.y>=Math.min(I.y,X.y)}function mg(I){return I>0?1:I<0?-1:0}function y6(I,F){var X=I;do{if(X.i!==I.i&&X.next.i!==I.i&&X.i!==F.i&&X.next.i!==F.i&&$3(X,X.next,I,F))return!0;X=X.next}while(X!==I);return!1}function O0(I,F){return xo(I.prev,I,I.next)<0?xo(I,F,I.next)>=0&&xo(I,I.prev,F)>=0:xo(I,F,I.prev)<0||xo(I,I.next,F)<0}function m6(I,F){var X=I,oe=!1,ye=(I.x+F.x)/2,Me=(I.y+F.y)/2;do X.y>Me!=X.next.y>Me&&X.next.y!==X.y&&ye<(X.next.x-X.x)*(Me-X.y)/(X.next.y-X.y)+X.x&&(oe=!oe),X=X.next;while(X!==I);return oe}function Q3(I,F){var X=new jy(I.i,I.x,I.y),oe=new jy(F.i,F.x,F.y),ye=I.next,Me=F.prev;return I.next=F,F.prev=I,X.next=ye,ye.prev=X,oe.next=X,X.prev=oe,Me.next=oe,oe.prev=Me,oe}function q3(I,F,X,oe){var ye=new jy(I,F,X);return oe?(ye.next=oe.next,ye.prev=oe,oe.next.prev=ye,oe.next=ye):(ye.prev=ye,ye.next=ye),ye}function z0(I){I.next.prev=I.prev,I.prev.next=I.next,I.prevZ&&(I.prevZ.nextZ=I.nextZ),I.nextZ&&(I.nextZ.prevZ=I.prevZ)}function jy(I,F,X){this.i=I,this.x=F,this.y=X,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}pg.deviation=function(I,F,X,oe){var ye=F&&F.length,Me=ye?F[0]*X:I.length,Ie=Math.abs(Ky(I,0,Me,X));if(ye)for(var $e=0,mt=F.length;$e<mt;$e++){var Ct=F[$e]*X,_t=$e<mt-1?F[$e+1]*X:I.length;Ie-=Math.abs(Ky(I,Ct,_t,X))}var Kt=0;for($e=0;$e<oe.length;$e+=3){var lr=oe[$e]*X,tr=oe[$e+1]*X,wr=oe[$e+2]*X;Kt+=Math.abs((I[lr]-I[wr])*(I[tr+1]-I[lr+1])-(I[lr]-I[tr])*(I[wr+1]-I[lr+1]))}return Ie===0&&Kt===0?0:Math.abs((Kt-Ie)/Ie)};function Ky(I,F,X,oe){for(var ye=0,Me=F,Ie=X-oe;Me<X;Me+=oe)ye+=(I[Ie]-I[Me])*(I[Me+1]+I[Ie+1]),Ie=Me;return ye}pg.flatten=function(I){for(var F=I[0][0].length,X={vertices:[],holes:[],dimensions:F},oe=0,ye=0;ye<I.length;ye++){for(var Me=0;Me<I[ye].length;Me++)for(var Ie=0;Ie<F;Ie++)X.vertices.push(I[ye][Me][Ie]);ye>0&&(oe+=I[ye-1].length,X.holes.push(oe))}return X},Xy.default=n6;function x6(I,F,X,oe,ye){eb(I,F,X||0,oe||I.length-1,ye||b6)}function eb(I,F,X,oe,ye){for(;oe>X;){if(oe-X>600){var Me=oe-X+1,Ie=F-X+1,$e=Math.log(Me),mt=.5*Math.exp(2*$e/3),Ct=.5*Math.sqrt($e*mt*(Me-mt)/Me)*(Ie-Me/2<0?-1:1),_t=Math.max(X,Math.floor(F-Ie*mt/Me+Ct)),Kt=Math.min(oe,Math.floor(F+(Me-Ie)*mt/Me+Ct));eb(I,F,_t,Kt,ye)}var lr=I[F],tr=X,wr=oe;for(N0(I,X,F),ye(I[oe],lr)>0&&N0(I,X,oe);tr<wr;){for(N0(I,tr,wr),tr++,wr--;ye(I[tr],lr)<0;)tr++;for(;ye(I[wr],lr)>0;)wr--}ye(I[X],lr)===0?N0(I,X,wr):(wr++,N0(I,wr,oe)),wr<=F&&(X=wr+1),F<=wr&&(oe=wr-1)}}function N0(I,F,X){var oe=I[F];I[F]=I[X],I[X]=oe}function b6(I,F){return I<F?-1:I>F?1:0}function Jy(I,F){var X=I.length;if(X<=1)return[I];for(var oe=[],ye,Me,Ie=0;Ie<X;Ie++){var $e=V(I[Ie]);$e!==0&&(I[Ie].area=Math.abs($e),Me===void 0&&(Me=$e<0),Me===$e<0?(ye&&oe.push(ye),ye=[I[Ie]]):ye.push(I[Ie]))}if(ye&&oe.push(ye),F>1)for(var mt=0;mt<oe.length;mt++)oe[mt].length<=F||(x6(oe[mt],F,1,oe[mt].length-1,w6),oe[mt]=oe[mt].slice(0,F));return oe}function w6(I,F){return F.area-I.area}function $y(I,F,X){for(var oe=X.patternDependencies,ye=!1,Me=0,Ie=F;Me<Ie.length;Me+=1){var $e=Ie[Me],mt=$e.paint.get(I+"-pattern");mt.isConstant()||(ye=!0);var Ct=mt.constantOr(null);Ct&&(ye=!0,oe[Ct.to]=!0,oe[Ct.from]=!0)}return ye}function Qy(I,F,X,oe,ye){for(var Me=ye.patternDependencies,Ie=0,$e=F;Ie<$e.length;Ie+=1){var mt=$e[Ie],Ct=mt.paint.get(I+"-pattern"),_t=Ct.value;if(_t.kind!=="constant"){var Kt=_t.evaluate({zoom:oe-1},X,{},ye.availableImages),lr=_t.evaluate({zoom:oe},X,{},ye.availableImages),tr=_t.evaluate({zoom:oe+1},X,{},ye.availableImages);Kt=Kt&&Kt.name?Kt.name:Kt,lr=lr&&lr.name?lr.name:lr,tr=tr&&tr.name?tr.name:tr,Me[Kt]=!0,Me[lr]=!0,Me[tr]=!0,X.patterns[mt.id]={min:Kt,mid:lr,max:tr}}}return X}var T6=500,hf=function(F){this.zoom=F.zoom,this.overscaling=F.overscaling,this.layers=F.layers,this.layerIds=this.layers.map(function(X){return X.id}),this.index=F.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Ev,this.indexArray=new ff,this.indexArray2=new Lv,this.programConfigurations=new Ya(K3,F.layers,F.zoom),this.segments=new J,this.segments2=new J,this.stateDependentLayerIds=this.layers.filter(function(X){return X.isStateDependent()}).map(function(X){return X.id})};hf.prototype.populate=function(F,X,oe){this.hasPattern=$y("fill",this.layers,X);for(var ye=this.layers[0].layout.get("fill-sort-key"),Me=[],Ie=0,$e=F;Ie<$e.length;Ie+=1){var mt=$e[Ie],Ct=mt.feature,_t=mt.id,Kt=mt.index,lr=mt.sourceLayerIndex,tr=this.layers[0]._featureFilter.needGeometry,wr={type:Ct.type,id:_t,properties:Ct.properties,geometry:tr?xi(Ct):[]};if(this.layers[0]._featureFilter.filter(new Bn(this.zoom),wr,oe)){tr||(wr.geometry=xi(Ct));var Ur=ye?ye.evaluate(wr,{},oe,X.availableImages):void 0,rn={id:_t,properties:Ct.properties,type:Ct.type,sourceLayerIndex:lr,index:Kt,geometry:wr.geometry,patterns:{},sortKey:Ur};Me.push(rn)}}ye&&Me.sort(function(va,xa){return va.sortKey-xa.sortKey});for(var qr=0,Mn=Me;qr<Mn.length;qr+=1){var yn=Mn[qr],En=yn,In=En.geometry,Hn=En.index,Qn=En.sourceLayerIndex;if(this.hasPattern){var $n=Qy("fill",this.layers,yn,this.zoom,X);this.patternFeatures.push($n)}else this.addFeature(yn,In,Hn,oe,{});var La=F[Hn].feature;X.featureIndex.insert(La,In,Hn,Qn,this.index)}},hf.prototype.update=function(F,X,oe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(F,X,this.stateDependentLayers,oe)},hf.prototype.addFeatures=function(F,X,oe){for(var ye=0,Me=this.patternFeatures;ye<Me.length;ye+=1){var Ie=Me[ye];this.addFeature(Ie,Ie.geometry,Ie.index,X,oe)}},hf.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},hf.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},hf.prototype.upload=function(F){this.uploaded||(this.layoutVertexBuffer=F.createVertexBuffer(this.layoutVertexArray,K3),this.indexBuffer=F.createIndexBuffer(this.indexArray),this.indexBuffer2=F.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(F),this.uploaded=!0},hf.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},hf.prototype.addFeature=function(F,X,oe,ye,Me){for(var Ie=0,$e=Jy(X,T6);Ie<$e.length;Ie+=1){for(var mt=$e[Ie],Ct=0,_t=0,Kt=mt;_t<Kt.length;_t+=1){var lr=Kt[_t];Ct+=lr.length}for(var tr=this.segments.prepareSegment(Ct,this.layoutVertexArray,this.indexArray),wr=tr.vertexLength,Ur=[],rn=[],qr=0,Mn=mt;qr<Mn.length;qr+=1){var yn=Mn[qr];if(yn.length!==0){yn!==mt[0]&&rn.push(Ur.length/2);var En=this.segments2.prepareSegment(yn.length,this.layoutVertexArray,this.indexArray2),In=En.vertexLength;this.layoutVertexArray.emplaceBack(yn[0].x,yn[0].y),this.indexArray2.emplaceBack(In+yn.length-1,In),Ur.push(yn[0].x),Ur.push(yn[0].y);for(var Hn=1;Hn<yn.length;Hn++)this.layoutVertexArray.emplaceBack(yn[Hn].x,yn[Hn].y),this.indexArray2.emplaceBack(In+Hn-1,In+Hn),Ur.push(yn[Hn].x),Ur.push(yn[Hn].y);En.vertexLength+=yn.length,En.primitiveLength+=yn.length}}for(var Qn=Xy(Ur,rn),$n=0;$n<Qn.length;$n+=3)this.indexArray.emplaceBack(wr+Qn[$n],wr+Qn[$n+1],wr+Qn[$n+2]);tr.vertexLength+=Ct,tr.primitiveLength+=Qn.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,F,oe,Me,ye)},he("FillBucket",hf,{omit:["layers","patternFeatures"]});var A6=new ho({"fill-sort-key":new Ca($t.layout_fill["fill-sort-key"])}),S6=new ho({"fill-antialias":new ma($t.paint_fill["fill-antialias"]),"fill-opacity":new Ca($t.paint_fill["fill-opacity"]),"fill-color":new Ca($t.paint_fill["fill-color"]),"fill-outline-color":new Ca($t.paint_fill["fill-outline-color"]),"fill-translate":new ma($t.paint_fill["fill-translate"]),"fill-translate-anchor":new ma($t.paint_fill["fill-translate-anchor"]),"fill-pattern":new Ci($t.paint_fill["fill-pattern"])}),E6={paint:S6,layout:A6},M6=function(I){function F(X){I.call(this,X,E6)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.recalculate=function(oe,ye){I.prototype.recalculate.call(this,oe,ye);var Me=this.paint._values["fill-outline-color"];Me.value.kind==="constant"&&Me.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},F.prototype.createBucket=function(oe){return new hf(oe)},F.prototype.queryRadius=function(){return _u(this.paint.get("fill-translate"))},F.prototype.queryIntersectsFeature=function(oe,ye,Me,Ie,$e,mt,Ct){var _t=ru(oe,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),mt.angle,Ct);return eo(_t,Ie)},F.prototype.isTileClipped=function(){return!0},F}(Fi),C6=Li([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),tb=C6.members,rb=bd;function bd(I,F,X,oe,ye){this.properties={},this.extent=X,this.type=0,this._pbf=I,this._geometry=-1,this._keys=oe,this._values=ye,I.readFields(L6,this,F)}function L6(I,F,X){I==1?F.id=X.readVarint():I==2?P6(X,F):I==3?F.type=X.readVarint():I==4&&(F._geometry=X.pos)}function P6(I,F){for(var X=I.readVarint()+I.pos;I.pos<X;){var oe=F._keys[I.readVarint()],ye=F._values[I.readVarint()];F.properties[oe]=ye}}bd.types=["Unknown","Point","LineString","Polygon"],bd.prototype.loadGeometry=function(){var I=this._pbf;I.pos=this._geometry;for(var F=I.readVarint()+I.pos,X=1,oe=0,ye=0,Me=0,Ie=[],$e;I.pos<F;){if(oe<=0){var mt=I.readVarint();X=mt&7,oe=mt>>3}if(oe--,X===1||X===2)ye+=I.readSVarint(),Me+=I.readSVarint(),X===1&&($e&&Ie.push($e),$e=[]),$e.push(new r(ye,Me));else if(X===7)$e&&$e.push($e[0].clone());else throw new Error("unknown command "+X)}return $e&&Ie.push($e),Ie},bd.prototype.bbox=function(){var I=this._pbf;I.pos=this._geometry;for(var F=I.readVarint()+I.pos,X=1,oe=0,ye=0,Me=0,Ie=1/0,$e=-1/0,mt=1/0,Ct=-1/0;I.pos<F;){if(oe<=0){var _t=I.readVarint();X=_t&7,oe=_t>>3}if(oe--,X===1||X===2)ye+=I.readSVarint(),Me+=I.readSVarint(),ye<Ie&&(Ie=ye),ye>$e&&($e=ye),Me<mt&&(mt=Me),Me>Ct&&(Ct=Me);else if(X!==7)throw new Error("unknown command "+X)}return[Ie,mt,$e,Ct]},bd.prototype.toGeoJSON=function(I,F,X){var oe=this.extent*Math.pow(2,X),ye=this.extent*I,Me=this.extent*F,Ie=this.loadGeometry(),$e=bd.types[this.type],mt,Ct;function _t(tr){for(var wr=0;wr<tr.length;wr++){var Ur=tr[wr],rn=180-(Ur.y+Me)*360/oe;tr[wr]=[(Ur.x+ye)*360/oe-180,360/Math.PI*Math.atan(Math.exp(rn*Math.PI/180))-90]}}switch(this.type){case 1:var Kt=[];for(mt=0;mt<Ie.length;mt++)Kt[mt]=Ie[mt][0];Ie=Kt,_t(Ie);break;case 2:for(mt=0;mt<Ie.length;mt++)_t(Ie[mt]);break;case 3:for(Ie=_6(Ie),mt=0;mt<Ie.length;mt++)for(Ct=0;Ct<Ie[mt].length;Ct++)_t(Ie[mt][Ct]);break}Ie.length===1?Ie=Ie[0]:$e="Multi"+$e;var lr={type:"Feature",geometry:{type:$e,coordinates:Ie},properties:this.properties};return"id"in this&&(lr.id=this.id),lr};function _6(I){var F=I.length;if(F<=1)return[I];for(var X=[],oe,ye,Me=0;Me<F;Me++){var Ie=R6(I[Me]);Ie!==0&&(ye===void 0&&(ye=Ie<0),ye===Ie<0?(oe&&X.push(oe),oe=[I[Me]]):oe.push(I[Me]))}return oe&&X.push(oe),X}function R6(I){for(var F=0,X=0,oe=I.length,ye=oe-1,Me,Ie;X<oe;ye=X++)Me=I[X],Ie=I[ye],F+=(Ie.x-Me.x)*(Me.y+Ie.y);return F}var nb=ab;function ab(I,F){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=I,this._keys=[],this._values=[],this._features=[],I.readFields(D6,this,F),this.length=this._features.length}function D6(I,F,X){I===15?F.version=X.readVarint():I===1?F.name=X.readString():I===5?F.extent=X.readVarint():I===2?F._features.push(X.pos):I===3?F._keys.push(X.readString()):I===4&&F._values.push(I6(X))}function I6(I){for(var F=null,X=I.readVarint()+I.pos;I.pos<X;){var oe=I.readVarint()>>3;F=oe===1?I.readString():oe===2?I.readFloat():oe===3?I.readDouble():oe===4?I.readVarint64():oe===5?I.readVarint():oe===6?I.readSVarint():oe===7?I.readBoolean():null}return F}ab.prototype.feature=function(I){if(I<0||I>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[I];var F=this._pbf.readVarint()+this._pbf.pos;return new rb(this._pbf,F,this.extent,this._keys,this._values)};var F6=k6;function k6(I,F){this.layers=I.readFields(O6,{},F)}function O6(I,F,X){if(I===3){var oe=new nb(X,X.readVarint()+X.pos);oe.length&&(F[oe.name]=oe)}}var z6=F6,N6=rb,B6=nb,wd={VectorTile:z6,VectorTileFeature:N6,VectorTileLayer:B6},U6=wd.VectorTileFeature.types,H6=500,qy=Math.pow(2,13);function B0(I,F,X,oe,ye,Me,Ie,$e){I.emplaceBack(F,X,Math.floor(oe*qy)*2+Ie,ye*qy*2,Me*qy*2,Math.round($e))}var vf=function(F){this.zoom=F.zoom,this.overscaling=F.overscaling,this.layers=F.layers,this.layerIds=this.layers.map(function(X){return X.id}),this.index=F.index,this.hasPattern=!1,this.layoutVertexArray=new mh,this.indexArray=new ff,this.programConfigurations=new Ya(tb,F.layers,F.zoom),this.segments=new J,this.stateDependentLayerIds=this.layers.filter(function(X){return X.isStateDependent()}).map(function(X){return X.id})};vf.prototype.populate=function(F,X,oe){this.features=[],this.hasPattern=$y("fill-extrusion",this.layers,X);for(var ye=0,Me=F;ye<Me.length;ye+=1){var Ie=Me[ye],$e=Ie.feature,mt=Ie.id,Ct=Ie.index,_t=Ie.sourceLayerIndex,Kt=this.layers[0]._featureFilter.needGeometry,lr={type:$e.type,id:mt,properties:$e.properties,geometry:Kt?xi($e):[]};if(this.layers[0]._featureFilter.filter(new Bn(this.zoom),lr,oe)){var tr={id:mt,sourceLayerIndex:_t,index:Ct,geometry:Kt?lr.geometry:xi($e),properties:$e.properties,type:$e.type,patterns:{}};typeof $e.id<"u"&&(tr.id=$e.id),this.hasPattern?this.features.push(Qy("fill-extrusion",this.layers,tr,this.zoom,X)):this.addFeature(tr,tr.geometry,Ct,oe,{}),X.featureIndex.insert($e,tr.geometry,Ct,_t,this.index,!0)}}},vf.prototype.addFeatures=function(F,X,oe){for(var ye=0,Me=this.features;ye<Me.length;ye+=1){var Ie=Me[ye],$e=Ie.geometry;this.addFeature(Ie,$e,Ie.index,X,oe)}},vf.prototype.update=function(F,X,oe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(F,X,this.stateDependentLayers,oe)},vf.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},vf.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},vf.prototype.upload=function(F){this.uploaded||(this.layoutVertexBuffer=F.createVertexBuffer(this.layoutVertexArray,tb),this.indexBuffer=F.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(F),this.uploaded=!0},vf.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},vf.prototype.addFeature=function(F,X,oe,ye,Me){for(var Ie=0,$e=Jy(X,H6);Ie<$e.length;Ie+=1){for(var mt=$e[Ie],Ct=0,_t=0,Kt=mt;_t<Kt.length;_t+=1){var lr=Kt[_t];Ct+=lr.length}for(var tr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),wr=0,Ur=mt;wr<Ur.length;wr+=1){var rn=Ur[wr];if(rn.length!==0&&!G6(rn))for(var qr=0,Mn=0;Mn<rn.length;Mn++){var yn=rn[Mn];if(Mn>=1){var En=rn[Mn-1];if(!V6(yn,En)){tr.vertexLength+4>J.MAX_VERTEX_ARRAY_LENGTH&&(tr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var In=yn.sub(En)._perp()._unit(),Hn=En.dist(yn);qr+Hn>32768&&(qr=0),B0(this.layoutVertexArray,yn.x,yn.y,In.x,In.y,0,0,qr),B0(this.layoutVertexArray,yn.x,yn.y,In.x,In.y,0,1,qr),qr+=Hn,B0(this.layoutVertexArray,En.x,En.y,In.x,In.y,0,0,qr),B0(this.layoutVertexArray,En.x,En.y,In.x,In.y,0,1,qr);var Qn=tr.vertexLength;this.indexArray.emplaceBack(Qn,Qn+2,Qn+1),this.indexArray.emplaceBack(Qn+1,Qn+2,Qn+3),tr.vertexLength+=4,tr.primitiveLength+=2}}}}if(tr.vertexLength+Ct>J.MAX_VERTEX_ARRAY_LENGTH&&(tr=this.segments.prepareSegment(Ct,this.layoutVertexArray,this.indexArray)),U6[F.type]==="Polygon"){for(var $n=[],La=[],va=tr.vertexLength,xa=0,Ga=mt;xa<Ga.length;xa+=1){var Aa=Ga[xa];if(Aa.length!==0){Aa!==mt[0]&&La.push($n.length/2);for(var Ma=0;Ma<Aa.length;Ma++){var ja=Aa[Ma];B0(this.layoutVertexArray,ja.x,ja.y,0,0,1,1,0),$n.push(ja.x),$n.push(ja.y)}}}for(var Ua=Xy($n,La),li=0;li<Ua.length;li+=3)this.indexArray.emplaceBack(va+Ua[li],va+Ua[li+2],va+Ua[li+1]);tr.primitiveLength+=Ua.length/3,tr.vertexLength+=Ct}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,F,oe,Me,ye)},he("FillExtrusionBucket",vf,{omit:["layers","features"]});function V6(I,F){return I.x===F.x&&(I.x<0||I.x>Ra)||I.y===F.y&&(I.y<0||I.y>Ra)}function G6(I){return I.every(function(F){return F.x<0})||I.every(function(F){return F.x>Ra})||I.every(function(F){return F.y<0})||I.every(function(F){return F.y>Ra})}var W6=new ho({"fill-extrusion-opacity":new ma($t["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Ca($t["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new ma($t["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new ma($t["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Ci($t["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Ca($t["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Ca($t["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new ma($t["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),Y6={paint:W6},X6=function(I){function F(X){I.call(this,X,Y6)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.createBucket=function(oe){return new vf(oe)},F.prototype.queryRadius=function(){return _u(this.paint.get("fill-extrusion-translate"))},F.prototype.is3D=function(){return!0},F.prototype.queryIntersectsFeature=function(oe,ye,Me,Ie,$e,mt,Ct,_t){var Kt=ru(oe,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),mt.angle,Ct),lr=this.paint.get("fill-extrusion-height").evaluate(ye,Me),tr=this.paint.get("fill-extrusion-base").evaluate(ye,Me),wr=K6(Kt,_t,mt,0),Ur=j6(Ie,tr,lr,_t),rn=Ur[0],qr=Ur[1];return Z6(rn,qr,wr)},F}(Fi);function U0(I,F){return I.x*F.x+I.y*F.y}function ib(I,F){if(I.length===1){for(var X=0,oe=F[X++],ye;!ye||oe.equals(ye);)if(ye=F[X++],!ye)return 1/0;for(;X<F.length;X++){var Me=F[X],Ie=I[0],$e=ye.sub(oe),mt=Me.sub(oe),Ct=Ie.sub(oe),_t=U0($e,$e),Kt=U0($e,mt),lr=U0(mt,mt),tr=U0(Ct,$e),wr=U0(Ct,mt),Ur=_t*lr-Kt*Kt,rn=(lr*tr-Kt*wr)/Ur,qr=(_t*wr-Kt*tr)/Ur,Mn=1-rn-qr,yn=oe.z*Mn+ye.z*rn+Me.z*qr;if(isFinite(yn))return yn}return 1/0}else{for(var En=1/0,In=0,Hn=F;In<Hn.length;In+=1){var Qn=Hn[In];En=Math.min(En,Qn.z)}return En}}function Z6(I,F,X){var oe=1/0;eo(X,F)&&(oe=ib(X,F[0]));for(var ye=0;ye<F.length;ye++)for(var Me=F[ye],Ie=I[ye],$e=0;$e<Me.length-1;$e++){var mt=Me[$e],Ct=Me[$e+1],_t=Ie[$e],Kt=Ie[$e+1],lr=[mt,Ct,Kt,_t,mt];Xa(X,lr)&&(oe=Math.min(oe,ib(X,lr)))}return oe===1/0?!1:oe}function j6(I,F,X,oe){for(var ye=[],Me=[],Ie=oe[8]*F,$e=oe[9]*F,mt=oe[10]*F,Ct=oe[11]*F,_t=oe[8]*X,Kt=oe[9]*X,lr=oe[10]*X,tr=oe[11]*X,wr=0,Ur=I;wr<Ur.length;wr+=1){for(var rn=Ur[wr],qr=[],Mn=[],yn=0,En=rn;yn<En.length;yn+=1){var In=En[yn],Hn=In.x,Qn=In.y,$n=oe[0]*Hn+oe[4]*Qn+oe[12],La=oe[1]*Hn+oe[5]*Qn+oe[13],va=oe[2]*Hn+oe[6]*Qn+oe[14],xa=oe[3]*Hn+oe[7]*Qn+oe[15],Ga=$n+Ie,Aa=La+$e,Ma=va+mt,ja=xa+Ct,Ua=$n+_t,li=La+Kt,Ei=va+lr,ui=xa+tr,fi=new r(Ga/ja,Aa/ja);fi.z=Ma/ja,qr.push(fi);var ai=new r(Ua/ui,li/ui);ai.z=Ei/ui,Mn.push(ai)}ye.push(qr),Me.push(Mn)}return[ye,Me]}function K6(I,F,X,oe){for(var ye=[],Me=0,Ie=I;Me<Ie.length;Me+=1){var $e=Ie[Me],mt=[$e.x,$e.y,oe,1];dg(mt,mt,F),ye.push(new r(mt[0]/mt[3],mt[1]/mt[3]))}return ye}var J6=Li([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),ob=J6.members,$6=wd.VectorTileFeature.types,sb=63,Q6=Math.cos(75/2*(Math.PI/180)),q6=15,eM=20,tM=15,lb=1/2,ub=Math.pow(2,tM-1)/lb,Ks=function(F){this.zoom=F.zoom,this.overscaling=F.overscaling,this.layers=F.layers,this.layerIds=this.layers.map(function(X){return X.id}),this.index=F.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new fd,this.indexArray=new ff,this.programConfigurations=new Ya(ob,F.layers,F.zoom),this.segments=new J,this.stateDependentLayerIds=this.layers.filter(function(X){return X.isStateDependent()}).map(function(X){return X.id})};Ks.prototype.populate=function(F,X,oe){this.hasPattern=$y("line",this.layers,X);for(var ye=this.layers[0].layout.get("line-sort-key"),Me=[],Ie=0,$e=F;Ie<$e.length;Ie+=1){var mt=$e[Ie],Ct=mt.feature,_t=mt.id,Kt=mt.index,lr=mt.sourceLayerIndex,tr=this.layers[0]._featureFilter.needGeometry,wr={type:Ct.type,id:_t,properties:Ct.properties,geometry:tr?xi(Ct):[]};if(this.layers[0]._featureFilter.filter(new Bn(this.zoom),wr,oe)){tr||(wr.geometry=xi(Ct));var Ur=ye?ye.evaluate(wr,{},oe):void 0,rn={id:_t,properties:Ct.properties,type:Ct.type,sourceLayerIndex:lr,index:Kt,geometry:wr.geometry,patterns:{},sortKey:Ur};Me.push(rn)}}ye&&Me.sort(function(va,xa){return va.sortKey-xa.sortKey});for(var qr=0,Mn=Me;qr<Mn.length;qr+=1){var yn=Mn[qr],En=yn,In=En.geometry,Hn=En.index,Qn=En.sourceLayerIndex;if(this.hasPattern){var $n=Qy("line",this.layers,yn,this.zoom,X);this.patternFeatures.push($n)}else this.addFeature(yn,In,Hn,oe,{});var La=F[Hn].feature;X.featureIndex.insert(La,In,Hn,Qn,this.index)}},Ks.prototype.update=function(F,X,oe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(F,X,this.stateDependentLayers,oe)},Ks.prototype.addFeatures=function(F,X,oe){for(var ye=0,Me=this.patternFeatures;ye<Me.length;ye+=1){var Ie=Me[ye];this.addFeature(Ie,Ie.geometry,Ie.index,X,oe)}},Ks.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Ks.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Ks.prototype.upload=function(F){this.uploaded||(this.layoutVertexBuffer=F.createVertexBuffer(this.layoutVertexArray,ob),this.indexBuffer=F.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(F),this.uploaded=!0},Ks.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Ks.prototype.addFeature=function(F,X,oe,ye,Me){for(var Ie=this.layers[0].layout,$e=Ie.get("line-join").evaluate(F,{}),mt=Ie.get("line-cap"),Ct=Ie.get("line-miter-limit"),_t=Ie.get("line-round-limit"),Kt=0,lr=X;Kt<lr.length;Kt+=1){var tr=lr[Kt];this.addLine(tr,F,$e,mt,Ct,_t)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,F,oe,Me,ye)},Ks.prototype.addLine=function(F,X,oe,ye,Me,Ie){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,X.properties&&X.properties.hasOwnProperty("mapbox_clip_start")&&X.properties.hasOwnProperty("mapbox_clip_end")){this.clipStart=+X.properties.mapbox_clip_start,this.clipEnd=+X.properties.mapbox_clip_end;for(var $e=0;$e<F.length-1;$e++)this.totalDistance+=F[$e].dist(F[$e+1]);this.updateScaledDistance()}for(var mt=$6[X.type]==="Polygon",Ct=F.length;Ct>=2&&F[Ct-1].equals(F[Ct-2]);)Ct--;for(var _t=0;_t<Ct-1&&F[_t].equals(F[_t+1]);)_t++;if(!(Ct<(mt?3:2))){oe==="bevel"&&(Me=1.05);var Kt=this.overscaling<=16?q6*Ra/(512*this.overscaling):0,lr=this.segments.prepareSegment(Ct*10,this.layoutVertexArray,this.indexArray),tr,wr=void 0,Ur=void 0,rn=void 0,qr=void 0;this.e1=this.e2=-1,mt&&(tr=F[Ct-2],qr=F[_t].sub(tr)._unit()._perp());for(var Mn=_t;Mn<Ct;Mn++)if(Ur=Mn===Ct-1?mt?F[_t+1]:void 0:F[Mn+1],!(Ur&&F[Mn].equals(Ur))){qr&&(rn=qr),tr&&(wr=tr),tr=F[Mn],qr=Ur?Ur.sub(tr)._unit()._perp():rn,rn=rn||qr;var yn=rn.add(qr);(yn.x!==0||yn.y!==0)&&yn._unit();var En=rn.x*qr.x+rn.y*qr.y,In=yn.x*qr.x+yn.y*qr.y,Hn=In!==0?1/In:1/0,Qn=2*Math.sqrt(2-2*In),$n=In<Q6&&wr&&Ur,La=rn.x*qr.y-rn.y*qr.x>0;if($n&&Mn>_t){var va=tr.dist(wr);if(va>2*Kt){var xa=tr.sub(tr.sub(wr)._mult(Kt/va)._round());this.updateDistance(wr,xa),this.addCurrentVertex(xa,rn,0,0,lr),wr=xa}}var Ga=wr&&Ur,Aa=Ga?oe:mt?"butt":ye;if(Ga&&Aa==="round"&&(Hn<Ie?Aa="miter":Hn<=2&&(Aa="fakeround")),Aa==="miter"&&Hn>Me&&(Aa="bevel"),Aa==="bevel"&&(Hn>2&&(Aa="flipbevel"),Hn<Me&&(Aa="miter")),wr&&this.updateDistance(wr,tr),Aa==="miter")yn._mult(Hn),this.addCurrentVertex(tr,yn,0,0,lr);else if(Aa==="flipbevel"){if(Hn>100)yn=qr.mult(-1);else{var Ma=Hn*rn.add(qr).mag()/rn.sub(qr).mag();yn._perp()._mult(Ma*(La?-1:1))}this.addCurrentVertex(tr,yn,0,0,lr),this.addCurrentVertex(tr,yn.mult(-1),0,0,lr)}else if(Aa==="bevel"||Aa==="fakeround"){var ja=-Math.sqrt(Hn*Hn-1),Ua=La?ja:0,li=La?0:ja;if(wr&&this.addCurrentVertex(tr,rn,Ua,li,lr),Aa==="fakeround")for(var Ei=Math.round(Qn*180/Math.PI/eM),ui=1;ui<Ei;ui++){var fi=ui/Ei;if(fi!==.5){var ai=fi-.5,Di=1.0904+En*(-3.2452+En*(3.55645-En*1.43519)),Oi=.848013+En*(-1.06021+En*.215638);fi=fi+fi*ai*(fi-1)*(Di*ai*ai+Oi)}var to=qr.sub(rn)._mult(fi)._add(rn)._unit()._mult(La?-1:1);this.addHalfVertex(tr,to.x,to.y,!1,La,0,lr)}Ur&&this.addCurrentVertex(tr,qr,-Ua,-li,lr)}else if(Aa==="butt")this.addCurrentVertex(tr,yn,0,0,lr);else if(Aa==="square"){var io=wr?1:-1;this.addCurrentVertex(tr,yn,io,io,lr)}else Aa==="round"&&(wr&&(this.addCurrentVertex(tr,rn,0,0,lr),this.addCurrentVertex(tr,rn,1,1,lr,!0)),Ur&&(this.addCurrentVertex(tr,qr,-1,-1,lr,!0),this.addCurrentVertex(tr,qr,0,0,lr)));if($n&&Mn<Ct-1){var No=tr.dist(Ur);if(No>2*Kt){var To=tr.add(Ur.sub(tr)._mult(Kt/No)._round());this.updateDistance(tr,To),this.addCurrentVertex(To,qr,0,0,lr),tr=To}}}}},Ks.prototype.addCurrentVertex=function(F,X,oe,ye,Me,Ie){Ie===void 0&&(Ie=!1);var $e=X.x+X.y*oe,mt=X.y-X.x*oe,Ct=-X.x+X.y*ye,_t=-X.y-X.x*ye;this.addHalfVertex(F,$e,mt,Ie,!1,oe,Me),this.addHalfVertex(F,Ct,_t,Ie,!0,-ye,Me),this.distance>ub/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(F,X,oe,ye,Me,Ie))},Ks.prototype.addHalfVertex=function(F,X,oe,ye,Me,Ie,$e){var mt=F.x,Ct=F.y,_t=this.scaledDistance*lb;this.layoutVertexArray.emplaceBack((mt<<1)+(ye?1:0),(Ct<<1)+(Me?1:0),Math.round(sb*X)+128,Math.round(sb*oe)+128,(Ie===0?0:Ie<0?-1:1)+1|(_t&63)<<2,_t>>6);var Kt=$e.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Kt),$e.primitiveLength++),Me?this.e2=Kt:this.e1=Kt},Ks.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(ub-1):this.distance},Ks.prototype.updateDistance=function(F,X){this.distance+=F.dist(X),this.updateScaledDistance()},he("LineBucket",Ks,{omit:["layers","patternFeatures"]});var rM=new ho({"line-cap":new ma($t.layout_line["line-cap"]),"line-join":new Ca($t.layout_line["line-join"]),"line-miter-limit":new ma($t.layout_line["line-miter-limit"]),"line-round-limit":new ma($t.layout_line["line-round-limit"]),"line-sort-key":new Ca($t.layout_line["line-sort-key"])}),nM=new ho({"line-opacity":new Ca($t.paint_line["line-opacity"]),"line-color":new Ca($t.paint_line["line-color"]),"line-translate":new ma($t.paint_line["line-translate"]),"line-translate-anchor":new ma($t.paint_line["line-translate-anchor"]),"line-width":new Ca($t.paint_line["line-width"]),"line-gap-width":new Ca($t.paint_line["line-gap-width"]),"line-offset":new Ca($t.paint_line["line-offset"]),"line-blur":new Ca($t.paint_line["line-blur"]),"line-dasharray":new Qi($t.paint_line["line-dasharray"]),"line-pattern":new Ci($t.paint_line["line-pattern"]),"line-gradient":new ts($t.paint_line["line-gradient"])}),fb={paint:nM,layout:rM},aM=function(I){function F(){I.apply(this,arguments)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.possiblyEvaluate=function(oe,ye){return ye=new Bn(Math.floor(ye.zoom),{now:ye.now,fadeDuration:ye.fadeDuration,zoomHistory:ye.zoomHistory,transition:ye.transition}),I.prototype.possiblyEvaluate.call(this,oe,ye)},F.prototype.evaluate=function(oe,ye,Me,Ie){return ye=l({},ye,{zoom:Math.floor(ye.zoom)}),I.prototype.evaluate.call(this,oe,ye,Me,Ie)},F}(Ca),cb=new aM(fb.paint.properties["line-width"].specification);cb.useIntegerZoom=!0;var iM=function(I){function F(X){I.call(this,X,fb)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype._handleSpecialPaintPropertyUpdate=function(oe){oe==="line-gradient"&&this._updateGradient()},F.prototype._updateGradient=function(){var oe=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=j3(oe,"lineProgress"),this.gradientTexture=null},F.prototype.recalculate=function(oe,ye){I.prototype.recalculate.call(this,oe,ye),this.paint._values["line-floorwidth"]=cb.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,oe)},F.prototype.createBucket=function(oe){return new Ks(oe)},F.prototype.queryRadius=function(oe){var ye=oe,Me=hb(hl("line-width",this,ye),hl("line-gap-width",this,ye)),Ie=hl("line-offset",this,ye);return Me/2+Math.abs(Ie)+_u(this.paint.get("line-translate"))},F.prototype.queryIntersectsFeature=function(oe,ye,Me,Ie,$e,mt,Ct){var _t=ru(oe,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),mt.angle,Ct),Kt=Ct/2*hb(this.paint.get("line-width").evaluate(ye,Me),this.paint.get("line-gap-width").evaluate(ye,Me)),lr=this.paint.get("line-offset").evaluate(ye,Me);return lr&&(Ie=oM(Ie,lr*Ct)),mo(_t,Ie,Kt)},F.prototype.isTileClipped=function(){return!0},F}(Fi);function hb(I,F){return F>0?F+2*I:I}function oM(I,F){for(var X=[],oe=new r(0,0),ye=0;ye<I.length;ye++){for(var Me=I[ye],Ie=[],$e=0;$e<Me.length;$e++){var mt=Me[$e-1],Ct=Me[$e],_t=Me[$e+1],Kt=$e===0?oe:Ct.sub(mt)._unit()._perp(),lr=$e===Me.length-1?oe:_t.sub(Ct)._unit()._perp(),tr=Kt._add(lr)._unit(),wr=tr.x*lr.x+tr.y*lr.y;tr._mult(1/wr),Ie.push(tr._mult(F)._add(Ct))}X.push(Ie)}return X}var em=Li([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),sM=Li([{name:"a_projected_pos",components:3,type:"Float32"}],4);Li([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);var lM=Li([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);Li([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);var vb=Li([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),uM=Li([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);Li([{name:"triangle",components:3,type:"Uint16"}]),Li([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Li([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Li([{type:"Float32",name:"offsetX"}]),Li([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);function fM(I,F,X){var oe=F.layout.get("text-transform").evaluate(X,{});return oe==="uppercase"?I=I.toLocaleUpperCase():oe==="lowercase"&&(I=I.toLocaleLowerCase()),si.applyArabicShaping&&(I=si.applyArabicShaping(I)),I}function cM(I,F,X){return I.sections.forEach(function(oe){oe.text=fM(oe.text,F,X)}),I}function hM(I){var F={},X={},oe=[],ye=0;function Me(qr){oe.push(I[qr]),ye++}function Ie(qr,Mn,yn){var En=X[qr];return delete X[qr],X[Mn]=En,oe[En].geometry[0].pop(),oe[En].geometry[0]=oe[En].geometry[0].concat(yn[0]),En}function $e(qr,Mn,yn){var En=F[Mn];return delete F[Mn],F[qr]=En,oe[En].geometry[0].shift(),oe[En].geometry[0]=yn[0].concat(oe[En].geometry[0]),En}function mt(qr,Mn,yn){var En=yn?Mn[0][Mn[0].length-1]:Mn[0][0];return qr+":"+En.x+":"+En.y}for(var Ct=0;Ct<I.length;Ct++){var _t=I[Ct],Kt=_t.geometry,lr=_t.text?_t.text.toString():null;if(!lr){Me(Ct);continue}var tr=mt(lr,Kt),wr=mt(lr,Kt,!0);if(tr in X&&wr in F&&X[tr]!==F[wr]){var Ur=$e(tr,wr,Kt),rn=Ie(tr,wr,oe[Ur].geometry);delete F[tr],delete X[wr],X[mt(lr,oe[rn].geometry,!0)]=rn,oe[Ur].geometry=null}else tr in X?Ie(tr,wr,Kt):wr in F?$e(tr,wr,Kt):(Me(Ct),F[tr]=ye-1,X[wr]=ye-1)}return oe.filter(function(qr){return qr.geometry})}var H0={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};function vM(I){for(var F="",X=0;X<I.length;X++){var oe=I.charCodeAt(X+1)||null,ye=I.charCodeAt(X-1)||null,Me=(!oe||!en(oe)||H0[I[X+1]])&&(!ye||!en(ye)||H0[I[X-1]]);Me&&H0[I[X]]?F+=H0[I[X]]:F+=I[X]}return F}var Zo=24,dM=function(I,F,X,oe,ye){var Me,Ie,$e=ye*8-oe-1,mt=(1<<$e)-1,Ct=mt>>1,_t=-7,Kt=X?ye-1:0,lr=X?-1:1,tr=I[F+Kt];for(Kt+=lr,Me=tr&(1<<-_t)-1,tr>>=-_t,_t+=$e;_t>0;Me=Me*256+I[F+Kt],Kt+=lr,_t-=8);for(Ie=Me&(1<<-_t)-1,Me>>=-_t,_t+=oe;_t>0;Ie=Ie*256+I[F+Kt],Kt+=lr,_t-=8);if(Me===0)Me=1-Ct;else{if(Me===mt)return Ie?NaN:(tr?-1:1)*(1/0);Ie=Ie+Math.pow(2,oe),Me=Me-Ct}return(tr?-1:1)*Ie*Math.pow(2,Me-oe)},pM=function(I,F,X,oe,ye,Me){var Ie,$e,mt,Ct=Me*8-ye-1,_t=(1<<Ct)-1,Kt=_t>>1,lr=ye===23?Math.pow(2,-24)-Math.pow(2,-77):0,tr=oe?0:Me-1,wr=oe?1:-1,Ur=F<0||F===0&&1/F<0?1:0;for(F=Math.abs(F),isNaN(F)||F===1/0?($e=isNaN(F)?1:0,Ie=_t):(Ie=Math.floor(Math.log(F)/Math.LN2),F*(mt=Math.pow(2,-Ie))<1&&(Ie--,mt*=2),Ie+Kt>=1?F+=lr/mt:F+=lr*Math.pow(2,1-Kt),F*mt>=2&&(Ie++,mt/=2),Ie+Kt>=_t?($e=0,Ie=_t):Ie+Kt>=1?($e=(F*mt-1)*Math.pow(2,ye),Ie=Ie+Kt):($e=F*Math.pow(2,Kt-1)*Math.pow(2,ye),Ie=0));ye>=8;I[X+tr]=$e&255,tr+=wr,$e/=256,ye-=8);for(Ie=Ie<<ye|$e,Ct+=ye;Ct>0;I[X+tr]=Ie&255,tr+=wr,Ie/=256,Ct-=8);I[X+tr-wr]|=Ur*128},xg={read:dM,write:pM},bg=ki;function ki(I){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(I)?I:new Uint8Array(I||0),this.pos=0,this.type=0,this.length=this.buf.length}ki.Varint=0,ki.Fixed64=1,ki.Bytes=2,ki.Fixed32=5;var tm=(1<<16)*(1<<16),db=1/tm,gM=12,pb=typeof TextDecoder>"u"?null:new TextDecoder("utf8");ki.prototype={destroy:function(){this.buf=null},readFields:function(I,F,X){for(X=X||this.length;this.pos<X;){var oe=this.readVarint(),ye=oe>>3,Me=this.pos;this.type=oe&7,I(ye,F,this),this.pos===Me&&this.skip(oe)}return F},readMessage:function(I,F){return this.readFields(I,F,this.readVarint()+this.pos)},readFixed32:function(){var I=wg(this.buf,this.pos);return this.pos+=4,I},readSFixed32:function(){var I=yb(this.buf,this.pos);return this.pos+=4,I},readFixed64:function(){var I=wg(this.buf,this.pos)+wg(this.buf,this.pos+4)*tm;return this.pos+=8,I},readSFixed64:function(){var I=wg(this.buf,this.pos)+yb(this.buf,this.pos+4)*tm;return this.pos+=8,I},readFloat:function(){var I=xg.read(this.buf,this.pos,!0,23,4);return this.pos+=4,I},readDouble:function(){var I=xg.read(this.buf,this.pos,!0,52,8);return this.pos+=8,I},readVarint:function(I){var F=this.buf,X,oe;return oe=F[this.pos++],X=oe&127,oe<128||(oe=F[this.pos++],X|=(oe&127)<<7,oe<128)||(oe=F[this.pos++],X|=(oe&127)<<14,oe<128)||(oe=F[this.pos++],X|=(oe&127)<<21,oe<128)?X:(oe=F[this.pos],X|=(oe&15)<<28,yM(X,I,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var I=this.readVarint();return I%2===1?(I+1)/-2:I/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var I=this.readVarint()+this.pos,F=this.pos;return this.pos=I,I-F>=gM&&pb?RM(this.buf,F,I):_M(this.buf,F,I)},readBytes:function(){var I=this.readVarint()+this.pos,F=this.buf.subarray(this.pos,I);return this.pos=I,F},readPackedVarint:function(I,F){if(this.type!==ki.Bytes)return I.push(this.readVarint(F));var X=Rc(this);for(I=I||[];this.pos<X;)I.push(this.readVarint(F));return I},readPackedSVarint:function(I){if(this.type!==ki.Bytes)return I.push(this.readSVarint());var F=Rc(this);for(I=I||[];this.pos<F;)I.push(this.readSVarint());return I},readPackedBoolean:function(I){if(this.type!==ki.Bytes)return I.push(this.readBoolean());var F=Rc(this);for(I=I||[];this.pos<F;)I.push(this.readBoolean());return I},readPackedFloat:function(I){if(this.type!==ki.Bytes)return I.push(this.readFloat());var F=Rc(this);for(I=I||[];this.pos<F;)I.push(this.readFloat());return I},readPackedDouble:function(I){if(this.type!==ki.Bytes)return I.push(this.readDouble());var F=Rc(this);for(I=I||[];this.pos<F;)I.push(this.readDouble());return I},readPackedFixed32:function(I){if(this.type!==ki.Bytes)return I.push(this.readFixed32());var F=Rc(this);for(I=I||[];this.pos<F;)I.push(this.readFixed32());return I},readPackedSFixed32:function(I){if(this.type!==ki.Bytes)return I.push(this.readSFixed32());var F=Rc(this);for(I=I||[];this.pos<F;)I.push(this.readSFixed32());return I},readPackedFixed64:function(I){if(this.type!==ki.Bytes)return I.push(this.readFixed64());var F=Rc(this);for(I=I||[];this.pos<F;)I.push(this.readFixed64());return I},readPackedSFixed64:function(I){if(this.type!==ki.Bytes)return I.push(this.readSFixed64());var F=Rc(this);for(I=I||[];this.pos<F;)I.push(this.readSFixed64());return I},skip:function(I){var F=I&7;if(F===ki.Varint)for(;this.buf[this.pos++]>127;);else if(F===ki.Bytes)this.pos=this.readVarint()+this.pos;else if(F===ki.Fixed32)this.pos+=4;else if(F===ki.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+F)},writeTag:function(I,F){this.writeVarint(I<<3|F)},realloc:function(I){for(var F=this.length||16;F<this.pos+I;)F*=2;if(F!==this.length){var X=new Uint8Array(F);X.set(this.buf),this.buf=X,this.length=F}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(I){this.realloc(4),Ad(this.buf,I,this.pos),this.pos+=4},writeSFixed32:function(I){this.realloc(4),Ad(this.buf,I,this.pos),this.pos+=4},writeFixed64:function(I){this.realloc(8),Ad(this.buf,I&-1,this.pos),Ad(this.buf,Math.floor(I*db),this.pos+4),this.pos+=8},writeSFixed64:function(I){this.realloc(8),Ad(this.buf,I&-1,this.pos),Ad(this.buf,Math.floor(I*db),this.pos+4),this.pos+=8},writeVarint:function(I){if(I=+I||0,I>268435455||I<0){mM(I,this);return}this.realloc(4),this.buf[this.pos++]=I&127|(I>127?128:0),!(I<=127)&&(this.buf[this.pos++]=(I>>>=7)&127|(I>127?128:0),!(I<=127)&&(this.buf[this.pos++]=(I>>>=7)&127|(I>127?128:0),!(I<=127)&&(this.buf[this.pos++]=I>>>7&127)))},writeSVarint:function(I){this.writeVarint(I<0?-I*2-1:I*2)},writeBoolean:function(I){this.writeVarint(Boolean(I))},writeString:function(I){I=String(I),this.realloc(I.length*4),this.pos++;var F=this.pos;this.pos=DM(this.buf,I,this.pos);var X=this.pos-F;X>=128&&gb(F,X,this),this.pos=F-1,this.writeVarint(X),this.pos+=X},writeFloat:function(I){this.realloc(4),xg.write(this.buf,I,this.pos,!0,23,4),this.pos+=4},writeDouble:function(I){this.realloc(8),xg.write(this.buf,I,this.pos,!0,52,8),this.pos+=8},writeBytes:function(I){var F=I.length;this.writeVarint(F),this.realloc(F);for(var X=0;X<F;X++)this.buf[this.pos++]=I[X]},writeRawMessage:function(I,F){this.pos++;var X=this.pos;I(F,this);var oe=this.pos-X;oe>=128&&gb(X,oe,this),this.pos=X-1,this.writeVarint(oe),this.pos+=oe},writeMessage:function(I,F,X){this.writeTag(I,ki.Bytes),this.writeRawMessage(F,X)},writePackedVarint:function(I,F){F.length&&this.writeMessage(I,wM,F)},writePackedSVarint:function(I,F){F.length&&this.writeMessage(I,TM,F)},writePackedBoolean:function(I,F){F.length&&this.writeMessage(I,EM,F)},writePackedFloat:function(I,F){F.length&&this.writeMessage(I,AM,F)},writePackedDouble:function(I,F){F.length&&this.writeMessage(I,SM,F)},writePackedFixed32:function(I,F){F.length&&this.writeMessage(I,MM,F)},writePackedSFixed32:function(I,F){F.length&&this.writeMessage(I,CM,F)},writePackedFixed64:function(I,F){F.length&&this.writeMessage(I,LM,F)},writePackedSFixed64:function(I,F){F.length&&this.writeMessage(I,PM,F)},writeBytesField:function(I,F){this.writeTag(I,ki.Bytes),this.writeBytes(F)},writeFixed32Field:function(I,F){this.writeTag(I,ki.Fixed32),this.writeFixed32(F)},writeSFixed32Field:function(I,F){this.writeTag(I,ki.Fixed32),this.writeSFixed32(F)},writeFixed64Field:function(I,F){this.writeTag(I,ki.Fixed64),this.writeFixed64(F)},writeSFixed64Field:function(I,F){this.writeTag(I,ki.Fixed64),this.writeSFixed64(F)},writeVarintField:function(I,F){this.writeTag(I,ki.Varint),this.writeVarint(F)},writeSVarintField:function(I,F){this.writeTag(I,ki.Varint),this.writeSVarint(F)},writeStringField:function(I,F){this.writeTag(I,ki.Bytes),this.writeString(F)},writeFloatField:function(I,F){this.writeTag(I,ki.Fixed32),this.writeFloat(F)},writeDoubleField:function(I,F){this.writeTag(I,ki.Fixed64),this.writeDouble(F)},writeBooleanField:function(I,F){this.writeVarintField(I,Boolean(F))}};function yM(I,F,X){var oe=X.buf,ye,Me;if(Me=oe[X.pos++],ye=(Me&112)>>4,Me<128||(Me=oe[X.pos++],ye|=(Me&127)<<3,Me<128)||(Me=oe[X.pos++],ye|=(Me&127)<<10,Me<128)||(Me=oe[X.pos++],ye|=(Me&127)<<17,Me<128)||(Me=oe[X.pos++],ye|=(Me&127)<<24,Me<128)||(Me=oe[X.pos++],ye|=(Me&1)<<31,Me<128))return Td(I,ye,F);throw new Error("Expected varint not more than 10 bytes")}function Rc(I){return I.type===ki.Bytes?I.readVarint()+I.pos:I.pos+1}function Td(I,F,X){return X?F*4294967296+(I>>>0):(F>>>0)*4294967296+(I>>>0)}function mM(I,F){var X,oe;if(I>=0?(X=I%4294967296|0,oe=I/4294967296|0):(X=~(-I%4294967296),oe=~(-I/4294967296),X^4294967295?X=X+1|0:(X=0,oe=oe+1|0)),I>=18446744073709552e3||I<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");F.realloc(10),xM(X,oe,F),bM(oe,F)}function xM(I,F,X){X.buf[X.pos++]=I&127|128,I>>>=7,X.buf[X.pos++]=I&127|128,I>>>=7,X.buf[X.pos++]=I&127|128,I>>>=7,X.buf[X.pos++]=I&127|128,I>>>=7,X.buf[X.pos]=I&127}function bM(I,F){var X=(I&7)<<4;F.buf[F.pos++]|=X|((I>>>=3)?128:0),I&&(F.buf[F.pos++]=I&127|((I>>>=7)?128:0),I&&(F.buf[F.pos++]=I&127|((I>>>=7)?128:0),I&&(F.buf[F.pos++]=I&127|((I>>>=7)?128:0),I&&(F.buf[F.pos++]=I&127|((I>>>=7)?128:0),I&&(F.buf[F.pos++]=I&127)))))}function gb(I,F,X){var oe=F<=16383?1:F<=2097151?2:F<=268435455?3:Math.floor(Math.log(F)/(Math.LN2*7));X.realloc(oe);for(var ye=X.pos-1;ye>=I;ye--)X.buf[ye+oe]=X.buf[ye]}function wM(I,F){for(var X=0;X<I.length;X++)F.writeVarint(I[X])}function TM(I,F){for(var X=0;X<I.length;X++)F.writeSVarint(I[X])}function AM(I,F){for(var X=0;X<I.length;X++)F.writeFloat(I[X])}function SM(I,F){for(var X=0;X<I.length;X++)F.writeDouble(I[X])}function EM(I,F){for(var X=0;X<I.length;X++)F.writeBoolean(I[X])}function MM(I,F){for(var X=0;X<I.length;X++)F.writeFixed32(I[X])}function CM(I,F){for(var X=0;X<I.length;X++)F.writeSFixed32(I[X])}function LM(I,F){for(var X=0;X<I.length;X++)F.writeFixed64(I[X])}function PM(I,F){for(var X=0;X<I.length;X++)F.writeSFixed64(I[X])}function wg(I,F){return(I[F]|I[F+1]<<8|I[F+2]<<16)+I[F+3]*16777216}function Ad(I,F,X){I[X]=F,I[X+1]=F>>>8,I[X+2]=F>>>16,I[X+3]=F>>>24}function yb(I,F){return(I[F]|I[F+1]<<8|I[F+2]<<16)+(I[F+3]<<24)}function _M(I,F,X){for(var oe="",ye=F;ye<X;){var Me=I[ye],Ie=null,$e=Me>239?4:Me>223?3:Me>191?2:1;if(ye+$e>X)break;var mt,Ct,_t;$e===1?Me<128&&(Ie=Me):$e===2?(mt=I[ye+1],(mt&192)===128&&(Ie=(Me&31)<<6|mt&63,Ie<=127&&(Ie=null))):$e===3?(mt=I[ye+1],Ct=I[ye+2],(mt&192)===128&&(Ct&192)===128&&(Ie=(Me&15)<<12|(mt&63)<<6|Ct&63,(Ie<=2047||Ie>=55296&&Ie<=57343)&&(Ie=null))):$e===4&&(mt=I[ye+1],Ct=I[ye+2],_t=I[ye+3],(mt&192)===128&&(Ct&192)===128&&(_t&192)===128&&(Ie=(Me&15)<<18|(mt&63)<<12|(Ct&63)<<6|_t&63,(Ie<=65535||Ie>=1114112)&&(Ie=null))),Ie===null?(Ie=65533,$e=1):Ie>65535&&(Ie-=65536,oe+=String.fromCharCode(Ie>>>10&1023|55296),Ie=56320|Ie&1023),oe+=String.fromCharCode(Ie),ye+=$e}return oe}function RM(I,F,X){return pb.decode(I.subarray(F,X))}function DM(I,F,X){for(var oe=0,ye,Me;oe<F.length;oe++){if(ye=F.charCodeAt(oe),ye>55295&&ye<57344)if(Me)if(ye<56320){I[X++]=239,I[X++]=191,I[X++]=189,Me=ye;continue}else ye=Me-55296<<10|ye-56320|65536,Me=null;else{ye>56319||oe+1===F.length?(I[X++]=239,I[X++]=191,I[X++]=189):Me=ye;continue}else Me&&(I[X++]=239,I[X++]=191,I[X++]=189,Me=null);ye<128?I[X++]=ye:(ye<2048?I[X++]=ye>>6|192:(ye<65536?I[X++]=ye>>12|224:(I[X++]=ye>>18|240,I[X++]=ye>>12&63|128),I[X++]=ye>>6&63|128),I[X++]=ye&63|128)}return X}var rm=3;function IM(I,F,X){I===1&&X.readMessage(FM,F)}function FM(I,F,X){if(I===3){var oe=X.readMessage(kM,{}),ye=oe.id,Me=oe.bitmap,Ie=oe.width,$e=oe.height,mt=oe.left,Ct=oe.top,_t=oe.advance;F.push({id:ye,bitmap:new Dv({width:Ie+2*rm,height:$e+2*rm},Me),metrics:{width:Ie,height:$e,left:mt,top:Ct,advance:_t}})}}function kM(I,F,X){I===1?F.id=X.readVarint():I===2?F.bitmap=X.readBytes():I===3?F.width=X.readVarint():I===4?F.height=X.readVarint():I===5?F.left=X.readSVarint():I===6?F.top=X.readSVarint():I===7&&(F.advance=X.readVarint())}function OM(I){return new bg(I).readFields(IM,[])}var mb=rm;function xb(I){for(var F=0,X=0,oe=0,ye=I;oe<ye.length;oe+=1){var Me=ye[oe];F+=Me.w*Me.h,X=Math.max(X,Me.w)}I.sort(function(rn,qr){return qr.h-rn.h});for(var Ie=Math.max(Math.ceil(Math.sqrt(F/.95)),X),$e=[{x:0,y:0,w:Ie,h:1/0}],mt=0,Ct=0,_t=0,Kt=I;_t<Kt.length;_t+=1)for(var lr=Kt[_t],tr=$e.length-1;tr>=0;tr--){var wr=$e[tr];if(!(lr.w>wr.w||lr.h>wr.h)){if(lr.x=wr.x,lr.y=wr.y,Ct=Math.max(Ct,lr.y+lr.h),mt=Math.max(mt,lr.x+lr.w),lr.w===wr.w&&lr.h===wr.h){var Ur=$e.pop();tr<$e.length&&($e[tr]=Ur)}else lr.h===wr.h?(wr.x+=lr.w,wr.w-=lr.w):lr.w===wr.w?(wr.y+=lr.h,wr.h-=lr.h):($e.push({x:wr.x+lr.w,y:wr.y,w:wr.w-lr.w,h:lr.h}),wr.y+=lr.h,wr.h-=lr.h);break}}return{w:mt,h:Ct,fill:F/(mt*Ct)||0}}var vl=1,Tg=function(F,X){var oe=X.pixelRatio,ye=X.version,Me=X.stretchX,Ie=X.stretchY,$e=X.content;this.paddedRect=F,this.pixelRatio=oe,this.stretchX=Me,this.stretchY=Ie,this.content=$e,this.version=ye},V0={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};V0.tl.get=function(){return[this.paddedRect.x+vl,this.paddedRect.y+vl]},V0.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-vl,this.paddedRect.y+this.paddedRect.h-vl]},V0.tlbr.get=function(){return this.tl.concat(this.br)},V0.displaySize.get=function(){return[(this.paddedRect.w-vl*2)/this.pixelRatio,(this.paddedRect.h-vl*2)/this.pixelRatio]},Object.defineProperties(Tg.prototype,V0);var G0=function(F,X){var oe={},ye={};this.haveRenderCallbacks=[];var Me=[];this.addImages(F,oe,Me),this.addImages(X,ye,Me);var Ie=xb(Me),$e=Ie.w,mt=Ie.h,Ct=new js({width:$e||1,height:mt||1});for(var _t in F){var Kt=F[_t],lr=oe[_t].paddedRect;js.copy(Kt.data,Ct,{x:0,y:0},{x:lr.x+vl,y:lr.y+vl},Kt.data)}for(var tr in X){var wr=X[tr],Ur=ye[tr].paddedRect,rn=Ur.x+vl,qr=Ur.y+vl,Mn=wr.data.width,yn=wr.data.height;js.copy(wr.data,Ct,{x:0,y:0},{x:rn,y:qr},wr.data),js.copy(wr.data,Ct,{x:0,y:yn-1},{x:rn,y:qr-1},{width:Mn,height:1}),js.copy(wr.data,Ct,{x:0,y:0},{x:rn,y:qr+yn},{width:Mn,height:1}),js.copy(wr.data,Ct,{x:Mn-1,y:0},{x:rn-1,y:qr},{width:1,height:yn}),js.copy(wr.data,Ct,{x:0,y:0},{x:rn+Mn,y:qr},{width:1,height:yn})}this.image=Ct,this.iconPositions=oe,this.patternPositions=ye};G0.prototype.addImages=function(F,X,oe){for(var ye in F){var Me=F[ye],Ie={x:0,y:0,w:Me.data.width+2*vl,h:Me.data.height+2*vl};oe.push(Ie),X[ye]=new Tg(Ie,Me),Me.hasRenderCallback&&this.haveRenderCallbacks.push(ye)}},G0.prototype.patchUpdatedImages=function(F,X){F.dispatchRenderCallbacks(this.haveRenderCallbacks);for(var oe in F.updatedImages)this.patchUpdatedImage(this.iconPositions[oe],F.getImage(oe),X),this.patchUpdatedImage(this.patternPositions[oe],F.getImage(oe),X)},G0.prototype.patchUpdatedImage=function(F,X,oe){if(!(!F||!X)&&F.version!==X.version){F.version=X.version;var ye=F.tl,Me=ye[0],Ie=ye[1];oe.update(X.data,void 0,{x:Me,y:Ie})}},he("ImagePosition",Tg),he("ImageAtlas",G0);var Fl={horizontal:1,vertical:2,horizontalOnly:3},W0=-17;function zM(I){for(var F=0,X=I;F<X.length;F+=1){var oe=X[F];if(oe.positionedGlyphs.length!==0)return!1}return!0}var bb=57344,wb=63743,Sd=function(){this.scale=1,this.fontStack="",this.imageName=null};Sd.forText=function(F,X){var oe=new Sd;return oe.scale=F||1,oe.fontStack=X,oe},Sd.forImage=function(F){var X=new Sd;return X.imageName=F,X};var cs=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};cs.fromFeature=function(F,X){for(var oe=new cs,ye=0;ye<F.sections.length;ye++){var Me=F.sections[ye];Me.image?oe.addImageSection(Me):oe.addTextSection(Me,X)}return oe},cs.prototype.length=function(){return this.text.length},cs.prototype.getSection=function(F){return this.sections[this.sectionIndex[F]]},cs.prototype.getSectionIndex=function(F){return this.sectionIndex[F]},cs.prototype.getCharCode=function(F){return this.text.charCodeAt(F)},cs.prototype.verticalizePunctuation=function(){this.text=vM(this.text)},cs.prototype.trim=function(){for(var F=0,X=0;X<this.text.length&&Jf[this.text.charCodeAt(X)];X++)F++;for(var oe=this.text.length,ye=this.text.length-1;ye>=0&&ye>=F&&Jf[this.text.charCodeAt(ye)];ye--)oe--;this.text=this.text.substring(F,oe),this.sectionIndex=this.sectionIndex.slice(F,oe)},cs.prototype.substring=function(F,X){var oe=new cs;return oe.text=this.text.substring(F,X),oe.sectionIndex=this.sectionIndex.slice(F,X),oe.sections=this.sections,oe},cs.prototype.toString=function(){return this.text},cs.prototype.getMaxScale=function(){var F=this;return this.sectionIndex.reduce(function(X,oe){return Math.max(X,F.sections[oe].scale)},0)},cs.prototype.addTextSection=function(F,X){this.text+=F.text,this.sections.push(Sd.forText(F.scale,F.fontStack||X));for(var oe=this.sections.length-1,ye=0;ye<F.text.length;++ye)this.sectionIndex.push(oe)},cs.prototype.addImageSection=function(F){var X=F.image?F.image.name:"";if(X.length===0){H("Can't add FormattedSection with an empty image.");return}var oe=this.getNextImageSectionCharCode();if(!oe){H("Reached maximum number of images "+(wb-bb+2));return}this.text+=String.fromCharCode(oe),this.sections.push(Sd.forImage(X)),this.sectionIndex.push(this.sections.length-1)},cs.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=wb?null:++this.imageSectionID:(this.imageSectionID=bb,this.imageSectionID)};function NM(I,F){for(var X=[],oe=I.text,ye=0,Me=0,Ie=F;Me<Ie.length;Me+=1){var $e=Ie[Me];X.push(I.substring(ye,$e)),ye=$e}return ye<oe.length&&X.push(I.substring(ye,oe.length)),X}function Ag(I,F,X,oe,ye,Me,Ie,$e,mt,Ct,_t,Kt,lr,tr,wr,Ur){var rn=cs.fromFeature(I,ye);Kt===Fl.vertical&&rn.verticalizePunctuation();var qr,Mn=si.processBidirectionalText,yn=si.processStyledBidirectionalText;if(Mn&&rn.sections.length===1){qr=[];for(var En=Mn(rn.toString(),nm(rn,Ct,Me,F,oe,tr,wr)),In=0,Hn=En;In<Hn.length;In+=1){var Qn=Hn[In],$n=new cs;$n.text=Qn,$n.sections=rn.sections;for(var La=0;La<Qn.length;La++)$n.sectionIndex.push(0);qr.push($n)}}else if(yn){qr=[];for(var va=yn(rn.text,rn.sectionIndex,nm(rn,Ct,Me,F,oe,tr,wr)),xa=0,Ga=va;xa<Ga.length;xa+=1){var Aa=Ga[xa],Ma=new cs;Ma.text=Aa[0],Ma.sectionIndex=Aa[1],Ma.sections=rn.sections,qr.push(Ma)}}else qr=NM(rn,nm(rn,Ct,Me,F,oe,tr,wr));var ja=[],Ua={positionedLines:ja,text:rn.toString(),top:_t[1],bottom:_t[1],left:_t[0],right:_t[0],writingMode:Kt,iconsInText:!1,verticalizable:!1};return HM(Ua,F,X,oe,qr,Ie,$e,mt,Kt,Ct,lr,Ur),zM(ja)?!1:Ua}var Jf={};Jf[9]=!0,Jf[10]=!0,Jf[11]=!0,Jf[12]=!0,Jf[13]=!0,Jf[32]=!0;var dl={};dl[10]=!0,dl[32]=!0,dl[38]=!0,dl[40]=!0,dl[41]=!0,dl[43]=!0,dl[45]=!0,dl[47]=!0,dl[173]=!0,dl[183]=!0,dl[8203]=!0,dl[8208]=!0,dl[8211]=!0,dl[8231]=!0;function Tb(I,F,X,oe,ye,Me){if(F.imageName){var mt=oe[F.imageName];return mt?mt.displaySize[0]*F.scale*Zo/Me+ye:0}else{var Ie=X[F.fontStack],$e=Ie&&Ie[I];return $e?$e.metrics.advance*F.scale+ye:0}}function BM(I,F,X,oe,ye,Me){for(var Ie=0,$e=0;$e<I.length();$e++){var mt=I.getSection($e);Ie+=Tb(I.getCharCode($e),mt,oe,ye,F,Me)}var Ct=Math.max(1,Math.ceil(Ie/X));return Ie/Ct}function Ab(I,F,X,oe){var ye=Math.pow(I-F,2);return oe?I<F?ye/2:ye*2:ye+Math.abs(X)*X}function UM(I,F,X){var oe=0;return I===10&&(oe-=1e4),X&&(oe+=150),(I===40||I===65288)&&(oe+=50),(F===41||F===65289)&&(oe+=50),oe}function Sb(I,F,X,oe,ye,Me){for(var Ie=null,$e=Ab(F,X,ye,Me),mt=0,Ct=oe;mt<Ct.length;mt+=1){var _t=Ct[mt],Kt=F-_t.x,lr=Ab(Kt,X,ye,Me)+_t.badness;lr<=$e&&(Ie=_t,$e=lr)}return{index:I,x:F,priorBreak:Ie,badness:$e}}function Eb(I){return I?Eb(I.priorBreak).concat(I.index):[]}function nm(I,F,X,oe,ye,Me,Ie){if(Me!=="point")return[];if(!I)return[];for(var $e=[],mt=BM(I,F,X,oe,ye,Ie),Ct=I.text.indexOf("​")>=0,_t=0,Kt=0;Kt<I.length();Kt++){var lr=I.getSection(Kt),tr=I.getCharCode(Kt);if(Jf[tr]||(_t+=Tb(tr,lr,oe,ye,F,Ie)),Kt<I.length()-1){var wr=Pr(tr);(dl[tr]||wr||lr.imageName)&&$e.push(Sb(Kt+1,_t,mt,$e,UM(tr,I.getCharCode(Kt+1),wr&&Ct),!1))}}return Eb(Sb(I.length(),_t,mt,$e,0,!0))}function am(I){var F=.5,X=.5;switch(I){case"right":case"top-right":case"bottom-right":F=1;break;case"left":case"top-left":case"bottom-left":F=0;break}switch(I){case"bottom":case"bottom-right":case"bottom-left":X=1;break;case"top":case"top-right":case"top-left":X=0;break}return{horizontalAlign:F,verticalAlign:X}}function HM(I,F,X,oe,ye,Me,Ie,$e,mt,Ct,_t,Kt){for(var lr=0,tr=W0,wr=0,Ur=0,rn=$e==="right"?1:$e==="left"?0:.5,qr=0,Mn=0,yn=ye;Mn<yn.length;Mn+=1){var En=yn[Mn];En.trim();var In=En.getMaxScale(),Hn=(In-1)*Zo,Qn={positionedGlyphs:[],lineOffset:0};I.positionedLines[qr]=Qn;var $n=Qn.positionedGlyphs,La=0;if(!En.length()){tr+=Me,++qr;continue}for(var va=0;va<En.length();va++){var xa=En.getSection(va),Ga=En.getSectionIndex(va),Aa=En.getCharCode(va),Ma=0,ja=null,Ua=null,li=null,Ei=Zo,ui=!(mt===Fl.horizontal||!_t&&!Cr(Aa)||_t&&(Jf[Aa]||Ir(Aa)));if(xa.imageName){var to=oe[xa.imageName];if(!to)continue;li=xa.imageName,I.iconsInText=I.iconsInText||!0,Ua=to.paddedRect;var io=to.displaySize;xa.scale=xa.scale*Zo/Kt,ja={width:io[0],height:io[1],left:vl,top:-mb,advance:ui?io[1]:io[0]};var No=Zo-io[1]*xa.scale;Ma=Hn+No,Ei=ja.advance;var To=ui?io[0]*xa.scale-Zo*In:io[1]*xa.scale-Zo*In;To>0&&To>La&&(La=To)}else{var fi=X[xa.fontStack],ai=fi&&fi[Aa];if(ai&&ai.rect)Ua=ai.rect,ja=ai.metrics;else{var Di=F[xa.fontStack],Oi=Di&&Di[Aa];if(!Oi)continue;ja=Oi.metrics}Ma=(In-xa.scale)*Zo}ui?(I.verticalizable=!0,$n.push({glyph:Aa,imageName:li,x:lr,y:tr+Ma,vertical:ui,scale:xa.scale,fontStack:xa.fontStack,sectionIndex:Ga,metrics:ja,rect:Ua}),lr+=Ei*xa.scale+Ct):($n.push({glyph:Aa,imageName:li,x:lr,y:tr+Ma,vertical:ui,scale:xa.scale,fontStack:xa.fontStack,sectionIndex:Ga,metrics:ja,rect:Ua}),lr+=ja.advance*xa.scale+Ct)}if($n.length!==0){var hs=lr-Ct;wr=Math.max(hs,wr),VM($n,0,$n.length-1,rn,La)}lr=0;var vs=Me*In+La;Qn.lineOffset=Math.max(La,Hn),tr+=vs,Ur=Math.max(vs,Ur),++qr}var Bo=tr-W0,Es=am(Ie),Ms=Es.horizontalAlign,_o=Es.verticalAlign;GM(I.positionedLines,rn,Ms,_o,wr,Ur,Me,Bo,ye.length),I.top+=-_o*Bo,I.bottom=I.top+Bo,I.left+=-Ms*wr,I.right=I.left+wr}function VM(I,F,X,oe,ye){if(!(!oe&&!ye))for(var Me=I[X],Ie=Me.metrics.advance*Me.scale,$e=(I[X].x+Ie)*oe,mt=F;mt<=X;mt++)I[mt].x-=$e,I[mt].y+=ye}function GM(I,F,X,oe,ye,Me,Ie,$e,mt){var Ct=(F-X)*ye,_t=0;Me!==Ie?_t=-$e*oe-W0:_t=(-oe*mt+.5)*Ie;for(var Kt=0,lr=I;Kt<lr.length;Kt+=1)for(var tr=lr[Kt],wr=0,Ur=tr.positionedGlyphs;wr<Ur.length;wr+=1){var rn=Ur[wr];rn.x+=Ct,rn.y+=_t}}function WM(I,F,X){var oe=am(X),ye=oe.horizontalAlign,Me=oe.verticalAlign,Ie=F[0],$e=F[1],mt=Ie-I.displaySize[0]*ye,Ct=mt+I.displaySize[0],_t=$e-I.displaySize[1]*Me,Kt=_t+I.displaySize[1];return{image:I,top:_t,bottom:Kt,left:mt,right:Ct}}function Mb(I,F,X,oe,ye,Me){var Ie=I.image,$e;if(Ie.content){var mt=Ie.content,Ct=Ie.pixelRatio||1;$e=[mt[0]/Ct,mt[1]/Ct,Ie.displaySize[0]-mt[2]/Ct,Ie.displaySize[1]-mt[3]/Ct]}var _t=F.left*Me,Kt=F.right*Me,lr,tr,wr,Ur;X==="width"||X==="both"?(Ur=ye[0]+_t-oe[3],tr=ye[0]+Kt+oe[1]):(Ur=ye[0]+(_t+Kt-Ie.displaySize[0])/2,tr=Ur+Ie.displaySize[0]);var rn=F.top*Me,qr=F.bottom*Me;return X==="height"||X==="both"?(lr=ye[1]+rn-oe[0],wr=ye[1]+qr+oe[2]):(lr=ye[1]+(rn+qr-Ie.displaySize[1])/2,wr=lr+Ie.displaySize[1]),{image:Ie,top:lr,right:tr,bottom:wr,left:Ur,collisionPadding:$e}}var Ed=function(I){function F(X,oe,ye,Me){I.call(this,X,oe),this.angle=ye,Me!==void 0&&(this.segment=Me)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.clone=function(){return new F(this.x,this.y,this.angle,this.segment)},F}(r);he("Anchor",Ed);var df=128;function im(I,F){var X=F.expression;if(X.kind==="constant"){var oe=X.evaluate(new Bn(I+1));return{kind:"constant",layoutSize:oe}}else{if(X.kind==="source")return{kind:"source"};for(var ye=X.zoomStops,Me=X.interpolationType,Ie=0;Ie<ye.length&&ye[Ie]<=I;)Ie++;Ie=Math.max(0,Ie-1);for(var $e=Ie;$e<ye.length&&ye[$e]<I+1;)$e++;$e=Math.min(ye.length-1,$e);var mt=ye[Ie],Ct=ye[$e];if(X.kind==="composite")return{kind:"composite",minZoom:mt,maxZoom:Ct,interpolationType:Me};var _t=X.evaluate(new Bn(mt)),Kt=X.evaluate(new Bn(Ct));return{kind:"camera",minZoom:mt,maxZoom:Ct,minSize:_t,maxSize:Kt,interpolationType:Me}}}function Cb(I,F,X){var oe=F.uSize,ye=F.uSizeT,Me=X.lowerSize,Ie=X.upperSize;return I.kind==="source"?Me/df:I.kind==="composite"?Zi(Me/df,Ie/df,ye):oe}function Lb(I,F){var X=0,oe=0;if(I.kind==="constant")oe=I.layoutSize;else if(I.kind!=="source"){var ye=I.interpolationType,Me=I.minZoom,Ie=I.maxZoom,$e=ye?h(Ji.interpolationFactor(ye,F,Me,Ie),0,1):0;I.kind==="camera"?oe=Zi(I.minSize,I.maxSize,$e):X=$e}return{uSizeT:X,uSize:oe}}var YM=Object.freeze({__proto__:null,getSizeData:im,evaluateSizeForFeature:Cb,evaluateSizeForZoom:Lb,SIZE_PACK_FACTOR:df});function Pb(I,F,X,oe,ye){if(F.segment===void 0)return!0;for(var Me=F,Ie=F.segment+1,$e=0;$e>-X/2;){if(Ie--,Ie<0)return!1;$e-=I[Ie].dist(Me),Me=I[Ie]}$e+=I[Ie].dist(I[Ie+1]),Ie++;for(var mt=[],Ct=0;$e<X/2;){var _t=I[Ie-1],Kt=I[Ie],lr=I[Ie+1];if(!lr)return!1;var tr=_t.angleTo(Kt)-Kt.angleTo(lr);for(tr=Math.abs((tr+3*Math.PI)%(Math.PI*2)-Math.PI),mt.push({distance:$e,angleDelta:tr}),Ct+=tr;$e-mt[0].distance>oe;)Ct-=mt.shift().angleDelta;if(Ct>ye)return!1;Ie++,$e+=Kt.dist(lr)}return!0}function _b(I){for(var F=0,X=0;X<I.length-1;X++)F+=I[X].dist(I[X+1]);return F}function Rb(I,F,X){return I?.6*F*X:0}function Db(I,F){return Math.max(I?I.right-I.left:0,F?F.right-F.left:0)}function XM(I,F,X,oe,ye,Me){for(var Ie=Rb(X,ye,Me),$e=Db(X,oe)*Me,mt=0,Ct=_b(I)/2,_t=0;_t<I.length-1;_t++){var Kt=I[_t],lr=I[_t+1],tr=Kt.dist(lr);if(mt+tr>Ct){var wr=(Ct-mt)/tr,Ur=Zi(Kt.x,lr.x,wr),rn=Zi(Kt.y,lr.y,wr),qr=new Ed(Ur,rn,lr.angleTo(Kt),_t);return qr._round(),!Ie||Pb(I,qr,$e,Ie,F)?qr:void 0}mt+=tr}}function ZM(I,F,X,oe,ye,Me,Ie,$e,mt){var Ct=Rb(oe,Me,Ie),_t=Db(oe,ye),Kt=_t*Ie,lr=I[0].x===0||I[0].x===mt||I[0].y===0||I[0].y===mt;F-Kt<F/4&&(F=Kt+F/4);var tr=Me*2,wr=lr?F/2*$e%F:(_t/2+tr)*Ie*$e%F;return Ib(I,wr,F,Ct,X,Kt,lr,!1,mt)}function Ib(I,F,X,oe,ye,Me,Ie,$e,mt){for(var Ct=Me/2,_t=_b(I),Kt=0,lr=F-X,tr=[],wr=0;wr<I.length-1;wr++){for(var Ur=I[wr],rn=I[wr+1],qr=Ur.dist(rn),Mn=rn.angleTo(Ur);lr+X<Kt+qr;){lr+=X;var yn=(lr-Kt)/qr,En=Zi(Ur.x,rn.x,yn),In=Zi(Ur.y,rn.y,yn);if(En>=0&&En<mt&&In>=0&&In<mt&&lr-Ct>=0&&lr+Ct<=_t){var Hn=new Ed(En,In,Mn,wr);Hn._round(),(!oe||Pb(I,Hn,Me,oe,ye))&&tr.push(Hn)}}Kt+=qr}return!$e&&!tr.length&&!Ie&&(tr=Ib(I,Kt/2,X,oe,ye,Me,Ie,!0,mt)),tr}function Fb(I,F,X,oe,ye){for(var Me=[],Ie=0;Ie<I.length;Ie++)for(var $e=I[Ie],mt=void 0,Ct=0;Ct<$e.length-1;Ct++){var _t=$e[Ct],Kt=$e[Ct+1];_t.x<F&&Kt.x<F||(_t.x<F?_t=new r(F,_t.y+(Kt.y-_t.y)*((F-_t.x)/(Kt.x-_t.x)))._round():Kt.x<F&&(Kt=new r(F,_t.y+(Kt.y-_t.y)*((F-_t.x)/(Kt.x-_t.x)))._round()),!(_t.y<X&&Kt.y<X)&&(_t.y<X?_t=new r(_t.x+(Kt.x-_t.x)*((X-_t.y)/(Kt.y-_t.y)),X)._round():Kt.y<X&&(Kt=new r(_t.x+(Kt.x-_t.x)*((X-_t.y)/(Kt.y-_t.y)),X)._round()),!(_t.x>=oe&&Kt.x>=oe)&&(_t.x>=oe?_t=new r(oe,_t.y+(Kt.y-_t.y)*((oe-_t.x)/(Kt.x-_t.x)))._round():Kt.x>=oe&&(Kt=new r(oe,_t.y+(Kt.y-_t.y)*((oe-_t.x)/(Kt.x-_t.x)))._round()),!(_t.y>=ye&&Kt.y>=ye)&&(_t.y>=ye?_t=new r(_t.x+(Kt.x-_t.x)*((ye-_t.y)/(Kt.y-_t.y)),ye)._round():Kt.y>=ye&&(Kt=new r(_t.x+(Kt.x-_t.x)*((ye-_t.y)/(Kt.y-_t.y)),ye)._round()),(!mt||!_t.equals(mt[mt.length-1]))&&(mt=[_t],Me.push(mt)),mt.push(Kt)))))}return Me}var Md=vl;function kb(I,F,X,oe){var ye=[],Me=I.image,Ie=Me.pixelRatio,$e=Me.paddedRect.w-2*Md,mt=Me.paddedRect.h-2*Md,Ct=I.right-I.left,_t=I.bottom-I.top,Kt=Me.stretchX||[[0,$e]],lr=Me.stretchY||[[0,mt]],tr=function(fi,ai){return fi+ai[1]-ai[0]},wr=Kt.reduce(tr,0),Ur=lr.reduce(tr,0),rn=$e-wr,qr=mt-Ur,Mn=0,yn=wr,En=0,In=Ur,Hn=0,Qn=rn,$n=0,La=qr;if(Me.content&&oe){var va=Me.content;Mn=Sg(Kt,0,va[0]),En=Sg(lr,0,va[1]),yn=Sg(Kt,va[0],va[2]),In=Sg(lr,va[1],va[3]),Hn=va[0]-Mn,$n=va[1]-En,Qn=va[2]-va[0]-yn,La=va[3]-va[1]-In}var xa=function(fi,ai,Di,Oi){var to=Eg(fi.stretch-Mn,yn,Ct,I.left),io=Mg(fi.fixed-Hn,Qn,fi.stretch,wr),No=Eg(ai.stretch-En,In,_t,I.top),To=Mg(ai.fixed-$n,La,ai.stretch,Ur),hs=Eg(Di.stretch-Mn,yn,Ct,I.left),vs=Mg(Di.fixed-Hn,Qn,Di.stretch,wr),Bo=Eg(Oi.stretch-En,In,_t,I.top),Es=Mg(Oi.fixed-$n,La,Oi.stretch,Ur),Ms=new r(to,No),_o=new r(hs,No),Cs=new r(hs,Bo),kl=new r(to,Bo),Fc=new r(io/Ie,To/Ie),Ch=new r(vs/Ie,Es/Ie),Lh=F*Math.PI/180;if(Lh){var Ph=Math.sin(Lh),Fd=Math.cos(Lh),Du=[Fd,-Ph,Ph,Fd];Ms._matMult(Du),_o._matMult(Du),kl._matMult(Du),Cs._matMult(Du)}var Dg=fi.stretch+fi.fixed,vm=Di.stretch+Di.fixed,Ig=ai.stretch+ai.fixed,dm=Oi.stretch+Oi.fixed,nu={x:Me.paddedRect.x+Md+Dg,y:Me.paddedRect.y+Md+Ig,w:vm-Dg,h:dm-Ig},kd=Qn/Ie/Ct,Fg=La/Ie/_t;return{tl:Ms,tr:_o,bl:kl,br:Cs,tex:nu,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Fc,pixelOffsetBR:Ch,minFontScaleX:kd,minFontScaleY:Fg,isSDF:X}};if(!oe||!Me.stretchX&&!Me.stretchY)ye.push(xa({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:$e+1},{fixed:0,stretch:mt+1}));else for(var Ga=Ob(Kt,rn,wr),Aa=Ob(lr,qr,Ur),Ma=0;Ma<Ga.length-1;Ma++)for(var ja=Ga[Ma],Ua=Ga[Ma+1],li=0;li<Aa.length-1;li++){var Ei=Aa[li],ui=Aa[li+1];ye.push(xa(ja,Ei,Ua,ui))}return ye}function Sg(I,F,X){for(var oe=0,ye=0,Me=I;ye<Me.length;ye+=1){var Ie=Me[ye];oe+=Math.max(F,Math.min(X,Ie[1]))-Math.max(F,Math.min(X,Ie[0]))}return oe}function Ob(I,F,X){for(var oe=[{fixed:-Md,stretch:0}],ye=0,Me=I;ye<Me.length;ye+=1){var Ie=Me[ye],$e=Ie[0],mt=Ie[1],Ct=oe[oe.length-1];oe.push({fixed:$e-Ct.stretch,stretch:Ct.stretch}),oe.push({fixed:$e-Ct.stretch,stretch:Ct.stretch+(mt-$e)})}return oe.push({fixed:F+Md,stretch:X}),oe}function Eg(I,F,X,oe){return I/F*X+oe}function Mg(I,F,X,oe){return I-F*X/oe}function jM(I,F,X,oe,ye,Me,Ie,$e){for(var mt=oe.layout.get("text-rotate").evaluate(Me,{})*Math.PI/180,Ct=[],_t=0,Kt=F.positionedLines;_t<Kt.length;_t+=1)for(var lr=Kt[_t],tr=0,wr=lr.positionedGlyphs;tr<wr.length;tr+=1){var Ur=wr[tr];if(Ur.rect){var rn=Ur.rect||{},qr=1,Mn=mb+qr,yn=!0,En=1,In=0,Hn=(ye||$e)&&Ur.vertical,Qn=Ur.metrics.advance*Ur.scale/2;if($e&&F.verticalizable){var $n=(Ur.scale-1)*Zo,La=(Zo-Ur.metrics.width*Ur.scale)/2;In=lr.lineOffset/2-(Ur.imageName?-La:$n)}if(Ur.imageName){var va=Ie[Ur.imageName];yn=va.sdf,En=va.pixelRatio,Mn=vl/En}var xa=ye?[Ur.x+Qn,Ur.y]:[0,0],Ga=ye?[0,0]:[Ur.x+Qn+X[0],Ur.y+X[1]-In],Aa=[0,0];Hn&&(Aa=Ga,Ga=[0,0]);var Ma=(Ur.metrics.left-Mn)*Ur.scale-Qn+Ga[0],ja=(-Ur.metrics.top-Mn)*Ur.scale+Ga[1],Ua=Ma+rn.w*Ur.scale/En,li=ja+rn.h*Ur.scale/En,Ei=new r(Ma,ja),ui=new r(Ua,ja),fi=new r(Ma,li),ai=new r(Ua,li);if(Hn){var Di=new r(-Qn,Qn-W0),Oi=-Math.PI/2,to=Zo/2-Qn,io=Ur.imageName?to:0,No=new r(5-W0-to,-io),To=new(Function.prototype.bind.apply(r,[null].concat(Aa)));Ei._rotateAround(Oi,Di)._add(No)._add(To),ui._rotateAround(Oi,Di)._add(No)._add(To),fi._rotateAround(Oi,Di)._add(No)._add(To),ai._rotateAround(Oi,Di)._add(No)._add(To)}if(mt){var hs=Math.sin(mt),vs=Math.cos(mt),Bo=[vs,-hs,hs,vs];Ei._matMult(Bo),ui._matMult(Bo),fi._matMult(Bo),ai._matMult(Bo)}var Es=new r(0,0),Ms=new r(0,0),_o=0,Cs=0;Ct.push({tl:Ei,tr:ui,bl:fi,br:ai,tex:rn,writingMode:F.writingMode,glyphOffset:xa,sectionIndex:Ur.sectionIndex,isSDF:yn,pixelOffsetTL:Es,pixelOffsetBR:Ms,minFontScaleX:_o,minFontScaleY:Cs})}}return Ct}var Cg=function(F,X,oe,ye,Me,Ie,$e,mt,Ct,_t){if(this.boxStartIndex=F.length,Ct){var Kt=Ie.top,lr=Ie.bottom,tr=Ie.collisionPadding;tr&&(Kt-=tr[1],lr+=tr[3]);var wr=lr-Kt;wr>0&&(wr=Math.max(10,wr),this.circleDiameter=wr)}else{var Ur=Ie.top*$e-mt,rn=Ie.bottom*$e+mt,qr=Ie.left*$e-mt,Mn=Ie.right*$e+mt,yn=Ie.collisionPadding;if(yn&&(qr-=yn[0]*$e,Ur-=yn[1]*$e,Mn+=yn[2]*$e,rn+=yn[3]*$e),_t){var En=new r(qr,Ur),In=new r(Mn,Ur),Hn=new r(qr,rn),Qn=new r(Mn,rn),$n=_t*Math.PI/180;En._rotate($n),In._rotate($n),Hn._rotate($n),Qn._rotate($n),qr=Math.min(En.x,In.x,Hn.x,Qn.x),Mn=Math.max(En.x,In.x,Hn.x,Qn.x),Ur=Math.min(En.y,In.y,Hn.y,Qn.y),rn=Math.max(En.y,In.y,Hn.y,Qn.y)}F.emplaceBack(X.x,X.y,qr,Ur,Mn,rn,oe,ye,Me)}this.boxEndIndex=F.length},Cd=function(F,X){if(F===void 0&&(F=[]),X===void 0&&(X=KM),this.data=F,this.length=this.data.length,this.compare=X,this.length>0)for(var oe=(this.length>>1)-1;oe>=0;oe--)this._down(oe)};Cd.prototype.push=function(F){this.data.push(F),this.length++,this._up(this.length-1)},Cd.prototype.pop=function(){if(this.length!==0){var F=this.data[0],X=this.data.pop();return this.length--,this.length>0&&(this.data[0]=X,this._down(0)),F}},Cd.prototype.peek=function(){return this.data[0]},Cd.prototype._up=function(F){for(var X=this,oe=X.data,ye=X.compare,Me=oe[F];F>0;){var Ie=F-1>>1,$e=oe[Ie];if(ye(Me,$e)>=0)break;oe[F]=$e,F=Ie}oe[F]=Me},Cd.prototype._down=function(F){for(var X=this,oe=X.data,ye=X.compare,Me=this.length>>1,Ie=oe[F];F<Me;){var $e=(F<<1)+1,mt=oe[$e],Ct=$e+1;if(Ct<this.length&&ye(oe[Ct],mt)<0&&($e=Ct,mt=oe[Ct]),ye(mt,Ie)>=0)break;oe[F]=mt,F=$e}oe[F]=Ie};function KM(I,F){return I<F?-1:I>F?1:0}function JM(I,F,X){F===void 0&&(F=1),X===void 0&&(X=!1);for(var oe=1/0,ye=1/0,Me=-1/0,Ie=-1/0,$e=I[0],mt=0;mt<$e.length;mt++){var Ct=$e[mt];(!mt||Ct.x<oe)&&(oe=Ct.x),(!mt||Ct.y<ye)&&(ye=Ct.y),(!mt||Ct.x>Me)&&(Me=Ct.x),(!mt||Ct.y>Ie)&&(Ie=Ct.y)}var _t=Me-oe,Kt=Ie-ye,lr=Math.min(_t,Kt),tr=lr/2,wr=new Cd([],$M);if(lr===0)return new r(oe,ye);for(var Ur=oe;Ur<Me;Ur+=lr)for(var rn=ye;rn<Ie;rn+=lr)wr.push(new Ld(Ur+tr,rn+tr,tr,I));for(var qr=qM(I),Mn=wr.length;wr.length;){var yn=wr.pop();(yn.d>qr.d||!qr.d)&&(qr=yn,X&&console.log("found best %d after %d probes",Math.round(1e4*yn.d)/1e4,Mn)),!(yn.max-qr.d<=F)&&(tr=yn.h/2,wr.push(new Ld(yn.p.x-tr,yn.p.y-tr,tr,I)),wr.push(new Ld(yn.p.x+tr,yn.p.y-tr,tr,I)),wr.push(new Ld(yn.p.x-tr,yn.p.y+tr,tr,I)),wr.push(new Ld(yn.p.x+tr,yn.p.y+tr,tr,I)),Mn+=4)}return X&&(console.log("num probes: "+Mn),console.log("best distance: "+qr.d)),qr.p}function $M(I,F){return F.max-I.max}function Ld(I,F,X,oe){this.p=new r(I,F),this.h=X,this.d=QM(this.p,oe),this.max=this.d+this.h*Math.SQRT2}function QM(I,F){for(var X=!1,oe=1/0,ye=0;ye<F.length;ye++)for(var Me=F[ye],Ie=0,$e=Me.length,mt=$e-1;Ie<$e;mt=Ie++){var Ct=Me[Ie],_t=Me[mt];Ct.y>I.y!=_t.y>I.y&&I.x<(_t.x-Ct.x)*(I.y-Ct.y)/(_t.y-Ct.y)+Ct.x&&(X=!X),oe=Math.min(oe,cf(I,Ct,_t))}return(X?1:-1)*Math.sqrt(oe)}function qM(I){for(var F=0,X=0,oe=0,ye=I[0],Me=0,Ie=ye.length,$e=Ie-1;Me<Ie;$e=Me++){var mt=ye[Me],Ct=ye[$e],_t=mt.x*Ct.y-Ct.x*mt.y;X+=(mt.x+Ct.x)*_t,oe+=(mt.y+Ct.y)*_t,F+=_t*3}return new Ld(X/F,oe/F,0,I)}var Pd=7,om=Number.POSITIVE_INFINITY;function zb(I,F){function X(ye,Me){var Ie=0,$e=0;Me<0&&(Me=0);var mt=Me/Math.sqrt(2);switch(ye){case"top-right":case"top-left":$e=mt-Pd;break;case"bottom-right":case"bottom-left":$e=-mt+Pd;break;case"bottom":$e=-Me+Pd;break;case"top":$e=Me-Pd;break}switch(ye){case"top-right":case"bottom-right":Ie=-mt;break;case"top-left":case"bottom-left":Ie=mt;break;case"left":Ie=Me;break;case"right":Ie=-Me;break}return[Ie,$e]}function oe(ye,Me,Ie){var $e=0,mt=0;switch(Me=Math.abs(Me),Ie=Math.abs(Ie),ye){case"top-right":case"top-left":case"top":mt=Ie-Pd;break;case"bottom-right":case"bottom-left":case"bottom":mt=-Ie+Pd;break}switch(ye){case"top-right":case"bottom-right":case"right":$e=-Me;break;case"top-left":case"bottom-left":case"left":$e=Me;break}return[$e,mt]}return F[1]!==om?oe(I,F[0],F[1]):X(I,F[0])}function e8(I,F,X,oe,ye,Me,Ie){I.createArrays();var $e=512*I.overscaling;I.tilePixelRatio=Ra/$e,I.compareText={},I.iconsNeedLinear=!1;var mt=I.layers[0].layout,Ct=I.layers[0]._unevaluatedLayout._values,_t={};if(I.textSizeData.kind==="composite"){var Kt=I.textSizeData,lr=Kt.minZoom,tr=Kt.maxZoom;_t.compositeTextSizes=[Ct["text-size"].possiblyEvaluate(new Bn(lr),Ie),Ct["text-size"].possiblyEvaluate(new Bn(tr),Ie)]}if(I.iconSizeData.kind==="composite"){var wr=I.iconSizeData,Ur=wr.minZoom,rn=wr.maxZoom;_t.compositeIconSizes=[Ct["icon-size"].possiblyEvaluate(new Bn(Ur),Ie),Ct["icon-size"].possiblyEvaluate(new Bn(rn),Ie)]}_t.layoutTextSize=Ct["text-size"].possiblyEvaluate(new Bn(I.zoom+1),Ie),_t.layoutIconSize=Ct["icon-size"].possiblyEvaluate(new Bn(I.zoom+1),Ie),_t.textMaxSize=Ct["text-size"].possiblyEvaluate(new Bn(18));for(var qr=mt.get("text-line-height")*Zo,Mn=mt.get("text-rotation-alignment")==="map"&&mt.get("symbol-placement")!=="point",yn=mt.get("text-keep-upright"),En=mt.get("text-size"),In=function(){var $n=Qn[Hn],La=mt.get("text-font").evaluate($n,{},Ie).join(","),va=En.evaluate($n,{},Ie),xa=_t.layoutTextSize.evaluate($n,{},Ie),Ga=_t.layoutIconSize.evaluate($n,{},Ie),Aa={horizontal:{},vertical:void 0},Ma=$n.text,ja=[0,0];if(Ma){var Ua=Ma.toString(),li=mt.get("text-letter-spacing").evaluate($n,{},Ie)*Zo,Ei=rr(Ua)?li:0,ui=mt.get("text-anchor").evaluate($n,{},Ie),fi=mt.get("text-variable-anchor");if(!fi){var ai=mt.get("text-radial-offset").evaluate($n,{},Ie);ai?ja=zb(ui,[ai*Zo,om]):ja=mt.get("text-offset").evaluate($n,{},Ie).map(function(Fc){return Fc*Zo})}var Di=Mn?"center":mt.get("text-justify").evaluate($n,{},Ie),Oi=mt.get("symbol-placement"),to=Oi==="point"?mt.get("text-max-width").evaluate($n,{},Ie)*Zo:0,io=function(){I.allowVerticalPlacement&&Xt(Ua)&&(Aa.vertical=Ag(Ma,F,X,ye,La,to,qr,ui,"left",Ei,ja,Fl.vertical,!0,Oi,xa,va))};if(!Mn&&fi){for(var No=Di==="auto"?fi.map(function(Fc){return sm(Fc)}):[Di],To=!1,hs=0;hs<No.length;hs++){var vs=No[hs];if(!Aa.horizontal[vs])if(To)Aa.horizontal[vs]=Aa.horizontal[0];else{var Bo=Ag(Ma,F,X,ye,La,to,qr,"center",vs,Ei,ja,Fl.horizontal,!1,Oi,xa,va);Bo&&(Aa.horizontal[vs]=Bo,To=Bo.positionedLines.length===1)}}io()}else{Di==="auto"&&(Di=sm(ui));var Es=Ag(Ma,F,X,ye,La,to,qr,ui,Di,Ei,ja,Fl.horizontal,!1,Oi,xa,va);Es&&(Aa.horizontal[Di]=Es),io(),Xt(Ua)&&Mn&&yn&&(Aa.vertical=Ag(Ma,F,X,ye,La,to,qr,ui,Di,Ei,ja,Fl.vertical,!1,Oi,xa,va))}}var Ms=void 0,_o=!1;if($n.icon&&$n.icon.name){var Cs=oe[$n.icon.name];Cs&&(Ms=WM(ye[$n.icon.name],mt.get("icon-offset").evaluate($n,{},Ie),mt.get("icon-anchor").evaluate($n,{},Ie)),_o=Cs.sdf,I.sdfIcons===void 0?I.sdfIcons=Cs.sdf:I.sdfIcons!==Cs.sdf&&H("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(Cs.pixelRatio!==I.pixelRatio||mt.get("icon-rotate").constantOr(1)!==0)&&(I.iconsNeedLinear=!0))}var kl=Bb(Aa.horizontal)||Aa.vertical;I.iconsInText=kl?kl.iconsInText:!1,(kl||Ms)&&t8(I,$n,Aa,Ms,oe,_t,xa,Ga,ja,_o,Ie)},Hn=0,Qn=I.features;Hn<Qn.length;Hn+=1)In();Me&&I.generateCollisionDebugBuffers()}function sm(I){switch(I){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function t8(I,F,X,oe,ye,Me,Ie,$e,mt,Ct,_t){var Kt=Me.textMaxSize.evaluate(F,{});Kt===void 0&&(Kt=Ie);var lr=I.layers[0].layout,tr=lr.get("icon-offset").evaluate(F,{},_t),wr=Bb(X.horizontal),Ur=24,rn=Ie/Ur,qr=I.tilePixelRatio*rn,Mn=I.tilePixelRatio*Kt/Ur,yn=I.tilePixelRatio*$e,En=I.tilePixelRatio*lr.get("symbol-spacing"),In=lr.get("text-padding")*I.tilePixelRatio,Hn=lr.get("icon-padding")*I.tilePixelRatio,Qn=lr.get("text-max-angle")/180*Math.PI,$n=lr.get("text-rotation-alignment")==="map"&&lr.get("symbol-placement")!=="point",La=lr.get("icon-rotation-alignment")==="map"&&lr.get("symbol-placement")!=="point",va=lr.get("symbol-placement"),xa=En/2,Ga=lr.get("icon-text-fit"),Aa;oe&&Ga!=="none"&&(I.allowVerticalPlacement&&X.vertical&&(Aa=Mb(oe,X.vertical,Ga,lr.get("icon-text-fit-padding"),tr,rn)),wr&&(oe=Mb(oe,wr,Ga,lr.get("icon-text-fit-padding"),tr,rn)));var Ma=function(Fd,Du){Du.x<0||Du.x>=Ra||Du.y<0||Du.y>=Ra||r8(I,Du,Fd,X,oe,ye,Aa,I.layers[0],I.collisionBoxArray,F.index,F.sourceLayerIndex,I.index,qr,In,$n,mt,yn,Hn,La,tr,F,Me,Ct,_t,Ie)};if(va==="line")for(var ja=0,Ua=Fb(F.geometry,0,0,Ra,Ra);ja<Ua.length;ja+=1)for(var li=Ua[ja],Ei=ZM(li,En,Qn,X.vertical||wr,oe,Ur,Mn,I.overscaling,Ra),ui=0,fi=Ei;ui<fi.length;ui+=1){var ai=fi[ui],Di=wr;(!Di||!n8(I,Di.text,xa,ai))&&Ma(li,ai)}else if(va==="line-center")for(var Oi=0,to=F.geometry;Oi<to.length;Oi+=1){var io=to[Oi];if(io.length>1){var No=XM(io,Qn,X.vertical||wr,oe,Ur,Mn);No&&Ma(io,No)}}else if(F.type==="Polygon")for(var To=0,hs=Jy(F.geometry,0);To<hs.length;To+=1){var vs=hs[To],Bo=JM(vs,16);Ma(vs[0],new Ed(Bo.x,Bo.y,0))}else if(F.type==="LineString")for(var Es=0,Ms=F.geometry;Es<Ms.length;Es+=1){var _o=Ms[Es];Ma(_o,new Ed(_o[0].x,_o[0].y,0))}else if(F.type==="Point")for(var Cs=0,kl=F.geometry;Cs<kl.length;Cs+=1)for(var Fc=kl[Cs],Ch=0,Lh=Fc;Ch<Lh.length;Ch+=1){var Ph=Lh[Ch];Ma([Ph],new Ed(Ph.x,Ph.y,0))}}var Y0=255,Eh=Y0*df;function Nb(I,F,X,oe,ye,Me,Ie,$e,mt,Ct,_t,Kt,lr,tr,wr){var Ur=jM(F,X,$e,ye,Me,Ie,oe,I.allowVerticalPlacement),rn=I.textSizeData,qr=null;rn.kind==="source"?(qr=[df*ye.layout.get("text-size").evaluate(Ie,{})],qr[0]>Eh&&H(I.layerIds[0]+': Value for "text-size" is >= '+Y0+'. Reduce your "text-size".')):rn.kind==="composite"&&(qr=[df*tr.compositeTextSizes[0].evaluate(Ie,{},wr),df*tr.compositeTextSizes[1].evaluate(Ie,{},wr)],(qr[0]>Eh||qr[1]>Eh)&&H(I.layerIds[0]+': Value for "text-size" is >= '+Y0+'. Reduce your "text-size".')),I.addSymbols(I.text,Ur,qr,$e,Me,Ie,Ct,F,mt.lineStartIndex,mt.lineLength,lr,wr);for(var Mn=0,yn=_t;Mn<yn.length;Mn+=1){var En=yn[Mn];Kt[En]=I.text.placedSymbolArray.length-1}return Ur.length*4}function Bb(I){for(var F in I)return I[F];return null}function r8(I,F,X,oe,ye,Me,Ie,$e,mt,Ct,_t,Kt,lr,tr,wr,Ur,rn,qr,Mn,yn,En,In,Hn,Qn,$n){var La,va=I.addToLineVertexArray(F,X),xa,Ga,Aa,Ma,ja=0,Ua=0,li=0,Ei=0,ui=-1,fi=-1,ai={},Di=je(""),Oi=0,to=0;if($e._unevaluatedLayout.getValue("text-radial-offset")===void 0?(La=$e.layout.get("text-offset").evaluate(En,{},Qn).map(function(j0){return j0*Zo}),Oi=La[0],to=La[1]):(Oi=$e.layout.get("text-radial-offset").evaluate(En,{},Qn)*Zo,to=om),I.allowVerticalPlacement&&oe.vertical){var io=$e.layout.get("text-rotate").evaluate(En,{},Qn),No=io+90,To=oe.vertical;Aa=new Cg(mt,F,Ct,_t,Kt,To,lr,tr,wr,No),Ie&&(Ma=new Cg(mt,F,Ct,_t,Kt,Ie,rn,qr,wr,No))}if(ye){var hs=$e.layout.get("icon-rotate").evaluate(En,{}),vs=$e.layout.get("icon-text-fit")!=="none",Bo=kb(ye,hs,Hn,vs),Es=Ie?kb(Ie,hs,Hn,vs):void 0;Ga=new Cg(mt,F,Ct,_t,Kt,ye,rn,qr,!1,hs),ja=Bo.length*4;var Ms=I.iconSizeData,_o=null;Ms.kind==="source"?(_o=[df*$e.layout.get("icon-size").evaluate(En,{})],_o[0]>Eh&&H(I.layerIds[0]+': Value for "icon-size" is >= '+Y0+'. Reduce your "icon-size".')):Ms.kind==="composite"&&(_o=[df*In.compositeIconSizes[0].evaluate(En,{},Qn),df*In.compositeIconSizes[1].evaluate(En,{},Qn)],(_o[0]>Eh||_o[1]>Eh)&&H(I.layerIds[0]+': Value for "icon-size" is >= '+Y0+'. Reduce your "icon-size".')),I.addSymbols(I.icon,Bo,_o,yn,Mn,En,!1,F,va.lineStartIndex,va.lineLength,-1,Qn),ui=I.icon.placedSymbolArray.length-1,Es&&(Ua=Es.length*4,I.addSymbols(I.icon,Es,_o,yn,Mn,En,Fl.vertical,F,va.lineStartIndex,va.lineLength,-1,Qn),fi=I.icon.placedSymbolArray.length-1)}for(var Cs in oe.horizontal){var kl=oe.horizontal[Cs];if(!xa){Di=je(kl.text);var Fc=$e.layout.get("text-rotate").evaluate(En,{},Qn);xa=new Cg(mt,F,Ct,_t,Kt,kl,lr,tr,wr,Fc)}var Ch=kl.positionedLines.length===1;if(li+=Nb(I,F,kl,Me,$e,wr,En,Ur,va,oe.vertical?Fl.horizontal:Fl.horizontalOnly,Ch?Object.keys(oe.horizontal):[Cs],ai,ui,In,Qn),Ch)break}oe.vertical&&(Ei+=Nb(I,F,oe.vertical,Me,$e,wr,En,Ur,va,Fl.vertical,["vertical"],ai,fi,In,Qn));var Lh=xa?xa.boxStartIndex:I.collisionBoxArray.length,Ph=xa?xa.boxEndIndex:I.collisionBoxArray.length,Fd=Aa?Aa.boxStartIndex:I.collisionBoxArray.length,Du=Aa?Aa.boxEndIndex:I.collisionBoxArray.length,Dg=Ga?Ga.boxStartIndex:I.collisionBoxArray.length,vm=Ga?Ga.boxEndIndex:I.collisionBoxArray.length,Ig=Ma?Ma.boxStartIndex:I.collisionBoxArray.length,dm=Ma?Ma.boxEndIndex:I.collisionBoxArray.length,nu=-1,kd=function(j0,tw){return j0&&j0.circleDiameter?Math.max(j0.circleDiameter,tw):tw};nu=kd(xa,nu),nu=kd(Aa,nu),nu=kd(Ga,nu),nu=kd(Ma,nu);var Fg=nu>-1?1:0;Fg&&(nu*=$n/Zo),I.glyphOffsetArray.length>=Si.MAX_GLYPHS&&H("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),En.sortKey!==void 0&&I.addToSortKeyRanges(I.symbolInstances.length,En.sortKey),I.symbolInstances.emplaceBack(F.x,F.y,ai.right>=0?ai.right:-1,ai.center>=0?ai.center:-1,ai.left>=0?ai.left:-1,ai.vertical||-1,ui,fi,Di,Lh,Ph,Fd,Du,Dg,vm,Ig,dm,Ct,li,Ei,ja,Ua,Fg,0,lr,Oi,to,nu)}function n8(I,F,X,oe){var ye=I.compareText;if(!(F in ye))ye[F]=[];else for(var Me=ye[F],Ie=Me.length-1;Ie>=0;Ie--)if(oe.dist(Me[Ie])<X)return!0;return ye[F].push(oe),!1}var a8=wd.VectorTileFeature.types,i8=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Lg(I,F,X,oe,ye,Me,Ie,$e,mt,Ct,_t,Kt,lr){var tr=$e?Math.min(Eh,Math.round($e[0])):0,wr=$e?Math.min(Eh,Math.round($e[1])):0;I.emplaceBack(F,X,Math.round(oe*32),Math.round(ye*32),Me,Ie,(tr<<1)+(mt?1:0),wr,Ct*16,_t*16,Kt*256,lr*256)}function lm(I,F,X){I.emplaceBack(F.x,F.y,X),I.emplaceBack(F.x,F.y,X),I.emplaceBack(F.x,F.y,X),I.emplaceBack(F.x,F.y,X)}function o8(I){for(var F=0,X=I.sections;F<X.length;F+=1){var oe=X[F];if(tn(oe.text))return!0}return!1}var _d=function(F){this.layoutVertexArray=new Yf,this.indexArray=new ff,this.programConfigurations=F,this.segments=new J,this.dynamicLayoutVertexArray=new C0,this.opacityVertexArray=new L0,this.placedSymbolArray=new wh};_d.prototype.isEmpty=function(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0},_d.prototype.upload=function(F,X,oe,ye){this.isEmpty()||(oe&&(this.layoutVertexBuffer=F.createVertexBuffer(this.layoutVertexArray,em.members),this.indexBuffer=F.createIndexBuffer(this.indexArray,X),this.dynamicLayoutVertexBuffer=F.createVertexBuffer(this.dynamicLayoutVertexArray,sM.members,!0),this.opacityVertexBuffer=F.createVertexBuffer(this.opacityVertexArray,i8,!0),this.opacityVertexBuffer.itemSize=1),(oe||ye)&&this.programConfigurations.upload(F))},_d.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},he("SymbolBuffers",_d);var X0=function(F,X,oe){this.layoutVertexArray=new F,this.layoutAttributes=X,this.indexArray=new oe,this.segments=new J,this.collisionVertexArray=new Ys};X0.prototype.upload=function(F){this.layoutVertexBuffer=F.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=F.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=F.createVertexBuffer(this.collisionVertexArray,lM.members,!0)},X0.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},he("CollisionBuffers",X0);var Si=function(F){this.collisionBoxArray=F.collisionBoxArray,this.zoom=F.zoom,this.overscaling=F.overscaling,this.layers=F.layers,this.layerIds=this.layers.map(function(mt){return mt.id}),this.index=F.index,this.pixelRatio=F.pixelRatio,this.sourceLayerIndex=F.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=gd([]),this.placementViewportMatrix=gd([]);var X=this.layers[0],oe=X._unevaluatedLayout._values;this.textSizeData=im(this.zoom,oe["text-size"]),this.iconSizeData=im(this.zoom,oe["icon-size"]);var ye=this.layers[0].layout,Me=ye.get("symbol-sort-key"),Ie=ye.get("symbol-z-order");this.sortFeaturesByKey=Ie!=="viewport-y"&&Me.constantOr(1)!==void 0;var $e=Ie==="viewport-y"||Ie==="auto"&&!this.sortFeaturesByKey;this.sortFeaturesByY=$e&&(ye.get("text-allow-overlap")||ye.get("icon-allow-overlap")||ye.get("text-ignore-placement")||ye.get("icon-ignore-placement")),ye.get("symbol-placement")==="point"&&(this.writingModes=ye.get("text-writing-mode").map(function(mt){return Fl[mt]})),this.stateDependentLayerIds=this.layers.filter(function(mt){return mt.isStateDependent()}).map(function(mt){return mt.id}),this.sourceID=F.sourceID};Si.prototype.createArrays=function(){this.text=new _d(new Ya(em.members,this.layers,this.zoom,function(F){return/^text/.test(F)})),this.icon=new _d(new Ya(em.members,this.layers,this.zoom,function(F){return/^icon/.test(F)})),this.glyphOffsetArray=new tu,this.lineVertexArray=new fg,this.symbolInstances=new ug},Si.prototype.calculateGlyphDependencies=function(F,X,oe,ye,Me){for(var Ie=0;Ie<F.length;Ie++)if(X[F.charCodeAt(Ie)]=!0,(oe||ye)&&Me){var $e=H0[F.charAt(Ie)];$e&&(X[$e.charCodeAt(0)]=!0)}},Si.prototype.populate=function(F,X,oe){var ye=this.layers[0],Me=ye.layout,Ie=Me.get("text-font"),$e=Me.get("text-field"),mt=Me.get("icon-image"),Ct=($e.value.kind!=="constant"||$e.value.value instanceof fo&&!$e.value.value.isEmpty()||$e.value.value.toString().length>0)&&(Ie.value.kind!=="constant"||Ie.value.value.length>0),_t=mt.value.kind!=="constant"||!!mt.value.value||Object.keys(mt.parameters).length>0,Kt=Me.get("symbol-sort-key");if(this.features=[],!(!Ct&&!_t)){for(var lr=X.iconDependencies,tr=X.glyphDependencies,wr=X.availableImages,Ur=new Bn(this.zoom),rn=0,qr=F;rn<qr.length;rn+=1){var Mn=qr[rn],yn=Mn.feature,En=Mn.id,In=Mn.index,Hn=Mn.sourceLayerIndex,Qn=ye._featureFilter.needGeometry,$n={type:yn.type,id:En,properties:yn.properties,geometry:Qn?xi(yn):[]};if(ye._featureFilter.filter(Ur,$n,oe)){Qn||($n.geometry=xi(yn));var La=void 0;if(Ct){var va=ye.getValueAndResolveTokens("text-field",$n,oe,wr),xa=fo.factory(va);o8(xa)&&(this.hasRTLText=!0),(!this.hasRTLText||Wa()==="unavailable"||this.hasRTLText&&si.isParsed())&&(La=cM(xa,ye,$n))}var Ga=void 0;if(_t){var Aa=ye.getValueAndResolveTokens("icon-image",$n,oe,wr);Aa instanceof Vo?Ga=Aa:Ga=Vo.fromString(Aa)}if(!(!La&&!Ga)){var Ma=this.sortFeaturesByKey?Kt.evaluate($n,{},oe):void 0,ja={id:En,text:La,icon:Ga,index:In,sourceLayerIndex:Hn,geometry:xi(yn),properties:yn.properties,type:a8[yn.type],sortKey:Ma};if(this.features.push(ja),Ga&&(lr[Ga.name]=!0),La){var Ua=Ie.evaluate($n,{},oe).join(","),li=Me.get("text-rotation-alignment")==="map"&&Me.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(Fl.vertical)>=0;for(var Ei=0,ui=La.sections;Ei<ui.length;Ei+=1){var fi=ui[Ei];if(fi.image)lr[fi.image.name]=!0;else{var ai=Xt(La.toString()),Di=fi.fontStack||Ua,Oi=tr[Di]=tr[Di]||{};this.calculateGlyphDependencies(fi.text,Oi,li,this.allowVerticalPlacement,ai)}}}}}}Me.get("symbol-placement")==="line"&&(this.features=hM(this.features)),this.sortFeaturesByKey&&this.features.sort(function(to,io){return to.sortKey-io.sortKey})}},Si.prototype.update=function(F,X,oe){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(F,X,this.layers,oe),this.icon.programConfigurations.updatePaintArrays(F,X,this.layers,oe))},Si.prototype.isEmpty=function(){return this.symbolInstances.length===0&&!this.hasRTLText},Si.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},Si.prototype.upload=function(F){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(F),this.iconCollisionBox.upload(F)),this.text.upload(F,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(F,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},Si.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},Si.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},Si.prototype.addToLineVertexArray=function(F,X){var oe=this.lineVertexArray.length;if(F.segment!==void 0){for(var ye=F.dist(X[F.segment+1]),Me=F.dist(X[F.segment]),Ie={},$e=F.segment+1;$e<X.length;$e++)Ie[$e]={x:X[$e].x,y:X[$e].y,tileUnitDistanceFromAnchor:ye},$e<X.length-1&&(ye+=X[$e+1].dist(X[$e]));for(var mt=F.segment||0;mt>=0;mt--)Ie[mt]={x:X[mt].x,y:X[mt].y,tileUnitDistanceFromAnchor:Me},mt>0&&(Me+=X[mt-1].dist(X[mt]));for(var Ct=0;Ct<X.length;Ct++){var _t=Ie[Ct];this.lineVertexArray.emplaceBack(_t.x,_t.y,_t.tileUnitDistanceFromAnchor)}}return{lineStartIndex:oe,lineLength:this.lineVertexArray.length-oe}},Si.prototype.addSymbols=function(F,X,oe,ye,Me,Ie,$e,mt,Ct,_t,Kt,lr){for(var tr=F.indexArray,wr=F.layoutVertexArray,Ur=F.segments.prepareSegment(4*X.length,wr,tr,Ie.sortKey),rn=this.glyphOffsetArray.length,qr=Ur.vertexLength,Mn=this.allowVerticalPlacement&&$e===Fl.vertical?Math.PI/2:0,yn=Ie.text&&Ie.text.sections,En=0;En<X.length;En++){var In=X[En],Hn=In.tl,Qn=In.tr,$n=In.bl,La=In.br,va=In.tex,xa=In.pixelOffsetTL,Ga=In.pixelOffsetBR,Aa=In.minFontScaleX,Ma=In.minFontScaleY,ja=In.glyphOffset,Ua=In.isSDF,li=In.sectionIndex,Ei=Ur.vertexLength,ui=ja[1];Lg(wr,mt.x,mt.y,Hn.x,ui+Hn.y,va.x,va.y,oe,Ua,xa.x,xa.y,Aa,Ma),Lg(wr,mt.x,mt.y,Qn.x,ui+Qn.y,va.x+va.w,va.y,oe,Ua,Ga.x,xa.y,Aa,Ma),Lg(wr,mt.x,mt.y,$n.x,ui+$n.y,va.x,va.y+va.h,oe,Ua,xa.x,Ga.y,Aa,Ma),Lg(wr,mt.x,mt.y,La.x,ui+La.y,va.x+va.w,va.y+va.h,oe,Ua,Ga.x,Ga.y,Aa,Ma),lm(F.dynamicLayoutVertexArray,mt,Mn),tr.emplaceBack(Ei,Ei+1,Ei+2),tr.emplaceBack(Ei+1,Ei+2,Ei+3),Ur.vertexLength+=4,Ur.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(ja[0]),(En===X.length-1||li!==X[En+1].sectionIndex)&&F.programConfigurations.populatePaintArrays(wr.length,Ie,Ie.index,{},lr,yn&&yn[li])}F.placedSymbolArray.emplaceBack(mt.x,mt.y,rn,this.glyphOffsetArray.length-rn,qr,Ct,_t,mt.segment,oe?oe[0]:0,oe?oe[1]:0,ye[0],ye[1],$e,0,!1,0,Kt)},Si.prototype._addCollisionDebugVertex=function(F,X,oe,ye,Me,Ie){return X.emplaceBack(0,0),F.emplaceBack(oe.x,oe.y,ye,Me,Math.round(Ie.x),Math.round(Ie.y))},Si.prototype.addCollisionDebugVertices=function(F,X,oe,ye,Me,Ie,$e){var mt=Me.segments.prepareSegment(4,Me.layoutVertexArray,Me.indexArray),Ct=mt.vertexLength,_t=Me.layoutVertexArray,Kt=Me.collisionVertexArray,lr=$e.anchorX,tr=$e.anchorY;this._addCollisionDebugVertex(_t,Kt,Ie,lr,tr,new r(F,X)),this._addCollisionDebugVertex(_t,Kt,Ie,lr,tr,new r(oe,X)),this._addCollisionDebugVertex(_t,Kt,Ie,lr,tr,new r(oe,ye)),this._addCollisionDebugVertex(_t,Kt,Ie,lr,tr,new r(F,ye)),mt.vertexLength+=4;var wr=Me.indexArray;wr.emplaceBack(Ct,Ct+1),wr.emplaceBack(Ct+1,Ct+2),wr.emplaceBack(Ct+2,Ct+3),wr.emplaceBack(Ct+3,Ct),mt.primitiveLength+=4},Si.prototype.addDebugCollisionBoxes=function(F,X,oe,ye){for(var Me=F;Me<X;Me++){var Ie=this.collisionBoxArray.get(Me),$e=Ie.x1,mt=Ie.y1,Ct=Ie.x2,_t=Ie.y2;this.addCollisionDebugVertices($e,mt,Ct,_t,ye?this.textCollisionBox:this.iconCollisionBox,Ie.anchorPoint,oe)}},Si.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new X0(cd,vb.members,Lv),this.iconCollisionBox=new X0(cd,vb.members,Lv);for(var F=0;F<this.symbolInstances.length;F++){var X=this.symbolInstances.get(F);this.addDebugCollisionBoxes(X.textBoxStartIndex,X.textBoxEndIndex,X,!0),this.addDebugCollisionBoxes(X.verticalTextBoxStartIndex,X.verticalTextBoxEndIndex,X,!0),this.addDebugCollisionBoxes(X.iconBoxStartIndex,X.iconBoxEndIndex,X,!1),this.addDebugCollisionBoxes(X.verticalIconBoxStartIndex,X.verticalIconBoxEndIndex,X,!1)}},Si.prototype._deserializeCollisionBoxesForSymbol=function(F,X,oe,ye,Me,Ie,$e,mt,Ct){for(var _t={},Kt=X;Kt<oe;Kt++){var lr=F.get(Kt);_t.textBox={x1:lr.x1,y1:lr.y1,x2:lr.x2,y2:lr.y2,anchorPointX:lr.anchorPointX,anchorPointY:lr.anchorPointY},_t.textFeatureIndex=lr.featureIndex;break}for(var tr=ye;tr<Me;tr++){var wr=F.get(tr);_t.verticalTextBox={x1:wr.x1,y1:wr.y1,x2:wr.x2,y2:wr.y2,anchorPointX:wr.anchorPointX,anchorPointY:wr.anchorPointY},_t.verticalTextFeatureIndex=wr.featureIndex;break}for(var Ur=Ie;Ur<$e;Ur++){var rn=F.get(Ur);_t.iconBox={x1:rn.x1,y1:rn.y1,x2:rn.x2,y2:rn.y2,anchorPointX:rn.anchorPointX,anchorPointY:rn.anchorPointY},_t.iconFeatureIndex=rn.featureIndex;break}for(var qr=mt;qr<Ct;qr++){var Mn=F.get(qr);_t.verticalIconBox={x1:Mn.x1,y1:Mn.y1,x2:Mn.x2,y2:Mn.y2,anchorPointX:Mn.anchorPointX,anchorPointY:Mn.anchorPointY},_t.verticalIconFeatureIndex=Mn.featureIndex;break}return _t},Si.prototype.deserializeCollisionBoxes=function(F){this.collisionArrays=[];for(var X=0;X<this.symbolInstances.length;X++){var oe=this.symbolInstances.get(X);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(F,oe.textBoxStartIndex,oe.textBoxEndIndex,oe.verticalTextBoxStartIndex,oe.verticalTextBoxEndIndex,oe.iconBoxStartIndex,oe.iconBoxEndIndex,oe.verticalIconBoxStartIndex,oe.verticalIconBoxEndIndex))}},Si.prototype.hasTextData=function(){return this.text.segments.get().length>0},Si.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Si.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Si.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Si.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Si.prototype.addIndicesForPlacedSymbol=function(F,X){for(var oe=F.placedSymbolArray.get(X),ye=oe.vertexStartIndex+oe.numGlyphs*4,Me=oe.vertexStartIndex;Me<ye;Me+=4)F.indexArray.emplaceBack(Me,Me+1,Me+2),F.indexArray.emplaceBack(Me+1,Me+2,Me+3)},Si.prototype.getSortedSymbolIndexes=function(F){if(this.sortedAngle===F&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var X=Math.sin(F),oe=Math.cos(F),ye=[],Me=[],Ie=[],$e=0;$e<this.symbolInstances.length;++$e){Ie.push($e);var mt=this.symbolInstances.get($e);ye.push(Math.round(X*mt.anchorX+oe*mt.anchorY)|0),Me.push(mt.featureIndex)}return Ie.sort(function(Ct,_t){return ye[Ct]-ye[_t]||Me[_t]-Me[Ct]}),Ie},Si.prototype.addToSortKeyRanges=function(F,X){var oe=this.sortKeyRanges[this.sortKeyRanges.length-1];oe&&oe.sortKey===X?oe.symbolInstanceEnd=F+1:this.sortKeyRanges.push({sortKey:X,symbolInstanceStart:F,symbolInstanceEnd:F+1})},Si.prototype.sortFeatures=function(F){var X=this;if(this.sortFeaturesByY&&this.sortedAngle!==F&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(F),this.sortedAngle=F,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var oe=0,ye=this.symbolInstanceIndexes;oe<ye.length;oe+=1){var Me=ye[oe],Ie=this.symbolInstances.get(Me);this.featureSortOrder.push(Ie.featureIndex),[Ie.rightJustifiedTextSymbolIndex,Ie.centerJustifiedTextSymbolIndex,Ie.leftJustifiedTextSymbolIndex].forEach(function($e,mt,Ct){$e>=0&&Ct.indexOf($e)===mt&&X.addIndicesForPlacedSymbol(X.text,$e)}),Ie.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Ie.verticalPlacedTextSymbolIndex),Ie.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ie.placedIconSymbolIndex),Ie.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ie.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},he("SymbolBucket",Si,{omit:["layers","collisionBoxArray","features","compareText"]}),Si.MAX_GLYPHS=65535,Si.addDynamicAttributes=lm;function s8(I,F){return F.replace(/{([^{}]+)}/g,function(X,oe){return oe in I?String(I[oe]):""})}var l8=new ho({"symbol-placement":new ma($t.layout_symbol["symbol-placement"]),"symbol-spacing":new ma($t.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new ma($t.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ca($t.layout_symbol["symbol-sort-key"]),"symbol-z-order":new ma($t.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new ma($t.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new ma($t.layout_symbol["icon-ignore-placement"]),"icon-optional":new ma($t.layout_symbol["icon-optional"]),"icon-rotation-alignment":new ma($t.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ca($t.layout_symbol["icon-size"]),"icon-text-fit":new ma($t.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new ma($t.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ca($t.layout_symbol["icon-image"]),"icon-rotate":new Ca($t.layout_symbol["icon-rotate"]),"icon-padding":new ma($t.layout_symbol["icon-padding"]),"icon-keep-upright":new ma($t.layout_symbol["icon-keep-upright"]),"icon-offset":new Ca($t.layout_symbol["icon-offset"]),"icon-anchor":new Ca($t.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new ma($t.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new ma($t.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new ma($t.layout_symbol["text-rotation-alignment"]),"text-field":new Ca($t.layout_symbol["text-field"]),"text-font":new Ca($t.layout_symbol["text-font"]),"text-size":new Ca($t.layout_symbol["text-size"]),"text-max-width":new Ca($t.layout_symbol["text-max-width"]),"text-line-height":new ma($t.layout_symbol["text-line-height"]),"text-letter-spacing":new Ca($t.layout_symbol["text-letter-spacing"]),"text-justify":new Ca($t.layout_symbol["text-justify"]),"text-radial-offset":new Ca($t.layout_symbol["text-radial-offset"]),"text-variable-anchor":new ma($t.layout_symbol["text-variable-anchor"]),"text-anchor":new Ca($t.layout_symbol["text-anchor"]),"text-max-angle":new ma($t.layout_symbol["text-max-angle"]),"text-writing-mode":new ma($t.layout_symbol["text-writing-mode"]),"text-rotate":new Ca($t.layout_symbol["text-rotate"]),"text-padding":new ma($t.layout_symbol["text-padding"]),"text-keep-upright":new ma($t.layout_symbol["text-keep-upright"]),"text-transform":new Ca($t.layout_symbol["text-transform"]),"text-offset":new Ca($t.layout_symbol["text-offset"]),"text-allow-overlap":new ma($t.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new ma($t.layout_symbol["text-ignore-placement"]),"text-optional":new ma($t.layout_symbol["text-optional"])}),u8=new ho({"icon-opacity":new Ca($t.paint_symbol["icon-opacity"]),"icon-color":new Ca($t.paint_symbol["icon-color"]),"icon-halo-color":new Ca($t.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ca($t.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ca($t.paint_symbol["icon-halo-blur"]),"icon-translate":new ma($t.paint_symbol["icon-translate"]),"icon-translate-anchor":new ma($t.paint_symbol["icon-translate-anchor"]),"text-opacity":new Ca($t.paint_symbol["text-opacity"]),"text-color":new Ca($t.paint_symbol["text-color"],{runtimeType:kn,getOverride:function(I){return I.textColor},hasOverride:function(I){return!!I.textColor}}),"text-halo-color":new Ca($t.paint_symbol["text-halo-color"]),"text-halo-width":new Ca($t.paint_symbol["text-halo-width"]),"text-halo-blur":new Ca($t.paint_symbol["text-halo-blur"]),"text-translate":new ma($t.paint_symbol["text-translate"]),"text-translate-anchor":new ma($t.paint_symbol["text-translate-anchor"])}),um={paint:u8,layout:l8},Rd=function(F){this.type=F.property.overrides?F.property.overrides.runtimeType:Rr,this.defaultValue=F};Rd.prototype.evaluate=function(F){if(F.formattedSection){var X=this.defaultValue.property.overrides;if(X&&X.hasOverride(F.formattedSection))return X.getOverride(F.formattedSection)}return F.feature&&F.featureState?this.defaultValue.evaluate(F.feature,F.featureState):this.defaultValue.property.specification.default},Rd.prototype.eachChild=function(F){if(!this.defaultValue.isConstant()){var X=this.defaultValue.value;F(X._styleExpression.expression)}},Rd.prototype.outputDefined=function(){return!1},Rd.prototype.serialize=function(){return null},he("FormatSectionOverride",Rd,{omit:["defaultValue"]});var f8=function(I){function F(X){I.call(this,X,um)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.recalculate=function(oe,ye){if(I.prototype.recalculate.call(this,oe,ye),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 Me=this.layout.get("text-writing-mode");if(Me){for(var Ie=[],$e=0,mt=Me;$e<mt.length;$e+=1){var Ct=mt[$e];Ie.indexOf(Ct)<0&&Ie.push(Ct)}this.layout._values["text-writing-mode"]=Ie}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},F.prototype.getValueAndResolveTokens=function(oe,ye,Me,Ie){var $e=this.layout.get(oe).evaluate(ye,{},Me,Ie),mt=this._unevaluatedLayout._values[oe];return!mt.isDataDriven()&&!Pl(mt.value)&&$e?s8(ye.properties,$e):$e},F.prototype.createBucket=function(oe){return new Si(oe)},F.prototype.queryRadius=function(){return 0},F.prototype.queryIntersectsFeature=function(){return!1},F.prototype._setPaintOverrides=function(){for(var oe=0,ye=um.paint.overridableProperties;oe<ye.length;oe+=1){var Me=ye[oe];if(F.hasPaintOverride(this.layout,Me)){var Ie=this.paint.get(Me),$e=new Rd(Ie),mt=new fl($e,Ie.property.specification),Ct=null;Ie.value.kind==="constant"||Ie.value.kind==="source"?Ct=new Ql("source",mt):Ct=new Yo("composite",mt,Ie.value.zoomStops,Ie.value._interpolationType),this.paint._values[Me]=new Mi(Ie.property,Ct,Ie.parameters)}}},F.prototype._handleOverridablePaintPropertyUpdate=function(oe,ye,Me){return!this.layout||ye.isDataDriven()||Me.isDataDriven()?!1:F.hasPaintOverride(this.layout,oe)},F.hasPaintOverride=function(oe,ye){var Me=oe.get("text-field"),Ie=um.paint.properties[ye],$e=!1,mt=function(Kt){for(var lr=0,tr=Kt;lr<tr.length;lr+=1){var wr=tr[lr];if(Ie.overrides&&Ie.overrides.hasOverride(wr)){$e=!0;return}}};if(Me.value.kind==="constant"&&Me.value.value instanceof fo)mt(Me.value.value.sections);else if(Me.value.kind==="source"){var Ct=function(Kt){if(!$e)if(Kt instanceof Qo&&Ni(Kt.value)===ua){var lr=Kt.value;mt(lr.sections)}else Kt instanceof os?mt(Kt.sections):Kt.eachChild(Ct)},_t=Me.value;_t._styleExpression&&Ct(_t._styleExpression.expression)}return $e},F}(Fi),c8=new ho({"background-color":new ma($t.paint_background["background-color"]),"background-pattern":new Qi($t.paint_background["background-pattern"]),"background-opacity":new ma($t.paint_background["background-opacity"])}),h8={paint:c8},v8=function(I){function F(X){I.call(this,X,h8)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F}(Fi),d8=new ho({"raster-opacity":new ma($t.paint_raster["raster-opacity"]),"raster-hue-rotate":new ma($t.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new ma($t.paint_raster["raster-brightness-min"]),"raster-brightness-max":new ma($t.paint_raster["raster-brightness-max"]),"raster-saturation":new ma($t.paint_raster["raster-saturation"]),"raster-contrast":new ma($t.paint_raster["raster-contrast"]),"raster-resampling":new ma($t.paint_raster["raster-resampling"]),"raster-fade-duration":new ma($t.paint_raster["raster-fade-duration"])}),p8={paint:d8},g8=function(I){function F(X){I.call(this,X,p8)}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F}(Fi);function y8(I){var F=[],X=I.id;return X===void 0&&F.push({message:"layers."+X+': missing required property "id"'}),I.render===void 0&&F.push({message:"layers."+X+': missing required method "render"'}),I.renderingMode&&I.renderingMode!=="2d"&&I.renderingMode!=="3d"&&F.push({message:"layers."+X+': property "renderingMode" must be either "2d" or "3d"'}),F}var m8=function(I){function F(X){I.call(this,X,{}),this.implementation=X}return I&&(F.__proto__=I),F.prototype=Object.create(I&&I.prototype),F.prototype.constructor=F,F.prototype.is3D=function(){return this.implementation.renderingMode==="3d"},F.prototype.hasOffscreenPass=function(){return this.implementation.prerender!==void 0},F.prototype.recalculate=function(){},F.prototype.updateTransitions=function(){},F.prototype.hasTransition=function(){},F.prototype.serialize=function(){},F.prototype.onAdd=function(oe){this.implementation.onAdd&&this.implementation.onAdd(oe,oe.painter.context.gl)},F.prototype.onRemove=function(oe){this.implementation.onRemove&&this.implementation.onRemove(oe,oe.painter.context.gl)},F}(Fi),x8={circle:jE,heatmap:QE,hillshade:t6,fill:M6,"fill-extrusion":X6,line:iM,symbol:f8,background:v8,raster:g8};function b8(I){return I.type==="custom"?new m8(I):new x8[I.type](I)}var Ub=self.HTMLImageElement,Hb=self.HTMLCanvasElement,Vb=self.HTMLVideoElement,Gb=self.ImageData,Pg=self.ImageBitmap,Iv=function(F,X,oe,ye){this.context=F,this.format=oe,this.texture=F.gl.createTexture(),this.update(X,ye)};Iv.prototype.update=function(F,X,oe){var ye=F.width,Me=F.height,Ie=(!this.size||this.size[0]!==ye||this.size[1]!==Me)&&!oe,$e=this,mt=$e.context,Ct=mt.gl;if(this.useMipmap=Boolean(X&&X.useMipmap),Ct.bindTexture(Ct.TEXTURE_2D,this.texture),mt.pixelStoreUnpackFlipY.set(!1),mt.pixelStoreUnpack.set(1),mt.pixelStoreUnpackPremultiplyAlpha.set(this.format===Ct.RGBA&&(!X||X.premultiply!==!1)),Ie)this.size=[ye,Me],F instanceof Ub||F instanceof Hb||F instanceof Vb||F instanceof Gb||Pg&&F instanceof Pg?Ct.texImage2D(Ct.TEXTURE_2D,0,this.format,this.format,Ct.UNSIGNED_BYTE,F):Ct.texImage2D(Ct.TEXTURE_2D,0,this.format,ye,Me,0,this.format,Ct.UNSIGNED_BYTE,F.data);else{var _t=oe||{x:0,y:0},Kt=_t.x,lr=_t.y;F instanceof Ub||F instanceof Hb||F instanceof Vb||F instanceof Gb||Pg&&F instanceof Pg?Ct.texSubImage2D(Ct.TEXTURE_2D,0,Kt,lr,Ct.RGBA,Ct.UNSIGNED_BYTE,F):Ct.texSubImage2D(Ct.TEXTURE_2D,0,Kt,lr,ye,Me,Ct.RGBA,Ct.UNSIGNED_BYTE,F.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Ct.generateMipmap(Ct.TEXTURE_2D)},Iv.prototype.bind=function(F,X,oe){var ye=this,Me=ye.context,Ie=Me.gl;Ie.bindTexture(Ie.TEXTURE_2D,this.texture),oe===Ie.LINEAR_MIPMAP_NEAREST&&!this.isSizePowerOfTwo()&&(oe=Ie.LINEAR),F!==this.filter&&(Ie.texParameteri(Ie.TEXTURE_2D,Ie.TEXTURE_MAG_FILTER,F),Ie.texParameteri(Ie.TEXTURE_2D,Ie.TEXTURE_MIN_FILTER,oe||F),this.filter=F),X!==this.wrap&&(Ie.texParameteri(Ie.TEXTURE_2D,Ie.TEXTURE_WRAP_S,X),Ie.texParameteri(Ie.TEXTURE_2D,Ie.TEXTURE_WRAP_T,X),this.wrap=X)},Iv.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1===0},Iv.prototype.destroy=function(){var F=this.context,X=F.gl;X.deleteTexture(this.texture),this.texture=null};var fm=function(F){var X=this;this._callback=F,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){X._triggered=!1,X._callback()})};fm.prototype.trigger=function(){var F=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){F._triggered=!1,F._callback()},0))},fm.prototype.remove=function(){delete this._channel,this._callback=function(){}};var Dd=function(F,X,oe){this.target=F,this.parent=X,this.mapId=oe,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},C(["receive","process"],this),this.invoker=new fm(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=U()?F:self};Dd.prototype.send=function(F,X,oe,ye,Me){var Ie=this;Me===void 0&&(Me=!1);var $e=Math.round(Math.random()*1e18).toString(36).substring(0,10);oe&&(this.callbacks[$e]=oe);var mt=re(this.globalScope)?void 0:[];return this.target.postMessage({id:$e,type:F,hasCallback:!!oe,targetMapId:ye,mustQueue:Me,sourceMapId:this.mapId,data:at(X,mt)},mt),{cancel:function(){oe&&delete Ie.callbacks[$e],Ie.target.postMessage({id:$e,type:"<cancel>",targetMapId:ye,sourceMapId:Ie.mapId})}}},Dd.prototype.receive=function(F){var X=F.data,oe=X.id;if(oe&&!(X.targetMapId&&this.mapId!==X.targetMapId))if(X.type==="<cancel>"){delete this.tasks[oe];var ye=this.cancelCallbacks[oe];delete this.cancelCallbacks[oe],ye&&ye()}else U()||X.mustQueue?(this.tasks[oe]=X,this.taskQueue.push(oe),this.invoker.trigger()):this.processTask(oe,X)},Dd.prototype.process=function(){if(this.taskQueue.length){var F=this.taskQueue.shift(),X=this.tasks[F];delete this.tasks[F],this.taskQueue.length&&this.invoker.trigger(),X&&this.processTask(F,X)}},Dd.prototype.processTask=function(F,X){var oe=this;if(X.type==="<response>"){var ye=this.callbacks[F];delete this.callbacks[F],ye&&(X.error?ye(ft(X.error)):ye(null,ft(X.data)))}else{var Me=!1,Ie=re(this.globalScope)?void 0:[],$e=X.hasCallback?function(lr,tr){Me=!0,delete oe.cancelCallbacks[F],oe.target.postMessage({id:F,type:"<response>",sourceMapId:oe.mapId,error:lr?at(lr):null,data:at(tr,Ie)},Ie)}:function(lr){Me=!0},mt=null,Ct=ft(X.data);if(this.parent[X.type])mt=this.parent[X.type](X.sourceMapId,Ct,$e);else if(this.parent.getWorkerSource){var _t=X.type.split("."),Kt=this.parent.getWorkerSource(X.sourceMapId,_t[0],Ct.source);mt=Kt[_t[1]](Ct,$e)}else $e(new Error("Could not find function "+X.type));!Me&&mt&&mt.cancel&&(this.cancelCallbacks[F]=mt.cancel)}},Dd.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function w8(I,F,X){F=Math.pow(2,X)-F-1;var oe=Wb(I*256,F*256,X),ye=Wb((I+1)*256,(F+1)*256,X);return oe[0]+","+oe[1]+","+ye[0]+","+ye[1]}function Wb(I,F,X){var oe=2*Math.PI*6378137/256/Math.pow(2,X),ye=I*oe-2*Math.PI*6378137/2,Me=F*oe-2*Math.PI*6378137/2;return[ye,Me]}var bo=function(F,X){F&&(X?this.setSouthWest(F).setNorthEast(X):F.length===4?this.setSouthWest([F[0],F[1]]).setNorthEast([F[2],F[3]]):this.setSouthWest(F[0]).setNorthEast(F[1]))};bo.prototype.setNorthEast=function(F){return this._ne=F instanceof Hi?new Hi(F.lng,F.lat):Hi.convert(F),this},bo.prototype.setSouthWest=function(F){return this._sw=F instanceof Hi?new Hi(F.lng,F.lat):Hi.convert(F),this},bo.prototype.extend=function(F){var X=this._sw,oe=this._ne,ye,Me;if(F instanceof Hi)ye=F,Me=F;else if(F instanceof bo){if(ye=F._sw,Me=F._ne,!ye||!Me)return this}else{if(Array.isArray(F))if(F.length===4||F.every(Array.isArray)){var Ie=F;return this.extend(bo.convert(Ie))}else{var $e=F;return this.extend(Hi.convert($e))}return this}return!X&&!oe?(this._sw=new Hi(ye.lng,ye.lat),this._ne=new Hi(Me.lng,Me.lat)):(X.lng=Math.min(ye.lng,X.lng),X.lat=Math.min(ye.lat,X.lat),oe.lng=Math.max(Me.lng,oe.lng),oe.lat=Math.max(Me.lat,oe.lat)),this},bo.prototype.getCenter=function(){return new Hi((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},bo.prototype.getSouthWest=function(){return this._sw},bo.prototype.getNorthEast=function(){return this._ne},bo.prototype.getNorthWest=function(){return new Hi(this.getWest(),this.getNorth())},bo.prototype.getSouthEast=function(){return new Hi(this.getEast(),this.getSouth())},bo.prototype.getWest=function(){return this._sw.lng},bo.prototype.getSouth=function(){return this._sw.lat},bo.prototype.getEast=function(){return this._ne.lng},bo.prototype.getNorth=function(){return this._ne.lat},bo.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},bo.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},bo.prototype.isEmpty=function(){return!(this._sw&&this._ne)},bo.prototype.contains=function(F){var X=Hi.convert(F),oe=X.lng,ye=X.lat,Me=this._sw.lat<=ye&&ye<=this._ne.lat,Ie=this._sw.lng<=oe&&oe<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Ie=this._sw.lng>=oe&&oe>=this._ne.lng),Me&&Ie},bo.convert=function(F){return!F||F instanceof bo?F:new bo(F)};var Yb=63710088e-1,Hi=function(F,X){if(isNaN(F)||isNaN(X))throw new Error("Invalid LngLat object: ("+F+", "+X+")");if(this.lng=+F,this.lat=+X,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Hi.prototype.wrap=function(){return new Hi(b(this.lng,-180,180),this.lat)},Hi.prototype.toArray=function(){return[this.lng,this.lat]},Hi.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Hi.prototype.distanceTo=function(F){var X=Math.PI/180,oe=this.lat*X,ye=F.lat*X,Me=Math.sin(oe)*Math.sin(ye)+Math.cos(oe)*Math.cos(ye)*Math.cos((F.lng-this.lng)*X),Ie=Yb*Math.acos(Math.min(Me,1));return Ie},Hi.prototype.toBounds=function(F){F===void 0&&(F=0);var X=40075017,oe=360*F/X,ye=oe/Math.cos(Math.PI/180*this.lat);return new bo(new Hi(this.lng-ye,this.lat-oe),new Hi(this.lng+ye,this.lat+oe))},Hi.convert=function(F){if(F instanceof Hi)return F;if(Array.isArray(F)&&(F.length===2||F.length===3))return new Hi(Number(F[0]),Number(F[1]));if(!Array.isArray(F)&&typeof F=="object"&&F!==null)return new Hi(Number("lng"in F?F.lng:F.lon),Number(F.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var Xb=2*Math.PI*Yb;function Zb(I){return Xb*Math.cos(I*Math.PI/180)}function jb(I){return(180+I)/360}function Kb(I){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+I*Math.PI/360)))/360}function Jb(I,F){return I/Zb(F)}function T8(I){return I*360-180}function cm(I){var F=180-I*360;return 360/Math.PI*Math.atan(Math.exp(F*Math.PI/180))-90}function A8(I,F){return I*Zb(cm(F))}function S8(I){return 1/Math.cos(I*Math.PI/180)}var Fv=function(F,X,oe){oe===void 0&&(oe=0),this.x=+F,this.y=+X,this.z=+oe};Fv.fromLngLat=function(F,X){X===void 0&&(X=0);var oe=Hi.convert(F);return new Fv(jb(oe.lng),Kb(oe.lat),Jb(X,oe.lat))},Fv.prototype.toLngLat=function(){return new Hi(T8(this.x),cm(this.y))},Fv.prototype.toAltitude=function(){return A8(this.z,this.y)},Fv.prototype.meterInMercatorCoordinateUnits=function(){return 1/Xb*S8(cm(this.y))};var kv=function(F,X,oe){this.z=F,this.x=X,this.y=oe,this.key=Z0(0,F,F,X,oe)};kv.prototype.equals=function(F){return this.z===F.z&&this.x===F.x&&this.y===F.y},kv.prototype.url=function(F,X){var oe=w8(this.x,this.y,this.z),ye=E8(this.z,this.x,this.y);return F[(this.x+this.y)%F.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(X==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",ye).replace("{bbox-epsg-3857}",oe)},kv.prototype.getTilePoint=function(F){var X=Math.pow(2,this.z);return new r((F.x*X-this.x)*Ra,(F.y*X-this.y)*Ra)},kv.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var $b=function(F,X){this.wrap=F,this.canonical=X,this.key=Z0(F,X.z,X.z,X.x,X.y)},wo=function(F,X,oe,ye,Me){this.overscaledZ=F,this.wrap=X,this.canonical=new kv(oe,+ye,+Me),this.key=Z0(X,F,oe,ye,Me)};wo.prototype.equals=function(F){return this.overscaledZ===F.overscaledZ&&this.wrap===F.wrap&&this.canonical.equals(F.canonical)},wo.prototype.scaledTo=function(F){var X=this.canonical.z-F;return F>this.canonical.z?new wo(F,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new wo(F,this.wrap,F,this.canonical.x>>X,this.canonical.y>>X)},wo.prototype.calculateScaledKey=function(F,X){var oe=this.canonical.z-F;return F>this.canonical.z?Z0(this.wrap*+X,F,this.canonical.z,this.canonical.x,this.canonical.y):Z0(this.wrap*+X,F,F,this.canonical.x>>oe,this.canonical.y>>oe)},wo.prototype.isChildOf=function(F){if(F.wrap!==this.wrap)return!1;var X=this.canonical.z-F.canonical.z;return F.overscaledZ===0||F.overscaledZ<this.overscaledZ&&F.canonical.x===this.canonical.x>>X&&F.canonical.y===this.canonical.y>>X},wo.prototype.children=function(F){if(this.overscaledZ>=F)return[new wo(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var X=this.canonical.z+1,oe=this.canonical.x*2,ye=this.canonical.y*2;return[new wo(X,this.wrap,X,oe,ye),new wo(X,this.wrap,X,oe+1,ye),new wo(X,this.wrap,X,oe,ye+1),new wo(X,this.wrap,X,oe+1,ye+1)]},wo.prototype.isLessThan=function(F){return this.wrap<F.wrap?!0:this.wrap>F.wrap?!1:this.overscaledZ<F.overscaledZ?!0:this.overscaledZ>F.overscaledZ?!1:this.canonical.x<F.canonical.x?!0:this.canonical.x>F.canonical.x?!1:this.canonical.y<F.canonical.y},wo.prototype.wrapped=function(){return new wo(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},wo.prototype.unwrapTo=function(F){return new wo(this.overscaledZ,F,this.canonical.z,this.canonical.x,this.canonical.y)},wo.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},wo.prototype.toUnwrapped=function(){return new $b(this.wrap,this.canonical)},wo.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},wo.prototype.getTilePoint=function(F){return this.canonical.getTilePoint(new Fv(F.x-this.wrap,F.y))};function Z0(I,F,X,oe,ye){I*=2,I<0&&(I=I*-1-1);var Me=1<<X;return(Me*Me*I+Me*ye+oe).toString(36)+X.toString(36)+F.toString(36)}function E8(I,F,X){for(var oe="",ye,Me=I;Me>0;Me--)ye=1<<Me-1,oe+=(F&ye?1:0)+(X&ye?2:0);return oe}he("CanonicalTileID",kv),he("OverscaledTileID",wo,{omit:["posMatrix"]});var Dc=function(F,X,oe){if(this.uid=F,X.height!==X.width)throw new RangeError("DEM tiles must be square");if(oe&&oe!=="mapbox"&&oe!=="terrarium")return H('"'+oe+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=X.height;var ye=this.dim=X.height-2;this.data=new Uint32Array(X.data.buffer),this.encoding=oe||"mapbox";for(var Me=0;Me<ye;Me++)this.data[this._idx(-1,Me)]=this.data[this._idx(0,Me)],this.data[this._idx(ye,Me)]=this.data[this._idx(ye-1,Me)],this.data[this._idx(Me,-1)]=this.data[this._idx(Me,0)],this.data[this._idx(Me,ye)]=this.data[this._idx(Me,ye-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(ye,-1)]=this.data[this._idx(ye-1,0)],this.data[this._idx(-1,ye)]=this.data[this._idx(0,ye-1)],this.data[this._idx(ye,ye)]=this.data[this._idx(ye-1,ye-1)]};Dc.prototype.get=function(F,X){var oe=new Uint8Array(this.data.buffer),ye=this._idx(F,X)*4,Me=this.encoding==="terrarium"?this._unpackTerrarium:this._unpackMapbox;return Me(oe[ye],oe[ye+1],oe[ye+2])},Dc.prototype.getUnpackVector=function(){return this.encoding==="terrarium"?[256,1,.00390625,32768]:[6553.6,25.6,.1,1e4]},Dc.prototype._idx=function(F,X){if(F<-1||F>=this.dim+1||X<-1||X>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(X+1)*this.stride+(F+1)},Dc.prototype._unpackMapbox=function(F,X,oe){return(F*256*256+X*256+oe)/10-1e4},Dc.prototype._unpackTerrarium=function(F,X,oe){return F*256+X+oe/256-32768},Dc.prototype.getPixels=function(){return new js({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Dc.prototype.backfillBorder=function(F,X,oe){if(this.dim!==F.dim)throw new Error("dem dimension mismatch");var ye=X*this.dim,Me=X*this.dim+this.dim,Ie=oe*this.dim,$e=oe*this.dim+this.dim;switch(X){case-1:ye=Me-1;break;case 1:Me=ye+1;break}switch(oe){case-1:Ie=$e-1;break;case 1:$e=Ie+1;break}for(var mt=-X*this.dim,Ct=-oe*this.dim,_t=Ie;_t<$e;_t++)for(var Kt=ye;Kt<Me;Kt++)this.data[this._idx(Kt,_t)]=F.data[this._idx(Kt+mt,_t+Ct)]},he("DEMData",Dc);function M8(I,F){var X={};if(!F)return X;for(var oe=function(){var Ie=Me[ye],$e=Ie.layerIds.map(function(Kt){return F.getLayer(Kt)}).filter(Boolean);if($e.length!==0){Ie.layers=$e,Ie.stateDependentLayerIds&&(Ie.stateDependentLayers=Ie.stateDependentLayerIds.map(function(Kt){return $e.filter(function(lr){return lr.id===Kt})[0]}));for(var mt=0,Ct=$e;mt<Ct.length;mt+=1){var _t=Ct[mt];X[_t.id]=Ie}}},ye=0,Me=I;ye<Me.length;ye+=1)oe();return X}var _g=function(F){this._stringToNumber={},this._numberToString=[];for(var X=0;X<F.length;X++){var oe=F[X];this._stringToNumber[oe]=X,this._numberToString[X]=oe}};_g.prototype.encode=function(F){return this._stringToNumber[F]},_g.prototype.decode=function(F){return this._numberToString[F]};var Rg=function(F,X,oe,ye,Me){this.type="Feature",this._vectorTileFeature=F,F._z=X,F._x=oe,F._y=ye,this.properties=F.properties,this.id=Me},hm={geometry:{configurable:!0}};hm.geometry.get=function(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},hm.geometry.set=function(I){this._geometry=I},Rg.prototype.toJSON=function(){var F={geometry:this.geometry};for(var X in this)X==="_geometry"||X==="_vectorTileFeature"||(F[X]=this[X]);return F},Object.defineProperties(Rg.prototype,hm);var Id=function(){this.state={},this.stateChanges={},this.deletedStates={}};Id.prototype.updateState=function(F,X,oe){var ye=String(X);if(this.stateChanges[F]=this.stateChanges[F]||{},this.stateChanges[F][ye]=this.stateChanges[F][ye]||{},l(this.stateChanges[F][ye],oe),this.deletedStates[F]===null){this.deletedStates[F]={};for(var Me in this.state[F])Me!==ye&&(this.deletedStates[F][Me]=null)}else{var Ie=this.deletedStates[F]&&this.deletedStates[F][ye]===null;if(Ie){this.deletedStates[F][ye]={};for(var $e in this.state[F][ye])oe[$e]||(this.deletedStates[F][ye][$e]=null)}else for(var mt in oe){var Ct=this.deletedStates[F]&&this.deletedStates[F][ye]&&this.deletedStates[F][ye][mt]===null;Ct&&delete this.deletedStates[F][ye][mt]}}},Id.prototype.removeFeatureState=function(F,X,oe){var ye=this.deletedStates[F]===null;if(!ye){var Me=String(X);if(this.deletedStates[F]=this.deletedStates[F]||{},oe&&X!==void 0)this.deletedStates[F][Me]!==null&&(this.deletedStates[F][Me]=this.deletedStates[F][Me]||{},this.deletedStates[F][Me][oe]=null);else if(X!==void 0){var Ie=this.stateChanges[F]&&this.stateChanges[F][Me];if(Ie){this.deletedStates[F][Me]={};for(oe in this.stateChanges[F][Me])this.deletedStates[F][Me][oe]=null}else this.deletedStates[F][Me]=null}else this.deletedStates[F]=null}},Id.prototype.getState=function(F,X){var oe=String(X),ye=this.state[F]||{},Me=this.stateChanges[F]||{},Ie=l({},ye[oe],Me[oe]);if(this.deletedStates[F]===null)return{};if(this.deletedStates[F]){var $e=this.deletedStates[F][X];if($e===null)return{};for(var mt in $e)delete Ie[mt]}return Ie},Id.prototype.initializeTileState=function(F,X){F.setFeatureState(this.state,X)},Id.prototype.coalesceChanges=function(F,X){var oe={};for(var ye in this.stateChanges){this.state[ye]=this.state[ye]||{};var Me={};for(var Ie in this.stateChanges[ye])this.state[ye][Ie]||(this.state[ye][Ie]={}),l(this.state[ye][Ie],this.stateChanges[ye][Ie]),Me[Ie]=this.state[ye][Ie];oe[ye]=Me}for(var $e in this.deletedStates){this.state[$e]=this.state[$e]||{};var mt={};if(this.deletedStates[$e]===null)for(var Ct in this.state[$e])mt[Ct]={},this.state[$e][Ct]={};else for(var _t in this.deletedStates[$e]){var Kt=this.deletedStates[$e][_t]===null;if(Kt)this.state[$e][_t]={};else for(var lr=0,tr=Object.keys(this.deletedStates[$e][_t]);lr<tr.length;lr+=1){var wr=tr[lr];delete this.state[$e][_t][wr]}mt[_t]=this.state[$e][_t]}oe[$e]=oe[$e]||{},l(oe[$e],mt)}if(this.stateChanges={},this.deletedStates={},Object.keys(oe).length!==0)for(var Ur in F){var rn=F[Ur];rn.setFeatureState(oe,X)}};var Ic=function(F,X){this.tileID=F,this.x=F.canonical.x,this.y=F.canonical.y,this.z=F.canonical.z,this.grid=new Ia(Ra,16,0),this.grid3D=new Ia(Ra,16,0),this.featureIndexArray=new D0,this.promoteId=X};Ic.prototype.insert=function(F,X,oe,ye,Me,Ie){var $e=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(oe,ye,Me);for(var mt=Ie?this.grid3D:this.grid,Ct=0;Ct<X.length;Ct++){for(var _t=X[Ct],Kt=[1/0,1/0,-1/0,-1/0],lr=0;lr<_t.length;lr++){var tr=_t[lr];Kt[0]=Math.min(Kt[0],tr.x),Kt[1]=Math.min(Kt[1],tr.y),Kt[2]=Math.max(Kt[2],tr.x),Kt[3]=Math.max(Kt[3],tr.y)}Kt[0]<Ra&&Kt[1]<Ra&&Kt[2]>=0&&Kt[3]>=0&&mt.insert($e,Kt[0],Kt[1],Kt[2],Kt[3])}},Ic.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new wd.VectorTile(new bg(this.rawTileData)).layers,this.sourceLayerCoder=new _g(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Ic.prototype.query=function(F,X,oe,ye){var Me=this;this.loadVTLayers();for(var Ie=F.params||{},$e=Ra/F.tileSize/F.scale,mt=af(Ie.filter),Ct=F.queryGeometry,_t=F.queryPadding*$e,Kt=qb(Ct),lr=this.grid.query(Kt.minX-_t,Kt.minY-_t,Kt.maxX+_t,Kt.maxY+_t),tr=qb(F.cameraQueryGeometry),wr=this.grid3D.query(tr.minX-_t,tr.minY-_t,tr.maxX+_t,tr.maxY+_t,function(Hn,Qn,$n,La){return Kf(F.cameraQueryGeometry,Hn-_t,Qn-_t,$n+_t,La+_t)}),Ur=0,rn=wr;Ur<rn.length;Ur+=1){var qr=rn[Ur];lr.push(qr)}lr.sort(C8);for(var Mn={},yn,En=function(Hn){var Qn=lr[Hn];if(Qn!==yn){yn=Qn;var $n=Me.featureIndexArray.get(Qn),La=null;Me.loadMatchingFeature(Mn,$n.bucketIndex,$n.sourceLayerIndex,$n.featureIndex,mt,Ie.layers,Ie.availableImages,X,oe,ye,function(va,xa,Ga){return La||(La=xi(va)),xa.queryIntersectsFeature(Ct,va,Ga,La,Me.z,F.transform,$e,F.pixelPosMatrix)})}},In=0;In<lr.length;In++)En(In);return Mn},Ic.prototype.loadMatchingFeature=function(F,X,oe,ye,Me,Ie,$e,mt,Ct,_t,Kt){var lr=this.bucketLayerIDs[X];if(!(Ie&&!O(Ie,lr))){var tr=this.sourceLayerCoder.decode(oe),wr=this.vtLayers[tr],Ur=wr.feature(ye);if(Me.filter(new Bn(this.tileID.overscaledZ),Ur))for(var rn=this.getId(Ur,tr),qr=0;qr<lr.length;qr++){var Mn=lr[qr];if(!(Ie&&Ie.indexOf(Mn)<0)){var yn=mt[Mn];if(yn){var En={};rn!==void 0&&_t&&(En=_t.getState(yn.sourceLayer||"_geojsonTileLayer",rn));var In=Ct[Mn];In.paint=Qb(In.paint,yn.paint,Ur,En,$e),In.layout=Qb(In.layout,yn.layout,Ur,En,$e);var Hn=!Kt||Kt(Ur,yn,En);if(Hn){var Qn=new Rg(Ur,this.z,this.x,this.y,rn);Qn.layer=In;var $n=F[Mn];$n===void 0&&($n=F[Mn]=[]),$n.push({featureIndex:ye,feature:Qn,intersectionZ:Hn})}}}}}},Ic.prototype.lookupSymbolFeatures=function(F,X,oe,ye,Me,Ie,$e,mt){var Ct={};this.loadVTLayers();for(var _t=af(Me),Kt=0,lr=F;Kt<lr.length;Kt+=1){var tr=lr[Kt];this.loadMatchingFeature(Ct,oe,ye,tr,_t,Ie,$e,mt,X)}return Ct},Ic.prototype.hasLayer=function(F){for(var X=0,oe=this.bucketLayerIDs;X<oe.length;X+=1)for(var ye=oe[X],Me=0,Ie=ye;Me<Ie.length;Me+=1){var $e=Ie[Me];if(F===$e)return!0}return!1},Ic.prototype.getId=function(F,X){var oe=F.id;if(this.promoteId){var ye=typeof this.promoteId=="string"?this.promoteId:this.promoteId[X];oe=F.properties[ye],typeof oe=="boolean"&&(oe=Number(oe))}return oe},he("FeatureIndex",Ic,{omit:["rawTileData","sourceLayerCoder"]});function Qb(I,F,X,oe,ye){return o(I,function(Me,Ie){var $e=F instanceof mi?F.get(Ie):null;return $e&&$e.evaluate?$e.evaluate(X,oe,ye):$e})}function qb(I){for(var F=1/0,X=1/0,oe=-1/0,ye=-1/0,Me=0,Ie=I;Me<Ie.length;Me+=1){var $e=Ie[Me];F=Math.min(F,$e.x),X=Math.min(X,$e.y),oe=Math.max(oe,$e.x),ye=Math.max(ye,$e.y)}return{minX:F,minY:X,maxX:oe,maxY:ye}}function C8(I,F){return F-I}var L8=3e4,zo=function(F,X){this.tileID=F,this.uid=L(),this.uses=0,this.tileSize=X,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"};zo.prototype.registerFadeDuration=function(F){var X=F+this.timeAdded;X<fe.now()||this.fadeEndTime&&X<this.fadeEndTime||(this.fadeEndTime=X)},zo.prototype.wasRequested=function(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"},zo.prototype.loadVectorData=function(F,X,oe){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",!F){this.collisionBoxArray=new jf;return}F.featureIndex&&(this.latestFeatureIndex=F.featureIndex,F.rawTileData?(this.latestRawTileData=F.rawTileData,this.latestFeatureIndex.rawTileData=F.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=F.collisionBoxArray,this.buckets=M8(F.buckets,X.style),this.hasSymbolBuckets=!1;for(var ye in this.buckets){var Me=this.buckets[ye];if(Me instanceof Si)if(this.hasSymbolBuckets=!0,oe)Me.justReloaded=!0;else break}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var Ie in this.buckets){var $e=this.buckets[Ie];if($e instanceof Si&&$e.hasRTLText){this.hasRTLText=!0,gi();break}}this.queryPadding=0;for(var mt in this.buckets){var Ct=this.buckets[mt];this.queryPadding=Math.max(this.queryPadding,X.style.getLayer(mt).queryRadius(Ct))}F.imageAtlas&&(this.imageAtlas=F.imageAtlas),F.glyphAtlasImage&&(this.glyphAtlasImage=F.glyphAtlasImage)},zo.prototype.unloadVectorData=function(){for(var F in this.buckets)this.buckets[F].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},zo.prototype.getBucket=function(F){return this.buckets[F.id]},zo.prototype.upload=function(F){for(var X in this.buckets){var oe=this.buckets[X];oe.uploadPending()&&oe.upload(F)}var ye=F.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Iv(F,this.imageAtlas.image,ye.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Iv(F,this.glyphAtlasImage,ye.ALPHA),this.glyphAtlasImage=null)},zo.prototype.prepare=function(F){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(F,this.imageAtlasTexture)},zo.prototype.queryRenderedFeatures=function(F,X,oe,ye,Me,Ie,$e,mt,Ct,_t){return!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData?{}:this.latestFeatureIndex.query({queryGeometry:ye,cameraQueryGeometry:Me,scale:Ie,tileSize:this.tileSize,pixelPosMatrix:_t,transform:mt,params:$e,queryPadding:this.queryPadding*Ct},F,X,oe)},zo.prototype.querySourceFeatures=function(F,X){var oe=this.latestFeatureIndex;if(!(!oe||!oe.rawTileData)){var ye=oe.loadVTLayers(),Me=X?X.sourceLayer:"",Ie=ye._geojsonTileLayer||ye[Me];if(Ie)for(var $e=af(X&&X.filter),mt=this.tileID.canonical,Ct=mt.z,_t=mt.x,Kt=mt.y,lr={z:Ct,x:_t,y:Kt},tr=0;tr<Ie.length;tr++){var wr=Ie.feature(tr);if($e.filter(new Bn(this.tileID.overscaledZ),wr)){var Ur=oe.getId(wr,Me),rn=new Rg(wr,Ct,_t,Kt,Ur);rn.tile=lr,F.push(rn)}}}},zo.prototype.hasData=function(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"},zo.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},zo.prototype.setExpiryData=function(F){var X=this.expirationTime;if(F.cacheControl){var oe=Y(F.cacheControl);oe["max-age"]&&(this.expirationTime=Date.now()+oe["max-age"]*1e3)}else F.expires&&(this.expirationTime=new Date(F.expires).getTime());if(this.expirationTime){var ye=Date.now(),Me=!1;if(this.expirationTime>ye)Me=!1;else if(!X)Me=!0;else if(this.expirationTime<X)Me=!0;else{var Ie=this.expirationTime-X;Ie?this.expirationTime=ye+Math.max(Ie,L8):Me=!0}Me?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},zo.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)},zo.prototype.setFeatureState=function(F,X){if(!(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(F).length===0)){var oe=this.latestFeatureIndex.loadVTLayers();for(var ye in this.buckets)if(X.style.hasLayer(ye)){var Me=this.buckets[ye],Ie=Me.layers[0].sourceLayer||"_geojsonTileLayer",$e=oe[Ie],mt=F[Ie];if(!(!$e||!mt||Object.keys(mt).length===0)){Me.update(mt,$e,this.imageAtlas&&this.imageAtlas.patternPositions||{});var Ct=X&&X.style&&X.style.getLayer(ye);Ct&&(this.queryPadding=Math.max(this.queryPadding,Ct.queryRadius(Me)))}}}},zo.prototype.holdingForFade=function(){return this.symbolFadeHoldUntil!==void 0},zo.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<fe.now()},zo.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},zo.prototype.setHoldDuration=function(F){this.symbolFadeHoldUntil=fe.now()+F},zo.prototype.setDependencies=function(F,X){for(var oe={},ye=0,Me=X;ye<Me.length;ye+=1){var Ie=Me[ye];oe[Ie]=!0}this.dependencies[F]=oe},zo.prototype.hasDependency=function(F,X){for(var oe=0,ye=F;oe<ye.length;oe+=1){var Me=ye[oe],Ie=this.dependencies[Me];if(Ie)for(var $e=0,mt=X;$e<mt.length;$e+=1){var Ct=mt[$e];if(Ie[Ct])return!0}}return!1};var P8=["type","source","source-layer","minzoom","maxzoom","filter","layout"],Mh=self.performance,ew=function(F){this._marks={start:[F.url,"start"].join("#"),end:[F.url,"end"].join("#"),measure:F.url.toString()},Mh.mark(this._marks.start)};ew.prototype.finish=function(){Mh.mark(this._marks.end);var F=Mh.getEntriesByName(this._marks.measure);return F.length===0&&(Mh.measure(this._marks.measure,this._marks.start,this._marks.end),F=Mh.getEntriesByName(this._marks.measure),Mh.clearMarks(this._marks.start),Mh.clearMarks(this._marks.end),Mh.clearMeasures(this._marks.measure)),F},a.Actor=Dd,a.AlphaImage=Dv,a.CanonicalTileID=kv,a.CollisionBoxArray=jf,a.Color=oi,a.DEMData=Dc,a.DataConstantProperty=ma,a.DictionaryCoder=_g,a.EXTENT=Ra,a.ErrorEvent=cr,a.EvaluationParameters=Bn,a.Event=Qt,a.Evented=fr,a.FeatureIndex=Ic,a.FillBucket=hf,a.FillExtrusionBucket=vf,a.ImageAtlas=G0,a.ImagePosition=Tg,a.LineBucket=Ks,a.LngLat=Hi,a.LngLatBounds=bo,a.MercatorCoordinate=Fv,a.ONE_EM=Zo,a.OverscaledTileID=wo,a.Point=r,a.Point$1=r,a.Properties=ho,a.Protobuf=bg,a.RGBAImage=js,a.RequestManager=Le,a.RequestPerformance=ew,a.ResourceType=gt,a.SegmentVector=J,a.SourceFeatureState=Id,a.StructArrayLayout1ui2=bh,a.StructArrayLayout2f1f2i16=uf,a.StructArrayLayout2i4=Ev,a.StructArrayLayout3ui6=ff,a.StructArrayLayout4i8=Wf,a.SymbolBucket=Si,a.Texture=Iv,a.Tile=zo,a.Transitionable=Ja,a.Uniform1f=Vr,a.Uniform1i=Wr,a.Uniform2f=Qr,a.Uniform3f=ln,a.Uniform4f=Cn,a.UniformColor=On,a.UniformMatrix4f=jn,a.UnwrappedTileID=$b,a.ValidationError=Sr,a.WritingMode=Fl,a.ZoomHistory=Ft,a.add=md,a.addDynamicAttributes=lm,a.asyncAll=p,a.bezier=f,a.bindAll=C,a.browser=fe,a.cacheEntryPossiblyAdded=St,a.clamp=h,a.clearTileCache=wt,a.clipLine=Fb,a.clone=vg,a.clone$1=T,a.clone$2=Hy,a.collisionCircleLayout=uM,a.config=te,a.create=pd,a.create$1=_v,a.create$2=Pv,a.createCommonjsModule=_,a.createExpression=$l,a.createLayout=Li,a.createStyleLayer=b8,a.cross=BE,a.deepEqual=u,a.dot=NE,a.dot$1=WE,a.ease=g,a.emitValidationErrors=_a,a.endsWith=S,a.enforceCacheSizeLimit=Pt,a.evaluateSizeForFeature=Cb,a.evaluateSizeForZoom=Lb,a.evaluateVariableOffset=zb,a.evented=ba,a.extend=l,a.featureFilter=af,a.filterObject=R,a.fromRotation=dd,a.getAnchorAlignment=am,a.getAnchorJustification=sm,a.getArrayBuffer=Lt,a.getImage=Ke,a.getJSON=yt,a.getRTLTextPluginStatus=Wa,a.getReferrer=Ut,a.getVideo=Ze,a.identity=gd,a.invert=Th,a.isChar=xt,a.isMapboxURL=Te,a.keysDifference=c,a.makeRequest=ut,a.mapObject=o,a.mercatorXfromLng=jb,a.mercatorYfromLat=Kb,a.mercatorZfromAltitude=Jb,a.mul=Uy,a.multiply=Ah,a.mvt=wd,a.normalize=F0,a.number=Zi,a.offscreenCanvasSupported=hr,a.ortho=By,a.parseGlyphPBF=OM,a.pbf=bg,a.performSymbolLayout=e8,a.perspective=I0,a.pick=m,a.plugin=si,a.polygonIntersectsPolygon=Xa,a.postMapLoadEvent=ze,a.postTurnstileEvent=et,a.potpack=xb,a.refProperties=P8,a.register=he,a.registerForPluginStateChange=Pa,a.rotate=fs,a.rotateX=Zs,a.rotateZ=yd,a.scale=Xs,a.scale$1=GE,a.scale$2=Gy,a.setCacheLimits=Bt,a.setRTLTextPlugin=Ha,a.sphericalToCartesian=G,a.sqrLen=ZE,a.styleSpec=$t,a.sub=HE,a.symbolSize=YM,a.transformMat3=UE,a.transformMat4=dg,a.translate=ao,a.triggerPluginCompletionEvent=na,a.uniqueId=L,a.validateCustomStyleLayer=y8,a.validateLight=bn,a.validateStyle=gn,a.values=E,a.vectorTile=wd,a.version=x,a.warnOnce=H,a.webpSupported=ne,a.window=self,a.wrap=b}),P(["./shared"],function(a){function _(dt){var ut=typeof dt;if(ut==="number"||ut==="boolean"||ut==="string"||dt===void 0||dt===null)return JSON.stringify(dt);if(Array.isArray(dt)){for(var yt="[",Lt=0,Rt=dt;Lt<Rt.length;Lt+=1){var Nt=Rt[Lt];yt+=_(Nt)+","}return yt+"]"}for(var Vt=Object.keys(dt).sort(),Zt="{",qt=0;qt<Vt.length;qt++)Zt+=JSON.stringify(Vt[qt])+":"+_(dt[Vt[qt]])+",";return Zt+"}"}function x(dt){for(var ut="",yt=0,Lt=a.refProperties;yt<Lt.length;yt+=1){var Rt=Lt[yt];ut+="/"+_(dt[Rt])}return ut}function v(dt,ut){for(var yt={},Lt=0;Lt<dt.length;Lt++){var Rt=ut&&ut[dt[Lt].id]||x(dt[Lt]);ut&&(ut[dt[Lt].id]=Rt);var Nt=yt[Rt];Nt||(Nt=yt[Rt]=[]),Nt.push(dt[Lt])}var Vt=[];for(var Zt in yt)Vt.push(yt[Zt]);return Vt}var y=function(ut){this.keyCache={},ut&&this.replace(ut)};y.prototype.replace=function(ut){this._layerConfigs={},this._layers={},this.update(ut,[])},y.prototype.update=function(ut,yt){for(var Lt=this,Rt=0,Nt=ut;Rt<Nt.length;Rt+=1){var Vt=Nt[Rt];this._layerConfigs[Vt.id]=Vt;var Zt=this._layers[Vt.id]=a.createStyleLayer(Vt);Zt._featureFilter=a.featureFilter(Zt.filter),this.keyCache[Vt.id]&&delete this.keyCache[Vt.id]}for(var qt=0,Jt=yt;qt<Jt.length;qt+=1){var nr=Jt[qt];delete this.keyCache[nr],delete this._layerConfigs[nr],delete this._layers[nr]}this.familiesBySource={};for(var Mr=v(a.values(this._layerConfigs),this.keyCache),Ke=0,Ze=Mr;Ke<Ze.length;Ke+=1){var zt=Ze[Ke],kt=zt.map(function(gr){return Lt._layers[gr.id]}),Qt=kt[0];if(Qt.visibility!=="none"){var cr=Qt.source||"",fr=this.familiesBySource[cr];fr||(fr=this.familiesBySource[cr]={});var ir=Qt.sourceLayer||"_geojsonTileLayer",Yt=fr[ir];Yt||(Yt=fr[ir]=[]),Yt.push(kt)}}};var r=1,n=function(ut){var yt={},Lt=[];for(var Rt in ut){var Nt=ut[Rt],Vt=yt[Rt]={};for(var Zt in Nt){var qt=Nt[+Zt];if(!(!qt||qt.bitmap.width===0||qt.bitmap.height===0)){var Jt={x:0,y:0,w:qt.bitmap.width+2*r,h:qt.bitmap.height+2*r};Lt.push(Jt),Vt[Zt]={rect:Jt,metrics:qt.metrics}}}}var nr=a.potpack(Lt),Mr=nr.w,Ke=nr.h,Ze=new a.AlphaImage({width:Mr||1,height:Ke||1});for(var zt in ut){var kt=ut[zt];for(var Qt in kt){var cr=kt[+Qt];if(!(!cr||cr.bitmap.width===0||cr.bitmap.height===0)){var fr=yt[zt][Qt].rect;a.AlphaImage.copy(cr.bitmap,Ze,{x:0,y:0},{x:fr.x+r,y:fr.y+r},cr.bitmap)}}}this.image=Ze,this.positions=yt};a.register("GlyphAtlas",n);var u=function(ut){this.tileID=new a.OverscaledTileID(ut.tileID.overscaledZ,ut.tileID.wrap,ut.tileID.canonical.z,ut.tileID.canonical.x,ut.tileID.canonical.y),this.uid=ut.uid,this.zoom=ut.zoom,this.pixelRatio=ut.pixelRatio,this.tileSize=ut.tileSize,this.source=ut.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=ut.showCollisionBoxes,this.collectResourceTiming=!!ut.collectResourceTiming,this.returnDependencies=!!ut.returnDependencies,this.promoteId=ut.promoteId};u.prototype.parse=function(ut,yt,Lt,Rt,Nt){var Vt=this;this.status="parsing",this.data=ut,this.collisionBoxArray=new a.CollisionBoxArray;var Zt=new a.DictionaryCoder(Object.keys(ut.layers).sort()),qt=new a.FeatureIndex(this.tileID,this.promoteId);qt.bucketLayerIDs=[];var Jt={},nr={featureIndex:qt,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Lt},Mr=yt.familiesBySource[this.source];for(var Ke in Mr){var Ze=ut.layers[Ke];if(Ze){Ze.version===1&&a.warnOnce('Vector tile source "'+this.source+'" layer "'+Ke+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var zt=Zt.encode(Ke),kt=[],Qt=0;Qt<Ze.length;Qt++){var cr=Ze.feature(Qt),fr=qt.getId(cr,Ke);kt.push({feature:cr,id:fr,index:Qt,sourceLayerIndex:zt})}for(var ir=0,Yt=Mr[Ke];ir<Yt.length;ir+=1){var gr=Yt[ir],yr=gr[0];if(!(yr.minzoom&&this.zoom<Math.floor(yr.minzoom))&&!(yr.maxzoom&&this.zoom>=yr.maxzoom)&&yr.visibility!=="none"){i(gr,this.zoom,Lt);var Tr=Jt[yr.id]=yr.createBucket({index:qt.bucketLayerIDs.length,layers:gr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:zt,sourceID:this.source});Tr.populate(kt,nr,this.tileID.canonical),qt.bucketLayerIDs.push(gr.map(function(mr){return mr.id}))}}}}var pr,Kr,Or,Nr,Sn=a.mapObject(nr.glyphDependencies,function(mr){return Object.keys(mr).map(Number)});Object.keys(Sn).length?Rt.send("getGlyphs",{uid:this.uid,stacks:Sn},function(mr,Ar){pr||(pr=mr,Kr=Ar,Dn.call(Vt))}):Kr={};var Jr=Object.keys(nr.iconDependencies);Jr.length?Rt.send("getImages",{icons:Jr,source:this.source,tileID:this.tileID,type:"icons"},function(mr,Ar){pr||(pr=mr,Or=Ar,Dn.call(Vt))}):Or={};var xn=Object.keys(nr.patternDependencies);xn.length?Rt.send("getImages",{icons:xn,source:this.source,tileID:this.tileID,type:"patterns"},function(mr,Ar){pr||(pr=mr,Nr=Ar,Dn.call(Vt))}):Nr={},Dn.call(this);function Dn(){if(pr)return Nt(pr);if(Kr&&Or&&Nr){var mr=new n(Kr),Ar=new a.ImageAtlas(Or,Nr);for(var zr in Jt){var Br=Jt[zr];Br instanceof a.SymbolBucket?(i(Br.layers,this.zoom,Lt),a.performSymbolLayout(Br,Kr,mr.positions,Or,Ar.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Br.hasPattern&&(Br instanceof a.LineBucket||Br instanceof a.FillBucket||Br instanceof a.FillExtrusionBucket)&&(i(Br.layers,this.zoom,Lt),Br.addFeatures(nr,this.tileID.canonical,Ar.patternPositions))}this.status="done",Nt(null,{buckets:a.values(Jt).filter(function(on){return!on.isEmpty()}),featureIndex:qt,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:mr.image,imageAtlas:Ar,glyphMap:this.returnDependencies?Kr:null,iconMap:this.returnDependencies?Or:null,glyphPositions:this.returnDependencies?mr.positions:null})}}};function i(dt,ut,yt){for(var Lt=new a.EvaluationParameters(ut),Rt=0,Nt=dt;Rt<Nt.length;Rt+=1){var Vt=Nt[Rt];Vt.recalculate(Lt,yt)}}function f(dt,ut){var yt=a.getArrayBuffer(dt.request,function(Lt,Rt,Nt,Vt){Lt?ut(Lt):Rt&&ut(null,{vectorTile:new a.vectorTile.VectorTile(new a.pbf(Rt)),rawData:Rt,cacheControl:Nt,expires:Vt})});return function(){yt.cancel(),ut()}}var g=function(ut,yt,Lt,Rt){this.actor=ut,this.layerIndex=yt,this.availableImages=Lt,this.loadVectorData=Rt||f,this.loading={},this.loaded={}};g.prototype.loadTile=function(ut,yt){var Lt=this,Rt=ut.uid;this.loading||(this.loading={});var Nt=ut&&ut.request&&ut.request.collectResourceTiming?new a.RequestPerformance(ut.request):!1,Vt=this.loading[Rt]=new u(ut);Vt.abort=this.loadVectorData(ut,function(Zt,qt){if(delete Lt.loading[Rt],Zt||!qt)return Vt.status="done",Lt.loaded[Rt]=Vt,yt(Zt);var Jt=qt.rawData,nr={};qt.expires&&(nr.expires=qt.expires),qt.cacheControl&&(nr.cacheControl=qt.cacheControl);var Mr={};if(Nt){var Ke=Nt.finish();Ke&&(Mr.resourceTiming=JSON.parse(JSON.stringify(Ke)))}Vt.vectorTile=qt.vectorTile,Vt.parse(qt.vectorTile,Lt.layerIndex,Lt.availableImages,Lt.actor,function(Ze,zt){if(Ze||!zt)return yt(Ze);yt(null,a.extend({rawTileData:Jt.slice(0)},zt,nr,Mr))}),Lt.loaded=Lt.loaded||{},Lt.loaded[Rt]=Vt})},g.prototype.reloadTile=function(ut,yt){var Lt=this,Rt=this.loaded,Nt=ut.uid,Vt=this;if(Rt&&Rt[Nt]){var Zt=Rt[Nt];Zt.showCollisionBoxes=ut.showCollisionBoxes;var qt=function(Jt,nr){var Mr=Zt.reloadCallback;Mr&&(delete Zt.reloadCallback,Zt.parse(Zt.vectorTile,Vt.layerIndex,Lt.availableImages,Vt.actor,Mr)),yt(Jt,nr)};Zt.status==="parsing"?Zt.reloadCallback=qt:Zt.status==="done"&&(Zt.vectorTile?Zt.parse(Zt.vectorTile,this.layerIndex,this.availableImages,this.actor,qt):qt())}},g.prototype.abortTile=function(ut,yt){var Lt=this.loading,Rt=ut.uid;Lt&&Lt[Rt]&&Lt[Rt].abort&&(Lt[Rt].abort(),delete Lt[Rt]),yt()},g.prototype.removeTile=function(ut,yt){var Lt=this.loaded,Rt=ut.uid;Lt&&Lt[Rt]&&delete Lt[Rt],yt()};var h=a.window.ImageBitmap,b=function(){this.loaded={}};b.prototype.loadTile=function(ut,yt){var Lt=ut.uid,Rt=ut.encoding,Nt=ut.rawImageData,Vt=h&&Nt instanceof h?this.getImageData(Nt):Nt,Zt=new a.DEMData(Lt,Vt,Rt);this.loaded=this.loaded||{},this.loaded[Lt]=Zt,yt(null,Zt)},b.prototype.getImageData=function(ut){(!this.offscreenCanvas||!this.offscreenCanvasContext)&&(this.offscreenCanvas=new OffscreenCanvas(ut.width,ut.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=ut.width,this.offscreenCanvas.height=ut.height,this.offscreenCanvasContext.drawImage(ut,0,0,ut.width,ut.height);var yt=this.offscreenCanvasContext.getImageData(-1,-1,ut.width+2,ut.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new a.RGBAImage({width:yt.width,height:yt.height},yt.data)},b.prototype.removeTile=function(ut){var yt=this.loaded,Lt=ut.uid;yt&&yt[Lt]&&delete yt[Lt]};var p=E;function E(dt,ut){var yt=dt&&dt.type,Lt;if(yt==="FeatureCollection")for(Lt=0;Lt<dt.features.length;Lt++)E(dt.features[Lt],ut);else if(yt==="GeometryCollection")for(Lt=0;Lt<dt.geometries.length;Lt++)E(dt.geometries[Lt],ut);else if(yt==="Feature")E(dt.geometry,ut);else if(yt==="Polygon")c(dt.coordinates,ut);else if(yt==="MultiPolygon")for(Lt=0;Lt<dt.coordinates.length;Lt++)c(dt.coordinates[Lt],ut);return dt}function c(dt,ut){if(dt.length!==0){l(dt[0],ut);for(var yt=1;yt<dt.length;yt++)l(dt[yt],!ut)}}function l(dt,ut){for(var yt=0,Lt=0,Rt=dt.length,Nt=Rt-1;Lt<Rt;Nt=Lt++)yt+=(dt[Lt][0]-dt[Nt][0])*(dt[Nt][1]+dt[Lt][1]);yt>=0!=!!ut&&dt.reverse()}var m=a.vectorTile.VectorTileFeature.prototype.toGeoJSON,M=function(ut){this._feature=ut,this.extent=a.EXTENT,this.type=ut.type,this.properties=ut.tags,"id"in ut&&!isNaN(ut.id)&&(this.id=parseInt(ut.id,10))};M.prototype.loadGeometry=function(){if(this._feature.type===1){for(var ut=[],yt=0,Lt=this._feature.geometry;yt<Lt.length;yt+=1){var Rt=Lt[yt];ut.push([new a.Point$1(Rt[0],Rt[1])])}return ut}else{for(var Nt=[],Vt=0,Zt=this._feature.geometry;Vt<Zt.length;Vt+=1){for(var qt=Zt[Vt],Jt=[],nr=0,Mr=qt;nr<Mr.length;nr+=1){var Ke=Mr[nr];Jt.push(new a.Point$1(Ke[0],Ke[1]))}Nt.push(Jt)}return Nt}},M.prototype.toGeoJSON=function(ut,yt,Lt){return m.call(this,ut,yt,Lt)};var L=function(ut){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=a.EXTENT,this.length=ut.length,this._features=ut};L.prototype.feature=function(ut){return new M(this._features[ut])};var D=a.vectorTile.VectorTileFeature,A=C;function C(dt,ut){this.options=ut||{},this.features=dt,this.length=dt.length}C.prototype.feature=function(dt){return new S(this.features[dt],this.options.extent)};function S(dt,ut){this.id=typeof dt.id=="number"?dt.id:void 0,this.type=dt.type,this.rawGeometry=dt.type===1?[dt.geometry]:dt.geometry,this.properties=dt.tags,this.extent=ut||4096}S.prototype.loadGeometry=function(){var dt=this.rawGeometry;this.geometry=[];for(var ut=0;ut<dt.length;ut++){for(var yt=dt[ut],Lt=[],Rt=0;Rt<yt.length;Rt++)Lt.push(new a.Point$1(yt[Rt][0],yt[Rt][1]));this.geometry.push(Lt)}return this.geometry},S.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var dt=this.geometry,ut=1/0,yt=-1/0,Lt=1/0,Rt=-1/0,Nt=0;Nt<dt.length;Nt++)for(var Vt=dt[Nt],Zt=0;Zt<Vt.length;Zt++){var qt=Vt[Zt];ut=Math.min(ut,qt.x),yt=Math.max(yt,qt.x),Lt=Math.min(Lt,qt.y),Rt=Math.max(Rt,qt.y)}return[ut,Lt,yt,Rt]},S.prototype.toGeoJSON=D.prototype.toGeoJSON;var o=N,R=N,T=H,O=A;function N(dt){var ut=new a.pbf;return k(dt,ut),ut.finish()}function H(dt,ut){ut=ut||{};var yt={};for(var Lt in dt)yt[Lt]=new A(dt[Lt].features,ut),yt[Lt].name=Lt,yt[Lt].version=ut.version,yt[Lt].extent=ut.extent;return N({layers:yt})}function k(dt,ut){for(var yt in dt.layers)ut.writeMessage(3,V,dt.layers[yt])}function V(dt,ut){ut.writeVarintField(15,dt.version||1),ut.writeStringField(1,dt.name||""),ut.writeVarintField(5,dt.extent||4096);var yt,Lt={keys:[],values:[],keycache:{},valuecache:{}};for(yt=0;yt<dt.length;yt++)Lt.feature=dt.feature(yt),ut.writeMessage(2,G,Lt);var Rt=Lt.keys;for(yt=0;yt<Rt.length;yt++)ut.writeStringField(3,Rt[yt]);var Nt=Lt.values;for(yt=0;yt<Nt.length;yt++)ut.writeMessage(4,ie,Nt[yt])}function G(dt,ut){var yt=dt.feature;yt.id!==void 0&&ut.writeVarintField(1,yt.id),ut.writeMessage(2,U,dt),ut.writeVarintField(3,yt.type),ut.writeMessage(4,re,yt)}function U(dt,ut){var yt=dt.feature,Lt=dt.keys,Rt=dt.values,Nt=dt.keycache,Vt=dt.valuecache;for(var Zt in yt.properties){var qt=Nt[Zt];typeof qt>"u"&&(Lt.push(Zt),qt=Lt.length-1,Nt[Zt]=qt),ut.writeVarint(qt);var Jt=yt.properties[Zt],nr=typeof Jt;nr!=="string"&&nr!=="boolean"&&nr!=="number"&&(Jt=JSON.stringify(Jt));var Mr=nr+":"+Jt,Ke=Vt[Mr];typeof Ke>"u"&&(Rt.push(Jt),Ke=Rt.length-1,Vt[Mr]=Ke),ut.writeVarint(Ke)}}function Y(dt,ut){return(ut<<3)+(dt&7)}function ee(dt){return dt<<1^dt>>31}function re(dt,ut){for(var yt=dt.loadGeometry(),Lt=dt.type,Rt=0,Nt=0,Vt=yt.length,Zt=0;Zt<Vt;Zt++){var qt=yt[Zt],Jt=1;Lt===1&&(Jt=qt.length),ut.writeVarint(Y(1,Jt));for(var nr=Lt===3?qt.length-1:qt.length,Mr=0;Mr<nr;Mr++){Mr===1&&Lt!==1&&ut.writeVarint(Y(2,nr-1));var Ke=qt[Mr].x-Rt,Ze=qt[Mr].y-Nt;ut.writeVarint(ee(Ke)),ut.writeVarint(ee(Ze)),Rt+=Ke,Nt+=Ze}Lt===3&&ut.writeVarint(Y(7,1))}}function ie(dt,ut){var yt=typeof dt;yt==="string"?ut.writeStringField(1,dt):yt==="boolean"?ut.writeBooleanField(7,dt):yt==="number"&&(dt%1!==0?ut.writeDoubleField(3,dt):dt<0?ut.writeSVarintField(6,dt):ut.writeVarintField(5,dt))}o.fromVectorTileJs=R,o.fromGeojsonVt=T,o.GeoJSONWrapper=O;function se(dt,ut,yt,Lt,Rt,Nt){if(!(Rt-Lt<=yt)){var Vt=Lt+Rt>>1;ce(dt,ut,Vt,Lt,Rt,Nt%2),se(dt,ut,yt,Lt,Vt-1,Nt+1),se(dt,ut,yt,Vt+1,Rt,Nt+1)}}function ce(dt,ut,yt,Lt,Rt,Nt){for(;Rt>Lt;){if(Rt-Lt>600){var Vt=Rt-Lt+1,Zt=yt-Lt+1,qt=Math.log(Vt),Jt=.5*Math.exp(2*qt/3),nr=.5*Math.sqrt(qt*Jt*(Vt-Jt)/Vt)*(Zt-Vt/2<0?-1:1),Mr=Math.max(Lt,Math.floor(yt-Zt*Jt/Vt+nr)),Ke=Math.min(Rt,Math.floor(yt+(Vt-Zt)*Jt/Vt+nr));ce(dt,ut,yt,Mr,Ke,Nt)}var Ze=ut[2*yt+Nt],zt=Lt,kt=Rt;for(q(dt,ut,Lt,yt),ut[2*Rt+Nt]>Ze&&q(dt,ut,Lt,Rt);zt<kt;){for(q(dt,ut,zt,kt),zt++,kt--;ut[2*zt+Nt]<Ze;)zt++;for(;ut[2*kt+Nt]>Ze;)kt--}ut[2*Lt+Nt]===Ze?q(dt,ut,Lt,kt):(kt++,q(dt,ut,kt,Rt)),kt<=yt&&(Lt=kt+1),yt<=kt&&(Rt=kt-1)}}function q(dt,ut,yt,Lt){j(dt,yt,Lt),j(ut,2*yt,2*Lt),j(ut,2*yt+1,2*Lt+1)}function j(dt,ut,yt){var Lt=dt[ut];dt[ut]=dt[yt],dt[yt]=Lt}function Z(dt,ut,yt,Lt,Rt,Nt,Vt){for(var Zt=[0,dt.length-1,0],qt=[],Jt,nr;Zt.length;){var Mr=Zt.pop(),Ke=Zt.pop(),Ze=Zt.pop();if(Ke-Ze<=Vt){for(var zt=Ze;zt<=Ke;zt++)Jt=ut[2*zt],nr=ut[2*zt+1],Jt>=yt&&Jt<=Rt&&nr>=Lt&&nr<=Nt&&qt.push(dt[zt]);continue}var kt=Math.floor((Ze+Ke)/2);Jt=ut[2*kt],nr=ut[2*kt+1],Jt>=yt&&Jt<=Rt&&nr>=Lt&&nr<=Nt&&qt.push(dt[kt]);var Qt=(Mr+1)%2;(Mr===0?yt<=Jt:Lt<=nr)&&(Zt.push(Ze),Zt.push(kt-1),Zt.push(Qt)),(Mr===0?Rt>=Jt:Nt>=nr)&&(Zt.push(kt+1),Zt.push(Ke),Zt.push(Qt))}return qt}function Q(dt,ut,yt,Lt,Rt,Nt){for(var Vt=[0,dt.length-1,0],Zt=[],qt=Rt*Rt;Vt.length;){var Jt=Vt.pop(),nr=Vt.pop(),Mr=Vt.pop();if(nr-Mr<=Nt){for(var Ke=Mr;Ke<=nr;Ke++)ue(ut[2*Ke],ut[2*Ke+1],yt,Lt)<=qt&&Zt.push(dt[Ke]);continue}var Ze=Math.floor((Mr+nr)/2),zt=ut[2*Ze],kt=ut[2*Ze+1];ue(zt,kt,yt,Lt)<=qt&&Zt.push(dt[Ze]);var Qt=(Jt+1)%2;(Jt===0?yt-Rt<=zt:Lt-Rt<=kt)&&(Vt.push(Mr),Vt.push(Ze-1),Vt.push(Qt)),(Jt===0?yt+Rt>=zt:Lt+Rt>=kt)&&(Vt.push(Ze+1),Vt.push(nr),Vt.push(Qt))}return Zt}function ue(dt,ut,yt,Lt){var Rt=dt-yt,Nt=ut-Lt;return Rt*Rt+Nt*Nt}var fe=function(dt){return dt[0]},te=function(dt){return dt[1]},ne=function(ut,yt,Lt,Rt,Nt){yt===void 0&&(yt=fe),Lt===void 0&&(Lt=te),Rt===void 0&&(Rt=64),Nt===void 0&&(Nt=Float64Array),this.nodeSize=Rt,this.points=ut;for(var Vt=ut.length<65536?Uint16Array:Uint32Array,Zt=this.ids=new Vt(ut.length),qt=this.coords=new Nt(ut.length*2),Jt=0;Jt<ut.length;Jt++)Zt[Jt]=Jt,qt[2*Jt]=yt(ut[Jt]),qt[2*Jt+1]=Lt(ut[Jt]);se(Zt,qt,Rt,0,Zt.length-1,0)};ne.prototype.range=function(ut,yt,Lt,Rt){return Z(this.ids,this.coords,ut,yt,Lt,Rt,this.nodeSize)},ne.prototype.within=function(ut,yt,Lt){return Q(this.ids,this.coords,ut,yt,Lt,this.nodeSize)};var ve={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(dt){return dt}},le=function(ut){this.options=De(Object.create(ve),ut),this.trees=new Array(this.options.maxZoom+1)};le.prototype.load=function(ut){var yt=this.options,Lt=yt.log,Rt=yt.minZoom,Nt=yt.maxZoom,Vt=yt.nodeSize;Lt&&console.time("total time");var Zt="prepare "+ut.length+" points";Lt&&console.time(Zt),this.points=ut;for(var qt=[],Jt=0;Jt<ut.length;Jt++)ut[Jt].geometry&&qt.push(Se(ut[Jt],Jt));this.trees[Nt+1]=new ne(qt,Ve,Ye,Vt,Float32Array),Lt&&console.timeEnd(Zt);for(var nr=Nt;nr>=Rt;nr--){var Mr=+Date.now();qt=this._cluster(qt,nr),this.trees[nr]=new ne(qt,Ve,Ye,Vt,Float32Array),Lt&&console.log("z%d: %d clusters in %dms",nr,qt.length,+Date.now()-Mr)}return Lt&&console.timeEnd("total time"),this},le.prototype.getClusters=function(ut,yt){var Lt=((ut[0]+180)%360+360)%360-180,Rt=Math.max(-90,Math.min(90,ut[1])),Nt=ut[2]===180?180:((ut[2]+180)%360+360)%360-180,Vt=Math.max(-90,Math.min(90,ut[3]));if(ut[2]-ut[0]>=360)Lt=-180,Nt=180;else if(Lt>Nt){var Zt=this.getClusters([Lt,Rt,180,Vt],yt),qt=this.getClusters([-180,Rt,Nt,Vt],yt);return Zt.concat(qt)}for(var Jt=this.trees[this._limitZoom(yt)],nr=Jt.range(Oe(Lt),Be(Vt),Oe(Nt),Be(Rt)),Mr=[],Ke=0,Ze=nr;Ke<Ze.length;Ke+=1){var zt=Ze[Ke],kt=Jt.points[zt];Mr.push(kt.numPoints?Re(kt):this.points[kt.index])}return Mr},le.prototype.getChildren=function(ut){var yt=this._getOriginId(ut),Lt=this._getOriginZoom(ut),Rt="No cluster with the specified id.",Nt=this.trees[Lt];if(!Nt)throw new Error(Rt);var Vt=Nt.points[yt];if(!Vt)throw new Error(Rt);for(var Zt=this.options.radius/(this.options.extent*Math.pow(2,Lt-1)),qt=Nt.within(Vt.x,Vt.y,Zt),Jt=[],nr=0,Mr=qt;nr<Mr.length;nr+=1){var Ke=Mr[nr],Ze=Nt.points[Ke];Ze.parentId===ut&&Jt.push(Ze.numPoints?Re(Ze):this.points[Ze.index])}if(Jt.length===0)throw new Error(Rt);return Jt},le.prototype.getLeaves=function(ut,yt,Lt){yt=yt||10,Lt=Lt||0;var Rt=[];return this._appendLeaves(Rt,ut,yt,Lt,0),Rt},le.prototype.getTile=function(ut,yt,Lt){var Rt=this.trees[this._limitZoom(ut)],Nt=Math.pow(2,ut),Vt=this.options,Zt=Vt.extent,qt=Vt.radius,Jt=qt/Zt,nr=(Lt-Jt)/Nt,Mr=(Lt+1+Jt)/Nt,Ke={features:[]};return this._addTileFeatures(Rt.range((yt-Jt)/Nt,nr,(yt+1+Jt)/Nt,Mr),Rt.points,yt,Lt,Nt,Ke),yt===0&&this._addTileFeatures(Rt.range(1-Jt/Nt,nr,1,Mr),Rt.points,Nt,Lt,Nt,Ke),yt===Nt-1&&this._addTileFeatures(Rt.range(0,nr,Jt/Nt,Mr),Rt.points,-1,Lt,Nt,Ke),Ke.features.length?Ke:null},le.prototype.getClusterExpansionZoom=function(ut){for(var yt=this._getOriginZoom(ut)-1;yt<=this.options.maxZoom;){var Lt=this.getChildren(ut);if(yt++,Lt.length!==1)break;ut=Lt[0].properties.cluster_id}return yt},le.prototype._appendLeaves=function(ut,yt,Lt,Rt,Nt){for(var Vt=this.getChildren(yt),Zt=0,qt=Vt;Zt<qt.length;Zt+=1){var Jt=qt[Zt],nr=Jt.properties;if(nr&&nr.cluster?Nt+nr.point_count<=Rt?Nt+=nr.point_count:Nt=this._appendLeaves(ut,nr.cluster_id,Lt,Rt,Nt):Nt<Rt?Nt++:ut.push(Jt),ut.length===Lt)break}return Nt},le.prototype._addTileFeatures=function(ut,yt,Lt,Rt,Nt,Vt){for(var Zt=0,qt=ut;Zt<qt.length;Zt+=1){var Jt=qt[Zt],nr=yt[Jt],Mr=nr.numPoints,Ke={type:1,geometry:[[Math.round(this.options.extent*(nr.x*Nt-Lt)),Math.round(this.options.extent*(nr.y*Nt-Rt))]],tags:Mr?Ee(nr):this.points[nr.index].properties},Ze=void 0;Mr?Ze=nr.id:this.options.generateId?Ze=nr.index:this.points[nr.index].id&&(Ze=this.points[nr.index].id),Ze!==void 0&&(Ke.id=Ze),Vt.features.push(Ke)}},le.prototype._limitZoom=function(ut){return Math.max(this.options.minZoom,Math.min(ut,this.options.maxZoom+1))},le.prototype._cluster=function(ut,yt){for(var Lt=[],Rt=this.options,Nt=Rt.radius,Vt=Rt.extent,Zt=Rt.reduce,qt=Nt/(Vt*Math.pow(2,yt)),Jt=0;Jt<ut.length;Jt++){var nr=ut[Jt];if(!(nr.zoom<=yt)){nr.zoom=yt;for(var Mr=this.trees[yt+1],Ke=Mr.within(nr.x,nr.y,qt),Ze=nr.numPoints||1,zt=nr.x*Ze,kt=nr.y*Ze,Qt=Zt&&Ze>1?this._map(nr,!0):null,cr=(Jt<<5)+(yt+1)+this.points.length,fr=0,ir=Ke;fr<ir.length;fr+=1){var Yt=ir[fr],gr=Mr.points[Yt];if(!(gr.zoom<=yt)){gr.zoom=yt;var yr=gr.numPoints||1;zt+=gr.x*yr,kt+=gr.y*yr,Ze+=yr,gr.parentId=cr,Zt&&(Qt||(Qt=this._map(nr,!0)),Zt(Qt,this._map(gr)))}}Ze===1?Lt.push(nr):(nr.parentId=cr,Lt.push(xe(zt/Ze,kt/Ze,cr,Ze,Qt)))}}return Lt},le.prototype._getOriginId=function(ut){return ut-this.points.length>>5},le.prototype._getOriginZoom=function(ut){return(ut-this.points.length)%32},le.prototype._map=function(ut,yt){if(ut.numPoints)return yt?De({},ut.properties):ut.properties;var Lt=this.points[ut.index].properties,Rt=this.options.map(Lt);return yt&&Rt===Lt?De({},Rt):Rt};function xe(dt,ut,yt,Lt,Rt){return{x:dt,y:ut,zoom:1/0,id:yt,parentId:-1,numPoints:Lt,properties:Rt}}function Se(dt,ut){var yt=dt.geometry.coordinates,Lt=yt[0],Rt=yt[1];return{x:Oe(Lt),y:Be(Rt),zoom:1/0,index:ut,parentId:-1}}function Re(dt){return{type:"Feature",id:dt.id,properties:Ee(dt),geometry:{type:"Point",coordinates:[Le(dt.x),Te(dt.y)]}}}function Ee(dt){var ut=dt.numPoints,yt=ut>=1e4?Math.round(ut/1e3)+"k":ut>=1e3?Math.round(ut/100)/10+"k":ut;return De(De({},dt.properties),{cluster:!0,cluster_id:dt.id,point_count:ut,point_count_abbreviated:yt})}function Oe(dt){return dt/360+.5}function Be(dt){var ut=Math.sin(dt*Math.PI/180),yt=.5-.25*Math.log((1+ut)/(1-ut))/Math.PI;return yt<0?0:yt>1?1:yt}function Le(dt){return(dt-.5)*360}function Te(dt){var ut=(180-dt*360)*Math.PI/180;return 360*Math.atan(Math.exp(ut))/Math.PI-90}function De(dt,ut){for(var yt in ut)dt[yt]=ut[yt];return dt}function Ve(dt){return dt.x}function Ye(dt){return dt.y}function Ne(dt,ut,yt,Lt){for(var Rt=Lt,Nt=yt-ut>>1,Vt=yt-ut,Zt,qt=dt[ut],Jt=dt[ut+1],nr=dt[yt],Mr=dt[yt+1],Ke=ut+3;Ke<yt;Ke+=3){var Ze=Xe(dt[Ke],dt[Ke+1],qt,Jt,nr,Mr);if(Ze>Rt)Zt=Ke,Rt=Ze;else if(Ze===Rt){var zt=Math.abs(Ke-Nt);zt<Vt&&(Zt=Ke,Vt=zt)}}Rt>Lt&&(Zt-ut>3&&Ne(dt,ut,Zt,Lt),dt[Zt+2]=Rt,yt-Zt>3&&Ne(dt,Zt,yt,Lt))}function Xe(dt,ut,yt,Lt,Rt,Nt){var Vt=Rt-yt,Zt=Nt-Lt;if(Vt!==0||Zt!==0){var qt=((dt-yt)*Vt+(ut-Lt)*Zt)/(Vt*Vt+Zt*Zt);qt>1?(yt=Rt,Lt=Nt):qt>0&&(yt+=Vt*qt,Lt+=Zt*qt)}return Vt=dt-yt,Zt=ut-Lt,Vt*Vt+Zt*Zt}function ht(dt,ut,yt,Lt){var Rt={id:typeof dt>"u"?null:dt,type:ut,geometry:yt,tags:Lt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return st(Rt),Rt}function st(dt){var ut=dt.geometry,yt=dt.type;if(yt==="Point"||yt==="MultiPoint"||yt==="LineString")it(dt,ut);else if(yt==="Polygon"||yt==="MultiLineString")for(var Lt=0;Lt<ut.length;Lt++)it(dt,ut[Lt]);else if(yt==="MultiPolygon")for(Lt=0;Lt<ut.length;Lt++)for(var Rt=0;Rt<ut[Lt].length;Rt++)it(dt,ut[Lt][Rt])}function it(dt,ut){for(var yt=0;yt<ut.length;yt+=3)dt.minX=Math.min(dt.minX,ut[yt]),dt.minY=Math.min(dt.minY,ut[yt+1]),dt.maxX=Math.max(dt.maxX,ut[yt]),dt.maxY=Math.max(dt.maxY,ut[yt+1])}function nt(dt,ut){var yt=[];if(dt.type==="FeatureCollection")for(var Lt=0;Lt<dt.features.length;Lt++)pt(yt,dt.features[Lt],ut,Lt);else dt.type==="Feature"?pt(yt,dt,ut):pt(yt,{geometry:dt},ut);return yt}function pt(dt,ut,yt,Lt){if(ut.geometry){var Rt=ut.geometry.coordinates,Nt=ut.geometry.type,Vt=Math.pow(yt.tolerance/((1<<yt.maxZoom)*yt.extent),2),Zt=[],qt=ut.id;if(yt.promoteId?qt=ut.properties[yt.promoteId]:yt.generateId&&(qt=Lt||0),Nt==="Point")Tt(Rt,Zt);else if(Nt==="MultiPoint")for(var Jt=0;Jt<Rt.length;Jt++)Tt(Rt[Jt],Zt);else if(Nt==="LineString")Et(Rt,Zt,Vt,!1);else if(Nt==="MultiLineString")if(yt.lineMetrics){for(Jt=0;Jt<Rt.length;Jt++)Zt=[],Et(Rt[Jt],Zt,Vt,!1),dt.push(ht(qt,"LineString",Zt,ut.properties));return}else Dt(Rt,Zt,Vt,!1);else if(Nt==="Polygon")Dt(Rt,Zt,Vt,!0);else if(Nt==="MultiPolygon")for(Jt=0;Jt<Rt.length;Jt++){var nr=[];Dt(Rt[Jt],nr,Vt,!0),Zt.push(nr)}else if(Nt==="GeometryCollection"){for(Jt=0;Jt<ut.geometry.geometries.length;Jt++)pt(dt,{id:qt,geometry:ut.geometry.geometries[Jt],properties:ut.properties},yt,Lt);return}else throw new Error("Input data is not a valid GeoJSON object.");dt.push(ht(qt,Nt,Zt,ut.properties))}}function Tt(dt,ut){ut.push(et(dt[0])),ut.push(Ue(dt[1])),ut.push(0)}function Et(dt,ut,yt,Lt){for(var Rt,Nt,Vt=0,Zt=0;Zt<dt.length;Zt++){var qt=et(dt[Zt][0]),Jt=Ue(dt[Zt][1]);ut.push(qt),ut.push(Jt),ut.push(0),Zt>0&&(Lt?Vt+=(Rt*Jt-qt*Nt)/2:Vt+=Math.sqrt(Math.pow(qt-Rt,2)+Math.pow(Jt-Nt,2))),Rt=qt,Nt=Jt}var nr=ut.length-3;ut[2]=1,Ne(ut,0,nr,yt),ut[nr+2]=1,ut.size=Math.abs(Vt),ut.start=0,ut.end=ut.size}function Dt(dt,ut,yt,Lt){for(var Rt=0;Rt<dt.length;Rt++){var Nt=[];Et(dt[Rt],Nt,yt,Lt),ut.push(Nt)}}function et(dt){return dt/360+.5}function Ue(dt){var ut=Math.sin(dt*Math.PI/180),yt=.5-.25*Math.log((1+ut)/(1-ut))/Math.PI;return yt<0?0:yt>1?1:yt}function ze(dt,ut,yt,Lt,Rt,Nt,Vt,Zt){if(yt/=ut,Lt/=ut,Nt>=yt&&Vt<Lt)return dt;if(Vt<yt||Nt>=Lt)return null;for(var qt=[],Jt=0;Jt<dt.length;Jt++){var nr=dt[Jt],Mr=nr.geometry,Ke=nr.type,Ze=Rt===0?nr.minX:nr.minY,zt=Rt===0?nr.maxX:nr.maxY;if(Ze>=yt&&zt<Lt){qt.push(nr);continue}else if(zt<yt||Ze>=Lt)continue;var kt=[];if(Ke==="Point"||Ke==="MultiPoint")rt(Mr,kt,yt,Lt,Rt);else if(Ke==="LineString")lt(Mr,kt,yt,Lt,Rt,!1,Zt.lineMetrics);else if(Ke==="MultiLineString")Fe(Mr,kt,yt,Lt,Rt,!1);else if(Ke==="Polygon")Fe(Mr,kt,yt,Lt,Rt,!0);else if(Ke==="MultiPolygon")for(var Qt=0;Qt<Mr.length;Qt++){var cr=[];Fe(Mr[Qt],cr,yt,Lt,Rt,!0),cr.length&&kt.push(cr)}if(kt.length){if(Zt.lineMetrics&&Ke==="LineString"){for(Qt=0;Qt<kt.length;Qt++)qt.push(ht(nr.id,Ke,kt[Qt],nr.tags));continue}(Ke==="LineString"||Ke==="MultiLineString")&&(kt.length===1?(Ke="LineString",kt=kt[0]):Ke="MultiLineString"),(Ke==="Point"||Ke==="MultiPoint")&&(Ke=kt.length===3?"Point":"MultiPoint"),qt.push(ht(nr.id,Ke,kt,nr.tags))}}return qt.length?qt:null}function rt(dt,ut,yt,Lt,Rt){for(var Nt=0;Nt<dt.length;Nt+=3){var Vt=dt[Nt+Rt];Vt>=yt&&Vt<=Lt&&(ut.push(dt[Nt]),ut.push(dt[Nt+1]),ut.push(dt[Nt+2]))}}function lt(dt,ut,yt,Lt,Rt,Nt,Vt){for(var Zt=Qe(dt),qt=Rt===0?pe:we,Jt=dt.start,nr,Mr,Ke=0;Ke<dt.length-3;Ke+=3){var Ze=dt[Ke],zt=dt[Ke+1],kt=dt[Ke+2],Qt=dt[Ke+3],cr=dt[Ke+4],fr=Rt===0?Ze:zt,ir=Rt===0?Qt:cr,Yt=!1;Vt&&(nr=Math.sqrt(Math.pow(Ze-Qt,2)+Math.pow(zt-cr,2))),fr<yt?ir>yt&&(Mr=qt(Zt,Ze,zt,Qt,cr,yt),Vt&&(Zt.start=Jt+nr*Mr)):fr>Lt?ir<Lt&&(Mr=qt(Zt,Ze,zt,Qt,cr,Lt),Vt&&(Zt.start=Jt+nr*Mr)):Ce(Zt,Ze,zt,kt),ir<yt&&fr>=yt&&(Mr=qt(Zt,Ze,zt,Qt,cr,yt),Yt=!0),ir>Lt&&fr<=Lt&&(Mr=qt(Zt,Ze,zt,Qt,cr,Lt),Yt=!0),!Nt&&Yt&&(Vt&&(Zt.end=Jt+nr*Mr),ut.push(Zt),Zt=Qe(dt)),Vt&&(Jt+=nr)}var gr=dt.length-3;Ze=dt[gr],zt=dt[gr+1],kt=dt[gr+2],fr=Rt===0?Ze:zt,fr>=yt&&fr<=Lt&&Ce(Zt,Ze,zt,kt),gr=Zt.length-3,Nt&&gr>=3&&(Zt[gr]!==Zt[0]||Zt[gr+1]!==Zt[1])&&Ce(Zt,Zt[0],Zt[1],Zt[2]),Zt.length&&ut.push(Zt)}function Qe(dt){var ut=[];return ut.size=dt.size,ut.start=dt.start,ut.end=dt.end,ut}function Fe(dt,ut,yt,Lt,Rt,Nt){for(var Vt=0;Vt<dt.length;Vt++)lt(dt[Vt],ut,yt,Lt,Rt,Nt,!1)}function Ce(dt,ut,yt,Lt){dt.push(ut),dt.push(yt),dt.push(Lt)}function pe(dt,ut,yt,Lt,Rt,Nt){var Vt=(Nt-ut)/(Lt-ut);return dt.push(Nt),dt.push(yt+(Rt-yt)*Vt),dt.push(1),Vt}function we(dt,ut,yt,Lt,Rt,Nt){var Vt=(Nt-yt)/(Rt-yt);return dt.push(ut+(Lt-ut)*Vt),dt.push(Nt),dt.push(1),Vt}function Ae(dt,ut){var yt=ut.buffer/ut.extent,Lt=dt,Rt=ze(dt,1,-1-yt,yt,0,-1,2,ut),Nt=ze(dt,1,1-yt,2+yt,0,-1,2,ut);return(Rt||Nt)&&(Lt=ze(dt,1,-yt,1+yt,0,-1,2,ut)||[],Rt&&(Lt=Pe(Rt,1).concat(Lt)),Nt&&(Lt=Lt.concat(Pe(Nt,-1)))),Lt}function Pe(dt,ut){for(var yt=[],Lt=0;Lt<dt.length;Lt++){var Rt=dt[Lt],Nt=Rt.type,Vt;if(Nt==="Point"||Nt==="MultiPoint"||Nt==="LineString")Vt=Ge(Rt.geometry,ut);else if(Nt==="MultiLineString"||Nt==="Polygon"){Vt=[];for(var Zt=0;Zt<Rt.geometry.length;Zt++)Vt.push(Ge(Rt.geometry[Zt],ut))}else if(Nt==="MultiPolygon")for(Vt=[],Zt=0;Zt<Rt.geometry.length;Zt++){for(var qt=[],Jt=0;Jt<Rt.geometry[Zt].length;Jt++)qt.push(Ge(Rt.geometry[Zt][Jt],ut));Vt.push(qt)}yt.push(ht(Rt.id,Nt,Vt,Rt.tags))}return yt}function Ge(dt,ut){var yt=[];yt.size=dt.size,dt.start!==void 0&&(yt.start=dt.start,yt.end=dt.end);for(var Lt=0;Lt<dt.length;Lt+=3)yt.push(dt[Lt]+ut,dt[Lt+1],dt[Lt+2]);return yt}function We(dt,ut){if(dt.transformed)return dt;var yt=1<<dt.z,Lt=dt.x,Rt=dt.y,Nt,Vt,Zt;for(Nt=0;Nt<dt.features.length;Nt++){var qt=dt.features[Nt],Jt=qt.geometry,nr=qt.type;if(qt.geometry=[],nr===1)for(Vt=0;Vt<Jt.length;Vt+=2)qt.geometry.push(tt(Jt[Vt],Jt[Vt+1],ut,yt,Lt,Rt));else for(Vt=0;Vt<Jt.length;Vt++){var Mr=[];for(Zt=0;Zt<Jt[Vt].length;Zt+=2)Mr.push(tt(Jt[Vt][Zt],Jt[Vt][Zt+1],ut,yt,Lt,Rt));qt.geometry.push(Mr)}}return dt.transformed=!0,dt}function tt(dt,ut,yt,Lt,Rt,Nt){return[Math.round(yt*(dt*Lt-Rt)),Math.round(yt*(ut*Lt-Nt))]}function ct(dt,ut,yt,Lt,Rt){for(var Nt=ut===Rt.maxZoom?0:Rt.tolerance/((1<<ut)*Rt.extent),Vt={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:yt,y:Lt,z:ut,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},Zt=0;Zt<dt.length;Zt++){Vt.numFeatures++,St(Vt,dt[Zt],Nt,Rt);var qt=dt[Zt].minX,Jt=dt[Zt].minY,nr=dt[Zt].maxX,Mr=dt[Zt].maxY;qt<Vt.minX&&(Vt.minX=qt),Jt<Vt.minY&&(Vt.minY=Jt),nr>Vt.maxX&&(Vt.maxX=nr),Mr>Vt.maxY&&(Vt.maxY=Mr)}return Vt}function St(dt,ut,yt,Lt){var Rt=ut.geometry,Nt=ut.type,Vt=[];if(Nt==="Point"||Nt==="MultiPoint")for(var Zt=0;Zt<Rt.length;Zt+=3)Vt.push(Rt[Zt]),Vt.push(Rt[Zt+1]),dt.numPoints++,dt.numSimplified++;else if(Nt==="LineString")Pt(Vt,Rt,dt,yt,!1,!1);else if(Nt==="MultiLineString"||Nt==="Polygon")for(Zt=0;Zt<Rt.length;Zt++)Pt(Vt,Rt[Zt],dt,yt,Nt==="Polygon",Zt===0);else if(Nt==="MultiPolygon")for(var qt=0;qt<Rt.length;qt++){var Jt=Rt[qt];for(Zt=0;Zt<Jt.length;Zt++)Pt(Vt,Jt[Zt],dt,yt,!0,Zt===0)}if(Vt.length){var nr=ut.tags||null;if(Nt==="LineString"&&Lt.lineMetrics){nr={};for(var Mr in ut.tags)nr[Mr]=ut.tags[Mr];nr.mapbox_clip_start=Rt.start/Rt.size,nr.mapbox_clip_end=Rt.end/Rt.size}var Ke={geometry:Vt,type:Nt==="Polygon"||Nt==="MultiPolygon"?3:Nt==="LineString"||Nt==="MultiLineString"?2:1,tags:nr};ut.id!==null&&(Ke.id=ut.id),dt.features.push(Ke)}}function Pt(dt,ut,yt,Lt,Rt,Nt){var Vt=Lt*Lt;if(Lt>0&&ut.size<(Rt?Vt:Lt)){yt.numPoints+=ut.length/3;return}for(var Zt=[],qt=0;qt<ut.length;qt+=3)(Lt===0||ut[qt+2]>Vt)&&(yt.numSimplified++,Zt.push(ut[qt]),Zt.push(ut[qt+1])),yt.numPoints++;Rt&&wt(Zt,Nt),dt.push(Zt)}function wt(dt,ut){for(var yt=0,Lt=0,Rt=dt.length,Nt=Rt-2;Lt<Rt;Nt=Lt,Lt+=2)yt+=(dt[Lt]-dt[Nt])*(dt[Lt+1]+dt[Nt+1]);if(yt>0===ut)for(Lt=0,Rt=dt.length;Lt<Rt/2;Lt+=2){var Vt=dt[Lt],Zt=dt[Lt+1];dt[Lt]=dt[Rt-2-Lt],dt[Lt+1]=dt[Rt-1-Lt],dt[Rt-2-Lt]=Vt,dt[Rt-1-Lt]=Zt}}function Bt(dt,ut){return new Wt(dt,ut)}function Wt(dt,ut){ut=this.options=gt(Object.create(this.options),ut);var yt=ut.debug;if(yt&&console.time("preprocess data"),ut.maxZoom<0||ut.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(ut.promoteId&&ut.generateId)throw new Error("promoteId and generateId cannot be used together.");var Lt=nt(dt,ut);this.tiles={},this.tileCoords=[],yt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",ut.indexMaxZoom,ut.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Lt=Ae(Lt,ut),Lt.length&&this.splitTile(Lt,0,0,0),yt&&(Lt.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)))}Wt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Wt.prototype.splitTile=function(dt,ut,yt,Lt,Rt,Nt,Vt){for(var Zt=[dt,ut,yt,Lt],qt=this.options,Jt=qt.debug;Zt.length;){Lt=Zt.pop(),yt=Zt.pop(),ut=Zt.pop(),dt=Zt.pop();var nr=1<<ut,Mr=hr(ut,yt,Lt),Ke=this.tiles[Mr];if(!Ke&&(Jt>1&&console.time("creation"),Ke=this.tiles[Mr]=ct(dt,ut,yt,Lt,qt),this.tileCoords.push({z:ut,x:yt,y:Lt}),Jt)){Jt>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",ut,yt,Lt,Ke.numFeatures,Ke.numPoints,Ke.numSimplified),console.timeEnd("creation"));var Ze="z"+ut;this.stats[Ze]=(this.stats[Ze]||0)+1,this.total++}if(Ke.source=dt,Rt){if(ut===qt.maxZoom||ut===Rt)continue;var zt=1<<Rt-ut;if(yt!==Math.floor(Nt/zt)||Lt!==Math.floor(Vt/zt))continue}else if(ut===qt.indexMaxZoom||Ke.numPoints<=qt.indexMaxPoints)continue;if(Ke.source=null,dt.length!==0){Jt>1&&console.time("clipping");var kt=.5*qt.buffer/qt.extent,Qt=.5-kt,cr=.5+kt,fr=1+kt,ir,Yt,gr,yr,Tr,pr;ir=Yt=gr=yr=null,Tr=ze(dt,nr,yt-kt,yt+cr,0,Ke.minX,Ke.maxX,qt),pr=ze(dt,nr,yt+Qt,yt+fr,0,Ke.minX,Ke.maxX,qt),dt=null,Tr&&(ir=ze(Tr,nr,Lt-kt,Lt+cr,1,Ke.minY,Ke.maxY,qt),Yt=ze(Tr,nr,Lt+Qt,Lt+fr,1,Ke.minY,Ke.maxY,qt),Tr=null),pr&&(gr=ze(pr,nr,Lt-kt,Lt+cr,1,Ke.minY,Ke.maxY,qt),yr=ze(pr,nr,Lt+Qt,Lt+fr,1,Ke.minY,Ke.maxY,qt),pr=null),Jt>1&&console.timeEnd("clipping"),Zt.push(ir||[],ut+1,yt*2,Lt*2),Zt.push(Yt||[],ut+1,yt*2,Lt*2+1),Zt.push(gr||[],ut+1,yt*2+1,Lt*2),Zt.push(yr||[],ut+1,yt*2+1,Lt*2+1)}}},Wt.prototype.getTile=function(dt,ut,yt){var Lt=this.options,Rt=Lt.extent,Nt=Lt.debug;if(dt<0||dt>24)return null;var Vt=1<<dt;ut=(ut%Vt+Vt)%Vt;var Zt=hr(dt,ut,yt);if(this.tiles[Zt])return We(this.tiles[Zt],Rt);Nt>1&&console.log("drilling down to z%d-%d-%d",dt,ut,yt);for(var qt=dt,Jt=ut,nr=yt,Mr;!Mr&&qt>0;)qt--,Jt=Math.floor(Jt/2),nr=Math.floor(nr/2),Mr=this.tiles[hr(qt,Jt,nr)];return!Mr||!Mr.source?null:(Nt>1&&console.log("found parent tile z%d-%d-%d",qt,Jt,nr),Nt>1&&console.time("drilling down"),this.splitTile(Mr.source,qt,Jt,nr,dt,ut,yt),Nt>1&&console.timeEnd("drilling down"),this.tiles[Zt]?We(this.tiles[Zt],Rt):null)};function hr(dt,ut,yt){return((1<<dt)*yt+ut)*32+dt}function gt(dt,ut){for(var yt in ut)dt[yt]=ut[yt];return dt}function jt(dt,ut){var yt=dt.tileID.canonical;if(!this._geoJSONIndex)return ut(null,null);var Lt=this._geoJSONIndex.getTile(yt.z,yt.x,yt.y);if(!Lt)return ut(null,null);var Rt=new L(Lt.features),Nt=o(Rt);(Nt.byteOffset!==0||Nt.byteLength!==Nt.buffer.byteLength)&&(Nt=new Uint8Array(Nt)),ut(null,{vectorTile:Rt,rawData:Nt.buffer})}var Ut=function(dt){function ut(yt,Lt,Rt,Nt){dt.call(this,yt,Lt,Rt,jt),Nt&&(this.loadGeoJSON=Nt)}return dt&&(ut.__proto__=dt),ut.prototype=Object.create(dt&&dt.prototype),ut.prototype.constructor=ut,ut.prototype.loadData=function(Lt,Rt){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=Rt,this._pendingLoadDataParams=Lt,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},ut.prototype._loadData=function(){var Lt=this;if(!(!this._pendingCallback||!this._pendingLoadDataParams)){var Rt=this._pendingCallback,Nt=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var Vt=Nt&&Nt.request&&Nt.request.collectResourceTiming?new a.RequestPerformance(Nt.request):!1;this.loadGeoJSON(Nt,function(Zt,qt){if(Zt||!qt)return Rt(Zt);if(typeof qt!="object")return Rt(new Error("Input data given to '"+Nt.source+"' is not a valid GeoJSON object."));p(qt,!0);try{Lt._geoJSONIndex=Nt.cluster?new le(or(Nt)).load(qt.features):Bt(qt,Nt.geojsonVtOptions)}catch(Mr){return Rt(Mr)}Lt.loaded={};var Jt={};if(Vt){var nr=Vt.finish();nr&&(Jt.resourceTiming={},Jt.resourceTiming[Nt.source]=JSON.parse(JSON.stringify(nr)))}Rt(null,Jt)})}},ut.prototype.coalesce=function(){this._state==="Coalescing"?this._state="Idle":this._state==="NeedsLoadData"&&(this._state="Coalescing",this._loadData())},ut.prototype.reloadTile=function(Lt,Rt){var Nt=this.loaded,Vt=Lt.uid;return Nt&&Nt[Vt]?dt.prototype.reloadTile.call(this,Lt,Rt):this.loadTile(Lt,Rt)},ut.prototype.loadGeoJSON=function(Lt,Rt){if(Lt.request)a.getJSON(Lt.request,Rt);else if(typeof Lt.data=="string")try{return Rt(null,JSON.parse(Lt.data))}catch{return Rt(new Error("Input data given to '"+Lt.source+"' is not a valid GeoJSON object."))}else return Rt(new Error("Input data given to '"+Lt.source+"' is not a valid GeoJSON object."))},ut.prototype.removeSource=function(Lt,Rt){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),Rt()},ut.prototype.getClusterExpansionZoom=function(Lt,Rt){try{Rt(null,this._geoJSONIndex.getClusterExpansionZoom(Lt.clusterId))}catch(Nt){Rt(Nt)}},ut.prototype.getClusterChildren=function(Lt,Rt){try{Rt(null,this._geoJSONIndex.getChildren(Lt.clusterId))}catch(Nt){Rt(Nt)}},ut.prototype.getClusterLeaves=function(Lt,Rt){try{Rt(null,this._geoJSONIndex.getLeaves(Lt.clusterId,Lt.limit,Lt.offset))}catch(Nt){Rt(Nt)}},ut}(g);function or(dt){var ut=dt.superclusterOptions,yt=dt.clusterProperties;if(!yt||!ut)return ut;for(var Lt={},Rt={},Nt={accumulated:null,zoom:0},Vt={properties:null},Zt=Object.keys(yt),qt=0,Jt=Zt;qt<Jt.length;qt+=1){var nr=Jt[qt],Mr=yt[nr],Ke=Mr[0],Ze=Mr[1],zt=a.createExpression(Ze),kt=a.createExpression(typeof Ke=="string"?[Ke,["accumulated"],["get",nr]]:Ke);Lt[nr]=zt.value,Rt[nr]=kt.value}return ut.map=function(Qt){Vt.properties=Qt;for(var cr={},fr=0,ir=Zt;fr<ir.length;fr+=1){var Yt=ir[fr];cr[Yt]=Lt[Yt].evaluate(Nt,Vt)}return cr},ut.reduce=function(Qt,cr){Vt.properties=cr;for(var fr=0,ir=Zt;fr<ir.length;fr+=1){var Yt=ir[fr];Nt.accumulated=Qt[Yt],Qt[Yt]=Rt[Yt].evaluate(Nt,Vt)}},ut}var ur=function(ut){var yt=this;this.self=ut,this.actor=new a.Actor(ut,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:g,geojson:Ut},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(Lt,Rt){if(yt.workerSourceTypes[Lt])throw new Error('Worker source with name "'+Lt+'" already registered.');yt.workerSourceTypes[Lt]=Rt},this.self.registerRTLTextPlugin=function(Lt){if(a.plugin.isParsed())throw new Error("RTL text plugin already registered.");a.plugin.applyArabicShaping=Lt.applyArabicShaping,a.plugin.processBidirectionalText=Lt.processBidirectionalText,a.plugin.processStyledBidirectionalText=Lt.processStyledBidirectionalText}};return ur.prototype.setReferrer=function(ut,yt){this.referrer=yt},ur.prototype.setImages=function(ut,yt,Lt){this.availableImages[ut]=yt;for(var Rt in this.workerSources[ut]){var Nt=this.workerSources[ut][Rt];for(var Vt in Nt)Nt[Vt].availableImages=yt}Lt()},ur.prototype.setLayers=function(ut,yt,Lt){this.getLayerIndex(ut).replace(yt),Lt()},ur.prototype.updateLayers=function(ut,yt,Lt){this.getLayerIndex(ut).update(yt.layers,yt.removedIds),Lt()},ur.prototype.loadTile=function(ut,yt,Lt){this.getWorkerSource(ut,yt.type,yt.source).loadTile(yt,Lt)},ur.prototype.loadDEMTile=function(ut,yt,Lt){this.getDEMWorkerSource(ut,yt.source).loadTile(yt,Lt)},ur.prototype.reloadTile=function(ut,yt,Lt){this.getWorkerSource(ut,yt.type,yt.source).reloadTile(yt,Lt)},ur.prototype.abortTile=function(ut,yt,Lt){this.getWorkerSource(ut,yt.type,yt.source).abortTile(yt,Lt)},ur.prototype.removeTile=function(ut,yt,Lt){this.getWorkerSource(ut,yt.type,yt.source).removeTile(yt,Lt)},ur.prototype.removeDEMTile=function(ut,yt){this.getDEMWorkerSource(ut,yt.source).removeTile(yt)},ur.prototype.removeSource=function(ut,yt,Lt){if(!(!this.workerSources[ut]||!this.workerSources[ut][yt.type]||!this.workerSources[ut][yt.type][yt.source])){var Rt=this.workerSources[ut][yt.type][yt.source];delete this.workerSources[ut][yt.type][yt.source],Rt.removeSource!==void 0?Rt.removeSource(yt,Lt):Lt()}},ur.prototype.loadWorkerSource=function(ut,yt,Lt){try{this.self.importScripts(yt.url),Lt()}catch(Rt){Lt(Rt.toString())}},ur.prototype.syncRTLPluginState=function(ut,yt,Lt){try{a.plugin.setState(yt);var Rt=a.plugin.getPluginURL();if(a.plugin.isLoaded()&&!a.plugin.isParsed()&&Rt!=null){this.self.importScripts(Rt);var Nt=a.plugin.isParsed(),Vt=Nt?void 0:new Error("RTL Text Plugin failed to import scripts from "+Rt);Lt(Vt,Nt)}}catch(Zt){Lt(Zt.toString())}},ur.prototype.getAvailableImages=function(ut){var yt=this.availableImages[ut];return yt||(yt=[]),yt},ur.prototype.getLayerIndex=function(ut){var yt=this.layerIndexes[ut];return yt||(yt=this.layerIndexes[ut]=new y),yt},ur.prototype.getWorkerSource=function(ut,yt,Lt){var Rt=this;if(this.workerSources[ut]||(this.workerSources[ut]={}),this.workerSources[ut][yt]||(this.workerSources[ut][yt]={}),!this.workerSources[ut][yt][Lt]){var Nt={send:function(Vt,Zt,qt){Rt.actor.send(Vt,Zt,qt,ut)}};this.workerSources[ut][yt][Lt]=new this.workerSourceTypes[yt](Nt,this.getLayerIndex(ut),this.getAvailableImages(ut))}return this.workerSources[ut][yt][Lt]},ur.prototype.getDEMWorkerSource=function(ut,yt){return this.demWorkerSources[ut]||(this.demWorkerSources[ut]={}),this.demWorkerSources[ut][yt]||(this.demWorkerSources[ut][yt]=new b),this.demWorkerSources[ut][yt]},ur.prototype.enforceCacheSizeLimit=function(ut,yt){a.enforceCacheSizeLimit(yt)},typeof WorkerGlobalScope<"u"&&typeof a.window<"u"&&a.window instanceof WorkerGlobalScope&&(a.window.worker=new ur(a.window)),ur}),P(["./shared"],function(a){var _=a.createCommonjsModule(function(ge){ge.exports?ge.exports=J:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=J,window.mapboxgl.notSupportedReason=me);function J(Vr){return!me(Vr)}function me(Vr){if(!ae())return"not a browser";if(!be())return"insufficent Array support";if(!ke())return"insufficient Function support";if(!je())return"insufficient Object support";if(!vt())return"insufficient JSON support";if(!Mt())return"insufficient worker support";if(!Gt())return"insufficient Uint8ClampedArray support";if(!er())return"insufficient ArrayBuffer support";if(!vr())return"insufficient Canvas/getImageData support";if(!Fr(Vr&&Vr.failIfMajorPerformanceCaveat))return"insufficient WebGL support"}function ae(){return typeof window<"u"&&typeof document<"u"}function be(){return Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray}function ke(){return Function.prototype&&Function.prototype.bind}function je(){return Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions}function vt(){return"JSON"in window&&"parse"in JSON&&"stringify"in JSON}function Mt(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var Vr=new Blob([""],{type:"text/javascript"}),Qr=URL.createObjectURL(Vr),ln,Cn;try{Cn=new Worker(Qr),ln=!0}catch{ln=!1}return Cn&&Cn.terminate(),URL.revokeObjectURL(Qr),ln}function Gt(){return"Uint8ClampedArray"in window}function er(){return ArrayBuffer.isView}function vr(){var Vr=document.createElement("canvas");Vr.width=Vr.height=1;var Qr=Vr.getContext("2d");if(!Qr)return!1;var ln=Qr.getImageData(0,0,1,1);return ln&&ln.width===Vr.width}var br={};function Fr(Vr){return br[Vr]===void 0&&(br[Vr]=Wr(Vr)),br[Vr]}J.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};function Gr(Vr){var Qr=document.createElement("canvas"),ln=Object.create(J.webGLContextAttributes);return ln.failIfMajorPerformanceCaveat=Vr,Qr.probablySupportsContext?Qr.probablySupportsContext("webgl",ln)||Qr.probablySupportsContext("experimental-webgl",ln):Qr.supportsContext?Qr.supportsContext("webgl",ln)||Qr.supportsContext("experimental-webgl",ln):Qr.getContext("webgl",ln)||Qr.getContext("experimental-webgl",ln)}function Wr(Vr){var Qr=Gr(Vr);if(!Qr)return!1;var ln=Qr.createShader(Qr.VERTEX_SHADER);return!ln||Qr.isContextLost()?!1:(Qr.shaderSource(ln,"void main() {}"),Qr.compileShader(ln),Qr.getShaderParameter(ln,Qr.COMPILE_STATUS)===!0)}}),x={};x.create=function(ge,J,me){var ae=a.window.document.createElement(ge);return J!==void 0&&(ae.className=J),me&&me.appendChild(ae),ae},x.createNS=function(ge,J){var me=a.window.document.createElementNS(ge,J);return me};var v=a.window.document.documentElement.style;function y(ge){if(!v)return ge[0];for(var J=0;J<ge.length;J++)if(ge[J]in v)return ge[J];return ge[0]}var r=y(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),n;x.disableDrag=function(){v&&r&&(n=v[r],v[r]="none")},x.enableDrag=function(){v&&r&&(v[r]=n)};var u=y(["transform","WebkitTransform"]);x.setTransform=function(ge,J){ge.style[u]=J};var i=!1;try{var f=Object.defineProperty({},"passive",{get:function(){i=!0}});a.window.addEventListener("test",f,f),a.window.removeEventListener("test",f,f)}catch{i=!1}x.addEventListener=function(ge,J,me,ae){ae===void 0&&(ae={}),"passive"in ae&&i?ge.addEventListener(J,me,ae):ge.addEventListener(J,me,ae.capture)},x.removeEventListener=function(ge,J,me,ae){ae===void 0&&(ae={}),"passive"in ae&&i?ge.removeEventListener(J,me,ae):ge.removeEventListener(J,me,ae.capture)};var g=function(ge){ge.preventDefault(),ge.stopPropagation(),a.window.removeEventListener("click",g,!0)};x.suppressClick=function(){a.window.addEventListener("click",g,!0),a.window.setTimeout(function(){a.window.removeEventListener("click",g,!0)},0)},x.mousePos=function(ge,J){var me=ge.getBoundingClientRect();return new a.Point(J.clientX-me.left-ge.clientLeft,J.clientY-me.top-ge.clientTop)},x.touchPos=function(ge,J){for(var me=ge.getBoundingClientRect(),ae=[],be=0;be<J.length;be++)ae.push(new a.Point(J[be].clientX-me.left-ge.clientLeft,J[be].clientY-me.top-ge.clientTop));return ae},x.mouseButton=function(ge){return typeof a.window.InstallTrigger<"u"&&ge.button===2&&ge.ctrlKey&&a.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:ge.button},x.remove=function(ge){ge.parentNode&&ge.parentNode.removeChild(ge)};function h(ge,J,me){var ae,be,ke,je=a.browser.devicePixelRatio>1?"@2x":"",vt=a.getJSON(J.transformRequest(J.normalizeSpriteURL(ge,je,".json"),a.ResourceType.SpriteJSON),function(er,vr){vt=null,ke||(ke=er,ae=vr,Gt())}),Mt=a.getImage(J.transformRequest(J.normalizeSpriteURL(ge,je,".png"),a.ResourceType.SpriteImage),function(er,vr){Mt=null,ke||(ke=er,be=vr,Gt())});function Gt(){if(ke)me(ke);else if(ae&&be){var er=a.browser.getImageData(be),vr={};for(var br in ae){var Fr=ae[br],Gr=Fr.width,Wr=Fr.height,Vr=Fr.x,Qr=Fr.y,ln=Fr.sdf,Cn=Fr.pixelRatio,On=Fr.stretchX,Xn=Fr.stretchY,jn=Fr.content,Zn=new a.RGBAImage({width:Gr,height:Wr});a.RGBAImage.copy(er,Zn,{x:Vr,y:Qr},{x:0,y:0},{width:Gr,height:Wr}),vr[br]={data:Zn,pixelRatio:Cn,sdf:ln,stretchX:On,stretchY:Xn,content:jn}}me(null,vr)}}return{cancel:function(){vt&&(vt.cancel(),vt=null),Mt&&(Mt.cancel(),Mt=null)}}}function b(ge){var J=ge.userImage;if(J&&J.render){var me=J.render();if(me)return ge.data.replace(new Uint8Array(J.data.buffer)),!0}return!1}var p=1,E=function(ge){function J(){ge.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 ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.isLoaded=function(){return this.loaded},J.prototype.setLoaded=function(ae){if(this.loaded!==ae&&(this.loaded=ae,ae)){for(var be=0,ke=this.requestors;be<ke.length;be+=1){var je=ke[be],vt=je.ids,Mt=je.callback;this._notify(vt,Mt)}this.requestors=[]}},J.prototype.getImage=function(ae){return this.images[ae]},J.prototype.addImage=function(ae,be){this._validate(ae,be)&&(this.images[ae]=be)},J.prototype._validate=function(ae,be){var ke=!0;return this._validateStretch(be.stretchX,be.data&&be.data.width)||(this.fire(new a.ErrorEvent(new Error('Image "'+ae+'" has invalid "stretchX" value'))),ke=!1),this._validateStretch(be.stretchY,be.data&&be.data.height)||(this.fire(new a.ErrorEvent(new Error('Image "'+ae+'" has invalid "stretchY" value'))),ke=!1),this._validateContent(be.content,be)||(this.fire(new a.ErrorEvent(new Error('Image "'+ae+'" has invalid "content" value'))),ke=!1),ke},J.prototype._validateStretch=function(ae,be){if(!ae)return!0;for(var ke=0,je=0,vt=ae;je<vt.length;je+=1){var Mt=vt[je];if(Mt[0]<ke||Mt[1]<Mt[0]||be<Mt[1])return!1;ke=Mt[1]}return!0},J.prototype._validateContent=function(ae,be){return ae?!(ae.length!==4||ae[0]<0||be.data.width<ae[0]||ae[1]<0||be.data.height<ae[1]||ae[2]<0||be.data.width<ae[2]||ae[3]<0||be.data.height<ae[3]||ae[2]<ae[0]||ae[3]<ae[1]):!0},J.prototype.updateImage=function(ae,be){var ke=this.images[ae];be.version=ke.version+1,this.images[ae]=be,this.updatedImages[ae]=!0},J.prototype.removeImage=function(ae){var be=this.images[ae];delete this.images[ae],delete this.patterns[ae],be.userImage&&be.userImage.onRemove&&be.userImage.onRemove()},J.prototype.listImages=function(){return Object.keys(this.images)},J.prototype.getImages=function(ae,be){var ke=!0;if(!this.isLoaded())for(var je=0,vt=ae;je<vt.length;je+=1){var Mt=vt[je];this.images[Mt]||(ke=!1)}this.isLoaded()||ke?this._notify(ae,be):this.requestors.push({ids:ae,callback:be})},J.prototype._notify=function(ae,be){for(var ke={},je=0,vt=ae;je<vt.length;je+=1){var Mt=vt[je];this.images[Mt]||this.fire(new a.Event("styleimagemissing",{id:Mt}));var Gt=this.images[Mt];Gt?ke[Mt]={data:Gt.data.clone(),pixelRatio:Gt.pixelRatio,sdf:Gt.sdf,version:Gt.version,stretchX:Gt.stretchX,stretchY:Gt.stretchY,content:Gt.content,hasRenderCallback:Boolean(Gt.userImage&&Gt.userImage.render)}:a.warnOnce('Image "'+Mt+'" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.')}be(null,ke)},J.prototype.getPixelSize=function(){var ae=this.atlasImage,be=ae.width,ke=ae.height;return{width:be,height:ke}},J.prototype.getPattern=function(ae){var be=this.patterns[ae],ke=this.getImage(ae);if(!ke)return null;if(be&&be.position.version===ke.version)return be.position;if(be)be.position.version=ke.version;else{var je=ke.data.width+p*2,vt=ke.data.height+p*2,Mt={w:je,h:vt,x:0,y:0},Gt=new a.ImagePosition(Mt,ke);this.patterns[ae]={bin:Mt,position:Gt}}return this._updatePatternAtlas(),this.patterns[ae].position},J.prototype.bind=function(ae){var be=ae.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new a.Texture(ae,this.atlasImage,be.RGBA),this.atlasTexture.bind(be.LINEAR,be.CLAMP_TO_EDGE)},J.prototype._updatePatternAtlas=function(){var ae=[];for(var be in this.patterns)ae.push(this.patterns[be].bin);var ke=a.potpack(ae),je=ke.w,vt=ke.h,Mt=this.atlasImage;Mt.resize({width:je||1,height:vt||1});for(var Gt in this.patterns){var er=this.patterns[Gt],vr=er.bin,br=vr.x+p,Fr=vr.y+p,Gr=this.images[Gt].data,Wr=Gr.width,Vr=Gr.height;a.RGBAImage.copy(Gr,Mt,{x:0,y:0},{x:br,y:Fr},{width:Wr,height:Vr}),a.RGBAImage.copy(Gr,Mt,{x:0,y:Vr-1},{x:br,y:Fr-1},{width:Wr,height:1}),a.RGBAImage.copy(Gr,Mt,{x:0,y:0},{x:br,y:Fr+Vr},{width:Wr,height:1}),a.RGBAImage.copy(Gr,Mt,{x:Wr-1,y:0},{x:br-1,y:Fr},{width:1,height:Vr}),a.RGBAImage.copy(Gr,Mt,{x:0,y:0},{x:br+Wr,y:Fr},{width:1,height:Vr})}this.dirty=!0},J.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},J.prototype.dispatchRenderCallbacks=function(ae){for(var be=0,ke=ae;be<ke.length;be+=1){var je=ke[be];if(!this.callbackDispatchedThisFrame[je]){this.callbackDispatchedThisFrame[je]=!0;var vt=this.images[je],Mt=b(vt);Mt&&this.updateImage(je,vt)}}},J}(a.Evented);function c(ge,J,me,ae,be){var ke=J*256,je=ke+255,vt=ae.transformRequest(ae.normalizeGlyphsURL(me).replace("{fontstack}",ge).replace("{range}",ke+"-"+je),a.ResourceType.Glyphs);a.getArrayBuffer(vt,function(Mt,Gt){if(Mt)be(Mt);else if(Gt){for(var er={},vr=0,br=a.parseGlyphPBF(Gt);vr<br.length;vr+=1){var Fr=br[vr];er[Fr.id]=Fr}be(null,er)}})}var l=L,m=L,M=1e20;function L(ge,J,me,ae,be,ke){this.fontSize=ge||24,this.buffer=J===void 0?3:J,this.cutoff=ae||.25,this.fontFamily=be||"sans-serif",this.fontWeight=ke||"normal",this.radius=me||8;var je=this.size=this.fontSize+this.buffer*2;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=je,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(je*je),this.gridInner=new Float64Array(je*je),this.f=new Float64Array(je),this.d=new Float64Array(je),this.z=new Float64Array(je+1),this.v=new Int16Array(je),this.middle=Math.round(je/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}L.prototype.draw=function(ge){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(ge,this.buffer,this.middle);for(var J=this.ctx.getImageData(0,0,this.size,this.size),me=new Uint8ClampedArray(this.size*this.size),ae=0;ae<this.size*this.size;ae++){var be=J.data[ae*4+3]/255;this.gridOuter[ae]=be===1?0:be===0?M:Math.pow(Math.max(0,.5-be),2),this.gridInner[ae]=be===1?M:be===0?0:Math.pow(Math.max(0,be-.5),2)}for(D(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),D(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),ae=0;ae<this.size*this.size;ae++){var ke=this.gridOuter[ae]-this.gridInner[ae];me[ae]=Math.max(0,Math.min(255,Math.round(255-255*(ke/this.radius+this.cutoff))))}return me};function D(ge,J,me,ae,be,ke,je){for(var vt=0;vt<J;vt++){for(var Mt=0;Mt<me;Mt++)ae[Mt]=ge[Mt*J+vt];for(A(ae,be,ke,je,me),Mt=0;Mt<me;Mt++)ge[Mt*J+vt]=be[Mt]}for(Mt=0;Mt<me;Mt++){for(vt=0;vt<J;vt++)ae[vt]=ge[Mt*J+vt];for(A(ae,be,ke,je,J),vt=0;vt<J;vt++)ge[Mt*J+vt]=Math.sqrt(be[vt])}}function A(ge,J,me,ae,be){me[0]=0,ae[0]=-M,ae[1]=+M;for(var ke=1,je=0;ke<be;ke++){for(var vt=(ge[ke]+ke*ke-(ge[me[je]]+me[je]*me[je]))/(2*ke-2*me[je]);vt<=ae[je];)je--,vt=(ge[ke]+ke*ke-(ge[me[je]]+me[je]*me[je]))/(2*ke-2*me[je]);je++,me[je]=ke,ae[je]=vt,ae[je+1]=+M}for(ke=0,je=0;ke<be;ke++){for(;ae[je+1]<ke;)je++;J[ke]=(ke-me[je])*(ke-me[je])+ge[me[je]]}}l.default=m;var C=function(J,me){this.requestManager=J,this.localIdeographFontFamily=me,this.entries={}};C.prototype.setURL=function(J){this.url=J},C.prototype.getGlyphs=function(J,me){var ae=this,be=[];for(var ke in J)for(var je=0,vt=J[ke];je<vt.length;je+=1){var Mt=vt[je];be.push({stack:ke,id:Mt})}a.asyncAll(be,function(Gt,er){var vr=Gt.stack,br=Gt.id,Fr=ae.entries[vr];Fr||(Fr=ae.entries[vr]={glyphs:{},requests:{},ranges:{}});var Gr=Fr.glyphs[br];if(Gr!==void 0){er(null,{stack:vr,id:br,glyph:Gr});return}if(Gr=ae._tinySDF(Fr,vr,br),Gr){Fr.glyphs[br]=Gr,er(null,{stack:vr,id:br,glyph:Gr});return}var Wr=Math.floor(br/256);if(Wr*256>65535){er(new Error("glyphs > 65535 not supported"));return}if(Fr.ranges[Wr]){er(null,{stack:vr,id:br,glyph:Gr});return}var Vr=Fr.requests[Wr];Vr||(Vr=Fr.requests[Wr]=[],C.loadGlyphRange(vr,Wr,ae.url,ae.requestManager,function(Qr,ln){if(ln){for(var Cn in ln)ae._doesCharSupportLocalGlyph(+Cn)||(Fr.glyphs[+Cn]=ln[+Cn]);Fr.ranges[Wr]=!0}for(var On=0,Xn=Vr;On<Xn.length;On+=1){var jn=Xn[On];jn(Qr,ln)}delete Fr.requests[Wr]})),Vr.push(function(Qr,ln){Qr?er(Qr):ln&&er(null,{stack:vr,id:br,glyph:ln[br]||null})})},function(Gt,er){if(Gt)me(Gt);else if(er){for(var vr={},br=0,Fr=er;br<Fr.length;br+=1){var Gr=Fr[br],Wr=Gr.stack,Vr=Gr.id,Qr=Gr.glyph;(vr[Wr]||(vr[Wr]={}))[Vr]=Qr&&{id:Qr.id,bitmap:Qr.bitmap.clone(),metrics:Qr.metrics}}me(null,vr)}})},C.prototype._doesCharSupportLocalGlyph=function(J){return!!this.localIdeographFontFamily&&(a.isChar["CJK Unified Ideographs"](J)||a.isChar["Hangul Syllables"](J)||a.isChar.Hiragana(J)||a.isChar.Katakana(J))},C.prototype._tinySDF=function(J,me,ae){var be=this.localIdeographFontFamily;if(be&&this._doesCharSupportLocalGlyph(ae)){var ke=J.tinySDF;if(!ke){var je="400";/bold/i.test(me)?je="900":/medium/i.test(me)?je="500":/light/i.test(me)&&(je="200"),ke=J.tinySDF=new C.TinySDF(24,3,8,.25,be,je)}return{id:ae,bitmap:new a.AlphaImage({width:30,height:30},ke.draw(String.fromCharCode(ae))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},C.loadGlyphRange=c,C.TinySDF=l;var S=function(){this.specification=a.styleSpec.light.position};S.prototype.possiblyEvaluate=function(J,me){return a.sphericalToCartesian(J.expression.evaluate(me))},S.prototype.interpolate=function(J,me,ae){return{x:a.number(J.x,me.x,ae),y:a.number(J.y,me.y,ae),z:a.number(J.z,me.z,ae)}};var o=new a.Properties({anchor:new a.DataConstantProperty(a.styleSpec.light.anchor),position:new S,color:new a.DataConstantProperty(a.styleSpec.light.color),intensity:new a.DataConstantProperty(a.styleSpec.light.intensity)}),R="-transition",T=function(ge){function J(me){ge.call(this),this._transitionable=new a.Transitionable(o),this.setLight(me),this._transitioning=this._transitionable.untransitioned()}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getLight=function(){return this._transitionable.serialize()},J.prototype.setLight=function(ae,be){if(be===void 0&&(be={}),!this._validate(a.validateLight,ae,be))for(var ke in ae){var je=ae[ke];a.endsWith(ke,R)?this._transitionable.setTransition(ke.slice(0,-R.length),je):this._transitionable.setValue(ke,je)}},J.prototype.updateTransitions=function(ae){this._transitioning=this._transitionable.transitioned(ae,this._transitioning)},J.prototype.hasTransition=function(){return this._transitioning.hasTransition()},J.prototype.recalculate=function(ae){this.properties=this._transitioning.possiblyEvaluate(ae)},J.prototype._validate=function(ae,be,ke){return ke&&ke.validate===!1?!1:a.emitValidationErrors(this,ae.call(a.validateStyle,a.extend({value:be,style:{glyphs:!0,sprite:!0},styleSpec:a.styleSpec})))},J}(a.Evented),O=function(J,me){this.width=J,this.height=me,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};O.prototype.getDash=function(J,me){var ae=J.join(",")+String(me);return this.dashEntry[ae]||(this.dashEntry[ae]=this.addDash(J,me)),this.dashEntry[ae]},O.prototype.getDashRanges=function(J,me,ae){var be=J.length%2===1,ke=[],je=be?-J[J.length-1]*ae:0,vt=J[0]*ae,Mt=!0;ke.push({left:je,right:vt,isDash:Mt,zeroLength:J[0]===0});for(var Gt=J[0],er=1;er<J.length;er++){Mt=!Mt;var vr=J[er];je=Gt*ae,Gt+=vr,vt=Gt*ae,ke.push({left:je,right:vt,isDash:Mt,zeroLength:vr===0})}return ke},O.prototype.addRoundDash=function(J,me,ae){for(var be=me/2,ke=-ae;ke<=ae;ke++)for(var je=this.nextRow+ae+ke,vt=this.width*je,Mt=0,Gt=J[Mt],er=0;er<this.width;er++){er/Gt.right>1&&(Gt=J[++Mt]);var vr=Math.abs(er-Gt.left),br=Math.abs(er-Gt.right),Fr=Math.min(vr,br),Gr=void 0,Wr=ke/ae*(be+1);if(Gt.isDash){var Vr=be-Math.abs(Wr);Gr=Math.sqrt(Fr*Fr+Vr*Vr)}else Gr=be-Math.sqrt(Fr*Fr+Wr*Wr);this.data[vt+er]=Math.max(0,Math.min(255,Gr+128))}},O.prototype.addRegularDash=function(J){for(var me=J.length-1;me>=0;--me){var ae=J[me],be=J[me+1];ae.zeroLength?J.splice(me,1):be&&be.isDash===ae.isDash&&(be.left=ae.left,J.splice(me,1))}var ke=J[0],je=J[J.length-1];ke.isDash===je.isDash&&(ke.left=je.left-this.width,je.right=ke.right+this.width);for(var vt=this.width*this.nextRow,Mt=0,Gt=J[Mt],er=0;er<this.width;er++){er/Gt.right>1&&(Gt=J[++Mt]);var vr=Math.abs(er-Gt.left),br=Math.abs(er-Gt.right),Fr=Math.min(vr,br),Gr=Gt.isDash?Fr:-Fr;this.data[vt+er]=Math.max(0,Math.min(255,Gr+128))}},O.prototype.addDash=function(J,me){var ae=me?7:0,be=2*ae+1;if(this.nextRow+be>this.height)return a.warnOnce("LineAtlas out of space"),null;for(var ke=0,je=0;je<J.length;je++)ke+=J[je];if(ke!==0){var vt=this.width/ke,Mt=this.getDashRanges(J,this.width,vt);me?this.addRoundDash(Mt,vt,ae):this.addRegularDash(Mt)}var Gt={y:(this.nextRow+ae+.5)/this.height,height:2*ae/this.height,width:ke};return this.nextRow+=be,this.dirty=!0,Gt},O.prototype.bind=function(J){var me=J.gl;this.texture?(me.bindTexture(me.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,me.texSubImage2D(me.TEXTURE_2D,0,0,0,this.width,this.height,me.ALPHA,me.UNSIGNED_BYTE,this.data))):(this.texture=me.createTexture(),me.bindTexture(me.TEXTURE_2D,this.texture),me.texParameteri(me.TEXTURE_2D,me.TEXTURE_WRAP_S,me.REPEAT),me.texParameteri(me.TEXTURE_2D,me.TEXTURE_WRAP_T,me.REPEAT),me.texParameteri(me.TEXTURE_2D,me.TEXTURE_MIN_FILTER,me.LINEAR),me.texParameteri(me.TEXTURE_2D,me.TEXTURE_MAG_FILTER,me.LINEAR),me.texImage2D(me.TEXTURE_2D,0,me.ALPHA,this.width,this.height,0,me.ALPHA,me.UNSIGNED_BYTE,this.data))};var N=function ge(J,me){this.workerPool=J,this.actors=[],this.currentActor=0,this.id=a.uniqueId();for(var ae=this.workerPool.acquire(this.id),be=0;be<ae.length;be++){var ke=ae[be],je=new ge.Actor(ke,me,this.id);je.name="Worker "+be,this.actors.push(je)}};N.prototype.broadcast=function(J,me,ae){ae=ae||function(){},a.asyncAll(this.actors,function(be,ke){be.send(J,me,ke)},ae)},N.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},N.prototype.remove=function(){this.actors.forEach(function(J){J.remove()}),this.actors=[],this.workerPool.release(this.id)},N.Actor=a.Actor;function H(ge,J,me){var ae=function(be,ke){if(be)return me(be);if(ke){var je=a.pick(a.extend(ke,ge),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);ke.vector_layers&&(je.vectorLayers=ke.vector_layers,je.vectorLayerIds=je.vectorLayers.map(function(vt){return vt.id})),je.tiles=J.canonicalizeTileset(je,ge.url),me(null,je)}};return ge.url?a.getJSON(J.transformRequest(J.normalizeSourceURL(ge.url),a.ResourceType.Source),ae):a.browser.frame(function(){return ae(null,ge)})}var k=function(J,me,ae){this.bounds=a.LngLatBounds.convert(this.validateBounds(J)),this.minzoom=me||0,this.maxzoom=ae||24};k.prototype.validateBounds=function(J){return!Array.isArray(J)||J.length!==4?[-180,-90,180,90]:[Math.max(-180,J[0]),Math.max(-90,J[1]),Math.min(180,J[2]),Math.min(90,J[3])]},k.prototype.contains=function(J){var me=Math.pow(2,J.z),ae={minX:Math.floor(a.mercatorXfromLng(this.bounds.getWest())*me),minY:Math.floor(a.mercatorYfromLat(this.bounds.getNorth())*me),maxX:Math.ceil(a.mercatorXfromLng(this.bounds.getEast())*me),maxY:Math.ceil(a.mercatorYfromLat(this.bounds.getSouth())*me)},be=J.x>=ae.minX&&J.x<ae.maxX&&J.y>=ae.minY&&J.y<ae.maxY;return be};var V=function(ge){function J(me,ae,be,ke){if(ge.call(this),this.id=me,this.dispatcher=be,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,a.extend(this,a.pick(ae,["url","scheme","tileSize","promoteId"])),this._options=a.extend({type:"vector"},ae),this._collectResourceTiming=ae.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(ke)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.load=function(){var ae=this;this._loaded=!1,this.fire(new a.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=H(this._options,this.map._requestManager,function(be,ke){ae._tileJSONRequest=null,ae._loaded=!0,be?ae.fire(new a.ErrorEvent(be)):ke&&(a.extend(ae,ke),ke.bounds&&(ae.tileBounds=new k(ke.bounds,ae.minzoom,ae.maxzoom)),a.postTurnstileEvent(ke.tiles,ae.map._requestManager._customAccessToken),a.postMapLoadEvent(ke.tiles,ae.map._getMapId(),ae.map._requestManager._skuToken,ae.map._requestManager._customAccessToken),ae.fire(new a.Event("data",{dataType:"source",sourceDataType:"metadata"})),ae.fire(new a.Event("data",{dataType:"source",sourceDataType:"content"})))})},J.prototype.loaded=function(){return this._loaded},J.prototype.hasTile=function(ae){return!this.tileBounds||this.tileBounds.contains(ae.canonical)},J.prototype.onAdd=function(ae){this.map=ae,this.load()},J.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},J.prototype.serialize=function(){return a.extend({},this._options)},J.prototype.loadTile=function(ae,be){var ke=this.map._requestManager.normalizeTileURL(ae.tileID.canonical.url(this.tiles,this.scheme)),je={request:this.map._requestManager.transformRequest(ke,a.ResourceType.Tile),uid:ae.uid,tileID:ae.tileID,zoom:ae.tileID.overscaledZ,tileSize:this.tileSize*ae.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:a.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};je.request.collectResourceTiming=this._collectResourceTiming,!ae.actor||ae.state==="expired"?(ae.actor=this.dispatcher.getActor(),ae.request=ae.actor.send("loadTile",je,vt.bind(this))):ae.state==="loading"?ae.reloadCallback=be:ae.request=ae.actor.send("reloadTile",je,vt.bind(this));function vt(Mt,Gt){if(delete ae.request,ae.aborted)return be(null);if(Mt&&Mt.status!==404)return be(Mt);Gt&&Gt.resourceTiming&&(ae.resourceTiming=Gt.resourceTiming),this.map._refreshExpiredTiles&&Gt&&ae.setExpiryData(Gt),ae.loadVectorData(Gt,this.map.painter),a.cacheEntryPossiblyAdded(this.dispatcher),be(null),ae.reloadCallback&&(this.loadTile(ae,ae.reloadCallback),ae.reloadCallback=null)}},J.prototype.abortTile=function(ae){ae.request&&(ae.request.cancel(),delete ae.request),ae.actor&&ae.actor.send("abortTile",{uid:ae.uid,type:this.type,source:this.id},void 0)},J.prototype.unloadTile=function(ae){ae.unloadVectorData(),ae.actor&&ae.actor.send("removeTile",{uid:ae.uid,type:this.type,source:this.id},void 0)},J.prototype.hasTransition=function(){return!1},J}(a.Evented),G=function(ge){function J(me,ae,be,ke){ge.call(this),this.id=me,this.dispatcher=be,this.setEventedParent(ke),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=a.extend({type:"raster"},ae),a.extend(this,a.pick(ae,["url","scheme","tileSize"]))}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.load=function(){var ae=this;this._loaded=!1,this.fire(new a.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=H(this._options,this.map._requestManager,function(be,ke){ae._tileJSONRequest=null,ae._loaded=!0,be?ae.fire(new a.ErrorEvent(be)):ke&&(a.extend(ae,ke),ke.bounds&&(ae.tileBounds=new k(ke.bounds,ae.minzoom,ae.maxzoom)),a.postTurnstileEvent(ke.tiles),a.postMapLoadEvent(ke.tiles,ae.map._getMapId(),ae.map._requestManager._skuToken),ae.fire(new a.Event("data",{dataType:"source",sourceDataType:"metadata"})),ae.fire(new a.Event("data",{dataType:"source",sourceDataType:"content"})))})},J.prototype.loaded=function(){return this._loaded},J.prototype.onAdd=function(ae){this.map=ae,this.load()},J.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},J.prototype.serialize=function(){return a.extend({},this._options)},J.prototype.hasTile=function(ae){return!this.tileBounds||this.tileBounds.contains(ae.canonical)},J.prototype.loadTile=function(ae,be){var ke=this,je=this.map._requestManager.normalizeTileURL(ae.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);ae.request=a.getImage(this.map._requestManager.transformRequest(je,a.ResourceType.Tile),function(vt,Mt){if(delete ae.request,ae.aborted)ae.state="unloaded",be(null);else if(vt)ae.state="errored",be(vt);else if(Mt){ke.map._refreshExpiredTiles&&ae.setExpiryData(Mt),delete Mt.cacheControl,delete Mt.expires;var Gt=ke.map.painter.context,er=Gt.gl;ae.texture=ke.map.painter.getTileTexture(Mt.width),ae.texture?ae.texture.update(Mt,{useMipmap:!0}):(ae.texture=new a.Texture(Gt,Mt,er.RGBA,{useMipmap:!0}),ae.texture.bind(er.LINEAR,er.CLAMP_TO_EDGE,er.LINEAR_MIPMAP_NEAREST),Gt.extTextureFilterAnisotropic&&er.texParameterf(er.TEXTURE_2D,Gt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Gt.extTextureFilterAnisotropicMax)),ae.state="loaded",a.cacheEntryPossiblyAdded(ke.dispatcher),be(null)}})},J.prototype.abortTile=function(ae,be){ae.request&&(ae.request.cancel(),delete ae.request),be()},J.prototype.unloadTile=function(ae,be){ae.texture&&this.map.painter.saveTileTexture(ae.texture),be()},J.prototype.hasTransition=function(){return!1},J}(a.Evented),U=function(ge){function J(me,ae,be,ke){ge.call(this,me,ae,be,ke),this.type="raster-dem",this.maxzoom=22,this._options=a.extend({type:"raster-dem"},ae),this.encoding=ae.encoding||"mapbox"}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},J.prototype.loadTile=function(ae,be){var ke=this.map._requestManager.normalizeTileURL(ae.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);ae.request=a.getImage(this.map._requestManager.transformRequest(ke,a.ResourceType.Tile),je.bind(this)),ae.neighboringTiles=this._getNeighboringTiles(ae.tileID);function je(Mt,Gt){if(delete ae.request,ae.aborted)ae.state="unloaded",be(null);else if(Mt)ae.state="errored",be(Mt);else if(Gt){this.map._refreshExpiredTiles&&ae.setExpiryData(Gt),delete Gt.cacheControl,delete Gt.expires;var er=a.window.ImageBitmap&&Gt instanceof a.window.ImageBitmap&&a.offscreenCanvasSupported(),vr=er?Gt:a.browser.getImageData(Gt,1),br={uid:ae.uid,coord:ae.tileID,source:this.id,rawImageData:vr,encoding:this.encoding};(!ae.actor||ae.state==="expired")&&(ae.actor=this.dispatcher.getActor(),ae.actor.send("loadDEMTile",br,vt.bind(this)))}}function vt(Mt,Gt){Mt&&(ae.state="errored",be(Mt)),Gt&&(ae.dem=Gt,ae.needsHillshadePrepare=!0,ae.state="loaded",be(null))}},J.prototype._getNeighboringTiles=function(ae){var be=ae.canonical,ke=Math.pow(2,be.z),je=(be.x-1+ke)%ke,vt=be.x===0?ae.wrap-1:ae.wrap,Mt=(be.x+1+ke)%ke,Gt=be.x+1===ke?ae.wrap+1:ae.wrap,er={};return er[new a.OverscaledTileID(ae.overscaledZ,vt,be.z,je,be.y).key]={backfilled:!1},er[new a.OverscaledTileID(ae.overscaledZ,Gt,be.z,Mt,be.y).key]={backfilled:!1},be.y>0&&(er[new a.OverscaledTileID(ae.overscaledZ,vt,be.z,je,be.y-1).key]={backfilled:!1},er[new a.OverscaledTileID(ae.overscaledZ,ae.wrap,be.z,be.x,be.y-1).key]={backfilled:!1},er[new a.OverscaledTileID(ae.overscaledZ,Gt,be.z,Mt,be.y-1).key]={backfilled:!1}),be.y+1<ke&&(er[new a.OverscaledTileID(ae.overscaledZ,vt,be.z,je,be.y+1).key]={backfilled:!1},er[new a.OverscaledTileID(ae.overscaledZ,ae.wrap,be.z,be.x,be.y+1).key]={backfilled:!1},er[new a.OverscaledTileID(ae.overscaledZ,Gt,be.z,Mt,be.y+1).key]={backfilled:!1}),er},J.prototype.unloadTile=function(ae){ae.demTexture&&this.map.painter.saveTileTexture(ae.demTexture),ae.fbo&&(ae.fbo.destroy(),delete ae.fbo),ae.dem&&delete ae.dem,delete ae.neighboringTiles,ae.state="unloaded",ae.actor&&ae.actor.send("removeDEMTile",{uid:ae.uid,source:this.id})},J}(G),Y=function(ge){function J(me,ae,be,ke){ge.call(this),this.id=me,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=be.getActor(),this.setEventedParent(ke),this._data=ae.data,this._options=a.extend({},ae),this._collectResourceTiming=ae.collectResourceTiming,this._resourceTiming=[],ae.maxzoom!==void 0&&(this.maxzoom=ae.maxzoom),ae.type&&(this.type=ae.type),ae.attribution&&(this.attribution=ae.attribution),this.promoteId=ae.promoteId;var je=a.EXTENT/this.tileSize;this.workerOptions=a.extend({source:this.id,cluster:ae.cluster||!1,geojsonVtOptions:{buffer:(ae.buffer!==void 0?ae.buffer:128)*je,tolerance:(ae.tolerance!==void 0?ae.tolerance:.375)*je,extent:a.EXTENT,maxZoom:this.maxzoom,lineMetrics:ae.lineMetrics||!1,generateId:ae.generateId||!1},superclusterOptions:{maxZoom:ae.clusterMaxZoom!==void 0?Math.min(ae.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:a.EXTENT,radius:(ae.clusterRadius||50)*je,log:!1,generateId:ae.generateId||!1},clusterProperties:ae.clusterProperties},ae.workerOptions)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.load=function(){var ae=this;this.fire(new a.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(be){if(be){ae.fire(new a.ErrorEvent(be));return}var ke={dataType:"source",sourceDataType:"metadata"};ae._collectResourceTiming&&ae._resourceTiming&&ae._resourceTiming.length>0&&(ke.resourceTiming=ae._resourceTiming,ae._resourceTiming=[]),ae.fire(new a.Event("data",ke))})},J.prototype.onAdd=function(ae){this.map=ae,this.load()},J.prototype.setData=function(ae){var be=this;return this._data=ae,this.fire(new a.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(ke){if(ke){be.fire(new a.ErrorEvent(ke));return}var je={dataType:"source",sourceDataType:"content"};be._collectResourceTiming&&be._resourceTiming&&be._resourceTiming.length>0&&(je.resourceTiming=be._resourceTiming,be._resourceTiming=[]),be.fire(new a.Event("data",je))}),this},J.prototype.getClusterExpansionZoom=function(ae,be){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:ae,source:this.id},be),this},J.prototype.getClusterChildren=function(ae,be){return this.actor.send("geojson.getClusterChildren",{clusterId:ae,source:this.id},be),this},J.prototype.getClusterLeaves=function(ae,be,ke,je){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:ae,limit:be,offset:ke},je),this},J.prototype._updateWorkerData=function(ae){var be=this;this._loaded=!1;var ke=a.extend({},this.workerOptions),je=this._data;typeof je=="string"?(ke.request=this.map._requestManager.transformRequest(a.browser.resolveURL(je),a.ResourceType.Source),ke.request.collectResourceTiming=this._collectResourceTiming):ke.data=JSON.stringify(je),this.actor.send(this.type+".loadData",ke,function(vt,Mt){be._removed||Mt&&Mt.abandoned||(be._loaded=!0,Mt&&Mt.resourceTiming&&Mt.resourceTiming[be.id]&&(be._resourceTiming=Mt.resourceTiming[be.id].slice(0)),be.actor.send(be.type+".coalesce",{source:ke.source},null),ae(vt))})},J.prototype.loaded=function(){return this._loaded},J.prototype.loadTile=function(ae,be){var ke=this,je=ae.actor?"reloadTile":"loadTile";ae.actor=this.actor;var vt={type:this.type,uid:ae.uid,tileID:ae.tileID,zoom:ae.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:a.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};ae.request=this.actor.send(je,vt,function(Mt,Gt){return delete ae.request,ae.unloadVectorData(),ae.aborted?be(null):Mt?be(Mt):(ae.loadVectorData(Gt,ke.map.painter,je==="reloadTile"),be(null))})},J.prototype.abortTile=function(ae){ae.request&&(ae.request.cancel(),delete ae.request),ae.aborted=!0},J.prototype.unloadTile=function(ae){ae.unloadVectorData(),this.actor.send("removeTile",{uid:ae.uid,type:this.type,source:this.id})},J.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},J.prototype.serialize=function(){return a.extend({},this._options,{type:this.type,data:this._data})},J.prototype.hasTransition=function(){return!1},J}(a.Evented),ee=a.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),re=function(ge){function J(me,ae,be,ke){ge.call(this),this.id=me,this.dispatcher=be,this.coordinates=ae.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(ke),this.options=ae}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.load=function(ae,be){var ke=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(je,vt){ke._loaded=!0,je?ke.fire(new a.ErrorEvent(je)):vt&&(ke.image=vt,ae&&(ke.coordinates=ae),be&&be(),ke._finishLoading())})},J.prototype.loaded=function(){return this._loaded},J.prototype.updateImage=function(ae){var be=this;return!this.image||!ae.url?this:(this.options.url=ae.url,this.load(ae.coordinates,function(){be.texture=null}),this)},J.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"metadata"})))},J.prototype.onAdd=function(ae){this.map=ae,this.load()},J.prototype.setCoordinates=function(ae){var be=this;this.coordinates=ae;var ke=ae.map(a.MercatorCoordinate.fromLngLat);this.tileID=ie(ke),this.minzoom=this.maxzoom=this.tileID.z;var je=ke.map(function(vt){return be.tileID.getTilePoint(vt)._round()});return this._boundsArray=new a.StructArrayLayout4i8,this._boundsArray.emplaceBack(je[0].x,je[0].y,0,0),this._boundsArray.emplaceBack(je[1].x,je[1].y,a.EXTENT,0),this._boundsArray.emplaceBack(je[3].x,je[3].y,0,a.EXTENT),this._boundsArray.emplaceBack(je[2].x,je[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},J.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var ae=this.map.painter.context,be=ae.gl;this.boundsBuffer||(this.boundsBuffer=ae.createVertexBuffer(this._boundsArray,ee.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new a.Texture(ae,this.image,be.RGBA),this.texture.bind(be.LINEAR,be.CLAMP_TO_EDGE));for(var ke in this.tiles){var je=this.tiles[ke];je.state!=="loaded"&&(je.state="loaded",je.texture=this.texture)}}},J.prototype.loadTile=function(ae,be){this.tileID&&this.tileID.equals(ae.tileID.canonical)?(this.tiles[String(ae.tileID.wrap)]=ae,ae.buckets={},be(null)):(ae.state="errored",be(null))},J.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},J.prototype.hasTransition=function(){return!1},J}(a.Evented);function ie(ge){for(var J=1/0,me=1/0,ae=-1/0,be=-1/0,ke=0,je=ge;ke<je.length;ke+=1){var vt=je[ke];J=Math.min(J,vt.x),me=Math.min(me,vt.y),ae=Math.max(ae,vt.x),be=Math.max(be,vt.y)}var Mt=ae-J,Gt=be-me,er=Math.max(Mt,Gt),vr=Math.max(0,Math.floor(-Math.log(er)/Math.LN2)),br=Math.pow(2,vr);return new a.CanonicalTileID(vr,Math.floor((J+ae)/2*br),Math.floor((me+be)/2*br))}var se=function(ge){function J(me,ae,be,ke){ge.call(this,me,ae,be,ke),this.roundZoom=!0,this.type="video",this.options=ae}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.load=function(){var ae=this;this._loaded=!1;var be=this.options;this.urls=[];for(var ke=0,je=be.urls;ke<je.length;ke+=1){var vt=je[ke];this.urls.push(this.map._requestManager.transformRequest(vt,a.ResourceType.Source).url)}a.getVideo(this.urls,function(Mt,Gt){ae._loaded=!0,Mt?ae.fire(new a.ErrorEvent(Mt)):Gt&&(ae.video=Gt,ae.video.loop=!0,ae.video.addEventListener("playing",function(){ae.map.triggerRepaint()}),ae.map&&ae.video.play(),ae._finishLoading())})},J.prototype.pause=function(){this.video&&this.video.pause()},J.prototype.play=function(){this.video&&this.video.play()},J.prototype.seek=function(ae){if(this.video){var be=this.video.seekable;ae<be.start(0)||ae>be.end(0)?this.fire(new a.ErrorEvent(new a.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+be.start(0)+" and "+be.end(0)+"-second mark."))):this.video.currentTime=ae}},J.prototype.getVideo=function(){return this.video},J.prototype.onAdd=function(ae){this.map||(this.map=ae,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},J.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var ae=this.map.painter.context,be=ae.gl;this.boundsBuffer||(this.boundsBuffer=ae.createVertexBuffer(this._boundsArray,ee.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(be.LINEAR,be.CLAMP_TO_EDGE),be.texSubImage2D(be.TEXTURE_2D,0,0,0,be.RGBA,be.UNSIGNED_BYTE,this.video)):(this.texture=new a.Texture(ae,this.video,be.RGBA),this.texture.bind(be.LINEAR,be.CLAMP_TO_EDGE));for(var ke in this.tiles){var je=this.tiles[ke];je.state!=="loaded"&&(je.state="loaded",je.texture=this.texture)}}},J.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},J.prototype.hasTransition=function(){return this.video&&!this.video.paused},J}(re),ce=function(ge){function J(me,ae,be,ke){ge.call(this,me,ae,be,ke),ae.coordinates?(!Array.isArray(ae.coordinates)||ae.coordinates.length!==4||ae.coordinates.some(function(je){return!Array.isArray(je)||je.length!==2||je.some(function(vt){return typeof vt!="number"})}))&&this.fire(new a.ErrorEvent(new a.ValidationError("sources."+me,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new a.ErrorEvent(new a.ValidationError("sources."+me,null,'missing required property "coordinates"'))),ae.animate&&typeof ae.animate!="boolean"&&this.fire(new a.ErrorEvent(new a.ValidationError("sources."+me,null,'optional "animate" property must be a boolean value'))),ae.canvas?typeof ae.canvas!="string"&&!(ae.canvas instanceof a.window.HTMLCanvasElement)&&this.fire(new a.ErrorEvent(new a.ValidationError("sources."+me,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."+me,null,'missing required property "canvas"'))),this.options=ae,this.animate=ae.animate!==void 0?ae.animate:!0}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.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()},J.prototype.getCanvas=function(){return this.canvas},J.prototype.onAdd=function(ae){this.map=ae,this.load(),this.canvas&&this.animate&&this.play()},J.prototype.onRemove=function(){this.pause()},J.prototype.prepare=function(){var ae=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,ae=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,ae=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var be=this.map.painter.context,ke=be.gl;this.boundsBuffer||(this.boundsBuffer=be.createVertexBuffer(this._boundsArray,ee.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(ae||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new a.Texture(be,this.canvas,ke.RGBA,{premultiply:!0});for(var je in this.tiles){var vt=this.tiles[je];vt.state!=="loaded"&&(vt.state="loaded",vt.texture=this.texture)}}},J.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},J.prototype.hasTransition=function(){return this._playing},J.prototype._hasInvalidDimensions=function(){for(var ae=0,be=[this.canvas.width,this.canvas.height];ae<be.length;ae+=1){var ke=be[ae];if(isNaN(ke)||ke<=0)return!0}return!1},J}(re),q={vector:V,raster:G,"raster-dem":U,geojson:Y,video:se,image:re,canvas:ce},j=function(ge,J,me,ae){var be=new q[J.type](ge,J,me,ae);if(be.id!==ge)throw new Error("Expected Source id to be "+ge+" instead of "+be.id);return a.bindAll(["load","abort","unload","serialize","prepare"],be),be},Z=function(ge){return q[ge]},Q=function(ge,J){q[ge]=J};function ue(ge,J){var me=a.identity([]);return a.translate(me,me,[1,1,0]),a.scale(me,me,[ge.width*.5,ge.height*.5,1]),a.multiply(me,me,ge.calculatePosMatrix(J.toUnwrapped()))}function fe(ge,J,me){if(ge)for(var ae=0,be=ge;ae<be.length;ae+=1){var ke=be[ae],je=J[ke];if(je&&je.source===me&&je.type==="fill-extrusion")return!0}else for(var vt in J){var Mt=J[vt];if(Mt.source===me&&Mt.type==="fill-extrusion")return!0}return!1}function te(ge,J,me,ae,be,ke){var je=fe(be&&be.layers,J,ge.id),vt=ke.maxPitchScaleFactor(),Mt=ge.tilesIn(ae,vt,je);Mt.sort(le);for(var Gt=[],er=0,vr=Mt;er<vr.length;er+=1){var br=vr[er];Gt.push({wrappedTileID:br.tileID.wrapped().key,queryResults:br.tile.queryRenderedFeatures(J,me,ge._state,br.queryGeometry,br.cameraQueryGeometry,br.scale,be,ke,vt,ue(ge.transform,br.tileID))})}var Fr=xe(Gt);for(var Gr in Fr)Fr[Gr].forEach(function(Wr){var Vr=Wr.feature,Qr=ge.getFeatureState(Vr.layer["source-layer"],Vr.id);Vr.source=Vr.layer.source,Vr.layer["source-layer"]&&(Vr.sourceLayer=Vr.layer["source-layer"]),Vr.state=Qr});return Fr}function ne(ge,J,me,ae,be,ke,je){for(var vt={},Mt=ke.queryRenderedSymbols(ae),Gt=[],er=0,vr=Object.keys(Mt).map(Number);er<vr.length;er+=1){var br=vr[er];Gt.push(je[br])}Gt.sort(le);for(var Fr=function(){var ln=Wr[Gr],Cn=ln.featureIndex.lookupSymbolFeatures(Mt[ln.bucketInstanceId],J,ln.bucketIndex,ln.sourceLayerIndex,be.filter,be.layers,be.availableImages,ge);for(var On in Cn){var Xn=vt[On]=vt[On]||[],jn=Cn[On];jn.sort(function(fa,ya){var Ta=ln.featureSortOrder;if(Ta){var ka=Ta.indexOf(fa.featureIndex),Ya=Ta.indexOf(ya.featureIndex);return Ya-ka}else return ya.featureIndex-fa.featureIndex});for(var Zn=0,ra=jn;Zn<ra.length;Zn+=1){var ca=ra[Zn];Xn.push(ca)}}},Gr=0,Wr=Gt;Gr<Wr.length;Gr+=1)Fr();var Vr=function(ln){vt[ln].forEach(function(Cn){var On=Cn.feature,Xn=ge[ln],jn=me[Xn.source],Zn=jn.getFeatureState(On.layer["source-layer"],On.id);On.source=On.layer.source,On.layer["source-layer"]&&(On.sourceLayer=On.layer["source-layer"]),On.state=Zn})};for(var Qr in vt)Vr(Qr);return vt}function ve(ge,J){for(var me=ge.getRenderableIds().map(function(Mt){return ge.getTileByID(Mt)}),ae=[],be={},ke=0;ke<me.length;ke++){var je=me[ke],vt=je.tileID.canonical.key;be[vt]||(be[vt]=!0,je.querySourceFeatures(ae,J))}return ae}function le(ge,J){var me=ge.tileID,ae=J.tileID;return me.overscaledZ-ae.overscaledZ||me.canonical.y-ae.canonical.y||me.wrap-ae.wrap||me.canonical.x-ae.canonical.x}function xe(ge){for(var J={},me={},ae=0,be=ge;ae<be.length;ae+=1){var ke=be[ae],je=ke.queryResults,vt=ke.wrappedTileID,Mt=me[vt]=me[vt]||{};for(var Gt in je)for(var er=je[Gt],vr=Mt[Gt]=Mt[Gt]||{},br=J[Gt]=J[Gt]||[],Fr=0,Gr=er;Fr<Gr.length;Fr+=1){var Wr=Gr[Fr];vr[Wr.featureIndex]||(vr[Wr.featureIndex]=!0,br.push(Wr))}}return J}var Se=function(J,me){this.max=J,this.onRemove=me,this.reset()};Se.prototype.reset=function(){for(var J in this.data)for(var me=0,ae=this.data[J];me<ae.length;me+=1){var be=ae[me];be.timeout&&clearTimeout(be.timeout),this.onRemove(be.value)}return this.data={},this.order=[],this},Se.prototype.add=function(J,me,ae){var be=this,ke=J.wrapped().key;this.data[ke]===void 0&&(this.data[ke]=[]);var je={value:me,timeout:void 0};if(ae!==void 0&&(je.timeout=setTimeout(function(){be.remove(J,je)},ae)),this.data[ke].push(je),this.order.push(ke),this.order.length>this.max){var vt=this._getAndRemoveByKey(this.order[0]);vt&&this.onRemove(vt)}return this},Se.prototype.has=function(J){return J.wrapped().key in this.data},Se.prototype.getAndRemove=function(J){return this.has(J)?this._getAndRemoveByKey(J.wrapped().key):null},Se.prototype._getAndRemoveByKey=function(J){var me=this.data[J].shift();return me.timeout&&clearTimeout(me.timeout),this.data[J].length===0&&delete this.data[J],this.order.splice(this.order.indexOf(J),1),me.value},Se.prototype.getByKey=function(J){var me=this.data[J];return me?me[0].value:null},Se.prototype.get=function(J){if(!this.has(J))return null;var me=this.data[J.wrapped().key][0];return me.value},Se.prototype.remove=function(J,me){if(!this.has(J))return this;var ae=J.wrapped().key,be=me===void 0?0:this.data[ae].indexOf(me),ke=this.data[ae][be];return this.data[ae].splice(be,1),ke.timeout&&clearTimeout(ke.timeout),this.data[ae].length===0&&delete this.data[ae],this.onRemove(ke.value),this.order.splice(this.order.indexOf(ae),1),this},Se.prototype.setMaxSize=function(J){for(this.max=J;this.order.length>this.max;){var me=this._getAndRemoveByKey(this.order[0]);me&&this.onRemove(me)}return this},Se.prototype.filter=function(J){var me=[];for(var ae in this.data)for(var be=0,ke=this.data[ae];be<ke.length;be+=1){var je=ke[be];J(je.value)||me.push(je)}for(var vt=0,Mt=me;vt<Mt.length;vt+=1){var Gt=Mt[vt];this.remove(Gt.value.tileID,Gt)}};var Re=function(J,me,ae){this.context=J;var be=J.gl;this.buffer=be.createBuffer(),this.dynamicDraw=Boolean(ae),this.context.unbindVAO(),J.bindElementBuffer.set(this.buffer),be.bufferData(be.ELEMENT_ARRAY_BUFFER,me.arrayBuffer,this.dynamicDraw?be.DYNAMIC_DRAW:be.STATIC_DRAW),this.dynamicDraw||delete me.arrayBuffer};Re.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},Re.prototype.updateData=function(J){var me=this.context.gl;this.context.unbindVAO(),this.bind(),me.bufferSubData(me.ELEMENT_ARRAY_BUFFER,0,J.arrayBuffer)},Re.prototype.destroy=function(){var J=this.context.gl;this.buffer&&(J.deleteBuffer(this.buffer),delete this.buffer)};var Ee={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},Oe=function(J,me,ae,be){this.length=me.length,this.attributes=ae,this.itemSize=me.bytesPerElement,this.dynamicDraw=be,this.context=J;var ke=J.gl;this.buffer=ke.createBuffer(),J.bindVertexBuffer.set(this.buffer),ke.bufferData(ke.ARRAY_BUFFER,me.arrayBuffer,this.dynamicDraw?ke.DYNAMIC_DRAW:ke.STATIC_DRAW),this.dynamicDraw||delete me.arrayBuffer};Oe.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},Oe.prototype.updateData=function(J){var me=this.context.gl;this.bind(),me.bufferSubData(me.ARRAY_BUFFER,0,J.arrayBuffer)},Oe.prototype.enableAttributes=function(J,me){for(var ae=0;ae<this.attributes.length;ae++){var be=this.attributes[ae],ke=me.attributes[be.name];ke!==void 0&&J.enableVertexAttribArray(ke)}},Oe.prototype.setVertexAttribPointers=function(J,me,ae){for(var be=0;be<this.attributes.length;be++){var ke=this.attributes[be],je=me.attributes[ke.name];je!==void 0&&J.vertexAttribPointer(je,ke.components,J[Ee[ke.type]],!1,this.itemSize,ke.offset+this.itemSize*(ae||0))}},Oe.prototype.destroy=function(){var J=this.context.gl;this.buffer&&(J.deleteBuffer(this.buffer),delete this.buffer)};var Be=function(J){this.gl=J.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};Be.prototype.get=function(){return this.current},Be.prototype.set=function(J){},Be.prototype.getDefault=function(){return this.default},Be.prototype.setDefault=function(){this.set(this.default)};var Le=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return a.Color.transparent},J.prototype.set=function(ae){var be=this.current;ae.r===be.r&&ae.g===be.g&&ae.b===be.b&&ae.a===be.a&&!this.dirty||(this.gl.clearColor(ae.r,ae.g,ae.b,ae.a),this.current=ae,this.dirty=!1)},J}(Be),Te=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return 1},J.prototype.set=function(ae){ae===this.current&&!this.dirty||(this.gl.clearDepth(ae),this.current=ae,this.dirty=!1)},J}(Be),De=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return 0},J.prototype.set=function(ae){ae===this.current&&!this.dirty||(this.gl.clearStencil(ae),this.current=ae,this.dirty=!1)},J}(Be),Ve=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return[!0,!0,!0,!0]},J.prototype.set=function(ae){var be=this.current;ae[0]===be[0]&&ae[1]===be[1]&&ae[2]===be[2]&&ae[3]===be[3]&&!this.dirty||(this.gl.colorMask(ae[0],ae[1],ae[2],ae[3]),this.current=ae,this.dirty=!1)},J}(Be),Ye=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return!0},J.prototype.set=function(ae){ae===this.current&&!this.dirty||(this.gl.depthMask(ae),this.current=ae,this.dirty=!1)},J}(Be),Ne=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return 255},J.prototype.set=function(ae){ae===this.current&&!this.dirty||(this.gl.stencilMask(ae),this.current=ae,this.dirty=!1)},J}(Be),Xe=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},J.prototype.set=function(ae){var be=this.current;ae.func===be.func&&ae.ref===be.ref&&ae.mask===be.mask&&!this.dirty||(this.gl.stencilFunc(ae.func,ae.ref,ae.mask),this.current=ae,this.dirty=!1)},J}(Be),ht=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){var ae=this.gl;return[ae.KEEP,ae.KEEP,ae.KEEP]},J.prototype.set=function(ae){var be=this.current;ae[0]===be[0]&&ae[1]===be[1]&&ae[2]===be[2]&&!this.dirty||(this.gl.stencilOp(ae[0],ae[1],ae[2]),this.current=ae,this.dirty=!1)},J}(Be),st=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return!1},J.prototype.set=function(ae){if(!(ae===this.current&&!this.dirty)){var be=this.gl;ae?be.enable(be.STENCIL_TEST):be.disable(be.STENCIL_TEST),this.current=ae,this.dirty=!1}},J}(Be),it=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return[0,1]},J.prototype.set=function(ae){var be=this.current;ae[0]===be[0]&&ae[1]===be[1]&&!this.dirty||(this.gl.depthRange(ae[0],ae[1]),this.current=ae,this.dirty=!1)},J}(Be),nt=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return!1},J.prototype.set=function(ae){if(!(ae===this.current&&!this.dirty)){var be=this.gl;ae?be.enable(be.DEPTH_TEST):be.disable(be.DEPTH_TEST),this.current=ae,this.dirty=!1}},J}(Be),pt=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return this.gl.LESS},J.prototype.set=function(ae){ae===this.current&&!this.dirty||(this.gl.depthFunc(ae),this.current=ae,this.dirty=!1)},J}(Be),Tt=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return!1},J.prototype.set=function(ae){if(!(ae===this.current&&!this.dirty)){var be=this.gl;ae?be.enable(be.BLEND):be.disable(be.BLEND),this.current=ae,this.dirty=!1}},J}(Be),Et=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){var ae=this.gl;return[ae.ONE,ae.ZERO]},J.prototype.set=function(ae){var be=this.current;ae[0]===be[0]&&ae[1]===be[1]&&!this.dirty||(this.gl.blendFunc(ae[0],ae[1]),this.current=ae,this.dirty=!1)},J}(Be),Dt=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return a.Color.transparent},J.prototype.set=function(ae){var be=this.current;ae.r===be.r&&ae.g===be.g&&ae.b===be.b&&ae.a===be.a&&!this.dirty||(this.gl.blendColor(ae.r,ae.g,ae.b,ae.a),this.current=ae,this.dirty=!1)},J}(Be),et=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return this.gl.FUNC_ADD},J.prototype.set=function(ae){ae===this.current&&!this.dirty||(this.gl.blendEquation(ae),this.current=ae,this.dirty=!1)},J}(Be),Ue=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return!1},J.prototype.set=function(ae){if(!(ae===this.current&&!this.dirty)){var be=this.gl;ae?be.enable(be.CULL_FACE):be.disable(be.CULL_FACE),this.current=ae,this.dirty=!1}},J}(Be),ze=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return this.gl.BACK},J.prototype.set=function(ae){ae===this.current&&!this.dirty||(this.gl.cullFace(ae),this.current=ae,this.dirty=!1)},J}(Be),rt=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return this.gl.CCW},J.prototype.set=function(ae){ae===this.current&&!this.dirty||(this.gl.frontFace(ae),this.current=ae,this.dirty=!1)},J}(Be),lt=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return null},J.prototype.set=function(ae){ae===this.current&&!this.dirty||(this.gl.useProgram(ae),this.current=ae,this.dirty=!1)},J}(Be),Qe=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return this.gl.TEXTURE0},J.prototype.set=function(ae){ae===this.current&&!this.dirty||(this.gl.activeTexture(ae),this.current=ae,this.dirty=!1)},J}(Be),Fe=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){var ae=this.gl;return[0,0,ae.drawingBufferWidth,ae.drawingBufferHeight]},J.prototype.set=function(ae){var be=this.current;ae[0]===be[0]&&ae[1]===be[1]&&ae[2]===be[2]&&ae[3]===be[3]&&!this.dirty||(this.gl.viewport(ae[0],ae[1],ae[2],ae[3]),this.current=ae,this.dirty=!1)},J}(Be),Ce=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return null},J.prototype.set=function(ae){if(!(ae===this.current&&!this.dirty)){var be=this.gl;be.bindFramebuffer(be.FRAMEBUFFER,ae),this.current=ae,this.dirty=!1}},J}(Be),pe=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return null},J.prototype.set=function(ae){if(!(ae===this.current&&!this.dirty)){var be=this.gl;be.bindRenderbuffer(be.RENDERBUFFER,ae),this.current=ae,this.dirty=!1}},J}(Be),we=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return null},J.prototype.set=function(ae){if(!(ae===this.current&&!this.dirty)){var be=this.gl;be.bindTexture(be.TEXTURE_2D,ae),this.current=ae,this.dirty=!1}},J}(Be),Ae=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return null},J.prototype.set=function(ae){if(!(ae===this.current&&!this.dirty)){var be=this.gl;be.bindBuffer(be.ARRAY_BUFFER,ae),this.current=ae,this.dirty=!1}},J}(Be),Pe=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return null},J.prototype.set=function(ae){var be=this.gl;be.bindBuffer(be.ELEMENT_ARRAY_BUFFER,ae),this.current=ae,this.dirty=!1},J}(Be),Ge=function(ge){function J(me){ge.call(this,me),this.vao=me.extVertexArrayObject}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return null},J.prototype.set=function(ae){!this.vao||ae===this.current&&!this.dirty||(this.vao.bindVertexArrayOES(ae),this.current=ae,this.dirty=!1)},J}(Be),We=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return 4},J.prototype.set=function(ae){if(!(ae===this.current&&!this.dirty)){var be=this.gl;be.pixelStorei(be.UNPACK_ALIGNMENT,ae),this.current=ae,this.dirty=!1}},J}(Be),tt=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return!1},J.prototype.set=function(ae){if(!(ae===this.current&&!this.dirty)){var be=this.gl;be.pixelStorei(be.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ae),this.current=ae,this.dirty=!1}},J}(Be),ct=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return!1},J.prototype.set=function(ae){if(!(ae===this.current&&!this.dirty)){var be=this.gl;be.pixelStorei(be.UNPACK_FLIP_Y_WEBGL,ae),this.current=ae,this.dirty=!1}},J}(Be),St=function(ge){function J(me,ae){ge.call(this,me),this.context=me,this.parent=ae}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getDefault=function(){return null},J}(Be),Pt=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.setDirty=function(){this.dirty=!0},J.prototype.set=function(ae){if(!(ae===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var be=this.gl;be.framebufferTexture2D(be.FRAMEBUFFER,be.COLOR_ATTACHMENT0,be.TEXTURE_2D,ae,0),this.current=ae,this.dirty=!1}},J}(St),wt=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.set=function(ae){if(!(ae===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var be=this.gl;be.framebufferRenderbuffer(be.FRAMEBUFFER,be.DEPTH_ATTACHMENT,be.RENDERBUFFER,ae),this.current=ae,this.dirty=!1}},J}(St),Bt=function(J,me,ae,be){this.context=J,this.width=me,this.height=ae;var ke=J.gl,je=this.framebuffer=ke.createFramebuffer();this.colorAttachment=new Pt(J,je),be&&(this.depthAttachment=new wt(J,je))};Bt.prototype.destroy=function(){var J=this.context.gl,me=this.colorAttachment.get();if(me&&J.deleteTexture(me),this.depthAttachment){var ae=this.depthAttachment.get();ae&&J.deleteRenderbuffer(ae)}J.deleteFramebuffer(this.framebuffer)};var Wt=519,hr=function(J,me,ae){this.func=J,this.mask=me,this.range=ae};hr.ReadOnly=!1,hr.ReadWrite=!0,hr.disabled=new hr(Wt,hr.ReadOnly,[0,1]);var gt=519,jt=7680,Ut=function(J,me,ae,be,ke,je){this.test=J,this.ref=me,this.mask=ae,this.fail=be,this.depthFail=ke,this.pass=je};Ut.disabled=new Ut({func:gt,mask:0},0,0,jt,jt,jt);var or=0,ur=1,dt=771,ut=function(J,me,ae){this.blendFunction=J,this.blendColor=me,this.mask=ae};ut.Replace=[ur,or],ut.disabled=new ut(ut.Replace,a.Color.transparent,[!1,!1,!1,!1]),ut.unblended=new ut(ut.Replace,a.Color.transparent,[!0,!0,!0,!0]),ut.alphaBlended=new ut([ur,dt],a.Color.transparent,[!0,!0,!0,!0]);var yt=1029,Lt=2305,Rt=function(J,me,ae){this.enable=J,this.mode=me,this.frontFace=ae};Rt.disabled=new Rt(!1,yt,Lt),Rt.backCCW=new Rt(!0,yt,Lt);var Nt=function(J){this.gl=J,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new Le(this),this.clearDepth=new Te(this),this.clearStencil=new De(this),this.colorMask=new Ve(this),this.depthMask=new Ye(this),this.stencilMask=new Ne(this),this.stencilFunc=new Xe(this),this.stencilOp=new ht(this),this.stencilTest=new st(this),this.depthRange=new it(this),this.depthTest=new nt(this),this.depthFunc=new pt(this),this.blend=new Tt(this),this.blendFunc=new Et(this),this.blendColor=new Dt(this),this.blendEquation=new et(this),this.cullFace=new Ue(this),this.cullFaceSide=new ze(this),this.frontFace=new rt(this),this.program=new lt(this),this.activeTexture=new Qe(this),this.viewport=new Fe(this),this.bindFramebuffer=new Ce(this),this.bindRenderbuffer=new pe(this),this.bindTexture=new we(this),this.bindVertexBuffer=new Ae(this),this.bindElementBuffer=new Pe(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new Ge(this),this.pixelStoreUnpack=new We(this),this.pixelStoreUnpackPremultiplyAlpha=new tt(this),this.pixelStoreUnpackFlipY=new ct(this),this.extTextureFilterAnisotropic=J.getExtension("EXT_texture_filter_anisotropic")||J.getExtension("MOZ_EXT_texture_filter_anisotropic")||J.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=J.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=J.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(J.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=J.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=J.getExtension("EXT_disjoint_timer_query")};Nt.prototype.setDefault=function(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()},Nt.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},Nt.prototype.createIndexBuffer=function(J,me){return new Re(this,J,me)},Nt.prototype.createVertexBuffer=function(J,me,ae){return new Oe(this,J,me,ae)},Nt.prototype.createRenderbuffer=function(J,me,ae){var be=this.gl,ke=be.createRenderbuffer();return this.bindRenderbuffer.set(ke),be.renderbufferStorage(be.RENDERBUFFER,J,me,ae),this.bindRenderbuffer.set(null),ke},Nt.prototype.createFramebuffer=function(J,me,ae){return new Bt(this,J,me,ae)},Nt.prototype.clear=function(J){var me=J.color,ae=J.depth,be=this.gl,ke=0;me&&(ke|=be.COLOR_BUFFER_BIT,this.clearColor.set(me),this.colorMask.set([!0,!0,!0,!0])),typeof ae<"u"&&(ke|=be.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(ae),this.depthMask.set(!0)),be.clear(ke)},Nt.prototype.setCullFace=function(J){J.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(J.mode),this.frontFace.set(J.frontFace))},Nt.prototype.setDepthMode=function(J){J.func===this.gl.ALWAYS&&!J.mask?this.depthTest.set(!1):(this.depthTest.set(!0),this.depthFunc.set(J.func),this.depthMask.set(J.mask),this.depthRange.set(J.range))},Nt.prototype.setStencilMode=function(J){J.test.func===this.gl.ALWAYS&&!J.mask?this.stencilTest.set(!1):(this.stencilTest.set(!0),this.stencilMask.set(J.mask),this.stencilOp.set([J.fail,J.depthFail,J.pass]),this.stencilFunc.set({func:J.test.func,ref:J.ref,mask:J.test.mask}))},Nt.prototype.setColorMode=function(J){a.deepEqual(J.blendFunction,ut.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(J.blendFunction),this.blendColor.set(J.blendColor)),this.colorMask.set(J.mask)},Nt.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var Vt=function(ge){function J(me,ae,be){var ke=this;ge.call(this),this.id=me,this.dispatcher=be,this.on("data",function(je){je.dataType==="source"&&je.sourceDataType==="metadata"&&(ke._sourceLoaded=!0),ke._sourceLoaded&&!ke._paused&&je.dataType==="source"&&je.sourceDataType==="content"&&(ke.reload(),ke.transform&&ke.update(ke.transform))}),this.on("error",function(){ke._sourceErrored=!0}),this._source=j(me,ae,be,this),this._tiles={},this._cache=new Se(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new a.SourceFeatureState}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.onAdd=function(ae){this.map=ae,this._maxTileCacheSize=ae?ae._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(ae)},J.prototype.onRemove=function(ae){this._source&&this._source.onRemove&&this._source.onRemove(ae)},J.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(var ae in this._tiles){var be=this._tiles[ae];if(be.state!=="loaded"&&be.state!=="errored")return!1}return!0},J.prototype.getSource=function(){return this._source},J.prototype.pause=function(){this._paused=!0},J.prototype.resume=function(){if(this._paused){var ae=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,ae&&this.reload(),this.transform&&this.update(this.transform)}},J.prototype._loadTile=function(ae,be){return this._source.loadTile(ae,be)},J.prototype._unloadTile=function(ae){if(this._source.unloadTile)return this._source.unloadTile(ae,function(){})},J.prototype._abortTile=function(ae){if(this._source.abortTile)return this._source.abortTile(ae,function(){})},J.prototype.serialize=function(){return this._source.serialize()},J.prototype.prepare=function(ae){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(var be in this._tiles){var ke=this._tiles[be];ke.upload(ae),ke.prepare(this.map.style.imageManager)}},J.prototype.getIds=function(){return a.values(this._tiles).map(function(ae){return ae.tileID}).sort(Zt).map(function(ae){return ae.key})},J.prototype.getRenderableIds=function(ae){var be=this,ke=[];for(var je in this._tiles)this._isIdRenderable(je,ae)&&ke.push(this._tiles[je]);return ae?ke.sort(function(vt,Mt){var Gt=vt.tileID,er=Mt.tileID,vr=new a.Point(Gt.canonical.x,Gt.canonical.y)._rotate(be.transform.angle),br=new a.Point(er.canonical.x,er.canonical.y)._rotate(be.transform.angle);return Gt.overscaledZ-er.overscaledZ||br.y-vr.y||br.x-vr.x}).map(function(vt){return vt.tileID.key}):ke.map(function(vt){return vt.tileID}).sort(Zt).map(function(vt){return vt.key})},J.prototype.hasRenderableParent=function(ae){var be=this.findLoadedParent(ae,0);return be?this._isIdRenderable(be.tileID.key):!1},J.prototype._isIdRenderable=function(ae,be){return this._tiles[ae]&&this._tiles[ae].hasData()&&!this._coveredTiles[ae]&&(be||!this._tiles[ae].holdingForFade())},J.prototype.reload=function(){if(this._paused){this._shouldReloadOnResume=!0;return}this._cache.reset();for(var ae in this._tiles)this._tiles[ae].state!=="errored"&&this._reloadTile(ae,"reloading")},J.prototype._reloadTile=function(ae,be){var ke=this._tiles[ae];ke&&(ke.state!=="loading"&&(ke.state=be),this._loadTile(ke,this._tileLoaded.bind(this,ke,ae,be)))},J.prototype._tileLoaded=function(ae,be,ke,je){if(je){ae.state="errored",je.status!==404?this._source.fire(new a.ErrorEvent(je,{tile:ae})):this.update(this.transform);return}ae.timeAdded=a.browser.now(),ke==="expired"&&(ae.refreshedUponExpiration=!0),this._setTileReloadTimer(be,ae),this.getSource().type==="raster-dem"&&ae.dem&&this._backfillDEM(ae),this._state.initializeTileState(ae,this.map?this.map.painter:null),this._source.fire(new a.Event("data",{dataType:"source",tile:ae,coord:ae.tileID}))},J.prototype._backfillDEM=function(ae){for(var be=this.getRenderableIds(),ke=0;ke<be.length;ke++){var je=be[ke];if(ae.neighboringTiles&&ae.neighboringTiles[je]){var vt=this.getTileByID(je);Mt(ae,vt),Mt(vt,ae)}}function Mt(Gt,er){Gt.needsHillshadePrepare=!0;var vr=er.tileID.canonical.x-Gt.tileID.canonical.x,br=er.tileID.canonical.y-Gt.tileID.canonical.y,Fr=Math.pow(2,Gt.tileID.canonical.z),Gr=er.tileID.key;vr===0&&br===0||Math.abs(br)>1||(Math.abs(vr)>1&&(Math.abs(vr+Fr)===1?vr+=Fr:Math.abs(vr-Fr)===1&&(vr-=Fr)),!(!er.dem||!Gt.dem)&&(Gt.dem.backfillBorder(er.dem,vr,br),Gt.neighboringTiles&&Gt.neighboringTiles[Gr]&&(Gt.neighboringTiles[Gr].backfilled=!0)))}},J.prototype.getTile=function(ae){return this.getTileByID(ae.key)},J.prototype.getTileByID=function(ae){return this._tiles[ae]},J.prototype._retainLoadedChildren=function(ae,be,ke,je){for(var vt in this._tiles){var Mt=this._tiles[vt];if(!(je[vt]||!Mt.hasData()||Mt.tileID.overscaledZ<=be||Mt.tileID.overscaledZ>ke)){for(var Gt=Mt.tileID;Mt&&Mt.tileID.overscaledZ>be+1;){var er=Mt.tileID.scaledTo(Mt.tileID.overscaledZ-1);Mt=this._tiles[er.key],Mt&&Mt.hasData()&&(Gt=er)}for(var vr=Gt;vr.overscaledZ>be;)if(vr=vr.scaledTo(vr.overscaledZ-1),ae[vr.key]){je[Gt.key]=Gt;break}}}},J.prototype.findLoadedParent=function(ae,be){if(ae.key in this._loadedParentTiles){var ke=this._loadedParentTiles[ae.key];return ke&&ke.tileID.overscaledZ>=be?ke:null}for(var je=ae.overscaledZ-1;je>=be;je--){var vt=ae.scaledTo(je),Mt=this._getLoadedTile(vt);if(Mt)return Mt}},J.prototype._getLoadedTile=function(ae){var be=this._tiles[ae.key];if(be&&be.hasData())return be;var ke=this._cache.getByKey(ae.wrapped().key);return ke},J.prototype.updateCacheSize=function(ae){var be=Math.ceil(ae.width/this._source.tileSize)+1,ke=Math.ceil(ae.height/this._source.tileSize)+1,je=be*ke,vt=5,Mt=Math.floor(je*vt),Gt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Mt):Mt;this._cache.setMaxSize(Gt)},J.prototype.handleWrapJump=function(ae){var be=this._prevLng===void 0?ae:this._prevLng,ke=ae-be,je=ke/360,vt=Math.round(je);if(this._prevLng=ae,vt){var Mt={};for(var Gt in this._tiles){var er=this._tiles[Gt];er.tileID=er.tileID.unwrapTo(er.tileID.wrap+vt),Mt[er.tileID.key]=er}this._tiles=Mt;for(var vr in this._timers)clearTimeout(this._timers[vr]),delete this._timers[vr];for(var br in this._tiles){var Fr=this._tiles[br];this._setTileReloadTimer(br,Fr)}}},J.prototype.update=function(ae){var be=this;if(this.transform=ae,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(ae),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var ke;this.used?this._source.tileID?ke=ae.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(fa){return new a.OverscaledTileID(fa.canonical.z,fa.wrap,fa.canonical.z,fa.canonical.x,fa.canonical.y)}):(ke=ae.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(ke=ke.filter(function(fa){return be._source.hasTile(fa)}))):ke=[];var je=ae.coveringZoomLevel(this._source),vt=Math.max(je-J.maxOverzooming,this._source.minzoom),Mt=Math.max(je+J.maxUnderzooming,this._source.minzoom),Gt=this._updateRetainedTiles(ke,je);if(qt(this._source.type)){for(var er={},vr={},br=Object.keys(Gt),Fr=0,Gr=br;Fr<Gr.length;Fr+=1){var Wr=Gr[Fr],Vr=Gt[Wr],Qr=this._tiles[Wr];if(!(!Qr||Qr.fadeEndTime&&Qr.fadeEndTime<=a.browser.now())){var ln=this.findLoadedParent(Vr,vt);ln&&(this._addTile(ln.tileID),er[ln.tileID.key]=ln.tileID),vr[Wr]=Vr}}this._retainLoadedChildren(vr,je,Mt,Gt);for(var Cn in er)Gt[Cn]||(this._coveredTiles[Cn]=!0,Gt[Cn]=er[Cn])}for(var On in Gt)this._tiles[On].clearFadeHold();for(var Xn=a.keysDifference(this._tiles,Gt),jn=0,Zn=Xn;jn<Zn.length;jn+=1){var ra=Zn[jn],ca=this._tiles[ra];ca.hasSymbolBuckets&&!ca.holdingForFade()?ca.setHoldDuration(this.map._fadeDuration):(!ca.hasSymbolBuckets||ca.symbolFadeFinished())&&this._removeTile(ra)}this._updateLoadedParentTileCache()}},J.prototype.releaseSymbolFadeTiles=function(){for(var ae in this._tiles)this._tiles[ae].holdingForFade()&&this._removeTile(ae)},J.prototype._updateRetainedTiles=function(ae,be){for(var ke={},je={},vt=Math.max(be-J.maxOverzooming,this._source.minzoom),Mt=Math.max(be+J.maxUnderzooming,this._source.minzoom),Gt={},er=0,vr=ae;er<vr.length;er+=1){var br=vr[er],Fr=this._addTile(br);ke[br.key]=br,!Fr.hasData()&&be<this._source.maxzoom&&(Gt[br.key]=br)}this._retainLoadedChildren(Gt,be,Mt,ke);for(var Gr=0,Wr=ae;Gr<Wr.length;Gr+=1){var Vr=Wr[Gr],Qr=this._tiles[Vr.key];if(!Qr.hasData()){if(be+1>this._source.maxzoom){var ln=Vr.children(this._source.maxzoom)[0],Cn=this.getTile(ln);if(Cn&&Cn.hasData()){ke[ln.key]=ln;continue}}else{var On=Vr.children(this._source.maxzoom);if(ke[On[0].key]&&ke[On[1].key]&&ke[On[2].key]&&ke[On[3].key])continue}for(var Xn=Qr.wasRequested(),jn=Vr.overscaledZ-1;jn>=vt;--jn){var Zn=Vr.scaledTo(jn);if(je[Zn.key]||(je[Zn.key]=!0,Qr=this.getTile(Zn),!Qr&&Xn&&(Qr=this._addTile(Zn)),Qr&&(ke[Zn.key]=Zn,Xn=Qr.wasRequested(),Qr.hasData())))break}}}return ke},J.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var ae in this._tiles){for(var be=[],ke=void 0,je=this._tiles[ae].tileID;je.overscaledZ>0;){if(je.key in this._loadedParentTiles){ke=this._loadedParentTiles[je.key];break}be.push(je.key);var vt=je.scaledTo(je.overscaledZ-1);if(ke=this._getLoadedTile(vt),ke)break;je=vt}for(var Mt=0,Gt=be;Mt<Gt.length;Mt+=1){var er=Gt[Mt];this._loadedParentTiles[er]=ke}}},J.prototype._addTile=function(ae){var be=this._tiles[ae.key];if(be)return be;be=this._cache.getAndRemove(ae),be&&(this._setTileReloadTimer(ae.key,be),be.tileID=ae,this._state.initializeTileState(be,this.map?this.map.painter:null),this._cacheTimers[ae.key]&&(clearTimeout(this._cacheTimers[ae.key]),delete this._cacheTimers[ae.key],this._setTileReloadTimer(ae.key,be)));var ke=Boolean(be);return ke||(be=new a.Tile(ae,this._source.tileSize*ae.overscaleFactor()),this._loadTile(be,this._tileLoaded.bind(this,be,ae.key,be.state))),be?(be.uses++,this._tiles[ae.key]=be,ke||this._source.fire(new a.Event("dataloading",{tile:be,coord:be.tileID,dataType:"source"})),be):null},J.prototype._setTileReloadTimer=function(ae,be){var ke=this;ae in this._timers&&(clearTimeout(this._timers[ae]),delete this._timers[ae]);var je=be.getExpiryTimeout();je&&(this._timers[ae]=setTimeout(function(){ke._reloadTile(ae,"expired"),delete ke._timers[ae]},je))},J.prototype._removeTile=function(ae){var be=this._tiles[ae];be&&(be.uses--,delete this._tiles[ae],this._timers[ae]&&(clearTimeout(this._timers[ae]),delete this._timers[ae]),!(be.uses>0)&&(be.hasData()&&be.state!=="reloading"?this._cache.add(be.tileID,be,be.getExpiryTimeout()):(be.aborted=!0,this._abortTile(be),this._unloadTile(be))))},J.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var ae in this._tiles)this._removeTile(ae);this._cache.reset()},J.prototype.tilesIn=function(ae,be,ke){var je=this,vt=[],Mt=this.transform;if(!Mt)return vt;for(var Gt=ke?Mt.getCameraQueryGeometry(ae):ae,er=ae.map(function(jn){return Mt.pointCoordinate(jn)}),vr=Gt.map(function(jn){return Mt.pointCoordinate(jn)}),br=this.getIds(),Fr=1/0,Gr=1/0,Wr=-1/0,Vr=-1/0,Qr=0,ln=vr;Qr<ln.length;Qr+=1){var Cn=ln[Qr];Fr=Math.min(Fr,Cn.x),Gr=Math.min(Gr,Cn.y),Wr=Math.max(Wr,Cn.x),Vr=Math.max(Vr,Cn.y)}for(var On=function(jn){var Zn=je._tiles[br[jn]];if(!Zn.holdingForFade()){var ra=Zn.tileID,ca=Math.pow(2,Mt.zoom-Zn.tileID.overscaledZ),fa=be*Zn.queryPadding*a.EXTENT/Zn.tileSize/ca,ya=[ra.getTilePoint(new a.MercatorCoordinate(Fr,Gr)),ra.getTilePoint(new a.MercatorCoordinate(Wr,Vr))];if(ya[0].x-fa<a.EXTENT&&ya[0].y-fa<a.EXTENT&&ya[1].x+fa>=0&&ya[1].y+fa>=0){var Ta=er.map(function(Ya){return ra.getTilePoint(Ya)}),ka=vr.map(function(Ya){return ra.getTilePoint(Ya)});vt.push({tile:Zn,tileID:ra,queryGeometry:Ta,cameraQueryGeometry:ka,scale:ca})}}},Xn=0;Xn<br.length;Xn++)On(Xn);return vt},J.prototype.getVisibleCoordinates=function(ae){for(var be=this,ke=this.getRenderableIds(ae).map(function(Gt){return be._tiles[Gt].tileID}),je=0,vt=ke;je<vt.length;je+=1){var Mt=vt[je];Mt.posMatrix=this.transform.calculatePosMatrix(Mt.toUnwrapped())}return ke},J.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(qt(this._source.type))for(var ae in this._tiles){var be=this._tiles[ae];if(be.fadeEndTime!==void 0&&be.fadeEndTime>=a.browser.now())return!0}return!1},J.prototype.setFeatureState=function(ae,be,ke){ae=ae||"_geojsonTileLayer",this._state.updateState(ae,be,ke)},J.prototype.removeFeatureState=function(ae,be,ke){ae=ae||"_geojsonTileLayer",this._state.removeFeatureState(ae,be,ke)},J.prototype.getFeatureState=function(ae,be){return ae=ae||"_geojsonTileLayer",this._state.getState(ae,be)},J.prototype.setDependencies=function(ae,be,ke){var je=this._tiles[ae];je&&je.setDependencies(be,ke)},J.prototype.reloadTilesForDependencies=function(ae,be){for(var ke in this._tiles){var je=this._tiles[ke];je.hasDependency(ae,be)&&this._reloadTile(ke,"reloading")}this._cache.filter(function(vt){return!vt.hasDependency(ae,be)})},J}(a.Evented);Vt.maxOverzooming=10,Vt.maxUnderzooming=3;function Zt(ge,J){var me=Math.abs(ge.wrap*2)-+(ge.wrap<0),ae=Math.abs(J.wrap*2)-+(J.wrap<0);return ge.overscaledZ-J.overscaledZ||ae-me||J.canonical.y-ge.canonical.y||J.canonical.x-ge.canonical.x}function qt(ge){return ge==="raster"||ge==="image"||ge==="video"}function Jt(){return new a.window.Worker(hg.workerUrl)}var nr="mapboxgl_preloaded_worker_pool",Mr=function(){this.active={}};Mr.prototype.acquire=function(J){if(!this.workers)for(this.workers=[];this.workers.length<Mr.workerCount;)this.workers.push(new Jt);return this.active[J]=!0,this.workers.slice()},Mr.prototype.release=function(J){delete this.active[J],this.numActive()===0&&(this.workers.forEach(function(me){me.terminate()}),this.workers=null)},Mr.prototype.isPreloaded=function(){return!!this.active[nr]},Mr.prototype.numActive=function(){return Object.keys(this.active).length};var Ke=Math.floor(a.browser.hardwareConcurrency/2);Mr.workerCount=Math.max(Math.min(Ke,6),1);var Ze;function zt(){return Ze||(Ze=new Mr),Ze}function kt(){var ge=zt();ge.acquire(nr)}function Qt(){var ge=Ze;ge&&(ge.isPreloaded()&&ge.numActive()===1?(ge.release(nr),Ze=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))}function cr(ge,J){var me={};for(var ae in ge)ae!=="ref"&&(me[ae]=ge[ae]);return a.refProperties.forEach(function(be){be in J&&(me[be]=J[be])}),me}function fr(ge){ge=ge.slice();for(var J=Object.create(null),me=0;me<ge.length;me++)J[ge[me].id]=ge[me];for(var ae=0;ae<ge.length;ae++)"ref"in ge[ae]&&(ge[ae]=cr(ge[ae],J[ge[ae].ref]));return ge}function ir(){var ge={},J=a.styleSpec.$version;for(var me in a.styleSpec.$root){var ae=a.styleSpec.$root[me];if(ae.required){var be=null;me==="version"?be=J:ae.type==="array"?be=[]:be={},be!=null&&(ge[me]=be)}}return ge}var Yt={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function gr(ge,J,me){me.push({command:Yt.addSource,args:[ge,J[ge]]})}function yr(ge,J,me){J.push({command:Yt.removeSource,args:[ge]}),me[ge]=!0}function Tr(ge,J,me,ae){yr(ge,me,ae),gr(ge,J,me)}function pr(ge,J,me){var ae;for(ae in ge[me])if(ge[me].hasOwnProperty(ae)&&ae!=="data"&&!a.deepEqual(ge[me][ae],J[me][ae]))return!1;for(ae in J[me])if(J[me].hasOwnProperty(ae)&&ae!=="data"&&!a.deepEqual(ge[me][ae],J[me][ae]))return!1;return!0}function Kr(ge,J,me,ae){ge=ge||{},J=J||{};var be;for(be in ge)ge.hasOwnProperty(be)&&(J.hasOwnProperty(be)||yr(be,me,ae));for(be in J)J.hasOwnProperty(be)&&(ge.hasOwnProperty(be)?a.deepEqual(ge[be],J[be])||(ge[be].type==="geojson"&&J[be].type==="geojson"&&pr(ge,J,be)?me.push({command:Yt.setGeoJSONSourceData,args:[be,J[be].data]}):Tr(be,J,me,ae)):gr(be,J,me))}function Or(ge,J,me,ae,be,ke){ge=ge||{},J=J||{};var je;for(je in ge)ge.hasOwnProperty(je)&&(a.deepEqual(ge[je],J[je])||me.push({command:ke,args:[ae,je,J[je],be]}));for(je in J)!J.hasOwnProperty(je)||ge.hasOwnProperty(je)||a.deepEqual(ge[je],J[je])||me.push({command:ke,args:[ae,je,J[je],be]})}function Nr(ge){return ge.id}function Sn(ge,J){return ge[J.id]=J,ge}function Jr(ge,J,me){ge=ge||[],J=J||[];var ae=ge.map(Nr),be=J.map(Nr),ke=ge.reduce(Sn,{}),je=J.reduce(Sn,{}),vt=ae.slice(),Mt=Object.create(null),Gt,er,vr,br,Fr,Gr,Wr;for(Gt=0,er=0;Gt<ae.length;Gt++)vr=ae[Gt],je.hasOwnProperty(vr)?er++:(me.push({command:Yt.removeLayer,args:[vr]}),vt.splice(vt.indexOf(vr,er),1));for(Gt=0,er=0;Gt<be.length;Gt++)vr=be[be.length-1-Gt],vt[vt.length-1-Gt]!==vr&&(ke.hasOwnProperty(vr)?(me.push({command:Yt.removeLayer,args:[vr]}),vt.splice(vt.lastIndexOf(vr,vt.length-er),1)):er++,Gr=vt[vt.length-Gt],me.push({command:Yt.addLayer,args:[je[vr],Gr]}),vt.splice(vt.length-Gt,0,vr),Mt[vr]=!0);for(Gt=0;Gt<be.length;Gt++)if(vr=be[Gt],br=ke[vr],Fr=je[vr],!(Mt[vr]||a.deepEqual(br,Fr))){if(!a.deepEqual(br.source,Fr.source)||!a.deepEqual(br["source-layer"],Fr["source-layer"])||!a.deepEqual(br.type,Fr.type)){me.push({command:Yt.removeLayer,args:[vr]}),Gr=vt[vt.lastIndexOf(vr)+1],me.push({command:Yt.addLayer,args:[Fr,Gr]});continue}Or(br.layout,Fr.layout,me,vr,null,Yt.setLayoutProperty),Or(br.paint,Fr.paint,me,vr,null,Yt.setPaintProperty),a.deepEqual(br.filter,Fr.filter)||me.push({command:Yt.setFilter,args:[vr,Fr.filter]}),(!a.deepEqual(br.minzoom,Fr.minzoom)||!a.deepEqual(br.maxzoom,Fr.maxzoom))&&me.push({command:Yt.setLayerZoomRange,args:[vr,Fr.minzoom,Fr.maxzoom]});for(Wr in br)br.hasOwnProperty(Wr)&&(Wr==="layout"||Wr==="paint"||Wr==="filter"||Wr==="metadata"||Wr==="minzoom"||Wr==="maxzoom"||(Wr.indexOf("paint.")===0?Or(br[Wr],Fr[Wr],me,vr,Wr.slice(6),Yt.setPaintProperty):a.deepEqual(br[Wr],Fr[Wr])||me.push({command:Yt.setLayerProperty,args:[vr,Wr,Fr[Wr]]})));for(Wr in Fr)!Fr.hasOwnProperty(Wr)||br.hasOwnProperty(Wr)||Wr==="layout"||Wr==="paint"||Wr==="filter"||Wr==="metadata"||Wr==="minzoom"||Wr==="maxzoom"||(Wr.indexOf("paint.")===0?Or(br[Wr],Fr[Wr],me,vr,Wr.slice(6),Yt.setPaintProperty):a.deepEqual(br[Wr],Fr[Wr])||me.push({command:Yt.setLayerProperty,args:[vr,Wr,Fr[Wr]]}))}}function xn(ge,J){if(!ge)return[{command:Yt.setStyle,args:[J]}];var me=[];try{if(!a.deepEqual(ge.version,J.version))return[{command:Yt.setStyle,args:[J]}];a.deepEqual(ge.center,J.center)||me.push({command:Yt.setCenter,args:[J.center]}),a.deepEqual(ge.zoom,J.zoom)||me.push({command:Yt.setZoom,args:[J.zoom]}),a.deepEqual(ge.bearing,J.bearing)||me.push({command:Yt.setBearing,args:[J.bearing]}),a.deepEqual(ge.pitch,J.pitch)||me.push({command:Yt.setPitch,args:[J.pitch]}),a.deepEqual(ge.sprite,J.sprite)||me.push({command:Yt.setSprite,args:[J.sprite]}),a.deepEqual(ge.glyphs,J.glyphs)||me.push({command:Yt.setGlyphs,args:[J.glyphs]}),a.deepEqual(ge.transition,J.transition)||me.push({command:Yt.setTransition,args:[J.transition]}),a.deepEqual(ge.light,J.light)||me.push({command:Yt.setLight,args:[J.light]});var ae={},be=[];Kr(ge.sources,J.sources,be,ae);var ke=[];ge.layers&&ge.layers.forEach(function(je){ae[je.source]?me.push({command:Yt.removeLayer,args:[je.id]}):ke.push(je)}),me=me.concat(be),Jr(ke,J.layers,me)}catch(je){console.warn("Unable to compute style diff:",je),me=[{command:Yt.setStyle,args:[J]}]}return me}var Dn=function(J,me){this.reset(J,me)};Dn.prototype.reset=function(J,me){this.points=J||[],this._distances=[0];for(var ae=1;ae<this.points.length;ae++)this._distances[ae]=this._distances[ae-1]+this.points[ae].dist(this.points[ae-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(me||0,this.length*.5),this.paddedLength=this.length-this.padding*2},Dn.prototype.lerp=function(J){if(this.points.length===1)return this.points[0];J=a.clamp(J,0,1);for(var me=1,ae=this._distances[me],be=J*this.paddedLength+this.padding;ae<be&&me<this._distances.length;)ae=this._distances[++me];var ke=me-1,je=this._distances[ke],vt=ae-je,Mt=vt>0?(be-je)/vt:0;return this.points[ke].mult(1-Mt).add(this.points[me].mult(Mt))};var mr=function(J,me,ae){var be=this.boxCells=[],ke=this.circleCells=[];this.xCellCount=Math.ceil(J/ae),this.yCellCount=Math.ceil(me/ae);for(var je=0;je<this.xCellCount*this.yCellCount;je++)be.push([]),ke.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=J,this.height=me,this.xScale=this.xCellCount/J,this.yScale=this.yCellCount/me,this.boxUid=0,this.circleUid=0};mr.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},mr.prototype.insert=function(J,me,ae,be,ke){this._forEachCell(me,ae,be,ke,this._insertBoxCell,this.boxUid++),this.boxKeys.push(J),this.bboxes.push(me),this.bboxes.push(ae),this.bboxes.push(be),this.bboxes.push(ke)},mr.prototype.insertCircle=function(J,me,ae,be){this._forEachCell(me-be,ae-be,me+be,ae+be,this._insertCircleCell,this.circleUid++),this.circleKeys.push(J),this.circles.push(me),this.circles.push(ae),this.circles.push(be)},mr.prototype._insertBoxCell=function(J,me,ae,be,ke,je){this.boxCells[ke].push(je)},mr.prototype._insertCircleCell=function(J,me,ae,be,ke,je){this.circleCells[ke].push(je)},mr.prototype._query=function(J,me,ae,be,ke,je){if(ae<0||J>this.width||be<0||me>this.height)return ke?!1:[];var vt=[];if(J<=0&&me<=0&&this.width<=ae&&this.height<=be){if(ke)return!0;for(var Mt=0;Mt<this.boxKeys.length;Mt++)vt.push({key:this.boxKeys[Mt],x1:this.bboxes[Mt*4],y1:this.bboxes[Mt*4+1],x2:this.bboxes[Mt*4+2],y2:this.bboxes[Mt*4+3]});for(var Gt=0;Gt<this.circleKeys.length;Gt++){var er=this.circles[Gt*3],vr=this.circles[Gt*3+1],br=this.circles[Gt*3+2];vt.push({key:this.circleKeys[Gt],x1:er-br,y1:vr-br,x2:er+br,y2:vr+br})}return je?vt.filter(je):vt}else{var Fr={hitTest:ke,seenUids:{box:{},circle:{}}};return this._forEachCell(J,me,ae,be,this._queryCell,vt,Fr,je),ke?vt.length>0:vt}},mr.prototype._queryCircle=function(J,me,ae,be,ke){var je=J-ae,vt=J+ae,Mt=me-ae,Gt=me+ae;if(vt<0||je>this.width||Gt<0||Mt>this.height)return be?!1:[];var er=[],vr={hitTest:be,circle:{x:J,y:me,radius:ae},seenUids:{box:{},circle:{}}};return this._forEachCell(je,Mt,vt,Gt,this._queryCellCircle,er,vr,ke),be?er.length>0:er},mr.prototype.query=function(J,me,ae,be,ke){return this._query(J,me,ae,be,!1,ke)},mr.prototype.hitTest=function(J,me,ae,be,ke){return this._query(J,me,ae,be,!0,ke)},mr.prototype.hitTestCircle=function(J,me,ae,be){return this._queryCircle(J,me,ae,!0,be)},mr.prototype._queryCell=function(J,me,ae,be,ke,je,vt,Mt){var Gt=vt.seenUids,er=this.boxCells[ke];if(er!==null)for(var vr=this.bboxes,br=0,Fr=er;br<Fr.length;br+=1){var Gr=Fr[br];if(!Gt.box[Gr]){Gt.box[Gr]=!0;var Wr=Gr*4;if(J<=vr[Wr+2]&&me<=vr[Wr+3]&&ae>=vr[Wr+0]&&be>=vr[Wr+1]&&(!Mt||Mt(this.boxKeys[Gr]))){if(vt.hitTest)return je.push(!0),!0;je.push({key:this.boxKeys[Gr],x1:vr[Wr],y1:vr[Wr+1],x2:vr[Wr+2],y2:vr[Wr+3]})}}}var Vr=this.circleCells[ke];if(Vr!==null)for(var Qr=this.circles,ln=0,Cn=Vr;ln<Cn.length;ln+=1){var On=Cn[ln];if(!Gt.circle[On]){Gt.circle[On]=!0;var Xn=On*3;if(this._circleAndRectCollide(Qr[Xn],Qr[Xn+1],Qr[Xn+2],J,me,ae,be)&&(!Mt||Mt(this.circleKeys[On]))){if(vt.hitTest)return je.push(!0),!0;var jn=Qr[Xn],Zn=Qr[Xn+1],ra=Qr[Xn+2];je.push({key:this.circleKeys[On],x1:jn-ra,y1:Zn-ra,x2:jn+ra,y2:Zn+ra})}}}},mr.prototype._queryCellCircle=function(J,me,ae,be,ke,je,vt,Mt){var Gt=vt.circle,er=vt.seenUids,vr=this.boxCells[ke];if(vr!==null)for(var br=this.bboxes,Fr=0,Gr=vr;Fr<Gr.length;Fr+=1){var Wr=Gr[Fr];if(!er.box[Wr]){er.box[Wr]=!0;var Vr=Wr*4;if(this._circleAndRectCollide(Gt.x,Gt.y,Gt.radius,br[Vr+0],br[Vr+1],br[Vr+2],br[Vr+3])&&(!Mt||Mt(this.boxKeys[Wr])))return je.push(!0),!0}}var Qr=this.circleCells[ke];if(Qr!==null)for(var ln=this.circles,Cn=0,On=Qr;Cn<On.length;Cn+=1){var Xn=On[Cn];if(!er.circle[Xn]){er.circle[Xn]=!0;var jn=Xn*3;if(this._circlesCollide(ln[jn],ln[jn+1],ln[jn+2],Gt.x,Gt.y,Gt.radius)&&(!Mt||Mt(this.circleKeys[Xn])))return je.push(!0),!0}}},mr.prototype._forEachCell=function(J,me,ae,be,ke,je,vt,Mt){for(var Gt=this._convertToXCellCoord(J),er=this._convertToYCellCoord(me),vr=this._convertToXCellCoord(ae),br=this._convertToYCellCoord(be),Fr=Gt;Fr<=vr;Fr++)for(var Gr=er;Gr<=br;Gr++){var Wr=this.xCellCount*Gr+Fr;if(ke.call(this,J,me,ae,be,Wr,je,vt,Mt))return}},mr.prototype._convertToXCellCoord=function(J){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(J*this.xScale)))},mr.prototype._convertToYCellCoord=function(J){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(J*this.yScale)))},mr.prototype._circlesCollide=function(J,me,ae,be,ke,je){var vt=be-J,Mt=ke-me,Gt=ae+je;return Gt*Gt>vt*vt+Mt*Mt},mr.prototype._circleAndRectCollide=function(J,me,ae,be,ke,je,vt){var Mt=(je-be)/2,Gt=Math.abs(J-(be+Mt));if(Gt>Mt+ae)return!1;var er=(vt-ke)/2,vr=Math.abs(me-(ke+er));if(vr>er+ae)return!1;if(Gt<=Mt||vr<=er)return!0;var br=Gt-Mt,Fr=vr-er;return br*br+Fr*Fr<=ae*ae};function Ar(ge,J,me,ae,be){var ke=a.create();return J?(a.scale(ke,ke,[1/be,1/be,1]),me||a.rotateZ(ke,ke,ae.angle)):a.multiply(ke,ae.labelPlaneMatrix,ge),ke}function zr(ge,J,me,ae,be){if(J){var ke=a.clone(ge);return a.scale(ke,ke,[be,be,1]),me||a.rotateZ(ke,ke,-ae.angle),ke}else return ae.glCoordMatrix}function Br(ge,J){var me=[ge.x,ge.y,0,1];Dr(me,me,J);var ae=me[3];return{point:new a.Point(me[0]/ae,me[1]/ae),signedDistanceFromCamera:ae}}function on(ge,J){return .5+.5*(ge/J)}function mn(ge,J){var me=ge[0]/ge[3],ae=ge[1]/ge[3],be=me>=-J[0]&&me<=J[0]&&ae>=-J[1]&&ae<=J[1];return be}function Tn(ge,J,me,ae,be,ke,je,vt){var Mt=ae?ge.textSizeData:ge.iconSizeData,Gt=a.evaluateSizeForZoom(Mt,me.transform.zoom),er=[256/me.width*2+1,256/me.height*2+1],vr=ae?ge.text.dynamicLayoutVertexArray:ge.icon.dynamicLayoutVertexArray;vr.clear();for(var br=ge.lineVertexArray,Fr=ae?ge.text.placedSymbolArray:ge.icon.placedSymbolArray,Gr=me.transform.width/me.transform.height,Wr=!1,Vr=0;Vr<Fr.length;Vr++){var Qr=Fr.get(Vr);if(Qr.hidden||Qr.writingMode===a.WritingMode.vertical&&!Wr){la(Qr.numGlyphs,vr);continue}Wr=!1;var ln=[Qr.anchorX,Qr.anchorY,0,1];if(a.transformMat4(ln,ln,J),!mn(ln,er)){la(Qr.numGlyphs,vr);continue}var Cn=ln[3],On=on(me.transform.cameraToCenterDistance,Cn),Xn=a.evaluateSizeForFeature(Mt,Gt,Qr),jn=je?Xn/On:Xn*On,Zn=new a.Point(Qr.anchorX,Qr.anchorY),ra=Br(Zn,be).point,ca={},fa=Jn(Qr,jn,!1,vt,J,be,ke,ge.glyphOffsetArray,br,vr,ra,Zn,ca,Gr);Wr=fa.useVertical,(fa.notEnoughRoom||Wr||fa.needsFlipping&&Jn(Qr,jn,!0,vt,J,be,ke,ge.glyphOffsetArray,br,vr,ra,Zn,ca,Gr).notEnoughRoom)&&la(Qr.numGlyphs,vr)}ae?ge.text.dynamicLayoutVertexBuffer.updateData(vr):ge.icon.dynamicLayoutVertexBuffer.updateData(vr)}function An(ge,J,me,ae,be,ke,je,vt,Mt,Gt,er){var vr=vt.glyphStartIndex+vt.numGlyphs,br=vt.lineStartIndex,Fr=vt.lineStartIndex+vt.lineLength,Gr=J.getoffsetX(vt.glyphStartIndex),Wr=J.getoffsetX(vr-1),Vr=sa(ge*Gr,me,ae,be,ke,je,vt.segment,br,Fr,Mt,Gt,er);if(!Vr)return null;var Qr=sa(ge*Wr,me,ae,be,ke,je,vt.segment,br,Fr,Mt,Gt,er);return Qr?{first:Vr,last:Qr}:null}function Fn(ge,J,me,ae){if(ge===a.WritingMode.horizontal){var be=Math.abs(me.y-J.y),ke=Math.abs(me.x-J.x)*ae;if(be>ke)return{useVertical:!0}}return(ge===a.WritingMode.vertical?J.y<me.y:J.x>me.x)?{needsFlipping:!0}:null}function Jn(ge,J,me,ae,be,ke,je,vt,Mt,Gt,er,vr,br,Fr){var Gr=J/24,Wr=ge.lineOffsetX*Gr,Vr=ge.lineOffsetY*Gr,Qr;if(ge.numGlyphs>1){var ln=ge.glyphStartIndex+ge.numGlyphs,Cn=ge.lineStartIndex,On=ge.lineStartIndex+ge.lineLength,Xn=An(Gr,vt,Wr,Vr,me,er,vr,ge,Mt,ke,br);if(!Xn)return{notEnoughRoom:!0};var jn=Br(Xn.first.point,je).point,Zn=Br(Xn.last.point,je).point;if(ae&&!me){var ra=Fn(ge.writingMode,jn,Zn,Fr);if(ra)return ra}Qr=[Xn.first];for(var ca=ge.glyphStartIndex+1;ca<ln-1;ca++)Qr.push(sa(Gr*vt.getoffsetX(ca),Wr,Vr,me,er,vr,ge.segment,Cn,On,Mt,ke,br));Qr.push(Xn.last)}else{if(ae&&!me){var fa=Br(vr,be).point,ya=ge.lineStartIndex+ge.segment+1,Ta=new a.Point(Mt.getx(ya),Mt.gety(ya)),ka=Br(Ta,be),Ya=ka.signedDistanceFromCamera>0?ka.point:ta(vr,Ta,fa,1,be),hi=Fn(ge.writingMode,fa,Ya,Fr);if(hi)return hi}var Za=sa(Gr*vt.getoffsetX(ge.glyphStartIndex),Wr,Vr,me,er,vr,ge.segment,ge.lineStartIndex,ge.lineStartIndex+ge.lineLength,Mt,ke,br);if(!Za)return{notEnoughRoom:!0};Qr=[Za]}for(var qa=0,Ra=Qr;qa<Ra.length;qa+=1){var vi=Ra[qa];a.addDynamicAttributes(Gt,vi.point,vi.angle)}return{}}function ta(ge,J,me,ae,be){var ke=Br(ge.add(ge.sub(J)._unit()),be).point,je=me.sub(ke);return me.add(je._mult(ae/je.mag()))}function sa(ge,J,me,ae,be,ke,je,vt,Mt,Gt,er,vr){var br=ae?ge-J:ge+J,Fr=br>0?1:-1,Gr=0;ae&&(Fr*=-1,Gr=Math.PI),Fr<0&&(Gr+=Math.PI);for(var Wr=Fr>0?vt+je:vt+je+1,Vr=be,Qr=be,ln=0,Cn=0,On=Math.abs(br),Xn=[];ln+Cn<=On;){if(Wr+=Fr,Wr<vt||Wr>=Mt)return null;if(Qr=Vr,Xn.push(Vr),Vr=vr[Wr],Vr===void 0){var jn=new a.Point(Gt.getx(Wr),Gt.gety(Wr)),Zn=Br(jn,er);if(Zn.signedDistanceFromCamera>0)Vr=vr[Wr]=Zn.point;else{var ra=Wr-Fr,ca=ln===0?ke:new a.Point(Gt.getx(ra),Gt.gety(ra));Vr=ta(ca,jn,Qr,On-ln+1,er)}}ln+=Cn,Cn=Qr.dist(Vr)}var fa=(On-ln)/Cn,ya=Vr.sub(Qr),Ta=ya.mult(fa)._add(Qr);Ta._add(ya._unit()._perp()._mult(me*Fr));var ka=Gr+Math.atan2(Vr.y-Qr.y,Vr.x-Qr.x);return Xn.push(Ta),{point:Ta,angle:ka,path:Xn}}var ha=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function la(ge,J){for(var me=0;me<ge;me++){var ae=J.length;J.resize(ae+4),J.float32.set(ha,ae*3)}}function Dr(ge,J,me){var ae=J[0],be=J[1];return ge[0]=me[0]*ae+me[4]*be+me[12],ge[1]=me[1]*ae+me[5]*be+me[13],ge[3]=me[3]*ae+me[7]*be+me[15],ge}var sn=100,nn=function(J,me,ae){me===void 0&&(me=new mr(J.width+2*sn,J.height+2*sn,25)),ae===void 0&&(ae=new mr(J.width+2*sn,J.height+2*sn,25)),this.transform=J,this.grid=me,this.ignoredGrid=ae,this.pitchfactor=Math.cos(J._pitch)*J.cameraToCenterDistance,this.screenRightBoundary=J.width+sn,this.screenBottomBoundary=J.height+sn,this.gridRightBoundary=J.width+2*sn,this.gridBottomBoundary=J.height+2*sn};nn.prototype.placeCollisionBox=function(J,me,ae,be,ke){var je=this.projectAndGetPerspectiveRatio(be,J.anchorPointX,J.anchorPointY),vt=ae*je.perspectiveRatio,Mt=J.x1*vt+je.point.x,Gt=J.y1*vt+je.point.y,er=J.x2*vt+je.point.x,vr=J.y2*vt+je.point.y;return!this.isInsideGrid(Mt,Gt,er,vr)||!me&&this.grid.hitTest(Mt,Gt,er,vr,ke)?{box:[],offscreen:!1}:{box:[Mt,Gt,er,vr],offscreen:this.isOffscreen(Mt,Gt,er,vr)}},nn.prototype.placeCollisionCircles=function(J,me,ae,be,ke,je,vt,Mt,Gt,er,vr,br,Fr){var Gr=[],Wr=new a.Point(me.anchorX,me.anchorY),Vr=Br(Wr,je),Qr=on(this.transform.cameraToCenterDistance,Vr.signedDistanceFromCamera),ln=er?ke/Qr:ke*Qr,Cn=ln/a.ONE_EM,On=Br(Wr,vt).point,Xn={},jn=me.lineOffsetX*Cn,Zn=me.lineOffsetY*Cn,ra=An(Cn,be,jn,Zn,!1,On,Wr,me,ae,vt,Xn),ca=!1,fa=!1,ya=!0;if(ra){for(var Ta=br*.5*Qr+Fr,ka=new a.Point(-sn,-sn),Ya=new a.Point(this.screenRightBoundary,this.screenBottomBoundary),hi=new Dn,Za=ra.first,qa=ra.last,Ra=[],vi=Za.path.length-1;vi>=1;vi--)Ra.push(Za.path[vi]);for(var yi=1;yi<qa.path.length;yi++)Ra.push(qa.path[yi]);var xi=Ta*2.5;if(Mt){var ti=Ra.map(function(Ru){return Br(Ru,Mt)});ti.some(function(Ru){return Ru.signedDistanceFromCamera<=0})?Ra=[]:Ra=ti.map(function(Ru){return Ru.point})}var Pi=[];if(Ra.length>0){for(var Xa=Ra[0].clone(),ni=Ra[0].clone(),eo=1;eo<Ra.length;eo++)Xa.x=Math.min(Xa.x,Ra[eo].x),Xa.y=Math.min(Xa.y,Ra[eo].y),ni.x=Math.max(ni.x,Ra[eo].x),ni.y=Math.max(ni.y,Ra[eo].y);Xa.x>=ka.x&&ni.x<=Ya.x&&Xa.y>=ka.y&&ni.y<=Ya.y?Pi=[Ra]:ni.x<ka.x||Xa.x>Ya.x||ni.y<ka.y||Xa.y>Ya.y?Pi=[]:Pi=a.clipLine([Ra],ka.x,ka.y,Ya.x,Ya.y)}for(var mo=0,Dl=Pi;mo<Dl.length;mo+=1){var Il=Dl[mo];hi.reset(Il,Ta*.25);var Cu=0;hi.length<=.5*Ta?Cu=1:Cu=Math.ceil(hi.paddedLength/xi)+1;for(var Lu=0;Lu<Cu;Lu++){var cf=Lu/Math.max(Cu-1,1),Pu=hi.lerp(cf),Ss=Pu.x+sn,Kf=Pu.y+sn;Gr.push(Ss,Kf,Ta,0);var rs=Ss-Ta,hl=Kf-Ta,_u=Ss+Ta,ru=Kf+Ta;if(ya=ya&&this.isOffscreen(rs,hl,_u,ru),fa=fa||this.isInsideGrid(rs,hl,_u,ru),!J&&this.grid.hitTestCircle(Ss,Kf,Ta,vr)&&(ca=!0,!Gt))return{circles:[],offscreen:!1,collisionDetected:ca}}}}return{circles:!Gt&&ca||!fa?[]:Gr,offscreen:ya,collisionDetected:ca}},nn.prototype.queryRenderedSymbols=function(J){if(J.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};for(var me=[],ae=1/0,be=1/0,ke=-1/0,je=-1/0,vt=0,Mt=J;vt<Mt.length;vt+=1){var Gt=Mt[vt],er=new a.Point(Gt.x+sn,Gt.y+sn);ae=Math.min(ae,er.x),be=Math.min(be,er.y),ke=Math.max(ke,er.x),je=Math.max(je,er.y),me.push(er)}for(var vr=this.grid.query(ae,be,ke,je).concat(this.ignoredGrid.query(ae,be,ke,je)),br={},Fr={},Gr=0,Wr=vr;Gr<Wr.length;Gr+=1){var Vr=Wr[Gr],Qr=Vr.key;if(br[Qr.bucketInstanceId]===void 0&&(br[Qr.bucketInstanceId]={}),!br[Qr.bucketInstanceId][Qr.featureIndex]){var ln=[new a.Point(Vr.x1,Vr.y1),new a.Point(Vr.x2,Vr.y1),new a.Point(Vr.x2,Vr.y2),new a.Point(Vr.x1,Vr.y2)];a.polygonIntersectsPolygon(me,ln)&&(br[Qr.bucketInstanceId][Qr.featureIndex]=!0,Fr[Qr.bucketInstanceId]===void 0&&(Fr[Qr.bucketInstanceId]=[]),Fr[Qr.bucketInstanceId].push(Qr.featureIndex))}}return Fr},nn.prototype.insertCollisionBox=function(J,me,ae,be,ke){var je=me?this.ignoredGrid:this.grid,vt={bucketInstanceId:ae,featureIndex:be,collisionGroupID:ke};je.insert(vt,J[0],J[1],J[2],J[3])},nn.prototype.insertCollisionCircles=function(J,me,ae,be,ke){for(var je=me?this.ignoredGrid:this.grid,vt={bucketInstanceId:ae,featureIndex:be,collisionGroupID:ke},Mt=0;Mt<J.length;Mt+=4)je.insertCircle(vt,J[Mt],J[Mt+1],J[Mt+2])},nn.prototype.projectAndGetPerspectiveRatio=function(J,me,ae){var be=[me,ae,0,1];Dr(be,be,J);var ke=new a.Point((be[0]/be[3]+1)/2*this.transform.width+sn,(-be[1]/be[3]+1)/2*this.transform.height+sn);return{point:ke,perspectiveRatio:.5+.5*(this.transform.cameraToCenterDistance/be[3])}},nn.prototype.isOffscreen=function(J,me,ae,be){return ae<sn||J>=this.screenRightBoundary||be<sn||me>this.screenBottomBoundary},nn.prototype.isInsideGrid=function(J,me,ae,be){return ae>=0&&J<this.gridRightBoundary&&be>=0&&me<this.gridBottomBoundary},nn.prototype.getViewportMatrix=function(){var J=a.identity([]);return a.translate(J,J,[-sn,-sn,0]),J};function dn(ge,J,me){return J*(a.EXTENT/(ge.tileSize*Math.pow(2,me-ge.tileID.overscaledZ)))}var Un=function(J,me,ae,be){J?this.opacity=Math.max(0,Math.min(1,J.opacity+(J.placed?me:-me))):this.opacity=be&&ae?1:0,this.placed=ae};Un.prototype.isHidden=function(){return this.opacity===0&&!this.placed};var Ln=function(J,me,ae,be,ke){this.text=new Un(J?J.text:null,me,ae,ke),this.icon=new Un(J?J.icon:null,me,be,ke)};Ln.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var Pn=function(J,me,ae){this.text=J,this.icon=me,this.skipFade=ae},Vn=function(){this.invProjMatrix=a.create(),this.viewportMatrix=a.create(),this.circles=[]},aa=function(J,me,ae,be,ke){this.bucketInstanceId=J,this.featureIndex=me,this.sourceLayerIndex=ae,this.bucketIndex=be,this.tileID=ke},Da=function(J){this.crossSourceCollisions=J,this.maxGroupID=0,this.collisionGroups={}};Da.prototype.get=function(J){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[J]){var me=++this.maxGroupID;this.collisionGroups[J]={ID:me,predicate:function(ae){return ae.collisionGroupID===me}}}return this.collisionGroups[J]};function $a(ge,J,me,ae,be){var ke=a.getAnchorAlignment(ge),je=ke.horizontalAlign,vt=ke.verticalAlign,Mt=-(je-.5)*J,Gt=-(vt-.5)*me,er=a.evaluateVariableOffset(ge,ae);return new a.Point(Mt+er[0]*be,Gt+er[1]*be)}function $t(ge,J,me,ae,be,ke){var je=ge.x1,vt=ge.x2,Mt=ge.y1,Gt=ge.y2,er=ge.anchorPointX,vr=ge.anchorPointY,br=new a.Point(J,me);return ae&&br._rotate(be?ke:-ke),{x1:je+br.x,y1:Mt+br.y,x2:vt+br.x,y2:Gt+br.y,anchorPointX:er,anchorPointY:vr}}var Sr=function(J,me,ae,be){this.transform=J.clone(),this.collisionIndex=new nn(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=me,this.retainedQueryData={},this.collisionGroups=new Da(ae),this.collisionCircleArrays={},this.prevPlacement=be,be&&(be.prevPlacement=void 0),this.placedOrientations={}};Sr.prototype.getBucketParts=function(J,me,ae,be){var ke=ae.getBucket(me),je=ae.latestFeatureIndex;if(!(!ke||!je||me.id!==ke.layerIds[0])){var vt=ae.collisionBoxArray,Mt=ke.layers[0].layout,Gt=Math.pow(2,this.transform.zoom-ae.tileID.overscaledZ),er=ae.tileSize/a.EXTENT,vr=this.transform.calculatePosMatrix(ae.tileID.toUnwrapped()),br=Mt.get("text-pitch-alignment")==="map",Fr=Mt.get("text-rotation-alignment")==="map",Gr=dn(ae,1,this.transform.zoom),Wr=Ar(vr,br,Fr,this.transform,Gr),Vr=null;if(br){var Qr=zr(vr,br,Fr,this.transform,Gr);Vr=a.multiply([],this.transform.labelPlaneMatrix,Qr)}this.retainedQueryData[ke.bucketInstanceId]=new aa(ke.bucketInstanceId,je,ke.sourceLayerIndex,ke.index,ae.tileID);var ln={bucket:ke,layout:Mt,posMatrix:vr,textLabelPlaneMatrix:Wr,labelToScreenMatrix:Vr,scale:Gt,textPixelRatio:er,holdingForFade:ae.holdingForFade(),collisionBoxArray:vt,partiallyEvaluatedTextSize:a.evaluateSizeForZoom(ke.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(ke.sourceID)};if(be)for(var Cn=0,On=ke.sortKeyRanges;Cn<On.length;Cn+=1){var Xn=On[Cn],jn=Xn.sortKey,Zn=Xn.symbolInstanceStart,ra=Xn.symbolInstanceEnd;J.push({sortKey:jn,symbolInstanceStart:Zn,symbolInstanceEnd:ra,parameters:ln})}else J.push({symbolInstanceStart:0,symbolInstanceEnd:ke.symbolInstances.length,parameters:ln})}},Sr.prototype.attemptAnchorPlacement=function(J,me,ae,be,ke,je,vt,Mt,Gt,er,vr,br,Fr,Gr,Wr){var Vr=[br.textOffset0,br.textOffset1],Qr=$a(J,ae,be,Vr,ke),ln=this.collisionIndex.placeCollisionBox($t(me,Qr.x,Qr.y,je,vt,this.transform.angle),vr,Mt,Gt,er.predicate);if(Wr){var Cn=this.collisionIndex.placeCollisionBox($t(Wr,Qr.x,Qr.y,je,vt,this.transform.angle),vr,Mt,Gt,er.predicate);if(Cn.box.length===0)return}if(ln.box.length>0){var On;return this.prevPlacement&&this.prevPlacement.variableOffsets[br.crossTileID]&&this.prevPlacement.placements[br.crossTileID]&&this.prevPlacement.placements[br.crossTileID].text&&(On=this.prevPlacement.variableOffsets[br.crossTileID].anchor),this.variableOffsets[br.crossTileID]={textOffset:Vr,width:ae,height:be,anchor:J,textBoxScale:ke,prevAnchor:On},this.markUsedJustification(Fr,J,br,Gr),Fr.allowVerticalPlacement&&(this.markUsedOrientation(Fr,Gr,br),this.placedOrientations[br.crossTileID]=Gr),{shift:Qr,placedGlyphBoxes:ln}}},Sr.prototype.placeLayerBucketPart=function(J,me,ae){var be=this,ke=J.parameters,je=ke.bucket,vt=ke.layout,Mt=ke.posMatrix,Gt=ke.textLabelPlaneMatrix,er=ke.labelToScreenMatrix,vr=ke.textPixelRatio,br=ke.holdingForFade,Fr=ke.collisionBoxArray,Gr=ke.partiallyEvaluatedTextSize,Wr=ke.collisionGroup,Vr=vt.get("text-optional"),Qr=vt.get("icon-optional"),ln=vt.get("text-allow-overlap"),Cn=vt.get("icon-allow-overlap"),On=vt.get("text-rotation-alignment")==="map",Xn=vt.get("text-pitch-alignment")==="map",jn=vt.get("icon-text-fit")!=="none",Zn=vt.get("symbol-z-order")==="viewport-y",ra=ln&&(Cn||!je.hasIconData()||Qr),ca=Cn&&(ln||!je.hasTextData()||Vr);!je.collisionArrays&&Fr&&je.deserializeCollisionBoxes(Fr);var fa=function(Za,qa){if(!me[Za.crossTileID]){if(br){be.placements[Za.crossTileID]=new Pn(!1,!1,!1);return}var Ra=!1,vi=!1,yi=!0,xi=null,ti={box:null,offscreen:null},Pi={box:null,offscreen:null},Xa=null,ni=null,eo=null,mo=0,Dl=0,Il=0;qa.textFeatureIndex?mo=qa.textFeatureIndex:Za.useRuntimeCollisionCircles&&(mo=Za.featureIndex),qa.verticalTextFeatureIndex&&(Dl=qa.verticalTextFeatureIndex);var Cu=qa.textBox;if(Cu){var Lu=function(ao){var Xs=a.WritingMode.horizontal;if(je.allowVerticalPlacement&&!ao&&be.prevPlacement){var Zs=be.prevPlacement.placedOrientations[Za.crossTileID];Zs&&(be.placedOrientations[Za.crossTileID]=Zs,Xs=Zs,be.markUsedOrientation(je,Xs,Za))}return Xs},cf=function(ao,Xs){if(je.allowVerticalPlacement&&Za.numVerticalGlyphVertices>0&&qa.verticalTextBox)for(var Zs=0,yd=je.writingModes;Zs<yd.length;Zs+=1){var I0=yd[Zs];if(I0===a.WritingMode.vertical?(ti=Xs(),Pi=ti):ti=ao(),ti&&ti.box&&ti.box.length)break}else ti=ao()};if(vt.get("text-variable-anchor")){var rs=vt.get("text-variable-anchor");if(be.prevPlacement&&be.prevPlacement.variableOffsets[Za.crossTileID]){var hl=be.prevPlacement.variableOffsets[Za.crossTileID];rs.indexOf(hl.anchor)>0&&(rs=rs.filter(function(ao){return ao!==hl.anchor}),rs.unshift(hl.anchor))}var _u=function(ao,Xs,Zs){for(var yd=ao.x2-ao.x1,I0=ao.y2-ao.y1,By=Za.textBoxScale,Uy=jn&&!Cn?Xs:null,Rv={box:[],offscreen:!1},Hy=ln?rs.length*2:rs.length,md=0;md<Hy;++md){var Vy=rs[md%rs.length],Gy=md>=rs.length,F0=be.attemptAnchorPlacement(Vy,ao,yd,I0,By,On,Xn,vr,Mt,Wr,Gy,Za,je,Zs,Uy);if(F0&&(Rv=F0.placedGlyphBoxes,Rv&&Rv.box&&Rv.box.length)){Ra=!0,xi=F0.shift;break}}return Rv},ru=function(){return _u(Cu,qa.iconBox,a.WritingMode.horizontal)},Ru=function(){var ao=qa.verticalTextBox,Xs=ti&&ti.box&&ti.box.length;return je.allowVerticalPlacement&&!Xs&&Za.numVerticalGlyphVertices>0&&ao?_u(ao,qa.verticalIconBox,a.WritingMode.vertical):{box:null,offscreen:null}};cf(ru,Ru),ti&&(Ra=ti.box,yi=ti.offscreen);var vd=Lu(ti&&ti.box);if(!Ra&&be.prevPlacement){var _c=be.prevPlacement.variableOffsets[Za.crossTileID];_c&&(be.variableOffsets[Za.crossTileID]=_c,be.markUsedJustification(je,_c.anchor,Za,vd))}}else{var Pu=function(ao,Xs){var Zs=be.collisionIndex.placeCollisionBox(ao,ln,vr,Mt,Wr.predicate);return Zs&&Zs.box&&Zs.box.length&&(be.markUsedOrientation(je,Xs,Za),be.placedOrientations[Za.crossTileID]=Xs),Zs},Ss=function(){return Pu(Cu,a.WritingMode.horizontal)},Kf=function(){var ao=qa.verticalTextBox;return je.allowVerticalPlacement&&Za.numVerticalGlyphVertices>0&&ao?Pu(ao,a.WritingMode.vertical):{box:null,offscreen:null}};cf(Ss,Kf),Lu(ti&&ti.box&&ti.box.length)}}if(Xa=ti,Ra=Xa&&Xa.box&&Xa.box.length>0,yi=Xa&&Xa.offscreen,Za.useRuntimeCollisionCircles){var Xo=je.text.placedSymbolArray.get(Za.centerJustifiedTextSymbolIndex),Pv=a.evaluateSizeForFeature(je.textSizeData,Gr,Xo),fs=vt.get("text-padding"),_v=Za.collisionCircleDiameter;ni=be.collisionIndex.placeCollisionCircles(ln,Xo,je.lineVertexArray,je.glyphOffsetArray,Pv,Mt,Gt,er,ae,Xn,Wr.predicate,_v,fs),Ra=ln||ni.circles.length>0&&!ni.collisionDetected,yi=yi&&ni.offscreen}if(qa.iconFeatureIndex&&(Il=qa.iconFeatureIndex),qa.iconBox){var dd=function(ao){var Xs=jn&&xi?$t(ao,xi.x,xi.y,On,Xn,be.transform.angle):ao;return be.collisionIndex.placeCollisionBox(Xs,Cn,vr,Mt,Wr.predicate)};Pi&&Pi.box&&Pi.box.length&&qa.verticalIconBox?(eo=dd(qa.verticalIconBox),vi=eo.box.length>0):(eo=dd(qa.iconBox),vi=eo.box.length>0),yi=yi&&eo.offscreen}var pd=Vr||Za.numHorizontalGlyphVertices===0&&Za.numVerticalGlyphVertices===0,vg=Qr||Za.numIconVertices===0;if(!pd&&!vg?vi=Ra=vi&&Ra:vg?pd||(vi=vi&&Ra):Ra=vi&&Ra,Ra&&Xa&&Xa.box&&(Pi&&Pi.box&&Dl?be.collisionIndex.insertCollisionBox(Xa.box,vt.get("text-ignore-placement"),je.bucketInstanceId,Dl,Wr.ID):be.collisionIndex.insertCollisionBox(Xa.box,vt.get("text-ignore-placement"),je.bucketInstanceId,mo,Wr.ID)),vi&&eo&&be.collisionIndex.insertCollisionBox(eo.box,vt.get("icon-ignore-placement"),je.bucketInstanceId,Il,Wr.ID),ni&&(Ra&&be.collisionIndex.insertCollisionCircles(ni.circles,vt.get("text-ignore-placement"),je.bucketInstanceId,mo,Wr.ID),ae)){var gd=je.bucketInstanceId,Th=be.collisionCircleArrays[gd];Th===void 0&&(Th=be.collisionCircleArrays[gd]=new Vn);for(var Ah=0;Ah<ni.circles.length;Ah+=4)Th.circles.push(ni.circles[Ah+0]),Th.circles.push(ni.circles[Ah+1]),Th.circles.push(ni.circles[Ah+2]),Th.circles.push(ni.collisionDetected?1:0)}be.placements[Za.crossTileID]=new Pn(Ra||ra,vi||ca,yi||je.justReloaded),me[Za.crossTileID]=!0}};if(Zn)for(var ya=je.getSortedSymbolIndexes(this.transform.angle),Ta=ya.length-1;Ta>=0;--Ta){var ka=ya[Ta];fa(je.symbolInstances.get(ka),je.collisionArrays[ka])}else for(var Ya=J.symbolInstanceStart;Ya<J.symbolInstanceEnd;Ya++)fa(je.symbolInstances.get(Ya),je.collisionArrays[Ya]);if(ae&&je.bucketInstanceId in this.collisionCircleArrays){var hi=this.collisionCircleArrays[je.bucketInstanceId];a.invert(hi.invProjMatrix,Mt),hi.viewportMatrix=this.collisionIndex.getViewportMatrix()}je.justReloaded=!1},Sr.prototype.markUsedJustification=function(J,me,ae,be){var ke={left:ae.leftJustifiedTextSymbolIndex,center:ae.centerJustifiedTextSymbolIndex,right:ae.rightJustifiedTextSymbolIndex},je;be===a.WritingMode.vertical?je=ae.verticalPlacedTextSymbolIndex:je=ke[a.getAnchorJustification(me)];for(var vt=[ae.leftJustifiedTextSymbolIndex,ae.centerJustifiedTextSymbolIndex,ae.rightJustifiedTextSymbolIndex,ae.verticalPlacedTextSymbolIndex],Mt=0,Gt=vt;Mt<Gt.length;Mt+=1){var er=Gt[Mt];er>=0&&(je>=0&&er!==je?J.text.placedSymbolArray.get(er).crossTileID=0:J.text.placedSymbolArray.get(er).crossTileID=ae.crossTileID)}},Sr.prototype.markUsedOrientation=function(J,me,ae){for(var be=me===a.WritingMode.horizontal||me===a.WritingMode.horizontalOnly?me:0,ke=me===a.WritingMode.vertical?me:0,je=[ae.leftJustifiedTextSymbolIndex,ae.centerJustifiedTextSymbolIndex,ae.rightJustifiedTextSymbolIndex],vt=0,Mt=je;vt<Mt.length;vt+=1){var Gt=Mt[vt];J.text.placedSymbolArray.get(Gt).placedOrientation=be}ae.verticalPlacedTextSymbolIndex&&(J.text.placedSymbolArray.get(ae.verticalPlacedTextSymbolIndex).placedOrientation=ke)},Sr.prototype.commit=function(J){this.commitTime=J,this.zoomAtLastRecencyCheck=this.transform.zoom;var me=this.prevPlacement,ae=!1;this.prevZoomAdjustment=me?me.zoomAdjustment(this.transform.zoom):0;var be=me?me.symbolFadeChange(J):1,ke=me?me.opacities:{},je=me?me.variableOffsets:{},vt=me?me.placedOrientations:{};for(var Mt in this.placements){var Gt=this.placements[Mt],er=ke[Mt];er?(this.opacities[Mt]=new Ln(er,be,Gt.text,Gt.icon),ae=ae||Gt.text!==er.text.placed||Gt.icon!==er.icon.placed):(this.opacities[Mt]=new Ln(null,be,Gt.text,Gt.icon,Gt.skipFade),ae=ae||Gt.text||Gt.icon)}for(var vr in ke){var br=ke[vr];if(!this.opacities[vr]){var Fr=new Ln(br,be,!1,!1);Fr.isHidden()||(this.opacities[vr]=Fr,ae=ae||br.text.placed||br.icon.placed)}}for(var Gr in je)!this.variableOffsets[Gr]&&this.opacities[Gr]&&!this.opacities[Gr].isHidden()&&(this.variableOffsets[Gr]=je[Gr]);for(var Wr in vt)!this.placedOrientations[Wr]&&this.opacities[Wr]&&!this.opacities[Wr].isHidden()&&(this.placedOrientations[Wr]=vt[Wr]);ae?this.lastPlacementChangeTime=J:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=me?me.lastPlacementChangeTime:J)},Sr.prototype.updateLayerOpacities=function(J,me){for(var ae={},be=0,ke=me;be<ke.length;be+=1){var je=ke[be],vt=je.getBucket(J);vt&&je.latestFeatureIndex&&J.id===vt.layerIds[0]&&this.updateBucketOpacities(vt,ae,je.collisionBoxArray)}},Sr.prototype.updateBucketOpacities=function(J,me,ae){var be=this;J.hasTextData()&&J.text.opacityVertexArray.clear(),J.hasIconData()&&J.icon.opacityVertexArray.clear(),J.hasIconCollisionBoxData()&&J.iconCollisionBox.collisionVertexArray.clear(),J.hasTextCollisionBoxData()&&J.textCollisionBox.collisionVertexArray.clear();var ke=J.layers[0].layout,je=new Ln(null,0,!1,!1,!0),vt=ke.get("text-allow-overlap"),Mt=ke.get("icon-allow-overlap"),Gt=ke.get("text-variable-anchor"),er=ke.get("text-rotation-alignment")==="map",vr=ke.get("text-pitch-alignment")==="map",br=ke.get("icon-text-fit")!=="none",Fr=new Ln(null,0,vt&&(Mt||!J.hasIconData()||ke.get("icon-optional")),Mt&&(vt||!J.hasTextData()||ke.get("text-optional")),!0);!J.collisionArrays&&ae&&(J.hasIconCollisionBoxData()||J.hasTextCollisionBoxData())&&J.deserializeCollisionBoxes(ae);for(var Gr=function(ln,Cn,On){for(var Xn=0;Xn<Cn/4;Xn++)ln.opacityVertexArray.emplaceBack(On)},Wr=function(ln){var Cn=J.symbolInstances.get(ln),On=Cn.numHorizontalGlyphVertices,Xn=Cn.numVerticalGlyphVertices,jn=Cn.crossTileID,Zn=me[jn],ra=be.opacities[jn];Zn?ra=je:ra||(ra=Fr,be.opacities[jn]=ra),me[jn]=!0;var ca=On>0||Xn>0,fa=Cn.numIconVertices>0,ya=be.placedOrientations[Cn.crossTileID],Ta=ya===a.WritingMode.vertical,ka=ya===a.WritingMode.horizontal||ya===a.WritingMode.horizontalOnly;if(ca){var Ya=kr(ra.text),hi=Ta?vn:Ya;Gr(J.text,On,hi);var Za=ka?vn:Ya;Gr(J.text,Xn,Za);var qa=ra.text.isHidden();[Cn.rightJustifiedTextSymbolIndex,Cn.centerJustifiedTextSymbolIndex,Cn.leftJustifiedTextSymbolIndex].forEach(function(Il){Il>=0&&(J.text.placedSymbolArray.get(Il).hidden=qa||Ta?1:0)}),Cn.verticalPlacedTextSymbolIndex>=0&&(J.text.placedSymbolArray.get(Cn.verticalPlacedTextSymbolIndex).hidden=qa||ka?1:0);var Ra=be.variableOffsets[Cn.crossTileID];Ra&&be.markUsedJustification(J,Ra.anchor,Cn,ya);var vi=be.placedOrientations[Cn.crossTileID];vi&&(be.markUsedJustification(J,"left",Cn,vi),be.markUsedOrientation(J,vi,Cn))}if(fa){var yi=kr(ra.icon),xi=!(br&&Cn.verticalPlacedIconSymbolIndex&&Ta);if(Cn.placedIconSymbolIndex>=0){var ti=xi?yi:vn;Gr(J.icon,Cn.numIconVertices,ti),J.icon.placedSymbolArray.get(Cn.placedIconSymbolIndex).hidden=ra.icon.isHidden()}if(Cn.verticalPlacedIconSymbolIndex>=0){var Pi=xi?vn:yi;Gr(J.icon,Cn.numVerticalIconVertices,Pi),J.icon.placedSymbolArray.get(Cn.verticalPlacedIconSymbolIndex).hidden=ra.icon.isHidden()}}if(J.hasIconCollisionBoxData()||J.hasTextCollisionBoxData()){var Xa=J.collisionArrays[ln];if(Xa){var ni=new a.Point(0,0);if(Xa.textBox||Xa.verticalTextBox){var eo=!0;if(Gt){var mo=be.variableOffsets[jn];mo?(ni=$a(mo.anchor,mo.width,mo.height,mo.textOffset,mo.textBoxScale),er&&ni._rotate(vr?be.transform.angle:-be.transform.angle)):eo=!1}Xa.textBox&&an(J.textCollisionBox.collisionVertexArray,ra.text.placed,!eo||Ta,ni.x,ni.y),Xa.verticalTextBox&&an(J.textCollisionBox.collisionVertexArray,ra.text.placed,!eo||ka,ni.x,ni.y)}var Dl=Boolean(!ka&&Xa.verticalIconBox);Xa.iconBox&&an(J.iconCollisionBox.collisionVertexArray,ra.icon.placed,Dl,br?ni.x:0,br?ni.y:0),Xa.verticalIconBox&&an(J.iconCollisionBox.collisionVertexArray,ra.icon.placed,!Dl,br?ni.x:0,br?ni.y:0)}}},Vr=0;Vr<J.symbolInstances.length;Vr++)Wr(Vr);if(J.sortFeatures(this.transform.angle),this.retainedQueryData[J.bucketInstanceId]&&(this.retainedQueryData[J.bucketInstanceId].featureSortOrder=J.featureSortOrder),J.hasTextData()&&J.text.opacityVertexBuffer&&J.text.opacityVertexBuffer.updateData(J.text.opacityVertexArray),J.hasIconData()&&J.icon.opacityVertexBuffer&&J.icon.opacityVertexBuffer.updateData(J.icon.opacityVertexArray),J.hasIconCollisionBoxData()&&J.iconCollisionBox.collisionVertexBuffer&&J.iconCollisionBox.collisionVertexBuffer.updateData(J.iconCollisionBox.collisionVertexArray),J.hasTextCollisionBoxData()&&J.textCollisionBox.collisionVertexBuffer&&J.textCollisionBox.collisionVertexBuffer.updateData(J.textCollisionBox.collisionVertexArray),J.bucketInstanceId in this.collisionCircleArrays){var Qr=this.collisionCircleArrays[J.bucketInstanceId];J.placementInvProjMatrix=Qr.invProjMatrix,J.placementViewportMatrix=Qr.viewportMatrix,J.collisionCircleArray=Qr.circles,delete this.collisionCircleArrays[J.bucketInstanceId]}},Sr.prototype.symbolFadeChange=function(J){return this.fadeDuration===0?1:(J-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},Sr.prototype.zoomAdjustment=function(J){return Math.max(0,(this.transform.zoom-J)/1.5)},Sr.prototype.hasTransitions=function(J){return this.stale||J-this.lastPlacementChangeTime<this.fadeDuration},Sr.prototype.stillRecent=function(J,me){var ae=this.zoomAtLastRecencyCheck===me?1-this.zoomAdjustment(me):1;return this.zoomAtLastRecencyCheck=me,this.commitTime+this.fadeDuration*ae>J},Sr.prototype.setStale=function(){this.stale=!0};function an(ge,J,me,ae,be){ge.emplaceBack(J?1:0,me?1:0,ae||0,be||0),ge.emplaceBack(J?1:0,me?1:0,ae||0,be||0),ge.emplaceBack(J?1:0,me?1:0,ae||0,be||0),ge.emplaceBack(J?1:0,me?1:0,ae||0,be||0)}var cn=Math.pow(2,25),hn=Math.pow(2,24),_n=Math.pow(2,17),wn=Math.pow(2,16),fn=Math.pow(2,9),Rr=Math.pow(2,8),Lr=Math.pow(2,1);function kr(ge){if(ge.opacity===0&&!ge.placed)return 0;if(ge.opacity===1&&ge.placed)return 4294967295;var J=ge.placed?1:0,me=Math.floor(ge.opacity*127);return me*cn+J*hn+me*_n+J*wn+me*fn+J*Rr+me*Lr+J}var vn=0,kn=function(J){this._sortAcrossTiles=J.layout.get("symbol-z-order")!=="viewport-y"&&J.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};kn.prototype.continuePlacement=function(J,me,ae,be,ke){for(var je=this._bucketParts;this._currentTileIndex<J.length;){var vt=J[this._currentTileIndex];if(me.getBucketParts(je,be,vt,this._sortAcrossTiles),this._currentTileIndex++,ke())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,je.sort(function(Gt,er){return Gt.sortKey-er.sortKey}));this._currentPartIndex<je.length;){var Mt=je[this._currentPartIndex];if(me.placeLayerBucketPart(Mt,this._seenCrossTileIDs,ae),this._currentPartIndex++,ke())return!0}return!1};var Yn=function(J,me,ae,be,ke,je,vt){this.placement=new Sr(J,ke,je,vt),this._currentPlacementIndex=me.length-1,this._forceFullPlacement=ae,this._showCollisionBoxes=be,this._done=!1};Yn.prototype.isDone=function(){return this._done},Yn.prototype.continuePlacement=function(J,me,ae){for(var be=this,ke=a.browser.now(),je=function(){var vr=a.browser.now()-ke;return be._forceFullPlacement?!1:vr>2};this._currentPlacementIndex>=0;){var vt=J[this._currentPlacementIndex],Mt=me[vt],Gt=this.placement.collisionIndex.transform.zoom;if(Mt.type==="symbol"&&(!Mt.minzoom||Mt.minzoom<=Gt)&&(!Mt.maxzoom||Mt.maxzoom>Gt)){this._inProgressLayer||(this._inProgressLayer=new kn(Mt));var er=this._inProgressLayer.continuePlacement(ae[Mt.source],this.placement,this._showCollisionBoxes,Mt,je);if(er)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Yn.prototype.commit=function(J){return this.placement.commit(J),this.placement};var pn=512/a.EXTENT/2,zn=function(J,me,ae){this.tileID=J,this.indexedSymbolInstances={},this.bucketInstanceId=ae;for(var be=0;be<me.length;be++){var ke=me.get(be),je=ke.key;this.indexedSymbolInstances[je]||(this.indexedSymbolInstances[je]=[]),this.indexedSymbolInstances[je].push({crossTileID:ke.crossTileID,coord:this.getScaledCoordinates(ke,J)})}};zn.prototype.getScaledCoordinates=function(J,me){var ae=me.canonical.z-this.tileID.canonical.z,be=pn/Math.pow(2,ae);return{x:Math.floor((me.canonical.x*a.EXTENT+J.anchorX)*be),y:Math.floor((me.canonical.y*a.EXTENT+J.anchorY)*be)}},zn.prototype.findMatches=function(J,me,ae){for(var be=this.tileID.canonical.z<me.canonical.z?1:Math.pow(2,this.tileID.canonical.z-me.canonical.z),ke=0;ke<J.length;ke++){var je=J.get(ke);if(!je.crossTileID){var vt=this.indexedSymbolInstances[je.key];if(vt)for(var Mt=this.getScaledCoordinates(je,me),Gt=0,er=vt;Gt<er.length;Gt+=1){var vr=er[Gt];if(Math.abs(vr.coord.x-Mt.x)<=be&&Math.abs(vr.coord.y-Mt.y)<=be&&!ae[vr.crossTileID]){ae[vr.crossTileID]=!0,je.crossTileID=vr.crossTileID;break}}}}};var qn=function(){this.maxCrossTileID=0};qn.prototype.generate=function(){return++this.maxCrossTileID};var ua=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};ua.prototype.handleWrapJump=function(J){var me=Math.round((J-this.lng)/360);if(me!==0)for(var ae in this.indexes){var be=this.indexes[ae],ke={};for(var je in be){var vt=be[je];vt.tileID=vt.tileID.unwrapTo(vt.tileID.wrap+me),ke[vt.tileID.key]=vt}this.indexes[ae]=ke}this.lng=J},ua.prototype.addBucket=function(J,me,ae){if(this.indexes[J.overscaledZ]&&this.indexes[J.overscaledZ][J.key]){if(this.indexes[J.overscaledZ][J.key].bucketInstanceId===me.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(J.overscaledZ,this.indexes[J.overscaledZ][J.key])}for(var be=0;be<me.symbolInstances.length;be++){var ke=me.symbolInstances.get(be);ke.crossTileID=0}this.usedCrossTileIDs[J.overscaledZ]||(this.usedCrossTileIDs[J.overscaledZ]={});var je=this.usedCrossTileIDs[J.overscaledZ];for(var vt in this.indexes){var Mt=this.indexes[vt];if(Number(vt)>J.overscaledZ)for(var Gt in Mt){var er=Mt[Gt];er.tileID.isChildOf(J)&&er.findMatches(me.symbolInstances,J,je)}else{var vr=J.scaledTo(Number(vt)),br=Mt[vr.key];br&&br.findMatches(me.symbolInstances,J,je)}}for(var Fr=0;Fr<me.symbolInstances.length;Fr++){var Gr=me.symbolInstances.get(Fr);Gr.crossTileID||(Gr.crossTileID=ae.generate(),je[Gr.crossTileID]=!0)}return this.indexes[J.overscaledZ]===void 0&&(this.indexes[J.overscaledZ]={}),this.indexes[J.overscaledZ][J.key]=new zn(J,me.symbolInstances,me.bucketInstanceId),!0},ua.prototype.removeBucketCrossTileIDs=function(J,me){for(var ae in me.indexedSymbolInstances)for(var be=0,ke=me.indexedSymbolInstances[ae];be<ke.length;be+=1){var je=ke[be];delete this.usedCrossTileIDs[J][je.crossTileID]}},ua.prototype.removeStaleBuckets=function(J){var me=!1;for(var ae in this.indexes){var be=this.indexes[ae];for(var ke in be)J[be[ke].bucketInstanceId]||(this.removeBucketCrossTileIDs(ae,be[ke]),delete be[ke],me=!0)}return me};var ia=function(){this.layerIndexes={},this.crossTileIDs=new qn,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};ia.prototype.addLayer=function(J,me,ae){var be=this.layerIndexes[J.id];be===void 0&&(be=this.layerIndexes[J.id]=new ua);var ke=!1,je={};be.handleWrapJump(ae);for(var vt=0,Mt=me;vt<Mt.length;vt+=1){var Gt=Mt[vt],er=Gt.getBucket(J);!er||J.id!==er.layerIds[0]||(er.bucketInstanceId||(er.bucketInstanceId=++this.maxBucketInstanceId),be.addBucket(Gt.tileID,er,this.crossTileIDs)&&(ke=!0),je[er.bucketInstanceId]=!0)}return be.removeStaleBuckets(je)&&(ke=!0),ke},ia.prototype.pruneUnusedLayers=function(J){var me={};J.forEach(function(be){me[be]=!0});for(var ae in this.layerIndexes)me[ae]||delete this.layerIndexes[ae]};var oa=function(ge,J){return a.emitValidationErrors(ge,J&&J.filter(function(me){return me.identifier!=="source.canvas"}))},ga=a.pick(Yt,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),uo=a.pick(Yt,["setCenter","setZoom","setBearing","setPitch"]),Co=ir(),Fo=function(ge){function J(me,ae){var be=this;ae===void 0&&(ae={}),ge.call(this),this.map=me,this.dispatcher=new N(zt(),this),this.imageManager=new E,this.imageManager.setEventedParent(this),this.glyphManager=new C(me._requestManager,ae.localIdeographFontFamily),this.lineAtlas=new O(256,512),this.crossTileSymbolIndex=new ia,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new a.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",a.getReferrer());var ke=this;this._rtlTextPluginCallback=J.registerForPluginStateChange(function(je){var vt={pluginStatus:je.pluginStatus,pluginURL:je.pluginURL};ke.dispatcher.broadcast("syncRTLPluginState",vt,function(Mt,Gt){if(a.triggerPluginCompletionEvent(Mt),Gt){var er=Gt.every(function(br){return br});if(er)for(var vr in ke.sourceCaches)ke.sourceCaches[vr].reload()}})}),this.on("data",function(je){if(!(je.dataType!=="source"||je.sourceDataType!=="metadata")){var vt=be.sourceCaches[je.sourceId];if(vt){var Mt=vt.getSource();if(!(!Mt||!Mt.vectorLayerIds))for(var Gt in be._layers){var er=be._layers[Gt];er.source===Mt.id&&be._validateLayer(er)}}}})}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.loadURL=function(ae,be){var ke=this;be===void 0&&(be={}),this.fire(new a.Event("dataloading",{dataType:"style"}));var je=typeof be.validate=="boolean"?be.validate:!a.isMapboxURL(ae);ae=this.map._requestManager.normalizeStyleURL(ae,be.accessToken);var vt=this.map._requestManager.transformRequest(ae,a.ResourceType.Style);this._request=a.getJSON(vt,function(Mt,Gt){ke._request=null,Mt?ke.fire(new a.ErrorEvent(Mt)):Gt&&ke._load(Gt,je)})},J.prototype.loadJSON=function(ae,be){var ke=this;be===void 0&&(be={}),this.fire(new a.Event("dataloading",{dataType:"style"})),this._request=a.browser.frame(function(){ke._request=null,ke._load(ae,be.validate!==!1)})},J.prototype.loadEmpty=function(){this.fire(new a.Event("dataloading",{dataType:"style"})),this._load(Co,!1)},J.prototype._load=function(ae,be){if(!(be&&oa(this,a.validateStyle(ae)))){this._loaded=!0,this.stylesheet=ae;for(var ke in ae.sources)this.addSource(ke,ae.sources[ke],{validate:!1});ae.sprite?this._loadSprite(ae.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(ae.glyphs);var je=fr(this.stylesheet.layers);this._order=je.map(function(er){return er.id}),this._layers={},this._serializedLayers={};for(var vt=0,Mt=je;vt<Mt.length;vt+=1){var Gt=Mt[vt];Gt=a.createStyleLayer(Gt),Gt.setEventedParent(this,{layer:{id:Gt.id}}),this._layers[Gt.id]=Gt,this._serializedLayers[Gt.id]=Gt.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new T(this.stylesheet.light),this.fire(new a.Event("data",{dataType:"style"})),this.fire(new a.Event("style.load"))}},J.prototype._loadSprite=function(ae){var be=this;this._spriteRequest=h(ae,this.map._requestManager,function(ke,je){if(be._spriteRequest=null,ke)be.fire(new a.ErrorEvent(ke));else if(je)for(var vt in je)be.imageManager.addImage(vt,je[vt]);be.imageManager.setLoaded(!0),be._availableImages=be.imageManager.listImages(),be.dispatcher.broadcast("setImages",be._availableImages),be.fire(new a.Event("data",{dataType:"style"}))})},J.prototype._validateLayer=function(ae){var be=this.sourceCaches[ae.source];if(be){var ke=ae.sourceLayer;if(ke){var je=be.getSource();(je.type==="geojson"||je.vectorLayerIds&&je.vectorLayerIds.indexOf(ke)===-1)&&this.fire(new a.ErrorEvent(new Error('Source layer "'+ke+'" does not exist on source "'+je.id+'" as specified by style layer "'+ae.id+'"')))}}},J.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var ae in this.sourceCaches)if(!this.sourceCaches[ae].loaded())return!1;return!!this.imageManager.isLoaded()},J.prototype._serializeLayers=function(ae){for(var be=[],ke=0,je=ae;ke<je.length;ke+=1){var vt=je[ke],Mt=this._layers[vt];Mt.type!=="custom"&&be.push(Mt.serialize())}return be},J.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var ae in this.sourceCaches)if(this.sourceCaches[ae].hasTransition())return!0;for(var be in this._layers)if(this._layers[be].hasTransition())return!0;return!1},J.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},J.prototype.update=function(ae){if(this._loaded){var be=this._changed;if(this._changed){var ke=Object.keys(this._updatedLayers),je=Object.keys(this._removedLayers);(ke.length||je.length)&&this._updateWorkerLayers(ke,je);for(var vt in this._updatedSources){var Mt=this._updatedSources[vt];Mt==="reload"?this._reloadSource(vt):Mt==="clear"&&this._clearSource(vt)}this._updateTilesForChangedImages();for(var Gt in this._updatedPaintProps)this._layers[Gt].updateTransitions(ae);this.light.updateTransitions(ae),this._resetUpdates()}for(var er in this.sourceCaches)this.sourceCaches[er].used=!1;for(var vr=0,br=this._order;vr<br.length;vr+=1){var Fr=br[vr],Gr=this._layers[Fr];Gr.recalculate(ae,this._availableImages),!Gr.isHidden(ae.zoom)&&Gr.source&&(this.sourceCaches[Gr.source].used=!0)}this.light.recalculate(ae),this.z=ae.zoom,be&&this.fire(new a.Event("data",{dataType:"style"}))}},J.prototype._updateTilesForChangedImages=function(){var ae=Object.keys(this._changedImages);if(ae.length){for(var be in this.sourceCaches)this.sourceCaches[be].reloadTilesForDependencies(["icons","patterns"],ae);this._changedImages={}}},J.prototype._updateWorkerLayers=function(ae,be){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(ae),removedIds:be})},J.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},J.prototype.setState=function(ae){var be=this;if(this._checkLoaded(),oa(this,a.validateStyle(ae)))return!1;ae=a.clone$1(ae),ae.layers=fr(ae.layers);var ke=xn(this.serialize(),ae).filter(function(vt){return!(vt.command in uo)});if(ke.length===0)return!1;var je=ke.filter(function(vt){return!(vt.command in ga)});if(je.length>0)throw new Error("Unimplemented: "+je.map(function(vt){return vt.command}).join(", ")+".");return ke.forEach(function(vt){vt.command!=="setTransition"&&be[vt.command].apply(be,vt.args)}),this.stylesheet=ae,!0},J.prototype.addImage=function(ae,be){if(this.getImage(ae))return this.fire(new a.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(ae,be),this._availableImages=this.imageManager.listImages(),this._changedImages[ae]=!0,this._changed=!0,this.fire(new a.Event("data",{dataType:"style"}))},J.prototype.updateImage=function(ae,be){this.imageManager.updateImage(ae,be)},J.prototype.getImage=function(ae){return this.imageManager.getImage(ae)},J.prototype.removeImage=function(ae){if(!this.getImage(ae))return this.fire(new a.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(ae),this._availableImages=this.imageManager.listImages(),this._changedImages[ae]=!0,this._changed=!0,this.fire(new a.Event("data",{dataType:"style"}))},J.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},J.prototype.addSource=function(ae,be,ke){var je=this;if(ke===void 0&&(ke={}),this._checkLoaded(),this.sourceCaches[ae]!==void 0)throw new Error("There is already a source with this ID");if(!be.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(be).join(", ")+".");var vt=["vector","raster","geojson","video","image"],Mt=vt.indexOf(be.type)>=0;if(!(Mt&&this._validate(a.validateStyle.source,"sources."+ae,be,null,ke))){this.map&&this.map._collectResourceTiming&&(be.collectResourceTiming=!0);var Gt=this.sourceCaches[ae]=new Vt(ae,be,this.dispatcher);Gt.style=this,Gt.setEventedParent(this,function(){return{isSourceLoaded:je.loaded(),source:Gt.serialize(),sourceId:ae}}),Gt.onAdd(this.map),this._changed=!0}},J.prototype.removeSource=function(ae){if(this._checkLoaded(),this.sourceCaches[ae]===void 0)throw new Error("There is no source with this ID");for(var be in this._layers)if(this._layers[be].source===ae)return this.fire(new a.ErrorEvent(new Error('Source "'+ae+'" cannot be removed while layer "'+be+'" is using it.')));var ke=this.sourceCaches[ae];delete this.sourceCaches[ae],delete this._updatedSources[ae],ke.fire(new a.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:ae})),ke.setEventedParent(null),ke.clearTiles(),ke.onRemove&&ke.onRemove(this.map),this._changed=!0},J.prototype.setGeoJSONSourceData=function(ae,be){this._checkLoaded();var ke=this.sourceCaches[ae].getSource();ke.setData(be),this._changed=!0},J.prototype.getSource=function(ae){return this.sourceCaches[ae]&&this.sourceCaches[ae].getSource()},J.prototype.addLayer=function(ae,be,ke){ke===void 0&&(ke={}),this._checkLoaded();var je=ae.id;if(this.getLayer(je)){this.fire(new a.ErrorEvent(new Error('Layer with id "'+je+'" already exists on this map')));return}var vt;if(ae.type==="custom"){if(oa(this,a.validateCustomStyleLayer(ae)))return;vt=a.createStyleLayer(ae)}else{if(typeof ae.source=="object"&&(this.addSource(je,ae.source),ae=a.clone$1(ae),ae=a.extend(ae,{source:je})),this._validate(a.validateStyle.layer,"layers."+je,ae,{arrayIndex:-1},ke))return;vt=a.createStyleLayer(ae),this._validateLayer(vt),vt.setEventedParent(this,{layer:{id:je}}),this._serializedLayers[vt.id]=vt.serialize()}var Mt=be?this._order.indexOf(be):this._order.length;if(be&&Mt===-1){this.fire(new a.ErrorEvent(new Error('Layer with id "'+be+'" does not exist on this map.')));return}if(this._order.splice(Mt,0,je),this._layerOrderChanged=!0,this._layers[je]=vt,this._removedLayers[je]&&vt.source&&vt.type!=="custom"){var Gt=this._removedLayers[je];delete this._removedLayers[je],Gt.type!==vt.type?this._updatedSources[vt.source]="clear":(this._updatedSources[vt.source]="reload",this.sourceCaches[vt.source].pause())}this._updateLayer(vt),vt.onAdd&&vt.onAdd(this.map)},J.prototype.moveLayer=function(ae,be){this._checkLoaded(),this._changed=!0;var ke=this._layers[ae];if(!ke){this.fire(new a.ErrorEvent(new Error("The layer '"+ae+"' does not exist in the map's style and cannot be moved.")));return}if(ae!==be){var je=this._order.indexOf(ae);this._order.splice(je,1);var vt=be?this._order.indexOf(be):this._order.length;if(be&&vt===-1){this.fire(new a.ErrorEvent(new Error('Layer with id "'+be+'" does not exist on this map.')));return}this._order.splice(vt,0,ae),this._layerOrderChanged=!0}},J.prototype.removeLayer=function(ae){this._checkLoaded();var be=this._layers[ae];if(!be){this.fire(new a.ErrorEvent(new Error("The layer '"+ae+"' does not exist in the map's style and cannot be removed.")));return}be.setEventedParent(null);var ke=this._order.indexOf(ae);this._order.splice(ke,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[ae]=be,delete this._layers[ae],delete this._serializedLayers[ae],delete this._updatedLayers[ae],delete this._updatedPaintProps[ae],be.onRemove&&be.onRemove(this.map)},J.prototype.getLayer=function(ae){return this._layers[ae]},J.prototype.hasLayer=function(ae){return ae in this._layers},J.prototype.setLayerZoomRange=function(ae,be,ke){this._checkLoaded();var je=this.getLayer(ae);if(!je){this.fire(new a.ErrorEvent(new Error("The layer '"+ae+"' does not exist in the map's style and cannot have zoom extent.")));return}je.minzoom===be&&je.maxzoom===ke||(be!=null&&(je.minzoom=be),ke!=null&&(je.maxzoom=ke),this._updateLayer(je))},J.prototype.setFilter=function(ae,be,ke){ke===void 0&&(ke={}),this._checkLoaded();var je=this.getLayer(ae);if(!je){this.fire(new a.ErrorEvent(new Error("The layer '"+ae+"' does not exist in the map's style and cannot be filtered.")));return}if(!a.deepEqual(je.filter,be)){if(be==null){je.filter=void 0,this._updateLayer(je);return}this._validate(a.validateStyle.filter,"layers."+je.id+".filter",be,null,ke)||(je.filter=a.clone$1(be),this._updateLayer(je))}},J.prototype.getFilter=function(ae){return a.clone$1(this.getLayer(ae).filter)},J.prototype.setLayoutProperty=function(ae,be,ke,je){je===void 0&&(je={}),this._checkLoaded();var vt=this.getLayer(ae);if(!vt){this.fire(new a.ErrorEvent(new Error("The layer '"+ae+"' does not exist in the map's style and cannot be styled.")));return}a.deepEqual(vt.getLayoutProperty(be),ke)||(vt.setLayoutProperty(be,ke,je),this._updateLayer(vt))},J.prototype.getLayoutProperty=function(ae,be){var ke=this.getLayer(ae);if(!ke){this.fire(new a.ErrorEvent(new Error("The layer '"+ae+"' does not exist in the map's style.")));return}return ke.getLayoutProperty(be)},J.prototype.setPaintProperty=function(ae,be,ke,je){je===void 0&&(je={}),this._checkLoaded();var vt=this.getLayer(ae);if(!vt){this.fire(new a.ErrorEvent(new Error("The layer '"+ae+"' does not exist in the map's style and cannot be styled.")));return}if(!a.deepEqual(vt.getPaintProperty(be),ke)){var Mt=vt.setPaintProperty(be,ke,je);Mt&&this._updateLayer(vt),this._changed=!0,this._updatedPaintProps[ae]=!0}},J.prototype.getPaintProperty=function(ae,be){return this.getLayer(ae).getPaintProperty(be)},J.prototype.setFeatureState=function(ae,be){this._checkLoaded();var ke=ae.source,je=ae.sourceLayer,vt=this.sourceCaches[ke];if(vt===void 0){this.fire(new a.ErrorEvent(new Error("The source '"+ke+"' does not exist in the map's style.")));return}var Mt=vt.getSource().type;if(Mt==="geojson"&&je){this.fire(new a.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(Mt==="vector"&&!je){this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}ae.id===void 0&&this.fire(new a.ErrorEvent(new Error("The feature id parameter must be provided."))),vt.setFeatureState(je,ae.id,be)},J.prototype.removeFeatureState=function(ae,be){this._checkLoaded();var ke=ae.source,je=this.sourceCaches[ke];if(je===void 0){this.fire(new a.ErrorEvent(new Error("The source '"+ke+"' does not exist in the map's style.")));return}var vt=je.getSource().type,Mt=vt==="vector"?ae.sourceLayer:void 0;if(vt==="vector"&&!Mt){this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(be&&typeof ae.id!="string"&&typeof ae.id!="number"){this.fire(new a.ErrorEvent(new Error("A feature id is requred to remove its specific state property.")));return}je.removeFeatureState(Mt,ae.id,be)},J.prototype.getFeatureState=function(ae){this._checkLoaded();var be=ae.source,ke=ae.sourceLayer,je=this.sourceCaches[be];if(je===void 0){this.fire(new a.ErrorEvent(new Error("The source '"+be+"' does not exist in the map's style.")));return}var vt=je.getSource().type;if(vt==="vector"&&!ke){this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return ae.id===void 0&&this.fire(new a.ErrorEvent(new Error("The feature id parameter must be provided."))),je.getFeatureState(ke,ae.id)},J.prototype.getTransition=function(){return a.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},J.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(ae){return ae.serialize()}),layers:this._serializeLayers(this._order)},function(ae){return ae!==void 0})},J.prototype._updateLayer=function(ae){this._updatedLayers[ae.id]=!0,ae.source&&!this._updatedSources[ae.source]&&this.sourceCaches[ae.source].getSource().type!=="raster"&&(this._updatedSources[ae.source]="reload",this.sourceCaches[ae.source].pause()),this._changed=!0},J.prototype._flattenAndSortRenderedFeatures=function(ae){for(var be=this,ke=function(ka){return be._layers[ka].type==="fill-extrusion"},je={},vt=[],Mt=this._order.length-1;Mt>=0;Mt--){var Gt=this._order[Mt];if(ke(Gt)){je[Gt]=Mt;for(var er=0,vr=ae;er<vr.length;er+=1){var br=vr[er],Fr=br[Gt];if(Fr)for(var Gr=0,Wr=Fr;Gr<Wr.length;Gr+=1){var Vr=Wr[Gr];vt.push(Vr)}}}}vt.sort(function(ka,Ya){return Ya.intersectionZ-ka.intersectionZ});for(var Qr=[],ln=this._order.length-1;ln>=0;ln--){var Cn=this._order[ln];if(ke(Cn))for(var On=vt.length-1;On>=0;On--){var Xn=vt[On].feature;if(je[Xn.layer.id]<ln)break;Qr.push(Xn),vt.pop()}else for(var jn=0,Zn=ae;jn<Zn.length;jn+=1){var ra=Zn[jn],ca=ra[Cn];if(ca)for(var fa=0,ya=ca;fa<ya.length;fa+=1){var Ta=ya[fa];Qr.push(Ta.feature)}}}return Qr},J.prototype.queryRenderedFeatures=function(ae,be,ke){be&&be.filter&&this._validate(a.validateStyle.filter,"queryRenderedFeatures.filter",be.filter,null,be);var je={};if(be&&be.layers){if(!Array.isArray(be.layers))return this.fire(new a.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var vt=0,Mt=be.layers;vt<Mt.length;vt+=1){var Gt=Mt[vt],er=this._layers[Gt];if(!er)return this.fire(new a.ErrorEvent(new Error("The layer '"+Gt+"' does not exist in the map's style and cannot be queried for features."))),[];je[er.source]=!0}}var vr=[];be.availableImages=this._availableImages;for(var br in this.sourceCaches)be.layers&&!je[br]||vr.push(te(this.sourceCaches[br],this._layers,this._serializedLayers,ae,be,ke));return this.placement&&vr.push(ne(this._layers,this._serializedLayers,this.sourceCaches,ae,be,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(vr)},J.prototype.querySourceFeatures=function(ae,be){be&&be.filter&&this._validate(a.validateStyle.filter,"querySourceFeatures.filter",be.filter,null,be);var ke=this.sourceCaches[ae];return ke?ve(ke,be):[]},J.prototype.addSourceType=function(ae,be,ke){if(J.getSourceType(ae))return ke(new Error('A source type called "'+ae+'" already exists.'));if(J.setSourceType(ae,be),!be.workerSourceURL)return ke(null,null);this.dispatcher.broadcast("loadWorkerSource",{name:ae,url:be.workerSourceURL},ke)},J.prototype.getLight=function(){return this.light.getLight()},J.prototype.setLight=function(ae,be){be===void 0&&(be={}),this._checkLoaded();var ke=this.light.getLight(),je=!1;for(var vt in ae)if(!a.deepEqual(ae[vt],ke[vt])){je=!0;break}if(je){var Mt={now:a.browser.now(),transition:a.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(ae,be),this.light.updateTransitions(Mt)}},J.prototype._validate=function(ae,be,ke,je,vt){return vt===void 0&&(vt={}),vt&&vt.validate===!1?!1:oa(this,ae.call(a.validateStyle,a.extend({key:be,style:this.serialize(),value:ke,styleSpec:a.styleSpec},je)))},J.prototype._remove=function(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),a.evented.off("pluginStateChange",this._rtlTextPluginCallback);for(var ae in this._layers){var be=this._layers[ae];be.setEventedParent(null)}for(var ke in this.sourceCaches)this.sourceCaches[ke].clearTiles(),this.sourceCaches[ke].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},J.prototype._clearSource=function(ae){this.sourceCaches[ae].clearTiles()},J.prototype._reloadSource=function(ae){this.sourceCaches[ae].resume(),this.sourceCaches[ae].reload()},J.prototype._updateSources=function(ae){for(var be in this.sourceCaches)this.sourceCaches[be].update(ae)},J.prototype._generateCollisionBoxes=function(){for(var ae in this.sourceCaches)this._reloadSource(ae)},J.prototype._updatePlacement=function(ae,be,ke,je,vt){vt===void 0&&(vt=!1);for(var Mt=!1,Gt=!1,er={},vr=0,br=this._order;vr<br.length;vr+=1){var Fr=br[vr],Gr=this._layers[Fr];if(Gr.type==="symbol"){if(!er[Gr.source]){var Wr=this.sourceCaches[Gr.source];er[Gr.source]=Wr.getRenderableIds(!0).map(function(jn){return Wr.getTileByID(jn)}).sort(function(jn,Zn){return Zn.tileID.overscaledZ-jn.tileID.overscaledZ||(jn.tileID.isLessThan(Zn.tileID)?-1:1)})}var Vr=this.crossTileSymbolIndex.addLayer(Gr,er[Gr.source],ae.center.lng);Mt=Mt||Vr}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),vt=vt||this._layerOrderChanged||ke===0,(vt||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(a.browser.now(),ae.zoom))&&(this.pauseablePlacement=new Yn(ae,this._order,vt,be,ke,je,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,er),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(a.browser.now()),Gt=!0),Mt&&this.pauseablePlacement.placement.setStale()),Gt||Mt)for(var Qr=0,ln=this._order;Qr<ln.length;Qr+=1){var Cn=ln[Qr],On=this._layers[Cn];On.type==="symbol"&&this.placement.updateLayerOpacities(On,er[On.source])}var Xn=!this.pauseablePlacement.isDone()||this.placement.hasTransitions(a.browser.now());return Xn},J.prototype._releaseSymbolFadeTiles=function(){for(var ae in this.sourceCaches)this.sourceCaches[ae].releaseSymbolFadeTiles()},J.prototype.getImages=function(ae,be,ke){this.imageManager.getImages(be.icons,ke),this._updateTilesForChangedImages();var je=this.sourceCaches[be.source];je&&je.setDependencies(be.tileID.key,be.type,be.icons)},J.prototype.getGlyphs=function(ae,be,ke){this.glyphManager.getGlyphs(be.stacks,ke)},J.prototype.getResource=function(ae,be,ke){return a.makeRequest(be,ke)},J}(a.Evented);Fo.getSourceType=Z,Fo.setSourceType=Q,Fo.registerForPluginStateChange=a.registerForPluginStateChange;var Ho=a.createLayout([{name:"a_pos",type:"Int16",components:2}]),ko=`#ifdef GL_ES
precision mediump float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif`,ic=`#ifdef GL_ES
precision highp float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0
);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}`,oi=`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Yu="attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}",pu=`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,fo="uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}",Vo=`varying vec3 v_data;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,qc=`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main(void) {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`,Xu="void main() {gl_FragColor=vec4(1.0);}",Ni="attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}",Zu=`uniform highp float u_intensity;varying vec2 v_extrude;
#pragma mapbox: define highp float weight
#define GAUSS_COEF 0.3989422804014327
void main() {
#pragma mapbox: initialize highp float weight
float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Qo=`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;
#pragma mapbox: define highp float weight
#pragma mapbox: define mediump float radius
const highp float ZERO=1.0/255.0/16.0;
#define GAUSS_COEF 0.3989422804014327
void main(void) {
#pragma mapbox: initialize highp float weight
#pragma mapbox: initialize mediump float radius
vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}`,no=`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(0.0);
#endif
}`,qo="uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}",Lo="varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}",os="attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}",zs="varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}",rl="attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}",po="uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}",eh="attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}",Ns=`#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_FragColor=color*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,go=`attribute vec2 a_pos;uniform mat4 u_matrix;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);}`,oc=`varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,nl=`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`,Bs=`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_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);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,sc=`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
#pragma mapbox: define lowp float opacity
#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 opacity
#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;gl_Position=u_matrix*vec4(a_pos,0,1);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;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`,lc=`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_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);gl_FragColor=mix(color1,color2,u_fade)*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,ov=`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#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 opacity
#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 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;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`,ju=`varying vec4 v_color;void main() {gl_FragColor=v_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,sv=`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;
#pragma mapbox: define highp float base
#pragma mapbox: define highp float height
#pragma mapbox: define highp vec4 color
void main() {
#pragma mapbox: initialize highp float base
#pragma mapbox: initialize highp float height
#pragma mapbox: initialize highp vec4 color
vec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 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;}`,lv=`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
}`,uv=`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;}`,uc=`#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;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 exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*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
}`,fv="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;}",cv=`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
}`,th="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;}",hv=`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
}`,vv=`
#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);}`,fc=`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 float v_lineprogress;
#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,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Wl=`
#define MAX_LINE_DISTANCE 32767.0
#define scale 0.015873016
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_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;
#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;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;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);}`,Yl=`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
}`,gu=`
#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;}`,Lf=`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
}`,dv=`
#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);}`,al=`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
}`,rh="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;}",cc=`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
}`,pv=`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));}`,ss=`#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
}`,Xl=`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);}`,Ku=`#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
}`,yu=`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);}`,Us=wi(ko,ic),il=wi(oi,Yu),hc=wi(pu,fo),mu=wi(Vo,qc),Al=wi(Xu,Ni),Zi=wi(Zu,Qo),vc=wi(no,qo),Pf=wi(Lo,os),xu=wi(zs,rl),nh=wi(po,eh),ah=wi(Ns,go),bu=wi(oc,nl),wu=wi(Bs,sc),co=wi(lc,ov),_f=wi(ju,sv),gv=wi(lv,uv),dc=wi(uc,fv),yv=wi(cv,th),Rf=wi(hv,vv),Ju=wi(fc,Wl),pc=wi(Yl,gu),gc=wi(Lf,dv),$u=wi(al,rh),yc=wi(cc,pv),Df=wi(ss,Xl),mc=wi(Ku,yu);function wi(ge,J){var me=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,ae={};return ge=ge.replace(me,function(be,ke,je,vt,Mt){return ae[Mt]=!0,ke==="define"?`
#ifndef HAS_UNIFORM_u_`+Mt+`
varying `+je+" "+vt+" "+Mt+`;
#else
uniform `+je+" "+vt+" u_"+Mt+`;
#endif
`:`
#ifdef HAS_UNIFORM_u_`+Mt+`
`+je+" "+vt+" "+Mt+" = u_"+Mt+`;
#endif
`}),J=J.replace(me,function(be,ke,je,vt,Mt){var Gt=vt==="float"?"vec2":"vec4",er=Mt.match(/color/)?"color":Gt;return ae[Mt]?ke==="define"?`
#ifndef HAS_UNIFORM_u_`+Mt+`
uniform lowp float u_`+Mt+`_t;
attribute `+je+" "+Gt+" a_"+Mt+`;
varying `+je+" "+vt+" "+Mt+`;
#else
uniform `+je+" "+vt+" u_"+Mt+`;
#endif
`:er==="vec4"?`
#ifndef HAS_UNIFORM_u_`+Mt+`
`+Mt+" = a_"+Mt+`;
#else
`+je+" "+vt+" "+Mt+" = u_"+Mt+`;
#endif
`:`
#ifndef HAS_UNIFORM_u_`+Mt+`
`+Mt+" = unpack_mix_"+er+"(a_"+Mt+", u_"+Mt+`_t);
#else
`+je+" "+vt+" "+Mt+" = u_"+Mt+`;
#endif
`:ke==="define"?`
#ifndef HAS_UNIFORM_u_`+Mt+`
uniform lowp float u_`+Mt+`_t;
attribute `+je+" "+Gt+" a_"+Mt+`;
#else
uniform `+je+" "+vt+" u_"+Mt+`;
#endif
`:er==="vec4"?`
#ifndef HAS_UNIFORM_u_`+Mt+`
`+je+" "+vt+" "+Mt+" = a_"+Mt+`;
#else
`+je+" "+vt+" "+Mt+" = u_"+Mt+`;
#endif
`:`
#ifndef HAS_UNIFORM_u_`+Mt+`
`+je+" "+vt+" "+Mt+" = unpack_mix_"+er+"(a_"+Mt+", u_"+Mt+`_t);
#else
`+je+" "+vt+" "+Mt+" = u_"+Mt+`;
#endif
`}),{fragmentSource:ge,vertexSource:J}}var ih=Object.freeze({__proto__:null,prelude:Us,background:il,backgroundPattern:hc,circle:mu,clippingMask:Al,heatmap:Zi,heatmapTexture:vc,collisionBox:Pf,collisionCircle:xu,debug:nh,fill:ah,fillOutline:bu,fillOutlinePattern:wu,fillPattern:co,fillExtrusion:_f,fillExtrusionPattern:gv,hillshadePrepare:dc,hillshade:yv,line:Rf,lineGradient:Ju,linePattern:pc,lineSDF:gc,raster:$u,symbolIcon:yc,symbolSDF:Df,symbolTextAndIcon:mc}),xs=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};xs.prototype.bind=function(J,me,ae,be,ke,je,vt,Mt){this.context=J;for(var Gt=this.boundPaintVertexBuffers.length!==be.length,er=0;!Gt&&er<be.length;er++)this.boundPaintVertexBuffers[er]!==be[er]&&(Gt=!0);var vr=!this.vao||this.boundProgram!==me||this.boundLayoutVertexBuffer!==ae||Gt||this.boundIndexBuffer!==ke||this.boundVertexOffset!==je||this.boundDynamicVertexBuffer!==vt||this.boundDynamicVertexBuffer2!==Mt;!J.extVertexArrayObject||vr?this.freshBind(me,ae,be,ke,je,vt,Mt):(J.bindVertexArrayOES.set(this.vao),vt&&vt.bind(),ke&&ke.dynamicDraw&&ke.bind(),Mt&&Mt.bind())},xs.prototype.freshBind=function(J,me,ae,be,ke,je,vt){var Mt,Gt=J.numAttributes,er=this.context,vr=er.gl;if(er.extVertexArrayObject)this.vao&&this.destroy(),this.vao=er.extVertexArrayObject.createVertexArrayOES(),er.bindVertexArrayOES.set(this.vao),Mt=0,this.boundProgram=J,this.boundLayoutVertexBuffer=me,this.boundPaintVertexBuffers=ae,this.boundIndexBuffer=be,this.boundVertexOffset=ke,this.boundDynamicVertexBuffer=je,this.boundDynamicVertexBuffer2=vt;else{Mt=er.currentNumAttributes||0;for(var br=Gt;br<Mt;br++)vr.disableVertexAttribArray(br)}me.enableAttributes(vr,J);for(var Fr=0,Gr=ae;Fr<Gr.length;Fr+=1){var Wr=Gr[Fr];Wr.enableAttributes(vr,J)}je&&je.enableAttributes(vr,J),vt&&vt.enableAttributes(vr,J),me.bind(),me.setVertexAttribPointers(vr,J,ke);for(var Vr=0,Qr=ae;Vr<Qr.length;Vr+=1){var ln=Qr[Vr];ln.bind(),ln.setVertexAttribPointers(vr,J,ke)}je&&(je.bind(),je.setVertexAttribPointers(vr,J,ke)),be&&be.bind(),vt&&(vt.bind(),vt.setVertexAttribPointers(vr,J,ke)),er.currentNumAttributes=Gt},xs.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var Tu=function(J,me,ae,be,ke){var je=J.gl;this.program=je.createProgram();var vt=ae?ae.defines():[];ke&&vt.push("#define OVERDRAW_INSPECTOR;");var Mt=vt.concat(Us.fragmentSource,me.fragmentSource).join(`
`),Gt=vt.concat(Us.vertexSource,me.vertexSource).join(`
`),er=je.createShader(je.FRAGMENT_SHADER);if(je.isContextLost()){this.failedToCreate=!0;return}je.shaderSource(er,Mt),je.compileShader(er),je.attachShader(this.program,er);var vr=je.createShader(je.VERTEX_SHADER);if(je.isContextLost()){this.failedToCreate=!0;return}je.shaderSource(vr,Gt),je.compileShader(vr),je.attachShader(this.program,vr);for(var br=ae?ae.layoutAttributes:[],Fr=0;Fr<br.length;Fr++)je.bindAttribLocation(this.program,Fr,br[Fr].name);je.linkProgram(this.program),je.deleteShader(vr),je.deleteShader(er),this.numAttributes=je.getProgramParameter(this.program,je.ACTIVE_ATTRIBUTES),this.attributes={};for(var Gr={},Wr=0;Wr<this.numAttributes;Wr++){var Vr=je.getActiveAttrib(this.program,Wr);Vr&&(this.attributes[Vr.name]=je.getAttribLocation(this.program,Vr.name))}for(var Qr=je.getProgramParameter(this.program,je.ACTIVE_UNIFORMS),ln=0;ln<Qr;ln++){var Cn=je.getActiveUniform(this.program,ln);Cn&&(Gr[Cn.name]=je.getUniformLocation(this.program,Cn.name))}this.fixedUniforms=be(J,Gr),this.binderUniforms=ae?ae.getUniforms(J,Gr):[]};Tu.prototype.draw=function(J,me,ae,be,ke,je,vt,Mt,Gt,er,vr,br,Fr,Gr,Wr,Vr){var Qr,ln=J.gl;if(!this.failedToCreate){J.program.set(this.program),J.setDepthMode(ae),J.setStencilMode(be),J.setColorMode(ke),J.setCullFace(je);for(var Cn in this.fixedUniforms)this.fixedUniforms[Cn].set(vt[Cn]);Gr&&Gr.setUniforms(J,this.binderUniforms,br,{zoom:Fr});for(var On=(Qr={},Qr[ln.LINES]=2,Qr[ln.TRIANGLES]=3,Qr[ln.LINE_STRIP]=1,Qr)[me],Xn=0,jn=vr.get();Xn<jn.length;Xn+=1){var Zn=jn[Xn],ra=Zn.vaos||(Zn.vaos={}),ca=ra[Mt]||(ra[Mt]=new xs);ca.bind(J,this,Gt,Gr?Gr.getPaintVertexBuffers():[],er,Zn.vertexOffset,Wr,Vr),ln.drawElements(me,Zn.primitiveLength*On,ln.UNSIGNED_SHORT,Zn.primitiveOffset*On*2)}}};function Zl(ge,J,me){var ae=1/dn(me,1,J.transform.tileZoom),be=Math.pow(2,me.tileID.overscaledZ),ke=me.tileSize*Math.pow(2,J.transform.tileZoom)/be,je=ke*(me.tileID.canonical.x+me.tileID.wrap*be),vt=ke*me.tileID.canonical.y;return{u_image:0,u_texsize:me.imageAtlasTexture.size,u_scale:[ae,ge.fromScale,ge.toScale],u_fade:ge.t,u_pixel_coord_upper:[je>>16,vt>>16],u_pixel_coord_lower:[je&65535,vt&65535]}}function xc(ge,J,me,ae){var be=me.imageManager.getPattern(ge.from.toString()),ke=me.imageManager.getPattern(ge.to.toString()),je=me.imageManager.getPixelSize(),vt=je.width,Mt=je.height,Gt=Math.pow(2,ae.tileID.overscaledZ),er=ae.tileSize*Math.pow(2,me.transform.tileZoom)/Gt,vr=er*(ae.tileID.canonical.x+ae.tileID.wrap*Gt),br=er*ae.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:be.tl,u_pattern_br_a:be.br,u_pattern_tl_b:ke.tl,u_pattern_br_b:ke.br,u_texsize:[vt,Mt],u_mix:J.t,u_pattern_size_a:be.displaySize,u_pattern_size_b:ke.displaySize,u_scale_a:J.fromScale,u_scale_b:J.toScale,u_tile_units_to_pixels:1/dn(ae,1,me.transform.tileZoom),u_pixel_coord_upper:[vr>>16,br>>16],u_pixel_coord_lower:[vr&65535,br&65535]}}var Ji=function(ge,J){return{u_matrix:new a.UniformMatrix4f(ge,J.u_matrix),u_lightpos:new a.Uniform3f(ge,J.u_lightpos),u_lightintensity:new a.Uniform1f(ge,J.u_lightintensity),u_lightcolor:new a.Uniform3f(ge,J.u_lightcolor),u_vertical_gradient:new a.Uniform1f(ge,J.u_vertical_gradient),u_opacity:new a.Uniform1f(ge,J.u_opacity)}},Qu=function(ge,J){return{u_matrix:new a.UniformMatrix4f(ge,J.u_matrix),u_lightpos:new a.Uniform3f(ge,J.u_lightpos),u_lightintensity:new a.Uniform1f(ge,J.u_lightintensity),u_lightcolor:new a.Uniform3f(ge,J.u_lightcolor),u_vertical_gradient:new a.Uniform1f(ge,J.u_vertical_gradient),u_height_factor:new a.Uniform1f(ge,J.u_height_factor),u_image:new a.Uniform1i(ge,J.u_image),u_texsize:new a.Uniform2f(ge,J.u_texsize),u_pixel_coord_upper:new a.Uniform2f(ge,J.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(ge,J.u_pixel_coord_lower),u_scale:new a.Uniform3f(ge,J.u_scale),u_fade:new a.Uniform1f(ge,J.u_fade),u_opacity:new a.Uniform1f(ge,J.u_opacity)}},Go=function(ge,J,me,ae){var be=J.style.light,ke=be.properties.get("position"),je=[ke.x,ke.y,ke.z],vt=a.create$1();be.properties.get("anchor")==="viewport"&&a.fromRotation(vt,-J.transform.angle),a.transformMat3(je,je,vt);var Mt=be.properties.get("color");return{u_matrix:ge,u_lightpos:je,u_lightintensity:be.properties.get("intensity"),u_lightcolor:[Mt.r,Mt.g,Mt.b],u_vertical_gradient:+me,u_opacity:ae}},ol=function(ge,J,me,ae,be,ke,je){return a.extend(Go(ge,J,me,ae),Zl(ke,J,je),{u_height_factor:-Math.pow(2,be.overscaledZ)/je.tileSize/8})},sl=function(ge,J){return{u_matrix:new a.UniformMatrix4f(ge,J.u_matrix)}},Sl=function(ge,J){return{u_matrix:new a.UniformMatrix4f(ge,J.u_matrix),u_image:new a.Uniform1i(ge,J.u_image),u_texsize:new a.Uniform2f(ge,J.u_texsize),u_pixel_coord_upper:new a.Uniform2f(ge,J.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(ge,J.u_pixel_coord_lower),u_scale:new a.Uniform3f(ge,J.u_scale),u_fade:new a.Uniform1f(ge,J.u_fade)}},El=function(ge,J){return{u_matrix:new a.UniformMatrix4f(ge,J.u_matrix),u_world:new a.Uniform2f(ge,J.u_world)}},Ml=function(ge,J){return{u_matrix:new a.UniformMatrix4f(ge,J.u_matrix),u_world:new a.Uniform2f(ge,J.u_world),u_image:new a.Uniform1i(ge,J.u_image),u_texsize:new a.Uniform2f(ge,J.u_texsize),u_pixel_coord_upper:new a.Uniform2f(ge,J.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(ge,J.u_pixel_coord_lower),u_scale:new a.Uniform3f(ge,J.u_scale),u_fade:new a.Uniform1f(ge,J.u_fade)}},bs=function(ge){return{u_matrix:ge}},Hs=function(ge,J,me,ae){return a.extend(bs(ge),Zl(me,J,ae))},qu=function(ge,J){return{u_matrix:ge,u_world:J}},ef=function(ge,J,me,ae,be){return a.extend(Hs(ge,J,me,ae),{u_world:be})},If=function(ge,J){return{u_camera_to_center_distance:new a.Uniform1f(ge,J.u_camera_to_center_distance),u_scale_with_map:new a.Uniform1i(ge,J.u_scale_with_map),u_pitch_with_map:new a.Uniform1i(ge,J.u_pitch_with_map),u_extrude_scale:new a.Uniform2f(ge,J.u_extrude_scale),u_device_pixel_ratio:new a.Uniform1f(ge,J.u_device_pixel_ratio),u_matrix:new a.UniformMatrix4f(ge,J.u_matrix)}},mv=function(ge,J,me,ae){var be=ge.transform,ke,je;if(ae.paint.get("circle-pitch-alignment")==="map"){var vt=dn(me,1,be.zoom);ke=!0,je=[vt,vt]}else ke=!1,je=be.pixelsToGLUnits;return{u_camera_to_center_distance:be.cameraToCenterDistance,u_scale_with_map:+(ae.paint.get("circle-pitch-scale")==="map"),u_matrix:ge.translatePosMatrix(J.posMatrix,me,ae.paint.get("circle-translate"),ae.paint.get("circle-translate-anchor")),u_pitch_with_map:+ke,u_device_pixel_ratio:a.browser.devicePixelRatio,u_extrude_scale:je}},xv=function(ge,J){return{u_matrix:new a.UniformMatrix4f(ge,J.u_matrix),u_camera_to_center_distance:new a.Uniform1f(ge,J.u_camera_to_center_distance),u_pixels_to_tile_units:new a.Uniform1f(ge,J.u_pixels_to_tile_units),u_extrude_scale:new a.Uniform2f(ge,J.u_extrude_scale),u_overscale_factor:new a.Uniform1f(ge,J.u_overscale_factor)}},bv=function(ge,J){return{u_matrix:new a.UniformMatrix4f(ge,J.u_matrix),u_inv_matrix:new a.UniformMatrix4f(ge,J.u_inv_matrix),u_camera_to_center_distance:new a.Uniform1f(ge,J.u_camera_to_center_distance),u_viewport_size:new a.Uniform2f(ge,J.u_viewport_size)}},wv=function(ge,J,me){var ae=dn(me,1,J.zoom),be=Math.pow(2,J.zoom-me.tileID.overscaledZ),ke=me.tileID.overscaleFactor();return{u_matrix:ge,u_camera_to_center_distance:J.cameraToCenterDistance,u_pixels_to_tile_units:ae,u_extrude_scale:[J.pixelsToGLUnits[0]/(ae*be),J.pixelsToGLUnits[1]/(ae*be)],u_overscale_factor:ke}},Ff=function(ge,J,me){return{u_matrix:ge,u_inv_matrix:J,u_camera_to_center_distance:me.cameraToCenterDistance,u_viewport_size:[me.width,me.height]}},oh=function(ge,J){return{u_color:new a.UniformColor(ge,J.u_color),u_matrix:new a.UniformMatrix4f(ge,J.u_matrix),u_overlay:new a.Uniform1i(ge,J.u_overlay),u_overlay_scale:new a.Uniform1f(ge,J.u_overlay_scale)}},Au=function(ge,J,me){return me===void 0&&(me=1),{u_matrix:ge,u_color:J,u_overlay:0,u_overlay_scale:me}},yo=function(ge,J){return{u_matrix:new a.UniformMatrix4f(ge,J.u_matrix)}},Wo=function(ge){return{u_matrix:ge}},tf=function(ge,J){return{u_extrude_scale:new a.Uniform1f(ge,J.u_extrude_scale),u_intensity:new a.Uniform1f(ge,J.u_intensity),u_matrix:new a.UniformMatrix4f(ge,J.u_matrix)}},jl=function(ge,J){return{u_matrix:new a.UniformMatrix4f(ge,J.u_matrix),u_world:new a.Uniform2f(ge,J.u_world),u_image:new a.Uniform1i(ge,J.u_image),u_color_ramp:new a.Uniform1i(ge,J.u_color_ramp),u_opacity:new a.Uniform1f(ge,J.u_opacity)}},rf=function(ge,J,me,ae){return{u_matrix:ge,u_extrude_scale:dn(J,1,me),u_intensity:ae}},kf=function(ge,J,me,ae){var be=a.create();a.ortho(be,0,ge.width,ge.height,0,0,1);var ke=ge.context.gl;return{u_matrix:be,u_world:[ke.drawingBufferWidth,ke.drawingBufferHeight],u_image:me,u_color_ramp:ae,u_opacity:J.paint.get("heatmap-opacity")}},Tv=function(ge,J){return{u_matrix:new a.UniformMatrix4f(ge,J.u_matrix),u_image:new a.Uniform1i(ge,J.u_image),u_latrange:new a.Uniform2f(ge,J.u_latrange),u_light:new a.Uniform2f(ge,J.u_light),u_shadow:new a.UniformColor(ge,J.u_shadow),u_highlight:new a.UniformColor(ge,J.u_highlight),u_accent:new a.UniformColor(ge,J.u_accent)}},sh=function(ge,J){return{u_matrix:new a.UniformMatrix4f(ge,J.u_matrix),u_image:new a.Uniform1i(ge,J.u_image),u_dimension:new a.Uniform2f(ge,J.u_dimension),u_zoom:new a.Uniform1f(ge,J.u_zoom),u_maxzoom:new a.Uniform1f(ge,J.u_maxzoom),u_unpack:new a.Uniform4f(ge,J.u_unpack)}},lh=function(ge,J,me){var ae=me.paint.get("hillshade-shadow-color"),be=me.paint.get("hillshade-highlight-color"),ke=me.paint.get("hillshade-accent-color"),je=me.paint.get("hillshade-illumination-direction")*(Math.PI/180);me.paint.get("hillshade-illumination-anchor")==="viewport"&&(je-=ge.transform.angle);var vt=!ge.options.moving;return{u_matrix:ge.transform.calculatePosMatrix(J.tileID.toUnwrapped(),vt),u_image:0,u_latrange:Cl(ge,J.tileID),u_light:[me.paint.get("hillshade-exaggeration"),je],u_shadow:ae,u_highlight:be,u_accent:ke}},bc=function(ge,J,me){var ae=J.stride,be=a.create();return a.ortho(be,0,a.EXTENT,-a.EXTENT,0,0,1),a.translate(be,be,[0,-a.EXTENT,0]),{u_matrix:be,u_image:1,u_dimension:[ae,ae],u_zoom:ge.overscaledZ,u_maxzoom:me,u_unpack:J.getUnpackVector()}};function Cl(ge,J){var me=Math.pow(2,J.canonical.z),ae=J.canonical.y;return[new a.MercatorCoordinate(0,ae/me).toLngLat().lat,new a.MercatorCoordinate(0,(ae+1)/me).toLngLat().lat]}var $i=function(ge,J){return{u_matrix:new a.UniformMatrix4f(ge,J.u_matrix),u_ratio:new a.Uniform1f(ge,J.u_ratio),u_device_pixel_ratio:new a.Uniform1f(ge,J.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(ge,J.u_units_to_pixels)}},Vs=function(ge,J){return{u_matrix:new a.UniformMatrix4f(ge,J.u_matrix),u_ratio:new a.Uniform1f(ge,J.u_ratio),u_device_pixel_ratio:new a.Uniform1f(ge,J.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(ge,J.u_units_to_pixels),u_image:new a.Uniform1i(ge,J.u_image)}},wc=function(ge,J){return{u_matrix:new a.UniformMatrix4f(ge,J.u_matrix),u_texsize:new a.Uniform2f(ge,J.u_texsize),u_ratio:new a.Uniform1f(ge,J.u_ratio),u_device_pixel_ratio:new a.Uniform1f(ge,J.u_device_pixel_ratio),u_image:new a.Uniform1i(ge,J.u_image),u_units_to_pixels:new a.Uniform2f(ge,J.u_units_to_pixels),u_scale:new a.Uniform3f(ge,J.u_scale),u_fade:new a.Uniform1f(ge,J.u_fade)}},uh=function(ge,J){return{u_matrix:new a.UniformMatrix4f(ge,J.u_matrix),u_ratio:new a.Uniform1f(ge,J.u_ratio),u_device_pixel_ratio:new a.Uniform1f(ge,J.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(ge,J.u_units_to_pixels),u_patternscale_a:new a.Uniform2f(ge,J.u_patternscale_a),u_patternscale_b:new a.Uniform2f(ge,J.u_patternscale_b),u_sdfgamma:new a.Uniform1f(ge,J.u_sdfgamma),u_image:new a.Uniform1i(ge,J.u_image),u_tex_y_a:new a.Uniform1f(ge,J.u_tex_y_a),u_tex_y_b:new a.Uniform1f(ge,J.u_tex_y_b),u_mix:new a.Uniform1f(ge,J.u_mix)}},Kl=function(ge,J,me){var ae=ge.transform;return{u_matrix:ul(ge,J,me),u_ratio:1/dn(J,1,ae.zoom),u_device_pixel_ratio:a.browser.devicePixelRatio,u_units_to_pixels:[1/ae.pixelsToGLUnits[0],1/ae.pixelsToGLUnits[1]]}},Of=function(ge,J,me){return a.extend(Kl(ge,J,me),{u_image:0})},ws=function(ge,J,me,ae){var be=ge.transform,ke=ll(J,be);return{u_matrix:ul(ge,J,me),u_texsize:J.imageAtlasTexture.size,u_ratio:1/dn(J,1,be.zoom),u_device_pixel_ratio:a.browser.devicePixelRatio,u_image:0,u_scale:[ke,ae.fromScale,ae.toScale],u_fade:ae.t,u_units_to_pixels:[1/be.pixelsToGLUnits[0],1/be.pixelsToGLUnits[1]]}},zf=function(ge,J,me,ae,be){var ke=ge.transform,je=ge.lineAtlas,vt=ll(J,ke),Mt=me.layout.get("line-cap")==="round",Gt=je.getDash(ae.from,Mt),er=je.getDash(ae.to,Mt),vr=Gt.width*be.fromScale,br=er.width*be.toScale;return a.extend(Kl(ge,J,me),{u_patternscale_a:[vt/vr,-Gt.height/2],u_patternscale_b:[vt/br,-er.height/2],u_sdfgamma:je.width/(Math.min(vr,br)*256*a.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:Gt.y,u_tex_y_b:er.y,u_mix:be.t})};function ll(ge,J){return 1/dn(ge,1,J.tileZoom)}function ul(ge,J,me){return ge.translatePosMatrix(J.tileID.posMatrix,J,me.paint.get("line-translate"),me.paint.get("line-translate-anchor"))}var Tc=function(ge,J){return{u_matrix:new a.UniformMatrix4f(ge,J.u_matrix),u_tl_parent:new a.Uniform2f(ge,J.u_tl_parent),u_scale_parent:new a.Uniform1f(ge,J.u_scale_parent),u_buffer_scale:new a.Uniform1f(ge,J.u_buffer_scale),u_fade_t:new a.Uniform1f(ge,J.u_fade_t),u_opacity:new a.Uniform1f(ge,J.u_opacity),u_image0:new a.Uniform1i(ge,J.u_image0),u_image1:new a.Uniform1i(ge,J.u_image1),u_brightness_low:new a.Uniform1f(ge,J.u_brightness_low),u_brightness_high:new a.Uniform1f(ge,J.u_brightness_high),u_saturation_factor:new a.Uniform1f(ge,J.u_saturation_factor),u_contrast_factor:new a.Uniform1f(ge,J.u_contrast_factor),u_spin_weights:new a.Uniform3f(ge,J.u_spin_weights)}},Su=function(ge,J,me,ae,be){return{u_matrix:ge,u_tl_parent:J,u_scale_parent:me,u_buffer_scale:1,u_fade_t:ae.mix,u_opacity:ae.opacity*be.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:be.paint.get("raster-brightness-min"),u_brightness_high:be.paint.get("raster-brightness-max"),u_saturation_factor:Nf(be.paint.get("raster-saturation")),u_contrast_factor:Jl(be.paint.get("raster-contrast")),u_spin_weights:pi(be.paint.get("raster-hue-rotate"))}};function pi(ge){ge*=Math.PI/180;var J=Math.sin(ge),me=Math.cos(ge);return[(2*me+1)/3,(-Math.sqrt(3)*J-me+1)/3,(Math.sqrt(3)*J-me+1)/3]}function Jl(ge){return ge>0?1/(1-ge):1+ge}function Nf(ge){return ge>0?1-1/(1.001-ge):-ge}var Bf=function(ge,J){return{u_is_size_zoom_constant:new a.Uniform1i(ge,J.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(ge,J.u_is_size_feature_constant),u_size_t:new a.Uniform1f(ge,J.u_size_t),u_size:new a.Uniform1f(ge,J.u_size),u_camera_to_center_distance:new a.Uniform1f(ge,J.u_camera_to_center_distance),u_pitch:new a.Uniform1f(ge,J.u_pitch),u_rotate_symbol:new a.Uniform1i(ge,J.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(ge,J.u_aspect_ratio),u_fade_change:new a.Uniform1f(ge,J.u_fade_change),u_matrix:new a.UniformMatrix4f(ge,J.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(ge,J.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(ge,J.u_coord_matrix),u_is_text:new a.Uniform1i(ge,J.u_is_text),u_pitch_with_map:new a.Uniform1i(ge,J.u_pitch_with_map),u_texsize:new a.Uniform2f(ge,J.u_texsize),u_texture:new a.Uniform1i(ge,J.u_texture)}},Ll=function(ge,J){return{u_is_size_zoom_constant:new a.Uniform1i(ge,J.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(ge,J.u_is_size_feature_constant),u_size_t:new a.Uniform1f(ge,J.u_size_t),u_size:new a.Uniform1f(ge,J.u_size),u_camera_to_center_distance:new a.Uniform1f(ge,J.u_camera_to_center_distance),u_pitch:new a.Uniform1f(ge,J.u_pitch),u_rotate_symbol:new a.Uniform1i(ge,J.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(ge,J.u_aspect_ratio),u_fade_change:new a.Uniform1f(ge,J.u_fade_change),u_matrix:new a.UniformMatrix4f(ge,J.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(ge,J.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(ge,J.u_coord_matrix),u_is_text:new a.Uniform1i(ge,J.u_is_text),u_pitch_with_map:new a.Uniform1i(ge,J.u_pitch_with_map),u_texsize:new a.Uniform2f(ge,J.u_texsize),u_texture:new a.Uniform1i(ge,J.u_texture),u_gamma_scale:new a.Uniform1f(ge,J.u_gamma_scale),u_device_pixel_ratio:new a.Uniform1f(ge,J.u_device_pixel_ratio),u_is_halo:new a.Uniform1i(ge,J.u_is_halo)}},Av=function(ge,J){return{u_is_size_zoom_constant:new a.Uniform1i(ge,J.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(ge,J.u_is_size_feature_constant),u_size_t:new a.Uniform1f(ge,J.u_size_t),u_size:new a.Uniform1f(ge,J.u_size),u_camera_to_center_distance:new a.Uniform1f(ge,J.u_camera_to_center_distance),u_pitch:new a.Uniform1f(ge,J.u_pitch),u_rotate_symbol:new a.Uniform1i(ge,J.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(ge,J.u_aspect_ratio),u_fade_change:new a.Uniform1f(ge,J.u_fade_change),u_matrix:new a.UniformMatrix4f(ge,J.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(ge,J.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(ge,J.u_coord_matrix),u_is_text:new a.Uniform1i(ge,J.u_is_text),u_pitch_with_map:new a.Uniform1i(ge,J.u_pitch_with_map),u_texsize:new a.Uniform2f(ge,J.u_texsize),u_texsize_icon:new a.Uniform2f(ge,J.u_texsize_icon),u_texture:new a.Uniform1i(ge,J.u_texture),u_texture_icon:new a.Uniform1i(ge,J.u_texture_icon),u_gamma_scale:new a.Uniform1f(ge,J.u_gamma_scale),u_device_pixel_ratio:new a.Uniform1f(ge,J.u_device_pixel_ratio),u_is_halo:new a.Uniform1i(ge,J.u_is_halo)}},Ac=function(ge,J,me,ae,be,ke,je,vt,Mt,Gt){var er=be.transform;return{u_is_size_zoom_constant:+(ge==="constant"||ge==="source"),u_is_size_feature_constant:+(ge==="constant"||ge==="camera"),u_size_t:J?J.uSizeT:0,u_size:J?J.uSize:0,u_camera_to_center_distance:er.cameraToCenterDistance,u_pitch:er.pitch/360*2*Math.PI,u_rotate_symbol:+me,u_aspect_ratio:er.width/er.height,u_fade_change:be.options.fadeDuration?be.symbolFadeChange:1,u_matrix:ke,u_label_plane_matrix:je,u_coord_matrix:vt,u_is_text:+Mt,u_pitch_with_map:+ae,u_texsize:Gt,u_texture:0}},Eu=function(ge,J,me,ae,be,ke,je,vt,Mt,Gt,er){var vr=be.transform;return a.extend(Ac(ge,J,me,ae,be,ke,je,vt,Mt,Gt),{u_gamma_scale:ae?Math.cos(vr._pitch)*vr.cameraToCenterDistance:1,u_device_pixel_ratio:a.browser.devicePixelRatio,u_is_halo:+er})},Sc=function(ge,J,me,ae,be,ke,je,vt,Mt,Gt){return a.extend(Eu(ge,J,me,ae,be,ke,je,vt,!0,Mt,!0),{u_texsize_icon:Gt,u_texture_icon:1})},fh=function(ge,J){return{u_matrix:new a.UniformMatrix4f(ge,J.u_matrix),u_opacity:new a.Uniform1f(ge,J.u_opacity),u_color:new a.UniformColor(ge,J.u_color)}},fl=function(ge,J){return{u_matrix:new a.UniformMatrix4f(ge,J.u_matrix),u_opacity:new a.Uniform1f(ge,J.u_opacity),u_image:new a.Uniform1i(ge,J.u_image),u_pattern_tl_a:new a.Uniform2f(ge,J.u_pattern_tl_a),u_pattern_br_a:new a.Uniform2f(ge,J.u_pattern_br_a),u_pattern_tl_b:new a.Uniform2f(ge,J.u_pattern_tl_b),u_pattern_br_b:new a.Uniform2f(ge,J.u_pattern_br_b),u_texsize:new a.Uniform2f(ge,J.u_texsize),u_mix:new a.Uniform1f(ge,J.u_mix),u_pattern_size_a:new a.Uniform2f(ge,J.u_pattern_size_a),u_pattern_size_b:new a.Uniform2f(ge,J.u_pattern_size_b),u_scale_a:new a.Uniform1f(ge,J.u_scale_a),u_scale_b:new a.Uniform1f(ge,J.u_scale_b),u_pixel_coord_upper:new a.Uniform2f(ge,J.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(ge,J.u_pixel_coord_lower),u_tile_units_to_pixels:new a.Uniform1f(ge,J.u_tile_units_to_pixels)}},Pl=function(ge,J,me){return{u_matrix:ge,u_opacity:J,u_color:me}},$l=function(ge,J,me,ae,be,ke){return a.extend(xc(ae,ke,me,be),{u_matrix:ge,u_opacity:J})},Ql={fillExtrusion:Ji,fillExtrusionPattern:Qu,fill:sl,fillPattern:Sl,fillOutline:El,fillOutlinePattern:Ml,circle:If,collisionBox:xv,collisionCircle:bv,debug:oh,clippingMask:yo,heatmap:tf,heatmapTexture:jl,hillshade:Tv,hillshadePrepare:sh,line:$i,lineGradient:Vs,linePattern:wc,lineSDF:uh,raster:Tc,symbolIcon:Bf,symbolSDF:Ll,symbolTextAndIcon:Av,background:fh,backgroundPattern:fl},Yo;function es(ge,J,me,ae,be,ke,je){for(var vt=ge.context,Mt=vt.gl,Gt=ge.useProgram("collisionBox"),er=[],vr=0,br=0,Fr=0;Fr<ae.length;Fr++){var Gr=ae[Fr],Wr=J.getTile(Gr),Vr=Wr.getBucket(me);if(Vr){var Qr=Gr.posMatrix;(be[0]!==0||be[1]!==0)&&(Qr=ge.translatePosMatrix(Gr.posMatrix,Wr,be,ke));var ln=je?Vr.textCollisionBox:Vr.iconCollisionBox,Cn=Vr.collisionCircleArray;if(Cn.length>0){var On=a.create(),Xn=Qr;a.mul(On,Vr.placementInvProjMatrix,ge.transform.glCoordMatrix),a.mul(On,On,Vr.placementViewportMatrix),er.push({circleArray:Cn,circleOffset:br,transform:Xn,invTransform:On}),vr+=Cn.length/4,br=vr}ln&&Gt.draw(vt,Mt.LINES,hr.disabled,Ut.disabled,ge.colorModeForRenderPass(),Rt.disabled,wv(Qr,ge.transform,Wr),me.id,ln.layoutVertexBuffer,ln.indexBuffer,ln.segments,null,ge.transform.zoom,null,null,ln.collisionVertexBuffer)}}if(!(!je||!er.length)){var jn=ge.useProgram("collisionCircle"),Zn=new a.StructArrayLayout2f1f2i16;Zn.resize(vr*4),Zn._trim();for(var ra=0,ca=0,fa=er;ca<fa.length;ca+=1)for(var ya=fa[ca],Ta=0;Ta<ya.circleArray.length/4;Ta++){var ka=Ta*4,Ya=ya.circleArray[ka+0],hi=ya.circleArray[ka+1],Za=ya.circleArray[ka+2],qa=ya.circleArray[ka+3];Zn.emplace(ra++,Ya,hi,Za,qa,0),Zn.emplace(ra++,Ya,hi,Za,qa,1),Zn.emplace(ra++,Ya,hi,Za,qa,2),Zn.emplace(ra++,Ya,hi,Za,qa,3)}(!Yo||Yo.length<vr*2)&&(Yo=ql(vr));for(var Ra=vt.createIndexBuffer(Yo,!0),vi=vt.createVertexBuffer(Zn,a.collisionCircleLayout.members,!0),yi=0,xi=er;yi<xi.length;yi+=1){var ti=xi[yi],Pi=Ff(ti.transform,ti.invTransform,ge.transform);jn.draw(vt,Mt.TRIANGLES,hr.disabled,Ut.disabled,ge.colorModeForRenderPass(),Rt.disabled,Pi,me.id,vi,Ra,a.SegmentVector.simpleSegment(0,ti.circleOffset*2,ti.circleArray.length,ti.circleArray.length/2),null,ge.transform.zoom,null,null,null)}vi.destroy(),Ra.destroy()}}function ql(ge){var J=ge*2,me=new a.StructArrayLayout3ui6;me.resize(J),me._trim();for(var ae=0;ae<J;ae++){var be=ae*6;me.uint16[be+0]=ae*4+0,me.uint16[be+1]=ae*4+1,me.uint16[be+2]=ae*4+2,me.uint16[be+3]=ae*4+2,me.uint16[be+4]=ae*4+3,me.uint16[be+5]=ae*4+0}return me}var ch=a.identity(new Float32Array(16));function Mu(ge,J,me,ae,be){if(ge.renderPass==="translucent"){var ke=Ut.disabled,je=ge.colorModeForRenderPass(),vt=me.layout.get("text-variable-anchor");vt&&hh(ae,ge,me,J,me.layout.get("text-rotation-alignment"),me.layout.get("text-pitch-alignment"),be),me.paint.get("icon-opacity").constantOr(1)!==0&&_l(ge,J,me,ae,!1,me.paint.get("icon-translate"),me.paint.get("icon-translate-anchor"),me.layout.get("icon-rotation-alignment"),me.layout.get("icon-pitch-alignment"),me.layout.get("icon-keep-upright"),ke,je),me.paint.get("text-opacity").constantOr(1)!==0&&_l(ge,J,me,ae,!0,me.paint.get("text-translate"),me.paint.get("text-translate-anchor"),me.layout.get("text-rotation-alignment"),me.layout.get("text-pitch-alignment"),me.layout.get("text-keep-upright"),ke,je),J.map.showCollisionBoxes&&(es(ge,J,me,ae,me.paint.get("text-translate"),me.paint.get("text-translate-anchor"),!0),es(ge,J,me,ae,me.paint.get("icon-translate"),me.paint.get("icon-translate-anchor"),!1))}}function Uf(ge,J,me,ae,be,ke){var je=a.getAnchorAlignment(ge),vt=je.horizontalAlign,Mt=je.verticalAlign,Gt=-(vt-.5)*J,er=-(Mt-.5)*me,vr=a.evaluateVariableOffset(ge,ae);return new a.Point((Gt/be+vr[0])*ke,(er/be+vr[1])*ke)}function hh(ge,J,me,ae,be,ke,je){for(var vt=J.transform,Mt=be==="map",Gt=ke==="map",er=0,vr=ge;er<vr.length;er+=1){var br=vr[er],Fr=ae.getTile(br),Gr=Fr.getBucket(me);if(!(!Gr||!Gr.text||!Gr.text.segments.get().length)){var Wr=Gr.textSizeData,Vr=a.evaluateSizeForZoom(Wr,vt.zoom),Qr=dn(Fr,1,J.transform.zoom),ln=Ar(br.posMatrix,Gt,Mt,J.transform,Qr),Cn=me.layout.get("icon-text-fit")!=="none"&&Gr.hasIconData();if(Vr){var On=Math.pow(2,vt.zoom-Fr.tileID.overscaledZ);Ts(Gr,Mt,Gt,je,a.symbolSize,vt,ln,br.posMatrix,On,Vr,Cn)}}}}function Ts(ge,J,me,ae,be,ke,je,vt,Mt,Gt,er){var vr=ge.text.placedSymbolArray,br=ge.text.dynamicLayoutVertexArray,Fr=ge.icon.dynamicLayoutVertexArray,Gr={};br.clear();for(var Wr=0;Wr<vr.length;Wr++){var Vr=vr.get(Wr),Qr=ge.allowVerticalPlacement&&!Vr.placedOrientation,ln=!Vr.hidden&&Vr.crossTileID&&!Qr?ae[Vr.crossTileID]:null;if(!ln)la(Vr.numGlyphs,br);else{var Cn=new a.Point(Vr.anchorX,Vr.anchorY),On=Br(Cn,me?vt:je),Xn=on(ke.cameraToCenterDistance,On.signedDistanceFromCamera),jn=be.evaluateSizeForFeature(ge.textSizeData,Gt,Vr)*Xn/a.ONE_EM;me&&(jn*=ge.tilePixelRatio/Mt);for(var Zn=ln.width,ra=ln.height,ca=ln.anchor,fa=ln.textOffset,ya=ln.textBoxScale,Ta=Uf(ca,Zn,ra,fa,ya,jn),ka=me?Br(Cn.add(Ta),je).point:On.point.add(J?Ta.rotate(-ke.angle):Ta),Ya=ge.allowVerticalPlacement&&Vr.placedOrientation===a.WritingMode.vertical?Math.PI/2:0,hi=0;hi<Vr.numGlyphs;hi++)a.addDynamicAttributes(br,ka,Ya);er&&Vr.associatedIconIndex>=0&&(Gr[Vr.associatedIconIndex]={shiftedAnchor:ka,angle:Ya})}}if(er){Fr.clear();for(var Za=ge.icon.placedSymbolArray,qa=0;qa<Za.length;qa++){var Ra=Za.get(qa);if(Ra.hidden)la(Ra.numGlyphs,Fr);else{var vi=Gr[qa];if(!vi)la(Ra.numGlyphs,Fr);else for(var yi=0;yi<Ra.numGlyphs;yi++)a.addDynamicAttributes(Fr,vi.shiftedAnchor,vi.angle)}}ge.icon.dynamicLayoutVertexBuffer.updateData(Fr)}ge.text.dynamicLayoutVertexBuffer.updateData(br)}function Ec(ge,J,me){return me.iconsInText&&J?"symbolTextAndIcon":ge?"symbolSDF":"symbolIcon"}function _l(ge,J,me,ae,be,ke,je,vt,Mt,Gt,er,vr){for(var br=ge.context,Fr=br.gl,Gr=ge.transform,Wr=vt==="map",Vr=Mt==="map",Qr=Wr&&me.layout.get("symbol-placement")!=="point",ln=Wr&&!Vr&&!Qr,Cn=me.layout.get("symbol-sort-key").constantOr(1)!==void 0,On=ge.depthModeForSublayer(0,hr.ReadOnly),Xn=me.layout.get("text-variable-anchor"),jn=[],Zn=0,ra=ae;Zn<ra.length;Zn+=1){var ca=ra[Zn],fa=J.getTile(ca),ya=fa.getBucket(me);if(ya){var Ta=be?ya.text:ya.icon;if(!(!Ta||!Ta.segments.get().length)){var ka=Ta.programConfigurations.get(me.id),Ya=be||ya.sdfIcons,hi=be?ya.textSizeData:ya.iconSizeData,Za=Vr||Gr.pitch!==0,qa=ge.useProgram(Ec(Ya,be,ya),ka),Ra=a.evaluateSizeForZoom(hi,Gr.zoom),vi=void 0,yi=[0,0],xi=void 0,ti=void 0,Pi=null,Xa=void 0;if(be){if(xi=fa.glyphAtlasTexture,ti=Fr.LINEAR,vi=fa.glyphAtlasTexture.size,ya.iconsInText){yi=fa.imageAtlasTexture.size,Pi=fa.imageAtlasTexture;var ni=hi.kind==="composite"||hi.kind==="camera";Xa=Za||ge.options.rotating||ge.options.zooming||ni?Fr.LINEAR:Fr.NEAREST}}else{var eo=me.layout.get("icon-size").constantOr(0)!==1||ya.iconsNeedLinear;xi=fa.imageAtlasTexture,ti=Ya||ge.options.rotating||ge.options.zooming||eo||Za?Fr.LINEAR:Fr.NEAREST,vi=fa.imageAtlasTexture.size}var mo=dn(fa,1,ge.transform.zoom),Dl=Ar(ca.posMatrix,Vr,Wr,ge.transform,mo),Il=zr(ca.posMatrix,Vr,Wr,ge.transform,mo),Cu=Xn&&ya.hasTextData(),Lu=me.layout.get("icon-text-fit")!=="none"&&Cu&&ya.hasIconData();Qr&&Tn(ya,ca.posMatrix,ge,be,Dl,Il,Vr,Gt);var cf=ge.translatePosMatrix(ca.posMatrix,fa,ke,je),Pu=Qr||be&&Xn||Lu?ch:Dl,Ss=ge.translatePosMatrix(Il,fa,ke,je,!0),Kf=Ya&&me.paint.get(be?"text-halo-width":"icon-halo-width").constantOr(1)!==0,rs=void 0;Ya?ya.iconsInText?rs=Sc(hi.kind,Ra,ln,Vr,ge,cf,Pu,Ss,vi,yi):rs=Eu(hi.kind,Ra,ln,Vr,ge,cf,Pu,Ss,be,vi,!0):rs=Ac(hi.kind,Ra,ln,Vr,ge,cf,Pu,Ss,be,vi);var hl={program:qa,buffers:Ta,uniformValues:rs,atlasTexture:xi,atlasTextureIcon:Pi,atlasInterpolation:ti,atlasInterpolationIcon:Xa,isSDF:Ya,hasHalo:Kf};if(Cn)for(var _u=Ta.segments.get(),ru=0,Ru=_u;ru<Ru.length;ru+=1){var vd=Ru[ru];jn.push({segments:new a.SegmentVector([vd]),sortKey:vd.sortKey,state:hl})}else jn.push({segments:Ta.segments,sortKey:0,state:hl})}}}Cn&&jn.sort(function(dd,pd){return dd.sortKey-pd.sortKey});for(var _c=0,Xo=jn;_c<Xo.length;_c+=1){var Pv=Xo[_c],fs=Pv.state;if(br.activeTexture.set(Fr.TEXTURE0),fs.atlasTexture.bind(fs.atlasInterpolation,Fr.CLAMP_TO_EDGE),fs.atlasTextureIcon&&(br.activeTexture.set(Fr.TEXTURE1),fs.atlasTextureIcon&&fs.atlasTextureIcon.bind(fs.atlasInterpolationIcon,Fr.CLAMP_TO_EDGE)),fs.isSDF){var _v=fs.uniformValues;fs.hasHalo&&(_v.u_is_halo=1,nf(fs.buffers,Pv.segments,me,ge,fs.program,On,er,vr,_v)),_v.u_is_halo=0}nf(fs.buffers,Pv.segments,me,ge,fs.program,On,er,vr,fs.uniformValues)}}function nf(ge,J,me,ae,be,ke,je,vt,Mt){var Gt=ae.context,er=Gt.gl;be.draw(Gt,er.TRIANGLES,ke,je,vt,Rt.disabled,Mt,me.id,ge.layoutVertexBuffer,ge.indexBuffer,J,me.paint,ae.transform.zoom,ge.programConfigurations.get(me.id),ge.dynamicLayoutVertexBuffer,ge.opacityVertexBuffer)}function cl(ge,J,me,ae){if(ge.renderPass==="translucent"){var be=me.paint.get("circle-opacity"),ke=me.paint.get("circle-stroke-width"),je=me.paint.get("circle-stroke-opacity"),vt=me.layout.get("circle-sort-key").constantOr(1)!==void 0;if(!(be.constantOr(1)===0&&(ke.constantOr(1)===0||je.constantOr(1)===0))){for(var Mt=ge.context,Gt=Mt.gl,er=ge.depthModeForSublayer(0,hr.ReadOnly),vr=Ut.disabled,br=ge.colorModeForRenderPass(),Fr=[],Gr=0;Gr<ae.length;Gr++){var Wr=ae[Gr],Vr=J.getTile(Wr),Qr=Vr.getBucket(me);if(Qr){var ln=Qr.programConfigurations.get(me.id),Cn=ge.useProgram("circle",ln),On=Qr.layoutVertexBuffer,Xn=Qr.indexBuffer,jn=mv(ge,Wr,Vr,me),Zn={programConfiguration:ln,program:Cn,layoutVertexBuffer:On,indexBuffer:Xn,uniformValues:jn};if(vt)for(var ra=Qr.segments.get(),ca=0,fa=ra;ca<fa.length;ca+=1){var ya=fa[ca];Fr.push({segments:new a.SegmentVector([ya]),sortKey:ya.sortKey,state:Zn})}else Fr.push({segments:Qr.segments,sortKey:0,state:Zn})}}vt&&Fr.sort(function(ti,Pi){return ti.sortKey-Pi.sortKey});for(var Ta=0,ka=Fr;Ta<ka.length;Ta+=1){var Ya=ka[Ta],hi=Ya.state,Za=hi.programConfiguration,qa=hi.program,Ra=hi.layoutVertexBuffer,vi=hi.indexBuffer,yi=hi.uniformValues,xi=Ya.segments;qa.draw(Mt,Gt.TRIANGLES,er,vr,br,Rt.disabled,yi,me.id,Ra,vi,xi,me.paint,ge.transform.zoom,Za)}}}}function Sv(ge,J,me,ae){if(me.paint.get("heatmap-opacity")!==0)if(ge.renderPass==="offscreen"){var be=ge.context,ke=be.gl,je=Ut.disabled,vt=new ut([ke.ONE,ke.ONE],a.Color.transparent,[!0,!0,!0,!0]);Mc(be,ge,me),be.clear({color:a.Color.transparent});for(var Mt=0;Mt<ae.length;Mt++){var Gt=ae[Mt];if(!J.hasRenderableParent(Gt)){var er=J.getTile(Gt),vr=er.getBucket(me);if(vr){var br=vr.programConfigurations.get(me.id),Fr=ge.useProgram("heatmap",br),Gr=ge.transform,Wr=Gr.zoom;Fr.draw(be,ke.TRIANGLES,hr.disabled,je,vt,Rt.disabled,rf(Gt.posMatrix,er,Wr,me.paint.get("heatmap-intensity")),me.id,vr.layoutVertexBuffer,vr.indexBuffer,vr.segments,me.paint,ge.transform.zoom,br)}}}be.viewport.set([0,0,ge.width,ge.height])}else ge.renderPass==="translucent"&&(ge.context.setColorMode(ge.colorModeForRenderPass()),Po(ge,me))}function Mc(ge,J,me){var ae=ge.gl;ge.activeTexture.set(ae.TEXTURE1),ge.viewport.set([0,0,J.width/4,J.height/4]);var be=me.heatmapFbo;if(be)ae.bindTexture(ae.TEXTURE_2D,be.colorAttachment.get()),ge.bindFramebuffer.set(be.framebuffer);else{var ke=ae.createTexture();ae.bindTexture(ae.TEXTURE_2D,ke),ae.texParameteri(ae.TEXTURE_2D,ae.TEXTURE_WRAP_S,ae.CLAMP_TO_EDGE),ae.texParameteri(ae.TEXTURE_2D,ae.TEXTURE_WRAP_T,ae.CLAMP_TO_EDGE),ae.texParameteri(ae.TEXTURE_2D,ae.TEXTURE_MIN_FILTER,ae.LINEAR),ae.texParameteri(ae.TEXTURE_2D,ae.TEXTURE_MAG_FILTER,ae.LINEAR),be=me.heatmapFbo=ge.createFramebuffer(J.width/4,J.height/4,!1),Hf(ge,J,ke,be)}}function Hf(ge,J,me,ae){var be=ge.gl,ke=ge.extRenderToTextureHalfFloat?ge.extTextureHalfFloat.HALF_FLOAT_OES:be.UNSIGNED_BYTE;be.texImage2D(be.TEXTURE_2D,0,be.RGBA,J.width/4,J.height/4,0,be.RGBA,ke,null),ae.colorAttachment.set(me)}function Po(ge,J){var me=ge.context,ae=me.gl,be=J.heatmapFbo;if(be){me.activeTexture.set(ae.TEXTURE0),ae.bindTexture(ae.TEXTURE_2D,be.colorAttachment.get()),me.activeTexture.set(ae.TEXTURE1);var ke=J.colorRampTexture;ke||(ke=J.colorRampTexture=new a.Texture(me,J.colorRamp,ae.RGBA)),ke.bind(ae.LINEAR,ae.CLAMP_TO_EDGE),ge.useProgram("heatmapTexture").draw(me,ae.TRIANGLES,hr.disabled,Ut.disabled,ge.colorModeForRenderPass(),Rt.disabled,kf(ge,J,0,1),J.id,ge.viewportBuffer,ge.quadTriangleIndexBuffer,ge.viewportSegments,J.paint,ge.transform.zoom)}}function vh(ge,J,me,ae){if(ge.renderPass==="translucent"){var be=me.paint.get("line-opacity"),ke=me.paint.get("line-width");if(!(be.constantOr(1)===0||ke.constantOr(1)===0)){var je=ge.depthModeForSublayer(0,hr.ReadOnly),vt=ge.colorModeForRenderPass(),Mt=me.paint.get("line-dasharray"),Gt=me.paint.get("line-pattern"),er=Gt.constantOr(1),vr=me.paint.get("line-gradient"),br=me.getCrossfadeParameters(),Fr=er?"linePattern":Mt?"lineSDF":vr?"lineGradient":"line",Gr=ge.context,Wr=Gr.gl,Vr=!0;if(vr){Gr.activeTexture.set(Wr.TEXTURE0);var Qr=me.gradientTexture;if(!me.gradient)return;Qr||(Qr=me.gradientTexture=new a.Texture(Gr,me.gradient,Wr.RGBA)),Qr.bind(Wr.LINEAR,Wr.CLAMP_TO_EDGE)}for(var ln=0,Cn=ae;ln<Cn.length;ln+=1){var On=Cn[ln],Xn=J.getTile(On);if(!(er&&!Xn.patternsLoaded())){var jn=Xn.getBucket(me);if(jn){var Zn=jn.programConfigurations.get(me.id),ra=ge.context.program.get(),ca=ge.useProgram(Fr,Zn),fa=Vr||ca.program!==ra,ya=Gt.constantOr(null);if(ya&&Xn.imageAtlas){var Ta=Xn.imageAtlas,ka=Ta.patternPositions[ya.to.toString()],Ya=Ta.patternPositions[ya.from.toString()];ka&&Ya&&Zn.setConstantPatternPositions(ka,Ya)}var hi=er?ws(ge,Xn,me,br):Mt?zf(ge,Xn,me,Mt,br):vr?Of(ge,Xn,me):Kl(ge,Xn,me);er?(Gr.activeTexture.set(Wr.TEXTURE0),Xn.imageAtlasTexture.bind(Wr.LINEAR,Wr.CLAMP_TO_EDGE),Zn.updatePaintBuffers(br)):Mt&&(fa||ge.lineAtlas.dirty)&&(Gr.activeTexture.set(Wr.TEXTURE0),ge.lineAtlas.bind(Gr)),ca.draw(Gr,Wr.TRIANGLES,je,ge.stencilModeForClipping(On),vt,Rt.disabled,hi,me.id,jn.layoutVertexBuffer,jn.indexBuffer,jn.segments,me.paint,ge.transform.zoom,Zn),Vr=!1}}}}}}function af(ge,J,me,ae){var be=me.paint.get("fill-color"),ke=me.paint.get("fill-opacity");if(ke.constantOr(1)!==0){var je=ge.colorModeForRenderPass(),vt=me.paint.get("fill-pattern"),Mt=ge.opaquePassEnabledForLayer()&&!vt.constantOr(1)&&be.constantOr(a.Color.transparent).a===1&&ke.constantOr(0)===1?"opaque":"translucent";if(ge.renderPass===Mt){var Gt=ge.depthModeForSublayer(1,ge.renderPass==="opaque"?hr.ReadWrite:hr.ReadOnly);Gs(ge,J,me,ae,Gt,je,!1)}if(ge.renderPass==="translucent"&&me.paint.get("fill-antialias")){var er=ge.depthModeForSublayer(me.getPaintProperty("fill-outline-color")?2:0,hr.ReadOnly);Gs(ge,J,me,ae,er,je,!0)}}}function Gs(ge,J,me,ae,be,ke,je){var vt=ge.context.gl,Mt=me.paint.get("fill-pattern"),Gt=Mt&&Mt.constantOr(1),er=me.getCrossfadeParameters(),vr,br,Fr,Gr,Wr;je?(br=Gt&&!me.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",vr=vt.LINES):(br=Gt?"fillPattern":"fill",vr=vt.TRIANGLES);for(var Vr=0,Qr=ae;Vr<Qr.length;Vr+=1){var ln=Qr[Vr],Cn=J.getTile(ln);if(!(Gt&&!Cn.patternsLoaded())){var On=Cn.getBucket(me);if(On){var Xn=On.programConfigurations.get(me.id),jn=ge.useProgram(br,Xn);Gt&&(ge.context.activeTexture.set(vt.TEXTURE0),Cn.imageAtlasTexture.bind(vt.LINEAR,vt.CLAMP_TO_EDGE),Xn.updatePaintBuffers(er));var Zn=Mt.constantOr(null);if(Zn&&Cn.imageAtlas){var ra=Cn.imageAtlas,ca=ra.patternPositions[Zn.to.toString()],fa=ra.patternPositions[Zn.from.toString()];ca&&fa&&Xn.setConstantPatternPositions(ca,fa)}var ya=ge.translatePosMatrix(ln.posMatrix,Cn,me.paint.get("fill-translate"),me.paint.get("fill-translate-anchor"));if(!je)Gr=On.indexBuffer,Wr=On.segments,Fr=Gt?Hs(ya,ge,er,Cn):bs(ya);else{Gr=On.indexBuffer2,Wr=On.segments2;var Ta=[vt.drawingBufferWidth,vt.drawingBufferHeight];Fr=br==="fillOutlinePattern"&&Gt?ef(ya,ge,er,Cn,Ta):qu(ya,Ta)}jn.draw(ge.context,vr,be,ge.stencilModeForClipping(ln),ke,Rt.disabled,Fr,me.id,On.layoutVertexBuffer,Gr,Wr,me.paint,ge.transform.zoom,Xn)}}}}function of(ge,J,me,ae){var be=me.paint.get("fill-extrusion-opacity");if(be!==0&&ge.renderPass==="translucent"){var ke=new hr(ge.context.gl.LEQUAL,hr.ReadWrite,ge.depthRangeFor3D);if(be===1&&!me.paint.get("fill-extrusion-pattern").constantOr(1)){var je=ge.colorModeForRenderPass();Rl(ge,J,me,ae,ke,Ut.disabled,je)}else Rl(ge,J,me,ae,ke,Ut.disabled,ut.disabled),Rl(ge,J,me,ae,ke,ge.stencilModeFor3D(),ge.colorModeForRenderPass())}}function Rl(ge,J,me,ae,be,ke,je){for(var vt=ge.context,Mt=vt.gl,Gt=me.paint.get("fill-extrusion-pattern"),er=Gt.constantOr(1),vr=me.getCrossfadeParameters(),br=me.paint.get("fill-extrusion-opacity"),Fr=0,Gr=ae;Fr<Gr.length;Fr+=1){var Wr=Gr[Fr],Vr=J.getTile(Wr),Qr=Vr.getBucket(me);if(Qr){var ln=Qr.programConfigurations.get(me.id),Cn=ge.useProgram(er?"fillExtrusionPattern":"fillExtrusion",ln);er&&(ge.context.activeTexture.set(Mt.TEXTURE0),Vr.imageAtlasTexture.bind(Mt.LINEAR,Mt.CLAMP_TO_EDGE),ln.updatePaintBuffers(vr));var On=Gt.constantOr(null);if(On&&Vr.imageAtlas){var Xn=Vr.imageAtlas,jn=Xn.patternPositions[On.to.toString()],Zn=Xn.patternPositions[On.from.toString()];jn&&Zn&&ln.setConstantPatternPositions(jn,Zn)}var ra=ge.translatePosMatrix(Wr.posMatrix,Vr,me.paint.get("fill-extrusion-translate"),me.paint.get("fill-extrusion-translate-anchor")),ca=me.paint.get("fill-extrusion-vertical-gradient"),fa=er?ol(ra,ge,ca,br,Wr,vr,Vr):Go(ra,ge,ca,br);Cn.draw(vt,vt.gl.TRIANGLES,be,ke,je,Rt.backCCW,fa,me.id,Qr.layoutVertexBuffer,Qr.indexBuffer,Qr.segments,me.paint,ge.transform.zoom,ln)}}}function Vf(ge,J,me,ae){if(!(ge.renderPass!=="offscreen"&&ge.renderPass!=="translucent")){for(var be=ge.context,ke=J.getSource().maxzoom,je=ge.depthModeForSublayer(0,hr.ReadOnly),vt=ge.colorModeForRenderPass(),Mt=ge.renderPass==="translucent"?ge.stencilConfigForOverlap(ae):[{},ae],Gt=Mt[0],er=Mt[1],vr=0,br=er;vr<br.length;vr+=1){var Fr=br[vr],Gr=J.getTile(Fr);Gr.needsHillshadePrepare&&ge.renderPass==="offscreen"?Cc(ge,Gr,me,ke,je,Ut.disabled,vt):ge.renderPass==="translucent"&&dh(ge,Gr,me,je,Gt[Fr.overscaledZ],vt)}be.viewport.set([0,0,ge.width,ge.height])}}function dh(ge,J,me,ae,be,ke){var je=ge.context,vt=je.gl,Mt=J.fbo;if(Mt){var Gt=ge.useProgram("hillshade");je.activeTexture.set(vt.TEXTURE0),vt.bindTexture(vt.TEXTURE_2D,Mt.colorAttachment.get());var er=lh(ge,J,me);Gt.draw(je,vt.TRIANGLES,ae,be,ke,Rt.disabled,er,me.id,ge.rasterBoundsBuffer,ge.quadTriangleIndexBuffer,ge.rasterBoundsSegments)}}function Cc(ge,J,me,ae,be,ke,je){var vt=ge.context,Mt=vt.gl,Gt=J.dem;if(Gt&&Gt.data){var er=Gt.dim,vr=Gt.stride,br=Gt.getPixels();if(vt.activeTexture.set(Mt.TEXTURE1),vt.pixelStoreUnpackPremultiplyAlpha.set(!1),J.demTexture=J.demTexture||ge.getTileTexture(vr),J.demTexture){var Fr=J.demTexture;Fr.update(br,{premultiply:!1}),Fr.bind(Mt.NEAREST,Mt.CLAMP_TO_EDGE)}else J.demTexture=new a.Texture(vt,br,Mt.RGBA,{premultiply:!1}),J.demTexture.bind(Mt.NEAREST,Mt.CLAMP_TO_EDGE);vt.activeTexture.set(Mt.TEXTURE0);var Gr=J.fbo;if(!Gr){var Wr=new a.Texture(vt,{width:er,height:er,data:null},Mt.RGBA);Wr.bind(Mt.LINEAR,Mt.CLAMP_TO_EDGE),Gr=J.fbo=vt.createFramebuffer(er,er,!0),Gr.colorAttachment.set(Wr.texture)}vt.bindFramebuffer.set(Gr.framebuffer),vt.viewport.set([0,0,er,er]),ge.useProgram("hillshadePrepare").draw(vt,Mt.TRIANGLES,be,ke,je,Rt.disabled,bc(J.tileID,Gt,ae),me.id,ge.rasterBoundsBuffer,ge.quadTriangleIndexBuffer,ge.rasterBoundsSegments),J.needsHillshadePrepare=!1}}function Lc(ge,J,me,ae){if(ge.renderPass==="translucent"&&me.paint.get("raster-opacity")!==0&&ae.length)for(var be=ge.context,ke=be.gl,je=J.getSource(),vt=ge.useProgram("raster"),Mt=ge.colorModeForRenderPass(),Gt=je instanceof re?[{},ae]:ge.stencilConfigForOverlap(ae),er=Gt[0],vr=Gt[1],br=vr[vr.length-1].overscaledZ,Fr=!ge.options.moving,Gr=0,Wr=vr;Gr<Wr.length;Gr+=1){var Vr=Wr[Gr],Qr=ge.depthModeForSublayer(Vr.overscaledZ-br,me.paint.get("raster-opacity")===1?hr.ReadWrite:hr.ReadOnly,ke.LESS),ln=J.getTile(Vr),Cn=ge.transform.calculatePosMatrix(Vr.toUnwrapped(),Fr);ln.registerFadeDuration(me.paint.get("raster-fade-duration"));var On=J.findLoadedParent(Vr,0),Xn=eu(ln,On,J,me,ge.transform),jn=void 0,Zn=void 0,ra=me.paint.get("raster-resampling")==="nearest"?ke.NEAREST:ke.LINEAR;be.activeTexture.set(ke.TEXTURE0),ln.texture.bind(ra,ke.CLAMP_TO_EDGE,ke.LINEAR_MIPMAP_NEAREST),be.activeTexture.set(ke.TEXTURE1),On?(On.texture.bind(ra,ke.CLAMP_TO_EDGE,ke.LINEAR_MIPMAP_NEAREST),jn=Math.pow(2,On.tileID.overscaledZ-ln.tileID.overscaledZ),Zn=[ln.tileID.canonical.x*jn%1,ln.tileID.canonical.y*jn%1]):ln.texture.bind(ra,ke.CLAMP_TO_EDGE,ke.LINEAR_MIPMAP_NEAREST);var ca=Su(Cn,Zn||[0,0],jn||1,Xn,me);je instanceof re?vt.draw(be,ke.TRIANGLES,Qr,Ut.disabled,Mt,Rt.disabled,ca,me.id,je.boundsBuffer,ge.quadTriangleIndexBuffer,je.boundsSegments):vt.draw(be,ke.TRIANGLES,Qr,er[Vr.overscaledZ],Mt,Rt.disabled,ca,me.id,ge.rasterBoundsBuffer,ge.quadTriangleIndexBuffer,ge.rasterBoundsSegments)}}function eu(ge,J,me,ae,be){var ke=ae.paint.get("raster-fade-duration");if(ke>0){var je=a.browser.now(),vt=(je-ge.timeAdded)/ke,Mt=J?(je-J.timeAdded)/ke:-1,Gt=me.getSource(),er=be.coveringZoomLevel({tileSize:Gt.tileSize,roundZoom:Gt.roundZoom}),vr=!J||Math.abs(J.tileID.overscaledZ-er)>Math.abs(ge.tileID.overscaledZ-er),br=vr&&ge.refreshedUponExpiration?1:a.clamp(vr?vt:1-Mt,0,1);return ge.refreshedUponExpiration&&vt>=1&&(ge.refreshedUponExpiration=!1),J?{opacity:1,mix:1-br}:{opacity:br,mix:0}}else return{opacity:1,mix:0}}function Gf(ge,J,me){var ae=me.paint.get("background-color"),be=me.paint.get("background-opacity");if(be!==0){var ke=ge.context,je=ke.gl,vt=ge.transform,Mt=vt.tileSize,Gt=me.paint.get("background-pattern");if(!ge.isPatternMissing(Gt)){var er=!Gt&&ae.a===1&&be===1&&ge.opaquePassEnabledForLayer()?"opaque":"translucent";if(ge.renderPass===er){var vr=Ut.disabled,br=ge.depthModeForSublayer(0,er==="opaque"?hr.ReadWrite:hr.ReadOnly),Fr=ge.colorModeForRenderPass(),Gr=ge.useProgram(Gt?"backgroundPattern":"background"),Wr=vt.coveringTiles({tileSize:Mt});Gt&&(ke.activeTexture.set(je.TEXTURE0),ge.imageManager.bind(ge.context));for(var Vr=me.getCrossfadeParameters(),Qr=0,ln=Wr;Qr<ln.length;Qr+=1){var Cn=ln[Qr],On=ge.transform.calculatePosMatrix(Cn.toUnwrapped()),Xn=Gt?$l(On,be,ge,Gt,{tileID:Cn,tileSize:Mt},Vr):Pl(On,be,ae);Gr.draw(ke,je.TRIANGLES,br,vr,Fr,Rt.disabled,Xn,me.id,ge.tileExtentBuffer,ge.quadTriangleIndexBuffer,ge.tileExtentSegments)}}}}}var sf=new a.Color(1,0,0,1),ph=new a.Color(0,1,0,1),lf=new a.Color(0,0,1,1),gh=new a.Color(1,0,1,1),Je=new a.Color(0,1,1,1);function ot(ge){var J=ge.transform.padding,me=3;At(ge,ge.transform.height-(J.top||0),me,sf),At(ge,J.bottom||0,me,ph),Ot(ge,J.left||0,me,lf),Ot(ge,ge.transform.width-(J.right||0),me,gh);var ae=ge.transform.centerPoint;bt(ge,ae.x,ge.transform.height-ae.y,Je)}function bt(ge,J,me,ae){var be=20,ke=2;It(ge,J-ke/2,me-be/2,ke,be,ae),It(ge,J-be/2,me-ke/2,be,ke,ae)}function At(ge,J,me,ae){It(ge,0,J+me/2,ge.transform.width,me,ae)}function Ot(ge,J,me,ae){It(ge,J-me/2,0,me,ge.transform.height,ae)}function It(ge,J,me,ae,be,ke){var je=ge.context,vt=je.gl;vt.enable(vt.SCISSOR_TEST),vt.scissor(J*a.browser.devicePixelRatio,me*a.browser.devicePixelRatio,ae*a.browser.devicePixelRatio,be*a.browser.devicePixelRatio),je.clear({color:ke}),vt.disable(vt.SCISSOR_TEST)}function Ht(ge,J,me){for(var ae=0;ae<me.length;ae++)dr(ge,J,me[ae])}function dr(ge,J,me){var ae=ge.context,be=ae.gl,ke=me.posMatrix,je=ge.useProgram("debug"),vt=hr.disabled,Mt=Ut.disabled,Gt=ge.colorModeForRenderPass(),er="$debug";ae.activeTexture.set(be.TEXTURE0),ge.emptyTexture.bind(be.LINEAR,be.CLAMP_TO_EDGE),je.draw(ae,be.LINE_STRIP,vt,Mt,Gt,Rt.disabled,Au(ke,a.Color.red),er,ge.debugBuffer,ge.tileBorderIndexBuffer,ge.debugSegments);var vr=J.getTileByID(me.key).latestRawTileData,br=vr&&vr.byteLength||0,Fr=Math.floor(br/1024),Gr=J.getTile(me).tileSize,Wr=512/Math.min(Gr,512)*(me.overscaledZ/ge.transform.zoom)*.5,Vr=me.canonical.toString();me.overscaledZ!==me.canonical.z&&(Vr+=" => "+me.overscaledZ);var Qr=Vr+" "+Fr+"kb";xr(ge,Qr),je.draw(ae,be.TRIANGLES,vt,Mt,ut.alphaBlended,Rt.disabled,Au(ke,a.Color.transparent,Wr),er,ge.debugBuffer,ge.quadTriangleIndexBuffer,ge.debugSegments)}function xr(ge,J){ge.initDebugOverlayCanvas();var me=ge.debugOverlayCanvas,ae=ge.context.gl,be=ge.debugOverlayCanvas.getContext("2d");be.clearRect(0,0,me.width,me.height),be.shadowColor="white",be.shadowBlur=2,be.lineWidth=1.5,be.strokeStyle="white",be.textBaseline="top",be.font="bold "+36+"px Open Sans, sans-serif",be.fillText(J,5,5),be.strokeText(J,5,5),ge.debugOverlayTexture.update(me),ge.debugOverlayTexture.bind(ae.LINEAR,ae.CLAMP_TO_EDGE)}function sr(ge,J,me){var ae=ge.context,be=me.implementation;if(ge.renderPass==="offscreen"){var ke=be.prerender;ke&&(ge.setCustomLayerDefaults(),ae.setColorMode(ge.colorModeForRenderPass()),ke.call(be,ae.gl,ge.transform.customLayerMatrix()),ae.setDirty(),ge.setBaseState())}else if(ge.renderPass==="translucent"){ge.setCustomLayerDefaults(),ae.setColorMode(ge.colorModeForRenderPass()),ae.setStencilMode(Ut.disabled);var je=be.renderingMode==="3d"?new hr(ge.context.gl.LEQUAL,hr.ReadWrite,ge.depthRangeFor3D):ge.depthModeForSublayer(0,hr.ReadOnly);ae.setDepthMode(je),be.render(ae.gl,ge.transform.customLayerMatrix()),ae.setDirty(),ge.setBaseState(),ae.bindFramebuffer.set(null)}}var Er={symbol:Mu,circle:cl,heatmap:Sv,line:vh,fill:af,"fill-extrusion":of,hillshade:Vf,raster:Lc,background:Gf,debug:Ht,custom:sr},_r=function(J,me){this.context=new Nt(J),this.transform=me,this._tileTextures={},this.setup(),this.numSublayers=Vt.maxUnderzooming+Vt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new ia,this.gpuTimers={}};_r.prototype.resize=function(J,me){if(this.width=J*a.browser.devicePixelRatio,this.height=me*a.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var ae=0,be=this.style._order;ae<be.length;ae+=1){var ke=be[ae];this.style._layers[ke].resize()}},_r.prototype.setup=function(){var J=this.context,me=new a.StructArrayLayout2i4;me.emplaceBack(0,0),me.emplaceBack(a.EXTENT,0),me.emplaceBack(0,a.EXTENT),me.emplaceBack(a.EXTENT,a.EXTENT),this.tileExtentBuffer=J.createVertexBuffer(me,Ho.members),this.tileExtentSegments=a.SegmentVector.simpleSegment(0,0,4,2);var ae=new a.StructArrayLayout2i4;ae.emplaceBack(0,0),ae.emplaceBack(a.EXTENT,0),ae.emplaceBack(0,a.EXTENT),ae.emplaceBack(a.EXTENT,a.EXTENT),this.debugBuffer=J.createVertexBuffer(ae,Ho.members),this.debugSegments=a.SegmentVector.simpleSegment(0,0,4,5);var be=new a.StructArrayLayout4i8;be.emplaceBack(0,0,0,0),be.emplaceBack(a.EXTENT,0,a.EXTENT,0),be.emplaceBack(0,a.EXTENT,0,a.EXTENT),be.emplaceBack(a.EXTENT,a.EXTENT,a.EXTENT,a.EXTENT),this.rasterBoundsBuffer=J.createVertexBuffer(be,ee.members),this.rasterBoundsSegments=a.SegmentVector.simpleSegment(0,0,4,2);var ke=new a.StructArrayLayout2i4;ke.emplaceBack(0,0),ke.emplaceBack(1,0),ke.emplaceBack(0,1),ke.emplaceBack(1,1),this.viewportBuffer=J.createVertexBuffer(ke,Ho.members),this.viewportSegments=a.SegmentVector.simpleSegment(0,0,4,2);var je=new a.StructArrayLayout1ui2;je.emplaceBack(0),je.emplaceBack(1),je.emplaceBack(3),je.emplaceBack(2),je.emplaceBack(0),this.tileBorderIndexBuffer=J.createIndexBuffer(je);var vt=new a.StructArrayLayout3ui6;vt.emplaceBack(0,1,2),vt.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=J.createIndexBuffer(vt),this.emptyTexture=new a.Texture(J,{width:1,height:1,data:new Uint8Array([0,0,0,0])},J.gl.RGBA);var Mt=this.context.gl;this.stencilClearMode=new Ut({func:Mt.ALWAYS,mask:0},0,255,Mt.ZERO,Mt.ZERO,Mt.ZERO)},_r.prototype.clearStencil=function(){var J=this.context,me=J.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var ae=a.create();a.ortho(ae,0,this.width,this.height,0,0,1),a.scale(ae,ae,[me.drawingBufferWidth,me.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(J,me.TRIANGLES,hr.disabled,this.stencilClearMode,ut.disabled,Rt.disabled,Wo(ae),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},_r.prototype._renderTileClippingMasks=function(J,me){if(!(this.currentStencilSource===J.source||!J.isTileClipped()||!me||!me.length)){this.currentStencilSource=J.source;var ae=this.context,be=ae.gl;this.nextStencilID+me.length>256&&this.clearStencil(),ae.setColorMode(ut.disabled),ae.setDepthMode(hr.disabled);var ke=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var je=0,vt=me;je<vt.length;je+=1){var Mt=vt[je],Gt=this._tileClippingMaskIDs[Mt.key]=this.nextStencilID++;ke.draw(ae,be.TRIANGLES,hr.disabled,new Ut({func:be.ALWAYS,mask:0},Gt,255,be.KEEP,be.KEEP,be.REPLACE),ut.disabled,Rt.disabled,Wo(Mt.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},_r.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var J=this.nextStencilID++,me=this.context.gl;return new Ut({func:me.NOTEQUAL,mask:255},J,255,me.KEEP,me.KEEP,me.REPLACE)},_r.prototype.stencilModeForClipping=function(J){var me=this.context.gl;return new Ut({func:me.EQUAL,mask:255},this._tileClippingMaskIDs[J.key],0,me.KEEP,me.KEEP,me.REPLACE)},_r.prototype.stencilConfigForOverlap=function(J){var me,ae=this.context.gl,be=J.sort(function(Gt,er){return er.overscaledZ-Gt.overscaledZ}),ke=be[be.length-1].overscaledZ,je=be[0].overscaledZ-ke+1;if(je>1){this.currentStencilSource=void 0,this.nextStencilID+je>256&&this.clearStencil();for(var vt={},Mt=0;Mt<je;Mt++)vt[Mt+ke]=new Ut({func:ae.GEQUAL,mask:255},Mt+this.nextStencilID,255,ae.KEEP,ae.KEEP,ae.REPLACE);return this.nextStencilID+=je,[vt,be]}return[(me={},me[ke]=Ut.disabled,me),be]},_r.prototype.colorModeForRenderPass=function(){var J=this.context.gl;if(this._showOverdrawInspector){var me=8,ae=1/me;return new ut([J.CONSTANT_COLOR,J.ONE],new a.Color(ae,ae,ae,0),[!0,!0,!0,!0])}else return this.renderPass==="opaque"?ut.unblended:ut.alphaBlended},_r.prototype.depthModeForSublayer=function(J,me,ae){if(!this.opaquePassEnabledForLayer())return hr.disabled;var be=1-((1+this.currentLayer)*this.numSublayers+J)*this.depthEpsilon;return new hr(ae||this.context.gl.LEQUAL,me,[be,be])},_r.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},_r.prototype.render=function(J,me){var ae=this;this.style=J,this.options=me,this.lineAtlas=J.lineAtlas,this.imageManager=J.imageManager,this.glyphManager=J.glyphManager,this.symbolFadeChange=J.placement.symbolFadeChange(a.browser.now()),this.imageManager.beginFrame();var be=this.style._order,ke=this.style.sourceCaches;for(var je in ke){var vt=ke[je];vt.used&&vt.prepare(this.context)}var Mt={},Gt={},er={};for(var vr in ke){var br=ke[vr];Mt[vr]=br.getVisibleCoordinates(),Gt[vr]=Mt[vr].slice().reverse(),er[vr]=br.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var Fr=0;Fr<be.length;Fr++){var Gr=be[Fr];if(this.style._layers[Gr].is3D()){this.opaquePassCutoff=Fr;break}}this.renderPass="offscreen";for(var Wr=0,Vr=be;Wr<Vr.length;Wr+=1){var Qr=Vr[Wr],ln=this.style._layers[Qr];if(!(!ln.hasOffscreenPass()||ln.isHidden(this.transform.zoom))){var Cn=Gt[ln.source];ln.type!=="custom"&&!Cn.length||this.renderLayer(this,ke[ln.source],ln,Cn)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:me.showOverdrawInspector?a.Color.black:a.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=me.showOverdrawInspector,this.depthRangeFor3D=[0,1-(J._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=be.length-1;this.currentLayer>=0;this.currentLayer--){var On=this.style._layers[be[this.currentLayer]],Xn=ke[On.source],jn=Mt[On.source];this._renderTileClippingMasks(On,jn),this.renderLayer(this,Xn,On,jn)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<be.length;this.currentLayer++){var Zn=this.style._layers[be[this.currentLayer]],ra=ke[Zn.source],ca=(Zn.type==="symbol"?er:Gt)[Zn.source];this._renderTileClippingMasks(Zn,Mt[Zn.source]),this.renderLayer(this,ra,Zn,ca)}if(this.options.showTileBoundaries){var fa,ya,Ta=a.values(this.style._layers);Ta.forEach(function(ka){ka.source&&!ka.isHidden(ae.transform.zoom)&&(ka.source!==(ya&&ya.id)&&(ya=ae.style.sourceCaches[ka.source]),(!fa||fa.getSource().maxzoom<ya.getSource().maxzoom)&&(fa=ya))}),fa&&Er.debug(this,fa,fa.getVisibleCoordinates())}this.options.showPadding&&ot(this),this.context.setDefault()},_r.prototype.renderLayer=function(J,me,ae,be){ae.isHidden(this.transform.zoom)||ae.type!=="background"&&ae.type!=="custom"&&!be.length||(this.id=ae.id,this.gpuTimingStart(ae),Er[ae.type](J,me,ae,be,this.style.placement.variableOffsets),this.gpuTimingEnd())},_r.prototype.gpuTimingStart=function(J){if(this.options.gpuTiming){var me=this.context.extTimerQuery,ae=this.gpuTimers[J.id];ae||(ae=this.gpuTimers[J.id]={calls:0,cpuTime:0,query:me.createQueryEXT()}),ae.calls++,me.beginQueryEXT(me.TIME_ELAPSED_EXT,ae.query)}},_r.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var J=this.context.extTimerQuery;J.endQueryEXT(J.TIME_ELAPSED_EXT)}},_r.prototype.collectGpuTimers=function(){var J=this.gpuTimers;return this.gpuTimers={},J},_r.prototype.queryGpuTimers=function(J){var me={};for(var ae in J){var be=J[ae],ke=this.context.extTimerQuery,je=ke.getQueryObjectEXT(be.query,ke.QUERY_RESULT_EXT)/(1e3*1e3);ke.deleteQueryEXT(be.query),me[ae]=je}return me},_r.prototype.translatePosMatrix=function(J,me,ae,be,ke){if(!ae[0]&&!ae[1])return J;var je=ke?be==="map"?this.transform.angle:0:be==="viewport"?-this.transform.angle:0;if(je){var vt=Math.sin(je),Mt=Math.cos(je);ae=[ae[0]*Mt-ae[1]*vt,ae[0]*vt+ae[1]*Mt]}var Gt=[ke?ae[0]:dn(me,ae[0],this.transform.zoom),ke?ae[1]:dn(me,ae[1],this.transform.zoom),0],er=new Float32Array(16);return a.translate(er,J,Gt),er},_r.prototype.saveTileTexture=function(J){var me=this._tileTextures[J.size[0]];me?me.push(J):this._tileTextures[J.size[0]]=[J]},_r.prototype.getTileTexture=function(J){var me=this._tileTextures[J];return me&&me.length>0?me.pop():null},_r.prototype.isPatternMissing=function(J){if(!J)return!1;if(!J.from||!J.to)return!0;var me=this.imageManager.getPattern(J.from.toString()),ae=this.imageManager.getPattern(J.to.toString());return!me||!ae},_r.prototype.useProgram=function(J,me){this.cache=this.cache||{};var ae=""+J+(me?me.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[ae]||(this.cache[ae]=new Tu(this.context,ih[J],me,Ql[J],this._showOverdrawInspector)),this.cache[ae]},_r.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()},_r.prototype.setBaseState=function(){var J=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(J.FUNC_ADD)},_r.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=a.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var J=this.context.gl;this.debugOverlayTexture=new a.Texture(this.context,this.debugOverlayCanvas,J.RGBA)}},_r.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Yr=function(J,me){this.points=J,this.planes=me};Yr.fromInvProjectionMatrix=function(J,me,ae){var be=[[-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]],ke=Math.pow(2,ae),je=be.map(function(Gt){return a.transformMat4([],Gt,J)}).map(function(Gt){return a.scale$1([],Gt,1/Gt[3]/me*ke)}),vt=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],Mt=vt.map(function(Gt){var er=a.sub([],je[Gt[0]],je[Gt[1]]),vr=a.sub([],je[Gt[2]],je[Gt[1]]),br=a.normalize([],a.cross([],er,vr)),Fr=-a.dot(br,je[Gt[1]]);return br.concat(Fr)});return new Yr(je,Mt)};var $r=function(J,me){this.min=J,this.max=me,this.center=a.scale$2([],a.add([],this.min,this.max),.5)};$r.prototype.quadrant=function(J){for(var me=[J%2===0,J<2],ae=a.clone$2(this.min),be=a.clone$2(this.max),ke=0;ke<me.length;ke++)ae[ke]=me[ke]?this.min[ke]:this.center[ke],be[ke]=me[ke]?this.center[ke]:this.max[ke];return be[2]=this.max[2],new $r(ae,be)},$r.prototype.distanceX=function(J){var me=Math.max(Math.min(this.max[0],J[0]),this.min[0]);return me-J[0]},$r.prototype.distanceY=function(J){var me=Math.max(Math.min(this.max[1],J[1]),this.min[1]);return me-J[1]},$r.prototype.intersects=function(J){for(var me=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],ae=!0,be=0;be<J.planes.length;be++){for(var ke=J.planes[be],je=0,vt=0;vt<me.length;vt++)je+=a.dot$1(ke,me[vt])>=0;if(je===0)return 0;je!==me.length&&(ae=!1)}if(ae)return 2;for(var Mt=0;Mt<3;Mt++){for(var Gt=Number.MAX_VALUE,er=-Number.MAX_VALUE,vr=0;vr<J.points.length;vr++){var br=J.points[vr][Mt]-this.min[Mt];Gt=Math.min(Gt,br),er=Math.max(er,br)}if(er<0||Gt>this.max[Mt]-this.min[Mt])return 0}return 1};var gn=function(J,me,ae,be){if(J===void 0&&(J=0),me===void 0&&(me=0),ae===void 0&&(ae=0),be===void 0&&(be=0),isNaN(J)||J<0||isNaN(me)||me<0||isNaN(ae)||ae<0||isNaN(be)||be<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=J,this.bottom=me,this.left=ae,this.right=be};gn.prototype.interpolate=function(J,me,ae){return me.top!=null&&J.top!=null&&(this.top=a.number(J.top,me.top,ae)),me.bottom!=null&&J.bottom!=null&&(this.bottom=a.number(J.bottom,me.bottom,ae)),me.left!=null&&J.left!=null&&(this.left=a.number(J.left,me.left,ae)),me.right!=null&&J.right!=null&&(this.right=a.number(J.right,me.right,ae)),this},gn.prototype.getCenter=function(J,me){var ae=a.clamp((this.left+J-this.right)/2,0,J),be=a.clamp((this.top+me-this.bottom)/2,0,me);return new a.Point(ae,be)},gn.prototype.equals=function(J){return this.top===J.top&&this.bottom===J.bottom&&this.left===J.left&&this.right===J.right},gn.prototype.clone=function(){return new gn(this.top,this.bottom,this.left,this.right)},gn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var bn=function(J,me,ae,be,ke){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=ke===void 0?!0:ke,this._minZoom=J||0,this._maxZoom=me||22,this._minPitch=ae??0,this._maxPitch=be??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 gn,this._posMatrixCache={},this._alignedPosMatrixCache={}},Rn={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}};bn.prototype.clone=function(){var J=new bn(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return J.tileSize=this.tileSize,J.latRange=this.latRange,J.width=this.width,J.height=this.height,J._center=this._center,J.zoom=this.zoom,J.angle=this.angle,J._fov=this._fov,J._pitch=this._pitch,J._unmodified=this._unmodified,J._edgeInsets=this._edgeInsets.clone(),J._calcMatrices(),J},Rn.minZoom.get=function(){return this._minZoom},Rn.minZoom.set=function(ge){this._minZoom!==ge&&(this._minZoom=ge,this.zoom=Math.max(this.zoom,ge))},Rn.maxZoom.get=function(){return this._maxZoom},Rn.maxZoom.set=function(ge){this._maxZoom!==ge&&(this._maxZoom=ge,this.zoom=Math.min(this.zoom,ge))},Rn.minPitch.get=function(){return this._minPitch},Rn.minPitch.set=function(ge){this._minPitch!==ge&&(this._minPitch=ge,this.pitch=Math.max(this.pitch,ge))},Rn.maxPitch.get=function(){return this._maxPitch},Rn.maxPitch.set=function(ge){this._maxPitch!==ge&&(this._maxPitch=ge,this.pitch=Math.min(this.pitch,ge))},Rn.renderWorldCopies.get=function(){return this._renderWorldCopies},Rn.renderWorldCopies.set=function(ge){ge===void 0?ge=!0:ge===null&&(ge=!1),this._renderWorldCopies=ge},Rn.worldSize.get=function(){return this.tileSize*this.scale},Rn.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Rn.size.get=function(){return new a.Point(this.width,this.height)},Rn.bearing.get=function(){return-this.angle/Math.PI*180},Rn.bearing.set=function(ge){var J=-a.wrap(ge,-180,180)*Math.PI/180;this.angle!==J&&(this._unmodified=!1,this.angle=J,this._calcMatrices(),this.rotationMatrix=a.create$2(),a.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Rn.pitch.get=function(){return this._pitch/Math.PI*180},Rn.pitch.set=function(ge){var J=a.clamp(ge,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==J&&(this._unmodified=!1,this._pitch=J,this._calcMatrices())},Rn.fov.get=function(){return this._fov/Math.PI*180},Rn.fov.set=function(ge){ge=Math.max(.01,Math.min(60,ge)),this._fov!==ge&&(this._unmodified=!1,this._fov=ge/180*Math.PI,this._calcMatrices())},Rn.zoom.get=function(){return this._zoom},Rn.zoom.set=function(ge){var J=Math.min(Math.max(ge,this.minZoom),this.maxZoom);this._zoom!==J&&(this._unmodified=!1,this._zoom=J,this.scale=this.zoomScale(J),this.tileZoom=Math.floor(J),this.zoomFraction=J-this.tileZoom,this._constrain(),this._calcMatrices())},Rn.center.get=function(){return this._center},Rn.center.set=function(ge){ge.lat===this._center.lat&&ge.lng===this._center.lng||(this._unmodified=!1,this._center=ge,this._constrain(),this._calcMatrices())},Rn.padding.get=function(){return this._edgeInsets.toJSON()},Rn.padding.set=function(ge){this._edgeInsets.equals(ge)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,ge,1),this._calcMatrices())},Rn.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},bn.prototype.isPaddingEqual=function(J){return this._edgeInsets.equals(J)},bn.prototype.interpolatePadding=function(J,me,ae){this._unmodified=!1,this._edgeInsets.interpolate(J,me,ae),this._constrain(),this._calcMatrices()},bn.prototype.coveringZoomLevel=function(J){var me=(J.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/J.tileSize));return Math.max(0,me)},bn.prototype.getVisibleUnwrappedCoordinates=function(J){var me=[new a.UnwrappedTileID(0,J)];if(this._renderWorldCopies)for(var ae=this.pointCoordinate(new a.Point(0,0)),be=this.pointCoordinate(new a.Point(this.width,0)),ke=this.pointCoordinate(new a.Point(this.width,this.height)),je=this.pointCoordinate(new a.Point(0,this.height)),vt=Math.floor(Math.min(ae.x,be.x,ke.x,je.x)),Mt=Math.floor(Math.max(ae.x,be.x,ke.x,je.x)),Gt=1,er=vt-Gt;er<=Mt+Gt;er++)er!==0&&me.push(new a.UnwrappedTileID(er,J));return me},bn.prototype.coveringTiles=function(J){var me=this.coveringZoomLevel(J),ae=me;if(J.minzoom!==void 0&&me<J.minzoom)return[];J.maxzoom!==void 0&&me>J.maxzoom&&(me=J.maxzoom);var be=a.MercatorCoordinate.fromLngLat(this.center),ke=Math.pow(2,me),je=[ke*be.x,ke*be.y,0],vt=Yr.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,me),Mt=J.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Mt=me);var Gt=3,er=function(Ta){return{aabb:new $r([Ta*ke,0,0],[(Ta+1)*ke,ke,0]),zoom:0,x:0,y:0,wrap:Ta,fullyVisible:!1}},vr=[],br=[],Fr=me,Gr=J.reparseOverscaled?ae:me;if(this._renderWorldCopies)for(var Wr=1;Wr<=3;Wr++)vr.push(er(-Wr)),vr.push(er(Wr));for(vr.push(er(0));vr.length>0;){var Vr=vr.pop(),Qr=Vr.x,ln=Vr.y,Cn=Vr.fullyVisible;if(!Cn){var On=Vr.aabb.intersects(vt);if(On===0)continue;Cn=On===2}var Xn=Vr.aabb.distanceX(je),jn=Vr.aabb.distanceY(je),Zn=Math.max(Math.abs(Xn),Math.abs(jn)),ra=Gt+(1<<Fr-Vr.zoom)-2;if(Vr.zoom===Fr||Zn>ra&&Vr.zoom>=Mt){br.push({tileID:new a.OverscaledTileID(Vr.zoom===Fr?Gr:Vr.zoom,Vr.wrap,Vr.zoom,Qr,ln),distanceSq:a.sqrLen([je[0]-.5-Qr,je[1]-.5-ln])});continue}for(var ca=0;ca<4;ca++){var fa=(Qr<<1)+ca%2,ya=(ln<<1)+(ca>>1);vr.push({aabb:Vr.aabb.quadrant(ca),zoom:Vr.zoom+1,x:fa,y:ya,wrap:Vr.wrap,fullyVisible:Cn})}}return br.sort(function(Ta,ka){return Ta.distanceSq-ka.distanceSq}).map(function(Ta){return Ta.tileID})},bn.prototype.resize=function(J,me){this.width=J,this.height=me,this.pixelsToGLUnits=[2/J,-2/me],this._constrain(),this._calcMatrices()},Rn.unmodified.get=function(){return this._unmodified},bn.prototype.zoomScale=function(J){return Math.pow(2,J)},bn.prototype.scaleZoom=function(J){return Math.log(J)/Math.LN2},bn.prototype.project=function(J){var me=a.clamp(J.lat,-this.maxValidLatitude,this.maxValidLatitude);return new a.Point(a.mercatorXfromLng(J.lng)*this.worldSize,a.mercatorYfromLat(me)*this.worldSize)},bn.prototype.unproject=function(J){return new a.MercatorCoordinate(J.x/this.worldSize,J.y/this.worldSize).toLngLat()},Rn.point.get=function(){return this.project(this.center)},bn.prototype.setLocationAtPoint=function(J,me){var ae=this.pointCoordinate(me),be=this.pointCoordinate(this.centerPoint),ke=this.locationCoordinate(J),je=new a.MercatorCoordinate(ke.x-(ae.x-be.x),ke.y-(ae.y-be.y));this.center=this.coordinateLocation(je),this._renderWorldCopies&&(this.center=this.center.wrap())},bn.prototype.locationPoint=function(J){return this.coordinatePoint(this.locationCoordinate(J))},bn.prototype.pointLocation=function(J){return this.coordinateLocation(this.pointCoordinate(J))},bn.prototype.locationCoordinate=function(J){return a.MercatorCoordinate.fromLngLat(J)},bn.prototype.coordinateLocation=function(J){return J.toLngLat()},bn.prototype.pointCoordinate=function(J){var me=0,ae=[J.x,J.y,0,1],be=[J.x,J.y,1,1];a.transformMat4(ae,ae,this.pixelMatrixInverse),a.transformMat4(be,be,this.pixelMatrixInverse);var ke=ae[3],je=be[3],vt=ae[0]/ke,Mt=be[0]/je,Gt=ae[1]/ke,er=be[1]/je,vr=ae[2]/ke,br=be[2]/je,Fr=vr===br?0:(me-vr)/(br-vr);return new a.MercatorCoordinate(a.number(vt,Mt,Fr)/this.worldSize,a.number(Gt,er,Fr)/this.worldSize)},bn.prototype.coordinatePoint=function(J){var me=[J.x*this.worldSize,J.y*this.worldSize,0,1];return a.transformMat4(me,me,this.pixelMatrix),new a.Point(me[0]/me[3],me[1]/me[3])},bn.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)))},bn.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]])},bn.prototype.setMaxBounds=function(J){J?(this.lngRange=[J.getWest(),J.getEast()],this.latRange=[J.getSouth(),J.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},bn.prototype.calculatePosMatrix=function(J,me){me===void 0&&(me=!1);var ae=J.key,be=me?this._alignedPosMatrixCache:this._posMatrixCache;if(be[ae])return be[ae];var ke=J.canonical,je=this.worldSize/this.zoomScale(ke.z),vt=ke.x+Math.pow(2,ke.z)*J.wrap,Mt=a.identity(new Float64Array(16));return a.translate(Mt,Mt,[vt*je,ke.y*je,0]),a.scale(Mt,Mt,[je/a.EXTENT,je/a.EXTENT,1]),a.multiply(Mt,me?this.alignedProjMatrix:this.projMatrix,Mt),be[ae]=new Float32Array(Mt),be[ae]},bn.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},bn.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var J=-90,me=90,ae=-180,be=180,ke,je,vt,Mt,Gt=this.size,er=this._unmodified;if(this.latRange){var vr=this.latRange;J=a.mercatorYfromLat(vr[1])*this.worldSize,me=a.mercatorYfromLat(vr[0])*this.worldSize,ke=me-J<Gt.y?Gt.y/(me-J):0}if(this.lngRange){var br=this.lngRange;ae=a.mercatorXfromLng(br[0])*this.worldSize,be=a.mercatorXfromLng(br[1])*this.worldSize,je=be-ae<Gt.x?Gt.x/(be-ae):0}var Fr=this.point,Gr=Math.max(je||0,ke||0);if(Gr){this.center=this.unproject(new a.Point(je?(be+ae)/2:Fr.x,ke?(me+J)/2:Fr.y)),this.zoom+=this.scaleZoom(Gr),this._unmodified=er,this._constraining=!1;return}if(this.latRange){var Wr=Fr.y,Vr=Gt.y/2;Wr-Vr<J&&(Mt=J+Vr),Wr+Vr>me&&(Mt=me-Vr)}if(this.lngRange){var Qr=Fr.x,ln=Gt.x/2;Qr-ln<ae&&(vt=ae+ln),Qr+ln>be&&(vt=be-ln)}(vt!==void 0||Mt!==void 0)&&(this.center=this.unproject(new a.Point(vt!==void 0?vt:Fr.x,Mt!==void 0?Mt:Fr.y))),this._unmodified=er,this._constraining=!1}},bn.prototype._calcMatrices=function(){if(this.height){var J=this._fov/2,me=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(J)*this.height;var ae=Math.PI/2+this._pitch,be=this._fov*(.5+me.y/this.height),ke=Math.sin(be)*this.cameraToCenterDistance/Math.sin(a.clamp(Math.PI-ae-be,.01,Math.PI-.01)),je=this.point,vt=je.x,Mt=je.y,Gt=Math.cos(Math.PI/2-this._pitch)*ke+this.cameraToCenterDistance,er=Gt*1.01,vr=this.height/50,br=new Float64Array(16);a.perspective(br,this._fov,this.width/this.height,vr,er),br[8]=-me.x*2/this.width,br[9]=me.y*2/this.height,a.scale(br,br,[1,-1,1]),a.translate(br,br,[0,0,-this.cameraToCenterDistance]),a.rotateX(br,br,this._pitch),a.rotateZ(br,br,this.angle),a.translate(br,br,[-vt,-Mt,0]),this.mercatorMatrix=a.scale([],br,[this.worldSize,this.worldSize,this.worldSize]),a.scale(br,br,[1,1,a.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=br,this.invProjMatrix=a.invert([],this.projMatrix);var Fr=this.width%2/2,Gr=this.height%2/2,Wr=Math.cos(this.angle),Vr=Math.sin(this.angle),Qr=vt-Math.round(vt)+Wr*Fr+Vr*Gr,ln=Mt-Math.round(Mt)+Wr*Gr+Vr*Fr,Cn=new Float64Array(br);if(a.translate(Cn,Cn,[Qr>.5?Qr-1:Qr,ln>.5?ln-1:ln,0]),this.alignedProjMatrix=Cn,br=a.create(),a.scale(br,br,[this.width/2,-this.height/2,1]),a.translate(br,br,[1,-1,0]),this.labelPlaneMatrix=br,br=a.create(),a.scale(br,br,[1,-1,1]),a.translate(br,br,[-1,-1,0]),a.scale(br,br,[2/this.width,2/this.height,1]),this.glCoordMatrix=br,this.pixelMatrix=a.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),br=a.invert(new Float64Array(16),this.pixelMatrix),!br)throw new Error("failed to invert matrix");this.pixelMatrixInverse=br,this._posMatrixCache={},this._alignedPosMatrixCache={}}},bn.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var J=this.pointCoordinate(new a.Point(0,0)),me=[J.x*this.worldSize,J.y*this.worldSize,0,1],ae=a.transformMat4(me,me,this.pixelMatrix);return ae[3]/this.cameraToCenterDistance},bn.prototype.getCameraPoint=function(){var J=this._pitch,me=Math.tan(J)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new a.Point(0,me))},bn.prototype.getCameraQueryGeometry=function(J){var me=this.getCameraPoint();if(J.length===1)return[J[0],me];for(var ae=me.x,be=me.y,ke=me.x,je=me.y,vt=0,Mt=J;vt<Mt.length;vt+=1){var Gt=Mt[vt];ae=Math.min(ae,Gt.x),be=Math.min(be,Gt.y),ke=Math.max(ke,Gt.x),je=Math.max(je,Gt.y)}return[new a.Point(ae,be),new a.Point(ke,be),new a.Point(ke,je),new a.Point(ae,je),new a.Point(ae,be)]},Object.defineProperties(bn.prototype,Rn);function da(ge,J){var me=!1,ae=null,be=function(){ae=null,me&&(ge(),ae=setTimeout(be,J),me=!1)};return function(){return me=!0,ae||be(),ae}}var _a=function(J){this._hashName=J&&encodeURIComponent(J),a.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=da(this._updateHashUnthrottled.bind(this),30*1e3/100)};_a.prototype.addTo=function(J){return this._map=J,a.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},_a.prototype.remove=function(){return a.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},_a.prototype.getHashString=function(J){var me=this._map.getCenter(),ae=Math.round(this._map.getZoom()*100)/100,be=Math.ceil((ae*Math.LN2+Math.log(512/360/.5))/Math.LN10),ke=Math.pow(10,be),je=Math.round(me.lng*ke)/ke,vt=Math.round(me.lat*ke)/ke,Mt=this._map.getBearing(),Gt=this._map.getPitch(),er="";if(J?er+="/"+je+"/"+vt+"/"+ae:er+=ae+"/"+vt+"/"+je,(Mt||Gt)&&(er+="/"+Math.round(Mt*10)/10),Gt&&(er+="/"+Math.round(Gt)),this._hashName){var vr=this._hashName,br=!1,Fr=a.window.location.hash.slice(1).split("&").map(function(Gr){var Wr=Gr.split("=")[0];return Wr===vr?(br=!0,Wr+"="+er):Gr}).filter(function(Gr){return Gr});return br||Fr.push(vr+"="+er),"#"+Fr.join("&")}return"#"+er},_a.prototype._getCurrentHash=function(){var J=this,me=a.window.location.hash.replace("#","");if(this._hashName){var ae;return me.split("&").map(function(be){return be.split("=")}).forEach(function(be){be[0]===J._hashName&&(ae=be)}),(ae&&ae[1]||"").split("/")}return me.split("/")},_a.prototype._onHashChange=function(){var J=this._getCurrentHash();if(J.length>=3&&!J.some(function(ae){return isNaN(ae)})){var me=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(J[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+J[2],+J[1]],zoom:+J[0],bearing:me,pitch:+(J[4]||0)}),!0}return!1},_a.prototype._updateHashUnthrottled=function(){var J=this.getHashString();try{a.window.history.replaceState(a.window.history.state,"",J)}catch{}};var Ia={linearity:.3,easing:a.bezier(0,0,.3,1)},Fa=a.extend({deceleration:2500,maxSpeed:1400},Ia),za=a.extend({deceleration:20,maxSpeed:1400},Ia),ci=a.extend({deceleration:1e3,maxSpeed:360},Ia),Bi=a.extend({deceleration:1e3,maxSpeed:90},Ia),Ti=function(J){this._map=J,this.clear()};Ti.prototype.clear=function(){this._inertiaBuffer=[]},Ti.prototype.record=function(J){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:a.browser.now(),settings:J})},Ti.prototype._drainInertiaBuffer=function(){for(var J=this._inertiaBuffer,me=a.browser.now(),ae=160;J.length>0&&me-J[0].time>ae;)J.shift()},Ti.prototype._onMoveEnd=function(J){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var me={zoom:0,bearing:0,pitch:0,pan:new a.Point(0,0),pinchAround:void 0,around:void 0},ae=0,be=this._inertiaBuffer;ae<be.length;ae+=1){var ke=be[ae],je=ke.settings;me.zoom+=je.zoomDelta||0,me.bearing+=je.bearingDelta||0,me.pitch+=je.pitchDelta||0,je.panDelta&&me.pan._add(je.panDelta),je.around&&(me.around=je.around),je.pinchAround&&(me.pinchAround=je.pinchAround)}var vt=this._inertiaBuffer[this._inertiaBuffer.length-1],Mt=vt.time-this._inertiaBuffer[0].time,Gt={};if(me.pan.mag()){var er=_e(me.pan.mag(),Mt,a.extend({},Fa,J||{}));Gt.offset=me.pan.mult(er.amount/me.pan.mag()),Gt.center=this._map.transform.center,he(Gt,er)}if(me.zoom){var vr=_e(me.zoom,Mt,za);Gt.zoom=this._map.transform.zoom+vr.amount,he(Gt,vr)}if(me.bearing){var br=_e(me.bearing,Mt,ci);Gt.bearing=this._map.transform.bearing+a.clamp(br.amount,-179,179),he(Gt,br)}if(me.pitch){var Fr=_e(me.pitch,Mt,Bi);Gt.pitch=this._map.transform.pitch+Fr.amount,he(Gt,Fr)}if(Gt.zoom||Gt.bearing){var Gr=me.pinchAround===void 0?me.around:me.pinchAround;Gt.around=Gr?this._map.unproject(Gr):this._map.getCenter()}return this.clear(),a.extend(Gt,{noMoveStart:!0})}};function he(ge,J){(!ge.duration||ge.duration<J.duration)&&(ge.duration=J.duration,ge.easing=J.easing)}function _e(ge,J,me){var ae=me.maxSpeed,be=me.linearity,ke=me.deceleration,je=a.clamp(ge*be/(J/1e3),-ae,ae),vt=Math.abs(je)/(ke*be);return{easing:me.easing,duration:vt*1e3,amount:je*(vt/2)}}var He=function(ge){function J(ae,be,ke,je){je===void 0&&(je={});var vt=x.mousePos(be.getCanvasContainer(),ke),Mt=be.unproject(vt);ge.call(this,ae,a.extend({point:vt,lngLat:Mt,originalEvent:ke},je)),this._defaultPrevented=!1,this.target=be}ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J;var me={defaultPrevented:{configurable:!0}};return J.prototype.preventDefault=function(){this._defaultPrevented=!0},me.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(J.prototype,me),J}(a.Event),qe=function(ge){function J(ae,be,ke){var je=ae==="touchend"?ke.changedTouches:ke.touches,vt=x.touchPos(be.getCanvasContainer(),je),Mt=vt.map(function(vr){return be.unproject(vr)}),Gt=vt.reduce(function(vr,br,Fr,Gr){return vr.add(br.div(Gr.length))},new a.Point(0,0)),er=be.unproject(Gt);ge.call(this,ae,{points:vt,point:Gt,lngLats:Mt,lngLat:er,originalEvent:ke}),this._defaultPrevented=!1}ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J;var me={defaultPrevented:{configurable:!0}};return J.prototype.preventDefault=function(){this._defaultPrevented=!0},me.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(J.prototype,me),J}(a.Event),at=function(ge){function J(ae,be,ke){ge.call(this,ae,{originalEvent:ke}),this._defaultPrevented=!1}ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J;var me={defaultPrevented:{configurable:!0}};return J.prototype.preventDefault=function(){this._defaultPrevented=!0},me.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(J.prototype,me),J}(a.Event),ft=function(J,me){this._map=J,this._clickTolerance=me.clickTolerance};ft.prototype.reset=function(){delete this._mousedownPos},ft.prototype.wheel=function(J){return this._firePreventable(new at(J.type,this._map,J))},ft.prototype.mousedown=function(J,me){return this._mousedownPos=me,this._firePreventable(new He(J.type,this._map,J))},ft.prototype.mouseup=function(J){this._map.fire(new He(J.type,this._map,J))},ft.prototype.click=function(J,me){this._mousedownPos&&this._mousedownPos.dist(me)>=this._clickTolerance||this._map.fire(new He(J.type,this._map,J))},ft.prototype.dblclick=function(J){return this._firePreventable(new He(J.type,this._map,J))},ft.prototype.mouseover=function(J){this._map.fire(new He(J.type,this._map,J))},ft.prototype.mouseout=function(J){this._map.fire(new He(J.type,this._map,J))},ft.prototype.touchstart=function(J){return this._firePreventable(new qe(J.type,this._map,J))},ft.prototype.touchmove=function(J){this._map.fire(new qe(J.type,this._map,J))},ft.prototype.touchend=function(J){this._map.fire(new qe(J.type,this._map,J))},ft.prototype.touchcancel=function(J){this._map.fire(new qe(J.type,this._map,J))},ft.prototype._firePreventable=function(J){if(this._map.fire(J),J.defaultPrevented)return{}},ft.prototype.isEnabled=function(){return!0},ft.prototype.isActive=function(){return!1},ft.prototype.enable=function(){},ft.prototype.disable=function(){};var Ft=function(J){this._map=J};Ft.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Ft.prototype.mousemove=function(J){this._map.fire(new He(J.type,this._map,J))},Ft.prototype.mousedown=function(){this._delayContextMenu=!0},Ft.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new He("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Ft.prototype.contextmenu=function(J){this._delayContextMenu?this._contextMenuEvent=J:this._map.fire(new He(J.type,this._map,J)),this._map.listens("contextmenu")&&J.preventDefault()},Ft.prototype.isEnabled=function(){return!0},Ft.prototype.isActive=function(){return!1},Ft.prototype.enable=function(){},Ft.prototype.disable=function(){};var xt=function(J,me){this._map=J,this._el=J.getCanvasContainer(),this._container=J.getContainer(),this._clickTolerance=me.clickTolerance||1};xt.prototype.isEnabled=function(){return!!this._enabled},xt.prototype.isActive=function(){return!!this._active},xt.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},xt.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},xt.prototype.mousedown=function(J,me){this.isEnabled()&&J.shiftKey&&J.button===0&&(x.disableDrag(),this._startPos=this._lastPos=me,this._active=!0)},xt.prototype.mousemoveWindow=function(J,me){if(this._active){var ae=me;if(!(this._lastPos.equals(ae)||!this._box&&ae.dist(this._startPos)<this._clickTolerance)){var be=this._startPos;this._lastPos=ae,this._box||(this._box=x.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",J));var ke=Math.min(be.x,ae.x),je=Math.max(be.x,ae.x),vt=Math.min(be.y,ae.y),Mt=Math.max(be.y,ae.y);x.setTransform(this._box,"translate("+ke+"px,"+vt+"px)"),this._box.style.width=je-ke+"px",this._box.style.height=Mt-vt+"px"}}},xt.prototype.mouseupWindow=function(J,me){var ae=this;if(this._active&&J.button===0){var be=this._startPos,ke=me;if(this.reset(),x.suppressClick(),be.x===ke.x&&be.y===ke.y)this._fireEvent("boxzoomcancel",J);else return this._map.fire(new a.Event("boxzoomend",{originalEvent:J})),{cameraAnimation:function(je){return je.fitScreenCoordinates(be,ke,ae._map.getBearing(),{linear:!0})}}}},xt.prototype.keydown=function(J){this._active&&J.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",J))},xt.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(x.remove(this._box),this._box=null),x.enableDrag(),delete this._startPos,delete this._lastPos},xt.prototype._fireEvent=function(J,me){return this._map.fire(new a.Event(J,{originalEvent:me}))};function Xt(ge,J){for(var me={},ae=0;ae<ge.length;ae++)me[ge[ae].identifier]=J[ae];return me}function rr(ge){for(var J=new a.Point(0,0),me=0,ae=ge;me<ae.length;me+=1){var be=ae[me];J._add(be)}return J.div(ge.length)}var ar=500,Pr=500,Cr=30,jr=function(J){this.reset(),this.numTouches=J.numTouches};jr.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},jr.prototype.touchstart=function(J,me,ae){(this.centroid||ae.length>this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=J.timeStamp),ae.length===this.numTouches&&(this.centroid=rr(me),this.touches=Xt(ae,me)))},jr.prototype.touchmove=function(J,me,ae){if(!(this.aborted||!this.centroid)){var be=Xt(ae,me);for(var ke in this.touches){var je=this.touches[ke],vt=be[ke];(!vt||vt.dist(je)>Cr)&&(this.aborted=!0)}}},jr.prototype.touchend=function(J,me,ae){if((!this.centroid||J.timeStamp-this.startTime>Pr)&&(this.aborted=!0),ae.length===0){var be=!this.aborted&&this.centroid;if(this.reset(),be)return be}};var en=function(J){this.singleTap=new jr(J),this.numTaps=J.numTaps,this.reset()};en.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},en.prototype.touchstart=function(J,me,ae){this.singleTap.touchstart(J,me,ae)},en.prototype.touchmove=function(J,me,ae){this.singleTap.touchmove(J,me,ae)},en.prototype.touchend=function(J,me,ae){var be=this.singleTap.touchend(J,me,ae);if(be){var ke=J.timeStamp-this.lastTime<ar,je=!this.lastTap||this.lastTap.dist(be)<Cr;if((!ke||!je)&&this.reset(),this.count++,this.lastTime=J.timeStamp,this.lastTap=be,this.count===this.numTaps)return this.reset(),be}};var Ir=function(){this._zoomIn=new en({numTouches:1,numTaps:2}),this._zoomOut=new en({numTouches:2,numTaps:1}),this.reset()};Ir.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Ir.prototype.touchstart=function(J,me,ae){this._zoomIn.touchstart(J,me,ae),this._zoomOut.touchstart(J,me,ae)},Ir.prototype.touchmove=function(J,me,ae){this._zoomIn.touchmove(J,me,ae),this._zoomOut.touchmove(J,me,ae)},Ir.prototype.touchend=function(J,me,ae){var be=this,ke=this._zoomIn.touchend(J,me,ae),je=this._zoomOut.touchend(J,me,ae);if(ke)return this._active=!0,J.preventDefault(),setTimeout(function(){return be.reset()},0),{cameraAnimation:function(vt){return vt.easeTo({duration:300,zoom:vt.getZoom()+1,around:vt.unproject(ke)},{originalEvent:J})}};if(je)return this._active=!0,J.preventDefault(),setTimeout(function(){return be.reset()},0),{cameraAnimation:function(vt){return vt.easeTo({duration:300,zoom:vt.getZoom()-1,around:vt.unproject(je)},{originalEvent:J})}}},Ir.prototype.touchcancel=function(){this.reset()},Ir.prototype.enable=function(){this._enabled=!0},Ir.prototype.disable=function(){this._enabled=!1,this.reset()},Ir.prototype.isEnabled=function(){return this._enabled},Ir.prototype.isActive=function(){return this._active};var Hr=0,Xr=2,tn=function(J){this.reset(),this._clickTolerance=J.clickTolerance||1};tn.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},tn.prototype._correctButton=function(J,me){return!1},tn.prototype._move=function(J,me){return{}},tn.prototype.mousedown=function(J,me){if(!this._lastPoint){var ae=x.mouseButton(J);this._correctButton(J,ae)&&(this._lastPoint=me,this._eventButton=ae)}},tn.prototype.mousemoveWindow=function(J,me){var ae=this._lastPoint;if(ae&&(J.preventDefault(),!(!this._moved&&me.dist(ae)<this._clickTolerance)))return this._moved=!0,this._lastPoint=me,this._move(ae,me)},tn.prototype.mouseupWindow=function(J){var me=x.mouseButton(J);me===this._eventButton&&(this._moved&&x.suppressClick(),this.reset())},tn.prototype.enable=function(){this._enabled=!0},tn.prototype.disable=function(){this._enabled=!1,this.reset()},tn.prototype.isEnabled=function(){return this._enabled},tn.prototype.isActive=function(){return this._active};var un=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.mousedown=function(ae,be){ge.prototype.mousedown.call(this,ae,be),this._lastPoint&&(this._active=!0)},J.prototype._correctButton=function(ae,be){return be===Hr&&!ae.ctrlKey},J.prototype._move=function(ae,be){return{around:be,panDelta:be.sub(ae)}},J}(tn),Zr=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype._correctButton=function(ae,be){return be===Hr&&ae.ctrlKey||be===Xr},J.prototype._move=function(ae,be){var ke=.8,je=(be.x-ae.x)*ke;if(je)return this._active=!0,{bearingDelta:je}},J.prototype.contextmenu=function(ae){ae.preventDefault()},J}(tn),Nn=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype._correctButton=function(ae,be){return be===Hr&&ae.ctrlKey||be===Xr},J.prototype._move=function(ae,be){var ke=-.5,je=(be.y-ae.y)*ke;if(je)return this._active=!0,{pitchDelta:je}},J.prototype.contextmenu=function(ae){ae.preventDefault()},J}(tn),Wn=function(J){this._minTouches=1,this._clickTolerance=J.clickTolerance||1,this.reset()};Wn.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new a.Point(0,0)},Wn.prototype.touchstart=function(J,me,ae){return this._calculateTransform(J,me,ae)},Wn.prototype.touchmove=function(J,me,ae){if(this._active)return J.preventDefault(),this._calculateTransform(J,me,ae)},Wn.prototype.touchend=function(J,me,ae){this._calculateTransform(J,me,ae),this._active&&ae.length<this._minTouches&&this.reset()},Wn.prototype.touchcancel=function(){this.reset()},Wn.prototype._calculateTransform=function(J,me,ae){ae.length>0&&(this._active=!0);var be=Xt(ae,me),ke=new a.Point(0,0),je=new a.Point(0,0),vt=0;for(var Mt in be){var Gt=be[Mt],er=this._touches[Mt];er&&(ke._add(Gt),je._add(Gt.sub(er)),vt++,be[Mt]=Gt)}if(this._touches=be,!(vt<this._minTouches||!je.mag())){var vr=je.div(vt);if(this._sum._add(vr),!(this._sum.mag()<this._clickTolerance)){var br=ke.div(vt);return{around:br,panDelta:vr}}}},Wn.prototype.enable=function(){this._enabled=!0},Wn.prototype.disable=function(){this._enabled=!1,this.reset()},Wn.prototype.isEnabled=function(){return this._enabled},Wn.prototype.isActive=function(){return this._active};var Kn=function(){this.reset()};Kn.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},Kn.prototype._start=function(J){},Kn.prototype._move=function(J,me,ae){return{}},Kn.prototype.touchstart=function(J,me,ae){this._firstTwoTouches||ae.length<2||(this._firstTwoTouches=[ae[0].identifier,ae[1].identifier],this._start([me[0],me[1]]))},Kn.prototype.touchmove=function(J,me,ae){if(this._firstTwoTouches){J.preventDefault();var be=this._firstTwoTouches,ke=be[0],je=be[1],vt=na(ae,me,ke),Mt=na(ae,me,je);if(!(!vt||!Mt)){var Gt=this._aroundCenter?null:vt.add(Mt).div(2);return this._move([vt,Mt],Gt,J)}}},Kn.prototype.touchend=function(J,me,ae){if(this._firstTwoTouches){var be=this._firstTwoTouches,ke=be[0],je=be[1],vt=na(ae,me,ke),Mt=na(ae,me,je);vt&&Mt||(this._active&&x.suppressClick(),this.reset())}},Kn.prototype.touchcancel=function(){this.reset()},Kn.prototype.enable=function(J){this._enabled=!0,this._aroundCenter=!!J&&J.around==="center"},Kn.prototype.disable=function(){this._enabled=!1,this.reset()},Kn.prototype.isEnabled=function(){return this._enabled},Kn.prototype.isActive=function(){return this._active};function na(ge,J,me){for(var ae=0;ae<ge.length;ae++)if(ge[ae].identifier===me)return J[ae]}var wa=.1;function ba(ge,J){return Math.log(ge/J)/Math.LN2}var Wa=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.reset=function(){ge.prototype.reset.call(this),delete this._distance,delete this._startDistance},J.prototype._start=function(ae){this._startDistance=this._distance=ae[0].dist(ae[1])},J.prototype._move=function(ae,be){var ke=this._distance;if(this._distance=ae[0].dist(ae[1]),!(!this._active&&Math.abs(ba(this._distance,this._startDistance))<wa))return this._active=!0,{zoomDelta:ba(this._distance,ke),pinchAround:be}},J}(Kn),Pa=25;function Ha(ge,J){return ge.angleWith(J)*180/Math.PI}var ri=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.reset=function(){ge.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},J.prototype._start=function(ae){this._startVector=this._vector=ae[0].sub(ae[1]),this._minDiameter=ae[0].dist(ae[1])},J.prototype._move=function(ae,be){var ke=this._vector;if(this._vector=ae[0].sub(ae[1]),!(!this._active&&this._isBelowThreshold(this._vector)))return this._active=!0,{bearingDelta:Ha(this._vector,ke),pinchAround:be}},J.prototype._isBelowThreshold=function(ae){this._minDiameter=Math.min(this._minDiameter,ae.mag());var be=Math.PI*this._minDiameter,ke=Pa/be*360,je=Ha(ae,this._startVector);return Math.abs(je)<ke},J}(Kn);function si(ge){return Math.abs(ge.y)>Math.abs(ge.x)}var gi=100,Bn=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.reset=function(){ge.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},J.prototype._start=function(ae){this._lastPoints=ae,si(ae[0].sub(ae[1]))&&(this._valid=!1)},J.prototype._move=function(ae,be,ke){var je=ae[0].sub(this._lastPoints[0]),vt=ae[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(je,vt,ke.timeStamp),!!this._valid){this._lastPoints=ae,this._active=!0;var Mt=(je.y+vt.y)/2,Gt=-.5;return{pitchDelta:Mt*Gt}}},J.prototype.gestureBeginsVertically=function(ae,be,ke){if(this._valid!==void 0)return this._valid;var je=2,vt=ae.mag()>=je,Mt=be.mag()>=je;if(!(!vt&&!Mt)){if(!vt||!Mt)return this._firstMove===void 0&&(this._firstMove=ke),ke-this._firstMove<gi?void 0:!1;var Gt=ae.y>0==be.y>0;return si(ae)&&si(be)&&Gt}},J}(Kn),Va={panStep:100,bearingStep:15,pitchStep:10},Ba=function(){var J=Va;this._panStep=J.panStep,this._bearingStep=J.bearingStep,this._pitchStep=J.pitchStep};Ba.prototype.reset=function(){this._active=!1},Ba.prototype.keydown=function(J){var me=this;if(!(J.altKey||J.ctrlKey||J.metaKey)){var ae=0,be=0,ke=0,je=0,vt=0;switch(J.keyCode){case 61:case 107:case 171:case 187:ae=1;break;case 189:case 109:case 173:ae=-1;break;case 37:J.shiftKey?be=-1:(J.preventDefault(),je=-1);break;case 39:J.shiftKey?be=1:(J.preventDefault(),je=1);break;case 38:J.shiftKey?ke=1:(J.preventDefault(),vt=-1);break;case 40:J.shiftKey?ke=-1:(J.preventDefault(),vt=1);break;default:return}return{cameraAnimation:function(Mt){var Gt=Mt.getZoom();Mt.easeTo({duration:300,easeId:"keyboardHandler",easing:Ja,zoom:ae?Math.round(Gt)+ae*(J.shiftKey?2:1):Gt,bearing:Mt.getBearing()+be*me._bearingStep,pitch:Mt.getPitch()+ke*me._pitchStep,offset:[-je*me._panStep,-vt*me._panStep],center:Mt.getCenter()},{originalEvent:J})}}}},Ba.prototype.enable=function(){this._enabled=!0},Ba.prototype.disable=function(){this._enabled=!1,this.reset()},Ba.prototype.isEnabled=function(){return this._enabled},Ba.prototype.isActive=function(){return this._active};function Ja(ge){return ge*(2-ge)}var Ri=4.000244140625,ji=1/100,qi=1/450,Mi=2,mi=function(J,me){this._map=J,this._el=J.getCanvasContainer(),this._handler=me,this._delta=0,this._defaultZoomRate=ji,this._wheelZoomRate=qi,a.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};mi.prototype.setZoomRate=function(J){this._defaultZoomRate=J},mi.prototype.setWheelZoomRate=function(J){this._wheelZoomRate=J},mi.prototype.isEnabled=function(){return!!this._enabled},mi.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},mi.prototype.isZooming=function(){return!!this._zooming},mi.prototype.enable=function(J){this.isEnabled()||(this._enabled=!0,this._aroundCenter=J&&J.around==="center")},mi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},mi.prototype.wheel=function(J){if(this.isEnabled()){var me=J.deltaMode===a.window.WheelEvent.DOM_DELTA_LINE?J.deltaY*40:J.deltaY,ae=a.browser.now(),be=ae-(this._lastWheelEventTime||0);this._lastWheelEventTime=ae,me!==0&&me%Ri===0?this._type="wheel":me!==0&&Math.abs(me)<4?this._type="trackpad":be>400?(this._type=null,this._lastValue=me,this._timeout=setTimeout(this._onTimeout,40,J)):this._type||(this._type=Math.abs(be*me)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,me+=this._lastValue)),J.shiftKey&&me&&(me=me/4),this._type&&(this._lastWheelEvent=J,this._delta-=me,this._active||this._start(J)),J.preventDefault()}},mi.prototype._onTimeout=function(J){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(J)},mi.prototype._start=function(J){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 me=x.mousePos(this._el,J);this._around=a.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(me)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},mi.prototype.renderFrame=function(){return this._onScrollFrame()},mi.prototype._onScrollFrame=function(){var J=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var me=this._map.transform;if(this._delta!==0){var ae=this._type==="wheel"&&Math.abs(this._delta)>Ri?this._wheelZoomRate:this._defaultZoomRate,be=Mi/(1+Math.exp(-Math.abs(this._delta*ae)));this._delta<0&&be!==0&&(be=1/be);var ke=typeof this._targetZoom=="number"?me.zoomScale(this._targetZoom):me.scale;this._targetZoom=Math.min(me.maxZoom,Math.max(me.minZoom,me.scaleZoom(ke*be))),this._type==="wheel"&&(this._startZoom=me.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var je=typeof this._targetZoom=="number"?this._targetZoom:me.zoom,vt=this._startZoom,Mt=this._easing,Gt=!1,er;if(this._type==="wheel"&&vt&&Mt){var vr=Math.min((a.browser.now()-this._lastWheelEventTime)/200,1),br=Mt(vr);er=a.number(vt,je,br),vr<1?this._frameId||(this._frameId=!0):Gt=!0}else er=je,Gt=!0;return this._active=!0,Gt&&(this._active=!1,this._finishTimeout=setTimeout(function(){J._zooming=!1,J._handler._triggerRenderFrame(),delete J._targetZoom,delete J._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Gt,zoomDelta:er-me.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},mi.prototype._smoothOutEasing=function(J){var me=a.ease;if(this._prevEase){var ae=this._prevEase,be=(a.browser.now()-ae.start)/ae.duration,ke=ae.easing(be+.01)-ae.easing(be),je=.27/Math.sqrt(ke*ke+1e-4)*.01,vt=Math.sqrt(.27*.27-je*je);me=a.bezier(je,vt,.25,1)}return this._prevEase={start:a.browser.now(),duration:J,easing:me},me},mi.prototype.reset=function(){this._active=!1};var ma=function(J,me){this._clickZoom=J,this._tapZoom=me};ma.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},ma.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},ma.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},ma.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Ca=function(){this.reset()};Ca.prototype.reset=function(){this._active=!1},Ca.prototype.dblclick=function(J,me){return J.preventDefault(),{cameraAnimation:function(ae){ae.easeTo({duration:300,zoom:ae.getZoom()+(J.shiftKey?-1:1),around:ae.unproject(me)},{originalEvent:J})}}},Ca.prototype.enable=function(){this._enabled=!0},Ca.prototype.disable=function(){this._enabled=!1,this.reset()},Ca.prototype.isEnabled=function(){return this._enabled},Ca.prototype.isActive=function(){return this._active};var Ci=function(){this._tap=new en({numTouches:1,numTaps:1}),this.reset()};Ci.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Ci.prototype.touchstart=function(J,me,ae){this._swipePoint||(this._tapTime&&J.timeStamp-this._tapTime>ar&&this.reset(),this._tapTime?ae.length>0&&(this._swipePoint=me[0],this._swipeTouch=ae[0].identifier):this._tap.touchstart(J,me,ae))},Ci.prototype.touchmove=function(J,me,ae){if(!this._tapTime)this._tap.touchmove(J,me,ae);else if(this._swipePoint){if(ae[0].identifier!==this._swipeTouch)return;var be=me[0],ke=be.y-this._swipePoint.y;return this._swipePoint=be,J.preventDefault(),this._active=!0,{zoomDelta:ke/128}}},Ci.prototype.touchend=function(J,me,ae){if(this._tapTime)this._swipePoint&&ae.length===0&&this.reset();else{var be=this._tap.touchend(J,me,ae);be&&(this._tapTime=J.timeStamp)}},Ci.prototype.touchcancel=function(){this.reset()},Ci.prototype.enable=function(){this._enabled=!0},Ci.prototype.disable=function(){this._enabled=!1,this.reset()},Ci.prototype.isEnabled=function(){return this._enabled},Ci.prototype.isActive=function(){return this._active};var Qi=function(J,me,ae){this._el=J,this._mousePan=me,this._touchPan=ae};Qi.prototype.enable=function(J){this._inertiaOptions=J||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Qi.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Qi.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Qi.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var ts=function(J,me,ae){this._pitchWithRotate=J.pitchWithRotate,this._mouseRotate=me,this._mousePitch=ae};ts.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},ts.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},ts.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},ts.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var ho=function(J,me,ae,be){this._el=J,this._touchZoom=me,this._touchRotate=ae,this._tapDragZoom=be,this._rotationDisabled=!1,this._enabled=!0};ho.prototype.enable=function(J){this._touchZoom.enable(J),this._rotationDisabled||this._touchRotate.enable(J),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},ho.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},ho.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},ho.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},ho.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},ho.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Oo=function(ge){return ge.zoom||ge.drag||ge.pitch||ge.rotate},Fi=function(ge){function J(){ge.apply(this,arguments)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J}(a.Event);function ls(ge){return ge.panDelta&&ge.panDelta.mag()||ge.zoomDelta||ge.bearingDelta||ge.pitchDelta}var Ai=function(J,me){this._map=J,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Ti(J),this._bearingSnap=me.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(me),a.bindAll(["handleEvent","handleWindowEvent"],this);var ae=this._el;this._listeners=[[ae,"touchstart",{passive:!1}],[ae,"touchmove",{passive:!1}],[ae,"touchend",void 0],[ae,"touchcancel",void 0],[ae,"mousedown",void 0],[ae,"mousemove",void 0],[ae,"mouseup",void 0],[a.window.document,"mousemove",{capture:!0}],[a.window.document,"mouseup",void 0],[ae,"mouseover",void 0],[ae,"mouseout",void 0],[ae,"dblclick",void 0],[ae,"click",void 0],[ae,"keydown",{capture:!1}],[ae,"keyup",void 0],[ae,"wheel",{passive:!1}],[ae,"contextmenu",void 0],[a.window,"blur",void 0]];for(var be=0,ke=this._listeners;be<ke.length;be+=1){var je=ke[be],vt=je[0],Mt=je[1],Gt=je[2];x.addEventListener(vt,Mt,vt===a.window.document?this.handleWindowEvent:this.handleEvent,Gt)}};Ai.prototype.destroy=function(){for(var J=0,me=this._listeners;J<me.length;J+=1){var ae=me[J],be=ae[0],ke=ae[1],je=ae[2];x.removeEventListener(be,ke,be===a.window.document?this.handleWindowEvent:this.handleEvent,je)}},Ai.prototype._addDefaultHandlers=function(J){var me=this._map,ae=me.getCanvasContainer();this._add("mapEvent",new ft(me,J));var be=me.boxZoom=new xt(me,J);this._add("boxZoom",be);var ke=new Ir,je=new Ca;me.doubleClickZoom=new ma(je,ke),this._add("tapZoom",ke),this._add("clickZoom",je);var vt=new Ci;this._add("tapDragZoom",vt);var Mt=me.touchPitch=new Bn;this._add("touchPitch",Mt);var Gt=new Zr(J),er=new Nn(J);me.dragRotate=new ts(J,Gt,er),this._add("mouseRotate",Gt,["mousePitch"]),this._add("mousePitch",er,["mouseRotate"]);var vr=new un(J),br=new Wn(J);me.dragPan=new Qi(ae,vr,br),this._add("mousePan",vr),this._add("touchPan",br,["touchZoom","touchRotate"]);var Fr=new ri,Gr=new Wa;me.touchZoomRotate=new ho(ae,Gr,Fr,vt),this._add("touchRotate",Fr,["touchPan","touchZoom"]),this._add("touchZoom",Gr,["touchPan","touchRotate"]);var Wr=me.scrollZoom=new mi(me,this);this._add("scrollZoom",Wr,["mousePan"]);var Vr=me.keyboard=new Ba;this._add("keyboard",Vr),this._add("blockableMapEvent",new Ft(me));for(var Qr=0,ln=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];Qr<ln.length;Qr+=1){var Cn=ln[Qr];J.interactive&&J[Cn]&&me[Cn].enable(J[Cn])}},Ai.prototype._add=function(J,me,ae){this._handlers.push({handlerName:J,handler:me,allowed:ae}),this._handlersById[J]=me},Ai.prototype.stop=function(){if(!this._updatingCamera){for(var J=0,me=this._handlers;J<me.length;J+=1){var ae=me[J],be=ae.handler;be.reset()}this._inertia.clear(),this._fireEvents({},{}),this._changes=[]}},Ai.prototype.isActive=function(){for(var J=0,me=this._handlers;J<me.length;J+=1){var ae=me[J],be=ae.handler;if(be.isActive())return!0}return!1},Ai.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},Ai.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},Ai.prototype.isMoving=function(){return Boolean(Oo(this._eventsInProgress))||this.isZooming()},Ai.prototype._blockedByActive=function(J,me,ae){for(var be in J)if(be!==ae&&(!me||me.indexOf(be)<0))return!0;return!1},Ai.prototype.handleWindowEvent=function(J){this.handleEvent(J,J.type+"Window")},Ai.prototype._getMapTouches=function(J){for(var me=[],ae=0,be=J;ae<be.length;ae+=1){var ke=be[ae],je=ke.target;this._el.contains(je)&&me.push(ke)}return me},Ai.prototype.handleEvent=function(J,me){if(J.type==="blur"){this.stop();return}this._updatingCamera=!0;for(var ae=J.type==="renderFrame"?void 0:J,be={needsRenderFrame:!1},ke={},je={},vt=J.touches?this._getMapTouches(J.touches):void 0,Mt=vt?x.touchPos(this._el,vt):x.mousePos(this._el,J),Gt=0,er=this._handlers;Gt<er.length;Gt+=1){var vr=er[Gt],br=vr.handlerName,Fr=vr.handler,Gr=vr.allowed;if(Fr.isEnabled()){var Wr=void 0;this._blockedByActive(je,Gr,br)?Fr.reset():Fr[me||J.type]&&(Wr=Fr[me||J.type](J,Mt,vt),this.mergeHandlerResult(be,ke,Wr,br,ae),Wr&&Wr.needsRenderFrame&&this._triggerRenderFrame()),(Wr||Fr.isActive())&&(je[br]=Fr)}}var Vr={};for(var Qr in this._previousActiveHandlers)je[Qr]||(Vr[Qr]=ae);this._previousActiveHandlers=je,(Object.keys(Vr).length||ls(be))&&(this._changes.push([be,ke,Vr]),this._triggerRenderFrame()),(Object.keys(je).length||ls(be))&&this._map._stop(!0),this._updatingCamera=!1;var ln=be.cameraAnimation;ln&&(this._inertia.clear(),this._fireEvents({},{}),this._changes=[],ln(this._map))},Ai.prototype.mergeHandlerResult=function(J,me,ae,be,ke){if(ae){a.extend(J,ae);var je={handlerName:be,originalEvent:ae.originalEvent||ke};ae.zoomDelta!==void 0&&(me.zoom=je),ae.panDelta!==void 0&&(me.drag=je),ae.pitchDelta!==void 0&&(me.pitch=je),ae.bearingDelta!==void 0&&(me.rotate=je)}},Ai.prototype._applyChanges=function(){for(var J={},me={},ae={},be=0,ke=this._changes;be<ke.length;be+=1){var je=ke[be],vt=je[0],Mt=je[1],Gt=je[2];vt.panDelta&&(J.panDelta=(J.panDelta||new a.Point(0,0))._add(vt.panDelta)),vt.zoomDelta&&(J.zoomDelta=(J.zoomDelta||0)+vt.zoomDelta),vt.bearingDelta&&(J.bearingDelta=(J.bearingDelta||0)+vt.bearingDelta),vt.pitchDelta&&(J.pitchDelta=(J.pitchDelta||0)+vt.pitchDelta),vt.around!==void 0&&(J.around=vt.around),vt.pinchAround!==void 0&&(J.pinchAround=vt.pinchAround),vt.noInertia&&(J.noInertia=vt.noInertia),a.extend(me,Mt),a.extend(ae,Gt)}this._updateMapTransform(J,me,ae),this._changes=[]},Ai.prototype._updateMapTransform=function(J,me,ae){var be=this._map,ke=be.transform;if(!ls(J))return this._fireEvents(me,ae);var je=J.panDelta,vt=J.zoomDelta,Mt=J.bearingDelta,Gt=J.pitchDelta,er=J.around,vr=J.pinchAround;vr!==void 0&&(er=vr),be._stop(!0),er=er||be.transform.centerPoint;var br=ke.pointLocation(je?er.sub(je):er);Mt&&(ke.bearing+=Mt),Gt&&(ke.pitch+=Gt),vt&&(ke.zoom+=vt),ke.setLocationAtPoint(br,er),this._map._update(),J.noInertia||this._inertia.record(J),this._fireEvents(me,ae)},Ai.prototype._fireEvents=function(J,me){var ae=this,be=Oo(this._eventsInProgress),ke=Oo(J),je={};for(var vt in J){var Mt=J[vt],Gt=Mt.originalEvent;this._eventsInProgress[vt]||(je[vt+"start"]=Gt),this._eventsInProgress[vt]=J[vt]}!be&&ke&&this._fireEvent("movestart",ke.originalEvent);for(var er in je)this._fireEvent(er,je[er]);J.rotate&&(this._bearingChanged=!0),ke&&this._fireEvent("move",ke.originalEvent);for(var vr in J){var br=J[vr],Fr=br.originalEvent;this._fireEvent(vr,Fr)}var Gr={},Wr;for(var Vr in this._eventsInProgress){var Qr=this._eventsInProgress[Vr],ln=Qr.handlerName,Cn=Qr.originalEvent;this._handlersById[ln].isActive()||(delete this._eventsInProgress[Vr],Wr=me[ln]||Cn,Gr[Vr+"end"]=Wr)}for(var On in Gr)this._fireEvent(On,Gr[On]);var Xn=Oo(this._eventsInProgress);if((be||ke)&&!Xn){this._updatingCamera=!0;var jn=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Zn=function(ra){return ra!==0&&-ae._bearingSnap<ra&&ra<ae._bearingSnap};jn?(Zn(jn.bearing||this._map.getBearing())&&(jn.bearing=0),this._map.easeTo(jn,{originalEvent:Wr})):(this._map.fire(new a.Event("moveend",{originalEvent:Wr})),Zn(this._map.getBearing())&&this._map.resetNorth()),this._bearingChanged=!1,this._updatingCamera=!1}},Ai.prototype._fireEvent=function(J,me){this._map.fire(new a.Event(J,me?{originalEvent:me}:{}))},Ai.prototype._triggerRenderFrame=function(){var J=this;this._frameId===void 0&&(this._frameId=this._map._requestRenderFrame(function(me){delete J._frameId,J.handleEvent(new Fi("renderFrame",{timeStamp:me})),J._applyChanges()}))};var Ws=function(ge){function J(me,ae){ge.call(this),this._moving=!1,this._zooming=!1,this.transform=me,this._bearingSnap=ae.bearingSnap,a.bindAll(["_renderFrameCallback"],this)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.getCenter=function(){return new a.LngLat(this.transform.center.lng,this.transform.center.lat)},J.prototype.setCenter=function(ae,be){return this.jumpTo({center:ae},be)},J.prototype.panBy=function(ae,be,ke){return ae=a.Point.convert(ae).mult(-1),this.panTo(this.transform.center,a.extend({offset:ae},be),ke)},J.prototype.panTo=function(ae,be,ke){return this.easeTo(a.extend({center:ae},be),ke)},J.prototype.getZoom=function(){return this.transform.zoom},J.prototype.setZoom=function(ae,be){return this.jumpTo({zoom:ae},be),this},J.prototype.zoomTo=function(ae,be,ke){return this.easeTo(a.extend({zoom:ae},be),ke)},J.prototype.zoomIn=function(ae,be){return this.zoomTo(this.getZoom()+1,ae,be),this},J.prototype.zoomOut=function(ae,be){return this.zoomTo(this.getZoom()-1,ae,be),this},J.prototype.getBearing=function(){return this.transform.bearing},J.prototype.setBearing=function(ae,be){return this.jumpTo({bearing:ae},be),this},J.prototype.getPadding=function(){return this.transform.padding},J.prototype.setPadding=function(ae,be){return this.jumpTo({padding:ae},be),this},J.prototype.rotateTo=function(ae,be,ke){return this.easeTo(a.extend({bearing:ae},be),ke)},J.prototype.resetNorth=function(ae,be){return this.rotateTo(0,a.extend({duration:1e3},ae),be),this},J.prototype.resetNorthPitch=function(ae,be){return this.easeTo(a.extend({bearing:0,pitch:0,duration:1e3},ae),be),this},J.prototype.snapToNorth=function(ae,be){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(ae,be):this},J.prototype.getPitch=function(){return this.transform.pitch},J.prototype.setPitch=function(ae,be){return this.jumpTo({pitch:ae},be),this},J.prototype.cameraForBounds=function(ae,be){return ae=a.LngLatBounds.convert(ae),this._cameraForBoxAndBearing(ae.getNorthWest(),ae.getSouthEast(),0,be)},J.prototype._cameraForBoxAndBearing=function(ae,be,ke,je){var vt={top:0,bottom:0,right:0,left:0};if(je=a.extend({padding:vt,offset:[0,0],maxZoom:this.transform.maxZoom},je),typeof je.padding=="number"){var Mt=je.padding;je.padding={top:Mt,bottom:Mt,right:Mt,left:Mt}}je.padding=a.extend(vt,je.padding);var Gt=this.transform,er=Gt.padding,vr=Gt.project(a.LngLat.convert(ae)),br=Gt.project(a.LngLat.convert(be)),Fr=vr.rotate(-ke*Math.PI/180),Gr=br.rotate(-ke*Math.PI/180),Wr=new a.Point(Math.max(Fr.x,Gr.x),Math.max(Fr.y,Gr.y)),Vr=new a.Point(Math.min(Fr.x,Gr.x),Math.min(Fr.y,Gr.y)),Qr=Wr.sub(Vr),ln=(Gt.width-(er.left+er.right+je.padding.left+je.padding.right))/Qr.x,Cn=(Gt.height-(er.top+er.bottom+je.padding.top+je.padding.bottom))/Qr.y;if(Cn<0||ln<0){a.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");return}var On=Math.min(Gt.scaleZoom(Gt.scale*Math.min(ln,Cn)),je.maxZoom),Xn=a.Point.convert(je.offset),jn=(je.padding.left-je.padding.right)/2,Zn=(je.padding.top-je.padding.bottom)/2,ra=new a.Point(Xn.x+jn,Xn.y+Zn),ca=ra.mult(Gt.scale/Gt.zoomScale(On)),fa=Gt.unproject(vr.add(br).div(2).sub(ca));return{center:fa,zoom:On,bearing:ke}},J.prototype.fitBounds=function(ae,be,ke){return this._fitInternal(this.cameraForBounds(ae,be),be,ke)},J.prototype.fitScreenCoordinates=function(ae,be,ke,je,vt){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(a.Point.convert(ae)),this.transform.pointLocation(a.Point.convert(be)),ke,je),je,vt)},J.prototype._fitInternal=function(ae,be,ke){return ae?(be=a.extend(ae,be),delete be.padding,be.linear?this.easeTo(be,ke):this.flyTo(be,ke)):this},J.prototype.jumpTo=function(ae,be){this.stop();var ke=this.transform,je=!1,vt=!1,Mt=!1;return"zoom"in ae&&ke.zoom!==+ae.zoom&&(je=!0,ke.zoom=+ae.zoom),ae.center!==void 0&&(ke.center=a.LngLat.convert(ae.center)),"bearing"in ae&&ke.bearing!==+ae.bearing&&(vt=!0,ke.bearing=+ae.bearing),"pitch"in ae&&ke.pitch!==+ae.pitch&&(Mt=!0,ke.pitch=+ae.pitch),ae.padding!=null&&!ke.isPaddingEqual(ae.padding)&&(ke.padding=ae.padding),this.fire(new a.Event("movestart",be)).fire(new a.Event("move",be)),je&&this.fire(new a.Event("zoomstart",be)).fire(new a.Event("zoom",be)).fire(new a.Event("zoomend",be)),vt&&this.fire(new a.Event("rotatestart",be)).fire(new a.Event("rotate",be)).fire(new a.Event("rotateend",be)),Mt&&this.fire(new a.Event("pitchstart",be)).fire(new a.Event("pitch",be)).fire(new a.Event("pitchend",be)),this.fire(new a.Event("moveend",be))},J.prototype.easeTo=function(ae,be){var ke=this;this._stop(!1,ae.easeId),ae=a.extend({offset:[0,0],duration:500,easing:a.ease},ae),(ae.animate===!1||!ae.essential&&a.browser.prefersReducedMotion)&&(ae.duration=0);var je=this.transform,vt=this.getZoom(),Mt=this.getBearing(),Gt=this.getPitch(),er=this.getPadding(),vr="zoom"in ae?+ae.zoom:vt,br="bearing"in ae?this._normalizeBearing(ae.bearing,Mt):Mt,Fr="pitch"in ae?+ae.pitch:Gt,Gr="padding"in ae?ae.padding:je.padding,Wr=a.Point.convert(ae.offset),Vr=je.centerPoint.add(Wr),Qr=je.pointLocation(Vr),ln=a.LngLat.convert(ae.center||Qr);this._normalizeCenter(ln);var Cn=je.project(Qr),On=je.project(ln).sub(Cn),Xn=je.zoomScale(vr-vt),jn,Zn;ae.around&&(jn=a.LngLat.convert(ae.around),Zn=je.locationPoint(jn));var ra={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||vr!==vt,this._rotating=this._rotating||Mt!==br,this._pitching=this._pitching||Fr!==Gt,this._padding=!je.isPaddingEqual(Gr),this._easeId=ae.easeId,this._prepareEase(be,ae.noMoveStart,ra),clearTimeout(this._easeEndTimeoutID),this._ease(function(ca){if(ke._zooming&&(je.zoom=a.number(vt,vr,ca)),ke._rotating&&(je.bearing=a.number(Mt,br,ca)),ke._pitching&&(je.pitch=a.number(Gt,Fr,ca)),ke._padding&&(je.interpolatePadding(er,Gr,ca),Vr=je.centerPoint.add(Wr)),jn)je.setLocationAtPoint(jn,Zn);else{var fa=je.zoomScale(je.zoom-vt),ya=vr>vt?Math.min(2,Xn):Math.max(.5,Xn),Ta=Math.pow(ya,1-ca),ka=je.unproject(Cn.add(On.mult(ca*Ta)).mult(fa));je.setLocationAtPoint(je.renderWorldCopies?ka.wrap():ka,Vr)}ke._fireMoveEvents(be)},function(ca){ke._afterEase(be,ca)},ae),this},J.prototype._prepareEase=function(ae,be,ke){ke===void 0&&(ke={}),this._moving=!0,!be&&!ke.moving&&this.fire(new a.Event("movestart",ae)),this._zooming&&!ke.zooming&&this.fire(new a.Event("zoomstart",ae)),this._rotating&&!ke.rotating&&this.fire(new a.Event("rotatestart",ae)),this._pitching&&!ke.pitching&&this.fire(new a.Event("pitchstart",ae))},J.prototype._fireMoveEvents=function(ae){this.fire(new a.Event("move",ae)),this._zooming&&this.fire(new a.Event("zoom",ae)),this._rotating&&this.fire(new a.Event("rotate",ae)),this._pitching&&this.fire(new a.Event("pitch",ae))},J.prototype._afterEase=function(ae,be){if(!(this._easeId&&be&&this._easeId===be)){delete this._easeId;var ke=this._zooming,je=this._rotating,vt=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,ke&&this.fire(new a.Event("zoomend",ae)),je&&this.fire(new a.Event("rotateend",ae)),vt&&this.fire(new a.Event("pitchend",ae)),this.fire(new a.Event("moveend",ae))}},J.prototype.flyTo=function(ae,be){var ke=this;if(!ae.essential&&a.browser.prefersReducedMotion){var je=a.pick(ae,["center","zoom","bearing","pitch","around"]);return this.jumpTo(je,be)}this.stop(),ae=a.extend({offset:[0,0],speed:1.2,curve:1.42,easing:a.ease},ae);var vt=this.transform,Mt=this.getZoom(),Gt=this.getBearing(),er=this.getPitch(),vr=this.getPadding(),br="zoom"in ae?a.clamp(+ae.zoom,vt.minZoom,vt.maxZoom):Mt,Fr="bearing"in ae?this._normalizeBearing(ae.bearing,Gt):Gt,Gr="pitch"in ae?+ae.pitch:er,Wr="padding"in ae?ae.padding:vt.padding,Vr=vt.zoomScale(br-Mt),Qr=a.Point.convert(ae.offset),ln=vt.centerPoint.add(Qr),Cn=vt.pointLocation(ln),On=a.LngLat.convert(ae.center||Cn);this._normalizeCenter(On);var Xn=vt.project(Cn),jn=vt.project(On).sub(Xn),Zn=ae.curve,ra=Math.max(vt.width,vt.height),ca=ra/Vr,fa=jn.mag();if("minZoom"in ae){var ya=a.clamp(Math.min(ae.minZoom,Mt,br),vt.minZoom,vt.maxZoom),Ta=ra/vt.zoomScale(ya-Mt);Zn=Math.sqrt(Ta/fa*2)}var ka=Zn*Zn;function Ya(Xa){var ni=(ca*ca-ra*ra+(Xa?-1:1)*ka*ka*fa*fa)/(2*(Xa?ca:ra)*ka*fa);return Math.log(Math.sqrt(ni*ni+1)-ni)}function hi(Xa){return(Math.exp(Xa)-Math.exp(-Xa))/2}function Za(Xa){return(Math.exp(Xa)+Math.exp(-Xa))/2}function qa(Xa){return hi(Xa)/Za(Xa)}var Ra=Ya(0),vi=function(Xa){return Za(Ra)/Za(Ra+Zn*Xa)},yi=function(Xa){return ra*((Za(Ra)*qa(Ra+Zn*Xa)-hi(Ra))/ka)/fa},xi=(Ya(1)-Ra)/Zn;if(Math.abs(fa)<1e-6||!isFinite(xi)){if(Math.abs(ra-ca)<1e-6)return this.easeTo(ae,be);var ti=ca<ra?-1:1;xi=Math.abs(Math.log(ca/ra))/Zn,yi=function(){return 0},vi=function(Xa){return Math.exp(ti*Zn*Xa)}}if("duration"in ae)ae.duration=+ae.duration;else{var Pi="screenSpeed"in ae?+ae.screenSpeed/Zn:+ae.speed;ae.duration=1e3*xi/Pi}return ae.maxDuration&&ae.duration>ae.maxDuration&&(ae.duration=0),this._zooming=!0,this._rotating=Gt!==Fr,this._pitching=Gr!==er,this._padding=!vt.isPaddingEqual(Wr),this._prepareEase(be,!1),this._ease(function(Xa){var ni=Xa*xi,eo=1/vi(ni);vt.zoom=Xa===1?br:Mt+vt.scaleZoom(eo),ke._rotating&&(vt.bearing=a.number(Gt,Fr,Xa)),ke._pitching&&(vt.pitch=a.number(er,Gr,Xa)),ke._padding&&(vt.interpolatePadding(vr,Wr,Xa),ln=vt.centerPoint.add(Qr));var mo=Xa===1?On:vt.unproject(Xn.add(jn.mult(yi(ni))).mult(eo));vt.setLocationAtPoint(vt.renderWorldCopies?mo.wrap():mo,ln),ke._fireMoveEvents(be)},function(){return ke._afterEase(be)},ae),this},J.prototype.isEasing=function(){return!!this._easeFrameId},J.prototype.stop=function(){return this._stop()},J.prototype._stop=function(ae,be){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var ke=this._onEaseEnd;delete this._onEaseEnd,ke.call(this,be)}if(!ae){var je=this.handlers;je&&je.stop()}return this},J.prototype._ease=function(ae,be,ke){ke.animate===!1||ke.duration===0?(ae(1),be()):(this._easeStart=a.browser.now(),this._easeOptions=ke,this._onEaseFrame=ae,this._onEaseEnd=be,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},J.prototype._renderFrameCallback=function(){var ae=Math.min((a.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(ae)),ae<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},J.prototype._normalizeBearing=function(ae,be){ae=a.wrap(ae,-180,180);var ke=Math.abs(ae-be);return Math.abs(ae-360-be)<ke&&(ae-=360),Math.abs(ae+360-be)<ke&&(ae+=360),ae},J.prototype._normalizeCenter=function(ae){var be=this.transform;if(!(!be.renderWorldCopies||be.lngRange)){var ke=ae.lng-be.center.lng;ae.lng+=ke>180?-360:ke<-180?360:0}},J}(a.Evented),us=function(J){J===void 0&&(J={}),this.options=J,a.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};us.prototype.getDefaultPosition=function(){return"bottom-right"},us.prototype.onAdd=function(J){var me=this.options&&this.options.compact;return this._map=J,this._container=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=x.create("div","mapboxgl-ctrl-attrib-inner",this._container),me&&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),me===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},us.prototype.onRemove=function(){x.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},us.prototype._updateEditLink=function(){var J=this._editLink;J||(J=this._editLink=this._container.querySelector(".mapbox-improve-map"));var me=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||a.config.ACCESS_TOKEN}];if(J){var ae=me.reduce(function(be,ke,je){return ke.value&&(be+=ke.key+"="+ke.value+(je<me.length-1?"&":"")),be},"?");J.href=a.config.FEEDBACK_URL+"/"+ae+(this._map._hash?this._map._hash.getHashString(!0):""),J.rel="noopener nofollow"}},us.prototype._updateData=function(J){J&&(J.sourceDataType==="metadata"||J.dataType==="style")&&(this._updateAttributions(),this._updateEditLink())},us.prototype._updateAttributions=function(){if(this._map.style){var J=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?J=J.concat(this.options.customAttribution.map(function(Mt){return typeof Mt!="string"?"":Mt})):typeof this.options.customAttribution=="string"&&J.push(this.options.customAttribution)),this._map.style.stylesheet){var me=this._map.style.stylesheet;this.styleOwner=me.owner,this.styleId=me.id}var ae=this._map.style.sourceCaches;for(var be in ae){var ke=ae[be];if(ke.used){var je=ke.getSource();je.attribution&&J.indexOf(je.attribution)<0&&J.push(je.attribution)}}J.sort(function(Mt,Gt){return Mt.length-Gt.length}),J=J.filter(function(Mt,Gt){for(var er=Gt+1;er<J.length;er++)if(J[er].indexOf(Mt)>=0)return!1;return!0});var vt=J.join(" | ");vt!==this._attribHTML&&(this._attribHTML=vt,J.length?(this._innerContainer.innerHTML=vt,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},us.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var Qa=function(){a.bindAll(["_updateLogo"],this),a.bindAll(["_updateCompact"],this)};Qa.prototype.onAdd=function(J){this._map=J,this._container=x.create("div","mapboxgl-ctrl");var me=x.create("a","mapboxgl-ctrl-logo");return me.target="_blank",me.rel="noopener nofollow",me.href="https://www.mapbox.com/",me.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),me.setAttribute("rel","noopener nofollow"),this._container.appendChild(me),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Qa.prototype.onRemove=function(){x.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Qa.prototype.getDefaultPosition=function(){return"bottom-left"},Qa.prototype._updateLogo=function(J){(!J||J.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},Qa.prototype._logoRequired=function(){if(this._map.style){var J=this._map.style.sourceCaches;for(var me in J){var ae=J[me].getSource();if(ae.mapbox_logo)return!0}return!1}},Qa.prototype._updateCompact=function(){var J=this._container.children;if(J.length){var me=J[0];this._map.getCanvasContainer().offsetWidth<250?me.classList.add("mapboxgl-compact"):me.classList.remove("mapboxgl-compact")}};var Li=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Li.prototype.add=function(J){var me=++this._id,ae=this._queue;return ae.push({callback:J,id:me,cancelled:!1}),me},Li.prototype.remove=function(J){for(var me=this._currentlyRunning,ae=me?this._queue.concat(me):this._queue,be=0,ke=ae;be<ke.length;be+=1){var je=ke[be];if(je.id===J){je.cancelled=!0;return}}},Li.prototype.run=function(J){J===void 0&&(J=0);var me=this._currentlyRunning=this._queue;this._queue=[];for(var ae=0,be=me;ae<be.length;ae+=1){var ke=be[ae];if(!ke.cancelled&&(ke.callback(J),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},Li.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var yh={"FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm"},Pc=a.window.HTMLImageElement,Ev=a.window.HTMLElement,Wf=a.window.ImageBitmap,mh=-2,fd=22,As=0,Yf=60,C0={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:mh,maxZoom:fd,minPitch:As,maxPitch:Yf,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},L0=function(ge){function J(ae){var be=this;if(ae=a.extend({},C0,ae),ae.minZoom!=null&&ae.maxZoom!=null&&ae.minZoom>ae.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(ae.minPitch!=null&&ae.maxPitch!=null&&ae.minPitch>ae.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(ae.minPitch!=null&&ae.minPitch<As)throw new Error("minPitch must be greater than or equal to "+As);if(ae.maxPitch!=null&&ae.maxPitch>Yf)throw new Error("maxPitch must be less than or equal to "+Yf);var ke=new bn(ae.minZoom,ae.maxZoom,ae.minPitch,ae.maxPitch,ae.renderWorldCopies);if(ge.call(this,ke,ae),this._interactive=ae.interactive,this._maxTileCacheSize=ae.maxTileCacheSize,this._failIfMajorPerformanceCaveat=ae.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=ae.preserveDrawingBuffer,this._antialias=ae.antialias,this._trackResize=ae.trackResize,this._bearingSnap=ae.bearingSnap,this._refreshExpiredTiles=ae.refreshExpiredTiles,this._fadeDuration=ae.fadeDuration,this._crossSourceCollisions=ae.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=ae.collectResourceTiming,this._renderTaskQueue=new Li,this._controls=[],this._mapId=a.uniqueId(),this._locale=a.extend({},yh,ae.locale),this._requestManager=new a.RequestManager(ae.transformRequest,ae.accessToken),typeof ae.container=="string"){if(this._container=a.window.document.getElementById(ae.container),!this._container)throw new Error("Container '"+ae.container+"' not found.")}else if(ae.container instanceof Ev)this._container=ae.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(ae.maxBounds&&this.setMaxBounds(ae.maxBounds),a.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return be._update(!1)}),this.on("moveend",function(){return be._update(!1)}),this.on("zoom",function(){return be._update(!0)}),typeof a.window<"u"&&(a.window.addEventListener("online",this._onWindowOnline,!1),a.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new Ai(this,ae);var je=typeof ae.hash=="string"&&ae.hash||void 0;this._hash=ae.hash&&new _a(je).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:ae.center,zoom:ae.zoom,bearing:ae.bearing,pitch:ae.pitch}),ae.bounds&&(this.resize(),this.fitBounds(ae.bounds,a.extend({},ae.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=ae.localIdeographFontFamily,ae.style&&this.setStyle(ae.style,{localIdeographFontFamily:ae.localIdeographFontFamily}),ae.attributionControl&&this.addControl(new us({customAttribution:ae.customAttribution})),this.addControl(new Qa,ae.logoPosition),this.on("style.load",function(){be.transform.unmodified&&be.jumpTo(be.style.stylesheet)}),this.on("data",function(vt){be._update(vt.dataType==="style"),be.fire(new a.Event(vt.dataType+"data",vt))}),this.on("dataloading",function(vt){be.fire(new a.Event(vt.dataType+"dataloading",vt))})}ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J;var me={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return J.prototype._getMapId=function(){return this._mapId},J.prototype.addControl=function(be,ke){if(ke===void 0&&be.getDefaultPosition&&(ke=be.getDefaultPosition()),ke===void 0&&(ke="top-right"),!be||!be.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 je=be.onAdd(this);this._controls.push(be);var vt=this._controlPositions[ke];return ke.indexOf("bottom")!==-1?vt.insertBefore(je,vt.firstChild):vt.appendChild(je),this},J.prototype.removeControl=function(be){if(!be||!be.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 ke=this._controls.indexOf(be);return ke>-1&&this._controls.splice(ke,1),be.onRemove(this),this},J.prototype.resize=function(be){var ke=this._containerDimensions(),je=ke[0],vt=ke[1];this._resizeCanvas(je,vt),this.transform.resize(je,vt),this.painter.resize(je,vt);var Mt=!this._moving;return Mt&&(this.stop(),this.fire(new a.Event("movestart",be)).fire(new a.Event("move",be))),this.fire(new a.Event("resize",be)),Mt&&this.fire(new a.Event("moveend",be)),this},J.prototype.getBounds=function(){return this.transform.getBounds()},J.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},J.prototype.setMaxBounds=function(be){return this.transform.setMaxBounds(a.LngLatBounds.convert(be)),this._update()},J.prototype.setMinZoom=function(be){if(be=be??mh,be>=mh&&be<=this.transform.maxZoom)return this.transform.minZoom=be,this._update(),this.getZoom()<be&&this.setZoom(be),this;throw new Error("minZoom must be between "+mh+" and the current maxZoom, inclusive")},J.prototype.getMinZoom=function(){return this.transform.minZoom},J.prototype.setMaxZoom=function(be){if(be=be??fd,be>=this.transform.minZoom)return this.transform.maxZoom=be,this._update(),this.getZoom()>be&&this.setZoom(be),this;throw new Error("maxZoom must be greater than the current minZoom")},J.prototype.getMaxZoom=function(){return this.transform.maxZoom},J.prototype.setMinPitch=function(be){if(be=be??As,be<As)throw new Error("minPitch must be greater than or equal to "+As);if(be>=As&&be<=this.transform.maxPitch)return this.transform.minPitch=be,this._update(),this.getPitch()<be&&this.setPitch(be),this;throw new Error("minPitch must be between "+As+" and the current maxPitch, inclusive")},J.prototype.getMinPitch=function(){return this.transform.minPitch},J.prototype.setMaxPitch=function(be){if(be=be??Yf,be>Yf)throw new Error("maxPitch must be less than or equal to "+Yf);if(be>=this.transform.minPitch)return this.transform.maxPitch=be,this._update(),this.getPitch()>be&&this.setPitch(be),this;throw new Error("maxPitch must be greater than the current minPitch")},J.prototype.getMaxPitch=function(){return this.transform.maxPitch},J.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},J.prototype.setRenderWorldCopies=function(be){return this.transform.renderWorldCopies=be,this._update()},J.prototype.project=function(be){return this.transform.locationPoint(a.LngLat.convert(be))},J.prototype.unproject=function(be){return this.transform.pointLocation(a.Point.convert(be))},J.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},J.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},J.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},J.prototype._createDelegatedListener=function(be,ke,je){var vt=this,Mt;if(be==="mouseenter"||be==="mouseover"){var Gt=!1,er=function(Vr){var Qr=vt.getLayer(ke)?vt.queryRenderedFeatures(Vr.point,{layers:[ke]}):[];Qr.length?Gt||(Gt=!0,je.call(vt,new He(be,vt,Vr.originalEvent,{features:Qr}))):Gt=!1},vr=function(){Gt=!1};return{layer:ke,listener:je,delegates:{mousemove:er,mouseout:vr}}}else if(be==="mouseleave"||be==="mouseout"){var br=!1,Fr=function(Vr){var Qr=vt.getLayer(ke)?vt.queryRenderedFeatures(Vr.point,{layers:[ke]}):[];Qr.length?br=!0:br&&(br=!1,je.call(vt,new He(be,vt,Vr.originalEvent)))},Gr=function(Vr){br&&(br=!1,je.call(vt,new He(be,vt,Vr.originalEvent)))};return{layer:ke,listener:je,delegates:{mousemove:Fr,mouseout:Gr}}}else{var Wr=function(Vr){var Qr=vt.getLayer(ke)?vt.queryRenderedFeatures(Vr.point,{layers:[ke]}):[];Qr.length&&(Vr.features=Qr,je.call(vt,Vr),delete Vr.features)};return{layer:ke,listener:je,delegates:(Mt={},Mt[be]=Wr,Mt)}}},J.prototype.on=function(be,ke,je){if(je===void 0)return ge.prototype.on.call(this,be,ke);var vt=this._createDelegatedListener(be,ke,je);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[be]=this._delegatedListeners[be]||[],this._delegatedListeners[be].push(vt);for(var Mt in vt.delegates)this.on(Mt,vt.delegates[Mt]);return this},J.prototype.once=function(be,ke,je){if(je===void 0)return ge.prototype.once.call(this,be,ke);var vt=this._createDelegatedListener(be,ke,je);for(var Mt in vt.delegates)this.once(Mt,vt.delegates[Mt]);return this},J.prototype.off=function(be,ke,je){var vt=this;if(je===void 0)return ge.prototype.off.call(this,be,ke);var Mt=function(Gt){for(var er=Gt[be],vr=0;vr<er.length;vr++){var br=er[vr];if(br.layer===ke&&br.listener===je){for(var Fr in br.delegates)vt.off(Fr,br.delegates[Fr]);return er.splice(vr,1),vt}}};return this._delegatedListeners&&this._delegatedListeners[be]&&Mt(this._delegatedListeners),this},J.prototype.queryRenderedFeatures=function(be,ke){if(!this.style)return[];ke===void 0&&be!==void 0&&!(be instanceof a.Point)&&!Array.isArray(be)&&(ke=be,be=void 0),ke=ke||{},be=be||[[0,0],[this.transform.width,this.transform.height]];var je;if(be instanceof a.Point||typeof be[0]=="number")je=[a.Point.convert(be)];else{var vt=a.Point.convert(be[0]),Mt=a.Point.convert(be[1]);je=[vt,new a.Point(Mt.x,vt.y),Mt,new a.Point(vt.x,Mt.y),vt]}return this.style.queryRenderedFeatures(je,ke,this.transform)},J.prototype.querySourceFeatures=function(be,ke){return this.style.querySourceFeatures(be,ke)},J.prototype.setStyle=function(be,ke){return ke=a.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},ke),ke.diff!==!1&&ke.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&be?(this._diffStyle(be,ke),this):(this._localIdeographFontFamily=ke.localIdeographFontFamily,this._updateStyle(be,ke))},J.prototype._getUIString=function(be){var ke=this._locale[be];if(ke==null)throw new Error("Missing UI string '"+be+"'");return ke},J.prototype._updateStyle=function(be,ke){if(this.style&&(this.style.setEventedParent(null),this.style._remove()),be)this.style=new Fo(this,ke||{});else return delete this.style,this;return this.style.setEventedParent(this,{style:this.style}),typeof be=="string"?this.style.loadURL(be):this.style.loadJSON(be),this},J.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new Fo(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},J.prototype._diffStyle=function(be,ke){var je=this;if(typeof be=="string"){var vt=this._requestManager.normalizeStyleURL(be),Mt=this._requestManager.transformRequest(vt,a.ResourceType.Style);a.getJSON(Mt,function(Gt,er){Gt?je.fire(new a.ErrorEvent(Gt)):er&&je._updateDiff(er,ke)})}else typeof be=="object"&&this._updateDiff(be,ke)},J.prototype._updateDiff=function(be,ke){try{this.style.setState(be)&&this._update(!0)}catch(je){a.warnOnce("Unable to perform style diff: "+(je.message||je.error||je)+". Rebuilding the style from scratch."),this._updateStyle(be,ke)}},J.prototype.getStyle=function(){if(this.style)return this.style.serialize()},J.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():a.warnOnce("There is no style added to the map.")},J.prototype.addSource=function(be,ke){return this._lazyInitEmptyStyle(),this.style.addSource(be,ke),this._update(!0)},J.prototype.isSourceLoaded=function(be){var ke=this.style&&this.style.sourceCaches[be];if(ke===void 0){this.fire(new a.ErrorEvent(new Error("There is no source with ID '"+be+"'")));return}return ke.loaded()},J.prototype.areTilesLoaded=function(){var be=this.style&&this.style.sourceCaches;for(var ke in be){var je=be[ke],vt=je._tiles;for(var Mt in vt){var Gt=vt[Mt];if(!(Gt.state==="loaded"||Gt.state==="errored"))return!1}}return!0},J.prototype.addSourceType=function(be,ke,je){return this._lazyInitEmptyStyle(),this.style.addSourceType(be,ke,je)},J.prototype.removeSource=function(be){return this.style.removeSource(be),this._update(!0)},J.prototype.getSource=function(be){return this.style.getSource(be)},J.prototype.addImage=function(be,ke,je){je===void 0&&(je={});var vt=je.pixelRatio;vt===void 0&&(vt=1);var Mt=je.sdf;Mt===void 0&&(Mt=!1);var Gt=je.stretchX,er=je.stretchY,vr=je.content;this._lazyInitEmptyStyle();var br=0;if(ke instanceof Pc||Wf&&ke instanceof Wf){var Fr=a.browser.getImageData(ke),Gr=Fr.width,Wr=Fr.height,Vr=Fr.data;this.style.addImage(be,{data:new a.RGBAImage({width:Gr,height:Wr},Vr),pixelRatio:vt,stretchX:Gt,stretchY:er,content:vr,sdf:Mt,version:br})}else{if(ke.width===void 0||ke.height===void 0)return this.fire(new a.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var Qr=ke.width,ln=ke.height,Cn=ke.data,On=ke;this.style.addImage(be,{data:new a.RGBAImage({width:Qr,height:ln},new Uint8Array(Cn)),pixelRatio:vt,stretchX:Gt,stretchY:er,content:vr,sdf:Mt,version:br,userImage:On}),On.onAdd&&On.onAdd(this,be)}},J.prototype.updateImage=function(be,ke){var je=this.style.getImage(be);if(!je)return this.fire(new a.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var vt=ke instanceof Pc||Wf&&ke instanceof Wf?a.browser.getImageData(ke):ke,Mt=vt.width,Gt=vt.height,er=vt.data;if(Mt===void 0||Gt===void 0)return this.fire(new a.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(Mt!==je.data.width||Gt!==je.data.height)return this.fire(new a.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));var vr=!(ke instanceof Pc||Wf&&ke instanceof Wf);je.data.replace(er,vr),this.style.updateImage(be,je)},J.prototype.hasImage=function(be){return be?!!this.style.getImage(be):(this.fire(new a.ErrorEvent(new Error("Missing required image id"))),!1)},J.prototype.removeImage=function(be){this.style.removeImage(be)},J.prototype.loadImage=function(be,ke){a.getImage(this._requestManager.transformRequest(be,a.ResourceType.Image),ke)},J.prototype.listImages=function(){return this.style.listImages()},J.prototype.addLayer=function(be,ke){return this._lazyInitEmptyStyle(),this.style.addLayer(be,ke),this._update(!0)},J.prototype.moveLayer=function(be,ke){return this.style.moveLayer(be,ke),this._update(!0)},J.prototype.removeLayer=function(be){return this.style.removeLayer(be),this._update(!0)},J.prototype.getLayer=function(be){return this.style.getLayer(be)},J.prototype.setLayerZoomRange=function(be,ke,je){return this.style.setLayerZoomRange(be,ke,je),this._update(!0)},J.prototype.setFilter=function(be,ke,je){return je===void 0&&(je={}),this.style.setFilter(be,ke,je),this._update(!0)},J.prototype.getFilter=function(be){return this.style.getFilter(be)},J.prototype.setPaintProperty=function(be,ke,je,vt){return vt===void 0&&(vt={}),this.style.setPaintProperty(be,ke,je,vt),this._update(!0)},J.prototype.getPaintProperty=function(be,ke){return this.style.getPaintProperty(be,ke)},J.prototype.setLayoutProperty=function(be,ke,je,vt){return vt===void 0&&(vt={}),this.style.setLayoutProperty(be,ke,je,vt),this._update(!0)},J.prototype.getLayoutProperty=function(be,ke){return this.style.getLayoutProperty(be,ke)},J.prototype.setLight=function(be,ke){return ke===void 0&&(ke={}),this._lazyInitEmptyStyle(),this.style.setLight(be,ke),this._update(!0)},J.prototype.getLight=function(){return this.style.getLight()},J.prototype.setFeatureState=function(be,ke){return this.style.setFeatureState(be,ke),this._update()},J.prototype.removeFeatureState=function(be,ke){return this.style.removeFeatureState(be,ke),this._update()},J.prototype.getFeatureState=function(be){return this.style.getFeatureState(be)},J.prototype.getContainer=function(){return this._container},J.prototype.getCanvasContainer=function(){return this._canvasContainer},J.prototype.getCanvas=function(){return this._canvas},J.prototype._containerDimensions=function(){var be=0,ke=0;return this._container&&(be=this._container.clientWidth||400,ke=this._container.clientHeight||300),[be,ke]},J.prototype._detectMissingCSS=function(){var be=a.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color");be!=="rgb(250, 128, 114)"&&a.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")},J.prototype._setupContainer=function(){var be=this._container;be.classList.add("mapboxgl-map");var ke=this._missingCSSCanary=x.create("div","mapboxgl-canary",be);ke.style.visibility="hidden",this._detectMissingCSS();var je=this._canvasContainer=x.create("div","mapboxgl-canvas-container",be);this._interactive&&je.classList.add("mapboxgl-interactive"),this._canvas=x.create("canvas","mapboxgl-canvas",je),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map");var vt=this._containerDimensions();this._resizeCanvas(vt[0],vt[1]);var Mt=this._controlContainer=x.create("div","mapboxgl-control-container",be),Gt=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(er){Gt[er]=x.create("div","mapboxgl-ctrl-"+er,Mt)})},J.prototype._resizeCanvas=function(be,ke){var je=a.browser.devicePixelRatio||1;this._canvas.width=je*be,this._canvas.height=je*ke,this._canvas.style.width=be+"px",this._canvas.style.height=ke+"px"},J.prototype._setupPainter=function(){var be=a.extend({},_.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),ke=this._canvas.getContext("webgl",be)||this._canvas.getContext("experimental-webgl",be);if(!ke){this.fire(new a.ErrorEvent(new Error("Failed to initialize WebGL")));return}this.painter=new _r(ke,this.transform),a.webpSupported.testSupport(ke)},J.prototype._contextLost=function(be){be.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new a.Event("webglcontextlost",{originalEvent:be}))},J.prototype._contextRestored=function(be){this._setupPainter(),this.resize(),this._update(),this.fire(new a.Event("webglcontextrestored",{originalEvent:be}))},J.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},J.prototype._update=function(be){return this.style?(this._styleDirty=this._styleDirty||be,this._sourcesDirty=!0,this.triggerRepaint(),this):this},J.prototype._requestRenderFrame=function(be){return this._update(),this._renderTaskQueue.add(be)},J.prototype._cancelRenderFrame=function(be){this._renderTaskQueue.remove(be)},J.prototype._render=function(be){var ke=this,je,vt=0,Mt=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(je=Mt.createQueryEXT(),Mt.beginQueryEXT(Mt.TIME_ELAPSED_EXT,je),vt=a.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(be),!this._removed){var Gt=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var er=this.transform.zoom,vr=a.browser.now();this.style.zoomHistory.update(er,vr);var br=new a.EvaluationParameters(er,{now:vr,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Fr=br.crossFadingFactor();(Fr!==1||Fr!==this._crossFadingFactor)&&(Gt=!0,this._crossFadingFactor=Fr),this.style.update(br)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new a.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new a.Event("load"))),this.style&&(this.style.hasTransitions()||Gt)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var Gr=a.browser.now()-vt;Mt.endQueryEXT(Mt.TIME_ELAPSED_EXT,je),setTimeout(function(){var Qr=Mt.getQueryObjectEXT(je,Mt.QUERY_RESULT_EXT)/1e6;Mt.deleteQueryEXT(je),ke.fire(new a.Event("gpu-timing-frame",{cpuTime:Gr,gpuTime:Qr}))},50)}if(this.listens("gpu-timing-layer")){var Wr=this.painter.collectGpuTimers();setTimeout(function(){var Qr=ke.painter.queryGpuTimers(Wr);ke.fire(new a.Event("gpu-timing-layer",{layerTimes:Qr}))},50)}var Vr=this._sourcesDirty||this._styleDirty||this._placementDirty;return Vr||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&(this._fullyLoaded||(this._fullyLoaded=!0),this.fire(new a.Event("idle"))),this}},J.prototype.remove=function(){this._hash&&this._hash.remove();for(var be=0,ke=this._controls;be<ke.length;be+=1){var je=ke[be];je.onRemove(this)}this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof a.window<"u"&&(a.window.removeEventListener("resize",this._onWindowResize,!1),a.window.removeEventListener("online",this._onWindowOnline,!1));var vt=this.painter.context.gl.getExtension("WEBGL_lose_context");vt&&vt.loseContext(),Mv(this._canvasContainer),Mv(this._controlContainer),Mv(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new a.Event("remove"))},J.prototype.triggerRepaint=function(){var be=this;this.style&&!this._frame&&(this._frame=a.browser.frame(function(ke){be._frame=null,be._render(ke)}))},J.prototype._onWindowOnline=function(){this._update()},J.prototype._onWindowResize=function(be){this._trackResize&&this.resize({originalEvent:be})._update()},me.showTileBoundaries.get=function(){return!!this._showTileBoundaries},me.showTileBoundaries.set=function(ae){this._showTileBoundaries!==ae&&(this._showTileBoundaries=ae,this._update())},me.showPadding.get=function(){return!!this._showPadding},me.showPadding.set=function(ae){this._showPadding!==ae&&(this._showPadding=ae,this._update())},me.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},me.showCollisionBoxes.set=function(ae){this._showCollisionBoxes!==ae&&(this._showCollisionBoxes=ae,ae?this.style._generateCollisionBoxes():this._update())},me.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},me.showOverdrawInspector.set=function(ae){this._showOverdrawInspector!==ae&&(this._showOverdrawInspector=ae,this._update())},me.repaint.get=function(){return!!this._repaint},me.repaint.set=function(ae){this._repaint!==ae&&(this._repaint=ae,this.triggerRepaint())},me.vertices.get=function(){return!!this._vertices},me.vertices.set=function(ae){this._vertices=ae,this._update()},J.prototype._setCacheLimits=function(be,ke){a.setCacheLimits(be,ke)},me.version.get=function(){return a.version},Object.defineProperties(J.prototype,me),J}(Ws);function Mv(ge){ge.parentNode&&ge.parentNode.removeChild(ge)}var cd={showCompass:!0,showZoom:!0,visualizePitch:!1},uf=function(J){var me=this;this.options=a.extend({},cd,J),this._container=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(ae){return ae.preventDefault()}),this.options.showZoom&&(a.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",function(ae){return me._map.zoomIn({},{originalEvent:ae})}),x.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",function(ae){return me._map.zoomOut({},{originalEvent:ae})}),x.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(a.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",function(ae){me.options.visualizePitch?me._map.resetNorthPitch({},{originalEvent:ae}):me._map.resetNorth({},{originalEvent:ae})}),this._compassIcon=x.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};uf.prototype._updateZoomButtons=function(){var J=this._map.getZoom();this._zoomInButton.disabled=J===this._map.getMaxZoom(),this._zoomOutButton.disabled=J===this._map.getMinZoom()},uf.prototype._rotateCompassArrow=function(){var J=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassIcon.style.transform=J},uf.prototype.onAdd=function(J){return this._map=J,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Ys(this._map,this._compass,this.options.visualizePitch)),this._container},uf.prototype.onRemove=function(){x.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map},uf.prototype._createButton=function(J,me){var ae=x.create("button",J,this._container);return ae.type="button",ae.addEventListener("click",me),ae},uf.prototype._setButtonTitle=function(J,me){var ae=this._map._getUIString("NavigationControl."+me);J.title=ae,J.setAttribute("aria-label",ae)};var Ys=function(J,me,ae){ae===void 0&&(ae=!1),this._clickTolerance=10,this.element=me,this.mouseRotate=new Zr({clickTolerance:J.dragRotate._mouseRotate._clickTolerance}),this.map=J,ae&&(this.mousePitch=new Nn({clickTolerance:J.dragRotate._mousePitch._clickTolerance})),a.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),x.addEventListener(me,"mousedown",this.mousedown),x.addEventListener(me,"touchstart",this.touchstart,{passive:!1}),x.addEventListener(me,"touchmove",this.touchmove),x.addEventListener(me,"touchend",this.touchend),x.addEventListener(me,"touchcancel",this.reset)};Ys.prototype.down=function(J,me){this.mouseRotate.mousedown(J,me),this.mousePitch&&this.mousePitch.mousedown(J,me),x.disableDrag()},Ys.prototype.move=function(J,me){var ae=this.map,be=this.mouseRotate.mousemoveWindow(J,me);if(be&&be.bearingDelta&&ae.setBearing(ae.getBearing()+be.bearingDelta),this.mousePitch){var ke=this.mousePitch.mousemoveWindow(J,me);ke&&ke.pitchDelta&&ae.setPitch(ae.getPitch()+ke.pitchDelta)}},Ys.prototype.off=function(){var J=this.element;x.removeEventListener(J,"mousedown",this.mousedown),x.removeEventListener(J,"touchstart",this.touchstart,{passive:!1}),x.removeEventListener(J,"touchmove",this.touchmove),x.removeEventListener(J,"touchend",this.touchend),x.removeEventListener(J,"touchcancel",this.reset),this.offTemp()},Ys.prototype.offTemp=function(){x.enableDrag(),x.removeEventListener(a.window,"mousemove",this.mousemove),x.removeEventListener(a.window,"mouseup",this.mouseup)},Ys.prototype.mousedown=function(J){this.down(a.extend({},J,{ctrlKey:!0,preventDefault:function(){return J.preventDefault()}}),x.mousePos(this.element,J)),x.addEventListener(a.window,"mousemove",this.mousemove),x.addEventListener(a.window,"mouseup",this.mouseup)},Ys.prototype.mousemove=function(J){this.move(J,x.mousePos(this.element,J))},Ys.prototype.mouseup=function(J){this.mouseRotate.mouseupWindow(J),this.mousePitch&&this.mousePitch.mouseupWindow(J),this.offTemp()},Ys.prototype.touchstart=function(J){J.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=x.touchPos(this.element,J.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return J.preventDefault()}},this._startPos))},Ys.prototype.touchmove=function(J){J.targetTouches.length!==1?this.reset():(this._lastPos=x.touchPos(this.element,J.targetTouches)[0],this.move({preventDefault:function(){return J.preventDefault()}},this._lastPos))},Ys.prototype.touchend=function(J){J.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},Ys.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};function ff(ge,J,me){if(ge=new a.LngLat(ge.lng,ge.lat),J){var ae=new a.LngLat(ge.lng-360,ge.lat),be=new a.LngLat(ge.lng+360,ge.lat),ke=me.locationPoint(ge).distSqr(J);me.locationPoint(ae).distSqr(J)<ke?ge=ae:me.locationPoint(be).distSqr(J)<ke&&(ge=be)}for(;Math.abs(ge.lng-me.center.lng)>180;){var je=me.locationPoint(ge);if(je.x>=0&&je.y>=0&&je.x<=me.width&&je.y<=me.height)break;ge.lng>me.center.lng?ge.lng-=360:ge.lng+=360}return ge}var Cv={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 hd(ge,J,me){var ae=ge.classList;for(var be in Cv)ae.remove("mapboxgl-"+me+"-anchor-"+be);ae.add("mapboxgl-"+me+"-anchor-"+J)}var xh=function(ge){function J(me,ae){var be=this;if(ge.call(this),(me instanceof a.window.HTMLElement||ae)&&(me=a.extend({element:me},ae)),a.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=me&&me.anchor||"center",this._color=me&&me.color||"#3FB1CE",this._draggable=me&&me.draggable||!1,this._state="inactive",this._rotation=me&&me.rotation||0,this._rotationAlignment=me&&me.rotationAlignment||"auto",this._pitchAlignment=me&&me.pitchAlignment&&me.pitchAlignment!=="auto"?me.pitchAlignment:this._rotationAlignment,!me||!me.element){this._defaultMarker=!0,this._element=x.create("div"),this._element.setAttribute("aria-label","Map marker");var ke=x.createNS("http://www.w3.org/2000/svg","svg");ke.setAttributeNS(null,"display","block"),ke.setAttributeNS(null,"height","41px"),ke.setAttributeNS(null,"width","27px"),ke.setAttributeNS(null,"viewBox","0 0 27 41");var je=x.createNS("http://www.w3.org/2000/svg","g");je.setAttributeNS(null,"stroke","none"),je.setAttributeNS(null,"stroke-width","1"),je.setAttributeNS(null,"fill","none"),je.setAttributeNS(null,"fill-rule","evenodd");var vt=x.createNS("http://www.w3.org/2000/svg","g");vt.setAttributeNS(null,"fill-rule","nonzero");var Mt=x.createNS("http://www.w3.org/2000/svg","g");Mt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Mt.setAttributeNS(null,"fill","#000000");for(var Gt=[{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"}],er=0,vr=Gt;er<vr.length;er+=1){var br=vr[er],Fr=x.createNS("http://www.w3.org/2000/svg","ellipse");Fr.setAttributeNS(null,"opacity","0.04"),Fr.setAttributeNS(null,"cx","10.5"),Fr.setAttributeNS(null,"cy","5.80029008"),Fr.setAttributeNS(null,"rx",br.rx),Fr.setAttributeNS(null,"ry",br.ry),Mt.appendChild(Fr)}var Gr=x.createNS("http://www.w3.org/2000/svg","g");Gr.setAttributeNS(null,"fill",this._color);var Wr=x.createNS("http://www.w3.org/2000/svg","path");Wr.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),Gr.appendChild(Wr);var Vr=x.createNS("http://www.w3.org/2000/svg","g");Vr.setAttributeNS(null,"opacity","0.25"),Vr.setAttributeNS(null,"fill","#000000");var Qr=x.createNS("http://www.w3.org/2000/svg","path");Qr.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Vr.appendChild(Qr);var ln=x.createNS("http://www.w3.org/2000/svg","g");ln.setAttributeNS(null,"transform","translate(6.0, 7.0)"),ln.setAttributeNS(null,"fill","#FFFFFF");var Cn=x.createNS("http://www.w3.org/2000/svg","g");Cn.setAttributeNS(null,"transform","translate(8.0, 8.0)");var On=x.createNS("http://www.w3.org/2000/svg","circle");On.setAttributeNS(null,"fill","#000000"),On.setAttributeNS(null,"opacity","0.25"),On.setAttributeNS(null,"cx","5.5"),On.setAttributeNS(null,"cy","5.5"),On.setAttributeNS(null,"r","5.4999962");var Xn=x.createNS("http://www.w3.org/2000/svg","circle");Xn.setAttributeNS(null,"fill","#FFFFFF"),Xn.setAttributeNS(null,"cx","5.5"),Xn.setAttributeNS(null,"cy","5.5"),Xn.setAttributeNS(null,"r","5.4999962"),Cn.appendChild(On),Cn.appendChild(Xn),vt.appendChild(Mt),vt.appendChild(Gr),vt.appendChild(Vr),vt.appendChild(ln),vt.appendChild(Cn),ke.appendChild(vt),this._element.appendChild(ke),this._offset=a.Point.convert(me&&me.offset||[0,-14])}else this._element=me.element,this._offset=a.Point.convert(me&&me.offset||[0,0]);this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",function(jn){jn.preventDefault()}),this._element.addEventListener("mousedown",function(jn){jn.preventDefault()}),this._element.addEventListener("focus",function(){var jn=be._map.getContainer();jn.scrollTop=0,jn.scrollLeft=0}),hd(this._element,this._anchor,"marker"),this._popup=null}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.addTo=function(ae){return this.remove(),this._map=ae,ae.getCanvasContainer().appendChild(this._element),ae.on("move",this._update),ae.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},J.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),x.remove(this._element),this._popup&&this._popup.remove(),this},J.prototype.getLngLat=function(){return this._lngLat},J.prototype.setLngLat=function(ae){return this._lngLat=a.LngLat.convert(ae),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},J.prototype.getElement=function(){return this._element},J.prototype.setPopup=function(ae){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),ae){if(!("offset"in ae.options)){var be=38.1,ke=13.5,je=Math.sqrt(Math.pow(ke,2)/2);ae.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-be],"bottom-left":[je,(be-ke+je)*-1],"bottom-right":[-je,(be-ke+je)*-1],left:[ke,(be-ke)*-1],right:[-ke,(be-ke)*-1]}:this._offset}this._popup=ae,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this},J.prototype._onKeyPress=function(ae){var be=ae.code,ke=ae.charCode||ae.keyCode;(be==="Space"||be==="Enter"||ke===32||ke===13)&&this.togglePopup()},J.prototype._onMapClick=function(ae){var be=ae.originalEvent.target,ke=this._element;this._popup&&(be===ke||ke.contains(be))&&this.togglePopup()},J.prototype.getPopup=function(){return this._popup},J.prototype.togglePopup=function(){var ae=this._popup;if(ae)ae.isOpen()?ae.remove():ae.addTo(this._map);else return this;return this},J.prototype._update=function(ae){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=ff(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var be="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?be="rotateZ("+this._rotation+"deg)":this._rotationAlignment==="map"&&(be="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var ke="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?ke="rotateX(0deg)":this._pitchAlignment==="map"&&(ke="rotateX("+this._map.getPitch()+"deg)"),(!ae||ae.type==="moveend")&&(this._pos=this._pos.round()),x.setTransform(this._element,Cv[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+ke+" "+be)}},J.prototype.getOffset=function(){return this._offset},J.prototype.setOffset=function(ae){return this._offset=a.Point.convert(ae),this._update(),this},J.prototype._onMove=function(ae){this._pos=ae.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"))},J.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new a.Event("dragend")),this._state="inactive"},J.prototype._addDragHandler=function(ae){this._element.contains(ae.originalEvent.target)&&(ae.preventDefault(),this._positionDelta=ae.point.sub(this._pos).add(this._offset),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))},J.prototype.setDraggable=function(ae){return this._draggable=!!ae,this._map&&(ae?(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},J.prototype.isDraggable=function(){return this._draggable},J.prototype.setRotation=function(ae){return this._rotation=ae||0,this._update(),this},J.prototype.getRotation=function(){return this._rotation},J.prototype.setRotationAlignment=function(ae){return this._rotationAlignment=ae||"auto",this._update(),this},J.prototype.getRotationAlignment=function(){return this._rotationAlignment},J.prototype.setPitchAlignment=function(ae){return this._pitchAlignment=ae&&ae!=="auto"?ae:this._rotationAlignment,this._update(),this},J.prototype.getPitchAlignment=function(){return this._pitchAlignment},J}(a.Evented),P0={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Xf;function Lv(ge){Xf!==void 0?ge(Xf):a.window.navigator.permissions!==void 0?a.window.navigator.permissions.query({name:"geolocation"}).then(function(J){Xf=J.state!=="denied",ge(Xf)}):(Xf=!!a.window.navigator.geolocation,ge(Xf))}var bh=0,Zf=!1,_0=function(ge){function J(me){ge.call(this),this.options=a.extend({},P0,me),a.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.onAdd=function(ae){return this._map=ae,this._container=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Lv(this._setupUI),this._container},J.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(),x.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,bh=0,Zf=!1},J.prototype._isOutOfMapMaxBounds=function(ae){var be=this._map.getMaxBounds(),ke=ae.coords;return be&&(ke.longitude<be.getWest()||ke.longitude>be.getEast()||ke.latitude<be.getSouth()||ke.latitude>be.getNorth())},J.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}},J.prototype._onSuccess=function(ae){if(this._map){if(this._isOutOfMapMaxBounds(ae)){this._setErrorState(),this.fire(new a.Event("outofmaxbounds",ae)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=ae,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(ae),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(ae),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new a.Event("geolocate",ae)),this._finish()}},J.prototype._updateCamera=function(ae){var be=new a.LngLat(ae.coords.longitude,ae.coords.latitude),ke=ae.coords.accuracy,je=this._map.getBearing(),vt=a.extend({bearing:je},this.options.fitBoundsOptions);this._map.fitBounds(be.toBounds(ke),vt,{geolocateSource:!0})},J.prototype._updateMarker=function(ae){if(ae){var be=new a.LngLat(ae.coords.longitude,ae.coords.latitude);this._accuracyCircleMarker.setLngLat(be).addTo(this._map),this._userLocationDotMarker.setLngLat(be).addTo(this._map),this._accuracy=ae.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},J.prototype._updateCircleRadius=function(){var ae=this._map._container.clientHeight/2,be=this._map.unproject([0,ae]),ke=this._map.unproject([1,ae]),je=be.distanceTo(ke),vt=Math.ceil(2*this._accuracy/je);this._circleElement.style.width=vt+"px",this._circleElement.style.height=vt+"px"},J.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},J.prototype._onError=function(ae){if(this._map){if(this.options.trackUserLocation)if(ae.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 be=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=be,this._geolocateButton.setAttribute("aria-label",be),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(ae.code===3&&Zf)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new a.Event("error",ae)),this._finish()}},J.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},J.prototype._setupUI=function(ae){var be=this;if(this._container.addEventListener("contextmenu",function(vt){return vt.preventDefault()}),this._geolocateButton=x.create("button","mapboxgl-ctrl-geolocate",this._container),x.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",ae===!1){a.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var ke=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=ke,this._geolocateButton.setAttribute("aria-label",ke)}else{var je=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=je,this._geolocateButton.setAttribute("aria-label",je)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=x.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new xh(this._dotElement),this._circleElement=x.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new xh({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(vt){var Mt=vt.originalEvent&&vt.originalEvent.type==="resize";!vt.geolocateSource&&be._watchState==="ACTIVE_LOCK"&&!Mt&&(be._watchState="BACKGROUND",be._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),be._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),be.fire(new a.Event("trackuserlocationend")))})},J.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":bh--,Zf=!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"),bh++;var ae;bh>1?(ae={maximumAge:6e5,timeout:0},Zf=!0):(ae=this.options.positionOptions,Zf=!1),this._geolocationWatchID=a.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,ae)}}else a.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},J.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)},J}(a.Evented),sg={maxWidth:100,unit:"metric"},jf=function(J){this.options=a.extend({},sg,J),a.bindAll(["_onMove","setUnit"],this)};jf.prototype.getDefaultPosition=function(){return"bottom-left"},jf.prototype._onMove=function(){R0(this._map,this._container,this.options)},jf.prototype.onAdd=function(J){return this._map=J,this._container=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",J.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},jf.prototype.onRemove=function(){x.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},jf.prototype.setUnit=function(J){this.options.unit=J,R0(this._map,this._container,this.options)};function R0(ge,J,me){var ae=me&&me.maxWidth||100,be=ge._container.clientHeight/2,ke=ge.unproject([0,be]),je=ge.unproject([ae,be]),vt=ke.distanceTo(je);if(me&&me.unit==="imperial"){var Mt=3.2808*vt;if(Mt>5280){var Gt=Mt/5280;wh(J,ae,Gt,ge._getUIString("ScaleControl.Miles"))}else wh(J,ae,Mt,ge._getUIString("ScaleControl.Feet"))}else if(me&&me.unit==="nautical"){var er=vt/1852;wh(J,ae,er,ge._getUIString("ScaleControl.NauticalMiles"))}else vt>=1e3?wh(J,ae,vt/1e3,ge._getUIString("ScaleControl.Kilometers")):wh(J,ae,vt,ge._getUIString("ScaleControl.Meters"))}function wh(ge,J,me,ae){var be=ug(me),ke=be/me;ge.style.width=J*ke+"px",ge.innerHTML=be+"&nbsp;"+ae}function lg(ge){var J=Math.pow(10,Math.ceil(-Math.log(ge)/Math.LN10));return Math.round(ge*J)/J}function ug(ge){var J=Math.pow(10,(""+Math.floor(ge)).length-1),me=ge/J;return me=me>=10?10:me>=5?5:me>=3?3:me>=2?2:me>=1?1:lg(me),J*me}var tu=function(J){this._fullscreen=!1,J&&J.container&&(J.container instanceof a.window.HTMLElement?this._container=J.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")};tu.prototype.onAdd=function(J){return this._map=J,this._container||(this._container=this._map.getContainer()),this._controlContainer=x.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},tu.prototype.onRemove=function(){x.remove(this._controlContainer),this._map=null,a.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},tu.prototype._checkFullscreenSupport=function(){return!!(a.window.document.fullscreenEnabled||a.window.document.mozFullScreenEnabled||a.window.document.msFullscreenEnabled||a.window.document.webkitFullscreenEnabled)},tu.prototype._setupUI=function(){var J=this._fullscreenButton=x.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);x.create("span","mapboxgl-ctrl-icon",J).setAttribute("aria-hidden",!0),J.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),a.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},tu.prototype._updateTitle=function(){var J=this._getTitle();this._fullscreenButton.setAttribute("aria-label",J),this._fullscreenButton.title=J},tu.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},tu.prototype._isFullscreen=function(){return this._fullscreen},tu.prototype._changeIcon=function(){var J=a.window.document.fullscreenElement||a.window.document.mozFullScreenElement||a.window.document.webkitFullscreenElement||a.window.document.msFullscreenElement;J===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},tu.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 fg={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},cg=function(ge){function J(me){ge.call(this),this.options=a.extend(Object.create(fg),me),a.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return ge&&(J.__proto__=ge),J.prototype=Object.create(ge&&ge.prototype),J.prototype.constructor=J,J.prototype.addTo=function(ae){return this._map&&this.remove(),this._map=ae,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._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},J.prototype.isOpen=function(){return!!this._map},J.prototype.remove=function(){return this._content&&x.remove(this._content),this._container&&(x.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},J.prototype.getLngLat=function(){return this._lngLat},J.prototype.setLngLat=function(ae){return this._lngLat=a.LngLat.convert(ae),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},J.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},J.prototype.getElement=function(){return this._container},J.prototype.setText=function(ae){return this.setDOMContent(a.window.document.createTextNode(ae))},J.prototype.setHTML=function(ae){var be=a.window.document.createDocumentFragment(),ke=a.window.document.createElement("body"),je;for(ke.innerHTML=ae;je=ke.firstChild,!!je;)be.appendChild(je);return this.setDOMContent(be)},J.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},J.prototype.setMaxWidth=function(ae){return this.options.maxWidth=ae,this._update(),this},J.prototype.setDOMContent=function(ae){return this._createContent(),this._content.appendChild(ae),this._update(),this},J.prototype.addClassName=function(ae){this._container&&this._container.classList.add(ae)},J.prototype.removeClassName=function(ae){this._container&&this._container.classList.remove(ae)},J.prototype.toggleClassName=function(ae){if(this._container)return this._container.classList.toggle(ae)},J.prototype._createContent=function(){this._content&&x.remove(this._content),this._content=x.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=x.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))},J.prototype._onMouseUp=function(ae){this._update(ae.point)},J.prototype._onMouseMove=function(ae){this._update(ae.point)},J.prototype._onDrag=function(ae){this._update(ae.point)},J.prototype._update=function(ae){var be=this,ke=this._lngLat||this._trackPointer;if(!(!this._map||!ke||!this._content)&&(this._container||(this._container=x.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=x.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(Fr){return be._container.classList.add(Fr)}),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=ff(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!ae))){var je=this._pos=this._trackPointer&&ae?ae:this._map.project(this._lngLat),vt=this.options.anchor,Mt=D0(this.options.offset);if(!vt){var Gt=this._container.offsetWidth,er=this._container.offsetHeight,vr;je.y+Mt.bottom.y<er?vr=["top"]:je.y>this._map.transform.height-er?vr=["bottom"]:vr=[],je.x<Gt/2?vr.push("left"):je.x>this._map.transform.width-Gt/2&&vr.push("right"),vr.length===0?vt="bottom":vt=vr.join("-")}var br=je.add(Mt[vt]).round();x.setTransform(this._container,Cv[vt]+" translate("+br.x+"px,"+br.y+"px)"),hd(this._container,vt,"popup")}},J.prototype._onClose=function(){this.remove()},J}(a.Evented);function D0(ge){if(ge)if(typeof ge=="number"){var J=Math.round(Math.sqrt(.5*Math.pow(ge,2)));return{center:new a.Point(0,0),top:new a.Point(0,ge),"top-left":new a.Point(J,J),"top-right":new a.Point(-J,J),bottom:new a.Point(0,-ge),"bottom-left":new a.Point(J,-J),"bottom-right":new a.Point(-J,-J),left:new a.Point(ge,0),right:new a.Point(-ge,0)}}else if(ge instanceof a.Point||Array.isArray(ge)){var me=a.Point.convert(ge);return{center:me,top:me,"top-left":me,"top-right":me,bottom:me,"bottom-left":me,"bottom-right":me,left:me,right:me}}else return{center:a.Point.convert(ge.center||[0,0]),top:a.Point.convert(ge.top||[0,0]),"top-left":a.Point.convert(ge["top-left"]||[0,0]),"top-right":a.Point.convert(ge["top-right"]||[0,0]),bottom:a.Point.convert(ge.bottom||[0,0]),"bottom-left":a.Point.convert(ge["bottom-left"]||[0,0]),"bottom-right":a.Point.convert(ge["bottom-right"]||[0,0]),left:a.Point.convert(ge.left||[0,0]),right:a.Point.convert(ge.right||[0,0])};else return D0(new a.Point(0,0))}var hg={version:a.version,supported:_,setRTLTextPlugin:a.setRTLTextPlugin,getRTLTextPluginStatus:a.getRTLTextPluginStatus,Map:L0,NavigationControl:uf,GeolocateControl:_0,AttributionControl:us,ScaleControl:jf,FullscreenControl:tu,Popup:cg,Marker:xh,Style:Fo,LngLat:a.LngLat,LngLatBounds:a.LngLatBounds,Point:a.Point,MercatorCoordinate:a.MercatorCoordinate,Evented:a.Evented,config:a.config,prewarm:kt,clearPrewarmedResources:Qt,get accessToken(){return a.config.ACCESS_TOKEN},set accessToken(ge){a.config.ACCESS_TOKEN=ge},get baseApiUrl(){return a.config.API_URL},set baseApiUrl(ge){a.config.API_URL=ge},get workerCount(){return Mr.workerCount},set workerCount(ge){Mr.workerCount=ge},get maxParallelImageRequests(){return a.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(ge){a.config.MAX_PARALLEL_IMAGE_REQUESTS=ge},clearStorage:function(J){a.clearTileCache(J)},workerUrl:""};return hg}),d})},27084:function(z){z.exports=Math.log2||function(B){return Math.log(B)*Math.LOG2E}},16825:function(z,B,e){z.exports=P;var d=e(74311);function P(a,_){_||(_=a,a=window);var x=0,v=0,y=0,r={shift:!1,alt:!1,control:!1,meta:!1},n=!1;function u(M){var L=!1;return"altKey"in M&&(L=L||M.altKey!==r.alt,r.alt=!!M.altKey),"shiftKey"in M&&(L=L||M.shiftKey!==r.shift,r.shift=!!M.shiftKey),"ctrlKey"in M&&(L=L||M.ctrlKey!==r.control,r.control=!!M.ctrlKey),"metaKey"in M&&(L=L||M.metaKey!==r.meta,r.meta=!!M.metaKey),L}function i(M,L){var D=d.x(L),A=d.y(L);"buttons"in L&&(M=L.buttons|0),(M!==x||D!==v||A!==y||u(L))&&(x=M|0,v=D||0,y=A||0,_&&_(x,v,y,r))}function f(M){i(0,M)}function g(){(x||v||y||r.shift||r.alt||r.meta||r.control)&&(v=y=0,x=0,r.shift=r.alt=r.control=r.meta=!1,_&&_(0,0,0,r))}function h(M){u(M)&&_&&_(x,v,y,r)}function b(M){d.buttons(M)===0?i(0,M):i(x,M)}function p(M){i(x|d.buttons(M),M)}function E(M){i(x&~d.buttons(M),M)}function c(){n||(n=!0,a.addEventListener("mousemove",b),a.addEventListener("mousedown",p),a.addEventListener("mouseup",E),a.addEventListener("mouseleave",f),a.addEventListener("mouseenter",f),a.addEventListener("mouseout",f),a.addEventListener("mouseover",f),a.addEventListener("blur",g),a.addEventListener("keyup",h),a.addEventListener("keydown",h),a.addEventListener("keypress",h),a!==window&&(window.addEventListener("blur",g),window.addEventListener("keyup",h),window.addEventListener("keydown",h),window.addEventListener("keypress",h)))}function l(){n&&(n=!1,a.removeEventListener("mousemove",b),a.removeEventListener("mousedown",p),a.removeEventListener("mouseup",E),a.removeEventListener("mouseleave",f),a.removeEventListener("mouseenter",f),a.removeEventListener("mouseout",f),a.removeEventListener("mouseover",f),a.removeEventListener("blur",g),a.removeEventListener("keyup",h),a.removeEventListener("keydown",h),a.removeEventListener("keypress",h),a!==window&&(window.removeEventListener("blur",g),window.removeEventListener("keyup",h),window.removeEventListener("keydown",h),window.removeEventListener("keypress",h)))}c();var m={element:a};return Object.defineProperties(m,{enabled:{get:function(){return n},set:function(M){M?c():l()},enumerable:!0},buttons:{get:function(){return x},enumerable:!0},x:{get:function(){return v},enumerable:!0},y:{get:function(){return y},enumerable:!0},mods:{get:function(){return r},enumerable:!0}}),m}},48956:function(z){var B={left:0,top:0};z.exports=e;function e(P,a,_){a=a||P.currentTarget||P.srcElement,Array.isArray(_)||(_=[0,0]);var x=P.clientX||0,v=P.clientY||0,y=d(a);return _[0]=x-y.left,_[1]=v-y.top,_}function d(P){return P===window||P===document||P===document.body?B:P.getBoundingClientRect()}},74311:function(z,B){function e(_){if(typeof _=="object"){if("buttons"in _)return _.buttons;if("which"in _){var x=_.which;if(x===2)return 4;if(x===3)return 2;if(x>0)return 1<<x-1}else if("button"in _){var x=_.button;if(x===1)return 4;if(x===2)return 2;if(x>=0)return 1<<x}}return 0}B.buttons=e;function d(_){return _.target||_.srcElement||window}B.element=d;function P(_){if(typeof _=="object"){if("offsetX"in _)return _.offsetX;var x=d(_),v=x.getBoundingClientRect();return _.clientX-v.left}return 0}B.x=P;function a(_){if(typeof _=="object"){if("offsetY"in _)return _.offsetY;var x=d(_),v=x.getBoundingClientRect();return _.clientY-v.top}return 0}B.y=a},1195:function(z,B,e){var d=e(75686);z.exports=P;function P(a,_,x){typeof a=="function"&&(x=!!_,_=a,a=window);var v=d("ex",a),y=function(r){x&&r.preventDefault();var n=r.deltaX||0,u=r.deltaY||0,i=r.deltaZ||0,f=r.deltaMode,g=1;switch(f){case 1:g=v;break;case 2:g=window.innerHeight;break}if(n*=g,u*=g,i*=g,n||u||i)return _(n,u,i,r)};return a.addEventListener("wheel",y),y}},7417:function(z,B,e){var d;/*! Native Promise Only
v0.8.1 (c) Kyle Simpson
MIT License: http://getify.mit-license.org
*/(function(a,_,x){_[a]=_[a]||x(),z.exports?z.exports=_[a]:(d=function(){return _[a]}.call(B,e,B,z),d!==void 0&&(z.exports=d))})("Promise",typeof e.g<"u"?e.g:this,function(){var a,_,x,v=Object.prototype.toString,y=typeof setImmediate<"u"?function(m){return setImmediate(m)}:setTimeout;try{Object.defineProperty({},"x",{}),a=function(m,M,L,D){return Object.defineProperty(m,M,{value:L,writable:!0,configurable:D!==!1})}}catch{a=function(M,L,D){return M[L]=D,M}}x=function(){var m,M,L;function D(A,C){this.fn=A,this.self=C,this.next=void 0}return{add:function(C,S){L=new D(C,S),M?M.next=L:m=L,M=L,L=void 0},drain:function(){var C=m;for(m=M=_=void 0;C;)C.fn.call(C.self),C=C.next}}}();function r(l,m){x.add(l,m),_||(_=y(x.drain))}function n(l){var m,M=typeof l;return l!=null&&(M=="object"||M=="function")&&(m=l.then),typeof m=="function"?m:!1}function u(){for(var l=0;l<this.chain.length;l++)i(this,this.state===1?this.chain[l].success:this.chain[l].failure,this.chain[l]);this.chain.length=0}function i(l,m,M){var L,D;try{m===!1?M.reject(l.msg):(m===!0?L=l.msg:L=m.call(void 0,l.msg),L===M.promise?M.reject(TypeError("Promise-chain cycle")):(D=n(L))?D.call(L,M.resolve,M.reject):M.resolve(L))}catch(A){M.reject(A)}}function f(l){var m,M=this;if(!M.triggered){M.triggered=!0,M.def&&(M=M.def);try{(m=n(l))?r(function(){var L=new b(M);try{m.call(l,function(){f.apply(L,arguments)},function(){g.apply(L,arguments)})}catch(D){g.call(L,D)}}):(M.msg=l,M.state=1,M.chain.length>0&&r(u,M))}catch(L){g.call(new b(M),L)}}}function g(l){var m=this;m.triggered||(m.triggered=!0,m.def&&(m=m.def),m.msg=l,m.state=2,m.chain.length>0&&r(u,m))}function h(l,m,M,L){for(var D=0;D<m.length;D++)(function(C){l.resolve(m[C]).then(function(o){M(C,o)},L)})(D)}function b(l){this.def=l,this.triggered=!1}function p(l){this.promise=l,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function E(l){if(typeof l!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var m=new p(this);this.then=function(L,D){var A={success:typeof L=="function"?L:!0,failure:typeof D=="function"?D:!1};return A.promise=new this.constructor(function(S,o){if(typeof S!="function"||typeof o!="function")throw TypeError("Not a function");A.resolve=S,A.reject=o}),m.chain.push(A),m.state!==0&&r(u,m),A.promise},this.catch=function(L){return this.then(void 0,L)};try{l.call(void 0,function(L){f.call(m,L)},function(L){g.call(m,L)})}catch(M){g.call(m,M)}}var c=a({},"constructor",E,!1);return E.prototype=c,a(c,"__NPO__",0,!1),a(E,"resolve",function(m){var M=this;return m&&typeof m=="object"&&m.__NPO__===1?m:new M(function(D,A){if(typeof D!="function"||typeof A!="function")throw TypeError("Not a function");D(m)})}),a(E,"reject",function(m){return new this(function(L,D){if(typeof L!="function"||typeof D!="function")throw TypeError("Not a function");D(m)})}),a(E,"all",function(m){var M=this;return v.call(m)!="[object Array]"?M.reject(TypeError("Not an array")):m.length===0?M.resolve([]):new M(function(D,A){if(typeof D!="function"||typeof A!="function")throw TypeError("Not a function");var C=m.length,S=Array(C),o=0;h(M,m,function(T,O){S[T]=O,++o===C&&D(S)},A)})}),a(E,"race",function(m){var M=this;return v.call(m)!="[object Array]"?M.reject(TypeError("Not an array")):new M(function(D,A){if(typeof D!="function"||typeof A!="function")throw TypeError("Not a function");h(M,m,function(S,o){D(o)},A)})}),E})},18625:function(z){var B=Math.PI,e=v(120);z.exports=d;function d(y){for(var r,n=[],u=0,i=0,f=0,g=0,h=null,b=null,p=0,E=0,c=0,l=y.length;c<l;c++){var m=y[c],M=m[0];switch(M){case"M":f=m[1],g=m[2];break;case"A":m=_(p,E,m[1],m[2],v(m[3]),m[4],m[5],m[6],m[7]),m.unshift("C"),m.length>7&&(n.push(m.splice(0,7)),m.unshift("C"));break;case"S":var L=p,D=E;(r=="C"||r=="S")&&(L+=L-u,D+=D-i),m=["C",L,D,m[1],m[2],m[3],m[4]];break;case"T":r=="Q"||r=="T"?(h=p*2-h,b=E*2-b):(h=p,b=E),m=a(p,E,h,b,m[1],m[2]);break;case"Q":h=m[1],b=m[2],m=a(p,E,m[1],m[2],m[3],m[4]);break;case"L":m=P(p,E,m[1],m[2]);break;case"H":m=P(p,E,m[1],E);break;case"V":m=P(p,E,p,m[1]);break;case"Z":m=P(p,E,f,g);break}r=M,p=m[m.length-2],E=m[m.length-1],m.length>4?(u=m[m.length-4],i=m[m.length-3]):(u=p,i=E),n.push(m)}return n}function P(y,r,n,u){return["C",y,r,n,u,n,u]}function a(y,r,n,u,i,f){return["C",y/3+.6666666666666666*n,r/3+.6666666666666666*u,i/3+.6666666666666666*n,f/3+.6666666666666666*u,i,f]}function _(y,r,n,u,i,f,g,h,b,p){if(p)S=p[0],o=p[1],A=p[2],C=p[3];else{var E=x(y,r,-i);y=E.x,r=E.y,E=x(h,b,-i),h=E.x,b=E.y;var c=(y-h)/2,l=(r-b)/2,m=c*c/(n*n)+l*l/(u*u);m>1&&(m=Math.sqrt(m),n=m*n,u=m*u);var M=n*n,L=u*u,D=(f==g?-1:1)*Math.sqrt(Math.abs((M*L-M*l*l-L*c*c)/(M*l*l+L*c*c)));D==1/0&&(D=1);var A=D*n*l/u+(y+h)/2,C=D*-u*c/n+(r+b)/2,S=Math.asin(((r-C)/u).toFixed(9)),o=Math.asin(((b-C)/u).toFixed(9));S=y<A?B-S:S,o=h<A?B-o:o,S<0&&(S=B*2+S),o<0&&(o=B*2+o),g&&S>o&&(S=S-B*2),!g&&o>S&&(o=o-B*2)}if(Math.abs(o-S)>e){var R=o,T=h,O=b;o=S+e*(g&&o>S?1:-1),h=A+n*Math.cos(o),b=C+u*Math.sin(o);var N=_(h,b,n,u,i,0,g,T,O,[o,R,A,C])}var H=Math.tan((o-S)/4),k=4/3*n*H,V=4/3*u*H,G=[2*y-(y+k*Math.sin(S)),2*r-(r-V*Math.cos(S)),h+k*Math.sin(o),b-V*Math.cos(o),h,b];if(p)return G;N&&(G=G.concat(N));for(var U=0;U<G.length;){var Y=x(G[U],G[U+1],i);G[U++]=Y.x,G[U++]=Y.y}return G}function x(y,r,n){return{x:y*Math.cos(n)-r*Math.sin(n),y:y*Math.sin(n)+r*Math.cos(n)}}function v(y){return y*(B/180)}},56131:function(z){/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var B=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable;function P(_){if(_==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(_)}function a(){try{if(!Object.assign)return!1;var _=new String("abc");if(_[5]="de",Object.getOwnPropertyNames(_)[0]==="5")return!1;for(var x={},v=0;v<10;v++)x["_"+String.fromCharCode(v)]=v;var y=Object.getOwnPropertyNames(x).map(function(n){return x[n]});if(y.join("")!=="0123456789")return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(n){r[n]=n}),Object.keys(Object.assign({},r)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}z.exports=a()?Object.assign:function(_,x){for(var v,y=P(_),r,n=1;n<arguments.length;n++){v=Object(arguments[n]);for(var u in v)e.call(v,u)&&(y[u]=v[u]);if(B){r=B(v);for(var i=0;i<r.length;i++)d.call(v,r[i])&&(y[r[i]]=v[r[i]])}}return y}},65848:function(z){var B=function(e){return e!==e};z.exports=function(d,P){return d===0&&P===0?1/d===1/P:!!(d===P||B(d)&&B(P))}},64003:function(z,B,e){var d=e(17045),P=e(68222),a=e(65848),_=e(27015),x=e(55572),v=P(_(),Object);d(v,{getPolyfill:_,implementation:a,shim:x}),z.exports=v},27015:function(z,B,e){var d=e(65848);z.exports=function(){return typeof Object.is=="function"?Object.is:d}},55572:function(z,B,e){var d=e(27015),P=e(17045);z.exports=function(){var _=d();return P(Object,{is:_},{is:function(){return Object.is!==_}}),_}},99019:function(z,B,e){var d;if(!Object.keys){var P=Object.prototype.hasOwnProperty,a=Object.prototype.toString,_=e(64178),x=Object.prototype.propertyIsEnumerable,v=!x.call({toString:null},"toString"),y=x.call(function(){},"prototype"),r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],n=function(g){var h=g.constructor;return h&&h.prototype===g},u={$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},i=function(){if(typeof window>"u")return!1;for(var g in window)try{if(!u["$"+g]&&P.call(window,g)&&window[g]!==null&&typeof window[g]=="object")try{n(window[g])}catch{return!0}}catch{return!0}return!1}(),f=function(g){if(typeof window>"u"||!i)return n(g);try{return n(g)}catch{return!1}};d=function(h){var b=h!==null&&typeof h=="object",p=a.call(h)==="[object Function]",E=_(h),c=b&&a.call(h)==="[object String]",l=[];if(!b&&!p&&!E)throw new TypeError("Object.keys called on a non-object");var m=y&&p;if(c&&h.length>0&&!P.call(h,0))for(var M=0;M<h.length;++M)l.push(String(M));if(E&&h.length>0)for(var L=0;L<h.length;++L)l.push(String(L));else for(var D in h)!(m&&D==="prototype")&&P.call(h,D)&&l.push(String(D));if(v)for(var A=f(h),C=0;C<r.length;++C)!(A&&r[C]==="constructor")&&P.call(h,r[C])&&l.push(r[C]);return l}}z.exports=d},8709:function(z,B,e){var d=Array.prototype.slice,P=e(64178),a=Object.keys,_=a?function(y){return a(y)}:e(99019),x=Object.keys;_.shim=function(){if(Object.keys){var y=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);y||(Object.keys=function(n){return P(n)?x(d.call(n)):x(n)})}else Object.keys=_;return Object.keys||_},z.exports=_},64178:function(z){var B=Object.prototype.toString;z.exports=function(d){var P=B.call(d),a=P==="[object Arguments]";return a||(a=P!=="[object Array]"&&d!==null&&typeof d=="object"&&typeof d.length=="number"&&d.length>=0&&B.call(d.callee)==="[object Function]"),a}},88641:function(z){function B(P,a){if(typeof P!="string")return[P];var _=[P];typeof a=="string"||Array.isArray(a)?a={brackets:a}:a||(a={});var x=a.brackets?Array.isArray(a.brackets)?a.brackets:[a.brackets]:["{}","[]","()"],v=a.escape||"___",y=!!a.flat;x.forEach(function(u){var i=new RegExp(["\\",u[0],"[^\\",u[0],"\\",u[1],"]*\\",u[1]].join("")),f=[];function g(h,b,p){var E=_.push(h.slice(u[0].length,-u[1].length))-1;return f.push(E),v+E+v}_.forEach(function(h,b){for(var p,E=0;h!=p;)if(p=h,h=h.replace(i,g),E++>1e4)throw Error("References have circular dependency. Please, check them.");_[b]=h}),f=f.reverse(),_=_.map(function(h){return f.forEach(function(b){h=h.replace(new RegExp("(\\"+v+b+"\\"+v+")","g"),u[0]+"$1"+u[1])}),h})});var r=new RegExp("\\"+v+"([0-9]+)\\"+v);function n(u,i,f){for(var g=[],h,b=0;h=r.exec(u);){if(b++>1e4)throw Error("Circular references in parenthesis");g.push(u.slice(0,h.index)),g.push(n(i[h[1]],i)),u=u.slice(h.index+h[0].length)}return g.push(u),g}return y?_:n(_[0],_)}function e(P,a){if(a&&a.flat){var _=a&&a.escape||"___",x=P[0],v;if(!x)return"";for(var y=new RegExp("\\"+_+"([0-9]+)\\"+_),r=0;x!=v;){if(r++>1e4)throw Error("Circular references in "+P);v=x,x=x.replace(y,n)}return x}return P.reduce(function u(i,f){return Array.isArray(f)&&(f=f.reduce(u,"")),i+f},"");function n(u,i){if(P[i]==null)throw Error("Reference "+i+"is undefined");return P[i]}}function d(P,a){return Array.isArray(P)?e(P,a):B(P,a)}d.parse=B,d.stringify=e,z.exports=d},18863:function(z,B,e){var d=e(71299);z.exports=P;function P(a){var _;return arguments.length>1&&(a=arguments),typeof a=="string"?a=a.split(/\s/).map(parseFloat):typeof a=="number"&&(a=[a]),a.length&&typeof a[0]=="number"?a.length===1?_={width:a[0],height:a[0],x:0,y:0}:a.length===2?_={width:a[0],height:a[1],x:0,y:0}:_={x:a[0],y:a[1],width:a[2]-a[0]||0,height:a[3]-a[1]||0}:a&&(a=d(a,{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"}),_={x:a.left||0,y:a.top||0},a.width==null?a.right?_.width=a.right-_.x:_.width=0:_.width=a.width,a.height==null?a.bottom?_.height=a.bottom-_.y:_.height=0:_.height=a.height),_}},95616:function(z){z.exports=d;var B={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},e=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function d(_){var x=[];return _.replace(e,function(v,y,r){var n=y.toLowerCase();for(r=a(r),n=="m"&&r.length>2&&(x.push([y].concat(r.splice(0,2))),n="l",y=y=="m"?"l":"L");;){if(r.length==B[n])return r.unshift(y),x.push(r);if(r.length<B[n])throw new Error("malformed path data");x.push([y].concat(r.splice(0,B[n])))}}),x}var P=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function a(_){var x=_.match(P);return x?x.map(Number):[]}},25677:function(z){z.exports=function(e,d){d||(d=[0,""]),e=String(e);var P=parseFloat(e,10);return d[0]=P,d[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",d}},9748:function(z,B,e){var d=e(90386);(function(){var P,a,_,x,v,y;typeof performance<"u"&&performance!==null&&performance.now?z.exports=function(){return performance.now()}:typeof d<"u"&&d!==null&&d.hrtime?(z.exports=function(){return(P()-v)/1e6},a=d.hrtime,P=function(){var r;return r=a(),r[0]*1e9+r[1]},x=P(),y=d.uptime()*1e9,v=x-y):Date.now?(z.exports=function(){return Date.now()-_},_=Date.now()):(z.exports=function(){return new Date().getTime()-_},_=new Date().getTime())}).call(this)},71299:function(z){z.exports=function(P,a,_){var x={},v,y;if(typeof a=="string"&&(a=e(a)),Array.isArray(a)){var r={};for(y=0;y<a.length;y++)r[a[y]]=!0;a=r}for(v in a)a[v]=e(a[v]);var n={};for(v in a){var u=a[v];if(Array.isArray(u))for(y=0;y<u.length;y++){var i=u[y];if(_&&(n[i]=!0),i in P){if(x[v]=P[i],_)for(var f=y;f<u.length;f++)n[u[f]]=!0;break}}else v in P&&(a[v]&&(x[v]=P[v]),_&&(n[v]=!0))}if(_)for(v in P)n[v]||(x[v]=P[v]);return x};var B={};function e(d){return B[d]?B[d]:(typeof d=="string"&&(d=B[d]=d.split(/\s*,\s*|\s+/)),d)}},38258:function(z){z.exports=function(e,d,P,a){var _=e[0],x=e[1],v=!1;P===void 0&&(P=0),a===void 0&&(a=d.length);for(var y=a-P,r=0,n=y-1;r<y;n=r++){var u=d[r+P][0],i=d[r+P][1],f=d[n+P][0],g=d[n+P][1],h=i>x!=g>x&&_<(f-u)*(x-i)/(g-i)+u;h&&(v=!v)}return v}},52142:function(z,B,e){/*
* @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc
* @license MIT
* @preserve Project Home: https://github.com/voidqk/polybooljs
*/var d=e(69444),P=e(29023),a=e(87263),_=e(11328),x=e(55968),v=e(10670),y=!1,r=P(),n;n={buildLog:function(i){return i===!0?y=d():i===!1&&(y=!1),y===!1?!1:y.list},epsilon:function(i){return r.epsilon(i)},segments:function(i){var f=a(!0,r,y);return i.regions.forEach(f.addRegion),{segments:f.calculate(i.inverted),inverted:i.inverted}},combine:function(i,f){var g=a(!1,r,y);return{combined:g.calculate(i.segments,i.inverted,f.segments,f.inverted),inverted1:i.inverted,inverted2:f.inverted}},selectUnion:function(i){return{segments:x.union(i.combined,y),inverted:i.inverted1||i.inverted2}},selectIntersect:function(i){return{segments:x.intersect(i.combined,y),inverted:i.inverted1&&i.inverted2}},selectDifference:function(i){return{segments:x.difference(i.combined,y),inverted:i.inverted1&&!i.inverted2}},selectDifferenceRev:function(i){return{segments:x.differenceRev(i.combined,y),inverted:!i.inverted1&&i.inverted2}},selectXor:function(i){return{segments:x.xor(i.combined,y),inverted:i.inverted1!==i.inverted2}},polygon:function(i){return{regions:_(i.segments,r,y),inverted:i.inverted}},polygonFromGeoJSON:function(i){return v.toPolygon(n,i)},polygonToGeoJSON:function(i){return v.fromPolygon(n,r,i)},union:function(i,f){return u(i,f,n.selectUnion)},intersect:function(i,f){return u(i,f,n.selectIntersect)},difference:function(i,f){return u(i,f,n.selectDifference)},differenceRev:function(i,f){return u(i,f,n.selectDifferenceRev)},xor:function(i,f){return u(i,f,n.selectXor)}};function u(i,f,g){var h=n.segments(i),b=n.segments(f),p=n.combine(h,b),E=g(p);return n.polygon(E)}typeof window=="object"&&(window.PolyBool=n),z.exports=n},69444:function(z){function B(){var e,d=0,P=!1;function a(_,x){return e.list.push({type:_,data:x?JSON.parse(JSON.stringify(x)):void 0}),e}return e={list:[],segmentId:function(){return d++},checkIntersection:function(_,x){return a("check",{seg1:_,seg2:x})},segmentChop:function(_,x){return a("div_seg",{seg:_,pt:x}),a("chop",{seg:_,pt:x})},statusRemove:function(_){return a("pop_seg",{seg:_})},segmentUpdate:function(_){return a("seg_update",{seg:_})},segmentNew:function(_,x){return a("new_seg",{seg:_,primary:x})},segmentRemove:function(_){return a("rem_seg",{seg:_})},tempStatus:function(_,x,v){return a("temp_status",{seg:_,above:x,below:v})},rewind:function(_){return a("rewind",{seg:_})},status:function(_,x,v){return a("status",{seg:_,above:x,below:v})},vert:function(_){return _===P?e:(P=_,a("vert",{x:_}))},log:function(_){return typeof _!="string"&&(_=JSON.stringify(_,!1," ")),a("log",{txt:_})},reset:function(){return a("reset")},selected:function(_){return a("selected",{segs:_})},chainStart:function(_){return a("chain_start",{seg:_})},chainRemoveHead:function(_,x){return a("chain_rem_head",{index:_,pt:x})},chainRemoveTail:function(_,x){return a("chain_rem_tail",{index:_,pt:x})},chainNew:function(_,x){return a("chain_new",{pt1:_,pt2:x})},chainMatch:function(_){return a("chain_match",{index:_})},chainClose:function(_){return a("chain_close",{index:_})},chainAddHead:function(_,x){return a("chain_add_head",{index:_,pt:x})},chainAddTail:function(_,x){return a("chain_add_tail",{index:_,pt:x})},chainConnect:function(_,x){return a("chain_con",{index1:_,index2:x})},chainReverse:function(_){return a("chain_rev",{index:_})},chainJoin:function(_,x){return a("chain_join",{index1:_,index2:x})},done:function(){return a("done")}},e}z.exports=B},29023:function(z){function B(e){typeof e!="number"&&(e=1e-10);var d={epsilon:function(P){return typeof P=="number"&&(e=P),e},pointAboveOrOnLine:function(P,a,_){var x=a[0],v=a[1],y=_[0],r=_[1],n=P[0],u=P[1];return(y-x)*(u-v)-(r-v)*(n-x)>=-e},pointBetween:function(P,a,_){var x=P[1]-a[1],v=_[0]-a[0],y=P[0]-a[0],r=_[1]-a[1],n=y*v+x*r;if(n<e)return!1;var u=v*v+r*r;return!(n-u>-e)},pointsSameX:function(P,a){return Math.abs(P[0]-a[0])<e},pointsSameY:function(P,a){return Math.abs(P[1]-a[1])<e},pointsSame:function(P,a){return d.pointsSameX(P,a)&&d.pointsSameY(P,a)},pointsCompare:function(P,a){return d.pointsSameX(P,a)?d.pointsSameY(P,a)?0:P[1]<a[1]?-1:1:P[0]<a[0]?-1:1},pointsCollinear:function(P,a,_){var x=P[0]-a[0],v=P[1]-a[1],y=a[0]-_[0],r=a[1]-_[1];return Math.abs(x*r-y*v)<e},linesIntersect:function(P,a,_,x){var v=a[0]-P[0],y=a[1]-P[1],r=x[0]-_[0],n=x[1]-_[1],u=v*n-y*r;if(Math.abs(u)<e)return!1;var i=P[0]-_[0],f=P[1]-_[1],g=(r*f-n*i)/u,h=(v*f-y*i)/u,b={alongA:0,alongB:0,pt:[P[0]+g*v,P[1]+g*y]};return g<=-e?b.alongA=-2:g<e?b.alongA=-1:g-1<=-e?b.alongA=0:g-1<e?b.alongA=1:b.alongA=2,h<=-e?b.alongB=-2:h<e?b.alongB=-1:h-1<=-e?b.alongB=0:h-1<e?b.alongB=1:b.alongB=2,b},pointInsideRegion:function(P,a){for(var _=P[0],x=P[1],v=a[a.length-1][0],y=a[a.length-1][1],r=!1,n=0;n<a.length;n++){var u=a[n][0],i=a[n][1];i-x>e!=y-x>e&&(v-u)*(x-i)/(y-i)+u-_>e&&(r=!r),v=u,y=i}return r}};return d}z.exports=B},10670:function(z){var B={toPolygon:function(e,d){function P(x){if(x.length<=0)return e.segments({inverted:!1,regions:[]});function v(n){var u=n.slice(0,n.length-1);return e.segments({inverted:!1,regions:[u]})}for(var y=v(x[0]),r=1;r<x.length;r++)y=e.selectDifference(e.combine(y,v(x[r])));return y}if(d.type==="Polygon")return e.polygon(P(d.coordinates));if(d.type==="MultiPolygon"){for(var a=e.segments({inverted:!1,regions:[]}),_=0;_<d.coordinates.length;_++)a=e.selectUnion(e.combine(a,P(d.coordinates[_])));return e.polygon(a)}throw new Error("PolyBool: Cannot convert GeoJSON object to PolyBool polygon")},fromPolygon:function(e,d,P){P=e.polygon(e.segments(P));function a(g,h){return d.pointInsideRegion([(g[0][0]+g[1][0])*.5,(g[0][1]+g[1][1])*.5],h)}function _(g){return{region:g,children:[]}}var x=_(null);function v(g,h){for(var b=0;b<g.children.length;b++){var p=g.children[b];if(a(h,p.region)){v(p,h);return}}for(var E=_(h),b=0;b<g.children.length;b++){var p=g.children[b];a(p.region,h)&&(E.children.push(p),g.children.splice(b,1),b--)}g.children.push(E)}for(var y=0;y<P.regions.length;y++){var r=P.regions[y];r.length<3||v(x,r)}function n(g,h){for(var b=0,p=g[g.length-1][0],E=g[g.length-1][1],c=[],l=0;l<g.length;l++){var m=g[l][0],M=g[l][1];c.push([m,M]),b+=M*p-m*E,p=m,E=M}var L=b<0;return L!==h&&c.reverse(),c.push([c[0][0],c[0][1]]),c}var u=[];function i(g){var h=[n(g.region,!1)];u.push(h);for(var b=0;b<g.children.length;b++)h.push(f(g.children[b]))}function f(g){for(var h=0;h<g.children.length;h++)i(g.children[h]);return n(g.region,!0)}for(var y=0;y<x.children.length;y++)i(x.children[y]);return u.length<=0?{type:"Polygon",coordinates:[]}:u.length==1?{type:"Polygon",coordinates:u[0]}:{type:"MultiPolygon",coordinates:u}}};z.exports=B},87263:function(z,B,e){var d=e(26859);function P(a,_,x){function v(E,c){return{id:x?x.segmentId():-1,start:E,end:c,myFill:{above:null,below:null},otherFill:null}}function y(E,c,l){return{id:x?x.segmentId():-1,start:E,end:c,myFill:{above:l.myFill.above,below:l.myFill.below},otherFill:null}}var r=d.create();function n(E,c,l,m,M,L){var D=_.pointsCompare(c,M);return D!==0?D:_.pointsSame(l,L)?0:E!==m?E?1:-1:_.pointAboveOrOnLine(l,m?M:L,m?L:M)?1:-1}function u(E,c){r.insertBefore(E,function(l){var m=n(E.isStart,E.pt,c,l.isStart,l.pt,l.other.pt);return m<0})}function i(E,c){var l=d.node({isStart:!0,pt:E.start,seg:E,primary:c,other:null,status:null});return u(l,E.end),l}function f(E,c,l){var m=d.node({isStart:!1,pt:c.end,seg:c,primary:l,other:E,status:null});E.other=m,u(m,E.pt)}function g(E,c){var l=i(E,c);return f(l,E,c),l}function h(E,c){x&&x.segmentChop(E.seg,c),E.other.remove(),E.seg.end=c,E.other.pt=c,u(E.other,E.pt)}function b(E,c){var l=y(c,E.seg.end,E.seg);return h(E,c),g(l,E.primary)}function p(E,c){var l=d.create();function m(V,G){var U=V.seg.start,Y=V.seg.end,ee=G.seg.start,re=G.seg.end;return _.pointsCollinear(U,ee,re)?_.pointsCollinear(Y,ee,re)||_.pointAboveOrOnLine(Y,ee,re)?1:-1:_.pointAboveOrOnLine(U,ee,re)?1:-1}function M(V){return l.findTransition(function(G){var U=m(V,G.ev);return U>0})}function L(V,G){var U=V.seg,Y=G.seg,ee=U.start,re=U.end,ie=Y.start,se=Y.end;x&&x.checkIntersection(U,Y);var ce=_.linesIntersect(ee,re,ie,se);if(ce===!1){if(!_.pointsCollinear(ee,re,ie)||_.pointsSame(ee,se)||_.pointsSame(re,ie))return!1;var q=_.pointsSame(ee,ie),j=_.pointsSame(re,se);if(q&&j)return G;var Z=!q&&_.pointBetween(ee,ie,se),Q=!j&&_.pointBetween(re,ie,se);if(q)return Q?b(G,re):b(V,se),G;Z&&(j||(Q?b(G,re):b(V,se)),b(G,ee))}else ce.alongA===0&&(ce.alongB===-1?b(V,ie):ce.alongB===0?b(V,ce.pt):ce.alongB===1&&b(V,se)),ce.alongB===0&&(ce.alongA===-1?b(G,ee):ce.alongA===0?b(G,ce.pt):ce.alongA===1&&b(G,re));return!1}for(var D=[];!r.isEmpty();){var A=r.getHead();if(x&&x.vert(A.pt[0]),A.isStart){let V=function(){if(S){var G=L(A,S);if(G)return G}return o?L(A,o):!1};var k=V;x&&x.segmentNew(A.seg,A.primary);var C=M(A),S=C.before?C.before.ev:null,o=C.after?C.after.ev:null;x&&x.tempStatus(A.seg,S?S.seg:!1,o?o.seg:!1);var R=V();if(R){if(a){var T;A.seg.myFill.below===null?T=!0:T=A.seg.myFill.above!==A.seg.myFill.below,T&&(R.seg.myFill.above=!R.seg.myFill.above)}else R.seg.otherFill=A.seg.myFill;x&&x.segmentUpdate(R.seg),A.other.remove(),A.remove()}if(r.getHead()!==A){x&&x.rewind(A.seg);continue}if(a){var T;A.seg.myFill.below===null?T=!0:T=A.seg.myFill.above!==A.seg.myFill.below,o?A.seg.myFill.below=o.seg.myFill.above:A.seg.myFill.below=E,T?A.seg.myFill.above=!A.seg.myFill.below:A.seg.myFill.above=A.seg.myFill.below}else if(A.seg.otherFill===null){var O;o?A.primary===o.primary?O=o.seg.otherFill.above:O=o.seg.myFill.above:O=A.primary?c:E,A.seg.otherFill={above:O,below:O}}x&&x.status(A.seg,S?S.seg:!1,o?o.seg:!1),A.other.status=C.insert(d.node({ev:A}))}else{var N=A.status;if(N===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(l.exists(N.prev)&&l.exists(N.next)&&L(N.prev.ev,N.next.ev),x&&x.statusRemove(N.ev.seg),N.remove(),!A.primary){var H=A.seg.myFill;A.seg.myFill=A.seg.otherFill,A.seg.otherFill=H}D.push(A.seg)}r.getHead().remove()}return x&&x.done(),D}return a?{addRegion:function(E){for(var c,l=E[E.length-1],m=0;m<E.length;m++){c=l,l=E[m];var M=_.pointsCompare(c,l);M!==0&&g(v(M<0?c:l,M<0?l:c),!0)}},calculate:function(E){return p(E,!1)}}:{calculate:function(E,c,l,m){return E.forEach(function(M){g(y(M.start,M.end,M),!0)}),l.forEach(function(M){g(y(M.start,M.end,M),!1)}),p(c,m)}}}z.exports=P},26859:function(z){var B={create:function(){var e={root:{root:!0,next:null},exists:function(d){return!(d===null||d===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(d,P){for(var a=e.root,_=e.root.next;_!==null;){if(P(_)){d.prev=_.prev,d.next=_,_.prev.next=d,_.prev=d;return}a=_,_=_.next}a.next=d,d.prev=a,d.next=null},findTransition:function(d){for(var P=e.root,a=e.root.next;a!==null&&!d(a);)P=a,a=a.next;return{before:P===e.root?null:P,after:a,insert:function(_){return _.prev=P,_.next=a,P.next=_,a!==null&&(a.prev=_),_}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};z.exports=B},11328:function(z){function B(e,d,P){var a=[],_=[];return e.forEach(function(x){var v=x.start,y=x.end;if(d.pointsSame(v,y)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}P&&P.chainStart(x);var r={index:0,matches_head:!1,matches_pt1:!1},n={index:0,matches_head:!1,matches_pt1:!1},u=r;function i(R,T,O){return u.index=R,u.matches_head=T,u.matches_pt1=O,u===r?(u=n,!1):(u=null,!0)}for(var f=0;f<a.length;f++){var g=a[f],h=g[0];g[1];var b=g[g.length-1];if(g[g.length-2],d.pointsSame(h,v)){if(i(f,!0,!0))break}else if(d.pointsSame(h,y)){if(i(f,!0,!1))break}else if(d.pointsSame(b,v)){if(i(f,!1,!0))break}else if(d.pointsSame(b,y)&&i(f,!1,!1))break}if(u===r){a.push([v,y]),P&&P.chainNew(v,y);return}if(u===n){P&&P.chainMatch(r.index);var p=r.index,E=r.matches_pt1?y:v,c=r.matches_head,g=a[p],l=c?g[0]:g[g.length-1],m=c?g[1]:g[g.length-2],M=c?g[g.length-1]:g[0],L=c?g[g.length-2]:g[1];if(d.pointsCollinear(m,l,E)&&(c?(P&&P.chainRemoveHead(r.index,E),g.shift()):(P&&P.chainRemoveTail(r.index,E),g.pop()),l=m),d.pointsSame(M,E)){a.splice(p,1),d.pointsCollinear(L,M,l)&&(c?(P&&P.chainRemoveTail(r.index,l),g.pop()):(P&&P.chainRemoveHead(r.index,l),g.shift())),P&&P.chainClose(r.index),_.push(g);return}c?(P&&P.chainAddHead(r.index,E),g.unshift(E)):(P&&P.chainAddTail(r.index,E),g.push(E));return}function D(R){P&&P.chainReverse(R),a[R].reverse()}function A(R,T){var O=a[R],N=a[T],H=O[O.length-1],k=O[O.length-2],V=N[0],G=N[1];d.pointsCollinear(k,H,V)&&(P&&P.chainRemoveTail(R,H),O.pop(),H=k),d.pointsCollinear(H,V,G)&&(P&&P.chainRemoveHead(T,V),N.shift()),P&&P.chainJoin(R,T),a[R]=O.concat(N),a.splice(T,1)}var C=r.index,S=n.index;P&&P.chainConnect(C,S);var o=a[C].length<a[S].length;r.matches_head?n.matches_head?o?(D(C),A(C,S)):(D(S),A(S,C)):A(S,C):n.matches_head?A(C,S):o?(D(C),A(S,C)):(D(S),A(C,S))}),_}z.exports=B},55968:function(z){function B(d,P,a){var _=[];return d.forEach(function(x){var v=(x.myFill.above?8:0)+(x.myFill.below?4:0)+(x.otherFill&&x.otherFill.above?2:0)+(x.otherFill&&x.otherFill.below?1:0);P[v]!==0&&_.push({id:a?a.segmentId():-1,start:x.start,end:x.end,myFill:{above:P[v]===1,below:P[v]===2},otherFill:null})}),a&&a.selected(_),_}var e={union:function(d,P){return B(d,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],P)},intersect:function(d,P){return B(d,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],P)},difference:function(d,P){return B(d,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],P)},differenceRev:function(d,P){return B(d,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],P)},xor:function(d,P){return B(d,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],P)}};z.exports=e},14847:function(z,B,e){var d=e(21630).Transform,P=e(90715);function a(){d.call(this,{readableObjectMode:!0})}a.prototype=Object.create(d.prototype),a.prototype.constructor=a,P(a.prototype),B.OF=function(x,v,y){for(var r=v,n=0;n<y.length;)if(x[r++]!==y[n++])return!1;return!0},B.eG=function(x,v){var y=[],r=0;if(v&&v==="hex")for(;r<x.length;)y.push(parseInt(x.slice(r,r+2),16)),r+=2;else for(;r<x.length;r++)y.push(x.charCodeAt(r)&255);return y},B.mP=function(x,v){return x[v]|x[v+1]<<8},B.n8=function(x,v){return x[v+1]|x[v]<<8},B.nm=function(x,v){return x[v]|x[v+1]<<8|x[v+2]<<16|x[v+3]*16777216},B.Ag=function(x,v){return x[v+3]|x[v+2]<<8|x[v+1]<<16|x[v]*16777216};function _(x,v,y){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=x,v&&(this.code=v),y&&(this.statusCode=y)}_.prototype=Object.create(Error.prototype),_.prototype.constructor=_},71371:function(z){function B(P,a){var _=new Error(P);return _.code=a,_}function e(P){try{return decodeURIComponent(escape(P))}catch{return P}}function d(P,a,_){this.input=P.subarray(a,_),this.start=a;var x=String.fromCharCode.apply(null,this.input.subarray(0,4));if(x!=="II*\0"&&x!=="MM\0*")throw B("invalid TIFF signature","EBADDATA");this.big_endian=x[0]==="M"}d.prototype.each=function(P){this.aborted=!1;var a=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:a}];this.ifds_to_read.length>0&&!this.aborted;){var _=this.ifds_to_read.shift();_.offset&&this.scan_ifd(_.id,_.offset,P)}},d.prototype.read_uint16=function(P){var a=this.input;if(P+2>a.length)throw B("unexpected EOF","EBADDATA");return this.big_endian?a[P]*256+a[P+1]:a[P]+a[P+1]*256},d.prototype.read_uint32=function(P){var a=this.input;if(P+4>a.length)throw B("unexpected EOF","EBADDATA");return this.big_endian?a[P]*16777216+a[P+1]*65536+a[P+2]*256+a[P+3]:a[P]+a[P+1]*256+a[P+2]*65536+a[P+3]*16777216},d.prototype.is_subifd_link=function(P,a){return P===0&&a===34665||P===0&&a===34853||P===34665&&a===40965},d.prototype.exif_format_length=function(P){switch(P){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}},d.prototype.exif_format_read=function(P,a){var _;switch(P){case 1:case 2:return _=this.input[a],_;case 6:return _=this.input[a],_|(_&128)*33554430;case 3:return _=this.read_uint16(a),_;case 8:return _=this.read_uint16(a),_|(_&32768)*131070;case 4:return _=this.read_uint32(a),_;case 9:return _=this.read_uint32(a),_|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},d.prototype.scan_ifd=function(P,a,_){var x=this.read_uint16(a);a+=2;for(var v=0;v<x;v++){var y=this.read_uint16(a),r=this.read_uint16(a+2),n=this.read_uint32(a+4),u=this.exif_format_length(r),i=n*u,f=i<=4?a+8:this.read_uint32(a+8),g=!1;if(f+i>this.input.length)throw B("unexpected EOF","EBADDATA");for(var h=[],b=f,p=0;p<n;p++,b+=u){var E=this.exif_format_read(r,b);if(E===null){h=null;break}h.push(E)}Array.isArray(h)&&r===2&&(h=e(String.fromCharCode.apply(null,h)),h&&h[h.length-1]==="\0"&&(h=h.slice(0,-1))),this.is_subifd_link(P,y)&&Array.isArray(h)&&Number.isInteger(h[0])&&h[0]>0&&(this.ifds_to_read.push({id:y,offset:h[0]}),g=!0);var c={is_big_endian:this.big_endian,ifd:P,tag:y,format:r,count:n,entry_offset:a+this.start,data_length:i,data_offset:f+this.start,value:h,is_subifd_link:g};if(_(c)===!1){this.aborted=!0;return}a+=12}P===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(a)})},z.exports.ExifParser=d,z.exports.get_orientation=function(P){var a=0;try{return new d(P,0,P.length).each(function(_){if(_.ifd===0&&_.tag===274&&Array.isArray(_.value))return a=_.value[0],!1}),a}catch{return-1}}},76767:function(z,B,e){var d=e(14847).n8,P=e(14847).Ag;function a(i,f){if(i.length<4+f)return null;var g=P(i,f);return i.length<g+f||g<8?null:{boxtype:String.fromCharCode.apply(null,i.slice(f+4,f+8)),data:i.slice(f+8,f+g),end:f+g}}z.exports.unbox=a;function _(i,f){for(var g=0;;){var h=a(i,g);if(!h)break;switch(h.boxtype){case"ispe":f.sizes.push({width:P(h.data,4),height:P(h.data,8)});break;case"irot":f.transforms.push({type:"irot",value:h.data[0]&3});break;case"imir":f.transforms.push({type:"imir",value:h.data[0]&1});break}g=h.end}}function x(i,f,g){for(var h=0,b=0;b<g;b++)h=h*256+(i[f+b]||0);return h}function v(i,f){for(var g=i[4]>>4&15,h=i[4]&15,b=i[5]>>4&15,p=d(i,6),E=8,c=0;c<p;c++){var l=d(i,E);E+=2;var m=d(i,E);E+=2;var M=x(i,E,b);E+=b;var L=d(i,E);if(E+=2,m===0&&L===1){var D=x(i,E,g),A=x(i,E+g,h);f.item_loc[l]={length:A,offset:D+M}}E+=L*(g+h)}}function y(i,f){for(var g=d(i,4),h=6,b=0;b<g;b++){var p=a(i,h);if(!p)break;if(p.boxtype==="infe"){for(var E=d(p.data,4),c="",l=8;l<p.data.length&&p.data[l];l++)c+=String.fromCharCode(p.data[l]);f.item_inf[c]=E}h=p.end}}function r(i,f){for(var g=0;;){var h=a(i,g);if(!h)break;h.boxtype==="ipco"&&_(h.data,f),g=h.end}}function n(i,f){for(var g=4;;){var h=a(i,g);if(!h)break;h.boxtype==="iprp"&&r(h.data,f),h.boxtype==="iloc"&&v(h.data,f),h.boxtype==="iinf"&&y(h.data,f),g=h.end}}function u(i){var f=i.reduce(function(b,p){return b.width>p.width||b.width===p.width&&b.height>p.height?b:p}),g=i.reduce(function(b,p){return b.height>p.height||b.height===p.height&&b.width>p.width?b:p}),h;return f.width>g.height||f.width===g.height&&f.height>g.width?h=f:h=g,h}z.exports.readSizeFromMeta=function(i){var f={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(n(i,f),!!f.sizes.length){var g=u(f.sizes),h=1;f.transforms.forEach(function(p){var E={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},c={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(p.type==="imir"&&(p.value===0?h=c[h]:(h=c[h],h=E[h],h=E[h])),p.type==="irot")for(var l=0;l<p.value;l++)h=E[h]});var b=null;return f.item_inf.Exif&&(b=f.item_loc[f.item_inf.Exif]),{width:g.width,height:g.height,orientation:f.transforms.length?h:null,variants:f.sizes,exif_location:b}}},z.exports.getMimeType=function(i){var f=String.fromCharCode.apply(null,i.slice(0,4)),g={};g[f]=!0;for(var h=8;h<i.length;h+=4)g[String.fromCharCode.apply(null,i.slice(h,h+4))]=!0;if(!(!g.mif1&&!g.msf1&&!g.miaf))return f==="avif"||f==="avis"||f==="avio"?{type:"avif",mime:"image/avif"}:f==="heic"||f==="heix"?{type:"heic",mime:"image/heic"}:f==="hevc"||f==="hevx"?{type:"heic",mime:"image/heic-sequence"}:g.avif||g.avis?{type:"avif",mime:"image/avif"}:g.heic||g.heix||g.hevc||g.hevx||g.heis?g.msf1?{type:"heif",mime:"image/heif-sequence"}:{type:"heif",mime:"image/heif"}:{type:"avif",mime:"image/avif"}}},24461:function(z,B,e){var d=e(14847).eG,P=e(14847).OF,a=e(14847).Ag,_=e(76767),x=e(71371),v=d("ftyp");z.exports=function(y){if(P(y,4,v)){var r=_.unbox(y,0);if(r){var n=_.getMimeType(r.data);if(n){for(var u,i=r.end;;){var f=_.unbox(y,i);if(!f)break;if(i=f.end,f.boxtype==="mdat")return;if(f.boxtype==="meta"){u=f.data;break}}if(u){var g=_.readSizeFromMeta(u);if(g){var h={width:g.width,height:g.height,type:n.type,mime:n.mime,wUnits:"px",hUnits:"px"};if(g.variants.length>1&&(h.variants=g.variants),g.orientation&&(h.orientation=g.orientation),g.exif_location&&g.exif_location.offset+g.exif_location.length<=y.length){var b=a(y,g.exif_location.offset),p=y.slice(g.exif_location.offset+b+4,g.exif_location.offset+g.exif_location.length),E=x.get_orientation(p);E>0&&(h.orientation=E)}return h}}}}}}},2504:function(z,B,e){var d=e(14847).eG,P=e(14847).OF,a=e(14847).mP,_=d("BM");z.exports=function(x){if(!(x.length<26)&&P(x,0,_))return{width:a(x,18),height:a(x,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},47342:function(z,B,e){var d=e(14847).eG,P=e(14847).OF,a=e(14847).mP,_=d("GIF87a"),x=d("GIF89a");z.exports=function(v){if(!(v.length<10)&&!(!P(v,0,_)&&!P(v,0,x)))return{width:a(v,6),height:a(v,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},31355:function(z,B,e){var d=e(14847).mP,P=0,a=1,_=16;z.exports=function(x){var v=d(x,0),y=d(x,2),r=d(x,4);if(!(v!==P||y!==a||!r)){for(var n=[],u={width:0,height:0},i=0;i<r;i++){var f=x[6+_*i]||256,g=x[6+_*i+1]||256,h={width:f,height:g};n.push(h),(f>u.width||g>u.height)&&(u=h)}return{width:u.width,height:u.height,variants:n,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},54261:function(z,B,e){var d=e(14847).n8,P=e(14847).eG,a=e(14847).OF,_=e(71371),x=P("Exif\0\0");z.exports=function(v){if(!(v.length<2)&&!(v[0]!==255||v[1]!==216||v[2]!==255))for(var y=2;;){for(;;){if(v.length-y<2)return;if(v[y++]===255)break}for(var r=v[y++],n;r===255;)r=v[y++];if(208<=r&&r<=217||r===1)n=0;else if(192<=r&&r<=254){if(v.length-y<2)return;n=d(v,y)-2,y+=2}else return;if(r===217||r===218)return;var u;if(r===225&&n>=10&&a(v,y,x)&&(u=_.get_orientation(v.slice(y+6,y+n))),n>=5&&192<=r&&r<=207&&r!==196&&r!==200&&r!==204){if(v.length-y<n)return;var i={width:d(v,y+3),height:d(v,y+1),type:"jpg",mime:"image/jpeg",wUnits:"px",hUnits:"px"};return u>0&&(i.orientation=u),i}y+=n}}},6303:function(z,B,e){var d=e(14847).eG,P=e(14847).OF,a=e(14847).Ag,_=d(`‰PNG\r

`),x=d("IHDR");z.exports=function(v){if(!(v.length<24)&&P(v,0,_)&&P(v,12,x))return{width:a(v,16),height:a(v,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},38689:function(z,B,e){var d=e(14847).eG,P=e(14847).OF,a=e(14847).Ag,_=d("8BPS\0");z.exports=function(x){if(!(x.length<22)&&P(x,0,_))return{width:a(x,18),height:a(x,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},6881:function(z){function B(u){return u===32||u===9||u===13||u===10}function e(u){return typeof u=="number"&&isFinite(u)&&u>0}function d(u){var i=0,f=u.length;for(u[0]===239&&u[1]===187&&u[2]===191&&(i=3);i<f&&B(u[i]);)i++;return i===f?!1:u[i]===60}var P=/<[-_.:a-zA-Z0-9][^>]*>/,a=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,_=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,x=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,v=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,y=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function r(u){var i=u.match(_),f=u.match(x),g=u.match(v);return{width:i&&(i[1]||i[2]),height:f&&(f[1]||f[2]),viewbox:g&&(g[1]||g[2])}}function n(u){return y.test(u)?u.match(y)[0]:"px"}z.exports=function(u){if(d(u)){for(var i="",f=0;f<u.length;f++)i+=String.fromCharCode(u[f]);var g=(i.match(P)||[""])[0];if(a.test(g)){var h=r(g),b=parseFloat(h.width),p=parseFloat(h.height);if(h.width&&h.height)return!e(b)||!e(p)?void 0:{width:b,height:p,type:"svg",mime:"image/svg+xml",wUnits:n(h.width),hUnits:n(h.height)};var E=(h.viewbox||"").split(" "),c={width:E[2],height:E[3]},l=parseFloat(c.width),m=parseFloat(c.height);if(!(!e(l)||!e(m))&&n(c.width)===n(c.height)){var M=l/m;return h.width?e(b)?{width:b,height:b/M,type:"svg",mime:"image/svg+xml",wUnits:n(h.width),hUnits:n(h.width)}:void 0:h.height?e(p)?{width:p*M,height:p,type:"svg",mime:"image/svg+xml",wUnits:n(h.height),hUnits:n(h.height)}:void 0:{width:l,height:m,type:"svg",mime:"image/svg+xml",wUnits:n(c.width),hUnits:n(c.height)}}}}}},66278:function(z,B,e){var d=e(14847).eG,P=e(14847).OF,a=e(14847).mP,_=e(14847).n8,x=e(14847).nm,v=e(14847).Ag,y=d("II*\0"),r=d("MM\0*");function n(f,g,h){return h?_(f,g):a(f,g)}function u(f,g,h){return h?v(f,g):x(f,g)}function i(f,g,h){var b=n(f,g+2,h),p=u(f,g+4,h);return p!==1||b!==3&&b!==4?null:b===3?n(f,g+8,h):u(f,g+8,h)}z.exports=function(f){if(!(f.length<8)&&!(!P(f,0,y)&&!P(f,0,r))){var g=f[0]===77,h=u(f,4,g)-8;if(!(h<0)){var b=h+8;if(!(f.length-b<2)){var p=n(f,b+0,g)*12;if(!(p<=0)&&(b+=2,!(f.length-b<p))){var E,c,l,m;for(E=0;E<p;E+=12)m=n(f,b+E,g),m===256?c=i(f,b+E,g):m===257&&(l=i(f,b+E,g));if(c&&l)return{width:c,height:l,type:"tiff",mime:"image/tiff",wUnits:"px",hUnits:"px"}}}}}}},90784:function(z,B,e){var d=e(14847).eG,P=e(14847).OF,a=e(14847).mP,_=e(14847).nm,x=e(71371),v=d("RIFF"),y=d("WEBP");function r(i,f){if(!(i[f+3]!==157||i[f+4]!==1||i[f+5]!==42))return{width:a(i,f+6)&16383,height:a(i,f+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function n(i,f){if(i[f]===47){var g=_(i,f+1);return{width:(g&16383)+1,height:(g>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function u(i,f){return{width:(i[f+6]<<16|i[f+5]<<8|i[f+4])+1,height:(i[f+9]<<f|i[f+8]<<8|i[f+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}z.exports=function(i){if(!(i.length<16)&&!(!P(i,0,v)&&!P(i,8,y))){var f=12,g=null,h=0,b=_(i,4)+8;if(!(b>i.length)){for(;f+8<b;){if(i[f]===0){f++;continue}var p=String.fromCharCode.apply(null,i.slice(f,f+4)),E=_(i,f+4);p==="VP8 "&&E>=10?g=g||r(i,f+8):p==="VP8L"&&E>=9?g=g||n(i,f+8):p==="VP8X"&&E>=10?g=g||u(i,f+8):p==="EXIF"&&(h=x.get_orientation(i.slice(f+8,f+8+E)),f=1/0),f+=8+E}if(g)return h>0&&(g.orientation=h),g}}}},91497:function(z,B,e){z.exports={avif:e(24461),bmp:e(2504),gif:e(47342),ico:e(31355),jpeg:e(54261),png:e(6303),psd:e(38689),svg:e(6881),tiff:e(66278),webp:e(90784)}},33575:function(z,B,e){var d=e(91497);function P(a){for(var _=Object.keys(d),x=0;x<_.length;x++){var v=d[_[x]](a);if(v)return v}return null}z.exports=function(_){return P(_)},z.exports.parsers=d},90386:function(z){var B=z.exports={},e,d;function P(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?e=setTimeout:e=P}catch{e=P}try{typeof clearTimeout=="function"?d=clearTimeout:d=a}catch{d=a}})();function _(h){if(e===setTimeout)return setTimeout(h,0);if((e===P||!e)&&setTimeout)return e=setTimeout,setTimeout(h,0);try{return e(h,0)}catch{try{return e.call(null,h,0)}catch{return e.call(this,h,0)}}}function x(h){if(d===clearTimeout)return clearTimeout(h);if((d===a||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(h);try{return d(h)}catch{try{return d.call(null,h)}catch{return d.call(this,h)}}}var v=[],y=!1,r,n=-1;function u(){!y||!r||(y=!1,r.length?v=r.concat(v):n=-1,v.length&&i())}function i(){if(!y){var h=_(u);y=!0;for(var b=v.length;b;){for(r=v,v=[];++n<b;)r&&r[n].run();n=-1,b=v.length}r=null,y=!1,x(h)}}B.nextTick=function(h){var b=new Array(arguments.length-1);if(arguments.length>1)for(var p=1;p<arguments.length;p++)b[p-1]=arguments[p];v.push(new f(h,b)),v.length===1&&!y&&_(i)};function f(h,b){this.fun=h,this.array=b}f.prototype.run=function(){this.fun.apply(null,this.array)},B.title="browser",B.browser=!0,B.env={},B.argv=[],B.version="",B.versions={};function g(){}B.on=g,B.addListener=g,B.once=g,B.off=g,B.removeListener=g,B.removeAllListeners=g,B.emit=g,B.prependListener=g,B.prependOnceListener=g,B.listeners=function(h){return[]},B.binding=function(h){throw new Error("process.binding is not supported")},B.cwd=function(){return"/"},B.chdir=function(h){throw new Error("process.chdir is not supported")},B.umask=function(){return 0}},5877:function(z,B,e){for(var d=e(9748),P=typeof window>"u"?e.g:window,a=["moz","webkit"],_="AnimationFrame",x=P["request"+_],v=P["cancel"+_]||P["cancelRequest"+_],y=0;!x&&y<a.length;y++)x=P[a[y]+"Request"+_],v=P[a[y]+"Cancel"+_]||P[a[y]+"CancelRequest"+_];if(!x||!v){var r=0,n=0,u=[],i=1e3/60;x=function(f){if(u.length===0){var g=d(),h=Math.max(0,i-(g-r));r=h+g,setTimeout(function(){var b=u.slice(0);u.length=0;for(var p=0;p<b.length;p++)if(!b[p].cancelled)try{b[p].callback(r)}catch(E){setTimeout(function(){throw E},0)}},Math.round(h))}return u.push({handle:++n,callback:f,cancelled:!1}),n},v=function(f){for(var g=0;g<u.length;g++)u[g].handle===f&&(u[g].cancelled=!0)}}z.exports=function(f){return x.call(P,f)},z.exports.cancel=function(){v.apply(P,arguments)},z.exports.polyfill=function(f){f||(f=P),f.requestAnimationFrame=x,f.cancelAnimationFrame=v}},3593:function(z,B,e){var d=e(21527),P=e(25075),a=e(93447),_=e(71299),x=e(56131),v=e(30120),y=e(57060),r=y.float32,n=y.fract32;z.exports=i;var u=[[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 i(f,g){if(typeof f=="function"?(g||(g={}),g.regl=f):g=f,g.length&&(g.positions=g),f=g.regl,!f.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");var h=f._gl,b,p,E,c,l,m,M={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},L=[];return c=f.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),p=f.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),E=f.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),l=f.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),m=f.buffer({usage:"static",type:"float",data:u}),S(g),b=f({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:f.prop("range"),lineWidth:f.prop("lineWidth"),capSize:f.prop("capSize"),opacity:f.prop("opacity"),scale:f.prop("scale"),translate:f.prop("translate"),scaleFract:f.prop("scaleFract"),translateFract:f.prop("translateFract"),viewport:function(R,T){return[T.viewport.x,T.viewport.y,R.viewportWidth,R.viewportHeight]}},attributes:{color:{buffer:c,offset:function(R,T){return T.offset*4},divisor:1},position:{buffer:p,offset:function(R,T){return T.offset*8},divisor:1},positionFract:{buffer:E,offset:function(R,T){return T.offset*8},divisor:1},error:{buffer:l,offset:function(R,T){return T.offset*16},divisor:1},direction:{buffer:m,stride:24,offset:0},lineOffset:{buffer:m,stride:24,offset:8},capOffset:{buffer:m,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:f.prop("viewport")},viewport:f.prop("viewport"),stencil:!1,instances:f.prop("count"),count:u.length}),x(D,{update:S,draw:A,destroy:o,regl:f,gl:h,canvas:h.canvas,groups:L}),D;function D(R){R?S(R):R===null&&o(),A()}function A(R){if(typeof R=="number")return C(R);R&&!Array.isArray(R)&&(R=[R]),f._refresh(),L.forEach(function(T,O){if(T){if(R&&(R[O]?T.draw=!0:T.draw=!1),!T.draw){T.draw=!0;return}C(O)}})}function C(R){typeof R=="number"&&(R=L[R]),R!=null&&R&&R.count&&R.color&&R.opacity&&R.positions&&R.positions.length>1&&(R.scaleRatio=[R.scale[0]*R.viewport.width,R.scale[1]*R.viewport.height],b(R),R.after&&R.after(R))}function S(R){if(R){R.length!=null?typeof R[0]=="number"&&(R=[{positions:R}]):Array.isArray(R)||(R=[R]);var T=0,O=0;if(D.groups=L=R.map(function(Y,ee){var re=L[ee];if(Y)typeof Y=="function"?Y={after:Y}:typeof Y[0]=="number"&&(Y={positions:Y});else return re;return Y=_(Y,{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"}),re||(L[ee]=re={id:ee,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},Y=x({},M,Y)),a(re,Y,[{lineWidth:function(ie){return+ie*.5},capSize:function(ie){return+ie*.5},opacity:parseFloat,errors:function(ie){return ie=v(ie),O+=ie.length,ie},positions:function(ie,se){return ie=v(ie,"float64"),se.count=Math.floor(ie.length/2),se.bounds=d(ie,2),se.offset=T,T+=se.count,ie}},{color:function(ie,se){var ce=se.count;if(ie||(ie="transparent"),!Array.isArray(ie)||typeof ie[0]=="number"){var q=ie;ie=Array(ce);for(var j=0;j<ce;j++)ie[j]=q}if(ie.length<ce)throw Error("Not enough colors");for(var Z=new Uint8Array(ce*4),Q=0;Q<ce;Q++){var ue=P(ie[Q],"uint8");Z.set(ue,Q*4)}return Z},range:function(ie,se,ce){var q=se.bounds;return ie||(ie=q),se.scale=[1/(ie[2]-ie[0]),1/(ie[3]-ie[1])],se.translate=[-ie[0],-ie[1]],se.scaleFract=n(se.scale),se.translateFract=n(se.translate),ie},viewport:function(ie){var se;return Array.isArray(ie)?se={x:ie[0],y:ie[1],width:ie[2]-ie[0],height:ie[3]-ie[1]}:ie?(se={x:ie.x||ie.left||0,y:ie.y||ie.top||0},ie.right?se.width=ie.right-se.x:se.width=ie.w||ie.width||0,ie.bottom?se.height=ie.bottom-se.y:se.height=ie.h||ie.height||0):se={x:0,y:0,width:h.drawingBufferWidth,height:h.drawingBufferHeight},se}}]),re}),T||O){var N=L.reduce(function(Y,ee,re){return Y+(ee?ee.count:0)},0),H=new Float64Array(N*2),k=new Uint8Array(N*4),V=new Float32Array(N*4);L.forEach(function(Y,ee){if(Y){var re=Y.positions,ie=Y.count,se=Y.offset,ce=Y.color,q=Y.errors;ie&&(k.set(ce,se*4),V.set(q,se*4),H.set(re,se*2))}});var G=r(H);p(G);var U=n(H,G);E(U),c(k),l(V)}}}function o(){p.destroy(),E.destroy(),c.destroy(),l.destroy(),m.destroy()}}},46075:function(z,B,e){var d=e(25075),P=e(21527),a=e(56131),_=e(56068),x=e(71299),v=e(30120),y=e(11474),r=e(54),n=e(57060),u=n.float32,i=n.fract32,f=e(83522),g=e(18863),h=e(6851);z.exports=b;function b(p,E){if(!(this instanceof b))return new b(p,E);if(typeof p=="function"?(E||(E={}),E.regl=p):E=p,E.length&&(E.positions=E),p=E.regl,!p.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=p._gl,this.regl=p,this.passes=[],this.shaders=b.shaders.has(p)?b.shaders.get(p):b.shaders.set(p,b.createShaders(p)).get(p),this.update(E)}b.dashMult=2,b.maxPatternLength=256,b.precisionThreshold=3e6,b.maxPoints=1e4,b.maxLines=2048,b.shaders=new f,b.createShaders=function(p){var E=p.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),c={primitive:"triangle strip",instances:p.prop("count"),count:4,offset:0,uniforms:{miterMode:function(L,D){return D.join==="round"?2:1},miterLimit:p.prop("miterLimit"),scale:p.prop("scale"),scaleFract:p.prop("scaleFract"),translateFract:p.prop("translateFract"),translate:p.prop("translate"),thickness:p.prop("thickness"),dashTexture:p.prop("dashTexture"),opacity:p.prop("opacity"),pixelRatio:p.context("pixelRatio"),id:p.prop("id"),dashLength:p.prop("dashLength"),viewport:function(L,D){return[D.viewport.x,D.viewport.y,L.viewportWidth,L.viewportHeight]},depth:p.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:function(L,D){return!D.overlay}},stencil:{enable:!1},scissor:{enable:!0,box:p.prop("viewport")},viewport:p.prop("viewport")},l=p(a({vert:_([`precision highp float;
#define GLSLIFY 1
attribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;
attribute vec4 color;
attribute float lineEnd, lineTop;
uniform vec2 scale, scaleFract, translate, translateFract;
uniform float thickness, pixelRatio, id, depth;
uniform vec4 viewport;
varying vec4 fragColor;
varying vec2 tangent;
vec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {
// the order is important
return position * scale + translate
+ positionFract * scale + translateFract
+ position * scaleFract
+ positionFract * scaleFract;
}
void main() {
float lineStart = 1. - lineEnd;
float lineOffset = lineTop * 2. - 1.;
vec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);
tangent = normalize(diff * scale * viewport.zw);
vec2 normal = vec2(-tangent.y, tangent.x);
vec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart
+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd
+ thickness * normal * .5 * lineOffset / viewport.zw;
gl_Position = vec4(position * 2.0 - 1.0, depth, 1);
fragColor = color / 255.;
}
`]),frag:_([`precision highp float;
#define GLSLIFY 1
uniform float dashLength, pixelRatio, thickness, opacity, id;
uniform sampler2D dashTexture;
varying vec4 fragColor;
varying vec2 tangent;
void main() {
float alpha = 1.;
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;
}
`]),attributes:{lineEnd:{buffer:E,divisor:0,stride:8,offset:0},lineTop:{buffer:E,divisor:0,stride:8,offset:4},aCoord:{buffer:p.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:p.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:p.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:p.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:p.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},c)),m;try{m=p(a({cull:{enable:!0,face:"back"},vert:_([`precision highp float;
#define GLSLIFY 1
attribute vec2 aCoord, bCoord, nextCoord, prevCoord;
attribute vec4 aColor, bColor;
attribute float lineEnd, lineTop;
uniform vec2 scale, translate;
uniform float thickness, pixelRatio, id, depth;
uniform vec4 viewport;
uniform float miterLimit, miterMode;
varying vec4 fragColor;
varying vec4 startCutoff, endCutoff;
varying vec2 tangent;
varying vec2 startCoord, endCoord;
varying float enableStartMiter, enableEndMiter;
const float REVERSE_THRESHOLD = -.875;
const float MIN_DIFF = 1e-6;
// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead
// TODO: precalculate dot products, normalize things beforehead etc.
// TODO: refactor to rectangular algorithm
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);
}
bool isNaN( float val ){
return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;
}
void main() {
vec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;
vec2 adjustedScale;
adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x;
adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y;
vec2 scaleRatio = adjustedScale * viewport.zw;
vec2 normalWidth = thickness / scaleRatio;
float lineStart = 1. - lineEnd;
float lineBot = 1. - lineTop;
fragColor = (lineStart * aColor + lineEnd * bColor) / 255.;
if (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;
if (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);
if (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);
vec2 prevDiff = aCoord - prevCoord;
vec2 currDiff = bCoord - aCoord;
vec2 nextDiff = nextCoord - bCoord;
vec2 prevTangent = normalize(prevDiff * scaleRatio);
vec2 currTangent = normalize(currDiff * scaleRatio);
vec2 nextTangent = normalize(nextDiff * scaleRatio);
vec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);
vec2 currNormal = vec2(-currTangent.y, currTangent.x);
vec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);
vec2 startJoinDirection = normalize(prevTangent - currTangent);
vec2 endJoinDirection = normalize(currTangent - nextTangent);
// collapsed/unidirectional segment cases
// FIXME: there should be more elegant solution
vec2 prevTanDiff = abs(prevTangent - currTangent);
vec2 nextTanDiff = abs(nextTangent - currTangent);
if (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) {
startJoinDirection = currNormal;
}
if (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) {
endJoinDirection = currNormal;
}
if (aCoord == bCoord) {
endJoinDirection = startJoinDirection;
currNormal = prevNormal;
currTangent = prevTangent;
}
tangent = currTangent;
//calculate join shifts relative to normals
float startJoinShift = dot(currNormal, startJoinDirection);
float endJoinShift = dot(currNormal, endJoinDirection);
float startMiterRatio = abs(1. / startJoinShift);
float endMiterRatio = abs(1. / endJoinShift);
vec2 startJoin = startJoinDirection * startMiterRatio;
vec2 endJoin = endJoinDirection * endMiterRatio;
vec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;
startTopJoin = sign(startJoinShift) * startJoin * .5;
startBotJoin = -startTopJoin;
endTopJoin = sign(endJoinShift) * endJoin * .5;
endBotJoin = -endTopJoin;
vec2 aTopCoord = aCoord + normalWidth * startTopJoin;
vec2 bTopCoord = bCoord + normalWidth * endTopJoin;
vec2 aBotCoord = aCoord + normalWidth * startBotJoin;
vec2 bBotCoord = bCoord + normalWidth * endBotJoin;
//miter anti-clipping
float baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));
float abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));
//prevent close to reverse direction switch
bool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) < length(normalWidth * currNormal);
bool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) < length(normalWidth * currNormal);
if (prevReverse) {
//make join rectangular
vec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;
float normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);
aBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;
aTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;
}
else if (!nextReverse && baClipping > 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;
}
}
}
`]),frag:_([`precision highp float;
#define GLSLIFY 1
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;
}
`]),attributes:{lineEnd:{buffer:E,divisor:0,stride:8,offset:0},lineTop:{buffer:E,divisor:0,stride:8,offset:4},aColor:{buffer:p.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:p.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:p.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:p.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:p.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:p.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},c))}catch{m=l}var M=p({primitive:"triangle",elements:function(L,D){return D.triangles},offset:0,vert:_([`precision highp float;
#define GLSLIFY 1
attribute vec2 position, positionFract;
uniform vec4 color;
uniform vec2 scale, scaleFract, translate, translateFract;
uniform float pixelRatio, id;
uniform vec4 viewport;
uniform float opacity;
varying vec4 fragColor;
const float MAX_LINES = 256.;
void main() {
float depth = (MAX_LINES - 4. - id) / (MAX_LINES);
vec2 position = position * scale + translate
+ positionFract * scale + translateFract
+ position * scaleFract
+ positionFract * scaleFract;
gl_Position = vec4(position * 2.0 - 1.0, depth, 1);
fragColor = color / 255.;
fragColor.a *= opacity;
}
`]),frag:_([`precision highp float;
#define GLSLIFY 1
varying vec4 fragColor;
void main() {
gl_FragColor = fragColor;
}
`]),uniforms:{scale:p.prop("scale"),color:p.prop("fill"),scaleFract:p.prop("scaleFract"),translateFract:p.prop("translateFract"),translate:p.prop("translate"),opacity:p.prop("opacity"),pixelRatio:p.context("pixelRatio"),id:p.prop("id"),viewport:function(L,D){return[D.viewport.x,D.viewport.y,L.viewportWidth,L.viewportHeight]}},attributes:{position:{buffer:p.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:p.prop("positionFractBuffer"),stride:8,offset:8}},blend:c.blend,depth:{enable:!1},scissor:c.scissor,stencil:c.stencil,viewport:c.viewport});return{fill:M,rect:l,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(){for(var p,E=[],c=arguments.length;c--;)E[c]=arguments[c];E.length&&(p=this).update.apply(p,E),this.draw()},b.prototype.draw=function(){for(var p=this,E=[],c=arguments.length;c--;)E[c]=arguments[c];return(E.length?E:this.passes).forEach(function(l,m){var M;if(l&&Array.isArray(l))return(M=p).draw.apply(M,l);typeof l=="number"&&(l=p.passes[l]),l&&l.count>1&&l.opacity&&(p.regl._refresh(),l.fill&&l.triangles&&l.triangles.length>2&&p.shaders.fill(l),l.thickness&&(l.scale[0]*l.viewport.width>b.precisionThreshold||l.scale[1]*l.viewport.height>b.precisionThreshold||l.join==="rect"||!l.join&&(l.thickness<=2||l.count>=b.maxPoints)?p.shaders.rect(l):p.shaders.miter(l)))}),this},b.prototype.update=function(p){var E=this;if(p){p.length!=null?typeof p[0]=="number"&&(p=[{positions:p}]):Array.isArray(p)||(p=[p]);var c=this,l=c.regl,m=c.gl;if(p.forEach(function(C,S){var o=E.passes[S];if(C!==void 0){if(C===null){E.passes[S]=null;return}if(typeof C[0]=="number"&&(C={positions:C}),C=x(C,{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"}),o||(E.passes[S]=o={id:S,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:l.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:l.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:l.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:l.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},C=a({},b.defaults,C)),C.thickness!=null&&(o.thickness=parseFloat(C.thickness)),C.opacity!=null&&(o.opacity=parseFloat(C.opacity)),C.miterLimit!=null&&(o.miterLimit=parseFloat(C.miterLimit)),C.overlay!=null&&(o.overlay=!!C.overlay,S<b.maxLines&&(o.depth=2*(b.maxLines-1-S%b.maxLines)/b.maxLines-1)),C.join!=null&&(o.join=C.join),C.hole!=null&&(o.hole=C.hole),C.fill!=null&&(o.fill=C.fill?d(C.fill,"uint8"):null),C.viewport!=null&&(o.viewport=g(C.viewport)),o.viewport||(o.viewport=g([m.drawingBufferWidth,m.drawingBufferHeight])),C.close!=null&&(o.close=C.close),C.positions===null&&(C.positions=[]),C.positions){var R,T;if(C.positions.x&&C.positions.y){var O=C.positions.x,N=C.positions.y;T=o.count=Math.max(O.length,N.length),R=new Float64Array(T*2);for(var H=0;H<T;H++)R[H*2]=O[H],R[H*2+1]=N[H]}else R=v(C.positions,"float64"),T=o.count=Math.floor(R.length/2);var k=o.bounds=P(R,2);if(o.fill){for(var V=[],G={},U=0,Y=0,ee=0,re=o.count;Y<re;Y++){var ie=R[Y*2],se=R[Y*2+1];isNaN(ie)||isNaN(se)||ie==null||se==null?(ie=R[U*2],se=R[U*2+1],G[Y]=U):U=Y,V[ee++]=ie,V[ee++]=se}if(C.splitNull){o.count-1 in G||(G[o.count]=o.count-1);var ce=Object.keys(G).map(Number).sort(function(Qe,Fe){return Qe-Fe}),q=[],j=0,Z=o.hole!=null?o.hole[0]:null;if(Z!=null){var Q=h(ce,function(Qe){return Qe>=Z});ce=ce.slice(0,Q),ce.push(Z)}for(var ue=function(Qe){var Fe=V.slice(j*2,ce[Qe]*2).concat(Z?V.slice(Z*2):[]),Ce=(o.hole||[]).map(function(we){return we-Z+(ce[Qe]-j)}),pe=y(Fe,Ce);pe=pe.map(function(we){return we+j+(we+j<ce[Qe]?0:Z-ce[Qe])}),q.push.apply(q,pe),j=ce[Qe]+1},fe=0;fe<ce.length;fe++)ue(fe);for(var te=0,ne=q.length;te<ne;te++)G[q[te]]!=null&&(q[te]=G[q[te]]);o.triangles=q}else{for(var ve=y(V,o.hole||[]),le=0,xe=ve.length;le<xe;le++)G[ve[le]]!=null&&(ve[le]=G[ve[le]]);o.triangles=ve}}var Se=new Float64Array(R);r(Se,2,k);var Re=new Float64Array(T*2+6);o.close?R[0]===R[T*2-2]&&R[1]===R[T*2-1]?(Re[0]=Se[T*2-4],Re[1]=Se[T*2-3]):(Re[0]=Se[T*2-2],Re[1]=Se[T*2-1]):(Re[0]=Se[0],Re[1]=Se[1]),Re.set(Se,2),o.close?R[0]===R[T*2-2]&&R[1]===R[T*2-1]?(Re[T*2+2]=Se[2],Re[T*2+3]=Se[3],o.count-=1):(Re[T*2+2]=Se[0],Re[T*2+3]=Se[1],Re[T*2+4]=Se[2],Re[T*2+5]=Se[3]):(Re[T*2+2]=Se[T*2-2],Re[T*2+3]=Se[T*2-1],Re[T*2+4]=Se[T*2-2],Re[T*2+5]=Se[T*2-1]);var Ee=u(Re);o.positionBuffer(Ee);var Oe=i(Re,Ee);o.positionFractBuffer(Oe)}if(C.range?o.range=C.range:o.range||(o.range=o.bounds),(C.range||C.positions)&&o.count){var Be=o.bounds,Le=Be[2]-Be[0],Te=Be[3]-Be[1],De=o.range[2]-o.range[0],Ve=o.range[3]-o.range[1];o.scale=[Le/De,Te/Ve],o.translate=[-o.range[0]/De+Be[0]/De||0,-o.range[1]/Ve+Be[1]/Ve||0],o.scaleFract=i(o.scale),o.translateFract=i(o.translate)}if(C.dashes){var Ye=0,Ne;if(!C.dashes||C.dashes.length<2)Ye=1,Ne=new Uint8Array([255,255,255,255,255,255,255,255]);else{Ye=0;for(var Xe=0;Xe<C.dashes.length;++Xe)Ye+=C.dashes[Xe];Ne=new Uint8Array(Ye*b.dashMult);for(var ht=0,st=255,it=0;it<2;it++)for(var nt=0;nt<C.dashes.length;++nt){for(var pt=0,Tt=C.dashes[nt]*b.dashMult*.5;pt<Tt;++pt)Ne[ht++]=st;st^=255}}o.dashLength=Ye,o.dashTexture({channels:1,data:Ne,width:Ne.length,height:1,mag:"linear",min:"linear"},0,0)}if(C.color){var Et=o.count,Dt=C.color;Dt||(Dt="transparent");var et=new Uint8Array(Et*4+4);if(!Array.isArray(Dt)||typeof Dt[0]=="number")for(var Ue=d(Dt,"uint8"),ze=0;ze<Et+1;ze++)et.set(Ue,ze*4);else{for(var rt=0;rt<Et;rt++){var lt=d(Dt[rt],"uint8");et.set(lt,rt*4)}et.set(d(Dt[0],"uint8"),Et*4)}o.colorBuffer({usage:"dynamic",type:"uint8",data:et})}}}),p.length<this.passes.length){for(var M=p.length;M<this.passes.length;M++){var L=this.passes[M];L&&(L.colorBuffer.destroy(),L.positionBuffer.destroy(),L.dashTexture.destroy())}this.passes.length=p.length}for(var D=[],A=0;A<this.passes.length;A++)this.passes[A]!==null&&D.push(this.passes[A]);return this.passes=D,this}},b.prototype.destroy=function(){return this.passes.forEach(function(p){p.colorBuffer.destroy(),p.positionBuffer.destroy(),p.dashTexture.destroy()}),this.passes.length=0,this}},11870:function(z,B,e){function d(o,R){return _(o)||v(o,R)||y(o,R)||u()}function P(o){return a(o)||x(o)||y(o)||n()}function a(o){if(Array.isArray(o))return r(o)}function _(o){if(Array.isArray(o))return o}function x(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}function v(o,R){var T=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(T!=null){var O=[],N=!0,H=!1,k,V;try{for(T=T.call(o);!(N=(k=T.next()).done)&&(O.push(k.value),!(R&&O.length===R));N=!0);}catch(G){H=!0,V=G}finally{try{!N&&T.return!=null&&T.return()}finally{if(H)throw V}}return O}}function y(o,R){if(o){if(typeof o=="string")return r(o,R);var T=Object.prototype.toString.call(o).slice(8,-1);if(T==="Object"&&o.constructor&&(T=o.constructor.name),T==="Map"||T==="Set")return Array.from(o);if(T==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(T))return r(o,R)}}function r(o,R){(R==null||R>o.length)&&(R=o.length);for(var T=0,O=new Array(R);T<R;T++)O[T]=o[T];return O}function n(){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 u(){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 i=e(25075),f=e(21527),g=e(6475),h=e(88294),b=e(56131),p=e(56068),E=e(71299),c=e(93447),l=e(30120),m=e(62683),M=e(57060),L=e(18863),D=A;function A(o,R){var T=this;if(!(this instanceof A))return new A(o,R);typeof o=="function"?(R||(R={}),R.regl=o):(R=o,o=null),R&&R.length&&(R.positions=R),o=R.regl;var O=o._gl,N,H=[],k={},V=[],G=[null],U=[null],Y=255,ee=100;this.tooManyColors=m,N=o.texture({data:new Uint8Array(Y*4),width:Y,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),b(this,{regl:o,gl:O,groups:V,markerCache:U,markerTextures:G,palette:H,paletteIds:k,paletteTexture:N,maxColors:Y,maxSize:ee,canvas:O.canvas}),this.update(R);var re={uniforms:{constPointSize:!!R.constPointSize,opacity:o.prop("opacity"),paletteSize:function(q,j){return[T.tooManyColors?0:Y,N.height]},pixelRatio:o.context("pixelRatio"),scale:o.prop("scale"),scaleFract:o.prop("scaleFract"),translate:o.prop("translate"),translateFract:o.prop("translateFract"),markerTexture:o.prop("markerTexture"),paletteTexture:N},attributes:{x:function(q,j){return j.xAttr||{buffer:j.positionBuffer,stride:8,offset:0}},y:function(q,j){return j.yAttr||{buffer:j.positionBuffer,stride:8,offset:4}},xFract:function(q,j){return j.xAttr?{constant:[0,0]}:{buffer:j.positionFractBuffer,stride:8,offset:0}},yFract:function(q,j){return j.yAttr?{constant:[0,0]}:{buffer:j.positionFractBuffer,stride:8,offset:4}},size:function(q,j){return j.size.length?{buffer:j.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(j.size*255/T.maxSize)]}},borderSize:function(q,j){return j.borderSize.length?{buffer:j.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(j.borderSize*255/T.maxSize)]}},colorId:function(q,j){return j.color.length?{buffer:j.colorBuffer,stride:T.tooManyColors?8:4,offset:0}:{constant:T.tooManyColors?H.slice(j.color*4,j.color*4+4):[j.color]}},borderColorId:function(q,j){return j.borderColor.length?{buffer:j.colorBuffer,stride:T.tooManyColors?8:4,offset:T.tooManyColors?4:2}:{constant:T.tooManyColors?H.slice(j.borderColor*4,j.borderColor*4+4):[j.borderColor]}},isActive:function(q,j){return j.activation===!0?{constant:[1]}:j.activation?j.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:o.prop("viewport")},viewport:o.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:o.prop("elements"),count:o.prop("count"),offset:o.prop("offset"),primitive:"points"},ie=b({},re);ie.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;
}
}
`]),ie.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;
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=o(ie);var se=b({},re);se.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;
}
`]),se.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;
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;
}
`]),m&&(se.frag=se.frag.replace("smoothstep","smoothStep"),ie.frag=ie.frag.replace("smoothstep","smoothStep")),this.drawCircle=o(se)}A.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},A.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},A.prototype.draw=function(){for(var o=this,R=arguments.length,T=new Array(R),O=0;O<R;O++)T[O]=arguments[O];var N=this.groups;if(T.length===1&&Array.isArray(T[0])&&(T[0][0]===null||Array.isArray(T[0][0]))&&(T=T[0]),this.regl._refresh(),T.length)for(var H=0;H<T.length;H++)this.drawItem(H,T[H]);else N.forEach(function(k,V){o.drawItem(V)});return this},A.prototype.drawItem=function(o,R){var T=this.groups,O=T[o];if(typeof R=="number"&&(o=R,O=T[R],R=null),!!(O&&O.count&&O.opacity)){O.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,O,R));for(var N=[],H=1;H<O.activation.length;H++)!O.activation[H]||O.activation[H]!==!0&&!O.activation[H].data.length||N.push.apply(N,P(this.getMarkerDrawOptions(H,O,R)));N.length&&this.drawMarker(N)}},A.prototype.getMarkerDrawOptions=function(o,R,T){var O=R.range,N=R.tree,H=R.viewport,k=R.activation,V=R.selectionBuffer,G=R.count;if(this.regl,!N)return T?[b({},R,{markerTexture:this.markerTextures[o],activation:k[o],count:T.length,elements:T,offset:0})]:[b({},R,{markerTexture:this.markerTextures[o],activation:k[o],offset:0})];var U=[],Y=N.range(O,{lod:!0,px:[(O[2]-O[0])/H.width,(O[3]-O[1])/H.height]});if(T){for(var ee=k[o],re=ee.data,ie=new Uint8Array(G),se=0;se<T.length;se++){var ce=T[se];ie[ce]=re?re[ce]:1}V.subdata(ie)}for(var q=Y.length;q--;){var j=d(Y[q],2),Z=j[0],Q=j[1];U.push(b({},R,{markerTexture:this.markerTextures[o],activation:T?V:k[o],offset:Z,count:Q-Z}))}return U},A.prototype.update=function(){for(var o=this,R=arguments.length,T=new Array(R),O=0;O<R;O++)T[O]=arguments[O];if(T.length){T.length===1&&Array.isArray(T[0])&&(T=T[0]);var N=this.groups,H=this.gl,k=this.regl,V=this.maxSize,G=this.maxColors,U=this.palette;this.groups=N=T.map(function(Y,ee){var re=N[ee];if(Y===void 0)return re;Y===null?Y={positions:null}:typeof Y=="function"?Y={ondraw:Y}:typeof Y[0]=="number"&&(Y={positions:Y}),Y=E(Y,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"}),Y.positions===null&&(Y.positions=[]),Y.tooManyColors!=null&&(o.tooManyColors=Y.tooManyColors),re||(N[ee]=re={id:ee,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:k.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:k.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:k.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:k.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:k.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},Y=b({},A.defaults,Y)),Y.positions&&!("marker"in Y)&&(Y.marker=re.marker,delete re.marker),Y.marker&&!("positions"in Y)&&(Y.positions=re.positions,delete re.positions);var ie=0,se=0;if(c(re,Y,[{snap:!0,size:function(Te,De){return Te==null&&(Te=A.defaults.size),ie+=Te&&Te.length?1:0,Te},borderSize:function(Te,De){return Te==null&&(Te=A.defaults.borderSize),ie+=Te&&Te.length?1:0,Te},opacity:parseFloat,color:function(Te,De){return Te==null&&(Te=A.defaults.color),Te=o.updateColor(Te),se++,Te},borderColor:function(Te,De){return Te==null&&(Te=A.defaults.borderColor),Te=o.updateColor(Te),se++,Te},bounds:function(Te,De,Ve){return"range"in Ve||(Ve.range=null),Te},positions:function(Te,De,Ve){var Ye=De.snap,Ne=De.positionBuffer,Xe=De.positionFractBuffer,ht=De.selectionBuffer;if(Te.x||Te.y)return Te.x.length?De.xAttr={buffer:k.buffer(Te.x),offset:0,stride:4,count:Te.x.length}:De.xAttr={buffer:Te.x.buffer,offset:Te.x.offset*4||0,stride:(Te.x.stride||1)*4,count:Te.x.count},Te.y.length?De.yAttr={buffer:k.buffer(Te.y),offset:0,stride:4,count:Te.y.length}:De.yAttr={buffer:Te.y.buffer,offset:Te.y.offset*4||0,stride:(Te.y.stride||1)*4,count:Te.y.count},De.count=Math.max(De.xAttr.count,De.yAttr.count),Te;Te=l(Te,"float64");var st=De.count=Math.floor(Te.length/2),it=De.bounds=st?f(Te,2):null;if(!Ve.range&&!De.range&&(delete De.range,Ve.range=it),!Ve.marker&&!De.marker&&(delete De.marker,Ve.marker=null),Ye&&(Ye===!0||st>Ye)?De.tree=h(Te,{bounds:it}):Ye&&Ye.length&&(De.tree=Ye),De.tree){var nt={primitive:"points",usage:"static",data:De.tree,type:"uint32"};De.elements?De.elements(nt):De.elements=k.elements(nt)}var pt=M.float32(Te);Ne({data:pt,usage:"dynamic"});var Tt=M.fract32(Te,pt);return Xe({data:Tt,usage:"dynamic"}),ht({data:new Uint8Array(st),type:"uint8",usage:"stream"}),Te}},{marker:function(Te,De,Ve){var Ye=De.activation;if(Ye.forEach(function(Tt){return Tt&&Tt.destroy&&Tt.destroy()}),Ye.length=0,!Te||typeof Te[0]=="number"){var Ne=o.addMarker(Te);Ye[Ne]=!0}else{for(var Xe=[],ht=0,st=Math.min(Te.length,De.count);ht<st;ht++){var it=o.addMarker(Te[ht]);Xe[it]||(Xe[it]=new Uint8Array(De.count)),Xe[it][ht]=1}for(var nt=0;nt<Xe.length;nt++)if(Xe[nt]){var pt={data:Xe[nt],type:"uint8",usage:"static"};Ye[nt]?Ye[nt](pt):Ye[nt]=k.buffer(pt),Ye[nt].data=Xe[nt]}}return Te},range:function(Te,De,Ve){var Ye=De.bounds;if(Ye)return Te||(Te=Ye),De.scale=[1/(Te[2]-Te[0]),1/(Te[3]-Te[1])],De.translate=[-Te[0],-Te[1]],De.scaleFract=M.fract(De.scale),De.translateFract=M.fract(De.translate),Te},viewport:function(Te){var De=L(Te||[H.drawingBufferWidth,H.drawingBufferHeight]);return De}}]),ie){var ce=re,q=ce.count,j=ce.size,Z=ce.borderSize,Q=ce.sizeBuffer,ue=new Uint8Array(q*2);if(j.length||Z.length)for(var fe=0;fe<q;fe++)ue[fe*2]=Math.round((j[fe]==null?j:j[fe])*255/V),ue[fe*2+1]=Math.round((Z[fe]==null?Z:Z[fe])*255/V);Q({data:ue,usage:"dynamic"})}if(se){var te=re,ne=te.count,ve=te.color,le=te.borderColor,xe=te.colorBuffer,Se;if(o.tooManyColors){if(ve.length||le.length){Se=new Uint8Array(ne*8);for(var Re=0;Re<ne;Re++){var Ee=ve[Re];Se[Re*8]=U[Ee*4],Se[Re*8+1]=U[Ee*4+1],Se[Re*8+2]=U[Ee*4+2],Se[Re*8+3]=U[Ee*4+3];var Oe=le[Re];Se[Re*8+4]=U[Oe*4],Se[Re*8+5]=U[Oe*4+1],Se[Re*8+6]=U[Oe*4+2],Se[Re*8+7]=U[Oe*4+3]}}}else if(ve.length||le.length){Se=new Uint8Array(ne*4+2);for(var Be=0;Be<ne;Be++)ve[Be]!=null&&(Se[Be*4]=ve[Be]%G,Se[Be*4+1]=Math.floor(ve[Be]/G)),le[Be]!=null&&(Se[Be*4+2]=le[Be]%G,Se[Be*4+3]=Math.floor(le[Be]/G))}xe({data:Se||new Uint8Array(0),type:"uint8",usage:"dynamic"})}return re})}},A.prototype.addMarker=function(o){var R=this.markerTextures,T=this.regl,O=this.markerCache,N=o==null?0:O.indexOf(o);if(N>=0)return N;var H;if(o instanceof Uint8Array||o instanceof Uint8ClampedArray)H=o;else{H=new Uint8Array(o.length);for(var k=0,V=o.length;k<V;k++)H[k]=o[k]*255}var G=Math.floor(Math.sqrt(H.length));return N=R.length,O.push(o),R.push(T.texture({channels:1,data:H,radius:G,mag:"linear",min:"linear"})),N},A.prototype.updateColor=function(o){var R=this.paletteIds,T=this.palette,O=this.maxColors;Array.isArray(o)||(o=[o]);var N=[];if(typeof o[0]=="number"){var H=[];if(Array.isArray(o))for(var k=0;k<o.length;k+=4)H.push(o.slice(k,k+4));else for(var V=0;V<o.length;V+=4)H.push(o.subarray(V,V+4));o=H}for(var G=0;G<o.length;G++){var U=o[G];U=i(U,"uint8");var Y=g(U,!1);if(R[Y]==null){var ee=T.length;R[Y]=Math.floor(ee/4),T[ee]=U[0],T[ee+1]=U[1],T[ee+2]=U[2],T[ee+3]=U[3]}N[G]=R[Y]}return!this.tooManyColors&&T.length>O*4&&(this.tooManyColors=!0),this.updatePalette(T),N.length===1?N[0]:N},A.prototype.updatePalette=function(o){if(!this.tooManyColors){var R=this.maxColors,T=this.paletteTexture,O=Math.ceil(o.length*.25/R);if(O>1){o=o.slice();for(var N=o.length*.25%R;N<O*R;N++)o.push(0,0,0,0)}T.height<O&&T.resize(R,O),T.subimage({width:Math.min(o.length*.25,R),height:O,data:o},0,0)}},A.prototype.destroy=function(){return this.groups.forEach(function(o){o.sizeBuffer.destroy(),o.positionBuffer.destroy(),o.positionFractBuffer.destroy(),o.colorBuffer.destroy(),o.activation.forEach(function(R){return R&&R.destroy&&R.destroy()}),o.selectionBuffer.destroy(),o.elements&&o.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(function(o){return o&&o.destroy&&o.destroy()}),this};var C=e(56131),S=function(R,T){var O=new D(R,T),N=O.render.bind(O);return C(N,{render:N,update:O.update.bind(O),draw:O.draw.bind(O),destroy:O.destroy.bind(O),regl:O.regl,gl:O.gl,canvas:O.gl.canvas,groups:O.groups,markers:O.markerCache,palette:O.palette}),N};z.exports=S},60487:function(z,B,e){var d=e(11870),P=e(71299),a=e(21527),_=e(5877),x=e(57471),v=e(18863),y=e(30120);z.exports=r;function r(f,g){if(!(this instanceof r))return new r(f);this.traces=[],this.passes={},this.regl=f,this.scatter=d(f),this.canvas=this.scatter.canvas}r.prototype.render=function(){for(var f=this,g,h=[],b=arguments.length;b--;)h[b]=arguments[b];return h.length&&(g=this).update.apply(g,h),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=_(function(){f.draw(),f.dirty=!0,f.planned=null})):(this.draw(),this.dirty=!0,_(function(){f.dirty=!1})),this)},r.prototype.update=function(){for(var f,g=[],h=arguments.length;h--;)g[h]=arguments[h];if(g.length){for(var b=0;b<g.length;b++)this.updateItem(b,g[b]);this.traces=this.traces.filter(Boolean);for(var p=[],E=0,c=0;c<this.traces.length;c++){for(var l=this.traces[c],m=this.traces[c].passes,M=0;M<m.length;M++)p.push(this.passes[m[M]]);l.passOffset=E,E+=l.passes.length}return(f=this.scatter).update.apply(f,p),this}},r.prototype.updateItem=function(f,g){var h=this,b=h.regl;if(g===null)return this.traces[f]=null,this;if(!g)return this;var p=P(g,{data:"data items columns rows values dimensions samples x",snap:"snap cluster",size:"sizes size radius",color:"colors color fill fill-color fillColor",opacity:"opacity alpha transparency opaque",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",borderColor:"borderColors borderColor bordercolor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range ranges databox dataBox",viewport:"viewport viewBox viewbox",domain:"domain domains area areas",padding:"pad padding paddings pads margin margins",transpose:"transpose transposed",diagonal:"diagonal diag showDiagonal",upper:"upper up top upperhalf upperHalf showupperhalf showUpper showUpperHalf",lower:"lower low bottom lowerhalf lowerHalf showlowerhalf showLowerHalf showLower"}),E=this.traces[f]||(this.traces[f]={id:f,buffer:b.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),color:"black",marker:null,size:12,borderColor:"transparent",borderSize:1,viewport:v([b._gl.drawingBufferWidth,b._gl.drawingBufferHeight]),padding:[0,0,0,0],opacity:1,diagonal:!0,upper:!0,lower:!0});if(p.color!=null&&(E.color=p.color),p.size!=null&&(E.size=p.size),p.marker!=null&&(E.marker=p.marker),p.borderColor!=null&&(E.borderColor=p.borderColor),p.borderSize!=null&&(E.borderSize=p.borderSize),p.opacity!=null&&(E.opacity=p.opacity),p.viewport&&(E.viewport=v(p.viewport)),p.diagonal!=null&&(E.diagonal=p.diagonal),p.upper!=null&&(E.upper=p.upper),p.lower!=null&&(E.lower=p.lower),p.data){E.buffer(y(p.data)),E.columns=p.data.length,E.count=p.data[0].length,E.bounds=[];for(var c=0;c<E.columns;c++)E.bounds[c]=a(p.data[c],1)}var l;p.range&&(E.range=p.range,l=E.range&&typeof E.range[0]!="number"),p.domain&&(E.domain=p.domain);var m=!1;p.padding!=null&&(Array.isArray(p.padding)&&p.padding.length===E.columns&&typeof p.padding[p.padding.length-1]=="number"?(E.padding=p.padding.map(i),m=!0):E.padding=i(p.padding));var M=E.columns,L=E.count,D=E.viewport.width,A=E.viewport.height,C=E.viewport.x,S=E.viewport.y,o=D/M,R=A/M;E.passes=[];for(var T=0;T<M;T++)for(var O=0;O<M;O++)if(!(!E.diagonal&&O===T)&&!(!E.upper&&T>O)&&!(!E.lower&&T<O)){var N=n(E.id,T,O),H=this.passes[N]||(this.passes[N]={});if(p.data&&(p.transpose?H.positions={x:{buffer:E.buffer,offset:O,count:L,stride:M},y:{buffer:E.buffer,offset:T,count:L,stride:M}}:H.positions={x:{buffer:E.buffer,offset:O*L,count:L},y:{buffer:E.buffer,offset:T*L,count:L}},H.bounds=u(E.bounds,T,O)),p.domain||p.viewport||p.data){var k=m?u(E.padding,T,O):E.padding;if(E.domain){var V=u(E.domain,T,O),G=V[0],U=V[1],Y=V[2],ee=V[3];H.viewport=[C+G*D+k[0],S+U*A+k[1],C+Y*D-k[2],S+ee*A-k[3]]}else H.viewport=[C+O*o+o*k[0],S+T*R+R*k[1],C+(O+1)*o-o*k[2],S+(T+1)*R-R*k[3]]}p.color&&(H.color=E.color),p.size&&(H.size=E.size),p.marker&&(H.marker=E.marker),p.borderSize&&(H.borderSize=E.borderSize),p.borderColor&&(H.borderColor=E.borderColor),p.opacity&&(H.opacity=E.opacity),p.range&&(H.range=l?u(E.range,T,O):E.range||H.bounds),E.passes.push(N)}return this},r.prototype.draw=function(){for(var f,g=[],h=arguments.length;h--;)g[h]=arguments[h];if(!g.length)this.scatter.draw();else{for(var b=[],p=0;p<g.length;p++)if(typeof g[p]=="number"){var E=this.traces[g[p]],c=E.passes,l=E.passOffset;b.push.apply(b,x(l,l+c.length))}else if(g[p].length){var m=g[p],M=this.traces[p],L=M.passes,D=M.passOffset;L=L.map(function(A,C){b[D+C]=m})}(f=this.scatter).draw.apply(f,b)}return this},r.prototype.destroy=function(){return this.traces.forEach(function(f){f.buffer&&f.buffer.destroy&&f.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function n(f,g,h){var b=f.id!=null?f.id:f,p=g,E=h,c=b<<16|(p&255)<<8|E&255;return c}function u(f,g,h){var b,p,E,c,l=f[g],m=f[h];return l.length>2?(l[0],l[2],b=l[1],p=l[3]):l.length?(b=l[0],p=l[1]):(l.x,b=l.y,l.x+l.width,p=l.y+l.height),m.length>2?(E=m[0],c=m[2],m[1],m[3]):m.length?(E=m[0],c=m[1]):(E=m.x,m.y,c=m.x+m.width,m.y+m.height),[E,b,c,p]}function i(f){if(typeof f=="number")return[f,f,f,f];if(f.length===2)return[f[0],f[1],f[0],f[1]];var g=v(f);return[g.x,g.y,g.x+g.width,g.y+g.height]}},98580:function(z){(function(B,e){z.exports=e()})(this,function(){function B(gt,jt){this.id=xe++,this.type=gt,this.data=jt}function e(gt){if(gt.length===0)return[];var jt=gt.charAt(0),Ut=gt.charAt(gt.length-1);if(1<gt.length&&jt===Ut&&(jt==='"'||jt==="'"))return['"'+gt.substr(1,gt.length-2).replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'];if(jt=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(gt))return e(gt.substr(0,jt.index)).concat(e(jt[1])).concat(e(gt.substr(jt.index+jt[0].length)));if(jt=gt.split("."),jt.length===1)return['"'+gt.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'];for(gt=[],Ut=0;Ut<jt.length;++Ut)gt=gt.concat(e(jt[Ut]));return gt}function d(gt){return"["+e(gt).join("][")+"]"}function P(gt,jt){if(typeof gt=="function")return new B(0,gt);if(typeof gt=="number"||typeof gt=="boolean")return new B(5,gt);if(Array.isArray(gt))return new B(6,gt.map(function(Ut,or){return P(Ut)}));if(gt instanceof B)return gt}function a(){var gt={"":0},jt=[""];return{id:function(Ut){var or=gt[Ut];return or||(or=gt[Ut]=jt.length,jt.push(Ut),or)},str:function(Ut){return jt[Ut]}}}function _(gt,jt,Ut){function or(){var ut=window.innerWidth,yt=window.innerHeight;gt!==document.body&&(yt=ur.getBoundingClientRect(),ut=yt.right-yt.left,yt=yt.bottom-yt.top),ur.width=Ut*ut,ur.height=Ut*yt}var ur=document.createElement("canvas");le(ur.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),gt.appendChild(ur),gt===document.body&&(ur.style.position="absolute",le(gt.style,{margin:0,padding:0}));var dt;return gt!==document.body&&typeof ResizeObserver=="function"?(dt=new ResizeObserver(function(){setTimeout(or)}),dt.observe(gt)):window.addEventListener("resize",or,!1),or(),{canvas:ur,onDestroy:function(){dt?dt.disconnect():window.removeEventListener("resize",or),gt.removeChild(ur)}}}function x(gt,jt){function Ut(or){try{return gt.getContext(or,jt)}catch{return null}}return Ut("webgl")||Ut("experimental-webgl")||Ut("webgl-experimental")}function v(gt){return typeof gt=="string"?gt.split():gt}function y(gt){return typeof gt=="string"?document.querySelector(gt):gt}function r(gt){var jt=gt||{},Ut,or,ur,dt;gt={};var ut=[],yt=[],Lt=typeof window>"u"?1:window.devicePixelRatio,Rt=!1,Nt={},Vt=function(qt){},Zt=function(){};if(typeof jt=="string"?Ut=document.querySelector(jt):typeof jt=="object"&&(typeof jt.nodeName=="string"&&typeof jt.appendChild=="function"&&typeof jt.getBoundingClientRect=="function"?Ut=jt:typeof jt.drawArrays=="function"||typeof jt.drawElements=="function"?(dt=jt,ur=dt.canvas):("gl"in jt?dt=jt.gl:"canvas"in jt?ur=y(jt.canvas):"container"in jt&&(or=y(jt.container)),"attributes"in jt&&(gt=jt.attributes),"extensions"in jt&&(ut=v(jt.extensions)),"optionalExtensions"in jt&&(yt=v(jt.optionalExtensions)),"onDone"in jt&&(Vt=jt.onDone),"profile"in jt&&(Rt=!!jt.profile),"pixelRatio"in jt&&(Lt=+jt.pixelRatio),"cachedCode"in jt&&(Nt=jt.cachedCode))),Ut&&(Ut.nodeName.toLowerCase()==="canvas"?ur=Ut:or=Ut),!dt){if(!ur){if(Ut=_(or||document.body,Vt,Lt),!Ut)return null;ur=Ut.canvas,Zt=Ut.onDestroy}gt.premultipliedAlpha===void 0&&(gt.premultipliedAlpha=!0),dt=x(ur,gt)}return dt?{gl:dt,canvas:ur,container:or,extensions:ut,optionalExtensions:yt,pixelRatio:Lt,profile:Rt,cachedCode:Nt,onDone:Vt,onDestroy:Zt}:(Zt(),Vt("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function n(gt,jt){function Ut(ut){ut=ut.toLowerCase();var yt;try{yt=or[ut]=gt.getExtension(ut)}catch{}return!!yt}for(var or={},ur=0;ur<jt.extensions.length;++ur){var dt=jt.extensions[ur];if(!Ut(dt))return jt.onDestroy(),jt.onDone('"'+dt+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return jt.optionalExtensions.forEach(Ut),{extensions:or,restore:function(){Object.keys(or).forEach(function(ut){if(or[ut]&&!Ut(ut))throw Error("(regl): error restoring extension "+ut)})}}}function u(gt,jt){for(var Ut=Array(gt),or=0;or<gt;++or)Ut[or]=jt(or);return Ut}function i(gt){var jt,Ut;return jt=(65535<gt)<<4,gt>>>=jt,Ut=(255<gt)<<3,gt>>>=Ut,jt|=Ut,Ut=(15<gt)<<2,gt>>>=Ut,jt|=Ut,Ut=(3<gt)<<1,jt|Ut|gt>>>Ut>>1}function f(){function gt(or){e:{for(var ur=16;268435456>=ur;ur*=16)if(or<=ur){or=ur;break e}or=0}return ur=Ut[i(or)>>2],0<ur.length?ur.pop():new ArrayBuffer(or)}function jt(or){Ut[i(or.byteLength)>>2].push(or)}var Ut=u(8,function(){return[]});return{alloc:gt,free:jt,allocType:function(or,ur){var dt=null;switch(or){case 5120:dt=new Int8Array(gt(ur),0,ur);break;case 5121:dt=new Uint8Array(gt(ur),0,ur);break;case 5122:dt=new Int16Array(gt(2*ur),0,ur);break;case 5123:dt=new Uint16Array(gt(2*ur),0,ur);break;case 5124:dt=new Int32Array(gt(4*ur),0,ur);break;case 5125:dt=new Uint32Array(gt(4*ur),0,ur);break;case 5126:dt=new Float32Array(gt(4*ur),0,ur);break;default:return null}return dt.length!==ur?dt.subarray(0,ur):dt},freeType:function(or){jt(or.buffer)}}}function g(gt){return!!gt&&typeof gt=="object"&&Array.isArray(gt.shape)&&Array.isArray(gt.stride)&&typeof gt.offset=="number"&&gt.shape.length===gt.stride.length&&(Array.isArray(gt.data)||Le(gt.data))}function h(gt,jt,Ut,or,ur,dt){for(var ut=0;ut<jt;++ut)for(var yt=gt[ut],Lt=0;Lt<Ut;++Lt)for(var Rt=yt[Lt],Nt=0;Nt<or;++Nt)ur[dt++]=Rt[Nt]}function b(gt,jt,Ut,or,ur){for(var dt=1,ut=Ut+1;ut<jt.length;++ut)dt*=jt[ut];var yt=jt[Ut];if(jt.length-Ut===4){var Lt=jt[Ut+1],Rt=jt[Ut+2];for(jt=jt[Ut+3],ut=0;ut<yt;++ut)h(gt[ut],Lt,Rt,jt,or,ur),ur+=dt}else for(ut=0;ut<yt;++ut)b(gt[ut],jt,Ut+1,or,ur),ur+=dt}function p(gt){return Ve[Object.prototype.toString.call(gt)]|0}function E(gt,jt){for(var Ut=0;Ut<jt.length;++Ut)gt[Ut]=jt[Ut]}function c(gt,jt,Ut,or,ur,dt,ut){for(var yt=0,Lt=0;Lt<Ut;++Lt)for(var Rt=0;Rt<or;++Rt)gt[yt++]=jt[ur*Lt+dt*Rt+ut]}function l(gt,jt,Ut,or){function ur(Vt){this.id=Lt++,this.buffer=gt.createBuffer(),this.type=Vt,this.usage=35044,this.byteLength=0,this.dimension=1,this.dtype=5121,this.persistentData=null,Ut.profile&&(this.stats={size:0})}function dt(Vt,Zt,qt){Vt.byteLength=Zt.byteLength,gt.bufferData(Vt.type,Zt,qt)}function ut(Vt,Zt,qt,Jt,nr,Mr){if(Vt.usage=qt,Array.isArray(Zt)){if(Vt.dtype=Jt||5126,0<Zt.length)if(Array.isArray(Zt[0])){nr=ht(Zt);for(var Ke=Jt=1;Ke<nr.length;++Ke)Jt*=nr[Ke];Vt.dimension=Jt,Zt=Xe(Zt,nr,Vt.dtype),dt(Vt,Zt,qt),Mr?Vt.persistentData=Zt:Oe.freeType(Zt)}else typeof Zt[0]=="number"?(Vt.dimension=nr,nr=Oe.allocType(Vt.dtype,Zt.length),E(nr,Zt),dt(Vt,nr,qt),Mr?Vt.persistentData=nr:Oe.freeType(nr)):Le(Zt[0])&&(Vt.dimension=Zt[0].length,Vt.dtype=Jt||p(Zt[0])||5126,Zt=Xe(Zt,[Zt.length,Zt[0].length],Vt.dtype),dt(Vt,Zt,qt),Mr?Vt.persistentData=Zt:Oe.freeType(Zt))}else if(Le(Zt))Vt.dtype=Jt||p(Zt),Vt.dimension=nr,dt(Vt,Zt,qt),Mr&&(Vt.persistentData=new Uint8Array(new Uint8Array(Zt.buffer)));else if(g(Zt)){nr=Zt.shape;var Ze=Zt.stride,Ke=Zt.offset,zt=0,kt=0,Qt=0,cr=0;nr.length===1?(zt=nr[0],kt=1,Qt=Ze[0],cr=0):nr.length===2&&(zt=nr[0],kt=nr[1],Qt=Ze[0],cr=Ze[1]),Vt.dtype=Jt||p(Zt.data)||5126,Vt.dimension=kt,nr=Oe.allocType(Vt.dtype,zt*kt),c(nr,Zt.data,zt,kt,Qt,cr,Ke),dt(Vt,nr,qt),Mr?Vt.persistentData=nr:Oe.freeType(nr)}else Zt instanceof ArrayBuffer&&(Vt.dtype=5121,Vt.dimension=nr,dt(Vt,Zt,qt),Mr&&(Vt.persistentData=new Uint8Array(new Uint8Array(Zt))))}function yt(Vt){jt.bufferCount--,or(Vt),gt.deleteBuffer(Vt.buffer),Vt.buffer=null,delete Rt[Vt.id]}var Lt=0,Rt={};ur.prototype.bind=function(){gt.bindBuffer(this.type,this.buffer)},ur.prototype.destroy=function(){yt(this)};var Nt=[];return Ut.profile&&(jt.getTotalBufferSize=function(){var Vt=0;return Object.keys(Rt).forEach(function(Zt){Vt+=Rt[Zt].stats.size}),Vt}),{create:function(Vt,Zt,qt,Jt){function nr(Ke){var Ze=35044,zt=null,kt=0,Qt=0,cr=1;return Array.isArray(Ke)||Le(Ke)||g(Ke)||Ke instanceof ArrayBuffer?zt=Ke:typeof Ke=="number"?kt=Ke|0:Ke&&("data"in Ke&&(zt=Ke.data),"usage"in Ke&&(Ze=Ne[Ke.usage]),"type"in Ke&&(Qt=Ye[Ke.type]),"dimension"in Ke&&(cr=Ke.dimension|0),"length"in Ke&&(kt=Ke.length|0)),Mr.bind(),zt?ut(Mr,zt,Ze,Qt,cr,Jt):(kt&&gt.bufferData(Mr.type,kt,Ze),Mr.dtype=Qt||5121,Mr.usage=Ze,Mr.dimension=cr,Mr.byteLength=kt),Ut.profile&&(Mr.stats.size=Mr.byteLength*st[Mr.dtype]),nr}jt.bufferCount++;var Mr=new ur(Zt);return Rt[Mr.id]=Mr,qt||nr(Vt),nr._reglType="buffer",nr._buffer=Mr,nr.subdata=function(Ke,Ze){var zt=(Ze||0)|0,kt;if(Mr.bind(),Le(Ke)||Ke instanceof ArrayBuffer)gt.bufferSubData(Mr.type,zt,Ke);else if(Array.isArray(Ke)){if(0<Ke.length)if(typeof Ke[0]=="number"){var Qt=Oe.allocType(Mr.dtype,Ke.length);E(Qt,Ke),gt.bufferSubData(Mr.type,zt,Qt),Oe.freeType(Qt)}else(Array.isArray(Ke[0])||Le(Ke[0]))&&(kt=ht(Ke),Qt=Xe(Ke,kt,Mr.dtype),gt.bufferSubData(Mr.type,zt,Qt),Oe.freeType(Qt))}else if(g(Ke)){kt=Ke.shape;var cr=Ke.stride,fr=Qt=0,ir=0,Yt=0;kt.length===1?(Qt=kt[0],fr=1,ir=cr[0],Yt=0):kt.length===2&&(Qt=kt[0],fr=kt[1],ir=cr[0],Yt=cr[1]),kt=Array.isArray(Ke.data)?Mr.dtype:p(Ke.data),kt=Oe.allocType(kt,Qt*fr),c(kt,Ke.data,Qt,fr,ir,Yt,Ke.offset),gt.bufferSubData(Mr.type,zt,kt),Oe.freeType(kt)}return nr},Ut.profile&&(nr.stats=Mr.stats),nr.destroy=function(){yt(Mr)},nr},createStream:function(Vt,Zt){var qt=Nt.pop();return qt||(qt=new ur(Vt)),qt.bind(),ut(qt,Zt,35040,0,1,!1),qt},destroyStream:function(Vt){Nt.push(Vt)},clear:function(){Te(Rt).forEach(yt),Nt.forEach(yt)},getBuffer:function(Vt){return Vt&&Vt._buffer instanceof ur?Vt._buffer:null},restore:function(){Te(Rt).forEach(function(Vt){Vt.buffer=gt.createBuffer(),gt.bindBuffer(Vt.type,Vt.buffer),gt.bufferData(Vt.type,Vt.persistentData||Vt.byteLength,Vt.usage)})},_initBuffer:ut}}function m(gt,jt,Ut,or){function ur(Vt){this.id=Lt++,yt[this.id]=this,this.buffer=Vt,this.primType=4,this.type=this.vertCount=0}function dt(Vt,Zt,qt,Jt,nr,Mr,Ke){Vt.buffer.bind();var Ze;if(Zt?((Ze=Ke)||Le(Zt)&&(!g(Zt)||Le(Zt.data))||(Ze=jt.oes_element_index_uint?5125:5123),Ut._initBuffer(Vt.buffer,Zt,qt,Ze,3)):(gt.bufferData(34963,Mr,qt),Vt.buffer.dtype=Ze||5121,Vt.buffer.usage=qt,Vt.buffer.dimension=3,Vt.buffer.byteLength=Mr),Ze=Ke,!Ke){switch(Vt.buffer.dtype){case 5121:case 5120:Ze=5121;break;case 5123:case 5122:Ze=5123;break;case 5125:case 5124:Ze=5125}Vt.buffer.dtype=Ze}Vt.type=Ze,Zt=nr,0>Zt&&(Zt=Vt.buffer.byteLength,Ze===5123?Zt>>=1:Ze===5125&&(Zt>>=2)),Vt.vertCount=Zt,Zt=Jt,0>Jt&&(Zt=4,Jt=Vt.buffer.dimension,Jt===1&&(Zt=0),Jt===2&&(Zt=1),Jt===3&&(Zt=4)),Vt.primType=Zt}function ut(Vt){or.elementsCount--,delete yt[Vt.id],Vt.buffer.destroy(),Vt.buffer=null}var yt={},Lt=0,Rt={uint8:5121,uint16:5123};jt.oes_element_index_uint&&(Rt.uint32=5125),ur.prototype.bind=function(){this.buffer.bind()};var Nt=[];return{create:function(Vt,Zt){function qt(Mr){if(Mr)if(typeof Mr=="number")Jt(Mr),nr.primType=4,nr.vertCount=Mr|0,nr.type=5121;else{var Ke=null,Ze=35044,zt=-1,kt=-1,Qt=0,cr=0;Array.isArray(Mr)||Le(Mr)||g(Mr)?Ke=Mr:("data"in Mr&&(Ke=Mr.data),"usage"in Mr&&(Ze=Ne[Mr.usage]),"primitive"in Mr&&(zt=it[Mr.primitive]),"count"in Mr&&(kt=Mr.count|0),"type"in Mr&&(cr=Rt[Mr.type]),"length"in Mr?Qt=Mr.length|0:(Qt=kt,cr===5123||cr===5122?Qt*=2:(cr===5125||cr===5124)&&(Qt*=4))),dt(nr,Ke,Ze,zt,kt,Qt,cr)}else Jt(),nr.primType=4,nr.vertCount=0,nr.type=5121;return qt}var Jt=Ut.create(null,34963,!0),nr=new ur(Jt._buffer);return or.elementsCount++,qt(Vt),qt._reglType="elements",qt._elements=nr,qt.subdata=function(Mr,Ke){return Jt.subdata(Mr,Ke),qt},qt.destroy=function(){ut(nr)},qt},createStream:function(Vt){var Zt=Nt.pop();return Zt||(Zt=new ur(Ut.create(null,34963,!0,!1)._buffer)),dt(Zt,Vt,35040,-1,-1,0,0),Zt},destroyStream:function(Vt){Nt.push(Vt)},getElements:function(Vt){return typeof Vt=="function"&&Vt._elements instanceof ur?Vt._elements:null},clear:function(){Te(yt).forEach(ut)}}}function M(gt){for(var jt=Oe.allocType(5123,gt.length),Ut=0;Ut<gt.length;++Ut)if(isNaN(gt[Ut]))jt[Ut]=65535;else if(gt[Ut]===1/0)jt[Ut]=31744;else if(gt[Ut]===-1/0)jt[Ut]=64512;else{nt[0]=gt[Ut];var dt=pt[0],or=dt>>>31<<15,ur=(dt<<1>>>24)-127,dt=dt>>13&1023;jt[Ut]=-24>ur?or:-14>ur?or+(dt+1024>>-14-ur):15<ur?or+31744:or+(ur+15<<10)+dt}return jt}function L(gt){return Array.isArray(gt)||Le(gt)}function D(gt){return"[object "+gt+"]"}function A(gt){return Array.isArray(gt)&&(gt.length===0||typeof gt[0]=="number")}function C(gt){return!!(Array.isArray(gt)&&gt.length!==0&&L(gt[0]))}function S(gt){return Object.prototype.toString.call(gt)}function o(gt){if(!gt)return!1;var jt=S(gt);return 0<=Fe.indexOf(jt)?!0:A(gt)||C(gt)||g(gt)}function R(gt,jt){gt.type===36193?(gt.data=M(jt),Oe.freeType(jt)):gt.data=jt}function T(gt,jt,Ut,or,ur,dt){if(gt=typeof pe[gt]<"u"?pe[gt]:Dt[gt]*Ce[jt],dt&&(gt*=6),ur){for(or=0;1<=Ut;)or+=gt*Ut*Ut,Ut/=2;return or}return gt*Ut*or}function O(gt,jt,Ut,or,ur,dt,ut){function yt(){this.format=this.internalformat=6408,this.type=5121,this.flipY=this.premultiplyAlpha=this.compressed=!1,this.unpackAlignment=1,this.colorSpace=37444,this.channels=this.height=this.width=0}function Lt(Dr,sn){Dr.internalformat=sn.internalformat,Dr.format=sn.format,Dr.type=sn.type,Dr.compressed=sn.compressed,Dr.premultiplyAlpha=sn.premultiplyAlpha,Dr.flipY=sn.flipY,Dr.unpackAlignment=sn.unpackAlignment,Dr.colorSpace=sn.colorSpace,Dr.width=sn.width,Dr.height=sn.height,Dr.channels=sn.channels}function Rt(Dr,sn){if(typeof sn=="object"&&sn){"premultiplyAlpha"in sn&&(Dr.premultiplyAlpha=sn.premultiplyAlpha),"flipY"in sn&&(Dr.flipY=sn.flipY),"alignment"in sn&&(Dr.unpackAlignment=sn.alignment),"colorSpace"in sn&&(Dr.colorSpace=Sn[sn.colorSpace]),"type"in sn&&(Dr.type=Jr[sn.type]);var nn=Dr.width,dn=Dr.height,Un=Dr.channels,Ln=!1;"shape"in sn?(nn=sn.shape[0],dn=sn.shape[1],sn.shape.length===3&&(Un=sn.shape[2],Ln=!0)):("radius"in sn&&(nn=dn=sn.radius),"width"in sn&&(nn=sn.width),"height"in sn&&(dn=sn.height),"channels"in sn&&(Un=sn.channels,Ln=!0)),Dr.width=nn|0,Dr.height=dn|0,Dr.channels=Un|0,nn=!1,"format"in sn&&(nn=sn.format,dn=Dr.internalformat=xn[nn],Dr.format=An[dn],nn in Jr&&!("type"in sn)&&(Dr.type=Jr[nn]),nn in Dn&&(Dr.compressed=!0),nn=!0),!Ln&&nn?Dr.channels=Dt[Dr.format]:Ln&&!nn&&Dr.channels!==Et[Dr.format]&&(Dr.format=Dr.internalformat=Et[Dr.channels])}}function Nt(Dr){gt.pixelStorei(37440,Dr.flipY),gt.pixelStorei(37441,Dr.premultiplyAlpha),gt.pixelStorei(37443,Dr.colorSpace),gt.pixelStorei(3317,Dr.unpackAlignment)}function Vt(){yt.call(this),this.yOffset=this.xOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Zt(Dr,sn){var nn=null;if(o(sn)?nn=sn:sn&&(Rt(Dr,sn),"x"in sn&&(Dr.xOffset=sn.x|0),"y"in sn&&(Dr.yOffset=sn.y|0),o(sn.data)&&(nn=sn.data)),sn.copy){var dn=ur.viewportWidth,Un=ur.viewportHeight;Dr.width=Dr.width||dn-Dr.xOffset,Dr.height=Dr.height||Un-Dr.yOffset,Dr.needsCopy=!0}else if(!nn)Dr.width=Dr.width||1,Dr.height=Dr.height||1,Dr.channels=Dr.channels||4;else if(Le(nn))Dr.channels=Dr.channels||4,Dr.data=nn,"type"in sn||Dr.type!==5121||(Dr.type=Ve[Object.prototype.toString.call(nn)]|0);else if(A(nn)){switch(Dr.channels=Dr.channels||4,dn=nn,Un=dn.length,Dr.type){case 5121:case 5123:case 5125:case 5126:Un=Oe.allocType(Dr.type,Un),Un.set(dn),Dr.data=Un;break;case 36193:Dr.data=M(dn)}Dr.alignment=1,Dr.needsFree=!0}else if(g(nn)){dn=nn.data,Array.isArray(dn)||Dr.type!==5121||(Dr.type=Ve[Object.prototype.toString.call(dn)]|0);var Un=nn.shape,Ln=nn.stride,Pn,Vn,aa,Da;Un.length===3?(aa=Un[2],Da=Ln[2]):Da=aa=1,Pn=Un[0],Vn=Un[1],Un=Ln[0],Ln=Ln[1],Dr.alignment=1,Dr.width=Pn,Dr.height=Vn,Dr.channels=aa,Dr.format=Dr.internalformat=Et[aa],Dr.needsFree=!0,Pn=Da,nn=nn.offset,aa=Dr.width,Da=Dr.height,Vn=Dr.channels;for(var $a=Oe.allocType(Dr.type===36193?5126:Dr.type,aa*Da*Vn),$t=0,Sr=0;Sr<Da;++Sr)for(var an=0;an<aa;++an)for(var cn=0;cn<Vn;++cn)$a[$t++]=dn[Un*an+Ln*Sr+Pn*cn+nn];R(Dr,$a)}else if(S(nn)===et||S(nn)===Ue||S(nn)===ze)S(nn)===et||S(nn)===Ue?Dr.element=nn:Dr.element=nn.canvas,Dr.width=Dr.element.width,Dr.height=Dr.element.height,Dr.channels=4;else if(S(nn)===rt)Dr.element=nn,Dr.width=nn.width,Dr.height=nn.height,Dr.channels=4;else if(S(nn)===lt)Dr.element=nn,Dr.width=nn.naturalWidth,Dr.height=nn.naturalHeight,Dr.channels=4;else if(S(nn)===Qe)Dr.element=nn,Dr.width=nn.videoWidth,Dr.height=nn.videoHeight,Dr.channels=4;else if(C(nn)){for(dn=Dr.width||nn[0].length,Un=Dr.height||nn.length,Ln=Dr.channels,Ln=L(nn[0][0])?Ln||nn[0][0].length:Ln||1,Pn=De.shape(nn),aa=1,Da=0;Da<Pn.length;++Da)aa*=Pn[Da];aa=Oe.allocType(Dr.type===36193?5126:Dr.type,aa),De.flatten(nn,Pn,"",aa),R(Dr,aa),Dr.alignment=1,Dr.width=dn,Dr.height=Un,Dr.channels=Ln,Dr.format=Dr.internalformat=Et[Ln],Dr.needsFree=!0}}function qt(Dr,sn,nn,dn,Un){var Ln=Dr.element,Pn=Dr.data,Vn=Dr.internalformat,aa=Dr.format,Da=Dr.type,$a=Dr.width,$t=Dr.height;Nt(Dr),Ln?gt.texSubImage2D(sn,Un,nn,dn,aa,Da,Ln):Dr.compressed?gt.compressedTexSubImage2D(sn,Un,nn,dn,Vn,$a,$t,Pn):Dr.needsCopy?(or(),gt.copyTexSubImage2D(sn,Un,nn,dn,Dr.xOffset,Dr.yOffset,$a,$t)):gt.texSubImage2D(sn,Un,nn,dn,$a,$t,aa,Da,Pn)}function Jt(){return Fn.pop()||new Vt}function nr(Dr){Dr.needsFree&&Oe.freeType(Dr.data),Vt.call(Dr),Fn.push(Dr)}function Mr(){yt.call(this),this.genMipmaps=!1,this.mipmapHint=4352,this.mipmask=0,this.images=Array(16)}function Ke(Dr,sn,nn){var dn=Dr.images[0]=Jt();Dr.mipmask=1,dn.width=Dr.width=sn,dn.height=Dr.height=nn,dn.channels=Dr.channels=4}function Ze(Dr,sn){var nn=null;if(o(sn))nn=Dr.images[0]=Jt(),Lt(nn,Dr),Zt(nn,sn),Dr.mipmask=1;else if(Rt(Dr,sn),Array.isArray(sn.mipmap))for(var dn=sn.mipmap,Un=0;Un<dn.length;++Un)nn=Dr.images[Un]=Jt(),Lt(nn,Dr),nn.width>>=Un,nn.height>>=Un,Zt(nn,dn[Un]),Dr.mipmask|=1<<Un;else nn=Dr.images[0]=Jt(),Lt(nn,Dr),Zt(nn,sn),Dr.mipmask=1;Lt(Dr,Dr.images[0])}function zt(Dr,sn){for(var nn=Dr.images,dn=0;dn<nn.length&&nn[dn];++dn){var Un=nn[dn],Ln=sn,Pn=dn,Vn=Un.element,aa=Un.data,Da=Un.internalformat,$a=Un.format,$t=Un.type,Sr=Un.width,an=Un.height;Nt(Un),Vn?gt.texImage2D(Ln,Pn,$a,$a,$t,Vn):Un.compressed?gt.compressedTexImage2D(Ln,Pn,Da,Sr,an,0,aa):Un.needsCopy?(or(),gt.copyTexImage2D(Ln,Pn,$a,Un.xOffset,Un.yOffset,Sr,an,0)):gt.texImage2D(Ln,Pn,$a,Sr,an,0,$a,$t,aa||null)}}function kt(){var Dr=Jn.pop()||new Mr;yt.call(Dr);for(var sn=Dr.mipmask=0;16>sn;++sn)Dr.images[sn]=null;return Dr}function Qt(Dr){for(var sn=Dr.images,nn=0;nn<sn.length;++nn)sn[nn]&&nr(sn[nn]),sn[nn]=null;Jn.push(Dr)}function cr(){this.magFilter=this.minFilter=9728,this.wrapT=this.wrapS=33071,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=4352}function fr(Dr,sn){"min"in sn&&(Dr.minFilter=Nr[sn.min],0<=Tt.indexOf(Dr.minFilter)&&!("faces"in sn)&&(Dr.genMipmaps=!0)),"mag"in sn&&(Dr.magFilter=Or[sn.mag]);var nn=Dr.wrapS,dn=Dr.wrapT;if("wrap"in sn){var Un=sn.wrap;typeof Un=="string"?nn=dn=Kr[Un]:Array.isArray(Un)&&(nn=Kr[Un[0]],dn=Kr[Un[1]])}else"wrapS"in sn&&(nn=Kr[sn.wrapS]),"wrapT"in sn&&(dn=Kr[sn.wrapT]);if(Dr.wrapS=nn,Dr.wrapT=dn,"anisotropic"in sn&&(Dr.anisotropic=sn.anisotropic),"mipmap"in sn){switch(nn=!1,typeof sn.mipmap){case"string":Dr.mipmapHint=pr[sn.mipmap],nn=Dr.genMipmaps=!0;break;case"boolean":nn=Dr.genMipmaps=sn.mipmap;break;case"object":Dr.genMipmaps=!1,nn=!0}!nn||"min"in sn||(Dr.minFilter=9984)}}function ir(Dr,sn){gt.texParameteri(sn,10241,Dr.minFilter),gt.texParameteri(sn,10240,Dr.magFilter),gt.texParameteri(sn,10242,Dr.wrapS),gt.texParameteri(sn,10243,Dr.wrapT),jt.ext_texture_filter_anisotropic&&gt.texParameteri(sn,34046,Dr.anisotropic),Dr.genMipmaps&&(gt.hint(33170,Dr.mipmapHint),gt.generateMipmap(sn))}function Yt(Dr){yt.call(this),this.mipmask=0,this.internalformat=6408,this.id=ta++,this.refCount=1,this.target=Dr,this.texture=gt.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new cr,ut.profile&&(this.stats={size:0})}function gr(Dr){gt.activeTexture(33984),gt.bindTexture(Dr.target,Dr.texture)}function yr(){var Dr=la[0];Dr?gt.bindTexture(Dr.target,Dr.texture):gt.bindTexture(3553,null)}function Tr(Dr){var sn=Dr.texture,nn=Dr.unit,dn=Dr.target;0<=nn&&(gt.activeTexture(33984+nn),gt.bindTexture(dn,null),la[nn]=null),gt.deleteTexture(sn),Dr.texture=null,Dr.params=null,Dr.pixels=null,Dr.refCount=0,delete sa[Dr.id],dt.textureCount--}var pr={"don't care":4352,"dont care":4352,nice:4354,fast:4353},Kr={repeat:10497,clamp:33071,mirror:33648},Or={nearest:9728,linear:9729},Nr=le({mipmap:9987,"nearest mipmap nearest":9984,"linear mipmap nearest":9985,"nearest mipmap linear":9986,"linear mipmap linear":9987},Or),Sn={none:0,browser:37444},Jr={uint8:5121,rgba4:32819,rgb565:33635,"rgb5 a1":32820},xn={alpha:6406,luminance:6409,"luminance alpha":6410,rgb:6407,rgba:6408,rgba4:32854,"rgb5 a1":32855,rgb565:36194},Dn={};jt.ext_srgb&&(xn.srgb=35904,xn.srgba=35906),jt.oes_texture_float&&(Jr.float32=Jr.float=5126),jt.oes_texture_half_float&&(Jr.float16=Jr["half float"]=36193),jt.webgl_depth_texture&&(le(xn,{depth:6402,"depth stencil":34041}),le(Jr,{uint16:5123,uint32:5125,"depth stencil":34042})),jt.webgl_compressed_texture_s3tc&&le(Dn,{"rgb s3tc dxt1":33776,"rgba s3tc dxt1":33777,"rgba s3tc dxt3":33778,"rgba s3tc dxt5":33779}),jt.webgl_compressed_texture_atc&&le(Dn,{"rgb atc":35986,"rgba atc explicit alpha":35987,"rgba atc interpolated alpha":34798}),jt.webgl_compressed_texture_pvrtc&&le(Dn,{"rgb pvrtc 4bppv1":35840,"rgb pvrtc 2bppv1":35841,"rgba pvrtc 4bppv1":35842,"rgba pvrtc 2bppv1":35843}),jt.webgl_compressed_texture_etc1&&(Dn["rgb etc1"]=36196);var mr=Array.prototype.slice.call(gt.getParameter(34467));Object.keys(Dn).forEach(function(Dr){var sn=Dn[Dr];0<=mr.indexOf(sn)&&(xn[Dr]=sn)});var Ar=Object.keys(xn);Ut.textureFormats=Ar;var zr=[];Object.keys(xn).forEach(function(Dr){zr[xn[Dr]]=Dr});var Br=[];Object.keys(Jr).forEach(function(Dr){Br[Jr[Dr]]=Dr});var on=[];Object.keys(Or).forEach(function(Dr){on[Or[Dr]]=Dr});var mn=[];Object.keys(Nr).forEach(function(Dr){mn[Nr[Dr]]=Dr});var Tn=[];Object.keys(Kr).forEach(function(Dr){Tn[Kr[Dr]]=Dr});var An=Ar.reduce(function(Dr,sn){var nn=xn[sn];return nn===6409||nn===6406||nn===6409||nn===6410||nn===6402||nn===34041||jt.ext_srgb&&(nn===35904||nn===35906)?Dr[nn]=nn:nn===32855||0<=sn.indexOf("rgba")?Dr[nn]=6408:Dr[nn]=6407,Dr},{}),Fn=[],Jn=[],ta=0,sa={},ha=Ut.maxTextureUnits,la=Array(ha).map(function(){return null});return le(Yt.prototype,{bind:function(){this.bindCount+=1;var Dr=this.unit;if(0>Dr){for(var sn=0;sn<ha;++sn){var nn=la[sn];if(nn){if(0<nn.bindCount)continue;nn.unit=-1}la[sn]=this,Dr=sn;break}ut.profile&&dt.maxTextureUnits<Dr+1&&(dt.maxTextureUnits=Dr+1),this.unit=Dr,gt.activeTexture(33984+Dr),gt.bindTexture(this.target,this.texture)}return Dr},unbind:function(){--this.bindCount},decRef:function(){0>=--this.refCount&&Tr(this)}}),ut.profile&&(dt.getTotalTextureSize=function(){var Dr=0;return Object.keys(sa).forEach(function(sn){Dr+=sa[sn].stats.size}),Dr}),{create2D:function(Dr,sn){function nn(Un,Ln){var Pn=dn.texInfo;cr.call(Pn);var Vn=kt();return typeof Un=="number"?typeof Ln=="number"?Ke(Vn,Un|0,Ln|0):Ke(Vn,Un|0,Un|0):Un?(fr(Pn,Un),Ze(Vn,Un)):Ke(Vn,1,1),Pn.genMipmaps&&(Vn.mipmask=(Vn.width<<1)-1),dn.mipmask=Vn.mipmask,Lt(dn,Vn),dn.internalformat=Vn.internalformat,nn.width=Vn.width,nn.height=Vn.height,gr(dn),zt(Vn,3553),ir(Pn,3553),yr(),Qt(Vn),ut.profile&&(dn.stats.size=T(dn.internalformat,dn.type,Vn.width,Vn.height,Pn.genMipmaps,!1)),nn.format=zr[dn.internalformat],nn.type=Br[dn.type],nn.mag=on[Pn.magFilter],nn.min=mn[Pn.minFilter],nn.wrapS=Tn[Pn.wrapS],nn.wrapT=Tn[Pn.wrapT],nn}var dn=new Yt(3553);return sa[dn.id]=dn,dt.textureCount++,nn(Dr,sn),nn.subimage=function(Un,Ln,Pn,Vn){Ln|=0,Pn|=0,Vn|=0;var aa=Jt();return Lt(aa,dn),aa.width=0,aa.height=0,Zt(aa,Un),aa.width=aa.width||(dn.width>>Vn)-Ln,aa.height=aa.height||(dn.height>>Vn)-Pn,gr(dn),qt(aa,3553,Ln,Pn,Vn),yr(),nr(aa),nn},nn.resize=function(Un,Ln){var Pn=Un|0,Vn=Ln|0||Pn;if(Pn===dn.width&&Vn===dn.height)return nn;nn.width=dn.width=Pn,nn.height=dn.height=Vn,gr(dn);for(var aa=0;dn.mipmask>>aa;++aa){var Da=Pn>>aa,$a=Vn>>aa;if(!Da||!$a)break;gt.texImage2D(3553,aa,dn.format,Da,$a,0,dn.format,dn.type,null)}return yr(),ut.profile&&(dn.stats.size=T(dn.internalformat,dn.type,Pn,Vn,!1,!1)),nn},nn._reglType="texture2d",nn._texture=dn,ut.profile&&(nn.stats=dn.stats),nn.destroy=function(){dn.decRef()},nn},createCube:function(Dr,sn,nn,dn,Un,Ln){function Pn(Da,$a,$t,Sr,an,cn){var hn,_n=Vn.texInfo;for(cr.call(_n),hn=0;6>hn;++hn)aa[hn]=kt();if(typeof Da=="number"||!Da)for(Da=Da|0||1,hn=0;6>hn;++hn)Ke(aa[hn],Da,Da);else if(typeof Da=="object")if($a)Ze(aa[0],Da),Ze(aa[1],$a),Ze(aa[2],$t),Ze(aa[3],Sr),Ze(aa[4],an),Ze(aa[5],cn);else if(fr(_n,Da),Rt(Vn,Da),"faces"in Da)for(Da=Da.faces,hn=0;6>hn;++hn)Lt(aa[hn],Vn),Ze(aa[hn],Da[hn]);else for(hn=0;6>hn;++hn)Ze(aa[hn],Da);for(Lt(Vn,aa[0]),Vn.mipmask=_n.genMipmaps?(aa[0].width<<1)-1:aa[0].mipmask,Vn.internalformat=aa[0].internalformat,Pn.width=aa[0].width,Pn.height=aa[0].height,gr(Vn),hn=0;6>hn;++hn)zt(aa[hn],34069+hn);for(ir(_n,34067),yr(),ut.profile&&(Vn.stats.size=T(Vn.internalformat,Vn.type,Pn.width,Pn.height,_n.genMipmaps,!0)),Pn.format=zr[Vn.internalformat],Pn.type=Br[Vn.type],Pn.mag=on[_n.magFilter],Pn.min=mn[_n.minFilter],Pn.wrapS=Tn[_n.wrapS],Pn.wrapT=Tn[_n.wrapT],hn=0;6>hn;++hn)Qt(aa[hn]);return Pn}var Vn=new Yt(34067);sa[Vn.id]=Vn,dt.cubeCount++;var aa=Array(6);return Pn(Dr,sn,nn,dn,Un,Ln),Pn.subimage=function(Da,$a,$t,Sr,an){$t|=0,Sr|=0,an|=0;var cn=Jt();return Lt(cn,Vn),cn.width=0,cn.height=0,Zt(cn,$a),cn.width=cn.width||(Vn.width>>an)-$t,cn.height=cn.height||(Vn.height>>an)-Sr,gr(Vn),qt(cn,34069+Da,$t,Sr,an),yr(),nr(cn),Pn},Pn.resize=function(Da){if(Da|=0,Da!==Vn.width){Pn.width=Vn.width=Da,Pn.height=Vn.height=Da,gr(Vn);for(var $a=0;6>$a;++$a)for(var $t=0;Vn.mipmask>>$t;++$t)gt.texImage2D(34069+$a,$t,Vn.format,Da>>$t,Da>>$t,0,Vn.format,Vn.type,null);return yr(),ut.profile&&(Vn.stats.size=T(Vn.internalformat,Vn.type,Pn.width,Pn.height,!1,!0)),Pn}},Pn._reglType="textureCube",Pn._texture=Vn,ut.profile&&(Pn.stats=Vn.stats),Pn.destroy=function(){Vn.decRef()},Pn},clear:function(){for(var Dr=0;Dr<ha;++Dr)gt.activeTexture(33984+Dr),gt.bindTexture(3553,null),la[Dr]=null;Te(sa).forEach(Tr),dt.cubeCount=0,dt.textureCount=0},getTexture:function(Dr){return null},restore:function(){for(var Dr=0;Dr<ha;++Dr){var sn=la[Dr];sn&&(sn.bindCount=0,sn.unit=-1,la[Dr]=null)}Te(sa).forEach(function(nn){nn.texture=gt.createTexture(),gt.bindTexture(nn.target,nn.texture);for(var dn=0;32>dn;++dn)if(nn.mipmask&1<<dn)if(nn.target===3553)gt.texImage2D(3553,dn,nn.internalformat,nn.width>>dn,nn.height>>dn,0,nn.internalformat,nn.type,null);else for(var Un=0;6>Un;++Un)gt.texImage2D(34069+Un,dn,nn.internalformat,nn.width>>dn,nn.height>>dn,0,nn.internalformat,nn.type,null);ir(nn.texInfo,nn.target)})},refresh:function(){for(var Dr=0;Dr<ha;++Dr){var sn=la[Dr];sn&&(sn.bindCount=0,sn.unit=-1,la[Dr]=null),gt.activeTexture(33984+Dr),gt.bindTexture(3553,null),gt.bindTexture(34067,null)}}}}function N(gt,jt,Ut,or,ur,dt){function ut(Yt,gr,yr){this.target=Yt,this.texture=gr,this.renderbuffer=yr;var Tr=Yt=0;gr?(Yt=gr.width,Tr=gr.height):yr&&(Yt=yr.width,Tr=yr.height),this.width=Yt,this.height=Tr}function yt(Yt){Yt&&(Yt.texture&&Yt.texture._texture.decRef(),Yt.renderbuffer&&Yt.renderbuffer._renderbuffer.decRef())}function Lt(Yt,gr,yr){Yt&&(Yt.texture?Yt.texture._texture.refCount+=1:Yt.renderbuffer._renderbuffer.refCount+=1)}function Rt(Yt,gr){gr&&(gr.texture?gt.framebufferTexture2D(36160,Yt,gr.target,gr.texture._texture.texture,0):gt.framebufferRenderbuffer(36160,Yt,36161,gr.renderbuffer._renderbuffer.renderbuffer))}function Nt(Yt){var gr=3553,yr=null,Tr=null,pr=Yt;return typeof Yt=="object"&&(pr=Yt.data,"target"in Yt&&(gr=Yt.target|0)),Yt=pr._reglType,Yt==="texture2d"||Yt==="textureCube"?yr=pr:Yt==="renderbuffer"&&(Tr=pr,gr=36161),new ut(gr,yr,Tr)}function Vt(Yt,gr,yr,Tr,pr){return yr?(Yt=or.create2D({width:Yt,height:gr,format:Tr,type:pr}),Yt._texture.refCount=0,new ut(3553,Yt,null)):(Yt=ur.create({width:Yt,height:gr,format:Tr}),Yt._renderbuffer.refCount=0,new ut(36161,null,Yt))}function Zt(Yt){return Yt&&(Yt.texture||Yt.renderbuffer)}function qt(Yt,gr,yr){Yt&&(Yt.texture?Yt.texture.resize(gr,yr):Yt.renderbuffer&&Yt.renderbuffer.resize(gr,yr),Yt.width=gr,Yt.height=yr)}function Jt(){this.id=fr++,ir[this.id]=this,this.framebuffer=gt.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function nr(Yt){Yt.colorAttachments.forEach(yt),yt(Yt.depthAttachment),yt(Yt.stencilAttachment),yt(Yt.depthStencilAttachment)}function Mr(Yt){gt.deleteFramebuffer(Yt.framebuffer),Yt.framebuffer=null,dt.framebufferCount--,delete ir[Yt.id]}function Ke(Yt){var gr;gt.bindFramebuffer(36160,Yt.framebuffer);var yr=Yt.colorAttachments;for(gr=0;gr<yr.length;++gr)Rt(36064+gr,yr[gr]);for(gr=yr.length;gr<Ut.maxColorAttachments;++gr)gt.framebufferTexture2D(36160,36064+gr,3553,null,0);gt.framebufferTexture2D(36160,33306,3553,null,0),gt.framebufferTexture2D(36160,36096,3553,null,0),gt.framebufferTexture2D(36160,36128,3553,null,0),Rt(36096,Yt.depthAttachment),Rt(36128,Yt.stencilAttachment),Rt(33306,Yt.depthStencilAttachment),gt.checkFramebufferStatus(36160),gt.isContextLost(),gt.bindFramebuffer(36160,zt.next?zt.next.framebuffer:null),zt.cur=zt.next,gt.getError()}function Ze(Yt,gr){function yr(pr,Kr){var Or,Nr=0,Sn=0,Jr=!0,xn=!0;Or=null;var Dn=!0,mr="rgba",Ar="uint8",zr=1,Br=null,on=null,mn=null,Tn=!1;typeof pr=="number"?(Nr=pr|0,Sn=Kr|0||Nr):pr?("shape"in pr?(Sn=pr.shape,Nr=Sn[0],Sn=Sn[1]):("radius"in pr&&(Nr=Sn=pr.radius),"width"in pr&&(Nr=pr.width),"height"in pr&&(Sn=pr.height)),("color"in pr||"colors"in pr)&&(Or=pr.color||pr.colors),Or||("colorCount"in pr&&(zr=pr.colorCount|0),"colorTexture"in pr&&(Dn=!!pr.colorTexture,mr="rgba4"),"colorType"in pr&&(Ar=pr.colorType,!Dn)&&(Ar==="half float"||Ar==="float16"?mr="rgba16f":(Ar==="float"||Ar==="float32")&&(mr="rgba32f")),"colorFormat"in pr&&(mr=pr.colorFormat,0<=kt.indexOf(mr)?Dn=!0:0<=Qt.indexOf(mr)&&(Dn=!1))),("depthTexture"in pr||"depthStencilTexture"in pr)&&(Tn=!(!pr.depthTexture&&!pr.depthStencilTexture)),"depth"in pr&&(typeof pr.depth=="boolean"?Jr=pr.depth:(Br=pr.depth,xn=!1)),"stencil"in pr&&(typeof pr.stencil=="boolean"?xn=pr.stencil:(on=pr.stencil,Jr=!1)),"depthStencil"in pr&&(typeof pr.depthStencil=="boolean"?Jr=xn=pr.depthStencil:(mn=pr.depthStencil,xn=Jr=!1))):Nr=Sn=1;var An=null,Fn=null,Jn=null,ta=null;if(Array.isArray(Or))An=Or.map(Nt);else if(Or)An=[Nt(Or)];else for(An=Array(zr),Or=0;Or<zr;++Or)An[Or]=Vt(Nr,Sn,Dn,mr,Ar);for(Nr=Nr||An[0].width,Sn=Sn||An[0].height,Br?Fn=Nt(Br):Jr&&!xn&&(Fn=Vt(Nr,Sn,Tn,"depth","uint32")),on?Jn=Nt(on):xn&&!Jr&&(Jn=Vt(Nr,Sn,!1,"stencil","uint8")),mn?ta=Nt(mn):!Br&&!on&&xn&&Jr&&(ta=Vt(Nr,Sn,Tn,"depth stencil","depth stencil")),Jr=null,Or=0;Or<An.length;++Or)Lt(An[Or]),An[Or]&&An[Or].texture&&(xn=Pe[An[Or].texture._texture.format]*Ge[An[Or].texture._texture.type],Jr===null&&(Jr=xn));return Lt(Fn),Lt(Jn),Lt(ta),nr(Tr),Tr.width=Nr,Tr.height=Sn,Tr.colorAttachments=An,Tr.depthAttachment=Fn,Tr.stencilAttachment=Jn,Tr.depthStencilAttachment=ta,yr.color=An.map(Zt),yr.depth=Zt(Fn),yr.stencil=Zt(Jn),yr.depthStencil=Zt(ta),yr.width=Tr.width,yr.height=Tr.height,Ke(Tr),yr}var Tr=new Jt;return dt.framebufferCount++,yr(Yt,gr),le(yr,{resize:function(pr,Kr){var Or=Math.max(pr|0,1),Nr=Math.max(Kr|0||Or,1);if(Or===Tr.width&&Nr===Tr.height)return yr;for(var Sn=Tr.colorAttachments,Jr=0;Jr<Sn.length;++Jr)qt(Sn[Jr],Or,Nr);return qt(Tr.depthAttachment,Or,Nr),qt(Tr.stencilAttachment,Or,Nr),qt(Tr.depthStencilAttachment,Or,Nr),Tr.width=yr.width=Or,Tr.height=yr.height=Nr,Ke(Tr),yr},_reglType:"framebuffer",_framebuffer:Tr,destroy:function(){Mr(Tr),nr(Tr)},use:function(pr){zt.setFBO({framebuffer:yr},pr)}})}var zt={cur:null,next:null,dirty:!1,setFBO:null},kt=["rgba"],Qt=["rgba4","rgb565","rgb5 a1"];jt.ext_srgb&&Qt.push("srgba"),jt.ext_color_buffer_half_float&&Qt.push("rgba16f","rgb16f"),jt.webgl_color_buffer_float&&Qt.push("rgba32f");var cr=["uint8"];jt.oes_texture_half_float&&cr.push("half float","float16"),jt.oes_texture_float&&cr.push("float","float32");var fr=0,ir={};return le(zt,{getFramebuffer:function(Yt){return typeof Yt=="function"&&Yt._reglType==="framebuffer"&&(Yt=Yt._framebuffer,Yt instanceof Jt)?Yt:null},create:Ze,createCube:function(Yt){function gr(Tr){var pr,Kr={color:null},Or=0,Nr=null;pr="rgba";var Sn="uint8",Jr=1;if(typeof Tr=="number"?Or=Tr|0:Tr?("shape"in Tr?Or=Tr.shape[0]:("radius"in Tr&&(Or=Tr.radius|0),"width"in Tr?Or=Tr.width|0:"height"in Tr&&(Or=Tr.height|0)),("color"in Tr||"colors"in Tr)&&(Nr=Tr.color||Tr.colors),Nr||("colorCount"in Tr&&(Jr=Tr.colorCount|0),"colorType"in Tr&&(Sn=Tr.colorType),"colorFormat"in Tr&&(pr=Tr.colorFormat)),"depth"in Tr&&(Kr.depth=Tr.depth),"stencil"in Tr&&(Kr.stencil=Tr.stencil),"depthStencil"in Tr&&(Kr.depthStencil=Tr.depthStencil)):Or=1,Nr)if(Array.isArray(Nr))for(Tr=[],pr=0;pr<Nr.length;++pr)Tr[pr]=Nr[pr];else Tr=[Nr];else for(Tr=Array(Jr),Nr={radius:Or,format:pr,type:Sn},pr=0;pr<Jr;++pr)Tr[pr]=or.createCube(Nr);for(Kr.color=Array(Tr.length),pr=0;pr<Tr.length;++pr)Jr=Tr[pr],Or=Or||Jr.width,Kr.color[pr]={target:34069,data:Tr[pr]};for(pr=0;6>pr;++pr){for(Jr=0;Jr<Tr.length;++Jr)Kr.color[Jr].target=34069+pr;0<pr&&(Kr.depth=yr[0].depth,Kr.stencil=yr[0].stencil,Kr.depthStencil=yr[0].depthStencil),yr[pr]?yr[pr](Kr):yr[pr]=Ze(Kr)}return le(gr,{width:Or,height:Or,color:Tr})}var yr=Array(6);return gr(Yt),le(gr,{faces:yr,resize:function(Tr){var pr=Tr|0;if(pr===gr.width)return gr;var Kr=gr.color;for(Tr=0;Tr<Kr.length;++Tr)Kr[Tr].resize(pr);for(Tr=0;6>Tr;++Tr)yr[Tr].resize(pr);return gr.width=gr.height=pr,gr},_reglType:"framebufferCube",destroy:function(){yr.forEach(function(Tr){Tr.destroy()})}})},clear:function(){Te(ir).forEach(Mr)},restore:function(){zt.cur=null,zt.next=null,zt.dirty=!0,Te(ir).forEach(function(Yt){Yt.framebuffer=gt.createFramebuffer(),Ke(Yt)})}})}function H(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function k(gt,jt,Ut,or,ur,dt,ut){function yt(Ke){if(Ke!==Mr.currentVAO){var Ze=jt.oes_vertex_array_object;Ke?Ze.bindVertexArrayOES(Ke.vao):Ze.bindVertexArrayOES(null),Mr.currentVAO=Ke}}function Lt(Ke){if(Ke!==Mr.currentVAO){if(Ke)Ke.bindAttrs();else{for(var Ze=jt.angle_instanced_arrays,zt=0;zt<qt.length;++zt){var kt=qt[zt];kt.buffer?(gt.enableVertexAttribArray(zt),kt.buffer.bind(),gt.vertexAttribPointer(zt,kt.size,kt.type,kt.normalized,kt.stride,kt.offfset),Ze&&kt.divisor&&Ze.vertexAttribDivisorANGLE(zt,kt.divisor)):(gt.disableVertexAttribArray(zt),gt.vertexAttrib4f(zt,kt.x,kt.y,kt.z,kt.w))}ut.elements?gt.bindBuffer(34963,ut.elements.buffer.buffer):gt.bindBuffer(34963,null)}Mr.currentVAO=Ke}}function Rt(){Te(nr).forEach(function(Ke){Ke.destroy()})}function Nt(){this.id=++Jt,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var Ke=jt.oes_vertex_array_object;this.vao=Ke?Ke.createVertexArrayOES():null,nr[this.id]=this,this.buffers=[]}function Vt(){jt.oes_vertex_array_object&&Te(nr).forEach(function(Ke){Ke.refresh()})}var Zt=Ut.maxAttributes,qt=Array(Zt);for(Ut=0;Ut<Zt;++Ut)qt[Ut]=new H;var Jt=0,nr={},Mr={Record:H,scope:{},state:qt,currentVAO:null,targetVAO:null,restore:jt.oes_vertex_array_object?Vt:function(){},createVAO:function(Ke){function Ze(kt){var Qt;Array.isArray(kt)?(Qt=kt,zt.elements&&zt.ownsElements&&zt.elements.destroy(),zt.elements=null,zt.ownsElements=!1,zt.offset=0,zt.count=0,zt.instances=-1,zt.primitive=4):(kt.elements?(Qt=kt.elements,zt.ownsElements?(typeof Qt=="function"&&Qt._reglType==="elements"?zt.elements.destroy():zt.elements(Qt),zt.ownsElements=!1):dt.getElements(kt.elements)?(zt.elements=kt.elements,zt.ownsElements=!1):(zt.elements=dt.create(kt.elements),zt.ownsElements=!0)):(zt.elements=null,zt.ownsElements=!1),Qt=kt.attributes,zt.offset=0,zt.count=-1,zt.instances=-1,zt.primitive=4,zt.elements&&(zt.count=zt.elements._elements.vertCount,zt.primitive=zt.elements._elements.primType),"offset"in kt&&(zt.offset=kt.offset|0),"count"in kt&&(zt.count=kt.count|0),"instances"in kt&&(zt.instances=kt.instances|0),"primitive"in kt&&(zt.primitive=it[kt.primitive])),kt={};var cr=zt.attributes;cr.length=Qt.length;for(var fr=0;fr<Qt.length;++fr){var ir=Qt[fr],Yt=cr[fr]=new H,gr=ir.data||ir;if(Array.isArray(gr)||Le(gr)||g(gr)){var yr;zt.buffers[fr]&&(yr=zt.buffers[fr],Le(gr)&&yr._buffer.byteLength>=gr.byteLength?yr.subdata(gr):(yr.destroy(),zt.buffers[fr]=null)),zt.buffers[fr]||(yr=zt.buffers[fr]=ur.create(ir,34962,!1,!0)),Yt.buffer=ur.getBuffer(yr),Yt.size=Yt.buffer.dimension|0,Yt.normalized=!1,Yt.type=Yt.buffer.dtype,Yt.offset=0,Yt.stride=0,Yt.divisor=0,Yt.state=1,kt[fr]=1}else ur.getBuffer(ir)?(Yt.buffer=ur.getBuffer(ir),Yt.size=Yt.buffer.dimension|0,Yt.normalized=!1,Yt.type=Yt.buffer.dtype,Yt.offset=0,Yt.stride=0,Yt.divisor=0,Yt.state=1):ur.getBuffer(ir.buffer)?(Yt.buffer=ur.getBuffer(ir.buffer),Yt.size=(+ir.size||Yt.buffer.dimension)|0,Yt.normalized=!!ir.normalized||!1,Yt.type="type"in ir?Ye[ir.type]:Yt.buffer.dtype,Yt.offset=(ir.offset||0)|0,Yt.stride=(ir.stride||0)|0,Yt.divisor=(ir.divisor||0)|0,Yt.state=1):"x"in ir&&(Yt.x=+ir.x||0,Yt.y=+ir.y||0,Yt.z=+ir.z||0,Yt.w=+ir.w||0,Yt.state=2)}for(yr=0;yr<zt.buffers.length;++yr)!kt[yr]&&zt.buffers[yr]&&(zt.buffers[yr].destroy(),zt.buffers[yr]=null);return zt.refresh(),Ze}var zt=new Nt;return or.vaoCount+=1,Ze.destroy=function(){for(var kt=0;kt<zt.buffers.length;++kt)zt.buffers[kt]&&zt.buffers[kt].destroy();zt.buffers.length=0,zt.ownsElements&&(zt.elements.destroy(),zt.elements=null,zt.ownsElements=!1),zt.destroy()},Ze._vao=zt,Ze._reglType="vao",Ze(Ke)},getVAO:function(Ke){return typeof Ke=="function"&&Ke._vao?Ke._vao:null},destroyBuffer:function(Ke){for(var Ze=0;Ze<qt.length;++Ze){var zt=qt[Ze];zt.buffer===Ke&&(gt.disableVertexAttribArray(Ze),zt.buffer=null)}},setVAO:jt.oes_vertex_array_object?yt:Lt,clear:jt.oes_vertex_array_object?Rt:function(){}};return Nt.prototype.bindAttrs=function(){for(var Ke=jt.angle_instanced_arrays,Ze=this.attributes,zt=0;zt<Ze.length;++zt){var kt=Ze[zt];kt.buffer?(gt.enableVertexAttribArray(zt),gt.bindBuffer(34962,kt.buffer.buffer),gt.vertexAttribPointer(zt,kt.size,kt.type,kt.normalized,kt.stride,kt.offset),Ke&&kt.divisor&&Ke.vertexAttribDivisorANGLE(zt,kt.divisor)):(gt.disableVertexAttribArray(zt),gt.vertexAttrib4f(zt,kt.x,kt.y,kt.z,kt.w))}for(Ke=Ze.length;Ke<Zt;++Ke)gt.disableVertexAttribArray(Ke);(Ke=dt.getElements(this.elements))?gt.bindBuffer(34963,Ke.buffer.buffer):gt.bindBuffer(34963,null)},Nt.prototype.refresh=function(){var Ke=jt.oes_vertex_array_object;Ke&&(Ke.bindVertexArrayOES(this.vao),this.bindAttrs(),Mr.currentVAO=null,Ke.bindVertexArrayOES(null))},Nt.prototype.destroy=function(){if(this.vao){var Ke=jt.oes_vertex_array_object;this===Mr.currentVAO&&(Mr.currentVAO=null,Ke.bindVertexArrayOES(null)),Ke.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),nr[this.id]&&(delete nr[this.id],--or.vaoCount)},Mr}function V(gt,jt,Ut,or){function ur(Jt,nr,Mr,Ke){this.name=Jt,this.id=nr,this.location=Mr,this.info=Ke}function dt(Jt,nr){for(var Mr=0;Mr<Jt.length;++Mr)if(Jt[Mr].id===nr.id){Jt[Mr].location=nr.location;return}Jt.push(nr)}function ut(Jt,nr,Mr){Mr=Jt===35632?Rt:Nt;var Ke=Mr[nr];if(!Ke){var Ze=jt.str(nr),Ke=gt.createShader(Jt);gt.shaderSource(Ke,Ze),gt.compileShader(Ke),Mr[nr]=Ke}return Ke}function yt(Jt,nr){this.id=qt++,this.fragId=Jt,this.vertId=nr,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,or.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function Lt(Jt,nr,Mr){var Ke;Ke=ut(35632,Jt.fragId);var Ze=ut(35633,Jt.vertId);if(nr=Jt.program=gt.createProgram(),gt.attachShader(nr,Ke),gt.attachShader(nr,Ze),Mr)for(Ke=0;Ke<Mr.length;++Ke)Ze=Mr[Ke],gt.bindAttribLocation(nr,Ze[0],Ze[1]);gt.linkProgram(nr),Ze=gt.getProgramParameter(nr,35718),or.profile&&(Jt.stats.uniformsCount=Ze);var zt=Jt.uniforms;for(Ke=0;Ke<Ze;++Ke)if(Mr=gt.getActiveUniform(nr,Ke))if(1<Mr.size)for(var kt=0;kt<Mr.size;++kt){var Qt=Mr.name.replace("[0]","["+kt+"]");dt(zt,new ur(Qt,jt.id(Qt),gt.getUniformLocation(nr,Qt),Mr))}else dt(zt,new ur(Mr.name,jt.id(Mr.name),gt.getUniformLocation(nr,Mr.name),Mr));for(Ze=gt.getProgramParameter(nr,35721),or.profile&&(Jt.stats.attributesCount=Ze),Jt=Jt.attributes,Ke=0;Ke<Ze;++Ke)(Mr=gt.getActiveAttrib(nr,Ke))&&dt(Jt,new ur(Mr.name,jt.id(Mr.name),gt.getAttribLocation(nr,Mr.name),Mr))}var Rt={},Nt={},Vt={},Zt=[],qt=0;return or.profile&&(Ut.getMaxUniformsCount=function(){var Jt=0;return Zt.forEach(function(nr){nr.stats.uniformsCount>Jt&&(Jt=nr.stats.uniformsCount)}),Jt},Ut.getMaxAttributesCount=function(){var Jt=0;return Zt.forEach(function(nr){nr.stats.attributesCount>Jt&&(Jt=nr.stats.attributesCount)}),Jt}),{clear:function(){var Jt=gt.deleteShader.bind(gt);Te(Rt).forEach(Jt),Rt={},Te(Nt).forEach(Jt),Nt={},Zt.forEach(function(nr){gt.deleteProgram(nr.program)}),Zt.length=0,Vt={},Ut.shaderCount=0},program:function(Jt,nr,Mr,Ke){var Ze=Vt[nr];Ze||(Ze=Vt[nr]={});var zt=Ze[Jt];if(zt&&(zt.refCount++,!Ke))return zt;var kt=new yt(nr,Jt);return Ut.shaderCount++,Lt(kt,Mr,Ke),zt||(Ze[Jt]=kt),Zt.push(kt),le(kt,{destroy:function(){if(kt.refCount--,0>=kt.refCount){gt.deleteProgram(kt.program);var Qt=Zt.indexOf(kt);Zt.splice(Qt,1),Ut.shaderCount--}0>=Ze[kt.vertId].refCount&&(gt.deleteShader(Nt[kt.vertId]),delete Nt[kt.vertId],delete Vt[kt.fragId][kt.vertId]),Object.keys(Vt[kt.fragId]).length||(gt.deleteShader(Rt[kt.fragId]),delete Rt[kt.fragId],delete Vt[kt.fragId])}})},restore:function(){Rt={},Nt={};for(var Jt=0;Jt<Zt.length;++Jt)Lt(Zt[Jt],null,Zt[Jt].attributes.map(function(nr){return[nr.location,nr.name]}))},shader:ut,frag:-1,vert:-1}}function G(gt,jt,Ut,or,ur,dt,ut){function yt(Rt){var Nt;Nt=jt.next===null?5121:jt.next.colorAttachments[0].texture._texture.type;var Vt=0,Zt=0,qt=or.framebufferWidth,Jt=or.framebufferHeight,nr=null;return Le(Rt)?nr=Rt:Rt&&(Vt=Rt.x|0,Zt=Rt.y|0,qt=(Rt.width||or.framebufferWidth-Vt)|0,Jt=(Rt.height||or.framebufferHeight-Zt)|0,nr=Rt.data||null),Ut(),Rt=qt*Jt*4,nr||(Nt===5121?nr=new Uint8Array(Rt):Nt===5126&&(nr=nr||new Float32Array(Rt))),gt.pixelStorei(3333,4),gt.readPixels(Vt,Zt,qt,Jt,6408,Nt,nr),nr}function Lt(Rt){var Nt;return jt.setFBO({framebuffer:Rt.framebuffer},function(){Nt=yt(Rt)}),Nt}return function(Rt){return Rt&&"framebuffer"in Rt?Lt(Rt):yt(Rt)}}function U(gt){for(var jt=Array(gt.length>>2),or=0;or<jt.length;or++)jt[or]=0;for(or=0;or<8*gt.length;or+=8)jt[or>>5]|=(gt.charCodeAt(or/8)&255)<<24-or%32;var Ut=8*gt.length;gt=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225];var or=Array(64),ur,dt,ut,yt,Lt,Rt,Nt,Vt,Zt,qt,Jt;for(jt[Ut>>5]|=128<<24-Ut%32,jt[(Ut+64>>9<<4)+15]=Ut,Vt=0;Vt<jt.length;Vt+=16){for(Ut=gt[0],ur=gt[1],dt=gt[2],ut=gt[3],yt=gt[4],Lt=gt[5],Rt=gt[6],Nt=gt[7],Zt=0;64>Zt;Zt++){if(16>Zt)or[Zt]=jt[Zt+Vt];else{qt=Zt,Jt=or[Zt-2],Jt=re(Jt,17)^re(Jt,19)^Jt>>>10,Jt=ie(Jt,or[Zt-7]);var nr;nr=or[Zt-15],nr=re(nr,7)^re(nr,18)^nr>>>3,or[qt]=ie(ie(Jt,nr),or[Zt-16])}qt=yt,qt=re(qt,6)^re(qt,11)^re(qt,25),qt=ie(ie(ie(ie(Nt,qt),yt&Lt^~yt&Rt),We[Zt]),or[Zt]),Nt=Ut,Nt=re(Nt,2)^re(Nt,13)^re(Nt,22),Jt=ie(Nt,Ut&ur^Ut&dt^ur&dt),Nt=Rt,Rt=Lt,Lt=yt,yt=ie(ut,qt),ut=dt,dt=ur,ur=Ut,Ut=ie(qt,Jt)}gt[0]=ie(Ut,gt[0]),gt[1]=ie(ur,gt[1]),gt[2]=ie(dt,gt[2]),gt[3]=ie(ut,gt[3]),gt[4]=ie(yt,gt[4]),gt[5]=ie(Lt,gt[5]),gt[6]=ie(Rt,gt[6]),gt[7]=ie(Nt,gt[7])}for(jt="",or=0;or<32*gt.length;or+=8)jt+=String.fromCharCode(gt[or>>5]>>>24-or%32&255);return jt}function Y(gt){for(var jt="",Ut,or=0;or<gt.length;or++)Ut=gt.charCodeAt(or),jt+="0123456789abcdef".charAt(Ut>>>4&15)+"0123456789abcdef".charAt(Ut&15);return jt}function ee(gt){for(var jt="",Ut=-1,or,ur;++Ut<gt.length;)or=gt.charCodeAt(Ut),ur=Ut+1<gt.length?gt.charCodeAt(Ut+1):0,55296<=or&&56319>=or&&56320<=ur&&57343>=ur&&(or=65536+((or&1023)<<10)+(ur&1023),Ut++),127>=or?jt+=String.fromCharCode(or):2047>=or?jt+=String.fromCharCode(192|or>>>6&31,128|or&63):65535>=or?jt+=String.fromCharCode(224|or>>>12&15,128|or>>>6&63,128|or&63):2097151>=or&&(jt+=String.fromCharCode(240|or>>>18&7,128|or>>>12&63,128|or>>>6&63,128|or&63));return jt}function re(gt,jt){return gt>>>jt|gt<<32-jt}function ie(gt,jt){var Ut=(gt&65535)+(jt&65535);return(gt>>16)+(jt>>16)+(Ut>>16)<<16|Ut&65535}function se(gt){return Array.prototype.slice.call(gt)}function ce(gt){return se(gt).join("")}function q(gt){function jt(){var Nt=[],Vt=[];return le(function(){Nt.push.apply(Nt,se(arguments))},{def:function(){var Zt="v"+ur++;return Vt.push(Zt),0<arguments.length&&(Nt.push(Zt,"="),Nt.push.apply(Nt,se(arguments)),Nt.push(";")),Zt},toString:function(){return ce([0<Vt.length?"var "+Vt.join(",")+";":"",ce(Nt)])}})}function Ut(){function Nt(nr,Mr){Zt(nr,Mr,"=",Vt.def(nr,Mr),";")}var Vt=jt(),Zt=jt(),qt=Vt.toString,Jt=Zt.toString;return le(function(){Vt.apply(Vt,se(arguments))},{def:Vt.def,entry:Vt,exit:Zt,save:Nt,set:function(nr,Mr,Ke){Nt(nr,Mr),Vt(nr,Mr,"=",Ke,";")},toString:function(){return qt()+Jt()}})}var or=gt&&gt.cache,ur=0,dt=[],ut=[],yt=[],Lt=jt(),Rt={};return{global:Lt,link:function(Nt,Vt){var Zt=Vt&&Vt.stable;if(!Zt){for(var qt=0;qt<ut.length;++qt)if(ut[qt]===Nt&&!yt[qt])return dt[qt]}return qt="g"+ur++,dt.push(qt),ut.push(Nt),yt.push(Zt),qt},block:jt,proc:function(Nt,Vt){function Zt(){var Mr="a"+qt.length;return qt.push(Mr),Mr}var qt=[];Vt=Vt||0;for(var Jt=0;Jt<Vt;++Jt)Zt();var Jt=Ut(),nr=Jt.toString;return Rt[Nt]=le(Jt,{arg:Zt,toString:function(){return ce(["function(",qt.join(),"){",nr(),"}"])}})},scope:Ut,cond:function(){var Nt=ce(arguments),Vt=Ut(),Zt=Ut(),qt=Vt.toString,Jt=Zt.toString;return le(Vt,{then:function(){return Vt.apply(Vt,se(arguments)),this},else:function(){return Zt.apply(Zt,se(arguments)),this},toString:function(){var nr=Jt();return nr&&(nr="else{"+nr+"}"),ce(["if(",Nt,"){",qt(),"}",nr])}})},compile:function(){var Nt=['"use strict";',Lt,"return {"];Object.keys(Rt).forEach(function(qt){Nt.push('"',qt,'":',Rt[qt].toString(),",")}),Nt.push("}");var Vt=ce(Nt).replace(/;/g,`;
`).replace(/}/g,`}
`).replace(/{/g,`{
`),Zt;return or&&(Zt=Y(U(ee(Vt))),or[Zt])?or[Zt].apply(null,ut):(Vt=Function.apply(null,dt.concat(Vt)),or&&(or[Zt]=Vt),Vt.apply(null,ut))}}}function j(gt){return Array.isArray(gt)||Le(gt)||g(gt)}function Z(gt){return gt.sort(function(jt,Ut){return jt==="viewport"?-1:Ut==="viewport"?1:jt<Ut?-1:1})}function Q(gt,jt,Ut,or){this.thisDep=gt,this.contextDep=jt,this.propDep=Ut,this.append=or}function ue(gt){return gt&&!(gt.thisDep||gt.contextDep||gt.propDep)}function fe(gt){return new Q(!1,!1,!1,gt)}function te(gt,jt){var Ut=gt.type;if(Ut===0)return Ut=gt.data.length,new Q(!0,1<=Ut,2<=Ut,jt);if(Ut===4)return Ut=gt.data,new Q(Ut.thisDep,Ut.contextDep,Ut.propDep,jt);if(Ut===5)return new Q(!1,!1,!1,jt);if(Ut===6){for(var or=Ut=!1,ur=!1,dt=0;dt<gt.data.length;++dt){var ut=gt.data[dt];ut.type===1?ur=!0:ut.type===2?or=!0:ut.type===3?Ut=!0:ut.type===0?(Ut=!0,ut=ut.data,1<=ut&&(or=!0),2<=ut&&(ur=!0)):ut.type===4&&(Ut=Ut||ut.data.thisDep,or=or||ut.data.contextDep,ur=ur||ut.data.propDep)}return new Q(Ut,or,ur,jt)}return new Q(Ut===3,Ut===2,Ut===1,jt)}function ne(gt,jt,Ut,or,ur,dt,ut,yt,Lt,Rt,Nt,Vt,Zt,qt,Jt,nr){function Mr($t){return $t.replace(".","_")}function Ke($t,Sr,an){var cn=Mr($t);Ln.push($t),Un[cn]=dn[cn]=!!an,Pn[cn]=Sr}function Ze($t,Sr,an){var cn=Mr($t);Ln.push($t),Array.isArray(an)?(dn[cn]=an.slice(),Un[cn]=an.slice()):dn[cn]=Un[cn]=an,Vn[cn]=Sr}function zt(){var $t=q({cache:Jt}),Sr=$t.link,an=$t.global;$t.id=$a++,$t.batchId="0";var cn=Sr(aa),hn=$t.shared={props:"a0"};Object.keys(aa).forEach(function(Lr){hn[Lr]=an.def(cn,".",Lr)});var _n=$t.next={},wn=$t.current={};Object.keys(Vn).forEach(function(Lr){Array.isArray(dn[Lr])&&(_n[Lr]=an.def(hn.next,".",Lr),wn[Lr]=an.def(hn.current,".",Lr))});var fn=$t.constants={};Object.keys(Da).forEach(function(Lr){fn[Lr]=an.def(JSON.stringify(Da[Lr]))}),$t.invoke=function(Lr,kr){switch(kr.type){case 0:var vn=["this",hn.context,hn.props,$t.batchId];return Lr.def(Sr(kr.data),".call(",vn.slice(0,Math.max(kr.data.length+1,4)),")");case 1:return Lr.def(hn.props,kr.data);case 2:return Lr.def(hn.context,kr.data);case 3:return Lr.def("this",kr.data);case 4:return kr.data.append($t,Lr),kr.data.ref;case 5:return kr.data.toString();case 6:return kr.data.map(function(kn){return $t.invoke(Lr,kn)})}},$t.attribCache={};var Rr={};return $t.scopeAttrib=function(Lr){if(Lr=jt.id(Lr),Lr in Rr)return Rr[Lr];var kr=Rt.scope[Lr];return kr||(kr=Rt.scope[Lr]=new ha),Rr[Lr]=Sr(kr)},$t}function kt($t){var Sr=$t.static;$t=$t.dynamic;var an;if("profile"in Sr){var cn=!!Sr.profile;an=fe(function(_n,wn){return cn}),an.enable=cn}else if("profile"in $t){var hn=$t.profile;an=te(hn,function(_n,wn){return _n.invoke(wn,hn)})}return an}function Qt($t,Sr){var an=$t.static,cn=$t.dynamic;if("framebuffer"in an){var hn=an.framebuffer;return hn?(hn=yt.getFramebuffer(hn),fe(function(wn,fn){var Rr=wn.link(hn),Lr=wn.shared;return fn.set(Lr.framebuffer,".next",Rr),Lr=Lr.context,fn.set(Lr,".framebufferWidth",Rr+".width"),fn.set(Lr,".framebufferHeight",Rr+".height"),Rr})):fe(function(wn,fn){var Rr=wn.shared;return fn.set(Rr.framebuffer,".next","null"),Rr=Rr.context,fn.set(Rr,".framebufferWidth",Rr+".drawingBufferWidth"),fn.set(Rr,".framebufferHeight",Rr+".drawingBufferHeight"),"null"})}if("framebuffer"in cn){var _n=cn.framebuffer;return te(_n,function(wn,fn){var kr=wn.invoke(fn,_n),Rr=wn.shared,Lr=Rr.framebuffer,kr=fn.def(Lr,".getFramebuffer(",kr,")");return fn.set(Lr,".next",kr),Rr=Rr.context,fn.set(Rr,".framebufferWidth",kr+"?"+kr+".width:"+Rr+".drawingBufferWidth"),fn.set(Rr,".framebufferHeight",kr+"?"+kr+".height:"+Rr+".drawingBufferHeight"),kr})}return null}function cr($t,Sr,an){function cn(fn){if(fn in hn){var Rr=hn[fn];fn=!0;var Lr=Rr.x|0,kr=Rr.y|0,vn,kn;return"width"in Rr?vn=Rr.width|0:fn=!1,"height"in Rr?kn=Rr.height|0:fn=!1,new Q(!fn&&Sr&&Sr.thisDep,!fn&&Sr&&Sr.contextDep,!fn&&Sr&&Sr.propDep,function(pn,zn){var qn=pn.shared.context,ua=vn;"width"in Rr||(ua=zn.def(qn,".","framebufferWidth","-",Lr));var ia=kn;return"height"in Rr||(ia=zn.def(qn,".","framebufferHeight","-",kr)),[Lr,kr,ua,ia]})}if(fn in _n){var Yn=_n[fn];return fn=te(Yn,function(pn,zn){var ga=pn.invoke(zn,Yn),qn=pn.shared.context,ua=zn.def(ga,".x|0"),ia=zn.def(ga,".y|0"),oa=zn.def('"width" in ',ga,"?",ga,".width|0:","(",qn,".","framebufferWidth","-",ua,")"),ga=zn.def('"height" in ',ga,"?",ga,".height|0:","(",qn,".","framebufferHeight","-",ia,")");return[ua,ia,oa,ga]}),Sr&&(fn.thisDep=fn.thisDep||Sr.thisDep,fn.contextDep=fn.contextDep||Sr.contextDep,fn.propDep=fn.propDep||Sr.propDep),fn}return Sr?new Q(Sr.thisDep,Sr.contextDep,Sr.propDep,function(pn,zn){var qn=pn.shared.context;return[0,0,zn.def(qn,".","framebufferWidth"),zn.def(qn,".","framebufferHeight")]}):null}var hn=$t.static,_n=$t.dynamic;if($t=cn("viewport")){var wn=$t;$t=new Q($t.thisDep,$t.contextDep,$t.propDep,function(fn,Rr){var Lr=wn.append(fn,Rr),kr=fn.shared.context;return Rr.set(kr,".viewportWidth",Lr[2]),Rr.set(kr,".viewportHeight",Lr[3]),Lr})}return{viewport:$t,scissor_box:cn("scissor.box")}}function fr($t,Sr){var an=$t.static;if(typeof an.frag=="string"&&typeof an.vert=="string"){if(0<Object.keys(Sr.dynamic).length)return null;var an=Sr.static,cn=Object.keys(an);if(0<cn.length&&typeof an[cn[0]]=="number"){for(var hn=[],_n=0;_n<cn.length;++_n)hn.push([an[cn[_n]]|0,cn[_n]]);return hn}}return null}function ir($t,Sr,an){function cn(Lr){if(Lr in hn){var kr=jt.id(hn[Lr]);return Lr=fe(function(){return kr}),Lr.id=kr,Lr}if(Lr in _n){var vn=_n[Lr];return te(vn,function(kn,Yn){var pn=kn.invoke(Yn,vn);return Yn.def(kn.shared.strings,".id(",pn,")")})}return null}var hn=$t.static,_n=$t.dynamic,wn=cn("frag"),fn=cn("vert"),Rr=null;return ue(wn)&&ue(fn)?(Rr=Nt.program(fn.id,wn.id,null,an),$t=fe(function(Lr,kr){return Lr.link(Rr)})):$t=new Q(wn&&wn.thisDep||fn&&fn.thisDep,wn&&wn.contextDep||fn&&fn.contextDep,wn&&wn.propDep||fn&&fn.propDep,function(Lr,kr){var vn=Lr.shared.shader,kn;kn=wn?wn.append(Lr,kr):kr.def(vn,".","frag");var Yn;return Yn=fn?fn.append(Lr,kr):kr.def(vn,".","vert"),kr.def(vn+".program("+Yn+","+kn+")")}),{frag:wn,vert:fn,progVar:$t,program:Rr}}function Yt($t,Sr){function an(pn,zn){if(pn in cn){var qn=cn[pn]|0;return zn?_n.offset=qn:_n.instances=qn,fe(function(ia,oa){return zn&&(ia.OFFSET=qn),qn})}if(pn in hn){var ua=hn[pn];return te(ua,function(ia,oa){var ga=ia.invoke(oa,ua);return zn&&(ia.OFFSET=ga),ga})}if(zn){if(Rr)return fe(function(ia,oa){return ia.OFFSET=0});if(wn)return new Q(fn.thisDep,fn.contextDep,fn.propDep,function(ia,oa){return oa.def(ia.shared.vao+".currentVAO?"+ia.shared.vao+".currentVAO.offset:0")})}else if(wn)return new Q(fn.thisDep,fn.contextDep,fn.propDep,function(ia,oa){return oa.def(ia.shared.vao+".currentVAO?"+ia.shared.vao+".currentVAO.instances:-1")});return null}var cn=$t.static,hn=$t.dynamic,_n={},wn=!1,fn=function(){if("vao"in cn){var pn=cn.vao;return pn!==null&&Rt.getVAO(pn)===null&&(pn=Rt.createVAO(pn)),wn=!0,_n.vao=pn,fe(function(qn){var ua=Rt.getVAO(pn);return ua?qn.link(ua):"null"})}if("vao"in hn){wn=!0;var zn=hn.vao;return te(zn,function(qn,ua){var ia=qn.invoke(ua,zn);return ua.def(qn.shared.vao+".getVAO("+ia+")")})}return null}(),Rr=!1,Lr=function(){if("elements"in cn){var pn=cn.elements;if(_n.elements=pn,j(pn)){var zn=_n.elements=dt.create(pn,!0),pn=dt.getElements(zn);Rr=!0}else pn&&(pn=dt.getElements(pn),Rr=!0);return zn=fe(function(ua,ia){if(pn){var oa=ua.link(pn);return ua.ELEMENTS=oa}return ua.ELEMENTS=null}),zn.value=pn,zn}if("elements"in hn){Rr=!0;var qn=hn.elements;return te(qn,function(ua,ia){var oa=ua.shared,uo=oa.isBufferArgs,oa=oa.elements,Co=ua.invoke(ia,qn),ga=ia.def("null"),uo=ia.def(uo,"(",Co,")"),Co=ua.cond(uo).then(ga,"=",oa,".createStream(",Co,");").else(ga,"=",oa,".getElements(",Co,");");return ia.entry(Co),ia.exit(ua.cond(uo).then(oa,".destroyStream(",ga,");")),ua.ELEMENTS=ga})}return wn?new Q(fn.thisDep,fn.contextDep,fn.propDep,function(ua,ia){return ia.def(ua.shared.vao+".currentVAO?"+ua.shared.elements+".getElements("+ua.shared.vao+".currentVAO.elements):null")}):null}(),kr=an("offset",!0),vn=function(){if("primitive"in cn){var pn=cn.primitive;return _n.primitive=pn,fe(function(qn,ua){return it[pn]})}if("primitive"in hn){var zn=hn.primitive;return te(zn,function(qn,ua){var ia=qn.constants.primTypes,oa=qn.invoke(ua,zn);return ua.def(ia,"[",oa,"]")})}return Rr?ue(Lr)?Lr.value?fe(function(qn,ua){return ua.def(qn.ELEMENTS,".primType")}):fe(function(){return 4}):new Q(Lr.thisDep,Lr.contextDep,Lr.propDep,function(qn,ua){var ia=qn.ELEMENTS;return ua.def(ia,"?",ia,".primType:",4)}):wn?new Q(fn.thisDep,fn.contextDep,fn.propDep,function(qn,ua){return ua.def(qn.shared.vao+".currentVAO?"+qn.shared.vao+".currentVAO.primitive:4")}):null}(),kn=function(){if("count"in cn){var pn=cn.count|0;return _n.count=pn,fe(function(){return pn})}if("count"in hn){var zn=hn.count;return te(zn,function(qn,ua){return qn.invoke(ua,zn)})}return Rr?ue(Lr)?Lr?kr?new Q(kr.thisDep,kr.contextDep,kr.propDep,function(qn,ua){return ua.def(qn.ELEMENTS,".vertCount-",qn.OFFSET)}):fe(function(qn,ua){return ua.def(qn.ELEMENTS,".vertCount")}):fe(function(){return-1}):new Q(Lr.thisDep||kr.thisDep,Lr.contextDep||kr.contextDep,Lr.propDep||kr.propDep,function(qn,ua){var ia=qn.ELEMENTS;return qn.OFFSET?ua.def(ia,"?",ia,".vertCount-",qn.OFFSET,":-1"):ua.def(ia,"?",ia,".vertCount:-1")}):wn?new Q(fn.thisDep,fn.contextDep,fn.propDep,function(qn,ua){return ua.def(qn.shared.vao,".currentVAO?",qn.shared.vao,".currentVAO.count:-1")}):null}(),Yn=an("instances",!1);return{elements:Lr,primitive:vn,count:kn,instances:Yn,offset:kr,vao:fn,vaoActive:wn,elementsActive:Rr,static:_n}}function gr($t,Sr){var an=$t.static,cn=$t.dynamic,hn={};return Ln.forEach(function(_n){function wn(Rr,Lr){if(_n in an){var kr=Rr(an[_n]);hn[fn]=fe(function(){return kr})}else if(_n in cn){var vn=cn[_n];hn[fn]=te(vn,function(kn,Yn){return Lr(kn,Yn,kn.invoke(Yn,vn))})}}var fn=Mr(_n);switch(_n){case"cull.enable":case"blend.enable":case"dither":case"stencil.enable":case"depth.enable":case"scissor.enable":case"polygonOffset.enable":case"sample.alpha":case"sample.enable":case"depth.mask":return wn(function(Rr){return Rr},function(Rr,Lr,kr){return kr});case"depth.func":return wn(function(Rr){return Pt[Rr]},function(Rr,Lr,kr){return Lr.def(Rr.constants.compareFuncs,"[",kr,"]")});case"depth.range":return wn(function(Rr){return Rr},function(Rr,Lr,kr){return Rr=Lr.def("+",kr,"[0]"),Lr=Lr.def("+",kr,"[1]"),[Rr,Lr]});case"blend.func":return wn(function(Rr){return[St["srcRGB"in Rr?Rr.srcRGB:Rr.src],St["dstRGB"in Rr?Rr.dstRGB:Rr.dst],St["srcAlpha"in Rr?Rr.srcAlpha:Rr.src],St["dstAlpha"in Rr?Rr.dstAlpha:Rr.dst]]},function(Rr,Lr,kr){function vn(zn,qn){return Lr.def('"',zn,qn,'" in ',kr,"?",kr,".",zn,qn,":",kr,".",zn)}Rr=Rr.constants.blendFuncs;var kn=vn("src","RGB"),pn=vn("dst","RGB"),kn=Lr.def(Rr,"[",kn,"]"),Yn=Lr.def(Rr,"[",vn("src","Alpha"),"]"),pn=Lr.def(Rr,"[",pn,"]");return Rr=Lr.def(Rr,"[",vn("dst","Alpha"),"]"),[kn,pn,Yn,Rr]});case"blend.equation":return wn(function(Rr){if(typeof Rr=="string")return[la[Rr],la[Rr]];if(typeof Rr=="object")return[la[Rr.rgb],la[Rr.alpha]]},function(Rr,Lr,kr){var vn=Rr.constants.blendEquations,kn=Lr.def(),Yn=Lr.def();return Rr=Rr.cond("typeof ",kr,'==="string"'),Rr.then(kn,"=",Yn,"=",vn,"[",kr,"];"),Rr.else(kn,"=",vn,"[",kr,".rgb];",Yn,"=",vn,"[",kr,".alpha];"),Lr(Rr),[kn,Yn]});case"blend.color":return wn(function(Rr){return u(4,function(Lr){return+Rr[Lr]})},function(Rr,Lr,kr){return u(4,function(vn){return Lr.def("+",kr,"[",vn,"]")})});case"stencil.mask":return wn(function(Rr){return Rr|0},function(Rr,Lr,kr){return Lr.def(kr,"|0")});case"stencil.func":return wn(function(Rr){return[Pt[Rr.cmp||"keep"],Rr.ref||0,"mask"in Rr?Rr.mask:-1]},function(Rr,Lr,kr){Rr=Lr.def('"cmp" in ',kr,"?",Rr.constants.compareFuncs,"[",kr,".cmp]",":",7680);var vn=Lr.def(kr,".ref|0");return Lr=Lr.def('"mask" in ',kr,"?",kr,".mask|0:-1"),[Rr,vn,Lr]});case"stencil.opFront":case"stencil.opBack":return wn(function(Rr){return[_n==="stencil.opBack"?1029:1028,wt[Rr.fail||"keep"],wt[Rr.zfail||"keep"],wt[Rr.zpass||"keep"]]},function(Rr,Lr,kr){function vn(Yn){return Lr.def('"',Yn,'" in ',kr,"?",kn,"[",kr,".",Yn,"]:",7680)}var kn=Rr.constants.stencilOps;return[_n==="stencil.opBack"?1029:1028,vn("fail"),vn("zfail"),vn("zpass")]});case"polygonOffset.offset":return wn(function(Rr){return[Rr.factor|0,Rr.units|0]},function(Rr,Lr,kr){return Rr=Lr.def(kr,".factor|0"),Lr=Lr.def(kr,".units|0"),[Rr,Lr]});case"cull.face":return wn(function(Rr){var Lr=0;return Rr==="front"?Lr=1028:Rr==="back"&&(Lr=1029),Lr},function(Rr,Lr,kr){return Lr.def(kr,'==="front"?',1028,":",1029)});case"lineWidth":return wn(function(Rr){return Rr},function(Rr,Lr,kr){return kr});case"frontFace":return wn(function(Rr){return Bt[Rr]},function(Rr,Lr,kr){return Lr.def(kr+'==="cw"?2304:2305')});case"colorMask":return wn(function(Rr){return Rr.map(function(Lr){return!!Lr})},function(Rr,Lr,kr){return u(4,function(vn){return"!!"+kr+"["+vn+"]"})});case"sample.coverage":return wn(function(Rr){return["value"in Rr?Rr.value:1,!!Rr.invert]},function(Rr,Lr,kr){return Rr=Lr.def('"value" in ',kr,"?+",kr,".value:1"),Lr=Lr.def("!!",kr,".invert"),[Rr,Lr]})}}),hn}function yr($t,Sr){var an=$t.static,cn=$t.dynamic,hn={};return Object.keys(an).forEach(function(_n){var wn=an[_n],fn;if(typeof wn=="number"||typeof wn=="boolean")fn=fe(function(){return wn});else if(typeof wn=="function"){var Rr=wn._reglType;Rr==="texture2d"||Rr==="textureCube"?fn=fe(function(Lr){return Lr.link(wn)}):(Rr==="framebuffer"||Rr==="framebufferCube")&&(fn=fe(function(Lr){return Lr.link(wn.color[0])}))}else L(wn)&&(fn=fe(function(Lr){return Lr.global.def("[",u(wn.length,function(kr){return wn[kr]}),"]")}));fn.value=wn,hn[_n]=fn}),Object.keys(cn).forEach(function(_n){var wn=cn[_n];hn[_n]=te(wn,function(fn,Rr){return fn.invoke(Rr,wn)})}),hn}function Tr($t,Sr){var an=$t.static,cn=$t.dynamic,hn={};return Object.keys(an).forEach(function(_n){var wn=an[_n],fn=jt.id(_n),Rr=new ha;if(j(wn))Rr.state=1,Rr.buffer=ur.getBuffer(ur.create(wn,34962,!1,!0)),Rr.type=0;else{var Lr=ur.getBuffer(wn);if(Lr)Rr.state=1,Rr.buffer=Lr,Rr.type=0;else if("constant"in wn){var kr=wn.constant;Rr.buffer="null",Rr.state=2,typeof kr=="number"?Rr.x=kr:tt.forEach(function(qn,ua){ua<kr.length&&(Rr[qn]=kr[ua])})}else{var Lr=j(wn.buffer)?ur.getBuffer(ur.create(wn.buffer,34962,!1,!0)):ur.getBuffer(wn.buffer),vn=wn.offset|0,kn=wn.stride|0,Yn=wn.size|0,pn=!!wn.normalized,zn=0;"type"in wn&&(zn=Ye[wn.type]),wn=wn.divisor|0,Rr.buffer=Lr,Rr.state=1,Rr.size=Yn,Rr.normalized=pn,Rr.type=zn||Lr.dtype,Rr.offset=vn,Rr.stride=kn,Rr.divisor=wn}}hn[_n]=fe(function(qn,ua){var ia=qn.attribCache;if(fn in ia)return ia[fn];var oa={isStream:!1};return Object.keys(Rr).forEach(function(ga){oa[ga]=Rr[ga]}),Rr.buffer&&(oa.buffer=qn.link(Rr.buffer),oa.type=oa.type||oa.buffer+".dtype"),ia[fn]=oa})}),Object.keys(cn).forEach(function(_n){var wn=cn[_n];hn[_n]=te(wn,function(fn,Rr){function Lr(ia){Rr(pn[ia],"=",kr,".",ia,"|0;")}var kr=fn.invoke(Rr,wn),Yn=fn.shared,vn=fn.constants,kn=Yn.isBufferArgs,Yn=Yn.buffer,pn={isStream:Rr.def(!1)},zn=new ha;zn.state=1,Object.keys(zn).forEach(function(ia){pn[ia]=Rr.def(""+zn[ia])});var qn=pn.buffer,ua=pn.type;return Rr("if(",kn,"(",kr,")){",pn.isStream,"=true;",qn,"=",Yn,".createStream(",34962,",",kr,");",ua,"=",qn,".dtype;","}else{",qn,"=",Yn,".getBuffer(",kr,");","if(",qn,"){",ua,"=",qn,".dtype;",'}else if("constant" in ',kr,"){",pn.state,"=",2,";","if(typeof "+kr+'.constant === "number"){',pn[tt[0]],"=",kr,".constant;",tt.slice(1).map(function(ia){return pn[ia]}).join("="),"=0;","}else{",tt.map(function(ia,oa){return pn[ia]+"="+kr+".constant.length>"+oa+"?"+kr+".constant["+oa+"]:0;"}).join(""),"}}else{","if(",kn,"(",kr,".buffer)){",qn,"=",Yn,".createStream(",34962,",",kr,".buffer);","}else{",qn,"=",Yn,".getBuffer(",kr,".buffer);","}",ua,'="type" in ',kr,"?",vn.glTypes,"[",kr,".type]:",qn,".dtype;",pn.normalized,"=!!",kr,".normalized;"),Lr("size"),Lr("offset"),Lr("stride"),Lr("divisor"),Rr("}}"),Rr.exit("if(",pn.isStream,"){",Yn,".destroyStream(",qn,");","}"),pn})}),hn}function pr($t){var Sr=$t.static,an=$t.dynamic,cn={};return Object.keys(Sr).forEach(function(hn){var _n=Sr[hn];cn[hn]=fe(function(wn,fn){return typeof _n=="number"||typeof _n=="boolean"?""+_n:wn.link(_n)})}),Object.keys(an).forEach(function(hn){var _n=an[hn];cn[hn]=te(_n,function(wn,fn){return wn.invoke(fn,_n)})}),cn}function Kr($t,Sr,an,cn,hn){function _n(zn){var qn=fn[zn];qn&&(Lr[zn]=qn)}var wn=fr($t,Sr),kn=Qt($t),fn=cr($t,kn),Rr=Yt($t),Lr=gr($t),kr=ir($t,hn,wn);_n("viewport"),_n(Mr("scissor.box"));var vn=0<Object.keys(Lr).length,kn={framebuffer:kn,draw:Rr,shader:kr,state:Lr,dirty:vn,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(kn.profile=kt($t),kn.uniforms=yr(an),kn.drawVAO=kn.scopeVAO=Rr.vao,!kn.drawVAO&&kr.program&&!wn&&Ut.angle_instanced_arrays&&Rr.static.elements){var Yn=!0;if($t=kr.program.attributes.map(function(zn){return zn=Sr.static[zn],Yn=Yn&&!!zn,zn}),Yn&&0<$t.length){var pn=Rt.getVAO(Rt.createVAO({attributes:$t,elements:Rr.static.elements}));kn.drawVAO=new Q(null,null,null,function(zn,qn){return zn.link(pn)}),kn.useVAO=!0}}return wn?kn.useVAO=!0:kn.attributes=Tr(Sr),kn.context=pr(cn),kn}function Or($t,Sr,an){var cn=$t.shared.context,hn=$t.scope();Object.keys(an).forEach(function(_n){Sr.save(cn,"."+_n);var wn=an[_n].append($t,Sr);Array.isArray(wn)?hn(cn,".",_n,"=[",wn.join(),"];"):hn(cn,".",_n,"=",wn,";")}),Sr(hn)}function Nr($t,Sr,an,cn){var fn=$t.shared,hn=fn.gl,_n=fn.framebuffer,wn;sn&&(wn=Sr.def(fn.extensions,".webgl_draw_buffers"));var Rr=$t.constants,fn=Rr.drawBuffer,Rr=Rr.backBuffer;$t=an?an.append($t,Sr):Sr.def(_n,".next"),cn||Sr("if(",$t,"!==",_n,".cur){"),Sr("if(",$t,"){",hn,".bindFramebuffer(",36160,",",$t,".framebuffer);"),sn&&Sr(wn,".drawBuffersWEBGL(",fn,"[",$t,".colorAttachments.length]);"),Sr("}else{",hn,".bindFramebuffer(",36160,",null);"),sn&&Sr(wn,".drawBuffersWEBGL(",Rr,");"),Sr("}",_n,".cur=",$t,";"),cn||Sr("}")}function Sn($t,Sr,an){var cn=$t.shared,hn=cn.gl,_n=$t.current,wn=$t.next,fn=cn.current,Rr=cn.next,Lr=$t.cond(fn,".dirty");Ln.forEach(function(kr){if(kr=Mr(kr),!(kr in an.state)){var vn,kn;if(kr in wn){vn=wn[kr],kn=_n[kr];var Yn=u(dn[kr].length,function(pn){return Lr.def(vn,"[",pn,"]")});Lr($t.cond(Yn.map(function(pn,zn){return pn+"!=="+kn+"["+zn+"]"}).join("||")).then(hn,".",Vn[kr],"(",Yn,");",Yn.map(function(pn,zn){return kn+"["+zn+"]="+pn}).join(";"),";"))}else vn=Lr.def(Rr,".",kr),Yn=$t.cond(vn,"!==",fn,".",kr),Lr(Yn),kr in Pn?Yn($t.cond(vn).then(hn,".enable(",Pn[kr],");").else(hn,".disable(",Pn[kr],");"),fn,".",kr,"=",vn,";"):Yn(hn,".",Vn[kr],"(",vn,");",fn,".",kr,"=",vn,";")}}),Object.keys(an.state).length===0&&Lr(fn,".dirty=false;"),Sr(Lr)}function Jr($t,Sr,an,cn){var hn=$t.shared,_n=$t.current,wn=hn.current,fn=hn.gl,Rr;Z(Object.keys(an)).forEach(function(Lr){var kr=an[Lr];if(!cn||cn(kr)){var vn=kr.append($t,Sr);if(Pn[Lr]){var kn=Pn[Lr];ue(kr)?(Rr=$t.link(vn,{stable:!0}),Sr($t.cond(Rr).then(fn,".enable(",kn,");").else(fn,".disable(",kn,");")),Sr(wn,".",Lr,"=",Rr,";")):(Sr($t.cond(vn).then(fn,".enable(",kn,");").else(fn,".disable(",kn,");")),Sr(wn,".",Lr,"=",vn,";"))}else if(L(vn)){var Yn=_n[Lr];Sr(fn,".",Vn[Lr],"(",vn,");",vn.map(function(pn,zn){return Yn+"["+zn+"]="+pn}).join(";"),";")}else ue(kr)?(Rr=$t.link(vn,{stable:!0}),Sr(fn,".",Vn[Lr],"(",Rr,");",wn,".",Lr,"=",Rr,";")):Sr(fn,".",Vn[Lr],"(",vn,");",wn,".",Lr,"=",vn,";")}})}function xn($t,Sr){Dr&&($t.instancing=Sr.def($t.shared.extensions,".angle_instanced_arrays"))}function Dn($t,Sr,an,cn,hn){function _n(){return typeof performance>"u"?"Date.now()":"performance.now()"}function wn(zn){Yn=Sr.def(),zn(Yn,"=",_n(),";"),typeof hn=="string"?zn(kr,".count+=",hn,";"):zn(kr,".count++;"),qt&&(cn?(pn=Sr.def(),zn(pn,"=",kn,".getNumPendingQueries();")):zn(kn,".beginQuery(",kr,");"))}function fn(zn){zn(kr,".cpuTime+=",_n(),"-",Yn,";"),qt&&(cn?zn(kn,".pushScopeStats(",pn,",",kn,".getNumPendingQueries(),",kr,");"):zn(kn,".endQuery();"))}function Rr(zn){var qn=Sr.def(vn,".profile");Sr(vn,".profile=",zn,";"),Sr.exit(vn,".profile=",qn,";")}var Lr=$t.shared,kr=$t.stats,vn=Lr.current,kn=Lr.timer;an=an.profile;var Yn,pn;if(an){if(ue(an)){an.enable?(wn(Sr),fn(Sr.exit),Rr("true")):Rr("false");return}an=an.append($t,Sr),Rr(an)}else an=Sr.def(vn,".profile");Lr=$t.block(),wn(Lr),Sr("if(",an,"){",Lr,"}"),$t=$t.block(),fn($t),Sr.exit("if(",an,"){",$t,"}")}function mr($t,Sr,an,cn,hn){function _n(Rr){switch(Rr){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}function wn(Rr,Lr,kr){function vn(){Sr("if(!",zn,".buffer){",Yn,".enableVertexAttribArray(",pn,");}");var oa=kr.type,ga;ga=kr.size?Sr.def(kr.size,"||",Lr):Lr,Sr("if(",zn,".type!==",oa,"||",zn,".size!==",ga,"||",ia.map(function(uo){return zn+"."+uo+"!=="+kr[uo]}).join("||"),"){",Yn,".bindBuffer(",34962,",",qn,".buffer);",Yn,".vertexAttribPointer(",[pn,ga,oa,kr.normalized,kr.stride,kr.offset],");",zn,".type=",oa,";",zn,".size=",ga,";",ia.map(function(uo){return zn+"."+uo+"="+kr[uo]+";"}).join(""),"}"),Dr&&(oa=kr.divisor,Sr("if(",zn,".divisor!==",oa,"){",$t.instancing,".vertexAttribDivisorANGLE(",[pn,oa],");",zn,".divisor=",oa,";}"))}function kn(){Sr("if(",zn,".buffer){",Yn,".disableVertexAttribArray(",pn,");",zn,".buffer=null;","}if(",tt.map(function(oa,ga){return zn+"."+oa+"!=="+ua[ga]}).join("||"),"){",Yn,".vertexAttrib4f(",pn,",",ua,");",tt.map(function(oa,ga){return zn+"."+oa+"="+ua[ga]+";"}).join(""),"}")}var Yn=fn.gl,pn=Sr.def(Rr,".location"),zn=Sr.def(fn.attributes,"[",pn,"]");Rr=kr.state;var qn=kr.buffer,ua=[kr.x,kr.y,kr.z,kr.w],ia=["buffer","normalized","offset","stride"];Rr===1?vn():Rr===2?kn():(Sr("if(",Rr,"===",1,"){"),vn(),Sr("}else{"),kn(),Sr("}"))}var fn=$t.shared;cn.forEach(function(Rr){var Lr=Rr.name,kr=an.attributes[Lr],vn;if(kr){if(!hn(kr))return;vn=kr.append($t,Sr)}else{if(!hn(Wt))return;var kn=$t.scopeAttrib(Lr);vn={},Object.keys(new ha).forEach(function(Yn){vn[Yn]=Sr.def(kn,".",Yn)})}wn($t.link(Rr),_n(Rr.info.type),vn)})}function Ar($t,Sr,an,cn,hn,_n){for(var wn=$t.shared,fn=wn.gl,Rr,Lr=0;Lr<cn.length;++Lr){var Yn=cn[Lr],kr=Yn.name,vn=Yn.info.type,kn=an.uniforms[kr],Yn=$t.link(Yn)+".location",pn;if(kn){if(!hn(kn))continue;if(ue(kn)){if(kr=kn.value,vn===35678||vn===35680)vn=$t.link(kr._texture||kr.color[0]._texture),Sr(fn,".uniform1i(",Yn,",",vn+".bind());"),Sr.exit(vn,".unbind();");else if(vn===35674||vn===35675||vn===35676)kr=$t.global.def("new Float32Array(["+Array.prototype.slice.call(kr)+"])"),kn=2,vn===35675?kn=3:vn===35676&&(kn=4),Sr(fn,".uniformMatrix",kn,"fv(",Yn,",false,",kr,");");else{switch(vn){case 5126:Rr="1f";break;case 35664:Rr="2f";break;case 35665:Rr="3f";break;case 35666:Rr="4f";break;case 35670:Rr="1i";break;case 5124:Rr="1i";break;case 35671:Rr="2i";break;case 35667:Rr="2i";break;case 35672:Rr="3i";break;case 35668:Rr="3i";break;case 35673:Rr="4i";break;case 35669:Rr="4i"}Sr(fn,".uniform",Rr,"(",Yn,",",L(kr)?Array.prototype.slice.call(kr):kr,");")}continue}else pn=kn.append($t,Sr)}else{if(!hn(Wt))continue;pn=Sr.def(wn.uniforms,"[",jt.id(kr),"]")}switch(vn===35678?Sr("if(",pn,"&&",pn,'._reglType==="framebuffer"){',pn,"=",pn,".color[0];","}"):vn===35680&&Sr("if(",pn,"&&",pn,'._reglType==="framebufferCube"){',pn,"=",pn,".color[0];","}"),kr=1,vn){case 35678:case 35680:vn=Sr.def(pn,"._texture"),Sr(fn,".uniform1i(",Yn,",",vn,".bind());"),Sr.exit(vn,".unbind();");continue;case 5124:case 35670:Rr="1i";break;case 35667:case 35671:Rr="2i",kr=2;break;case 35668:case 35672:Rr="3i",kr=3;break;case 35669:case 35673:Rr="4i",kr=4;break;case 5126:Rr="1f";break;case 35664:Rr="2f",kr=2;break;case 35665:Rr="3f",kr=3;break;case 35666:Rr="4f",kr=4;break;case 35674:Rr="Matrix2fv";break;case 35675:Rr="Matrix3fv";break;case 35676:Rr="Matrix4fv"}if(Rr.charAt(0)==="M"){Sr(fn,".uniform",Rr,"(",Yn,",");var Yn=Math.pow(vn-35674+2,2),zn=$t.global.def("new Float32Array(",Yn,")");Array.isArray(pn)?Sr("false,(",u(Yn,function(ia){return zn+"["+ia+"]="+pn[ia]}),",",zn,")"):Sr("false,(Array.isArray(",pn,")||",pn," instanceof Float32Array)?",pn,":(",u(Yn,function(ia){return zn+"["+ia+"]="+pn+"["+ia+"]"}),",",zn,")"),Sr(");")}else{if(1<kr){for(var vn=[],qn=[],kn=0;kn<kr;++kn)Array.isArray(pn)?qn.push(pn[kn]):qn.push(Sr.def(pn+"["+kn+"]")),_n&&vn.push(Sr.def());_n&&Sr("if(!",$t.batchId,"||",vn.map(function(ua,ia){return ua+"!=="+qn[ia]}).join("||"),"){",vn.map(function(ua,ia){return ua+"="+qn[ia]+";"}).join("")),Sr(fn,".uniform",Rr,"(",Yn,",",qn.join(","),");")}else _n&&(vn=Sr.def(),Sr("if(!",$t.batchId,"||",vn,"!==",pn,"){",vn,"=",pn,";")),Sr(fn,".uniform",Rr,"(",Yn,",",pn,");");_n&&Sr("}")}}}function zr($t,Sr,an,cn){function hn(oa){var ga=kr[oa];return ga?ga.contextDep&&cn.contextDynamic||ga.propDep?ga.append($t,an):ga.append($t,Sr):Sr.def(Lr,".",oa)}function _n(){function oa(){an(qn,".drawElementsInstancedANGLE(",[kn,pn,ua,Yn+"<<(("+ua+"-5121)>>1)",zn],");")}function ga(){an(qn,".drawArraysInstancedANGLE(",[kn,Yn,pn,zn],");")}vn&&vn!=="null"?ia?oa():(an("if(",vn,"){"),oa(),an("}else{"),ga(),an("}")):ga()}function wn(){function oa(){an(Rr+".drawElements("+[kn,pn,ua,Yn+"<<(("+ua+"-5121)>>1)"]+");")}function ga(){an(Rr+".drawArrays("+[kn,Yn,pn]+");")}vn&&vn!=="null"?ia?oa():(an("if(",vn,"){"),oa(),an("}else{"),ga(),an("}")):ga()}var fn=$t.shared,Rr=fn.gl,Lr=fn.draw,kr=cn.draw,vn=function(){var oa=kr.elements,ga=Sr;return oa?((oa.contextDep&&cn.contextDynamic||oa.propDep)&&(ga=an),oa=oa.append($t,ga),kr.elementsActive&&ga("if("+oa+")"+Rr+".bindBuffer(34963,"+oa+".buffer.buffer);")):(oa=ga.def(),ga(oa,"=",Lr,".","elements",";","if(",oa,"){",Rr,".bindBuffer(",34963,",",oa,".buffer.buffer);}","else if(",fn.vao,".currentVAO){",oa,"=",$t.shared.elements+".getElements("+fn.vao,".currentVAO.elements);",nn?"":"if("+oa+")"+Rr+".bindBuffer(34963,"+oa+".buffer.buffer);","}")),oa}(),kn=hn("primitive"),Yn=hn("offset"),pn=function(){var oa=kr.count,ga=Sr;return oa?((oa.contextDep&&cn.contextDynamic||oa.propDep)&&(ga=an),oa=oa.append($t,ga)):oa=ga.def(Lr,".","count"),oa}();if(typeof pn=="number"){if(pn===0)return}else an("if(",pn,"){"),an.exit("}");var zn,qn;Dr&&(zn=hn("instances"),qn=$t.instancing);var ua=vn+".type",ia=kr.elements&&ue(kr.elements)&&!kr.vaoActive;Dr&&(typeof zn!="number"||0<=zn)?typeof zn=="string"?(an("if(",zn,">0){"),_n(),an("}else if(",zn,"<0){"),wn(),an("}")):_n():wn()}function Br($t,Sr,an,cn,hn){return Sr=zt(),hn=Sr.proc("body",hn),Dr&&(Sr.instancing=hn.def(Sr.shared.extensions,".angle_instanced_arrays")),$t(Sr,hn,an,cn),Sr.compile().body}function on($t,Sr,an,cn){xn($t,Sr),an.useVAO?an.drawVAO?Sr($t.shared.vao,".setVAO(",an.drawVAO.append($t,Sr),");"):Sr($t.shared.vao,".setVAO(",$t.shared.vao,".targetVAO);"):(Sr($t.shared.vao,".setVAO(null);"),mr($t,Sr,an,cn.attributes,function(){return!0})),Ar($t,Sr,an,cn.uniforms,function(){return!0},!1),zr($t,Sr,Sr,an)}function mn($t,Sr){var an=$t.proc("draw",1);xn($t,an),Or($t,an,Sr.context),Nr($t,an,Sr.framebuffer),Sn($t,an,Sr),Jr($t,an,Sr.state),Dn($t,an,Sr,!1,!0);var cn=Sr.shader.progVar.append($t,an);if(an($t.shared.gl,".useProgram(",cn,".program);"),Sr.shader.program)on($t,an,Sr,Sr.shader.program);else{an($t.shared.vao,".setVAO(null);");var hn=$t.global.def("{}"),_n=an.def(cn,".id"),wn=an.def(hn,"[",_n,"]");an($t.cond(wn).then(wn,".call(this,a0);").else(wn,"=",hn,"[",_n,"]=",$t.link(function(fn){return Br(on,$t,Sr,fn,1)}),"(",cn,");",wn,".call(this,a0);"))}0<Object.keys(Sr.state).length&&an($t.shared.current,".dirty=true;"),$t.shared.vao&&an($t.shared.vao,".setVAO(null);")}function Tn($t,Sr,an,cn){function hn(){return!0}$t.batchId="a1",xn($t,Sr),mr($t,Sr,an,cn.attributes,hn),Ar($t,Sr,an,cn.uniforms,hn,!1),zr($t,Sr,Sr,an)}function An($t,Sr,an,cn){function hn(vn){return vn.contextDep&&wn||vn.propDep}function _n(vn){return!hn(vn)}xn($t,Sr);var wn=an.contextDep,fn=Sr.def(),Rr=Sr.def();$t.shared.props=Rr,$t.batchId=fn;var Lr=$t.scope(),kr=$t.scope();Sr(Lr.entry,"for(",fn,"=0;",fn,"<","a1",";++",fn,"){",Rr,"=","a0","[",fn,"];",kr,"}",Lr.exit),an.needsContext&&Or($t,kr,an.context),an.needsFramebuffer&&Nr($t,kr,an.framebuffer),Jr($t,kr,an.state,hn),an.profile&&hn(an.profile)&&Dn($t,kr,an,!1,!0),cn?(an.useVAO?an.drawVAO?hn(an.drawVAO)?kr($t.shared.vao,".setVAO(",an.drawVAO.append($t,kr),");"):Lr($t.shared.vao,".setVAO(",an.drawVAO.append($t,Lr),");"):Lr($t.shared.vao,".setVAO(",$t.shared.vao,".targetVAO);"):(Lr($t.shared.vao,".setVAO(null);"),mr($t,Lr,an,cn.attributes,_n),mr($t,kr,an,cn.attributes,hn)),Ar($t,Lr,an,cn.uniforms,_n,!1),Ar($t,kr,an,cn.uniforms,hn,!0),zr($t,Lr,kr,an)):(Sr=$t.global.def("{}"),cn=an.shader.progVar.append($t,kr),Rr=kr.def(cn,".id"),Lr=kr.def(Sr,"[",Rr,"]"),kr($t.shared.gl,".useProgram(",cn,".program);","if(!",Lr,"){",Lr,"=",Sr,"[",Rr,"]=",$t.link(function(vn){return Br(Tn,$t,an,vn,2)}),"(",cn,");}",Lr,".call(this,a0[",fn,"],",fn,");"))}function Fn($t,Sr){function an(Lr){return Lr.contextDep&&hn||Lr.propDep}var cn=$t.proc("batch",2);$t.batchId="0",xn($t,cn);var hn=!1,_n=!0;Object.keys(Sr.context).forEach(function(Lr){hn=hn||Sr.context[Lr].propDep}),hn||(Or($t,cn,Sr.context),_n=!1);var wn=Sr.framebuffer,fn=!1;if(wn?(wn.propDep?hn=fn=!0:wn.contextDep&&hn&&(fn=!0),fn||Nr($t,cn,wn)):Nr($t,cn,null),Sr.state.viewport&&Sr.state.viewport.propDep&&(hn=!0),Sn($t,cn,Sr),Jr($t,cn,Sr.state,function(Lr){return!an(Lr)}),Sr.profile&&an(Sr.profile)||Dn($t,cn,Sr,!1,"a1"),Sr.contextDep=hn,Sr.needsContext=_n,Sr.needsFramebuffer=fn,_n=Sr.shader.progVar,_n.contextDep&&hn||_n.propDep)An($t,cn,Sr,null);else if(_n=_n.append($t,cn),cn($t.shared.gl,".useProgram(",_n,".program);"),Sr.shader.program)An($t,cn,Sr,Sr.shader.program);else{cn($t.shared.vao,".setVAO(null);");var wn=$t.global.def("{}"),fn=cn.def(_n,".id"),Rr=cn.def(wn,"[",fn,"]");cn($t.cond(Rr).then(Rr,".call(this,a0,a1);").else(Rr,"=",wn,"[",fn,"]=",$t.link(function(vn){return Br(An,$t,Sr,vn,2)}),"(",_n,");",Rr,".call(this,a0,a1);"))}0<Object.keys(Sr.state).length&&cn($t.shared.current,".dirty=true;"),$t.shared.vao&&cn($t.shared.vao,".setVAO(null);")}function Jn($t,Sr){function an(fn){var Rr=Sr.shader[fn];Rr&&(Rr=Rr.append($t,cn),isNaN(Rr)?cn.set(hn.shader,"."+fn,Rr):cn.set(hn.shader,"."+fn,$t.link(Rr,{stable:!0})))}var cn=$t.proc("scope",3);$t.batchId="a2";var hn=$t.shared,_n=hn.current;if(Or($t,cn,Sr.context),Sr.framebuffer&&Sr.framebuffer.append($t,cn),Z(Object.keys(Sr.state)).forEach(function(fn){var Rr=Sr.state[fn],Lr=Rr.append($t,cn);L(Lr)?Lr.forEach(function(kr,vn){isNaN(kr)?cn.set($t.next[fn],"["+vn+"]",kr):cn.set($t.next[fn],"["+vn+"]",$t.link(kr,{stable:!0}))}):ue(Rr)?cn.set(hn.next,"."+fn,$t.link(Lr,{stable:!0})):cn.set(hn.next,"."+fn,Lr)}),Dn($t,cn,Sr,!0,!0),["elements","offset","count","instances","primitive"].forEach(function(fn){var Rr=Sr.draw[fn];Rr&&(Rr=Rr.append($t,cn),isNaN(Rr)?cn.set(hn.draw,"."+fn,Rr):cn.set(hn.draw,"."+fn,$t.link(Rr),{stable:!0}))}),Object.keys(Sr.uniforms).forEach(function(fn){var Rr=Sr.uniforms[fn].append($t,cn);Array.isArray(Rr)&&(Rr="["+Rr.map(function(Lr){return isNaN(Lr)?Lr:$t.link(Lr,{stable:!0})})+"]"),cn.set(hn.uniforms,"["+$t.link(jt.id(fn),{stable:!0})+"]",Rr)}),Object.keys(Sr.attributes).forEach(function(fn){var Rr=Sr.attributes[fn].append($t,cn),Lr=$t.scopeAttrib(fn);Object.keys(new ha).forEach(function(kr){cn.set(Lr,"."+kr,Rr[kr])})}),Sr.scopeVAO){var wn=Sr.scopeVAO.append($t,cn);isNaN(wn)?cn.set(hn.vao,".targetVAO",wn):cn.set(hn.vao,".targetVAO",$t.link(wn,{stable:!0}))}an("vert"),an("frag"),0<Object.keys(Sr.state).length&&(cn(_n,".dirty=true;"),cn.exit(_n,".dirty=true;")),cn("a1(",$t.shared.context,",a0,",$t.batchId,");")}function ta($t){if(typeof $t=="object"&&!L($t)){for(var Sr=Object.keys($t),an=0;an<Sr.length;++an)if(Se.isDynamic($t[Sr[an]]))return!0;return!1}}function sa($t,Sr,an){function cn(vn,kn){wn.forEach(function(Yn){var pn=hn[Yn];Se.isDynamic(pn)&&(pn=vn.invoke(kn,pn),kn(kr,".",Yn,"=",pn,";"))})}var hn=Sr.static[an];if(hn&&ta(hn)){var _n=$t.global,wn=Object.keys(hn),fn=!1,Rr=!1,Lr=!1,kr=$t.global.def("{}");wn.forEach(function(vn){var kn=hn[vn];if(Se.isDynamic(kn))typeof kn=="function"&&(kn=hn[vn]=Se.unbox(kn)),vn=te(kn,null),fn=fn||vn.thisDep,Lr=Lr||vn.propDep,Rr=Rr||vn.contextDep;else{switch(_n(kr,".",vn,"="),typeof kn){case"number":_n(kn);break;case"string":_n('"',kn,'"');break;case"object":Array.isArray(kn)&&_n("[",kn.join(),"]");break;default:_n($t.link(kn))}_n(";")}}),Sr.dynamic[an]=new Se.DynamicVariable(4,{thisDep:fn,contextDep:Rr,propDep:Lr,ref:kr,append:cn}),delete Sr.static[an]}}var ha=Rt.Record,la={add:32774,subtract:32778,"reverse subtract":32779};Ut.ext_blend_minmax&&(la.min=32775,la.max=32776);var Dr=Ut.angle_instanced_arrays,sn=Ut.webgl_draw_buffers,nn=Ut.oes_vertex_array_object,dn={dirty:!0,profile:nr.profile},Un={},Ln=[],Pn={},Vn={};Ke("dither",3024),Ke("blend.enable",3042),Ze("blend.color","blendColor",[0,0,0,0]),Ze("blend.equation","blendEquationSeparate",[32774,32774]),Ze("blend.func","blendFuncSeparate",[1,0,1,0]),Ke("depth.enable",2929,!0),Ze("depth.func","depthFunc",513),Ze("depth.range","depthRange",[0,1]),Ze("depth.mask","depthMask",!0),Ze("colorMask","colorMask",[!0,!0,!0,!0]),Ke("cull.enable",2884),Ze("cull.face","cullFace",1029),Ze("frontFace","frontFace",2305),Ze("lineWidth","lineWidth",1),Ke("polygonOffset.enable",32823),Ze("polygonOffset.offset","polygonOffset",[0,0]),Ke("sample.alpha",32926),Ke("sample.enable",32928),Ze("sample.coverage","sampleCoverage",[1,!1]),Ke("stencil.enable",2960),Ze("stencil.mask","stencilMask",-1),Ze("stencil.func","stencilFunc",[519,0,-1]),Ze("stencil.opFront","stencilOpSeparate",[1028,7680,7680,7680]),Ze("stencil.opBack","stencilOpSeparate",[1029,7680,7680,7680]),Ke("scissor.enable",3089),Ze("scissor.box","scissor",[0,0,gt.drawingBufferWidth,gt.drawingBufferHeight]),Ze("viewport","viewport",[0,0,gt.drawingBufferWidth,gt.drawingBufferHeight]);var aa={gl:gt,context:Zt,strings:jt,next:Un,current:dn,draw:Vt,elements:dt,buffer:ur,shader:Nt,attributes:Rt.state,vao:Rt,uniforms:Lt,framebuffer:yt,extensions:Ut,timer:qt,isBufferArgs:j},Da={primTypes:it,compareFuncs:Pt,blendFuncs:St,blendEquations:la,stencilOps:wt,glTypes:Ye,orientationType:Bt};sn&&(Da.backBuffer=[1029],Da.drawBuffer=u(or.maxDrawbuffers,function($t){return $t===0?[0]:u($t,function(Sr){return 36064+Sr})}));var $a=0;return{next:Un,current:dn,procs:function(){var $t=zt(),Sr=$t.proc("poll"),an=$t.proc("refresh"),cn=$t.block();Sr(cn),an(cn);var Rr=$t.shared,hn=Rr.gl,_n=Rr.next,wn=Rr.current;cn(wn,".dirty=false;"),Nr($t,Sr),Nr($t,an,null,!0);var fn;Dr&&(fn=$t.link(Dr)),Ut.oes_vertex_array_object&&an($t.link(Ut.oes_vertex_array_object),".bindVertexArrayOES(null);");var Rr=an.def(Rr.attributes),Lr=an.def(0),kr=$t.cond(Lr,".buffer");kr.then(hn,".enableVertexAttribArray(i);",hn,".bindBuffer(",34962,",",Lr,".buffer.buffer);",hn,".vertexAttribPointer(i,",Lr,".size,",Lr,".type,",Lr,".normalized,",Lr,".stride,",Lr,".offset);").else(hn,".disableVertexAttribArray(i);",hn,".vertexAttrib4f(i,",Lr,".x,",Lr,".y,",Lr,".z,",Lr,".w);",Lr,".buffer=null;");var vn=$t.link(or.maxAttributes,{stable:!0});return an("for(var i=0;i<",vn,";++i){",Lr,"=",Rr,"[i];",kr,"}"),Dr&&an("for(var i=0;i<",vn,";++i){",fn,".vertexAttribDivisorANGLE(i,",Rr,"[i].divisor);","}"),an($t.shared.vao,".currentVAO=null;",$t.shared.vao,".setVAO(",$t.shared.vao,".targetVAO);"),Object.keys(Pn).forEach(function(kn){var Yn=Pn[kn],pn=cn.def(_n,".",kn),zn=$t.block();zn("if(",pn,"){",hn,".enable(",Yn,")}else{",hn,".disable(",Yn,")}",wn,".",kn,"=",pn,";"),an(zn),Sr("if(",pn,"!==",wn,".",kn,"){",zn,"}")}),Object.keys(Vn).forEach(function(kn){var Yn=Vn[kn],pn=dn[kn],zn,qn,ua=$t.block();ua(hn,".",Yn,"("),L(pn)?(Yn=pn.length,zn=$t.global.def(_n,".",kn),qn=$t.global.def(wn,".",kn),ua(u(Yn,function(ia){return zn+"["+ia+"]"}),");",u(Yn,function(ia){return qn+"["+ia+"]="+zn+"["+ia+"];"}).join("")),Sr("if(",u(Yn,function(ia){return zn+"["+ia+"]!=="+qn+"["+ia+"]"}).join("||"),"){",ua,"}")):(zn=cn.def(_n,".",kn),qn=cn.def(wn,".",kn),ua(zn,");",wn,".",kn,"=",zn,";"),Sr("if(",zn,"!==",qn,"){",ua,"}")),an(ua)}),$t.compile()}(),compile:function($t,Sr,an,cn,hn){var _n=zt();_n.stats=_n.link(hn),Object.keys(Sr.static).forEach(function(fn){sa(_n,Sr,fn)}),ct.forEach(function(fn){sa(_n,$t,fn)});var wn=Kr($t,Sr,an,cn,_n);return wn.shader.program&&(wn.shader.program.attributes.sort(function(fn,Rr){return fn.name<Rr.name?-1:1}),wn.shader.program.uniforms.sort(function(fn,Rr){return fn.name<Rr.name?-1:1})),mn(_n,wn),Jn(_n,wn),Fn(_n,wn),le(_n.compile(),{destroy:function(){wn.shader.program.destroy()}})}}}function ve(gt,jt){for(var Ut=0;Ut<gt.length;++Ut)if(gt[Ut]===jt)return Ut;return-1}var le=function(gt,jt){for(var Ut=Object.keys(jt),or=0;or<Ut.length;++or)gt[Ut[or]]=jt[Ut[or]];return gt},xe=0,Se={DynamicVariable:B,define:function(gt,jt){return new B(gt,d(jt+""))},isDynamic:function(gt){return typeof gt=="function"&&!gt._reglType||gt instanceof B},unbox:P,accessor:d},Re={next:typeof requestAnimationFrame=="function"?function(gt){return requestAnimationFrame(gt)}:function(gt){return setTimeout(gt,16)},cancel:typeof cancelAnimationFrame=="function"?function(gt){return cancelAnimationFrame(gt)}:clearTimeout},Ee=typeof performance<"u"&&performance.now?function(){return performance.now()}:function(){return+new Date},Oe=f();Oe.zero=f();var Be=function(gt,jt){var Ut=1;jt.ext_texture_filter_anisotropic&&(Ut=gt.getParameter(34047));var or=1,ur=1;jt.webgl_draw_buffers&&(or=gt.getParameter(34852),ur=gt.getParameter(36063));var dt=!!jt.oes_texture_float;if(dt){dt=gt.createTexture(),gt.bindTexture(3553,dt),gt.texImage2D(3553,0,6408,1,1,0,6408,5126,null);var ut=gt.createFramebuffer();if(gt.bindFramebuffer(36160,ut),gt.framebufferTexture2D(36160,36064,3553,dt,0),gt.bindTexture(3553,null),gt.checkFramebufferStatus(36160)!==36053)dt=!1;else{gt.viewport(0,0,1,1),gt.clearColor(1,0,0,1),gt.clear(16384);var yt=Oe.allocType(5126,4);gt.readPixels(0,0,1,1,6408,5126,yt),gt.getError()?dt=!1:(gt.deleteFramebuffer(ut),gt.deleteTexture(dt),dt=yt[0]===1),Oe.freeType(yt)}}return yt=!0,typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent))||(yt=gt.createTexture(),ut=Oe.allocType(5121,36),gt.activeTexture(33984),gt.bindTexture(34067,yt),gt.texImage2D(34069,0,6408,3,3,0,6408,5121,ut),Oe.freeType(ut),gt.bindTexture(34067,null),gt.deleteTexture(yt),yt=!gt.getError()),{colorBits:[gt.getParameter(3410),gt.getParameter(3411),gt.getParameter(3412),gt.getParameter(3413)],depthBits:gt.getParameter(3414),stencilBits:gt.getParameter(3415),subpixelBits:gt.getParameter(3408),extensions:Object.keys(jt).filter(function(Lt){return!!jt[Lt]}),maxAnisotropic:Ut,maxDrawbuffers:or,maxColorAttachments:ur,pointSizeDims:gt.getParameter(33901),lineWidthDims:gt.getParameter(33902),maxViewportDims:gt.getParameter(3386),maxCombinedTextureUnits:gt.getParameter(35661),maxCubeMapSize:gt.getParameter(34076),maxRenderbufferSize:gt.getParameter(34024),maxTextureUnits:gt.getParameter(34930),maxTextureSize:gt.getParameter(3379),maxAttributes:gt.getParameter(34921),maxVertexUniforms:gt.getParameter(36347),maxVertexTextureUnits:gt.getParameter(35660),maxVaryingVectors:gt.getParameter(36348),maxFragmentUniforms:gt.getParameter(36349),glsl:gt.getParameter(35724),renderer:gt.getParameter(7937),vendor:gt.getParameter(7936),version:gt.getParameter(7938),readFloat:dt,npotTextureCube:yt}},Le=function(gt){return gt instanceof Uint8Array||gt instanceof Uint16Array||gt instanceof Uint32Array||gt instanceof Int8Array||gt instanceof Int16Array||gt instanceof Int32Array||gt instanceof Float32Array||gt instanceof Float64Array||gt instanceof Uint8ClampedArray},Te=function(gt){return Object.keys(gt).map(function(jt){return gt[jt]})},De={shape:function(gt){for(var jt=[];gt.length;gt=gt[0])jt.push(gt.length);return jt},flatten:function(gt,jt,Ut,or){var ur=1;if(jt.length)for(var dt=0;dt<jt.length;++dt)ur*=jt[dt];else ur=0;switch(Ut=or||Oe.allocType(Ut,ur),jt.length){case 0:break;case 1:for(or=jt[0],jt=0;jt<or;++jt)Ut[jt]=gt[jt];break;case 2:for(or=jt[0],jt=jt[1],dt=ur=0;dt<or;++dt)for(var ut=gt[dt],yt=0;yt<jt;++yt)Ut[ur++]=ut[yt];break;case 3:h(gt,jt[0],jt[1],jt[2],Ut,0);break;default:b(gt,jt,0,Ut,0)}return Ut}},Ve={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},Ye={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Ne={dynamic:35048,stream:35040,static:35044},Xe=De.flatten,ht=De.shape,st=[];st[5120]=1,st[5122]=2,st[5124]=4,st[5121]=1,st[5123]=2,st[5125]=4,st[5126]=4;var it={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},nt=new Float32Array(1),pt=new Uint32Array(nt.buffer),Tt=[9984,9986,9985,9987],Et=[0,6409,6410,6407,6408],Dt={};Dt[6409]=Dt[6406]=Dt[6402]=1,Dt[34041]=Dt[6410]=2,Dt[6407]=Dt[35904]=3,Dt[6408]=Dt[35906]=4;var et=D("HTMLCanvasElement"),Ue=D("OffscreenCanvas"),ze=D("CanvasRenderingContext2D"),rt=D("ImageBitmap"),lt=D("HTMLImageElement"),Qe=D("HTMLVideoElement"),Fe=Object.keys(Ve).concat([et,Ue,ze,rt,lt,Qe]),Ce=[];Ce[5121]=1,Ce[5126]=4,Ce[36193]=2,Ce[5123]=2,Ce[5125]=4;var pe=[];pe[32854]=2,pe[32855]=2,pe[36194]=2,pe[34041]=4,pe[33776]=.5,pe[33777]=.5,pe[33778]=1,pe[33779]=1,pe[35986]=.5,pe[35987]=1,pe[34798]=1,pe[35840]=.5,pe[35841]=.25,pe[35842]=.5,pe[35843]=.25,pe[36196]=.5;var we=[];we[32854]=2,we[32855]=2,we[36194]=2,we[33189]=2,we[36168]=1,we[34041]=4,we[35907]=4,we[34836]=16,we[34842]=8,we[34843]=6;var Ae=function(gt,jt,Ut,or,ur){function dt(Vt){this.id=Rt++,this.refCount=1,this.renderbuffer=Vt,this.format=32854,this.height=this.width=0,ur.profile&&(this.stats={size:0})}function ut(Vt){var Zt=Vt.renderbuffer;gt.bindRenderbuffer(36161,null),gt.deleteRenderbuffer(Zt),Vt.renderbuffer=null,Vt.refCount=0,delete Nt[Vt.id],or.renderbufferCount--}var yt={rgba4:32854,rgb565:36194,"rgb5 a1":32855,depth:33189,stencil:36168,"depth stencil":34041};jt.ext_srgb&&(yt.srgba=35907),jt.ext_color_buffer_half_float&&(yt.rgba16f=34842,yt.rgb16f=34843),jt.webgl_color_buffer_float&&(yt.rgba32f=34836);var Lt=[];Object.keys(yt).forEach(function(Vt){Lt[yt[Vt]]=Vt});var Rt=0,Nt={};return dt.prototype.decRef=function(){0>=--this.refCount&&ut(this)},ur.profile&&(or.getTotalRenderbufferSize=function(){var Vt=0;return Object.keys(Nt).forEach(function(Zt){Vt+=Nt[Zt].stats.size}),Vt}),{create:function(Vt,Zt){function qt(nr,Mr){var Ke=0,Ze=0,zt=32854;if(typeof nr=="object"&&nr?("shape"in nr?(Ze=nr.shape,Ke=Ze[0]|0,Ze=Ze[1]|0):("radius"in nr&&(Ke=Ze=nr.radius|0),"width"in nr&&(Ke=nr.width|0),"height"in nr&&(Ze=nr.height|0)),"format"in nr&&(zt=yt[nr.format])):typeof nr=="number"?(Ke=nr|0,Ze=typeof Mr=="number"?Mr|0:Ke):nr||(Ke=Ze=1),Ke!==Jt.width||Ze!==Jt.height||zt!==Jt.format)return qt.width=Jt.width=Ke,qt.height=Jt.height=Ze,Jt.format=zt,gt.bindRenderbuffer(36161,Jt.renderbuffer),gt.renderbufferStorage(36161,zt,Ke,Ze),ur.profile&&(Jt.stats.size=we[Jt.format]*Jt.width*Jt.height),qt.format=Lt[Jt.format],qt}var Jt=new dt(gt.createRenderbuffer());return Nt[Jt.id]=Jt,or.renderbufferCount++,qt(Vt,Zt),qt.resize=function(nr,Mr){var Ke=nr|0,Ze=Mr|0||Ke;return Ke===Jt.width&&Ze===Jt.height||(qt.width=Jt.width=Ke,qt.height=Jt.height=Ze,gt.bindRenderbuffer(36161,Jt.renderbuffer),gt.renderbufferStorage(36161,Jt.format,Ke,Ze),ur.profile&&(Jt.stats.size=we[Jt.format]*Jt.width*Jt.height)),qt},qt._reglType="renderbuffer",qt._renderbuffer=Jt,ur.profile&&(qt.stats=Jt.stats),qt.destroy=function(){Jt.decRef()},qt},clear:function(){Te(Nt).forEach(ut)},restore:function(){Te(Nt).forEach(function(Vt){Vt.renderbuffer=gt.createRenderbuffer(),gt.bindRenderbuffer(36161,Vt.renderbuffer),gt.renderbufferStorage(36161,Vt.format,Vt.width,Vt.height)}),gt.bindRenderbuffer(36161,null)}}},Pe=[];Pe[6408]=4,Pe[6407]=3;var Ge=[];Ge[5121]=1,Ge[5126]=4,Ge[36193]=2;var We=[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],tt=["x","y","z","w"],ct="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),St={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Pt={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},wt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Bt={cw:2304,ccw:2305},Wt=new Q(!1,!1,!1,function(){}),hr=function(gt,jt){function Ut(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function or(Nt,Vt,Zt){var qt=ut.pop()||new Ut;qt.startQueryIndex=Nt,qt.endQueryIndex=Vt,qt.sum=0,qt.stats=Zt,yt.push(qt)}if(!jt.ext_disjoint_timer_query)return null;var ur=[],dt=[],ut=[],yt=[],Lt=[],Rt=[];return{beginQuery:function(Nt){var Vt=ur.pop()||jt.ext_disjoint_timer_query.createQueryEXT();jt.ext_disjoint_timer_query.beginQueryEXT(35007,Vt),dt.push(Vt),or(dt.length-1,dt.length,Nt)},endQuery:function(){jt.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:or,update:function(){var Nt,Vt;if(Nt=dt.length,Nt!==0){Rt.length=Math.max(Rt.length,Nt+1),Lt.length=Math.max(Lt.length,Nt+1),Lt[0]=0;var Zt=Rt[0]=0;for(Vt=Nt=0;Vt<dt.length;++Vt){var qt=dt[Vt];jt.ext_disjoint_timer_query.getQueryObjectEXT(qt,34919)?(Zt+=jt.ext_disjoint_timer_query.getQueryObjectEXT(qt,34918),ur.push(qt)):dt[Nt++]=qt,Lt[Vt+1]=Zt,Rt[Vt+1]=Nt}for(dt.length=Nt,Vt=Nt=0;Vt<yt.length;++Vt){var Zt=yt[Vt],Jt=Zt.startQueryIndex,qt=Zt.endQueryIndex;Zt.sum+=Lt[qt]-Lt[Jt],Jt=Rt[Jt],qt=Rt[qt],qt===Jt?(Zt.stats.gpuTime+=Zt.sum/1e6,ut.push(Zt)):(Zt.startQueryIndex=Jt,Zt.endQueryIndex=qt,yt[Nt++]=Zt)}yt.length=Nt}},getNumPendingQueries:function(){return dt.length},clear:function(){ur.push.apply(ur,dt);for(var Nt=0;Nt<ur.length;Nt++)jt.ext_disjoint_timer_query.deleteQueryEXT(ur[Nt]);dt.length=0,ur.length=0},restore:function(){dt.length=0,ur.length=0}}};return function(gt){function jt(){if(Dn.length===0)zt&&zt.update(),Br=null;else{Br=Re.next(jt),Nt();for(var mn=Dn.length-1;0<=mn;--mn){var Tn=Dn[mn];Tn&&Tn(cr,null,0)}qt.flush(),zt&&zt.update()}}function Ut(){!Br&&0<Dn.length&&(Br=Re.next(jt))}function or(){Br&&(Re.cancel(jt),Br=null)}function ur(mn){mn.preventDefault(),or(),mr.forEach(function(Tn){Tn()})}function dt(mn){qt.getError(),nr.restore(),Tr.restore(),Yt.restore(),pr.restore(),Kr.restore(),Or.restore(),yr.restore(),zt&&zt.restore(),Nr.procs.refresh(),Ut(),Ar.forEach(function(Tn){Tn()})}function ut(mn){function Tn(dn,Un){var Ln={},Pn={};return Object.keys(dn).forEach(function(Vn){var aa=dn[Vn];if(Se.isDynamic(aa))Pn[Vn]=Se.unbox(aa,Vn);else{if(Un&&Array.isArray(aa)){for(var Da=0;Da<aa.length;++Da)if(Se.isDynamic(aa[Da])){Pn[Vn]=Se.unbox(aa,Vn);return}}Ln[Vn]=aa}}),{dynamic:Pn,static:Ln}}function An(dn){for(;nn.length<dn;)nn.push(null);return nn}var Fn=Tn(mn.context||{},!0),Jn=Tn(mn.uniforms||{},!0),ta=Tn(mn.attributes||{},!1);mn=Tn(function(dn){function Un(Pn){if(Pn in Ln){var Vn=Ln[Pn];delete Ln[Pn],Object.keys(Vn).forEach(function(aa){Ln[Pn+"."+aa]=Vn[aa]})}}var Ln=le({},dn);return delete Ln.uniforms,delete Ln.attributes,delete Ln.context,delete Ln.vao,"stencil"in Ln&&Ln.stencil.op&&(Ln.stencil.opBack=Ln.stencil.opFront=Ln.stencil.op,delete Ln.stencil.op),Un("blend"),Un("depth"),Un("cull"),Un("stencil"),Un("polygonOffset"),Un("scissor"),Un("sample"),"vao"in dn&&(Ln.vao=dn.vao),Ln}(mn),!1);var sa={gpuTime:0,cpuTime:0,count:0},ha=Nr.compile(mn,ta,Jn,Fn,sa),la=ha.draw,Dr=ha.batch,sn=ha.scope,nn=[];return le(function(dn,Un){var Ln;if(typeof dn=="function")return sn.call(this,null,dn,0);if(typeof Un=="function")if(typeof dn=="number")for(Ln=0;Ln<dn;++Ln)sn.call(this,null,Un,Ln);else if(Array.isArray(dn))for(Ln=0;Ln<dn.length;++Ln)sn.call(this,dn[Ln],Un,Ln);else return sn.call(this,dn,Un,0);else if(typeof dn=="number"){if(0<dn)return Dr.call(this,An(dn|0),dn|0)}else if(Array.isArray(dn)){if(dn.length)return Dr.call(this,dn,dn.length)}else return la.call(this,dn)},{stats:sa,destroy:function(){ha.destroy()}})}function yt(mn,Tn){var An=0;Nr.procs.poll();var Fn=Tn.color;Fn&&(qt.clearColor(+Fn[0]||0,+Fn[1]||0,+Fn[2]||0,+Fn[3]||0),An|=16384),"depth"in Tn&&(qt.clearDepth(+Tn.depth),An|=256),"stencil"in Tn&&(qt.clearStencil(Tn.stencil|0),An|=1024),qt.clear(An)}function Lt(mn){return Dn.push(mn),Ut(),{cancel:function(){function Tn(){var Fn=ve(Dn,Tn);Dn[Fn]=Dn[Dn.length-1],--Dn.length,0>=Dn.length&&or()}var An=ve(Dn,mn);Dn[An]=Tn}}}function Rt(){var mn=Jr.viewport,Tn=Jr.scissor_box;mn[0]=mn[1]=Tn[0]=Tn[1]=0,cr.viewportWidth=cr.framebufferWidth=cr.drawingBufferWidth=mn[2]=Tn[2]=qt.drawingBufferWidth,cr.viewportHeight=cr.framebufferHeight=cr.drawingBufferHeight=mn[3]=Tn[3]=qt.drawingBufferHeight}function Nt(){cr.tick+=1,cr.time=Zt(),Rt(),Nr.procs.poll()}function Vt(){pr.refresh(),Rt(),Nr.procs.refresh(),zt&&zt.update()}function Zt(){return(Ee()-kt)/1e3}if(gt=r(gt),!gt)return null;var qt=gt.gl,Jt=qt.getContextAttributes();qt.isContextLost();var nr=n(qt,gt);if(!nr)return null;var Sn=a(),Mr={vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},Ke=gt.cachedCode||{},Ze=nr.extensions,zt=hr(qt,Ze),kt=Ee(),fr=qt.drawingBufferWidth,Qt=qt.drawingBufferHeight,cr={tick:0,time:0,viewportWidth:fr,viewportHeight:Qt,framebufferWidth:fr,framebufferHeight:Qt,drawingBufferWidth:fr,drawingBufferHeight:Qt,pixelRatio:gt.pixelRatio},fr={elements:null,primitive:4,count:-1,offset:0,instances:-1},ir=Be(qt,Ze),Yt=l(qt,Mr,gt,function(mn){return yr.destroyBuffer(mn)}),gr=m(qt,Ze,Yt,Mr),yr=k(qt,Ze,ir,Mr,Yt,gr,fr),Tr=V(qt,Sn,Mr,gt),pr=O(qt,Ze,ir,function(){Nr.procs.poll()},cr,Mr,gt),Kr=Ae(qt,Ze,ir,Mr,gt),Or=N(qt,Ze,ir,pr,Kr,Mr),Nr=ne(qt,Sn,Ze,ir,Yt,gr,pr,Or,{},yr,Tr,fr,cr,zt,Ke,gt),Sn=G(qt,Or,Nr.procs.poll,cr),Jr=Nr.next,xn=qt.canvas,Dn=[],mr=[],Ar=[],zr=[gt.onDestroy],Br=null;xn&&(xn.addEventListener("webglcontextlost",ur,!1),xn.addEventListener("webglcontextrestored",dt,!1));var on=Or.setFBO=ut({framebuffer:Se.define.call(null,1,"framebuffer")});return Vt(),Jt=le(ut,{clear:function(mn){if("framebuffer"in mn)if(mn.framebuffer&&mn.framebuffer_reglType==="framebufferCube")for(var Tn=0;6>Tn;++Tn)on(le({framebuffer:mn.framebuffer.faces[Tn]},mn),yt);else on(mn,yt);else yt(null,mn)},prop:Se.define.bind(null,1),context:Se.define.bind(null,2),this:Se.define.bind(null,3),draw:ut({}),buffer:function(mn){return Yt.create(mn,34962,!1,!1)},elements:function(mn){return gr.create(mn,!1)},texture:pr.create2D,cube:pr.createCube,renderbuffer:Kr.create,framebuffer:Or.create,framebufferCube:Or.createCube,vao:yr.createVAO,attributes:Jt,frame:Lt,on:function(mn,Tn){var An;switch(mn){case"frame":return Lt(Tn);case"lost":An=mr;break;case"restore":An=Ar;break;case"destroy":An=zr}return An.push(Tn),{cancel:function(){for(var Fn=0;Fn<An.length;++Fn)if(An[Fn]===Tn){An[Fn]=An[An.length-1],An.pop();break}}}},limits:ir,hasExtension:function(mn){return 0<=ir.extensions.indexOf(mn.toLowerCase())},read:Sn,destroy:function(){Dn.length=0,or(),xn&&(xn.removeEventListener("webglcontextlost",ur),xn.removeEventListener("webglcontextrestored",dt)),Tr.clear(),Or.clear(),Kr.clear(),yr.clear(),pr.clear(),gr.clear(),Yt.clear(),zt&&zt.clear(),zr.forEach(function(mn){mn()})},_gl:qt,_refresh:Vt,poll:function(){Nt(),zt&&zt.update()},now:Zt,stats:Mr,getCachedCode:function(){return Ke},preloadCachedCode:function(mn){Object.entries(mn).forEach(function(Tn){Ke[Tn[0]]=Tn[1]})}}),gt.onDone(null,Jt),Jt}})},71665:function(z,B,e){var d=e(12856),P=d.Buffer;function a(x,v){for(var y in x)v[y]=x[y]}P.from&&P.alloc&&P.allocUnsafe&&P.allocUnsafeSlow?z.exports=d:(a(d,B),B.Buffer=_);function _(x,v,y){return P(x,v,y)}_.prototype=Object.create(P.prototype),a(P,_),_.from=function(x,v,y){if(typeof x=="number")throw new TypeError("Argument must not be a number");return P(x,v,y)},_.alloc=function(x,v,y){if(typeof x!="number")throw new TypeError("Argument must be a number");var r=P(x);return v!==void 0?typeof y=="string"?r.fill(v,y):r.fill(v):r.fill(0),r},_.allocUnsafe=function(x){if(typeof x!="number")throw new TypeError("Argument must be a number");return P(x)},_.allocUnsafeSlow=function(x){if(typeof x!="number")throw new TypeError("Argument must be a number");return d.SlowBuffer(x)}},21630:function(z,B,e){z.exports=a;var d=e(15398).EventEmitter,P=e(42018);P(a,d),a.Readable=e(40410),a.Writable=e(37493),a.Duplex=e(37865),a.Transform=e(74308),a.PassThrough=e(66897),a.finished=e(12726),a.pipeline=e(10168),a.Stream=a;function a(){d.call(this)}a.prototype.pipe=function(_,x){var v=this;function y(h){_.writable&&_.write(h)===!1&&v.pause&&v.pause()}v.on("data",y);function r(){v.readable&&v.resume&&v.resume()}_.on("drain",r),!_._isStdio&&(!x||x.end!==!1)&&(v.on("end",u),v.on("close",i));var n=!1;function u(){n||(n=!0,_.end())}function i(){n||(n=!0,typeof _.destroy=="function"&&_.destroy())}function f(h){if(g(),d.listenerCount(this,"error")===0)throw h}v.on("error",f),_.on("error",f);function g(){v.removeListener("data",y),_.removeListener("drain",r),v.removeListener("end",u),v.removeListener("close",i),v.removeListener("error",f),_.removeListener("error",f),v.removeListener("end",g),v.removeListener("close",g),_.removeListener("close",g)}return v.on("end",g),v.on("close",g),_.on("close",g),_.emit("pipe",v),_}},74322:function(z){function B(v,y){v.prototype=Object.create(y.prototype),v.prototype.constructor=v,v.__proto__=y}var e={};function d(v,y,r){r||(r=Error);function n(i,f,g){return typeof y=="string"?y:y(i,f,g)}var u=function(i){B(f,i);function f(g,h,b){return i.call(this,n(g,h,b))||this}return f}(r);u.prototype.name=r.name,u.prototype.code=v,e[v]=u}function P(v,y){if(Array.isArray(v)){var r=v.length;return v=v.map(function(n){return String(n)}),r>2?"one of ".concat(y," ").concat(v.slice(0,r-1).join(", "),", or ")+v[r-1]:r===2?"one of ".concat(y," ").concat(v[0]," or ").concat(v[1]):"of ".concat(y," ").concat(v[0])}else return"of ".concat(y," ").concat(String(v))}function a(v,y,r){return v.substr(!r||r<0?0:+r,y.length)===y}function _(v,y,r){return(r===void 0||r>v.length)&&(r=v.length),v.substring(r-y.length,r)===y}function x(v,y,r){return typeof r!="number"&&(r=0),r+y.length>v.length?!1:v.indexOf(y,r)!==-1}d("ERR_INVALID_OPT_VALUE",function(v,y){return'The value "'+y+'" is invalid for option "'+v+'"'},TypeError),d("ERR_INVALID_ARG_TYPE",function(v,y,r){var n;typeof y=="string"&&a(y,"not ")?(n="must not be",y=y.replace(/^not /,"")):n="must be";var u;if(_(v," argument"))u="The ".concat(v," ").concat(n," ").concat(P(y,"type"));else{var i=x(v,".")?"property":"argument";u='The "'.concat(v,'" ').concat(i," ").concat(n," ").concat(P(y,"type"))}return u+=". Received type ".concat(typeof r),u},TypeError),d("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),d("ERR_METHOD_NOT_IMPLEMENTED",function(v){return"The "+v+" method is not implemented"}),d("ERR_STREAM_PREMATURE_CLOSE","Premature close"),d("ERR_STREAM_DESTROYED",function(v){return"Cannot call "+v+" after a stream was destroyed"}),d("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),d("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),d("ERR_STREAM_WRITE_AFTER_END","write after end"),d("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),d("ERR_UNKNOWN_ENCODING",function(v){return"Unknown encoding: "+v},TypeError),d("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),z.exports.q=e},37865:function(z,B,e){var d=e(90386),P=Object.keys||function(i){var f=[];for(var g in i)f.push(g);return f};z.exports=r;var a=e(40410),_=e(37493);e(42018)(r,a);for(var x=P(_.prototype),v=0;v<x.length;v++){var y=x[v];r.prototype[y]||(r.prototype[y]=_.prototype[y])}function r(i){if(!(this instanceof r))return new r(i);a.call(this,i),_.call(this,i),this.allowHalfOpen=!0,i&&(i.readable===!1&&(this.readable=!1),i.writable===!1&&(this.writable=!1),i.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",n)))}Object.defineProperty(r.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(r.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(r.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function n(){this._writableState.ended||d.nextTick(u,this)}function u(i){i.end()}Object.defineProperty(r.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(f){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=f,this._writableState.destroyed=f)}})},66897:function(z,B,e){z.exports=P;var d=e(74308);e(42018)(P,d);function P(a){if(!(this instanceof P))return new P(a);d.call(this,a)}P.prototype._transform=function(a,_,x){x(null,a)}},40410:function(z,B,e){var d=e(90386);z.exports=o;var P;o.ReadableState=S,e(15398).EventEmitter;var a=function(ne,ve){return ne.listeners(ve).length},_=e(71405),x=e(12856).Buffer,v=e.g.Uint8Array||function(){};function y(te){return x.from(te)}function r(te){return x.isBuffer(te)||te instanceof v}var n=e(40964),u;n&&n.debuglog?u=n.debuglog("stream"):u=function(){};var i=e(31125),f=e(65756),g=e(56306),h=g.getHighWaterMark,b=e(74322).q,p=b.ERR_INVALID_ARG_TYPE,E=b.ERR_STREAM_PUSH_AFTER_EOF,c=b.ERR_METHOD_NOT_IMPLEMENTED,l=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,m,M,L;e(42018)(o,_);var D=f.errorOrDestroy,A=["error","close","destroy","pause","resume"];function C(te,ne,ve){if(typeof te.prependListener=="function")return te.prependListener(ne,ve);!te._events||!te._events[ne]?te.on(ne,ve):Array.isArray(te._events[ne])?te._events[ne].unshift(ve):te._events[ne]=[ve,te._events[ne]]}function S(te,ne,ve){P=P||e(37865),te=te||{},typeof ve!="boolean"&&(ve=ne instanceof P),this.objectMode=!!te.objectMode,ve&&(this.objectMode=this.objectMode||!!te.readableObjectMode),this.highWaterMark=h(this,te,"readableHighWaterMark",ve),this.buffer=new i,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=te.emitClose!==!1,this.autoDestroy=!!te.autoDestroy,this.destroyed=!1,this.defaultEncoding=te.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,te.encoding&&(m||(m=e(68019).s),this.decoder=new m(te.encoding),this.encoding=te.encoding)}function o(te){if(P=P||e(37865),!(this instanceof o))return new o(te);var ne=this instanceof P;this._readableState=new S(te,this,ne),this.readable=!0,te&&(typeof te.read=="function"&&(this._read=te.read),typeof te.destroy=="function"&&(this._destroy=te.destroy)),_.call(this)}Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(ne){this._readableState&&(this._readableState.destroyed=ne)}}),o.prototype.destroy=f.destroy,o.prototype._undestroy=f.undestroy,o.prototype._destroy=function(te,ne){ne(te)},o.prototype.push=function(te,ne){var ve=this._readableState,le;return ve.objectMode?le=!0:typeof te=="string"&&(ne=ne||ve.defaultEncoding,ne!==ve.encoding&&(te=x.from(te,ne),ne=""),le=!0),R(this,te,ne,!1,le)},o.prototype.unshift=function(te){return R(this,te,null,!0,!1)};function R(te,ne,ve,le,xe){u("readableAddChunk",ne);var Se=te._readableState;if(ne===null)Se.reading=!1,V(te,Se);else{var Re;if(xe||(Re=O(Se,ne)),Re)D(te,Re);else if(Se.objectMode||ne&&ne.length>0)if(typeof ne!="string"&&!Se.objectMode&&Object.getPrototypeOf(ne)!==x.prototype&&(ne=y(ne)),le)Se.endEmitted?D(te,new l):T(te,Se,ne,!0);else if(Se.ended)D(te,new E);else{if(Se.destroyed)return!1;Se.reading=!1,Se.decoder&&!ve?(ne=Se.decoder.write(ne),Se.objectMode||ne.length!==0?T(te,Se,ne,!1):Y(te,Se)):T(te,Se,ne,!1)}else le||(Se.reading=!1,Y(te,Se))}return!Se.ended&&(Se.length<Se.highWaterMark||Se.length===0)}function T(te,ne,ve,le){ne.flowing&&ne.length===0&&!ne.sync?(ne.awaitDrain=0,te.emit("data",ve)):(ne.length+=ne.objectMode?1:ve.length,le?ne.buffer.unshift(ve):ne.buffer.push(ve),ne.needReadable&&G(te)),Y(te,ne)}function O(te,ne){var ve;return!r(ne)&&typeof ne!="string"&&ne!==void 0&&!te.objectMode&&(ve=new p("chunk",["string","Buffer","Uint8Array"],ne)),ve}o.prototype.isPaused=function(){return this._readableState.flowing===!1},o.prototype.setEncoding=function(te){m||(m=e(68019).s);var ne=new m(te);this._readableState.decoder=ne,this._readableState.encoding=this._readableState.decoder.encoding;for(var ve=this._readableState.buffer.head,le="";ve!==null;)le+=ne.write(ve.data),ve=ve.next;return this._readableState.buffer.clear(),le!==""&&this._readableState.buffer.push(le),this._readableState.length=le.length,this};var N=1073741824;function H(te){return te>=N?te=N:(te--,te|=te>>>1,te|=te>>>2,te|=te>>>4,te|=te>>>8,te|=te>>>16,te++),te}function k(te,ne){return te<=0||ne.length===0&&ne.ended?0:ne.objectMode?1:te!==te?ne.flowing&&ne.length?ne.buffer.head.data.length:ne.length:(te>ne.highWaterMark&&(ne.highWaterMark=H(te)),te<=ne.length?te:ne.ended?ne.length:(ne.needReadable=!0,0))}o.prototype.read=function(te){u("read",te),te=parseInt(te,10);var ne=this._readableState,ve=te;if(te!==0&&(ne.emittedReadable=!1),te===0&&ne.needReadable&&((ne.highWaterMark!==0?ne.length>=ne.highWaterMark:ne.length>0)||ne.ended))return u("read: emitReadable",ne.length,ne.ended),ne.length===0&&ne.ended?Q(this):G(this),null;if(te=k(te,ne),te===0&&ne.ended)return ne.length===0&&Q(this),null;var le=ne.needReadable;u("need readable",le),(ne.length===0||ne.length-te<ne.highWaterMark)&&(le=!0,u("length less than watermark",le)),ne.ended||ne.reading?(le=!1,u("reading or ended",le)):le&&(u("do read"),ne.reading=!0,ne.sync=!0,ne.length===0&&(ne.needReadable=!0),this._read(ne.highWaterMark),ne.sync=!1,ne.reading||(te=k(ve,ne)));var xe;return te>0?xe=Z(te,ne):xe=null,xe===null?(ne.needReadable=ne.length<=ne.highWaterMark,te=0):(ne.length-=te,ne.awaitDrain=0),ne.length===0&&(ne.ended||(ne.needReadable=!0),ve!==te&&ne.ended&&Q(this)),xe!==null&&this.emit("data",xe),xe};function V(te,ne){if(u("onEofChunk"),!ne.ended){if(ne.decoder){var ve=ne.decoder.end();ve&&ve.length&&(ne.buffer.push(ve),ne.length+=ne.objectMode?1:ve.length)}ne.ended=!0,ne.sync?G(te):(ne.needReadable=!1,ne.emittedReadable||(ne.emittedReadable=!0,U(te)))}}function G(te){var ne=te._readableState;u("emitReadable",ne.needReadable,ne.emittedReadable),ne.needReadable=!1,ne.emittedReadable||(u("emitReadable",ne.flowing),ne.emittedReadable=!0,d.nextTick(U,te))}function U(te){var ne=te._readableState;u("emitReadable_",ne.destroyed,ne.length,ne.ended),!ne.destroyed&&(ne.length||ne.ended)&&(te.emit("readable"),ne.emittedReadable=!1),ne.needReadable=!ne.flowing&&!ne.ended&&ne.length<=ne.highWaterMark,j(te)}function Y(te,ne){ne.readingMore||(ne.readingMore=!0,d.nextTick(ee,te,ne))}function ee(te,ne){for(;!ne.reading&&!ne.ended&&(ne.length<ne.highWaterMark||ne.flowing&&ne.length===0);){var ve=ne.length;if(u("maybeReadMore read 0"),te.read(0),ve===ne.length)break}ne.readingMore=!1}o.prototype._read=function(te){D(this,new c("_read()"))},o.prototype.pipe=function(te,ne){var ve=this,le=this._readableState;switch(le.pipesCount){case 0:le.pipes=te;break;case 1:le.pipes=[le.pipes,te];break;default:le.pipes.push(te);break}le.pipesCount+=1,u("pipe count=%d opts=%j",le.pipesCount,ne);var xe=(!ne||ne.end!==!1)&&te!==d.stdout&&te!==d.stderr,Se=xe?Ee:Ne;le.endEmitted?d.nextTick(Se):ve.once("end",Se),te.on("unpipe",Re);function Re(Xe,ht){u("onunpipe"),Xe===ve&&ht&&ht.hasUnpiped===!1&&(ht.hasUnpiped=!0,Le())}function Ee(){u("onend"),te.end()}var Oe=re(ve);te.on("drain",Oe);var Be=!1;function Le(){u("cleanup"),te.removeListener("close",Ve),te.removeListener("finish",Ye),te.removeListener("drain",Oe),te.removeListener("error",De),te.removeListener("unpipe",Re),ve.removeListener("end",Ee),ve.removeListener("end",Ne),ve.removeListener("data",Te),Be=!0,le.awaitDrain&&(!te._writableState||te._writableState.needDrain)&&Oe()}ve.on("data",Te);function Te(Xe){u("ondata");var ht=te.write(Xe);u("dest.write",ht),ht===!1&&((le.pipesCount===1&&le.pipes===te||le.pipesCount>1&&fe(le.pipes,te)!==-1)&&!Be&&(u("false write response, pause",le.awaitDrain),le.awaitDrain++),ve.pause())}function De(Xe){u("onerror",Xe),Ne(),te.removeListener("error",De),a(te,"error")===0&&D(te,Xe)}C(te,"error",De);function Ve(){te.removeListener("finish",Ye),Ne()}te.once("close",Ve);function Ye(){u("onfinish"),te.removeListener("close",Ve),Ne()}te.once("finish",Ye);function Ne(){u("unpipe"),ve.unpipe(te)}return te.emit("pipe",ve),le.flowing||(u("pipe resume"),ve.resume()),te};function re(te){return function(){var ve=te._readableState;u("pipeOnDrain",ve.awaitDrain),ve.awaitDrain&&ve.awaitDrain--,ve.awaitDrain===0&&a(te,"data")&&(ve.flowing=!0,j(te))}}o.prototype.unpipe=function(te){var ne=this._readableState,ve={hasUnpiped:!1};if(ne.pipesCount===0)return this;if(ne.pipesCount===1)return te&&te!==ne.pipes?this:(te||(te=ne.pipes),ne.pipes=null,ne.pipesCount=0,ne.flowing=!1,te&&te.emit("unpipe",this,ve),this);if(!te){var le=ne.pipes,xe=ne.pipesCount;ne.pipes=null,ne.pipesCount=0,ne.flowing=!1;for(var Se=0;Se<xe;Se++)le[Se].emit("unpipe",this,{hasUnpiped:!1});return this}var Re=fe(ne.pipes,te);return Re===-1?this:(ne.pipes.splice(Re,1),ne.pipesCount-=1,ne.pipesCount===1&&(ne.pipes=ne.pipes[0]),te.emit("unpipe",this,ve),this)},o.prototype.on=function(te,ne){var ve=_.prototype.on.call(this,te,ne),le=this._readableState;return te==="data"?(le.readableListening=this.listenerCount("readable")>0,le.flowing!==!1&&this.resume()):te==="readable"&&!le.endEmitted&&!le.readableListening&&(le.readableListening=le.needReadable=!0,le.flowing=!1,le.emittedReadable=!1,u("on readable",le.length,le.reading),le.length?G(this):le.reading||d.nextTick(se,this)),ve},o.prototype.addListener=o.prototype.on,o.prototype.removeListener=function(te,ne){var ve=_.prototype.removeListener.call(this,te,ne);return te==="readable"&&d.nextTick(ie,this),ve},o.prototype.removeAllListeners=function(te){var ne=_.prototype.removeAllListeners.apply(this,arguments);return(te==="readable"||te===void 0)&&d.nextTick(ie,this),ne};function ie(te){var ne=te._readableState;ne.readableListening=te.listenerCount("readable")>0,ne.resumeScheduled&&!ne.paused?ne.flowing=!0:te.listenerCount("data")>0&&te.resume()}function se(te){u("readable nexttick read 0"),te.read(0)}o.prototype.resume=function(){var te=this._readableState;return te.flowing||(u("resume"),te.flowing=!te.readableListening,ce(this,te)),te.paused=!1,this};function ce(te,ne){ne.resumeScheduled||(ne.resumeScheduled=!0,d.nextTick(q,te,ne))}function q(te,ne){u("resume",ne.reading),ne.reading||te.read(0),ne.resumeScheduled=!1,te.emit("resume"),j(te),ne.flowing&&!ne.reading&&te.read(0)}o.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function j(te){var ne=te._readableState;for(u("flow",ne.flowing);ne.flowing&&te.read()!==null;);}o.prototype.wrap=function(te){var ne=this,ve=this._readableState,le=!1;te.on("end",function(){if(u("wrapped end"),ve.decoder&&!ve.ended){var Re=ve.decoder.end();Re&&Re.length&&ne.push(Re)}ne.push(null)}),te.on("data",function(Re){if(u("wrapped data"),ve.decoder&&(Re=ve.decoder.write(Re)),!(ve.objectMode&&Re==null)&&!(!ve.objectMode&&(!Re||!Re.length))){var Ee=ne.push(Re);Ee||(le=!0,te.pause())}});for(var xe in te)this[xe]===void 0&&typeof te[xe]=="function"&&(this[xe]=function(Ee){return function(){return te[Ee].apply(te,arguments)}}(xe));for(var Se=0;Se<A.length;Se++)te.on(A[Se],this.emit.bind(this,A[Se]));return this._read=function(Re){u("wrapped _read",Re),le&&(le=!1,te.resume())},this},typeof Symbol=="function"&&(o.prototype[Symbol.asyncIterator]=function(){return M===void 0&&(M=e(68221)),M(this)}),Object.defineProperty(o.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(o.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(o.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(ne){this._readableState&&(this._readableState.flowing=ne)}}),o._fromList=Z,Object.defineProperty(o.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Z(te,ne){if(ne.length===0)return null;var ve;return ne.objectMode?ve=ne.buffer.shift():!te||te>=ne.length?(ne.decoder?ve=ne.buffer.join(""):ne.buffer.length===1?ve=ne.buffer.first():ve=ne.buffer.concat(ne.length),ne.buffer.clear()):ve=ne.buffer.consume(te,ne.decoder),ve}function Q(te){var ne=te._readableState;u("endReadable",ne.endEmitted),ne.endEmitted||(ne.ended=!0,d.nextTick(ue,ne,te))}function ue(te,ne){if(u("endReadableNT",te.endEmitted,te.length),!te.endEmitted&&te.length===0&&(te.endEmitted=!0,ne.readable=!1,ne.emit("end"),te.autoDestroy)){var ve=ne._writableState;(!ve||ve.autoDestroy&&ve.finished)&&ne.destroy()}}typeof Symbol=="function"&&(o.from=function(te,ne){return L===void 0&&(L=e(31748)),L(o,te,ne)});function fe(te,ne){for(var ve=0,le=te.length;ve<le;ve++)if(te[ve]===ne)return ve;return-1}},74308:function(z,B,e){z.exports=r;var d=e(74322).q,P=d.ERR_METHOD_NOT_IMPLEMENTED,a=d.ERR_MULTIPLE_CALLBACK,_=d.ERR_TRANSFORM_ALREADY_TRANSFORMING,x=d.ERR_TRANSFORM_WITH_LENGTH_0,v=e(37865);e(42018)(r,v);function y(i,f){var g=this._transformState;g.transforming=!1;var h=g.writecb;if(h===null)return this.emit("error",new a);g.writechunk=null,g.writecb=null,f!=null&&this.push(f),h(i);var b=this._readableState;b.reading=!1,(b.needReadable||b.length<b.highWaterMark)&&this._read(b.highWaterMark)}function r(i){if(!(this instanceof r))return new r(i);v.call(this,i),this._transformState={afterTransform:y.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,i&&(typeof i.transform=="function"&&(this._transform=i.transform),typeof i.flush=="function"&&(this._flush=i.flush)),this.on("prefinish",n)}function n(){var i=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(f,g){u(i,f,g)}):u(this,null,null)}r.prototype.push=function(i,f){return this._transformState.needTransform=!1,v.prototype.push.call(this,i,f)},r.prototype._transform=function(i,f,g){g(new P("_transform()"))},r.prototype._write=function(i,f,g){var h=this._transformState;if(h.writecb=g,h.writechunk=i,h.writeencoding=f,!h.transforming){var b=this._readableState;(h.needTransform||b.needReadable||b.length<b.highWaterMark)&&this._read(b.highWaterMark)}},r.prototype._read=function(i){var f=this._transformState;f.writechunk!==null&&!f.transforming?(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform)):f.needTransform=!0},r.prototype._destroy=function(i,f){v.prototype._destroy.call(this,i,function(g){f(g)})};function u(i,f,g){if(f)return i.emit("error",f);if(g!=null&&i.push(g),i._writableState.length)throw new x;if(i._transformState.transforming)throw new _;return i.push(null)}},37493:function(z,B,e){var d=e(90386);z.exports=S;function P(j){var Z=this;this.next=null,this.entry=null,this.finish=function(){q(Z,j)}}var a;S.WritableState=A;var _={deprecate:e(20588)},x=e(71405),v=e(12856).Buffer,y=e.g.Uint8Array||function(){};function r(j){return v.from(j)}function n(j){return v.isBuffer(j)||j instanceof y}var u=e(65756),i=e(56306),f=i.getHighWaterMark,g=e(74322).q,h=g.ERR_INVALID_ARG_TYPE,b=g.ERR_METHOD_NOT_IMPLEMENTED,p=g.ERR_MULTIPLE_CALLBACK,E=g.ERR_STREAM_CANNOT_PIPE,c=g.ERR_STREAM_DESTROYED,l=g.ERR_STREAM_NULL_VALUES,m=g.ERR_STREAM_WRITE_AFTER_END,M=g.ERR_UNKNOWN_ENCODING,L=u.errorOrDestroy;e(42018)(S,x);function D(){}function A(j,Z,Q){a=a||e(37865),j=j||{},typeof Q!="boolean"&&(Q=Z instanceof a),this.objectMode=!!j.objectMode,Q&&(this.objectMode=this.objectMode||!!j.writableObjectMode),this.highWaterMark=f(this,j,"writableHighWaterMark",Q),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ue=j.decodeStrings===!1;this.decodeStrings=!ue,this.defaultEncoding=j.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(fe){V(Z,fe)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=j.emitClose!==!1,this.autoDestroy=!!j.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new P(this)}A.prototype.getBuffer=function(){for(var Z=this.bufferedRequest,Q=[];Z;)Q.push(Z),Z=Z.next;return Q},function(){try{Object.defineProperty(A.prototype,"buffer",{get:_.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var C;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(C=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(Z){return C.call(this,Z)?!0:this!==S?!1:Z&&Z._writableState instanceof A}})):C=function(Z){return Z instanceof this};function S(j){a=a||e(37865);var Z=this instanceof a;if(!Z&&!C.call(S,this))return new S(j);this._writableState=new A(j,this,Z),this.writable=!0,j&&(typeof j.write=="function"&&(this._write=j.write),typeof j.writev=="function"&&(this._writev=j.writev),typeof j.destroy=="function"&&(this._destroy=j.destroy),typeof j.final=="function"&&(this._final=j.final)),x.call(this)}S.prototype.pipe=function(){L(this,new E)};function o(j,Z){var Q=new m;L(j,Q),d.nextTick(Z,Q)}function R(j,Z,Q,ue){var fe;return Q===null?fe=new l:typeof Q!="string"&&!Z.objectMode&&(fe=new h("chunk",["string","Buffer"],Q)),fe?(L(j,fe),d.nextTick(ue,fe),!1):!0}S.prototype.write=function(j,Z,Q){var ue=this._writableState,fe=!1,te=!ue.objectMode&&n(j);return te&&!v.isBuffer(j)&&(j=r(j)),typeof Z=="function"&&(Q=Z,Z=null),te?Z="buffer":Z||(Z=ue.defaultEncoding),typeof Q!="function"&&(Q=D),ue.ending?o(this,Q):(te||R(this,ue,j,Q))&&(ue.pendingcb++,fe=O(this,ue,te,j,Z,Q)),fe},S.prototype.cork=function(){this._writableState.corked++},S.prototype.uncork=function(){var j=this._writableState;j.corked&&(j.corked--,!j.writing&&!j.corked&&!j.bufferProcessing&&j.bufferedRequest&&Y(this,j))},S.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 M(Z);return this._writableState.defaultEncoding=Z,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function T(j,Z,Q){return!j.objectMode&&j.decodeStrings!==!1&&typeof Z=="string"&&(Z=v.from(Z,Q)),Z}Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function O(j,Z,Q,ue,fe,te){if(!Q){var ne=T(Z,ue,fe);ue!==ne&&(Q=!0,fe="buffer",ue=ne)}var ve=Z.objectMode?1:ue.length;Z.length+=ve;var le=Z.length<Z.highWaterMark;if(le||(Z.needDrain=!0),Z.writing||Z.corked){var xe=Z.lastBufferedRequest;Z.lastBufferedRequest={chunk:ue,encoding:fe,isBuf:Q,callback:te,next:null},xe?xe.next=Z.lastBufferedRequest:Z.bufferedRequest=Z.lastBufferedRequest,Z.bufferedRequestCount+=1}else N(j,Z,!1,ve,ue,fe,te);return le}function N(j,Z,Q,ue,fe,te,ne){Z.writelen=ue,Z.writecb=ne,Z.writing=!0,Z.sync=!0,Z.destroyed?Z.onwrite(new c("write")):Q?j._writev(fe,Z.onwrite):j._write(fe,te,Z.onwrite),Z.sync=!1}function H(j,Z,Q,ue,fe){--Z.pendingcb,Q?(d.nextTick(fe,ue),d.nextTick(se,j,Z),j._writableState.errorEmitted=!0,L(j,ue)):(fe(ue),j._writableState.errorEmitted=!0,L(j,ue),se(j,Z))}function k(j){j.writing=!1,j.writecb=null,j.length-=j.writelen,j.writelen=0}function V(j,Z){var Q=j._writableState,ue=Q.sync,fe=Q.writecb;if(typeof fe!="function")throw new p;if(k(Q),Z)H(j,Q,ue,Z,fe);else{var te=ee(Q)||j.destroyed;!te&&!Q.corked&&!Q.bufferProcessing&&Q.bufferedRequest&&Y(j,Q),ue?d.nextTick(G,j,Q,te,fe):G(j,Q,te,fe)}}function G(j,Z,Q,ue){Q||U(j,Z),Z.pendingcb--,ue(),se(j,Z)}function U(j,Z){Z.length===0&&Z.needDrain&&(Z.needDrain=!1,j.emit("drain"))}function Y(j,Z){Z.bufferProcessing=!0;var Q=Z.bufferedRequest;if(j._writev&&Q&&Q.next){var ue=Z.bufferedRequestCount,fe=new Array(ue),te=Z.corkedRequestsFree;te.entry=Q;for(var ne=0,ve=!0;Q;)fe[ne]=Q,Q.isBuf||(ve=!1),Q=Q.next,ne+=1;fe.allBuffers=ve,N(j,Z,!0,Z.length,fe,"",te.finish),Z.pendingcb++,Z.lastBufferedRequest=null,te.next?(Z.corkedRequestsFree=te.next,te.next=null):Z.corkedRequestsFree=new P(Z),Z.bufferedRequestCount=0}else{for(;Q;){var le=Q.chunk,xe=Q.encoding,Se=Q.callback,Re=Z.objectMode?1:le.length;if(N(j,Z,!1,Re,le,xe,Se),Q=Q.next,Z.bufferedRequestCount--,Z.writing)break}Q===null&&(Z.lastBufferedRequest=null)}Z.bufferedRequest=Q,Z.bufferProcessing=!1}S.prototype._write=function(j,Z,Q){Q(new b("_write()"))},S.prototype._writev=null,S.prototype.end=function(j,Z,Q){var ue=this._writableState;return typeof j=="function"?(Q=j,j=null,Z=null):typeof Z=="function"&&(Q=Z,Z=null),j!=null&&this.write(j,Z),ue.corked&&(ue.corked=1,this.uncork()),ue.ending||ce(this,ue,Q),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ee(j){return j.ending&&j.length===0&&j.bufferedRequest===null&&!j.finished&&!j.writing}function re(j,Z){j._final(function(Q){Z.pendingcb--,Q&&L(j,Q),Z.prefinished=!0,j.emit("prefinish"),se(j,Z)})}function ie(j,Z){!Z.prefinished&&!Z.finalCalled&&(typeof j._final=="function"&&!Z.destroyed?(Z.pendingcb++,Z.finalCalled=!0,d.nextTick(re,j,Z)):(Z.prefinished=!0,j.emit("prefinish")))}function se(j,Z){var Q=ee(Z);if(Q&&(ie(j,Z),Z.pendingcb===0&&(Z.finished=!0,j.emit("finish"),Z.autoDestroy))){var ue=j._readableState;(!ue||ue.autoDestroy&&ue.endEmitted)&&j.destroy()}return Q}function ce(j,Z,Q){Z.ending=!0,se(j,Z),Q&&(Z.finished?d.nextTick(Q):j.once("finish",Q)),Z.ended=!0,j.writable=!1}function q(j,Z,Q){var ue=j.entry;for(j.entry=null;ue;){var fe=ue.callback;Z.pendingcb--,fe(Q),ue=ue.next}Z.corkedRequestsFree.next=j}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(Z){this._writableState&&(this._writableState.destroyed=Z)}}),S.prototype.destroy=u.destroy,S.prototype._undestroy=u.undestroy,S.prototype._destroy=function(j,Z){Z(j)}},68221:function(z,B,e){var d=e(90386),P;function a(l,m,M){return m in l?Object.defineProperty(l,m,{value:M,enumerable:!0,configurable:!0,writable:!0}):l[m]=M,l}var _=e(12726),x=Symbol("lastResolve"),v=Symbol("lastReject"),y=Symbol("error"),r=Symbol("ended"),n=Symbol("lastPromise"),u=Symbol("handlePromise"),i=Symbol("stream");function f(l,m){return{value:l,done:m}}function g(l){var m=l[x];if(m!==null){var M=l[i].read();M!==null&&(l[n]=null,l[x]=null,l[v]=null,m(f(M,!1)))}}function h(l){d.nextTick(g,l)}function b(l,m){return function(M,L){l.then(function(){if(m[r]){M(f(void 0,!0));return}m[u](M,L)},L)}}var p=Object.getPrototypeOf(function(){}),E=Object.setPrototypeOf((P={get stream(){return this[i]},next:function(){var m=this,M=this[y];if(M!==null)return Promise.reject(M);if(this[r])return Promise.resolve(f(void 0,!0));if(this[i].destroyed)return new Promise(function(C,S){d.nextTick(function(){m[y]?S(m[y]):C(f(void 0,!0))})});var L=this[n],D;if(L)D=new Promise(b(L,this));else{var A=this[i].read();if(A!==null)return Promise.resolve(f(A,!1));D=new Promise(this[u])}return this[n]=D,D}},a(P,Symbol.asyncIterator,function(){return this}),a(P,"return",function(){var m=this;return new Promise(function(M,L){m[i].destroy(null,function(D){if(D){L(D);return}M(f(void 0,!0))})})}),P),p),c=function(m){var M,L=Object.create(E,(M={},a(M,i,{value:m,writable:!0}),a(M,x,{value:null,writable:!0}),a(M,v,{value:null,writable:!0}),a(M,y,{value:null,writable:!0}),a(M,r,{value:m._readableState.endEmitted,writable:!0}),a(M,u,{value:function(A,C){var S=L[i].read();S?(L[n]=null,L[x]=null,L[v]=null,A(f(S,!1))):(L[x]=A,L[v]=C)},writable:!0}),M));return L[n]=null,_(m,function(D){if(D&&D.code!=="ERR_STREAM_PREMATURE_CLOSE"){var A=L[v];A!==null&&(L[n]=null,L[x]=null,L[v]=null,A(D)),L[y]=D;return}var C=L[x];C!==null&&(L[n]=null,L[x]=null,L[v]=null,C(f(void 0,!0))),L[r]=!0}),m.on("readable",h.bind(null,L)),L};z.exports=c},31125:function(z,B,e){function d(g,h){var b=Object.keys(g);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(g);h&&(p=p.filter(function(E){return Object.getOwnPropertyDescriptor(g,E).enumerable})),b.push.apply(b,p)}return b}function P(g){for(var h=1;h<arguments.length;h++){var b=arguments[h]!=null?arguments[h]:{};h%2?d(Object(b),!0).forEach(function(p){a(g,p,b[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(b)):d(Object(b)).forEach(function(p){Object.defineProperty(g,p,Object.getOwnPropertyDescriptor(b,p))})}return g}function a(g,h,b){return h in g?Object.defineProperty(g,h,{value:b,enumerable:!0,configurable:!0,writable:!0}):g[h]=b,g}function _(g,h){if(!(g instanceof h))throw new TypeError("Cannot call a class as a function")}function x(g,h){for(var b=0;b<h.length;b++){var p=h[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(g,p.key,p)}}function v(g,h,b){return h&&x(g.prototype,h),b&&x(g,b),g}var y=e(12856),r=y.Buffer,n=e(69862),u=n.inspect,i=u&&u.custom||"inspect";function f(g,h,b){r.prototype.copy.call(g,h,b)}z.exports=function(){function g(){_(this,g),this.head=null,this.tail=null,this.length=0}return v(g,[{key:"push",value:function(b){var p={data:b,next:null};this.length>0?this.tail.next=p:this.head=p,this.tail=p,++this.length}},{key:"unshift",value:function(b){var p={data:b,next:this.head};this.length===0&&(this.tail=p),this.head=p,++this.length}},{key:"shift",value:function(){if(this.length!==0){var b=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,b}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(b){if(this.length===0)return"";for(var p=this.head,E=""+p.data;p=p.next;)E+=b+p.data;return E}},{key:"concat",value:function(b){if(this.length===0)return r.alloc(0);for(var p=r.allocUnsafe(b>>>0),E=this.head,c=0;E;)f(E.data,p,c),c+=E.data.length,E=E.next;return p}},{key:"consume",value:function(b,p){var E;return b<this.head.data.length?(E=this.head.data.slice(0,b),this.head.data=this.head.data.slice(b)):b===this.head.data.length?E=this.shift():E=p?this._getString(b):this._getBuffer(b),E}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(b){var p=this.head,E=1,c=p.data;for(b-=c.length;p=p.next;){var l=p.data,m=b>l.length?l.length:b;if(m===l.length?c+=l:c+=l.slice(0,b),b-=m,b===0){m===l.length?(++E,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=l.slice(m));break}++E}return this.length-=E,c}},{key:"_getBuffer",value:function(b){var p=r.allocUnsafe(b),E=this.head,c=1;for(E.data.copy(p),b-=E.data.length;E=E.next;){var l=E.data,m=b>l.length?l.length:b;if(l.copy(p,p.length-b,0,m),b-=m,b===0){m===l.length?(++c,E.next?this.head=E.next:this.head=this.tail=null):(this.head=E,E.data=l.slice(m));break}++c}return this.length-=c,p}},{key:i,value:function(b,p){return u(this,P({},p,{depth:0,customInspect:!1}))}}]),g}()},65756:function(z,B,e){var d=e(90386);function P(r,n){var u=this,i=this._readableState&&this._readableState.destroyed,f=this._writableState&&this._writableState.destroyed;return i||f?(n?n(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,d.nextTick(v,this,r)):d.nextTick(v,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(g){!n&&g?u._writableState?u._writableState.errorEmitted?d.nextTick(_,u):(u._writableState.errorEmitted=!0,d.nextTick(a,u,g)):d.nextTick(a,u,g):n?(d.nextTick(_,u),n(g)):d.nextTick(_,u)}),this)}function a(r,n){v(r,n),_(r)}function _(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function x(){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 v(r,n){r.emit("error",n)}function y(r,n){var u=r._readableState,i=r._writableState;u&&u.autoDestroy||i&&i.autoDestroy?r.destroy(n):r.emit("error",n)}z.exports={destroy:P,undestroy:x,errorOrDestroy:y}},12726:function(z,B,e){var d=e(74322).q.ERR_STREAM_PREMATURE_CLOSE;function P(v){var y=!1;return function(){if(!y){y=!0;for(var r=arguments.length,n=new Array(r),u=0;u<r;u++)n[u]=arguments[u];v.apply(this,n)}}}function a(){}function _(v){return v.setHeader&&typeof v.abort=="function"}function x(v,y,r){if(typeof y=="function")return x(v,null,y);y||(y={}),r=P(r||a);var n=y.readable||y.readable!==!1&&v.readable,u=y.writable||y.writable!==!1&&v.writable,i=function(){v.writable||g()},f=v._writableState&&v._writableState.finished,g=function(){u=!1,f=!0,n||r.call(v)},h=v._readableState&&v._readableState.endEmitted,b=function(){n=!1,h=!0,u||r.call(v)},p=function(m){r.call(v,m)},E=function(){var m;if(n&&!h)return(!v._readableState||!v._readableState.ended)&&(m=new d),r.call(v,m);if(u&&!f)return(!v._writableState||!v._writableState.ended)&&(m=new d),r.call(v,m)},c=function(){v.req.on("finish",g)};return _(v)?(v.on("complete",g),v.on("abort",E),v.req?c():v.on("request",c)):u&&!v._writableState&&(v.on("end",i),v.on("close",i)),v.on("end",b),v.on("finish",g),y.error!==!1&&v.on("error",p),v.on("close",E),function(){v.removeListener("complete",g),v.removeListener("abort",E),v.removeListener("request",c),v.req&&v.req.removeListener("finish",g),v.removeListener("end",i),v.removeListener("close",i),v.removeListener("finish",g),v.removeListener("end",b),v.removeListener("error",p),v.removeListener("close",E)}}z.exports=x},31748:function(z){z.exports=function(){throw new Error("Readable.from is not available in the browser")}},10168:function(z,B,e){var d;function P(g){var h=!1;return function(){h||(h=!0,g.apply(void 0,arguments))}}var a=e(74322).q,_=a.ERR_MISSING_ARGS,x=a.ERR_STREAM_DESTROYED;function v(g){if(g)throw g}function y(g){return g.setHeader&&typeof g.abort=="function"}function r(g,h,b,p){p=P(p);var E=!1;g.on("close",function(){E=!0}),d===void 0&&(d=e(12726)),d(g,{readable:h,writable:b},function(l){if(l)return p(l);E=!0,p()});var c=!1;return function(l){if(!E&&!c){if(c=!0,y(g))return g.abort();if(typeof g.destroy=="function")return g.destroy();p(l||new x("pipe"))}}}function n(g){g()}function u(g,h){return g.pipe(h)}function i(g){return!g.length||typeof g[g.length-1]!="function"?v:g.pop()}function f(){for(var g=arguments.length,h=new Array(g),b=0;b<g;b++)h[b]=arguments[b];var p=i(h);if(Array.isArray(h[0])&&(h=h[0]),h.length<2)throw new _("streams");var E,c=h.map(function(l,m){var M=m<h.length-1,L=m>0;return r(l,M,L,function(D){E||(E=D),D&&c.forEach(n),!M&&(c.forEach(n),p(E))})});return h.reduce(u)}z.exports=f},56306:function(z,B,e){var d=e(74322).q.ERR_INVALID_OPT_VALUE;function P(_,x,v){return _.highWaterMark!=null?_.highWaterMark:x?_[v]:null}function a(_,x,v,y){var r=P(x,y,v);if(r!=null){if(!(isFinite(r)&&Math.floor(r)===r)||r<0){var n=y?v:"highWaterMark";throw new d(n,r)}return Math.floor(r)}return _.objectMode?16:16384}z.exports={getHighWaterMark:a}},71405:function(z,B,e){z.exports=e(15398).EventEmitter},68019:function(z,B,e){var d=e(71665).Buffer,P=d.isEncoding||function(c){switch(c=""+c,c&&c.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(c){if(!c)return"utf8";for(var l;;)switch(c){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return c;default:if(l)return;c=(""+c).toLowerCase(),l=!0}}function _(c){var l=a(c);if(typeof l!="string"&&(d.isEncoding===P||!P(c)))throw new Error("Unknown encoding: "+c);return l||c}B.s=x;function x(c){this.encoding=_(c);var l;switch(this.encoding){case"utf16le":this.text=f,this.end=g,l=4;break;case"utf8":this.fillLast=n,l=4;break;case"base64":this.text=h,this.end=b,l=3;break;default:this.write=p,this.end=E;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=d.allocUnsafe(l)}x.prototype.write=function(c){if(c.length===0)return"";var l,m;if(this.lastNeed){if(l=this.fillLast(c),l===void 0)return"";m=this.lastNeed,this.lastNeed=0}else m=0;return m<c.length?l?l+this.text(c,m):this.text(c,m):l||""},x.prototype.end=i,x.prototype.text=u,x.prototype.fillLast=function(c){if(this.lastNeed<=c.length)return c.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);c.copy(this.lastChar,this.lastTotal-this.lastNeed,0,c.length),this.lastNeed-=c.length};function v(c){return c<=127?0:c>>5===6?2:c>>4===14?3:c>>3===30?4:c>>6===2?-1:-2}function y(c,l,m){var M=l.length-1;if(M<m)return 0;var L=v(l[M]);return L>=0?(L>0&&(c.lastNeed=L-1),L):--M<m||L===-2?0:(L=v(l[M]),L>=0?(L>0&&(c.lastNeed=L-2),L):--M<m||L===-2?0:(L=v(l[M]),L>=0?(L>0&&(L===2?L=0:c.lastNeed=L-3),L):0))}function r(c,l,m){if((l[0]&192)!==128)return c.lastNeed=0,"<22>";if(c.lastNeed>1&&l.length>1){if((l[1]&192)!==128)return c.lastNeed=1,"<22>";if(c.lastNeed>2&&l.length>2&&(l[2]&192)!==128)return c.lastNeed=2,"<22>"}}function n(c){var l=this.lastTotal-this.lastNeed,m=r(this,c);if(m!==void 0)return m;if(this.lastNeed<=c.length)return c.copy(this.lastChar,l,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);c.copy(this.lastChar,l,0,c.length),this.lastNeed-=c.length}function u(c,l){var m=y(this,c,l);if(!this.lastNeed)return c.toString("utf8",l);this.lastTotal=m;var M=c.length-(m-this.lastNeed);return c.copy(this.lastChar,0,M),c.toString("utf8",l,M)}function i(c){var l=c&&c.length?this.write(c):"";return this.lastNeed?l+"<22>":l}function f(c,l){if((c.length-l)%2===0){var m=c.toString("utf16le",l);if(m){var M=m.charCodeAt(m.length-1);if(M>=55296&&M<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=c[c.length-2],this.lastChar[1]=c[c.length-1],m.slice(0,-1)}return m}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=c[c.length-1],c.toString("utf16le",l,c.length-1)}function g(c){var l=c&&c.length?this.write(c):"";if(this.lastNeed){var m=this.lastTotal-this.lastNeed;return l+this.lastChar.toString("utf16le",0,m)}return l}function h(c,l){var m=(c.length-l)%3;return m===0?c.toString("base64",l):(this.lastNeed=3-m,this.lastTotal=3,m===1?this.lastChar[0]=c[c.length-1]:(this.lastChar[0]=c[c.length-2],this.lastChar[1]=c[c.length-1]),c.toString("base64",l,c.length-m))}function b(c){var l=c&&c.length?this.write(c):"";return this.lastNeed?l+this.lastChar.toString("base64",0,3-this.lastNeed):l}function p(c){return c.toString(this.encoding)}function E(c){return c&&c.length?this.write(c):""}},90715:function(z,B,e){var d=e(32791),P=e(41633)("stream-parser");z.exports=y;var a=-1,_=0,x=1,v=2;function y(c){var l=c&&typeof c._transform=="function",m=c&&typeof c._write=="function";if(!l&&!m)throw new Error("must pass a Writable or Transform stream in");P("extending Parser into stream"),c._bytes=n,c._skipBytes=u,l&&(c._passthrough=i),l?c._transform=g:c._write=f}function r(c){P("initializing parser stream"),c._parserBytesLeft=0,c._parserBuffers=[],c._parserBuffered=0,c._parserState=a,c._parserCallback=null,typeof c.push=="function"&&(c._parserOutput=c.push.bind(c)),c._parserInit=!0}function n(c,l){d(!this._parserCallback,'there is already a "callback" set!'),d(isFinite(c)&&c>0,'can only buffer a finite number of bytes > 0, got "'+c+'"'),this._parserInit||r(this),P("buffering %o bytes",c),this._parserBytesLeft=c,this._parserCallback=l,this._parserState=_}function u(c,l){d(!this._parserCallback,'there is already a "callback" set!'),d(c>0,'can only skip > 0 bytes, got "'+c+'"'),this._parserInit||r(this),P("skipping %o bytes",c),this._parserBytesLeft=c,this._parserCallback=l,this._parserState=x}function i(c,l){d(!this._parserCallback,'There is already a "callback" set!'),d(c>0,'can only pass through > 0 bytes, got "'+c+'"'),this._parserInit||r(this),P("passing through %o bytes",c),this._parserBytesLeft=c,this._parserCallback=l,this._parserState=v}function f(c,l,m){this._parserInit||r(this),P("write(%o bytes)",c.length),typeof l=="function"&&(m=l),p(this,c,null,m)}function g(c,l,m){this._parserInit||r(this),P("transform(%o bytes)",c.length),typeof l!="function"&&(l=this._parserOutput),p(this,c,l,m)}function h(c,l,m,M){return c._parserBytesLeft<=0?M(new Error("got data but not currently parsing anything")):l.length<=c._parserBytesLeft?function(){return b(c,l,m,M)}:function(){var L=l.slice(0,c._parserBytesLeft);return b(c,L,m,function(D){if(D)return M(D);if(l.length>L.length)return function(){return h(c,l.slice(L.length),m,M)}})}}function b(c,l,m,M){if(c._parserBytesLeft-=l.length,P("%o bytes left for stream piece",c._parserBytesLeft),c._parserState===_?(c._parserBuffers.push(l),c._parserBuffered+=l.length):c._parserState===v&&m(l),c._parserBytesLeft===0){var L=c._parserCallback;if(L&&c._parserState===_&&c._parserBuffers.length>1&&(l=Buffer.concat(c._parserBuffers,c._parserBuffered)),c._parserState!==_&&(l=null),c._parserCallback=null,c._parserBuffered=0,c._parserState=a,c._parserBuffers.splice(0),L){var D=[];l&&D.push(l),m&&D.push(m);var A=L.length>D.length;A&&D.push(E(M));var C=L.apply(c,D);if(!A||M===C)return M}}else return M}var p=E(h);function E(c){return function(){for(var l=c.apply(this,arguments);typeof l=="function";)l=l();return l}}},41633:function(z,B,e){var d=e(90386);B=z.exports=e(74469),B.log=_,B.formatArgs=a,B.save=x,B.load=v,B.useColors=P,B.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:y(),B.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function P(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}B.formatters.j=function(r){try{return JSON.stringify(r)}catch(n){return"[UnexpectedJSONParseError]: "+n.message}};function a(r){var n=this.useColors;if(r[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+r[0]+(n?"%c ":" ")+"+"+B.humanize(this.diff),!!n){var u="color: "+this.color;r.splice(1,0,u,"color: inherit");var i=0,f=0;r[0].replace(/%[a-zA-Z%]/g,function(g){g!=="%%"&&(i++,g==="%c"&&(f=i))}),r.splice(f,0,u)}}function _(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function x(r){try{r==null?B.storage.removeItem("debug"):B.storage.debug=r}catch{}}function v(){var r;try{r=B.storage.debug}catch{}return!r&&typeof d<"u"&&"env"in d&&(r={}.DEBUG),r}B.enable(v());function y(){try{return window.localStorage}catch{}}},74469:function(z,B,e){B=z.exports=a.debug=a.default=a,B.coerce=y,B.disable=x,B.enable=_,B.enabled=v,B.humanize=e(11375),B.names=[],B.skips=[],B.formatters={};var d;function P(r){var n=0,u;for(u in r)n=(n<<5)-n+r.charCodeAt(u),n|=0;return B.colors[Math.abs(n)%B.colors.length]}function a(r){function n(){if(n.enabled){var u=n,i=+new Date,f=i-(d||i);u.diff=f,u.prev=d,u.curr=i,d=i;for(var g=new Array(arguments.length),h=0;h<g.length;h++)g[h]=arguments[h];g[0]=B.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");var b=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,function(E,c){if(E==="%%")return E;b++;var l=B.formatters[c];if(typeof l=="function"){var m=g[b];E=l.call(u,m),g.splice(b,1),b--}return E}),B.formatArgs.call(u,g);var p=n.log||B.log||console.log.bind(console);p.apply(u,g)}}return n.namespace=r,n.enabled=B.enabled(r),n.useColors=B.useColors(),n.color=P(r),typeof B.init=="function"&&B.init(n),n}function _(r){B.save(r),B.names=[],B.skips=[];for(var n=(typeof r=="string"?r:"").split(/[\s,]+/),u=n.length,i=0;i<u;i++)n[i]&&(r=n[i].replace(/\*/g,".*?"),r[0]==="-"?B.skips.push(new RegExp("^"+r.substr(1)+"$")):B.names.push(new RegExp("^"+r+"$")))}function x(){B.enable("")}function v(r){var n,u;for(n=0,u=B.skips.length;n<u;n++)if(B.skips[n].test(r))return!1;for(n=0,u=B.names.length;n<u;n++)if(B.names[n].test(r))return!0;return!1}function y(r){return r instanceof Error?r.stack||r.message:r}},11375:function(z){var B=1e3,e=B*60,d=e*60,P=d*24,a=P*365.25;z.exports=function(r,n){n=n||{};var u=typeof r;if(u==="string"&&r.length>0)return _(r);if(u==="number"&&isNaN(r)===!1)return n.long?v(r):x(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function _(r){if(r=String(r),!(r.length>100)){var n=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(r);if(n){var u=parseFloat(n[1]),i=(n[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return u*a;case"days":case"day":case"d":return u*P;case"hours":case"hour":case"hrs":case"hr":case"h":return u*d;case"minutes":case"minute":case"mins":case"min":case"m":return u*e;case"seconds":case"second":case"secs":case"sec":case"s":return u*B;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}}}function x(r){return r>=P?Math.round(r/P)+"d":r>=d?Math.round(r/d)+"h":r>=e?Math.round(r/e)+"m":r>=B?Math.round(r/B)+"s":r+"ms"}function v(r){return y(r,P,"day")||y(r,d,"hour")||y(r,e,"minute")||y(r,B,"second")||r+" ms"}function y(r,n,u){if(!(r<n))return r<n*1.5?Math.floor(r/n)+" "+u:Math.ceil(r/n)+" "+u+"s"}},99011:function(z,B,e){var d=e(88641);z.exports=function(a,_,x){if(a==null)throw Error("First argument should be a string");if(_==null)throw Error("Separator should be a string or a RegExp");x?(typeof x=="string"||Array.isArray(x))&&(x={ignore:x}):x={},x.escape==null&&(x.escape=!0),x.ignore==null?x.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:(typeof x.ignore=="string"&&(x.ignore=[x.ignore]),x.ignore=x.ignore.map(function(g){return g.length===1&&(g=g+g),g}));var v=d.parse(a,{flat:!0,brackets:x.ignore}),y=v[0],r=y.split(_);if(x.escape){for(var n=[],u=0;u<r.length;u++){var i=r[u],f=r[u+1];i[i.length-1]==="\\"&&i[i.length-2]!=="\\"?(n.push(i+_+f),u++):n.push(i)}r=n}for(var u=0;u<r.length;u++)v[0]=r[u],r[u]=d.stringify(v,{flat:!0});return r}},68664:function(z){z.exports=B;function B(e){for(var d=e.length,P=new Array(d),a=new Array(d),_=new Array(d),x=new Array(d),v=new Array(d),y=new Array(d),r=0;r<d;++r)P[r]=-1,a[r]=0,_[r]=!1,x[r]=0,v[r]=-1,y[r]=[];var n=0,u=[],i=[];function f(p){var E=[p],c=[p];for(P[p]=a[p]=n,_[p]=!0,n+=1;c.length>0;){p=c[c.length-1];var l=e[p];if(x[p]<l.length){for(var m=x[p];m<l.length;++m){var M=l[m];if(P[M]<0){P[M]=a[M]=n,_[M]=!0,n+=1,E.push(M),c.push(M);break}else _[M]&&(a[p]=Math.min(a[p],a[M])|0);v[M]>=0&&y[p].push(v[M])}x[p]=m}else{if(a[p]===P[p]){for(var L=[],D=[],A=0,m=E.length-1;m>=0;--m){var C=E[m];if(_[C]=!1,L.push(C),D.push(y[C]),A+=y[C].length,v[C]=u.length,C===p){E.length=m;break}}u.push(L);for(var S=new Array(A),m=0;m<D.length;m++)for(var o=0;o<D[m].length;o++)S[--A]=D[m][o];i.push(S)}c.pop()}}}for(var r=0;r<d;++r)P[r]<0&&f(r);for(var g,r=0;r<i.length;r++){var h=i[r];if(h.length!==0){h.sort(function(E,c){return E-c}),g=[h[0]];for(var b=1;b<h.length;b++)h[b]!==h[b-1]&&g.push(h[b]);i[r]=g}}return{components:u,adjacencyList:i}}},7095:function(z,B,e){e.r(B);var d=function(){function r(n,u){var i=[],f=!0,g=!1,h=void 0;try{for(var b=n[Symbol.iterator](),p;!(f=(p=b.next()).done)&&(i.push(p.value),!(u&&i.length===u));f=!0);}catch(E){g=!0,h=E}finally{try{!f&&b.return&&b.return()}finally{if(g)throw h}}return i}return function(n,u){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return r(n,u);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),P=Math.PI*2,a=function(n,u,i,f,g,h,b){var p=n.x,E=n.y;p*=u,E*=i;var c=f*p-g*E,l=g*p+f*E;return{x:c+h,y:l+b}},_=function(n,u){var i=u===1.5707963267948966?.551915024494:u===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(u/4),f=Math.cos(n),g=Math.sin(n),h=Math.cos(n+u),b=Math.sin(n+u);return[{x:f-g*i,y:g+f*i},{x:h+b*i,y:b-h*i},{x:h,y:b}]},x=function(n,u,i,f){var g=n*f-u*i<0?-1:1,h=n*i+u*f;return h>1&&(h=1),h<-1&&(h=-1),g*Math.acos(h)},v=function(n,u,i,f,g,h,b,p,E,c,l,m){var M=Math.pow(g,2),L=Math.pow(h,2),D=Math.pow(l,2),A=Math.pow(m,2),C=M*L-M*A-L*D;C<0&&(C=0),C/=M*A+L*D,C=Math.sqrt(C)*(b===p?-1:1);var S=C*g/h*m,o=C*-h/g*l,R=c*S-E*o+(n+i)/2,T=E*S+c*o+(u+f)/2,O=(l-S)/g,N=(m-o)/h,H=(-l-S)/g,k=(-m-o)/h,V=x(1,0,O,N),G=x(O,N,H,k);return p===0&&G>0&&(G-=P),p===1&&G<0&&(G+=P),[R,T,V,G]},y=function(n){var u=n.px,i=n.py,f=n.cx,g=n.cy,h=n.rx,b=n.ry,p=n.xAxisRotation,E=p===void 0?0:p,c=n.largeArcFlag,l=c===void 0?0:c,m=n.sweepFlag,M=m===void 0?0:m,L=[];if(h===0||b===0)return[];var D=Math.sin(E*P/360),A=Math.cos(E*P/360),C=A*(u-f)/2+D*(i-g)/2,S=-D*(u-f)/2+A*(i-g)/2;if(C===0&&S===0)return[];h=Math.abs(h),b=Math.abs(b);var o=Math.pow(C,2)/Math.pow(h,2)+Math.pow(S,2)/Math.pow(b,2);o>1&&(h*=Math.sqrt(o),b*=Math.sqrt(o));var R=v(u,i,f,g,h,b,l,M,D,A,C,S),T=d(R,4),O=T[0],N=T[1],H=T[2],k=T[3],V=Math.abs(k)/(P/4);Math.abs(1-V)<1e-7&&(V=1);var G=Math.max(Math.ceil(V),1);k/=G;for(var U=0;U<G;U++)L.push(_(H,k)),H+=k;return L.map(function(Y){var ee=a(Y[0],h,b,A,D,O,N),re=ee.x,ie=ee.y,se=a(Y[1],h,b,A,D,O,N),ce=se.x,q=se.y,j=a(Y[2],h,b,A,D,O,N),Z=j.x,Q=j.y;return{x1:re,y1:ie,x2:ce,y2:q,x:Z,y:Q}})};B.default=y},1750:function(z,B,e){var d=e(95616),P=e(65185),a=e(29988),_=e(89546),x=e(32791);z.exports=v;function v(y){if(Array.isArray(y)&&y.length===1&&typeof y[0]=="string"&&(y=y[0]),typeof y=="string"&&(x(_(y),"String is not an SVG path."),y=d(y)),x(Array.isArray(y),"Argument should be a string or an array of path segments."),y=P(y),y=a(y),!y.length)return[0,0,0,0];for(var r=[1/0,1/0,-1/0,-1/0],n=0,u=y.length;n<u;n++)for(var i=y[n].slice(1),f=0;f<i.length;f+=2)i[f+0]<r[0]&&(r[0]=i[f+0]),i[f+1]<r[1]&&(r[1]=i[f+1]),i[f+0]>r[2]&&(r[2]=i[f+0]),i[f+1]>r[3]&&(r[3]=i[f+1]);return r}},29988:function(z,B,e){z.exports=P;var d=e(7095);function P(x){for(var v,y=[],r=0,n=0,u=0,i=0,f=null,g=null,h=0,b=0,p=0,E=x.length;p<E;p++){var c=x[p],l=c[0];switch(l){case"M":u=c[1],i=c[2];break;case"A":var m=d({px:h,py:b,cx:c[6],cy:c[7],rx:c[1],ry:c[2],xAxisRotation:c[3],largeArcFlag:c[4],sweepFlag:c[5]});if(!m.length)continue;for(var M=0,L;M<m.length;M++)L=m[M],c=["C",L.x1,L.y1,L.x2,L.y2,L.x,L.y],M<m.length-1&&y.push(c);break;case"S":var D=h,A=b;(v=="C"||v=="S")&&(D+=D-r,A+=A-n),c=["C",D,A,c[1],c[2],c[3],c[4]];break;case"T":v=="Q"||v=="T"?(f=h*2-f,g=b*2-g):(f=h,g=b),c=_(h,b,f,g,c[1],c[2]);break;case"Q":f=c[1],g=c[2],c=_(h,b,c[1],c[2],c[3],c[4]);break;case"L":c=a(h,b,c[1],c[2]);break;case"H":c=a(h,b,c[1],b);break;case"V":c=a(h,b,h,c[1]);break;case"Z":c=a(h,b,u,i);break}v=l,h=c[c.length-2],b=c[c.length-1],c.length>4?(r=c[c.length-4],n=c[c.length-3]):(r=h,n=b),y.push(c)}return y}function a(x,v,y,r){return["C",x,v,y,r,y,r]}function _(x,v,y,r,n,u){return["C",x/3+.6666666666666666*y,v/3+.6666666666666666*r,n/3+.6666666666666666*y,u/3+.6666666666666666*r,n,u]}},82019:function(z,B,e){var d=e(1750),P=e(95616),a=e(31457),_=e(89546),x=e(44781),v=document.createElement("canvas"),y=v.getContext("2d");z.exports=r;function r(i,f){if(!_(i))throw Error("Argument should be valid svg path string");f||(f={});var g,h;f.shape?(g=f.shape[0],h=f.shape[1]):(g=v.width=f.w||f.width||200,h=v.height=f.h||f.height||200);var b=Math.min(g,h),p=f.stroke||0,E=f.viewbox||f.viewBox||d(i),c=[g/(E[2]-E[0]),h/(E[3]-E[1])],l=Math.min(c[0]||0,c[1]||0)/2;if(y.fillStyle="black",y.fillRect(0,0,g,h),y.fillStyle="white",p&&(typeof p!="number"&&(p=1),p>0?y.strokeStyle="white":y.strokeStyle="black",y.lineWidth=Math.abs(p)),y.translate(g*.5,h*.5),y.scale(l,l),u()){var m=new Path2D(i);y.fill(m),p&&y.stroke(m)}else{var M=P(i);a(y,M),y.fill(),p&&y.stroke()}y.setTransform(1,0,0,1,0,0);var L=x(y,{cutoff:f.cutoff!=null?f.cutoff:.5,radius:f.radius!=null?f.radius:b*.5});return L}var n;function u(){if(n!=null)return n;var i=document.createElement("canvas").getContext("2d");if(i.canvas.width=i.canvas.height=1,!window.Path2D)return n=!1;var f=new Path2D("M0,0h1v1h-1v-1Z");i.fillStyle="black",i.fill(f);var g=i.getImageData(0,0,1,1);return n=g&&g.data&&g.data[3]===255}},84267:function(z,B,e){var d;(function(P){var a=/^\s+/,_=/\s+$/,x=0,v=P.round,y=P.min,r=P.max,n=P.random;function u(ne,ve){if(ne=ne||"",ve=ve||{},ne instanceof u)return ne;if(!(this instanceof u))return new u(ne,ve);var le=i(ne);this._originalInput=ne,this._r=le.r,this._g=le.g,this._b=le.b,this._a=le.a,this._roundA=v(100*this._a)/100,this._format=ve.format||le.format,this._gradientType=ve.gradientType,this._r<1&&(this._r=v(this._r)),this._g<1&&(this._g=v(this._g)),this._b<1&&(this._b=v(this._b)),this._ok=le.ok,this._tc_id=x++}u.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 ne=this.toRgb();return(ne.r*299+ne.g*587+ne.b*114)/1e3},getLuminance:function(){var ne=this.toRgb(),ve,le,xe,Se,Re,Ee;return ve=ne.r/255,le=ne.g/255,xe=ne.b/255,ve<=.03928?Se=ve/12.92:Se=P.pow((ve+.055)/1.055,2.4),le<=.03928?Re=le/12.92:Re=P.pow((le+.055)/1.055,2.4),xe<=.03928?Ee=xe/12.92:Ee=P.pow((xe+.055)/1.055,2.4),.2126*Se+.7152*Re+.0722*Ee},setAlpha:function(ne){return this._a=U(ne),this._roundA=v(100*this._a)/100,this},toHsv:function(){var ne=b(this._r,this._g,this._b);return{h:ne.h*360,s:ne.s,v:ne.v,a:this._a}},toHsvString:function(){var ne=b(this._r,this._g,this._b),ve=v(ne.h*360),le=v(ne.s*100),xe=v(ne.v*100);return this._a==1?"hsv("+ve+", "+le+"%, "+xe+"%)":"hsva("+ve+", "+le+"%, "+xe+"%, "+this._roundA+")"},toHsl:function(){var ne=g(this._r,this._g,this._b);return{h:ne.h*360,s:ne.s,l:ne.l,a:this._a}},toHslString:function(){var ne=g(this._r,this._g,this._b),ve=v(ne.h*360),le=v(ne.s*100),xe=v(ne.l*100);return this._a==1?"hsl("+ve+", "+le+"%, "+xe+"%)":"hsla("+ve+", "+le+"%, "+xe+"%, "+this._roundA+")"},toHex:function(ne){return E(this._r,this._g,this._b,ne)},toHexString:function(ne){return"#"+this.toHex(ne)},toHex8:function(ne){return c(this._r,this._g,this._b,this._a,ne)},toHex8String:function(ne){return"#"+this.toHex8(ne)},toRgb:function(){return{r:v(this._r),g:v(this._g),b:v(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+v(this._r)+", "+v(this._g)+", "+v(this._b)+")":"rgba("+v(this._r)+", "+v(this._g)+", "+v(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:v(Y(this._r,255)*100)+"%",g:v(Y(this._g,255)*100)+"%",b:v(Y(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+v(Y(this._r,255)*100)+"%, "+v(Y(this._g,255)*100)+"%, "+v(Y(this._b,255)*100)+"%)":"rgba("+v(Y(this._r,255)*100)+"%, "+v(Y(this._g,255)*100)+"%, "+v(Y(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:V[E(this._r,this._g,this._b,!0)]||!1},toFilter:function(ne){var ve="#"+l(this._r,this._g,this._b,this._a),le=ve,xe=this._gradientType?"GradientType = 1, ":"";if(ne){var Se=u(ne);le="#"+l(Se._r,Se._g,Se._b,Se._a)}return"progid:DXImageTransform.Microsoft.gradient("+xe+"startColorstr="+ve+",endColorstr="+le+")"},toString:function(ne){var ve=!!ne;ne=ne||this._format;var le=!1,xe=this._a<1&&this._a>=0,Se=!ve&&xe&&(ne==="hex"||ne==="hex6"||ne==="hex3"||ne==="hex4"||ne==="hex8"||ne==="name");return Se?ne==="name"&&this._a===0?this.toName():this.toRgbString():(ne==="rgb"&&(le=this.toRgbString()),ne==="prgb"&&(le=this.toPercentageRgbString()),(ne==="hex"||ne==="hex6")&&(le=this.toHexString()),ne==="hex3"&&(le=this.toHexString(!0)),ne==="hex4"&&(le=this.toHex8String(!0)),ne==="hex8"&&(le=this.toHex8String()),ne==="name"&&(le=this.toName()),ne==="hsl"&&(le=this.toHslString()),ne==="hsv"&&(le=this.toHsvString()),le||this.toHexString())},clone:function(){return u(this.toString())},_applyModification:function(ne,ve){var le=ne.apply(null,[this].concat([].slice.call(ve)));return this._r=le._r,this._g=le._g,this._b=le._b,this.setAlpha(le._a),this},lighten:function(){return this._applyModification(D,arguments)},brighten:function(){return this._applyModification(A,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(M,arguments)},greyscale:function(){return this._applyModification(L,arguments)},spin:function(){return this._applyModification(S,arguments)},_applyCombination:function(ne,ve){return ne.apply(null,[this].concat([].slice.call(ve)))},analogous:function(){return this._applyCombination(N,arguments)},complement:function(){return this._applyCombination(o,arguments)},monochromatic:function(){return this._applyCombination(H,arguments)},splitcomplement:function(){return this._applyCombination(O,arguments)},triad:function(){return this._applyCombination(R,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},u.fromRatio=function(ne,ve){if(typeof ne=="object"){var le={};for(var xe in ne)ne.hasOwnProperty(xe)&&(xe==="a"?le[xe]=ne[xe]:le[xe]=q(ne[xe]));ne=le}return u(ne,ve)};function i(ne){var ve={r:0,g:0,b:0},le=1,xe=null,Se=null,Re=null,Ee=!1,Oe=!1;return typeof ne=="string"&&(ne=fe(ne)),typeof ne=="object"&&(ue(ne.r)&&ue(ne.g)&&ue(ne.b)?(ve=f(ne.r,ne.g,ne.b),Ee=!0,Oe=String(ne.r).substr(-1)==="%"?"prgb":"rgb"):ue(ne.h)&&ue(ne.s)&&ue(ne.v)?(xe=q(ne.s),Se=q(ne.v),ve=p(ne.h,xe,Se),Ee=!0,Oe="hsv"):ue(ne.h)&&ue(ne.s)&&ue(ne.l)&&(xe=q(ne.s),Re=q(ne.l),ve=h(ne.h,xe,Re),Ee=!0,Oe="hsl"),ne.hasOwnProperty("a")&&(le=ne.a)),le=U(le),{ok:Ee,format:ne.format||Oe,r:y(255,r(ve.r,0)),g:y(255,r(ve.g,0)),b:y(255,r(ve.b,0)),a:le}}function f(ne,ve,le){return{r:Y(ne,255)*255,g:Y(ve,255)*255,b:Y(le,255)*255}}function g(ne,ve,le){ne=Y(ne,255),ve=Y(ve,255),le=Y(le,255);var xe=r(ne,ve,le),Se=y(ne,ve,le),Re,Ee,Oe=(xe+Se)/2;if(xe==Se)Re=Ee=0;else{var Be=xe-Se;switch(Ee=Oe>.5?Be/(2-xe-Se):Be/(xe+Se),xe){case ne:Re=(ve-le)/Be+(ve<le?6:0);break;case ve:Re=(le-ne)/Be+2;break;case le:Re=(ne-ve)/Be+4;break}Re/=6}return{h:Re,s:Ee,l:Oe}}function h(ne,ve,le){var xe,Se,Re;ne=Y(ne,360),ve=Y(ve,100),le=Y(le,100);function Ee(Le,Te,De){return De<0&&(De+=1),De>1&&(De-=1),De<.16666666666666666?Le+(Te-Le)*6*De:De<.5?Te:De<.6666666666666666?Le+(Te-Le)*(.6666666666666666-De)*6:Le}if(ve===0)xe=Se=Re=le;else{var Oe=le<.5?le*(1+ve):le+ve-le*ve,Be=2*le-Oe;xe=Ee(Be,Oe,ne+.3333333333333333),Se=Ee(Be,Oe,ne),Re=Ee(Be,Oe,ne-.3333333333333333)}return{r:xe*255,g:Se*255,b:Re*255}}function b(ne,ve,le){ne=Y(ne,255),ve=Y(ve,255),le=Y(le,255);var xe=r(ne,ve,le),Se=y(ne,ve,le),Re,Ee,Oe=xe,Be=xe-Se;if(Ee=xe===0?0:Be/xe,xe==Se)Re=0;else{switch(xe){case ne:Re=(ve-le)/Be+(ve<le?6:0);break;case ve:Re=(le-ne)/Be+2;break;case le:Re=(ne-ve)/Be+4;break}Re/=6}return{h:Re,s:Ee,v:Oe}}function p(ne,ve,le){ne=Y(ne,360)*6,ve=Y(ve,100),le=Y(le,100);var xe=P.floor(ne),Se=ne-xe,Re=le*(1-ve),Ee=le*(1-Se*ve),Oe=le*(1-(1-Se)*ve),Be=xe%6,Le=[le,Ee,Re,Re,Oe,le][Be],Te=[Oe,le,le,Ee,Re,Re][Be],De=[Re,Re,Oe,le,le,Ee][Be];return{r:Le*255,g:Te*255,b:De*255}}function E(ne,ve,le,xe){var Se=[ce(v(ne).toString(16)),ce(v(ve).toString(16)),ce(v(le).toString(16))];return xe&&Se[0].charAt(0)==Se[0].charAt(1)&&Se[1].charAt(0)==Se[1].charAt(1)&&Se[2].charAt(0)==Se[2].charAt(1)?Se[0].charAt(0)+Se[1].charAt(0)+Se[2].charAt(0):Se.join("")}function c(ne,ve,le,xe,Se){var Re=[ce(v(ne).toString(16)),ce(v(ve).toString(16)),ce(v(le).toString(16)),ce(j(xe))];return Se&&Re[0].charAt(0)==Re[0].charAt(1)&&Re[1].charAt(0)==Re[1].charAt(1)&&Re[2].charAt(0)==Re[2].charAt(1)&&Re[3].charAt(0)==Re[3].charAt(1)?Re[0].charAt(0)+Re[1].charAt(0)+Re[2].charAt(0)+Re[3].charAt(0):Re.join("")}function l(ne,ve,le,xe){var Se=[ce(j(xe)),ce(v(ne).toString(16)),ce(v(ve).toString(16)),ce(v(le).toString(16))];return Se.join("")}u.equals=function(ne,ve){return!ne||!ve?!1:u(ne).toRgbString()==u(ve).toRgbString()},u.random=function(){return u.fromRatio({r:n(),g:n(),b:n()})};function m(ne,ve){ve=ve===0?0:ve||10;var le=u(ne).toHsl();return le.s-=ve/100,le.s=ee(le.s),u(le)}function M(ne,ve){ve=ve===0?0:ve||10;var le=u(ne).toHsl();return le.s+=ve/100,le.s=ee(le.s),u(le)}function L(ne){return u(ne).desaturate(100)}function D(ne,ve){ve=ve===0?0:ve||10;var le=u(ne).toHsl();return le.l+=ve/100,le.l=ee(le.l),u(le)}function A(ne,ve){ve=ve===0?0:ve||10;var le=u(ne).toRgb();return le.r=r(0,y(255,le.r-v(255*-(ve/100)))),le.g=r(0,y(255,le.g-v(255*-(ve/100)))),le.b=r(0,y(255,le.b-v(255*-(ve/100)))),u(le)}function C(ne,ve){ve=ve===0?0:ve||10;var le=u(ne).toHsl();return le.l-=ve/100,le.l=ee(le.l),u(le)}function S(ne,ve){var le=u(ne).toHsl(),xe=(le.h+ve)%360;return le.h=xe<0?360+xe:xe,u(le)}function o(ne){var ve=u(ne).toHsl();return ve.h=(ve.h+180)%360,u(ve)}function R(ne){var ve=u(ne).toHsl(),le=ve.h;return[u(ne),u({h:(le+120)%360,s:ve.s,l:ve.l}),u({h:(le+240)%360,s:ve.s,l:ve.l})]}function T(ne){var ve=u(ne).toHsl(),le=ve.h;return[u(ne),u({h:(le+90)%360,s:ve.s,l:ve.l}),u({h:(le+180)%360,s:ve.s,l:ve.l}),u({h:(le+270)%360,s:ve.s,l:ve.l})]}function O(ne){var ve=u(ne).toHsl(),le=ve.h;return[u(ne),u({h:(le+72)%360,s:ve.s,l:ve.l}),u({h:(le+216)%360,s:ve.s,l:ve.l})]}function N(ne,ve,le){ve=ve||6,le=le||30;var xe=u(ne).toHsl(),Se=360/le,Re=[u(ne)];for(xe.h=(xe.h-(Se*ve>>1)+720)%360;--ve;)xe.h=(xe.h+Se)%360,Re.push(u(xe));return Re}function H(ne,ve){ve=ve||6;for(var le=u(ne).toHsv(),xe=le.h,Se=le.s,Re=le.v,Ee=[],Oe=1/ve;ve--;)Ee.push(u({h:xe,s:Se,v:Re})),Re=(Re+Oe)%1;return Ee}u.mix=function(ne,ve,le){le=le===0?0:le||50;var xe=u(ne).toRgb(),Se=u(ve).toRgb(),Re=le/100,Ee={r:(Se.r-xe.r)*Re+xe.r,g:(Se.g-xe.g)*Re+xe.g,b:(Se.b-xe.b)*Re+xe.b,a:(Se.a-xe.a)*Re+xe.a};return u(Ee)},u.readability=function(ne,ve){var le=u(ne),xe=u(ve);return(P.max(le.getLuminance(),xe.getLuminance())+.05)/(P.min(le.getLuminance(),xe.getLuminance())+.05)},u.isReadable=function(ne,ve,le){var xe=u.readability(ne,ve),Se,Re;switch(Re=!1,Se=te(le),Se.level+Se.size){case"AAsmall":case"AAAlarge":Re=xe>=4.5;break;case"AAlarge":Re=xe>=3;break;case"AAAsmall":Re=xe>=7;break}return Re},u.mostReadable=function(ne,ve,le){var xe=null,Se=0,Re,Ee,Oe,Be;le=le||{},Ee=le.includeFallbackColors,Oe=le.level,Be=le.size;for(var Le=0;Le<ve.length;Le++)Re=u.readability(ne,ve[Le]),Re>Se&&(Se=Re,xe=u(ve[Le]));return u.isReadable(ne,xe,{level:Oe,size:Be})||!Ee?xe:(le.includeFallbackColors=!1,u.mostReadable(ne,["#fff","#000"],le))};var k=u.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"},V=u.hexNames=G(k);function G(ne){var ve={};for(var le in ne)ne.hasOwnProperty(le)&&(ve[ne[le]]=le);return ve}function U(ne){return ne=parseFloat(ne),(isNaN(ne)||ne<0||ne>1)&&(ne=1),ne}function Y(ne,ve){ie(ne)&&(ne="100%");var le=se(ne);return ne=y(ve,r(0,parseFloat(ne))),le&&(ne=parseInt(ne*ve,10)/100),P.abs(ne-ve)<1e-6?1:ne%ve/parseFloat(ve)}function ee(ne){return y(1,r(0,ne))}function re(ne){return parseInt(ne,16)}function ie(ne){return typeof ne=="string"&&ne.indexOf(".")!=-1&&parseFloat(ne)===1}function se(ne){return typeof ne=="string"&&ne.indexOf("%")!=-1}function ce(ne){return ne.length==1?"0"+ne:""+ne}function q(ne){return ne<=1&&(ne=ne*100+"%"),ne}function j(ne){return P.round(parseFloat(ne)*255).toString(16)}function Z(ne){return re(ne)/255}var Q=function(){var ne="[-\\+]?\\d+%?",ve="[-\\+]?\\d*\\.\\d+%?",le="(?:"+ve+")|(?:"+ne+")",xe="[\\s|\\(]+("+le+")[,|\\s]+("+le+")[,|\\s]+("+le+")\\s*\\)?",Se="[\\s|\\(]+("+le+")[,|\\s]+("+le+")[,|\\s]+("+le+")[,|\\s]+("+le+")\\s*\\)?";return{CSS_UNIT:new RegExp(le),rgb:new RegExp("rgb"+xe),rgba:new RegExp("rgba"+Se),hsl:new RegExp("hsl"+xe),hsla:new RegExp("hsla"+Se),hsv:new RegExp("hsv"+xe),hsva:new RegExp("hsva"+Se),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 ue(ne){return!!Q.CSS_UNIT.exec(ne)}function fe(ne){ne=ne.replace(a,"").replace(_,"").toLowerCase();var ve=!1;if(k[ne])ne=k[ne],ve=!0;else if(ne=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var le;return(le=Q.rgb.exec(ne))?{r:le[1],g:le[2],b:le[3]}:(le=Q.rgba.exec(ne))?{r:le[1],g:le[2],b:le[3],a:le[4]}:(le=Q.hsl.exec(ne))?{h:le[1],s:le[2],l:le[3]}:(le=Q.hsla.exec(ne))?{h:le[1],s:le[2],l:le[3],a:le[4]}:(le=Q.hsv.exec(ne))?{h:le[1],s:le[2],v:le[3]}:(le=Q.hsva.exec(ne))?{h:le[1],s:le[2],v:le[3],a:le[4]}:(le=Q.hex8.exec(ne))?{r:re(le[1]),g:re(le[2]),b:re(le[3]),a:Z(le[4]),format:ve?"name":"hex8"}:(le=Q.hex6.exec(ne))?{r:re(le[1]),g:re(le[2]),b:re(le[3]),format:ve?"name":"hex"}:(le=Q.hex4.exec(ne))?{r:re(le[1]+""+le[1]),g:re(le[2]+""+le[2]),b:re(le[3]+""+le[3]),a:Z(le[4]+""+le[4]),format:ve?"name":"hex8"}:(le=Q.hex3.exec(ne))?{r:re(le[1]+""+le[1]),g:re(le[2]+""+le[2]),b:re(le[3]+""+le[3]),format:ve?"name":"hex"}:!1}function te(ne){var ve,le;return ne=ne||{level:"AA",size:"small"},ve=(ne.level||"AA").toUpperCase(),le=(ne.size||"small").toLowerCase(),ve!=="AA"&&ve!=="AAA"&&(ve="AA"),le!=="small"&&le!=="large"&&(le="small"),{level:ve,size:le}}z.exports?z.exports=u:(d=function(){return u}.call(B,e,B,z),d!==void 0&&(z.exports=d))})(Math)},57060:function(z){z.exports=d,z.exports.float32=z.exports.float=d,z.exports.fract32=z.exports.fract=e;var B=new Float32Array(1);function e(P,a){if(P.length){if(P instanceof Float32Array)return new Float32Array(P.length);a instanceof Float32Array||(a=d(P));for(var _=0,x=a.length;_<x;_++)a[_]=P[_]-a[_];return a}return d(P-d(P))}function d(P){return P.length?P instanceof Float32Array?P:new Float32Array(P):(B[0]=P,B[0])}},75686:function(z,B,e){var d=e(25677);z.exports=x;var P=96;function a(v,y){var r=d(getComputedStyle(v).getPropertyValue(y));return r[0]*x(r[1],v)}function _(v,y){var r=document.createElement("div");r.style["font-size"]="128"+v,y.appendChild(r);var n=a(r,"font-size")/128;return y.removeChild(r),n}function x(v,y){switch(y=y||document.body,v=(v||"px").trim().toLowerCase(),(y===window||y===document)&&(y=document.body),v){case"%":return y.clientHeight/100;case"ch":case"ex":return _(v,y);case"em":return a(y,"font-size");case"rem":return a(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 P;case"cm":return P/2.54;case"mm":return P/25.4;case"pt":return P/72;case"pc":return P/6}return 1}},96892:function(z,B,e){e.d(B,{zL:function(){return _}});function d(y,r){for(var n,u=y.length,i=u-r;i<--u;)n=y[i],y[i++]=y[u],y[u]=n}function P(y){return y}function a(y){if(y==null)return P;var r,n,u=y.scale[0],i=y.scale[1],f=y.translate[0],g=y.translate[1];return function(h,b){b||(r=n=0);var p=2,E=h.length,c=new Array(E);for(c[0]=(r+=h[0])*u+f,c[1]=(n+=h[1])*i+g;p<E;)c[p]=h[p],++p;return c}}function _(y,r){return typeof r=="string"&&(r=y.objects[r]),r.type==="GeometryCollection"?{type:"FeatureCollection",features:r.geometries.map(function(n){return x(y,n)})}:x(y,r)}function x(y,r){var n=r.id,u=r.bbox,i=r.properties==null?{}:r.properties,f=v(y,r);return n==null&&u==null?{type:"Feature",properties:i,geometry:f}:u==null?{type:"Feature",id:n,properties:i,geometry:f}:{type:"Feature",id:n,bbox:u,properties:i,geometry:f}}function v(y,r){var n=a(y.transform),u=y.arcs;function i(E,c){c.length&&c.pop();for(var l=u[E<0?~E:E],m=0,M=l.length;m<M;++m)c.push(n(l[m],m));E<0&&d(c,M)}function f(E){return n(E)}function g(E){for(var c=[],l=0,m=E.length;l<m;++l)i(E[l],c);return c.length<2&&c.push(c[0]),c}function h(E){for(var c=g(E);c.length<4;)c.push(c[0]);return c}function b(E){return E.map(h)}function p(E){var c=E.type,l;switch(c){case"GeometryCollection":return{type:c,geometries:E.geometries.map(p)};case"Point":l=f(E.coordinates);break;case"MultiPoint":l=E.coordinates.map(f);break;case"LineString":l=g(E.arcs);break;case"MultiLineString":l=E.arcs.map(g);break;case"Polygon":l=b(E.arcs);break;case"MultiPolygon":l=E.arcs.map(b);break;default:return null}return{type:c,coordinates:l}}return p(r)}},73116:function(z,B,e){var d=e(24511);z.exports=function(P){if(typeof P!="function"||!hasOwnProperty.call(P,"length"))return!1;try{if(typeof P.length!="number"||typeof P.call!="function"||typeof P.apply!="function")return!1}catch{return!1}return!d(P)}},69190:function(z,B,e){var d=e(24582),P=e(47403),a=e(9234),_=e(6048),x=function(v,y){return v.replace("%v",_(y))};z.exports=function(v,y,r){if(!P(r))throw new TypeError(x(y,v));if(!d(v)){if("default"in r)return r.default;if(r.isOptional)return null}var n=a(r.errorMessage);throw d(n)||(n=y),new TypeError(x(n,v))}},18497:function(z){z.exports=function(B){try{return B.toString()}catch{try{return String(B)}catch{return null}}}},6048:function(z,B,e){var d=e(18497),P=/[\n\r\u2028\u2029]/g;z.exports=function(a){var _=d(a);return _===null?"<Non-coercible to string value>":(_.length>100&&(_=_.slice(0,99)+"…"),_=_.replace(P,function(x){switch(x){case`
`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),_)}},47403:function(z,B,e){var d=e(24582),P={object:!0,function:!0,undefined:!0};z.exports=function(a){return d(a)?hasOwnProperty.call(P,typeof a):!1}},82527:function(z,B,e){var d=e(69190),P=e(84985);z.exports=function(a){return P(a)?a:d(a,"%v is not a plain function",arguments[1])}},84985:function(z,B,e){var d=e(73116),P=/^\s*class[\s{/}]/,a=Function.prototype.toString;z.exports=function(_){return!(!d(_)||P.test(a.call(_)))}},24511:function(z,B,e){var d=e(47403);z.exports=function(P){if(!d(P))return!1;try{return P.constructor?P.constructor.prototype===P:!1}catch{return!1}}},9234:function(z,B,e){var d=e(24582),P=e(47403),a=Object.prototype.toString;z.exports=function(_){if(!d(_))return null;if(P(_)){var x=_.toString;if(typeof x!="function"||x===a)return null}try{return""+_}catch{return null}}},10424:function(z,B,e){var d=e(69190),P=e(24582);z.exports=function(a){return P(a)?a:d(a,"Cannot use %v",arguments[1])}},24582:function(z){var B=void 0;z.exports=function(e){return e!==B&&e!==null}},58404:function(z,B,e){var d=e(13547),P=e(12129),a=e(12856).Buffer;e.g.__TYPEDARRAY_POOL||(e.g.__TYPEDARRAY_POOL={UINT8:P([32,0]),UINT16:P([32,0]),UINT32:P([32,0]),BIGUINT64:P([32,0]),INT8:P([32,0]),INT16:P([32,0]),INT32:P([32,0]),BIGINT64:P([32,0]),FLOAT:P([32,0]),DOUBLE:P([32,0]),DATA:P([32,0]),UINT8C:P([32,0]),BUFFER:P([32,0])});var _=typeof Uint8ClampedArray<"u",x=typeof BigUint64Array<"u",v=typeof BigInt64Array<"u",y=e.g.__TYPEDARRAY_POOL;y.UINT8C||(y.UINT8C=P([32,0])),y.BIGUINT64||(y.BIGUINT64=P([32,0])),y.BIGINT64||(y.BIGINT64=P([32,0])),y.BUFFER||(y.BUFFER=P([32,0]));var r=y.DATA,n=y.BUFFER;B.free=function(o){if(a.isBuffer(o))n[d.log2(o.length)].push(o);else{if(Object.prototype.toString.call(o)!=="[object ArrayBuffer]"&&(o=o.buffer),!o)return;var R=o.length||o.byteLength,T=d.log2(R)|0;r[T].push(o)}};function u(S){if(S){var o=S.length||S.byteLength,R=d.log2(o);r[R].push(S)}}function i(S){u(S.buffer)}B.freeUint8=B.freeUint16=B.freeUint32=B.freeBigUint64=B.freeInt8=B.freeInt16=B.freeInt32=B.freeBigInt64=B.freeFloat32=B.freeFloat=B.freeFloat64=B.freeDouble=B.freeUint8Clamped=B.freeDataView=i,B.freeArrayBuffer=u,B.freeBuffer=function(o){n[d.log2(o.length)].push(o)},B.malloc=function(o,R){if(R===void 0||R==="arraybuffer")return f(o);switch(R){case"uint8":return g(o);case"uint16":return h(o);case"uint32":return b(o);case"int8":return p(o);case"int16":return E(o);case"int32":return c(o);case"float":case"float32":return l(o);case"double":case"float64":return m(o);case"uint8_clamped":return M(o);case"bigint64":return D(o);case"biguint64":return L(o);case"buffer":return C(o);case"data":case"dataview":return A(o);default:return null}return null};function f(o){var o=d.nextPow2(o),R=d.log2(o),T=r[R];return T.length>0?T.pop():new ArrayBuffer(o)}B.mallocArrayBuffer=f;function g(S){return new Uint8Array(f(S),0,S)}B.mallocUint8=g;function h(S){return new Uint16Array(f(2*S),0,S)}B.mallocUint16=h;function b(S){return new Uint32Array(f(4*S),0,S)}B.mallocUint32=b;function p(S){return new Int8Array(f(S),0,S)}B.mallocInt8=p;function E(S){return new Int16Array(f(2*S),0,S)}B.mallocInt16=E;function c(S){return new Int32Array(f(4*S),0,S)}B.mallocInt32=c;function l(S){return new Float32Array(f(4*S),0,S)}B.mallocFloat32=B.mallocFloat=l;function m(S){return new Float64Array(f(8*S),0,S)}B.mallocFloat64=B.mallocDouble=m;function M(S){return _?new Uint8ClampedArray(f(S),0,S):g(S)}B.mallocUint8Clamped=M;function L(S){return x?new BigUint64Array(f(8*S),0,S):null}B.mallocBigUint64=L;function D(S){return v?new BigInt64Array(f(8*S),0,S):null}B.mallocBigInt64=D;function A(S){return new DataView(f(S),0,S)}B.mallocDataView=A;function C(S){S=d.nextPow2(S);var o=d.log2(S),R=n[o];return R.length>0?R.pop():new a(S)}B.mallocBuffer=C,B.clearCache=function(){for(var o=0;o<32;++o)y.UINT8[o].length=0,y.UINT16[o].length=0,y.UINT32[o].length=0,y.INT8[o].length=0,y.INT16[o].length=0,y.INT32[o].length=0,y.FLOAT[o].length=0,y.DOUBLE[o].length=0,y.BIGUINT64[o].length=0,y.BIGINT64[o].length=0,y.UINT8C[o].length=0,r[o].length=0,n[o].length=0}},90448:function(z){var B=/[\'\"]/;z.exports=function(d){return d?(B.test(d.charAt(0))&&(d=d.substr(1)),B.test(d.charAt(d.length-1))&&(d=d.substr(0,d.length-1)),d):""}},93447:function(z){z.exports=function(e,d,P){Array.isArray(P)||(P=[].slice.call(arguments,2));for(var a=0,_=P.length;a<_;a++){var x=P[a];for(var v in x)if(!(d[v]!==void 0&&!Array.isArray(d[v])&&e[v]===d[v])&&v in d){var y;if(x[v]===!0)y=d[v];else{if(x[v]===!1)continue;if(typeof x[v]=="function"&&(y=x[v](d[v],e,d),y===void 0))continue}e[v]=y}}return e}},20588:function(z,B,e){z.exports=d;function d(a,_){if(P("noDeprecation"))return a;var x=!1;function v(){if(!x){if(P("throwDeprecation"))throw new Error(_);P("traceDeprecation")?console.trace(_):console.warn(_),x=!0}return a.apply(this,arguments)}return v}function P(a){try{if(!e.g.localStorage)return!1}catch{return!1}var _=e.g.localStorage[a];return _==null?!1:String(_).toLowerCase()==="true"}},45920:function(z){z.exports=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}},4936:function(z,B,e){var d=e(47216),P=e(65481),a=e(21099),_=e(9187);function x(Re){return Re.call.bind(Re)}var v=typeof BigInt<"u",y=typeof Symbol<"u",r=x(Object.prototype.toString),n=x(Number.prototype.valueOf),u=x(String.prototype.valueOf),i=x(Boolean.prototype.valueOf);if(v)var f=x(BigInt.prototype.valueOf);if(y)var g=x(Symbol.prototype.valueOf);function h(Re,Ee){if(typeof Re!="object")return!1;try{return Ee(Re),!0}catch{return!1}}B.isArgumentsObject=d,B.isGeneratorFunction=P,B.isTypedArray=_;function b(Re){return typeof Promise<"u"&&Re instanceof Promise||Re!==null&&typeof Re=="object"&&typeof Re.then=="function"&&typeof Re.catch=="function"}B.isPromise=b;function p(Re){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Re):_(Re)||re(Re)}B.isArrayBufferView=p;function E(Re){return a(Re)==="Uint8Array"}B.isUint8Array=E;function c(Re){return a(Re)==="Uint8ClampedArray"}B.isUint8ClampedArray=c;function l(Re){return a(Re)==="Uint16Array"}B.isUint16Array=l;function m(Re){return a(Re)==="Uint32Array"}B.isUint32Array=m;function M(Re){return a(Re)==="Int8Array"}B.isInt8Array=M;function L(Re){return a(Re)==="Int16Array"}B.isInt16Array=L;function D(Re){return a(Re)==="Int32Array"}B.isInt32Array=D;function A(Re){return a(Re)==="Float32Array"}B.isFloat32Array=A;function C(Re){return a(Re)==="Float64Array"}B.isFloat64Array=C;function S(Re){return a(Re)==="BigInt64Array"}B.isBigInt64Array=S;function o(Re){return a(Re)==="BigUint64Array"}B.isBigUint64Array=o;function R(Re){return r(Re)==="[object Map]"}R.working=typeof Map<"u"&&R(new Map);function T(Re){return typeof Map>"u"?!1:R.working?R(Re):Re instanceof Map}B.isMap=T;function O(Re){return r(Re)==="[object Set]"}O.working=typeof Set<"u"&&O(new Set);function N(Re){return typeof Set>"u"?!1:O.working?O(Re):Re instanceof Set}B.isSet=N;function H(Re){return r(Re)==="[object WeakMap]"}H.working=typeof WeakMap<"u"&&H(new WeakMap);function k(Re){return typeof WeakMap>"u"?!1:H.working?H(Re):Re instanceof WeakMap}B.isWeakMap=k;function V(Re){return r(Re)==="[object WeakSet]"}V.working=typeof WeakSet<"u"&&V(new WeakSet);function G(Re){return V(Re)}B.isWeakSet=G;function U(Re){return r(Re)==="[object ArrayBuffer]"}U.working=typeof ArrayBuffer<"u"&&U(new ArrayBuffer);function Y(Re){return typeof ArrayBuffer>"u"?!1:U.working?U(Re):Re instanceof ArrayBuffer}B.isArrayBuffer=Y;function ee(Re){return r(Re)==="[object DataView]"}ee.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&ee(new DataView(new ArrayBuffer(1),0,1));function re(Re){return typeof DataView>"u"?!1:ee.working?ee(Re):Re instanceof DataView}B.isDataView=re;var ie=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function se(Re){return r(Re)==="[object SharedArrayBuffer]"}function ce(Re){return typeof ie>"u"?!1:(typeof se.working>"u"&&(se.working=se(new ie)),se.working?se(Re):Re instanceof ie)}B.isSharedArrayBuffer=ce;function q(Re){return r(Re)==="[object AsyncFunction]"}B.isAsyncFunction=q;function j(Re){return r(Re)==="[object Map Iterator]"}B.isMapIterator=j;function Z(Re){return r(Re)==="[object Set Iterator]"}B.isSetIterator=Z;function Q(Re){return r(Re)==="[object Generator]"}B.isGeneratorObject=Q;function ue(Re){return r(Re)==="[object WebAssembly.Module]"}B.isWebAssemblyCompiledModule=ue;function fe(Re){return h(Re,n)}B.isNumberObject=fe;function te(Re){return h(Re,u)}B.isStringObject=te;function ne(Re){return h(Re,i)}B.isBooleanObject=ne;function ve(Re){return v&&h(Re,f)}B.isBigIntObject=ve;function le(Re){return y&&h(Re,g)}B.isSymbolObject=le;function xe(Re){return fe(Re)||te(Re)||ne(Re)||ve(Re)||le(Re)}B.isBoxedPrimitive=xe;function Se(Re){return typeof Uint8Array<"u"&&(Y(Re)||ce(Re))}B.isAnyArrayBuffer=Se,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Re){Object.defineProperty(B,Re,{enumerable:!1,value:function(){throw new Error(Re+" is not supported in userland")}})})},43827:function(z,B,e){var d=e(90386),P=Object.getOwnPropertyDescriptors||function(ie){for(var se=Object.keys(ie),ce={},q=0;q<se.length;q++)ce[se[q]]=Object.getOwnPropertyDescriptor(ie,se[q]);return ce},a=/%[sdj%]/g;B.format=function(re){if(!L(re)){for(var ie=[],se=0;se<arguments.length;se++)ie.push(y(arguments[se]));return ie.join(" ")}for(var se=1,ce=arguments,q=ce.length,j=String(re).replace(a,function(Q){if(Q==="%%")return"%";if(se>=q)return Q;switch(Q){case"%s":return String(ce[se++]);case"%d":return Number(ce[se++]);case"%j":try{return JSON.stringify(ce[se++])}catch{return"[Circular]"}default:return Q}}),Z=ce[se];se<q;Z=ce[++se])l(Z)||!S(Z)?j+=" "+Z:j+=" "+y(Z);return j},B.deprecate=function(re,ie){if(typeof d<"u"&&d.noDeprecation===!0)return re;if(typeof d>"u")return function(){return B.deprecate(re,ie).apply(this,arguments)};var se=!1;function ce(){if(!se){if(d.throwDeprecation)throw new Error(ie);d.traceDeprecation?console.trace(ie):console.error(ie),se=!0}return re.apply(this,arguments)}return ce};var _={},x=/^$/;if({}.NODE_DEBUG){var v={}.NODE_DEBUG;v=v.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),x=new RegExp("^"+v+"$","i")}B.debuglog=function(re){if(re=re.toUpperCase(),!_[re])if(x.test(re)){var ie=d.pid;_[re]=function(){var se=B.format.apply(B,arguments);console.error("%s %d: %s",re,ie,se)}}else _[re]=function(){};return _[re]};function y(re,ie){var se={seen:[],stylize:n};return arguments.length>=3&&(se.depth=arguments[2]),arguments.length>=4&&(se.colors=arguments[3]),c(ie)?se.showHidden=ie:ie&&B._extend(se,ie),A(se.showHidden)&&(se.showHidden=!1),A(se.depth)&&(se.depth=2),A(se.colors)&&(se.colors=!1),A(se.customInspect)&&(se.customInspect=!0),se.colors&&(se.stylize=r),i(se,re,se.depth)}B.inspect=y,y.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]},y.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function r(re,ie){var se=y.styles[ie];return se?"\x1B["+y.colors[se][0]+"m"+re+"\x1B["+y.colors[se][1]+"m":re}function n(re,ie){return re}function u(re){var ie={};return re.forEach(function(se,ce){ie[se]=!0}),ie}function i(re,ie,se){if(re.customInspect&&ie&&T(ie.inspect)&&ie.inspect!==B.inspect&&!(ie.constructor&&ie.constructor.prototype===ie)){var ce=ie.inspect(se,re);return L(ce)||(ce=i(re,ce,se)),ce}var q=f(re,ie);if(q)return q;var j=Object.keys(ie),Z=u(j);if(re.showHidden&&(j=Object.getOwnPropertyNames(ie)),R(ie)&&(j.indexOf("message")>=0||j.indexOf("description")>=0))return g(ie);if(j.length===0){if(T(ie)){var Q=ie.name?": "+ie.name:"";return re.stylize("[Function"+Q+"]","special")}if(C(ie))return re.stylize(RegExp.prototype.toString.call(ie),"regexp");if(o(ie))return re.stylize(Date.prototype.toString.call(ie),"date");if(R(ie))return g(ie)}var ue="",fe=!1,te=["{","}"];if(E(ie)&&(fe=!0,te=["[","]"]),T(ie)){var ne=ie.name?": "+ie.name:"";ue=" [Function"+ne+"]"}if(C(ie)&&(ue=" "+RegExp.prototype.toString.call(ie)),o(ie)&&(ue=" "+Date.prototype.toUTCString.call(ie)),R(ie)&&(ue=" "+g(ie)),j.length===0&&(!fe||ie.length==0))return te[0]+ue+te[1];if(se<0)return C(ie)?re.stylize(RegExp.prototype.toString.call(ie),"regexp"):re.stylize("[Object]","special");re.seen.push(ie);var ve;return fe?ve=h(re,ie,se,Z,j):ve=j.map(function(le){return b(re,ie,se,Z,le,fe)}),re.seen.pop(),p(ve,ue,te)}function f(re,ie){if(A(ie))return re.stylize("undefined","undefined");if(L(ie)){var se="'"+JSON.stringify(ie).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return re.stylize(se,"string")}if(M(ie))return re.stylize(""+ie,"number");if(c(ie))return re.stylize(""+ie,"boolean");if(l(ie))return re.stylize("null","null")}function g(re){return"["+Error.prototype.toString.call(re)+"]"}function h(re,ie,se,ce,q){for(var j=[],Z=0,Q=ie.length;Z<Q;++Z)G(ie,String(Z))?j.push(b(re,ie,se,ce,String(Z),!0)):j.push("");return q.forEach(function(ue){ue.match(/^\d+$/)||j.push(b(re,ie,se,ce,ue,!0))}),j}function b(re,ie,se,ce,q,j){var Z,Q,ue;if(ue=Object.getOwnPropertyDescriptor(ie,q)||{value:ie[q]},ue.get?ue.set?Q=re.stylize("[Getter/Setter]","special"):Q=re.stylize("[Getter]","special"):ue.set&&(Q=re.stylize("[Setter]","special")),G(ce,q)||(Z="["+q+"]"),Q||(re.seen.indexOf(ue.value)<0?(l(se)?Q=i(re,ue.value,null):Q=i(re,ue.value,se-1),Q.indexOf(`
`)>-1&&(j?Q=Q.split(`
`).map(function(fe){return" "+fe}).join(`
`).slice(2):Q=`
`+Q.split(`
`).map(function(fe){return" "+fe}).join(`
`))):Q=re.stylize("[Circular]","special")),A(Z)){if(j&&q.match(/^\d+$/))return Q;Z=JSON.stringify(""+q),Z.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Z=Z.slice(1,-1),Z=re.stylize(Z,"name")):(Z=Z.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Z=re.stylize(Z,"string"))}return Z+": "+Q}function p(re,ie,se){var ce=re.reduce(function(q,j){return j.indexOf(`
`)>=0,q+j.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ce>60?se[0]+(ie===""?"":ie+`
`)+" "+re.join(`,
`)+" "+se[1]:se[0]+ie+" "+re.join(", ")+" "+se[1]}B.types=e(4936);function E(re){return Array.isArray(re)}B.isArray=E;function c(re){return typeof re=="boolean"}B.isBoolean=c;function l(re){return re===null}B.isNull=l;function m(re){return re==null}B.isNullOrUndefined=m;function M(re){return typeof re=="number"}B.isNumber=M;function L(re){return typeof re=="string"}B.isString=L;function D(re){return typeof re=="symbol"}B.isSymbol=D;function A(re){return re===void 0}B.isUndefined=A;function C(re){return S(re)&&N(re)==="[object RegExp]"}B.isRegExp=C,B.types.isRegExp=C;function S(re){return typeof re=="object"&&re!==null}B.isObject=S;function o(re){return S(re)&&N(re)==="[object Date]"}B.isDate=o,B.types.isDate=o;function R(re){return S(re)&&(N(re)==="[object Error]"||re instanceof Error)}B.isError=R,B.types.isNativeError=R;function T(re){return typeof re=="function"}B.isFunction=T;function O(re){return re===null||typeof re=="boolean"||typeof re=="number"||typeof re=="string"||typeof re=="symbol"||typeof re>"u"}B.isPrimitive=O,B.isBuffer=e(45920);function N(re){return Object.prototype.toString.call(re)}function H(re){return re<10?"0"+re.toString(10):re.toString(10)}var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function V(){var re=new Date,ie=[H(re.getHours()),H(re.getMinutes()),H(re.getSeconds())].join(":");return[re.getDate(),k[re.getMonth()],ie].join(" ")}B.log=function(){console.log("%s - %s",V(),B.format.apply(B,arguments))},B.inherits=e(42018),B._extend=function(re,ie){if(!ie||!S(ie))return re;for(var se=Object.keys(ie),ce=se.length;ce--;)re[se[ce]]=ie[se[ce]];return re};function G(re,ie){return Object.prototype.hasOwnProperty.call(re,ie)}var U=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;B.promisify=function(ie){if(typeof ie!="function")throw new TypeError('The "original" argument must be of type Function');if(U&&ie[U]){var se=ie[U];if(typeof se!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(se,U,{value:se,enumerable:!1,writable:!1,configurable:!0}),se}function se(){for(var ce,q,j=new Promise(function(ue,fe){ce=ue,q=fe}),Z=[],Q=0;Q<arguments.length;Q++)Z.push(arguments[Q]);Z.push(function(ue,fe){ue?q(ue):ce(fe)});try{ie.apply(this,Z)}catch(ue){q(ue)}return j}return Object.setPrototypeOf(se,Object.getPrototypeOf(ie)),U&&Object.defineProperty(se,U,{value:se,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(se,P(ie))},B.promisify.custom=U;function Y(re,ie){if(!re){var se=new Error("Promise was rejected with a falsy value");se.reason=re,re=se}return ie(re)}function ee(re){if(typeof re!="function")throw new TypeError('The "original" argument must be of type Function');function ie(){for(var se=[],ce=0;ce<arguments.length;ce++)se.push(arguments[ce]);var q=se.pop();if(typeof q!="function")throw new TypeError("The last argument must be of type Function");var j=this,Z=function(){return q.apply(j,arguments)};re.apply(this,se).then(function(Q){d.nextTick(Z.bind(null,null,Q))},function(Q){d.nextTick(Y.bind(null,Q,Z))})}return Object.setPrototypeOf(ie,Object.getPrototypeOf(re)),Object.defineProperties(ie,P(re)),ie}B.callbackify=ee},40372:function(z,B,e){var d=e(86249);z.exports=function(a){return d("webgl",a)}},21099:function(z,B,e){var d=e(86165),P=e(72077),a=e(92978),_=a("Object.prototype.toString"),x=e(57877)(),v=x&&typeof Symbol.toStringTag=="symbol",y=P(),r=a("String.prototype.slice"),n={},u=e(67295),i=Object.getPrototypeOf;v&&u&&i&&d(y,function(h){if(typeof e.g[h]=="function"){var b=new e.g[h];if(!(Symbol.toStringTag in b))throw new EvalError("this engine has support for Symbol.toStringTag, but "+h+" does not have the property! Please report this.");var p=i(b),E=u(p,Symbol.toStringTag);if(!E){var c=i(p);E=u(c,Symbol.toStringTag)}n[h]=E.get}});var f=function(b){var p=!1;return d(n,function(E,c){if(!p)try{var l=E.call(b);l===c&&(p=l)}catch{}}),p},g=e(9187);z.exports=function(b){return g(b)?v?f(b):r(_(b),8,-1):!1}},3961:function(z,B,e){var d=e(63489),P=e(56131),a=d.instance();function _(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}_.prototype=new d.baseCalendar,P(_.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(g,h){if(typeof g=="string"){var b=g.match(v);return b?b[0]:""}var p=this._validateYear(g),E=g.month(),c=""+this.toChineseMonth(p,E);return h&&c.length<2&&(c="0"+c),this.isIntercalaryMonth(p,E)&&(c+="i"),c},monthNames:function(g){if(typeof g=="string"){var h=g.match(y);return h?h[0]:""}var b=this._validateYear(g),p=g.month(),E=this.toChineseMonth(b,p),c=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][E-1];return this.isIntercalaryMonth(b,p)&&(c="闰"+c),c},monthNamesShort:function(g){if(typeof g=="string"){var h=g.match(r);return h?h[0]:""}var b=this._validateYear(g),p=g.month(),E=this.toChineseMonth(b,p),c=["一","二","三","四","五","六","七","八","九","十","十一","十二"][E-1];return this.isIntercalaryMonth(b,p)&&(c="闰"+c),c},parseMonth:function(g,h){g=this._validateYear(g);var b=parseInt(h),p;if(isNaN(b))h[0]==="闰"&&(p=!0,h=h.substring(1)),h[h.length-1]==="月"&&(h=h.substring(0,h.length-1)),b=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(h);else{var E=h[h.length-1];p=E==="i"||E==="I"}var c=this.toMonthIndex(g,b,p);return c},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(g,h){if(g.year&&(g=g.year()),typeof g!="number"||g<1888||g>2111)throw h.replace(/\{0\}/,this.local.name);return g},toMonthIndex:function(g,h,b){var p=this.intercalaryMonth(g),E=b&&h!==p;if(E||h<1||h>12)throw d.local.invalidMonth.replace(/\{0\}/,this.local.name);var c;return p?!b&&h<=p?c=h-1:c=h:c=h-1,c},toChineseMonth:function(g,h){g.year&&(g=g.year(),h=g.month());var b=this.intercalaryMonth(g),p=b?12:11;if(h<0||h>p)throw d.local.invalidMonth.replace(/\{0\}/,this.local.name);var E;return b?h<b?E=h+1:E=h:E=h+1,E},intercalaryMonth:function(g){g=this._validateYear(g);var h=n[g-n[0]],b=h>>13;return b},isIntercalaryMonth:function(g,h){g.year&&(g=g.year(),h=g.month());var b=this.intercalaryMonth(g);return!!b&&b===h},leapYear:function(g){return this.intercalaryMonth(g)!==0},weekOfYear:function(g,h,b){var p=this._validateYear(g,d.local.invalidyear),E=u[p-u[0]],c=E>>9&4095,l=E>>5&15,m=E&31,M;M=a.newDate(c,l,m),M.add(4-(M.dayOfWeek()||7),"d");var L=this.toJD(g,h,b)-M.toJD();return 1+Math.floor(L/7)},monthsInYear:function(g){return this.leapYear(g)?13:12},daysInMonth:function(g,h){g.year&&(h=g.month(),g=g.year()),g=this._validateYear(g);var b=n[g-n[0]],p=b>>13,E=p?12:11;if(h>E)throw d.local.invalidMonth.replace(/\{0\}/,this.local.name);var c=b&1<<12-h?30:29;return c},weekDay:function(g,h,b){return(this.dayOfWeek(g,h,b)||7)<6},toJD:function(g,h,b){var p=this._validate(g,c,b,d.local.invalidDate);g=this._validateYear(p.year()),h=p.month(),b=p.day();var E=this.isIntercalaryMonth(g,h),c=this.toChineseMonth(g,h),l=f(g,c,b,E);return a.toJD(l.year,l.month,l.day)},fromJD:function(g){var h=a.fromJD(g),b=i(h.year(),h.month(),h.day()),p=this.toMonthIndex(b.year,b.month,b.isIntercalary);return this.newDate(b.year,p,b.day)},fromString:function(g){var h=g.match(x),b=this._validateYear(+h[1]),p=+h[2],E=!!h[3],c=this.toMonthIndex(b,p,E),l=+h[4];return this.newDate(b,c,l)},add:function(g,h,b){var p=g.year(),E=g.month(),c=this.isIntercalaryMonth(p,E),l=this.toChineseMonth(p,E),m=Object.getPrototypeOf(_.prototype).add.call(this,g,h,b);if(b==="y"){var M=m.year(),L=m.month(),D=this.isIntercalaryMonth(M,l),A=c&&D?this.toMonthIndex(M,l,!0):this.toMonthIndex(M,l,!1);A!==L&&m.month(A)}return m}});var x=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,v=/^\d?\d[iI]?/m,y=/^闰?十?[一二三四五六七八九]?月/m,r=/^闰?十?[一二三四五六七八九]?/m;d.calendars.chinese=_;var n=[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],u=[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 i(g,h,b,p){var E,c;if(typeof g=="object")E=g,c=h||{};else{var l=typeof g=="number"&&g>=1888&&g<=2111;if(!l)throw new Error("Solar year outside range 1888-2111");var m=typeof h=="number"&&h>=1&&h<=12;if(!m)throw new Error("Solar month outside range 1 - 12");var M=typeof b=="number"&&b>=1&&b<=31;if(!M)throw new Error("Solar day outside range 1 - 31");E={year:g,month:h,day:b},c=p||{}}var L=u[E.year-u[0]],D=E.year<<9|E.month<<5|E.day;c.year=D>=L?E.year:E.year-1,L=u[c.year-u[0]];var A=L>>9&4095,C=L>>5&15,S=L&31,o,R=new Date(A,C-1,S),T=new Date(E.year,E.month-1,E.day);o=Math.round((T-R)/864e5);var O=n[c.year-n[0]],N;for(N=0;N<13;N++){var H=O&1<<12-N?30:29;if(o<H)break;o-=H}var k=O>>13;return!k||N<k?(c.isIntercalary=!1,c.month=1+N):N===k?(c.isIntercalary=!0,c.month=N):(c.isIntercalary=!1,c.month=N),c.day=1+o,c}function f(g,h,b,p,E){var c,l;if(typeof g=="object")l=g,c=h||{};else{var m=typeof g=="number"&&g>=1888&&g<=2111;if(!m)throw new Error("Lunar year outside range 1888-2111");var M=typeof h=="number"&&h>=1&&h<=12;if(!M)throw new Error("Lunar month outside range 1 - 12");var L=typeof b=="number"&&b>=1&&b<=30;if(!L)throw new Error("Lunar day outside range 1 - 30");var D;typeof p=="object"?(D=!1,c=p):(D=!!p,c=E||{}),l={year:g,month:h,day:b,isIntercalary:D}}var A;A=l.day-1;var C=n[l.year-n[0]],S=C>>13,o;S&&(l.month>S||l.isIntercalary)?o=l.month:o=l.month-1;for(var R=0;R<o;R++){var T=C&1<<12-R?30:29;A+=T}var O=u[l.year-u[0]],N=O>>9&4095,H=O>>5&15,k=O&31,V=new Date(N,H-1,k+A);return c.year=V.getFullYear(),c.month=1+V.getMonth(),c.day=V.getDate(),c}},38751:function(z,B,e){var d=e(63489),P=e(56131);function a(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}a.prototype=new d.baseCalendar,P(a.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(v){var x=this._validate(v,this.minMonth,this.minDay,d.local.invalidYear),v=x.year()+(x.year()<0?1:0);return v%4===3||v%4===-1},monthsInYear:function(_){return this._validate(_,this.minMonth,this.minDay,d.local.invalidYear||d.regionalOptions[""].invalidYear),13},weekOfYear:function(_,x,v){var y=this.newDate(_,x,v);return y.add(-y.dayOfWeek(),"d"),Math.floor((y.dayOfYear()-1)/7)+1},daysInMonth:function(_,x){var v=this._validate(_,x,this.minDay,d.local.invalidMonth);return this.daysPerMonth[v.month()-1]+(v.month()===13&&this.leapYear(v.year())?1:0)},weekDay:function(_,x,v){return(this.dayOfWeek(_,x,v)||7)<6},toJD:function(_,x,v){var y=this._validate(_,x,v,d.local.invalidDate);return _=y.year(),_<0&&_++,y.day()+(y.month()-1)*30+(_-1)*365+Math.floor(_/4)+this.jdEpoch-1},fromJD:function(_){var x=Math.floor(_)+.5-this.jdEpoch,v=Math.floor((x-Math.floor((x+366)/1461))/365)+1;v<=0&&v--,x=Math.floor(_)+.5-this.newDate(v,1,1).toJD();var y=Math.floor(x/30)+1,r=x-(y-1)*30+1;return this.newDate(v,y,r)}}),d.calendars.coptic=a},86825:function(z,B,e){var d=e(63489),P=e(56131);function a(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}a.prototype=new d.baseCalendar,P(a.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(x){return this._validate(x,this.minMonth,this.minDay,d.local.invalidYear),!1},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,d.local.invalidYear),13},daysInYear:function(x){return this._validate(x,this.minMonth,this.minDay,d.local.invalidYear),400},weekOfYear:function(x,v,y){var r=this.newDate(x,v,y);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/8)+1},daysInMonth:function(x,v){var y=this._validate(x,v,this.minDay,d.local.invalidMonth);return this.daysPerMonth[y.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(x,v,y){var r=this._validate(x,v,y,d.local.invalidDate);return(r.day()+1)%8},weekDay:function(x,v,y){var r=this.dayOfWeek(x,v,y);return r>=2&&r<=6},extraInfo:function(x,v,y){var r=this._validate(x,v,y,d.local.invalidDate);return{century:_[Math.floor((r.year()-1)/100)+1]||""}},toJD:function(x,v,y){var r=this._validate(x,v,y,d.local.invalidDate);return x=r.year()+(r.year()<0?1:0),v=r.month(),y=r.day(),y+(v>1?16:0)+(v>2?(v-2)*32:0)+(x-1)*400+this.jdEpoch-1},fromJD:function(x){x=Math.floor(x+.5)-Math.floor(this.jdEpoch)-1;var v=Math.floor(x/400)+1;x-=(v-1)*400,x+=x>15?16:0;var y=Math.floor(x/32)+1,r=x-(y-1)*32+1;return this.newDate(v<=0?v-1:v,y,r)}});var _={20:"Fruitbat",21:"Anchovy"};d.calendars.discworld=a},37715:function(z,B,e){var d=e(63489),P=e(56131);function a(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}a.prototype=new d.baseCalendar,P(a.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(v){var x=this._validate(v,this.minMonth,this.minDay,d.local.invalidYear),v=x.year()+(x.year()<0?1:0);return v%4===3||v%4===-1},monthsInYear:function(_){return this._validate(_,this.minMonth,this.minDay,d.local.invalidYear||d.regionalOptions[""].invalidYear),13},weekOfYear:function(_,x,v){var y=this.newDate(_,x,v);return y.add(-y.dayOfWeek(),"d"),Math.floor((y.dayOfYear()-1)/7)+1},daysInMonth:function(_,x){var v=this._validate(_,x,this.minDay,d.local.invalidMonth);return this.daysPerMonth[v.month()-1]+(v.month()===13&&this.leapYear(v.year())?1:0)},weekDay:function(_,x,v){return(this.dayOfWeek(_,x,v)||7)<6},toJD:function(_,x,v){var y=this._validate(_,x,v,d.local.invalidDate);return _=y.year(),_<0&&_++,y.day()+(y.month()-1)*30+(_-1)*365+Math.floor(_/4)+this.jdEpoch-1},fromJD:function(_){var x=Math.floor(_)+.5-this.jdEpoch,v=Math.floor((x-Math.floor((x+366)/1461))/365)+1;v<=0&&v--,x=Math.floor(_)+.5-this.newDate(v,1,1).toJD();var y=Math.floor(x/30)+1,r=x-(y-1)*30+1;return this.newDate(v,y,r)}}),d.calendars.ethiopian=a},99384:function(z,B,e){var d=e(63489),P=e(56131);function a(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}a.prototype=new d.baseCalendar,P(a.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(x){var v=this._validate(x,this.minMonth,this.minDay,d.local.invalidYear);return this._leapYear(v.year())},_leapYear:function(x){return x=x<0?x+1:x,_(x*7+1,19)<7},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,d.local.invalidYear),this._leapYear(x.year?x.year():x)?13:12},weekOfYear:function(x,v,y){var r=this.newDate(x,v,y);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(x){var v=this._validate(x,this.minMonth,this.minDay,d.local.invalidYear);return x=v.year(),this.toJD(x===-1?1:x+1,7,1)-this.toJD(x,7,1)},daysInMonth:function(x,v){return x.year&&(v=x.month(),x=x.year()),this._validate(x,v,this.minDay,d.local.invalidMonth),v===12&&this.leapYear(x)||v===8&&_(this.daysInYear(x),10)===5?30:v===9&&_(this.daysInYear(x),10)===3?29:this.daysPerMonth[v-1]},weekDay:function(x,v,y){return this.dayOfWeek(x,v,y)!==6},extraInfo:function(x,v,y){var r=this._validate(x,v,y,d.local.invalidDate);return{yearType:(this.leapYear(r)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(r)%10-3]}},toJD:function(x,v,y){var r=this._validate(x,v,y,d.local.invalidDate);x=r.year(),v=r.month(),y=r.day();var n=x<=0?x+1:x,u=this.jdEpoch+this._delay1(n)+this._delay2(n)+y+1;if(v<7){for(var i=7;i<=this.monthsInYear(x);i++)u+=this.daysInMonth(x,i);for(var i=1;i<v;i++)u+=this.daysInMonth(x,i)}else for(var i=7;i<v;i++)u+=this.daysInMonth(x,i);return u},_delay1:function(x){var v=Math.floor((235*x-234)/19),y=12084+13753*v,r=v*29+Math.floor(y/25920);return _(3*(r+1),7)<3&&r++,r},_delay2:function(x){var v=this._delay1(x-1),y=this._delay1(x),r=this._delay1(x+1);return r-y===356?2:y-v===382?1:0},fromJD:function(x){x=Math.floor(x)+.5;for(var v=Math.floor((x-this.jdEpoch)*98496/35975351)-1;x>=this.toJD(v===-1?1:v+1,7,1);)v++;for(var y=x<this.toJD(v,1,1)?7:1;x>this.toJD(v,y,this.daysInMonth(v,y));)y++;var r=x-this.toJD(v,y,1)+1;return this.newDate(v,y,r)}});function _(x,v){return x-v*Math.floor(x/v)}d.calendars.hebrew=a},43805:function(z,B,e){var d=e(63489),P=e(56131);function a(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}a.prototype=new d.baseCalendar,P(a.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(_){var x=this._validate(_,this.minMonth,this.minDay,d.local.invalidYear);return(x.year()*11+14)%30<11},weekOfYear:function(_,x,v){var y=this.newDate(_,x,v);return y.add(-y.dayOfWeek(),"d"),Math.floor((y.dayOfYear()-1)/7)+1},daysInYear:function(_){return this.leapYear(_)?355:354},daysInMonth:function(_,x){var v=this._validate(_,x,this.minDay,d.local.invalidMonth);return this.daysPerMonth[v.month()-1]+(v.month()===12&&this.leapYear(v.year())?1:0)},weekDay:function(_,x,v){return this.dayOfWeek(_,x,v)!==5},toJD:function(_,x,v){var y=this._validate(_,x,v,d.local.invalidDate);return _=y.year(),x=y.month(),v=y.day(),_=_<=0?_+1:_,v+Math.ceil(29.5*(x-1))+(_-1)*354+Math.floor((3+11*_)/30)+this.jdEpoch-1},fromJD:function(_){_=Math.floor(_)+.5;var x=Math.floor((30*(_-this.jdEpoch)+10646)/10631);x=x<=0?x-1:x;var v=Math.min(12,Math.ceil((_-29-this.toJD(x,1,1))/29.5)+1),y=_-this.toJD(x,v,1)+1;return this.newDate(x,v,y)}}),d.calendars.islamic=a},88874:function(z,B,e){var d=e(63489),P=e(56131);function a(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}a.prototype=new d.baseCalendar,P(a.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(v){var x=this._validate(v,this.minMonth,this.minDay,d.local.invalidYear),v=x.year()<0?x.year()+1:x.year();return v%4===0},weekOfYear:function(_,x,v){var y=this.newDate(_,x,v);return y.add(4-(y.dayOfWeek()||7),"d"),Math.floor((y.dayOfYear()-1)/7)+1},daysInMonth:function(_,x){var v=this._validate(_,x,this.minDay,d.local.invalidMonth);return this.daysPerMonth[v.month()-1]+(v.month()===2&&this.leapYear(v.year())?1:0)},weekDay:function(_,x,v){return(this.dayOfWeek(_,x,v)||7)<6},toJD:function(_,x,v){var y=this._validate(_,x,v,d.local.invalidDate);return _=y.year(),x=y.month(),v=y.day(),_<0&&_++,x<=2&&(_--,x+=12),Math.floor(365.25*(_+4716))+Math.floor(30.6001*(x+1))+v-1524.5},fromJD:function(_){var x=Math.floor(_+.5),v=x+1524,y=Math.floor((v-122.1)/365.25),r=Math.floor(365.25*y),n=Math.floor((v-r)/30.6001),u=n-Math.floor(n<14?1:13),i=y-Math.floor(u>2?4716:4715),f=v-r-Math.floor(30.6001*n);return i<=0&&i--,this.newDate(i,u,f)}}),d.calendars.julian=a},83290:function(z,B,e){var d=e(63489),P=e(56131);function a(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}a.prototype=new d.baseCalendar,P(a.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(v){return this._validate(v,this.minMonth,this.minDay,d.local.invalidYear),!1},formatYear:function(v){var y=this._validate(v,this.minMonth,this.minDay,d.local.invalidYear);v=y.year();var r=Math.floor(v/400);v=v%400,v+=v<0?400:0;var n=Math.floor(v/20);return r+"."+n+"."+v%20},forYear:function(v){if(v=v.split("."),v.length<3)throw"Invalid Mayan year";for(var y=0,r=0;r<v.length;r++){var n=parseInt(v[r],10);if(Math.abs(n)>19||r>0&&n<0)throw"Invalid Mayan year";y=y*20+n}return y},monthsInYear:function(v){return this._validate(v,this.minMonth,this.minDay,d.local.invalidYear),18},weekOfYear:function(v,y,r){return this._validate(v,y,r,d.local.invalidDate),0},daysInYear:function(v){return this._validate(v,this.minMonth,this.minDay,d.local.invalidYear),360},daysInMonth:function(v,y){return this._validate(v,y,this.minDay,d.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(v,y,r){var n=this._validate(v,y,r,d.local.invalidDate);return n.day()},weekDay:function(v,y,r){return this._validate(v,y,r,d.local.invalidDate),!0},extraInfo:function(v,y,r){var n=this._validate(v,y,r,d.local.invalidDate),u=n.toJD(),i=this._toHaab(u),f=this._toTzolkin(u);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[f[0]-1],tzolkinDay:f[0],tzolkinTrecena:f[1]}},_toHaab:function(v){v-=this.jdEpoch;var y=_(v+8+(18-1)*20,365);return[Math.floor(y/20)+1,_(y,20)]},_toTzolkin:function(v){return v-=this.jdEpoch,[x(v+20,20),x(v+4,13)]},toJD:function(v,y,r){var n=this._validate(v,y,r,d.local.invalidDate);return n.day()+n.month()*20+n.year()*360+this.jdEpoch},fromJD:function(v){v=Math.floor(v)+.5-this.jdEpoch;var y=Math.floor(v/360);v=v%360,v+=v<0?360:0;var r=Math.floor(v/20),n=v%20;return this.newDate(y,r,n)}});function _(v,y){return v-y*Math.floor(v/y)}function x(v,y){return _(v-1,y)+1}d.calendars.mayan=a},29108:function(z,B,e){var d=e(63489),P=e(56131);function a(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}a.prototype=new d.baseCalendar;var _=d.instance("gregorian");P(a.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(x){var v=this._validate(x,this.minMonth,this.minDay,d.local.invalidYear||d.regionalOptions[""].invalidYear);return _.leapYear(v.year()+(v.year()<1?1:0)+1469)},weekOfYear:function(x,v,y){var r=this.newDate(x,v,y);return r.add(1-(r.dayOfWeek()||7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(x,v){var y=this._validate(x,v,this.minDay,d.local.invalidMonth);return this.daysPerMonth[y.month()-1]+(y.month()===12&&this.leapYear(y.year())?1:0)},weekDay:function(x,v,y){return(this.dayOfWeek(x,v,y)||7)<6},toJD:function(n,v,y){var r=this._validate(n,v,y,d.local.invalidMonth),n=r.year();n<0&&n++;for(var u=r.day(),i=1;i<r.month();i++)u+=this.daysPerMonth[i-1];return u+_.toJD(n+1468,3,13)},fromJD:function(x){x=Math.floor(x+.5);for(var v=Math.floor((x-(this.jdEpoch-1))/366);x>=this.toJD(v+1,1,1);)v++;for(var y=x-Math.floor(this.toJD(v,1,1)+.5)+1,r=1;y>this.daysInMonth(v,r);)y-=this.daysInMonth(v,r),r++;return this.newDate(v,r,y)}}),d.calendars.nanakshahi=a},55422:function(z,B,e){var d=e(63489),P=e(56131);function a(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}a.prototype=new d.baseCalendar,P(a.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(_){return this.daysInYear(_)!==this.daysPerYear},weekOfYear:function(_,x,v){var y=this.newDate(_,x,v);return y.add(-y.dayOfWeek(),"d"),Math.floor((y.dayOfYear()-1)/7)+1},daysInYear:function(_){var x=this._validate(_,this.minMonth,this.minDay,d.local.invalidYear);if(_=x.year(),typeof this.NEPALI_CALENDAR_DATA[_]>"u")return this.daysPerYear;for(var v=0,y=this.minMonth;y<=12;y++)v+=this.NEPALI_CALENDAR_DATA[_][y];return v},daysInMonth:function(_,x){return _.year&&(x=_.month(),_=_.year()),this._validate(_,x,this.minDay,d.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[_]>"u"?this.daysPerMonth[x-1]:this.NEPALI_CALENDAR_DATA[_][x]},weekDay:function(_,x,v){return this.dayOfWeek(_,x,v)!==6},toJD:function(_,x,v){var y=this._validate(_,x,v,d.local.invalidDate);_=y.year(),x=y.month(),v=y.day();var r=d.instance(),n=0,u=x,i=_;this._createMissingCalendarData(_);var f=_-(u>9||u===9&&v>=this.NEPALI_CALENDAR_DATA[i][0]?56:57);for(x!==9&&(n=v,u--);u!==9;)u<=0&&(u=12,i--),n+=this.NEPALI_CALENDAR_DATA[i][u],u--;return x===9?(n+=v-this.NEPALI_CALENDAR_DATA[i][0],n<0&&(n+=r.daysInYear(f))):n+=this.NEPALI_CALENDAR_DATA[i][9]-this.NEPALI_CALENDAR_DATA[i][0],r.newDate(f,1,1).add(n,"d").toJD()},fromJD:function(_){var x=d.instance(),v=x.fromJD(_),y=v.year(),r=v.dayOfYear(),n=y+56;this._createMissingCalendarData(n);for(var u=9,i=this.NEPALI_CALENDAR_DATA[n][0],f=this.NEPALI_CALENDAR_DATA[n][u]-i+1;r>f;)u++,u>12&&(u=1,n++),f+=this.NEPALI_CALENDAR_DATA[n][u];var g=this.NEPALI_CALENDAR_DATA[n][u]-(f-r);return this.newDate(n,u,g)},_createMissingCalendarData:function(_){var x=this.daysPerMonth.slice(0);x.unshift(17);for(var v=_-1;v<_+2;v++)typeof this.NEPALI_CALENDAR_DATA[v]>"u"&&(this.NEPALI_CALENDAR_DATA[v]=x)},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]}}),d.calendars.nepali=a},94320:function(z,B,e){var d=e(63489),P=e(56131);function a(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}a.prototype=new d.baseCalendar,P(a.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","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Chæharshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Chæ","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(x){var v=this._validate(x,this.minMonth,this.minDay,d.local.invalidYear);return((v.year()-(v.year()>0?474:473))%2820+474+38)*682%2816<682},weekOfYear:function(x,v,y){var r=this.newDate(x,v,y);return r.add(-((r.dayOfWeek()+1)%7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(x,v){var y=this._validate(x,v,this.minDay,d.local.invalidMonth);return this.daysPerMonth[y.month()-1]+(y.month()===12&&this.leapYear(y.year())?1:0)},weekDay:function(x,v,y){return this.dayOfWeek(x,v,y)!==5},toJD:function(x,v,y){var r=this._validate(x,v,y,d.local.invalidDate);x=r.year(),v=r.month(),y=r.day();var n=x-(x>=0?474:473),u=474+_(n,2820);return y+(v<=7?(v-1)*31:(v-1)*30+6)+Math.floor((u*682-110)/2816)+(u-1)*365+Math.floor(n/2820)*1029983+this.jdEpoch-1},fromJD:function(x){x=Math.floor(x)+.5;var v=x-this.toJD(475,1,1),y=Math.floor(v/1029983),r=_(v,1029983),n=2820;if(r!==1029982){var u=Math.floor(r/366),i=_(r,366);n=Math.floor((2134*u+2816*i+2815)/1028522)+u+1}var f=n+2820*y+474;f=f<=0?f-1:f;var g=x-this.toJD(f,1,1)+1,h=g<=186?Math.ceil(g/31):Math.ceil((g-6)/30),b=x-this.toJD(f,h,1)+1;return this.newDate(f,h,b)}});function _(x,v){return x-v*Math.floor(x/v)}d.calendars.persian=a,d.calendars.jalali=a},31320:function(z,B,e){var d=e(63489),P=e(56131),a=d.instance();function _(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}_.prototype=new d.baseCalendar,P(_.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(y){var v=this._validate(y,this.minMonth,this.minDay,d.local.invalidYear),y=this._t2gYear(v.year());return a.leapYear(y)},weekOfYear:function(n,v,y){var r=this._validate(n,this.minMonth,this.minDay,d.local.invalidYear),n=this._t2gYear(r.year());return a.weekOfYear(n,r.month(),r.day())},daysInMonth:function(x,v){var y=this._validate(x,v,this.minDay,d.local.invalidMonth);return this.daysPerMonth[y.month()-1]+(y.month()===2&&this.leapYear(y.year())?1:0)},weekDay:function(x,v,y){return(this.dayOfWeek(x,v,y)||7)<6},toJD:function(n,v,y){var r=this._validate(n,v,y,d.local.invalidDate),n=this._t2gYear(r.year());return a.toJD(n,r.month(),r.day())},fromJD:function(x){var v=a.fromJD(x),y=this._g2tYear(v.year());return this.newDate(y,v.month(),v.day())},_t2gYear:function(x){return x+this.yearsOffset+(x>=-this.yearsOffset&&x<=-1?1:0)},_g2tYear:function(x){return x-this.yearsOffset-(x>=1&&x<=this.yearsOffset?1:0)}}),d.calendars.taiwan=_},51367:function(z,B,e){var d=e(63489),P=e(56131),a=d.instance();function _(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}_.prototype=new d.baseCalendar,P(_.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(y){var v=this._validate(y,this.minMonth,this.minDay,d.local.invalidYear),y=this._t2gYear(v.year());return a.leapYear(y)},weekOfYear:function(n,v,y){var r=this._validate(n,this.minMonth,this.minDay,d.local.invalidYear),n=this._t2gYear(r.year());return a.weekOfYear(n,r.month(),r.day())},daysInMonth:function(x,v){var y=this._validate(x,v,this.minDay,d.local.invalidMonth);return this.daysPerMonth[y.month()-1]+(y.month()===2&&this.leapYear(y.year())?1:0)},weekDay:function(x,v,y){return(this.dayOfWeek(x,v,y)||7)<6},toJD:function(n,v,y){var r=this._validate(n,v,y,d.local.invalidDate),n=this._t2gYear(r.year());return a.toJD(n,r.month(),r.day())},fromJD:function(x){var v=a.fromJD(x),y=this._g2tYear(v.year());return this.newDate(y,v.month(),v.day())},_t2gYear:function(x){return x-this.yearsOffset-(x>=1&&x<=this.yearsOffset?1:0)},_g2tYear:function(x){return x+this.yearsOffset+(x>=-this.yearsOffset&&x<=-1?1:0)}}),d.calendars.thai=_},21457:function(z,B,e){var d=e(63489),P=e(56131);function a(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}a.prototype=new d.baseCalendar,P(a.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(x){var v=this._validate(x,this.minMonth,this.minDay,d.local.invalidYear);return this.daysInYear(v.year())===355},weekOfYear:function(x,v,y){var r=this.newDate(x,v,y);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(x){for(var v=0,y=1;y<=12;y++)v+=this.daysInMonth(x,y);return v},daysInMonth:function(x,v){for(var y=this._validate(x,v,this.minDay,d.local.invalidMonth),r=y.toJD()-24e5+.5,n=0,u=0;u<_.length;u++){if(_[u]>r)return _[n]-_[n-1];n++}return 30},weekDay:function(x,v,y){return this.dayOfWeek(x,v,y)!==5},toJD:function(x,v,y){var r=this._validate(x,v,y,d.local.invalidDate),n=12*(r.year()-1)+r.month()-15292,u=r.day()+_[n-1]-1;return u+24e5-.5},fromJD:function(x){for(var v=x-24e5+.5,y=0,r=0;r<_.length&&!(_[r]>v);r++)y++;var n=y+15292,u=Math.floor((n-1)/12),i=u+1,f=n-12*u,g=v-_[y-1]+1;return this.newDate(i,f,g)},isValid:function(x,v,y){var r=d.baseCalendar.prototype.isValid.apply(this,arguments);return r&&(x=x.year!=null?x.year:x,r=x>=1276&&x<=1500),r},_validate:function(x,v,y,r){var n=d.baseCalendar.prototype._validate.apply(this,arguments);if(n.year<1276||n.year>1500)throw r.replace(/\{0\}/,this.local.name);return n}}),d.calendars.ummalqura=a;var _=[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]},63489:function(z,B,e){var d=e(56131);function P(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}d(P.prototype,{instance:function(r,n){r=(r||"gregorian").toLowerCase(),n=n||"";var u=this._localCals[r+"-"+n];if(!u&&this.calendars[r]&&(u=new this.calendars[r](n),this._localCals[r+"-"+n]=u),!u)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,r);return u},newDate:function(r,n,u,i,f){return i=(r!=null&&r.year?r.calendar():typeof i=="string"?this.instance(i,f):i)||this.instance(),i.newDate(r,n,u)},substituteDigits:function(r){return function(n){return(n+"").replace(/[0-9]/g,function(u){return r[u]})}},substituteChineseDigits:function(r,n){return function(u){for(var i="",f=0;u>0;){var g=u%10;i=(g===0?"":r[g]+n[f])+i,f++,u=Math.floor(u/10)}return i.indexOf(r[1]+n[1])===0&&(i=i.substr(1)),i||r[0]}}});function a(r,n,u,i){if(this._calendar=r,this._year=n,this._month=u,this._day=i,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(y.local.invalidDate||y.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function _(r,n){return r=""+r,"000000".substring(0,n-r.length)+r}d(a.prototype,{newDate:function(r,n,u){return this._calendar.newDate(r??this,n,u)},year:function(r){return arguments.length===0?this._year:this.set(r,"y")},month:function(r){return arguments.length===0?this._month:this.set(r,"m")},day:function(r){return arguments.length===0?this._day:this.set(r,"d")},date:function(r,n,u){if(!this._calendar.isValid(r,n,u))throw(y.local.invalidDate||y.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=r,this._month=n,this._day=u,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(r,n){return this._calendar.add(this,r,n)},set:function(r,n){return this._calendar.set(this,r,n)},compareTo:function(r){if(this._calendar.name!==r._calendar.name)throw(y.local.differentCalendars||y.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,r._calendar.local.name);var n=this._year!==r._year?this._year-r._year:this._month!==r._month?this.monthOfYear()-r.monthOfYear():this._day-r._day;return n===0?0:n<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(r){return this._calendar.fromJD(r)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(r){return this._calendar.fromJSDate(r)},toString:function(){return(this.year()<0?"-":"")+_(Math.abs(this.year()),4)+"-"+_(this.month(),2)+"-"+_(this.day(),2)}});function x(){this.shortYearCutoff="+10"}d(x.prototype,{_validateLevel:0,newDate:function(r,n,u){return r==null?this.today():(r.year&&(this._validate(r,n,u,y.local.invalidDate||y.regionalOptions[""].invalidDate),u=r.day(),n=r.month(),r=r.year()),new a(this,r,n,u))},today:function(){return this.fromJSDate(new Date)},epoch:function(r){var n=this._validate(r,this.minMonth,this.minDay,y.local.invalidYear||y.regionalOptions[""].invalidYear);return n.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(r){var n=this._validate(r,this.minMonth,this.minDay,y.local.invalidYear||y.regionalOptions[""].invalidYear);return(n.year()<0?"-":"")+_(Math.abs(n.year()),4)},monthsInYear:function(r){return this._validate(r,this.minMonth,this.minDay,y.local.invalidYear||y.regionalOptions[""].invalidYear),12},monthOfYear:function(r,n){var u=this._validate(r,n,this.minDay,y.local.invalidMonth||y.regionalOptions[""].invalidMonth);return(u.month()+this.monthsInYear(u)-this.firstMonth)%this.monthsInYear(u)+this.minMonth},fromMonthOfYear:function(r,n){var u=(n+this.firstMonth-2*this.minMonth)%this.monthsInYear(r)+this.minMonth;return this._validate(r,u,this.minDay,y.local.invalidMonth||y.regionalOptions[""].invalidMonth),u},daysInYear:function(r){var n=this._validate(r,this.minMonth,this.minDay,y.local.invalidYear||y.regionalOptions[""].invalidYear);return this.leapYear(n)?366:365},dayOfYear:function(r,n,u){var i=this._validate(r,n,u,y.local.invalidDate||y.regionalOptions[""].invalidDate);return i.toJD()-this.newDate(i.year(),this.fromMonthOfYear(i.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(r,n,u){var i=this._validate(r,n,u,y.local.invalidDate||y.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(i))+2)%this.daysInWeek()},extraInfo:function(r,n,u){return this._validate(r,n,u,y.local.invalidDate||y.regionalOptions[""].invalidDate),{}},add:function(r,n,u){return this._validate(r,this.minMonth,this.minDay,y.local.invalidDate||y.regionalOptions[""].invalidDate),this._correctAdd(r,this._add(r,n,u),n,u)},_add:function(r,n,u){if(this._validateLevel++,u==="d"||u==="w"){var i=r.toJD()+n*(u==="w"?this.daysInWeek():1),f=r.calendar().fromJD(i);return this._validateLevel--,[f.year(),f.month(),f.day()]}try{var g=r.year()+(u==="y"?n:0),h=r.monthOfYear()+(u==="m"?n:0),f=r.day(),b=function(c){for(;h<c.minMonth;)g--,h+=c.monthsInYear(g);for(var l=c.monthsInYear(g);h>l-1+c.minMonth;)g++,h-=l,l=c.monthsInYear(g)};u==="y"?(r.month()!==this.fromMonthOfYear(g,h)&&(h=this.newDate(g,r.month(),this.minDay).monthOfYear()),h=Math.min(h,this.monthsInYear(g)),f=Math.min(f,this.daysInMonth(g,this.fromMonthOfYear(g,h)))):u==="m"&&(b(this),f=Math.min(f,this.daysInMonth(g,this.fromMonthOfYear(g,h))));var p=[g,this.fromMonthOfYear(g,h),f];return this._validateLevel--,p}catch(E){throw this._validateLevel--,E}},_correctAdd:function(r,n,u,i){if(!this.hasYearZero&&(i==="y"||i==="m")&&(n[0]===0||r.year()>0!=n[0]>0)){var f={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[i],g=u<0?-1:1;n=this._add(r,u*f[0]+g*f[1],f[2])}return r.date(n[0],n[1],n[2])},set:function(r,n,u){this._validate(r,this.minMonth,this.minDay,y.local.invalidDate||y.regionalOptions[""].invalidDate);var i=u==="y"?n:r.year(),f=u==="m"?n:r.month(),g=u==="d"?n:r.day();return(u==="y"||u==="m")&&(g=Math.min(g,this.daysInMonth(i,f))),r.date(i,f,g)},isValid:function(r,n,u){this._validateLevel++;var i=this.hasYearZero||r!==0;if(i){var f=this.newDate(r,n,this.minDay);i=n>=this.minMonth&&n-this.minMonth<this.monthsInYear(f)&&u>=this.minDay&&u-this.minDay<this.daysInMonth(f)}return this._validateLevel--,i},toJSDate:function(r,n,u){var i=this._validate(r,n,u,y.local.invalidDate||y.regionalOptions[""].invalidDate);return y.instance().fromJD(this.toJD(i)).toJSDate()},fromJSDate:function(r){return this.fromJD(y.instance().fromJSDate(r).toJD())},_validate:function(r,n,u,i){if(r.year){if(this._validateLevel===0&&this.name!==r.calendar().name)throw(y.local.differentCalendars||y.regionalOptions[""].differentCalendars).replace(/\{0\}/,this.local.name).replace(/\{1\}/,r.calendar().local.name);return r}try{if(this._validateLevel++,this._validateLevel===1&&!this.isValid(r,n,u))throw i.replace(/\{0\}/,this.local.name);var f=this.newDate(r,n,u);return this._validateLevel--,f}catch(g){throw this._validateLevel--,g}}});function v(r){this.local=this.regionalOptions[r]||this.regionalOptions[""]}v.prototype=new x,d(v.prototype,{name:"Gregorian",jdEpoch:17214255e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Gregorian",epochs:["BCE","CE"],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(u){var n=this._validate(u,this.minMonth,this.minDay,y.local.invalidYear||y.regionalOptions[""].invalidYear),u=n.year()+(n.year()<0?1:0);return u%4===0&&(u%100!==0||u%400===0)},weekOfYear:function(r,n,u){var i=this.newDate(r,n,u);return i.add(4-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(r,n){var u=this._validate(r,n,this.minDay,y.local.invalidMonth||y.regionalOptions[""].invalidMonth);return this.daysPerMonth[u.month()-1]+(u.month()===2&&this.leapYear(u.year())?1:0)},weekDay:function(r,n,u){return(this.dayOfWeek(r,n,u)||7)<6},toJD:function(r,n,u){var i=this._validate(r,n,u,y.local.invalidDate||y.regionalOptions[""].invalidDate);r=i.year(),n=i.month(),u=i.day(),r<0&&r++,n<3&&(n+=12,r--);var f=Math.floor(r/100),g=2-f+Math.floor(f/4);return Math.floor(365.25*(r+4716))+Math.floor(30.6001*(n+1))+u+g-1524.5},fromJD:function(r){var n=Math.floor(r+.5),u=Math.floor((n-186721625e-2)/36524.25);u=n+1+u-Math.floor(u/4);var i=u+1524,f=Math.floor((i-122.1)/365.25),g=Math.floor(365.25*f),h=Math.floor((i-g)/30.6001),b=i-g-Math.floor(h*30.6001),p=h-(h>13.5?13:1),E=f-(p>2.5?4716:4715);return E<=0&&E--,this.newDate(E,p,b)},toJSDate:function(r,n,u){var i=this._validate(r,n,u,y.local.invalidDate||y.regionalOptions[""].invalidDate),f=new Date(i.year(),i.month()-1,i.day());return f.setHours(0),f.setMinutes(0),f.setSeconds(0),f.setMilliseconds(0),f.setHours(f.getHours()>12?f.getHours()+2:0),f},fromJSDate:function(r){return this.newDate(r.getFullYear(),r.getMonth()+1,r.getDate())}});var y=z.exports=new P;y.cdate=a,y.baseCalendar=x,y.calendars.gregorian=v},94338:function(z,B,e){var d=e(56131),P=e(63489);d(P.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"}),P.local=P.regionalOptions[""],d(P.cdate.prototype,{formatDate:function(a,_){return typeof a!="string"&&(_=a,a=""),this._calendar.formatDate(a||"",this,_)}}),d(P.baseCalendar.prototype,{UNIX_EPOCH:P.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:P.instance().jdEpoch,TICKS_PER_DAY:864e9,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(a,_,x){if(typeof a!="string"&&(x=_,_=a,a=""),!_)return"";if(_.calendar()!==this)throw P.local.invalidFormat||P.regionalOptions[""].invalidFormat;a=a||this.local.dateFormat,x=x||{};var v=x.dayNamesShort||this.local.dayNamesShort,y=x.dayNames||this.local.dayNames,r=x.monthNumbers||this.local.monthNumbers,n=x.monthNamesShort||this.local.monthNamesShort,u=x.monthNames||this.local.monthNames;x.calculateWeek||this.local.calculateWeek;for(var i=function(L,D){for(var A=1;M+A<a.length&&a.charAt(M+A)===L;)A++;return M+=A-1,Math.floor(A/(D||1))>1},f=function(L,D,A,C){var S=""+D;if(i(L,C))for(;S.length<A;)S="0"+S;return S},g=function(L,D,A,C){return i(L)?C[D]:A[D]},h=this,b=function(L){return typeof r=="function"?r.call(h,L,i("m")):c(f("m",L.month(),2))},p=function(L,D){return D?typeof u=="function"?u.call(h,L):u[L.month()-h.minMonth]:typeof n=="function"?n.call(h,L):n[L.month()-h.minMonth]},E=this.local.digits,c=function(L){return x.localNumbers&&E?E(L):L},l="",m=!1,M=0;M<a.length;M++)if(m)a.charAt(M)==="'"&&!i("'")?m=!1:l+=a.charAt(M);else switch(a.charAt(M)){case"d":l+=c(f("d",_.day(),2));break;case"D":l+=g("D",_.dayOfWeek(),v,y);break;case"o":l+=f("o",_.dayOfYear(),3);break;case"w":l+=f("w",_.weekOfYear(),2);break;case"m":l+=b(_);break;case"M":l+=p(_,i("M"));break;case"y":l+=i("y",2)?_.year():(_.year()%100<10?"0":"")+_.year()%100;break;case"Y":i("Y",2),l+=_.formatYear();break;case"J":l+=_.toJD();break;case"@":l+=(_.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case"!":l+=(_.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":i("'")?l+="'":m=!0;break;default:l+=a.charAt(M)}return l},parseDate:function(a,_,x){if(_==null)throw P.local.invalidArguments||P.regionalOptions[""].invalidArguments;if(_=typeof _=="object"?_.toString():_+"",_==="")return null;a=a||this.local.dateFormat,x=x||{};var v=x.shortYearCutoff||this.shortYearCutoff;v=typeof v!="string"?v:this.today().year()%100+parseInt(v,10);for(var y=x.dayNamesShort||this.local.dayNamesShort,r=x.dayNames||this.local.dayNames,n=x.parseMonth||this.local.parseMonth,u=x.monthNumbers||this.local.monthNumbers,i=x.monthNamesShort||this.local.monthNamesShort,f=x.monthNames||this.local.monthNames,g=-1,h=-1,b=-1,p=-1,E=-1,c=!1,l=!1,m=function(N,H){for(var k=1;R+k<a.length&&a.charAt(R+k)===N;)k++;return R+=k-1,Math.floor(k/(H||1))>1},M=function(N,H){var k=m(N,H),V=[2,3,k?4:2,k?4:2,10,11,20]["oyYJ@!".indexOf(N)+1],G=new RegExp("^-?\\d{1,"+V+"}"),U=_.substring(o).match(G);if(!U)throw(P.local.missingNumberAt||P.regionalOptions[""].missingNumberAt).replace(/\{0\}/,o);return o+=U[0].length,parseInt(U[0],10)},L=this,D=function(){if(typeof u=="function"){m("m");var N=u.call(L,_.substring(o));return o+=N.length,N}return M("m")},A=function(N,H,k,V){for(var G=m(N,V)?k:H,U=0;U<G.length;U++)if(_.substr(o,G[U].length).toLowerCase()===G[U].toLowerCase())return o+=G[U].length,U+L.minMonth;throw(P.local.unknownNameAt||P.regionalOptions[""].unknownNameAt).replace(/\{0\}/,o)},C=function(){if(typeof f=="function"){var N=m("M")?f.call(L,_.substring(o)):i.call(L,_.substring(o));return o+=N.length,N}return A("M",i,f)},S=function(){if(_.charAt(o)!==a.charAt(R))throw(P.local.unexpectedLiteralAt||P.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,o);o++},o=0,R=0;R<a.length;R++)if(l)a.charAt(R)==="'"&&!m("'")?l=!1:S();else switch(a.charAt(R)){case"d":p=M("d");break;case"D":A("D",y,r);break;case"o":E=M("o");break;case"w":M("w");break;case"m":b=D();break;case"M":b=C();break;case"y":var T=R;c=!m("y",2),R=T,h=M("y",2);break;case"Y":h=M("Y",2);break;case"J":g=M("J")+.5,_.charAt(o)==="."&&(o++,M("J"));break;case"@":g=M("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":g=M("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":o=_.length;break;case"'":m("'")?S():l=!0;break;default:S()}if(o<_.length)throw P.local.unexpectedText||P.regionalOptions[""].unexpectedText;if(h===-1?h=this.today().year():h<100&&c&&(h+=v===-1?1900:this.today().year()-this.today().year()%100-(h<=v?0:100)),typeof b=="string"&&(b=n.call(this,h,b)),E>-1){b=1,p=E;for(var O=this.daysInMonth(h,b);p>O;O=this.daysInMonth(h,b))b++,p-=O}return g>-1?this.fromJD(g):this.newDate(h,b,p)},determineDate:function(a,_,x,v,y){x&&typeof x!="object"&&(y=v,v=x,x=null),typeof v!="string"&&(y=v,v="");var r=this,n=function(u){try{return r.parseDate(v,u,y)}catch{}u=u.toLowerCase();for(var i=(u.match(/^c/)&&x?x.newDate():null)||r.today(),f=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,g=f.exec(u);g;)i.add(parseInt(g[1],10),g[2]||"d"),g=f.exec(u);return i};return _=_?_.newDate():null,a=a==null?_:typeof a=="string"?n(a):typeof a=="number"?isNaN(a)||a===1/0||a===-1/0?_:r.today().add(a,"d"):r.newDate(a),a}})},69862:function(){},40964:function(){},72077:function(z,B,e){var d=e(24696);z.exports=function(){return d(["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],function(a){return typeof e.g[a]=="function"})}},81684:function(z,B,e){e.d(B,{sX:function(){return Le},k4:function(){return fe}});function d(Te,De,Ve){Te.prototype=De.prototype=Ve,Ve.constructor=Te}function P(Te,De){var Ve=Object.create(Te.prototype);for(var Ye in De)Ve[Ye]=De[Ye];return Ve}function a(){}var _=.7,x=1/_,v="\\s*([+-]?\\d+)\\s*",y="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",r="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",n=/^#([0-9a-f]{3,8})$/,u=new RegExp("^rgb\\(".concat(v,",").concat(v,",").concat(v,"\\)$")),i=new RegExp("^rgb\\(".concat(r,",").concat(r,",").concat(r,"\\)$")),f=new RegExp("^rgba\\(".concat(v,",").concat(v,",").concat(v,",").concat(y,"\\)$")),g=new RegExp("^rgba\\(".concat(r,",").concat(r,",").concat(r,",").concat(y,"\\)$")),h=new RegExp("^hsl\\(".concat(y,",").concat(r,",").concat(r,"\\)$")),b=new RegExp("^hsla\\(".concat(y,",").concat(r,",").concat(r,",").concat(y,"\\)$")),p={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};d(a,M,{copy:function(De){return Object.assign(new this.constructor,this,De)},displayable:function(){return this.rgb().displayable()},hex:E,formatHex:E,formatHex8:c,formatHsl:l,formatRgb:m,toString:m});function E(){return this.rgb().formatHex()}function c(){return this.rgb().formatHex8()}function l(){return V(this).formatHsl()}function m(){return this.rgb().formatRgb()}function M(Te){var De,Ve;return Te=(Te+"").trim().toLowerCase(),(De=n.exec(Te))?(Ve=De[1].length,De=parseInt(De[1],16),Ve===6?L(De):Ve===3?new S(De>>8&15|De>>4&240,De>>4&15|De&240,(De&15)<<4|De&15,1):Ve===8?D(De>>24&255,De>>16&255,De>>8&255,(De&255)/255):Ve===4?D(De>>12&15|De>>8&240,De>>8&15|De>>4&240,De>>4&15|De&240,((De&15)<<4|De&15)/255):null):(De=u.exec(Te))?new S(De[1],De[2],De[3],1):(De=i.exec(Te))?new S(De[1]*255/100,De[2]*255/100,De[3]*255/100,1):(De=f.exec(Te))?D(De[1],De[2],De[3],De[4]):(De=g.exec(Te))?D(De[1]*255/100,De[2]*255/100,De[3]*255/100,De[4]):(De=h.exec(Te))?k(De[1],De[2]/100,De[3]/100,1):(De=b.exec(Te))?k(De[1],De[2]/100,De[3]/100,De[4]):p.hasOwnProperty(Te)?L(p[Te]):Te==="transparent"?new S(NaN,NaN,NaN,0):null}function L(Te){return new S(Te>>16&255,Te>>8&255,Te&255,1)}function D(Te,De,Ve,Ye){return Ye<=0&&(Te=De=Ve=NaN),new S(Te,De,Ve,Ye)}function A(Te){return Te instanceof a||(Te=M(Te)),Te?(Te=Te.rgb(),new S(Te.r,Te.g,Te.b,Te.opacity)):new S}function C(Te,De,Ve,Ye){return arguments.length===1?A(Te):new S(Te,De,Ve,Ye??1)}function S(Te,De,Ve,Ye){this.r=+Te,this.g=+De,this.b=+Ve,this.opacity=+Ye}d(S,C,P(a,{brighter:function(De){return De=De==null?x:Math.pow(x,De),new S(this.r*De,this.g*De,this.b*De,this.opacity)},darker:function(De){return De=De==null?_:Math.pow(_,De),new S(this.r*De,this.g*De,this.b*De,this.opacity)},rgb:function(){return this},clamp:function(){return new S(N(this.r),N(this.g),N(this.b),O(this.opacity))},displayable:function(){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:o,formatHex:o,formatHex8:R,formatRgb:T,toString:T}));function o(){return"#".concat(H(this.r)).concat(H(this.g)).concat(H(this.b))}function R(){return"#".concat(H(this.r)).concat(H(this.g)).concat(H(this.b)).concat(H((isNaN(this.opacity)?1:this.opacity)*255))}function T(){var Te=O(this.opacity);return"".concat(Te===1?"rgb(":"rgba(").concat(N(this.r),", ").concat(N(this.g),", ").concat(N(this.b)).concat(Te===1?")":", ".concat(Te,")"))}function O(Te){return isNaN(Te)?1:Math.max(0,Math.min(1,Te))}function N(Te){return Math.max(0,Math.min(255,Math.round(Te)||0))}function H(Te){return Te=N(Te),(Te<16?"0":"")+Te.toString(16)}function k(Te,De,Ve,Ye){return Ye<=0?Te=De=Ve=NaN:Ve<=0||Ve>=1?Te=De=NaN:De<=0&&(Te=NaN),new U(Te,De,Ve,Ye)}function V(Te){if(Te instanceof U)return new U(Te.h,Te.s,Te.l,Te.opacity);if(Te instanceof a||(Te=M(Te)),!Te)return new U;if(Te instanceof U)return Te;Te=Te.rgb();var De=Te.r/255,Ve=Te.g/255,Ye=Te.b/255,Ne=Math.min(De,Ve,Ye),Xe=Math.max(De,Ve,Ye),ht=NaN,st=Xe-Ne,it=(Xe+Ne)/2;return st?(De===Xe?ht=(Ve-Ye)/st+(Ve<Ye)*6:Ve===Xe?ht=(Ye-De)/st+2:ht=(De-Ve)/st+4,st/=it<.5?Xe+Ne:2-Xe-Ne,ht*=60):st=it>0&&it<1?0:ht,new U(ht,st,it,Te.opacity)}function G(Te,De,Ve,Ye){return arguments.length===1?V(Te):new U(Te,De,Ve,Ye??1)}function U(Te,De,Ve,Ye){this.h=+Te,this.s=+De,this.l=+Ve,this.opacity=+Ye}d(U,G,P(a,{brighter:function(De){return De=De==null?x:Math.pow(x,De),new U(this.h,this.s,this.l*De,this.opacity)},darker:function(De){return De=De==null?_:Math.pow(_,De),new U(this.h,this.s,this.l*De,this.opacity)},rgb:function(){var De=this.h%360+(this.h<0)*360,Ve=isNaN(De)||isNaN(this.s)?0:this.s,Ye=this.l,Ne=Ye+(Ye<.5?Ye:1-Ye)*Ve,Xe=2*Ye-Ne;return new S(re(De>=240?De-240:De+120,Xe,Ne),re(De,Xe,Ne),re(De<120?De+240:De-120,Xe,Ne),this.opacity)},clamp:function(){return new U(Y(this.h),ee(this.s),ee(this.l),O(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var De=O(this.opacity);return"".concat(De===1?"hsl(":"hsla(").concat(Y(this.h),", ").concat(ee(this.s)*100,"%, ").concat(ee(this.l)*100,"%").concat(De===1?")":", ".concat(De,")"))}}));function Y(Te){return Te=(Te||0)%360,Te<0?Te+360:Te}function ee(Te){return Math.max(0,Math.min(1,Te||0))}function re(Te,De,Ve){return(Te<60?De+(Ve-De)*Te/60:Te<180?Ve:Te<240?De+(Ve-De)*(240-Te)/60:De)*255}var ie=function(Te){return function(){return Te}};function se(Te,De){return function(Ve){return Te+Ve*De}}function ce(Te,De,Ve){return Te=Math.pow(Te,Ve),De=Math.pow(De,Ve)-Te,Ve=1/Ve,function(Ye){return Math.pow(Te+Ye*De,Ve)}}function q(Te){return(Te=+Te)==1?j:function(De,Ve){return Ve-De?ce(De,Ve,Te):ie(isNaN(De)?Ve:De)}}function j(Te,De){var Ve=De-Te;return Ve?se(Te,Ve):ie(isNaN(Te)?De:Te)}var Z=function Te(De){var Ve=q(De);function Ye(Ne,Xe){var ht=Ve((Ne=C(Ne)).r,(Xe=C(Xe)).r),st=Ve(Ne.g,Xe.g),it=Ve(Ne.b,Xe.b),nt=j(Ne.opacity,Xe.opacity);return function(pt){return Ne.r=ht(pt),Ne.g=st(pt),Ne.b=it(pt),Ne.opacity=nt(pt),Ne+""}}return Ye.gamma=Te,Ye}(1);function Q(Te,De){var Ve=De?De.length:0,Ye=Te?Math.min(Ve,Te.length):0,Ne=new Array(Ye),Xe=new Array(Ve),ht;for(ht=0;ht<Ye;++ht)Ne[ht]=Le(Te[ht],De[ht]);for(;ht<Ve;++ht)Xe[ht]=De[ht];return function(st){for(ht=0;ht<Ye;++ht)Xe[ht]=Ne[ht](st);return Xe}}function ue(Te,De){var Ve=new Date;return Te=+Te,De=+De,function(Ye){return Ve.setTime(Te*(1-Ye)+De*Ye),Ve}}function fe(Te,De){return Te=+Te,De=+De,function(Ve){return Te*(1-Ve)+De*Ve}}function te(Te){return te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(De){return typeof De}:function(De){return De&&typeof Symbol=="function"&&De.constructor===Symbol&&De!==Symbol.prototype?"symbol":typeof De},te(Te)}function ne(Te,De){var Ve={},Ye={},Ne;(Te===null||te(Te)!=="object")&&(Te={}),(De===null||te(De)!=="object")&&(De={});for(Ne in De)Ne in Te?Ve[Ne]=Le(Te[Ne],De[Ne]):Ye[Ne]=De[Ne];return function(Xe){for(Ne in Ve)Ye[Ne]=Ve[Ne](Xe);return Ye}}var ve=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,le=new RegExp(ve.source,"g");function xe(Te){return function(){return Te}}function Se(Te){return function(De){return Te(De)+""}}function Re(Te,De){var Ve=ve.lastIndex=le.lastIndex=0,Ye,Ne,Xe,ht=-1,st=[],it=[];for(Te=Te+"",De=De+"";(Ye=ve.exec(Te))&&(Ne=le.exec(De));)(Xe=Ne.index)>Ve&&(Xe=De.slice(Ve,Xe),st[ht]?st[ht]+=Xe:st[++ht]=Xe),(Ye=Ye[0])===(Ne=Ne[0])?st[ht]?st[ht]+=Ne:st[++ht]=Ne:(st[++ht]=null,it.push({i:ht,x:fe(Ye,Ne)})),Ve=le.lastIndex;return Ve<De.length&&(Xe=De.slice(Ve),st[ht]?st[ht]+=Xe:st[++ht]=Xe),st.length<2?it[0]?Se(it[0].x):xe(De):(De=it.length,function(nt){for(var pt=0,Tt;pt<De;++pt)st[(Tt=it[pt]).i]=Tt.x(nt);return st.join("")})}function Ee(Te,De){De||(De=[]);var Ve=Te?Math.min(De.length,Te.length):0,Ye=De.slice(),Ne;return function(Xe){for(Ne=0;Ne<Ve;++Ne)Ye[Ne]=Te[Ne]*(1-Xe)+De[Ne]*Xe;return Ye}}function Oe(Te){return ArrayBuffer.isView(Te)&&!(Te instanceof DataView)}function Be(Te){return Be=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(De){return typeof De}:function(De){return De&&typeof Symbol=="function"&&De.constructor===Symbol&&De!==Symbol.prototype?"symbol":typeof De},Be(Te)}function Le(Te,De){var Ve=Be(De),Ye;return De==null||Ve==="boolean"?ie(De):(Ve==="number"?fe:Ve==="string"?(Ye=M(De))?(De=Ye,Z):Re:De instanceof M?Z:De instanceof Date?ue:Oe(De)?Ee:Array.isArray(De)?Q:typeof De.valueOf!="function"&&typeof De.toString!="function"||isNaN(De)?ne:fe)(Te,De)}},40402:function(z){z.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},83794:function(z){z.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},96209:function(z){z.exports=JSON.parse('["normal","italic","oblique"]')},15659:function(z){z.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},38732:function(z){z.exports=JSON.parse('["inherit","initial","unset"]')},41901:function(z){z.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')}},W={};function K(z){var B=W[z];if(B!==void 0)return B.exports;var e=W[z]={exports:{}};return w[z].call(e.exports,e,e.exports,K),e.exports}(function(){K.n=function(z){var B=z&&z.__esModule?function(){return z.default}:function(){return z};return K.d(B,{a:B}),B}})(),function(){K.d=function(z,B){for(var e in B)K.o(B,e)&&!K.o(z,e)&&Object.defineProperty(z,e,{enumerable:!0,get:B[e]})}}(),function(){K.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()}(),function(){K.o=function(z,B){return Object.prototype.hasOwnProperty.call(z,B)}}(),function(){K.r=function(z){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(z,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(z,"__esModule",{value:!0})}}();var de=K(27909);return de}()})})(Qz);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=W(LE),w=W(m2);function W(z){return z&&z.__esModule?z:{default:z}}var K=(0,s.default)(w.default),de=K;t.default=de})(CE);const qz=g4(CE),f4=["rgb(31,119,180)","rgb(255,127,14)","rgb(44,160,44)","rgb(214,39,40)","rgb(148,103,189)","rgb(140,86,75)","rgb(227,119,194)","rgb(127,127,127)"],eN={height:window.innerHeight*.7,width:window.innerWidth*.8,font:{color:"#F5EFF3",size:16},annotationdefaults:{showarrow:!1},autotypenumbers:"strict",colorway:["#ffed00","#ef7d00","#e4003a","#c13246","#822661","#48277c","#005ca9","#00aaff","#9b30d9","#af005f","#5f00af","#af87ff"],xaxis:{automargin:!0,autorange:!0,rangeslider:{visible:!1},showgrid:!0,showline:!0,tickfont:{size:14},zeroline:!1,tick0:1,title:{standoff:20},linecolor:"#F5EFF3",mirror:!0,ticks:"outside"},yaxis:{anchor:"x",automargin:!0,fixedrange:!1,zeroline:!1,showgrid:!0,showline:!0,side:"right",tick0:.5,title:{standoff:20},gridcolor:"#283442",linecolor:"#F5EFF3",mirror:!0,ticks:"outside"},plot_bgcolor:"rgba(0,0,0,1)",paper_bgcolor:"rgba(0,0,0,1)",dragmode:"pan"};function tN({values:t}){if(!t)return null;console.log(t);const s=t.map((w,W)=>({x:w.map((K,de)=>de),y:w,type:"bar",showlegend:!1,marker:{color:f4[W],opacity:.6,line:{color:f4[W],width:1.5}}}));return console.log(s),Oa(qz,{data:s,layout:eN,config:{displaylogo:!1,responsive:!0,scrollZoom:!0}})}function rN(t){if(t<10)return t.toFixed(4);if(t<100)return t.toFixed(3);if(t<1e3)return t.toFixed(2);const s=Math.abs(t);return s>=1e9?`${(t/1e9).toFixed(2)}B`:s>=1e6?`${(t/1e6).toFixed(2)}M`:s>=1e3?`${(t/1e3).toFixed(2)}K`:t.toFixed(2)}const c4={small:{overall:"text-sm",header:"text-sm",cell:"text-xs"},medium:{overall:"text-base",header:"text-base",cell:"text-sm"},large:{overall:"text-base",header:"text-lg",cell:"text-base"}},nN=(t,s,w)=>(w.splice(w.indexOf(s),0,w.splice(w.indexOf(t),1)[0]),[...w]),aN=({header:t,table:s,advanced:w})=>{const{getState:W,setColumnOrder:K}=s,{columnOrder:de}=W(),{column:z}=t,[,B]=_z({accept:"column",drop:a=>{const _=nN(a.id,z.id,de);K(_)}}),[{isDragging:e},d,P]=Tz({collect:a=>({isDragging:a.isDragging()}),item:()=>z,type:"column"});return Oa("th",{className:"bg-grey-800 pb-4",colSpan:t.colSpan,style:{width:t.getSize(),opacity:e?.5:1},ref:B,children:Oa("div",{ref:P,children:t.isPlaceholder?null:Ui(h1,{children:[Ui("div",{className:Uv("font-bold uppercase text-white my-2 tracking-normal flex gap-2",{"cursor-pointer select-none":t.column.getCanSort()}),onClick:t.column.getToggleSortingHandler(),children:[s2(t.column.columnDef.header,t.getContext()),Oa("span",{className:"w-4",children:{asc:"🔼",desc:"🔽"}[t.column.getIsSorted()]??null}),w&&Oa("button",{ref:d,children:"🟰"})]}),w&&t.column.getCanFilter()?Oa("div",{children:Oa(oN,{column:t.column,table:s,numberOfColumns:de.length})}):null]})})})};function iN({data:t,columns:s}){var M,L;const[w,W]=Ka.useState("medium"),K=()=>{w==="small"?W("medium"):w==="medium"&&W("large")},de=()=>{w==="large"?W("medium"):w==="medium"&&W("small")},[z,B]=Ka.useState(!1);Ka.useReducer(()=>({}),{})[1];const[e,d]=Ka.useState([]),[P,a]=Ka.useState(""),_=Ka.useMemo(()=>[{id:"select",size:0,header:({table:D})=>Oa(h4,{checked:D.getIsAllRowsSelected(),indeterminate:D.getIsSomeRowsSelected(),onChange:D.getToggleAllRowsSelectedHandler()}),cell:({row:D})=>Oa("div",{className:"px-1",children:Oa(h4,{checked:D.getIsSelected(),disabled:!D.getCanSelect(),indeterminate:D.getIsSomeSelected(),onChange:D.getToggleSelectedHandler()})})},...s.map(D=>({accessorKey:D,id:D,header:D,footer:D,cell:({row:A})=>{const C=A.original[D],S=typeof C,o=D.toLowerCase().includes("date")||D.toLowerCase()==="index";if(S==="string"&&C.startsWith("http"))return Oa("a",{className:"_hyper-link",href:C,target:"_blank",rel:"noreferrer",children:C});if(o){if(typeof C=="string")return Oa("p",{children:C});try{var T=new Date(C).toISOString();return T=T.split("T")[0]+" "+T.split("T")[1].split(".")[0],Oa("p",{children:T})}catch{return Oa("p",{children:C})}}const O=S==="number"?rN(C):C;return Oa("p",{className:Uv("whitespace-nowrap",{"text-[#16A34A]":C>0,"text-[#F87171]":C<0,"text-[#404040]":C===0}),children:C!==0?C>0?`${O}`:`${O}`:O})}}))],[]),[x,v]=Ka.useState(_.map(D=>D.id)),y=()=>v(s.map(D=>D.id)),r=XL({data:t,defaultColumn:{minSize:0,size:0},columns:_,state:{sorting:e,globalFilter:P,columnOrder:x},onColumnOrderChange:v,onSortingChange:d,getCoreRowModel:kL(),getSortedRowModel:UL(),getFilteredRowModel:BL(),getPaginationRowModel:VL(),onGlobalFilterChange:a}),n=Ka.useRef(null),{rows:u}=r.getRowModel(),i=Vz({parentRef:n,size:u.length,overscan:10}),{virtualItems:f,totalSize:g}=i,h=f.length>0&&((M=f==null?void 0:f[0])==null?void 0:M.start)||0,b=f.length>0?g-(((L=f==null?void 0:f[f.length-1])==null?void 0:L.end)||0):0,p=(D,A)=>{const C=URL.createObjectURL(D),S=document.createElement("a");S.setAttribute("href",C),S.setAttribute("download",A),S.style.visibility="hidden",document.body.appendChild(S),S.click(),document.body.removeChild(S)},E=D=>{const A=s,C=t.map(o=>A.map(R=>o[R])),S=[A,...C];if(D==="csv"){const o=S.map(T=>T.join(",")).join(`
`),R=new Blob([o],{type:"text/csv;charset=utf-8;"});p(R,`${window.title}.csv`)}else{const o=tx.book_new(),R=tx.aoa_to_sheet(S);tx.book_append_sheet(o,R,"Sheet1"),Sk(o,`${window.title}.xlsx`)}},c=()=>{const D=document.getElementById("table");Xz.toBlob(D).then(function(A){p(A,`${window.title}.png`)})},[l,m]=Ka.useState(null);return Ui(h1,{children:[l&&Ui(h1,{children:[Oa("div",{onClick:()=>m(null),className:"fixed inset-0 bg-black bg-opacity-50 z-40 backdrop-filter backdrop-blur-sm"}),Oa("div",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 z-50 bg-grey-500",children:Oa(tN,{values:l.values})})]}),Ui("div",{ref:n,className:Uv("overflow-auto max-w-full max-h-full"),children:[Ui("div",{className:"flex gap-2 items-center justify-between h-20",children:[Ui("div",{className:"flex gap-10",children:[Ui("svg",{viewBox:"0 0 126 34",width:"126",height:"34",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"OpenBB",children:[Oa("title",{id:"OpenBB",children:"OpenBB"}),Oa("g",{fill:"currentColor",children:Oa("path",{d:"M60.707 1.416h-9.285v4.25h9.285v1.42h-7.854v4.25h9.283V1.423h-1.428l-.001-.007Zm0 7.793v.707H54.28V8.5h6.427v.709Zm0-5.668v.71h-7.854V2.831h7.855l-.001.71ZM69.99 11.333h2.852V7.087H64.99V5.671h9.285V1.42H63.562v9.913h6.428Zm-5-7.791v-.709h7.852V4.25H64.99v-.709Zm2.858 6.375H64.99V8.5h6.438v1.417h-3.58ZM63.563 0h-1.428v1.416h1.428V0ZM78.519 22.72v8.459l-.712-.704-.71-.706-.71-.704-.71-.706-.712-.704-.712-.705-.71-.704-.71-.706-.71-.706-.712-.704-.71-.704-.711-.705h-1.422V33.998h1.422V24.834l.711.706.71.706.711.704.71.705.712.704.71.706.71.704.712.706.71.704.712.705.71.706.71.704.71.704h.712V22.721H78.52ZM101.402 26.95h-1.421v-4.23h-8.528V34h11.374v-7.057h-1.422l-.003.007Zm-8.528-.71v-2.11h5.685v2.82h-5.685v-.71Zm8.528 2.82v3.528h-8.528v-4.227h8.528v.699ZM124.986 26.95h-2.131v-4.23h-8.529V34h11.37v-7.057l-.71.007Zm-9.239-.71v-2.11h5.687v2.82h-5.687v-.71Zm8.53 2.82v3.528h-8.53v-4.227h8.53v.699ZM55.732 22.72H45.78v11.278H57.15V32.59H47.204v-2.821H55.728v-1.41h-8.524V24.13H57.15V22.721h-1.418ZM9.95 22.72H.003V34h11.372V22.72H9.95Zm0 2.116v7.754H1.423v-8.46H9.95v.706ZM32.855 22.721h-9.949v11.28h1.422V29.77h9.948v-7.057h-1.421v.008Zm0 2.116v3.528h-8.527v-4.234h8.527v.706Z"})})]}),Ui("div",{children:[Oa("label",{htmlFor:"advanced",children:"Advanced"}),Oa("input",{id:"advanced",type:"checkbox",checked:z,onChange:()=>B(!z)})]})]}),z&&Ui(h1,{children:[Ui("div",{className:"p-2 flex gap-2",children:[Oa("label",{htmlFor:"search",children:"Search:"}),Oa(sN,{id:"search",value:P??"",onChange:D=>a(String(D)),className:"_input",placeholder:"Search all columns..."})]}),Oa("button",{onClick:()=>y(),className:"_btn",children:"Reset Order"}),Ui("div",{className:"flex gap-2",children:[Oa("button",{onClick:de,className:"_btn",children:"Decrease font"}),Oa("button",{onClick:K,className:"_btn",children:"Increase font"})]}),Ui("div",{className:"p-2 border border-black shadow rounded grid grid-cols-4",children:[Oa("div",{className:"px-1 border-b border-black",children:Ui("label",{children:[Oa("input",{type:"checkbox",checked:r.getIsAllColumnsVisible(),onChange:r.getToggleAllColumnsVisibilityHandler(),className:"mr-1"}),"Toggle All"]})}),r.getAllLeafColumns().map(D=>Oa("div",{className:"px-1",children:Ui("label",{children:[Oa("input",{type:"checkbox",checked:D.getIsVisible(),onChange:D.getToggleVisibilityHandler(),className:"mr-1"}),D.id]})},D.id))]})]})]}),Ui("table",{id:"table",className:Uv("w-full my-4",c4[w].overall),children:[Oa("thead",{children:r.getHeaderGroups().map(D=>Oa("tr",{className:Uv("!h-10 text-left",c4[w].header),children:D.headers.map(A=>Oa(aN,{advanced:z,header:A,table:r},A.id))},D.id))}),Ui("tbody",{children:[h>0&&Oa("tr",{children:Oa("td",{style:{height:`${h}px`}})}),f.map((D,A)=>{const C=u[D.index];return Oa("tr",{className:"!h-10",children:C.getVisibleCells().map(S=>Oa("td",{className:Uv("bg-grey-800",{"bg-white/5":A%2===0}),children:s2(S.column.columnDef.cell,S.getContext())},S.id))},C.id)}),b>0&&Oa("tr",{children:Oa("td",{style:{height:`${b}px`}})})]}),Oa("tfoot",{children:r.getFooterGroups().map(D=>Oa("tr",{children:D.headers.map(A=>Oa("th",{colSpan:A.colSpan,className:"text-white font-normal text-left opacity-50",children:A.isPlaceholder?null:s2(A.column.columnDef.footer,A.getContext())},A.id))},D.id))})]}),Ui("div",{className:"flex gap-10 items-center py-2",children:[z&&Ui("div",{className:"flex items-center gap-2",children:[Oa("button",{className:"_icon-btn",onClick:()=>r.setPageIndex(0),disabled:!r.getCanPreviousPage(),children:"<<"}),Oa("button",{className:"_icon-btn",onClick:()=>r.previousPage(),disabled:!r.getCanPreviousPage(),children:"<"}),Oa("button",{className:"_icon-btn",onClick:()=>r.nextPage(),disabled:!r.getCanNextPage(),children:">"}),Oa("button",{className:"_icon-btn",onClick:()=>r.setPageIndex(r.getPageCount()-1),disabled:!r.getCanNextPage(),children:">>"}),Ui("span",{className:"flex items-center gap-1",children:[Oa("div",{children:"Page"}),Ui("strong",{children:[r.getState().pagination.pageIndex+1," of"," ",r.getPageCount()]})]}),Ui("span",{className:"flex items-center gap-1",children:["| Go to page:",Oa("input",{type:"number",defaultValue:r.getState().pagination.pageIndex+1,onChange:D=>{const A=D.target.value?Number(D.target.value)-1:0;r.setPageIndex(A)},className:"border p-1 rounded w-16"})]}),Oa("select",{className:"_input bg-gray-600",value:r.getState().pagination.pageSize,onChange:D=>{r.setPageSize(Number(D.target.value))},children:[10,20,30,40,50].map(D=>Ui("option",{value:D,children:["Show ",D]},D))})]}),Ui("button",{className:"_btn",onClick:()=>c(),children:[Oa("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-6 h-6",children:Oa("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"})}),"Download as png"]}),Ui("button",{className:"_btn",onClick:()=>E("csv"),children:[Oa("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-6 h-6",children:Oa("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),"Export to csv"]}),Ui("button",{className:"_btn",onClick:()=>E("xlsx"),children:[Oa("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-6 h-6",children:Oa("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),"Export to xlsx"]}),Ui("button",{className:"_btn",onClick:()=>{const A=r.getSelectedRowModel().flatRows.map(C=>Object.values(C.original));m({values:A})},children:[Oa("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-6 h-6",children:Oa("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 14.25v2.25m3-4.5v4.5m3-6.75v6.75m3-9v9M6 20.25h12A2.25 2.25 0 0020.25 18V6A2.25 2.25 0 0018 3.75H6A2.25 2.25 0 003.75 6v12A2.25 2.25 0 006 20.25z"})}),"Generate chart"]})]})]})]})}function oN({column:t,table:s,numberOfColumns:w}){var z;const W=(z=s.getPreFilteredRowModel().flatRows[0])==null?void 0:z.getValue(t.id),K=t.getFilterValue();if(t.id.toLowerCase().includes("date")||t.id.toLowerCase()==="index"){let B=function(e){if(!e)return null;const d=new Date(e),P=d.getFullYear(),a=d.getMonth()+1>9?d.getMonth()+1:`0${d.getMonth()+1}`,_=d.getDate()>9?d.getDate():`0${d.getDate()}`;return`${P}-${a}-${_}`};return Ui("div",{className:"flex space-x-2",children:[Oa("input",{type:"date",value:B(K==null?void 0:K[0])??"",onChange:e=>{const d=new Date(e.target.value).getTime();t.setFilterValue(P=>[d,P==null?void 0:P[1]])},placeholder:"Start date",className:"_input"}),Oa("input",{type:"date",value:B(K==null?void 0:K[1])??"",onChange:e=>{const d=new Date(e.target.value).getTime();t.setFilterValue(P=>[P==null?void 0:P[0],d])},placeholder:"End date",className:"_input"})]})}return typeof W=="number"?Ui("div",{className:Uv("flex space-x-2",{"flex-col":w>4,"flex-row":w<=4}),children:[Oa("input",{type:"number",value:(K==null?void 0:K[0])??"",onChange:B=>t.setFilterValue(e=>[B.target.value,e==null?void 0:e[1]]),placeholder:"Min",className:"_input"}),Oa("input",{type:"number",value:(K==null?void 0:K[1])??"",onChange:B=>t.setFilterValue(e=>[e==null?void 0:e[0],B.target.value]),placeholder:"Max",className:"_input"})]}):Oa("input",{type:"text",value:K??"",onChange:B=>t.setFilterValue(B.target.value),placeholder:"Search...",className:"_input"})}const sN=({value:t,onChange:s,debounce:w=500,...W})=>{const[K,de]=Ka.useState(t),z=B=>de(B.target.value);return Ka.useEffect(()=>{de(t)},[t]),Ka.useEffect(()=>{const B=setTimeout(()=>{s(K)},w);return()=>clearTimeout(B)},[K]),Oa("input",{...W,value:K,onChange:z})};function h4({indeterminate:t,className:s="",...w}){const W=Ka.useRef(null);return Ka.useEffect(()=>{typeof t=="boolean"&&(W.current.indeterminate=!w.checked&&t)},[W,t]),Oa("input",{type:"checkbox",ref:W,className:s+" cursor-pointer",...w})}function RE(t){let s=null;return()=>(s==null&&(s=t()),s)}function lN(t,s){return t.filter(w=>w!==s)}function uN(t,s){const w=new Set,W=de=>w.add(de);t.forEach(W),s.forEach(W);const K=[];return w.forEach(de=>K.push(de)),K}class fN{enter(s){const w=this.entered.length,W=K=>this.isNodeInDocument(K)&&(!K.contains||K.contains(s));return this.entered=uN(this.entered.filter(W),[s]),w===0&&this.entered.length>0}leave(s){const w=this.entered.length;return this.entered=lN(this.entered.filter(this.isNodeInDocument),s),w>0&&this.entered.length===0}reset(){this.entered=[]}constructor(s){this.entered=[],this.isNodeInDocument=s}}class cN{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(s=>{Object.defineProperty(this.item,s,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${s}" until the drop event.`),null}})})}loadDataTransfer(s){if(s){const w={};Object.keys(this.config.exposeProperties).forEach(W=>{const K=this.config.exposeProperties[W];K!=null&&(w[W]={value:K(s,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,w)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(s,w){return w===s.getSourceId()}endDrag(){}constructor(s){this.config=s,this.item={},this.initializeExposedProperties()}}const DE="__NATIVE_FILE__",IE="__NATIVE_URL__",FE="__NATIVE_TEXT__",kE="__NATIVE_HTML__",v4=Object.freeze(Object.defineProperty({__proto__:null,FILE:DE,HTML:kE,TEXT:FE,URL:IE},Symbol.toStringTag,{value:"Module"}));function ox(t,s,w){const W=s.reduce((K,de)=>K||t.getData(de),"");return W??w}const x2={[DE]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[kE]:{exposeProperties:{html:(t,s)=>ox(t,s,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[IE]:{exposeProperties:{urls:(t,s)=>ox(t,s,"").split(`
`),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[FE]:{exposeProperties:{text:(t,s)=>ox(t,s,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function hN(t,s){const w=x2[t];if(!w)throw new Error(`native type ${t} has no configuration`);const W=new cN(w);return W.loadDataTransfer(s),W}function sx(t){if(!t)return null;const s=Array.prototype.slice.call(t.types||[]);return Object.keys(x2).filter(w=>{const W=x2[w];return W!=null&&W.matchesTypes?W.matchesTypes.some(K=>s.indexOf(K)>-1):!1})[0]||null}const vN=RE(()=>/firefox/i.test(navigator.userAgent)),OE=RE(()=>Boolean(window.safari));class d4{interpolate(s){const{xs:w,ys:W,c1s:K,c2s:de,c3s:z}=this;let B=w.length-1;if(s===w[B])return W[B];let e=0,d=z.length-1,P;for(;e<=d;){P=Math.floor(.5*(e+d));const x=w[P];if(x<s)e=P+1;else if(x>s)d=P-1;else return W[P]}B=Math.max(0,d);const a=s-w[B],_=a*a;return W[B]+K[B]*a+de[B]*_+z[B]*a*_}constructor(s,w){const{length:W}=s,K=[];for(let x=0;x<W;x++)K.push(x);K.sort((x,v)=>s[x]<s[v]?-1:1);const de=[],z=[];let B,e;for(let x=0;x<W-1;x++)B=s[x+1]-s[x],e=w[x+1]-w[x],de.push(B),z.push(e/B);const d=[z[0]];for(let x=0;x<de.length-1;x++){const v=z[x],y=z[x+1];if(v*y<=0)d.push(0);else{B=de[x];const r=de[x+1],n=B+r;d.push(3*n/((n+r)/v+(n+B)/y))}}d.push(z[z.length-1]);const P=[],a=[];let _;for(let x=0;x<d.length-1;x++){_=z[x];const v=d[x],y=1/de[x],r=v+d[x+1]-_-_;P.push((_-v-r)*y),a.push(r*y*y)}this.xs=s,this.ys=w,this.c1s=d,this.c2s=P,this.c3s=a}}const dN=1;function zE(t){const s=t.nodeType===dN?t:t.parentElement;if(!s)return null;const{top:w,left:W}=s.getBoundingClientRect();return{x:W,y:w}}function u1(t){return{x:t.clientX,y:t.clientY}}function pN(t){var s;return t.nodeName==="IMG"&&(vN()||!(!((s=document.documentElement)===null||s===void 0)&&s.contains(t)))}function gN(t,s,w,W){let K=t?s.width:w,de=t?s.height:W;return OE()&&t&&(de/=window.devicePixelRatio,K/=window.devicePixelRatio),{dragPreviewWidth:K,dragPreviewHeight:de}}function yN(t,s,w,W,K){const de=pN(s),B=zE(de?t:s),e={x:w.x-B.x,y:w.y-B.y},{offsetWidth:d,offsetHeight:P}=t,{anchorX:a,anchorY:_}=W,{dragPreviewWidth:x,dragPreviewHeight:v}=gN(de,s,d,P),y=()=>{let h=new d4([0,.5,1],[e.y,e.y/P*v,e.y+v-P]).interpolate(_);return OE()&&de&&(h+=(window.devicePixelRatio-1)*v),h},r=()=>new d4([0,.5,1],[e.x,e.x/d*x,e.x+x-d]).interpolate(a),{offsetX:n,offsetY:u}=K,i=n===0||n,f=u===0||u;return{x:i?n:r(),y:f?u:y()}}class mN{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var s;return!((s=this.globalContext)===null||s===void 0)&&s.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var s;return((s=this.optionsArgs)===null||s===void 0?void 0:s.rootElement)||this.window}constructor(s,w){this.ownerDocument=null,this.globalContext=s,this.optionsArgs=w}}function xN(t,s,w){return s in t?Object.defineProperty(t,s,{value:w,enumerable:!0,configurable:!0,writable:!0}):t[s]=w,t}function p4(t){for(var s=1;s<arguments.length;s++){var w=arguments[s]!=null?arguments[s]:{},W=Object.keys(w);typeof Object.getOwnPropertySymbols=="function"&&(W=W.concat(Object.getOwnPropertySymbols(w).filter(function(K){return Object.getOwnPropertyDescriptor(w,K).enumerable}))),W.forEach(function(K){xN(t,K,w[K])})}return t}class bN{profile(){var s,w;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((s=this.dragStartSourceIds)===null||s===void 0?void 0:s.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((w=this.dragOverTargetIds)===null||w===void 0?void 0:w.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const s=this.rootElement;if(s!==void 0){if(s.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");s.__isReactDndBackendSetUp=!0,this.addEventListeners(s)}}teardown(){const s=this.rootElement;if(s!==void 0&&(s.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var w;(w=this.window)===null||w===void 0||w.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(s,w,W){return this.sourcePreviewNodeOptions.set(s,W),this.sourcePreviewNodes.set(s,w),()=>{this.sourcePreviewNodes.delete(s),this.sourcePreviewNodeOptions.delete(s)}}connectDragSource(s,w,W){this.sourceNodes.set(s,w),this.sourceNodeOptions.set(s,W);const K=z=>this.handleDragStart(z,s),de=z=>this.handleSelectStart(z);return w.setAttribute("draggable","true"),w.addEventListener("dragstart",K),w.addEventListener("selectstart",de),()=>{this.sourceNodes.delete(s),this.sourceNodeOptions.delete(s),w.removeEventListener("dragstart",K),w.removeEventListener("selectstart",de),w.setAttribute("draggable","false")}}connectDropTarget(s,w){const W=z=>this.handleDragEnter(z,s),K=z=>this.handleDragOver(z,s),de=z=>this.handleDrop(z,s);return w.addEventListener("dragenter",W),w.addEventListener("dragover",K),w.addEventListener("drop",de),()=>{w.removeEventListener("dragenter",W),w.removeEventListener("dragover",K),w.removeEventListener("drop",de)}}addEventListeners(s){s.addEventListener&&(s.addEventListener("dragstart",this.handleTopDragStart),s.addEventListener("dragstart",this.handleTopDragStartCapture,!0),s.addEventListener("dragend",this.handleTopDragEndCapture,!0),s.addEventListener("dragenter",this.handleTopDragEnter),s.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),s.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),s.addEventListener("dragover",this.handleTopDragOver),s.addEventListener("dragover",this.handleTopDragOverCapture,!0),s.addEventListener("drop",this.handleTopDrop),s.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(s){s.removeEventListener&&(s.removeEventListener("dragstart",this.handleTopDragStart),s.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),s.removeEventListener("dragend",this.handleTopDragEndCapture,!0),s.removeEventListener("dragenter",this.handleTopDragEnter),s.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),s.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),s.removeEventListener("dragover",this.handleTopDragOver),s.removeEventListener("dragover",this.handleTopDragOverCapture,!0),s.removeEventListener("drop",this.handleTopDrop),s.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const s=this.monitor.getSourceId(),w=this.sourceNodeOptions.get(s);return p4({dropEffect:this.altKeyPressed?"copy":"move"},w||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const s=this.monitor.getSourceId(),w=this.sourcePreviewNodeOptions.get(s);return p4({anchorX:.5,anchorY:.5,captureDraggingState:!1},w||{})}isDraggingNativeItem(){const s=this.monitor.getItemType();return Object.keys(v4).some(w=>v4[w]===s)}beginDragNativeItem(s,w){this.clearCurrentDragSourceNode(),this.currentNativeSource=hN(s,w),this.currentNativeHandle=this.registry.addSource(s,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(s){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=s;const w=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var W;return(W=this.rootElement)===null||W===void 0?void 0:W.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},w)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var s;(s=this.window)===null||s===void 0||s.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(s,w){s.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(w))}handleDragEnter(s,w){this.dragEnterTargetIds.unshift(w)}handleDragOver(s,w){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(w)}handleDrop(s,w){this.dropTargetIds.unshift(w)}constructor(s,w,W){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=K=>{const de=this.sourceNodes.get(K);return de&&zE(de)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=K=>Boolean(K&&this.document&&this.document.body&&this.document.body.contains(K)),this.endDragIfSourceWasRemovedFromDOM=()=>{const K=this.currentDragSourceNode;K==null||this.isNodeInDocument(K)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=K=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(K||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=K=>{if(K.defaultPrevented)return;const{dragStartSourceIds:de}=this;this.dragStartSourceIds=null;const z=u1(K);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(de||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:z});const{dataTransfer:B}=K,e=sx(B);if(this.monitor.isDragging()){if(B&&typeof B.setDragImage=="function"){const P=this.monitor.getSourceId(),a=this.sourceNodes.get(P),_=this.sourcePreviewNodes.get(P)||a;if(_){const{anchorX:x,anchorY:v,offsetX:y,offsetY:r}=this.getCurrentSourcePreviewNodeOptions(),i=yN(a,_,z,{anchorX:x,anchorY:v},{offsetX:y,offsetY:r});B.setDragImage(_,i.x,i.y)}}try{B==null||B.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(K.target);const{captureDraggingState:d}=this.getCurrentSourcePreviewNodeOptions();d?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(e)this.beginDragNativeItem(e);else{if(B&&!B.types&&(K.target&&!K.target.hasAttribute||!K.target.hasAttribute("draggable")))return;K.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=K=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var de;(de=this.currentNativeSource)===null||de===void 0||de.loadDataTransfer(K.dataTransfer)}if(!this.enterLeaveCounter.enter(K.target)||this.monitor.isDragging())return;const{dataTransfer:B}=K,e=sx(B);e&&this.beginDragNativeItem(e,B)},this.handleTopDragEnter=K=>{const{dragEnterTargetIds:de}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=K.altKey,de.length>0&&this.actions.hover(de,{clientOffset:u1(K)}),de.some(B=>this.monitor.canDropOnTarget(B))&&(K.preventDefault(),K.dataTransfer&&(K.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=K=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var de;(de=this.currentNativeSource)===null||de===void 0||de.loadDataTransfer(K.dataTransfer)}},this.handleTopDragOver=K=>{const{dragOverTargetIds:de}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){K.preventDefault(),K.dataTransfer&&(K.dataTransfer.dropEffect="none");return}this.altKeyPressed=K.altKey,this.lastClientOffset=u1(K),this.scheduleHover(de),(de||[]).some(B=>this.monitor.canDropOnTarget(B))?(K.preventDefault(),K.dataTransfer&&(K.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?K.preventDefault():(K.preventDefault(),K.dataTransfer&&(K.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=K=>{this.isDraggingNativeItem()&&K.preventDefault(),this.enterLeaveCounter.leave(K.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=K=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var de;K.preventDefault(),(de=this.currentNativeSource)===null||de===void 0||de.loadDataTransfer(K.dataTransfer)}else sx(K.dataTransfer)&&K.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=K=>{const{dropTargetIds:de}=this;this.dropTargetIds=[],this.actions.hover(de,{clientOffset:u1(K)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=K=>{const de=K.target;typeof de.dragDrop=="function"&&(de.tagName==="INPUT"||de.tagName==="SELECT"||de.tagName==="TEXTAREA"||de.isContentEditable||(K.preventDefault(),de.dragDrop()))},this.options=new mN(w,W),this.actions=s.getActions(),this.monitor=s.getMonitor(),this.registry=s.getRegistry(),this.enterLeaveCounter=new fN(this.isNodeInDocument)}}const wN=function(s,w,W){return new bN(s,w,W)};function TN(){const[t,s]=Ka.useState(null);Ka.useEffect(()=>{const K=setInterval(()=>{window.json_data&&(console.log(window.json_data),s(JSON.parse(window.json_data)),clearInterval(K))},100);return()=>clearInterval(K)},[]);const W=(K=>{var a;if(!K)return null;let de=(a=K.title)==null?void 0:a.replace(/<b>|<\/b>/g,"").replace(/ /g,"_"),z=new Date().toISOString().slice(0,10).replace(/-/g,""),B=new Date().toISOString().slice(11,19).replace(/:/g,"");window.title=`openbb_${de}_${z}_${B}`;const e=K.columns;K.index;const P=K.data.map((_,x)=>{const v={};return _.forEach((y,r)=>{v[e[r]]=y}),v});return{columns:e,data:P}})(t);return Ui("div",{className:"relative h-full p-4",children:[Oa("div",{className:"absolute bottom-0 right-0 flex gap-2"}),Oa(qO,{backend:wN,children:W&&Oa(iN,{data:W.data,columns:W.columns})})]})}lx.createRoot(document.getElementById("root")).render(Oa(Ao.StrictMode,{children:Oa(TN,{})}));
</script>
<style>
*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }._input{width:100%;border-radius:.375rem;border-width:1px;border-color:#5a5a5a;background-color:transparent;padding:.25rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._input:hover{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}._input:focus{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity));--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}._input:active{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}._input:disabled{border-color:#5a5a5a}._btn{display:inline-flex;width:100%;align-items:center;justify-content:center;gap:.5rem;white-space:nowrap;border-radius:.25rem;padding:.5rem 1.5rem;text-align:center;text-decoration-line:none!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-timing-function:cubic-bezier(0,0,.2,1)}@media (min-width: 768px){._btn{width:-moz-fit-content;width:fit-content}}._btn{background-color:#2a2a2a;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._btn:hover{background-color:#5a5a5a}._btn:focus{outline-style:solid;outline-width:2px;outline-color:gray}._btn:disabled{background-color:#c8c8c8;color:gray}._btn:disabled:active{background-color:#c8c8c8;color:gray}@media (prefers-color-scheme: dark){._btn{background-color:#eaeaea;color:#2a2a2a}._btn:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}._btn:active{background-color:#dcdcdc}._btn:active:hover{color:#070707}}._icon-btn{display:inline-flex;width:100%;align-items:center;justify-content:center;gap:.5rem;white-space:nowrap;border-radius:.25rem;padding:.5rem 1.5rem;text-align:center;text-decoration-line:none!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-timing-function:cubic-bezier(0,0,.2,1)}@media (min-width: 768px){._icon-btn{width:-moz-fit-content;width:fit-content}}._icon-btn{background-color:#070707;color:#f6f6f6}._icon-btn:hover{background-color:#2a2a2a;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._icon-btn:focus{background-color:#070707;outline-style:solid;outline-width:2px;outline-color:gray}._icon-btn:active{background-color:#474747;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._icon-btn:disabled{background-color:gray;color:#474747}._hyper-link{--tw-text-opacity: 1;color:rgb(180 125 160 / var(--tw-text-opacity));text-decoration-line:underline}._hyper-link:hover{--tw-text-opacity: 1;color:rgb(155 81 129 / var(--tw-text-opacity))}._hyper-link:active{--tw-text-opacity: 1;color:rgb(130 38 97 / var(--tw-text-opacity))}._hyper-link:disabled{color:#5a5a5a}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0px;right:0px;bottom:0px;left:0px}.bottom-0{bottom:0px}.left-1\/2{left:50%}.right-0{right:0px}.top-1\/2{top:50%}.z-40{z-index:40}.z-50{z-index:50}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.mr-1{margin-right:.25rem}.flex{display:flex}.\!table{display:table!important}.table{display:table}.grid{display:grid}.hidden{display:none}.\!h-10{height:2.5rem!important}.h-20{height:5rem}.h-6{height:1.5rem}.h-full{height:100%}.max-h-full{max-height:100%}.w-16{width:4rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-full{width:100%}.max-w-full{max-width:100%}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.overflow-auto{overflow:auto}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-black{--tw-border-opacity: 1;border-color:rgb(0 0 0 / var(--tw-border-opacity))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-grey-500{background-color:gray}.bg-grey-800{background-color:#2a2a2a}.bg-white\/5{background-color:#ffffff0d}.bg-opacity-50{--tw-bg-opacity: .5}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.text-left{text-align:left}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-normal{font-weight:400}.uppercase{text-transform:uppercase}.tracking-normal{letter-spacing:0em}.text-\[\#16A34A\]{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-\[\#404040\]{--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity))}.text-\[\#F87171\]{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.opacity-50{opacity:.5}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}
</style>
</head>
<body>
<div id="root"></div>
</body>
</html>