diff --git a/frontend-components/plotly/src/components/Chart.tsx b/frontend-components/plotly/src/components/Chart.tsx index c2d2258d98b..9a2525d75fd 100644 --- a/frontend-components/plotly/src/components/Chart.tsx +++ b/frontend-components/plotly/src/components/Chart.tsx @@ -35,10 +35,9 @@ export default function Chart({ }) { const posthog = usePostHog(); - if (info) - useEffect(() => { - if (posthog) posthog.capture("chart", info); - }, [posthog]); + useEffect(() => { + if (posthog) posthog.capture("chart", info); + }, [info]); delete json.layout.width; delete json.layout.height; @@ -51,10 +50,10 @@ export default function Chart({ const [chartTitle, setChartTitle] = useState(title); const [axesTitles, setAxesTitles] = useState({}); const [plotLoaded, setPlotLoaded] = useState(false); - const [modal, setModal] = useState({ modal: "" }); + const [modal, setModal] = useState({ name: "" }); const [loading, setLoading] = useState(false); const [plotDiv, setPlotDiv] = useState(null); - const [Volume, setVolume] = useState({ old_nticks: {} }); + const [volumeBars, setVolumeBars] = useState({ old_nticks: {} }); const [plotData, setPlotData] = useState(json); const [annotations, setAnnotations] = useState([]); @@ -65,7 +64,7 @@ export default function Chart({ const [colorActive, setColorActive] = useState(false); const [onAnnotationClick, setOnAnnotationClick] = useState({}); - const onClose = () => setModal({ modal: "" }); + const onClose = () => setModal({ name: "" }); // @ts-ignore function onDeleteAnnotation(annotation) { @@ -96,16 +95,18 @@ export default function Chart({ }); } - if (axesTitles && Object.keys(axesTitles).length > 0) { - Object.keys(axesTitles).forEach((k) => { - plotData.layout[k].title = { - ...(plotData.layout[k].title || {}), - text: axesTitles[k], - }; - plotData.layout[k].showticklabels = true; - }); - setAxesTitles({}); - } + useEffect(() => { + if (axesTitles && Object.keys(axesTitles).length > 0) { + Object.keys(axesTitles).forEach((k) => { + plotData.layout[k].title = { + ...(plotData.layout[k].title || {}), + text: axesTitles[k], + }; + plotData.layout[k].showticklabels = true; + }); + setAxesTitles({}); + } + }, [axesTitles]); function onChangeColor(color) { // updates the color of the last added shape @@ -337,14 +338,14 @@ export default function Chart({ } window.addEventListener("resize", async function () { - let update = await ResizeHandler({ plotData, Volume }); + let update = await ResizeHandler({ plotData, volumeBars }); let layout_update = update.layout_update; let newPlotData = update.plotData; let volume_update = update.volume_update; if (Object.keys(layout_update).length > 0) { setPlotData(newPlotData); - setVolume(volume_update); + setVolumeBars(volume_update); Plotly.relayout(plotDiv, layout_update); } }); @@ -386,7 +387,7 @@ export default function Chart({ }} plotlyData={plotData} setLoading={setLoading} - open={modal.modal === "overlayChart"} + open={modal.name === "overlayChart"} close={onClose} /> setAxesTitles(axesTitles)} defaultTitle={chartTitle} plotlyData={plotData} - open={modal.modal === "titleDialog"} + open={modal.name === "titleDialog"} close={onClose} /> onAddAnnotation(data)} deleteAnnotation={(data) => onDeleteAnnotation(data)} diff --git a/frontend-components/plotly/src/components/PlotlyConfig.tsx b/frontend-components/plotly/src/components/PlotlyConfig.tsx index 7ff1d17cfa9..a42c13f62f8 100644 --- a/frontend-components/plotly/src/components/PlotlyConfig.tsx +++ b/frontend-components/plotly/src/components/PlotlyConfig.tsx @@ -31,7 +31,7 @@ export function PlotConfig({ Loading, changeColor, }: { - setModal: (modal: { modal: string; data?: any }) => void; + setModal: (modal: { name: string; data?: any }) => void; changeTheme: (change: boolean) => void; autoScaling: (change: boolean) => void; Loading: (change: boolean) => void; @@ -40,21 +40,21 @@ export function PlotConfig({ useHotkeys( "ctrl+shift+t", () => { - setModal({ modal: "titleDialog" }); + setModal({ name: "titleDialog" }); }, { preventDefault: true } ); useHotkeys( "ctrl+t", () => { - setModal({ modal: "textDialog" }); + setModal({ name: "textDialog" }); }, { preventDefault: true } ); useHotkeys( "ctrl+o", () => { - setModal({ modal: "overlayChart" }); + setModal({ name: "overlayChart" }); }, { preventDefault: true } ); @@ -75,7 +75,7 @@ export function PlotConfig({ useHotkeys( "ctrl+shift+s", async () => { - setModal({ modal: "downloadCsv" }); + setModal({ name: "downloadCsv" }); await downloadCSV(document.getElementById("plotlyChart") as any); }, { preventDefault: true } @@ -96,7 +96,6 @@ export function PlotConfig({ { preventDefault: true } ); - const CONFIG = { plotGlPixelRatio: 1, scrollZoom: true, @@ -110,7 +109,7 @@ export function PlotConfig({ name: "Download CSV (Ctrl+Shift+S)", icon: ICONS.downloadCsv, click: async function (gd: any) { - setModal({ modal: "downloadCsv" }); + setModal({ name: "downloadCsv" }); await downloadCSV(gd); }, }, @@ -149,21 +148,21 @@ export function PlotConfig({ name: "Overlay chart from CSV (Ctrl+O)", icon: ICONS.plotCsv, click: function () { - setModal({ modal: "overlayChart" }); + setModal({ name: "overlayChart" }); }, }, { name: "Add Text (Ctrl+T)", icon: ICONS.addText, click: function () { - setModal({ modal: "textDialog", data: { text: "" } }); + setModal({ name: "textDialog", data: { text: "" } }); }, }, { name: "Change Titles (Ctrl+Shift+T)", icon: ICONS.changeTitle, click: function () { - setModal({ modal: "titleDialog" }); + setModal({ name: "titleDialog" }); }, }, { diff --git a/frontend-components/plotly/src/utils/addAnnotation.tsx b/frontend-components/plotly/src/utils/addAnnotation.tsx index be508937ece..5550284c225 100644 --- a/frontend-components/plotly/src/utils/addAnnotation.tsx +++ b/frontend-components/plotly/src/utils/addAnnotation.tsx @@ -130,7 +130,7 @@ export function init_annotation({ plotData: Figure; popupData: Partial; setPlotData: (plotData: Partial
) => void; - setModal: (modal: { modal: string; data?: any }) => void; + setModal: (modal: { name: string; data?: any }) => void; onAnnotationClick: any; setOnAnnotationClick: (onAnnotationClick: any) => void; setAnnotations: (annotations: Partial[]) => void; @@ -191,7 +191,7 @@ export function init_annotation({ }; console.log("popup_data", popup_data); setOnAnnotationClick(popup_data); - setModal({ modal: "textDialog", data: popup_data }); + setModal({ name: "textDialog", data: popup_data }); setOnAnnotationClick({}); }); diff --git a/openbb_terminal/core/plots/plotly.html b/openbb_terminal/core/plots/plotly.html index e5cfb1e70fc..c54b1452874 100644 --- a/openbb_terminal/core/plots/plotly.html +++ b/openbb_terminal/core/plots/plotly.html @@ -44,14 +44,14 @@ object-assign * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Wv=Wb,lh=60103,Yb=60106;zi.Fragment=60107;zi.StrictMode=60108;zi.Profiler=60114;var Xb=60109,$b=60110,Jb=60112;zi.Suspense=60113;var Kb=60115,Qb=60116;if(typeof Symbol=="function"&&Symbol.for){var Dl=Symbol.for;lh=Dl("react.element"),Yb=Dl("react.portal"),zi.Fragment=Dl("react.fragment"),zi.StrictMode=Dl("react.strict_mode"),zi.Profiler=Dl("react.profiler"),Xb=Dl("react.provider"),$b=Dl("react.context"),Jb=Dl("react.forward_ref"),zi.Suspense=Dl("react.suspense"),Kb=Dl("react.memo"),Qb=Dl("react.lazy")}var Fx=typeof Symbol=="function"&&Symbol.iterator;function C4(O){return O===null||typeof O!="object"?null:(O=Fx&&O[Fx]||O["@@iterator"],typeof O=="function"?O:null)}function Vp(O){for(var F="https://reactjs.org/docs/error-decoder.html?invariant="+O,J=1;J"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),j4=/^[: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]*$/,jx=Object.prototype.hasOwnProperty,Ux={},Vx={};function U4(O){return jx.call(Vx,O)?!0:jx.call(Ux,O)?!1:j4.test(O)?Vx[O]=!0:(Ux[O]=!0,!1)}function V4(O,F,J,fe){if(J!==null&&J.type===0)return!1;switch(typeof F){case"function":case"symbol":return!0;case"boolean":return fe?!1:J!==null?!J.acceptsBooleans:(O=O.toLowerCase().slice(0,5),O!=="data-"&&O!=="aria-");default:return!1}}function H4(O,F,J,fe){if(F===null||typeof F>"u"||V4(O,F,J,fe))return!0;if(fe)return!1;if(J!==null)switch(J.type){case 3:return!F;case 4:return F===!1;case 5:return isNaN(F);case 6:return isNaN(F)||1>F}return!1}function cs(O,F,J,fe,Pe,D,E){this.acceptsBooleans=F===2||F===3||F===4,this.attributeName=fe,this.attributeNamespace=Pe,this.mustUseProperty=J,this.propertyName=O,this.type=F,this.sanitizeURL=D,this.removeEmptyString=E}var Oo={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(O){Oo[O]=new cs(O,0,!1,O,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(O){var F=O[0];Oo[F]=new cs(F,1,!1,O[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(O){Oo[O]=new cs(O,2,!1,O.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(O){Oo[O]=new cs(O,2,!1,O,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(O){Oo[O]=new cs(O,3,!1,O.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(O){Oo[O]=new cs(O,3,!0,O,null,!1,!1)});["capture","download"].forEach(function(O){Oo[O]=new cs(O,4,!1,O,null,!1,!1)});["cols","rows","size","span"].forEach(function(O){Oo[O]=new cs(O,6,!1,O,null,!1,!1)});["rowSpan","start"].forEach(function(O){Oo[O]=new cs(O,5,!1,O.toLowerCase(),null,!1,!1)});var Kv=/[\-:]([a-z])/g;function Qv(O){return O[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(O){var F=O.replace(Kv,Qv);Oo[F]=new cs(F,1,!1,O,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(O){var F=O.replace(Kv,Qv);Oo[F]=new cs(F,1,!1,O,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(O){var F=O.replace(Kv,Qv);Oo[F]=new cs(F,1,!1,O,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(O){Oo[O]=new cs(O,1,!1,O.toLowerCase(),null,!1,!1)});Oo.xlinkHref=new cs("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(O){Oo[O]=new cs(O,1,!1,O.toLowerCase(),null,!0,!0)});function em(O,F,J,fe){var Pe=Oo.hasOwnProperty(F)?Oo[F]:null,D=Pe!==null?Pe.type===0:fe?!1:!(!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),j4=/^[: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]*$/,jx=Object.prototype.hasOwnProperty,Ux={},Vx={};function U4(O){return jx.call(Vx,O)?!0:jx.call(Ux,O)?!1:j4.test(O)?Vx[O]=!0:(Ux[O]=!0,!1)}function V4(O,F,J,fe){if(J!==null&&J.type===0)return!1;switch(typeof F){case"function":case"symbol":return!0;case"boolean":return fe?!1:J!==null?!J.acceptsBooleans:(O=O.toLowerCase().slice(0,5),O!=="data-"&&O!=="aria-");default:return!1}}function H4(O,F,J,fe){if(F===null||typeof F>"u"||V4(O,F,J,fe))return!0;if(fe)return!1;if(J!==null)switch(J.type){case 3:return!F;case 4:return F===!1;case 5:return isNaN(F);case 6:return isNaN(F)||1>F}return!1}function cs(O,F,J,fe,Pe,D,E){this.acceptsBooleans=F===2||F===3||F===4,this.attributeName=fe,this.attributeNamespace=Pe,this.mustUseProperty=J,this.propertyName=O,this.type=F,this.sanitizeURL=D,this.removeEmptyString=E}var Oo={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(O){Oo[O]=new cs(O,0,!1,O,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(O){var F=O[0];Oo[F]=new cs(F,1,!1,O[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(O){Oo[O]=new cs(O,2,!1,O.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(O){Oo[O]=new cs(O,2,!1,O,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(O){Oo[O]=new cs(O,3,!1,O.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(O){Oo[O]=new cs(O,3,!0,O,null,!1,!1)});["capture","download"].forEach(function(O){Oo[O]=new cs(O,4,!1,O,null,!1,!1)});["cols","rows","size","span"].forEach(function(O){Oo[O]=new cs(O,6,!1,O,null,!1,!1)});["rowSpan","start"].forEach(function(O){Oo[O]=new cs(O,5,!1,O.toLowerCase(),null,!1,!1)});var Kv=/[\-:]([a-z])/g;function Qv(O){return O[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(O){var F=O.replace(Kv,Qv);Oo[F]=new cs(F,1,!1,O,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(O){var F=O.replace(Kv,Qv);Oo[F]=new cs(F,1,!1,O,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(O){var F=O.replace(Kv,Qv);Oo[F]=new cs(F,1,!1,O,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(O){Oo[O]=new cs(O,1,!1,O.toLowerCase(),null,!1,!1)});Oo.xlinkHref=new cs("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(O){Oo[O]=new cs(O,1,!1,O.toLowerCase(),null,!0,!0)});function em(O,F,J,fe){var Pe=Oo.hasOwnProperty(F)?Oo[F]:null,D=Pe!==null?Pe.type===0:fe?!1:!(!(2e||Pe[E]!==D[e])return` @@ -78,7 +78,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function qm(O,F){if(O){if(typeof O=="string")return Sv(O,F);var J=Object.prototype.toString.call(O).slice(8,-1);return J==="Object"&&O.constructor&&(J=O.constructor.name),J==="Map"||J==="Set"?Array.from(O):J==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(J)?Sv(O,F):void 0}}function Sv(O,F){(F==null||F>O.length)&&(F=O.length);for(var J=0,fe=new Array(F);J=O.length?{done:!0}:{done:!1,value:O[fe++]}},e:function(_){throw _},f:Pe}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var D,E=!0,e=!1;return{s:function(){J=J.call(O)},n:function(){var _=J.next();return E=_.done,_},e:function(_){e=!0,D=_},f:function(){try{E||J.return==null||J.return()}finally{if(e)throw D}}}}var Uc=String.fromCharCode,nb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",rb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",Wd={};function ib(O,F){if(!Wd[O]){Wd[O]={};for(var J=0;J>>8,J[2*fe+1]=D%256}return J},decompressFromUint8Array:function(O){if(O==null)return qs.decompress(O);for(var F=new Array(O.length/2),J=0,fe=F.length;J>=1}else{for(Pe=1,fe=0;fe>=1}--w==0&&(w=Math.pow(2,T),T++),delete t[_]}else for(Pe=l[_],fe=0;fe>=1;--w==0&&(w=Math.pow(2,T),T++),l[e]=s++,_=String(E)}if(_!==""){if(Object.prototype.hasOwnProperty.call(t,_)){if(_.charCodeAt(0)<256){for(fe=0;fe>=1}else{for(Pe=1,fe=0;fe>=1}--w==0&&(w=Math.pow(2,T),T++),delete t[_]}else for(Pe=l[_],fe=0;fe>=1;--w==0&&(w=Math.pow(2,T),T++)}for(Pe=2,fe=0;fe>=1;for(;;){if(m<<=1,f==F-1){a.push(J(m));break}f++}return a.join("")},decompress:function(O){return O==null?"":O==""?null:qs._decompress(O.length,32768,function(F){return O.charCodeAt(F)})},_decompress:function(O,F,J){var fe,Pe,D,E,e,_,w,s=[],T=[],m={val:J(0),position:F,index:1},f=4,l=4,t=3,a="";for(fe=0;fe<3;fe+=1)s[fe]=fe;for(D=0,e=Math.pow(2,2),_=1;_!=e;)E=m.val&m.position,m.position>>=1,m.position==0&&(m.position=F,m.val=J(m.index++)),D|=(E>0?1:0)*_,_<<=1;switch(D){case 0:for(D=0,e=Math.pow(2,8),_=1;_!=e;)E=m.val&m.position,m.position>>=1,m.position==0&&(m.position=F,m.val=J(m.index++)),D|=(E>0?1:0)*_,_<<=1;w=Uc(D);break;case 1:for(D=0,e=Math.pow(2,16),_=1;_!=e;)E=m.val&m.position,m.position>>=1,m.position==0&&(m.position=F,m.val=J(m.index++)),D|=(E>0?1:0)*_,_<<=1;w=Uc(D);break;case 2:return""}for(s[3]=w,Pe=w,T.push(w);;){if(m.index>O)return"";for(D=0,e=Math.pow(2,t),_=1;_!=e;)E=m.val&m.position,m.position>>=1,m.position==0&&(m.position=F,m.val=J(m.index++)),D|=(E>0?1:0)*_,_<<=1;switch(w=D){case 0:for(D=0,e=Math.pow(2,8),_=1;_!=e;)E=m.val&m.position,m.position>>=1,m.position==0&&(m.position=F,m.val=J(m.index++)),D|=(E>0?1:0)*_,_<<=1;s[l++]=Uc(D),w=l-1,f--;break;case 1:for(D=0,e=Math.pow(2,16),_=1;_!=e;)E=m.val&m.position,m.position>>=1,m.position==0&&(m.position=F,m.val=J(m.index++)),D|=(E>0?1:0)*_,_<<=1;s[l++]=Uc(D),w=l-1,f--;break;case 2:return T.join("")}if(f==0&&(f=Math.pow(2,t),t++),s[w])a=s[w];else{if(w!==l)return null;a=Pe+Pe.charAt(0)}T.push(a),s[l++]=Pe+a.charAt(0),Pe=a,--f==0&&(f=Math.pow(2,t),t++)}}},fu={DEBUG:!1,LIB_VERSION:"1.55.0"},H3=Array.prototype,q3=Object.prototype,u1=q3.toString,F8=q3.hasOwnProperty,gi=typeof window<"u"?window:{},Gc=gi.navigator||{userAgent:""},Vo=gi.document||{},Nl=Gc.userAgent,B8=["localhost","127.0.0.1"],H0=H3.forEach,ab=H3.indexOf,N8=Array.isArray,q0={},Ja={log:function(){if(fu.DEBUG&&!Ul(window.console)&&window.console){for(var O=("__rrweb_original__"in window.console.log)?window.console.log.__rrweb_original__:window.console.log,F=arguments.length,J=new Array(F),fe=0;fe1?F-1:0),fe=1;fe0&&(F[fe]=J)}),F},H8=["$performance_raw"];function Y3(O,F){return J=O,fe=function(D,E){return E&&H8.indexOf(E)>-1?D:typeof D=="string"&&F!==null?D.slice(0,F):D},Pe=new Set,function D(E,e){return E!==Object(E)?fe?fe(E,e):E:Pe.has(E)?void 0:(Pe.add(E),Ru(E)?(_=[],mc(E,function(w){_.push(D(w))})):(_={},Yi(E,function(w,s){Pe.has(w)||(_[s]=D(w,s))})),_);var _}(J);var J,fe,Pe}function c1(O){var F,J,fe,Pe,D,E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",e=0,_=0,w="",s=[];if(!O)return O;O=q8(O);do F=(D=O.charCodeAt(e++)<<16|O.charCodeAt(e++)<<8|O.charCodeAt(e++))>>18&63,J=D>>12&63,fe=D>>6&63,Pe=63&D,s[_++]=E.charAt(F)+E.charAt(J)+E.charAt(fe)+E.charAt(Pe);while(e127&&E<2048?String.fromCharCode(E>>6|192,63&E|128):String.fromCharCode(E>>12|224,E>>6&63|128,63&E|128),e!==null&&(J>F&&(D+=O.substring(F,J)),D+=e,F=J=Pe+1)}return J>F&&(D+=O.substring(F,O.length)),D},xc=(kg=function(){for(var O=new Date().valueOf(),F=0;O==new Date().valueOf();)F++;return O.toString(16)+F.toString(16)},function(){var O=typeof window<"u"?(window.screen.height*window.screen.width).toString(16):"0";return kg()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var F,J,fe=Nl,Pe=0,D=[];function E(e,_){var w,s=0;for(w=0;w<_.length;w++)s|=D[w]<<8*w;return e^s}for(F=0;F=4&&(Pe=E(Pe,D),D=[]);return D.length>0&&(Pe=E(Pe,D)),Pe.toString(16)}()+"-"+O+"-"+kg()}),G8=function(O){return!!/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp|ahrefsbot|facebookexternalhit|facebookcatalog|applebot|semrushbot|duckduckbot|twitterbot|rogerbot|linkedinbot|mj12bot|sitebulb|bot.htm|bot.php|hubspot|crawler)/i.test(O)},ob=function(O,F){var J=F.replace(/[[]/,"\\[").replace(/[\]]/,"\\]"),fe=new RegExp("[\\?&]"+J+"=([^&#]*)").exec(O);if(fe===null||fe&&typeof fe[1]!="string"&&fe[1].length)return"";var Pe=fe[1];try{Pe=decodeURIComponent(Pe)}catch{Ja.error("Skipping decoding for malformed query param: "+Pe)}return Pe.replace(/\+/g," ")},sb=function(O,F){var J=O.match(new RegExp(F+"=([^&]*)"));return J?J[1]:null},bp=function(){function O(F){return F&&(F.preventDefault=O.preventDefault,F.stopPropagation=O.stopPropagation),F}return O.preventDefault=function(){this.returnValue=!1},O.stopPropagation=function(){this.cancelBubble=!0},function(F,J,fe,Pe,D){if(F)if(F.addEventListener&&!Pe)F.addEventListener(J,fe,!!D);else{var E="on"+J,e=F[E];F[E]=function(_,w,s){return function(T){if(T=T||O(window.event)){var m,f=!0;G3(s)&&(m=s(T));var l=w.call(_,T);return m!==!1&&l!==!1||(f=!1),f}}}(F,fe,e)}else Ja.error("No valid element provided to register_event")}}(),yo={campaignParams:function(O){var F=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","fbclid","msclkid"].concat(O||[]),J={};return Yi(F,function(fe){var Pe=ob(Vo.URL,fe);Pe.length&&(J[fe]=Pe)}),J},searchEngine:function(){var O=Vo.referrer;return O?O.search("https?://(.*)google.([^/?]*)")===0?"google":O.search("https?://(.*)bing.com")===0?"bing":O.search("https?://(.*)yahoo.com")===0?"yahoo":O.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null:null},searchInfo:function(){var O=yo.searchEngine(),F=O!="yahoo"?"q":"p",J={};if(O!==null){J.$search_engine=O;var fe=ob(Vo.referrer,F);fe.length&&(J.ph_keyword=fe)}return J},browser:function(O,F,J){return F=F||"",J||Ki(O," OPR/")?Ki(O,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(O)?"BlackBerry":Ki(O,"IEMobile")||Ki(O,"WPDesktop")?"Internet Explorer Mobile":Ki(O,"SamsungBrowser/")?"Samsung Internet":Ki(O,"Edge")||Ki(O,"Edg/")?"Microsoft Edge":Ki(O,"FBIOS")?"Facebook Mobile":Ki(O,"Chrome")?"Chrome":Ki(O,"CriOS")?"Chrome iOS":Ki(O,"UCWEB")||Ki(O,"UCBrowser")?"UC Browser":Ki(O,"FxiOS")?"Firefox iOS":Ki(F,"Apple")?Ki(O,"Mobile")?"Mobile Safari":"Safari":Ki(O,"Android")?"Android Mobile":Ki(O,"Konqueror")?"Konqueror":Ki(O,"Firefox")?"Firefox":Ki(O,"MSIE")||Ki(O,"Trident/")?"Internet Explorer":Ki(O,"Gecko")?"Mozilla":""},browserVersion:function(O,F,J){var fe={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[yo.browser(O,F,J)];if(fe===void 0)return null;var Pe=O.match(fe);return Pe?parseFloat(Pe[Pe.length-2]):null},browserLanguage:function(){return Gc.language||Gc.userLanguage},os:function(){var O=Nl;return/Windows/i.test(O)?/Phone/.test(O)||/WPDesktop/.test(O)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(O)?"iOS":/Android/.test(O)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(O)?"BlackBerry":/Mac/i.test(O)?"Mac OS X":/Linux/.test(O)?"Linux":/CrOS/.test(O)?"Chrome OS":""},device:function(O){return/Windows Phone/i.test(O)||/WPDesktop/.test(O)?"Windows Phone":/iPad/.test(O)?"iPad":/iPod/.test(O)?"iPod Touch":/iPhone/.test(O)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(O)?"BlackBerry":/Android/.test(O)&&!/Mobile/.test(O)?"Android Tablet":/Android/.test(O)?"Android":""},deviceType:function(O){var F=this.device(O);return F==="iPad"||F==="Android Tablet"?"Tablet":F?"Mobile":"Desktop"},referrer:function(){return Vo.referrer||"$direct"},referringDomain:function(){if(!Vo.referrer)return"$direct";var O=Vo.createElement("a");return O.href=Vo.referrer,O.host},properties:function(){return So(Cv({$os:yo.os(),$browser:yo.browser(Nl,Gc.vendor,gi.opera),$device:yo.device(Nl),$device_type:yo.deviceType(Nl)}),{$current_url:gi==null?void 0:gi.location.href,$host:gi==null?void 0:gi.location.host,$pathname:gi==null?void 0:gi.location.pathname,$browser_version:yo.browserVersion(Nl,Gc.vendor,gi.opera),$browser_language:yo.browserLanguage(),$screen_height:gi==null?void 0:gi.screen.height,$screen_width:gi==null?void 0:gi.screen.width,$viewport_height:gi==null?void 0:gi.innerHeight,$viewport_width:gi==null?void 0:gi.innerWidth,$lib:"web",$lib_version:fu.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:(Date.now=Date.now||function(){return+new Date},Date.now()/1e3)})},people_properties:function(){return So(Cv({$os:yo.os(),$browser:yo.browser(Nl,Gc.vendor,gi.opera)}),{$browser_version:yo.browserVersion(Nl,Gc.vendor,gi.opera)})}};function G0(O){switch(tf(O.className)){case"string":return O.className;case"object":return("baseVal"in O.className?O.className.baseVal:null)||O.getAttribute("class")||"";default:return""}}function W0(O){var F="";return p0(O)&&!$3(O)&&O.childNodes&&O.childNodes.length&&Yi(O.childNodes,function(J){X3(J)&&J.textContent&&(F+=Ev(J.textContent).split(/(\s+)/).filter(Wf).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),Ev(F)}function lb(O){return!!O&&O.nodeType===1}function nf(O,F){return!!O&&!!O.tagName&&O.tagName.toLowerCase()===F.toLowerCase()}function X3(O){return!!O&&O.nodeType===3}function ub(O){return!!O&&O.nodeType===11}var Ag=["a","button","form","input","select","textarea","label"];function p0(O){for(var F=O;F.parentNode&&!nf(F,"body");F=F.parentNode){var J=G0(F).split(" ");if(Ki(J,"ph-sensitive")||Ki(J,"ph-no-capture"))return!1}if(Ki(G0(O).split(" "),"ph-include"))return!0;var fe=O.type||"";if(typeof fe=="string")switch(fe.toLowerCase()){case"hidden":case"password":return!1}var Pe=O.name||O.id||"";return!(typeof Pe=="string"&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(Pe.replace(/[^a-zA-Z0-9]/g,"")))}function $3(O){return!!(nf(O,"input")&&!["button","checkbox","submit","reset"].includes(O.type)||nf(O,"select")||nf(O,"textarea")||O.getAttribute("contenteditable")==="true")}function Wf(O){return!(O===null||Ul(O)||typeof O=="string"&&(O=Ev(O),/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((O||"").replace(/[- ]/g,""))||/(^\d{3}-?\d{2}-?\d{4}$)/.test(O)))}function J3(O,F){var J=document.createElement("script");J.type="text/javascript",J.src=O,J.onload=F;var fe,Pe=document.querySelectorAll("body > script");Pe.length>0?(fe=Pe[0].parentNode)===null||fe===void 0||fe.insertBefore(J,Pe[0]):document.body.appendChild(J)}function cb(O){var F=W0(O);return Wf(F="".concat(F," ").concat(K3(O)).trim())?F:""}function K3(O){var F="";return O&&O.childNodes&&O.childNodes.length&&Yi(O.childNodes,function(J){var fe;if(J&&((fe=J.tagName)===null||fe===void 0?void 0:fe.toLowerCase())==="span")try{var Pe=W0(J);F="".concat(F," ").concat(Pe).trim(),J.childNodes&&J.childNodes.length&&(F="".concat(F," ").concat(K3(J)).trim())}catch(D){console.error(D)}}),F}var W8=function(){function O(F){Wo(this,O),this.clicks=[],this.enabled=F}return Zo(O,[{key:"isRageClick",value:function(F,J,fe){if(!this.enabled)return!1;var Pe=this.clicks[this.clicks.length-1];if(Pe&&Math.abs(F-Pe.x)+Math.abs(J-Pe.y)<30&&fe-Pe.timestamp<1e3){if(this.clicks.push({x:F,y:J,timestamp:fe}),this.clicks.length===3)return!0}else this.clicks=[{x:F,y:J,timestamp:fe}];return!1}}]),O}(),Z8=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,lu={is_supported:function(){return!0},error:function(O){Ja.error("cookieStore error: "+O)},get:function(O){try{for(var F=O+"=",J=document.cookie.split(";"),fe=0;fe-1&&!J&&(fe.toLowerCase()==="a"||fe.toLowerCase()==="button"?Pe.$el_text=cb(O):Pe.$el_text=W0(O));var D=G0(O);D.length>0&&(Pe.classes=D.split(" ").filter(function(w){return w!==""})),Yi(O.attributes,function(w){var s;$3(O)&&["name","id","class"].indexOf(w.name)===-1||!F&&Wf(w.value)&&(typeof(s=w.name)!="string"||s.substring(0,10)!=="_ngcontent"&&s.substring(0,7)!=="_nghost")&&(Pe["attr__"+w.name]=w.value)});for(var E=1,e=1,_=O;_=this._previousElementSibling(_);)E++,_.tagName===O.tagName&&e++;return Pe.nth_child=E,Pe.nth_of_type=e,Pe},_getDefaultProperties:function(O){return{$event_type:O,$ce_version:1}},_extractCustomPropertyValue:function(O){var F=[];return Yi(document.querySelectorAll(O.css_selector),function(J){var fe;["input","select"].indexOf(J.tagName.toLowerCase())>-1?fe=J.value:J.textContent&&(fe=J.textContent),Wf(fe)&&F.push(fe)}),F.join(", ")},_getCustomProperties:function(O){var F=this,J={};return Yi(this._customProperties,function(fe){Yi(fe.event_selectors,function(Pe){Yi(document.querySelectorAll(Pe),function(D){Ki(O,D)&&p0(D)&&(J[fe.name]=F._extractCustomPropertyValue(fe))})})}),J},_getEventTarget:function(O){return O.target===void 0?O.srcElement||null:(F=O.target)!==null&&F!==void 0&&F.shadowRoot?O.composedPath()[0]||null:O.target||null;var F},_captureEvent:function(O,F){var J,fe=this,Pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"$autocapture",D=this._getEventTarget(O);if(X3(D)&&(D=D.parentNode||null),Pe==="$autocapture"&&O.type==="click"&&O instanceof MouseEvent&&(J=this.rageclicks)!==null&&J!==void 0&&J.isRageClick(O.clientX,O.clientY,new Date().getTime())&&this._captureEvent(O,F,"$rageclick"),D&&function(f,l){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;if(!f||nf(f,"html")||!lb(f))return!1;if(t!=null&&t.url_allowlist){var a=window.location.href,r=t.url_allowlist;if(r&&!r.some(function(g){return a.match(g)}))return!1}if(t!=null&&t.dom_event_allowlist){var n=t.dom_event_allowlist;if(n&&!n.some(function(g){return l.type===g}))return!1}if(t!=null&&t.element_allowlist){var o=t.element_allowlist;if(o&&!o.some(function(g){return f.tagName.toLowerCase()===g}))return!1}if(t!=null&&t.css_selector_allowlist){var i=t.css_selector_allowlist;if(i&&!i.some(function(g){return f.matches(g)}))return!1}for(var u=!1,p=[f],c=!0,b=f;b.parentNode&&!nf(b,"body");)if(ub(b.parentNode))p.push(b.parentNode.host),b=b.parentNode.host;else{if(!(c=b.parentNode||!1))break;if(Ag.indexOf(c.tagName.toLowerCase())>-1)u=!0;else{var d=window.getComputedStyle(c);d&&d.getPropertyValue("cursor")==="pointer"&&(u=!0)}p.push(c),b=c}var v=window.getComputedStyle(f);if(v&&v.getPropertyValue("cursor")==="pointer"&&l.type==="click")return!0;var x=f.tagName.toLowerCase();switch(x){case"html":return!1;case"form":return l.type==="submit";case"input":case"select":case"textarea":return l.type==="change"||l.type==="click";default:return u?l.type==="click":l.type==="click"&&(Ag.indexOf(x)>-1||f.getAttribute("contenteditable")==="true")}}(D,O,this.config)){for(var E=[D],e=D;e.parentNode&&!nf(e,"body");)ub(e.parentNode)?(E.push(e.parentNode.host),e=e.parentNode.host):(E.push(e.parentNode),e=e.parentNode);var _,w=[],s={},T=!1;if(Yi(E,function(f){var l=p0(f);f.tagName.toLowerCase()==="a"&&(_=f.getAttribute("href"),_=l&&Wf(_)&&_),Ki(G0(f).split(" "),"ph-no-capture")&&(T=!0),w.push(fe._getPropertiesFromElement(f,F.get_config("mask_all_element_attributes"),F.get_config("mask_all_text")));var t=fe._getAugmentPropertiesFromElement(f);So(s,t)}),F.get_config("mask_all_text")||(D.tagName.toLowerCase()==="a"||D.tagName.toLowerCase()==="button"?w[0].$el_text=cb(D):w[0].$el_text=W0(D)),_&&(w[0].attr__href=_),T)return!1;var m=So(this._getDefaultProperties(O.type),{$elements:w},this._getCustomProperties(E),s);return F.capture(Pe,m),!0}},_navigate:function(O){window.location.href=O},_addDomEventHandlers:function(O){var F=this,J=function(fe){fe=fe||window.event,F._captureEvent(fe,O)};bp(document,"submit",J,!1,!0),bp(document,"change",J,!1,!0),bp(document,"click",J,!1,!0)},_customProperties:[],rageclicks:null,config:void 0,init:function(O){var F;typeof O.__autocapture!="boolean"&&(this.config=O.__autocapture),(F=this.config)!==null&&F!==void 0&&F.url_allowlist&&(this.config.url_allowlist=this.config.url_allowlist.map(function(J){return new RegExp(J)})),this.rageclicks=new W8(O.get_config("rageclick"))},afterDecideResponse:function(O,F){this._setIsAutocaptureEnabled(F);var J=F.get_config("token");this._initializedTokens.indexOf(J)>-1?Ja.log('autocapture already initialized for token "'+J+'"'):(F.persistence&&F.persistence.register(Bi({},fb,!!O.autocapture_opt_out)),this._initializedTokens.push(J),O&&O.config&&O.config.enable_collect_everything&&this._isAutocaptureEnabled?(O.custom_properties&&(this._customProperties=O.custom_properties),this._addDomEventHandlers(F)):F.__autocapture=!1)},enabledForProject:function(O,F,J){if(!O)return!0;F=Ul(F)?10:F,J=Ul(J)?10:J;for(var fe=0,Pe=0;Pe1&&arguments[1]!==void 0?arguments[1]:{};if(!this.getFlags())return console.warn('getFeatureFlag for key "'+F+`" failed. Feature flags didn't load in time.`),!1;var fe=this.getFlagVariants()[F];return!J.send_event&&"send_event"in J||this.flagCallReported[F]||(this.flagCallReported[F]=!0,this.instance.capture("$feature_flag_called",{$feature_flag:F,$feature_flag_response:fe})),fe}},{key:"getFeatureFlagPayload",value:function(F){return this.getFlagPayloads()[F]}},{key:"isFeatureEnabled",value:function(F){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.getFlags()?!!this.getFeatureFlag(F,J):(console.warn('isFeatureEnabled for key "'+F+`" failed. Feature flags didn't load in time.`),!1)}},{key:"addFeatureFlagsHandler",value:function(F){this.featureFlagEventHandlers.push(F)}},{key:"removeFeatureFlagsHandler",value:function(F){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(function(J){return J!==F})}},{key:"receivedFeatureFlags",value:function(F){this.instance.decideEndpointWasHit=!0;var J=this.getFlagVariants(),fe=this.getFlagPayloads();(function(Pe,D){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},_=Pe.featureFlags,w=Pe.featureFlagPayloads;if(_)if(Array.isArray(_)){var s,T={};if(_)for(var m=0;m<_.length;m++)T[_[m]]=!0;D&&D.register((Bi(s={},Yd,_),Bi(s,Yc,T),s))}else{var f,l=_,t=w;Pe.errorsWhileComputingFlags&&(l=yi(yi({},E),l),t=yi(yi({},e),t)),D&&D.register((Bi(f={},Yd,Object.keys(vb(l))),Bi(f,Yc,l||{}),Bi(f,Eg,t||{}),f))}else D&&(D.unregister(Yd),D.unregister(Yc),D.unregister(Eg))})(F,this.instance.persistence,J,fe),this._fireFeatureFlagsCallbacks()}},{key:"override",value:function(F){if(this._override_warning=!1,F===!1)this.instance.persistence.unregister(Xd);else if(Array.isArray(F)){for(var J={},fe=0;fe1&&arguments[1]!==void 0&&arguments[1],Pe=this.instance.get_property(Iv);if(Pe&&!fe)return F(Pe);this.instance._send_request("".concat(this.instance.get_config("api_host"),"/api/early_access_features/?token=").concat(this.instance.get_config("token")),{},{method:"GET"},function(D){var E=D.earlyAccessFeatures;return J.instance.persistence.register(Bi({},Iv,E)),F(E)})}},{key:"_prepareFeatureFlagsForCallbacks",value:function(){var F=this.getFlags(),J=this.getFlagVariants();return{flags:F.filter(function(fe){return J[fe]}),flagVariants:Object.keys(J).filter(function(fe){return J[fe]}).reduce(function(fe,Pe){return fe[Pe]=J[Pe],fe},{})}}},{key:"_fireFeatureFlagsCallbacks",value:function(){var F=this._prepareFeatureFlagsForCallbacks(),J=F.flags,fe=F.flagVariants;this.featureFlagEventHandlers.forEach(function(Pe){return Pe(J,fe)})}},{key:"setPersonPropertiesForFlags",value:function(F){var J=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],fe=this.instance.get_property(sp)||{};this.instance.register(Bi({},sp,yi(yi({},fe),F))),J&&this.instance.reloadFeatureFlags()}},{key:"resetPersonPropertiesForFlags",value:function(){this.instance.unregister(sp)}},{key:"setGroupPropertiesForFlags",value:function(F){var J=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],fe=this.instance.get_property(Wc)||{};Object.keys(fe).length!==0&&Object.keys(fe).forEach(function(Pe){fe[Pe]=yi(yi({},fe[Pe]),F[Pe]),delete F[Pe]}),this.instance.register(Bi({},Wc,yi(yi({},fe),F))),J&&this.instance.reloadFeatureFlags()}},{key:"resetGroupPropertiesForFlags",value:function(F){if(F){var J=this.instance.get_property(Wc)||{};this.instance.register(Bi({},Wc,yi(yi({},J),{},Bi({},F,{}))))}else this.instance.unregister(Wc)}}]),O}(),iT="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJibGFjayIvPgo8cGF0aCBkPSJNOCAwSDE2TDAgMTZWOEw4IDBaIiBmaWxsPSIjMkQyRDJEIi8+CjxwYXRoIGQ9Ik0xNiA4VjE2SDhMMTYgOFoiIGZpbGw9IiMyRDJEMkQiLz4KPC9zdmc+Cg==",mb=2,aT=4,oT=6,sT="rrweb/console@1",lT="/e/",uT=function(){function O(F){Wo(this,O),this.instance=F,this.captureStarted=!1,this.snapshots=[],this.emit=!1,this.endpoint=lT,this.stopRrweb=void 0,this.windowId=null,this.sessionId=null,this.receivedDecide=!1}return Zo(O,[{key:"startRecordingIfEnabled",value:function(){this.isRecordingEnabled()?this.startCaptureAndTrySendingQueuedSnapshots():this.stopRecording()}},{key:"started",value:function(){return this.captureStarted}},{key:"stopRecording",value:function(){this.captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this.captureStarted=!1)}},{key:"isRecordingEnabled",value:function(){var F=!!this.instance.get_property(Pv),J=!this.instance.get_config("disable_session_recording");return F&&J}},{key:"isConsoleLogCaptureEnabled",value:function(){var F=!!this.instance.get_property(hb),J=this.instance.get_config("enable_recording_console_log");return J??F}},{key:"getRecordingVersion",value:function(){var F,J=this.instance.get_property(pb);return((F=this.instance.get_config("session_recording"))===null||F===void 0?void 0:F.recorderVersion)||J||"v1"}},{key:"afterDecideResponse",value:function(F){var J,fe,Pe,D,E,e;this.receivedDecide=!0,this.instance.persistence&&this.instance.persistence.register((Bi(E={},Pv,!!F.sessionRecording),Bi(E,hb,(Pe=F.sessionRecording)===null||Pe===void 0?void 0:Pe.consoleLogRecordingEnabled),Bi(E,pb,(D=F.sessionRecording)===null||D===void 0?void 0:D.recorderVersion),E)),(J=F.sessionRecording)!==null&&J!==void 0&&J.endpoint&&(this.endpoint=(e=F.sessionRecording)===null||e===void 0?void 0:e.endpoint),(fe=F.sessionRecording)!==null&&fe!==void 0&&fe.recorderVersion&&(this.recorderVersion=F.sessionRecording.recorderVersion),this.startRecordingIfEnabled()}},{key:"startCaptureAndTrySendingQueuedSnapshots",value:function(){var F=this;this.receivedDecide&&(this.emit=!0,this.snapshots.forEach(function(J){return F._captureSnapshot(J)})),this._startCapture()}},{key:"_startCapture",value:function(){if(Object.assign!==void 0&&!this.captureStarted&&!this.instance.get_config("disable_session_recording")){this.captureStarted=!0;var F=this.getRecordingVersion()==="v2"?"recorder-v2.js":"recorder.js";this.instance.__loaded_recorder_version!==this.getRecordingVersion()?J3(this.instance.get_config("api_host")+"/static/".concat(F,"?v=").concat(fu.LIB_VERSION),this._onScriptLoaded.bind(this)):this._onScriptLoaded()}}},{key:"_updateWindowAndSessionIds",value:function(F){var J,fe=F.type===3&&((J=F.data)===null||J===void 0?void 0:J.source)===0,Pe=this.instance.sessionManager.checkAndGetSessionAndWindowId(fe,F.timestamp),D=Pe.windowId,E=Pe.sessionId;if(this.captureStarted&&(this.windowId!==D||this.sessionId!==E)&&[mb,aT].indexOf(F.type)===-1)try{var e;(e=this.rrwebRecord)===null||e===void 0||e.takeFullSnapshot()}catch(_){Ja.error("Error taking full snapshot.",_)}this.windowId=D,this.sessionId=E}},{key:"_onScriptLoaded",value:function(){var F=this,J={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskAllInputs:!0,maskInputOptions:{},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0};this.rrwebRecord=window.rrweb?window.rrweb.record:window.rrwebRecord;for(var fe=this.instance.get_config("session_recording"),Pe=0,D=Object.entries(fe||{});Pe10&&(fe.data.payload.payload=fe.data.payload.payload.slice(0,10),fe.data.payload.payload.push("...[truncated]"));for(var Pe=[],D=0;D2e3?Pe.push(fe.data.payload.payload[D].slice(0,2e3)+"...[truncated]"):Pe.push(fe.data.payload.payload[D]);return fe.data.payload.payload=Pe,fe}return fe}(function(fe){if(fe&&tf(fe)==="object"){var Pe=JSON.stringify(fe);if(Pe.length>5e6){var D,E=Ac(Pe.matchAll(/data:([\w\/\-\.]+);(\w+),([^)"]*)/gim));try{for(E.s();!(D=E.n()).done;){var e=D.value;Pe=e[1].toLocaleLowerCase().slice(0,6)==="image/"?Pe.replace(e[0],iT):Pe.replace(e[0],"")}}catch(_){E.e(_)}finally{E.f()}}return JSON.parse(Pe)}return fe}(F)),this._updateWindowAndSessionIds(F);var J={$snapshot_data:F,$session_id:this.sessionId,$window_id:this.windowId};this.instance._captureMetrics.incr("rrweb-record"),this.instance._captureMetrics.incr("rrweb-record-".concat(F.type)),this.emit?this._captureSnapshot(J):this.snapshots.push(J)}},{key:"_captureSnapshot",value:function(F){this.instance.capture("$snapshot",F,{transport:"XHR",method:"POST",endpoint:this.endpoint,_noTruncate:!0,_batchKey:"sessionRecording",_metrics:{rrweb_full_snapshot:F.$snapshot_data.type===mb}})}}]),O}(),ru={entryType:0,timeOrigin:1,name:2,startTime:3,redirectStart:4,redirectEnd:5,workerStart:6,fetchStart:7,domainLookupStart:8,domainLookupEnd:9,connectStart:10,secureConnectionStart:11,connectEnd:12,requestStart:13,responseStart:14,responseEnd:15,decodedBodySize:16,encodedBodySize:17,initiatorType:18,nextHopProtocol:19,renderBlockingStatus:20,responseStatus:21,transferSize:22,element:23,renderTime:24,loadTime:25,size:26,id:27,url:28,domComplete:29,domContentLoadedEvent:30,domInteractive:31,loadEventEnd:32,loadEventStart:33,redirectCount:34,navigationType:35,unloadEventEnd:36,unloadEventStart:37,duration:39,timestamp:40},cT=["first-input","navigation","paint","resource"],fT=["/s/","/e/"],hT=function(){function O(F){Wo(this,O),Bi(this,"_forceAllowLocalhost",!1),this.instance=F}return Zo(O,[{key:"startObservingIfEnabled",value:function(){this.isEnabled()?this.startObserving():this.stopObserving()}},{key:"startObserving",value:function(){var F=this;if(!this.observer)if(!B8.includes(location.hostname)||this._forceAllowLocalhost)try{this.observer=new PerformanceObserver(function(fe){fe.getEntries().forEach(function(Pe){F._capturePerformanceEvent(Pe)})});var J=PerformanceObserver.supportedEntryTypes.filter(function(fe){return cT.includes(fe)});J.forEach(function(fe){var Pe;(Pe=F.observer)===null||Pe===void 0||Pe.observe({type:fe,buffered:!0})})}catch(fe){console.error("PostHog failed to start performance observer",fe),this.stopObserving()}else Ja.log("PostHog Peformance observer not started because we are on localhost.")}},{key:"stopObserving",value:function(){this.observer&&(this.observer.disconnect(),this.observer=void 0)}},{key:"isObserving",value:function(){return!!this.observer}},{key:"isEnabled",value:function(){var F,J;return(F=(J=this.instance.get_config("capture_performance"))!==null&&J!==void 0?J:this.remoteEnabled)!==null&&F!==void 0&&F}},{key:"afterDecideResponse",value:function(F){this.remoteEnabled=F.capturePerformance||!1,this.isEnabled()&&this.startObserving()}},{key:"_capturePerformanceEvent",value:function(F){if(F.name.startsWith(this.instance.get_config("api_host"))){var J=F.name.replace(this.instance.get_config("api_host"),"");if(fT.find(function(T){return J.startsWith(T)}))return}var fe=F.toJSON(),Pe={},D=Math.floor(Date.now()-performance.now());for(var E in Pe[ru.timeOrigin]=D,Pe[ru.timestamp]=Math.floor(D+F.startTime),ru)fe[E]!==void 0&&(Pe[ru[E]]=fe[E]);if(this.capturePerformanceEvent(Pe),pT(F)){var e,_=Ac(F.serverTiming||[]);try{for(_.s();!(e=_.n()).done;){var w,s=e.value;this.capturePerformanceEvent((Bi(w={},ru.timeOrigin,D),Bi(w,ru.timestamp,Math.floor(D+F.startTime)),Bi(w,ru.name,s.name),Bi(w,ru.duration,s.duration),Bi(w,ru.entryType,"serverTiming"),w))}}catch(T){_.e(T)}finally{_.f()}}}},{key:"capturePerformanceEvent",value:function(F){var J,fe=F[ru.timestamp];(J=this.instance.sessionRecording)===null||J===void 0||J.onRRwebEmit({type:6,data:{plugin:"posthog/network@1",payload:F},timestamp:fe})}}]),O}(),pT=function(O){return O.entryType==="navigation"||O.entryType==="resource"},dT=function(){function O(F){Wo(this,O),this.instance=F,this.instance.decideEndpointWasHit=this.instance._hasBootstrappedFeatureFlags()}return Zo(O,[{key:"call",value:function(){var F=this,J=c1(JSON.stringify({token:this.instance.get_config("token"),distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups()}));this.instance._send_request("".concat(this.instance.get_config("api_host"),"/decide/?v=3"),{data:J,verbose:!0},{method:"POST"},function(fe){return F.parseDecideResponse(fe)})}},{key:"parseDecideResponse",value:function(F){var J,fe,Pe=this;if((F==null?void 0:F.status)!==0){if(this.instance.decideEndpointWasHit=!0,!document||!document.body)return console.log("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(function(){Pe.parseDecideResponse(F)},500);if(this.instance.toolbar.afterDecideResponse(F),(J=this.instance.sessionRecording)===null||J===void 0||J.afterDecideResponse(F),nc.afterDecideResponse(F,this.instance),(fe=this.instance.webPerformance)===null||fe===void 0||fe.afterDecideResponse(F),this.instance.featureFlags.receivedFeatureFlags(F),this.instance.compression={},F.supportedCompression&&!this.instance.get_config("disable_compression")){var D,E={},e=Ac(F.supportedCompression);try{for(e.s();!(D=e.n()).done;)E[D.value]=!0}catch(m){e.e(m)}finally{e.f()}this.instance.compression=E}if(F.siteApps)if(this.instance.get_config("opt_in_site_apps")){var _,w=this.instance.get_config("api_host"),s=Ac(F.siteApps);try{var T=function(){var m=_.value,f=m.id,l=m.url,t=document.createElement("script");t.src=[w,w[w.length-1]==="/"&&l[0]==="/"?l.substring(1):l].join(""),t.onerror=function(a){console.error("Error while initializing PostHog app with config id ".concat(f),a)},window["__$$ph_site_app_".concat(f)]=Pe.instance,document.body.appendChild(t)};for(s.s();!(_=s.n()).done;)T()}catch(m){s.e(m)}finally{s.f()}}else F.siteApps.length>0&&console.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}else console.error("Failed to fetch feature flags from PostHog.")}}]),O}(),gT=["https://app.posthog.com","https://eu.posthog.com"],vT=["source"],mT=function(){function O(F){Wo(this,O),this.instance=F}return Zo(O,[{key:"afterDecideResponse",value:function(F){var J=F.toolbarParams||F.editorParams||(F.toolbarVersion?{toolbarVersion:F.toolbarVersion}:{});F.isAuthenticated&&J.toolbarVersion&&J.toolbarVersion.indexOf("toolbar")===0&&this.loadToolbar(yi(yi({},J),{},{apiURL:this.instance.get_config("api_host")}))}},{key:"maybeLoadToolbar",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.location,J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:window.history;try{if(!J){try{window.localStorage.setItem("test","test"),window.localStorage.removeItem("test")}catch{return!1}J=window.localStorage}var Pe,D=sb(F.hash,"__posthog")||sb(F.hash,"state"),E=D?JSON.parse(decodeURIComponent(D)):null;return E&&E.action==="ph_authorize"?((Pe=E).source="url",Pe&&Object.keys(Pe).length>0&&(E.desiredHash?F.hash=E.desiredHash:fe?fe.replaceState("",document.title,F.pathname+F.search):F.hash="")):((Pe=JSON.parse(J.getItem("_postHogToolbarParams")||"{}")).source="localstorage",delete Pe.userIntent),Pe.apiURL||(Pe.apiURL=this.instance.get_config("api_host")),!(!Pe.token||this.instance.get_config("token")!==Pe.token)&&(this.loadToolbar(Pe),!0)}catch{return!1}}},{key:"loadToolbar",value:function(F){var J=this;if(window._postHogToolbarLoaded)return!1;window._postHogToolbarLoaded=!0;var fe=(F==null?void 0:F.apiURL)||this.instance.get_config("api_host"),Pe=3e4*Math.floor(Date.now()/3e4),D="".concat(fe).concat(fe.endsWith("/")?"":"/","static/toolbar.js?_ts=").concat(Pe),E=!gT.includes(this.instance.get_config("api_host"))&&this.instance.get_config("advanced_disable_toolbar_metrics"),e=yi(yi({apiURL:fe,jsURL:fe,token:this.instance.get_config("token")},F),E?{instrument:!1}:{});e.source;var _=z8(e,vT);return window.localStorage.setItem("_postHogToolbarParams",JSON.stringify(_)),J3(D,function(){(window.ph_load_toolbar||window.ph_load_editor)(e,J.instance)}),bp(window,"turbolinks:load",function(){window._postHogToolbarLoaded=!1,J.loadToolbar(e)}),!0}},{key:"_loadEditor",value:function(F){return this.loadToolbar(F)}},{key:"maybeLoadEditor",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.location,J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:window.history;return this.maybeLoadToolbar(F,J,fe)}}]),O}(),iw=function(){function O(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:3e3;Wo(this,O),this.isPolling=!0,this._event_queue=[],this._empty_queue_count=0,this._poller=void 0,this._pollInterval=F}return Zo(O,[{key:"setPollInterval",value:function(F){this._pollInterval=F,this.isPolling&&this.poll()}},{key:"poll",value:function(){}},{key:"unload",value:function(){}},{key:"getTime",value:function(){return new Date().getTime()}}]),O}(),yT=function(O){U3(J,iw);var F=V3(J);function J(fe,Pe){var D,E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:3e3;return Wo(this,J),(D=F.call(this,E)).handlePollRequest=Pe,D.captureMetrics=fe,D}return Zo(J,[{key:"enqueue",value:function(fe,Pe,D){this.captureMetrics.incr("batch-enqueue"),this._event_queue.push({url:fe,data:Pe,options:D}),this.isPolling||(this.isPolling=!0,this.poll())}},{key:"poll",value:function(){var fe=this;clearTimeout(this._poller),this._poller=setTimeout(function(){if(fe._event_queue.length>0){var Pe=fe.formatQueue(),D=function(e){var _=Pe[e],w=_.url,s=_.data,T=_.options;Yi(s,function(m,f){s[f].offset=Math.abs(s[f].timestamp-fe.getTime()),delete s[f].timestamp}),fe.handlePollRequest(w,s,T),fe.captureMetrics.incr("batch-requests"),fe.captureMetrics.incr("batch-requests-".concat(w.slice(w.length-2))),fe.captureMetrics.incr("batch-handle",s.length),fe.captureMetrics.incr("batch-handle-".concat(w.slice(w.length-2)),s.length)};for(var E in Pe)D(E);fe._event_queue.length=0,fe._empty_queue_count=0}else fe._empty_queue_count++;fe._empty_queue_count>4&&(fe.isPolling=!1,fe._empty_queue_count=0),fe.isPolling&&fe.poll()},this._pollInterval)}},{key:"updateUnloadMetrics",value:function(){var fe=this.formatQueue();for(var Pe in fe){var D=fe[Pe],E=D.url,e=D.data;this.captureMetrics.incr("batch-unload-requests"),this.captureMetrics.incr("batch-unload-requests-".concat(E.slice(E.length-2))),this.captureMetrics.incr("batch-unload",e.length),this.captureMetrics.incr("batch-unload-".concat(E.slice(E.length-2)),e.length)}}},{key:"unload",value:function(){var fe=this;clearTimeout(this._poller);var Pe=this._event_queue.length>0?this.formatQueue():{};this._event_queue.length=0;var D=Object.values(Pe);[].concat(Mv(D.filter(function(E){return E.url.indexOf("/e")===0})),Mv(D.filter(function(E){return E.url.indexOf("/e")!==0}))).map(function(E){var e=E.url,_=E.data,w=E.options;fe.handlePollRequest(e,_,yi(yi({},w),{},{transport:"sendBeacon"}))})}},{key:"formatQueue",value:function(){var fe={};return Yi(this._event_queue,function(Pe){var D=Pe.url,E=Pe.data,e=Pe.options,_=(e?e._batchKey:null)||D;fe[_]===void 0&&(fe[_]={data:[],url:D,options:e}),e&&fe[_].options&&fe[_].options._metrics&&!fe[_].options._metrics.rrweb_full_snapshot&&(fe[_].options._metrics.rrweb_full_snapshot=e._metrics.rrweb_full_snapshot),fe[_].data.push(E)}),fe}}]),J}(),xT=function(){function O(F){Wo(this,O),this.enabled=F,this.metrics={}}return Zo(O,[{key:"incr",value:function(F){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.enabled&&(F="phjs-".concat(F),this.metrics[F]=(this.metrics[F]||0)+J)}},{key:"decr",value:function(F){this.enabled&&(F="phjs-".concat(F),this.metrics[F]=(this.metrics[F]||0)-1)}}]),O}(),Zs=Uint8Array,ls=Uint16Array,sh=Uint32Array,Zm=new Zs([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ym=new Zs([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),yb=new Zs([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),aw=function(O,F){for(var J=new ls(31),fe=0;fe<31;++fe)J[fe]=F+=1<>>1|(21845&ua)<<1;Hc=(61680&(Hc=(52428&Hc)>>>2|(13107&Hc)<<2))>>>4|(3855&Hc)<<4,Dv[ua]=((65280&Hc)>>>8|(255&Hc)<<8)>>>1}var _p=function(O,F,J){for(var fe=O.length,Pe=0,D=new ls(F);Pe>>_]=w}else for(E=new ls(fe),Pe=0;Pe>>15-O[Pe];return E},lf=new Zs(288);for(ua=0;ua<144;++ua)lf[ua]=8;for(ua=144;ua<256;++ua)lf[ua]=9;for(ua=256;ua<280;++ua)lf[ua]=7;for(ua=280;ua<288;++ua)lf[ua]=8;var Z0=new Zs(32);for(ua=0;ua<32;++ua)Z0[ua]=5;var Fl,_T=_p(lf,9,0),wT=_p(Z0,5,0),sw=function(O){return(O/8>>0)+(7&O&&1)},lw=function(O,F,J){(F==null||F<0)&&(F=0),(J==null||J>O.length)&&(J=O.length);var fe=new(O instanceof ls?ls:O instanceof sh?sh:Zs)(J-F);return fe.set(O.subarray(F,J)),fe},Lu=function(O,F,J){J<<=7&F;var fe=F/8>>0;O[fe]|=J,O[fe+1]|=J>>>8},Qh=function(O,F,J){J<<=7&F;var fe=F/8>>0;O[fe]|=J,O[fe+1]|=J>>>8,O[fe+2]|=J>>>16},Cg=function(O,F){for(var J=[],fe=0;fem&&(m=D[fe].s);var f=new ls(m+1),l=TT(J[s-1],f,0);if(l>F){fe=0;var t=0,a=l-F,r=1<F))break;t+=r-(1<>>=a;t>0;){var o=D[fe].s;f[o]=0&&t;--fe){var i=D[fe].s;f[i]==F&&(--f[i],++t)}l=F}return[new Zs(f),l]},TT=function O(F,J,fe){return F.s==-1?Math.max(O(F.l,J,fe+1),O(F.r,J,fe+1)):J[F.s]=fe},bb=function(O){for(var F=O.length;F&&!O[--F];);for(var J=new ls(++F),fe=0,Pe=O[0],D=1,E=function(_){J[fe++]=_},e=1;e<=F;++e)if(O[e]==Pe&&e!=F)++D;else{if(!Pe&&D>2){for(;D>138;D-=138)E(32754);D>2&&(E(D>10?D-11<<5|28690:D-3<<5|12305),D=0)}else if(D>3){for(E(Pe),--D;D>6;D-=6)E(8304);D>2&&(E(D-3<<5|8208),D=0)}for(;D--;)E(Pe);D=1,Pe=O[e]}return[J.subarray(0,fe),F]},ep=function(O,F){for(var J=0,fe=0;fe>>8,O[Pe+2]=255^O[Pe],O[Pe+3]=255^O[Pe+1];for(var D=0;D4&&!v[yb[g-1]];--g);var y,k,h,M,A=w+5<<3,C=ep(Pe,lf)+ep(D,Z0)+E,L=ep(Pe,m)+ep(D,t)+E+14+3*g+ep(c,v)+(2*c[16]+3*c[17]+7*c[18]);if(A<=C&&A<=L)return g0(F,s,O.subarray(_,_+w));if(Lu(F,s,1+(L15&&(Lu(F,s,U[b]>>>5&127),s+=U[b]>>>12)}}}else y=_T,k=lf,h=wT,M=Z0;for(b=0;b255){B=fe[b]>>>18&31,Qh(F,s,y[B+257]),s+=k[B+257],B>7&&(Lu(F,s,fe[b]>>>23&31),s+=Zm[B]);var G=31&fe[b];Qh(F,s,h[G]),s+=M[G],G>3&&(Qh(F,s,fe[b]>>>5&8191),s+=Ym[G])}else Qh(F,s,y[fe[b]]),s+=k[fe[b]];return Qh(F,s,y[256]),s+k[256]},kT=new sh([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),AT=new Zs(0),MT=function(){for(var O=new sh(256),F=0;F<256;++F){for(var J=F,fe=9;--fe;)J=(1&J&&3988292384)^J>>>1;O[F]=J}return O}(),ST=function(){var O=4294967295;return{p:function(F){for(var J=O,fe=0;fe>>8;O=J},d:function(){return 4294967295^O}}},ET=function(O,F,J,fe,Pe){return function(D,E,e,_,w,s){var T=D.length,m=new Zs(_+T+5*(1+Math.floor(T/7e3))+w),f=m.subarray(_,m.length-w),l=0;if(!E||T<8)for(var t=0;t<=T;t+=65535){var a=t+65535;a>>13,o=8191&r,i=(1<7e3||h>24576)&&I>423){l=_b(D,f,0,v,x,g,k,h,A,t-A,l),h=y=k=0,A=t;for(var R=0;R<286;++R)x[R]=0;for(R=0;R<30;++R)g[R]=0}var U=2,B=0,G=o,N=L-P&32767;if(I>2&&C==d(t-N))for(var j=Math.min(n,I)-1,V=Math.min(32767,t),H=Math.min(258,I);N<=V&&--G&&L!=P;){if(D[t+U]==D[t+U-N]){for(var ee=0;eeU){if(U=ee,B=N,ee>j)break;var Q=Math.min(N,ee-2),X=0;for(R=0;RX&&(X=K,P=Y)}}}N+=(L=P)-(P=u[L])+32768&32767}if(B){v[h++]=268435456|zv[U]<<18|xb[B];var te=31&zv[U],re=31&xb[B];k+=Zm[te]+Ym[re],++x[257+te],++g[re],M=t+U,++y}else v[h++]=D[t],++x[D[t]]}}l=_b(D,f,s,v,x,g,k,h,A,t-A,l),s||(l=g0(f,l,AT))}return lw(m,0,_+sw(l)+w)}(O,F.level==null?6:F.level,F.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(O.length)))):12+F.mem,J,fe,!Pe)},Fv=function(O,F,J){for(;J;++F)O[F]=J,J>>>=8},CT=function(O,F){var J=F.filename;if(O[0]=31,O[1]=139,O[2]=8,O[8]=F.level<2?4:F.level==9?2:0,O[9]=3,F.mtime!=0&&Fv(O,4,Math.floor(new Date(F.mtime||Date.now())/1e3)),J){O[3]=8;for(var fe=0;fe<=J.length;++fe)O[fe+10]=J.charCodeAt(fe)}},LT=function(O){return 10+(O.filename&&O.filename.length+1||0)};function PT(O,F){F===void 0&&(F={});var J=ST(),fe=O.length;J.p(O);var Pe=ET(O,F,LT(F),8),D=Pe.length;return CT(Pe,F),Fv(Pe,D-8,J.d()),Fv(Pe,D-4,fe),Pe}function OT(O,F){var J=O.length;if(!F&&typeof TextEncoder<"u")return new TextEncoder().encode(O);for(var fe=new Zs(O.length+(O.length>>>1)),Pe=0,D=function(w){fe[Pe++]=w},E=0;Efe.length){var e=new Zs(Pe+8+(J-E<<1));e.set(fe),fe=e}var _=O.charCodeAt(E);_<128||F?D(_):_<2048?(D(192|_>>>6),D(128|63&_)):_>55295&&_<57344?(D(240|(_=65536+(1047552&_)|1023&O.charCodeAt(++E))>>>18),D(128|_>>>12&63),D(128|_>>>6&63),D(128|63&_)):(D(224|_>>>12),D(128|_>>>6&63),D(128|63&_))}return lw(fe,0,Pe)}(function(O){O.GZipJS="gzip-js",O.LZ64="lz64",O.Base64="base64"})(Fl||(Fl={}));var Dp,Xm,Eo,IT=function(O,F,J){var fe=F||{};fe.ip=J.ip?1:0,fe._=new Date().getTime().toString(),fe.ver=fu.LIB_VERSION;var Pe=O.split("?");if(Pe.length>1){var D,E=Ac(Pe[1].split("&"));try{for(E.s();!(D=E.n()).done;){var e=D.value.split("=")[0];fe[e]&&delete fe[e]}}catch(w){E.e(w)}finally{E.f()}}var _=O.indexOf("?")>-1?"&":"?";return O+_+function(w){var s,T,m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"&",f=[];return Yi(w,function(l,t){s=encodeURIComponent(l.toString()),T=encodeURIComponent(t),f[f.length]=T+"="+s}),f.join(m)}(fe)},$m=function O(F,J){if(J.blob&&F.buffer)return new Blob([F.buffer],{type:"text/plain"});if(J.sendBeacon||J.blob){var fe=O(F,{method:"POST"});return new Blob([fe],{type:"application/x-www-form-urlencoded"})}if(J.method!=="POST")return null;var Pe,D;return Pe=Array.isArray(F)||(D=F,Object.prototype.toString.call(D)==="[object Uint8Array]")?"data="+encodeURIComponent(F):"data="+encodeURIComponent(F.data),"compression"in F&&F.compression&&(Pe+="&compression="+F.compression),Pe},uw=function(O){var F=O.url,J=O.data,fe=O.headers,Pe=O.options,D=O.captureMetrics,E=O.callback,e=O.retriesPerformedSoFar,_=O.retryQueue,w=O.onXHRError,s=O.timeout,T=s===void 0?1e4:s,m=new XMLHttpRequest;m.open(Pe.method||"GET",F,!0);var f=$m(J,Pe);D.incr("_send_request"),D.incr("_send_request_inflight"),Yi(fe,function(l,t){m.setRequestHeader(t,l)}),Pe.method!=="POST"||Pe.blob||m.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),m.timeout=T,m.withCredentials=!0,m.onreadystatechange=function(){if(m.readyState===4)if(D.incr("xhr-response"),D.incr("xhr-response-".concat(m.status)),D.decr("_send_request_inflight"),m.status===200){if(E){var l;try{l=JSON.parse(m.responseText)}catch(t){return void Ja.error(t)}E(l)}}else typeof w=="function"&&w(m),[401,403,404,500].indexOf(m.status)<0&&_.enqueue({url:F,data:J,options:Pe,headers:fe,retriesPerformedSoFar:(e||0)+1,callback:E}),E&&E({status:0})},m.send(f)},RT=function(O){U3(J,iw);var F=V3(J);function J(fe,Pe){var D;return Wo(this,J),(D=F.call(this)).captureMetrics=fe,D.isPolling=!1,D.queue=[],D.areWeOnline=!0,D.onXHRError=Pe,typeof window<"u"&&"onLine"in window.navigator&&(D.areWeOnline=window.navigator.onLine,window.addEventListener("online",function(){D._handleWeAreNowOnline()}),window.addEventListener("offline",function(){D.areWeOnline=!1})),D}return Zo(J,[{key:"enqueue",value:function(fe){var Pe=fe.retriesPerformedSoFar||0;if(!(Pe>=10)){var D=3e3*Math.pow(2,Pe),E=new Date(Date.now()+D);console.warn("Enqueued failed request for retry in ".concat(D)),this.queue.push({retryAt:E,requestData:fe}),this.isPolling||(this.isPolling=!0,this.poll())}}},{key:"poll",value:function(){var fe=this;this._poller&&clearTimeout(this._poller),this._poller=setTimeout(function(){fe.areWeOnline&&fe.queue.length>0&&fe.flush(),fe.poll()},this._pollInterval)}},{key:"flush",value:function(){var fe=new Date(Date.now()),Pe=this.queue.filter(function(_){return _.retryAt0){this.queue=this.queue.filter(function(_){return _.retryAt>=fe});var D,E=Ac(Pe);try{for(E.s();!(D=E.n()).done;){var e=D.value.requestData;this._executeXhrRequest(e)}}catch(_){E.e(_)}finally{E.f()}}}},{key:"unload",value:function(){this._poller&&(clearTimeout(this._poller),this._poller=void 0);var fe,Pe=Ac(this.queue);try{for(Pe.s();!(fe=Pe.n()).done;){var D=fe.value.requestData,E=D.url,e=D.data,_=D.options;try{window.navigator.sendBeacon(E,$m(e,yi(yi({},_),{},{sendBeacon:!0})))}catch(w){fu.DEBUG&&console.error(w)}}}catch(w){Pe.e(w)}finally{Pe.f()}this.queue=[]}},{key:"_executeXhrRequest",value:function(fe){var Pe=fe.url,D=fe.data,E=fe.options,e=fe.headers,_=fe.callback,w=fe.retriesPerformedSoFar;uw({url:Pe,data:D||{},options:E||{},headers:e||{},retriesPerformedSoFar:w||0,callback:_,captureMetrics:this.captureMetrics,retryQueue:this,onXHRError:this.onXHRError})}},{key:"_handleWeAreNowOnline",value:function(){this.areWeOnline=!0,this.flush()}}]),J}(),zT=18e5,DT=864e5,FT=function(){function O(F,J){Wo(this,O),this.config=F,this.persistence=J,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null;var fe=F.persistence_name||F.token;if(this.window_id_storage_key="ph_"+fe+"_window_id",this.primary_window_exists_storage_key="ph_"+fe+"_primary_window_exists",this._canUseSessionStorage()){var Pe=Lo.parse(this.window_id_storage_key),D=Lo.parse(this.primary_window_exists_storage_key);Pe&&!D?this._windowId=Pe:Lo.remove(this.window_id_storage_key),Lo.set(this.primary_window_exists_storage_key,!0)}this._listenToReloadWindow()}return Zo(O,[{key:"_canUseSessionStorage",value:function(){return this.config.persistence!=="memory"&&!this.persistence.disabled&&Lo.is_supported()}},{key:"_setWindowId",value:function(F){F!==this._windowId&&(this._windowId=F,this._canUseSessionStorage()&&Lo.set(this.window_id_storage_key,F))}},{key:"_getWindowId",value:function(){return this._windowId?this._windowId:this._canUseSessionStorage()?Lo.parse(this.window_id_storage_key):null}},{key:"_setSessionId",value:function(F,J,fe){F===this._sessionId&&J===this._sessionActivityTimestamp&&fe===this._sessionStartTimestamp||(this._sessionStartTimestamp=fe,this._sessionActivityTimestamp=J,this._sessionId=F,this.persistence.register(Bi({},Ov,[J,F,fe])))}},{key:"_getSessionId",value:function(){if(this._sessionId&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this._sessionId,this._sessionStartTimestamp];var F=this.persistence.props[Ov];return Array.isArray(F)&&F.length===2&&F.push(F[0]),F||[0,null,0]}},{key:"resetSessionId",value:function(){this._setSessionId(null,null,null)}},{key:"_listenToReloadWindow",value:function(){var F=this;window.addEventListener("beforeunload",function(){F._canUseSessionStorage()&&Lo.remove(F.primary_window_exists_storage_key)})}},{key:"checkAndGetSessionAndWindowId",value:function(){var F=arguments.length>0&&arguments[0]!==void 0&&arguments[0],J=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:null)||new Date().getTime(),fe=l1(this._getSessionId(),3),Pe=fe[0],D=fe[1],E=fe[2],e=this._getWindowId(),_=E&&E>0&&Math.abs(J-E)>DT;!D||!F&&Math.abs(J-Pe)>zT||_?(D=xc(),e=xc(),E=J):e||(e=xc());var w=Pe===0||!F||_?J:Pe,s=E===0?new Date().getTime():E;return this._setWindowId(e),this._setSessionId(D,w,s),{sessionId:D,windowId:e}}}]),O}(),BT=Zo(function O(F,J,fe,Pe){Wo(this,O),this.name="posthog-js",this.setupOnce=function(D){D(function(E){var e,_,w;if(E.level!=="error"||!F.__loaded)return E;E.tags||(E.tags={});var s=F.config.ui_host||F.config.api_host;E.tags["PostHog Person URL"]=s+"/person/"+F.get_distinct_id(),F.sessionRecordingStarted()&&(E.tags["PostHog Recording URL"]=s+"/recordings/"+F.sessionManager.checkAndGetSessionAndWindowId(!0).sessionId);var T=((e=E.exception)===null||e===void 0?void 0:e.values)||[],m={$sentry_event_id:E.event_id,$sentry_exception:E.exception,$sentry_exception_message:(_=T[0])===null||_===void 0?void 0:_.value,$sentry_exception_type:(w=T[0])===null||w===void 0?void 0:w.type,$sentry_tags:E.tags};return J&&fe&&(m.$sentry_url=(Pe||"https://sentry.io/organizations/")+J+"/issues/?project="+fe+"&query="+E.event_id),F.capture("$exception",m),E})}}),NT=function(O){var F=function(J,fe){J.event.userId||J.event.anonymousId===O.get_distinct_id()||O.reset(),J.event.userId&&J.event.userId!==O.get_distinct_id()&&(O.register({distinct_id:J.event.userId}),O.reloadFeatureFlags());var Pe=O._calculate_event_properties(fe,J.event.properties);return J.event.properties=Object.assign({},Pe,J.event.properties),J};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(J){return F(J,J.event.event)},page:function(J){return F(J,"$pageview")},identify:function(J){return F(J,"$identify")},screen:function(J){return F(J,"$screen")}}},jT=function(){function O(){Wo(this,O),Bi(this,"_seenFirstPageView",!1)}return Zo(O,[{key:"onPageview",value:function(){this._seenFirstPageView&&(this._pageViewId=xc()),this._seenFirstPageView=!0}},{key:"getPageViewId",value:function(){return this._pageViewId||(this._pageViewId=xc()),this._pageViewId}}]),O}();(function(O){O[O.INIT_MODULE=0]="INIT_MODULE",O[O.INIT_SNIPPET=1]="INIT_SNIPPET"})(Dp||(Dp={}));var Bv=function(){},$d={},Ss="posthog",v0=gi.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,cw=!v0&&Nl.indexOf("MSIE")===-1&&Nl.indexOf("Mozilla")===-1,wb=function(){var O,F,J;return{api_host:"https://app.posthog.com",api_method:"POST",api_transport:"XHR",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:(Vo==null||(O=Vo.location)===null||O===void 0||(F=O.hostname)===null||F===void 0?void 0:F.indexOf("herokuapp.com"))===-1,persistence:"cookie",persistence_name:"",cookie_name:"",loaded:Bv,store_google:!0,custom_campaign_params:[],save_referrer:!0,test:!1,verbose:!1,img:!1,capture_pageview:!0,capture_pageleave:!0,debug:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_cookie:!1,enable_recording_console_log:void 0,secure_cookie:(gi==null||(J=gi.location)===null||J===void 0?void 0:J.protocol)==="https:",ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_blacklist:[],respect_dnt:!1,sanitize_properties:null,xhr_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{blockClass:"ph-no-capture",blockSelector:null,ignoreClass:"ph-ignore-input",maskAllInputs:!0,maskInputOptions:{},maskInputFn:null,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,advanced_disable_toolbar_metrics:!1,on_xhr_error:function(fe){var Pe="Bad HTTP status: "+fe.status+" "+fe.statusText;console.error(Pe)},get_device_id:function(fe){return fe},_onCapture:Bv,_capture_metrics:!1,capture_performance:void 0,name:"posthog",callback_fn:"posthog._jsc",bootstrap:{},disable_compression:!1}},Nv=function(O,F,J,fe){var Pe,D=J!==Ss&&Eo?J?Eo[J]:void 0:Eo,E={initComplete:!1,syncCode:!1},e=function(_){return function(w){E[_]||(E[_]=!0,E.initComplete&&E.syncCode&&(fe==null||fe(w)))}};if(D&&Xm===Dp.INIT_MODULE)Pe=D;else{if(D&&!Ru(D))return void console.error("You have already initialized "+J);Pe=new Jm}return Pe._init(O,F,J,e("initComplete")),Pe.toolbar.maybeLoadToolbar(),Pe.sessionRecording=new uT(Pe),Pe.sessionRecording.startRecordingIfEnabled(),Pe.webPerformance=new hT(Pe),Pe.webPerformance.startObservingIfEnabled(),Pe.__autocapture=Pe.get_config("autocapture"),nc._setIsAutocaptureEnabled(Pe),nc._isAutocaptureEnabled&&(Pe.__autocapture=Pe.get_config("autocapture"),nc.enabledForProject(Pe.get_config("token"),100,100)?nc.isBrowserSupported()?nc.init(Pe):(Pe.__autocapture=!1,Ja.log("Disabling Automatic Event Collection because this browser is not supported")):(Pe.__autocapture=!1,Ja.log("Not in active bucket: disabling Automatic Event Collection."))),fu.DEBUG=fu.DEBUG||Pe.get_config("debug"),D!==void 0&&Ru(D)&&(Pe._execute_array.call(Pe.people,D.people),Pe._execute_array(D)),e("syncCode")(Pe),Pe},Jm=function(){function O(){var F=this;Wo(this,O),this.config=wb(),this.compression={},this.decideEndpointWasHit=!1,this.SentryIntegration=BT,this.segmentIntegration=function(){return NT(F)},this.__captureHooks=[],this.__request_queue=[],this.__loaded=!1,this.__loaded_recorder_version=void 0,this.__autocapture=void 0,this._jsc=function(){},this.people=new nT(this),this.featureFlags=new rT(this),this.feature_flags=this.featureFlags,this.toolbar=new mT(this),this.pageViewIdManager=new jT,this._captureMetrics=void 0,this._requestQueue=void 0,this._retryQueue=void 0,this.persistence=void 0,this.sessionPersistence=void 0,this.sessionManager=void 0}return Zo(O,[{key:"init",value:function(F,J,fe){if(Ul(fe))console.error("You must name your new library: init(token, config, name)");else{if(fe!==Ss){var Pe=Nv(F,J,fe,function(D){Eo[fe]=D,D._loaded()});return Eo[fe]=Pe,Pe}console.error("You must initialize the main posthog object right after you include the PostHog js snippet")}}},{key:"_init",value:function(F){var J,fe,Pe=this,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=arguments.length>2?arguments[2]:void 0,e=arguments.length>3?arguments[3]:void 0;this.__loaded=!0,this.config={},this._triggered_notifs=[];var _,w={segmentRegister:!1,syncCode:!1},s=function(i){return function(){w[i]||(w[i]=!0,w.segmentRegister&&w.syncCode&&(e==null||e(Pe)))}};if(this.set_config(So({},wb(),D,{name:E,token:F,callback_fn:(E===Ss?E:Ss+"."+E)+"._jsc"})),this._jsc=function(){},(gi!=null&&(J=gi.rrweb)!==null&&J!==void 0&&J.record||gi!=null&&gi.rrwebRecord)&&(this.__loaded_recorder_version=gi==null||(_=gi.rrweb)===null||_===void 0?void 0:_.version),this._captureMetrics=new xT(this.get_config("_capture_metrics")),this._requestQueue=new yT(this._captureMetrics,this._handle_queued_event.bind(this)),this._retryQueue=new RT(this._captureMetrics,this.get_config("on_xhr_error")),this.__captureHooks=[],this.__request_queue=[],this.persistence=new db(this.config),this.sessionManager=new FT(this.config,this.persistence),this.sessionPersistence=this.config.persistence==="sessionStorage"?this.persistence:new db(yi(yi({},this.config),{},{persistence:"sessionStorage"})),this._gdpr_init(),D.segment?(this.config.get_device_id=function(){return D.segment.user().anonymousId()},D.segment.user().id()&&(this.register({distinct_id:D.segment.user().id()}),this.persistence.set_user_state("identified")),D.segment.register(this.segmentIntegration()).then(s("segmentRegister"))):s("segmentRegister")(),((fe=D.bootstrap)===null||fe===void 0?void 0:fe.distinctID)!==void 0){var T,m,f=this.get_config("get_device_id")(xc()),l=(T=D.bootstrap)!==null&&T!==void 0&&T.isIdentifiedID?f:D.bootstrap.distinctID;this.persistence.set_user_state((m=D.bootstrap)!==null&&m!==void 0&&m.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:D.bootstrap.distinctID,$device_id:l})}if(this._hasBootstrappedFeatureFlags()){var t,a,r=Object.keys(((t=D.bootstrap)===null||t===void 0?void 0:t.featureFlags)||{}).filter(function(i){var u,p;return!((u=D.bootstrap)===null||u===void 0||(p=u.featureFlags)===null||p===void 0||!p[i])}).reduce(function(i,u){var p,c;return i[u]=((p=D.bootstrap)===null||p===void 0||(c=p.featureFlags)===null||c===void 0?void 0:c[u])||!1,i},{}),n=Object.keys(((a=D.bootstrap)===null||a===void 0?void 0:a.featureFlagPayloads)||{}).filter(function(i){return r[i]}).reduce(function(i,u){var p,c,b,d;return(p=D.bootstrap)!==null&&p!==void 0&&(c=p.featureFlagPayloads)!==null&&c!==void 0&&c[u]&&(i[u]=(b=D.bootstrap)===null||b===void 0||(d=b.featureFlagPayloads)===null||d===void 0?void 0:d[u]),i},{});this.featureFlags.receivedFeatureFlags({featureFlags:r,featureFlagPayloads:n})}if(!this.get_distinct_id()){var o=this.get_config("get_device_id")(xc());this.register_once({distinct_id:o,$device_id:o},""),this.persistence.set_user_state("anonymous")}gi.addEventListener&&gi.addEventListener("onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this)),s("syncCode")()}},{key:"_loaded",value:function(){this.featureFlags.setReloadingPaused(!0);try{this.get_config("loaded")(this)}catch(F){console.error("`loaded` function failed",F)}this._start_queue_if_opted_in(),this.get_config("capture_pageview")&&this.capture("$pageview",{},{send_instantly:!0}),this.get_config("advanced_disable_decide")||new dT(this).call(),this.featureFlags.resetRequestQueue(),this.featureFlags.setReloadingPaused(!1)}},{key:"_start_queue_if_opted_in",value:function(){this.has_opted_out_capturing()||this.get_config("request_batching")&&this._requestQueue.poll()}},{key:"_dom_loaded",value:function(){var F=this;this.has_opted_out_capturing()||mc(this.__request_queue,function(J){F._send_request.apply(F,Mv(J))}),this.__request_queue=[],this._start_queue_if_opted_in()}},{key:"_prepare_callback",value:function(F,J){if(Ul(F))return null;if(v0)return function(E){F(E,J)};var fe=this._jsc,Pe=""+Math.floor(1e8*Math.random()),D=this.get_config("callback_fn")+"["+Pe+"]";return fe[Pe]=function(E){delete fe[Pe],F(E,J)},D}},{key:"_handle_unload",value:function(){this.get_config("request_batching")?(this.get_config("capture_pageview")&&this.get_config("capture_pageleave")&&this.capture("$pageleave"),this.get_config("_capture_metrics")&&(this._requestQueue.updateUnloadMetrics(),this.capture("$capture_metrics",this._captureMetrics.metrics)),this._requestQueue.unload(),this._retryQueue.unload()):this.get_config("capture_pageview")&&this.get_config("capture_pageleave")&&this.capture("$pageleave",null,{transport:"sendBeacon"})}},{key:"_handle_queued_event",value:function(F,J,fe){var Pe=JSON.stringify(J);this.__compress_and_send_json_request(F,Pe,fe||$d,Bv)}},{key:"__compress_and_send_json_request",value:function(F,J,fe,Pe){var D,E=function(s,T,m){return s===Fl.LZ64?[{data:qs.compressToBase64(T),compression:Fl.LZ64},m]:s===Fl.GZipJS?[PT(OT(T),{mtime:0}),yi(yi({},m),{},{blob:!0,urlQueryArgs:{compression:Fl.GZipJS}})]:[{data:c1(T)},m]}((D=this.compression)[Fl.GZipJS]?Fl.GZipJS:D[Fl.LZ64]?Fl.LZ64:Fl.Base64,J,fe),e=l1(E,2),_=e[0],w=e[1];this._send_request(F,_,w,Pe)}},{key:"_send_request",value:function(F,J,fe,Pe){if(cw)this.__request_queue.push([F,J,fe,Pe]);else{var D={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")};fe=So(D,fe||{}),v0||(fe.method="GET");var E="sendBeacon"in gi.navigator&&fe.transport==="sendBeacon";if(F=IT(F,fe.urlQueryArgs||{},{ip:this.get_config("ip")}),yc(J)&&this.get_config("img")){var e=Vo.createElement("img");e.src=F,Vo.body.appendChild(e)}else if(E)try{gi.navigator.sendBeacon(F,$m(J,yi(yi({},fe),{},{sendBeacon:!0})))}catch(T){this.get_config("debug")&&console.error(T)}else if(v0)try{uw({url:F,data:J,headers:this.get_config("xhr_headers"),options:fe,captureMetrics:this._captureMetrics,callback:Pe,retriesPerformedSoFar:0,retryQueue:this._retryQueue,onXHRError:this.get_config("on_xhr_error")})}catch(T){console.error(T)}else{var _,w=Vo.createElement("script");w.type="text/javascript",w.async=!0,w.defer=!0,w.src=F;var s=Vo.getElementsByTagName("script")[0];(_=s.parentNode)===null||_===void 0||_.insertBefore(w,s)}}}},{key:"_execute_array",value:function(F){var J,fe=this,Pe=[],D=[],E=[];mc(F,function(_){_&&(J=_[0],Ru(J)?E.push(_):typeof _=="function"?_.call(fe):Ru(_)&&J==="alias"?Pe.push(_):Ru(_)&&J.indexOf("capture")!==-1&&typeof fe[J]=="function"?E.push(_):D.push(_))});var e=function(_,w){mc(_,function(s){if(Ru(s[0])){var T=w;Yi(s,function(m){T=T[m[0]].apply(T,m.slice(1))})}else this[s[0]].apply(this,s.slice(1))},w)};e(Pe,this),e(D,this),e(E,this)}},{key:"_hasBootstrappedFeatureFlags",value:function(){var F,J;return((F=this.config.bootstrap)===null||F===void 0?void 0:F.featureFlags)&&Object.keys((J=this.config.bootstrap)===null||J===void 0?void 0:J.featureFlags).length>0||!1}},{key:"push",value:function(F){this._execute_array([F])}},{key:"capture",value:function(F,J){var fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$d;if(this.__loaded&&!rw(this,!1)){this._captureMetrics.incr("capture"),F==="$snapshot"&&this._captureMetrics.incr("snapshot");var Pe=(fe=fe||$d).transport;if(Pe&&(fe.transport=Pe),Ul(F)||typeof F!="string")console.error("No event name provided to posthog.capture");else if(!G8(Nl)){this.sessionPersistence.update_search_keyword(),this.get_config("store_google")&&this.sessionPersistence.update_campaign_params(),this.get_config("save_referrer")&&this.sessionPersistence.update_referrer_info();var D={event:F,properties:this._calculate_event_properties(F,J||{})};F==="$identify"&&fe.$set&&(D.$set=fe.$set),(D=Y3(D,fe._noTruncate?null:this.get_config("properties_string_max_length"))).timestamp=fe.timestamp||new Date,this.get_config("debug")&&Ja.log("PostHog.js send",D);var E=JSON.stringify(D),e=this.get_config("api_host")+(fe.endpoint||"/e/"),_=fe!==$d;return!this.get_config("request_batching")||_&&!fe._batchKey||fe.send_instantly?this.__compress_and_send_json_request(e,E,fe):this._requestQueue.enqueue(e,D,fe),this._invokeCaptureHooks(F,D),D}}}},{key:"_addCaptureHook",value:function(F){this.__captureHooks.push(F)}},{key:"_invokeCaptureHooks",value:function(F,J){this.config._onCapture(F,J),Yi(this.__captureHooks,function(fe){return fe(F)})}},{key:"_calculate_event_properties",value:function(F,J){var fe,Pe=this.persistence.remove_event_timer(F),D=yi({},J);if(D.token=this.get_config("token"),F==="$snapshot"){var E=yi(yi({},this.persistence.properties()),this.sessionPersistence.properties());return D.distinct_id=E.distinct_id,D}var e=yo.properties();if(this.sessionManager){var _=this.sessionManager.checkAndGetSessionAndWindowId(),w=_.sessionId,s=_.windowId;D.$session_id=w,D.$window_id=s}if((fe=this.webPerformance)!==null&&fe!==void 0&&fe.isEnabled&&(F==="$pageview"&&this.pageViewIdManager.onPageview(),D=So(D,{$pageview_id:this.pageViewIdManager.getPageViewId()})),F==="$performance_event"){var T=this.persistence.properties();return D.distinct_id=T.distinct_id,D.$current_url=e.$current_url,D}if(Pe!==void 0){var m=new Date().getTime()-Pe;D.$duration=parseFloat((m/1e3).toFixed(3))}D=So({},yo.properties(),this.persistence.properties(),this.sessionPersistence.properties(),D);var f=this.get_config("property_blacklist");Ru(f)?Yi(f,function(t){delete D[t]}):console.error("Invalid value for property_blacklist config: "+f);var l=this.get_config("sanitize_properties");return l&&(D=l(D,F)),D}},{key:"register",value:function(F,J){this.persistence.register(F,J)}},{key:"register_once",value:function(F,J,fe){this.persistence.register_once(F,J,fe)}},{key:"register_for_session",value:function(F){this.sessionPersistence.register(F)}},{key:"unregister",value:function(F){this.persistence.unregister(F)}},{key:"unregister_for_session",value:function(F){this.sessionPersistence.unregister(F)}},{key:"_register_single",value:function(F,J){this.register(Bi({},F,J))}},{key:"getFeatureFlag",value:function(F,J){return this.featureFlags.getFeatureFlag(F,J)}},{key:"getFeatureFlagPayload",value:function(F){var J=this.featureFlags.getFeatureFlagPayload(F);try{return JSON.parse(J)}catch{return J}}},{key:"isFeatureEnabled",value:function(F,J){return this.featureFlags.isFeatureEnabled(F,J)}},{key:"reloadFeatureFlags",value:function(){this.featureFlags.reloadFeatureFlags()}},{key:"updateEarlyAccessFeatureEnrollment",value:function(F,J){this.featureFlags.updateEarlyAccessFeatureEnrollment(F,J)}},{key:"getEarlyAccessFeatures",value:function(F){var J=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.featureFlags.getEarlyAccessFeatures(F,J)}},{key:"onFeatureFlags",value:function(F){return this.featureFlags.onFeatureFlags(F)}},{key:"identify",value:function(F,J,fe){if(F){this._captureMetrics.incr("identify");var Pe=this.get_distinct_id();if(this.register({$user_id:F}),!this.get_property("$device_id")){var D=Pe;this.register_once({$had_persisted_distinct_id:!0,$device_id:D},"")}F!==Pe&&F!==this.get_property(d0)&&(this.unregister(d0),this.register({distinct_id:F}));var E=this.persistence.get_user_state()==="anonymous";F!==Pe&&E?(this.persistence.set_user_state("identified"),this.capture("$identify",{distinct_id:F,$anon_distinct_id:Pe},{$set:J||{},$set_once:fe||{}}),this.featureFlags.setAnonymousDistinctId(Pe)):(J&&this.people.set(J),fe&&this.people.set_once(fe)),F!==Pe&&this.reloadFeatureFlags()}else console.error("Unique user id has not been set in posthog.identify")}},{key:"group",value:function(F,J,fe){if(F&&J){this._captureMetrics.incr("group");var Pe=this.getGroups();Pe[F]!==J&&this.resetGroupPropertiesForFlags(F),this.register({$groups:yi(yi({},Pe),{},Bi({},F,J))}),fe&&(this.capture("$groupidentify",{$group_type:F,$group_key:J,$group_set:fe}),this.setGroupPropertiesForFlags(Bi({},F,fe))),Pe[F]===J||fe||this.reloadFeatureFlags()}else console.error("posthog.group requires a group type and group key")}},{key:"resetGroups",value:function(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}},{key:"setPersonPropertiesForFlags",value:function(F){var J=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setPersonPropertiesForFlags(F,J)}},{key:"resetPersonPropertiesForFlags",value:function(){this.featureFlags.resetPersonPropertiesForFlags()}},{key:"setGroupPropertiesForFlags",value:function(F){var J=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setGroupPropertiesForFlags(F,J)}},{key:"resetGroupPropertiesForFlags",value:function(F){this.featureFlags.resetGroupPropertiesForFlags(F)}},{key:"reset",value:function(F){var J=this.get_property("$device_id");this.persistence.clear(),this.sessionPersistence.clear(),this.persistence.set_user_state("anonymous"),this.sessionManager.resetSessionId();var fe=this.get_config("get_device_id")(xc());this.register_once({distinct_id:fe,$device_id:F?fe:J},"")}},{key:"get_distinct_id",value:function(){return this.get_property("distinct_id")}},{key:"getGroups",value:function(){return this.get_property("$groups")||{}}},{key:"alias",value:function(F,J){return F===this.get_property(Q3)?(Ja.critical("Attempting to create alias for existing People user - aborting."),-2):(Ul(J)&&(J=this.get_distinct_id()),F!==J?(this._register_single(d0,F),this.capture("$create_alias",{alias:F,distinct_id:J})):(console.error("alias matches current distinct_id - skipping api call."),this.identify(F),-1))}},{key:"set_config",value:function(F){var J=yi({},this.config);yc(F)&&(So(this.config,F),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),this.sessionPersistence&&this.sessionPersistence.update_config(this.config),$a.is_supported()&&$a.get("ph_debug")==="true"&&(this.config.debug=!0),this.get_config("debug")&&(fu.DEBUG=!0),this.sessionRecording&&F.disable_session_recording!==void 0&&J.disable_session_recording!==F.disable_session_recording&&(F.disable_session_recording?this.sessionRecording.stopRecording():this.sessionRecording.startRecordingIfEnabled()))}},{key:"startSessionRecording",value:function(){this.set_config({disable_session_recording:!1})}},{key:"stopSessionRecording",value:function(){this.set_config({disable_session_recording:!0})}},{key:"sessionRecordingStarted",value:function(){var F;return!((F=this.sessionRecording)===null||F===void 0||!F.started())}},{key:"loadToolbar",value:function(F){return this.toolbar.loadToolbar(F)}},{key:"get_config",value:function(F){var J;return(J=this.config)===null||J===void 0?void 0:J[F]}},{key:"get_property",value:function(F){return this.persistence.props[F]}},{key:"getSessionProperty",value:function(F){return this.sessionPersistence.props[F]}},{key:"toString",value:function(){var F,J=(F=this.get_config("name"))!==null&&F!==void 0?F:Ss;return J!==Ss&&(J=Ss+"."+J),J}},{key:"_gdpr_init",value:function(){this.get_config("opt_out_capturing_persistence_type")==="localStorage"&&$a.is_supported()&&(!this.has_opted_in_capturing()&&this.has_opted_in_capturing({persistence_type:"cookie"})&&this.opt_in_capturing({enable_persistence:!1}),!this.has_opted_out_capturing()&&this.has_opted_out_capturing({persistence_type:"cookie"})&&this.opt_out_capturing({clear_persistence:!1}),this.clear_opt_in_out_capturing({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_capturing()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_capturing()||!this.get_config("opt_out_capturing_by_default")&&!lu.get("ph_optout")||(lu.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.get_config("opt_out_persistence_by_default")}))}},{key:"_gdpr_update_persistence",value:function(F){var J;if(F&&F.clear_persistence)J=!0;else{if(!F||!F.enable_persistence)return;J=!1}this.get_config("disable_persistence")||this.persistence.disabled===J||this.persistence.set_disabled(J),this.get_config("disable_persistence")||this.sessionPersistence.disabled===J||this.sessionPersistence.set_disabled(J)}},{key:"_gdpr_call_func",value:function(F,J){return J=So({capture:this.capture.bind(this),persistence_type:this.get_config("opt_out_capturing_persistence_type"),cookie_prefix:this.get_config("opt_out_capturing_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),secure_cookie:this.get_config("secure_cookie")},J||{}),$a.is_supported()||J.persistence_type!=="localStorage"||(J.persistence_type="cookie"),F(this.get_config("token"),{capture:J.capture,captureEventName:J.capture_event_name,captureProperties:J.capture_properties,persistenceType:J.persistence_type,persistencePrefix:J.cookie_prefix,cookieExpiration:J.cookie_expiration,crossSubdomainCookie:J.cross_subdomain_cookie,secureCookie:J.secure_cookie})}},{key:"opt_in_capturing",value:function(F){F=So({enable_persistence:!0},F||{}),this._gdpr_call_func(K8,F),this._gdpr_update_persistence(F)}},{key:"opt_out_capturing",value:function(F){var J=So({clear_persistence:!0},F||{});this._gdpr_call_func(Q8,J),this._gdpr_update_persistence(J)}},{key:"has_opted_in_capturing",value:function(F){return this._gdpr_call_func(eT,F)}},{key:"has_opted_out_capturing",value:function(F){return this._gdpr_call_func(ew,F)}},{key:"clear_opt_in_out_capturing",value:function(F){var J=So({enable_persistence:!0},F??{});this._gdpr_call_func(tT,J),this._gdpr_update_persistence(J)}},{key:"debug",value:function(F){F===!1?(gi.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(gi.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}},{key:"decodeLZ64",value:function(F){return qs.decompressFromBase64(F||null)}}]),O}();(function(O,F){for(var J=0;J: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 s in w){var T=s.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");_.addStyleRule(T,w[s])}},98222:function(D,E,e){D.exports=e(82887)},27206:function(D,E,e){D.exports=e(60822)},59893:function(D,E,e){D.exports=e(23381)},5224:function(D,E,e){D.exports=e(83832)},59509:function(D,E,e){D.exports=e(72201)},75557:function(D,E,e){D.exports=e(91815)},40338:function(D,E,e){D.exports=e(21462)},35080:function(D,E,e){D.exports=e(51319)},61396:function(D,E,e){D.exports=e(57516)},40549:function(D,E,e){D.exports=e(98128)},49866:function(D,E,e){D.exports=e(99442)},36089:function(D,E,e){D.exports=e(93740)},19548:function(D,E,e){D.exports=e(8729)},35831:function(D,E,e){D.exports=e(93814)},61039:function(D,E,e){D.exports=e(14382)},97040:function(D,E,e){D.exports=e(51759)},77986:function(D,E,e){D.exports=e(10421)},24296:function(D,E,e){D.exports=e(43102)},58872:function(D,E,e){D.exports=e(92165)},29626:function(D,E,e){D.exports=e(3325)},65591:function(D,E,e){D.exports=e(36071)},69738:function(D,E,e){D.exports=e(43905)},92650:function(D,E,e){D.exports=e(35902)},35630:function(D,E,e){D.exports=e(69816)},73434:function(D,E,e){D.exports=e(94507)},27909:function(D,E,e){var _=e(19548);_.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)]),D.exports=_},46163:function(D,E,e){D.exports=e(15154)},96881:function(D,E,e){D.exports=e(64943)},50581:function(D,E,e){D.exports=e(21164)},55334:function(D,E,e){D.exports=e(54186)},65317:function(D,E,e){D.exports=e(94873)},10021:function(D,E,e){D.exports=e(67618)},54201:function(D,E,e){D.exports=e(58810)},5861:function(D,E,e){D.exports=e(20593)},16122:function(D,E,e){D.exports=e(29396)},83043:function(D,E,e){D.exports=e(13551)},48131:function(D,E,e){D.exports=e(46858)},47582:function(D,E,e){D.exports=e(17988)},21641:function(D,E,e){D.exports=e(68868)},96268:function(D,E,e){D.exports=e(20467)},19440:function(D,E,e){D.exports=e(91271)},99488:function(D,E,e){D.exports=e(21461)},97393:function(D,E,e){D.exports=e(85956)},25743:function(D,E,e){D.exports=e(52979)},66398:function(D,E,e){D.exports=e(32275)},17280:function(D,E,e){D.exports=e(6419)},77900:function(D,E,e){D.exports=e(61510)},81299:function(D,E,e){D.exports=e(87619)},93005:function(D,E,e){D.exports=e(93601)},40344:function(D,E,e){D.exports=e(96595)},47645:function(D,E,e){D.exports=e(70954)},6197:function(D,E,e){D.exports=e(47462)},4534:function(D,E,e){D.exports=e(17659)},85461:function(D,E,e){D.exports=e(19990)},82884:function(D){D.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(D,E,e){var _=e(82884),w=e(41940),s=e(85555),T=e(44467).templatedArray;e(24695),D.exports=T("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:w({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:_.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:_.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",s.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",s.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",s.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",s.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:w({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},3749:function(D,E,e){var _=e(71828),w=e(89298),s=e(92605).draw;function T(f){var l=f._fullLayout;_.filterVisible(l.annotations).forEach(function(t){var a=w.getFromId(f,t.xref),r=w.getFromId(f,t.yref),n=w.getRefType(t.xref),o=w.getRefType(t.yref);t._extremes={},n==="range"&&m(t,a),o==="range"&&m(t,r)})}function m(f,l){var t,a=l._id,r=a.charAt(0),n=f[r],o=f["a"+r],i=f[r+"ref"],u=f["a"+r+"ref"],p=f["_"+r+"padplus"],c=f["_"+r+"padminus"],b={x:1,y:-1}[r]*f[r+"shift"],d=3*f.arrowsize*f.arrowwidth||0,v=d+b,x=d-b,g=3*f.startarrowsize*f.arrowwidth||0,y=g+b,k=g-b;if(u===i){var h=w.findExtremes(l,[l.r2c(n)],{ppadplus:v,ppadminus:x}),M=w.findExtremes(l,[l.r2c(o)],{ppadplus:Math.max(p,y),ppadminus:Math.max(c,k)});t={min:[h.min[0],M.min[0]],max:[h.max[0],M.max[0]]}}else y=o?y+o:y,k=o?k-o:k,t=w.findExtremes(l,[l.r2c(n)],{ppadplus:Math.max(p,v,y),ppadminus:Math.max(c,x,k)});f._extremes[a]=t}D.exports=function(f){var l=f._fullLayout;if(_.filterVisible(l.annotations).length&&f._fullData.length)return _.syncOrAsync([s,T],f)}},44317:function(D,E,e){var _=e(71828),w=e(73972),s=e(44467).arrayEditor;function T(f,l){var t,a,r,n,o,i,u,p=f._fullLayout.annotations,c=[],b=[],d=[],v=(l||[]).length;for(t=0;t0||t.explicitOff.length>0},onClick:function(f,l){var t,a,r=T(f,l),n=r.on,o=r.off.concat(r.explicitOff),i={},u=f._fullLayout.annotations;if(n.length||o.length){for(t=0;t.6666666666666666?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[mt]}for(var Ue=!1,De=["x","y"],je=0;je1)&&(ot===st?((Nt=ft.r2fraction(v["a"+Ze]))<0||Nt>1)&&(Ue=!0):Ue=!0),ge=ft._offset+ft.r2p(v[Ze]),Ne=.5}else{var Je=qt==="domain";Ze==="x"?(Se=v[Ze],ge=Je?ft._offset+ft._length*Se:ge=C.l+C.w*Se):(Se=1-v[Ze],ge=Je?ft._offset+ft._length*Se:ge=C.t+C.h*Se),Ne=v.showarrow?.5:Se}if(v.showarrow){Ft.head=ge;var Ke=v["a"+Ze];if(Ye=Et*Ee(.5,v.xanchor)-Tt*Ee(.5,v.yanchor),ot===st){var Ge=f.getRefType(ot);Ge==="domain"?(Ze==="y"&&(Ke=1-Ke),Ft.tail=ft._offset+ft._length*Ke):Ge==="paper"?Ze==="y"?(Ke=1-Ke,Ft.tail=C.t+C.h*Ke):Ft.tail=C.l+C.w*Ke:Ft.tail=ft._offset+ft.r2p(Ke),be=Ye}else Ft.tail=ge+Ke,be=Ye+Ke;Ft.text=Ft.tail+Ye;var nt=A[Ze==="x"?"width":"height"];if(st==="paper"&&(Ft.head=T.constrain(Ft.head,1,nt-1)),ot==="pixel"){var ht=-Math.max(Ft.tail-3,Ft.text),Oe=Math.min(Ft.tail+3,Ft.text)-nt;ht>0?(Ft.tail+=ht,Ft.text+=ht):Oe>0&&(Ft.tail-=Oe,Ft.text-=Oe)}Ft.tail+=It,Ft.head+=It}else be=Ye=xt*Ee(Ne,Dt),Ft.text=ge+Ye;Ft.text+=It,Ye+=It,be+=It,v["_"+Ze+"padplus"]=xt/2+be,v["_"+Ze+"padminus"]=xt/2-be,v["_"+Ze+"size"]=xt,v["_"+Ze+"shift"]=Ye}if(Ue)Q.remove();else{var Be=0,Qe=0;if(v.align!=="left"&&(Be=(ne-Me)*(v.align==="center"?.5:1)),v.valign!=="top"&&(Qe=(ue-Ce)*(v.valign==="middle"?.5:1)),Te)ze.select("svg").attr({x:K+Be-1,y:K+Qe}).call(t.setClipUrl,re?B:null,d);else{var ut=K+Qe-Ae.top,pt=K+Be-Ae.left;xe.call(r.positionText,pt,ut).call(t.setClipUrl,re?B:null,d)}oe.select("rect").call(t.setRect,K,K,ne,ue),te.call(t.setRect,X/2,X/2,me-X,we-X),Q.call(t.setTranslate,Math.round(G.x.text-me/2),Math.round(G.y.text-we/2)),V.attr({transform:"rotate("+N+","+G.x.text+","+G.y.text+")"});var bt,Lt=function(Ct,mt){j.selectAll(".annotation-arrow-g").remove();var Ot=G.x.head,_t=G.y.head,Pt=G.x.tail+Ct,Bt=G.y.tail+mt,Wt=G.x.text+Ct,Gt=G.y.text+mt,Xt=T.rotationXYMatrix(N,Wt,Gt),Kt=T.apply2DTransform(Xt),nn=T.apply2DTransform2(Xt),yn=+te.attr("width"),ln=+te.attr("height"),kn=Wt-.5*yn,Wn=kn+yn,wn=Gt-.5*ln,on=wn+ln,_n=[[kn,wn,kn,on],[kn,on,Wn,on],[Wn,on,Wn,wn],[Wn,wn,kn,wn]].map(nn);if(!_n.reduce(function(ir,dr){return ir^!!T.segmentsIntersect(Ot,_t,Ot+1e6,_t+1e6,dr[0],dr[1],dr[2],dr[3])},!1)){_n.forEach(function(ir){var dr=T.segmentsIntersect(Pt,Bt,Ot,_t,ir[0],ir[1],ir[2],ir[3]);dr&&(Pt=dr.x,Bt=dr.y)});var fn=v.arrowwidth,hn=v.arrowcolor,In=v.arrowside,Cn=j.append("g").style({opacity:l.opacity(hn)}).classed("annotation-arrow-g",!0),Nn=Cn.append("path").attr("d","M"+Pt+","+Bt+"L"+Ot+","+_t).style("stroke-width",fn+"px").call(l.stroke,l.rgb(hn));if(u(Nn,In,v),L.annotationPosition&&Nn.node().parentNode&&!g){var Hn=Ot,qn=_t;if(v.standoff){var or=Math.sqrt(Math.pow(Ot-Pt,2)+Math.pow(_t-Bt,2));Hn+=v.standoff*(Pt-Ot)/or,qn+=v.standoff*(Bt-_t)/or}var tr,Tr,gr=Cn.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Pt-Hn)+","+(Bt-qn),transform:m(Hn,qn)}).style("stroke-width",fn+6+"px").call(l.stroke,"rgba(0,0,0,0)").call(l.fill,"rgba(0,0,0,0)");o.init({element:gr.node(),gd:d,prepFn:function(){var ir=t.getTranslate(Q);tr=ir.x,Tr=ir.y,y&&y.autorange&&I(y._name+".autorange",!0),k&&k.autorange&&I(k._name+".autorange",!0)},moveFn:function(ir,dr){var yr=Kt(tr,Tr),$t=yr[0]+ir,mn=yr[1]+dr;Q.call(t.setTranslate,$t,mn),R("x",c(y,ir,"x",C,v)),R("y",c(k,dr,"y",C,v)),v.axref===v.xref&&R("ax",c(y,ir,"ax",C,v)),v.ayref===v.yref&&R("ay",c(k,dr,"ay",C,v)),Cn.attr("transform",m(ir,dr)),V.attr({transform:"rotate("+N+","+$t+","+mn+")"})},doneFn:function(){w.call("_guiRelayout",d,U());var ir=document.querySelector(".js-notes-box-panel");ir&&ir.redraw(ir.selectedObj)}})}}};v.showarrow&&Lt(0,0),H&&o.init({element:Q.node(),gd:d,prepFn:function(){bt=V.attr("transform")},moveFn:function(Ct,mt){var Ot="pointer";if(v.showarrow)v.axref===v.xref?R("ax",c(y,Ct,"ax",C,v)):R("ax",v.ax+Ct),v.ayref===v.yref?R("ay",c(k,mt,"ay",C.w,v)):R("ay",v.ay+mt),Lt(Ct,mt);else{if(g)return;var _t,Pt;if(y)_t=c(y,Ct,"x",C,v);else{var Bt=v._xsize/C.w,Wt=v.x+(v._xshift-v.xshift)/C.w-Bt/2;_t=o.align(Wt+Ct/C.w,Bt,0,1,v.xanchor)}if(k)Pt=c(k,mt,"y",C,v);else{var Gt=v._ysize/C.h,Xt=v.y-(v._yshift+v.yshift)/C.h-Gt/2;Pt=o.align(Xt-mt/C.h,Gt,0,1,v.yanchor)}R("x",_t),R("y",Pt),y&&k||(Ot=o.getCursor(y?.5:_t,k?.5:Pt,v.xanchor,v.yanchor))}V.attr({transform:m(Ct,mt)+bt}),n(Q,Ot)},clickFn:function(Ct,mt){v.captureevents&&d.emit("plotly_clickannotation",pe(mt))},doneFn:function(){n(Q),w.call("_guiRelayout",d,U());var Ct=document.querySelector(".js-notes-box-panel");Ct&&Ct.redraw(Ct.selectedObj)}})}}}D.exports={draw:function(d){var v=d._fullLayout;v._infolayer.selectAll(".annotation").remove();for(var x=0;x=0,g=a.indexOf("end")>=0,y=c.backoff*d+r.standoff,k=b.backoff*v+r.startstandoff;if(p.nodeName==="line"){n={x:+t.attr("x1"),y:+t.attr("y1")},o={x:+t.attr("x2"),y:+t.attr("y2")};var h=n.x-o.x,M=n.y-o.y;if(u=(i=Math.atan2(M,h))+Math.PI,y&&k&&y+k>Math.sqrt(h*h+M*M))return void j();if(y){if(y*y>h*h+M*M)return void j();var A=y*Math.cos(i),C=y*Math.sin(i);o.x+=A,o.y+=C,t.attr({x2:o.x,y2:o.y})}if(k){if(k*k>h*h+M*M)return void j();var L=k*Math.cos(i),P=k*Math.sin(i);n.x-=L,n.y-=P,t.attr({x1:n.x,y1:n.y})}}else if(p.nodeName==="path"){var I=p.getTotalLength(),R="";if(I1){r=!0;break}}r?T.fullLayout._infolayer.select(".annotation-"+T.id+'[data-index="'+t+'"]').remove():(a._pdata=w(T.glplot.cameraParams,[m.xaxis.r2l(a.x)*f[0],m.yaxis.r2l(a.y)*f[1],m.zaxis.r2l(a.z)*f[2]]),_(T.graphDiv,a,t,T.id,a._xa,a._ya))}}},2468:function(D,E,e){var _=e(73972),w=e(71828);D.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:e(26997)}}},layoutAttributes:e(26997),handleDefaults:e(20226),includeBasePlot:function(s,T){var m=_.subplotsRegistry.gl3d;if(m)for(var f=m.attrRegex,l=Object.keys(s),t=0;t=0)))return a;if(u===3)o[u]>1&&(o[u]=1);else if(o[u]>=1)return a}var p=Math.round(255*o[0])+", "+Math.round(255*o[1])+", "+Math.round(255*o[2]);return i?"rgba("+p+", "+o[3]+")":"rgb("+p+")"}T.tinyRGB=function(a){var r=a.toRgb();return"rgb("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+")"},T.rgb=function(a){return T.tinyRGB(_(a))},T.opacity=function(a){return a?_(a).getAlpha():0},T.addOpacity=function(a,r){var n=_(a).toRgb();return"rgba("+Math.round(n.r)+", "+Math.round(n.g)+", "+Math.round(n.b)+", "+r+")"},T.combine=function(a,r){var n=_(a).toRgb();if(n.a===1)return _(a).toRgbString();var o=_(r||l).toRgb(),i=o.a===1?o:{r:255*(1-o.a)+o.r*o.a,g:255*(1-o.a)+o.g*o.a,b:255*(1-o.a)+o.b*o.a},u={r:i.r*(1-n.a)+n.r*n.a,g:i.g*(1-n.a)+n.g*n.a,b:i.b*(1-n.a)+n.b*n.a};return _(u).toRgbString()},T.contrast=function(a,r,n){var o=_(a);return o.getAlpha()!==1&&(o=_(T.combine(a,l))),(o.isDark()?r?o.lighten(r):l:n?o.darken(n):f).toString()},T.stroke=function(a,r){var n=_(r);a.style({stroke:T.tinyRGB(n),"stroke-opacity":n.getAlpha()})},T.fill=function(a,r){var n=_(r);a.style({fill:T.tinyRGB(n),"fill-opacity":n.getAlpha()})},T.clean=function(a){if(a&&typeof a=="object"){var r,n,o,i,u=Object.keys(a);for(r=0;r0?Ke>=Be:Ke<=Be));Ge++)Ke>ut&&Ke0?Ke>=Be:Ke<=Be));Ge++)Ke>Je[0]&&Ke1){var ot=Math.pow(10,Math.floor(Math.log(st)/Math.LN10));Ye*=ot*l.roundUp(st/ot,[2,5,10]),(Math.abs(Te.start)/Te.size+1e-6)%1<2e-6&&(Se.tick0=0)}Se.dtick=Ye}Se.domain=U?[ge+K/se.h,ge+we-K/se.h]:[ge+Y/se.w,ge+we-Y/se.w],Se.setScale(),P.attr("transform",t(Math.round(se.l),Math.round(se.t)));var ft,yt=P.select("."+k.cbtitleunshift).attr("transform",t(-Math.round(se.l),-Math.round(se.t))),Et=Se.ticklabelposition,Tt=Se.title.font.size,xt=P.select("."+k.cbaxis),Dt=0,It=0;function Ft(qt,Nt){var Je={propContainer:Se,propName:I._propPrefix+"title",traceIndex:I._traceIndex,_meta:I._meta,placeholder:oe._dfltTitle.colorbar,containerGroup:P.select("."+k.cbtitle)},Ke=qt.charAt(0)==="h"?qt.substr(1):"h"+qt;P.selectAll("."+Ke+",."+Ke+"-math-group").remove(),i.draw(R,qt,a(Je,Nt||{}))}return l.syncOrAsync([s.previousPromises,function(){var qt,Nt;(U&&Ne||!U&&!Ne)&&(de==="top"&&(qt=Y+se.l+se.w*te,Nt=K+se.t+se.h*(1-ge-we)+3+.75*Tt),de==="bottom"&&(qt=Y+se.l+se.w*te,Nt=K+se.t+se.h*(1-ge)-3-.25*Tt),de==="right"&&(Nt=K+se.t+se.h*re+3+.75*Tt,qt=Y+se.l+se.w*ge),Ft(Se._id+"title",{attributes:{x:qt,y:Nt,"text-anchor":U?"start":"middle"}}))},function(){if(!U&&!Ne||U&&Ne){var qt,Nt=P.select("."+k.cbtitle),Je=Nt.select("text"),Ke=[-V/2,V/2],Ge=Nt.select(".h"+Se._id+"title-math-group").node(),nt=15.6;if(Je.node()&&(nt=parseInt(Je.node().style.fontSize,10)*x),Ge?(qt=n.bBox(Ge),It=qt.width,(Dt=qt.height)>nt&&(Ke[1]-=(Dt-nt)/2)):Je.node()&&!Je.classed(k.jsPlaceholder)&&(qt=n.bBox(Je.node()),It=qt.width,Dt=qt.height),U){if(Dt){if(Dt+=5,de==="top")Se.domain[1]-=Dt/se.h,Ke[1]*=-1;else{Se.domain[0]+=Dt/se.h;var ht=u.lineCount(Je);Ke[1]+=(1-ht)*nt}Nt.attr("transform",t(Ke[0],Ke[1])),Se.setScale()}}else It&&(de==="right"&&(Se.domain[0]+=(It+Tt/2)/se.w),Nt.attr("transform",t(Ke[0],Ke[1])),Se.setScale())}P.selectAll("."+k.cbfills+",."+k.cblines).attr("transform",U?t(0,Math.round(se.h*(1-Se.domain[1]))):t(Math.round(se.w*Se.domain[0]),0)),xt.attr("transform",U?t(0,Math.round(-se.t)):t(Math.round(-se.l),0));var Oe=P.select("."+k.cbfills).selectAll("rect."+k.cbfill).attr("style","").data(Me);Oe.enter().append("rect").classed(k.cbfill,!0).style("stroke","none"),Oe.exit().remove();var Be=he.map(Se.c2p).map(Math.round).sort(function(Lt,Ct){return Lt-Ct});Oe.each(function(Lt,Ct){var mt=[Ct===0?he[0]:(Me[Ct]+Me[Ct-1])/2,Ct===Me.length-1?he[1]:(Me[Ct]+Me[Ct+1])/2].map(Se.c2p).map(Math.round);U&&(mt[1]=l.constrain(mt[1]+(mt[1]>mt[0])?1:-1,Be[0],Be[1]));var Ot=_.select(this).attr(U?"x":"y",Ee).attr(U?"y":"x",_.min(mt)).attr(U?"width":"height",Math.max(ne,2)).attr(U?"height":"width",Math.max(_.max(mt)-_.min(mt),2));if(I._fillgradient)n.gradient(Ot,R,I._id,U?"vertical":"horizontalreversed",I._fillgradient,"fill");else{var _t=ze(Lt).replace("e-","");Ot.attr("fill",w(_t).toHexString())}});var Qe=P.select("."+k.cblines).selectAll("path."+k.cbline).data(xe.color&&xe.width?Ce:[]);Qe.enter().append("path").classed(k.cbline,!0),Qe.exit().remove(),Qe.each(function(Lt){var Ct=Ee,mt=Math.round(Se.c2p(Lt))+xe.width/2%1;_.select(this).attr("d","M"+(U?Ct+","+mt:mt+","+Ct)+(U?"h":"v")+ne).call(n.lineGroupStyle,xe.width,ye(Lt),xe.dash)}),xt.selectAll("g."+Se._id+"tick,path").remove();var ut=Ee+ne+(V||0)/2-(I.ticks==="outside"?1:0),pt=m.calcTicks(Se),bt=m.getTickSigns(Se)[2];return m.drawTicks(R,Se,{vals:Se.ticks==="inside"?m.clipEnds(Se,pt):pt,layer:xt,path:m.makeTickPath(Se,ut,bt),transFn:m.makeTransTickFn(Se)}),m.drawLabels(R,Se,{vals:pt,layer:xt,transFn:m.makeTransTickLabelFn(Se),labelFns:m.makeLabelFns(Se,ut)})},function(){if(U&&!Ne||!U&&Ne){var qt,Nt,Je=Se.position||0,Ke=Se._offset+Se._length/2;if(de==="right")Nt=Ke,qt=se.l+se.w*Je+10+Tt*(Se.showticklabels?1:.5);else if(qt=Ke,de==="bottom"&&(Nt=se.t+se.h*Je+10+(Et.indexOf("inside")===-1?Se.tickfont.size:0)+(Se.ticks!=="intside"&&I.ticklen||0)),de==="top"){var Ge=pe.text.split("
").length;Nt=se.t+se.h*Je+10-ne-x*Tt*Ge}Ft((U?"h":"v")+Se._id+"title",{avoid:{selection:_.select(R).selectAll("g."+Se._id+"tick"),side:de,offsetTop:U?0:se.t,offsetLeft:U?se.l:0,maxShift:U?oe.width:oe.height},attributes:{x:qt,y:Nt,"text-anchor":"middle"},transform:{rotate:U?-90:0,offset:0}})}},s.previousPromises,function(){var qt,Nt=ne+V/2;Et.indexOf("inside")===-1&&(qt=n.bBox(xt.node()),Nt+=U?qt.width:qt.height),ft=yt.select("text");var Je=0,Ke=U&&de==="top",Ge=!U&&de==="right",nt=0;if(ft.node()&&!ft.classed(k.jsPlaceholder)){var ht,Oe=yt.select(".h"+Se._id+"title-math-group").node();Oe&&(U&&Ne||!U&&!Ne)?(Je=(qt=n.bBox(Oe)).width,ht=qt.height):(Je=(qt=n.bBox(yt.node())).right-se.l-(U?Ee:be),ht=qt.bottom-se.t-(U?be:Ee),U||de!=="top"||(Nt+=qt.height,nt=qt.height)),Ge&&(ft.attr("transform",t(Je/2+Tt/2,0)),Je*=2),Nt=Math.max(Nt,U?Je:ht)}var Be=2*(U?Y:K)+Nt+H+V/2,Qe=0;!U&&pe.text&&X==="bottom"&&re<=0&&(Be+=Qe=Be/2,nt+=Qe),oe._hColorbarMoveTitle=Qe,oe._hColorbarMoveCBTitle=nt;var ut=H+V;P.select("."+k.cbbg).attr("x",(U?Ee:be)-ut/2-(U?Y:0)).attr("y",(U?be:Ee)-(U?me:K+nt-Qe)).attr(U?"width":"height",Math.max(Be-Qe,2)).attr(U?"height":"width",Math.max(me+ut,2)).call(o.fill,ee).call(o.stroke,I.bordercolor).style("stroke-width",H);var pt=Ge?Math.max(Je-10,0):0;if(P.selectAll("."+k.cboutline).attr("x",(U?Ee:be+Y)+pt).attr("y",(U?be+K-me:Ee)+(Ke?Dt:0)).attr(U?"width":"height",Math.max(ne,2)).attr(U?"height":"width",Math.max(me-(U?2*K+Dt:2*Y+pt),2)).call(o.stroke,I.outlinecolor).style({fill:"none","stroke-width":V}),P.attr("transform",t(se.l-(U?Ue*Be:0),se.t-(U?0:(1-De)*Be-nt))),!U&&(H||w(ee).getAlpha()&&!w.equals(oe.paper_bgcolor,ee))){var bt=xt.selectAll("text"),Lt=bt[0].length,Ct=P.select("."+k.cbbg).node(),mt=n.bBox(Ct),Ot=n.getTranslate(P);bt.each(function(Kt,nn){var yn=Lt-1;if(nn===0||nn===yn){var ln,kn=n.bBox(this),Wn=n.getTranslate(this);if(nn===yn){var wn=kn.right+Wn.x;(ln=mt.right+Ot.x+be-H-2+te-wn)>0&&(ln=0)}else if(nn===0){var on=kn.left+Wn.x;(ln=mt.left+Ot.x+be+H+2-on)<0&&(ln=0)}ln&&(Lt<3?this.setAttribute("transform","translate("+ln+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var _t={},Pt=g[Q],Bt=y[Q],Wt=g[X],Gt=y[X],Xt=Be-ne;U?(G==="pixels"?(_t.y=re,_t.t=me*Wt,_t.b=me*Gt):(_t.t=_t.b=0,_t.yt=re+B*Wt,_t.yb=re-B*Gt),j==="pixels"?(_t.x=te,_t.l=Be*Pt,_t.r=Be*Bt):(_t.l=Xt*Pt,_t.r=Xt*Bt,_t.xl=te-N*Pt,_t.xr=te+N*Bt)):(G==="pixels"?(_t.x=te,_t.l=me*Pt,_t.r=me*Bt):(_t.l=_t.r=0,_t.xl=te+B*Pt,_t.xr=te-B*Bt),j==="pixels"?(_t.y=1-re,_t.t=Be*Wt,_t.b=Be*Gt):(_t.t=Xt*Wt,_t.b=Xt*Gt,_t.yt=re-N*Wt,_t.yb=re+N*Gt)),s.autoMargin(R,I._id,_t)}],R)}(C,A,h);L&&L.then&&(h._promises||[]).push(L),h._context.edits.colorbarPosition&&function(P,I,R){var U,B,G,N=I.orientation==="v",j=R._fullLayout._size;f.init({element:P.node(),gd:R,prepFn:function(){U=P.attr("transform"),r(P)},moveFn:function(V,H){P.attr("transform",U+t(V,H)),B=f.align((N?I._uFrac:I._vFrac)+V/j.w,N?I._thickFrac:I._lenFrac,0,1,I.xanchor),G=f.align((N?I._vFrac:1-I._uFrac)-H/j.h,N?I._lenFrac:I._thickFrac,0,1,I.yanchor);var ee=f.getCursor(B,G,I.xanchor,I.yanchor);r(P,ee)},doneFn:function(){if(r(P),B!==void 0&&G!==void 0){var V={};V[I._propPrefix+"x"]=B,V[I._propPrefix+"y"]=G,I._traceIndex!==void 0?T.call("_guiRestyle",R,V,I._traceIndex):T.call("_guiRelayout",R,V)}}})}(C,A,h)}),M.exit().each(function(A){s.autoMargin(h,A._id)}).remove(),M.order()}}},76228:function(D,E,e){var _=e(71828);D.exports=function(w){return _.isPlainObject(w.colorbar)}},12311:function(D,E,e){D.exports={moduleType:"component",name:"colorbar",attributes:e(63583),supplyDefaults:e(62499),draw:e(98981).draw,hasColorbar:e(76228)}},50693:function(D,E,e){var _=e(63583),w=e(30587).counter,s=e(78607),T=e(63282).scales;function m(f){return"`"+f+"`"}s(T),D.exports=function(f,l){f=f||"";var t,a=(l=l||{}).cLetter||"c",r=("onlyIfNumerical"in l&&l.onlyIfNumerical,"noScale"in l?l.noScale:f==="marker.line"),n="showScaleDflt"in l?l.showScaleDflt:a==="z",o=typeof l.colorscaleDflt=="string"?T[l.colorscaleDflt]:null,i=l.editTypeOverride||"",u=f?f+".":"";"colorAttr"in l?(t=l.colorAttr,l.colorAttr):m(u+(t={z:"z",c:"color"}[a]));var p=a+"auto",c=a+"min",b=a+"max",d=a+"mid",v={};v[c]=v[b]=void 0;var x={};x[p]=!1;var g={};return t==="color"&&(g.color={valType:"color",arrayOk:!0,editType:i||"style"},l.anim&&(g.color.anim=!0)),g[p]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:v},g[c]={valType:"number",dflt:null,editType:i||"plot",impliedEdits:x},g[b]={valType:"number",dflt:null,editType:i||"plot",impliedEdits:x},g[d]={valType:"number",dflt:null,editType:"calc",impliedEdits:v},g.colorscale={valType:"colorscale",editType:"calc",dflt:o,impliedEdits:{autocolorscale:!1}},g.autocolorscale={valType:"boolean",dflt:l.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},g.reversescale={valType:"boolean",dflt:!1,editType:"plot"},r||(g.showscale={valType:"boolean",dflt:n,editType:"calc"},g.colorbar=_),l.noColorAxis||(g.coloraxis={valType:"subplotid",regex:w("coloraxis"),dflt:null,editType:"calc"}),g}},78803:function(D,E,e){var _=e(92770),w=e(71828),s=e(52075).extractOpts;D.exports=function(T,m,f){var l,t=T._fullLayout,a=f.vals,r=f.containerStr,n=r?w.nestedProperty(m,r).get():m,o=s(n),i=o.auto!==!1,u=o.min,p=o.max,c=o.mid,b=function(){return w.aggNums(Math.min,null,a)},d=function(){return w.aggNums(Math.max,null,a)};u===void 0?u=b():i&&(u=n._colorAx&&_(u)?Math.min(u,b()):b()),p===void 0?p=d():i&&(p=n._colorAx&&_(p)?Math.max(p,d()):d()),i&&c!==void 0&&(p-c>c-u?u=c-(p-c):p-c=0?t.colorscale.sequential:t.colorscale.sequentialminus,o._sync("colorscale",l))}},33046:function(D,E,e){var _=e(71828),w=e(52075).hasColorscale,s=e(52075).extractOpts;D.exports=function(T,m){function f(i,u){var p=i["_"+u];p!==void 0&&(i[u]=p)}function l(i,u){var p=u.container?_.nestedProperty(i,u.container).get():i;if(p)if(p.coloraxis)p._colorAx=m[p.coloraxis];else{var c=s(p),b=c.auto;(b||c.min===void 0)&&f(p,u.min),(b||c.max===void 0)&&f(p,u.max),c.autocolorscale&&f(p,"colorscale")}}for(var t=0;t=0;b--,d++){var v=u[b];c[d]=[1-v[0],v[1]]}return c}function o(u,p){p=p||{};for(var c=u.domain,b=u.range,d=b.length,v=new Array(d),x=0;x1.3333333333333333-f?m:f}},70461:function(D,E,e){var _=e(71828),w=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];D.exports=function(s,T,m,f){return s=m==="left"?0:m==="center"?1:m==="right"?2:_.constrain(Math.floor(3*s),0,2),T=f==="bottom"?0:f==="middle"?1:f==="top"?2:_.constrain(Math.floor(3*T),0,2),w[T][s]}},64505:function(D,E){E.selectMode=function(e){return e==="lasso"||e==="select"},E.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"},E.openMode=function(e){return e==="drawline"||e==="drawopenpath"},E.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"},E.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"},E.selectingOrDrawing=function(e){return E.freeMode(e)||E.rectMode(e)}},28569:function(D,E,e){var _=e(48956),w=e(57035),s=e(38520),T=e(71828).removeElement,m=e(85555),f=D.exports={};f.align=e(92807),f.getCursor=e(70461);var l=e(26041);function t(){var r=document.createElement("div");r.className="dragcover";var n=r.style;return n.position="fixed",n.left=0,n.right=0,n.top=0,n.bottom=0,n.zIndex=999999999,n.background="none",document.body.appendChild(r),r}function a(r){return _(r.changedTouches?r.changedTouches[0]:r,document.body)}f.unhover=l.wrapped,f.unhoverRaw=l.raw,f.init=function(r){var n,o,i,u,p,c,b,d,v=r.gd,x=1,g=v._context.doubleClickDelay,y=r.element;v._mouseDownTime||(v._mouseDownTime=0),y.style.pointerEvents="all",y.onmousedown=h,s?(y._ontouchstart&&y.removeEventListener("touchstart",y._ontouchstart),y._ontouchstart=h,y.addEventListener("touchstart",h,{passive:!1})):y.ontouchstart=h;var k=r.clampFn||function(C,L,P){return Math.abs(C)g&&(x=Math.max(x-1,1)),v._dragged)r.doneFn&&r.doneFn();else if(r.clickFn&&r.clickFn(x,c),!d){var L;try{L=new MouseEvent("click",C)}catch{var P=a(C);(L=document.createEvent("MouseEvents")).initMouseEvent("click",C.bubbles,C.cancelable,C.view,C.detail,C.screenX,C.screenY,P[0],P[1],C.ctrlKey,C.altKey,C.shiftKey,C.metaKey,C.button,C.relatedTarget)}b.dispatchEvent(L)}v._dragging=!1,v._dragged=!1}else v._dragged=!1}},f.coverSlip=t},26041:function(D,E,e){var _=e(11086),w=e(79990),s=e(24401).getGraphDiv,T=e(26675),m=D.exports={};m.wrapped=function(f,l,t){(f=s(f))._fullLayout&&w.clear(f._fullLayout._uid+T.HOVERID),m.raw(f,l,t)},m.raw=function(f,l){var t=f._fullLayout,a=f._hoverdata;l||(l={}),l.target&&!f._dragged&&_.triggerHandler(f,"plotly_beforehover",l)===!1||(t._hoverlayer.selectAll("g").remove(),t._hoverlayer.selectAll("line").remove(),t._hoverlayer.selectAll("circle").remove(),f._hoverdata=void 0,l.target&&a&&f.emit("plotly_unhover",{event:l,points:a}))}},79952:function(D,E){E.P={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},E.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(D,E,e){var _=e(39898),w=e(71828),s=w.numberFormat,T=e(92770),m=e(84267),f=e(73972),l=e(7901),t=e(21081),a=w.strTranslate,r=e(63893),n=e(77922),o=e(18783).LINE_SPACING,i=e(37822).DESELECTDIM,u=e(34098),p=e(39984),c=e(23469).appendArrayPointValue,b=D.exports={};function d(Te,Ae,Me){var Ce=Ae.fillpattern,ne=Ce&&b.getPatternAttr(Ce.shape,0,"");if(ne){var ue=b.getPatternAttr(Ce.bgcolor,0,null),me=b.getPatternAttr(Ce.fgcolor,0,null),we=Ce.fgopacity,Ee=b.getPatternAttr(Ce.size,0,8),Ue=b.getPatternAttr(Ce.solidity,0,.3),De=Ae.uid;b.pattern(Te,"point",Me,De,ne,Ee,Ue,void 0,Ce.fillmode,ue,me,we)}else Ae.fillcolor&&Te.call(l.fill,Ae.fillcolor)}b.font=function(Te,Ae,Me,Ce){w.isPlainObject(Ae)&&(Ce=Ae.color,Me=Ae.size,Ae=Ae.family),Ae&&Te.style("font-family",Ae),Me+1&&Te.style("font-size",Me+"px"),Ce&&Te.call(l.fill,Ce)},b.setPosition=function(Te,Ae,Me){Te.attr("x",Ae).attr("y",Me)},b.setSize=function(Te,Ae,Me){Te.attr("width",Ae).attr("height",Me)},b.setRect=function(Te,Ae,Me,Ce,ne){Te.call(b.setPosition,Ae,Me).call(b.setSize,Ce,ne)},b.translatePoint=function(Te,Ae,Me,Ce){var ne=Me.c2p(Te.x),ue=Ce.c2p(Te.y);return!!(T(ne)&&T(ue)&&Ae.node())&&(Ae.node().nodeName==="text"?Ae.attr("x",ne).attr("y",ue):Ae.attr("transform",a(ne,ue)),!0)},b.translatePoints=function(Te,Ae,Me){Te.each(function(Ce){var ne=_.select(this);b.translatePoint(Ce,ne,Ae,Me)})},b.hideOutsideRangePoint=function(Te,Ae,Me,Ce,ne,ue){Ae.attr("display",Me.isPtWithinRange(Te,ne)&&Ce.isPtWithinRange(Te,ue)?null:"none")},b.hideOutsideRangePoints=function(Te,Ae){if(Ae._hasClipOnAxisFalse){var Me=Ae.xaxis,Ce=Ae.yaxis;Te.each(function(ne){var ue=ne[0].trace,me=ue.xcalendar,we=ue.ycalendar,Ee=f.traceIs(ue,"bar-like")?".bartext":".point,.textpoint";Te.selectAll(Ee).each(function(Ue){b.hideOutsideRangePoint(Ue,_.select(this),Me,Ce,me,we)})})}},b.crispRound=function(Te,Ae,Me){return Ae&&T(Ae)?Te._context.staticPlot?Ae:Ae<1?1:Math.round(Ae):Me||0},b.singleLineStyle=function(Te,Ae,Me,Ce,ne){Ae.style("fill","none");var ue=(((Te||[])[0]||{}).trace||{}).line||{},me=Me||ue.width||0,we=ne||ue.dash||"";l.stroke(Ae,Ce||ue.color),b.dashLine(Ae,we,me)},b.lineGroupStyle=function(Te,Ae,Me,Ce){Te.style("fill","none").each(function(ne){var ue=(((ne||[])[0]||{}).trace||{}).line||{},me=Ae||ue.width||0,we=Ce||ue.dash||"";_.select(this).call(l.stroke,Me||ue.color).call(b.dashLine,we,me)})},b.dashLine=function(Te,Ae,Me){Me=+Me||0,Ae=b.dashStyle(Ae,Me),Te.style({"stroke-dasharray":Ae,"stroke-width":Me+"px"})},b.dashStyle=function(Te,Ae){Ae=+Ae||1;var Me=Math.max(Ae,3);return Te==="solid"?Te="":Te==="dot"?Te=Me+"px,"+Me+"px":Te==="dash"?Te=3*Me+"px,"+3*Me+"px":Te==="longdash"?Te=5*Me+"px,"+5*Me+"px":Te==="dashdot"?Te=3*Me+"px,"+Me+"px,"+Me+"px,"+Me+"px":Te==="longdashdot"&&(Te=5*Me+"px,"+2*Me+"px,"+Me+"px,"+2*Me+"px"),Te},b.singleFillStyle=function(Te,Ae){var Me=_.select(Te.node());d(Te,((Me.data()[0]||[])[0]||{}).trace||{},Ae)},b.fillGroupStyle=function(Te,Ae){Te.style("stroke-width",0).each(function(Me){var Ce=_.select(this);Me[0].trace&&d(Ce,Me[0].trace,Ae)})};var v=e(90998);b.symbolNames=[],b.symbolFuncs=[],b.symbolBackOffs=[],b.symbolNeedLines={},b.symbolNoDot={},b.symbolNoFill={},b.symbolList=[],Object.keys(v).forEach(function(Te){var Ae=v[Te],Me=Ae.n;b.symbolList.push(Me,String(Me),Te,Me+100,String(Me+100),Te+"-open"),b.symbolNames[Me]=Te,b.symbolFuncs[Me]=Ae.f,b.symbolBackOffs[Me]=Ae.backoff||0,Ae.needLine&&(b.symbolNeedLines[Me]=!0),Ae.noDot?b.symbolNoDot[Me]=!0:b.symbolList.push(Me+200,String(Me+200),Te+"-dot",Me+300,String(Me+300),Te+"-open-dot"),Ae.noFill&&(b.symbolNoFill[Me]=!0)});var x=b.symbolNames.length;function g(Te,Ae,Me,Ce){var ne=Te%100;return b.symbolFuncs[ne](Ae,Me,Ce)+(Te>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}b.symbolNumber=function(Te){if(T(Te))Te=+Te;else if(typeof Te=="string"){var Ae=0;Te.indexOf("-open")>0&&(Ae=100,Te=Te.replace("-open","")),Te.indexOf("-dot")>0&&(Ae+=200,Te=Te.replace("-dot","")),(Te=b.symbolNames.indexOf(Te))>=0&&(Te+=Ae)}return Te%100>=x||Te>=400?0:Math.floor(Math.max(Te,0))};var y={x1:1,x2:0,y1:0,y2:0},k={x1:0,x2:0,y1:1,y2:0},h=s("~f"),M={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:y},horizontalreversed:{node:"linearGradient",attrs:y,reversed:!0},vertical:{node:"linearGradient",attrs:k},verticalreversed:{node:"linearGradient",attrs:k,reversed:!0}};b.gradient=function(Te,Ae,Me,Ce,ne,ue){for(var me=ne.length,we=M[Ce],Ee=new Array(me),Ue=0;Ue=100;var Ue=ze(Te,Me),De=K(Te,Me);Ae.attr("d",g(Ee,we,Ue,De))}var je,ge,be,Se=!1;if(Te.so)be=me.outlierwidth,ge=me.outliercolor,je=ue.outliercolor;else{var Ne=(me||{}).width;be=(Te.mlw+1||Ne+1||(Te.trace?(Te.trace.marker.line||{}).width:0)+1)-1||0,ge="mlc"in Te?Te.mlcc=Ce.lineScale(Te.mlc):w.isArrayOrTypedArray(me.color)?l.defaultLine:me.color,w.isArrayOrTypedArray(ue.color)&&(je=l.defaultLine,Se=!0),je="mc"in Te?Te.mcc=Ce.markerScale(Te.mc):ue.color||"rgba(0,0,0,0)",Ce.selectedColorFn&&(je=Ce.selectedColorFn(Te))}if(Te.om)Ae.call(l.stroke,je).style({"stroke-width":(be||1)+"px",fill:"none"});else{Ae.style("stroke-width",(Te.isBlank?0:be)+"px");var Ye=ue.gradient,Ze=Te.mgt;Ze?Se=!0:Ze=Ye&&Ye.type,w.isArrayOrTypedArray(Ze)&&(Ze=Ze[0],M[Ze]||(Ze=0));var st=ue.pattern,ot=st&&b.getPatternAttr(st.shape,Te.i,"");if(Ze&&Ze!=="none"){var ft=Te.mgc;ft?Se=!0:ft=Ye.color;var yt=Me.uid;Se&&(yt+="-"+Te.i),b.gradient(Ae,ne,yt,Ze,[[0,ft],[1,je]],"fill")}else if(ot){var Et=b.getPatternAttr(st.bgcolor,Te.i,null),Tt=b.getPatternAttr(st.fgcolor,Te.i,null),xt=st.fgopacity,Dt=b.getPatternAttr(st.size,Te.i,8),It=b.getPatternAttr(st.solidity,Te.i,.3),Ft=Te.mcc||w.isArrayOrTypedArray(st.shape)||w.isArrayOrTypedArray(st.bgcolor)||w.isArrayOrTypedArray(st.size)||w.isArrayOrTypedArray(st.solidity),qt=Me.uid;Ft&&(qt+="-"+Te.i),b.pattern(Ae,"point",ne,qt,ot,Dt,It,Te.mcc,st.fillmode,Et,Tt,xt)}else l.fill(Ae,je);be&&l.stroke(Ae,ge)}},b.makePointStyleFns=function(Te){var Ae={},Me=Te.marker;return Ae.markerScale=b.tryColorscale(Me,""),Ae.lineScale=b.tryColorscale(Me,"line"),f.traceIs(Te,"symbols")&&(Ae.ms2mrc=u.isBubble(Te)?p(Te):function(){return(Me.size||6)/2}),Te.selectedpoints&&w.extendFlat(Ae,b.makeSelectedPointStyleFns(Te)),Ae},b.makeSelectedPointStyleFns=function(Te){var Ae={},Me=Te.selected||{},Ce=Te.unselected||{},ne=Te.marker||{},ue=Me.marker||{},me=Ce.marker||{},we=ne.opacity,Ee=ue.opacity,Ue=me.opacity,De=Ee!==void 0,je=Ue!==void 0;(w.isArrayOrTypedArray(we)||De||je)&&(Ae.selectedOpacityFn=function(ft){var yt=ft.mo===void 0?ne.opacity:ft.mo;return ft.selected?De?Ee:yt:je?Ue:i*yt});var ge=ne.color,be=ue.color,Se=me.color;(be||Se)&&(Ae.selectedColorFn=function(ft){var yt=ft.mcc||ge;return ft.selected?be||yt:Se||yt});var Ne=ne.size,Ye=ue.size,Ze=me.size,st=Ye!==void 0,ot=Ze!==void 0;return f.traceIs(Te,"symbols")&&(st||ot)&&(Ae.selectedSizeFn=function(ft){var yt=ft.mrc||Ne/2;return ft.selected?st?Ye/2:yt:ot?Ze/2:yt}),Ae},b.makeSelectedTextStyleFns=function(Te){var Ae={},Me=Te.selected||{},Ce=Te.unselected||{},ne=Te.textfont||{},ue=Me.textfont||{},me=Ce.textfont||{},we=ne.color,Ee=ue.color,Ue=me.color;return Ae.selectedTextColorFn=function(De){var je=De.tc||we;return De.selected?Ee||je:Ue||(Ee?je:l.addOpacity(je,i))},Ae},b.selectedPointStyle=function(Te,Ae){if(Te.size()&&Ae.selectedpoints){var Me=b.makeSelectedPointStyleFns(Ae),Ce=Ae.marker||{},ne=[];Me.selectedOpacityFn&&ne.push(function(ue,me){ue.style("opacity",Me.selectedOpacityFn(me))}),Me.selectedColorFn&&ne.push(function(ue,me){l.fill(ue,Me.selectedColorFn(me))}),Me.selectedSizeFn&&ne.push(function(ue,me){var we=me.mx||Ce.symbol||0,Ee=Me.selectedSizeFn(me);ue.attr("d",g(b.symbolNumber(we),Ee,ze(me,Ae),K(me,Ae))),me.mrc2=Ee}),ne.length&&Te.each(function(ue){for(var me=_.select(this),we=0;we0?Me:0}function R(Te,Ae,Me){return Me&&(Te=V(Te)),Ae?B(Te[1]):U(Te[0])}function U(Te){var Ae=_.round(Te,2);return A=Ae,Ae}function B(Te){var Ae=_.round(Te,2);return C=Ae,Ae}function G(Te,Ae,Me,Ce){var ne=Te[0]-Ae[0],ue=Te[1]-Ae[1],me=Me[0]-Ae[0],we=Me[1]-Ae[1],Ee=Math.pow(ne*ne+ue*ue,.25),Ue=Math.pow(me*me+we*we,.25),De=(Ue*Ue*ne-Ee*Ee*me)*Ce,je=(Ue*Ue*ue-Ee*Ee*we)*Ce,ge=3*Ue*(Ee+Ue),be=3*Ee*(Ee+Ue);return[[U(Ae[0]+(ge&&De/ge)),B(Ae[1]+(ge&&je/ge))],[U(Ae[0]-(be&&De/be)),B(Ae[1]-(be&&je/be))]]}b.textPointStyle=function(Te,Ae,Me){if(Te.size()){var Ce;if(Ae.selectedpoints){var ne=b.makeSelectedTextStyleFns(Ae);Ce=ne.selectedTextColorFn}var ue=Ae.texttemplate,me=Me._fullLayout;Te.each(function(we){var Ee=_.select(this),Ue=ue?w.extractOption(we,Ae,"txt","texttemplate"):w.extractOption(we,Ae,"tx","text");if(Ue||Ue===0){if(ue){var De=Ae._module.formatLabels,je=De?De(we,Ae,me):{},ge={};c(ge,Ae,we.i);var be=Ae._meta||{};Ue=w.texttemplateString(Ue,je,me._d3locale,ge,we,be)}var Se=we.tp||Ae.textposition,Ne=I(we,Ae),Ye=Ce?Ce(we):we.tc||Ae.textfont.color;Ee.call(b.font,we.tf||Ae.textfont.family,Ne,Ye).text(Ue).call(r.convertToTspans,Me).call(P,Se,Ne,we.mrc)}else Ee.remove()})}},b.selectedTextStyle=function(Te,Ae){if(Te.size()&&Ae.selectedpoints){var Me=b.makeSelectedTextStyleFns(Ae);Te.each(function(Ce){var ne=_.select(this),ue=Me.selectedTextColorFn(Ce),me=Ce.tp||Ae.textposition,we=I(Ce,Ae);l.fill(ne,ue);var Ee=f.traceIs(Ae,"bar-like");P(ne,me,we,Ce.mrc2||Ce.mrc,Ee)})}},b.smoothopen=function(Te,Ae){if(Te.length<3)return"M"+Te.join("L");var Me,Ce="M"+Te[0],ne=[];for(Me=1;Me=Ee||ft>=De&&ft<=Ee)&&(yt<=je&&yt>=Ue||yt>=je&&yt<=Ue)&&(Te=[ft,yt])}return Te}b.steps=function(Te){var Ae=N[Te]||j;return function(Me){for(var Ce="M"+U(Me[0][0])+","+B(Me[0][1]),ne=Me.length,ue=1;ue=1e4&&(b.savedBBoxes={},H=0),Me&&(b.savedBBoxes[Me]=be),H++,w.extendFlat({},be)},b.setClipUrl=function(Te,Ae,Me){Te.attr("clip-path",Q(Ae,Me))},b.getTranslate=function(Te){var Ae=(Te[Te.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(Me,Ce,ne){return[Ce,ne].join(" ")}).split(" ");return{x:+Ae[0]||0,y:+Ae[1]||0}},b.setTranslate=function(Te,Ae,Me){var Ce=Te.attr?"attr":"getAttribute",ne=Te.attr?"attr":"setAttribute",ue=Te[Ce]("transform")||"";return Ae=Ae||0,Me=Me||0,ue=ue.replace(/(\btranslate\(.*?\);?)/,"").trim(),ue=(ue+=a(Ae,Me)).trim(),Te[ne]("transform",ue),ue},b.getScale=function(Te){var Ae=(Te[Te.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(Me,Ce,ne){return[Ce,ne].join(" ")}).split(" ");return{x:+Ae[0]||1,y:+Ae[1]||1}},b.setScale=function(Te,Ae,Me){var Ce=Te.attr?"attr":"getAttribute",ne=Te.attr?"attr":"setAttribute",ue=Te[Ce]("transform")||"";return Ae=Ae||1,Me=Me||1,ue=ue.replace(/(\bscale\(.*?\);?)/,"").trim(),ue=(ue+="scale("+Ae+","+Me+")").trim(),Te[ne]("transform",ue),ue};var X=/\s*sc.*/;b.setPointGroupScale=function(Te,Ae,Me){if(Ae=Ae||1,Me=Me||1,Te){var Ce=Ae===1&&Me===1?"":"scale("+Ae+","+Me+")";Te.each(function(){var ne=(this.getAttribute("transform")||"").replace(X,"");ne=(ne+=Ce).trim(),this.setAttribute("transform",ne)})}};var Y=/translate\([^)]*\)\s*$/;function K(Te,Ae){var Me;return Te&&(Me=Te.mf),Me===void 0&&(Me=Ae.marker&&Ae.marker.standoff||0),Ae._geo||Ae._xA?Me:-Me}b.setTextPointsScale=function(Te,Ae,Me){Te&&Te.each(function(){var Ce,ne=_.select(this),ue=ne.select("text");if(ue.node()){var me=parseFloat(ue.attr("x")||0),we=parseFloat(ue.attr("y")||0),Ee=(ne.attr("transform")||"").match(Y);Ce=Ae===1&&Me===1?[]:[a(me,we),"scale("+Ae+","+Me+")",a(-me,-we)],Ee&&Ce.push(Ee),ne.attr("transform",Ce.join(""))}})},b.getMarkerStandoff=K;var te,re,oe,se,ce,xe,pe=Math.atan2,de=Math.cos,he=Math.sin;function ye(Te,Ae){var Me=Ae[0],Ce=Ae[1];return[Me*de(Te)-Ce*he(Te),Me*he(Te)+Ce*de(Te)]}function ze(Te,Ae){var Me,Ce,ne=Te.ma;ne===void 0&&(ne=Ae.marker.angle||0);var ue=Ae.marker.angleref;if(ue==="previous"||ue==="north"){if(Ae._geo){var me=Ae._geo.project(Te.lonlat);Me=me[0],Ce=me[1]}else{var we=Ae._xA,Ee=Ae._yA;if(!we||!Ee)return 90;Me=we.c2p(Te.x),Ce=Ee.c2p(Te.y)}if(Ae._geo){var Ue,De=Te.lonlat[0],je=Te.lonlat[1],ge=Ae._geo.project([De,je+1e-5]),be=Ae._geo.project([De+1e-5,je]),Se=pe(be[1]-Ce,be[0]-Me),Ne=pe(ge[1]-Ce,ge[0]-Me);if(ue==="north")Ue=ne/180*Math.PI;else if(ue==="previous"){var Ye=De/180*Math.PI,Ze=je/180*Math.PI,st=te/180*Math.PI,ot=re/180*Math.PI,ft=st-Ye,yt=de(ot)*he(ft),Et=he(ot)*de(Ze)-de(ot)*he(Ze)*de(ft);Ue=-pe(yt,Et)-Math.PI,te=De,re=je}var Tt=ye(Se,[de(Ue),0]),xt=ye(Ne,[he(Ue),0]);ne=pe(Tt[1]+xt[1],Tt[0]+xt[0])/Math.PI*180,ue!=="previous"||xe===Ae.uid&&Te.i===ce+1||(ne=null)}if(ue==="previous"&&!Ae._geo)if(xe===Ae.uid&&Te.i===ce+1&&T(Me)&&T(Ce)){var Dt=Me-oe,It=Ce-se,Ft=Ae.line&&Ae.line.shape||"",qt=Ft.slice(Ft.length-1);qt==="h"&&(It=0),qt==="v"&&(Dt=0),ne+=pe(It,Dt)/Math.PI*180+90}else ne=null}return oe=Me,se=Ce,ce=Te.i,xe=Ae.uid,ne}b.getMarkerAngle=ze},90998:function(D,E,e){var _,w,s,T,m=e(95616),f=e(39898).round,l="M0,0Z",t=Math.sqrt(2),a=Math.sqrt(3),r=Math.PI,n=Math.cos,o=Math.sin;function i(p){return p===null}function u(p,c,b){if(!(p&&p%360!=0||c))return b;if(s===p&&T===c&&_===b)return w;function d(R,U){var B=n(R),G=o(R),N=U[0],j=U[1]+(c||0);return[N*B-j*G,N*G+j*B]}s=p,T=c,_=b;for(var v=p/180*r,x=0,g=0,y=m(b),k="",h=0;h0,o=m._context.staticPlot;f.each(function(i){var u,p=i[0].trace,c=p.error_x||{},b=p.error_y||{};p.ids&&(u=function(g){return g.id});var d=T.hasMarkers(p)&&p.marker.maxdisplayed>0;b.visible||c.visible||(i=[]);var v=_.select(this).selectAll("g.errorbar").data(i,u);if(v.exit().remove(),i.length){c.visible||v.selectAll("path.xerror").remove(),b.visible||v.selectAll("path.yerror").remove(),v.style("opacity",1);var x=v.enter().append("g").classed("errorbar",!0);n&&x.style("opacity",0).transition().duration(t.duration).style("opacity",1),s.setClipUrl(v,l.layerClipId,m),v.each(function(g){var y=_.select(this),k=function(P,I,R){var U={x:I.c2p(P.x),y:R.c2p(P.y)};return P.yh!==void 0&&(U.yh=R.c2p(P.yh),U.ys=R.c2p(P.ys),w(U.ys)||(U.noYS=!0,U.ys=R.c2p(P.ys,!0))),P.xh!==void 0&&(U.xh=I.c2p(P.xh),U.xs=I.c2p(P.xs),w(U.xs)||(U.noXS=!0,U.xs=I.c2p(P.xs,!0))),U}(g,a,r);if(!d||g.vis){var h,M=y.select("path.yerror");if(b.visible&&w(k.x)&&w(k.yh)&&w(k.ys)){var A=b.width;h="M"+(k.x-A)+","+k.yh+"h"+2*A+"m-"+A+",0V"+k.ys,k.noYS||(h+="m-"+A+",0h"+2*A),M.size()?n&&(M=M.transition().duration(t.duration).ease(t.easing)):M=y.append("path").style("vector-effect",o?"none":"non-scaling-stroke").classed("yerror",!0),M.attr("d",h)}else M.remove();var C=y.select("path.xerror");if(c.visible&&w(k.y)&&w(k.xh)&&w(k.xs)){var L=(c.copy_ystyle?b:c).width;h="M"+k.xh+","+(k.y-L)+"v"+2*L+"m0,-"+L+"H"+k.xs,k.noXS||(h+="m0,-"+L+"v"+2*L),C.size()?n&&(C=C.transition().duration(t.duration).ease(t.easing)):C=y.append("path").style("vector-effect",o?"none":"non-scaling-stroke").classed("xerror",!0),C.attr("d",h)}else C.remove()}})}})}},62662:function(D,E,e){var _=e(39898),w=e(7901);D.exports=function(s){s.each(function(T){var m=T[0].trace,f=m.error_y||{},l=m.error_x||{},t=_.select(this);t.selectAll("path.yerror").style("stroke-width",f.thickness+"px").call(w.stroke,f.color),l.copy_ystyle&&(l=f),t.selectAll("path.xerror").style("stroke-width",l.thickness+"px").call(w.stroke,l.color)})}},77914:function(D,E,e){var _=e(41940),w=e(528).hoverlabel,s=e(1426).extendFlat;D.exports={hoverlabel:{bgcolor:s({},w.bgcolor,{arrayOk:!0}),bordercolor:s({},w.bordercolor,{arrayOk:!0}),font:_({arrayOk:!0,editType:"none"}),align:s({},w.align,{arrayOk:!0}),namelength:s({},w.namelength,{arrayOk:!0}),editType:"none"}}},30732:function(D,E,e){var _=e(71828),w=e(73972);function s(T,m,f,l){l=l||_.identity,Array.isArray(T)&&(m[0][f]=l(T))}D.exports=function(T){var m=T.calcdata,f=T._fullLayout;function l(o){return function(i){return _.coerceHoverinfo({hoverinfo:i},{_module:o._module},f)}}for(var t=0;t=0&&a.indexne[0]._length||Ke<0||Ke>ue[0]._length)return o.unhoverRaw(se,ce)}else Je="xpx"in ce?ce.xpx:ne[0]._length/2,Ke="ypx"in ce?ce.ypx:ue[0]._length/2;if(ce.pointerX=Je+ne[0]._offset,ce.pointerY=Ke+ue[0]._offset,be="xval"in ce?p.flat(he,ce.xval):p.p2c(ne,Je),Se="yval"in ce?p.flat(he,ce.yval):p.p2c(ue,Ke),!w(be[0])||!w(Se[0]))return T.warn("Fx.hover failed",ce,se),o.unhoverRaw(se,ce)}var ht=1/0;function Oe($t,mn){for(Ye=0;YeDt&&(It.splice(0,Dt),ht=It[0].distance),Ae&&ge!==0&&It.length===0){xt.distance=ge,xt.index=!1;var Zn=st._module.hoverPoints(xt,Et,Tt,"closest",{hoverLayer:ye._hoverlayer});if(Zn&&(Zn=Zn.filter(function(Jt){return Jt.spikeDistance<=ge})),Zn&&Zn.length){var Qn,hr=Zn.filter(function(Jt){return Jt.xa.showspikes&&Jt.xa.spikesnap!=="hovered data"});if(hr.length){var tn=hr[0];w(tn.x0)&&w(tn.y0)&&(Qn=Qe(tn),(!qt.vLinePoint||qt.vLinePoint.spikeDistance>Qn.spikeDistance)&&(qt.vLinePoint=Qn))}var Pn=Zn.filter(function(Jt){return Jt.ya.showspikes&&Jt.ya.spikesnap!=="hovered data"});if(Pn.length){var jt=Pn[0];w(jt.x0)&&w(jt.y0)&&(Qn=Qe(jt),(!qt.hLinePoint||qt.hLinePoint.spikeDistance>Qn.spikeDistance)&&(qt.hLinePoint=Qn))}}}}}function Be($t,mn,Ln){for(var En,jn=null,$n=1/0,Zn=0;Zn<$t.length;Zn++)En=$t[Zn].spikeDistance,Ln&&Zn===0&&(En=-1/0),En<=$n&&En<=mn&&(jn=$t[Zn],$n=En);return jn}function Qe($t){return $t?{xa:$t.xa,ya:$t.ya,x:$t.xSpike!==void 0?$t.xSpike:($t.x0+$t.x1)/2,y:$t.ySpike!==void 0?$t.ySpike:($t.y0+$t.y1)/2,distance:$t.distance,spikeDistance:$t.spikeDistance,curveNumber:$t.trace.index,color:$t.color,pointNumber:$t.index}:null}Oe();var ut={fullLayout:ye,container:ye._hoverlayer,event:ce},pt=se._spikepoints,bt={vLinePoint:qt.vLinePoint,hLinePoint:qt.hLinePoint};se._spikepoints=bt;var Lt=function(){It.sort(function($t,mn){return $t.distance-mn.distance}),It=function($t,mn){for(var Ln=mn.charAt(0),En=[],jn=[],$n=[],Zn=0;Zn<$t.length;Zn++){var Qn=$t[Zn];u.traceIs(Qn.trace,"bar-like")||u.traceIs(Qn.trace,"box-violin")?$n.push(Qn):Qn.trace[Ln+"period"]?jn.push(Qn):En.push(Qn)}return En.concat(jn).concat($n)}(It,De)};Lt();var Ct=De.charAt(0),mt=(Ct==="x"||Ct==="y")&&It[0]&&C[It[0].trace.type];if(Ae&&ge!==0&&It.length!==0){var Ot=Be(It.filter(function($t){return $t.ya.showspikes}),ge,mt);qt.hLinePoint=Qe(Ot);var _t=Be(It.filter(function($t){return $t.xa.showspikes}),ge,mt);qt.vLinePoint=Qe(_t)}if(It.length===0){var Pt=o.unhoverRaw(se,ce);return!Ae||qt.hLinePoint===null&&qt.vLinePoint===null||j(pt)&&N(se,qt,ut),Pt}if(Ae&&j(pt)&&N(se,qt,ut),p.isXYhover(yt)&&It[0].length!==0&&It[0].trace.type!=="splom"){var Bt=It[0],Wt=(It=A[Bt.trace.type]?It.filter(function($t){return $t.trace.index===Bt.trace.index}):[Bt]).length;Oe(H("x",Bt,ye),H("y",Bt,ye));var Gt,Xt=[],Kt={},nn=0,yn=function($t){var mn=A[$t.trace.type]?L($t):$t.trace.index;if(Kt[mn]){var Ln=Kt[mn]-1,En=Xt[Ln];Ln>0&&Math.abs($t.distance)Wt-1;Gt--)yn(It[Gt]);It=Xt,Lt()}var ln=se._hoverdata,kn=[],Wn=ee(se),wn=Q(se);for(Ne=0;Ne1||It.length>1)||De==="closest"&&Nt&&It.length>1,gr=n.combine(ye.plot_bgcolor||n.background,ye.paper_bgcolor),ir=I(It,{gd:se,hovermode:De,rotateLabels:Tr,bgColor:gr,container:ye._hoverlayer,outerContainer:ye._paper.node(),commonLabelOpts:ye.hoverlabel,hoverdistance:ye.hoverdistance}),dr=ir.hoverLabels;if(p.isUnifiedHover(De)||(function($t,mn,Ln,En){var jn,$n,Zn,Qn,hr,tn,Pn,jt=mn?"xa":"ya",Jt=mn?"ya":"xa",un=0,Rn=1,On=$t.size(),Sn=new Array(On),pn=0,bn=En.minX,dn=En.maxX,vn=En.minY,An=En.maxY,Bn=function(Mr){return Mr*Ln._invScaleX},Xn=function(Mr){return Mr*Ln._invScaleY};function er(Mr){var Lr=Mr[0],pr=Mr[Mr.length-1];if($n=Lr.pmin-Lr.pos-Lr.dp+Lr.size,Zn=pr.pos+pr.dp+pr.size-Lr.pmax,$n>.01){for(hr=Mr.length-1;hr>=0;hr--)Mr[hr].dp+=$n;jn=!1}if(!(Zn<.01)){if($n<-.01){for(hr=Mr.length-1;hr>=0;hr--)Mr[hr].dp-=Zn;jn=!1}if(jn){var Pr=0;for(Qn=0;QnLr.pmax&&Pr++;for(Qn=Mr.length-1;Qn>=0&&!(Pr<=0);Qn--)(tn=Mr[Qn]).pos>Lr.pmax-1&&(tn.del=!0,Pr--);for(Qn=0;Qn=0;hr--)Mr[hr].dp-=Zn;for(Qn=Mr.length-1;Qn>=0&&!(Pr<=0);Qn--)(tn=Mr[Qn]).pos+tn.dp+tn.size>Lr.pmax&&(tn.del=!0,Pr--)}}}for($t.each(function(Mr){var Lr=Mr[jt],pr=Mr[Jt],Pr=Lr._id.charAt(0)==="x",Hr=Lr.range;pn===0&&Hr&&Hr[0]>Hr[1]!==Pr&&(Rn=-1);var ci=0,Ti=Pr?Ln.width:Ln.height;if(Ln.hovermode==="x"||Ln.hovermode==="y"){var Mi,fa,Hi=U(Mr,mn),xi=Mr.anchor,Oa=xi==="end"?-1:1;if(xi==="middle")fa=(Mi=Mr.crossPos+(Pr?Xn(Hi.y-Mr.by/2):Bn(Mr.bx/2+Mr.tx2width/2)))+(Pr?Xn(Mr.by):Bn(Mr.bx));else if(Pr)fa=(Mi=Mr.crossPos+Xn(h+Hi.y)-Xn(Mr.by/2-h))+Xn(Mr.by);else{var Ka=Bn(Oa*h+Hi.x),Yo=Ka+Bn(Oa*Mr.bx);Mi=Mr.crossPos+Math.min(Ka,Yo),fa=Mr.crossPos+Math.max(Ka,Yo)}Pr?vn!==void 0&&An!==void 0&&Math.min(fa,An)-Math.max(Mi,vn)>1&&(pr.side==="left"?(ci=pr._mainLinePosition,Ti=Ln.width):Ti=pr._mainLinePosition):bn!==void 0&&dn!==void 0&&Math.min(fa,dn)-Math.max(Mi,bn)>1&&(pr.side==="top"?(ci=pr._mainLinePosition,Ti=Ln.height):Ti=pr._mainLinePosition)}Sn[pn++]=[{datum:Mr,traceIndex:Mr.trace.index,dp:0,pos:Mr.pos,posref:Mr.posref,size:Mr.by*(Pr?g:1)/2,pmin:ci,pmax:Ti}]}),Sn.sort(function(Mr,Lr){return Mr[0].posref-Lr[0].posref||Rn*(Lr[0].traceIndex-Mr[0].traceIndex)});!jn&&un<=On;){for(un++,jn=!0,Qn=0;Qn.01&&sr.pmin===fr.pmin&&sr.pmax===fr.pmax){for(hr=lr.length-1;hr>=0;hr--)lr[hr].dp+=$n;for(Jn.push.apply(Jn,lr),Sn.splice(Qn+1,1),Pn=0,hr=Jn.length-1;hr>=0;hr--)Pn+=Jn[hr].dp;for(Zn=Pn/Jn.length,hr=Jn.length-1;hr>=0;hr--)Jn[hr].dp-=Zn;jn=!1}else Qn++}Sn.forEach(er)}for(Qn=Sn.length-1;Qn>=0;Qn--){var cr=Sn[Qn];for(hr=cr.length-1;hr>=0;hr--){var vr=cr[hr],Sr=vr.datum;Sr.offset=vr.dp,Sr.del=vr.del}}}(dr,Tr,ye,ir.commonLabelBoundingBox),B(dr,Tr,ye._invScaleX,ye._invScaleY)),de&&de.tagName){var yr=u.getComponentMethod("annotations","hasClickToShow")(se,kn);a(_.select(de),yr?"pointer":"")}de&&!pe&&function($t,mn,Ln){if(!Ln||Ln.length!==$t._hoverdata.length)return!0;for(var En=Ln.length-1;En>=0;En--){var jn=Ln[En],$n=$t._hoverdata[En];if(jn.curveNumber!==$n.curveNumber||String(jn.pointNumber)!==String($n.pointNumber)||String(jn.pointNumbers)!==String($n.pointNumbers))return!0}return!1}(se,0,ln)&&(ln&&se.emit("plotly_unhover",{event:ce,points:ln}),se.emit("plotly_hover",{event:ce,points:se._hoverdata,xaxes:ne,yaxes:ue,xvals:be,yvals:Se}))})(Y,K,te,re,oe)})},E.loneHover=function(Y,K){var te=!0;Array.isArray(Y)||(te=!1,Y=[Y]);var re=K.gd,oe=ee(re),se=Q(re),ce=I(Y.map(function(de){var he=de._x0||de.x0||de.x||0,ye=de._x1||de.x1||de.x||0,ze=de._y0||de.y0||de.y||0,Te=de._y1||de.y1||de.y||0,Ae=de.eventData;if(Ae){var Me=Math.min(he,ye),Ce=Math.max(he,ye),ne=Math.min(ze,Te),ue=Math.max(ze,Te),me=de.trace;if(u.traceIs(me,"gl3d")){var we=re._fullLayout[me.scene]._scene.container,Ee=we.offsetLeft,Ue=we.offsetTop;Me+=Ee,Ce+=Ee,ne+=Ue,ue+=Ue}Ae.bbox={x0:Me+se,x1:Ce+se,y0:ne+oe,y1:ue+oe},K.inOut_bbox&&K.inOut_bbox.push(Ae.bbox)}else Ae=!1;return{color:de.color||n.defaultLine,x0:de.x0||de.x||0,x1:de.x1||de.x||0,y0:de.y0||de.y||0,y1:de.y1||de.y||0,xLabel:de.xLabel,yLabel:de.yLabel,zLabel:de.zLabel,text:de.text,name:de.name,idealAlign:de.idealAlign,borderColor:de.borderColor,fontFamily:de.fontFamily,fontSize:de.fontSize,fontColor:de.fontColor,nameLength:de.nameLength,textAlign:de.textAlign,trace:de.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:de.hovertemplate||!1,hovertemplateLabels:de.hovertemplateLabels||!1,eventData:Ae}}),{gd:re,hovermode:"closest",rotateLabels:!1,bgColor:K.bgColor||n.background,container:_.select(K.container),outerContainer:K.outerContainer||K.container}).hoverLabels,xe=0,pe=0;return ce.sort(function(de,he){return de.y0-he.y0}).each(function(de,he){var ye=de.y0-de.by/2;de.offset=ye-5([\s\S]*)<\/extra>/;function I(Y,K){var te=K.gd,re=te._fullLayout,oe=K.hovermode,se=K.rotateLabels,ce=K.bgColor,xe=K.container,pe=K.outerContainer,de=K.commonLabelOpts||{};if(Y.length===0)return[[]];var he=K.fontFamily||c.HOVERFONT,ye=K.fontSize||c.HOVERFONTSIZE,ze=Y[0],Te=ze.xa,Ae=ze.ya,Me=oe.charAt(0),Ce=Me+"Label",ne=ze[Ce];if(ne===void 0&&Te.type==="multicategory")for(var ue=0;uere.width-wn?(yn=re.width-wn,Bt.attr("d","M"+(wn-h)+",0L"+wn+","+Wn+h+"v"+Wn+(2*M+kn.height)+"H-"+wn+"V"+Wn+h+"H"+(wn-2*h)+"Z")):Bt.attr("d","M0,0L"+h+","+Wn+h+"H"+wn+"v"+Wn+(2*M+kn.height)+"H-"+wn+"V"+Wn+h+"H-"+h+"Z"),Ye.minX=yn-wn,Ye.maxX=yn+wn,Te.side==="top"?(Ye.minY=ln-(2*M+kn.height),Ye.maxY=ln-M):(Ye.minY=ln+M,Ye.maxY=ln+(2*M+kn.height))}else{var on,_n,fn;Ae.side==="right"?(on="start",_n=1,fn="",yn=Te._offset+Te._length):(on="end",_n=-1,fn="-",yn=Te._offset),ln=Ae._offset+(ze.y0+ze.y1)/2,Wt.attr("text-anchor",on),Bt.attr("d","M0,0L"+fn+h+","+h+"V"+(M+kn.height/2)+"h"+fn+(2*M+kn.width)+"V-"+(M+kn.height/2)+"H"+fn+h+"V-"+h+"Z"),Ye.minY=ln-(M+kn.height/2),Ye.maxY=ln+(M+kn.height/2),Ae.side==="right"?(Ye.minX=yn+h,Ye.maxX=yn+h+(2*M+kn.width)):(Ye.minX=yn-h-(2*M+kn.width),Ye.maxX=yn-h);var hn,In=kn.height/2,Cn=we-kn.top-In,Nn="clip"+re._uid+"commonlabel"+Ae._id;if(yn=0?Ke:Ge+Oe=0?Ge:mt+Oe=0?Nt:Je+Be=0?Je:Ot+Be=0,Pt.idealAlign!=="top"&&tr||!Tr?tr?(In+=Nn/2,Pt.anchor="start"):Pt.anchor="middle":(In-=Nn/2,Pt.anchor="end"),Pt.crossPos=In;else{if(Pt.pos=In,tr=hn+Cn/2+gr<=Ee,Tr=hn-Cn/2-gr>=0,Pt.idealAlign!=="left"&&tr||!Tr)if(tr)hn+=Cn/2,Pt.anchor="start";else{Pt.anchor="middle";var ir=gr/2,dr=hn+ir-Ee,yr=hn-ir;dr>0&&(hn-=dr),yr<0&&(hn+=-yr)}else hn-=Cn/2,Pt.anchor="end";Pt.crossPos=hn}Wn.attr("text-anchor",Pt.anchor),on&&wn.attr("text-anchor",Pt.anchor),Bt.attr("transform",m(hn,In)+(se?f(v):""))}),{hoverLabels:_t,commonLabelBoundingBox:Ye}}function R(Y,K,te,re,oe,se){var ce="",xe="";Y.nameOverride!==void 0&&(Y.name=Y.nameOverride),Y.name&&(Y.trace._meta&&(Y.name=T.templateString(Y.name,Y.trace._meta)),ce=V(Y.name,Y.nameLength));var pe=te.charAt(0),de=pe==="x"?"y":"x";Y.zLabel!==void 0?(Y.xLabel!==void 0&&(xe+="x: "+Y.xLabel+"
"),Y.yLabel!==void 0&&(xe+="y: "+Y.yLabel+"
"),Y.trace.type!=="choropleth"&&Y.trace.type!=="choroplethmapbox"&&(xe+=(xe?"z: ":"")+Y.zLabel)):K&&Y[pe+"Label"]===oe?xe=Y[de+"Label"]||"":Y.xLabel===void 0?Y.yLabel!==void 0&&Y.trace.type!=="scattercarpet"&&(xe=Y.yLabel):xe=Y.yLabel===void 0?Y.xLabel:"("+Y.xLabel+", "+Y.yLabel+")",!Y.text&&Y.text!==0||Array.isArray(Y.text)||(xe+=(xe?"
":"")+Y.text),Y.extraText!==void 0&&(xe+=(xe?"
":"")+Y.extraText),se&&xe===""&&!Y.hovertemplate&&(ce===""&&se.remove(),xe=ce);var he=Y.hovertemplate||!1;if(he){var ye=Y.hovertemplateLabels||Y;Y[pe+"Label"]!==oe&&(ye[pe+"other"]=ye[pe+"Val"],ye[pe+"otherLabel"]=ye[pe+"Label"]),xe=(xe=T.hovertemplateString(he,ye,re._d3locale,Y.eventData[0]||{},Y.trace._meta)).replace(P,function(ze,Te){return ce=V(Te,Y.nameLength),""})}return[xe,ce]}function U(Y,K){var te=0,re=Y.offset;return K&&(re*=-k,te=Y.offset*y),{x:te,y:re}}function B(Y,K,te,re){var oe=function(ce){return ce*te},se=function(ce){return ce*re};Y.each(function(ce){var xe=_.select(this);if(ce.del)return xe.remove();var pe,de,he,ye,ze=xe.select("text.nums"),Te=ce.anchor,Ae=Te==="end"?-1:1,Me=(ye=(he=(de={start:1,end:-1,middle:0}[(pe=ce).anchor])*(h+M))+de*(pe.txwidth+M),pe.anchor==="middle"&&(he-=pe.tx2width/2,ye+=pe.txwidth/2+M),{alignShift:de,textShiftX:he,text2ShiftX:ye}),Ce=U(ce,K),ne=Ce.x,ue=Ce.y,me=Te==="middle";xe.select("path").attr("d",me?"M-"+oe(ce.bx/2+ce.tx2width/2)+","+se(ue-ce.by/2)+"h"+oe(ce.bx)+"v"+se(ce.by)+"h-"+oe(ce.bx)+"Z":"M0,0L"+oe(Ae*h+ne)+","+se(h+ue)+"v"+se(ce.by/2-h)+"h"+oe(Ae*ce.bx)+"v-"+se(ce.by)+"H"+oe(Ae*h+ne)+"V"+se(ue-h)+"Z");var we=ne+Me.textShiftX,Ee=ue+ce.ty0-ce.by/2+M,Ue=ce.textAlign||"auto";Ue!=="auto"&&(Ue==="left"&&Te!=="start"?(ze.attr("text-anchor","start"),we=me?-ce.bx/2-ce.tx2width/2+M:-ce.bx-M):Ue==="right"&&Te!=="end"&&(ze.attr("text-anchor","end"),we=me?ce.bx/2-ce.tx2width/2-M:ce.bx+M)),ze.call(t.positionText,oe(we),se(Ee)),ce.tx2width&&(xe.select("text.name").call(t.positionText,oe(Me.text2ShiftX+Me.alignShift*M+ne),se(ue+ce.ty0-ce.by/2+M)),xe.select("rect").call(r.setRect,oe(Me.text2ShiftX+(Me.alignShift-1)*ce.tx2width/2+ne),se(ue-ce.by/2-1),oe(ce.tx2width),se(ce.by+2)))})}function G(Y,K){var te=Y.index,re=Y.trace||{},oe=Y.cd[0],se=Y.cd[te]||{};function ce(ze){return ze||w(ze)&&ze===0}var xe=Array.isArray(te)?function(ze,Te){var Ae=T.castOption(oe,te,ze);return ce(Ae)?Ae:T.extractOption({},re,"",Te)}:function(ze,Te){return T.extractOption(se,re,ze,Te)};function pe(ze,Te,Ae){var Me=xe(Te,Ae);ce(Me)&&(Y[ze]=Me)}if(pe("hoverinfo","hi","hoverinfo"),pe("bgcolor","hbg","hoverlabel.bgcolor"),pe("borderColor","hbc","hoverlabel.bordercolor"),pe("fontFamily","htf","hoverlabel.font.family"),pe("fontSize","hts","hoverlabel.font.size"),pe("fontColor","htc","hoverlabel.font.color"),pe("nameLength","hnl","hoverlabel.namelength"),pe("textAlign","hta","hoverlabel.align"),Y.posref=K==="y"||K==="closest"&&re.orientation==="h"?Y.xa._offset+(Y.x0+Y.x1)/2:Y.ya._offset+(Y.y0+Y.y1)/2,Y.x0=T.constrain(Y.x0,0,Y.xa._length),Y.x1=T.constrain(Y.x1,0,Y.xa._length),Y.y0=T.constrain(Y.y0,0,Y.ya._length),Y.y1=T.constrain(Y.y1,0,Y.ya._length),Y.xLabelVal!==void 0&&(Y.xLabel="xLabel"in Y?Y.xLabel:i.hoverLabelText(Y.xa,Y.xLabelVal,re.xhoverformat),Y.xVal=Y.xa.c2d(Y.xLabelVal)),Y.yLabelVal!==void 0&&(Y.yLabel="yLabel"in Y?Y.yLabel:i.hoverLabelText(Y.ya,Y.yLabelVal,re.yhoverformat),Y.yVal=Y.ya.c2d(Y.yLabelVal)),Y.zLabelVal!==void 0&&Y.zLabel===void 0&&(Y.zLabel=String(Y.zLabelVal)),!(isNaN(Y.xerr)||Y.xa.type==="log"&&Y.xerr<=0)){var de=i.tickText(Y.xa,Y.xa.c2l(Y.xerr),"hover").text;Y.xerrneg!==void 0?Y.xLabel+=" +"+de+" / -"+i.tickText(Y.xa,Y.xa.c2l(Y.xerrneg),"hover").text:Y.xLabel+=" ± "+de,K==="x"&&(Y.distance+=1)}if(!(isNaN(Y.yerr)||Y.ya.type==="log"&&Y.yerr<=0)){var he=i.tickText(Y.ya,Y.ya.c2l(Y.yerr),"hover").text;Y.yerrneg!==void 0?Y.yLabel+=" +"+he+" / -"+i.tickText(Y.ya,Y.ya.c2l(Y.yerrneg),"hover").text:Y.yLabel+=" ± "+he,K==="y"&&(Y.distance+=1)}var ye=Y.hoverinfo||Y.trace.hoverinfo;return ye&&ye!=="all"&&((ye=Array.isArray(ye)?ye:ye.split("+")).indexOf("x")===-1&&(Y.xLabel=void 0),ye.indexOf("y")===-1&&(Y.yLabel=void 0),ye.indexOf("z")===-1&&(Y.zLabel=void 0),ye.indexOf("text")===-1&&(Y.text=void 0),ye.indexOf("name")===-1&&(Y.name=void 0)),Y}function N(Y,K,te){var re,oe,se=te.container,ce=te.fullLayout,xe=ce._size,pe=te.event,de=!!K.hLinePoint,he=!!K.vLinePoint;if(se.selectAll(".spikeline").remove(),he||de){var ye=n.combine(ce.plot_bgcolor,ce.paper_bgcolor);if(de){var ze,Te,Ae=K.hLinePoint;re=Ae&&Ae.xa,(oe=Ae&&Ae.ya).spikesnap==="cursor"?(ze=pe.pointerX,Te=pe.pointerY):(ze=re._offset+Ae.x,Te=oe._offset+Ae.y);var Me,Ce,ne=s.readability(Ae.color,ye)<1.5?n.contrast(ye):Ae.color,ue=oe.spikemode,me=oe.spikethickness,we=oe.spikecolor||ne,Ee=i.getPxPosition(Y,oe);if(ue.indexOf("toaxis")!==-1||ue.indexOf("across")!==-1){if(ue.indexOf("toaxis")!==-1&&(Me=Ee,Ce=ze),ue.indexOf("across")!==-1){var Ue=oe._counterDomainMin,De=oe._counterDomainMax;oe.anchor==="free"&&(Ue=Math.min(Ue,oe.position),De=Math.max(De,oe.position)),Me=xe.l+Ue*xe.w,Ce=xe.l+De*xe.w}se.insert("line",":first-child").attr({x1:Me,x2:Ce,y1:Te,y2:Te,"stroke-width":me,stroke:we,"stroke-dasharray":r.dashStyle(oe.spikedash,me)}).classed("spikeline",!0).classed("crisp",!0),se.insert("line",":first-child").attr({x1:Me,x2:Ce,y1:Te,y2:Te,"stroke-width":me+2,stroke:ye}).classed("spikeline",!0).classed("crisp",!0)}ue.indexOf("marker")!==-1&&se.insert("circle",":first-child").attr({cx:Ee+(oe.side!=="right"?me:-me),cy:Te,r:me,fill:we}).classed("spikeline",!0)}if(he){var je,ge,be=K.vLinePoint;re=be&&be.xa,oe=be&&be.ya,re.spikesnap==="cursor"?(je=pe.pointerX,ge=pe.pointerY):(je=re._offset+be.x,ge=oe._offset+be.y);var Se,Ne,Ye=s.readability(be.color,ye)<1.5?n.contrast(ye):be.color,Ze=re.spikemode,st=re.spikethickness,ot=re.spikecolor||Ye,ft=i.getPxPosition(Y,re);if(Ze.indexOf("toaxis")!==-1||Ze.indexOf("across")!==-1){if(Ze.indexOf("toaxis")!==-1&&(Se=ft,Ne=ge),Ze.indexOf("across")!==-1){var yt=re._counterDomainMin,Et=re._counterDomainMax;re.anchor==="free"&&(yt=Math.min(yt,re.position),Et=Math.max(Et,re.position)),Se=xe.t+(1-Et)*xe.h,Ne=xe.t+(1-yt)*xe.h}se.insert("line",":first-child").attr({x1:je,x2:je,y1:Se,y2:Ne,"stroke-width":st,stroke:ot,"stroke-dasharray":r.dashStyle(re.spikedash,st)}).classed("spikeline",!0).classed("crisp",!0),se.insert("line",":first-child").attr({x1:je,x2:je,y1:Se,y2:Ne,"stroke-width":st+2,stroke:ye}).classed("spikeline",!0).classed("crisp",!0)}Ze.indexOf("marker")!==-1&&se.insert("circle",":first-child").attr({cx:je,cy:ft-(re.side!=="top"?st:-st),r:st,fill:ot}).classed("spikeline",!0)}}}function j(Y,K){return!K||K.vLinePoint!==Y._spikepoints.vLinePoint||K.hLinePoint!==Y._spikepoints.hLinePoint}function V(Y,K){return t.plainText(Y||"",{len:K,allowedTags:["br","sub","sup","b","i","em"]})}function H(Y,K,te){var re=K[Y+"a"],oe=K[Y+"Val"],se=K.cd[0];if(re.type==="category"||re.type==="multicategory")oe=re._categoriesMap[oe];else if(re.type==="date"){var ce=K.trace[Y+"periodalignment"];if(ce){var xe=K.cd[K.index],pe=xe[Y+"Start"];pe===void 0&&(pe=xe[Y]);var de=xe[Y+"End"];de===void 0&&(de=xe[Y]);var he=de-pe;ce==="end"?oe+=he:ce==="middle"&&(oe+=he/2)}oe=re.d2c(oe)}return se&&se.t&&se.t.posLetter===re._id&&(te.boxmode!=="group"&&te.violinmode!=="group"||(oe+=se.t.dPos)),oe}function ee(Y){return Y.offsetTop+Y.clientTop}function Q(Y){return Y.offsetLeft+Y.clientLeft}function X(Y,K){var te=Y._fullLayout,re=K.getBoundingClientRect(),oe=re.left,se=re.top,ce=oe+re.width,xe=se+re.height,pe=T.apply3DTransform(te._invTransform)(oe,se),de=T.apply3DTransform(te._invTransform)(ce,xe),he=pe[0],ye=pe[1],ze=de[0],Te=de[1];return{x:he,y:ye,width:ze-he,height:Te-ye,top:Math.min(ye,Te),left:Math.min(he,ze),right:Math.max(he,ze),bottom:Math.max(ye,Te)}}},38048:function(D,E,e){var _=e(71828),w=e(7901),s=e(23469).isUnifiedHover;D.exports=function(T,m,f,l){l=l||{};var t=m.legend;function a(r){l.font[r]||(l.font[r]=t?m.legend.font[r]:m.font[r])}m&&s(m.hovermode)&&(l.font||(l.font={}),a("size"),a("family"),a("color"),t?(l.bgcolor||(l.bgcolor=w.combine(m.legend.bgcolor,m.paper_bgcolor)),l.bordercolor||(l.bordercolor=m.legend.bordercolor)):l.bgcolor||(l.bgcolor=m.paper_bgcolor)),f("hoverlabel.bgcolor",l.bgcolor),f("hoverlabel.bordercolor",l.bordercolor),f("hoverlabel.namelength",l.namelength),_.coerceFont(f,"hoverlabel.font",l.font),f("hoverlabel.align",l.align)}},98212:function(D,E,e){var _=e(71828),w=e(528);D.exports=function(s,T){function m(f,l){return T[f]!==void 0?T[f]:_.coerce(s,T,w,f,l)}return m("clickmode"),m("hovermode")}},30211:function(D,E,e){var _=e(39898),w=e(71828),s=e(28569),T=e(23469),m=e(528),f=e(88335);D.exports={moduleType:"component",name:"fx",constants:e(26675),schema:{layout:m},attributes:e(77914),layoutAttributes:m,supplyLayoutGlobalDefaults:e(22774),supplyDefaults:e(54268),supplyLayoutDefaults:e(34938),calc:e(30732),getDistanceFunction:T.getDistanceFunction,getClosest:T.getClosest,inbox:T.inbox,quadrature:T.quadrature,appendArrayPointValue:T.appendArrayPointValue,castHoverOption:function(l,t,a){return w.castOption(l,t,"hoverlabel."+a)},castHoverinfo:function(l,t,a){return w.castOption(l,a,"hoverinfo",function(r){return w.coerceHoverinfo({hoverinfo:r},{_module:l._module},t)})},hover:f.hover,unhover:s.unhover,loneHover:f.loneHover,loneUnhover:function(l){var t=w.isD3Selection(l)?l:_.select(l);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:e(75914)}},528:function(D,E,e){var _=e(26675),w=e(41940),s=w({editType:"none"});s.family.dflt=_.HOVERFONT,s.size.dflt=_.HOVERFONTSIZE,D.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:s,grouptitlefont:w({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(D,E,e){var _=e(71828),w=e(528),s=e(98212),T=e(38048);D.exports=function(m,f){function l(n,o){return _.coerce(m,f,w,n,o)}s(m,f)&&(l("hoverdistance"),l("spikedistance")),l("dragmode")==="select"&&l("selectdirection");var t=f._has("mapbox"),a=f._has("geo"),r=f._basePlotModules.length;f.dragmode==="zoom"&&((t||a)&&r===1||t&&a&&r===2)&&(f.dragmode="pan"),T(m,f,l),_.coerceFont(l,"hoverlabel.grouptitlefont",f.hoverlabel.font)}},22774:function(D,E,e){var _=e(71828),w=e(38048),s=e(528);D.exports=function(T,m){w(T,m,function(f,l){return _.coerce(T,m,s,f,l)})}},83312:function(D,E,e){var _=e(71828),w=e(30587).counter,s=e(27670).Y,T=e(85555).idRegex,m=e(44467),f={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:[w("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[T.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[T.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:s({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 l(r,n,o){var i=n[o+"axes"],u=Object.keys((r._splomAxes||{})[o]||{});return Array.isArray(i)?i:u.length?u:void 0}function t(r,n,o,i,u,p){var c=n(r+"gap",o),b=n("domain."+r);n(r+"side",i);for(var d=new Array(u),v=b[0],x=(b[1]-v)/(u-c),g=x*(1-c),y=0;y1){b||d||v||P("pattern")==="independent"&&(b=!0),g._hasSubplotGrid=b;var h,M,A=P("roworder")==="top to bottom",C=b?.2:.1,L=b?.3:.1;x&&n._splomGridDflt&&(h=n._splomGridDflt.xside,M=n._splomGridDflt.yside),g._domains={x:t("x",P,C,h,k),y:t("y",P,L,M,y,A)}}else delete n.grid}function P(I,R){return _.coerce(o,g,f,I,R)}},contentDefaults:function(r,n){var o=n.grid;if(o&&o._domains){var i,u,p,c,b,d,v,x=r.grid||{},g=n._subplots,y=o._hasSubplotGrid,k=o.rows,h=o.columns,M=o.pattern==="independent",A=o._axisMap={};if(y){var C=x.subplots||[];d=o.subplots=new Array(k);var L=1;for(i=0;i1);if(M===!1&&(n.legend=void 0),(M!==!1||i.uirevision)&&(p("uirevision",n.uirevision),M!==!1)){p("borderwidth");var A,C,L,P=p("orientation")==="h";if(P?(A=0,_.getComponentMethod("rangeslider","isVisible")(r.xaxis)?(C=1.1,L="bottom"):(C=-.1,L="top")):(A=1.02,C=1,L="auto"),p("traceorder",k),l.isGrouped(n.legend)&&p("tracegroupgap"),p("entrywidth"),p("entrywidthmode"),p("itemsizing"),p("itemwidth"),p("itemclick"),p("itemdoubleclick"),p("groupclick"),p("x",A),p("xanchor"),p("y",C),p("yanchor",L),p("valign"),w.noneOrAll(i,u,["x","y"]),p("title.text")){p("title.side",P?"left":"top");var I=w.extendFlat({},c,{size:w.bigFont(c.size)});w.coerceFont(p,"title.font",I)}}}}D.exports=function(a,r,n){var o,i=["legend"];for(o=0;o1)}var ee=N.hiddenlabels||[];if(!(V||N.showlegend&&H.length))return B.selectAll("."+j).remove(),N._topdefs.select("#"+U).remove(),s.autoMargin(I,j);var Q=w.ensureSingle(B,"g",j,function(xe){V||xe.attr("pointer-events","all")}),X=w.ensureSingleById(N._topdefs,"clipPath",U,function(xe){xe.append("rect")}),Y=w.ensureSingle(Q,"rect","bg",function(xe){xe.attr("shape-rendering","crispEdges")});Y.call(t.stroke,G.bordercolor).call(t.fill,G.bgcolor).style("stroke-width",G.borderwidth+"px");var K=w.ensureSingle(Q,"g","scrollbox"),te=G.title;if(G._titleWidth=0,G._titleHeight=0,te.text){var re=w.ensureSingle(K,"text",j+"titletext");re.attr("text-anchor","start").call(l.font,te.font).text(te.text),A(re,K,I,G,1)}else K.selectAll("."+j+"titletext").remove();var oe=w.ensureSingle(Q,"rect","scrollbar",function(xe){xe.attr(n.scrollBarEnterAttrs).call(t.fill,n.scrollBarColor)}),se=K.selectAll("g.groups").data(H);se.enter().append("g").attr("class","groups"),se.exit().remove();var ce=se.selectAll("g.traces").data(w.identity);ce.enter().append("g").attr("class","traces"),ce.exit().remove(),ce.style("opacity",function(xe){var pe=xe[0].trace;return T.traceIs(pe,"pie-like")?ee.indexOf(xe[0].label)!==-1?.5:1:pe.visible==="legendonly"?.5:1}).each(function(){_.select(this).call(k,I,G)}).call(b,I,G).each(function(){V||_.select(this).call(M,I,j)}),w.syncOrAsync([s.previousPromises,function(){return function(xe,pe,de,he){var ye=xe._fullLayout,ze=P(he);he||(he=ye[ze]);var Te=ye._size,Ae=d.isVertical(he),Me=d.isGrouped(he),Ce=he.entrywidthmode==="fraction",ne=he.borderwidth,ue=2*ne,me=n.itemGap,we=he.itemwidth+2*me,Ee=2*(ne+me),Ue=L(he),De=he.y<0||he.y===0&&Ue==="top",je=he.y>1||he.y===1&&Ue==="bottom",ge=he.tracegroupgap,be={};he._maxHeight=Math.max(De||je?ye.height/2:Te.h,30);var Se=0;he._width=0,he._height=0;var Ne=function(Oe){var Be=0,Qe=0,ut=Oe.title.side;return ut&&(ut.indexOf("left")!==-1&&(Be=Oe._titleWidth),ut.indexOf("top")!==-1&&(Qe=Oe._titleHeight)),[Be,Qe]}(he);if(Ae)de.each(function(Oe){var Be=Oe[0].height;l.setTranslate(this,ne+Ne[0],ne+Ne[1]+he._height+Be/2+me),he._height+=Be,he._width=Math.max(he._width,Oe[0].width)}),Se=we+he._width,he._width+=me+we+ue,he._height+=Ee,Me&&(pe.each(function(Oe,Be){l.setTranslate(this,0,Be*he.tracegroupgap)}),he._height+=(he._lgroupsLength-1)*he.tracegroupgap);else{var Ye=C(he),Ze=he.x<0||he.x===0&&Ye==="right",st=he.x>1||he.x===1&&Ye==="left",ot=je||De,ft=ye.width/2;he._maxWidth=Math.max(Ze?ot&&Ye==="left"?Te.l+Te.w:ft:st?ot&&Ye==="right"?Te.r+Te.w:ft:Te.w,2*we);var yt=0,Et=0;de.each(function(Oe){var Be=g(Oe,he,we);yt=Math.max(yt,Be),Et+=Be}),Se=null;var Tt=0;if(Me){var xt=0,Dt=0,It=0;pe.each(function(){var Oe=0,Be=0;_.select(this).selectAll("g.traces").each(function(ut){var pt=g(ut,he,we),bt=ut[0].height;l.setTranslate(this,Ne[0],Ne[1]+ne+me+bt/2+Be),Be+=bt,Oe=Math.max(Oe,pt),be[ut[0].trace.legendgroup]=Oe});var Qe=Oe+me;Dt>0&&Qe+ne+Dt>he._maxWidth?(Tt=Math.max(Tt,Dt),Dt=0,It+=xt+ge,xt=Be):xt=Math.max(xt,Be),l.setTranslate(this,Dt,It),Dt+=Qe}),he._width=Math.max(Tt,Dt)+ne,he._height=It+xt+Ee}else{var Ft=de.size(),qt=Et+ue+(Ft-1)*me=he._maxWidth&&(Tt=Math.max(Tt,Ge),Je=0,Ke+=Nt,he._height+=Nt,Nt=0),l.setTranslate(this,Ne[0]+ne+Je,Ne[1]+ne+Ke+Be/2+me),Ge=Je+Qe+me,Je+=ut,Nt=Math.max(Nt,Be)}),qt?(he._width=Je+ue,he._height=Nt+Ee):(he._width=Math.max(Tt,Ge)+ue,he._height+=Nt+Ee)}}he._width=Math.ceil(Math.max(he._width+Ne[0],he._titleWidth+2*(ne+n.titlePad))),he._height=Math.ceil(Math.max(he._height+Ne[1],he._titleHeight+2*(ne+n.itemGap))),he._effHeight=Math.min(he._height,he._maxHeight);var nt=xe._context.edits,ht=nt.legendText||nt.legendPosition;de.each(function(Oe){var Be=_.select(this).select("."+ze+"toggle"),Qe=Oe[0].height,ut=Oe[0].trace.legendgroup,pt=g(Oe,he,we);Me&&ut!==""&&(pt=be[ut]);var bt=ht?we:Se||pt;Ae||Ce||(bt+=me/2),l.setRect(Be,0,-Qe/2,bt,Qe)})}(I,se,ce,G)},function(){var xe,pe,de,he,ye=N._size,ze=G.borderwidth;if(!V){var Te=function(Ze,st){var ot=Ze._fullLayout[st],ft=C(ot),yt=L(ot);return s.autoMargin(Ze,st,{x:ot.x,y:ot.y,l:ot._width*u[ft],r:ot._width*p[ft],b:ot._effHeight*p[yt],t:ot._effHeight*u[yt]})}(I,j);if(Te)return;var Ae=ye.l+ye.w*G.x-u[C(G)]*G._width,Me=ye.t+ye.h*(1-G.y)-u[L(G)]*G._effHeight;if(N.margin.autoexpand){var Ce=Ae,ne=Me;Ae=w.constrain(Ae,0,N.width-G._width),Me=w.constrain(Me,0,N.height-G._effHeight),Ae!==Ce&&w.log("Constrain "+j+".x to make legend fit inside graph"),Me!==ne&&w.log("Constrain "+j+".y to make legend fit inside graph")}l.setTranslate(Q,Ae,Me)}if(oe.on(".drag",null),Q.on("wheel",null),V||G._height<=G._maxHeight||I._context.staticPlot){var ue=G._effHeight;V&&(ue=G._height),Y.attr({width:G._width-ze,height:ue-ze,x:ze/2,y:ze/2}),l.setTranslate(K,0,0),X.select("rect").attr({width:G._width-2*ze,height:ue-2*ze,x:ze,y:ze}),l.setClipUrl(K,U,I),l.setRect(oe,0,0,0,0),delete G._scrollY}else{var me,we,Ee,Ue=Math.max(n.scrollBarMinHeight,G._effHeight*G._effHeight/G._height),De=G._effHeight-Ue-2*n.scrollBarMargin,je=G._height-G._effHeight,ge=De/je,be=Math.min(G._scrollY||0,je);Y.attr({width:G._width-2*ze+n.scrollBarWidth+n.scrollBarMargin,height:G._effHeight-ze,x:ze/2,y:ze/2}),X.select("rect").attr({width:G._width-2*ze+n.scrollBarWidth+n.scrollBarMargin,height:G._effHeight-2*ze,x:ze,y:ze+be}),l.setClipUrl(K,U,I),Ye(be,Ue,ge),Q.on("wheel",function(){Ye(be=w.constrain(G._scrollY+_.event.deltaY/De*je,0,je),Ue,ge),be!==0&&be!==je&&_.event.preventDefault()});var Se=_.behavior.drag().on("dragstart",function(){var Ze=_.event.sourceEvent;me=Ze.type==="touchstart"?Ze.changedTouches[0].clientY:Ze.clientY,Ee=be}).on("drag",function(){var Ze=_.event.sourceEvent;Ze.buttons===2||Ze.ctrlKey||(we=Ze.type==="touchmove"?Ze.changedTouches[0].clientY:Ze.clientY,be=function(st,ot,ft){var yt=(ft-ot)/ge+st;return w.constrain(yt,0,je)}(Ee,me,we),Ye(be,Ue,ge))});oe.call(Se);var Ne=_.behavior.drag().on("dragstart",function(){var Ze=_.event.sourceEvent;Ze.type==="touchstart"&&(me=Ze.changedTouches[0].clientY,Ee=be)}).on("drag",function(){var Ze=_.event.sourceEvent;Ze.type==="touchmove"&&(we=Ze.changedTouches[0].clientY,be=function(st,ot,ft){var yt=(ot-ft)/ge+st;return w.constrain(yt,0,je)}(Ee,me,we),Ye(be,Ue,ge))});K.call(Ne)}function Ye(Ze,st,ot){G._scrollY=I._fullLayout[j]._scrollY=Ze,l.setTranslate(K,0,-Ze),l.setRect(oe,G._width,n.scrollBarMargin+Ze*ot,n.scrollBarWidth,st),X.select("rect").attr("y",ze+Ze)}I._context.edits.legendPosition&&(Q.classed("cursor-move",!0),f.init({element:Q.node(),gd:I,prepFn:function(){var Ze=l.getTranslate(Q);de=Ze.x,he=Ze.y},moveFn:function(Ze,st){var ot=de+Ze,ft=he+st;l.setTranslate(Q,ot,ft),xe=f.align(ot,G._width,ye.l,ye.l+ye.w,G.xanchor),pe=f.align(ft+G._height,-G._height,ye.t+ye.h,ye.t,G.yanchor)},doneFn:function(){if(xe!==void 0&&pe!==void 0){var Ze={};Ze[j+".x"]=xe,Ze[j+".y"]=pe,T.call("_guiRelayout",I,Ze)}},clickFn:function(Ze,st){var ot=se.selectAll("g.traces").filter(function(){var ft=this.getBoundingClientRect();return st.clientX>=ft.left&&st.clientX<=ft.right&&st.clientY>=ft.top&&st.clientY<=ft.bottom});ot.size()>0&&y(I,Q,ot,Ze,st)}}))}],I)}}function g(I,R,U){var B=I[0],G=B.width,N=R.entrywidthmode,j=B.trace.legendwidth||R.entrywidth;return N==="fraction"?R._maxWidth*j:U+(j||G)}function y(I,R,U,B,G){var N=U.data()[0][0].trace,j={event:G,node:U.node(),curveNumber:N.index,expandedIndex:N._expandedIndex,data:I.data,layout:I.layout,frames:I._transitionData._frames,config:I._context,fullData:I._fullData,fullLayout:I._fullLayout};N._group&&(j.group=N._group),T.traceIs(N,"pie-like")&&(j.label=U.datum()[0].label),m.triggerHandler(I,"plotly_legendclick",j)!==!1&&(B===1?R._clickTimeout=setTimeout(function(){I._fullLayout&&r(U,I,B)},I._context.doubleClickDelay):B===2&&(R._clickTimeout&&clearTimeout(R._clickTimeout),I._legendMouseDownTime=0,m.triggerHandler(I,"plotly_legenddoubleclick",j)!==!1&&r(U,I,B)))}function k(I,R,U){var B,G,N=P(U),j=I.data()[0][0],V=j.trace,H=T.traceIs(V,"pie-like"),ee=!U._inHover&&R._context.edits.legendText&&!H,Q=U._maxNameLength;j.groupTitle?(B=j.groupTitle.text,G=j.groupTitle.font):(G=U.font,U.entries?B=j.text:(B=H?j.label:V.name,V._meta&&(B=w.templateString(B,V._meta))));var X=w.ensureSingle(I,"text",N+"text");X.attr("text-anchor","start").call(l.font,G).text(ee?h(B,Q):B);var Y=U.itemwidth+2*n.itemGap;a.positionText(X,Y,0),ee?X.call(a.makeEditable,{gd:R,text:B}).call(A,I,R,U).on("edit",function(K){this.text(h(K,Q)).call(A,I,R,U);var te=j.trace._fullInput||{},re={};if(T.hasTransform(te,"groupby")){var oe=T.getTransformIndices(te,"groupby"),se=oe[oe.length-1],ce=w.keyedContainer(te,"transforms["+se+"].styles","target","value.name");ce.set(j.trace._group,K),re=ce.constructUpdate()}else re.name=K;return T.call("_guiRestyle",R,re,V.index)}):A(X,I,R,U)}function h(I,R){var U=Math.max(4,R);if(I&&I.trim().length>=U/2)return I;for(var B=U-(I=I||"").length;B>0;B--)I+=" ";return I}function M(I,R,U){var B,G=R._context.doubleClickDelay,N=1,j=w.ensureSingle(I,"rect",U+"toggle",function(V){R._context.staticPlot||V.style("cursor","pointer").attr("pointer-events","all"),V.call(t.fill,"rgba(0,0,0,0)")});R._context.staticPlot||(j.on("mousedown",function(){(B=new Date().getTime())-R._legendMouseDownTimeG&&(N=Math.max(N-1,1)),y(R,V,I,N,_.event)}}))}function A(I,R,U,B,G){B._inHover&&I.attr("data-notex",!0),a.convertToTspans(I,U,function(){(function(N,j,V,H){var ee=N.data()[0][0];if(V._inHover||!ee||ee.trace.showlegend){var Q=N.select("g[class*=math-group]"),X=Q.node(),Y=P(V);V||(V=j._fullLayout[Y]);var K,te,re=V.borderwidth,oe=(H===1?V.title.font:ee.groupTitle?ee.groupTitle.font:V.font).size*i;if(X){var se=l.bBox(X);K=se.height,te=se.width,H===1?l.setTranslate(Q,re,re+.75*K):l.setTranslate(Q,0,.25*K)}else{var ce="."+Y+(H===1?"title":"")+"text",xe=N.select(ce),pe=a.lineCount(xe),de=xe.node();if(K=oe*pe,te=de?l.bBox(de).width:0,H===1)V.title.side==="left"&&(te+=2*n.itemGap),a.positionText(xe,re+n.titlePad,re+oe);else{var he=2*n.itemGap+V.itemwidth;ee.groupTitle&&(he=n.itemGap,te-=V.itemwidth),a.positionText(xe,he,-oe*((pe-1)/2-.3))}}H===1?(V._titleWidth=te,V._titleHeight=K):(ee.lineHeight=oe,ee.height=Math.max(K,16)+3,ee.width=te)}else N.remove()})(R,U,B,G)})}function C(I){return w.isRightAnchor(I)?"right":w.isCenterAnchor(I)?"center":"left"}function L(I){return w.isBottomAnchor(I)?"bottom":w.isMiddleAnchor(I)?"middle":"top"}function P(I){return I._id||"legend"}D.exports=function(I,R){if(R)x(I,R);else{var U=I._fullLayout,B=U._legends;U._infolayer.selectAll('[class^="legend"]').each(function(){var j=_.select(this),V=j.attr("class").split(" ")[0];V.match(v)&&B.indexOf(V)===-1&&j.remove()});for(var G=0;GL&&(C=L)}M[f][0]._groupMinRank=C,M[f][0]._preGroupSort=f}var P=function(G,N){return G.trace.legendrank-N.trace.legendrank||G._preSort-N._preSort};for(M.forEach(function(G,N){G[0]._preGroupSort=N}),M.sort(function(G,N){return G[0]._groupMinRank-N[0]._groupMinRank||G[0]._preGroupSort-N[0]._preGroupSort}),f=0;fb?b:p}D.exports=function(p,c,b){var d=c._fullLayout;b||(b=d.legend);var v=b.itemsizing==="constant",x=b.itemwidth,g=(x+2*n.itemGap)/2,y=T(g,0),k=function(A,C,L,P){var I;if(A+1)I=A;else{if(!(C&&C.width>0))return 0;I=C.width}return v?P:Math.min(I,L)};function h(A,C,L){var P=A[0].trace,I=P.marker||{},R=I.line||{},U=L?P.visible&&P.type===L:w.traceIs(P,"bar"),B=_.select(C).select("g.legendpoints").selectAll("path.legend"+L).data(U?[A]:[]);B.enter().append("path").classed("legend"+L,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",y),B.exit().remove(),B.each(function(G){var N=_.select(this),j=G[0],V=k(j.mlw,I.line,5,2);N.style("stroke-width",V+"px");var H=j.mcc;if(!b._inHover&&"mc"in j){var ee=l(I),Q=ee.mid;Q===void 0&&(Q=(ee.max+ee.min)/2),H=m.tryColorscale(I,"")(Q)}var X=H||j.mc||I.color,Y=I.pattern,K=Y&&m.getPatternAttr(Y.shape,0,"");if(K){var te=m.getPatternAttr(Y.bgcolor,0,null),re=m.getPatternAttr(Y.fgcolor,0,null),oe=Y.fgopacity,se=u(Y.size,8,10),ce=u(Y.solidity,.5,1),xe="legend-"+P.uid;N.call(m.pattern,"legend",c,xe,K,se,ce,H,Y.fillmode,te,re,oe)}else N.call(f.fill,X);V&&f.stroke(N,j.mlc||R.color)})}function M(A,C,L){var P=A[0],I=P.trace,R=L?I.visible&&I.type===L:w.traceIs(I,L),U=_.select(C).select("g.legendpoints").selectAll("path.legend"+L).data(R?[A]:[]);if(U.enter().append("path").classed("legend"+L,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",y),U.exit().remove(),U.size()){var B=(I.marker||{}).line,G=k(r(B.width,P.pts),B,5,2),N=s.minExtend(I,{marker:{line:{width:G}}});N.marker.line.color=B.color;var j=s.minExtend(P,{trace:N});a(U,j,N)}}p.each(function(A){var C=_.select(this),L=s.ensureSingle(C,"g","layers");L.style("opacity",A[0].trace.opacity);var P=b.valign,I=A[0].lineHeight,R=A[0].height;if(P!=="middle"&&I&&R){var U={top:1,bottom:-1}[P]*(.5*(I-R+3));L.attr("transform",T(0,U))}else L.attr("transform",null);L.selectAll("g.legendfill").data([A]).enter().append("g").classed("legendfill",!0),L.selectAll("g.legendlines").data([A]).enter().append("g").classed("legendlines",!0);var B=L.selectAll("g.legendsymbols").data([A]);B.enter().append("g").classed("legendsymbols",!0),B.selectAll("g.legendpoints").data([A]).enter().append("g").classed("legendpoints",!0)}).each(function(A){var C,L=A[0].trace,P=[];if(L.visible)switch(L.type){case"histogram2d":case"heatmap":P=[["M-15,-2V4H15V-2Z"]],C=!0;break;case"choropleth":case"choroplethmapbox":P=[["M-6,-6V6H6V-6Z"]],C=!0;break;case"densitymapbox":P=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],C="radial";break;case"cone":P=[["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"]],C=!1;break;case"streamtube":P=[["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"]],C=!1;break;case"surface":P=[["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"]],C=!0;break;case"mesh3d":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],C=!1;break;case"volume":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],C=!0;break;case"isosurface":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],C=!1}var I=_.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(P);I.enter().append("path").classed("legend3dandfriends",!0).attr("transform",y).style("stroke-miterlimit",1),I.exit().remove(),I.each(function(R,U){var B,G=_.select(this),N=l(L),j=N.colorscale,V=N.reversescale;if(j){if(!C){var H=j.length;B=U===0?j[V?H-1:0][1]:U===1?j[V?0:H-1][1]:j[Math.floor((H-1)/2)][1]}}else{var ee=L.vertexcolor||L.facecolor||L.color;B=s.isArrayOrTypedArray(ee)?ee[U]||ee[0]:ee}G.attr("d",R[0]),B?G.call(f.fill,B):G.call(function(Q){if(Q.size()){var X="legendfill-"+L.uid;m.gradient(Q,c,X,o(V,C==="radial"),j,"fill")}})})}).each(function(A){var C=A[0].trace,L=C.type==="waterfall";if(A[0]._distinct&&L){var P=A[0].trace[A[0].dir].marker;return A[0].mc=P.color,A[0].mlw=P.line.width,A[0].mlc=P.line.color,h(A,this,"waterfall")}var I=[];C.visible&&L&&(I=A[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 R=_.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(I);R.enter().append("path").classed("legendwaterfall",!0).attr("transform",y).style("stroke-miterlimit",1),R.exit().remove(),R.each(function(U){var B=_.select(this),G=C[U[0]].marker,N=k(void 0,G.line,5,2);B.attr("d",U[1]).style("stroke-width",N+"px").call(f.fill,G.color),N&&B.call(f.stroke,G.line.color)})}).each(function(A){h(A,this,"funnel")}).each(function(A){h(A,this)}).each(function(A){var C=A[0].trace,L=_.select(this).select("g.legendpoints").selectAll("path.legendbox").data(C.visible&&w.traceIs(C,"box-violin")?[A]:[]);L.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",y),L.exit().remove(),L.each(function(){var P=_.select(this);if(C.boxpoints!=="all"&&C.points!=="all"||f.opacity(C.fillcolor)!==0||f.opacity((C.line||{}).color)!==0){var I=k(void 0,C.line,5,2);P.style("stroke-width",I+"px").call(f.fill,C.fillcolor),I&&f.stroke(P,C.line.color)}else{var R=s.minExtend(C,{marker:{size:v?12:s.constrain(C.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});L.call(m.pointStyle,R,c)}})}).each(function(A){M(A,this,"funnelarea")}).each(function(A){M(A,this,"pie")}).each(function(A){var C,L,P=i(A),I=P.showFill,R=P.showLine,U=P.showGradientLine,B=P.showGradientFill,G=P.anyFill,N=P.anyLine,j=A[0],V=j.trace,H=l(V),ee=H.colorscale,Q=H.reversescale,X=t.hasMarkers(V)||!G?"M5,0":N?"M5,-2":"M5,-3",Y=_.select(this),K=Y.select(".legendfill").selectAll("path").data(I||B?[A]:[]);if(K.enter().append("path").classed("js-fill",!0),K.exit().remove(),K.attr("d",X+"h"+x+"v6h-"+x+"z").call(function(oe){if(oe.size())if(I)m.fillGroupStyle(oe,c);else{var se="legendfill-"+V.uid;m.gradient(oe,c,se,o(Q),ee,"fill")}}),R||U){var te=k(void 0,V.line,10,5);L=s.minExtend(V,{line:{width:te}}),C=[s.minExtend(j,{trace:L})]}var re=Y.select(".legendlines").selectAll("path").data(R||U?[C]:[]);re.enter().append("path").classed("js-line",!0),re.exit().remove(),re.attr("d",X+(U?"l"+x+",0.0001":"h"+x)).call(R?m.lineGroupStyle:function(oe){if(oe.size()){var se="legendline-"+V.uid;m.lineGroupStyle(oe),m.gradient(oe,c,se,o(Q),ee,"stroke")}})}).each(function(A){var C,L,P=i(A),I=P.anyFill,R=P.anyLine,U=P.showLine,B=P.showMarker,G=A[0],N=G.trace,j=!B&&!R&&!I&&t.hasText(N);function V(re,oe,se,ce){var xe=s.nestedProperty(N,re).get(),pe=s.isArrayOrTypedArray(xe)&&oe?oe(xe):xe;if(v&&pe&&ce!==void 0&&(pe=ce),se){if(pese[1])return se[1]}return pe}function H(re){return G._distinct&&G.index&&re[G.index]?re[G.index]:re[0]}if(B||j||U){var ee={},Q={};if(B){ee.mc=V("marker.color",H),ee.mx=V("marker.symbol",H),ee.mo=V("marker.opacity",s.mean,[.2,1]),ee.mlc=V("marker.line.color",H),ee.mlw=V("marker.line.width",s.mean,[0,5],2),Q.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var X=V("marker.size",s.mean,[2,16],12);ee.ms=X,Q.marker.size=X}U&&(Q.line={width:V("line.width",H,[0,10],5)}),j&&(ee.tx="Aa",ee.tp=V("textposition",H),ee.ts=10,ee.tc=V("textfont.color",H),ee.tf=V("textfont.family",H)),C=[s.minExtend(G,ee)],(L=s.minExtend(N,Q)).selectedpoints=null,L.texttemplate=null}var Y=_.select(this).select("g.legendpoints"),K=Y.selectAll("path.scatterpts").data(B?C:[]);K.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",y),K.exit().remove(),K.call(m.pointStyle,L,c),B&&(C[0].mrc=3);var te=Y.selectAll("g.pointtext").data(j?C:[]);te.enter().append("g").classed("pointtext",!0).append("text").attr("transform",y),te.exit().remove(),te.selectAll("text").call(m.textPointStyle,L,c)}).each(function(A){var C=A[0].trace,L=_.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(C.visible&&C.type==="candlestick"?[A,A]:[]);L.enter().append("path").classed("legendcandle",!0).attr("d",function(P,I){return I?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",y).style("stroke-miterlimit",1),L.exit().remove(),L.each(function(P,I){var R=_.select(this),U=C[I?"increasing":"decreasing"],B=k(void 0,U.line,5,2);R.style("stroke-width",B+"px").call(f.fill,U.fillcolor),B&&f.stroke(R,U.line.color)})}).each(function(A){var C=A[0].trace,L=_.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(C.visible&&C.type==="ohlc"?[A,A]:[]);L.enter().append("path").classed("legendohlc",!0).attr("d",function(P,I){return I?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",y).style("stroke-miterlimit",1),L.exit().remove(),L.each(function(P,I){var R=_.select(this),U=C[I?"increasing":"decreasing"],B=k(void 0,U.line,5,2);R.style("fill","none").call(m.dashLine,U.line.dash,B),B&&f.stroke(R,U.line.color)})})}},42068:function(D,E,e){e(93348),D.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(D,E,e){var _=e(73972),w=e(74875),s=e(41675),T=e(24255),m=e(34031).eraseActiveShape,f=e(71828),l=f._,t=D.exports={};function a(d,v){var x,g,y=v.currentTarget,k=y.getAttribute("data-attr"),h=y.getAttribute("data-val")||!0,M=d._fullLayout,A={},C=s.list(d,null,!0),L=M._cartesianSpikesEnabled;if(k==="zoom"){var P,I=h==="in"?.5:2,R=(1+I)/2,U=(1-I)/2;for(g=0;g1?(X=["toggleHover"],Y=["resetViews"]):A?(Q=["zoomInGeo","zoomOutGeo"],X=["hoverClosestGeo"],Y=["resetGeo"]):M?(X=["hoverClosest3d"],Y=["resetCameraDefault3d","resetCameraLastSave3d"]):R?(Q=["zoomInMapbox","zoomOutMapbox"],X=["toggleHover"],Y=["resetViewMapbox"]):P?X=["hoverClosestGl2d"]:C?X=["hoverClosestPie"]:G?(X=["hoverClosestCartesian","hoverCompareCartesian"],Y=["resetViewSankey"]):X=["toggleHover"],h&&(X=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(xe){for(var pe=0;pe0)){var c=function(d,v,x){for(var g=x.filter(function(M){return v[M].anchor===d._id}),y=0,k=0;k=he.max)pe=oe[de+1];else if(xe=he.pmax)pe=oe[de+1];else if(xede._length||we+Ne<0)return;ge=me+Ne,be=we+Ne;break;case ze:if(Se="col-resize",me+Ne>de._length)return;ge=me+Ne,be=we;break;case Te:if(Se="col-resize",we+Ne<0)return;ge=me,be=we+Ne;break;default:Se="ew-resize",ge=ue,be=ue+Ne}if(be=0;P--){var I=v.append("path").attr(g).style("opacity",P?.1:y).call(T.stroke,h).call(T.fill,k).call(m.dashLine,P?"solid":A,P?4+M:M);if(o(I,u,b),C){var R=f(u.layout,"selections",b);I.style({cursor:"move"});var U={element:I.node(),plotinfo:d,gd:u,editHelpers:R,isActiveSelection:!0},B=_(x,u);w(B,I,U)}else I.style("pointer-events",P?"all":"none");L[P]=I}var G=L[0];L[1].node().addEventListener("click",function(){return function(N,j){if(r(N)){var V=+j.node().getAttribute("data-index");if(V>=0){if(V===N._fullLayout._activeSelectionIndex)return void i(N);N._fullLayout._activeSelectionIndex=V,N._fullLayout._deactivateSelection=i,a(N)}}}(u,G)})}(u._fullLayout._selectionLayer)}function o(u,p,c){var b=c.xref+c.yref;m.setClipUrl(u,"clip"+p._fullLayout._uid+b,p)}function i(u){r(u)&&u._fullLayout._activeSelectionIndex>=0&&(s(u),delete u._fullLayout._activeSelectionIndex,a(u))}D.exports={draw:a,drawOne:n,activateLastSelection:function(u){if(r(u)){var p=u._fullLayout.selections.length-1;u._fullLayout._activeSelectionIndex=p,u._fullLayout._deactivateSelection=i,a(u)}}}},53777:function(D,E,e){var _=e(79952).P,w=e(1426).extendFlat;D.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:w({},_,{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(D){D.exports=function(E,e,_){_("newselection.mode"),_("newselection.line.width")&&(_("newselection.line.color"),_("newselection.line.dash")),_("activeselection.fillcolor"),_("activeselection.opacity")}},35855:function(D,E,e){var _=e(64505).selectMode,w=e(51873).clearOutline,s=e(60165),T=s.readPaths,m=s.writePaths,f=s.fixDatesForPaths;D.exports=function(l,t){if(l.length){var a=l[0][0];if(a){var r=a.getAttribute("d"),n=t.gd,o=n._fullLayout.newselection,i=t.plotinfo,u=i.xaxis,p=i.yaxis,c=t.isActiveSelection,b=t.dragmode,d=(n.layout||{}).selections||[];if(!_(b)&&c!==void 0){var v=n._fullLayout._activeSelectionIndex;if(v-1,qt=[];if(function(nt){return nt&&Array.isArray(nt)&&nt[0].hoverOnBox!==!0}(It)){te(De,je,Ne);var Nt=function(nt,ht){var Oe,Be,Qe=nt[0],ut=-1,pt=[];for(Be=0;Be0?function(nt,ht){var Oe,Be,Qe,ut=[];for(Qe=0;Qe0&&ut.push(Oe);if(ut.length===1&&ut[0]===ht.searchInfo&&(Be=ht.searchInfo.cd[0].trace).selectedpoints.length===ht.pointNumbers.length){for(Qe=0;Qe1||(Be+=ht.selectedpoints.length)>1))return!1;return Be===1}(Ze)&&(Et=xe(Nt))){for(Ye&&Ye.remove(),Dt=0;Dt=0})(Se)&&Se._fullLayout._deactivateShape(Se),function(yt){return yt._fullLayout._activeSelectionIndex>=0}(Se)&&Se._fullLayout._deactivateSelection(Se);var Ne=Se._fullLayout._zoomlayer,Ye=n(ge),Ze=i(ge);if(Ye||Ze){var st,ot,ft=Ne.selectAll(".select-outline-"+be.id);ft&&Se._fullLayout._outlining&&(Ye&&(st=g(ft,De)),st&&s.call("_guiRelayout",Se,{shapes:st}),Ze&&!ee(De)&&(ot=y(ft,De)),ot&&(Se._fullLayout._noEmitSelectedAtStart=!0,s.call("_guiRelayout",Se,{selections:ot}).then(function(){je&&k(Se)})),Se._fullLayout._outlining=!1)}be.selection={},be.selection.selectionDefs=De.selectionDefs=[],be.selection.mergedPolygons=De.mergedPolygons=[]}function oe(De){return De._id}function se(De,je,ge,be){if(!De.calcdata)return[];var Se,Ne,Ye,Ze=[],st=je.map(oe),ot=ge.map(oe);for(Ye=0;Ye0?be[0]:ge;return!!je.selectedpoints&&je.selectedpoints.indexOf(Se)>-1}function pe(De,je,ge){var be,Se;for(be=0;be-1&&je;if(!Ne&&je){var _n=Ce(De,!0);if(_n.length){var fn=_n[0].xref,hn=_n[0].yref;if(fn&&hn){var In=me(_n);we([L(De,fn,"x"),L(De,hn,"y")])(wn,In)}}De._fullLayout._noEmitSelectedAtStart?De._fullLayout._noEmitSelectedAtStart=!1:on&&Ee(De,wn),Et._reselect=!1}if(!Ne&&Et._deselect){var Cn=Et._deselect;(function(Nn,Hn,qn){for(var or=0;or=0)Tt._fullLayout._deactivateShape(Tt);else if(!ot){var hn=xt.clickmode;C.done(kn).then(function(){if(C.clear(kn),_n===2){for(Xt.remove(),Qe=0;Qe-1&&Q(fn,Tt,be.xaxes,be.yaxes,be.subplot,be,Xt),hn==="event"&&Ee(Tt,void 0);f.click(Tt,fn)}).catch(h.error)}},be.doneFn=function(){ln.remove(),C.done(kn).then(function(){C.clear(kn),!Dt&&Be&&be.selectionDefs&&(Be.subtract=Gt,be.selectionDefs.push(Be),be.mergedPolygons.length=0,[].push.apply(be.mergedPolygons,Oe)),(Dt||ot)&&re(be,Dt),be.doneFnCompleted&&be.doneFnCompleted(Wn),ft&&Ee(Tt,pt)}).catch(h.error)}},clearOutline:b,clearSelectionsCache:re,selectOnClick:Q}},89827:function(D,E,e){var _=e(50215),w=e(41940),s=e(82196).line,T=e(79952).P,m=e(1426).extendFlat,f=e(44467).templatedArray,l=(e(24695),e(5386).R),t=e(37281);D.exports=f("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:m({},_.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:m({},_.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:m({},s.color,{editType:"arraydraw"}),width:m({},s.width,{editType:"calc+arraydraw"}),dash:m({},T,{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"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:l({},{keys:Object.keys(t)}),font:w({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})},5627:function(D,E,e){var _=e(71828),w=e(89298),s=e(21459),T=e(30477);function m(a){return l(a.line.width,a.xsizemode,a.x0,a.x1,a.path,!1)}function f(a){return l(a.line.width,a.ysizemode,a.y0,a.y1,a.path,!0)}function l(a,r,n,o,i,u){var p=a/2,c=u;if(r==="pixel"){var b=i?T.extractPathCoords(i,u?s.paramIsY:s.paramIsX):[n,o],d=_.aggNums(Math.max,null,b),v=_.aggNums(Math.min,null,b),x=v<0?Math.abs(v)+p:p,g=d>0?d+p:p;return{ppad:p,ppadplus:c?x:g,ppadminus:c?g:x}}return{ppad:p}}function t(a,r,n,o,i){var u=a.type==="category"||a.type==="multicategory"?a.r2c:a.d2c;if(r!==void 0)return[u(r),u(n)];if(o){var p,c,b,d,v=1/0,x=-1/0,g=o.match(s.segmentRE);for(a.type==="date"&&(u=T.decodeDate(u)),p=0;px&&(x=d)));return x>=v?[v,x]:void 0}}D.exports=function(a){var r=a._fullLayout,n=_.filterVisible(r.shapes);if(n.length&&a._fullData.length)for(var o=0;o1&&(xe.length!==2||xe[1][0]!=="Z")&&(U===0&&(xe[0][0]="M"),y[R]=xe,C(),L())}}()}}function Y(oe,se){(function(ce,xe){if(y.length)for(var pe=0;peMe?(ue=Te,Ue="y0",me=Me,De="y1"):(ue=Me,Ue="y1",me=Te,De="y0"),Ke(Be),ht(he,pe),function(Qe,ut,pt){var bt=ut.xref,Lt=ut.yref,Ct=T.getFromId(pt,bt),mt=T.getFromId(pt,Lt),Ot="";bt==="paper"||Ct.autorange||(Ot+=bt),Lt==="paper"||mt.autorange||(Ot+=Lt),a.setClipUrl(Qe,Ot?"clip"+pt._fullLayout._uid+Ot:null,pt)}(xe,pe,ce),Je.moveFn=Se==="move"?Ge:nt,Je.altKey=Be.altKey)},doneFn:function(){x(ce)||(o(xe),Oe(he),k(xe,ce,pe),w.call("_guiRelayout",ce,ye.getUpdateObj()))},clickFn:function(){x(ce)||Oe(he)}};function Ke(Be){if(x(ce))Se=null;else if(Ze)Se=Be.target.tagName==="path"?"move":Be.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Qe=Je.element.getBoundingClientRect(),ut=Qe.right-Qe.left,pt=Qe.bottom-Qe.top,bt=Be.clientX-Qe.left,Lt=Be.clientY-Qe.top,Ct=!st&&ut>10&&pt>10&&!Be.shiftKey?n.getCursor(bt/ut,1-Lt/pt):"move";o(xe,Ct),Se=Ct.split("-")[0]}}function Ge(Be,Qe){if(pe.type==="path"){var ut=function(Lt){return Lt},pt=ut,bt=ut;Ne?ot("xanchor",pe.xanchor=Ft(Ce+Be)):(pt=function(Lt){return Ft(Dt(Lt)+Be)},yt&&yt.type==="date"&&(pt=p.encodeDate(pt))),Ye?ot("yanchor",pe.yanchor=qt(ne+Qe)):(bt=function(Lt){return qt(It(Lt)+Qe)},Tt&&Tt.type==="date"&&(bt=p.encodeDate(bt))),ot("path",pe.path=M(be,pt,bt))}else Ne?ot("xanchor",pe.xanchor=Ft(Ce+Be)):(ot("x0",pe.x0=Ft(ze+Be)),ot("x1",pe.x1=Ft(Ae+Be))),Ye?ot("yanchor",pe.yanchor=qt(ne+Qe)):(ot("y0",pe.y0=qt(Te+Qe)),ot("y1",pe.y1=qt(Me+Qe)));xe.attr("d",c(ce,pe)),ht(he,pe),h(ce,de,pe,ft)}function nt(Be,Qe){if(st){var ut=function(ln){return ln},pt=ut,bt=ut;Ne?ot("xanchor",pe.xanchor=Ft(Ce+Be)):(pt=function(ln){return Ft(Dt(ln)+Be)},yt&&yt.type==="date"&&(pt=p.encodeDate(pt))),Ye?ot("yanchor",pe.yanchor=qt(ne+Qe)):(bt=function(ln){return qt(It(ln)+Qe)},Tt&&Tt.type==="date"&&(bt=p.encodeDate(bt))),ot("path",pe.path=M(be,pt,bt))}else if(Ze){if(Se==="resize-over-start-point"){var Lt=ze+Be,Ct=Ye?Te-Qe:Te+Qe;ot("x0",pe.x0=Ne?Lt:Ft(Lt)),ot("y0",pe.y0=Ye?Ct:qt(Ct))}else if(Se==="resize-over-end-point"){var mt=Ae+Be,Ot=Ye?Me-Qe:Me+Qe;ot("x1",pe.x1=Ne?mt:Ft(mt)),ot("y1",pe.y1=Ye?Ot:qt(Ot))}}else{var _t=function(ln){return Se.indexOf(ln)!==-1},Pt=_t("n"),Bt=_t("s"),Wt=_t("w"),Gt=_t("e"),Xt=Pt?ue+Qe:ue,Kt=Bt?me+Qe:me,nn=Wt?we+Be:we,yn=Gt?Ee+Be:Ee;Ye&&(Pt&&(Xt=ue-Qe),Bt&&(Kt=me-Qe)),(!Ye&&Kt-Xt>10||Ye&&Xt-Kt>10)&&(ot(Ue,pe[Ue]=Ye?Xt:qt(Xt)),ot(De,pe[De]=Ye?Kt:qt(Kt))),yn-nn>10&&(ot(je,pe[je]=Ne?nn:Ft(nn)),ot(ge,pe[ge]=Ne?yn:Ft(yn)))}xe.attr("d",c(ce,pe)),ht(he,pe),h(ce,de,pe,ft)}function ht(Be,Qe){(Ne||Ye)&&function(){var ut=Qe.type!=="path",pt=Be.selectAll(".visual-cue").data([0]);pt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var bt=Dt(Ne?Qe.xanchor:s.midRange(ut?[Qe.x0,Qe.x1]:p.extractPathCoords(Qe.path,u.paramIsX))),Lt=It(Ye?Qe.yanchor:s.midRange(ut?[Qe.y0,Qe.y1]:p.extractPathCoords(Qe.path,u.paramIsY)));if(bt=p.roundPositionForSharpStrokeRendering(bt,1),Lt=p.roundPositionForSharpStrokeRendering(Lt,1),Ne&&Ye){var Ct="M"+(bt-1-1)+","+(Lt-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";pt.attr("d",Ct)}else if(Ne){var mt="M"+(bt-1-1)+","+(Lt-9-1)+"v18 h2 v-18 Z";pt.attr("d",mt)}else{var Ot="M"+(bt-9-1)+","+(Lt-1-1)+"h18 v2 h-18 Z";pt.attr("d",Ot)}}()}function Oe(Be){Be.selectAll(".visual-cue").remove()}n.init(Je),Nt.node().onmousemove=Ke}(C,re,I,L,B,K):I.editable===!0&&re.style("pointer-events",X||t.opacity(V)*j<=.5?"stroke":"all");re.node().addEventListener("click",function(){return function(ce,xe){if(g(ce)){var pe=+xe.node().getAttribute("data-index");if(pe>=0){if(pe===ce._fullLayout._activeShapeIndex)return void A(ce);ce._fullLayout._activeShapeIndex=pe,ce._fullLayout._deactivateShape=A,v(ce)}}}(C,re)})}I._input&&I.visible!==!1&&(I.layer!=="below"?U(C._fullLayout._shapeUpperLayer):I.xref==="paper"||I.yref==="paper"?U(C._fullLayout._shapeLowerLayer):R._hadPlotinfo?U((R.mainplotinfo||R).shapelayer):U(C._fullLayout._shapeLowerLayer))}function k(C,L,P){var I=(P.xref+P.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");a.setClipUrl(C,I?"clip"+L._fullLayout._uid+I:null,L)}function h(C,L,P,I){if(I.selectAll(".shape-label").remove(),P.label.text||P.label.texttemplate){var R;if(P.label.texttemplate){var U={};if(P.type!=="path"){var B=T.getFromId(C,P.xref),G=T.getFromId(C,P.yref);for(var N in b){var j=b[N](P,B,G);j!==void 0&&(U[N]=j)}}R=s.texttemplateStringForShapes(P.label.texttemplate,{},C._fullLayout._d3locale,U)}else R=P.label.text;var V,H,ee,Q,X={"data-index":L},Y=P.label.font,K=I.append("g").attr(X).classed("shape-label",!0).append("text").attr({"data-notex":1}).classed("shape-label-text",!0).text(R);if(P.path){var te=c(C,P),re=m(te,C);V=1/0,ee=1/0,H=-1/0,Q=-1/0;for(var oe=0;oe=Ee?Ue-je:je-Ue,-180/Math.PI*Math.atan2(ge,be)}(V,ee,H,Q):0),K.call(function(Ee){return Ee.call(a.font,Y).attr({}),i.convertToTspans(Ee,C),Ee});var ne=function(Ee,Ue,De,je,ge,be,Se){var Ne,Ye,Ze,st,ot=ge.label.textposition,ft=ge.label.textangle,yt=ge.label.padding,Et=ge.type,Tt=Math.PI/180*be,xt=Math.sin(Tt),Dt=Math.cos(Tt),It=ge.label.xanchor,Ft=ge.label.yanchor;if(Et==="line"){ot==="start"?(Ne=Ee,Ye=Ue):ot==="end"?(Ne=De,Ye=je):(Ne=(Ee+De)/2,Ye=(Ue+je)/2),It==="auto"&&(It=ot==="start"?ft==="auto"?De>Ee?"left":DeEe?"right":DeEe?"right":DeEe?"left":De=N||(B[R]?j=L(j):G[R]&&(j=P(j)),R++),j})})}function A(C){g(C)&&C._fullLayout._activeShapeIndex>=0&&(l(C),delete C._fullLayout._activeShapeIndex,v(C))}D.exports={draw:v,drawOne:y,eraseActiveShape:function(C){if(g(C)){l(C);var L=C._fullLayout._activeShapeIndex,P=(C.layout||{}).shapes||[];if(L0&&xX&&(K="X"),K});return V>X&&(Y=Y.replace(/[\s,]*X.*/,""),w.log("Ignoring extra params in segment "+j)),H+Y})}(m,l,a);if(m.xsizemode==="pixel"){var x=l(m.xanchor);r=x+m.x0,n=x+m.x1}else r=l(m.x0),n=l(m.x1);if(m.ysizemode==="pixel"){var g=a(m.yanchor);o=g-m.y0,i=g-m.y1}else o=a(m.y0),i=a(m.y1);if(u==="line")return"M"+r+","+o+"L"+n+","+i;if(u==="rect")return"M"+r+","+o+"H"+n+"V"+i+"H"+r+"Z";var y=(r+n)/2,k=(o+i)/2,h=Math.abs(y-r),M=Math.abs(k-o),A="A"+h+","+M,C=y+h+","+k;return"M"+C+A+" 0 1,1 "+y+","+(k-M)+A+" 0 0,1 "+C+"Z"}},89853:function(D,E,e){var _=e(34031);D.exports={moduleType:"component",name:"shapes",layoutAttributes:e(89827),supplyLayoutDefaults:e(84726),supplyDrawNewShapeDefaults:e(45547),includeBasePlot:e(76325)("shapes"),calcAutorange:e(5627),draw:_.draw,drawOne:_.drawOne}},37281:function(D){function E(s,T){return T?T.d2l(s):s}function e(s,T){return T?T.l2d(s):s}function _(s,T){return E(s.x1,T)-E(s.x0,T)}function w(s,T,m){return E(s.y1,m)-E(s.y0,m)}D.exports={x0:function(s){return s.x0},x1:function(s){return s.x1},y0:function(s){return s.y0},y1:function(s){return s.y1},slope:function(s,T,m){return s.type!=="line"?void 0:w(s,0,m)/_(s,T)},dx:_,dy:w,width:function(s,T){return Math.abs(_(s,T))},height:function(s,T,m){return Math.abs(w(s,0,m))},length:function(s,T,m){return s.type!=="line"?void 0:Math.sqrt(Math.pow(_(s,T),2)+Math.pow(w(s,0,m),2))},xcenter:function(s,T){return e((E(s.x1,T)+E(s.x0,T))/2,T)},ycenter:function(s,T,m){return e((E(s.y1,m)+E(s.y0,m))/2,m)}}},75067:function(D,E,e){var _=e(41940),w=e(35025),s=e(1426).extendDeepAll,T=e(30962).overrideAll,m=e(85594),f=e(44467).templatedArray,l=e(98292),t=f("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}});D.exports=T(f("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:t,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:s(w({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:m.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:_({})},font:_({}),activebgcolor:{valType:"color",dflt:l.gripBgActiveColor},bgcolor:{valType:"color",dflt:l.railBgColor},bordercolor:{valType:"color",dflt:l.railBorderColor},borderwidth:{valType:"number",min:0,dflt:l.railBorderWidth},ticklen:{valType:"number",min:0,dflt:l.tickLength},tickcolor:{valType:"color",dflt:l.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:l.minorTickLength}}),"arraydraw","from-root")},98292:function(D){D.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(D,E,e){var _=e(71828),w=e(85501),s=e(75067),T=e(98292).name,m=s.steps;function f(t,a,r){function n(c,b){return _.coerce(t,a,s,c,b)}for(var o=w(t,a,{name:"steps",handleItemDefaults:l}),i=0,u=0;u0&&(V=V.transition().duration(R.transition.duration).ease(R.transition.easing)),V.attr("transform",f(j-.5*a.gripWidth,R._dims.currentValueTotalHeight))}}function A(I,R){var U=I._dims;return U.inputAreaStart+a.stepInset+(U.inputAreaLength-2*a.stepInset)*Math.min(1,Math.max(0,R))}function C(I,R){var U=I._dims;return Math.min(1,Math.max(0,(R-a.stepInset-U.inputAreaStart)/(U.inputAreaLength-2*a.stepInset-2*U.inputAreaStart)))}function L(I,R,U){var B=U._dims,G=m.ensureSingle(I,"rect",a.railTouchRectClass,function(N){N.call(k,R,I,U).style("pointer-events","all")});G.attr({width:B.inputAreaLength,height:Math.max(B.inputAreaWidth,a.tickOffset+U.ticklen+B.labelHeight)}).call(s.fill,U.bgcolor).attr("opacity",0),T.setTranslate(G,0,B.currentValueTotalHeight)}function P(I,R){var U=R._dims,B=U.inputAreaLength-2*a.railInset,G=m.ensureSingle(I,"rect",a.railRectClass);G.attr({width:B,height:a.railWidth,rx:a.railRadius,ry:a.railRadius,"shape-rendering":"crispEdges"}).call(s.stroke,R.bordercolor).call(s.fill,R.bgcolor).style("stroke-width",R.borderwidth+"px"),T.setTranslate(G,a.railInset,.5*(U.inputAreaWidth-a.railWidth)+U.currentValueTotalHeight)}D.exports=function(I){var R=I._context.staticPlot,U=I._fullLayout,B=function(ee,Q){for(var X=ee[a.name],Y=[],K=0;K0?[0]:[]);function N(ee){ee._commandObserver&&(ee._commandObserver.remove(),delete ee._commandObserver),w.autoMargin(I,u(ee))}if(G.enter().append("g").classed(a.containerClassName,!0).style("cursor",R?null:"ew-resize"),G.exit().each(function(){_.select(this).selectAll("g."+a.groupClassName).each(N)}).remove(),B.length!==0){var j=G.selectAll("g."+a.groupClassName).data(B,p);j.enter().append("g").classed(a.groupClassName,!0),j.exit().each(N).remove();for(var V=0;V0||ye<0){var Me={left:[-ze,0],right:[ze,0],top:[0,-ze],bottom:[0,ze]}[g.side];Y.attr("transform",f(Me[0],Me[1]))}}}return V.call(H),G&&(P?V.on(".opacity",null):(A=0,C=!0,V.text(v).on("mouseover.opacity",function(){_.select(this).transition().duration(r.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){_.select(this).transition().duration(r.HIDE_PLACEHOLDER).style("opacity",0)})),V.call(a.makeEditable,{gd:i}).on("edit",function(X){x!==void 0?T.call("_guiRestyle",i,d,X,x):T.call("_guiRelayout",i,d,X)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(H)}).on("input",function(X){this.text(X||" ").call(a.positionText,y.x,y.y)})),V.classed("js-placeholder",C),h}}},7163:function(D,E,e){var _=e(41940),w=e(22399),s=e(1426).extendFlat,T=e(30962).overrideAll,m=e(35025),f=e(44467).templatedArray,l=f("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}});D.exports=T(f("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:l,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:s(m({editType:"arraydraw"}),{}),font:_({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:w.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},75909:function(D){D.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(D,E,e){var _=e(71828),w=e(85501),s=e(7163),T=e(75909).name,m=s.buttons;function f(t,a,r){function n(o,i){return _.coerce(t,a,s,o,i)}n("visible",w(t,a,{name:"buttons",handleItemDefaults:l}).length>0)&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),_.noneOrAll(t,a,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),_.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function l(t,a){function r(n,o){return _.coerce(t,a,m,n,o)}r("visible",t.method==="skip"||Array.isArray(t.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}D.exports=function(t,a){w(t,a,{name:T,handleItemDefaults:f})}},13689:function(D,E,e){var _=e(39898),w=e(74875),s=e(7901),T=e(91424),m=e(71828),f=e(63893),l=e(44467).arrayEditor,t=e(18783).LINE_SPACING,a=e(75909),r=e(25849);function n(A){return A._index}function o(A,C){return+A.attr(a.menuIndexAttrName)===C._index}function i(A,C,L,P,I,R,U,B){C.active=U,l(A.layout,a.name,C).applyUpdate("active",U),C.type==="buttons"?p(A,P,null,null,C):C.type==="dropdown"&&(I.attr(a.menuIndexAttrName,"-1"),u(A,P,I,R,C),B||p(A,P,I,R,C))}function u(A,C,L,P,I){var R=m.ensureSingle(C,"g",a.headerClassName,function(V){V.style("pointer-events","all")}),U=I._dims,B=I.active,G=I.buttons[B]||a.blankHeaderOpts,N={y:I.pad.t,yPad:0,x:I.pad.l,xPad:0,index:0},j={width:U.headerWidth,height:U.headerHeight};R.call(c,I,G,A).call(h,I,N,j),m.ensureSingle(C,"text",a.headerArrowClassName,function(V){V.attr("text-anchor","end").call(T.font,I.font).text(a.arrowSymbol[I.direction])}).attr({x:U.headerWidth-a.arrowOffsetX+I.pad.l,y:U.headerHeight/2+a.textOffsetY+I.pad.t}),R.on("click",function(){L.call(M,String(o(L,I)?-1:I._index)),p(A,C,L,P,I)}),R.on("mouseover",function(){R.call(x)}),R.on("mouseout",function(){R.call(g,I)}),T.setTranslate(C,U.lx,U.ly)}function p(A,C,L,P,I){L||(L=C).attr("pointer-events","all");var R=function(Y){return+Y.attr(a.menuIndexAttrName)==-1}(L)&&I.type!=="buttons"?[]:I.buttons,U=I.type==="dropdown"?a.dropdownButtonClassName:a.buttonClassName,B=L.selectAll("g."+U).data(m.filterVisible(R)),G=B.enter().append("g").classed(U,!0),N=B.exit();I.type==="dropdown"?(G.attr("opacity","0").transition().attr("opacity","1"),N.transition().attr("opacity","0").remove()):N.remove();var j=0,V=0,H=I._dims,ee=["up","down"].indexOf(I.direction)!==-1;I.type==="dropdown"&&(ee?V=H.headerHeight+a.gapButtonHeader:j=H.headerWidth+a.gapButtonHeader),I.type==="dropdown"&&I.direction==="up"&&(V=-a.gapButtonHeader+a.gapButton-H.openHeight),I.type==="dropdown"&&I.direction==="left"&&(j=-a.gapButtonHeader+a.gapButton-H.openWidth);var Q={x:H.lx+j+I.pad.l,y:H.ly+V+I.pad.t,yPad:a.gapButton,xPad:a.gapButton,index:0},X={l:Q.x+I.borderwidth,t:Q.y+I.borderwidth};B.each(function(Y,K){var te=_.select(this);te.call(c,I,Y,A).call(h,I,Q),te.on("click",function(){_.event.defaultPrevented||(Y.execute&&(Y.args2&&I.active===K?(i(A,I,0,C,L,P,-1),w.executeAPICommand(A,Y.method,Y.args2)):(i(A,I,0,C,L,P,K),w.executeAPICommand(A,Y.method,Y.args))),A.emit("plotly_buttonclicked",{menu:I,button:Y,active:I.active}))}),te.on("mouseover",function(){te.call(x)}),te.on("mouseout",function(){te.call(g,I),B.call(v,I)})}),B.call(v,I),ee?(X.w=Math.max(H.openWidth,H.headerWidth),X.h=Q.y-X.t):(X.w=Q.x-X.l,X.h=Math.max(H.openHeight,H.headerHeight)),X.direction=I.direction,P&&(B.size()?function(Y,K,te,re,oe,se){var ce,xe,pe,de=oe.direction,he=de==="up"||de==="down",ye=oe._dims,ze=oe.active;if(he)for(xe=0,pe=0;pe0?[0]:[]);if(I.enter().append("g").classed(a.containerClassName,!0).style("cursor","pointer"),I.exit().each(function(){_.select(this).selectAll("g."+a.headerGroupClassName).each(P)}).remove(),L.length!==0){var R=I.selectAll("g."+a.headerGroupClassName).data(L,n);R.enter().append("g").classed(a.headerGroupClassName,!0);for(var U=m.ensureSingle(I,"g",a.dropdownButtonGroupClassName,function(V){V.style("pointer-events","all")}),B=0;Bh,C=m.barLength+2*m.barPad,L=m.barWidth+2*m.barPad,P=c,I=d+v;I+L>n&&(I=n-L);var R=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-horizontal",!0).call(w.fill,m.barColor),A?(this.hbar=R.attr({rx:m.barRadius,ry:m.barRadius,x:P,y:I,width:C,height:L}),this._hbarXMin=P+C/2,this._hbarTranslateMax=h-C):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var U=v>M,B=m.barWidth+2*m.barPad,G=m.barLength+2*m.barPad,N=c+b,j=d;N+B>r&&(N=r-B);var V=this.container.selectAll("rect.scrollbar-vertical").data(U?[0]:[]);V.exit().on(".drag",null).remove(),V.enter().append("rect").classed("scrollbar-vertical",!0).call(w.fill,m.barColor),U?(this.vbar=V.attr({rx:m.barRadius,ry:m.barRadius,x:N,y:j,width:B,height:G}),this._vbarYMin=j+G/2,this._vbarTranslateMax=M-G):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var H=this.id,ee=o-.5,Q=U?i+B+.5:i+.5,X=u-.5,Y=A?p+L+.5:p+.5,K=a._topdefs.selectAll("#"+H).data(A||U?[0]:[]);if(K.exit().remove(),K.enter().append("clipPath").attr("id",H).append("rect"),A||U?(this._clipRect=K.select("rect").attr({x:Math.floor(ee),y:Math.floor(X),width:Math.ceil(Q)-Math.floor(ee),height:Math.ceil(Y)-Math.floor(X)}),this.container.call(s.setClipUrl,H,this.gd),this.bg.attr({x:c,y:d,width:b,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(s.setClipUrl,null),delete this._clipRect),A||U){var te=_.behavior.drag().on("dragstart",function(){_.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(te);var re=_.behavior.drag().on("dragstart",function(){_.event.sourceEvent.preventDefault(),_.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(re),U&&this.vbar.on(".drag",null).call(re)}this.setTranslate(l,t)},m.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(s.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)},m.prototype._onBoxDrag=function(){var f=this.translateX,l=this.translateY;this.hbar&&(f-=_.event.dx),this.vbar&&(l-=_.event.dy),this.setTranslate(f,l)},m.prototype._onBoxWheel=function(){var f=this.translateX,l=this.translateY;this.hbar&&(f+=_.event.deltaY),this.vbar&&(l+=_.event.deltaY),this.setTranslate(f,l)},m.prototype._onBarDrag=function(){var f=this.translateX,l=this.translateY;if(this.hbar){var t=f+this._hbarXMin,a=t+this._hbarTranslateMax;f=(T.constrain(_.event.x,t,a)-t)/(a-t)*(this.position.w-this._box.w)}if(this.vbar){var r=l+this._vbarYMin,n=r+this._vbarTranslateMax;l=(T.constrain(_.event.y,r,n)-r)/(n-r)*(this.position.h-this._box.h)}this.setTranslate(f,l)},m.prototype.setTranslate=function(f,l){var t=this.position.w-this._box.w,a=this.position.h-this._box.h;if(f=T.constrain(f||0,0,t),l=T.constrain(l||0,0,a),this.translateX=f,this.translateY=l,this.container.call(s.setTranslate,this._box.l-this.position.l-f,this._box.t-this.position.t-l),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+f-.5),y:Math.floor(this.position.t+l-.5)}),this.hbar){var r=f/t;this.hbar.call(s.setTranslate,f+r*this._hbarTranslateMax,l)}if(this.vbar){var n=l/a;this.vbar.call(s.setTranslate,f,l+n*this._vbarTranslateMax)}}},18783:function(D){D.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(D){D.exports={axisRefDescription:function(E,e,_){return["If set to a",E,"axis id (e.g. *"+E+"* or","*"+E+"2*), the `"+E+"` position refers to a",E,"coordinate. If set to *paper*, the `"+E+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+_+"). If set to a",E,"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.,","*"+E+"2 domain* refers to the domain of the second",E," axis and a",E,"position of 0.5 refers to the","point between the",e,"and the",_,"of the domain of the","second",E,"axis."].join(" ")}}},22372:function(D){D.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},31562:function(D){D.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(D){D.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},29659:function(D){D.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(D){D.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},37822:function(D){D.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},50606:function(D){D.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,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(D,E){E.xmlns="http://www.w3.org/2000/xmlns/",E.svg="http://www.w3.org/2000/svg",E.xlink="http://www.w3.org/1999/xlink",E.svgAttrs={xmlns:E.svg,"xmlns:xlink":E.xlink}},8729:function(D,E,e){E.version=e(11506).version,e(7417),e(98847);for(var _=e(73972),w=E.register=_.register,s=e(10641),T=Object.keys(s),m=0;m",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},99863:function(D,E){E.isLeftAnchor=function(e){return e.xanchor==="left"||e.xanchor==="auto"&&e.x<=.3333333333333333},E.isCenterAnchor=function(e){return e.xanchor==="center"||e.xanchor==="auto"&&e.x>.3333333333333333&&e.x<.6666666666666666},E.isRightAnchor=function(e){return e.xanchor==="right"||e.xanchor==="auto"&&e.x>=.6666666666666666},E.isTopAnchor=function(e){return e.yanchor==="top"||e.yanchor==="auto"&&e.y>=.6666666666666666},E.isMiddleAnchor=function(e){return e.yanchor==="middle"||e.yanchor==="auto"&&e.y>.3333333333333333&&e.y<.6666666666666666},E.isBottomAnchor=function(e){return e.yanchor==="bottom"||e.yanchor==="auto"&&e.y<=.3333333333333333}},26348:function(D,E,e){var _=e(64872),w=_.mod,s=_.modHalf,T=Math.PI,m=2*T;function f(r){return Math.abs(r[1]-r[0])>m-1e-14}function l(r,n){return s(n-r,m)}function t(r,n){if(f(n))return!0;var o,i;n[0](i=w(i,m))&&(i+=m);var u=w(r,m),p=u+m;return u>=o&&u<=i||p>=o&&p<=i}function a(r,n,o,i,u,p,c){u=u||0,p=p||0;var b,d,v,x,g,y=f([o,i]);function k(C,L){return[C*Math.cos(L)+u,p-C*Math.sin(L)]}y?(b=0,d=T,v=m):o=u&&r<=p);var u,p},pathArc:function(r,n,o,i,u){return a(null,r,n,o,i,u,0)},pathSector:function(r,n,o,i,u){return a(null,r,n,o,i,u,1)},pathAnnulus:function(r,n,o,i,u,p){return a(r,n,o,i,u,p,1)}}},73627:function(D,E){var e=Array.isArray,_=ArrayBuffer,w=DataView;function s(f){return _.isView(f)&&!(f instanceof w)}function T(f){return e(f)||s(f)}function m(f,l,t){if(T(f)){if(T(f[0])){for(var a=t,r=0;rp.max?i.set(u):i.set(+o)}},integer:{coerceFunction:function(o,i,u,p){o%1||!_(o)||p.min!==void 0&&op.max?i.set(u):i.set(+o)}},string:{coerceFunction:function(o,i,u,p){if(typeof o!="string"){var c=typeof o=="number";p.strict!==!0&&c?i.set(String(o)):i.set(u)}else p.noBlank&&!o?i.set(u):i.set(o)}},color:{coerceFunction:function(o,i,u){w(o).isValid()?i.set(o):i.set(u)}},colorlist:{coerceFunction:function(o,i,u){Array.isArray(o)&&o.length&&o.every(function(p){return w(p).isValid()})?i.set(o):i.set(u)}},colorscale:{coerceFunction:function(o,i,u){i.set(T.get(o,u))}},angle:{coerceFunction:function(o,i,u){o==="auto"?i.set("auto"):_(o)?i.set(a(+o,360)):i.set(u)}},subplotid:{coerceFunction:function(o,i,u,p){var c=p.regex||t(u);typeof o=="string"&&c.test(o)?i.set(o):i.set(u)},validateFunction:function(o,i){var u=i.dflt;return o===u||typeof o=="string"&&!!t(u).test(o)}},flaglist:{coerceFunction:function(o,i,u,p){if((p.extras||[]).indexOf(o)===-1)if(typeof o=="string"){for(var c=o.split("+"),b=0;b=_&&R<=w?R:t}if(typeof R!="string"&&typeof R!="number")return t;R=String(R);var j=v(U),V=R.charAt(0);!j||V!=="G"&&V!=="g"||(R=R.substr(1),U="");var H=j&&U.substr(0,7)==="chinese",ee=R.match(H?b:c);if(!ee)return t;var Q=ee[1],X=ee[3]||"1",Y=Number(ee[5]||1),K=Number(ee[7]||0),te=Number(ee[9]||0),re=Number(ee[11]||0);if(j){if(Q.length===2)return t;var oe;Q=Number(Q);try{var se=u.getComponentMethod("calendars","getCal")(U);if(H){var ce=X.charAt(X.length-1)==="i";X=parseInt(X,10),oe=se.newDate(Q,se.toMonthIndex(Q,X,ce),Y)}else oe=se.newDate(Q,Number(X),Y)}catch{return t}return oe?(oe.toJD()-i)*a+K*r+te*n+re*o:t}Q=Q.length===2?(Number(Q)+2e3-d)%100+d:Number(Q),X-=1;var xe=new Date(Date.UTC(2e3,X,Y,K,te));return xe.setUTCFullYear(Q),xe.getUTCMonth()!==X||xe.getUTCDate()!==Y?t:xe.getTime()+re*o},_=E.MIN_MS=E.dateTime2ms("-9999"),w=E.MAX_MS=E.dateTime2ms("9999-12-31 23:59:59.9999"),E.isDateTime=function(R,U){return E.dateTime2ms(R,U)!==t};var g=90*a,y=3*r,k=5*n;function h(R,U,B,G,N){if((U||B||G||N)&&(R+=" "+x(U,2)+":"+x(B,2),(G||N)&&(R+=":"+x(G,2),N))){for(var j=4;N%10==0;)j-=1,N/=10;R+="."+x(N,j)}return R}E.ms2DateTime=function(R,U,B){if(typeof R!="number"||!(R>=_&&R<=w))return t;U||(U=0);var G,N,j,V,H,ee,Q=Math.floor(10*f(R+.05,1)),X=Math.round(R-Q/10);if(v(B)){var Y=Math.floor(X/a)+i,K=Math.floor(f(R,a));try{G=u.getComponentMethod("calendars","getCal")(B).fromJD(Y).formatDate("yyyy-mm-dd")}catch{G=p("G%Y-%m-%d")(new Date(X))}if(G.charAt(0)==="-")for(;G.length<11;)G="-0"+G.substr(1);else for(;G.length<10;)G="0"+G;N=U=_+a&&R<=w-a))return t;var U=Math.floor(10*f(R+.05,1)),B=new Date(Math.round(R-U/10));return h(s("%Y-%m-%d")(B),B.getHours(),B.getMinutes(),B.getSeconds(),10*B.getUTCMilliseconds()+U)},E.cleanDate=function(R,U,B){if(R===t)return U;if(E.isJSDate(R)||typeof R=="number"&&isFinite(R)){if(v(B))return m.error("JS Dates and milliseconds are incompatible with world calendars",R),U;if(!(R=E.ms2DateTimeLocal(+R))&&U!==void 0)return U}else if(!E.isDateTime(R,B))return m.error("unrecognized date",R),U;return R};var M=/%\d?f/g,A=/%h/g,C={1:"1",2:"1",3:"2",4:"2"};function L(R,U,B,G){R=R.replace(M,function(j){var V=Math.min(+j.charAt(1)||6,6);return(U/1e3%1+2).toFixed(V).substr(2).replace(/0+$/,"")||"0"});var N=new Date(Math.floor(U+.05));if(R=R.replace(A,function(){return C[B("%q")(N)]}),v(G))try{R=u.getComponentMethod("calendars","worldCalFmt")(R,U,G)}catch{return"Invalid"}return B(R)(N)}var P=[59,59.9,59.99,59.999,59.9999];E.formatDate=function(R,U,B,G,N,j){if(N=v(N)&&N,!U)if(B==="y")U=j.year;else if(B==="m")U=j.month;else{if(B!=="d")return function(V,H){var ee=f(V+.05,a),Q=x(Math.floor(ee/r),2)+":"+x(f(Math.floor(ee/n),60),2);if(H!=="M"){T(H)||(H=0);var X=(100+Math.min(f(V/o,60),P[H])).toFixed(H).substr(1);H>0&&(X=X.replace(/0+$/,"").replace(/[\.]$/,"")),Q+=":"+X}return Q}(R,B)+` +`)).length,Pe=0;Pe127&&E<2048?String.fromCharCode(E>>6|192,63&E|128):String.fromCharCode(E>>12|224,E>>6&63|128,63&E|128),e!==null&&(J>F&&(D+=O.substring(F,J)),D+=e,F=J=Pe+1)}return J>F&&(D+=O.substring(F,O.length)),D},xc=(kg=function(){for(var O=new Date().valueOf(),F=0;O==new Date().valueOf();)F++;return O.toString(16)+F.toString(16)},function(){var O=typeof window<"u"?(window.screen.height*window.screen.width).toString(16):"0";return kg()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var F,J,fe=Nl,Pe=0,D=[];function E(e,_){var w,s=0;for(w=0;w<_.length;w++)s|=D[w]<<8*w;return e^s}for(F=0;F=4&&(Pe=E(Pe,D),D=[]);return D.length>0&&(Pe=E(Pe,D)),Pe.toString(16)}()+"-"+O+"-"+kg()}),G8=function(O){return!!/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp|ahrefsbot|facebookexternalhit|facebookcatalog|applebot|semrushbot|duckduckbot|twitterbot|rogerbot|linkedinbot|mj12bot|sitebulb|bot.htm|bot.php|hubspot|crawler)/i.test(O)},ob=function(O,F){var J=F.replace(/[[]/,"\\[").replace(/[\]]/,"\\]"),fe=new RegExp("[\\?&]"+J+"=([^&#]*)").exec(O);if(fe===null||fe&&typeof fe[1]!="string"&&fe[1].length)return"";var Pe=fe[1];try{Pe=decodeURIComponent(Pe)}catch{Ja.error("Skipping decoding for malformed query param: "+Pe)}return Pe.replace(/\+/g," ")},sb=function(O,F){var J=O.match(new RegExp(F+"=([^&]*)"));return J?J[1]:null},bp=function(){function O(F){return F&&(F.preventDefault=O.preventDefault,F.stopPropagation=O.stopPropagation),F}return O.preventDefault=function(){this.returnValue=!1},O.stopPropagation=function(){this.cancelBubble=!0},function(F,J,fe,Pe,D){if(F)if(F.addEventListener&&!Pe)F.addEventListener(J,fe,!!D);else{var E="on"+J,e=F[E];F[E]=function(_,w,s){return function(T){if(T=T||O(window.event)){var m,f=!0;G3(s)&&(m=s(T));var l=w.call(_,T);return m!==!1&&l!==!1||(f=!1),f}}}(F,fe,e)}else Ja.error("No valid element provided to register_event")}}(),yo={campaignParams:function(O){var F=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","fbclid","msclkid"].concat(O||[]),J={};return Yi(F,function(fe){var Pe=ob(Vo.URL,fe);Pe.length&&(J[fe]=Pe)}),J},searchEngine:function(){var O=Vo.referrer;return O?O.search("https?://(.*)google.([^/?]*)")===0?"google":O.search("https?://(.*)bing.com")===0?"bing":O.search("https?://(.*)yahoo.com")===0?"yahoo":O.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null:null},searchInfo:function(){var O=yo.searchEngine(),F=O!="yahoo"?"q":"p",J={};if(O!==null){J.$search_engine=O;var fe=ob(Vo.referrer,F);fe.length&&(J.ph_keyword=fe)}return J},browser:function(O,F,J){return F=F||"",J||Ki(O," OPR/")?Ki(O,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(O)?"BlackBerry":Ki(O,"IEMobile")||Ki(O,"WPDesktop")?"Internet Explorer Mobile":Ki(O,"SamsungBrowser/")?"Samsung Internet":Ki(O,"Edge")||Ki(O,"Edg/")?"Microsoft Edge":Ki(O,"FBIOS")?"Facebook Mobile":Ki(O,"Chrome")?"Chrome":Ki(O,"CriOS")?"Chrome iOS":Ki(O,"UCWEB")||Ki(O,"UCBrowser")?"UC Browser":Ki(O,"FxiOS")?"Firefox iOS":Ki(F,"Apple")?Ki(O,"Mobile")?"Mobile Safari":"Safari":Ki(O,"Android")?"Android Mobile":Ki(O,"Konqueror")?"Konqueror":Ki(O,"Firefox")?"Firefox":Ki(O,"MSIE")||Ki(O,"Trident/")?"Internet Explorer":Ki(O,"Gecko")?"Mozilla":""},browserVersion:function(O,F,J){var fe={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[yo.browser(O,F,J)];if(fe===void 0)return null;var Pe=O.match(fe);return Pe?parseFloat(Pe[Pe.length-2]):null},browserLanguage:function(){return Gc.language||Gc.userLanguage},os:function(){var O=Nl;return/Windows/i.test(O)?/Phone/.test(O)||/WPDesktop/.test(O)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(O)?"iOS":/Android/.test(O)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(O)?"BlackBerry":/Mac/i.test(O)?"Mac OS X":/Linux/.test(O)?"Linux":/CrOS/.test(O)?"Chrome OS":""},device:function(O){return/Windows Phone/i.test(O)||/WPDesktop/.test(O)?"Windows Phone":/iPad/.test(O)?"iPad":/iPod/.test(O)?"iPod Touch":/iPhone/.test(O)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(O)?"BlackBerry":/Android/.test(O)&&!/Mobile/.test(O)?"Android Tablet":/Android/.test(O)?"Android":""},deviceType:function(O){var F=this.device(O);return F==="iPad"||F==="Android Tablet"?"Tablet":F?"Mobile":"Desktop"},referrer:function(){return Vo.referrer||"$direct"},referringDomain:function(){if(!Vo.referrer)return"$direct";var O=Vo.createElement("a");return O.href=Vo.referrer,O.host},properties:function(){return So(Cv({$os:yo.os(),$browser:yo.browser(Nl,Gc.vendor,gi.opera),$device:yo.device(Nl),$device_type:yo.deviceType(Nl)}),{$current_url:gi==null?void 0:gi.location.href,$host:gi==null?void 0:gi.location.host,$pathname:gi==null?void 0:gi.location.pathname,$browser_version:yo.browserVersion(Nl,Gc.vendor,gi.opera),$browser_language:yo.browserLanguage(),$screen_height:gi==null?void 0:gi.screen.height,$screen_width:gi==null?void 0:gi.screen.width,$viewport_height:gi==null?void 0:gi.innerHeight,$viewport_width:gi==null?void 0:gi.innerWidth,$lib:"web",$lib_version:fu.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:(Date.now=Date.now||function(){return+new Date},Date.now()/1e3)})},people_properties:function(){return So(Cv({$os:yo.os(),$browser:yo.browser(Nl,Gc.vendor,gi.opera)}),{$browser_version:yo.browserVersion(Nl,Gc.vendor,gi.opera)})}};function G0(O){switch(tf(O.className)){case"string":return O.className;case"object":return("baseVal"in O.className?O.className.baseVal:null)||O.getAttribute("class")||"";default:return""}}function W0(O){var F="";return p0(O)&&!$3(O)&&O.childNodes&&O.childNodes.length&&Yi(O.childNodes,function(J){X3(J)&&J.textContent&&(F+=Ev(J.textContent).split(/(\s+)/).filter(Wf).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),Ev(F)}function lb(O){return!!O&&O.nodeType===1}function nf(O,F){return!!O&&!!O.tagName&&O.tagName.toLowerCase()===F.toLowerCase()}function X3(O){return!!O&&O.nodeType===3}function ub(O){return!!O&&O.nodeType===11}var Ag=["a","button","form","input","select","textarea","label"];function p0(O){for(var F=O;F.parentNode&&!nf(F,"body");F=F.parentNode){var J=G0(F).split(" ");if(Ki(J,"ph-sensitive")||Ki(J,"ph-no-capture"))return!1}if(Ki(G0(O).split(" "),"ph-include"))return!0;var fe=O.type||"";if(typeof fe=="string")switch(fe.toLowerCase()){case"hidden":case"password":return!1}var Pe=O.name||O.id||"";return!(typeof Pe=="string"&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(Pe.replace(/[^a-zA-Z0-9]/g,"")))}function $3(O){return!!(nf(O,"input")&&!["button","checkbox","submit","reset"].includes(O.type)||nf(O,"select")||nf(O,"textarea")||O.getAttribute("contenteditable")==="true")}function Wf(O){return!(O===null||Ul(O)||typeof O=="string"&&(O=Ev(O),/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((O||"").replace(/[- ]/g,""))||/(^\d{3}-?\d{2}-?\d{4}$)/.test(O)))}function J3(O,F){var J=document.createElement("script");J.type="text/javascript",J.src=O,J.onload=F;var fe,Pe=document.querySelectorAll("body > script");Pe.length>0?(fe=Pe[0].parentNode)===null||fe===void 0||fe.insertBefore(J,Pe[0]):document.body.appendChild(J)}function cb(O){var F=W0(O);return Wf(F="".concat(F," ").concat(K3(O)).trim())?F:""}function K3(O){var F="";return O&&O.childNodes&&O.childNodes.length&&Yi(O.childNodes,function(J){var fe;if(J&&((fe=J.tagName)===null||fe===void 0?void 0:fe.toLowerCase())==="span")try{var Pe=W0(J);F="".concat(F," ").concat(Pe).trim(),J.childNodes&&J.childNodes.length&&(F="".concat(F," ").concat(K3(J)).trim())}catch(D){console.error(D)}}),F}var W8=function(){function O(F){Wo(this,O),this.clicks=[],this.enabled=F}return Zo(O,[{key:"isRageClick",value:function(F,J,fe){if(!this.enabled)return!1;var Pe=this.clicks[this.clicks.length-1];if(Pe&&Math.abs(F-Pe.x)+Math.abs(J-Pe.y)<30&&fe-Pe.timestamp<1e3){if(this.clicks.push({x:F,y:J,timestamp:fe}),this.clicks.length===3)return!0}else this.clicks=[{x:F,y:J,timestamp:fe}];return!1}}]),O}(),Z8=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,lu={is_supported:function(){return!0},error:function(O){Ja.error("cookieStore error: "+O)},get:function(O){try{for(var F=O+"=",J=document.cookie.split(";"),fe=0;fe-1&&!J&&(fe.toLowerCase()==="a"||fe.toLowerCase()==="button"?Pe.$el_text=cb(O):Pe.$el_text=W0(O));var D=G0(O);D.length>0&&(Pe.classes=D.split(" ").filter(function(w){return w!==""})),Yi(O.attributes,function(w){var s;$3(O)&&["name","id","class"].indexOf(w.name)===-1||!F&&Wf(w.value)&&(typeof(s=w.name)!="string"||s.substring(0,10)!=="_ngcontent"&&s.substring(0,7)!=="_nghost")&&(Pe["attr__"+w.name]=w.value)});for(var E=1,e=1,_=O;_=this._previousElementSibling(_);)E++,_.tagName===O.tagName&&e++;return Pe.nth_child=E,Pe.nth_of_type=e,Pe},_getDefaultProperties:function(O){return{$event_type:O,$ce_version:1}},_extractCustomPropertyValue:function(O){var F=[];return Yi(document.querySelectorAll(O.css_selector),function(J){var fe;["input","select"].indexOf(J.tagName.toLowerCase())>-1?fe=J.value:J.textContent&&(fe=J.textContent),Wf(fe)&&F.push(fe)}),F.join(", ")},_getCustomProperties:function(O){var F=this,J={};return Yi(this._customProperties,function(fe){Yi(fe.event_selectors,function(Pe){Yi(document.querySelectorAll(Pe),function(D){Ki(O,D)&&p0(D)&&(J[fe.name]=F._extractCustomPropertyValue(fe))})})}),J},_getEventTarget:function(O){return O.target===void 0?O.srcElement||null:(F=O.target)!==null&&F!==void 0&&F.shadowRoot?O.composedPath()[0]||null:O.target||null;var F},_captureEvent:function(O,F){var J,fe=this,Pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"$autocapture",D=this._getEventTarget(O);if(X3(D)&&(D=D.parentNode||null),Pe==="$autocapture"&&O.type==="click"&&O instanceof MouseEvent&&(J=this.rageclicks)!==null&&J!==void 0&&J.isRageClick(O.clientX,O.clientY,new Date().getTime())&&this._captureEvent(O,F,"$rageclick"),D&&function(f,l){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;if(!f||nf(f,"html")||!lb(f))return!1;if(t!=null&&t.url_allowlist){var a=window.location.href,r=t.url_allowlist;if(r&&!r.some(function(g){return a.match(g)}))return!1}if(t!=null&&t.dom_event_allowlist){var n=t.dom_event_allowlist;if(n&&!n.some(function(g){return l.type===g}))return!1}if(t!=null&&t.element_allowlist){var o=t.element_allowlist;if(o&&!o.some(function(g){return f.tagName.toLowerCase()===g}))return!1}if(t!=null&&t.css_selector_allowlist){var i=t.css_selector_allowlist;if(i&&!i.some(function(g){return f.matches(g)}))return!1}for(var u=!1,p=[f],c=!0,b=f;b.parentNode&&!nf(b,"body");)if(ub(b.parentNode))p.push(b.parentNode.host),b=b.parentNode.host;else{if(!(c=b.parentNode||!1))break;if(Ag.indexOf(c.tagName.toLowerCase())>-1)u=!0;else{var d=window.getComputedStyle(c);d&&d.getPropertyValue("cursor")==="pointer"&&(u=!0)}p.push(c),b=c}var v=window.getComputedStyle(f);if(v&&v.getPropertyValue("cursor")==="pointer"&&l.type==="click")return!0;var x=f.tagName.toLowerCase();switch(x){case"html":return!1;case"form":return l.type==="submit";case"input":case"select":case"textarea":return l.type==="change"||l.type==="click";default:return u?l.type==="click":l.type==="click"&&(Ag.indexOf(x)>-1||f.getAttribute("contenteditable")==="true")}}(D,O,this.config)){for(var E=[D],e=D;e.parentNode&&!nf(e,"body");)ub(e.parentNode)?(E.push(e.parentNode.host),e=e.parentNode.host):(E.push(e.parentNode),e=e.parentNode);var _,w=[],s={},T=!1;if(Yi(E,function(f){var l=p0(f);f.tagName.toLowerCase()==="a"&&(_=f.getAttribute("href"),_=l&&Wf(_)&&_),Ki(G0(f).split(" "),"ph-no-capture")&&(T=!0),w.push(fe._getPropertiesFromElement(f,F.get_config("mask_all_element_attributes"),F.get_config("mask_all_text")));var t=fe._getAugmentPropertiesFromElement(f);So(s,t)}),F.get_config("mask_all_text")||(D.tagName.toLowerCase()==="a"||D.tagName.toLowerCase()==="button"?w[0].$el_text=cb(D):w[0].$el_text=W0(D)),_&&(w[0].attr__href=_),T)return!1;var m=So(this._getDefaultProperties(O.type),{$elements:w},this._getCustomProperties(E),s);return F.capture(Pe,m),!0}},_navigate:function(O){window.location.href=O},_addDomEventHandlers:function(O){var F=this,J=function(fe){fe=fe||window.event,F._captureEvent(fe,O)};bp(document,"submit",J,!1,!0),bp(document,"change",J,!1,!0),bp(document,"click",J,!1,!0)},_customProperties:[],rageclicks:null,config:void 0,init:function(O){var F;typeof O.__autocapture!="boolean"&&(this.config=O.__autocapture),(F=this.config)!==null&&F!==void 0&&F.url_allowlist&&(this.config.url_allowlist=this.config.url_allowlist.map(function(J){return new RegExp(J)})),this.rageclicks=new W8(O.get_config("rageclick"))},afterDecideResponse:function(O,F){this._setIsAutocaptureEnabled(F);var J=F.get_config("token");this._initializedTokens.indexOf(J)>-1?Ja.log('autocapture already initialized for token "'+J+'"'):(F.persistence&&F.persistence.register(Bi({},fb,!!O.autocapture_opt_out)),this._initializedTokens.push(J),O&&O.config&&O.config.enable_collect_everything&&this._isAutocaptureEnabled?(O.custom_properties&&(this._customProperties=O.custom_properties),this._addDomEventHandlers(F)):F.__autocapture=!1)},enabledForProject:function(O,F,J){if(!O)return!0;F=Ul(F)?10:F,J=Ul(J)?10:J;for(var fe=0,Pe=0;Pe1&&arguments[1]!==void 0?arguments[1]:{};if(!this.getFlags())return console.warn('getFeatureFlag for key "'+F+`" failed. Feature flags didn't load in time.`),!1;var fe=this.getFlagVariants()[F];return!J.send_event&&"send_event"in J||this.flagCallReported[F]||(this.flagCallReported[F]=!0,this.instance.capture("$feature_flag_called",{$feature_flag:F,$feature_flag_response:fe})),fe}},{key:"getFeatureFlagPayload",value:function(F){return this.getFlagPayloads()[F]}},{key:"isFeatureEnabled",value:function(F){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.getFlags()?!!this.getFeatureFlag(F,J):(console.warn('isFeatureEnabled for key "'+F+`" failed. Feature flags didn't load in time.`),!1)}},{key:"addFeatureFlagsHandler",value:function(F){this.featureFlagEventHandlers.push(F)}},{key:"removeFeatureFlagsHandler",value:function(F){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(function(J){return J!==F})}},{key:"receivedFeatureFlags",value:function(F){this.instance.decideEndpointWasHit=!0;var J=this.getFlagVariants(),fe=this.getFlagPayloads();(function(Pe,D){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},_=Pe.featureFlags,w=Pe.featureFlagPayloads;if(_)if(Array.isArray(_)){var s,T={};if(_)for(var m=0;m<_.length;m++)T[_[m]]=!0;D&&D.register((Bi(s={},Yd,_),Bi(s,Yc,T),s))}else{var f,l=_,t=w;Pe.errorsWhileComputingFlags&&(l=yi(yi({},E),l),t=yi(yi({},e),t)),D&&D.register((Bi(f={},Yd,Object.keys(vb(l))),Bi(f,Yc,l||{}),Bi(f,Eg,t||{}),f))}else D&&(D.unregister(Yd),D.unregister(Yc),D.unregister(Eg))})(F,this.instance.persistence,J,fe),this._fireFeatureFlagsCallbacks()}},{key:"override",value:function(F){if(this._override_warning=!1,F===!1)this.instance.persistence.unregister(Xd);else if(Array.isArray(F)){for(var J={},fe=0;fe1&&arguments[1]!==void 0&&arguments[1],Pe=this.instance.get_property(Iv);if(Pe&&!fe)return F(Pe);this.instance._send_request("".concat(this.instance.get_config("api_host"),"/api/early_access_features/?token=").concat(this.instance.get_config("token")),{},{method:"GET"},function(D){var E=D.earlyAccessFeatures;return J.instance.persistence.register(Bi({},Iv,E)),F(E)})}},{key:"_prepareFeatureFlagsForCallbacks",value:function(){var F=this.getFlags(),J=this.getFlagVariants();return{flags:F.filter(function(fe){return J[fe]}),flagVariants:Object.keys(J).filter(function(fe){return J[fe]}).reduce(function(fe,Pe){return fe[Pe]=J[Pe],fe},{})}}},{key:"_fireFeatureFlagsCallbacks",value:function(){var F=this._prepareFeatureFlagsForCallbacks(),J=F.flags,fe=F.flagVariants;this.featureFlagEventHandlers.forEach(function(Pe){return Pe(J,fe)})}},{key:"setPersonPropertiesForFlags",value:function(F){var J=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],fe=this.instance.get_property(sp)||{};this.instance.register(Bi({},sp,yi(yi({},fe),F))),J&&this.instance.reloadFeatureFlags()}},{key:"resetPersonPropertiesForFlags",value:function(){this.instance.unregister(sp)}},{key:"setGroupPropertiesForFlags",value:function(F){var J=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],fe=this.instance.get_property(Wc)||{};Object.keys(fe).length!==0&&Object.keys(fe).forEach(function(Pe){fe[Pe]=yi(yi({},fe[Pe]),F[Pe]),delete F[Pe]}),this.instance.register(Bi({},Wc,yi(yi({},fe),F))),J&&this.instance.reloadFeatureFlags()}},{key:"resetGroupPropertiesForFlags",value:function(F){if(F){var J=this.instance.get_property(Wc)||{};this.instance.register(Bi({},Wc,yi(yi({},J),{},Bi({},F,{}))))}else this.instance.unregister(Wc)}}]),O}(),iT="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJibGFjayIvPgo8cGF0aCBkPSJNOCAwSDE2TDAgMTZWOEw4IDBaIiBmaWxsPSIjMkQyRDJEIi8+CjxwYXRoIGQ9Ik0xNiA4VjE2SDhMMTYgOFoiIGZpbGw9IiMyRDJEMkQiLz4KPC9zdmc+Cg==",mb=2,aT=4,oT=6,sT="rrweb/console@1",lT="/e/",uT=function(){function O(F){Wo(this,O),this.instance=F,this.captureStarted=!1,this.snapshots=[],this.emit=!1,this.endpoint=lT,this.stopRrweb=void 0,this.windowId=null,this.sessionId=null,this.receivedDecide=!1}return Zo(O,[{key:"startRecordingIfEnabled",value:function(){this.isRecordingEnabled()?this.startCaptureAndTrySendingQueuedSnapshots():this.stopRecording()}},{key:"started",value:function(){return this.captureStarted}},{key:"stopRecording",value:function(){this.captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this.captureStarted=!1)}},{key:"isRecordingEnabled",value:function(){var F=!!this.instance.get_property(Pv),J=!this.instance.get_config("disable_session_recording");return F&&J}},{key:"isConsoleLogCaptureEnabled",value:function(){var F=!!this.instance.get_property(hb),J=this.instance.get_config("enable_recording_console_log");return J??F}},{key:"getRecordingVersion",value:function(){var F,J=this.instance.get_property(pb);return((F=this.instance.get_config("session_recording"))===null||F===void 0?void 0:F.recorderVersion)||J||"v1"}},{key:"afterDecideResponse",value:function(F){var J,fe,Pe,D,E,e;this.receivedDecide=!0,this.instance.persistence&&this.instance.persistence.register((Bi(E={},Pv,!!F.sessionRecording),Bi(E,hb,(Pe=F.sessionRecording)===null||Pe===void 0?void 0:Pe.consoleLogRecordingEnabled),Bi(E,pb,(D=F.sessionRecording)===null||D===void 0?void 0:D.recorderVersion),E)),(J=F.sessionRecording)!==null&&J!==void 0&&J.endpoint&&(this.endpoint=(e=F.sessionRecording)===null||e===void 0?void 0:e.endpoint),(fe=F.sessionRecording)!==null&&fe!==void 0&&fe.recorderVersion&&(this.recorderVersion=F.sessionRecording.recorderVersion),this.startRecordingIfEnabled()}},{key:"startCaptureAndTrySendingQueuedSnapshots",value:function(){var F=this;this.receivedDecide&&(this.emit=!0,this.snapshots.forEach(function(J){return F._captureSnapshot(J)})),this._startCapture()}},{key:"_startCapture",value:function(){if(Object.assign!==void 0&&!this.captureStarted&&!this.instance.get_config("disable_session_recording")){this.captureStarted=!0;var F=this.getRecordingVersion()==="v2"?"recorder-v2.js":"recorder.js";this.instance.__loaded_recorder_version!==this.getRecordingVersion()?J3(this.instance.get_config("api_host")+"/static/".concat(F,"?v=").concat(fu.LIB_VERSION),this._onScriptLoaded.bind(this)):this._onScriptLoaded()}}},{key:"_updateWindowAndSessionIds",value:function(F){var J,fe=F.type===3&&((J=F.data)===null||J===void 0?void 0:J.source)===0,Pe=this.instance.sessionManager.checkAndGetSessionAndWindowId(fe,F.timestamp),D=Pe.windowId,E=Pe.sessionId;if(this.captureStarted&&(this.windowId!==D||this.sessionId!==E)&&[mb,aT].indexOf(F.type)===-1)try{var e;(e=this.rrwebRecord)===null||e===void 0||e.takeFullSnapshot()}catch(_){Ja.error("Error taking full snapshot.",_)}this.windowId=D,this.sessionId=E}},{key:"_onScriptLoaded",value:function(){var F=this,J={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskAllInputs:!0,maskInputOptions:{},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0};this.rrwebRecord=window.rrweb?window.rrweb.record:window.rrwebRecord;for(var fe=this.instance.get_config("session_recording"),Pe=0,D=Object.entries(fe||{});Pe10&&(fe.data.payload.payload=fe.data.payload.payload.slice(0,10),fe.data.payload.payload.push("...[truncated]"));for(var Pe=[],D=0;D2e3?Pe.push(fe.data.payload.payload[D].slice(0,2e3)+"...[truncated]"):Pe.push(fe.data.payload.payload[D]);return fe.data.payload.payload=Pe,fe}return fe}(function(fe){if(fe&&tf(fe)==="object"){var Pe=JSON.stringify(fe);if(Pe.length>5e6){var D,E=Ac(Pe.matchAll(/data:([\w\/\-\.]+);(\w+),([^)"]*)/gim));try{for(E.s();!(D=E.n()).done;){var e=D.value;Pe=e[1].toLocaleLowerCase().slice(0,6)==="image/"?Pe.replace(e[0],iT):Pe.replace(e[0],"")}}catch(_){E.e(_)}finally{E.f()}}return JSON.parse(Pe)}return fe}(F)),this._updateWindowAndSessionIds(F);var J={$snapshot_data:F,$session_id:this.sessionId,$window_id:this.windowId};this.instance._captureMetrics.incr("rrweb-record"),this.instance._captureMetrics.incr("rrweb-record-".concat(F.type)),this.emit?this._captureSnapshot(J):this.snapshots.push(J)}},{key:"_captureSnapshot",value:function(F){this.instance.capture("$snapshot",F,{transport:"XHR",method:"POST",endpoint:this.endpoint,_noTruncate:!0,_batchKey:"sessionRecording",_metrics:{rrweb_full_snapshot:F.$snapshot_data.type===mb}})}}]),O}(),ru={entryType:0,timeOrigin:1,name:2,startTime:3,redirectStart:4,redirectEnd:5,workerStart:6,fetchStart:7,domainLookupStart:8,domainLookupEnd:9,connectStart:10,secureConnectionStart:11,connectEnd:12,requestStart:13,responseStart:14,responseEnd:15,decodedBodySize:16,encodedBodySize:17,initiatorType:18,nextHopProtocol:19,renderBlockingStatus:20,responseStatus:21,transferSize:22,element:23,renderTime:24,loadTime:25,size:26,id:27,url:28,domComplete:29,domContentLoadedEvent:30,domInteractive:31,loadEventEnd:32,loadEventStart:33,redirectCount:34,navigationType:35,unloadEventEnd:36,unloadEventStart:37,duration:39,timestamp:40},cT=["first-input","navigation","paint","resource"],fT=["/s/","/e/"],hT=function(){function O(F){Wo(this,O),Bi(this,"_forceAllowLocalhost",!1),this.instance=F}return Zo(O,[{key:"startObservingIfEnabled",value:function(){this.isEnabled()?this.startObserving():this.stopObserving()}},{key:"startObserving",value:function(){var F=this;if(!this.observer)if(!B8.includes(location.hostname)||this._forceAllowLocalhost)try{this.observer=new PerformanceObserver(function(fe){fe.getEntries().forEach(function(Pe){F._capturePerformanceEvent(Pe)})});var J=PerformanceObserver.supportedEntryTypes.filter(function(fe){return cT.includes(fe)});J.forEach(function(fe){var Pe;(Pe=F.observer)===null||Pe===void 0||Pe.observe({type:fe,buffered:!0})})}catch(fe){console.error("PostHog failed to start performance observer",fe),this.stopObserving()}else Ja.log("PostHog Peformance observer not started because we are on localhost.")}},{key:"stopObserving",value:function(){this.observer&&(this.observer.disconnect(),this.observer=void 0)}},{key:"isObserving",value:function(){return!!this.observer}},{key:"isEnabled",value:function(){var F,J;return(F=(J=this.instance.get_config("capture_performance"))!==null&&J!==void 0?J:this.remoteEnabled)!==null&&F!==void 0&&F}},{key:"afterDecideResponse",value:function(F){this.remoteEnabled=F.capturePerformance||!1,this.isEnabled()&&this.startObserving()}},{key:"_capturePerformanceEvent",value:function(F){if(F.name.startsWith(this.instance.get_config("api_host"))){var J=F.name.replace(this.instance.get_config("api_host"),"");if(fT.find(function(T){return J.startsWith(T)}))return}var fe=F.toJSON(),Pe={},D=Math.floor(Date.now()-performance.now());for(var E in Pe[ru.timeOrigin]=D,Pe[ru.timestamp]=Math.floor(D+F.startTime),ru)fe[E]!==void 0&&(Pe[ru[E]]=fe[E]);if(this.capturePerformanceEvent(Pe),pT(F)){var e,_=Ac(F.serverTiming||[]);try{for(_.s();!(e=_.n()).done;){var w,s=e.value;this.capturePerformanceEvent((Bi(w={},ru.timeOrigin,D),Bi(w,ru.timestamp,Math.floor(D+F.startTime)),Bi(w,ru.name,s.name),Bi(w,ru.duration,s.duration),Bi(w,ru.entryType,"serverTiming"),w))}}catch(T){_.e(T)}finally{_.f()}}}},{key:"capturePerformanceEvent",value:function(F){var J,fe=F[ru.timestamp];(J=this.instance.sessionRecording)===null||J===void 0||J.onRRwebEmit({type:6,data:{plugin:"posthog/network@1",payload:F},timestamp:fe})}}]),O}(),pT=function(O){return O.entryType==="navigation"||O.entryType==="resource"},dT=function(){function O(F){Wo(this,O),this.instance=F,this.instance.decideEndpointWasHit=this.instance._hasBootstrappedFeatureFlags()}return Zo(O,[{key:"call",value:function(){var F=this,J=c1(JSON.stringify({token:this.instance.get_config("token"),distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups()}));this.instance._send_request("".concat(this.instance.get_config("api_host"),"/decide/?v=3"),{data:J,verbose:!0},{method:"POST"},function(fe){return F.parseDecideResponse(fe)})}},{key:"parseDecideResponse",value:function(F){var J,fe,Pe=this;if((F==null?void 0:F.status)!==0){if(this.instance.decideEndpointWasHit=!0,!document||!document.body)return console.log("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(function(){Pe.parseDecideResponse(F)},500);if(this.instance.toolbar.afterDecideResponse(F),(J=this.instance.sessionRecording)===null||J===void 0||J.afterDecideResponse(F),nc.afterDecideResponse(F,this.instance),(fe=this.instance.webPerformance)===null||fe===void 0||fe.afterDecideResponse(F),this.instance.featureFlags.receivedFeatureFlags(F),this.instance.compression={},F.supportedCompression&&!this.instance.get_config("disable_compression")){var D,E={},e=Ac(F.supportedCompression);try{for(e.s();!(D=e.n()).done;)E[D.value]=!0}catch(m){e.e(m)}finally{e.f()}this.instance.compression=E}if(F.siteApps)if(this.instance.get_config("opt_in_site_apps")){var _,w=this.instance.get_config("api_host"),s=Ac(F.siteApps);try{var T=function(){var m=_.value,f=m.id,l=m.url,t=document.createElement("script");t.src=[w,w[w.length-1]==="/"&&l[0]==="/"?l.substring(1):l].join(""),t.onerror=function(a){console.error("Error while initializing PostHog app with config id ".concat(f),a)},window["__$$ph_site_app_".concat(f)]=Pe.instance,document.body.appendChild(t)};for(s.s();!(_=s.n()).done;)T()}catch(m){s.e(m)}finally{s.f()}}else F.siteApps.length>0&&console.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}else console.error("Failed to fetch feature flags from PostHog.")}}]),O}(),gT=["https://app.posthog.com","https://eu.posthog.com"],vT=["source"],mT=function(){function O(F){Wo(this,O),this.instance=F}return Zo(O,[{key:"afterDecideResponse",value:function(F){var J=F.toolbarParams||F.editorParams||(F.toolbarVersion?{toolbarVersion:F.toolbarVersion}:{});F.isAuthenticated&&J.toolbarVersion&&J.toolbarVersion.indexOf("toolbar")===0&&this.loadToolbar(yi(yi({},J),{},{apiURL:this.instance.get_config("api_host")}))}},{key:"maybeLoadToolbar",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.location,J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:window.history;try{if(!J){try{window.localStorage.setItem("test","test"),window.localStorage.removeItem("test")}catch{return!1}J=window.localStorage}var Pe,D=sb(F.hash,"__posthog")||sb(F.hash,"state"),E=D?JSON.parse(decodeURIComponent(D)):null;return E&&E.action==="ph_authorize"?((Pe=E).source="url",Pe&&Object.keys(Pe).length>0&&(E.desiredHash?F.hash=E.desiredHash:fe?fe.replaceState("",document.title,F.pathname+F.search):F.hash="")):((Pe=JSON.parse(J.getItem("_postHogToolbarParams")||"{}")).source="localstorage",delete Pe.userIntent),Pe.apiURL||(Pe.apiURL=this.instance.get_config("api_host")),!(!Pe.token||this.instance.get_config("token")!==Pe.token)&&(this.loadToolbar(Pe),!0)}catch{return!1}}},{key:"loadToolbar",value:function(F){var J=this;if(window._postHogToolbarLoaded)return!1;window._postHogToolbarLoaded=!0;var fe=(F==null?void 0:F.apiURL)||this.instance.get_config("api_host"),Pe=3e4*Math.floor(Date.now()/3e4),D="".concat(fe).concat(fe.endsWith("/")?"":"/","static/toolbar.js?_ts=").concat(Pe),E=!gT.includes(this.instance.get_config("api_host"))&&this.instance.get_config("advanced_disable_toolbar_metrics"),e=yi(yi({apiURL:fe,jsURL:fe,token:this.instance.get_config("token")},F),E?{instrument:!1}:{});e.source;var _=z8(e,vT);return window.localStorage.setItem("_postHogToolbarParams",JSON.stringify(_)),J3(D,function(){(window.ph_load_toolbar||window.ph_load_editor)(e,J.instance)}),bp(window,"turbolinks:load",function(){window._postHogToolbarLoaded=!1,J.loadToolbar(e)}),!0}},{key:"_loadEditor",value:function(F){return this.loadToolbar(F)}},{key:"maybeLoadEditor",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.location,J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:window.history;return this.maybeLoadToolbar(F,J,fe)}}]),O}(),iw=function(){function O(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:3e3;Wo(this,O),this.isPolling=!0,this._event_queue=[],this._empty_queue_count=0,this._poller=void 0,this._pollInterval=F}return Zo(O,[{key:"setPollInterval",value:function(F){this._pollInterval=F,this.isPolling&&this.poll()}},{key:"poll",value:function(){}},{key:"unload",value:function(){}},{key:"getTime",value:function(){return new Date().getTime()}}]),O}(),yT=function(O){U3(J,iw);var F=V3(J);function J(fe,Pe){var D,E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:3e3;return Wo(this,J),(D=F.call(this,E)).handlePollRequest=Pe,D.captureMetrics=fe,D}return Zo(J,[{key:"enqueue",value:function(fe,Pe,D){this.captureMetrics.incr("batch-enqueue"),this._event_queue.push({url:fe,data:Pe,options:D}),this.isPolling||(this.isPolling=!0,this.poll())}},{key:"poll",value:function(){var fe=this;clearTimeout(this._poller),this._poller=setTimeout(function(){if(fe._event_queue.length>0){var Pe=fe.formatQueue(),D=function(e){var _=Pe[e],w=_.url,s=_.data,T=_.options;Yi(s,function(m,f){s[f].offset=Math.abs(s[f].timestamp-fe.getTime()),delete s[f].timestamp}),fe.handlePollRequest(w,s,T),fe.captureMetrics.incr("batch-requests"),fe.captureMetrics.incr("batch-requests-".concat(w.slice(w.length-2))),fe.captureMetrics.incr("batch-handle",s.length),fe.captureMetrics.incr("batch-handle-".concat(w.slice(w.length-2)),s.length)};for(var E in Pe)D(E);fe._event_queue.length=0,fe._empty_queue_count=0}else fe._empty_queue_count++;fe._empty_queue_count>4&&(fe.isPolling=!1,fe._empty_queue_count=0),fe.isPolling&&fe.poll()},this._pollInterval)}},{key:"updateUnloadMetrics",value:function(){var fe=this.formatQueue();for(var Pe in fe){var D=fe[Pe],E=D.url,e=D.data;this.captureMetrics.incr("batch-unload-requests"),this.captureMetrics.incr("batch-unload-requests-".concat(E.slice(E.length-2))),this.captureMetrics.incr("batch-unload",e.length),this.captureMetrics.incr("batch-unload-".concat(E.slice(E.length-2)),e.length)}}},{key:"unload",value:function(){var fe=this;clearTimeout(this._poller);var Pe=this._event_queue.length>0?this.formatQueue():{};this._event_queue.length=0;var D=Object.values(Pe);[].concat(Mv(D.filter(function(E){return E.url.indexOf("/e")===0})),Mv(D.filter(function(E){return E.url.indexOf("/e")!==0}))).map(function(E){var e=E.url,_=E.data,w=E.options;fe.handlePollRequest(e,_,yi(yi({},w),{},{transport:"sendBeacon"}))})}},{key:"formatQueue",value:function(){var fe={};return Yi(this._event_queue,function(Pe){var D=Pe.url,E=Pe.data,e=Pe.options,_=(e?e._batchKey:null)||D;fe[_]===void 0&&(fe[_]={data:[],url:D,options:e}),e&&fe[_].options&&fe[_].options._metrics&&!fe[_].options._metrics.rrweb_full_snapshot&&(fe[_].options._metrics.rrweb_full_snapshot=e._metrics.rrweb_full_snapshot),fe[_].data.push(E)}),fe}}]),J}(),xT=function(){function O(F){Wo(this,O),this.enabled=F,this.metrics={}}return Zo(O,[{key:"incr",value:function(F){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.enabled&&(F="phjs-".concat(F),this.metrics[F]=(this.metrics[F]||0)+J)}},{key:"decr",value:function(F){this.enabled&&(F="phjs-".concat(F),this.metrics[F]=(this.metrics[F]||0)-1)}}]),O}(),Zs=Uint8Array,ls=Uint16Array,sh=Uint32Array,Zm=new Zs([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ym=new Zs([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),yb=new Zs([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),aw=function(O,F){for(var J=new ls(31),fe=0;fe<31;++fe)J[fe]=F+=1<>>1|(21845&ua)<<1;Hc=(61680&(Hc=(52428&Hc)>>>2|(13107&Hc)<<2))>>>4|(3855&Hc)<<4,Dv[ua]=((65280&Hc)>>>8|(255&Hc)<<8)>>>1}var _p=function(O,F,J){for(var fe=O.length,Pe=0,D=new ls(F);Pe>>_]=w}else for(E=new ls(fe),Pe=0;Pe>>15-O[Pe];return E},lf=new Zs(288);for(ua=0;ua<144;++ua)lf[ua]=8;for(ua=144;ua<256;++ua)lf[ua]=9;for(ua=256;ua<280;++ua)lf[ua]=7;for(ua=280;ua<288;++ua)lf[ua]=8;var Z0=new Zs(32);for(ua=0;ua<32;++ua)Z0[ua]=5;var Fl,_T=_p(lf,9,0),wT=_p(Z0,5,0),sw=function(O){return(O/8>>0)+(7&O&&1)},lw=function(O,F,J){(F==null||F<0)&&(F=0),(J==null||J>O.length)&&(J=O.length);var fe=new(O instanceof ls?ls:O instanceof sh?sh:Zs)(J-F);return fe.set(O.subarray(F,J)),fe},Lu=function(O,F,J){J<<=7&F;var fe=F/8>>0;O[fe]|=J,O[fe+1]|=J>>>8},Qh=function(O,F,J){J<<=7&F;var fe=F/8>>0;O[fe]|=J,O[fe+1]|=J>>>8,O[fe+2]|=J>>>16},Cg=function(O,F){for(var J=[],fe=0;fem&&(m=D[fe].s);var f=new ls(m+1),l=TT(J[s-1],f,0);if(l>F){fe=0;var t=0,a=l-F,r=1<F))break;t+=r-(1<>>=a;t>0;){var o=D[fe].s;f[o]=0&&t;--fe){var i=D[fe].s;f[i]==F&&(--f[i],++t)}l=F}return[new Zs(f),l]},TT=function O(F,J,fe){return F.s==-1?Math.max(O(F.l,J,fe+1),O(F.r,J,fe+1)):J[F.s]=fe},bb=function(O){for(var F=O.length;F&&!O[--F];);for(var J=new ls(++F),fe=0,Pe=O[0],D=1,E=function(_){J[fe++]=_},e=1;e<=F;++e)if(O[e]==Pe&&e!=F)++D;else{if(!Pe&&D>2){for(;D>138;D-=138)E(32754);D>2&&(E(D>10?D-11<<5|28690:D-3<<5|12305),D=0)}else if(D>3){for(E(Pe),--D;D>6;D-=6)E(8304);D>2&&(E(D-3<<5|8208),D=0)}for(;D--;)E(Pe);D=1,Pe=O[e]}return[J.subarray(0,fe),F]},ep=function(O,F){for(var J=0,fe=0;fe>>8,O[Pe+2]=255^O[Pe],O[Pe+3]=255^O[Pe+1];for(var D=0;D4&&!v[yb[g-1]];--g);var y,k,h,M,A=w+5<<3,C=ep(Pe,lf)+ep(D,Z0)+E,L=ep(Pe,m)+ep(D,t)+E+14+3*g+ep(c,v)+(2*c[16]+3*c[17]+7*c[18]);if(A<=C&&A<=L)return g0(F,s,O.subarray(_,_+w));if(Lu(F,s,1+(L15&&(Lu(F,s,U[b]>>>5&127),s+=U[b]>>>12)}}}else y=_T,k=lf,h=wT,M=Z0;for(b=0;b255){B=fe[b]>>>18&31,Qh(F,s,y[B+257]),s+=k[B+257],B>7&&(Lu(F,s,fe[b]>>>23&31),s+=Zm[B]);var G=31&fe[b];Qh(F,s,h[G]),s+=M[G],G>3&&(Qh(F,s,fe[b]>>>5&8191),s+=Ym[G])}else Qh(F,s,y[fe[b]]),s+=k[fe[b]];return Qh(F,s,y[256]),s+k[256]},kT=new sh([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),AT=new Zs(0),MT=function(){for(var O=new sh(256),F=0;F<256;++F){for(var J=F,fe=9;--fe;)J=(1&J&&3988292384)^J>>>1;O[F]=J}return O}(),ST=function(){var O=4294967295;return{p:function(F){for(var J=O,fe=0;fe>>8;O=J},d:function(){return 4294967295^O}}},ET=function(O,F,J,fe,Pe){return function(D,E,e,_,w,s){var T=D.length,m=new Zs(_+T+5*(1+Math.floor(T/7e3))+w),f=m.subarray(_,m.length-w),l=0;if(!E||T<8)for(var t=0;t<=T;t+=65535){var a=t+65535;a>>13,o=8191&r,i=(1<7e3||h>24576)&&I>423){l=_b(D,f,0,v,x,g,k,h,A,t-A,l),h=y=k=0,A=t;for(var R=0;R<286;++R)x[R]=0;for(R=0;R<30;++R)g[R]=0}var U=2,B=0,G=o,N=L-P&32767;if(I>2&&C==d(t-N))for(var j=Math.min(n,I)-1,V=Math.min(32767,t),H=Math.min(258,I);N<=V&&--G&&L!=P;){if(D[t+U]==D[t+U-N]){for(var ee=0;eeU){if(U=ee,B=N,ee>j)break;var Q=Math.min(N,ee-2),X=0;for(R=0;RX&&(X=K,P=Y)}}}N+=(L=P)-(P=u[L])+32768&32767}if(B){v[h++]=268435456|zv[U]<<18|xb[B];var te=31&zv[U],re=31&xb[B];k+=Zm[te]+Ym[re],++x[257+te],++g[re],M=t+U,++y}else v[h++]=D[t],++x[D[t]]}}l=_b(D,f,s,v,x,g,k,h,A,t-A,l),s||(l=g0(f,l,AT))}return lw(m,0,_+sw(l)+w)}(O,F.level==null?6:F.level,F.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(O.length)))):12+F.mem,J,fe,!Pe)},Fv=function(O,F,J){for(;J;++F)O[F]=J,J>>>=8},CT=function(O,F){var J=F.filename;if(O[0]=31,O[1]=139,O[2]=8,O[8]=F.level<2?4:F.level==9?2:0,O[9]=3,F.mtime!=0&&Fv(O,4,Math.floor(new Date(F.mtime||Date.now())/1e3)),J){O[3]=8;for(var fe=0;fe<=J.length;++fe)O[fe+10]=J.charCodeAt(fe)}},LT=function(O){return 10+(O.filename&&O.filename.length+1||0)};function PT(O,F){F===void 0&&(F={});var J=ST(),fe=O.length;J.p(O);var Pe=ET(O,F,LT(F),8),D=Pe.length;return CT(Pe,F),Fv(Pe,D-8,J.d()),Fv(Pe,D-4,fe),Pe}function OT(O,F){var J=O.length;if(!F&&typeof TextEncoder<"u")return new TextEncoder().encode(O);for(var fe=new Zs(O.length+(O.length>>>1)),Pe=0,D=function(w){fe[Pe++]=w},E=0;Efe.length){var e=new Zs(Pe+8+(J-E<<1));e.set(fe),fe=e}var _=O.charCodeAt(E);_<128||F?D(_):_<2048?(D(192|_>>>6),D(128|63&_)):_>55295&&_<57344?(D(240|(_=65536+(1047552&_)|1023&O.charCodeAt(++E))>>>18),D(128|_>>>12&63),D(128|_>>>6&63),D(128|63&_)):(D(224|_>>>12),D(128|_>>>6&63),D(128|63&_))}return lw(fe,0,Pe)}(function(O){O.GZipJS="gzip-js",O.LZ64="lz64",O.Base64="base64"})(Fl||(Fl={}));var Dp,Xm,Eo,IT=function(O,F,J){var fe=F||{};fe.ip=J.ip?1:0,fe._=new Date().getTime().toString(),fe.ver=fu.LIB_VERSION;var Pe=O.split("?");if(Pe.length>1){var D,E=Ac(Pe[1].split("&"));try{for(E.s();!(D=E.n()).done;){var e=D.value.split("=")[0];fe[e]&&delete fe[e]}}catch(w){E.e(w)}finally{E.f()}}var _=O.indexOf("?")>-1?"&":"?";return O+_+function(w){var s,T,m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"&",f=[];return Yi(w,function(l,t){s=encodeURIComponent(l.toString()),T=encodeURIComponent(t),f[f.length]=T+"="+s}),f.join(m)}(fe)},$m=function O(F,J){if(J.blob&&F.buffer)return new Blob([F.buffer],{type:"text/plain"});if(J.sendBeacon||J.blob){var fe=O(F,{method:"POST"});return new Blob([fe],{type:"application/x-www-form-urlencoded"})}if(J.method!=="POST")return null;var Pe,D;return Pe=Array.isArray(F)||(D=F,Object.prototype.toString.call(D)==="[object Uint8Array]")?"data="+encodeURIComponent(F):"data="+encodeURIComponent(F.data),"compression"in F&&F.compression&&(Pe+="&compression="+F.compression),Pe},uw=function(O){var F=O.url,J=O.data,fe=O.headers,Pe=O.options,D=O.captureMetrics,E=O.callback,e=O.retriesPerformedSoFar,_=O.retryQueue,w=O.onXHRError,s=O.timeout,T=s===void 0?1e4:s,m=new XMLHttpRequest;m.open(Pe.method||"GET",F,!0);var f=$m(J,Pe);D.incr("_send_request"),D.incr("_send_request_inflight"),Yi(fe,function(l,t){m.setRequestHeader(t,l)}),Pe.method!=="POST"||Pe.blob||m.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),m.timeout=T,m.withCredentials=!0,m.onreadystatechange=function(){if(m.readyState===4)if(D.incr("xhr-response"),D.incr("xhr-response-".concat(m.status)),D.decr("_send_request_inflight"),m.status===200){if(E){var l;try{l=JSON.parse(m.responseText)}catch(t){return void Ja.error(t)}E(l)}}else typeof w=="function"&&w(m),[401,403,404,500].indexOf(m.status)<0&&_.enqueue({url:F,data:J,options:Pe,headers:fe,retriesPerformedSoFar:(e||0)+1,callback:E}),E&&E({status:0})},m.send(f)},RT=function(O){U3(J,iw);var F=V3(J);function J(fe,Pe){var D;return Wo(this,J),(D=F.call(this)).captureMetrics=fe,D.isPolling=!1,D.queue=[],D.areWeOnline=!0,D.onXHRError=Pe,typeof window<"u"&&"onLine"in window.navigator&&(D.areWeOnline=window.navigator.onLine,window.addEventListener("online",function(){D._handleWeAreNowOnline()}),window.addEventListener("offline",function(){D.areWeOnline=!1})),D}return Zo(J,[{key:"enqueue",value:function(fe){var Pe=fe.retriesPerformedSoFar||0;if(!(Pe>=10)){var D=3e3*Math.pow(2,Pe),E=new Date(Date.now()+D);console.warn("Enqueued failed request for retry in ".concat(D)),this.queue.push({retryAt:E,requestData:fe}),this.isPolling||(this.isPolling=!0,this.poll())}}},{key:"poll",value:function(){var fe=this;this._poller&&clearTimeout(this._poller),this._poller=setTimeout(function(){fe.areWeOnline&&fe.queue.length>0&&fe.flush(),fe.poll()},this._pollInterval)}},{key:"flush",value:function(){var fe=new Date(Date.now()),Pe=this.queue.filter(function(_){return _.retryAt0){this.queue=this.queue.filter(function(_){return _.retryAt>=fe});var D,E=Ac(Pe);try{for(E.s();!(D=E.n()).done;){var e=D.value.requestData;this._executeXhrRequest(e)}}catch(_){E.e(_)}finally{E.f()}}}},{key:"unload",value:function(){this._poller&&(clearTimeout(this._poller),this._poller=void 0);var fe,Pe=Ac(this.queue);try{for(Pe.s();!(fe=Pe.n()).done;){var D=fe.value.requestData,E=D.url,e=D.data,_=D.options;try{window.navigator.sendBeacon(E,$m(e,yi(yi({},_),{},{sendBeacon:!0})))}catch(w){fu.DEBUG&&console.error(w)}}}catch(w){Pe.e(w)}finally{Pe.f()}this.queue=[]}},{key:"_executeXhrRequest",value:function(fe){var Pe=fe.url,D=fe.data,E=fe.options,e=fe.headers,_=fe.callback,w=fe.retriesPerformedSoFar;uw({url:Pe,data:D||{},options:E||{},headers:e||{},retriesPerformedSoFar:w||0,callback:_,captureMetrics:this.captureMetrics,retryQueue:this,onXHRError:this.onXHRError})}},{key:"_handleWeAreNowOnline",value:function(){this.areWeOnline=!0,this.flush()}}]),J}(),zT=18e5,DT=864e5,FT=function(){function O(F,J){Wo(this,O),this.config=F,this.persistence=J,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null;var fe=F.persistence_name||F.token;if(this.window_id_storage_key="ph_"+fe+"_window_id",this.primary_window_exists_storage_key="ph_"+fe+"_primary_window_exists",this._canUseSessionStorage()){var Pe=Lo.parse(this.window_id_storage_key),D=Lo.parse(this.primary_window_exists_storage_key);Pe&&!D?this._windowId=Pe:Lo.remove(this.window_id_storage_key),Lo.set(this.primary_window_exists_storage_key,!0)}this._listenToReloadWindow()}return Zo(O,[{key:"_canUseSessionStorage",value:function(){return this.config.persistence!=="memory"&&!this.persistence.disabled&&Lo.is_supported()}},{key:"_setWindowId",value:function(F){F!==this._windowId&&(this._windowId=F,this._canUseSessionStorage()&&Lo.set(this.window_id_storage_key,F))}},{key:"_getWindowId",value:function(){return this._windowId?this._windowId:this._canUseSessionStorage()?Lo.parse(this.window_id_storage_key):null}},{key:"_setSessionId",value:function(F,J,fe){F===this._sessionId&&J===this._sessionActivityTimestamp&&fe===this._sessionStartTimestamp||(this._sessionStartTimestamp=fe,this._sessionActivityTimestamp=J,this._sessionId=F,this.persistence.register(Bi({},Ov,[J,F,fe])))}},{key:"_getSessionId",value:function(){if(this._sessionId&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this._sessionId,this._sessionStartTimestamp];var F=this.persistence.props[Ov];return Array.isArray(F)&&F.length===2&&F.push(F[0]),F||[0,null,0]}},{key:"resetSessionId",value:function(){this._setSessionId(null,null,null)}},{key:"_listenToReloadWindow",value:function(){var F=this;window.addEventListener("beforeunload",function(){F._canUseSessionStorage()&&Lo.remove(F.primary_window_exists_storage_key)})}},{key:"checkAndGetSessionAndWindowId",value:function(){var F=arguments.length>0&&arguments[0]!==void 0&&arguments[0],J=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:null)||new Date().getTime(),fe=l1(this._getSessionId(),3),Pe=fe[0],D=fe[1],E=fe[2],e=this._getWindowId(),_=E&&E>0&&Math.abs(J-E)>DT;!D||!F&&Math.abs(J-Pe)>zT||_?(D=xc(),e=xc(),E=J):e||(e=xc());var w=Pe===0||!F||_?J:Pe,s=E===0?new Date().getTime():E;return this._setWindowId(e),this._setSessionId(D,w,s),{sessionId:D,windowId:e}}}]),O}(),BT=Zo(function O(F,J,fe,Pe){Wo(this,O),this.name="posthog-js",this.setupOnce=function(D){D(function(E){var e,_,w;if(E.level!=="error"||!F.__loaded)return E;E.tags||(E.tags={});var s=F.config.ui_host||F.config.api_host;E.tags["PostHog Person URL"]=s+"/person/"+F.get_distinct_id(),F.sessionRecordingStarted()&&(E.tags["PostHog Recording URL"]=s+"/recordings/"+F.sessionManager.checkAndGetSessionAndWindowId(!0).sessionId);var T=((e=E.exception)===null||e===void 0?void 0:e.values)||[],m={$sentry_event_id:E.event_id,$sentry_exception:E.exception,$sentry_exception_message:(_=T[0])===null||_===void 0?void 0:_.value,$sentry_exception_type:(w=T[0])===null||w===void 0?void 0:w.type,$sentry_tags:E.tags};return J&&fe&&(m.$sentry_url=(Pe||"https://sentry.io/organizations/")+J+"/issues/?project="+fe+"&query="+E.event_id),F.capture("$exception",m),E})}}),NT=function(O){var F=function(J,fe){J.event.userId||J.event.anonymousId===O.get_distinct_id()||O.reset(),J.event.userId&&J.event.userId!==O.get_distinct_id()&&(O.register({distinct_id:J.event.userId}),O.reloadFeatureFlags());var Pe=O._calculate_event_properties(fe,J.event.properties);return J.event.properties=Object.assign({},Pe,J.event.properties),J};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(J){return F(J,J.event.event)},page:function(J){return F(J,"$pageview")},identify:function(J){return F(J,"$identify")},screen:function(J){return F(J,"$screen")}}},jT=function(){function O(){Wo(this,O),Bi(this,"_seenFirstPageView",!1)}return Zo(O,[{key:"onPageview",value:function(){this._seenFirstPageView&&(this._pageViewId=xc()),this._seenFirstPageView=!0}},{key:"getPageViewId",value:function(){return this._pageViewId||(this._pageViewId=xc()),this._pageViewId}}]),O}();(function(O){O[O.INIT_MODULE=0]="INIT_MODULE",O[O.INIT_SNIPPET=1]="INIT_SNIPPET"})(Dp||(Dp={}));var Bv=function(){},$d={},Ss="posthog",v0=gi.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,cw=!v0&&Nl.indexOf("MSIE")===-1&&Nl.indexOf("Mozilla")===-1,wb=function(){var O,F,J;return{api_host:"https://app.posthog.com",api_method:"POST",api_transport:"XHR",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:(Vo==null||(O=Vo.location)===null||O===void 0||(F=O.hostname)===null||F===void 0?void 0:F.indexOf("herokuapp.com"))===-1,persistence:"cookie",persistence_name:"",cookie_name:"",loaded:Bv,store_google:!0,custom_campaign_params:[],save_referrer:!0,test:!1,verbose:!1,img:!1,capture_pageview:!0,capture_pageleave:!0,debug:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_cookie:!1,enable_recording_console_log:void 0,secure_cookie:(gi==null||(J=gi.location)===null||J===void 0?void 0:J.protocol)==="https:",ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_blacklist:[],respect_dnt:!1,sanitize_properties:null,xhr_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{blockClass:"ph-no-capture",blockSelector:null,ignoreClass:"ph-ignore-input",maskAllInputs:!0,maskInputOptions:{},maskInputFn:null,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,advanced_disable_toolbar_metrics:!1,on_xhr_error:function(fe){var Pe="Bad HTTP status: "+fe.status+" "+fe.statusText;console.error(Pe)},get_device_id:function(fe){return fe},_onCapture:Bv,_capture_metrics:!1,capture_performance:void 0,name:"posthog",callback_fn:"posthog._jsc",bootstrap:{},disable_compression:!1}},Nv=function(O,F,J,fe){var Pe,D=J!==Ss&&Eo?J?Eo[J]:void 0:Eo,E={initComplete:!1,syncCode:!1},e=function(_){return function(w){E[_]||(E[_]=!0,E.initComplete&&E.syncCode&&(fe==null||fe(w)))}};if(D&&Xm===Dp.INIT_MODULE)Pe=D;else{if(D&&!Ru(D))return void console.error("You have already initialized "+J);Pe=new Jm}return Pe._init(O,F,J,e("initComplete")),Pe.toolbar.maybeLoadToolbar(),Pe.sessionRecording=new uT(Pe),Pe.sessionRecording.startRecordingIfEnabled(),Pe.webPerformance=new hT(Pe),Pe.webPerformance.startObservingIfEnabled(),Pe.__autocapture=Pe.get_config("autocapture"),nc._setIsAutocaptureEnabled(Pe),nc._isAutocaptureEnabled&&(Pe.__autocapture=Pe.get_config("autocapture"),nc.enabledForProject(Pe.get_config("token"),100,100)?nc.isBrowserSupported()?nc.init(Pe):(Pe.__autocapture=!1,Ja.log("Disabling Automatic Event Collection because this browser is not supported")):(Pe.__autocapture=!1,Ja.log("Not in active bucket: disabling Automatic Event Collection."))),fu.DEBUG=fu.DEBUG||Pe.get_config("debug"),D!==void 0&&Ru(D)&&(Pe._execute_array.call(Pe.people,D.people),Pe._execute_array(D)),e("syncCode")(Pe),Pe},Jm=function(){function O(){var F=this;Wo(this,O),this.config=wb(),this.compression={},this.decideEndpointWasHit=!1,this.SentryIntegration=BT,this.segmentIntegration=function(){return NT(F)},this.__captureHooks=[],this.__request_queue=[],this.__loaded=!1,this.__loaded_recorder_version=void 0,this.__autocapture=void 0,this._jsc=function(){},this.people=new nT(this),this.featureFlags=new rT(this),this.feature_flags=this.featureFlags,this.toolbar=new mT(this),this.pageViewIdManager=new jT,this._captureMetrics=void 0,this._requestQueue=void 0,this._retryQueue=void 0,this.persistence=void 0,this.sessionPersistence=void 0,this.sessionManager=void 0}return Zo(O,[{key:"init",value:function(F,J,fe){if(Ul(fe))console.error("You must name your new library: init(token, config, name)");else{if(fe!==Ss){var Pe=Nv(F,J,fe,function(D){Eo[fe]=D,D._loaded()});return Eo[fe]=Pe,Pe}console.error("You must initialize the main posthog object right after you include the PostHog js snippet")}}},{key:"_init",value:function(F){var J,fe,Pe=this,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=arguments.length>2?arguments[2]:void 0,e=arguments.length>3?arguments[3]:void 0;this.__loaded=!0,this.config={},this._triggered_notifs=[];var _,w={segmentRegister:!1,syncCode:!1},s=function(i){return function(){w[i]||(w[i]=!0,w.segmentRegister&&w.syncCode&&(e==null||e(Pe)))}};if(this.set_config(So({},wb(),D,{name:E,token:F,callback_fn:(E===Ss?E:Ss+"."+E)+"._jsc"})),this._jsc=function(){},(gi!=null&&(J=gi.rrweb)!==null&&J!==void 0&&J.record||gi!=null&&gi.rrwebRecord)&&(this.__loaded_recorder_version=gi==null||(_=gi.rrweb)===null||_===void 0?void 0:_.version),this._captureMetrics=new xT(this.get_config("_capture_metrics")),this._requestQueue=new yT(this._captureMetrics,this._handle_queued_event.bind(this)),this._retryQueue=new RT(this._captureMetrics,this.get_config("on_xhr_error")),this.__captureHooks=[],this.__request_queue=[],this.persistence=new db(this.config),this.sessionManager=new FT(this.config,this.persistence),this.sessionPersistence=this.config.persistence==="sessionStorage"?this.persistence:new db(yi(yi({},this.config),{},{persistence:"sessionStorage"})),this._gdpr_init(),D.segment?(this.config.get_device_id=function(){return D.segment.user().anonymousId()},D.segment.user().id()&&(this.register({distinct_id:D.segment.user().id()}),this.persistence.set_user_state("identified")),D.segment.register(this.segmentIntegration()).then(s("segmentRegister"))):s("segmentRegister")(),((fe=D.bootstrap)===null||fe===void 0?void 0:fe.distinctID)!==void 0){var T,m,f=this.get_config("get_device_id")(xc()),l=(T=D.bootstrap)!==null&&T!==void 0&&T.isIdentifiedID?f:D.bootstrap.distinctID;this.persistence.set_user_state((m=D.bootstrap)!==null&&m!==void 0&&m.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:D.bootstrap.distinctID,$device_id:l})}if(this._hasBootstrappedFeatureFlags()){var t,a,r=Object.keys(((t=D.bootstrap)===null||t===void 0?void 0:t.featureFlags)||{}).filter(function(i){var u,p;return!((u=D.bootstrap)===null||u===void 0||(p=u.featureFlags)===null||p===void 0||!p[i])}).reduce(function(i,u){var p,c;return i[u]=((p=D.bootstrap)===null||p===void 0||(c=p.featureFlags)===null||c===void 0?void 0:c[u])||!1,i},{}),n=Object.keys(((a=D.bootstrap)===null||a===void 0?void 0:a.featureFlagPayloads)||{}).filter(function(i){return r[i]}).reduce(function(i,u){var p,c,b,d;return(p=D.bootstrap)!==null&&p!==void 0&&(c=p.featureFlagPayloads)!==null&&c!==void 0&&c[u]&&(i[u]=(b=D.bootstrap)===null||b===void 0||(d=b.featureFlagPayloads)===null||d===void 0?void 0:d[u]),i},{});this.featureFlags.receivedFeatureFlags({featureFlags:r,featureFlagPayloads:n})}if(!this.get_distinct_id()){var o=this.get_config("get_device_id")(xc());this.register_once({distinct_id:o,$device_id:o},""),this.persistence.set_user_state("anonymous")}gi.addEventListener&&gi.addEventListener("onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this)),s("syncCode")()}},{key:"_loaded",value:function(){this.featureFlags.setReloadingPaused(!0);try{this.get_config("loaded")(this)}catch(F){console.error("`loaded` function failed",F)}this._start_queue_if_opted_in(),this.get_config("capture_pageview")&&this.capture("$pageview",{},{send_instantly:!0}),this.get_config("advanced_disable_decide")||new dT(this).call(),this.featureFlags.resetRequestQueue(),this.featureFlags.setReloadingPaused(!1)}},{key:"_start_queue_if_opted_in",value:function(){this.has_opted_out_capturing()||this.get_config("request_batching")&&this._requestQueue.poll()}},{key:"_dom_loaded",value:function(){var F=this;this.has_opted_out_capturing()||mc(this.__request_queue,function(J){F._send_request.apply(F,Mv(J))}),this.__request_queue=[],this._start_queue_if_opted_in()}},{key:"_prepare_callback",value:function(F,J){if(Ul(F))return null;if(v0)return function(E){F(E,J)};var fe=this._jsc,Pe=""+Math.floor(1e8*Math.random()),D=this.get_config("callback_fn")+"["+Pe+"]";return fe[Pe]=function(E){delete fe[Pe],F(E,J)},D}},{key:"_handle_unload",value:function(){this.get_config("request_batching")?(this.get_config("capture_pageview")&&this.get_config("capture_pageleave")&&this.capture("$pageleave"),this.get_config("_capture_metrics")&&(this._requestQueue.updateUnloadMetrics(),this.capture("$capture_metrics",this._captureMetrics.metrics)),this._requestQueue.unload(),this._retryQueue.unload()):this.get_config("capture_pageview")&&this.get_config("capture_pageleave")&&this.capture("$pageleave",null,{transport:"sendBeacon"})}},{key:"_handle_queued_event",value:function(F,J,fe){var Pe=JSON.stringify(J);this.__compress_and_send_json_request(F,Pe,fe||$d,Bv)}},{key:"__compress_and_send_json_request",value:function(F,J,fe,Pe){var D,E=function(s,T,m){return s===Fl.LZ64?[{data:qs.compressToBase64(T),compression:Fl.LZ64},m]:s===Fl.GZipJS?[PT(OT(T),{mtime:0}),yi(yi({},m),{},{blob:!0,urlQueryArgs:{compression:Fl.GZipJS}})]:[{data:c1(T)},m]}((D=this.compression)[Fl.GZipJS]?Fl.GZipJS:D[Fl.LZ64]?Fl.LZ64:Fl.Base64,J,fe),e=l1(E,2),_=e[0],w=e[1];this._send_request(F,_,w,Pe)}},{key:"_send_request",value:function(F,J,fe,Pe){if(cw)this.__request_queue.push([F,J,fe,Pe]);else{var D={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")};fe=So(D,fe||{}),v0||(fe.method="GET");var E="sendBeacon"in gi.navigator&&fe.transport==="sendBeacon";if(F=IT(F,fe.urlQueryArgs||{},{ip:this.get_config("ip")}),yc(J)&&this.get_config("img")){var e=Vo.createElement("img");e.src=F,Vo.body.appendChild(e)}else if(E)try{gi.navigator.sendBeacon(F,$m(J,yi(yi({},fe),{},{sendBeacon:!0})))}catch(T){this.get_config("debug")&&console.error(T)}else if(v0)try{uw({url:F,data:J,headers:this.get_config("xhr_headers"),options:fe,captureMetrics:this._captureMetrics,callback:Pe,retriesPerformedSoFar:0,retryQueue:this._retryQueue,onXHRError:this.get_config("on_xhr_error")})}catch(T){console.error(T)}else{var _,w=Vo.createElement("script");w.type="text/javascript",w.async=!0,w.defer=!0,w.src=F;var s=Vo.getElementsByTagName("script")[0];(_=s.parentNode)===null||_===void 0||_.insertBefore(w,s)}}}},{key:"_execute_array",value:function(F){var J,fe=this,Pe=[],D=[],E=[];mc(F,function(_){_&&(J=_[0],Ru(J)?E.push(_):typeof _=="function"?_.call(fe):Ru(_)&&J==="alias"?Pe.push(_):Ru(_)&&J.indexOf("capture")!==-1&&typeof fe[J]=="function"?E.push(_):D.push(_))});var e=function(_,w){mc(_,function(s){if(Ru(s[0])){var T=w;Yi(s,function(m){T=T[m[0]].apply(T,m.slice(1))})}else this[s[0]].apply(this,s.slice(1))},w)};e(Pe,this),e(D,this),e(E,this)}},{key:"_hasBootstrappedFeatureFlags",value:function(){var F,J;return((F=this.config.bootstrap)===null||F===void 0?void 0:F.featureFlags)&&Object.keys((J=this.config.bootstrap)===null||J===void 0?void 0:J.featureFlags).length>0||!1}},{key:"push",value:function(F){this._execute_array([F])}},{key:"capture",value:function(F,J){var fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$d;if(this.__loaded&&!rw(this,!1)){this._captureMetrics.incr("capture"),F==="$snapshot"&&this._captureMetrics.incr("snapshot");var Pe=(fe=fe||$d).transport;if(Pe&&(fe.transport=Pe),Ul(F)||typeof F!="string")console.error("No event name provided to posthog.capture");else if(!G8(Nl)){this.sessionPersistence.update_search_keyword(),this.get_config("store_google")&&this.sessionPersistence.update_campaign_params(),this.get_config("save_referrer")&&this.sessionPersistence.update_referrer_info();var D={event:F,properties:this._calculate_event_properties(F,J||{})};F==="$identify"&&fe.$set&&(D.$set=fe.$set),(D=Y3(D,fe._noTruncate?null:this.get_config("properties_string_max_length"))).timestamp=fe.timestamp||new Date,this.get_config("debug")&&Ja.log("PostHog.js send",D);var E=JSON.stringify(D),e=this.get_config("api_host")+(fe.endpoint||"/e/"),_=fe!==$d;return!this.get_config("request_batching")||_&&!fe._batchKey||fe.send_instantly?this.__compress_and_send_json_request(e,E,fe):this._requestQueue.enqueue(e,D,fe),this._invokeCaptureHooks(F,D),D}}}},{key:"_addCaptureHook",value:function(F){this.__captureHooks.push(F)}},{key:"_invokeCaptureHooks",value:function(F,J){this.config._onCapture(F,J),Yi(this.__captureHooks,function(fe){return fe(F)})}},{key:"_calculate_event_properties",value:function(F,J){var fe,Pe=this.persistence.remove_event_timer(F),D=yi({},J);if(D.token=this.get_config("token"),F==="$snapshot"){var E=yi(yi({},this.persistence.properties()),this.sessionPersistence.properties());return D.distinct_id=E.distinct_id,D}var e=yo.properties();if(this.sessionManager){var _=this.sessionManager.checkAndGetSessionAndWindowId(),w=_.sessionId,s=_.windowId;D.$session_id=w,D.$window_id=s}if((fe=this.webPerformance)!==null&&fe!==void 0&&fe.isEnabled&&(F==="$pageview"&&this.pageViewIdManager.onPageview(),D=So(D,{$pageview_id:this.pageViewIdManager.getPageViewId()})),F==="$performance_event"){var T=this.persistence.properties();return D.distinct_id=T.distinct_id,D.$current_url=e.$current_url,D}if(Pe!==void 0){var m=new Date().getTime()-Pe;D.$duration=parseFloat((m/1e3).toFixed(3))}D=So({},yo.properties(),this.persistence.properties(),this.sessionPersistence.properties(),D);var f=this.get_config("property_blacklist");Ru(f)?Yi(f,function(t){delete D[t]}):console.error("Invalid value for property_blacklist config: "+f);var l=this.get_config("sanitize_properties");return l&&(D=l(D,F)),D}},{key:"register",value:function(F,J){this.persistence.register(F,J)}},{key:"register_once",value:function(F,J,fe){this.persistence.register_once(F,J,fe)}},{key:"register_for_session",value:function(F){this.sessionPersistence.register(F)}},{key:"unregister",value:function(F){this.persistence.unregister(F)}},{key:"unregister_for_session",value:function(F){this.sessionPersistence.unregister(F)}},{key:"_register_single",value:function(F,J){this.register(Bi({},F,J))}},{key:"getFeatureFlag",value:function(F,J){return this.featureFlags.getFeatureFlag(F,J)}},{key:"getFeatureFlagPayload",value:function(F){var J=this.featureFlags.getFeatureFlagPayload(F);try{return JSON.parse(J)}catch{return J}}},{key:"isFeatureEnabled",value:function(F,J){return this.featureFlags.isFeatureEnabled(F,J)}},{key:"reloadFeatureFlags",value:function(){this.featureFlags.reloadFeatureFlags()}},{key:"updateEarlyAccessFeatureEnrollment",value:function(F,J){this.featureFlags.updateEarlyAccessFeatureEnrollment(F,J)}},{key:"getEarlyAccessFeatures",value:function(F){var J=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.featureFlags.getEarlyAccessFeatures(F,J)}},{key:"onFeatureFlags",value:function(F){return this.featureFlags.onFeatureFlags(F)}},{key:"identify",value:function(F,J,fe){if(F){this._captureMetrics.incr("identify");var Pe=this.get_distinct_id();if(this.register({$user_id:F}),!this.get_property("$device_id")){var D=Pe;this.register_once({$had_persisted_distinct_id:!0,$device_id:D},"")}F!==Pe&&F!==this.get_property(d0)&&(this.unregister(d0),this.register({distinct_id:F}));var E=this.persistence.get_user_state()==="anonymous";F!==Pe&&E?(this.persistence.set_user_state("identified"),this.capture("$identify",{distinct_id:F,$anon_distinct_id:Pe},{$set:J||{},$set_once:fe||{}}),this.featureFlags.setAnonymousDistinctId(Pe)):(J&&this.people.set(J),fe&&this.people.set_once(fe)),F!==Pe&&this.reloadFeatureFlags()}else console.error("Unique user id has not been set in posthog.identify")}},{key:"group",value:function(F,J,fe){if(F&&J){this._captureMetrics.incr("group");var Pe=this.getGroups();Pe[F]!==J&&this.resetGroupPropertiesForFlags(F),this.register({$groups:yi(yi({},Pe),{},Bi({},F,J))}),fe&&(this.capture("$groupidentify",{$group_type:F,$group_key:J,$group_set:fe}),this.setGroupPropertiesForFlags(Bi({},F,fe))),Pe[F]===J||fe||this.reloadFeatureFlags()}else console.error("posthog.group requires a group type and group key")}},{key:"resetGroups",value:function(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}},{key:"setPersonPropertiesForFlags",value:function(F){var J=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setPersonPropertiesForFlags(F,J)}},{key:"resetPersonPropertiesForFlags",value:function(){this.featureFlags.resetPersonPropertiesForFlags()}},{key:"setGroupPropertiesForFlags",value:function(F){var J=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setGroupPropertiesForFlags(F,J)}},{key:"resetGroupPropertiesForFlags",value:function(F){this.featureFlags.resetGroupPropertiesForFlags(F)}},{key:"reset",value:function(F){var J=this.get_property("$device_id");this.persistence.clear(),this.sessionPersistence.clear(),this.persistence.set_user_state("anonymous"),this.sessionManager.resetSessionId();var fe=this.get_config("get_device_id")(xc());this.register_once({distinct_id:fe,$device_id:F?fe:J},"")}},{key:"get_distinct_id",value:function(){return this.get_property("distinct_id")}},{key:"getGroups",value:function(){return this.get_property("$groups")||{}}},{key:"alias",value:function(F,J){return F===this.get_property(Q3)?(Ja.critical("Attempting to create alias for existing People user - aborting."),-2):(Ul(J)&&(J=this.get_distinct_id()),F!==J?(this._register_single(d0,F),this.capture("$create_alias",{alias:F,distinct_id:J})):(console.error("alias matches current distinct_id - skipping api call."),this.identify(F),-1))}},{key:"set_config",value:function(F){var J=yi({},this.config);yc(F)&&(So(this.config,F),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),this.sessionPersistence&&this.sessionPersistence.update_config(this.config),$a.is_supported()&&$a.get("ph_debug")==="true"&&(this.config.debug=!0),this.get_config("debug")&&(fu.DEBUG=!0),this.sessionRecording&&F.disable_session_recording!==void 0&&J.disable_session_recording!==F.disable_session_recording&&(F.disable_session_recording?this.sessionRecording.stopRecording():this.sessionRecording.startRecordingIfEnabled()))}},{key:"startSessionRecording",value:function(){this.set_config({disable_session_recording:!1})}},{key:"stopSessionRecording",value:function(){this.set_config({disable_session_recording:!0})}},{key:"sessionRecordingStarted",value:function(){var F;return!((F=this.sessionRecording)===null||F===void 0||!F.started())}},{key:"loadToolbar",value:function(F){return this.toolbar.loadToolbar(F)}},{key:"get_config",value:function(F){var J;return(J=this.config)===null||J===void 0?void 0:J[F]}},{key:"get_property",value:function(F){return this.persistence.props[F]}},{key:"getSessionProperty",value:function(F){return this.sessionPersistence.props[F]}},{key:"toString",value:function(){var F,J=(F=this.get_config("name"))!==null&&F!==void 0?F:Ss;return J!==Ss&&(J=Ss+"."+J),J}},{key:"_gdpr_init",value:function(){this.get_config("opt_out_capturing_persistence_type")==="localStorage"&&$a.is_supported()&&(!this.has_opted_in_capturing()&&this.has_opted_in_capturing({persistence_type:"cookie"})&&this.opt_in_capturing({enable_persistence:!1}),!this.has_opted_out_capturing()&&this.has_opted_out_capturing({persistence_type:"cookie"})&&this.opt_out_capturing({clear_persistence:!1}),this.clear_opt_in_out_capturing({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_capturing()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_capturing()||!this.get_config("opt_out_capturing_by_default")&&!lu.get("ph_optout")||(lu.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.get_config("opt_out_persistence_by_default")}))}},{key:"_gdpr_update_persistence",value:function(F){var J;if(F&&F.clear_persistence)J=!0;else{if(!F||!F.enable_persistence)return;J=!1}this.get_config("disable_persistence")||this.persistence.disabled===J||this.persistence.set_disabled(J),this.get_config("disable_persistence")||this.sessionPersistence.disabled===J||this.sessionPersistence.set_disabled(J)}},{key:"_gdpr_call_func",value:function(F,J){return J=So({capture:this.capture.bind(this),persistence_type:this.get_config("opt_out_capturing_persistence_type"),cookie_prefix:this.get_config("opt_out_capturing_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),secure_cookie:this.get_config("secure_cookie")},J||{}),$a.is_supported()||J.persistence_type!=="localStorage"||(J.persistence_type="cookie"),F(this.get_config("token"),{capture:J.capture,captureEventName:J.capture_event_name,captureProperties:J.capture_properties,persistenceType:J.persistence_type,persistencePrefix:J.cookie_prefix,cookieExpiration:J.cookie_expiration,crossSubdomainCookie:J.cross_subdomain_cookie,secureCookie:J.secure_cookie})}},{key:"opt_in_capturing",value:function(F){F=So({enable_persistence:!0},F||{}),this._gdpr_call_func(K8,F),this._gdpr_update_persistence(F)}},{key:"opt_out_capturing",value:function(F){var J=So({clear_persistence:!0},F||{});this._gdpr_call_func(Q8,J),this._gdpr_update_persistence(J)}},{key:"has_opted_in_capturing",value:function(F){return this._gdpr_call_func(eT,F)}},{key:"has_opted_out_capturing",value:function(F){return this._gdpr_call_func(ew,F)}},{key:"clear_opt_in_out_capturing",value:function(F){var J=So({enable_persistence:!0},F??{});this._gdpr_call_func(tT,J),this._gdpr_update_persistence(J)}},{key:"debug",value:function(F){F===!1?(gi.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(gi.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}},{key:"decodeLZ64",value:function(F){return qs.decompressFromBase64(F||null)}}]),O}();(function(O,F){for(var J=0;J: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 s in w){var T=s.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");_.addStyleRule(T,w[s])}},98222:function(D,E,e){D.exports=e(82887)},27206:function(D,E,e){D.exports=e(60822)},59893:function(D,E,e){D.exports=e(23381)},5224:function(D,E,e){D.exports=e(83832)},59509:function(D,E,e){D.exports=e(72201)},75557:function(D,E,e){D.exports=e(91815)},40338:function(D,E,e){D.exports=e(21462)},35080:function(D,E,e){D.exports=e(51319)},61396:function(D,E,e){D.exports=e(57516)},40549:function(D,E,e){D.exports=e(98128)},49866:function(D,E,e){D.exports=e(99442)},36089:function(D,E,e){D.exports=e(93740)},19548:function(D,E,e){D.exports=e(8729)},35831:function(D,E,e){D.exports=e(93814)},61039:function(D,E,e){D.exports=e(14382)},97040:function(D,E,e){D.exports=e(51759)},77986:function(D,E,e){D.exports=e(10421)},24296:function(D,E,e){D.exports=e(43102)},58872:function(D,E,e){D.exports=e(92165)},29626:function(D,E,e){D.exports=e(3325)},65591:function(D,E,e){D.exports=e(36071)},69738:function(D,E,e){D.exports=e(43905)},92650:function(D,E,e){D.exports=e(35902)},35630:function(D,E,e){D.exports=e(69816)},73434:function(D,E,e){D.exports=e(94507)},27909:function(D,E,e){var _=e(19548);_.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)]),D.exports=_},46163:function(D,E,e){D.exports=e(15154)},96881:function(D,E,e){D.exports=e(64943)},50581:function(D,E,e){D.exports=e(21164)},55334:function(D,E,e){D.exports=e(54186)},65317:function(D,E,e){D.exports=e(94873)},10021:function(D,E,e){D.exports=e(67618)},54201:function(D,E,e){D.exports=e(58810)},5861:function(D,E,e){D.exports=e(20593)},16122:function(D,E,e){D.exports=e(29396)},83043:function(D,E,e){D.exports=e(13551)},48131:function(D,E,e){D.exports=e(46858)},47582:function(D,E,e){D.exports=e(17988)},21641:function(D,E,e){D.exports=e(68868)},96268:function(D,E,e){D.exports=e(20467)},19440:function(D,E,e){D.exports=e(91271)},99488:function(D,E,e){D.exports=e(21461)},97393:function(D,E,e){D.exports=e(85956)},25743:function(D,E,e){D.exports=e(52979)},66398:function(D,E,e){D.exports=e(32275)},17280:function(D,E,e){D.exports=e(6419)},77900:function(D,E,e){D.exports=e(61510)},81299:function(D,E,e){D.exports=e(87619)},93005:function(D,E,e){D.exports=e(93601)},40344:function(D,E,e){D.exports=e(96595)},47645:function(D,E,e){D.exports=e(70954)},6197:function(D,E,e){D.exports=e(47462)},4534:function(D,E,e){D.exports=e(17659)},85461:function(D,E,e){D.exports=e(19990)},82884:function(D){D.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(D,E,e){var _=e(82884),w=e(41940),s=e(85555),T=e(44467).templatedArray;e(24695),D.exports=T("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:w({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:_.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:_.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",s.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",s.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",s.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",s.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:w({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},3749:function(D,E,e){var _=e(71828),w=e(89298),s=e(92605).draw;function T(f){var l=f._fullLayout;_.filterVisible(l.annotations).forEach(function(t){var a=w.getFromId(f,t.xref),r=w.getFromId(f,t.yref),n=w.getRefType(t.xref),o=w.getRefType(t.yref);t._extremes={},n==="range"&&m(t,a),o==="range"&&m(t,r)})}function m(f,l){var t,a=l._id,r=a.charAt(0),n=f[r],o=f["a"+r],i=f[r+"ref"],u=f["a"+r+"ref"],p=f["_"+r+"padplus"],c=f["_"+r+"padminus"],b={x:1,y:-1}[r]*f[r+"shift"],d=3*f.arrowsize*f.arrowwidth||0,v=d+b,x=d-b,g=3*f.startarrowsize*f.arrowwidth||0,y=g+b,k=g-b;if(u===i){var h=w.findExtremes(l,[l.r2c(n)],{ppadplus:v,ppadminus:x}),M=w.findExtremes(l,[l.r2c(o)],{ppadplus:Math.max(p,y),ppadminus:Math.max(c,k)});t={min:[h.min[0],M.min[0]],max:[h.max[0],M.max[0]]}}else y=o?y+o:y,k=o?k-o:k,t=w.findExtremes(l,[l.r2c(n)],{ppadplus:Math.max(p,v,y),ppadminus:Math.max(c,x,k)});f._extremes[a]=t}D.exports=function(f){var l=f._fullLayout;if(_.filterVisible(l.annotations).length&&f._fullData.length)return _.syncOrAsync([s,T],f)}},44317:function(D,E,e){var _=e(71828),w=e(73972),s=e(44467).arrayEditor;function T(f,l){var t,a,r,n,o,i,u,p=f._fullLayout.annotations,c=[],b=[],d=[],v=(l||[]).length;for(t=0;t0||t.explicitOff.length>0},onClick:function(f,l){var t,a,r=T(f,l),n=r.on,o=r.off.concat(r.explicitOff),i={},u=f._fullLayout.annotations;if(n.length||o.length){for(t=0;t.6666666666666666?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[mt]}for(var Ue=!1,De=["x","y"],je=0;je1)&&(ot===st?((Nt=ft.r2fraction(v["a"+Ze]))<0||Nt>1)&&(Ue=!0):Ue=!0),ge=ft._offset+ft.r2p(v[Ze]),Ne=.5}else{var Je=qt==="domain";Ze==="x"?(Se=v[Ze],ge=Je?ft._offset+ft._length*Se:ge=C.l+C.w*Se):(Se=1-v[Ze],ge=Je?ft._offset+ft._length*Se:ge=C.t+C.h*Se),Ne=v.showarrow?.5:Se}if(v.showarrow){Ft.head=ge;var Ke=v["a"+Ze];if(Ye=Et*Ee(.5,v.xanchor)-Tt*Ee(.5,v.yanchor),ot===st){var Ge=f.getRefType(ot);Ge==="domain"?(Ze==="y"&&(Ke=1-Ke),Ft.tail=ft._offset+ft._length*Ke):Ge==="paper"?Ze==="y"?(Ke=1-Ke,Ft.tail=C.t+C.h*Ke):Ft.tail=C.l+C.w*Ke:Ft.tail=ft._offset+ft.r2p(Ke),be=Ye}else Ft.tail=ge+Ke,be=Ye+Ke;Ft.text=Ft.tail+Ye;var nt=A[Ze==="x"?"width":"height"];if(st==="paper"&&(Ft.head=T.constrain(Ft.head,1,nt-1)),ot==="pixel"){var ht=-Math.max(Ft.tail-3,Ft.text),Oe=Math.min(Ft.tail+3,Ft.text)-nt;ht>0?(Ft.tail+=ht,Ft.text+=ht):Oe>0&&(Ft.tail-=Oe,Ft.text-=Oe)}Ft.tail+=It,Ft.head+=It}else be=Ye=xt*Ee(Ne,Dt),Ft.text=ge+Ye;Ft.text+=It,Ye+=It,be+=It,v["_"+Ze+"padplus"]=xt/2+be,v["_"+Ze+"padminus"]=xt/2-be,v["_"+Ze+"size"]=xt,v["_"+Ze+"shift"]=Ye}if(Ue)Q.remove();else{var Be=0,Qe=0;if(v.align!=="left"&&(Be=(ne-Me)*(v.align==="center"?.5:1)),v.valign!=="top"&&(Qe=(ue-Ce)*(v.valign==="middle"?.5:1)),Te)ze.select("svg").attr({x:K+Be-1,y:K+Qe}).call(t.setClipUrl,re?B:null,d);else{var ut=K+Qe-Ae.top,pt=K+Be-Ae.left;xe.call(r.positionText,pt,ut).call(t.setClipUrl,re?B:null,d)}oe.select("rect").call(t.setRect,K,K,ne,ue),te.call(t.setRect,X/2,X/2,me-X,we-X),Q.call(t.setTranslate,Math.round(G.x.text-me/2),Math.round(G.y.text-we/2)),V.attr({transform:"rotate("+N+","+G.x.text+","+G.y.text+")"});var bt,Lt=function(Ct,mt){j.selectAll(".annotation-arrow-g").remove();var Ot=G.x.head,_t=G.y.head,Pt=G.x.tail+Ct,Bt=G.y.tail+mt,Wt=G.x.text+Ct,Gt=G.y.text+mt,Xt=T.rotationXYMatrix(N,Wt,Gt),Kt=T.apply2DTransform(Xt),nn=T.apply2DTransform2(Xt),yn=+te.attr("width"),ln=+te.attr("height"),kn=Wt-.5*yn,Wn=kn+yn,wn=Gt-.5*ln,on=wn+ln,_n=[[kn,wn,kn,on],[kn,on,Wn,on],[Wn,on,Wn,wn],[Wn,wn,kn,wn]].map(nn);if(!_n.reduce(function(ir,dr){return ir^!!T.segmentsIntersect(Ot,_t,Ot+1e6,_t+1e6,dr[0],dr[1],dr[2],dr[3])},!1)){_n.forEach(function(ir){var dr=T.segmentsIntersect(Pt,Bt,Ot,_t,ir[0],ir[1],ir[2],ir[3]);dr&&(Pt=dr.x,Bt=dr.y)});var fn=v.arrowwidth,hn=v.arrowcolor,In=v.arrowside,Cn=j.append("g").style({opacity:l.opacity(hn)}).classed("annotation-arrow-g",!0),Nn=Cn.append("path").attr("d","M"+Pt+","+Bt+"L"+Ot+","+_t).style("stroke-width",fn+"px").call(l.stroke,l.rgb(hn));if(u(Nn,In,v),L.annotationPosition&&Nn.node().parentNode&&!g){var Hn=Ot,qn=_t;if(v.standoff){var or=Math.sqrt(Math.pow(Ot-Pt,2)+Math.pow(_t-Bt,2));Hn+=v.standoff*(Pt-Ot)/or,qn+=v.standoff*(Bt-_t)/or}var tr,Tr,gr=Cn.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Pt-Hn)+","+(Bt-qn),transform:m(Hn,qn)}).style("stroke-width",fn+6+"px").call(l.stroke,"rgba(0,0,0,0)").call(l.fill,"rgba(0,0,0,0)");o.init({element:gr.node(),gd:d,prepFn:function(){var ir=t.getTranslate(Q);tr=ir.x,Tr=ir.y,y&&y.autorange&&I(y._name+".autorange",!0),k&&k.autorange&&I(k._name+".autorange",!0)},moveFn:function(ir,dr){var yr=Kt(tr,Tr),$t=yr[0]+ir,mn=yr[1]+dr;Q.call(t.setTranslate,$t,mn),R("x",c(y,ir,"x",C,v)),R("y",c(k,dr,"y",C,v)),v.axref===v.xref&&R("ax",c(y,ir,"ax",C,v)),v.ayref===v.yref&&R("ay",c(k,dr,"ay",C,v)),Cn.attr("transform",m(ir,dr)),V.attr({transform:"rotate("+N+","+$t+","+mn+")"})},doneFn:function(){w.call("_guiRelayout",d,U());var ir=document.querySelector(".js-notes-box-panel");ir&&ir.redraw(ir.selectedObj)}})}}};v.showarrow&&Lt(0,0),H&&o.init({element:Q.node(),gd:d,prepFn:function(){bt=V.attr("transform")},moveFn:function(Ct,mt){var Ot="pointer";if(v.showarrow)v.axref===v.xref?R("ax",c(y,Ct,"ax",C,v)):R("ax",v.ax+Ct),v.ayref===v.yref?R("ay",c(k,mt,"ay",C.w,v)):R("ay",v.ay+mt),Lt(Ct,mt);else{if(g)return;var _t,Pt;if(y)_t=c(y,Ct,"x",C,v);else{var Bt=v._xsize/C.w,Wt=v.x+(v._xshift-v.xshift)/C.w-Bt/2;_t=o.align(Wt+Ct/C.w,Bt,0,1,v.xanchor)}if(k)Pt=c(k,mt,"y",C,v);else{var Gt=v._ysize/C.h,Xt=v.y-(v._yshift+v.yshift)/C.h-Gt/2;Pt=o.align(Xt-mt/C.h,Gt,0,1,v.yanchor)}R("x",_t),R("y",Pt),y&&k||(Ot=o.getCursor(y?.5:_t,k?.5:Pt,v.xanchor,v.yanchor))}V.attr({transform:m(Ct,mt)+bt}),n(Q,Ot)},clickFn:function(Ct,mt){v.captureevents&&d.emit("plotly_clickannotation",pe(mt))},doneFn:function(){n(Q),w.call("_guiRelayout",d,U());var Ct=document.querySelector(".js-notes-box-panel");Ct&&Ct.redraw(Ct.selectedObj)}})}}}D.exports={draw:function(d){var v=d._fullLayout;v._infolayer.selectAll(".annotation").remove();for(var x=0;x=0,g=a.indexOf("end")>=0,y=c.backoff*d+r.standoff,k=b.backoff*v+r.startstandoff;if(p.nodeName==="line"){n={x:+t.attr("x1"),y:+t.attr("y1")},o={x:+t.attr("x2"),y:+t.attr("y2")};var h=n.x-o.x,M=n.y-o.y;if(u=(i=Math.atan2(M,h))+Math.PI,y&&k&&y+k>Math.sqrt(h*h+M*M))return void j();if(y){if(y*y>h*h+M*M)return void j();var A=y*Math.cos(i),C=y*Math.sin(i);o.x+=A,o.y+=C,t.attr({x2:o.x,y2:o.y})}if(k){if(k*k>h*h+M*M)return void j();var L=k*Math.cos(i),P=k*Math.sin(i);n.x-=L,n.y-=P,t.attr({x1:n.x,y1:n.y})}}else if(p.nodeName==="path"){var I=p.getTotalLength(),R="";if(I1){r=!0;break}}r?T.fullLayout._infolayer.select(".annotation-"+T.id+'[data-index="'+t+'"]').remove():(a._pdata=w(T.glplot.cameraParams,[m.xaxis.r2l(a.x)*f[0],m.yaxis.r2l(a.y)*f[1],m.zaxis.r2l(a.z)*f[2]]),_(T.graphDiv,a,t,T.id,a._xa,a._ya))}}},2468:function(D,E,e){var _=e(73972),w=e(71828);D.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:e(26997)}}},layoutAttributes:e(26997),handleDefaults:e(20226),includeBasePlot:function(s,T){var m=_.subplotsRegistry.gl3d;if(m)for(var f=m.attrRegex,l=Object.keys(s),t=0;t=0)))return a;if(u===3)o[u]>1&&(o[u]=1);else if(o[u]>=1)return a}var p=Math.round(255*o[0])+", "+Math.round(255*o[1])+", "+Math.round(255*o[2]);return i?"rgba("+p+", "+o[3]+")":"rgb("+p+")"}T.tinyRGB=function(a){var r=a.toRgb();return"rgb("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+")"},T.rgb=function(a){return T.tinyRGB(_(a))},T.opacity=function(a){return a?_(a).getAlpha():0},T.addOpacity=function(a,r){var n=_(a).toRgb();return"rgba("+Math.round(n.r)+", "+Math.round(n.g)+", "+Math.round(n.b)+", "+r+")"},T.combine=function(a,r){var n=_(a).toRgb();if(n.a===1)return _(a).toRgbString();var o=_(r||l).toRgb(),i=o.a===1?o:{r:255*(1-o.a)+o.r*o.a,g:255*(1-o.a)+o.g*o.a,b:255*(1-o.a)+o.b*o.a},u={r:i.r*(1-n.a)+n.r*n.a,g:i.g*(1-n.a)+n.g*n.a,b:i.b*(1-n.a)+n.b*n.a};return _(u).toRgbString()},T.contrast=function(a,r,n){var o=_(a);return o.getAlpha()!==1&&(o=_(T.combine(a,l))),(o.isDark()?r?o.lighten(r):l:n?o.darken(n):f).toString()},T.stroke=function(a,r){var n=_(r);a.style({stroke:T.tinyRGB(n),"stroke-opacity":n.getAlpha()})},T.fill=function(a,r){var n=_(r);a.style({fill:T.tinyRGB(n),"fill-opacity":n.getAlpha()})},T.clean=function(a){if(a&&typeof a=="object"){var r,n,o,i,u=Object.keys(a);for(r=0;r0?Ke>=Be:Ke<=Be));Ge++)Ke>ut&&Ke0?Ke>=Be:Ke<=Be));Ge++)Ke>Je[0]&&Ke1){var ot=Math.pow(10,Math.floor(Math.log(st)/Math.LN10));Ye*=ot*l.roundUp(st/ot,[2,5,10]),(Math.abs(Te.start)/Te.size+1e-6)%1<2e-6&&(Se.tick0=0)}Se.dtick=Ye}Se.domain=U?[ge+K/se.h,ge+we-K/se.h]:[ge+Y/se.w,ge+we-Y/se.w],Se.setScale(),P.attr("transform",t(Math.round(se.l),Math.round(se.t)));var ft,yt=P.select("."+k.cbtitleunshift).attr("transform",t(-Math.round(se.l),-Math.round(se.t))),Et=Se.ticklabelposition,Tt=Se.title.font.size,xt=P.select("."+k.cbaxis),Dt=0,It=0;function Ft(qt,Nt){var Je={propContainer:Se,propName:I._propPrefix+"title",traceIndex:I._traceIndex,_meta:I._meta,placeholder:oe._dfltTitle.colorbar,containerGroup:P.select("."+k.cbtitle)},Ke=qt.charAt(0)==="h"?qt.substr(1):"h"+qt;P.selectAll("."+Ke+",."+Ke+"-math-group").remove(),i.draw(R,qt,a(Je,Nt||{}))}return l.syncOrAsync([s.previousPromises,function(){var qt,Nt;(U&&Ne||!U&&!Ne)&&(de==="top"&&(qt=Y+se.l+se.w*te,Nt=K+se.t+se.h*(1-ge-we)+3+.75*Tt),de==="bottom"&&(qt=Y+se.l+se.w*te,Nt=K+se.t+se.h*(1-ge)-3-.25*Tt),de==="right"&&(Nt=K+se.t+se.h*re+3+.75*Tt,qt=Y+se.l+se.w*ge),Ft(Se._id+"title",{attributes:{x:qt,y:Nt,"text-anchor":U?"start":"middle"}}))},function(){if(!U&&!Ne||U&&Ne){var qt,Nt=P.select("."+k.cbtitle),Je=Nt.select("text"),Ke=[-V/2,V/2],Ge=Nt.select(".h"+Se._id+"title-math-group").node(),nt=15.6;if(Je.node()&&(nt=parseInt(Je.node().style.fontSize,10)*x),Ge?(qt=n.bBox(Ge),It=qt.width,(Dt=qt.height)>nt&&(Ke[1]-=(Dt-nt)/2)):Je.node()&&!Je.classed(k.jsPlaceholder)&&(qt=n.bBox(Je.node()),It=qt.width,Dt=qt.height),U){if(Dt){if(Dt+=5,de==="top")Se.domain[1]-=Dt/se.h,Ke[1]*=-1;else{Se.domain[0]+=Dt/se.h;var ht=u.lineCount(Je);Ke[1]+=(1-ht)*nt}Nt.attr("transform",t(Ke[0],Ke[1])),Se.setScale()}}else It&&(de==="right"&&(Se.domain[0]+=(It+Tt/2)/se.w),Nt.attr("transform",t(Ke[0],Ke[1])),Se.setScale())}P.selectAll("."+k.cbfills+",."+k.cblines).attr("transform",U?t(0,Math.round(se.h*(1-Se.domain[1]))):t(Math.round(se.w*Se.domain[0]),0)),xt.attr("transform",U?t(0,Math.round(-se.t)):t(Math.round(-se.l),0));var Oe=P.select("."+k.cbfills).selectAll("rect."+k.cbfill).attr("style","").data(Me);Oe.enter().append("rect").classed(k.cbfill,!0).style("stroke","none"),Oe.exit().remove();var Be=he.map(Se.c2p).map(Math.round).sort(function(Lt,Ct){return Lt-Ct});Oe.each(function(Lt,Ct){var mt=[Ct===0?he[0]:(Me[Ct]+Me[Ct-1])/2,Ct===Me.length-1?he[1]:(Me[Ct]+Me[Ct+1])/2].map(Se.c2p).map(Math.round);U&&(mt[1]=l.constrain(mt[1]+(mt[1]>mt[0])?1:-1,Be[0],Be[1]));var Ot=_.select(this).attr(U?"x":"y",Ee).attr(U?"y":"x",_.min(mt)).attr(U?"width":"height",Math.max(ne,2)).attr(U?"height":"width",Math.max(_.max(mt)-_.min(mt),2));if(I._fillgradient)n.gradient(Ot,R,I._id,U?"vertical":"horizontalreversed",I._fillgradient,"fill");else{var _t=ze(Lt).replace("e-","");Ot.attr("fill",w(_t).toHexString())}});var Qe=P.select("."+k.cblines).selectAll("path."+k.cbline).data(xe.color&&xe.width?Ce:[]);Qe.enter().append("path").classed(k.cbline,!0),Qe.exit().remove(),Qe.each(function(Lt){var Ct=Ee,mt=Math.round(Se.c2p(Lt))+xe.width/2%1;_.select(this).attr("d","M"+(U?Ct+","+mt:mt+","+Ct)+(U?"h":"v")+ne).call(n.lineGroupStyle,xe.width,ye(Lt),xe.dash)}),xt.selectAll("g."+Se._id+"tick,path").remove();var ut=Ee+ne+(V||0)/2-(I.ticks==="outside"?1:0),pt=m.calcTicks(Se),bt=m.getTickSigns(Se)[2];return m.drawTicks(R,Se,{vals:Se.ticks==="inside"?m.clipEnds(Se,pt):pt,layer:xt,path:m.makeTickPath(Se,ut,bt),transFn:m.makeTransTickFn(Se)}),m.drawLabels(R,Se,{vals:pt,layer:xt,transFn:m.makeTransTickLabelFn(Se),labelFns:m.makeLabelFns(Se,ut)})},function(){if(U&&!Ne||!U&&Ne){var qt,Nt,Je=Se.position||0,Ke=Se._offset+Se._length/2;if(de==="right")Nt=Ke,qt=se.l+se.w*Je+10+Tt*(Se.showticklabels?1:.5);else if(qt=Ke,de==="bottom"&&(Nt=se.t+se.h*Je+10+(Et.indexOf("inside")===-1?Se.tickfont.size:0)+(Se.ticks!=="intside"&&I.ticklen||0)),de==="top"){var Ge=pe.text.split("
").length;Nt=se.t+se.h*Je+10-ne-x*Tt*Ge}Ft((U?"h":"v")+Se._id+"title",{avoid:{selection:_.select(R).selectAll("g."+Se._id+"tick"),side:de,offsetTop:U?0:se.t,offsetLeft:U?se.l:0,maxShift:U?oe.width:oe.height},attributes:{x:qt,y:Nt,"text-anchor":"middle"},transform:{rotate:U?-90:0,offset:0}})}},s.previousPromises,function(){var qt,Nt=ne+V/2;Et.indexOf("inside")===-1&&(qt=n.bBox(xt.node()),Nt+=U?qt.width:qt.height),ft=yt.select("text");var Je=0,Ke=U&&de==="top",Ge=!U&&de==="right",nt=0;if(ft.node()&&!ft.classed(k.jsPlaceholder)){var ht,Oe=yt.select(".h"+Se._id+"title-math-group").node();Oe&&(U&&Ne||!U&&!Ne)?(Je=(qt=n.bBox(Oe)).width,ht=qt.height):(Je=(qt=n.bBox(yt.node())).right-se.l-(U?Ee:be),ht=qt.bottom-se.t-(U?be:Ee),U||de!=="top"||(Nt+=qt.height,nt=qt.height)),Ge&&(ft.attr("transform",t(Je/2+Tt/2,0)),Je*=2),Nt=Math.max(Nt,U?Je:ht)}var Be=2*(U?Y:K)+Nt+H+V/2,Qe=0;!U&&pe.text&&X==="bottom"&&re<=0&&(Be+=Qe=Be/2,nt+=Qe),oe._hColorbarMoveTitle=Qe,oe._hColorbarMoveCBTitle=nt;var ut=H+V;P.select("."+k.cbbg).attr("x",(U?Ee:be)-ut/2-(U?Y:0)).attr("y",(U?be:Ee)-(U?me:K+nt-Qe)).attr(U?"width":"height",Math.max(Be-Qe,2)).attr(U?"height":"width",Math.max(me+ut,2)).call(o.fill,ee).call(o.stroke,I.bordercolor).style("stroke-width",H);var pt=Ge?Math.max(Je-10,0):0;if(P.selectAll("."+k.cboutline).attr("x",(U?Ee:be+Y)+pt).attr("y",(U?be+K-me:Ee)+(Ke?Dt:0)).attr(U?"width":"height",Math.max(ne,2)).attr(U?"height":"width",Math.max(me-(U?2*K+Dt:2*Y+pt),2)).call(o.stroke,I.outlinecolor).style({fill:"none","stroke-width":V}),P.attr("transform",t(se.l-(U?Ue*Be:0),se.t-(U?0:(1-De)*Be-nt))),!U&&(H||w(ee).getAlpha()&&!w.equals(oe.paper_bgcolor,ee))){var bt=xt.selectAll("text"),Lt=bt[0].length,Ct=P.select("."+k.cbbg).node(),mt=n.bBox(Ct),Ot=n.getTranslate(P);bt.each(function(Kt,nn){var yn=Lt-1;if(nn===0||nn===yn){var ln,kn=n.bBox(this),Wn=n.getTranslate(this);if(nn===yn){var wn=kn.right+Wn.x;(ln=mt.right+Ot.x+be-H-2+te-wn)>0&&(ln=0)}else if(nn===0){var on=kn.left+Wn.x;(ln=mt.left+Ot.x+be+H+2-on)<0&&(ln=0)}ln&&(Lt<3?this.setAttribute("transform","translate("+ln+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var _t={},Pt=g[Q],Bt=y[Q],Wt=g[X],Gt=y[X],Xt=Be-ne;U?(G==="pixels"?(_t.y=re,_t.t=me*Wt,_t.b=me*Gt):(_t.t=_t.b=0,_t.yt=re+B*Wt,_t.yb=re-B*Gt),j==="pixels"?(_t.x=te,_t.l=Be*Pt,_t.r=Be*Bt):(_t.l=Xt*Pt,_t.r=Xt*Bt,_t.xl=te-N*Pt,_t.xr=te+N*Bt)):(G==="pixels"?(_t.x=te,_t.l=me*Pt,_t.r=me*Bt):(_t.l=_t.r=0,_t.xl=te+B*Pt,_t.xr=te-B*Bt),j==="pixels"?(_t.y=1-re,_t.t=Be*Wt,_t.b=Be*Gt):(_t.t=Xt*Wt,_t.b=Xt*Gt,_t.yt=re-N*Wt,_t.yb=re+N*Gt)),s.autoMargin(R,I._id,_t)}],R)}(C,A,h);L&&L.then&&(h._promises||[]).push(L),h._context.edits.colorbarPosition&&function(P,I,R){var U,B,G,N=I.orientation==="v",j=R._fullLayout._size;f.init({element:P.node(),gd:R,prepFn:function(){U=P.attr("transform"),r(P)},moveFn:function(V,H){P.attr("transform",U+t(V,H)),B=f.align((N?I._uFrac:I._vFrac)+V/j.w,N?I._thickFrac:I._lenFrac,0,1,I.xanchor),G=f.align((N?I._vFrac:1-I._uFrac)-H/j.h,N?I._lenFrac:I._thickFrac,0,1,I.yanchor);var ee=f.getCursor(B,G,I.xanchor,I.yanchor);r(P,ee)},doneFn:function(){if(r(P),B!==void 0&&G!==void 0){var V={};V[I._propPrefix+"x"]=B,V[I._propPrefix+"y"]=G,I._traceIndex!==void 0?T.call("_guiRestyle",R,V,I._traceIndex):T.call("_guiRelayout",R,V)}}})}(C,A,h)}),M.exit().each(function(A){s.autoMargin(h,A._id)}).remove(),M.order()}}},76228:function(D,E,e){var _=e(71828);D.exports=function(w){return _.isPlainObject(w.colorbar)}},12311:function(D,E,e){D.exports={moduleType:"component",name:"colorbar",attributes:e(63583),supplyDefaults:e(62499),draw:e(98981).draw,hasColorbar:e(76228)}},50693:function(D,E,e){var _=e(63583),w=e(30587).counter,s=e(78607),T=e(63282).scales;function m(f){return"`"+f+"`"}s(T),D.exports=function(f,l){f=f||"";var t,a=(l=l||{}).cLetter||"c",r=("onlyIfNumerical"in l&&l.onlyIfNumerical,"noScale"in l?l.noScale:f==="marker.line"),n="showScaleDflt"in l?l.showScaleDflt:a==="z",o=typeof l.colorscaleDflt=="string"?T[l.colorscaleDflt]:null,i=l.editTypeOverride||"",u=f?f+".":"";"colorAttr"in l?(t=l.colorAttr,l.colorAttr):m(u+(t={z:"z",c:"color"}[a]));var p=a+"auto",c=a+"min",b=a+"max",d=a+"mid",v={};v[c]=v[b]=void 0;var x={};x[p]=!1;var g={};return t==="color"&&(g.color={valType:"color",arrayOk:!0,editType:i||"style"},l.anim&&(g.color.anim=!0)),g[p]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:v},g[c]={valType:"number",dflt:null,editType:i||"plot",impliedEdits:x},g[b]={valType:"number",dflt:null,editType:i||"plot",impliedEdits:x},g[d]={valType:"number",dflt:null,editType:"calc",impliedEdits:v},g.colorscale={valType:"colorscale",editType:"calc",dflt:o,impliedEdits:{autocolorscale:!1}},g.autocolorscale={valType:"boolean",dflt:l.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},g.reversescale={valType:"boolean",dflt:!1,editType:"plot"},r||(g.showscale={valType:"boolean",dflt:n,editType:"calc"},g.colorbar=_),l.noColorAxis||(g.coloraxis={valType:"subplotid",regex:w("coloraxis"),dflt:null,editType:"calc"}),g}},78803:function(D,E,e){var _=e(92770),w=e(71828),s=e(52075).extractOpts;D.exports=function(T,m,f){var l,t=T._fullLayout,a=f.vals,r=f.containerStr,n=r?w.nestedProperty(m,r).get():m,o=s(n),i=o.auto!==!1,u=o.min,p=o.max,c=o.mid,b=function(){return w.aggNums(Math.min,null,a)},d=function(){return w.aggNums(Math.max,null,a)};u===void 0?u=b():i&&(u=n._colorAx&&_(u)?Math.min(u,b()):b()),p===void 0?p=d():i&&(p=n._colorAx&&_(p)?Math.max(p,d()):d()),i&&c!==void 0&&(p-c>c-u?u=c-(p-c):p-c=0?t.colorscale.sequential:t.colorscale.sequentialminus,o._sync("colorscale",l))}},33046:function(D,E,e){var _=e(71828),w=e(52075).hasColorscale,s=e(52075).extractOpts;D.exports=function(T,m){function f(i,u){var p=i["_"+u];p!==void 0&&(i[u]=p)}function l(i,u){var p=u.container?_.nestedProperty(i,u.container).get():i;if(p)if(p.coloraxis)p._colorAx=m[p.coloraxis];else{var c=s(p),b=c.auto;(b||c.min===void 0)&&f(p,u.min),(b||c.max===void 0)&&f(p,u.max),c.autocolorscale&&f(p,"colorscale")}}for(var t=0;t=0;b--,d++){var v=u[b];c[d]=[1-v[0],v[1]]}return c}function o(u,p){p=p||{};for(var c=u.domain,b=u.range,d=b.length,v=new Array(d),x=0;x1.3333333333333333-f?m:f}},70461:function(D,E,e){var _=e(71828),w=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];D.exports=function(s,T,m,f){return s=m==="left"?0:m==="center"?1:m==="right"?2:_.constrain(Math.floor(3*s),0,2),T=f==="bottom"?0:f==="middle"?1:f==="top"?2:_.constrain(Math.floor(3*T),0,2),w[T][s]}},64505:function(D,E){E.selectMode=function(e){return e==="lasso"||e==="select"},E.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"},E.openMode=function(e){return e==="drawline"||e==="drawopenpath"},E.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"},E.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"},E.selectingOrDrawing=function(e){return E.freeMode(e)||E.rectMode(e)}},28569:function(D,E,e){var _=e(48956),w=e(57035),s=e(38520),T=e(71828).removeElement,m=e(85555),f=D.exports={};f.align=e(92807),f.getCursor=e(70461);var l=e(26041);function t(){var r=document.createElement("div");r.className="dragcover";var n=r.style;return n.position="fixed",n.left=0,n.right=0,n.top=0,n.bottom=0,n.zIndex=999999999,n.background="none",document.body.appendChild(r),r}function a(r){return _(r.changedTouches?r.changedTouches[0]:r,document.body)}f.unhover=l.wrapped,f.unhoverRaw=l.raw,f.init=function(r){var n,o,i,u,p,c,b,d,v=r.gd,x=1,g=v._context.doubleClickDelay,y=r.element;v._mouseDownTime||(v._mouseDownTime=0),y.style.pointerEvents="all",y.onmousedown=h,s?(y._ontouchstart&&y.removeEventListener("touchstart",y._ontouchstart),y._ontouchstart=h,y.addEventListener("touchstart",h,{passive:!1})):y.ontouchstart=h;var k=r.clampFn||function(C,L,P){return Math.abs(C)g&&(x=Math.max(x-1,1)),v._dragged)r.doneFn&&r.doneFn();else if(r.clickFn&&r.clickFn(x,c),!d){var L;try{L=new MouseEvent("click",C)}catch{var P=a(C);(L=document.createEvent("MouseEvents")).initMouseEvent("click",C.bubbles,C.cancelable,C.view,C.detail,C.screenX,C.screenY,P[0],P[1],C.ctrlKey,C.altKey,C.shiftKey,C.metaKey,C.button,C.relatedTarget)}b.dispatchEvent(L)}v._dragging=!1,v._dragged=!1}else v._dragged=!1}},f.coverSlip=t},26041:function(D,E,e){var _=e(11086),w=e(79990),s=e(24401).getGraphDiv,T=e(26675),m=D.exports={};m.wrapped=function(f,l,t){(f=s(f))._fullLayout&&w.clear(f._fullLayout._uid+T.HOVERID),m.raw(f,l,t)},m.raw=function(f,l){var t=f._fullLayout,a=f._hoverdata;l||(l={}),l.target&&!f._dragged&&_.triggerHandler(f,"plotly_beforehover",l)===!1||(t._hoverlayer.selectAll("g").remove(),t._hoverlayer.selectAll("line").remove(),t._hoverlayer.selectAll("circle").remove(),f._hoverdata=void 0,l.target&&a&&f.emit("plotly_unhover",{event:l,points:a}))}},79952:function(D,E){E.P={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},E.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(D,E,e){var _=e(39898),w=e(71828),s=w.numberFormat,T=e(92770),m=e(84267),f=e(73972),l=e(7901),t=e(21081),a=w.strTranslate,r=e(63893),n=e(77922),o=e(18783).LINE_SPACING,i=e(37822).DESELECTDIM,u=e(34098),p=e(39984),c=e(23469).appendArrayPointValue,b=D.exports={};function d(Te,Ae,Me){var Ce=Ae.fillpattern,ne=Ce&&b.getPatternAttr(Ce.shape,0,"");if(ne){var ue=b.getPatternAttr(Ce.bgcolor,0,null),me=b.getPatternAttr(Ce.fgcolor,0,null),we=Ce.fgopacity,Ee=b.getPatternAttr(Ce.size,0,8),Ue=b.getPatternAttr(Ce.solidity,0,.3),De=Ae.uid;b.pattern(Te,"point",Me,De,ne,Ee,Ue,void 0,Ce.fillmode,ue,me,we)}else Ae.fillcolor&&Te.call(l.fill,Ae.fillcolor)}b.font=function(Te,Ae,Me,Ce){w.isPlainObject(Ae)&&(Ce=Ae.color,Me=Ae.size,Ae=Ae.family),Ae&&Te.style("font-family",Ae),Me+1&&Te.style("font-size",Me+"px"),Ce&&Te.call(l.fill,Ce)},b.setPosition=function(Te,Ae,Me){Te.attr("x",Ae).attr("y",Me)},b.setSize=function(Te,Ae,Me){Te.attr("width",Ae).attr("height",Me)},b.setRect=function(Te,Ae,Me,Ce,ne){Te.call(b.setPosition,Ae,Me).call(b.setSize,Ce,ne)},b.translatePoint=function(Te,Ae,Me,Ce){var ne=Me.c2p(Te.x),ue=Ce.c2p(Te.y);return!!(T(ne)&&T(ue)&&Ae.node())&&(Ae.node().nodeName==="text"?Ae.attr("x",ne).attr("y",ue):Ae.attr("transform",a(ne,ue)),!0)},b.translatePoints=function(Te,Ae,Me){Te.each(function(Ce){var ne=_.select(this);b.translatePoint(Ce,ne,Ae,Me)})},b.hideOutsideRangePoint=function(Te,Ae,Me,Ce,ne,ue){Ae.attr("display",Me.isPtWithinRange(Te,ne)&&Ce.isPtWithinRange(Te,ue)?null:"none")},b.hideOutsideRangePoints=function(Te,Ae){if(Ae._hasClipOnAxisFalse){var Me=Ae.xaxis,Ce=Ae.yaxis;Te.each(function(ne){var ue=ne[0].trace,me=ue.xcalendar,we=ue.ycalendar,Ee=f.traceIs(ue,"bar-like")?".bartext":".point,.textpoint";Te.selectAll(Ee).each(function(Ue){b.hideOutsideRangePoint(Ue,_.select(this),Me,Ce,me,we)})})}},b.crispRound=function(Te,Ae,Me){return Ae&&T(Ae)?Te._context.staticPlot?Ae:Ae<1?1:Math.round(Ae):Me||0},b.singleLineStyle=function(Te,Ae,Me,Ce,ne){Ae.style("fill","none");var ue=(((Te||[])[0]||{}).trace||{}).line||{},me=Me||ue.width||0,we=ne||ue.dash||"";l.stroke(Ae,Ce||ue.color),b.dashLine(Ae,we,me)},b.lineGroupStyle=function(Te,Ae,Me,Ce){Te.style("fill","none").each(function(ne){var ue=(((ne||[])[0]||{}).trace||{}).line||{},me=Ae||ue.width||0,we=Ce||ue.dash||"";_.select(this).call(l.stroke,Me||ue.color).call(b.dashLine,we,me)})},b.dashLine=function(Te,Ae,Me){Me=+Me||0,Ae=b.dashStyle(Ae,Me),Te.style({"stroke-dasharray":Ae,"stroke-width":Me+"px"})},b.dashStyle=function(Te,Ae){Ae=+Ae||1;var Me=Math.max(Ae,3);return Te==="solid"?Te="":Te==="dot"?Te=Me+"px,"+Me+"px":Te==="dash"?Te=3*Me+"px,"+3*Me+"px":Te==="longdash"?Te=5*Me+"px,"+5*Me+"px":Te==="dashdot"?Te=3*Me+"px,"+Me+"px,"+Me+"px,"+Me+"px":Te==="longdashdot"&&(Te=5*Me+"px,"+2*Me+"px,"+Me+"px,"+2*Me+"px"),Te},b.singleFillStyle=function(Te,Ae){var Me=_.select(Te.node());d(Te,((Me.data()[0]||[])[0]||{}).trace||{},Ae)},b.fillGroupStyle=function(Te,Ae){Te.style("stroke-width",0).each(function(Me){var Ce=_.select(this);Me[0].trace&&d(Ce,Me[0].trace,Ae)})};var v=e(90998);b.symbolNames=[],b.symbolFuncs=[],b.symbolBackOffs=[],b.symbolNeedLines={},b.symbolNoDot={},b.symbolNoFill={},b.symbolList=[],Object.keys(v).forEach(function(Te){var Ae=v[Te],Me=Ae.n;b.symbolList.push(Me,String(Me),Te,Me+100,String(Me+100),Te+"-open"),b.symbolNames[Me]=Te,b.symbolFuncs[Me]=Ae.f,b.symbolBackOffs[Me]=Ae.backoff||0,Ae.needLine&&(b.symbolNeedLines[Me]=!0),Ae.noDot?b.symbolNoDot[Me]=!0:b.symbolList.push(Me+200,String(Me+200),Te+"-dot",Me+300,String(Me+300),Te+"-open-dot"),Ae.noFill&&(b.symbolNoFill[Me]=!0)});var x=b.symbolNames.length;function g(Te,Ae,Me,Ce){var ne=Te%100;return b.symbolFuncs[ne](Ae,Me,Ce)+(Te>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}b.symbolNumber=function(Te){if(T(Te))Te=+Te;else if(typeof Te=="string"){var Ae=0;Te.indexOf("-open")>0&&(Ae=100,Te=Te.replace("-open","")),Te.indexOf("-dot")>0&&(Ae+=200,Te=Te.replace("-dot","")),(Te=b.symbolNames.indexOf(Te))>=0&&(Te+=Ae)}return Te%100>=x||Te>=400?0:Math.floor(Math.max(Te,0))};var y={x1:1,x2:0,y1:0,y2:0},k={x1:0,x2:0,y1:1,y2:0},h=s("~f"),M={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:y},horizontalreversed:{node:"linearGradient",attrs:y,reversed:!0},vertical:{node:"linearGradient",attrs:k},verticalreversed:{node:"linearGradient",attrs:k,reversed:!0}};b.gradient=function(Te,Ae,Me,Ce,ne,ue){for(var me=ne.length,we=M[Ce],Ee=new Array(me),Ue=0;Ue=100;var Ue=ze(Te,Me),De=K(Te,Me);Ae.attr("d",g(Ee,we,Ue,De))}var je,ge,be,Se=!1;if(Te.so)be=me.outlierwidth,ge=me.outliercolor,je=ue.outliercolor;else{var Ne=(me||{}).width;be=(Te.mlw+1||Ne+1||(Te.trace?(Te.trace.marker.line||{}).width:0)+1)-1||0,ge="mlc"in Te?Te.mlcc=Ce.lineScale(Te.mlc):w.isArrayOrTypedArray(me.color)?l.defaultLine:me.color,w.isArrayOrTypedArray(ue.color)&&(je=l.defaultLine,Se=!0),je="mc"in Te?Te.mcc=Ce.markerScale(Te.mc):ue.color||"rgba(0,0,0,0)",Ce.selectedColorFn&&(je=Ce.selectedColorFn(Te))}if(Te.om)Ae.call(l.stroke,je).style({"stroke-width":(be||1)+"px",fill:"none"});else{Ae.style("stroke-width",(Te.isBlank?0:be)+"px");var Ye=ue.gradient,Ze=Te.mgt;Ze?Se=!0:Ze=Ye&&Ye.type,w.isArrayOrTypedArray(Ze)&&(Ze=Ze[0],M[Ze]||(Ze=0));var st=ue.pattern,ot=st&&b.getPatternAttr(st.shape,Te.i,"");if(Ze&&Ze!=="none"){var ft=Te.mgc;ft?Se=!0:ft=Ye.color;var yt=Me.uid;Se&&(yt+="-"+Te.i),b.gradient(Ae,ne,yt,Ze,[[0,ft],[1,je]],"fill")}else if(ot){var Et=b.getPatternAttr(st.bgcolor,Te.i,null),Tt=b.getPatternAttr(st.fgcolor,Te.i,null),xt=st.fgopacity,Dt=b.getPatternAttr(st.size,Te.i,8),It=b.getPatternAttr(st.solidity,Te.i,.3),Ft=Te.mcc||w.isArrayOrTypedArray(st.shape)||w.isArrayOrTypedArray(st.bgcolor)||w.isArrayOrTypedArray(st.size)||w.isArrayOrTypedArray(st.solidity),qt=Me.uid;Ft&&(qt+="-"+Te.i),b.pattern(Ae,"point",ne,qt,ot,Dt,It,Te.mcc,st.fillmode,Et,Tt,xt)}else l.fill(Ae,je);be&&l.stroke(Ae,ge)}},b.makePointStyleFns=function(Te){var Ae={},Me=Te.marker;return Ae.markerScale=b.tryColorscale(Me,""),Ae.lineScale=b.tryColorscale(Me,"line"),f.traceIs(Te,"symbols")&&(Ae.ms2mrc=u.isBubble(Te)?p(Te):function(){return(Me.size||6)/2}),Te.selectedpoints&&w.extendFlat(Ae,b.makeSelectedPointStyleFns(Te)),Ae},b.makeSelectedPointStyleFns=function(Te){var Ae={},Me=Te.selected||{},Ce=Te.unselected||{},ne=Te.marker||{},ue=Me.marker||{},me=Ce.marker||{},we=ne.opacity,Ee=ue.opacity,Ue=me.opacity,De=Ee!==void 0,je=Ue!==void 0;(w.isArrayOrTypedArray(we)||De||je)&&(Ae.selectedOpacityFn=function(ft){var yt=ft.mo===void 0?ne.opacity:ft.mo;return ft.selected?De?Ee:yt:je?Ue:i*yt});var ge=ne.color,be=ue.color,Se=me.color;(be||Se)&&(Ae.selectedColorFn=function(ft){var yt=ft.mcc||ge;return ft.selected?be||yt:Se||yt});var Ne=ne.size,Ye=ue.size,Ze=me.size,st=Ye!==void 0,ot=Ze!==void 0;return f.traceIs(Te,"symbols")&&(st||ot)&&(Ae.selectedSizeFn=function(ft){var yt=ft.mrc||Ne/2;return ft.selected?st?Ye/2:yt:ot?Ze/2:yt}),Ae},b.makeSelectedTextStyleFns=function(Te){var Ae={},Me=Te.selected||{},Ce=Te.unselected||{},ne=Te.textfont||{},ue=Me.textfont||{},me=Ce.textfont||{},we=ne.color,Ee=ue.color,Ue=me.color;return Ae.selectedTextColorFn=function(De){var je=De.tc||we;return De.selected?Ee||je:Ue||(Ee?je:l.addOpacity(je,i))},Ae},b.selectedPointStyle=function(Te,Ae){if(Te.size()&&Ae.selectedpoints){var Me=b.makeSelectedPointStyleFns(Ae),Ce=Ae.marker||{},ne=[];Me.selectedOpacityFn&&ne.push(function(ue,me){ue.style("opacity",Me.selectedOpacityFn(me))}),Me.selectedColorFn&&ne.push(function(ue,me){l.fill(ue,Me.selectedColorFn(me))}),Me.selectedSizeFn&&ne.push(function(ue,me){var we=me.mx||Ce.symbol||0,Ee=Me.selectedSizeFn(me);ue.attr("d",g(b.symbolNumber(we),Ee,ze(me,Ae),K(me,Ae))),me.mrc2=Ee}),ne.length&&Te.each(function(ue){for(var me=_.select(this),we=0;we0?Me:0}function R(Te,Ae,Me){return Me&&(Te=V(Te)),Ae?B(Te[1]):U(Te[0])}function U(Te){var Ae=_.round(Te,2);return A=Ae,Ae}function B(Te){var Ae=_.round(Te,2);return C=Ae,Ae}function G(Te,Ae,Me,Ce){var ne=Te[0]-Ae[0],ue=Te[1]-Ae[1],me=Me[0]-Ae[0],we=Me[1]-Ae[1],Ee=Math.pow(ne*ne+ue*ue,.25),Ue=Math.pow(me*me+we*we,.25),De=(Ue*Ue*ne-Ee*Ee*me)*Ce,je=(Ue*Ue*ue-Ee*Ee*we)*Ce,ge=3*Ue*(Ee+Ue),be=3*Ee*(Ee+Ue);return[[U(Ae[0]+(ge&&De/ge)),B(Ae[1]+(ge&&je/ge))],[U(Ae[0]-(be&&De/be)),B(Ae[1]-(be&&je/be))]]}b.textPointStyle=function(Te,Ae,Me){if(Te.size()){var Ce;if(Ae.selectedpoints){var ne=b.makeSelectedTextStyleFns(Ae);Ce=ne.selectedTextColorFn}var ue=Ae.texttemplate,me=Me._fullLayout;Te.each(function(we){var Ee=_.select(this),Ue=ue?w.extractOption(we,Ae,"txt","texttemplate"):w.extractOption(we,Ae,"tx","text");if(Ue||Ue===0){if(ue){var De=Ae._module.formatLabels,je=De?De(we,Ae,me):{},ge={};c(ge,Ae,we.i);var be=Ae._meta||{};Ue=w.texttemplateString(Ue,je,me._d3locale,ge,we,be)}var Se=we.tp||Ae.textposition,Ne=I(we,Ae),Ye=Ce?Ce(we):we.tc||Ae.textfont.color;Ee.call(b.font,we.tf||Ae.textfont.family,Ne,Ye).text(Ue).call(r.convertToTspans,Me).call(P,Se,Ne,we.mrc)}else Ee.remove()})}},b.selectedTextStyle=function(Te,Ae){if(Te.size()&&Ae.selectedpoints){var Me=b.makeSelectedTextStyleFns(Ae);Te.each(function(Ce){var ne=_.select(this),ue=Me.selectedTextColorFn(Ce),me=Ce.tp||Ae.textposition,we=I(Ce,Ae);l.fill(ne,ue);var Ee=f.traceIs(Ae,"bar-like");P(ne,me,we,Ce.mrc2||Ce.mrc,Ee)})}},b.smoothopen=function(Te,Ae){if(Te.length<3)return"M"+Te.join("L");var Me,Ce="M"+Te[0],ne=[];for(Me=1;Me=Ee||ft>=De&&ft<=Ee)&&(yt<=je&&yt>=Ue||yt>=je&&yt<=Ue)&&(Te=[ft,yt])}return Te}b.steps=function(Te){var Ae=N[Te]||j;return function(Me){for(var Ce="M"+U(Me[0][0])+","+B(Me[0][1]),ne=Me.length,ue=1;ue=1e4&&(b.savedBBoxes={},H=0),Me&&(b.savedBBoxes[Me]=be),H++,w.extendFlat({},be)},b.setClipUrl=function(Te,Ae,Me){Te.attr("clip-path",Q(Ae,Me))},b.getTranslate=function(Te){var Ae=(Te[Te.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(Me,Ce,ne){return[Ce,ne].join(" ")}).split(" ");return{x:+Ae[0]||0,y:+Ae[1]||0}},b.setTranslate=function(Te,Ae,Me){var Ce=Te.attr?"attr":"getAttribute",ne=Te.attr?"attr":"setAttribute",ue=Te[Ce]("transform")||"";return Ae=Ae||0,Me=Me||0,ue=ue.replace(/(\btranslate\(.*?\);?)/,"").trim(),ue=(ue+=a(Ae,Me)).trim(),Te[ne]("transform",ue),ue},b.getScale=function(Te){var Ae=(Te[Te.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(Me,Ce,ne){return[Ce,ne].join(" ")}).split(" ");return{x:+Ae[0]||1,y:+Ae[1]||1}},b.setScale=function(Te,Ae,Me){var Ce=Te.attr?"attr":"getAttribute",ne=Te.attr?"attr":"setAttribute",ue=Te[Ce]("transform")||"";return Ae=Ae||1,Me=Me||1,ue=ue.replace(/(\bscale\(.*?\);?)/,"").trim(),ue=(ue+="scale("+Ae+","+Me+")").trim(),Te[ne]("transform",ue),ue};var X=/\s*sc.*/;b.setPointGroupScale=function(Te,Ae,Me){if(Ae=Ae||1,Me=Me||1,Te){var Ce=Ae===1&&Me===1?"":"scale("+Ae+","+Me+")";Te.each(function(){var ne=(this.getAttribute("transform")||"").replace(X,"");ne=(ne+=Ce).trim(),this.setAttribute("transform",ne)})}};var Y=/translate\([^)]*\)\s*$/;function K(Te,Ae){var Me;return Te&&(Me=Te.mf),Me===void 0&&(Me=Ae.marker&&Ae.marker.standoff||0),Ae._geo||Ae._xA?Me:-Me}b.setTextPointsScale=function(Te,Ae,Me){Te&&Te.each(function(){var Ce,ne=_.select(this),ue=ne.select("text");if(ue.node()){var me=parseFloat(ue.attr("x")||0),we=parseFloat(ue.attr("y")||0),Ee=(ne.attr("transform")||"").match(Y);Ce=Ae===1&&Me===1?[]:[a(me,we),"scale("+Ae+","+Me+")",a(-me,-we)],Ee&&Ce.push(Ee),ne.attr("transform",Ce.join(""))}})},b.getMarkerStandoff=K;var te,re,oe,se,ce,xe,pe=Math.atan2,de=Math.cos,he=Math.sin;function ye(Te,Ae){var Me=Ae[0],Ce=Ae[1];return[Me*de(Te)-Ce*he(Te),Me*he(Te)+Ce*de(Te)]}function ze(Te,Ae){var Me,Ce,ne=Te.ma;ne===void 0&&(ne=Ae.marker.angle||0);var ue=Ae.marker.angleref;if(ue==="previous"||ue==="north"){if(Ae._geo){var me=Ae._geo.project(Te.lonlat);Me=me[0],Ce=me[1]}else{var we=Ae._xA,Ee=Ae._yA;if(!we||!Ee)return 90;Me=we.c2p(Te.x),Ce=Ee.c2p(Te.y)}if(Ae._geo){var Ue,De=Te.lonlat[0],je=Te.lonlat[1],ge=Ae._geo.project([De,je+1e-5]),be=Ae._geo.project([De+1e-5,je]),Se=pe(be[1]-Ce,be[0]-Me),Ne=pe(ge[1]-Ce,ge[0]-Me);if(ue==="north")Ue=ne/180*Math.PI;else if(ue==="previous"){var Ye=De/180*Math.PI,Ze=je/180*Math.PI,st=te/180*Math.PI,ot=re/180*Math.PI,ft=st-Ye,yt=de(ot)*he(ft),Et=he(ot)*de(Ze)-de(ot)*he(Ze)*de(ft);Ue=-pe(yt,Et)-Math.PI,te=De,re=je}var Tt=ye(Se,[de(Ue),0]),xt=ye(Ne,[he(Ue),0]);ne=pe(Tt[1]+xt[1],Tt[0]+xt[0])/Math.PI*180,ue!=="previous"||xe===Ae.uid&&Te.i===ce+1||(ne=null)}if(ue==="previous"&&!Ae._geo)if(xe===Ae.uid&&Te.i===ce+1&&T(Me)&&T(Ce)){var Dt=Me-oe,It=Ce-se,Ft=Ae.line&&Ae.line.shape||"",qt=Ft.slice(Ft.length-1);qt==="h"&&(It=0),qt==="v"&&(Dt=0),ne+=pe(It,Dt)/Math.PI*180+90}else ne=null}return oe=Me,se=Ce,ce=Te.i,xe=Ae.uid,ne}b.getMarkerAngle=ze},90998:function(D,E,e){var _,w,s,T,m=e(95616),f=e(39898).round,l="M0,0Z",t=Math.sqrt(2),a=Math.sqrt(3),r=Math.PI,n=Math.cos,o=Math.sin;function i(p){return p===null}function u(p,c,b){if(!(p&&p%360!=0||c))return b;if(s===p&&T===c&&_===b)return w;function d(R,U){var B=n(R),G=o(R),N=U[0],j=U[1]+(c||0);return[N*B-j*G,N*G+j*B]}s=p,T=c,_=b;for(var v=p/180*r,x=0,g=0,y=m(b),k="",h=0;h0,o=m._context.staticPlot;f.each(function(i){var u,p=i[0].trace,c=p.error_x||{},b=p.error_y||{};p.ids&&(u=function(g){return g.id});var d=T.hasMarkers(p)&&p.marker.maxdisplayed>0;b.visible||c.visible||(i=[]);var v=_.select(this).selectAll("g.errorbar").data(i,u);if(v.exit().remove(),i.length){c.visible||v.selectAll("path.xerror").remove(),b.visible||v.selectAll("path.yerror").remove(),v.style("opacity",1);var x=v.enter().append("g").classed("errorbar",!0);n&&x.style("opacity",0).transition().duration(t.duration).style("opacity",1),s.setClipUrl(v,l.layerClipId,m),v.each(function(g){var y=_.select(this),k=function(P,I,R){var U={x:I.c2p(P.x),y:R.c2p(P.y)};return P.yh!==void 0&&(U.yh=R.c2p(P.yh),U.ys=R.c2p(P.ys),w(U.ys)||(U.noYS=!0,U.ys=R.c2p(P.ys,!0))),P.xh!==void 0&&(U.xh=I.c2p(P.xh),U.xs=I.c2p(P.xs),w(U.xs)||(U.noXS=!0,U.xs=I.c2p(P.xs,!0))),U}(g,a,r);if(!d||g.vis){var h,M=y.select("path.yerror");if(b.visible&&w(k.x)&&w(k.yh)&&w(k.ys)){var A=b.width;h="M"+(k.x-A)+","+k.yh+"h"+2*A+"m-"+A+",0V"+k.ys,k.noYS||(h+="m-"+A+",0h"+2*A),M.size()?n&&(M=M.transition().duration(t.duration).ease(t.easing)):M=y.append("path").style("vector-effect",o?"none":"non-scaling-stroke").classed("yerror",!0),M.attr("d",h)}else M.remove();var C=y.select("path.xerror");if(c.visible&&w(k.y)&&w(k.xh)&&w(k.xs)){var L=(c.copy_ystyle?b:c).width;h="M"+k.xh+","+(k.y-L)+"v"+2*L+"m0,-"+L+"H"+k.xs,k.noXS||(h+="m0,-"+L+"v"+2*L),C.size()?n&&(C=C.transition().duration(t.duration).ease(t.easing)):C=y.append("path").style("vector-effect",o?"none":"non-scaling-stroke").classed("xerror",!0),C.attr("d",h)}else C.remove()}})}})}},62662:function(D,E,e){var _=e(39898),w=e(7901);D.exports=function(s){s.each(function(T){var m=T[0].trace,f=m.error_y||{},l=m.error_x||{},t=_.select(this);t.selectAll("path.yerror").style("stroke-width",f.thickness+"px").call(w.stroke,f.color),l.copy_ystyle&&(l=f),t.selectAll("path.xerror").style("stroke-width",l.thickness+"px").call(w.stroke,l.color)})}},77914:function(D,E,e){var _=e(41940),w=e(528).hoverlabel,s=e(1426).extendFlat;D.exports={hoverlabel:{bgcolor:s({},w.bgcolor,{arrayOk:!0}),bordercolor:s({},w.bordercolor,{arrayOk:!0}),font:_({arrayOk:!0,editType:"none"}),align:s({},w.align,{arrayOk:!0}),namelength:s({},w.namelength,{arrayOk:!0}),editType:"none"}}},30732:function(D,E,e){var _=e(71828),w=e(73972);function s(T,m,f,l){l=l||_.identity,Array.isArray(T)&&(m[0][f]=l(T))}D.exports=function(T){var m=T.calcdata,f=T._fullLayout;function l(o){return function(i){return _.coerceHoverinfo({hoverinfo:i},{_module:o._module},f)}}for(var t=0;t=0&&a.indexne[0]._length||Ke<0||Ke>ue[0]._length)return o.unhoverRaw(se,ce)}else Je="xpx"in ce?ce.xpx:ne[0]._length/2,Ke="ypx"in ce?ce.ypx:ue[0]._length/2;if(ce.pointerX=Je+ne[0]._offset,ce.pointerY=Ke+ue[0]._offset,be="xval"in ce?p.flat(he,ce.xval):p.p2c(ne,Je),Se="yval"in ce?p.flat(he,ce.yval):p.p2c(ue,Ke),!w(be[0])||!w(Se[0]))return T.warn("Fx.hover failed",ce,se),o.unhoverRaw(se,ce)}var ht=1/0;function Oe($t,mn){for(Ye=0;YeDt&&(It.splice(0,Dt),ht=It[0].distance),Ae&&ge!==0&&It.length===0){xt.distance=ge,xt.index=!1;var Zn=st._module.hoverPoints(xt,Et,Tt,"closest",{hoverLayer:ye._hoverlayer});if(Zn&&(Zn=Zn.filter(function(Jt){return Jt.spikeDistance<=ge})),Zn&&Zn.length){var Qn,hr=Zn.filter(function(Jt){return Jt.xa.showspikes&&Jt.xa.spikesnap!=="hovered data"});if(hr.length){var tn=hr[0];w(tn.x0)&&w(tn.y0)&&(Qn=Qe(tn),(!qt.vLinePoint||qt.vLinePoint.spikeDistance>Qn.spikeDistance)&&(qt.vLinePoint=Qn))}var Pn=Zn.filter(function(Jt){return Jt.ya.showspikes&&Jt.ya.spikesnap!=="hovered data"});if(Pn.length){var jt=Pn[0];w(jt.x0)&&w(jt.y0)&&(Qn=Qe(jt),(!qt.hLinePoint||qt.hLinePoint.spikeDistance>Qn.spikeDistance)&&(qt.hLinePoint=Qn))}}}}}function Be($t,mn,Ln){for(var En,jn=null,$n=1/0,Zn=0;Zn<$t.length;Zn++)En=$t[Zn].spikeDistance,Ln&&Zn===0&&(En=-1/0),En<=$n&&En<=mn&&(jn=$t[Zn],$n=En);return jn}function Qe($t){return $t?{xa:$t.xa,ya:$t.ya,x:$t.xSpike!==void 0?$t.xSpike:($t.x0+$t.x1)/2,y:$t.ySpike!==void 0?$t.ySpike:($t.y0+$t.y1)/2,distance:$t.distance,spikeDistance:$t.spikeDistance,curveNumber:$t.trace.index,color:$t.color,pointNumber:$t.index}:null}Oe();var ut={fullLayout:ye,container:ye._hoverlayer,event:ce},pt=se._spikepoints,bt={vLinePoint:qt.vLinePoint,hLinePoint:qt.hLinePoint};se._spikepoints=bt;var Lt=function(){It.sort(function($t,mn){return $t.distance-mn.distance}),It=function($t,mn){for(var Ln=mn.charAt(0),En=[],jn=[],$n=[],Zn=0;Zn<$t.length;Zn++){var Qn=$t[Zn];u.traceIs(Qn.trace,"bar-like")||u.traceIs(Qn.trace,"box-violin")?$n.push(Qn):Qn.trace[Ln+"period"]?jn.push(Qn):En.push(Qn)}return En.concat(jn).concat($n)}(It,De)};Lt();var Ct=De.charAt(0),mt=(Ct==="x"||Ct==="y")&&It[0]&&C[It[0].trace.type];if(Ae&&ge!==0&&It.length!==0){var Ot=Be(It.filter(function($t){return $t.ya.showspikes}),ge,mt);qt.hLinePoint=Qe(Ot);var _t=Be(It.filter(function($t){return $t.xa.showspikes}),ge,mt);qt.vLinePoint=Qe(_t)}if(It.length===0){var Pt=o.unhoverRaw(se,ce);return!Ae||qt.hLinePoint===null&&qt.vLinePoint===null||j(pt)&&N(se,qt,ut),Pt}if(Ae&&j(pt)&&N(se,qt,ut),p.isXYhover(yt)&&It[0].length!==0&&It[0].trace.type!=="splom"){var Bt=It[0],Wt=(It=A[Bt.trace.type]?It.filter(function($t){return $t.trace.index===Bt.trace.index}):[Bt]).length;Oe(H("x",Bt,ye),H("y",Bt,ye));var Gt,Xt=[],Kt={},nn=0,yn=function($t){var mn=A[$t.trace.type]?L($t):$t.trace.index;if(Kt[mn]){var Ln=Kt[mn]-1,En=Xt[Ln];Ln>0&&Math.abs($t.distance)Wt-1;Gt--)yn(It[Gt]);It=Xt,Lt()}var ln=se._hoverdata,kn=[],Wn=ee(se),wn=Q(se);for(Ne=0;Ne1||It.length>1)||De==="closest"&&Nt&&It.length>1,gr=n.combine(ye.plot_bgcolor||n.background,ye.paper_bgcolor),ir=I(It,{gd:se,hovermode:De,rotateLabels:Tr,bgColor:gr,container:ye._hoverlayer,outerContainer:ye._paper.node(),commonLabelOpts:ye.hoverlabel,hoverdistance:ye.hoverdistance}),dr=ir.hoverLabels;if(p.isUnifiedHover(De)||(function($t,mn,Ln,En){var jn,$n,Zn,Qn,hr,tn,Pn,jt=mn?"xa":"ya",Jt=mn?"ya":"xa",un=0,Rn=1,On=$t.size(),Sn=new Array(On),pn=0,bn=En.minX,dn=En.maxX,vn=En.minY,An=En.maxY,Bn=function(Mr){return Mr*Ln._invScaleX},Xn=function(Mr){return Mr*Ln._invScaleY};function er(Mr){var Lr=Mr[0],pr=Mr[Mr.length-1];if($n=Lr.pmin-Lr.pos-Lr.dp+Lr.size,Zn=pr.pos+pr.dp+pr.size-Lr.pmax,$n>.01){for(hr=Mr.length-1;hr>=0;hr--)Mr[hr].dp+=$n;jn=!1}if(!(Zn<.01)){if($n<-.01){for(hr=Mr.length-1;hr>=0;hr--)Mr[hr].dp-=Zn;jn=!1}if(jn){var Pr=0;for(Qn=0;QnLr.pmax&&Pr++;for(Qn=Mr.length-1;Qn>=0&&!(Pr<=0);Qn--)(tn=Mr[Qn]).pos>Lr.pmax-1&&(tn.del=!0,Pr--);for(Qn=0;Qn=0;hr--)Mr[hr].dp-=Zn;for(Qn=Mr.length-1;Qn>=0&&!(Pr<=0);Qn--)(tn=Mr[Qn]).pos+tn.dp+tn.size>Lr.pmax&&(tn.del=!0,Pr--)}}}for($t.each(function(Mr){var Lr=Mr[jt],pr=Mr[Jt],Pr=Lr._id.charAt(0)==="x",Hr=Lr.range;pn===0&&Hr&&Hr[0]>Hr[1]!==Pr&&(Rn=-1);var ci=0,Ti=Pr?Ln.width:Ln.height;if(Ln.hovermode==="x"||Ln.hovermode==="y"){var Mi,fa,Hi=U(Mr,mn),xi=Mr.anchor,Oa=xi==="end"?-1:1;if(xi==="middle")fa=(Mi=Mr.crossPos+(Pr?Xn(Hi.y-Mr.by/2):Bn(Mr.bx/2+Mr.tx2width/2)))+(Pr?Xn(Mr.by):Bn(Mr.bx));else if(Pr)fa=(Mi=Mr.crossPos+Xn(h+Hi.y)-Xn(Mr.by/2-h))+Xn(Mr.by);else{var Ka=Bn(Oa*h+Hi.x),Yo=Ka+Bn(Oa*Mr.bx);Mi=Mr.crossPos+Math.min(Ka,Yo),fa=Mr.crossPos+Math.max(Ka,Yo)}Pr?vn!==void 0&&An!==void 0&&Math.min(fa,An)-Math.max(Mi,vn)>1&&(pr.side==="left"?(ci=pr._mainLinePosition,Ti=Ln.width):Ti=pr._mainLinePosition):bn!==void 0&&dn!==void 0&&Math.min(fa,dn)-Math.max(Mi,bn)>1&&(pr.side==="top"?(ci=pr._mainLinePosition,Ti=Ln.height):Ti=pr._mainLinePosition)}Sn[pn++]=[{datum:Mr,traceIndex:Mr.trace.index,dp:0,pos:Mr.pos,posref:Mr.posref,size:Mr.by*(Pr?g:1)/2,pmin:ci,pmax:Ti}]}),Sn.sort(function(Mr,Lr){return Mr[0].posref-Lr[0].posref||Rn*(Lr[0].traceIndex-Mr[0].traceIndex)});!jn&&un<=On;){for(un++,jn=!0,Qn=0;Qn.01&&sr.pmin===fr.pmin&&sr.pmax===fr.pmax){for(hr=lr.length-1;hr>=0;hr--)lr[hr].dp+=$n;for(Jn.push.apply(Jn,lr),Sn.splice(Qn+1,1),Pn=0,hr=Jn.length-1;hr>=0;hr--)Pn+=Jn[hr].dp;for(Zn=Pn/Jn.length,hr=Jn.length-1;hr>=0;hr--)Jn[hr].dp-=Zn;jn=!1}else Qn++}Sn.forEach(er)}for(Qn=Sn.length-1;Qn>=0;Qn--){var cr=Sn[Qn];for(hr=cr.length-1;hr>=0;hr--){var vr=cr[hr],Sr=vr.datum;Sr.offset=vr.dp,Sr.del=vr.del}}}(dr,Tr,ye,ir.commonLabelBoundingBox),B(dr,Tr,ye._invScaleX,ye._invScaleY)),de&&de.tagName){var yr=u.getComponentMethod("annotations","hasClickToShow")(se,kn);a(_.select(de),yr?"pointer":"")}de&&!pe&&function($t,mn,Ln){if(!Ln||Ln.length!==$t._hoverdata.length)return!0;for(var En=Ln.length-1;En>=0;En--){var jn=Ln[En],$n=$t._hoverdata[En];if(jn.curveNumber!==$n.curveNumber||String(jn.pointNumber)!==String($n.pointNumber)||String(jn.pointNumbers)!==String($n.pointNumbers))return!0}return!1}(se,0,ln)&&(ln&&se.emit("plotly_unhover",{event:ce,points:ln}),se.emit("plotly_hover",{event:ce,points:se._hoverdata,xaxes:ne,yaxes:ue,xvals:be,yvals:Se}))})(Y,K,te,re,oe)})},E.loneHover=function(Y,K){var te=!0;Array.isArray(Y)||(te=!1,Y=[Y]);var re=K.gd,oe=ee(re),se=Q(re),ce=I(Y.map(function(de){var he=de._x0||de.x0||de.x||0,ye=de._x1||de.x1||de.x||0,ze=de._y0||de.y0||de.y||0,Te=de._y1||de.y1||de.y||0,Ae=de.eventData;if(Ae){var Me=Math.min(he,ye),Ce=Math.max(he,ye),ne=Math.min(ze,Te),ue=Math.max(ze,Te),me=de.trace;if(u.traceIs(me,"gl3d")){var we=re._fullLayout[me.scene]._scene.container,Ee=we.offsetLeft,Ue=we.offsetTop;Me+=Ee,Ce+=Ee,ne+=Ue,ue+=Ue}Ae.bbox={x0:Me+se,x1:Ce+se,y0:ne+oe,y1:ue+oe},K.inOut_bbox&&K.inOut_bbox.push(Ae.bbox)}else Ae=!1;return{color:de.color||n.defaultLine,x0:de.x0||de.x||0,x1:de.x1||de.x||0,y0:de.y0||de.y||0,y1:de.y1||de.y||0,xLabel:de.xLabel,yLabel:de.yLabel,zLabel:de.zLabel,text:de.text,name:de.name,idealAlign:de.idealAlign,borderColor:de.borderColor,fontFamily:de.fontFamily,fontSize:de.fontSize,fontColor:de.fontColor,nameLength:de.nameLength,textAlign:de.textAlign,trace:de.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:de.hovertemplate||!1,hovertemplateLabels:de.hovertemplateLabels||!1,eventData:Ae}}),{gd:re,hovermode:"closest",rotateLabels:!1,bgColor:K.bgColor||n.background,container:_.select(K.container),outerContainer:K.outerContainer||K.container}).hoverLabels,xe=0,pe=0;return ce.sort(function(de,he){return de.y0-he.y0}).each(function(de,he){var ye=de.y0-de.by/2;de.offset=ye-5([\s\S]*)<\/extra>/;function I(Y,K){var te=K.gd,re=te._fullLayout,oe=K.hovermode,se=K.rotateLabels,ce=K.bgColor,xe=K.container,pe=K.outerContainer,de=K.commonLabelOpts||{};if(Y.length===0)return[[]];var he=K.fontFamily||c.HOVERFONT,ye=K.fontSize||c.HOVERFONTSIZE,ze=Y[0],Te=ze.xa,Ae=ze.ya,Me=oe.charAt(0),Ce=Me+"Label",ne=ze[Ce];if(ne===void 0&&Te.type==="multicategory")for(var ue=0;uere.width-wn?(yn=re.width-wn,Bt.attr("d","M"+(wn-h)+",0L"+wn+","+Wn+h+"v"+Wn+(2*M+kn.height)+"H-"+wn+"V"+Wn+h+"H"+(wn-2*h)+"Z")):Bt.attr("d","M0,0L"+h+","+Wn+h+"H"+wn+"v"+Wn+(2*M+kn.height)+"H-"+wn+"V"+Wn+h+"H-"+h+"Z"),Ye.minX=yn-wn,Ye.maxX=yn+wn,Te.side==="top"?(Ye.minY=ln-(2*M+kn.height),Ye.maxY=ln-M):(Ye.minY=ln+M,Ye.maxY=ln+(2*M+kn.height))}else{var on,_n,fn;Ae.side==="right"?(on="start",_n=1,fn="",yn=Te._offset+Te._length):(on="end",_n=-1,fn="-",yn=Te._offset),ln=Ae._offset+(ze.y0+ze.y1)/2,Wt.attr("text-anchor",on),Bt.attr("d","M0,0L"+fn+h+","+h+"V"+(M+kn.height/2)+"h"+fn+(2*M+kn.width)+"V-"+(M+kn.height/2)+"H"+fn+h+"V-"+h+"Z"),Ye.minY=ln-(M+kn.height/2),Ye.maxY=ln+(M+kn.height/2),Ae.side==="right"?(Ye.minX=yn+h,Ye.maxX=yn+h+(2*M+kn.width)):(Ye.minX=yn-h-(2*M+kn.width),Ye.maxX=yn-h);var hn,In=kn.height/2,Cn=we-kn.top-In,Nn="clip"+re._uid+"commonlabel"+Ae._id;if(yn=0?Ke:Ge+Oe=0?Ge:mt+Oe=0?Nt:Je+Be=0?Je:Ot+Be=0,Pt.idealAlign!=="top"&&tr||!Tr?tr?(In+=Nn/2,Pt.anchor="start"):Pt.anchor="middle":(In-=Nn/2,Pt.anchor="end"),Pt.crossPos=In;else{if(Pt.pos=In,tr=hn+Cn/2+gr<=Ee,Tr=hn-Cn/2-gr>=0,Pt.idealAlign!=="left"&&tr||!Tr)if(tr)hn+=Cn/2,Pt.anchor="start";else{Pt.anchor="middle";var ir=gr/2,dr=hn+ir-Ee,yr=hn-ir;dr>0&&(hn-=dr),yr<0&&(hn+=-yr)}else hn-=Cn/2,Pt.anchor="end";Pt.crossPos=hn}Wn.attr("text-anchor",Pt.anchor),on&&wn.attr("text-anchor",Pt.anchor),Bt.attr("transform",m(hn,In)+(se?f(v):""))}),{hoverLabels:_t,commonLabelBoundingBox:Ye}}function R(Y,K,te,re,oe,se){var ce="",xe="";Y.nameOverride!==void 0&&(Y.name=Y.nameOverride),Y.name&&(Y.trace._meta&&(Y.name=T.templateString(Y.name,Y.trace._meta)),ce=V(Y.name,Y.nameLength));var pe=te.charAt(0),de=pe==="x"?"y":"x";Y.zLabel!==void 0?(Y.xLabel!==void 0&&(xe+="x: "+Y.xLabel+"
"),Y.yLabel!==void 0&&(xe+="y: "+Y.yLabel+"
"),Y.trace.type!=="choropleth"&&Y.trace.type!=="choroplethmapbox"&&(xe+=(xe?"z: ":"")+Y.zLabel)):K&&Y[pe+"Label"]===oe?xe=Y[de+"Label"]||"":Y.xLabel===void 0?Y.yLabel!==void 0&&Y.trace.type!=="scattercarpet"&&(xe=Y.yLabel):xe=Y.yLabel===void 0?Y.xLabel:"("+Y.xLabel+", "+Y.yLabel+")",!Y.text&&Y.text!==0||Array.isArray(Y.text)||(xe+=(xe?"
":"")+Y.text),Y.extraText!==void 0&&(xe+=(xe?"
":"")+Y.extraText),se&&xe===""&&!Y.hovertemplate&&(ce===""&&se.remove(),xe=ce);var he=Y.hovertemplate||!1;if(he){var ye=Y.hovertemplateLabels||Y;Y[pe+"Label"]!==oe&&(ye[pe+"other"]=ye[pe+"Val"],ye[pe+"otherLabel"]=ye[pe+"Label"]),xe=(xe=T.hovertemplateString(he,ye,re._d3locale,Y.eventData[0]||{},Y.trace._meta)).replace(P,function(ze,Te){return ce=V(Te,Y.nameLength),""})}return[xe,ce]}function U(Y,K){var te=0,re=Y.offset;return K&&(re*=-k,te=Y.offset*y),{x:te,y:re}}function B(Y,K,te,re){var oe=function(ce){return ce*te},se=function(ce){return ce*re};Y.each(function(ce){var xe=_.select(this);if(ce.del)return xe.remove();var pe,de,he,ye,ze=xe.select("text.nums"),Te=ce.anchor,Ae=Te==="end"?-1:1,Me=(ye=(he=(de={start:1,end:-1,middle:0}[(pe=ce).anchor])*(h+M))+de*(pe.txwidth+M),pe.anchor==="middle"&&(he-=pe.tx2width/2,ye+=pe.txwidth/2+M),{alignShift:de,textShiftX:he,text2ShiftX:ye}),Ce=U(ce,K),ne=Ce.x,ue=Ce.y,me=Te==="middle";xe.select("path").attr("d",me?"M-"+oe(ce.bx/2+ce.tx2width/2)+","+se(ue-ce.by/2)+"h"+oe(ce.bx)+"v"+se(ce.by)+"h-"+oe(ce.bx)+"Z":"M0,0L"+oe(Ae*h+ne)+","+se(h+ue)+"v"+se(ce.by/2-h)+"h"+oe(Ae*ce.bx)+"v-"+se(ce.by)+"H"+oe(Ae*h+ne)+"V"+se(ue-h)+"Z");var we=ne+Me.textShiftX,Ee=ue+ce.ty0-ce.by/2+M,Ue=ce.textAlign||"auto";Ue!=="auto"&&(Ue==="left"&&Te!=="start"?(ze.attr("text-anchor","start"),we=me?-ce.bx/2-ce.tx2width/2+M:-ce.bx-M):Ue==="right"&&Te!=="end"&&(ze.attr("text-anchor","end"),we=me?ce.bx/2-ce.tx2width/2-M:ce.bx+M)),ze.call(t.positionText,oe(we),se(Ee)),ce.tx2width&&(xe.select("text.name").call(t.positionText,oe(Me.text2ShiftX+Me.alignShift*M+ne),se(ue+ce.ty0-ce.by/2+M)),xe.select("rect").call(r.setRect,oe(Me.text2ShiftX+(Me.alignShift-1)*ce.tx2width/2+ne),se(ue-ce.by/2-1),oe(ce.tx2width),se(ce.by+2)))})}function G(Y,K){var te=Y.index,re=Y.trace||{},oe=Y.cd[0],se=Y.cd[te]||{};function ce(ze){return ze||w(ze)&&ze===0}var xe=Array.isArray(te)?function(ze,Te){var Ae=T.castOption(oe,te,ze);return ce(Ae)?Ae:T.extractOption({},re,"",Te)}:function(ze,Te){return T.extractOption(se,re,ze,Te)};function pe(ze,Te,Ae){var Me=xe(Te,Ae);ce(Me)&&(Y[ze]=Me)}if(pe("hoverinfo","hi","hoverinfo"),pe("bgcolor","hbg","hoverlabel.bgcolor"),pe("borderColor","hbc","hoverlabel.bordercolor"),pe("fontFamily","htf","hoverlabel.font.family"),pe("fontSize","hts","hoverlabel.font.size"),pe("fontColor","htc","hoverlabel.font.color"),pe("nameLength","hnl","hoverlabel.namelength"),pe("textAlign","hta","hoverlabel.align"),Y.posref=K==="y"||K==="closest"&&re.orientation==="h"?Y.xa._offset+(Y.x0+Y.x1)/2:Y.ya._offset+(Y.y0+Y.y1)/2,Y.x0=T.constrain(Y.x0,0,Y.xa._length),Y.x1=T.constrain(Y.x1,0,Y.xa._length),Y.y0=T.constrain(Y.y0,0,Y.ya._length),Y.y1=T.constrain(Y.y1,0,Y.ya._length),Y.xLabelVal!==void 0&&(Y.xLabel="xLabel"in Y?Y.xLabel:i.hoverLabelText(Y.xa,Y.xLabelVal,re.xhoverformat),Y.xVal=Y.xa.c2d(Y.xLabelVal)),Y.yLabelVal!==void 0&&(Y.yLabel="yLabel"in Y?Y.yLabel:i.hoverLabelText(Y.ya,Y.yLabelVal,re.yhoverformat),Y.yVal=Y.ya.c2d(Y.yLabelVal)),Y.zLabelVal!==void 0&&Y.zLabel===void 0&&(Y.zLabel=String(Y.zLabelVal)),!(isNaN(Y.xerr)||Y.xa.type==="log"&&Y.xerr<=0)){var de=i.tickText(Y.xa,Y.xa.c2l(Y.xerr),"hover").text;Y.xerrneg!==void 0?Y.xLabel+=" +"+de+" / -"+i.tickText(Y.xa,Y.xa.c2l(Y.xerrneg),"hover").text:Y.xLabel+=" ± "+de,K==="x"&&(Y.distance+=1)}if(!(isNaN(Y.yerr)||Y.ya.type==="log"&&Y.yerr<=0)){var he=i.tickText(Y.ya,Y.ya.c2l(Y.yerr),"hover").text;Y.yerrneg!==void 0?Y.yLabel+=" +"+he+" / -"+i.tickText(Y.ya,Y.ya.c2l(Y.yerrneg),"hover").text:Y.yLabel+=" ± "+he,K==="y"&&(Y.distance+=1)}var ye=Y.hoverinfo||Y.trace.hoverinfo;return ye&&ye!=="all"&&((ye=Array.isArray(ye)?ye:ye.split("+")).indexOf("x")===-1&&(Y.xLabel=void 0),ye.indexOf("y")===-1&&(Y.yLabel=void 0),ye.indexOf("z")===-1&&(Y.zLabel=void 0),ye.indexOf("text")===-1&&(Y.text=void 0),ye.indexOf("name")===-1&&(Y.name=void 0)),Y}function N(Y,K,te){var re,oe,se=te.container,ce=te.fullLayout,xe=ce._size,pe=te.event,de=!!K.hLinePoint,he=!!K.vLinePoint;if(se.selectAll(".spikeline").remove(),he||de){var ye=n.combine(ce.plot_bgcolor,ce.paper_bgcolor);if(de){var ze,Te,Ae=K.hLinePoint;re=Ae&&Ae.xa,(oe=Ae&&Ae.ya).spikesnap==="cursor"?(ze=pe.pointerX,Te=pe.pointerY):(ze=re._offset+Ae.x,Te=oe._offset+Ae.y);var Me,Ce,ne=s.readability(Ae.color,ye)<1.5?n.contrast(ye):Ae.color,ue=oe.spikemode,me=oe.spikethickness,we=oe.spikecolor||ne,Ee=i.getPxPosition(Y,oe);if(ue.indexOf("toaxis")!==-1||ue.indexOf("across")!==-1){if(ue.indexOf("toaxis")!==-1&&(Me=Ee,Ce=ze),ue.indexOf("across")!==-1){var Ue=oe._counterDomainMin,De=oe._counterDomainMax;oe.anchor==="free"&&(Ue=Math.min(Ue,oe.position),De=Math.max(De,oe.position)),Me=xe.l+Ue*xe.w,Ce=xe.l+De*xe.w}se.insert("line",":first-child").attr({x1:Me,x2:Ce,y1:Te,y2:Te,"stroke-width":me,stroke:we,"stroke-dasharray":r.dashStyle(oe.spikedash,me)}).classed("spikeline",!0).classed("crisp",!0),se.insert("line",":first-child").attr({x1:Me,x2:Ce,y1:Te,y2:Te,"stroke-width":me+2,stroke:ye}).classed("spikeline",!0).classed("crisp",!0)}ue.indexOf("marker")!==-1&&se.insert("circle",":first-child").attr({cx:Ee+(oe.side!=="right"?me:-me),cy:Te,r:me,fill:we}).classed("spikeline",!0)}if(he){var je,ge,be=K.vLinePoint;re=be&&be.xa,oe=be&&be.ya,re.spikesnap==="cursor"?(je=pe.pointerX,ge=pe.pointerY):(je=re._offset+be.x,ge=oe._offset+be.y);var Se,Ne,Ye=s.readability(be.color,ye)<1.5?n.contrast(ye):be.color,Ze=re.spikemode,st=re.spikethickness,ot=re.spikecolor||Ye,ft=i.getPxPosition(Y,re);if(Ze.indexOf("toaxis")!==-1||Ze.indexOf("across")!==-1){if(Ze.indexOf("toaxis")!==-1&&(Se=ft,Ne=ge),Ze.indexOf("across")!==-1){var yt=re._counterDomainMin,Et=re._counterDomainMax;re.anchor==="free"&&(yt=Math.min(yt,re.position),Et=Math.max(Et,re.position)),Se=xe.t+(1-Et)*xe.h,Ne=xe.t+(1-yt)*xe.h}se.insert("line",":first-child").attr({x1:je,x2:je,y1:Se,y2:Ne,"stroke-width":st,stroke:ot,"stroke-dasharray":r.dashStyle(re.spikedash,st)}).classed("spikeline",!0).classed("crisp",!0),se.insert("line",":first-child").attr({x1:je,x2:je,y1:Se,y2:Ne,"stroke-width":st+2,stroke:ye}).classed("spikeline",!0).classed("crisp",!0)}Ze.indexOf("marker")!==-1&&se.insert("circle",":first-child").attr({cx:je,cy:ft-(re.side!=="top"?st:-st),r:st,fill:ot}).classed("spikeline",!0)}}}function j(Y,K){return!K||K.vLinePoint!==Y._spikepoints.vLinePoint||K.hLinePoint!==Y._spikepoints.hLinePoint}function V(Y,K){return t.plainText(Y||"",{len:K,allowedTags:["br","sub","sup","b","i","em"]})}function H(Y,K,te){var re=K[Y+"a"],oe=K[Y+"Val"],se=K.cd[0];if(re.type==="category"||re.type==="multicategory")oe=re._categoriesMap[oe];else if(re.type==="date"){var ce=K.trace[Y+"periodalignment"];if(ce){var xe=K.cd[K.index],pe=xe[Y+"Start"];pe===void 0&&(pe=xe[Y]);var de=xe[Y+"End"];de===void 0&&(de=xe[Y]);var he=de-pe;ce==="end"?oe+=he:ce==="middle"&&(oe+=he/2)}oe=re.d2c(oe)}return se&&se.t&&se.t.posLetter===re._id&&(te.boxmode!=="group"&&te.violinmode!=="group"||(oe+=se.t.dPos)),oe}function ee(Y){return Y.offsetTop+Y.clientTop}function Q(Y){return Y.offsetLeft+Y.clientLeft}function X(Y,K){var te=Y._fullLayout,re=K.getBoundingClientRect(),oe=re.left,se=re.top,ce=oe+re.width,xe=se+re.height,pe=T.apply3DTransform(te._invTransform)(oe,se),de=T.apply3DTransform(te._invTransform)(ce,xe),he=pe[0],ye=pe[1],ze=de[0],Te=de[1];return{x:he,y:ye,width:ze-he,height:Te-ye,top:Math.min(ye,Te),left:Math.min(he,ze),right:Math.max(he,ze),bottom:Math.max(ye,Te)}}},38048:function(D,E,e){var _=e(71828),w=e(7901),s=e(23469).isUnifiedHover;D.exports=function(T,m,f,l){l=l||{};var t=m.legend;function a(r){l.font[r]||(l.font[r]=t?m.legend.font[r]:m.font[r])}m&&s(m.hovermode)&&(l.font||(l.font={}),a("size"),a("family"),a("color"),t?(l.bgcolor||(l.bgcolor=w.combine(m.legend.bgcolor,m.paper_bgcolor)),l.bordercolor||(l.bordercolor=m.legend.bordercolor)):l.bgcolor||(l.bgcolor=m.paper_bgcolor)),f("hoverlabel.bgcolor",l.bgcolor),f("hoverlabel.bordercolor",l.bordercolor),f("hoverlabel.namelength",l.namelength),_.coerceFont(f,"hoverlabel.font",l.font),f("hoverlabel.align",l.align)}},98212:function(D,E,e){var _=e(71828),w=e(528);D.exports=function(s,T){function m(f,l){return T[f]!==void 0?T[f]:_.coerce(s,T,w,f,l)}return m("clickmode"),m("hovermode")}},30211:function(D,E,e){var _=e(39898),w=e(71828),s=e(28569),T=e(23469),m=e(528),f=e(88335);D.exports={moduleType:"component",name:"fx",constants:e(26675),schema:{layout:m},attributes:e(77914),layoutAttributes:m,supplyLayoutGlobalDefaults:e(22774),supplyDefaults:e(54268),supplyLayoutDefaults:e(34938),calc:e(30732),getDistanceFunction:T.getDistanceFunction,getClosest:T.getClosest,inbox:T.inbox,quadrature:T.quadrature,appendArrayPointValue:T.appendArrayPointValue,castHoverOption:function(l,t,a){return w.castOption(l,t,"hoverlabel."+a)},castHoverinfo:function(l,t,a){return w.castOption(l,a,"hoverinfo",function(r){return w.coerceHoverinfo({hoverinfo:r},{_module:l._module},t)})},hover:f.hover,unhover:s.unhover,loneHover:f.loneHover,loneUnhover:function(l){var t=w.isD3Selection(l)?l:_.select(l);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:e(75914)}},528:function(D,E,e){var _=e(26675),w=e(41940),s=w({editType:"none"});s.family.dflt=_.HOVERFONT,s.size.dflt=_.HOVERFONTSIZE,D.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:s,grouptitlefont:w({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(D,E,e){var _=e(71828),w=e(528),s=e(98212),T=e(38048);D.exports=function(m,f){function l(n,o){return _.coerce(m,f,w,n,o)}s(m,f)&&(l("hoverdistance"),l("spikedistance")),l("dragmode")==="select"&&l("selectdirection");var t=f._has("mapbox"),a=f._has("geo"),r=f._basePlotModules.length;f.dragmode==="zoom"&&((t||a)&&r===1||t&&a&&r===2)&&(f.dragmode="pan"),T(m,f,l),_.coerceFont(l,"hoverlabel.grouptitlefont",f.hoverlabel.font)}},22774:function(D,E,e){var _=e(71828),w=e(38048),s=e(528);D.exports=function(T,m){w(T,m,function(f,l){return _.coerce(T,m,s,f,l)})}},83312:function(D,E,e){var _=e(71828),w=e(30587).counter,s=e(27670).Y,T=e(85555).idRegex,m=e(44467),f={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:[w("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[T.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[T.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:s({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 l(r,n,o){var i=n[o+"axes"],u=Object.keys((r._splomAxes||{})[o]||{});return Array.isArray(i)?i:u.length?u:void 0}function t(r,n,o,i,u,p){var c=n(r+"gap",o),b=n("domain."+r);n(r+"side",i);for(var d=new Array(u),v=b[0],x=(b[1]-v)/(u-c),g=x*(1-c),y=0;y1){b||d||v||P("pattern")==="independent"&&(b=!0),g._hasSubplotGrid=b;var h,M,A=P("roworder")==="top to bottom",C=b?.2:.1,L=b?.3:.1;x&&n._splomGridDflt&&(h=n._splomGridDflt.xside,M=n._splomGridDflt.yside),g._domains={x:t("x",P,C,h,k),y:t("y",P,L,M,y,A)}}else delete n.grid}function P(I,R){return _.coerce(o,g,f,I,R)}},contentDefaults:function(r,n){var o=n.grid;if(o&&o._domains){var i,u,p,c,b,d,v,x=r.grid||{},g=n._subplots,y=o._hasSubplotGrid,k=o.rows,h=o.columns,M=o.pattern==="independent",A=o._axisMap={};if(y){var C=x.subplots||[];d=o.subplots=new Array(k);var L=1;for(i=0;i1);if(M===!1&&(n.legend=void 0),(M!==!1||i.uirevision)&&(p("uirevision",n.uirevision),M!==!1)){p("borderwidth");var A,C,L,P=p("orientation")==="h";if(P?(A=0,_.getComponentMethod("rangeslider","isVisible")(r.xaxis)?(C=1.1,L="bottom"):(C=-.1,L="top")):(A=1.02,C=1,L="auto"),p("traceorder",k),l.isGrouped(n.legend)&&p("tracegroupgap"),p("entrywidth"),p("entrywidthmode"),p("itemsizing"),p("itemwidth"),p("itemclick"),p("itemdoubleclick"),p("groupclick"),p("x",A),p("xanchor"),p("y",C),p("yanchor",L),p("valign"),w.noneOrAll(i,u,["x","y"]),p("title.text")){p("title.side",P?"left":"top");var I=w.extendFlat({},c,{size:w.bigFont(c.size)});w.coerceFont(p,"title.font",I)}}}}D.exports=function(a,r,n){var o,i=["legend"];for(o=0;o1)}var ee=N.hiddenlabels||[];if(!(V||N.showlegend&&H.length))return B.selectAll("."+j).remove(),N._topdefs.select("#"+U).remove(),s.autoMargin(I,j);var Q=w.ensureSingle(B,"g",j,function(xe){V||xe.attr("pointer-events","all")}),X=w.ensureSingleById(N._topdefs,"clipPath",U,function(xe){xe.append("rect")}),Y=w.ensureSingle(Q,"rect","bg",function(xe){xe.attr("shape-rendering","crispEdges")});Y.call(t.stroke,G.bordercolor).call(t.fill,G.bgcolor).style("stroke-width",G.borderwidth+"px");var K=w.ensureSingle(Q,"g","scrollbox"),te=G.title;if(G._titleWidth=0,G._titleHeight=0,te.text){var re=w.ensureSingle(K,"text",j+"titletext");re.attr("text-anchor","start").call(l.font,te.font).text(te.text),A(re,K,I,G,1)}else K.selectAll("."+j+"titletext").remove();var oe=w.ensureSingle(Q,"rect","scrollbar",function(xe){xe.attr(n.scrollBarEnterAttrs).call(t.fill,n.scrollBarColor)}),se=K.selectAll("g.groups").data(H);se.enter().append("g").attr("class","groups"),se.exit().remove();var ce=se.selectAll("g.traces").data(w.identity);ce.enter().append("g").attr("class","traces"),ce.exit().remove(),ce.style("opacity",function(xe){var pe=xe[0].trace;return T.traceIs(pe,"pie-like")?ee.indexOf(xe[0].label)!==-1?.5:1:pe.visible==="legendonly"?.5:1}).each(function(){_.select(this).call(k,I,G)}).call(b,I,G).each(function(){V||_.select(this).call(M,I,j)}),w.syncOrAsync([s.previousPromises,function(){return function(xe,pe,de,he){var ye=xe._fullLayout,ze=P(he);he||(he=ye[ze]);var Te=ye._size,Ae=d.isVertical(he),Me=d.isGrouped(he),Ce=he.entrywidthmode==="fraction",ne=he.borderwidth,ue=2*ne,me=n.itemGap,we=he.itemwidth+2*me,Ee=2*(ne+me),Ue=L(he),De=he.y<0||he.y===0&&Ue==="top",je=he.y>1||he.y===1&&Ue==="bottom",ge=he.tracegroupgap,be={};he._maxHeight=Math.max(De||je?ye.height/2:Te.h,30);var Se=0;he._width=0,he._height=0;var Ne=function(Oe){var Be=0,Qe=0,ut=Oe.title.side;return ut&&(ut.indexOf("left")!==-1&&(Be=Oe._titleWidth),ut.indexOf("top")!==-1&&(Qe=Oe._titleHeight)),[Be,Qe]}(he);if(Ae)de.each(function(Oe){var Be=Oe[0].height;l.setTranslate(this,ne+Ne[0],ne+Ne[1]+he._height+Be/2+me),he._height+=Be,he._width=Math.max(he._width,Oe[0].width)}),Se=we+he._width,he._width+=me+we+ue,he._height+=Ee,Me&&(pe.each(function(Oe,Be){l.setTranslate(this,0,Be*he.tracegroupgap)}),he._height+=(he._lgroupsLength-1)*he.tracegroupgap);else{var Ye=C(he),Ze=he.x<0||he.x===0&&Ye==="right",st=he.x>1||he.x===1&&Ye==="left",ot=je||De,ft=ye.width/2;he._maxWidth=Math.max(Ze?ot&&Ye==="left"?Te.l+Te.w:ft:st?ot&&Ye==="right"?Te.r+Te.w:ft:Te.w,2*we);var yt=0,Et=0;de.each(function(Oe){var Be=g(Oe,he,we);yt=Math.max(yt,Be),Et+=Be}),Se=null;var Tt=0;if(Me){var xt=0,Dt=0,It=0;pe.each(function(){var Oe=0,Be=0;_.select(this).selectAll("g.traces").each(function(ut){var pt=g(ut,he,we),bt=ut[0].height;l.setTranslate(this,Ne[0],Ne[1]+ne+me+bt/2+Be),Be+=bt,Oe=Math.max(Oe,pt),be[ut[0].trace.legendgroup]=Oe});var Qe=Oe+me;Dt>0&&Qe+ne+Dt>he._maxWidth?(Tt=Math.max(Tt,Dt),Dt=0,It+=xt+ge,xt=Be):xt=Math.max(xt,Be),l.setTranslate(this,Dt,It),Dt+=Qe}),he._width=Math.max(Tt,Dt)+ne,he._height=It+xt+Ee}else{var Ft=de.size(),qt=Et+ue+(Ft-1)*me=he._maxWidth&&(Tt=Math.max(Tt,Ge),Je=0,Ke+=Nt,he._height+=Nt,Nt=0),l.setTranslate(this,Ne[0]+ne+Je,Ne[1]+ne+Ke+Be/2+me),Ge=Je+Qe+me,Je+=ut,Nt=Math.max(Nt,Be)}),qt?(he._width=Je+ue,he._height=Nt+Ee):(he._width=Math.max(Tt,Ge)+ue,he._height+=Nt+Ee)}}he._width=Math.ceil(Math.max(he._width+Ne[0],he._titleWidth+2*(ne+n.titlePad))),he._height=Math.ceil(Math.max(he._height+Ne[1],he._titleHeight+2*(ne+n.itemGap))),he._effHeight=Math.min(he._height,he._maxHeight);var nt=xe._context.edits,ht=nt.legendText||nt.legendPosition;de.each(function(Oe){var Be=_.select(this).select("."+ze+"toggle"),Qe=Oe[0].height,ut=Oe[0].trace.legendgroup,pt=g(Oe,he,we);Me&&ut!==""&&(pt=be[ut]);var bt=ht?we:Se||pt;Ae||Ce||(bt+=me/2),l.setRect(Be,0,-Qe/2,bt,Qe)})}(I,se,ce,G)},function(){var xe,pe,de,he,ye=N._size,ze=G.borderwidth;if(!V){var Te=function(Ze,st){var ot=Ze._fullLayout[st],ft=C(ot),yt=L(ot);return s.autoMargin(Ze,st,{x:ot.x,y:ot.y,l:ot._width*u[ft],r:ot._width*p[ft],b:ot._effHeight*p[yt],t:ot._effHeight*u[yt]})}(I,j);if(Te)return;var Ae=ye.l+ye.w*G.x-u[C(G)]*G._width,Me=ye.t+ye.h*(1-G.y)-u[L(G)]*G._effHeight;if(N.margin.autoexpand){var Ce=Ae,ne=Me;Ae=w.constrain(Ae,0,N.width-G._width),Me=w.constrain(Me,0,N.height-G._effHeight),Ae!==Ce&&w.log("Constrain "+j+".x to make legend fit inside graph"),Me!==ne&&w.log("Constrain "+j+".y to make legend fit inside graph")}l.setTranslate(Q,Ae,Me)}if(oe.on(".drag",null),Q.on("wheel",null),V||G._height<=G._maxHeight||I._context.staticPlot){var ue=G._effHeight;V&&(ue=G._height),Y.attr({width:G._width-ze,height:ue-ze,x:ze/2,y:ze/2}),l.setTranslate(K,0,0),X.select("rect").attr({width:G._width-2*ze,height:ue-2*ze,x:ze,y:ze}),l.setClipUrl(K,U,I),l.setRect(oe,0,0,0,0),delete G._scrollY}else{var me,we,Ee,Ue=Math.max(n.scrollBarMinHeight,G._effHeight*G._effHeight/G._height),De=G._effHeight-Ue-2*n.scrollBarMargin,je=G._height-G._effHeight,ge=De/je,be=Math.min(G._scrollY||0,je);Y.attr({width:G._width-2*ze+n.scrollBarWidth+n.scrollBarMargin,height:G._effHeight-ze,x:ze/2,y:ze/2}),X.select("rect").attr({width:G._width-2*ze+n.scrollBarWidth+n.scrollBarMargin,height:G._effHeight-2*ze,x:ze,y:ze+be}),l.setClipUrl(K,U,I),Ye(be,Ue,ge),Q.on("wheel",function(){Ye(be=w.constrain(G._scrollY+_.event.deltaY/De*je,0,je),Ue,ge),be!==0&&be!==je&&_.event.preventDefault()});var Se=_.behavior.drag().on("dragstart",function(){var Ze=_.event.sourceEvent;me=Ze.type==="touchstart"?Ze.changedTouches[0].clientY:Ze.clientY,Ee=be}).on("drag",function(){var Ze=_.event.sourceEvent;Ze.buttons===2||Ze.ctrlKey||(we=Ze.type==="touchmove"?Ze.changedTouches[0].clientY:Ze.clientY,be=function(st,ot,ft){var yt=(ft-ot)/ge+st;return w.constrain(yt,0,je)}(Ee,me,we),Ye(be,Ue,ge))});oe.call(Se);var Ne=_.behavior.drag().on("dragstart",function(){var Ze=_.event.sourceEvent;Ze.type==="touchstart"&&(me=Ze.changedTouches[0].clientY,Ee=be)}).on("drag",function(){var Ze=_.event.sourceEvent;Ze.type==="touchmove"&&(we=Ze.changedTouches[0].clientY,be=function(st,ot,ft){var yt=(ot-ft)/ge+st;return w.constrain(yt,0,je)}(Ee,me,we),Ye(be,Ue,ge))});K.call(Ne)}function Ye(Ze,st,ot){G._scrollY=I._fullLayout[j]._scrollY=Ze,l.setTranslate(K,0,-Ze),l.setRect(oe,G._width,n.scrollBarMargin+Ze*ot,n.scrollBarWidth,st),X.select("rect").attr("y",ze+Ze)}I._context.edits.legendPosition&&(Q.classed("cursor-move",!0),f.init({element:Q.node(),gd:I,prepFn:function(){var Ze=l.getTranslate(Q);de=Ze.x,he=Ze.y},moveFn:function(Ze,st){var ot=de+Ze,ft=he+st;l.setTranslate(Q,ot,ft),xe=f.align(ot,G._width,ye.l,ye.l+ye.w,G.xanchor),pe=f.align(ft+G._height,-G._height,ye.t+ye.h,ye.t,G.yanchor)},doneFn:function(){if(xe!==void 0&&pe!==void 0){var Ze={};Ze[j+".x"]=xe,Ze[j+".y"]=pe,T.call("_guiRelayout",I,Ze)}},clickFn:function(Ze,st){var ot=se.selectAll("g.traces").filter(function(){var ft=this.getBoundingClientRect();return st.clientX>=ft.left&&st.clientX<=ft.right&&st.clientY>=ft.top&&st.clientY<=ft.bottom});ot.size()>0&&y(I,Q,ot,Ze,st)}}))}],I)}}function g(I,R,U){var B=I[0],G=B.width,N=R.entrywidthmode,j=B.trace.legendwidth||R.entrywidth;return N==="fraction"?R._maxWidth*j:U+(j||G)}function y(I,R,U,B,G){var N=U.data()[0][0].trace,j={event:G,node:U.node(),curveNumber:N.index,expandedIndex:N._expandedIndex,data:I.data,layout:I.layout,frames:I._transitionData._frames,config:I._context,fullData:I._fullData,fullLayout:I._fullLayout};N._group&&(j.group=N._group),T.traceIs(N,"pie-like")&&(j.label=U.datum()[0].label),m.triggerHandler(I,"plotly_legendclick",j)!==!1&&(B===1?R._clickTimeout=setTimeout(function(){I._fullLayout&&r(U,I,B)},I._context.doubleClickDelay):B===2&&(R._clickTimeout&&clearTimeout(R._clickTimeout),I._legendMouseDownTime=0,m.triggerHandler(I,"plotly_legenddoubleclick",j)!==!1&&r(U,I,B)))}function k(I,R,U){var B,G,N=P(U),j=I.data()[0][0],V=j.trace,H=T.traceIs(V,"pie-like"),ee=!U._inHover&&R._context.edits.legendText&&!H,Q=U._maxNameLength;j.groupTitle?(B=j.groupTitle.text,G=j.groupTitle.font):(G=U.font,U.entries?B=j.text:(B=H?j.label:V.name,V._meta&&(B=w.templateString(B,V._meta))));var X=w.ensureSingle(I,"text",N+"text");X.attr("text-anchor","start").call(l.font,G).text(ee?h(B,Q):B);var Y=U.itemwidth+2*n.itemGap;a.positionText(X,Y,0),ee?X.call(a.makeEditable,{gd:R,text:B}).call(A,I,R,U).on("edit",function(K){this.text(h(K,Q)).call(A,I,R,U);var te=j.trace._fullInput||{},re={};if(T.hasTransform(te,"groupby")){var oe=T.getTransformIndices(te,"groupby"),se=oe[oe.length-1],ce=w.keyedContainer(te,"transforms["+se+"].styles","target","value.name");ce.set(j.trace._group,K),re=ce.constructUpdate()}else re.name=K;return T.call("_guiRestyle",R,re,V.index)}):A(X,I,R,U)}function h(I,R){var U=Math.max(4,R);if(I&&I.trim().length>=U/2)return I;for(var B=U-(I=I||"").length;B>0;B--)I+=" ";return I}function M(I,R,U){var B,G=R._context.doubleClickDelay,N=1,j=w.ensureSingle(I,"rect",U+"toggle",function(V){R._context.staticPlot||V.style("cursor","pointer").attr("pointer-events","all"),V.call(t.fill,"rgba(0,0,0,0)")});R._context.staticPlot||(j.on("mousedown",function(){(B=new Date().getTime())-R._legendMouseDownTimeG&&(N=Math.max(N-1,1)),y(R,V,I,N,_.event)}}))}function A(I,R,U,B,G){B._inHover&&I.attr("data-notex",!0),a.convertToTspans(I,U,function(){(function(N,j,V,H){var ee=N.data()[0][0];if(V._inHover||!ee||ee.trace.showlegend){var Q=N.select("g[class*=math-group]"),X=Q.node(),Y=P(V);V||(V=j._fullLayout[Y]);var K,te,re=V.borderwidth,oe=(H===1?V.title.font:ee.groupTitle?ee.groupTitle.font:V.font).size*i;if(X){var se=l.bBox(X);K=se.height,te=se.width,H===1?l.setTranslate(Q,re,re+.75*K):l.setTranslate(Q,0,.25*K)}else{var ce="."+Y+(H===1?"title":"")+"text",xe=N.select(ce),pe=a.lineCount(xe),de=xe.node();if(K=oe*pe,te=de?l.bBox(de).width:0,H===1)V.title.side==="left"&&(te+=2*n.itemGap),a.positionText(xe,re+n.titlePad,re+oe);else{var he=2*n.itemGap+V.itemwidth;ee.groupTitle&&(he=n.itemGap,te-=V.itemwidth),a.positionText(xe,he,-oe*((pe-1)/2-.3))}}H===1?(V._titleWidth=te,V._titleHeight=K):(ee.lineHeight=oe,ee.height=Math.max(K,16)+3,ee.width=te)}else N.remove()})(R,U,B,G)})}function C(I){return w.isRightAnchor(I)?"right":w.isCenterAnchor(I)?"center":"left"}function L(I){return w.isBottomAnchor(I)?"bottom":w.isMiddleAnchor(I)?"middle":"top"}function P(I){return I._id||"legend"}D.exports=function(I,R){if(R)x(I,R);else{var U=I._fullLayout,B=U._legends;U._infolayer.selectAll('[class^="legend"]').each(function(){var j=_.select(this),V=j.attr("class").split(" ")[0];V.match(v)&&B.indexOf(V)===-1&&j.remove()});for(var G=0;GL&&(C=L)}M[f][0]._groupMinRank=C,M[f][0]._preGroupSort=f}var P=function(G,N){return G.trace.legendrank-N.trace.legendrank||G._preSort-N._preSort};for(M.forEach(function(G,N){G[0]._preGroupSort=N}),M.sort(function(G,N){return G[0]._groupMinRank-N[0]._groupMinRank||G[0]._preGroupSort-N[0]._preGroupSort}),f=0;fb?b:p}D.exports=function(p,c,b){var d=c._fullLayout;b||(b=d.legend);var v=b.itemsizing==="constant",x=b.itemwidth,g=(x+2*n.itemGap)/2,y=T(g,0),k=function(A,C,L,P){var I;if(A+1)I=A;else{if(!(C&&C.width>0))return 0;I=C.width}return v?P:Math.min(I,L)};function h(A,C,L){var P=A[0].trace,I=P.marker||{},R=I.line||{},U=L?P.visible&&P.type===L:w.traceIs(P,"bar"),B=_.select(C).select("g.legendpoints").selectAll("path.legend"+L).data(U?[A]:[]);B.enter().append("path").classed("legend"+L,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",y),B.exit().remove(),B.each(function(G){var N=_.select(this),j=G[0],V=k(j.mlw,I.line,5,2);N.style("stroke-width",V+"px");var H=j.mcc;if(!b._inHover&&"mc"in j){var ee=l(I),Q=ee.mid;Q===void 0&&(Q=(ee.max+ee.min)/2),H=m.tryColorscale(I,"")(Q)}var X=H||j.mc||I.color,Y=I.pattern,K=Y&&m.getPatternAttr(Y.shape,0,"");if(K){var te=m.getPatternAttr(Y.bgcolor,0,null),re=m.getPatternAttr(Y.fgcolor,0,null),oe=Y.fgopacity,se=u(Y.size,8,10),ce=u(Y.solidity,.5,1),xe="legend-"+P.uid;N.call(m.pattern,"legend",c,xe,K,se,ce,H,Y.fillmode,te,re,oe)}else N.call(f.fill,X);V&&f.stroke(N,j.mlc||R.color)})}function M(A,C,L){var P=A[0],I=P.trace,R=L?I.visible&&I.type===L:w.traceIs(I,L),U=_.select(C).select("g.legendpoints").selectAll("path.legend"+L).data(R?[A]:[]);if(U.enter().append("path").classed("legend"+L,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",y),U.exit().remove(),U.size()){var B=(I.marker||{}).line,G=k(r(B.width,P.pts),B,5,2),N=s.minExtend(I,{marker:{line:{width:G}}});N.marker.line.color=B.color;var j=s.minExtend(P,{trace:N});a(U,j,N)}}p.each(function(A){var C=_.select(this),L=s.ensureSingle(C,"g","layers");L.style("opacity",A[0].trace.opacity);var P=b.valign,I=A[0].lineHeight,R=A[0].height;if(P!=="middle"&&I&&R){var U={top:1,bottom:-1}[P]*(.5*(I-R+3));L.attr("transform",T(0,U))}else L.attr("transform",null);L.selectAll("g.legendfill").data([A]).enter().append("g").classed("legendfill",!0),L.selectAll("g.legendlines").data([A]).enter().append("g").classed("legendlines",!0);var B=L.selectAll("g.legendsymbols").data([A]);B.enter().append("g").classed("legendsymbols",!0),B.selectAll("g.legendpoints").data([A]).enter().append("g").classed("legendpoints",!0)}).each(function(A){var C,L=A[0].trace,P=[];if(L.visible)switch(L.type){case"histogram2d":case"heatmap":P=[["M-15,-2V4H15V-2Z"]],C=!0;break;case"choropleth":case"choroplethmapbox":P=[["M-6,-6V6H6V-6Z"]],C=!0;break;case"densitymapbox":P=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],C="radial";break;case"cone":P=[["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"]],C=!1;break;case"streamtube":P=[["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"]],C=!1;break;case"surface":P=[["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"]],C=!0;break;case"mesh3d":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],C=!1;break;case"volume":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],C=!0;break;case"isosurface":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],C=!1}var I=_.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(P);I.enter().append("path").classed("legend3dandfriends",!0).attr("transform",y).style("stroke-miterlimit",1),I.exit().remove(),I.each(function(R,U){var B,G=_.select(this),N=l(L),j=N.colorscale,V=N.reversescale;if(j){if(!C){var H=j.length;B=U===0?j[V?H-1:0][1]:U===1?j[V?0:H-1][1]:j[Math.floor((H-1)/2)][1]}}else{var ee=L.vertexcolor||L.facecolor||L.color;B=s.isArrayOrTypedArray(ee)?ee[U]||ee[0]:ee}G.attr("d",R[0]),B?G.call(f.fill,B):G.call(function(Q){if(Q.size()){var X="legendfill-"+L.uid;m.gradient(Q,c,X,o(V,C==="radial"),j,"fill")}})})}).each(function(A){var C=A[0].trace,L=C.type==="waterfall";if(A[0]._distinct&&L){var P=A[0].trace[A[0].dir].marker;return A[0].mc=P.color,A[0].mlw=P.line.width,A[0].mlc=P.line.color,h(A,this,"waterfall")}var I=[];C.visible&&L&&(I=A[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 R=_.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(I);R.enter().append("path").classed("legendwaterfall",!0).attr("transform",y).style("stroke-miterlimit",1),R.exit().remove(),R.each(function(U){var B=_.select(this),G=C[U[0]].marker,N=k(void 0,G.line,5,2);B.attr("d",U[1]).style("stroke-width",N+"px").call(f.fill,G.color),N&&B.call(f.stroke,G.line.color)})}).each(function(A){h(A,this,"funnel")}).each(function(A){h(A,this)}).each(function(A){var C=A[0].trace,L=_.select(this).select("g.legendpoints").selectAll("path.legendbox").data(C.visible&&w.traceIs(C,"box-violin")?[A]:[]);L.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",y),L.exit().remove(),L.each(function(){var P=_.select(this);if(C.boxpoints!=="all"&&C.points!=="all"||f.opacity(C.fillcolor)!==0||f.opacity((C.line||{}).color)!==0){var I=k(void 0,C.line,5,2);P.style("stroke-width",I+"px").call(f.fill,C.fillcolor),I&&f.stroke(P,C.line.color)}else{var R=s.minExtend(C,{marker:{size:v?12:s.constrain(C.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});L.call(m.pointStyle,R,c)}})}).each(function(A){M(A,this,"funnelarea")}).each(function(A){M(A,this,"pie")}).each(function(A){var C,L,P=i(A),I=P.showFill,R=P.showLine,U=P.showGradientLine,B=P.showGradientFill,G=P.anyFill,N=P.anyLine,j=A[0],V=j.trace,H=l(V),ee=H.colorscale,Q=H.reversescale,X=t.hasMarkers(V)||!G?"M5,0":N?"M5,-2":"M5,-3",Y=_.select(this),K=Y.select(".legendfill").selectAll("path").data(I||B?[A]:[]);if(K.enter().append("path").classed("js-fill",!0),K.exit().remove(),K.attr("d",X+"h"+x+"v6h-"+x+"z").call(function(oe){if(oe.size())if(I)m.fillGroupStyle(oe,c);else{var se="legendfill-"+V.uid;m.gradient(oe,c,se,o(Q),ee,"fill")}}),R||U){var te=k(void 0,V.line,10,5);L=s.minExtend(V,{line:{width:te}}),C=[s.minExtend(j,{trace:L})]}var re=Y.select(".legendlines").selectAll("path").data(R||U?[C]:[]);re.enter().append("path").classed("js-line",!0),re.exit().remove(),re.attr("d",X+(U?"l"+x+",0.0001":"h"+x)).call(R?m.lineGroupStyle:function(oe){if(oe.size()){var se="legendline-"+V.uid;m.lineGroupStyle(oe),m.gradient(oe,c,se,o(Q),ee,"stroke")}})}).each(function(A){var C,L,P=i(A),I=P.anyFill,R=P.anyLine,U=P.showLine,B=P.showMarker,G=A[0],N=G.trace,j=!B&&!R&&!I&&t.hasText(N);function V(re,oe,se,ce){var xe=s.nestedProperty(N,re).get(),pe=s.isArrayOrTypedArray(xe)&&oe?oe(xe):xe;if(v&&pe&&ce!==void 0&&(pe=ce),se){if(pese[1])return se[1]}return pe}function H(re){return G._distinct&&G.index&&re[G.index]?re[G.index]:re[0]}if(B||j||U){var ee={},Q={};if(B){ee.mc=V("marker.color",H),ee.mx=V("marker.symbol",H),ee.mo=V("marker.opacity",s.mean,[.2,1]),ee.mlc=V("marker.line.color",H),ee.mlw=V("marker.line.width",s.mean,[0,5],2),Q.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var X=V("marker.size",s.mean,[2,16],12);ee.ms=X,Q.marker.size=X}U&&(Q.line={width:V("line.width",H,[0,10],5)}),j&&(ee.tx="Aa",ee.tp=V("textposition",H),ee.ts=10,ee.tc=V("textfont.color",H),ee.tf=V("textfont.family",H)),C=[s.minExtend(G,ee)],(L=s.minExtend(N,Q)).selectedpoints=null,L.texttemplate=null}var Y=_.select(this).select("g.legendpoints"),K=Y.selectAll("path.scatterpts").data(B?C:[]);K.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",y),K.exit().remove(),K.call(m.pointStyle,L,c),B&&(C[0].mrc=3);var te=Y.selectAll("g.pointtext").data(j?C:[]);te.enter().append("g").classed("pointtext",!0).append("text").attr("transform",y),te.exit().remove(),te.selectAll("text").call(m.textPointStyle,L,c)}).each(function(A){var C=A[0].trace,L=_.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(C.visible&&C.type==="candlestick"?[A,A]:[]);L.enter().append("path").classed("legendcandle",!0).attr("d",function(P,I){return I?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",y).style("stroke-miterlimit",1),L.exit().remove(),L.each(function(P,I){var R=_.select(this),U=C[I?"increasing":"decreasing"],B=k(void 0,U.line,5,2);R.style("stroke-width",B+"px").call(f.fill,U.fillcolor),B&&f.stroke(R,U.line.color)})}).each(function(A){var C=A[0].trace,L=_.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(C.visible&&C.type==="ohlc"?[A,A]:[]);L.enter().append("path").classed("legendohlc",!0).attr("d",function(P,I){return I?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",y).style("stroke-miterlimit",1),L.exit().remove(),L.each(function(P,I){var R=_.select(this),U=C[I?"increasing":"decreasing"],B=k(void 0,U.line,5,2);R.style("fill","none").call(m.dashLine,U.line.dash,B),B&&f.stroke(R,U.line.color)})})}},42068:function(D,E,e){e(93348),D.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(D,E,e){var _=e(73972),w=e(74875),s=e(41675),T=e(24255),m=e(34031).eraseActiveShape,f=e(71828),l=f._,t=D.exports={};function a(d,v){var x,g,y=v.currentTarget,k=y.getAttribute("data-attr"),h=y.getAttribute("data-val")||!0,M=d._fullLayout,A={},C=s.list(d,null,!0),L=M._cartesianSpikesEnabled;if(k==="zoom"){var P,I=h==="in"?.5:2,R=(1+I)/2,U=(1-I)/2;for(g=0;g1?(X=["toggleHover"],Y=["resetViews"]):A?(Q=["zoomInGeo","zoomOutGeo"],X=["hoverClosestGeo"],Y=["resetGeo"]):M?(X=["hoverClosest3d"],Y=["resetCameraDefault3d","resetCameraLastSave3d"]):R?(Q=["zoomInMapbox","zoomOutMapbox"],X=["toggleHover"],Y=["resetViewMapbox"]):P?X=["hoverClosestGl2d"]:C?X=["hoverClosestPie"]:G?(X=["hoverClosestCartesian","hoverCompareCartesian"],Y=["resetViewSankey"]):X=["toggleHover"],h&&(X=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(xe){for(var pe=0;pe0)){var c=function(d,v,x){for(var g=x.filter(function(M){return v[M].anchor===d._id}),y=0,k=0;k=he.max)pe=oe[de+1];else if(xe=he.pmax)pe=oe[de+1];else if(xede._length||we+Ne<0)return;ge=me+Ne,be=we+Ne;break;case ze:if(Se="col-resize",me+Ne>de._length)return;ge=me+Ne,be=we;break;case Te:if(Se="col-resize",we+Ne<0)return;ge=me,be=we+Ne;break;default:Se="ew-resize",ge=ue,be=ue+Ne}if(be=0;P--){var I=v.append("path").attr(g).style("opacity",P?.1:y).call(T.stroke,h).call(T.fill,k).call(m.dashLine,P?"solid":A,P?4+M:M);if(o(I,u,b),C){var R=f(u.layout,"selections",b);I.style({cursor:"move"});var U={element:I.node(),plotinfo:d,gd:u,editHelpers:R,isActiveSelection:!0},B=_(x,u);w(B,I,U)}else I.style("pointer-events",P?"all":"none");L[P]=I}var G=L[0];L[1].node().addEventListener("click",function(){return function(N,j){if(r(N)){var V=+j.node().getAttribute("data-index");if(V>=0){if(V===N._fullLayout._activeSelectionIndex)return void i(N);N._fullLayout._activeSelectionIndex=V,N._fullLayout._deactivateSelection=i,a(N)}}}(u,G)})}(u._fullLayout._selectionLayer)}function o(u,p,c){var b=c.xref+c.yref;m.setClipUrl(u,"clip"+p._fullLayout._uid+b,p)}function i(u){r(u)&&u._fullLayout._activeSelectionIndex>=0&&(s(u),delete u._fullLayout._activeSelectionIndex,a(u))}D.exports={draw:a,drawOne:n,activateLastSelection:function(u){if(r(u)){var p=u._fullLayout.selections.length-1;u._fullLayout._activeSelectionIndex=p,u._fullLayout._deactivateSelection=i,a(u)}}}},53777:function(D,E,e){var _=e(79952).P,w=e(1426).extendFlat;D.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:w({},_,{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(D){D.exports=function(E,e,_){_("newselection.mode"),_("newselection.line.width")&&(_("newselection.line.color"),_("newselection.line.dash")),_("activeselection.fillcolor"),_("activeselection.opacity")}},35855:function(D,E,e){var _=e(64505).selectMode,w=e(51873).clearOutline,s=e(60165),T=s.readPaths,m=s.writePaths,f=s.fixDatesForPaths;D.exports=function(l,t){if(l.length){var a=l[0][0];if(a){var r=a.getAttribute("d"),n=t.gd,o=n._fullLayout.newselection,i=t.plotinfo,u=i.xaxis,p=i.yaxis,c=t.isActiveSelection,b=t.dragmode,d=(n.layout||{}).selections||[];if(!_(b)&&c!==void 0){var v=n._fullLayout._activeSelectionIndex;if(v-1,qt=[];if(function(nt){return nt&&Array.isArray(nt)&&nt[0].hoverOnBox!==!0}(It)){te(De,je,Ne);var Nt=function(nt,ht){var Oe,Be,Qe=nt[0],ut=-1,pt=[];for(Be=0;Be0?function(nt,ht){var Oe,Be,Qe,ut=[];for(Qe=0;Qe0&&ut.push(Oe);if(ut.length===1&&ut[0]===ht.searchInfo&&(Be=ht.searchInfo.cd[0].trace).selectedpoints.length===ht.pointNumbers.length){for(Qe=0;Qe1||(Be+=ht.selectedpoints.length)>1))return!1;return Be===1}(Ze)&&(Et=xe(Nt))){for(Ye&&Ye.remove(),Dt=0;Dt=0})(Se)&&Se._fullLayout._deactivateShape(Se),function(yt){return yt._fullLayout._activeSelectionIndex>=0}(Se)&&Se._fullLayout._deactivateSelection(Se);var Ne=Se._fullLayout._zoomlayer,Ye=n(ge),Ze=i(ge);if(Ye||Ze){var st,ot,ft=Ne.selectAll(".select-outline-"+be.id);ft&&Se._fullLayout._outlining&&(Ye&&(st=g(ft,De)),st&&s.call("_guiRelayout",Se,{shapes:st}),Ze&&!ee(De)&&(ot=y(ft,De)),ot&&(Se._fullLayout._noEmitSelectedAtStart=!0,s.call("_guiRelayout",Se,{selections:ot}).then(function(){je&&k(Se)})),Se._fullLayout._outlining=!1)}be.selection={},be.selection.selectionDefs=De.selectionDefs=[],be.selection.mergedPolygons=De.mergedPolygons=[]}function oe(De){return De._id}function se(De,je,ge,be){if(!De.calcdata)return[];var Se,Ne,Ye,Ze=[],st=je.map(oe),ot=ge.map(oe);for(Ye=0;Ye0?be[0]:ge;return!!je.selectedpoints&&je.selectedpoints.indexOf(Se)>-1}function pe(De,je,ge){var be,Se;for(be=0;be-1&&je;if(!Ne&&je){var _n=Ce(De,!0);if(_n.length){var fn=_n[0].xref,hn=_n[0].yref;if(fn&&hn){var In=me(_n);we([L(De,fn,"x"),L(De,hn,"y")])(wn,In)}}De._fullLayout._noEmitSelectedAtStart?De._fullLayout._noEmitSelectedAtStart=!1:on&&Ee(De,wn),Et._reselect=!1}if(!Ne&&Et._deselect){var Cn=Et._deselect;(function(Nn,Hn,qn){for(var or=0;or=0)Tt._fullLayout._deactivateShape(Tt);else if(!ot){var hn=xt.clickmode;C.done(kn).then(function(){if(C.clear(kn),_n===2){for(Xt.remove(),Qe=0;Qe-1&&Q(fn,Tt,be.xaxes,be.yaxes,be.subplot,be,Xt),hn==="event"&&Ee(Tt,void 0);f.click(Tt,fn)}).catch(h.error)}},be.doneFn=function(){ln.remove(),C.done(kn).then(function(){C.clear(kn),!Dt&&Be&&be.selectionDefs&&(Be.subtract=Gt,be.selectionDefs.push(Be),be.mergedPolygons.length=0,[].push.apply(be.mergedPolygons,Oe)),(Dt||ot)&&re(be,Dt),be.doneFnCompleted&&be.doneFnCompleted(Wn),ft&&Ee(Tt,pt)}).catch(h.error)}},clearOutline:b,clearSelectionsCache:re,selectOnClick:Q}},89827:function(D,E,e){var _=e(50215),w=e(41940),s=e(82196).line,T=e(79952).P,m=e(1426).extendFlat,f=e(44467).templatedArray,l=(e(24695),e(5386).R),t=e(37281);D.exports=f("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:m({},_.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:m({},_.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:m({},s.color,{editType:"arraydraw"}),width:m({},s.width,{editType:"calc+arraydraw"}),dash:m({},T,{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"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:l({},{keys:Object.keys(t)}),font:w({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})},5627:function(D,E,e){var _=e(71828),w=e(89298),s=e(21459),T=e(30477);function m(a){return l(a.line.width,a.xsizemode,a.x0,a.x1,a.path,!1)}function f(a){return l(a.line.width,a.ysizemode,a.y0,a.y1,a.path,!0)}function l(a,r,n,o,i,u){var p=a/2,c=u;if(r==="pixel"){var b=i?T.extractPathCoords(i,u?s.paramIsY:s.paramIsX):[n,o],d=_.aggNums(Math.max,null,b),v=_.aggNums(Math.min,null,b),x=v<0?Math.abs(v)+p:p,g=d>0?d+p:p;return{ppad:p,ppadplus:c?x:g,ppadminus:c?g:x}}return{ppad:p}}function t(a,r,n,o,i){var u=a.type==="category"||a.type==="multicategory"?a.r2c:a.d2c;if(r!==void 0)return[u(r),u(n)];if(o){var p,c,b,d,v=1/0,x=-1/0,g=o.match(s.segmentRE);for(a.type==="date"&&(u=T.decodeDate(u)),p=0;px&&(x=d)));return x>=v?[v,x]:void 0}}D.exports=function(a){var r=a._fullLayout,n=_.filterVisible(r.shapes);if(n.length&&a._fullData.length)for(var o=0;o1&&(xe.length!==2||xe[1][0]!=="Z")&&(U===0&&(xe[0][0]="M"),y[R]=xe,C(),L())}}()}}function Y(oe,se){(function(ce,xe){if(y.length)for(var pe=0;peMe?(ue=Te,Ue="y0",me=Me,De="y1"):(ue=Me,Ue="y1",me=Te,De="y0"),Ke(Be),ht(he,pe),function(Qe,ut,pt){var bt=ut.xref,Lt=ut.yref,Ct=T.getFromId(pt,bt),mt=T.getFromId(pt,Lt),Ot="";bt==="paper"||Ct.autorange||(Ot+=bt),Lt==="paper"||mt.autorange||(Ot+=Lt),a.setClipUrl(Qe,Ot?"clip"+pt._fullLayout._uid+Ot:null,pt)}(xe,pe,ce),Je.moveFn=Se==="move"?Ge:nt,Je.altKey=Be.altKey)},doneFn:function(){x(ce)||(o(xe),Oe(he),k(xe,ce,pe),w.call("_guiRelayout",ce,ye.getUpdateObj()))},clickFn:function(){x(ce)||Oe(he)}};function Ke(Be){if(x(ce))Se=null;else if(Ze)Se=Be.target.tagName==="path"?"move":Be.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Qe=Je.element.getBoundingClientRect(),ut=Qe.right-Qe.left,pt=Qe.bottom-Qe.top,bt=Be.clientX-Qe.left,Lt=Be.clientY-Qe.top,Ct=!st&&ut>10&&pt>10&&!Be.shiftKey?n.getCursor(bt/ut,1-Lt/pt):"move";o(xe,Ct),Se=Ct.split("-")[0]}}function Ge(Be,Qe){if(pe.type==="path"){var ut=function(Lt){return Lt},pt=ut,bt=ut;Ne?ot("xanchor",pe.xanchor=Ft(Ce+Be)):(pt=function(Lt){return Ft(Dt(Lt)+Be)},yt&&yt.type==="date"&&(pt=p.encodeDate(pt))),Ye?ot("yanchor",pe.yanchor=qt(ne+Qe)):(bt=function(Lt){return qt(It(Lt)+Qe)},Tt&&Tt.type==="date"&&(bt=p.encodeDate(bt))),ot("path",pe.path=M(be,pt,bt))}else Ne?ot("xanchor",pe.xanchor=Ft(Ce+Be)):(ot("x0",pe.x0=Ft(ze+Be)),ot("x1",pe.x1=Ft(Ae+Be))),Ye?ot("yanchor",pe.yanchor=qt(ne+Qe)):(ot("y0",pe.y0=qt(Te+Qe)),ot("y1",pe.y1=qt(Me+Qe)));xe.attr("d",c(ce,pe)),ht(he,pe),h(ce,de,pe,ft)}function nt(Be,Qe){if(st){var ut=function(ln){return ln},pt=ut,bt=ut;Ne?ot("xanchor",pe.xanchor=Ft(Ce+Be)):(pt=function(ln){return Ft(Dt(ln)+Be)},yt&&yt.type==="date"&&(pt=p.encodeDate(pt))),Ye?ot("yanchor",pe.yanchor=qt(ne+Qe)):(bt=function(ln){return qt(It(ln)+Qe)},Tt&&Tt.type==="date"&&(bt=p.encodeDate(bt))),ot("path",pe.path=M(be,pt,bt))}else if(Ze){if(Se==="resize-over-start-point"){var Lt=ze+Be,Ct=Ye?Te-Qe:Te+Qe;ot("x0",pe.x0=Ne?Lt:Ft(Lt)),ot("y0",pe.y0=Ye?Ct:qt(Ct))}else if(Se==="resize-over-end-point"){var mt=Ae+Be,Ot=Ye?Me-Qe:Me+Qe;ot("x1",pe.x1=Ne?mt:Ft(mt)),ot("y1",pe.y1=Ye?Ot:qt(Ot))}}else{var _t=function(ln){return Se.indexOf(ln)!==-1},Pt=_t("n"),Bt=_t("s"),Wt=_t("w"),Gt=_t("e"),Xt=Pt?ue+Qe:ue,Kt=Bt?me+Qe:me,nn=Wt?we+Be:we,yn=Gt?Ee+Be:Ee;Ye&&(Pt&&(Xt=ue-Qe),Bt&&(Kt=me-Qe)),(!Ye&&Kt-Xt>10||Ye&&Xt-Kt>10)&&(ot(Ue,pe[Ue]=Ye?Xt:qt(Xt)),ot(De,pe[De]=Ye?Kt:qt(Kt))),yn-nn>10&&(ot(je,pe[je]=Ne?nn:Ft(nn)),ot(ge,pe[ge]=Ne?yn:Ft(yn)))}xe.attr("d",c(ce,pe)),ht(he,pe),h(ce,de,pe,ft)}function ht(Be,Qe){(Ne||Ye)&&function(){var ut=Qe.type!=="path",pt=Be.selectAll(".visual-cue").data([0]);pt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var bt=Dt(Ne?Qe.xanchor:s.midRange(ut?[Qe.x0,Qe.x1]:p.extractPathCoords(Qe.path,u.paramIsX))),Lt=It(Ye?Qe.yanchor:s.midRange(ut?[Qe.y0,Qe.y1]:p.extractPathCoords(Qe.path,u.paramIsY)));if(bt=p.roundPositionForSharpStrokeRendering(bt,1),Lt=p.roundPositionForSharpStrokeRendering(Lt,1),Ne&&Ye){var Ct="M"+(bt-1-1)+","+(Lt-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";pt.attr("d",Ct)}else if(Ne){var mt="M"+(bt-1-1)+","+(Lt-9-1)+"v18 h2 v-18 Z";pt.attr("d",mt)}else{var Ot="M"+(bt-9-1)+","+(Lt-1-1)+"h18 v2 h-18 Z";pt.attr("d",Ot)}}()}function Oe(Be){Be.selectAll(".visual-cue").remove()}n.init(Je),Nt.node().onmousemove=Ke}(C,re,I,L,B,K):I.editable===!0&&re.style("pointer-events",X||t.opacity(V)*j<=.5?"stroke":"all");re.node().addEventListener("click",function(){return function(ce,xe){if(g(ce)){var pe=+xe.node().getAttribute("data-index");if(pe>=0){if(pe===ce._fullLayout._activeShapeIndex)return void A(ce);ce._fullLayout._activeShapeIndex=pe,ce._fullLayout._deactivateShape=A,v(ce)}}}(C,re)})}I._input&&I.visible!==!1&&(I.layer!=="below"?U(C._fullLayout._shapeUpperLayer):I.xref==="paper"||I.yref==="paper"?U(C._fullLayout._shapeLowerLayer):R._hadPlotinfo?U((R.mainplotinfo||R).shapelayer):U(C._fullLayout._shapeLowerLayer))}function k(C,L,P){var I=(P.xref+P.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");a.setClipUrl(C,I?"clip"+L._fullLayout._uid+I:null,L)}function h(C,L,P,I){if(I.selectAll(".shape-label").remove(),P.label.text||P.label.texttemplate){var R;if(P.label.texttemplate){var U={};if(P.type!=="path"){var B=T.getFromId(C,P.xref),G=T.getFromId(C,P.yref);for(var N in b){var j=b[N](P,B,G);j!==void 0&&(U[N]=j)}}R=s.texttemplateStringForShapes(P.label.texttemplate,{},C._fullLayout._d3locale,U)}else R=P.label.text;var V,H,ee,Q,X={"data-index":L},Y=P.label.font,K=I.append("g").attr(X).classed("shape-label",!0).append("text").attr({"data-notex":1}).classed("shape-label-text",!0).text(R);if(P.path){var te=c(C,P),re=m(te,C);V=1/0,ee=1/0,H=-1/0,Q=-1/0;for(var oe=0;oe=Ee?Ue-je:je-Ue,-180/Math.PI*Math.atan2(ge,be)}(V,ee,H,Q):0),K.call(function(Ee){return Ee.call(a.font,Y).attr({}),i.convertToTspans(Ee,C),Ee});var ne=function(Ee,Ue,De,je,ge,be,Se){var Ne,Ye,Ze,st,ot=ge.label.textposition,ft=ge.label.textangle,yt=ge.label.padding,Et=ge.type,Tt=Math.PI/180*be,xt=Math.sin(Tt),Dt=Math.cos(Tt),It=ge.label.xanchor,Ft=ge.label.yanchor;if(Et==="line"){ot==="start"?(Ne=Ee,Ye=Ue):ot==="end"?(Ne=De,Ye=je):(Ne=(Ee+De)/2,Ye=(Ue+je)/2),It==="auto"&&(It=ot==="start"?ft==="auto"?De>Ee?"left":DeEe?"right":DeEe?"right":DeEe?"left":De=N||(B[R]?j=L(j):G[R]&&(j=P(j)),R++),j})})}function A(C){g(C)&&C._fullLayout._activeShapeIndex>=0&&(l(C),delete C._fullLayout._activeShapeIndex,v(C))}D.exports={draw:v,drawOne:y,eraseActiveShape:function(C){if(g(C)){l(C);var L=C._fullLayout._activeShapeIndex,P=(C.layout||{}).shapes||[];if(L0&&xX&&(K="X"),K});return V>X&&(Y=Y.replace(/[\s,]*X.*/,""),w.log("Ignoring extra params in segment "+j)),H+Y})}(m,l,a);if(m.xsizemode==="pixel"){var x=l(m.xanchor);r=x+m.x0,n=x+m.x1}else r=l(m.x0),n=l(m.x1);if(m.ysizemode==="pixel"){var g=a(m.yanchor);o=g-m.y0,i=g-m.y1}else o=a(m.y0),i=a(m.y1);if(u==="line")return"M"+r+","+o+"L"+n+","+i;if(u==="rect")return"M"+r+","+o+"H"+n+"V"+i+"H"+r+"Z";var y=(r+n)/2,k=(o+i)/2,h=Math.abs(y-r),M=Math.abs(k-o),A="A"+h+","+M,C=y+h+","+k;return"M"+C+A+" 0 1,1 "+y+","+(k-M)+A+" 0 0,1 "+C+"Z"}},89853:function(D,E,e){var _=e(34031);D.exports={moduleType:"component",name:"shapes",layoutAttributes:e(89827),supplyLayoutDefaults:e(84726),supplyDrawNewShapeDefaults:e(45547),includeBasePlot:e(76325)("shapes"),calcAutorange:e(5627),draw:_.draw,drawOne:_.drawOne}},37281:function(D){function E(s,T){return T?T.d2l(s):s}function e(s,T){return T?T.l2d(s):s}function _(s,T){return E(s.x1,T)-E(s.x0,T)}function w(s,T,m){return E(s.y1,m)-E(s.y0,m)}D.exports={x0:function(s){return s.x0},x1:function(s){return s.x1},y0:function(s){return s.y0},y1:function(s){return s.y1},slope:function(s,T,m){return s.type!=="line"?void 0:w(s,0,m)/_(s,T)},dx:_,dy:w,width:function(s,T){return Math.abs(_(s,T))},height:function(s,T,m){return Math.abs(w(s,0,m))},length:function(s,T,m){return s.type!=="line"?void 0:Math.sqrt(Math.pow(_(s,T),2)+Math.pow(w(s,0,m),2))},xcenter:function(s,T){return e((E(s.x1,T)+E(s.x0,T))/2,T)},ycenter:function(s,T,m){return e((E(s.y1,m)+E(s.y0,m))/2,m)}}},75067:function(D,E,e){var _=e(41940),w=e(35025),s=e(1426).extendDeepAll,T=e(30962).overrideAll,m=e(85594),f=e(44467).templatedArray,l=e(98292),t=f("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}});D.exports=T(f("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:t,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:s(w({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:m.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:_({})},font:_({}),activebgcolor:{valType:"color",dflt:l.gripBgActiveColor},bgcolor:{valType:"color",dflt:l.railBgColor},bordercolor:{valType:"color",dflt:l.railBorderColor},borderwidth:{valType:"number",min:0,dflt:l.railBorderWidth},ticklen:{valType:"number",min:0,dflt:l.tickLength},tickcolor:{valType:"color",dflt:l.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:l.minorTickLength}}),"arraydraw","from-root")},98292:function(D){D.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(D,E,e){var _=e(71828),w=e(85501),s=e(75067),T=e(98292).name,m=s.steps;function f(t,a,r){function n(c,b){return _.coerce(t,a,s,c,b)}for(var o=w(t,a,{name:"steps",handleItemDefaults:l}),i=0,u=0;u0&&(V=V.transition().duration(R.transition.duration).ease(R.transition.easing)),V.attr("transform",f(j-.5*a.gripWidth,R._dims.currentValueTotalHeight))}}function A(I,R){var U=I._dims;return U.inputAreaStart+a.stepInset+(U.inputAreaLength-2*a.stepInset)*Math.min(1,Math.max(0,R))}function C(I,R){var U=I._dims;return Math.min(1,Math.max(0,(R-a.stepInset-U.inputAreaStart)/(U.inputAreaLength-2*a.stepInset-2*U.inputAreaStart)))}function L(I,R,U){var B=U._dims,G=m.ensureSingle(I,"rect",a.railTouchRectClass,function(N){N.call(k,R,I,U).style("pointer-events","all")});G.attr({width:B.inputAreaLength,height:Math.max(B.inputAreaWidth,a.tickOffset+U.ticklen+B.labelHeight)}).call(s.fill,U.bgcolor).attr("opacity",0),T.setTranslate(G,0,B.currentValueTotalHeight)}function P(I,R){var U=R._dims,B=U.inputAreaLength-2*a.railInset,G=m.ensureSingle(I,"rect",a.railRectClass);G.attr({width:B,height:a.railWidth,rx:a.railRadius,ry:a.railRadius,"shape-rendering":"crispEdges"}).call(s.stroke,R.bordercolor).call(s.fill,R.bgcolor).style("stroke-width",R.borderwidth+"px"),T.setTranslate(G,a.railInset,.5*(U.inputAreaWidth-a.railWidth)+U.currentValueTotalHeight)}D.exports=function(I){var R=I._context.staticPlot,U=I._fullLayout,B=function(ee,Q){for(var X=ee[a.name],Y=[],K=0;K0?[0]:[]);function N(ee){ee._commandObserver&&(ee._commandObserver.remove(),delete ee._commandObserver),w.autoMargin(I,u(ee))}if(G.enter().append("g").classed(a.containerClassName,!0).style("cursor",R?null:"ew-resize"),G.exit().each(function(){_.select(this).selectAll("g."+a.groupClassName).each(N)}).remove(),B.length!==0){var j=G.selectAll("g."+a.groupClassName).data(B,p);j.enter().append("g").classed(a.groupClassName,!0),j.exit().each(N).remove();for(var V=0;V0||ye<0){var Me={left:[-ze,0],right:[ze,0],top:[0,-ze],bottom:[0,ze]}[g.side];Y.attr("transform",f(Me[0],Me[1]))}}}return V.call(H),G&&(P?V.on(".opacity",null):(A=0,C=!0,V.text(v).on("mouseover.opacity",function(){_.select(this).transition().duration(r.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){_.select(this).transition().duration(r.HIDE_PLACEHOLDER).style("opacity",0)})),V.call(a.makeEditable,{gd:i}).on("edit",function(X){x!==void 0?T.call("_guiRestyle",i,d,X,x):T.call("_guiRelayout",i,d,X)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(H)}).on("input",function(X){this.text(X||" ").call(a.positionText,y.x,y.y)})),V.classed("js-placeholder",C),h}}},7163:function(D,E,e){var _=e(41940),w=e(22399),s=e(1426).extendFlat,T=e(30962).overrideAll,m=e(35025),f=e(44467).templatedArray,l=f("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}});D.exports=T(f("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:l,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:s(m({editType:"arraydraw"}),{}),font:_({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:w.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},75909:function(D){D.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(D,E,e){var _=e(71828),w=e(85501),s=e(7163),T=e(75909).name,m=s.buttons;function f(t,a,r){function n(o,i){return _.coerce(t,a,s,o,i)}n("visible",w(t,a,{name:"buttons",handleItemDefaults:l}).length>0)&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),_.noneOrAll(t,a,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),_.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function l(t,a){function r(n,o){return _.coerce(t,a,m,n,o)}r("visible",t.method==="skip"||Array.isArray(t.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}D.exports=function(t,a){w(t,a,{name:T,handleItemDefaults:f})}},13689:function(D,E,e){var _=e(39898),w=e(74875),s=e(7901),T=e(91424),m=e(71828),f=e(63893),l=e(44467).arrayEditor,t=e(18783).LINE_SPACING,a=e(75909),r=e(25849);function n(A){return A._index}function o(A,C){return+A.attr(a.menuIndexAttrName)===C._index}function i(A,C,L,P,I,R,U,B){C.active=U,l(A.layout,a.name,C).applyUpdate("active",U),C.type==="buttons"?p(A,P,null,null,C):C.type==="dropdown"&&(I.attr(a.menuIndexAttrName,"-1"),u(A,P,I,R,C),B||p(A,P,I,R,C))}function u(A,C,L,P,I){var R=m.ensureSingle(C,"g",a.headerClassName,function(V){V.style("pointer-events","all")}),U=I._dims,B=I.active,G=I.buttons[B]||a.blankHeaderOpts,N={y:I.pad.t,yPad:0,x:I.pad.l,xPad:0,index:0},j={width:U.headerWidth,height:U.headerHeight};R.call(c,I,G,A).call(h,I,N,j),m.ensureSingle(C,"text",a.headerArrowClassName,function(V){V.attr("text-anchor","end").call(T.font,I.font).text(a.arrowSymbol[I.direction])}).attr({x:U.headerWidth-a.arrowOffsetX+I.pad.l,y:U.headerHeight/2+a.textOffsetY+I.pad.t}),R.on("click",function(){L.call(M,String(o(L,I)?-1:I._index)),p(A,C,L,P,I)}),R.on("mouseover",function(){R.call(x)}),R.on("mouseout",function(){R.call(g,I)}),T.setTranslate(C,U.lx,U.ly)}function p(A,C,L,P,I){L||(L=C).attr("pointer-events","all");var R=function(Y){return+Y.attr(a.menuIndexAttrName)==-1}(L)&&I.type!=="buttons"?[]:I.buttons,U=I.type==="dropdown"?a.dropdownButtonClassName:a.buttonClassName,B=L.selectAll("g."+U).data(m.filterVisible(R)),G=B.enter().append("g").classed(U,!0),N=B.exit();I.type==="dropdown"?(G.attr("opacity","0").transition().attr("opacity","1"),N.transition().attr("opacity","0").remove()):N.remove();var j=0,V=0,H=I._dims,ee=["up","down"].indexOf(I.direction)!==-1;I.type==="dropdown"&&(ee?V=H.headerHeight+a.gapButtonHeader:j=H.headerWidth+a.gapButtonHeader),I.type==="dropdown"&&I.direction==="up"&&(V=-a.gapButtonHeader+a.gapButton-H.openHeight),I.type==="dropdown"&&I.direction==="left"&&(j=-a.gapButtonHeader+a.gapButton-H.openWidth);var Q={x:H.lx+j+I.pad.l,y:H.ly+V+I.pad.t,yPad:a.gapButton,xPad:a.gapButton,index:0},X={l:Q.x+I.borderwidth,t:Q.y+I.borderwidth};B.each(function(Y,K){var te=_.select(this);te.call(c,I,Y,A).call(h,I,Q),te.on("click",function(){_.event.defaultPrevented||(Y.execute&&(Y.args2&&I.active===K?(i(A,I,0,C,L,P,-1),w.executeAPICommand(A,Y.method,Y.args2)):(i(A,I,0,C,L,P,K),w.executeAPICommand(A,Y.method,Y.args))),A.emit("plotly_buttonclicked",{menu:I,button:Y,active:I.active}))}),te.on("mouseover",function(){te.call(x)}),te.on("mouseout",function(){te.call(g,I),B.call(v,I)})}),B.call(v,I),ee?(X.w=Math.max(H.openWidth,H.headerWidth),X.h=Q.y-X.t):(X.w=Q.x-X.l,X.h=Math.max(H.openHeight,H.headerHeight)),X.direction=I.direction,P&&(B.size()?function(Y,K,te,re,oe,se){var ce,xe,pe,de=oe.direction,he=de==="up"||de==="down",ye=oe._dims,ze=oe.active;if(he)for(xe=0,pe=0;pe0?[0]:[]);if(I.enter().append("g").classed(a.containerClassName,!0).style("cursor","pointer"),I.exit().each(function(){_.select(this).selectAll("g."+a.headerGroupClassName).each(P)}).remove(),L.length!==0){var R=I.selectAll("g."+a.headerGroupClassName).data(L,n);R.enter().append("g").classed(a.headerGroupClassName,!0);for(var U=m.ensureSingle(I,"g",a.dropdownButtonGroupClassName,function(V){V.style("pointer-events","all")}),B=0;Bh,C=m.barLength+2*m.barPad,L=m.barWidth+2*m.barPad,P=c,I=d+v;I+L>n&&(I=n-L);var R=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-horizontal",!0).call(w.fill,m.barColor),A?(this.hbar=R.attr({rx:m.barRadius,ry:m.barRadius,x:P,y:I,width:C,height:L}),this._hbarXMin=P+C/2,this._hbarTranslateMax=h-C):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var U=v>M,B=m.barWidth+2*m.barPad,G=m.barLength+2*m.barPad,N=c+b,j=d;N+B>r&&(N=r-B);var V=this.container.selectAll("rect.scrollbar-vertical").data(U?[0]:[]);V.exit().on(".drag",null).remove(),V.enter().append("rect").classed("scrollbar-vertical",!0).call(w.fill,m.barColor),U?(this.vbar=V.attr({rx:m.barRadius,ry:m.barRadius,x:N,y:j,width:B,height:G}),this._vbarYMin=j+G/2,this._vbarTranslateMax=M-G):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var H=this.id,ee=o-.5,Q=U?i+B+.5:i+.5,X=u-.5,Y=A?p+L+.5:p+.5,K=a._topdefs.selectAll("#"+H).data(A||U?[0]:[]);if(K.exit().remove(),K.enter().append("clipPath").attr("id",H).append("rect"),A||U?(this._clipRect=K.select("rect").attr({x:Math.floor(ee),y:Math.floor(X),width:Math.ceil(Q)-Math.floor(ee),height:Math.ceil(Y)-Math.floor(X)}),this.container.call(s.setClipUrl,H,this.gd),this.bg.attr({x:c,y:d,width:b,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(s.setClipUrl,null),delete this._clipRect),A||U){var te=_.behavior.drag().on("dragstart",function(){_.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(te);var re=_.behavior.drag().on("dragstart",function(){_.event.sourceEvent.preventDefault(),_.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(re),U&&this.vbar.on(".drag",null).call(re)}this.setTranslate(l,t)},m.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(s.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)},m.prototype._onBoxDrag=function(){var f=this.translateX,l=this.translateY;this.hbar&&(f-=_.event.dx),this.vbar&&(l-=_.event.dy),this.setTranslate(f,l)},m.prototype._onBoxWheel=function(){var f=this.translateX,l=this.translateY;this.hbar&&(f+=_.event.deltaY),this.vbar&&(l+=_.event.deltaY),this.setTranslate(f,l)},m.prototype._onBarDrag=function(){var f=this.translateX,l=this.translateY;if(this.hbar){var t=f+this._hbarXMin,a=t+this._hbarTranslateMax;f=(T.constrain(_.event.x,t,a)-t)/(a-t)*(this.position.w-this._box.w)}if(this.vbar){var r=l+this._vbarYMin,n=r+this._vbarTranslateMax;l=(T.constrain(_.event.y,r,n)-r)/(n-r)*(this.position.h-this._box.h)}this.setTranslate(f,l)},m.prototype.setTranslate=function(f,l){var t=this.position.w-this._box.w,a=this.position.h-this._box.h;if(f=T.constrain(f||0,0,t),l=T.constrain(l||0,0,a),this.translateX=f,this.translateY=l,this.container.call(s.setTranslate,this._box.l-this.position.l-f,this._box.t-this.position.t-l),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+f-.5),y:Math.floor(this.position.t+l-.5)}),this.hbar){var r=f/t;this.hbar.call(s.setTranslate,f+r*this._hbarTranslateMax,l)}if(this.vbar){var n=l/a;this.vbar.call(s.setTranslate,f,l+n*this._vbarTranslateMax)}}},18783:function(D){D.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(D){D.exports={axisRefDescription:function(E,e,_){return["If set to a",E,"axis id (e.g. *"+E+"* or","*"+E+"2*), the `"+E+"` position refers to a",E,"coordinate. If set to *paper*, the `"+E+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+_+"). If set to a",E,"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.,","*"+E+"2 domain* refers to the domain of the second",E," axis and a",E,"position of 0.5 refers to the","point between the",e,"and the",_,"of the domain of the","second",E,"axis."].join(" ")}}},22372:function(D){D.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},31562:function(D){D.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(D){D.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},29659:function(D){D.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(D){D.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},37822:function(D){D.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},50606:function(D){D.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,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(D,E){E.xmlns="http://www.w3.org/2000/xmlns/",E.svg="http://www.w3.org/2000/svg",E.xlink="http://www.w3.org/1999/xlink",E.svgAttrs={xmlns:E.svg,"xmlns:xlink":E.xlink}},8729:function(D,E,e){E.version=e(11506).version,e(7417),e(98847);for(var _=e(73972),w=E.register=_.register,s=e(10641),T=Object.keys(s),m=0;m",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},99863:function(D,E){E.isLeftAnchor=function(e){return e.xanchor==="left"||e.xanchor==="auto"&&e.x<=.3333333333333333},E.isCenterAnchor=function(e){return e.xanchor==="center"||e.xanchor==="auto"&&e.x>.3333333333333333&&e.x<.6666666666666666},E.isRightAnchor=function(e){return e.xanchor==="right"||e.xanchor==="auto"&&e.x>=.6666666666666666},E.isTopAnchor=function(e){return e.yanchor==="top"||e.yanchor==="auto"&&e.y>=.6666666666666666},E.isMiddleAnchor=function(e){return e.yanchor==="middle"||e.yanchor==="auto"&&e.y>.3333333333333333&&e.y<.6666666666666666},E.isBottomAnchor=function(e){return e.yanchor==="bottom"||e.yanchor==="auto"&&e.y<=.3333333333333333}},26348:function(D,E,e){var _=e(64872),w=_.mod,s=_.modHalf,T=Math.PI,m=2*T;function f(r){return Math.abs(r[1]-r[0])>m-1e-14}function l(r,n){return s(n-r,m)}function t(r,n){if(f(n))return!0;var o,i;n[0](i=w(i,m))&&(i+=m);var u=w(r,m),p=u+m;return u>=o&&u<=i||p>=o&&p<=i}function a(r,n,o,i,u,p,c){u=u||0,p=p||0;var b,d,v,x,g,y=f([o,i]);function k(C,L){return[C*Math.cos(L)+u,p-C*Math.sin(L)]}y?(b=0,d=T,v=m):o=u&&r<=p);var u,p},pathArc:function(r,n,o,i,u){return a(null,r,n,o,i,u,0)},pathSector:function(r,n,o,i,u){return a(null,r,n,o,i,u,1)},pathAnnulus:function(r,n,o,i,u,p){return a(r,n,o,i,u,p,1)}}},73627:function(D,E){var e=Array.isArray,_=ArrayBuffer,w=DataView;function s(f){return _.isView(f)&&!(f instanceof w)}function T(f){return e(f)||s(f)}function m(f,l,t){if(T(f)){if(T(f[0])){for(var a=t,r=0;rp.max?i.set(u):i.set(+o)}},integer:{coerceFunction:function(o,i,u,p){o%1||!_(o)||p.min!==void 0&&op.max?i.set(u):i.set(+o)}},string:{coerceFunction:function(o,i,u,p){if(typeof o!="string"){var c=typeof o=="number";p.strict!==!0&&c?i.set(String(o)):i.set(u)}else p.noBlank&&!o?i.set(u):i.set(o)}},color:{coerceFunction:function(o,i,u){w(o).isValid()?i.set(o):i.set(u)}},colorlist:{coerceFunction:function(o,i,u){Array.isArray(o)&&o.length&&o.every(function(p){return w(p).isValid()})?i.set(o):i.set(u)}},colorscale:{coerceFunction:function(o,i,u){i.set(T.get(o,u))}},angle:{coerceFunction:function(o,i,u){o==="auto"?i.set("auto"):_(o)?i.set(a(+o,360)):i.set(u)}},subplotid:{coerceFunction:function(o,i,u,p){var c=p.regex||t(u);typeof o=="string"&&c.test(o)?i.set(o):i.set(u)},validateFunction:function(o,i){var u=i.dflt;return o===u||typeof o=="string"&&!!t(u).test(o)}},flaglist:{coerceFunction:function(o,i,u,p){if((p.extras||[]).indexOf(o)===-1)if(typeof o=="string"){for(var c=o.split("+"),b=0;b=_&&R<=w?R:t}if(typeof R!="string"&&typeof R!="number")return t;R=String(R);var j=v(U),V=R.charAt(0);!j||V!=="G"&&V!=="g"||(R=R.substr(1),U="");var H=j&&U.substr(0,7)==="chinese",ee=R.match(H?b:c);if(!ee)return t;var Q=ee[1],X=ee[3]||"1",Y=Number(ee[5]||1),K=Number(ee[7]||0),te=Number(ee[9]||0),re=Number(ee[11]||0);if(j){if(Q.length===2)return t;var oe;Q=Number(Q);try{var se=u.getComponentMethod("calendars","getCal")(U);if(H){var ce=X.charAt(X.length-1)==="i";X=parseInt(X,10),oe=se.newDate(Q,se.toMonthIndex(Q,X,ce),Y)}else oe=se.newDate(Q,Number(X),Y)}catch{return t}return oe?(oe.toJD()-i)*a+K*r+te*n+re*o:t}Q=Q.length===2?(Number(Q)+2e3-d)%100+d:Number(Q),X-=1;var xe=new Date(Date.UTC(2e3,X,Y,K,te));return xe.setUTCFullYear(Q),xe.getUTCMonth()!==X||xe.getUTCDate()!==Y?t:xe.getTime()+re*o},_=E.MIN_MS=E.dateTime2ms("-9999"),w=E.MAX_MS=E.dateTime2ms("9999-12-31 23:59:59.9999"),E.isDateTime=function(R,U){return E.dateTime2ms(R,U)!==t};var g=90*a,y=3*r,k=5*n;function h(R,U,B,G,N){if((U||B||G||N)&&(R+=" "+x(U,2)+":"+x(B,2),(G||N)&&(R+=":"+x(G,2),N))){for(var j=4;N%10==0;)j-=1,N/=10;R+="."+x(N,j)}return R}E.ms2DateTime=function(R,U,B){if(typeof R!="number"||!(R>=_&&R<=w))return t;U||(U=0);var G,N,j,V,H,ee,Q=Math.floor(10*f(R+.05,1)),X=Math.round(R-Q/10);if(v(B)){var Y=Math.floor(X/a)+i,K=Math.floor(f(R,a));try{G=u.getComponentMethod("calendars","getCal")(B).fromJD(Y).formatDate("yyyy-mm-dd")}catch{G=p("G%Y-%m-%d")(new Date(X))}if(G.charAt(0)==="-")for(;G.length<11;)G="-0"+G.substr(1);else for(;G.length<10;)G="0"+G;N=U=_+a&&R<=w-a))return t;var U=Math.floor(10*f(R+.05,1)),B=new Date(Math.round(R-U/10));return h(s("%Y-%m-%d")(B),B.getHours(),B.getMinutes(),B.getSeconds(),10*B.getUTCMilliseconds()+U)},E.cleanDate=function(R,U,B){if(R===t)return U;if(E.isJSDate(R)||typeof R=="number"&&isFinite(R)){if(v(B))return m.error("JS Dates and milliseconds are incompatible with world calendars",R),U;if(!(R=E.ms2DateTimeLocal(+R))&&U!==void 0)return U}else if(!E.isDateTime(R,B))return m.error("unrecognized date",R),U;return R};var M=/%\d?f/g,A=/%h/g,C={1:"1",2:"1",3:"2",4:"2"};function L(R,U,B,G){R=R.replace(M,function(j){var V=Math.min(+j.charAt(1)||6,6);return(U/1e3%1+2).toFixed(V).substr(2).replace(/0+$/,"")||"0"});var N=new Date(Math.floor(U+.05));if(R=R.replace(A,function(){return C[B("%q")(N)]}),v(G))try{R=u.getComponentMethod("calendars","worldCalFmt")(R,U,G)}catch{return"Invalid"}return B(R)(N)}var P=[59,59.9,59.99,59.999,59.9999];E.formatDate=function(R,U,B,G,N,j){if(N=v(N)&&N,!U)if(B==="y")U=j.year;else if(B==="m")U=j.month;else{if(B!=="d")return function(V,H){var ee=f(V+.05,a),Q=x(Math.floor(ee/r),2)+":"+x(f(Math.floor(ee/n),60),2);if(H!=="M"){T(H)||(H=0);var X=(100+Math.min(f(V/o,60),P[H])).toFixed(H).substr(1);H>0&&(X=X.replace(/0+$/,"").replace(/[\.]$/,"")),Q+=":"+X}return Q}(R,B)+` `+L(j.dayMonthYear,R,G,N);U=j.dayMonth+` `+j.year}return L(U,R,G,N)};var I=3*a;E.incrementMonth=function(R,U,B){B=v(B)&&B;var G=f(R,a);if(R=Math.round(R-G),B)try{var N=Math.round(R/a)+i,j=u.getComponentMethod("calendars","getCal")(B),V=j.fromJD(N);return U%12?j.add(V,U,"m"):j.add(V,U/12,"y"),(V.toJD()-i)*a+G}catch{m.error("invalid ms "+R+" in calendar "+B)}var H=new Date(R+I);return H.setUTCMonth(H.getUTCMonth()+U)+G-I},E.findExactDates=function(R,U){for(var B,G,N=0,j=0,V=0,H=0,ee=v(U)&&u.getComponentMethod("calendars","getCal")(U),Q=0;Q0&&h[M+1][0]<0)return M;return null}switch(p=g==="RUS"||g==="FJI"?function(h){var M;if(k(h)===null)M=h;else for(M=new Array(h.length),d=0;dM?A[C++]=[h[d][0]+360,h[d][1]]:d===M?(A[C++]=h[d],A[C++]=[h[d][0],-90]):A[C++]=h[d];var L=r.tester(A);L.pts.pop(),y.push(L)}:function(h){y.push(r.tester(h))},v.type){case"MultiPolygon":for(c=0;cB&&(B=j,I=N)}else I=R;return T.default(I).geometry.coordinates}(L),A.fIn=h,A.fOut=L,v.push(L)}else l.log(["Location",A.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete d[M]}switch(c.type){case"FeatureCollection":var y=c.features;for(b=0;b100?(clearInterval(M),k("Unexpected error while fetching from "+g)):void h++},50)})}for(var v=0;v0&&(T.push(m),m=[])}return m.length>0&&T.push(m),T},E.makeLine=function(w){return w.length===1?{type:"LineString",coordinates:w[0]}:{type:"MultiLineString",coordinates:w}},E.makePolygon=function(w){if(w.length===1)return{type:"Polygon",coordinates:w};for(var s=new Array(w.length),T=0;T1||y<0||y>1?null:{x:l+p*y,y:t+d*y}}function f(l,t,a,r,n){var o=r*l+n*t;if(o<0)return r*r+n*n;if(o>a){var i=r-l,u=n-t;return i*i+u*u}var p=r*t-n*l;return p*p/a}E.segmentsIntersect=m,E.segmentDistance=function(l,t,a,r,n,o,i,u){if(m(l,t,a,r,n,o,i,u))return 0;var p=a-l,c=r-t,b=i-n,d=u-o,v=p*p+c*c,x=b*b+d*d,g=Math.min(f(p,c,v,n-l,o-t),f(p,c,v,i-l,u-t),f(b,d,x,l-n,t-o),f(b,d,x,a-n,r-o));return Math.sqrt(g)},E.getTextLocation=function(l,t,a,r){if(l===w&&r===s||(_={},w=l,s=r),_[a])return _[a];var n=l.getPointAtLength(T(a-r/2,t)),o=l.getPointAtLength(T(a+r/2,t)),i=Math.atan((o.y-n.y)/(o.x-n.x)),u=l.getPointAtLength(T(a,t)),p={x:(4*u.x+n.x+o.x)/6,y:(4*u.y+n.y+o.y)/6,theta:i};return _[a]=p,p},E.clearLocationCache=function(){w=null},E.getVisibleSegment=function(l,t,a){var r,n,o=t.left,i=t.right,u=t.top,p=t.bottom,c=0,b=l.getTotalLength(),d=b;function v(g){var y=l.getPointAtLength(g);g===0?r=y:g===b&&(n=y);var k=y.xi?y.x-i:0,h=y.yp?y.y-p:0;return Math.sqrt(k*k+h*h)}for(var x=v(c);x;){if((c+=x+a)>d)return;x=v(c)}for(x=v(d);x;){if(c>(d-=x+a))return;x=v(d)}return{min:c,max:d,len:d-c,total:b,isClosed:c===0&&d===b&&Math.abs(r.x-n.x)<.1&&Math.abs(r.y-n.y)<.1}},E.findPointOnPath=function(l,t,a,r){for(var n,o,i,u=(r=r||{}).pathLength||l.getTotalLength(),p=r.tolerance||.001,c=r.iterationLimit||30,b=l.getPointAtLength(0)[a]>l.getPointAtLength(u)[a]?-1:1,d=0,v=0,x=u;d0?x=n:v=n,d++}return o}},81697:function(D,E,e){var _=e(92770),w=e(84267),s=e(25075),T=e(21081),m=e(22399).defaultLine,f=e(73627).isArrayOrTypedArray,l=s(m);function t(n,o){var i=n;return i[3]*=o,i}function a(n){if(_(n))return l;var o=s(n);return o.length?o:l}function r(n){return _(n)?n:1}D.exports={formatColor:function(n,o,i){var u,p,c,b,d,v=n.color,x=f(v),g=f(o),y=T.extractOpts(n),k=[];if(u=y.colorscale!==void 0?T.makeColorScaleFuncFromTrace(n):a,p=x?function(M,A){return M[A]===void 0?l:s(u(M[A]))}:a,c=g?function(M,A){return M[A]===void 0?1:r(M[A])}:r,x||g)for(var h=0;h1?(_*E+_*e)/_:E+e,s=String(w).length;if(s>16){var T=String(e).length;if(s>=String(E).length+T){var m=parseFloat(w).toPrecision(12);m.indexOf("e+")===-1&&(w=+m)}}return w}},71828:function(D,E,e){var _=e(39898),w=e(84096).g0,s=e(60721).WU,T=e(92770),m=e(50606),f=m.FP_SAFE,l=-f,t=m.BADNUM,a=D.exports={};a.adjustFormat=function(K){return!K||/^\d[.]\df/.test(K)||/[.]\d%/.test(K)?K:K==="0.f"?"~f":/^\d%/.test(K)?"~%":/^\ds/.test(K)?"~s":!/^[~,.0$]/.test(K)&&/[&fps]/.test(K)?"~"+K:K};var r={};a.warnBadFormat=function(K){var te=String(K);r[te]||(r[te]=1,a.warn('encountered bad format: "'+te+'"'))},a.noFormat=function(K){return String(K)},a.numberFormat=function(K){var te;try{te=s(a.adjustFormat(K))}catch{return a.warnBadFormat(K),a.noFormat}return te},a.nestedProperty=e(65487),a.keyedContainer=e(66636),a.relativeAttr=e(6962),a.isPlainObject=e(41965),a.toLogRange=e(58163),a.relinkPrivateKeys=e(51332);var n=e(73627);a.isTypedArray=n.isTypedArray,a.isArrayOrTypedArray=n.isArrayOrTypedArray,a.isArray1D=n.isArray1D,a.ensureArray=n.ensureArray,a.concat=n.concat,a.maxRowLength=n.maxRowLength,a.minRowLength=n.minRowLength;var o=e(64872);a.mod=o.mod,a.modHalf=o.modHalf;var i=e(96554);a.valObjectMeta=i.valObjectMeta,a.coerce=i.coerce,a.coerce2=i.coerce2,a.coerceFont=i.coerceFont,a.coercePattern=i.coercePattern,a.coerceHoverinfo=i.coerceHoverinfo,a.coerceSelectionMarkerOpacity=i.coerceSelectionMarkerOpacity,a.validate=i.validate;var u=e(41631);a.dateTime2ms=u.dateTime2ms,a.isDateTime=u.isDateTime,a.ms2DateTime=u.ms2DateTime,a.ms2DateTimeLocal=u.ms2DateTimeLocal,a.cleanDate=u.cleanDate,a.isJSDate=u.isJSDate,a.formatDate=u.formatDate,a.incrementMonth=u.incrementMonth,a.dateTick0=u.dateTick0,a.dfltRange=u.dfltRange,a.findExactDates=u.findExactDates,a.MIN_MS=u.MIN_MS,a.MAX_MS=u.MAX_MS;var p=e(65888);a.findBin=p.findBin,a.sorterAsc=p.sorterAsc,a.sorterDes=p.sorterDes,a.distinctVals=p.distinctVals,a.roundUp=p.roundUp,a.sort=p.sort,a.findIndexOfMin=p.findIndexOfMin,a.sortObjectKeys=e(78607);var c=e(80038);a.aggNums=c.aggNums,a.len=c.len,a.mean=c.mean,a.median=c.median,a.midRange=c.midRange,a.variance=c.variance,a.stdev=c.stdev,a.interp=c.interp;var b=e(35657);a.init2dArray=b.init2dArray,a.transposeRagged=b.transposeRagged,a.dot=b.dot,a.translationMatrix=b.translationMatrix,a.rotationMatrix=b.rotationMatrix,a.rotationXYMatrix=b.rotationXYMatrix,a.apply3DTransform=b.apply3DTransform,a.apply2DTransform=b.apply2DTransform,a.apply2DTransform2=b.apply2DTransform2,a.convertCssMatrix=b.convertCssMatrix,a.inverseTransformMatrix=b.inverseTransformMatrix;var d=e(26348);a.deg2rad=d.deg2rad,a.rad2deg=d.rad2deg,a.angleDelta=d.angleDelta,a.angleDist=d.angleDist,a.isFullCircle=d.isFullCircle,a.isAngleInsideSector=d.isAngleInsideSector,a.isPtInsideSector=d.isPtInsideSector,a.pathArc=d.pathArc,a.pathSector=d.pathSector,a.pathAnnulus=d.pathAnnulus;var v=e(99863);a.isLeftAnchor=v.isLeftAnchor,a.isCenterAnchor=v.isCenterAnchor,a.isRightAnchor=v.isRightAnchor,a.isTopAnchor=v.isTopAnchor,a.isMiddleAnchor=v.isMiddleAnchor,a.isBottomAnchor=v.isBottomAnchor;var x=e(87642);a.segmentsIntersect=x.segmentsIntersect,a.segmentDistance=x.segmentDistance,a.getTextLocation=x.getTextLocation,a.clearLocationCache=x.clearLocationCache,a.getVisibleSegment=x.getVisibleSegment,a.findPointOnPath=x.findPointOnPath;var g=e(1426);a.extendFlat=g.extendFlat,a.extendDeep=g.extendDeep,a.extendDeepAll=g.extendDeepAll,a.extendDeepNoArrays=g.extendDeepNoArrays;var y=e(47769);a.log=y.log,a.warn=y.warn,a.error=y.error;var k=e(30587);a.counterRegex=k.counter;var h=e(79990);a.throttle=h.throttle,a.throttleDone=h.done,a.clearThrottle=h.clear;var M=e(24401);function A(K){var te={};for(var re in K)for(var oe=K[re],se=0;sef||K=te)&&T(K)&&K>=0&&K%1==0},a.noop=e(64213),a.identity=e(23389),a.repeat=function(K,te){for(var re=new Array(te),oe=0;oere?Math.max(re,Math.min(te,K)):Math.max(te,Math.min(re,K))},a.bBoxIntersect=function(K,te,re){return re=re||0,K.left<=te.right+re&&te.left<=K.right+re&&K.top<=te.bottom+re&&te.top<=K.bottom+re},a.simpleMap=function(K,te,re,oe,se){for(var ce=K.length,xe=new Array(ce),pe=0;pe=Math.pow(2,re)?se>10?(a.warn("randstr failed uniqueness"),de):K(te,re,oe,(se||0)+1):de},a.OptionControl=function(K,te){K||(K={}),te||(te="opt");var re={optionList:[],_newoption:function(oe){oe[te]=K,re[oe.name]=oe,re.optionList.push(oe)}};return re["_"+te]=K,re},a.smooth=function(K,te){if((te=Math.round(te)||0)<2)return K;var re,oe,se,ce,xe=K.length,pe=2*xe,de=2*te-1,he=new Array(de),ye=new Array(xe);for(re=0;re=pe&&(se-=pe*Math.floor(se/pe)),se<0?se=-1-se:se>=xe&&(se=pe-1-se),ce+=K[se]*he[oe];ye[re]=ce}return ye},a.syncOrAsync=function(K,te,re){var oe;function se(){return a.syncOrAsync(K,te,re)}for(;K.length;)if((oe=(0,K.splice(0,1)[0])(te))&&oe.then)return oe.then(se);return re&&re(te)},a.stripTrailingSlash=function(K){return K.substr(-1)==="/"?K.substr(0,K.length-1):K},a.noneOrAll=function(K,te,re){if(K){var oe,se=!1,ce=!0;for(oe=0;oe0?se:0})},a.fillArray=function(K,te,re,oe){if(oe=oe||a.identity,a.isArrayOrTypedArray(K))for(var se=0;se1?se+xe[1]:"";if(ce&&(xe.length>1||pe.length>4||re))for(;oe.test(pe);)pe=pe.replace(oe,"$1"+ce+"$2");return pe+de},a.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var U=/^\w*$/;a.templateString=function(K,te){var re={};return K.replace(a.TEMPLATE_STRING_REGEX,function(oe,se){var ce;return U.test(se)?ce=te[se]:(re[se]=re[se]||a.nestedProperty(te,se).get,ce=re[se]()),a.isValidTextValue(ce)?ce:""})};var B={max:10,count:0,name:"hovertemplate"};a.hovertemplateString=function(){return ee.apply(B,arguments)};var G={max:10,count:0,name:"texttemplate"};a.texttemplateString=function(){return ee.apply(G,arguments)};var N=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function j(K){var te=K.match(N);return te?{key:te[1],op:te[2],number:Number(te[3])}:{key:K,op:null,number:null}}var V={max:10,count:0,name:"texttemplate",parseMultDiv:!0};a.texttemplateStringForShapes=function(){return ee.apply(V,arguments)};var H=/^[:|\|]/;function ee(K,te,re){var oe=this,se=arguments;te||(te={});var ce={};return K.replace(a.TEMPLATE_STRING_REGEX,function(xe,pe,de){var he=pe==="_xother"||pe==="_yother",ye=pe==="_xother_"||pe==="_yother_",ze=pe==="xother_"||pe==="yother_",Te=pe==="xother"||pe==="yother"||he||ze||ye,Ae=pe;(he||ye)&&(Ae=Ae.substring(1)),(ze||ye)&&(Ae=Ae.substring(0,Ae.length-1));var Me,Ce,ne,ue=null,me=null;if(oe.parseMultDiv){var we=j(Ae);Ae=we.key,ue=we.op,me=we.number}if(Te){if((Me=te[Ae])===void 0)return""}else for(ne=3;ne=48&&xe<=57,he=pe>=48&&pe<=57;if(de&&(oe=10*oe+xe-48),he&&(se=10*se+pe-48),!de||!he){if(oe!==se)return oe-se;if(xe!==pe)return xe-pe}}return se-oe};var Q=2e9;a.seedPseudoRandom=function(){Q=2e9},a.pseudoRandom=function(){var K=Q;return Q=(69069*Q+1)%4294967296,Math.abs(Q-K)<429496729?a.pseudoRandom():Q/4294967296},a.fillText=function(K,te,re){var oe=Array.isArray(re)?function(xe){re.push(xe)}:function(xe){re.text=xe},se=a.extractOption(K,te,"htx","hovertext");if(a.isValidTextValue(se))return oe(se);var ce=a.extractOption(K,te,"tx","text");return a.isValidTextValue(ce)?oe(ce):void 0},a.isValidTextValue=function(K){return K||K===0},a.formatPercent=function(K,te){te=te||0;for(var re=(Math.round(100*K*Math.pow(10,te))*Math.pow(.1,te)).toFixed(te)+"%",oe=0;oe1&&(he=1):he=0,a.strTranslate(se-he*(re+xe),ce-he*(oe+pe))+a.strScale(he)+(de?"rotate("+de+(te?"":" "+re+" "+oe)+")":"")},a.setTransormAndDisplay=function(K,te){K.attr("transform",a.getTextTransform(te)),K.style("display",te.scale?null:"none")},a.ensureUniformFontSize=function(K,te){var re=a.extendFlat({},te);return re.size=Math.max(te.size,K._fullLayout.uniformtext.minsize||0),re},a.join2=function(K,te,re){var oe=K.length;return oe>1?K.slice(0,-1).join(te)+re+K[oe-1]:K.join(te)},a.bigFont=function(K){return Math.round(1.2*K)};var X=a.getFirefoxVersion(),Y=X!==null&&X<86;a.getPositionFromD3Event=function(){return Y?[_.event.layerX,_.event.layerY]:[_.event.offsetX,_.event.offsetY]}},41965:function(D){D.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(D,E,e){var _=e(65487),w=/^\w*$/;D.exports=function(s,T,m,f){var l,t,a;m=m||"name",f=f||"value";var r={};T&&T.length?(a=_(s,T),t=a.get()):t=s,T=T||"";var n={};if(t)for(l=0;l2)return r[p]=2|r[p],i.set(u,null);if(o){for(l=p;l1){var m=["LOG:"];for(T=0;T1){var f=[];for(T=0;T"),"long")}},s.warn=function(){var T;if(_.logging>0){var m=["WARN:"];for(T=0;T0){var f=[];for(T=0;T"),"stick")}},s.error=function(){var T;if(_.logging>0){var m=["ERROR:"];for(T=0;T0){var f=[];for(T=0;T"),"stick")}}},77310:function(D,E,e){var _=e(39898);D.exports=function(w,s,T){var m=w.selectAll("g."+T.replace(/\s/g,".")).data(s,function(l){return l[0].trace.uid});m.exit().remove(),m.enter().append("g").attr("class",T),m.order();var f=w.classed("rangeplot")?"nodeRangePlot3":"node3";return m.each(function(l){l[0][f]=_.select(this)}),m}},35657:function(D,E,e){var _=e(79576);E.init2dArray=function(w,s){for(var T=new Array(w),m=0;me/2?E-Math.round(E/e)*e:E}}},65487:function(D,E,e){var _=e(92770),w=e(73627).isArrayOrTypedArray;function s(r,n){return function(){var o,i,u,p,c,b=r;for(p=0;p/g),i=0;it||d===w||dr||c&&n(p))}:function(p,c){var b=p[0],d=p[1];if(b===w||bt||d===w||dr)return!1;var v,x,g,y,k,h=f.length,M=f[0][0],A=f[0][1],C=0;for(v=1;vMath.max(x,M)||d>Math.max(g,A)))if(di||Math.abs(_(a,p))>l)return!0;return!1},s.filter=function(T,m){var f=[T[0]],l=0,t=0;function a(r){T.push(r);var n=f.length,o=l;f.splice(t+1);for(var i=o+1;i1&&a(T.pop()),{addPt:a,raw:T,filtered:f}}},79749:function(D,E,e){var _=e(58617),w=e(98580);D.exports=function(s,T,m){var f=s._fullLayout,l=!0;return f._glcanvas.each(function(t){if(t.regl)t.regl.preloadCachedCode(m);else if(!t.pick||f._has("parcoords")){try{t.regl=w({canvas:this,attributes:{antialias:!t.pick,preserveDrawingBuffer:!0},pixelRatio:s._context.plotGlPixelRatio||e.g.devicePixelRatio,extensions:T||[],cachedCode:m||{}})}catch{l=!1}t.regl||(l=!1),l&&this.addEventListener("webglcontextlost",function(a){s&&s.emit&&s.emit("plotly_webglcontextlost",{event:a,layer:t.key})},!1)}}),l||_({container:f._glcontainer.node()}),l}},45142:function(D,E,e){var _=e(92770),w=e(35791);D.exports=function(s){var T;if(typeof(T=s&&s.hasOwnProperty("userAgent")?s.userAgent:function(){var n;return typeof navigator<"u"&&(n=navigator.userAgent),n&&n.headers&&typeof n.headers["user-agent"]=="string"&&(n=n.headers["user-agent"]),n}())!="string")return!0;var m=w({ua:{headers:{"user-agent":T}},tablet:!0,featureDetect:!1});if(!m){for(var f=T.split(" "),l=1;l-1;t--){var a=f[t];if(a.substr(0,8)==="Version/"){var r=a.substr(8).split(".")[0];if(_(r)&&(r=+r),r>=13)return!0}}}return m}},75138:function(D){D.exports=function(E,e){if(e instanceof RegExp){for(var _=e.toString(),w=0;ww.queueLength&&(T.undoQueue.queue.shift(),T.undoQueue.index--))},startSequence:function(T){T.undoQueue=T.undoQueue||{index:0,queue:[],sequence:!1},T.undoQueue.sequence=!0,T.undoQueue.beginSequence=!0},stopSequence:function(T){T.undoQueue=T.undoQueue||{index:0,queue:[],sequence:!1},T.undoQueue.sequence=!1,T.undoQueue.beginSequence=!1},undo:function(T){var m,f;if(!(T.undoQueue===void 0||isNaN(T.undoQueue.index)||T.undoQueue.index<=0)){for(T.undoQueue.index--,m=T.undoQueue.queue[T.undoQueue.index],T.undoQueue.inSequence=!0,f=0;f=T.undoQueue.queue.length)){for(m=T.undoQueue.queue[T.undoQueue.index],T.undoQueue.inSequence=!0,f=0;fn}function a(r,n){return r>=n}E.findBin=function(r,n,o){if(_(n.start))return o?Math.ceil((r-n.start)/n.size-m)-1:Math.floor((r-n.start)/n.size+m);var i,u,p=0,c=n.length,b=0,d=c>1?(n[c-1]-n[0])/(c-1):1;for(u=d>=0?o?f:l:o?a:t,r+=d*m*(o?-1:1)*(d>=0?1:-1);p90&&w.log("Long binary search..."),p-1},E.sorterAsc=function(r,n){return r-n},E.sorterDes=function(r,n){return n-r},E.distinctVals=function(r){var n,o=r.slice();for(o.sort(E.sorterAsc),n=o.length-1;n>-1&&o[n]===T;n--);for(var i,u=o[n]-o[0]||1,p=u/(n||1)/1e4,c=[],b=0;b<=n;b++){var d=o[b],v=d-i;i===void 0?(c.push(d),i=d):v>p&&(u=Math.min(u,v),c.push(d),i=d)}return{vals:c,minDiff:u}},E.roundUp=function(r,n,o){for(var i,u=0,p=n.length-1,c=0,b=o?0:1,d=o?1:0,v=o?Math.ceil:Math.floor;u0&&(i=1),o&&i)return r.sort(n)}return i?r:r.reverse()},E.findIndexOfMin=function(r,n){n=n||s;for(var o,i=1/0,u=0;um.length)&&(f=m.length),_(T)||(T=!1),w(m[0])){for(t=new Array(f),l=0;ls.length-1)return s[s.length-1];var m=T%1;return m*s[Math.ceil(T)]+(1-m)*s[Math.floor(T)]}},78614:function(D,E,e){var _=e(25075);D.exports=function(w){return w?_(w):[0,0,0,1]}},63893:function(D,E,e){var _=e(39898),w=e(71828),s=w.strTranslate,T=e(77922),m=e(18783).LINE_SPACING,f=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;E.convertToTspans=function(R,U,B){var G=R.text(),N=!R.attr("data-notex")&&U&&U._context.typesetMath&&typeof MathJax<"u"&&G.match(f),j=_.select(R.node().parentNode);if(!j.empty()){var V=R.attr("class")?R.attr("class").split(" ")[0]:"text";return V+="-math",j.selectAll("svg."+V).remove(),j.selectAll("g."+V+"-group").remove(),R.style("display",null).attr({"data-unformatted":G,"data-math":"N"}),N?(U&&U._promises||[]).push(new Promise(function(ee){R.style("display","none");var Q=parseInt(R.node().style.fontSize,10),X={fontSize:Q};(function(Y,K,te){var re,oe,se,ce,xe=parseInt((MathJax.version||"").split(".")[0]);if(xe===2||xe===3){var pe=function(){var he="math-output-"+w.randstr({},64),ye=(ce=_.select("body").append("div").attr({id:he}).style({visibility:"hidden",position:"absolute","font-size":K.fontSize+"px"}).text(Y.replace(l,"\\lt ").replace(t,"\\gt "))).node();return xe===2?MathJax.Hub.Typeset(ye):MathJax.typeset([ye])},de=function(){var he=ce.select(xe===2?".MathJax_SVG":".MathJax"),ye=!he.empty()&&ce.select("svg").node();if(ye){var ze,Te=ye.getBoundingClientRect();ze=xe===2?_.select("body").select("#MathJax_SVG_glyphs"):he.select("defs"),te(he,ze,Te)}else w.log("There was an error in the tex syntax.",Y),te();ce.remove()};xe===2?MathJax.Hub.Queue(function(){return oe=w.extendDeepAll({},MathJax.Hub.config),se=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:a},displayAlign:"left"})},function(){if((re=MathJax.Hub.config.menuSettings.renderer)!=="SVG")return MathJax.Hub.setRenderer("SVG")},pe,de,function(){if(re!=="SVG")return MathJax.Hub.setRenderer(re)},function(){return se!==void 0&&(MathJax.Hub.processSectionDelay=se),MathJax.Hub.Config(oe)}):xe===3&&(oe=w.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=a,(re=MathJax.config.startup.output)!=="svg"&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){pe(),de(),re!=="svg"&&(MathJax.config.startup.output=re),MathJax.config=oe}))}else w.warn("No MathJax version:",MathJax.version)})(N[2],X,function(Y,K,te){j.selectAll("svg."+V).remove(),j.selectAll("g."+V+"-group").remove();var re=Y&&Y.select("svg");if(!re||!re.node())return H(),void ee();var oe=j.append("g").classed(V+"-group",!0).attr({"pointer-events":"none","data-unformatted":G,"data-math":"Y"});oe.node().appendChild(re.node()),K&&K.node()&&re.node().insertBefore(K.node().cloneNode(!0),re.node().firstChild);var se=te.width,ce=te.height;re.attr({class:V,height:ce,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var xe=R.node().style.fill||"black",pe=re.select("g");pe.attr({fill:xe,stroke:xe});var de=pe.node().getBoundingClientRect(),he=de.width,ye=de.height;(he>se||ye>ce)&&(re.style("overflow","hidden"),he=(de=re.node().getBoundingClientRect()).width,ye=de.height);var ze=+R.attr("x"),Te=+R.attr("y"),Ae=-(Q||R.node().getBoundingClientRect().height)/4;if(V[0]==="y")oe.attr({transform:"rotate("+[-90,ze,Te]+")"+s(-he/2,Ae-ye/2)});else if(V[0]==="l")Te=Ae-ye/2;else if(V[0]==="a"&&V.indexOf("atitle")!==0)ze=0,Te=Ae;else{var Me=R.attr("text-anchor");ze-=he*(Me==="middle"?.5:Me==="end"?1:0),Te=Te+Ae-ye/2}re.attr({x:ze,y:Te}),B&&B.call(R,oe),ee(oe)})})):H(),R}function H(){j.empty()||(V=R.attr("class")+"-math",j.select("svg."+V).remove()),R.text("").style("white-space","pre");var ee=function(Q,X){X=X.replace(p," ");var Y,K=!1,te=[],re=-1;function oe(){re++;var me=document.createElementNS(T.svg,"tspan");_.select(me).attr({class:"line",dy:re*m+"em"}),Q.appendChild(me),Y=me;var we=te;if(te=[{node:me}],we.length>1)for(var Ee=1;Ee doesnt match end tag <"+me+">. Pretending it did match.",X),Y=te[te.length-1].node}else w.log("Ignoring unexpected end tag .",X)}d.test(X)?oe():(Y=Q,te=[{node:Q}]);for(var pe=X.split(c),de=0;de|>|>)/g,a=[["$","$"],["\\(","\\)"]],r={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"},n={sub:"0.3em",sup:"-0.6em"},o={sub:"-0.21em",sup:"0.42em"},i="​",u=["http:","https:","mailto:","",void 0,":"],p=E.NEWLINES=/(\r\n?|\n)/g,c=/(<[^<>]*>)/,b=/<(\/?)([^ >]*)(\s+(.*))?>/i,d=//i;E.BR_TAG_ALL=//gi;var v=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,x=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,g=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,y=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function k(R,U){if(!R)return null;var B=R.match(U),G=B&&(B[3]||B[4]);return G&&C(G)}var h=/(^|;)\s*color:/;E.plainText=function(R,U){for(var B=(U=U||{}).len!==void 0&&U.len!==-1?U.len:1/0,G=U.allowedTags!==void 0?U.allowedTags:["br"],N=3,j=R.split(c),V=[],H="",ee=0,Q=0;QN?V.push(X.substr(0,re-N)+"..."):V.push(X.substr(0,re));break}H=""}}return V.join("")};var M={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},A=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function C(R){return R.replace(A,function(U,B){return(B.charAt(0)==="#"?function(G){if(!(G>1114111)){var N=String.fromCodePoint;if(N)return N(G);var j=String.fromCharCode;return G<=65535?j(G):j(55232+(G>>10),G%1024+56320)}}(B.charAt(1)==="x"?parseInt(B.substr(2),16):parseInt(B.substr(1),10)):M[B])||U})}function L(R){var U=encodeURI(decodeURI(R)),B=document.createElement("a"),G=document.createElement("a");B.href=R,G.href=U;var N=B.protocol,j=G.protocol;return u.indexOf(N)!==-1&&u.indexOf(j)!==-1?U:""}function P(R,U,B){var G,N,j,V=B.horizontalAlign,H=B.verticalAlign||"top",ee=R.node().getBoundingClientRect(),Q=U.node().getBoundingClientRect();return N=H==="bottom"?function(){return ee.bottom-G.height}:H==="middle"?function(){return ee.top+(ee.height-G.height)/2}:function(){return ee.top},j=V==="right"?function(){return ee.right-G.width}:V==="center"?function(){return ee.left+(ee.width-G.width)/2}:function(){return ee.left},function(){G=this.node().getBoundingClientRect();var X=j()-Q.left,Y=N()-Q.top,K=B.gd||{};if(B.gd){K._fullLayout._calcInverseTransform(K);var te=w.apply3DTransform(K._fullLayout._invTransform)(X,Y);X=te[0],Y=te[1]}return this.style({top:Y+"px",left:X+"px","z-index":1e3}),this}}E.convertEntities=C,E.sanitizeHTML=function(R){R=R.replace(p," ");for(var U=document.createElement("p"),B=U,G=[],N=R.split(c),j=0;jm.ts+s?t():m.timer=setTimeout(function(){t(),m.timer=null},s)},E.done=function(w){var s=e[w];return s&&s.timer?new Promise(function(T){var m=s.onDone;s.onDone=function(){m&&m(),T(),s.onDone=null}}):Promise.resolve()},E.clear=function(w){if(w)_(e[w]),delete e[w];else for(var s in e)E.clear(s)}},58163:function(D,E,e){var _=e(92770);D.exports=function(w,s){if(w>0)return Math.log(w)/Math.LN10;var T=Math.log(Math.min(s[0],s[1]))/Math.LN10;return _(T)||(T=Math.log(Math.max(s[0],s[1]))/Math.LN10-6),T}},90973:function(D,E,e){var _=D.exports={},w=e(78776).locationmodeToLayer,s=e(96892).zL;_.getTopojsonName=function(T){return[T.scope.replace(/ /g,"-"),"_",T.resolution.toString(),"m"].join("")},_.getTopojsonPath=function(T,m){return T+m+".json"},_.getTopojsonFeatures=function(T,m){var f=w[T.locationmode],l=m.objects[f];return s(m,l).features}},37815:function(D){D.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},92177:function(D){D.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(D,E,e){var _=e(73972);D.exports=function(w){for(var s,T,m=_.layoutArrayContainers,f=_.layoutArrayRegexes,l=w.split("[")[0],t=0;t0&&T.log("Clearing previous rejected promises from queue."),x._promises=[]},E.cleanLayout=function(x){var g,y;x||(x={}),x.xaxis1&&(x.xaxis||(x.xaxis=x.xaxis1),delete x.xaxis1),x.yaxis1&&(x.yaxis||(x.yaxis=x.yaxis1),delete x.yaxis1),x.scene1&&(x.scene||(x.scene=x.scene1),delete x.scene1);var k=(m.subplotsRegistry.cartesian||{}).attrRegex,h=(m.subplotsRegistry.polar||{}).attrRegex,M=(m.subplotsRegistry.ternary||{}).attrRegex,A=(m.subplotsRegistry.gl3d||{}).attrRegex,C=Object.keys(x);for(g=0;g3?(te.x=1.02,te.xanchor="left"):te.x<-2&&(te.x=-.02,te.xanchor="right"),te.y>3?(te.y=1.02,te.yanchor="bottom"):te.y<-2&&(te.y=-.02,te.yanchor="top")),o(x),x.dragmode==="rotate"&&(x.dragmode="orbit"),l.clean(x),x.template&&x.template.layout&&E.cleanLayout(x.template.layout),x},E.cleanData=function(x){for(var g=0;g0)return x.substr(0,g)}E.hasParent=function(x,g){for(var y=d(g);y;){if(y in x)return!0;y=d(y)}return!1};var v=["x","y","z"];E.clearAxisTypes=function(x,g,y){for(var k=0;k1&&s.warn("Full array edits are incompatible with other edits",i);var x=r[""][""];if(l(x))a.set(null);else{if(!Array.isArray(x))return s.warn("Unrecognized full array edit value",i,x),!0;a.set(x)}return!b&&(u(d,v),p(t),!0)}var g,y,k,h,M,A,C,L,P=Object.keys(r).map(Number).sort(T),I=a.get(),R=I||[],U=o(v,i).get(),B=[],G=-1,N=R.length;for(g=0;gR.length-(C?0:1))s.warn("index out of range",i,k);else if(A!==void 0)M.length>1&&s.warn("Insertion & removal are incompatible with edits to the same index.",i,k),l(A)?B.push(k):C?(A==="add"&&(A={}),R.splice(k,0,A),U&&U.splice(k,0,{})):s.warn("Unrecognized full object edit value",i,k,A),G===-1&&(G=k);else for(y=0;y=0;g--)R.splice(B[g],1),U&&U.splice(B[g],1);if(R.length?I||a.set(R):a.set(null),b)return!1;if(u(d,v),c!==w){var j;if(G===-1)j=P;else{for(N=Math.max(R.length,N),j=[],g=0;g=G);g++)j.push(k);for(g=G;g=ne.data.length||Ee<-ne.data.length)throw new Error(me+" must be valid indices for gd.data.");if(ue.indexOf(Ee,we+1)>-1||Ee>=0&&ue.indexOf(-ne.data.length+Ee)>-1||Ee<0&&ue.indexOf(ne.data.length+Ee)>-1)throw new Error("each index in "+me+" must be unique.")}}function I(ne,ue,me){if(!Array.isArray(ne.data))throw new Error("gd.data must be an array.");if(ue===void 0)throw new Error("currentIndices is a required argument.");if(Array.isArray(ue)||(ue=[ue]),P(ne,ue,"currentIndices"),me===void 0||Array.isArray(me)||(me=[me]),me!==void 0&&P(ne,me,"newIndices"),me!==void 0&&ue.length!==me.length)throw new Error("current and new indices must be of equal length.")}function R(ne,ue,me,we,Ee){(function(Ye,Ze,st,ot){var ft=T.isPlainObject(ot);if(!Array.isArray(Ye.data))throw new Error("gd.data must be an array");if(!T.isPlainObject(Ze))throw new Error("update must be a key:value object");if(st===void 0)throw new Error("indices must be an integer or array of integers");for(var yt in P(Ye,st,"indices"),Ze){if(!Array.isArray(Ze[yt])||Ze[yt].length!==st.length)throw new Error("attribute "+yt+" must be an array of length equal to indices array length");if(ft&&(!(yt in ot)||!Array.isArray(ot[yt])||ot[yt].length!==Ze[yt].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")}})(ne,ue,me,we);for(var Ue=function(Ye,Ze,st,ot){var ft,yt,Et,Tt,xt,Dt=T.isPlainObject(ot),It=[];for(var Ft in Array.isArray(st)||(st=[st]),st=L(st,Ye.data.length-1),Ze)for(var qt=0;qt-1&&me.indexOf("grouptitlefont")===-1?je(me,me.replace("titlefont","title.font")):me.indexOf("titleposition")>-1?je(me,me.replace("titleposition","title.position")):me.indexOf("titleside")>-1?je(me,me.replace("titleside","title.side")):me.indexOf("titleoffset")>-1&&je(me,me.replace("titleoffset","title.offset")):je(me,me.replace("title","title.text"));function je(ge,be){ne[be]=ne[ge],delete ne[ge]}}function ee(ne,ue,me){ne=T.getGraphDiv(ne),v.clearPromiseQueue(ne);var we={};if(typeof ue=="string")we[ue]=me;else{if(!T.isPlainObject(ue))return T.warn("Relayout fail.",ue,me),Promise.reject();we=T.extendFlat({},ue)}Object.keys(we).length&&(ne.changed=!0);var Ee=re(ne,we),Ue=Ee.flags;Ue.calc&&(ne.calcdata=void 0);var De=[r.previousPromises];Ue.layoutReplot?De.push(x.layoutReplot):Object.keys(we).length&&(Q(ne,Ue,Ee)||r.supplyDefaults(ne),Ue.legend&&De.push(x.doLegend),Ue.layoutstyle&&De.push(x.layoutStyles),Ue.axrange&&X(De,Ee.rangesAltered),Ue.ticks&&De.push(x.doTicksRelayout),Ue.modebar&&De.push(x.doModeBar),Ue.camera&&De.push(x.doCamera),Ue.colorbars&&De.push(x.doColorBars),De.push(h)),De.push(r.rehover,r.redrag,r.reselect),l.add(ne,ee,[ne,Ee.undoit],ee,[ne,Ee.redoit]);var je=T.syncOrAsync(De,ne);return je&&je.then||(je=Promise.resolve(ne)),je.then(function(){return ne.emit("plotly_relayout",Ee.eventData),ne})}function Q(ne,ue,me){var we=ne._fullLayout;if(!ue.axrange)return!1;for(var Ee in ue)if(Ee!=="axrange"&&ue[Ee])return!1;for(var Ue in me.rangesAltered){var De=n.id2name(Ue),je=ne.layout[De],ge=we[De];if(ge.autorange=je.autorange,je.range&&(ge.range=je.range.slice()),ge.cleanRange(),ge._matchGroup){for(var be in ge._matchGroup)if(be!==Ue){var Se=we[n.id2name(be)];Se.autorange=ge.autorange,Se.range=ge.range.slice(),Se._input.range=ge.range.slice()}}}return!0}function X(ne,ue){var me=ue?function(we){var Ee=[];for(var Ue in ue){var De=n.getFromId(we,Ue);if(Ee.push(Ue),(De.ticklabelposition||"").indexOf("inside")!==-1&&De._anchorAxis&&Ee.push(De._anchorAxis._id),De._matchGroup)for(var je in De._matchGroup)ue[je]||Ee.push(je)}return n.draw(we,Ee,{skipTitle:!0})}:function(we){return n.draw(we,"redraw")};ne.push(c,x.doAutoRangeAndConstraints,me,x.drawData,x.finalDraw)}var Y=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,K=/^[xyz]axis[0-9]*\.autorange$/,te=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function re(ne,ue){var me,we,Ee,Ue=ne.layout,De=ne._fullLayout,je=De._guiEditing,ge=N(De._preGUI,je),be=Object.keys(ue),Se=n.list(ne),Ne=T.extendDeepAll({},ue),Ye={};for(H(ue),be=Object.keys(ue),we=0;we0&&typeof qt.parts[Je]!="string";)Je--;var Ke=qt.parts[Je],Ge=qt.parts[Je-1]+"."+Ke,nt=qt.parts.slice(0,Je).join("."),ht=m(ne.layout,nt).get(),Oe=m(De,nt).get(),Be=qt.get();if(Nt!==void 0){yt[Ft]=Nt,Et[Ft]=Ke==="reverse"?Nt:G(Be);var Qe=a.getLayoutValObject(De,qt.parts);if(Qe&&Qe.impliedEdits&&Nt!==null)for(var ut in Qe.impliedEdits)Tt(T.relativeAttr(Ft,ut),Qe.impliedEdits[ut]);if(["width","height"].indexOf(Ft)!==-1)if(Nt){Tt("autosize",null);var pt=Ft==="height"?"width":"height";Tt(pt,De[pt])}else De[Ft]=ne._initialAutoSize[Ft];else if(Ft==="autosize")Tt("width",Nt?null:De.width),Tt("height",Nt?null:De.height);else if(Ge.match(Y))It(Ge),m(De,nt+"._inputRange").set(null);else if(Ge.match(K)){It(Ge),m(De,nt+"._inputRange").set(null);var bt=m(De,nt).get();bt._inputDomain&&(bt._input.domain=bt._inputDomain.slice())}else Ge.match(te)&&m(De,nt+"._inputDomain").set(null);if(Ke==="type"){xt=ht;var Lt=Oe.type==="linear"&&Nt==="log",Ct=Oe.type==="log"&&Nt==="linear";if(Lt||Ct){if(xt&&xt.range)if(Oe.autorange)Lt&&(xt.range=xt.range[1]>xt.range[0]?[1,2]:[2,1]);else{var mt=xt.range[0],Ot=xt.range[1];Lt?(mt<=0&&Ot<=0&&Tt(nt+".autorange",!0),mt<=0?mt=Ot/1e6:Ot<=0&&(Ot=mt/1e6),Tt(nt+".range[0]",Math.log(mt)/Math.LN10),Tt(nt+".range[1]",Math.log(Ot)/Math.LN10)):(Tt(nt+".range[0]",Math.pow(10,mt)),Tt(nt+".range[1]",Math.pow(10,Ot)))}else Tt(nt+".autorange",!0);Array.isArray(De._subplots.polar)&&De._subplots.polar.length&&De[qt.parts[0]]&&qt.parts[1]==="radialaxis"&&delete De[qt.parts[0]]._subplot.viewInitial["radialaxis.range"],t.getComponentMethod("annotations","convertCoords")(ne,Oe,Nt,Tt),t.getComponentMethod("images","convertCoords")(ne,Oe,Nt,Tt)}else Tt(nt+".autorange",!0),Tt(nt+".range",null);m(De,nt+"._inputRange").set(null)}else if(Ke.match(y)){var _t=m(De,Ft).get(),Pt=(Nt||{}).type;Pt&&Pt!=="-"||(Pt="linear"),t.getComponentMethod("annotations","convertCoords")(ne,_t,Pt,Tt),t.getComponentMethod("images","convertCoords")(ne,_t,Pt,Tt)}var Bt=d.containerArrayMatch(Ft);if(Bt){me=Bt.array,we=Bt.index;var Wt=Bt.property,Gt=Qe||{editType:"calc"};we!==""&&Wt===""&&(d.isAddVal(Nt)?Et[Ft]=null:d.isRemoveVal(Nt)?Et[Ft]=(m(Ue,me).get()||[])[we]:T.warn("unrecognized full object value",ue)),g.update(ft,Gt),Ye[me]||(Ye[me]={});var Xt=Ye[me][we];Xt||(Xt=Ye[me][we]={}),Xt[Wt]=Nt,delete ue[Ft]}else Ke==="reverse"?(ht.range?ht.range.reverse():(Tt(nt+".autorange",!0),ht.range=[1,0]),Oe.autorange?ft.calc=!0:ft.plot=!0):(Ft==="dragmode"&&(Nt===!1&&Be!==!1||Nt!==!1&&Be===!1)||De._has("scatter-like")&&De._has("regl")&&Ft==="dragmode"&&(Nt==="lasso"||Nt==="select")&&Be!=="lasso"&&Be!=="select"||De._has("gl2d")?ft.plot=!0:Qe?g.update(ft,Qe):ft.calc=!0,qt.set(Nt))}}for(me in Ye)d.applyContainerArrayChanges(ne,ge(Ue,me),Ye[me],ft,ge)||(ft.plot=!0);for(var Kt in Dt){var nn=(xt=n.getFromId(ne,Kt))&&xt._constraintGroup;if(nn)for(var yn in ft.calc=!0,nn)Dt[yn]||(n.getFromId(ne,yn)._constraintShrinkable=!0)}return(oe(ne)||ue.height||ue.width)&&(ft.plot=!0),(ft.plot||ft.calc)&&(ft.layoutReplot=!0),{flags:ft,rangesAltered:Dt,undoit:Et,redoit:yt,eventData:Ne}}function oe(ne){var ue=ne._fullLayout,me=ue.width,we=ue.height;return ne.layout.autosize&&r.plotAutoSize(ne,ne.layout,ue),ue.width!==me||ue.height!==we}function se(ne,ue,me,we){ne=T.getGraphDiv(ne),v.clearPromiseQueue(ne),T.isPlainObject(ue)||(ue={}),T.isPlainObject(me)||(me={}),Object.keys(ue).length&&(ne.changed=!0),Object.keys(me).length&&(ne.changed=!0);var Ee=v.coerceTraceIndices(ne,we),Ue=V(ne,T.extendFlat({},ue),Ee),De=Ue.flags,je=re(ne,T.extendFlat({},me)),ge=je.flags;(De.calc||ge.calc)&&(ne.calcdata=void 0),De.clearAxisTypes&&v.clearAxisTypes(ne,Ee,me);var be=[];ge.layoutReplot?be.push(x.layoutReplot):De.fullReplot?be.push(E._doPlot):(be.push(r.previousPromises),Q(ne,ge,je)||r.supplyDefaults(ne),De.style&&be.push(x.doTraceStyle),(De.colorbars||ge.colorbars)&&be.push(x.doColorBars),ge.legend&&be.push(x.doLegend),ge.layoutstyle&&be.push(x.layoutStyles),ge.axrange&&X(be,je.rangesAltered),ge.ticks&&be.push(x.doTicksRelayout),ge.modebar&&be.push(x.doModeBar),ge.camera&&be.push(x.doCamera),be.push(h)),be.push(r.rehover,r.redrag,r.reselect),l.add(ne,se,[ne,Ue.undoit,je.undoit,Ue.traces],se,[ne,Ue.redoit,je.redoit,Ue.traces]);var Se=T.syncOrAsync(be,ne);return Se&&Se.then||(Se=Promise.resolve(ne)),Se.then(function(){return ne.emit("plotly_update",{data:Ue.eventData,layout:je.eventData}),ne})}function ce(ne){return function(ue){ue._fullLayout._guiEditing=!0;var me=ne.apply(null,arguments);return ue._fullLayout._guiEditing=!1,me}}var xe=[{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"}],pe=[{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 de(ne,ue){for(var me=0;me1;)if(we.pop(),(me=m(ue,we.join(".")+".uirevision").get())!==void 0)return me;return ue.uirevision}function ye(ne,ue){for(var me=0;me=Ee.length?Ee[0]:Ee[be]:Ee}function je(be){return Array.isArray(Ue)?be>=Ue.length?Ue[0]:Ue[be]:Ue}function ge(be,Se){var Ne=0;return function(){if(be&&++Ne===Se)return be()}}return we._frameWaitingCnt===void 0&&(we._frameWaitingCnt=0),new Promise(function(be,Se){function Ne(){ne.emit("plotly_animating"),we._lastFrameAt=-1/0,we._timeToNext=0,we._runningTransitions=0,we._currentFrame=null;var Ft=function(){we._animationRaf=window.requestAnimationFrame(Ft),Date.now()-we._lastFrameAt>we._timeToNext&&function(){we._currentFrame&&we._currentFrame.onComplete&&we._currentFrame.onComplete();var qt=we._currentFrame=we._frameQueue.shift();if(qt){var Nt=qt.name?qt.name.toString():null;ne._fullLayout._currentFrame=Nt,we._lastFrameAt=Date.now(),we._timeToNext=qt.frameOpts.duration,r.transition(ne,qt.frame.data,qt.frame.layout,v.coerceTraceIndices(ne,qt.frame.traces),qt.frameOpts,qt.transitionOpts).then(function(){qt.onComplete&&qt.onComplete()}),ne.emit("plotly_animatingframe",{name:Nt,frame:qt.frame,animation:{frame:qt.frameOpts,transition:qt.transitionOpts}})}else ne.emit("plotly_animated"),window.cancelAnimationFrame(we._animationRaf),we._animationRaf=null}()};Ft()}var Ye,Ze,st=0;function ot(Ft){return Array.isArray(Ee)?st>=Ee.length?Ft.transitionOpts=Ee[st]:Ft.transitionOpts=Ee[0]:Ft.transitionOpts=Ee,st++,Ft}var ft=[],yt=ue==null,Et=Array.isArray(ue);if(yt||Et||!T.isPlainObject(ue)){if(yt||["string","number"].indexOf(typeof ue)!==-1)for(Ye=0;Ye0&&DtDt)&&It.push(Ze);ft=It}}ft.length>0?function(Ft){if(Ft.length!==0){for(var qt=0;qt=0;we--)if(T.isPlainObject(ue[we])){var Ye=ue[we].name,Ze=(ge[Ye]||Ne[Ye]||{}).name,st=ue[we].name,ot=ge[Ze]||Ne[Ze];Ze&&st&&typeof st=="number"&&ot&&k<5&&(k++,T.warn('addFrames: overwriting frame "'+(ge[Ze]||Ne[Ze]).name+'" with a frame whose name of type "number" also equates to "'+Ze+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),k===5&&T.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.")),Ne[Ye]={name:Ye},Se.push({frame:r.supplyFrameDefaults(ue[we]),index:me&&me[we]!==void 0&&me[we]!==null?me[we]:be+we})}Se.sort(function(Ft,qt){return Ft.index>qt.index?-1:Ft.index=0;we--){if(typeof(Ee=Se[we].frame).name=="number"&&T.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Ee.name)for(;ge[Ee.name="frame "+ne._transitionData._counter++];);if(ge[Ee.name]){for(Ue=0;Ue=0;me--)we=ue[me],Ue.push({type:"delete",index:we}),De.unshift({type:"insert",index:we,value:Ee[we]});var je=r.modifyFrames,ge=r.modifyFrames,be=[ne,De],Se=[ne,Ue];return l&&l.add(ne,je,be,ge,Se),r.modifyFrames(ne,Ue)},E.addTraces=function ne(ue,me,we){ue=T.getGraphDiv(ue);var Ee,Ue,De=[],je=E.deleteTraces,ge=ne,be=[ue,De],Se=[ue,me];for(function(Ne,Ye,Ze){var st,ot;if(!Array.isArray(Ne.data))throw new Error("gd.data must be an array.");if(Ye===void 0)throw new Error("traces must be defined.");for(Array.isArray(Ye)||(Ye=[Ye]),st=0;st=0&&Ne=0&&Ne=P.length)return!1;if(h.dimensions===2){if(A++,M.length===A)return h;var I=M[A];if(!v(I))return!1;h=P[L][I]}else h=P[L]}else h=P}}return h}function v(h){return h===Math.round(h)&&h>=0}function x(){var h,M,A={};for(h in a(A,T),_.subplotsRegistry)if((M=_.subplotsRegistry[h]).layoutAttributes)if(Array.isArray(M.attr))for(var C=0;C=I.length)return!1;C=(A=(_.transformsRegistry[I[R].type]||{}).attributes)&&A[M[2]],P=3}else{var U=h._module;if(U||(U=(_.modules[h.type||s.type.dflt]||{})._module),!U)return!1;if(!(C=(A=U.attributes)&&A[L])){var B=U.basePlotModule;B&&B.attributes&&(C=B.attributes[L])}C||(C=s[L])}return d(C,M,P)},E.getLayoutValObject=function(h,M){var A=function(C,L){var P,I,R,U,B=C._basePlotModules;if(B){var G;for(P=0;P=a&&(t._input||{})._templateitemname;n&&(r=a);var o,i=l+"["+r+"]";function u(){o={},n&&(o[i]={},o[i].templateitemname=n)}function p(b,d){n?_.nestedProperty(o[i],b).set(d):o[i+"."+b]=d}function c(){var b=o;return u(),b}return u(),{modifyBase:function(b,d){o[b]=d},modifyItem:p,getUpdateObj:c,applyUpdate:function(b,d){b&&p(b,d);var v=c();for(var x in v)_.nestedProperty(f,x).set(v[x])}}}},61549:function(D,E,e){var _=e(39898),w=e(73972),s=e(74875),T=e(71828),m=e(63893),f=e(33306),l=e(7901),t=e(91424),a=e(92998),r=e(64168),n=e(89298),o=e(18783),i=e(99082),u=i.enforce,p=i.clean,c=e(71739).doAutoRange,b="start";function d(k,h,M){for(var A=0;A=k[1]||C[1]<=k[0])&&L[0]h[0])return!0}return!1}function v(k){var h,M,A,C,L,P,I=k._fullLayout,R=I._size,U=R.p,B=n.list(k,"",!0);if(I._paperdiv.style({width:k._context.responsive&&I.autosize&&!k._context._hasZeroWidth&&!k.layout.width?"100%":I.width+"px",height:k._context.responsive&&I.autosize&&!k._context._hasZeroHeight&&!k.layout.height?"100%":I.height+"px"}).selectAll(".main-svg").call(t.setSize,I.width,I.height),k._context.setBackground(k,I.paper_bgcolor),E.drawMainTitle(k),r.manage(k),!I._has("cartesian"))return s.previousPromises(k);function G(Ne,Ye,Ze){var st=Ne._lw/2;return Ne._id.charAt(0)==="x"?Ye?Ze==="top"?Ye._offset-U-st:Ye._offset+Ye._length+U+st:R.t+R.h*(1-(Ne.position||0))+st%1:Ye?Ze==="right"?Ye._offset+Ye._length+U+st:Ye._offset-U-st:R.l+R.w*(Ne.position||0)+st%1}for(h=0;h.5?"t":"b",Q=G._fullLayout.margin[ee],X=0;return N.yref==="paper"?X=j+N.pad.t+N.pad.b:N.yref==="container"&&(X=function(Y,K,te,re,oe){var se=0;return te==="middle"&&(se+=oe/2),Y==="t"?(te==="top"&&(se+=oe),se+=re-K*re):(te==="bottom"&&(se+=oe),se+=K*re),se}(ee,V,H,G._fullLayout.height,j)+N.pad.t+N.pad.b),X>Q?X:0}(k,M,U);B>0&&(function(G,N,j,V){var H="title.automargin",ee=G._fullLayout.title,Q=ee.y>.5?"t":"b",X={x:ee.x,y:ee.y,t:0,b:0},Y={};ee.yref==="paper"&&function(K,te,re,oe,se){var ce=te.yref==="paper"?K._fullLayout._size.h:K._fullLayout.height,xe=T.isTopAnchor(te)?oe:oe-se,pe=re==="b"?ce-xe:xe;return!(T.isTopAnchor(te)&&re==="t"||T.isBottomAnchor(te)&&re==="b")&&peR?y.push({code:"unused",traceType:A,templateCount:I,dataCount:R}):R>I&&y.push({code:"reused",traceType:A,templateCount:I,dataCount:R})}}else y.push({code:"data"});if(function U(B,G){for(var N in B)if(N.charAt(0)!=="_"){var j=B[N],V=i(B,N,G);w(j)?(Array.isArray(B)&&j._template===!1&&j.templateitemname&&y.push({code:"missing",path:V,templateitemname:j.templateitemname}),U(j,V)):Array.isArray(j)&&u(j)&&U(j,V)}}({data:h,layout:k},""),y.length)return y.map(p)}},403:function(D,E,e){var _=e(92770),w=e(72391),s=e(74875),T=e(71828),m=e(25095),f=e(5900),l=e(70942),t=e(11506).version,a={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}};D.exports=function(r,n){var o,i,u,p;function c(R){return!(R in n)||T.validate(n[R],a[R])}if(n=n||{},T.isPlainObject(r)?(o=r.data||[],i=r.layout||{},u=r.config||{},p={}):(r=T.getGraphDiv(r),o=T.extendDeep([],r.data),i=T.extendDeep({},r.layout),u=r._context,p=r._fullLayout||{}),!c("width")&&n.width!==null||!c("height")&&n.height!==null)throw new Error("Height and width should be pixel values.");if(!c("format"))throw new Error("Export format is not "+T.join2(a.format.values,", "," or ")+".");var b={};function d(R,U){return T.coerce(n,b,a,R,U)}var v=d("format"),x=d("width"),g=d("height"),y=d("scale"),k=d("setBackground"),h=d("imageDataOnly"),M=document.createElement("div");M.style.position="absolute",M.style.left="-5000px",document.body.appendChild(M);var A=T.extendFlat({},i);x?A.width=x:n.width===null&&_(p.width)&&(A.width=p.width),g?A.height=g:n.height===null&&_(p.height)&&(A.height=p.height);var C=T.extendFlat({},u,{_exportedPlot:!0,staticPlot:!0,setBackground:k}),L=m.getRedrawFunc(M);function P(){return new Promise(function(R){setTimeout(R,m.getDelay(M._fullLayout))})}function I(){return new Promise(function(R,U){var B=f(M,v,y),G=M._fullLayout.width,N=M._fullLayout.height;function j(){w.purge(M),document.body.removeChild(M)}if(v==="full-json"){var V=s.graphJson(M,!1,"keepdata","object",!0,!0);return V.version=t,V=JSON.stringify(V),j(),R(h?V:m.encodeJSON(V))}if(j(),v==="svg")return R(h?B:m.encodeSVG(B));var H=document.createElement("canvas");H.id=T.randstr(),l({format:v,width:G,height:N,scale:y,canvas:H,svg:B,promise:!0}).then(R).catch(U)})}return new Promise(function(R,U){w.newPlot(M,o,A,C).then(L).then(P).then(I).then(function(B){R(function(G){return h?G.replace(m.IMAGE_URL_PREFIX,""):G}(B))}).catch(function(B){U(B)})})}},84936:function(D,E,e){var _=e(71828),w=e(74875),s=e(86281),T=e(72075).dfltConfig,m=_.isPlainObject,f=Array.isArray,l=_.isArrayOrTypedArray;function t(b,d,v,x,g,y){y=y||[];for(var k=Object.keys(b),h=0;hL.length&&x.push(o("unused",g,A.concat(L.length)));var G,N,j,V,H,ee=L.length,Q=Array.isArray(B);if(Q&&(ee=Math.min(ee,B.length)),P.dimensions===2)for(N=0;NL[N].length&&x.push(o("unused",g,A.concat(N,L[N].length)));var X=L[N].length;for(G=0;G<(Q?Math.min(X,B[N].length):X);G++)j=Q?B[N][G]:B,V=C[N][G],H=L[N][G],_.validate(V,j)?H!==V&&H!==+V&&x.push(o("dynamic",g,A.concat(N,G),V,H)):x.push(o("value",g,A.concat(N,G),V))}else x.push(o("array",g,A.concat(N),C[N]));else for(N=0;N1&&y.push(o("object","layout"))),w.supplyDefaults(k);for(var h=k._fullData,M=v.length,A=0;A0&&Math.round(i)===i))return{vals:a};n=i}for(var u=l.calendar,p=r==="start",c=r==="end",b=f[t+"period0"],d=s(b,u)||0,v=[],x=[],g=[],y=a.length,k=0;kC;)A=T(A,-n,u);for(;A<=C;)A=T(A,n,u);M=T(A,-n,u)}else{for(A=d+(h=Math.round((C-d)/o))*o;A>C;)A-=o;for(;A<=C;)A+=o;M=A-o}v[k]=p?M:c?A:(M+A)/2,x[k]=M,g[k]=A}return{vals:v,starts:x,ends:g}}},89502:function(D){D.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},71739:function(D,E,e){var _=e(39898),w=e(92770),s=e(71828),T=e(50606).FP_SAFE,m=e(73972),f=e(91424),l=e(41675),t=l.getFromId,a=l.isLinked;function r(x,g){var y,k,h=[],M=x._fullLayout,A=o(M,g,0),C=o(M,g,1),L=i(x,g),P=L.min,I=L.max;if(P.length===0||I.length===0)return s.simpleMap(g.range,g.r2l);var R=P[0].val,U=I[0].val;for(y=1;y0&&((ee=te-A(N)-C(j))>re?Q/ee>oe&&(V=N,H=j,oe=Q/ee):Q/te>oe&&(V={val:N.val,nopad:1},H={val:j.val,nopad:1},oe=Q/te));if(R===U){var se=R-1,ce=R+1;if(Y)if(R===0)h=[0,1];else{var xe=(R>0?I:P).reduce(function(de,he){return Math.max(de,C(he))},0),pe=R/(1-Math.min(.5,xe/te));h=R>0?[0,pe]:[pe,0]}else h=K?[Math.max(0,se),Math.max(1,ce)]:[se,ce]}else Y?(V.val>=0&&(V={val:0,nopad:1}),H.val<=0&&(H={val:0,nopad:1})):K&&(V.val-oe*A(V)<0&&(V={val:0,nopad:1}),H.val<=0&&(H={val:1,nopad:1})),oe=(H.val-V.val-n(g,N.val,j.val))/(te-A(V)-C(H)),h=[V.val-oe*A(V),H.val+oe*C(H)];return B&&h.reverse(),s.simpleMap(h,g.l2r||Number)}function n(x,g,y){var k=0;if(x.rangebreaks)for(var h=x.locateBreaks(g,y),M=0;M=y&&(P.extrapad||!A)){C=!1;break}h(g,P.val)&&P.pad<=y&&(A||!P.extrapad)&&(x.splice(L,1),L--)}if(C){var I=M&&g===0;x.push({val:g,pad:I?0:y,extrapad:!I&&A})}}function b(x){return w(x)&&Math.abs(x)=g}D.exports={getAutoRange:r,makePadFn:o,doAutoRange:function(x,g,y){if(g.setScale(),g.autorange){g.range=y?y.slice():r(x,g),g._r=g.range.slice(),g._rl=s.simpleMap(g._r,g.r2l);var k=g._input,h={};h[g._attr+".range"]=g.range,h[g._attr+".autorange"]=g.autorange,m.call("_storeDirectGUIEdit",x.layout,x._fullLayout._preGUI,h),k.range=g.range.slice(),k.autorange=g.autorange}var M=g._anchorAxis;if(M&&M.rangeslider){var A=M.rangeslider[g._name];A&&A.rangemode==="auto"&&(A.range=r(x,g)),M._input.rangeslider[g._name]=s.extendFlat({},A)}},findExtremes:function(x,g,y){y||(y={}),x._m||x.setScale();var k,h,M,A,C,L,P,I,R,U=[],B=[],G=g.length,N=y.padded||!1,j=y.tozero&&(x.type==="linear"||x.type==="-"),V=x.type==="log",H=!1,ee=y.vpadLinearized||!1;function Q(ce){if(Array.isArray(ce))return H=!0,function(pe){return Math.max(Number(ce[pe]||0),0)};var xe=Math.max(Number(ce||0),0);return function(){return xe}}var X=Q((x._m>0?y.ppadplus:y.ppadminus)||y.ppad||0),Y=Q((x._m>0?y.ppadminus:y.ppadplus)||y.ppad||0),K=Q(y.vpadplus||y.vpad),te=Q(y.vpadminus||y.vpad);if(!H){if(I=1/0,R=-1/0,V)for(k=0;k0&&(I=h),h>R&&h-T&&(I=h),h>R&&h=se;k--)oe(k);return{min:U,max:B,opts:y}},concatExtremes:i}},89298:function(D,E,e){var _=e(39898),w=e(92770),s=e(74875),T=e(73972),m=e(71828),f=m.strTranslate,l=e(63893),t=e(92998),a=e(7901),r=e(91424),n=e(13838),o=e(66287),i=e(50606),u=i.ONEMAXYEAR,p=i.ONEAVGYEAR,c=i.ONEMINYEAR,b=i.ONEMAXQUARTER,d=i.ONEAVGQUARTER,v=i.ONEMINQUARTER,x=i.ONEMAXMONTH,g=i.ONEAVGMONTH,y=i.ONEMINMONTH,k=i.ONEWEEK,h=i.ONEDAY,M=h/2,A=i.ONEHOUR,C=i.ONEMIN,L=i.ONESEC,P=i.MINUS_SIGN,I=i.BADNUM,R={K:"zeroline"},U={K:"gridline",L:"path"},B={K:"minor-gridline",L:"path"},G={K:"tick",L:"path"},N={K:"tick",L:"text"},j={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},V=e(18783),H=V.MID_SHIFT,ee=V.CAP_SHIFT,Q=V.LINE_SPACING,X=V.OPPOSITE_SIDE,Y=D.exports={};Y.setConvert=e(21994);var K=e(4322),te=e(41675),re=te.idSort,oe=te.isLinked;Y.id2name=te.id2name,Y.name2id=te.name2id,Y.cleanId=te.cleanId,Y.list=te.list,Y.listIds=te.listIds,Y.getFromId=te.getFromId,Y.getFromTrace=te.getFromTrace;var se=e(71739);function ce(Oe){var Be=1e-4*(Oe[1]-Oe[0]);return[Oe[0]-Be,Oe[1]+Be]}Y.getAutoRange=se.getAutoRange,Y.findExtremes=se.findExtremes,Y.coerceRef=function(Oe,Be,Qe,ut,pt,bt){var Lt=ut.charAt(ut.length-1),Ct=Qe._fullLayout._subplots[Lt+"axis"],mt=ut+"ref",Ot={};return pt||(pt=Ct[0]||(typeof bt=="string"?bt:bt[0])),bt||(bt=pt),Ct=Ct.concat(Ct.map(function(_t){return _t+" domain"})),Ot[mt]={valType:"enumerated",values:Ct.concat(bt?typeof bt=="string"?[bt]:bt:[]),dflt:pt},m.coerce(Oe,Be,Ot,mt)},Y.getRefType=function(Oe){return Oe===void 0?Oe:Oe==="paper"?"paper":Oe==="pixel"?"pixel":/( domain)$/.test(Oe)?"domain":"range"},Y.coercePosition=function(Oe,Be,Qe,ut,pt,bt){var Lt,Ct;if(Y.getRefType(ut)!=="range")Lt=m.ensureNumber,Ct=Qe(pt,bt);else{var mt=Y.getFromId(Be,ut);Ct=Qe(pt,bt=mt.fraction2r(bt)),Lt=mt.cleanPos}Oe[pt]=Lt(Ct)},Y.cleanPosition=function(Oe,Be,Qe){return(Qe==="paper"||Qe==="pixel"?m.ensureNumber:Y.getFromId(Be,Qe).cleanPos)(Oe)},Y.redrawComponents=function(Oe,Be){Be=Be||Y.listIds(Oe);var Qe=Oe._fullLayout;function ut(pt,bt,Lt,Ct){for(var mt=T.getComponentMethod(pt,bt),Ot={},_t=0;_tQe&&_t2e-6||((Qe-Oe._forceTick0)/Oe._minDtick%1+1.000001)%1>2e-6)&&(Oe._minDtick=0)):Oe._minDtick=0},Y.saveRangeInitial=function(Oe,Be){for(var Qe=Y.list(Oe,"",!0),ut=!1,pt=0;pt.3*In||fn(ln)||fn(kn))){var Cn=yn.dtick/2;Kt+=Kt+Cn.8){var wn=Number(yn.substr(1));Wn.exactYears>.8&&wn%12==0?Kt=Y.tickIncrement(Kt,"M6","reverse")+1.5*h:Wn.exactMonths>.8?Kt=Y.tickIncrement(Kt,"M1","reverse")+15.5*h:Kt-=M;var on=Y.tickIncrement(Kt,yn);if(on<=ln)return on}return Kt}(Xt,Oe,Gt,Ct,pt)),Wt=Xt;Wt<=mt;)Wt=Y.tickIncrement(Wt,Gt,!1,pt);return{start:Be.c2r(Xt,0,pt),end:Be.c2r(Wt,0,pt),size:Gt,_dataSpan:mt-Ct}},Y.prepMinorTicks=function(Oe,Be,Qe){if(!Be.minor.dtick){delete Oe.dtick;var ut,pt=Be.dtick&&w(Be._tmin);if(pt){var bt=Y.tickIncrement(Be._tmin,Be.dtick,!0);ut=[Be._tmin,.99*bt+.01*Be._tmin]}else{var Lt=m.simpleMap(Be.range,Be.r2l);ut=[Lt[0],.8*Lt[0]+.2*Lt[1]]}if(Oe.range=m.simpleMap(ut,Be.l2r),Oe._isMinor=!0,Y.prepTicks(Oe,Qe),pt){var Ct=w(Be.dtick),mt=w(Oe.dtick),Ot=Ct?Be.dtick:+Be.dtick.substring(1),_t=mt?Oe.dtick:+Oe.dtick.substring(1);Ct&&mt?he(Ot,_t)?Ot===2*k&&_t===2*h&&(Oe.dtick=k):Ot===2*k&&_t===3*h?Oe.dtick=k:Ot!==k||(Be._input.minor||{}).nticks?ye(Ot/_t,2.5)?Oe.dtick=Ot/2:Oe.dtick=Ot:Oe.dtick=h:String(Be.dtick).charAt(0)==="M"?mt?Oe.dtick="M1":he(Ot,_t)?Ot>=12&&_t===2&&(Oe.dtick="M3"):Oe.dtick=Be.dtick:String(Oe.dtick).charAt(0)==="L"?String(Be.dtick).charAt(0)==="L"?he(Ot,_t)||(Oe.dtick=ye(Ot/_t,2.5)?Be.dtick/2:Be.dtick):Oe.dtick="D1":Oe.dtick==="D2"&&+Be.dtick>1&&(Oe.dtick=1)}Oe.range=Be.range}Be.minor._tick0Init===void 0&&(Oe.tick0=Be.tick0)},Y.prepTicks=function(Oe,Be){var Qe=m.simpleMap(Oe.range,Oe.r2l,void 0,void 0,Be);if(Oe.tickmode==="auto"||!Oe.dtick){var ut,pt=Oe.nticks;pt||(Oe.type==="category"||Oe.type==="multicategory"?(ut=Oe.tickfont?m.bigFont(Oe.tickfont.size||12):15,pt=Oe._length/ut):(ut=Oe._id.charAt(0)==="y"?40:80,pt=m.constrain(Oe._length/ut,4,9)+1),Oe._name==="radialaxis"&&(pt*=2)),Oe.minor&&Oe.minor.tickmode!=="array"||Oe.tickmode==="array"&&(pt*=100),Oe._roughDTick=Math.abs(Qe[1]-Qe[0])/pt,Y.autoTicks(Oe,Oe._roughDTick),Oe._minDtick>0&&Oe.dtick<2*Oe._minDtick&&(Oe.dtick=Oe._minDtick,Oe.tick0=Oe.l2r(Oe._forceTick0))}Oe.ticklabelmode==="period"&&function(bt){var Lt;function Ct(){return!(w(bt.dtick)||bt.dtick.charAt(0)!=="M")}var mt=Ct(),Ot=Y.getTickFormat(bt);if(Ot){var _t=bt._dtickInit!==bt.dtick;/%[fLQsSMX]/.test(Ot)||(/%[HI]/.test(Ot)?(Lt=A,_t&&!mt&&bt.dtick=(nn?0:1);yn--){var ln=!yn;yn?(Oe._dtickInit=Oe.dtick,Oe._tick0Init=Oe.tick0):(Oe.minor._dtickInit=Oe.minor.dtick,Oe.minor._tick0Init=Oe.minor.tick0);var kn=yn?Oe:m.extendFlat({},Oe,Oe.minor);if(ln?Y.prepMinorTicks(kn,Oe,Be):Y.prepTicks(kn,Be),kn.tickmode!=="array")if(kn.tickmode!=="sync"){var Wn=ce(mt),wn=Wn[0],on=Wn[1],_n=w(kn.dtick),fn=pt==="log"&&!(_n||kn.dtick.charAt(0)==="L"),hn=Y.tickFirst(kn,Be);if(yn){if(Oe._tmin=hn,hn=on:Hn<=on;Hn=Y.tickIncrement(Hn,qn,Ot,bt)){if(yn&&In++,kn.rangebreaks&&!Ot){if(Hn=Pt)break}if(Xt.length>Bt||Hn===Nn)break;Nn=Hn;var or={value:Hn};yn?(fn&&Hn!==(0|Hn)&&(or.simpleLabel=!0),Lt>1&&In%Lt&&(or.skipLabel=!0),Xt.push(or)):(or.minor=!0,Kt.push(or))}}else Xt=[],Wt=Ae(Oe);else yn?(Xt=[],Wt=Me(Oe)):(Kt=[],Gt=Me(Oe))}if(nn&&!(Oe.minor.ticks==="inside"&&Oe.ticks==="outside"||Oe.minor.ticks==="outside"&&Oe.ticks==="inside")){for(var tr=Xt.map(function(Pn){return Pn.value}),Tr=[],gr=0;gr0?(On=un-1,Sn=un):(On=un,Sn=un);var pn,bn=Pn[On].value,dn=Pn[Sn].value,vn=Math.abs(dn-bn),An=Jt||vn,Bn=0;An>=c?Bn=vn>=c&&vn<=u?vn:p:Jt===d&&An>=v?Bn=vn>=v&&vn<=b?vn:d:An>=y?Bn=vn>=y&&vn<=x?vn:g:Jt===k&&An>=k?Bn=k:An>=h?Bn=h:Jt===M&&An>=M?Bn=M:Jt===A&&An>=A&&(Bn=A),Bn>=vn&&(Bn=vn,pn=!0);var Xn=Rn+Bn;if(jt.rangebreaks&&Bn>0){for(var er=0,Jn=0;Jn<84;Jn++){var lr=(Jn+.5)/84;jt.maskBreaks(Rn*(1-lr)+lr*Xn)!==I&&er++}(Bn*=er/84)||(Pn[un].drop=!0),pn&&vn>k&&(Bn=vn)}(Bn>0||un===0)&&(Pn[un].periodX=Rn+Bn/2)}}(Xt,Oe,Oe._definedDelta),Oe.rangebreaks){var mn=Oe._id.charAt(0)==="y",Ln=1;Oe.tickmode==="auto"&&(Ln=Oe.tickfont?Oe.tickfont.size:12);var En=NaN;for(Qe=Xt.length-1;Qe>-1;Qe--)if(Xt[Qe].drop)Xt.splice(Qe,1);else{Xt[Qe].value=Ke(Xt[Qe].value,Oe);var jn=Oe.c2p(Xt[Qe].value);(mn?En>jn-Ln:EnPt||Zn<_t)&&(Zn>Pt&&($n.periodX=Pt),Zn<_t&&($n.periodX=_t),Qn($n))),Xt[Qe].skipLabel&&Qn($n),Wt.push($n))}return Wt=Wt.concat(Gt),Oe._inCalcTicks=!1,Ct&&Wt.length&&(Wt[0].noTick=!0),Wt};var Ce=[2,5,10],ne=[1,2,3,6,12],ue=[1,2,5,10,15,30],me=[1,2,3,7,14],we=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],Ee=[-.301,0,.301,.699,1],Ue=[15,30,45,90,180];function De(Oe,Be,Qe){return Be*m.roundUp(Oe/Be,Qe)}function je(Oe){var Be=Oe.dtick;if(Oe._tickexponent=0,w(Be)||typeof Be=="string"||(Be=1),Oe.type!=="category"&&Oe.type!=="multicategory"||(Oe._tickround=null),Oe.type==="date"){var Qe=Oe.r2l(Oe.tick0),ut=Oe.l2r(Qe).replace(/(^-|i)/g,""),pt=ut.length;if(String(Be).charAt(0)==="M")pt>10||ut.substr(5)!=="01-01"?Oe._tickround="d":Oe._tickround=+Be.substr(1)%12==0?"y":"m";else if(Be>=h&&pt<=10||Be>=15*h)Oe._tickround="d";else if(Be>=C&&pt<=16||Be>=A)Oe._tickround="M";else if(Be>=L&&pt<=19||Be>=C)Oe._tickround="S";else{var bt=Oe.l2r(Qe+Be).replace(/^-/,"").length;Oe._tickround=Math.max(pt,bt)-20,Oe._tickround<0&&(Oe._tickround=4)}}else if(w(Be)||Be.charAt(0)==="L"){var Lt=Oe.range.map(Oe.r2d||Number);w(Be)||(Be=Number(Be.substr(1))),Oe._tickround=2-Math.floor(Math.log(Be)/Math.LN10+.01);var Ct=Math.max(Math.abs(Lt[0]),Math.abs(Lt[1])),mt=Math.floor(Math.log(Ct)/Math.LN10+.01),Ot=Oe.minexponent===void 0?3:Oe.minexponent;Math.abs(mt)>Ot&&(Se(Oe.exponentformat)&&!Ne(mt)?Oe._tickexponent=3*Math.round((mt-1)/3):Oe._tickexponent=mt)}else Oe._tickround=null}function ge(Oe,Be,Qe){var ut=Oe.tickfont||{};return{x:Be,dx:0,dy:0,text:Qe||"",fontSize:ut.size,font:ut.family,fontColor:ut.color}}Y.autoTicks=function(Oe,Be,Qe){var ut;function pt(Pt){return Math.pow(Pt,Math.floor(Math.log(Be)/Math.LN10))}if(Oe.type==="date"){Oe.tick0=m.dateTick0(Oe.calendar,0);var bt=2*Be;if(bt>p)Be/=p,ut=pt(10),Oe.dtick="M"+12*De(Be,ut,Ce);else if(bt>g)Be/=g,Oe.dtick="M"+De(Be,1,ne);else if(bt>h){if(Oe.dtick=De(Be,h,Oe._hasDayOfWeekBreaks?[1,2,7,14]:me),!Qe){var Lt=Y.getTickFormat(Oe),Ct=Oe.ticklabelmode==="period";Ct&&(Oe._rawTick0=Oe.tick0),/%[uVW]/.test(Lt)?Oe.tick0=m.dateTick0(Oe.calendar,2):Oe.tick0=m.dateTick0(Oe.calendar,1),Ct&&(Oe._dowTick0=Oe.tick0)}}else bt>A?Oe.dtick=De(Be,A,ne):bt>C?Oe.dtick=De(Be,C,ue):bt>L?Oe.dtick=De(Be,L,ue):(ut=pt(10),Oe.dtick=De(Be,ut,Ce))}else if(Oe.type==="log"){Oe.tick0=0;var mt=m.simpleMap(Oe.range,Oe.r2l);if(Oe._isMinor&&(Be*=1.5),Be>.7)Oe.dtick=Math.ceil(Be);else if(Math.abs(mt[1]-mt[0])<1){var Ot=1.5*Math.abs((mt[1]-mt[0])/Be);Be=Math.abs(Math.pow(10,mt[1])-Math.pow(10,mt[0]))/Ot,ut=pt(10),Oe.dtick="L"+De(Be,ut,Ce)}else Oe.dtick=Be>.3?"D2":"D1"}else Oe.type==="category"||Oe.type==="multicategory"?(Oe.tick0=0,Oe.dtick=Math.ceil(Math.max(Be,1))):Je(Oe)?(Oe.tick0=0,ut=1,Oe.dtick=De(Be,ut,Ue)):(Oe.tick0=0,ut=pt(10),Oe.dtick=De(Be,ut,Ce));if(Oe.dtick===0&&(Oe.dtick=1),!w(Oe.dtick)&&typeof Oe.dtick!="string"){var _t=Oe.dtick;throw Oe.dtick=1,"ax.dtick error: "+String(_t)}},Y.tickIncrement=function(Oe,Be,Qe,ut){var pt=Qe?-1:1;if(w(Be))return m.increment(Oe,pt*Be);var bt=Be.charAt(0),Lt=pt*Number(Be.substr(1));if(bt==="M")return m.incrementMonth(Oe,Lt,ut);if(bt==="L")return Math.log(Math.pow(10,Oe)+Lt)/Math.LN10;if(bt==="D"){var Ct=Be==="D2"?Ee:we,mt=Oe+.01*pt,Ot=m.roundUp(m.mod(mt,1),Ct,Qe);return Math.floor(mt)+Math.log(_.round(Math.pow(10,Ot),1))/Math.LN10}throw"unrecognized dtick "+String(Be)},Y.tickFirst=function(Oe,Be){var Qe=Oe.r2l||Number,ut=m.simpleMap(Oe.range,Qe,void 0,void 0,Be),pt=ut[1] ")}else Kt._prevDateHead=wn,on+="
"+wn;nn.text=on}(Oe,bt,Qe,Ct):mt==="log"?function(Kt,nn,yn,ln,kn){var Wn=Kt.dtick,wn=nn.x,on=Kt.tickformat,_n=typeof Wn=="string"&&Wn.charAt(0);if(kn==="never"&&(kn=""),ln&&_n!=="L"&&(Wn="L3",_n="L"),on||_n==="L")nn.text=Ye(Math.pow(10,wn),Kt,kn,ln);else if(w(Wn)||_n==="D"&&m.mod(wn+.01,1)<.1){var fn=Math.round(wn),hn=Math.abs(fn),In=Kt.exponentformat;In==="power"||Se(In)&&Ne(fn)?(nn.text=fn===0?1:fn===1?"10":"10"+(fn>1?"":P)+hn+"",nn.fontSize*=1.25):(In==="e"||In==="E")&&hn>2?nn.text="1"+In+(fn>0?"+":P)+hn:(nn.text=Ye(Math.pow(10,wn),Kt,"","fakehover"),Wn==="D1"&&Kt._id.charAt(0)==="y"&&(nn.dy-=nn.fontSize/6))}else{if(_n!=="D")throw"unrecognized dtick "+String(Wn);nn.text=String(Math.round(Math.pow(10,m.mod(wn,1)))),nn.fontSize*=.75}if(Kt.dtick==="D1"){var Cn=String(nn.text).charAt(0);Cn!=="0"&&Cn!=="1"||(Kt._id.charAt(0)==="y"?nn.dx-=nn.fontSize/4:(nn.dy+=nn.fontSize/2,nn.dx+=(Kt.range[1]>Kt.range[0]?1:-1)*nn.fontSize*(wn<0?.5:.25)))}}(Oe,bt,0,Ct,Wt):mt==="category"?function(Kt,nn){var yn=Kt._categories[Math.round(nn.x)];yn===void 0&&(yn=""),nn.text=String(yn)}(Oe,bt):mt==="multicategory"?function(Kt,nn,yn){var ln=Math.round(nn.x),kn=Kt._categories[ln]||[],Wn=kn[1]===void 0?"":String(kn[1]),wn=kn[0]===void 0?"":String(kn[0]);yn?nn.text=wn+" - "+Wn:(nn.text=Wn,nn.text2=wn)}(Oe,bt,Qe):Je(Oe)?function(Kt,nn,yn,ln,kn){if(Kt.thetaunit!=="radians"||yn)nn.text=Ye(nn.x,Kt,kn,ln);else{var Wn=nn.x/180;if(Wn===0)nn.text="0";else{var wn=function(_n){function fn(Nn,Hn){return Math.abs(Nn-Hn)<=1e-6}var hn=function(Nn){for(var Hn=1;!fn(Math.round(Nn*Hn)/Hn,Nn);)Hn*=10;return Hn}(_n),In=_n*hn,Cn=Math.abs(function Nn(Hn,qn){return fn(qn,0)?Hn:Nn(qn,Hn%qn)}(In,hn));return[Math.round(In/Cn),Math.round(hn/Cn)]}(Wn);if(wn[1]>=100)nn.text=Ye(m.deg2rad(nn.x),Kt,kn,ln);else{var on=nn.x<0;wn[1]===1?wn[0]===1?nn.text="π":nn.text=wn[0]+"π":nn.text=["",wn[0],"","⁄","",wn[1],"","π"].join(""),on&&(nn.text=P+nn.text)}}}}(Oe,bt,Qe,Ct,Wt):function(Kt,nn,yn,ln,kn){kn==="never"?kn="":Kt.showexponent==="all"&&Math.abs(nn.x/Kt.dtick)<1e-6&&(kn="hide"),nn.text=Ye(nn.x,Kt,kn,ln)}(Oe,bt,0,Ct,Wt),ut||(Oe.tickprefix&&!Bt(Oe.showtickprefix)&&(bt.text=Oe.tickprefix+bt.text),Oe.ticksuffix&&!Bt(Oe.showticksuffix)&&(bt.text+=Oe.ticksuffix)),Oe.labelalias&&Oe.labelalias.hasOwnProperty(bt.text)){var Gt=Oe.labelalias[bt.text];typeof Gt=="string"&&(bt.text=Gt)}if(Oe.tickson==="boundaries"||Oe.showdividers){var Xt=function(Kt){var nn=Oe.l2p(Kt);return nn>=0&&nn<=Oe._length?Kt:null};bt.xbnd=[Xt(bt.x-.5),Xt(bt.x+Oe.dtick-.5)]}return bt},Y.hoverLabelText=function(Oe,Be,Qe){Qe&&(Oe=m.extendFlat({},Oe,{hoverformat:Qe}));var ut=Array.isArray(Be)?Be[0]:Be,pt=Array.isArray(Be)?Be[1]:void 0;if(pt!==void 0&&pt!==ut)return Y.hoverLabelText(Oe,ut,Qe)+" - "+Y.hoverLabelText(Oe,pt,Qe);var bt=Oe.type==="log"&&ut<=0,Lt=Y.tickText(Oe,Oe.c2l(bt?-ut:ut),"hover").text;return bt?ut===0?"0":P+Lt:Lt};var be=["f","p","n","μ","m","","k","M","G","T"];function Se(Oe){return Oe==="SI"||Oe==="B"}function Ne(Oe){return Oe>14||Oe<-15}function Ye(Oe,Be,Qe,ut){var pt=Oe<0,bt=Be._tickround,Lt=Qe||Be.exponentformat||"B",Ct=Be._tickexponent,mt=Y.getTickFormat(Be),Ot=Be.separatethousands;if(ut){var _t={exponentformat:Lt,minexponent:Be.minexponent,dtick:Be.showexponent==="none"?Be.dtick:w(Oe)&&Math.abs(Oe)||1,range:Be.showexponent==="none"?Be.range.map(Be.r2d):[0,Oe||1]};je(_t),bt=(Number(_t._tickround)||0)+4,Ct=_t._tickexponent,Be.hoverformat&&(mt=Be.hoverformat)}if(mt)return Be._numFormat(mt)(Oe).replace(/-/g,P);var Pt,Bt=Math.pow(10,-bt)/2;if(Lt==="none"&&(Ct=0),(Oe=Math.abs(Oe))"+Pt+"":Lt==="B"&&Ct===9?Oe+="B":Se(Lt)&&(Oe+=be[Ct/3+5])),pt?P+Oe:Oe}function Ze(Oe,Be){if(Oe){var Qe=Object.keys(j).reduce(function(ut,pt){return Be.indexOf(pt)!==-1&&j[pt].forEach(function(bt){ut[bt]=1}),ut},{});Object.keys(Oe).forEach(function(ut){Qe[ut]||(ut.length===1?Oe[ut]=0:delete Oe[ut])})}}function st(Oe,Be){for(var Qe=[],ut={},pt=0;pt1&&Qe=pt.min&&Oe=0,nn=_t(Bt,Wt[1])<=0;return(Gt||Kt)&&(Xt||nn)}if(Oe.tickformatstops&&Oe.tickformatstops.length>0)switch(Oe.type){case"date":case"linear":for(Be=0;Be=Lt(pt)))){Qe=ut;break}break;case"log":for(Be=0;Be=0&&pt.unshift(pt.splice(Ot,1).shift())}});var Lt={false:{left:0,right:0}};return m.syncOrAsync(pt.map(function(Ct){return function(){if(Ct){var mt=Y.getFromId(Oe,Ct);Qe||(Qe={}),Qe.axShifts=Lt,Qe.overlayingShiftedAx=bt;var Ot=Y.drawOne(Oe,mt,Qe);return mt._shiftPusher&&ht(mt,mt._fullDepth||0,Lt,!0),mt._r=mt.range.slice(),mt._rl=m.simpleMap(mt._r,mt.r2l),Ot}}}))},Y.drawOne=function(Oe,Be,Qe){var ut,pt,bt,Lt=(Qe=Qe||{}).axShifts||{},Ct=Qe.overlayingShiftedAx||[];Be.setScale();var mt=Oe._fullLayout,Ot=Be._id,_t=Ot.charAt(0),Pt=Y.counterLetter(Ot),Bt=mt._plots[Be._mainSubplot];if(Bt){if(Be._shiftPusher=Be.autoshift||Ct.indexOf(Be._id)!==-1||Ct.indexOf(Be.overlaying)!==-1,Be._shiftPusher&Be.anchor==="free"){var Wt=Be.linewidth/2||0;Be.ticks==="inside"&&(Wt+=Be.ticklen),ht(Be,Wt,Lt,!0),ht(Be,Be.shift||0,Lt,!1)}Qe.skipTitle===!0&&Be._shift!==void 0||(Be._shift=function(Sn,pn){return Sn.autoshift?pn[Sn.overlaying][Sn.side]:Sn.shift||0}(Be,Lt));var Gt=Bt[_t+"axislayer"],Xt=Be._mainLinePosition,Kt=Xt+=Be._shift,nn=Be._mainMirrorPosition,yn=Be._vals=Y.calcTicks(Be),ln=[Be.mirror,Kt,nn].join("_");for(ut=0;ut0?Sn.bottom-Bn:0,Xn))));var er=0,Jn=0;if(Be._shiftPusher&&(er=Math.max(Xn,Sn.height>0?vn==="l"?Bn-Sn.left:Sn.right-Bn:0),Be.title.text!==mt._dfltTitle[_t]&&(Jn=(Be._titleStandoff||0)+(Be._titleScoot||0),vn==="l"&&(Jn+=yt(Be))),Be._fullDepth=Math.max(er,Jn)),Be.automargin){pn={x:0,y:0,r:0,l:0,t:0,b:0};var lr=[0,1],sr=typeof Be._shift=="number"?Be._shift:0;if(_t==="x"){if(vn==="b"?pn[vn]=Be._depth:(pn[vn]=Be._depth=Math.max(Sn.width>0?Bn-Sn.top:0,Xn),lr.reverse()),Sn.width>0){var fr=Sn.right-(Be._offset+Be._length);fr>0&&(pn.xr=1,pn.r=fr);var cr=Be._offset-Sn.left;cr>0&&(pn.xl=0,pn.l=cr)}}else if(vn==="l"?(Be._depth=Math.max(Sn.height>0?Bn-Sn.left:0,Xn),pn[vn]=Be._depth-sr):(Be._depth=Math.max(Sn.height>0?Sn.right-Bn:0,Xn),pn[vn]=Be._depth+sr,lr.reverse()),Sn.height>0){var vr=Sn.bottom-(Be._offset+Be._length);vr>0&&(pn.yb=0,pn.b=vr);var Sr=Be._offset-Sn.top;Sr>0&&(pn.yt=1,pn.t=Sr)}pn[Pt]=Be.anchor==="free"?Be.position:Be._anchorAxis.domain[lr[0]],Be.title.text!==mt._dfltTitle[_t]&&(pn[vn]+=yt(Be)+(Be.title.standoff||0)),Be.mirror&&Be.anchor!=="free"&&((bn={x:0,y:0,r:0,l:0,t:0,b:0})[An]=Be.linewidth,Be.mirror&&Be.mirror!==!0&&(bn[An]+=Xn),Be.mirror===!0||Be.mirror==="ticks"?bn[Pt]=Be._anchorAxis.domain[lr[1]]:Be.mirror!=="all"&&Be.mirror!=="allticks"||(bn[Pt]=[Be._counterDomainMin,Be._counterDomainMax][lr[1]]))}Rn&&(dn=T.getComponentMethod("rangeslider","autoMarginOpts")(Oe,Be)),typeof Be.automargin=="string"&&(Ze(pn,Be.automargin),Ze(bn,Be.automargin)),s.autoMargin(Oe,xt(Be),pn),s.autoMargin(Oe,Dt(Be),bn),s.autoMargin(Oe,It(Be),dn)}),m.syncOrAsync(Jt)}}function On(Sn){var pn=Ot+(Sn||"tick");return kn[pn]||(kn[pn]=function(bn,dn){var vn,An,Bn,Xn;return bn._selections[dn].size()?(vn=1/0,An=-1/0,Bn=1/0,Xn=-1/0,bn._selections[dn].each(function(){var er=Tt(this),Jn=r.bBox(er.node().parentNode);vn=Math.min(vn,Jn.top),An=Math.max(An,Jn.bottom),Bn=Math.min(Bn,Jn.left),Xn=Math.max(Xn,Jn.right)})):(vn=0,An=0,Bn=0,Xn=0),{top:vn,bottom:An,left:Bn,right:Xn,height:An-vn,width:Xn-Bn}}(Be,pn)),kn[pn]}},Y.getTickSigns=function(Oe,Be){var Qe=Oe._id.charAt(0),ut={x:"top",y:"right"}[Qe],pt=Oe.side===ut?1:-1,bt=[-1,1,pt,-pt];return(Be?(Oe.minor||{}).ticks:Oe.ticks)!=="inside"==(Qe==="x")&&(bt=bt.map(function(Lt){return-Lt})),Oe.side&&bt.push({l:-1,t:-1,r:1,b:1}[Oe.side.charAt(0)]),bt},Y.makeTransTickFn=function(Oe){return Oe._id.charAt(0)==="x"?function(Be){return f(Oe._offset+Oe.l2p(Be.x),0)}:function(Be){return f(0,Oe._offset+Oe.l2p(Be.x))}},Y.makeTransTickLabelFn=function(Oe){var Be=function(pt){var bt=pt.ticklabelposition||"",Lt=function(nn){return bt.indexOf(nn)!==-1},Ct=Lt("top"),mt=Lt("left"),Ot=Lt("right"),_t=Lt("bottom"),Pt=Lt("inside"),Bt=_t||mt||Ct||Ot;if(!Bt&&!Pt)return[0,0];var Wt=pt.side,Gt=Bt?(pt.tickwidth||0)/2:0,Xt=3,Kt=pt.tickfont?pt.tickfont.size:12;return(_t||Ct)&&(Gt+=Kt*ee,Xt+=(pt.linewidth||0)/2),(mt||Ot)&&(Gt+=(pt.linewidth||0)/2,Xt+=3),Pt&&Wt==="top"&&(Xt-=Kt*(1-ee)),(mt||Ct)&&(Gt=-Gt),Wt!=="bottom"&&Wt!=="right"||(Xt=-Xt),[Bt?Gt:0,Pt?Xt:0]}(Oe),Qe=Be[0],ut=Be[1];return Oe._id.charAt(0)==="x"?function(pt){return f(Qe+Oe._offset+Oe.l2p(ot(pt)),ut)}:function(pt){return f(ut,Qe+Oe._offset+Oe.l2p(ot(pt)))}},Y.makeTickPath=function(Oe,Be,Qe,ut){ut||(ut={});var pt=ut.minor;if(pt&&!Oe.minor)return"";var bt=ut.len!==void 0?ut.len:pt?Oe.minor.ticklen:Oe.ticklen,Lt=Oe._id.charAt(0),Ct=(Oe.linewidth||1)/2;return Lt==="x"?"M0,"+(Be+Ct*Qe)+"v"+bt*Qe:"M"+(Be+Ct*Qe)+",0h"+bt*Qe},Y.makeLabelFns=function(Oe,Be,Qe){var ut=Oe.ticklabelposition||"",pt=function(In){return ut.indexOf(In)!==-1},bt=pt("top"),Lt=pt("left"),Ct=pt("right"),mt=pt("bottom")||Lt||bt||Ct,Ot=pt("inside"),_t=ut==="inside"&&Oe.ticks==="inside"||!Ot&&Oe.ticks==="outside"&&Oe.tickson!=="boundaries",Pt=0,Bt=0,Wt=_t?Oe.ticklen:0;if(Ot?Wt*=-1:mt&&(Wt=0),_t&&(Pt+=Wt,Qe)){var Gt=m.deg2rad(Qe);Pt=Wt*Math.cos(Gt)+1,Bt=Wt*Math.sin(Gt)}Oe.showticklabels&&(_t||Oe.showline)&&(Pt+=.2*Oe.tickfont.size);var Xt,Kt,nn,yn,ln,kn={labelStandoff:Pt+=(Oe.linewidth||1)/2*(Ot?-1:1),labelShift:Bt},Wn=0,wn=Oe.side,on=Oe._id.charAt(0),_n=Oe.tickangle;if(on==="x")yn=(ln=!Ot&&wn==="bottom"||Ot&&wn==="top")?1:-1,Ot&&(yn*=-1),Xt=Bt*yn,Kt=Be+Pt*yn,nn=ln?1:-.2,Math.abs(_n)===90&&(Ot?nn+=H:nn=_n===-90&&wn==="bottom"?ee:_n===90&&wn==="top"?H:.5,Wn=H/2*(_n/90)),kn.xFn=function(In){return In.dx+Xt+Wn*In.fontSize},kn.yFn=function(In){return In.dy+Kt+In.fontSize*nn},kn.anchorFn=function(In,Cn){if(mt){if(Lt)return"end";if(Ct)return"start"}return w(Cn)&&Cn!==0&&Cn!==180?Cn*yn<0!==Ot?"end":"start":"middle"},kn.heightFn=function(In,Cn,Nn){return Cn<-60||Cn>60?-.5*Nn:Oe.side==="top"!==Ot?-Nn:0};else if(on==="y"){if(yn=(ln=!Ot&&wn==="left"||Ot&&wn==="right")?1:-1,Ot&&(yn*=-1),Xt=Pt,Kt=Bt*yn,nn=0,Ot||Math.abs(_n)!==90||(nn=_n===-90&&wn==="left"||_n===90&&wn==="right"?ee:.5),Ot){var fn=w(_n)?+_n:0;if(fn!==0){var hn=m.deg2rad(fn);Wn=Math.abs(Math.sin(hn))*ee*yn,nn=0}}kn.xFn=function(In){return In.dx+Be-(Xt+In.fontSize*nn)*yn+Wn*In.fontSize},kn.yFn=function(In){return In.dy+Kt+In.fontSize*H},kn.anchorFn=function(In,Cn){return w(Cn)&&Math.abs(Cn)===90?"middle":ln?"end":"start"},kn.heightFn=function(In,Cn,Nn){return Oe.side==="right"&&(Cn*=-1),Cn<-30?-Nn:Cn<30?-.5*Nn:0}}return kn},Y.drawTicks=function(Oe,Be,Qe){Qe=Qe||{};var ut=Be._id+"tick",pt=[].concat(Be.minor&&Be.minor.ticks?Qe.vals.filter(function(Lt){return Lt.minor&&!Lt.noTick}):[]).concat(Be.ticks?Qe.vals.filter(function(Lt){return!Lt.minor&&!Lt.noTick}):[]),bt=Qe.layer.selectAll("path."+ut).data(pt,ft);bt.exit().remove(),bt.enter().append("path").classed(ut,1).classed("ticks",1).classed("crisp",Qe.crisp!==!1).each(function(Lt){return a.stroke(_.select(this),Lt.minor?Be.minor.tickcolor:Be.tickcolor)}).style("stroke-width",function(Lt){return r.crispRound(Oe,Lt.minor?Be.minor.tickwidth:Be.tickwidth,1)+"px"}).attr("d",Qe.path).style("display",null),nt(Be,[G]),bt.attr("transform",Qe.transFn)},Y.drawGrid=function(Oe,Be,Qe){if(Qe=Qe||{},Be.tickmode!=="sync"){var ut=Be._id+"grid",pt=Be.minor&&Be.minor.showgrid,bt=pt?Qe.vals.filter(function(nn){return nn.minor}):[],Lt=Be.showgrid?Qe.vals.filter(function(nn){return!nn.minor}):[],Ct=Qe.counterAxis;if(Ct&&Y.shouldShowZeroLine(Oe,Be,Ct))for(var mt=Be.tickmode==="array",Ot=0;Ot=0;Gt--){var Xt=Gt?Bt:Wt;if(Xt){var Kt=Xt.selectAll("path."+ut).data(Gt?Lt:bt,ft);Kt.exit().remove(),Kt.enter().append("path").classed(ut,1).classed("crisp",Qe.crisp!==!1),Kt.attr("transform",Qe.transFn).attr("d",Qe.path).each(function(nn){return a.stroke(_.select(this),nn.minor?Be.minor.gridcolor:Be.gridcolor||"#ddd")}).style("stroke-dasharray",function(nn){return r.dashStyle(nn.minor?Be.minor.griddash:Be.griddash,nn.minor?Be.minor.gridwidth:Be.gridwidth)}).style("stroke-width",function(nn){return(nn.minor?Pt:Be._gw)+"px"}).style("display",null),typeof Qe.path=="function"&&Kt.attr("d",Qe.path)}}nt(Be,[U,B])}},Y.drawZeroLine=function(Oe,Be,Qe){Qe=Qe||Qe;var ut=Be._id+"zl",pt=Y.shouldShowZeroLine(Oe,Be,Qe.counterAxis),bt=Qe.layer.selectAll("path."+ut).data(pt?[{x:0,id:Be._id}]:[]);bt.exit().remove(),bt.enter().append("path").classed(ut,1).classed("zl",1).classed("crisp",Qe.crisp!==!1).each(function(){Qe.layer.selectAll("path").sort(function(Lt,Ct){return re(Lt.id,Ct.id)})}),bt.attr("transform",Qe.transFn).attr("d",Qe.path).call(a.stroke,Be.zerolinecolor||a.defaultLine).style("stroke-width",r.crispRound(Oe,Be.zerolinewidth,Be._gw||1)+"px").style("display",null),nt(Be,[R])},Y.drawLabels=function(Oe,Be,Qe){Qe=Qe||{};var ut=Oe._fullLayout,pt=Be._id,bt=pt.charAt(0),Lt=Qe.cls||pt+"tick",Ct=Qe.vals.filter(function(yn){return yn.text}),mt=Qe.labelFns,Ot=Qe.secondary?0:Be.tickangle,_t=(Be._prevTickAngles||{})[Lt],Pt=Qe.layer.selectAll("g."+Lt).data(Be.showticklabels?Ct:[],ft),Bt=[];function Wt(yn,ln){yn.each(function(kn){var Wn=_.select(this),wn=Wn.select(".text-math-group"),on=mt.anchorFn(kn,ln),_n=Qe.transFn.call(Wn.node(),kn)+(w(ln)&&+ln!=0?" rotate("+ln+","+mt.xFn(kn)+","+(mt.yFn(kn)-kn.fontSize/2)+")":""),fn=l.lineCount(Wn),hn=Q*kn.fontSize,In=mt.heightFn(kn,w(ln)?+ln:0,(fn-1)*hn);if(In&&(_n+=f(0,In)),wn.empty()){var Cn=Wn.select("text");Cn.attr({transform:_n,"text-anchor":on}),Cn.style("opacity",1),Be._adjustTickLabelsOverflow&&Be._adjustTickLabelsOverflow()}else{var Nn=r.bBox(wn.node()).width*{end:-.5,start:.5}[on];wn.attr("transform",_n+f(Nn,0))}})}Pt.enter().append("g").classed(Lt,1).append("text").attr("text-anchor","middle").each(function(yn){var ln=_.select(this),kn=Oe._promises.length;ln.call(l.positionText,mt.xFn(yn),mt.yFn(yn)).call(r.font,yn.font,yn.fontSize,yn.fontColor).text(yn.text).call(l.convertToTspans,Oe),Oe._promises[kn]?Bt.push(Oe._promises.pop().then(function(){Wt(ln,Ot)})):Wt(ln,Ot)}),nt(Be,[N]),Pt.exit().remove(),Qe.repositionOnUpdate&&Pt.each(function(yn){_.select(this).select("text").call(l.positionText,mt.xFn(yn),mt.yFn(yn))}),Be._adjustTickLabelsOverflow=function(){var yn=Be.ticklabeloverflow;if(yn&&yn!=="allow"){var ln=yn.indexOf("hide")!==-1,kn=Be._id.charAt(0)==="x",Wn=0,wn=kn?Oe._fullLayout.width:Oe._fullLayout.height;if(yn.indexOf("domain")!==-1){var on=m.simpleMap(Be.range,Be.r2l);Wn=Be.l2p(on[0])+Be._offset,wn=Be.l2p(on[1])+Be._offset}var _n=Math.min(Wn,wn),fn=Math.max(Wn,wn),hn=Be.side,In=1/0,Cn=-1/0;for(var Nn in Pt.each(function(or){var tr=_.select(this);if(tr.select(".text-math-group").empty()){var Tr=r.bBox(tr.node()),gr=0;kn?(Tr.right>fn||Tr.left<_n)&&(gr=1):(Tr.bottom>fn||Tr.top+(Be.tickangle?0:or.fontSize/4)<_n)&&(gr=1);var ir=tr.select("text");gr?ln&&ir.style("opacity",0):(ir.style("opacity",1),In=hn==="bottom"||hn==="right"?Math.min(In,kn?Tr.top:Tr.left):-1/0,Cn=hn==="top"||hn==="left"?Math.max(Cn,kn?Tr.bottom:Tr.right):1/0)}}),ut._plots){var Hn=ut._plots[Nn];if(Be._id===Hn.xaxis._id||Be._id===Hn.yaxis._id){var qn=kn?Hn.yaxis:Hn.xaxis;qn&&(qn["_visibleLabelMin_"+Be._id]=In,qn["_visibleLabelMax_"+Be._id]=Cn)}}}},Be._hideCounterAxisInsideTickLabels=function(yn){var ln=Be._id.charAt(0)==="x",kn=[];for(var Wn in ut._plots){var wn=ut._plots[Wn];Be._id!==wn.xaxis._id&&Be._id!==wn.yaxis._id||kn.push(ln?wn.yaxis:wn.xaxis)}kn.forEach(function(on,_n){on&&Ge(on)&&(yn||[R,B,U,G,N]).forEach(function(fn){var hn=fn.K==="tick"&&fn.L==="text"&&Be.ticklabelmode==="period",In=ut._plots[Be._mainSubplot];(fn.K===R.K?In.zerolinelayer.selectAll("."+Be._id+"zl"):fn.K===B.K?In.minorGridlayer.selectAll("."+Be._id):fn.K===U.K?In.gridlayer.selectAll("."+Be._id):In[Be._id.charAt(0)+"axislayer"]).each(function(){var Cn=_.select(this);fn.L&&(Cn=Cn.selectAll(fn.L)),Cn.each(function(Nn){var Hn=Be.l2p(hn?ot(Nn):Nn.x)+Be._offset,qn=_.select(this);HnBe["_visibleLabelMin_"+on._id]?qn.style("display","none"):fn.K!=="tick"||_n||qn.style("display",null)})})})})},Wt(Pt,_t+1?_t:Ot);var Gt=null;Be._selections&&(Be._selections[Lt]=Pt);var Xt=[function(){return Bt.length&&Promise.all(Bt)}];Be.automargin&&ut._redrawFromAutoMarginCount&&_t===90?(Gt=90,Xt.push(function(){Wt(Pt,_t)})):Xt.push(function(){if(Wt(Pt,Ot),Ct.length&&bt==="x"&&!w(Ot)&&(Be.type!=="log"||String(Be.dtick).charAt(0)!=="D")){Gt=0;var yn,ln=0,kn=[];if(Pt.each(function(tr){ln=Math.max(ln,tr.fontSize);var Tr=Be.l2p(tr.x),gr=Tt(this),ir=r.bBox(gr.node());kn.push({top:0,bottom:10,height:10,left:Tr-ir.width/2,right:Tr+ir.width/2+2,width:ir.width+2})}),Be.tickson!=="boundaries"&&!Be.showdividers||Qe.secondary){var Wn=Ct.length,wn=Math.abs((Ct[Wn-1].x-Ct[0].x)*Be._m)/(Wn-1),on=Be.ticklabelposition||"",_n=function(tr){return on.indexOf(tr)!==-1},fn=_n("top"),hn=_n("left"),In=_n("right"),Cn=_n("bottom")||hn||fn||In?(Be.tickwidth||0)+6:0,Nn=wn<2.5*ln||Be.type==="multicategory"||Be._name==="realaxis";for(yn=0;yn1)for(Ct=1;Ct2*h}(i,n))return"date";var d=o.autotypenumbers!=="strict";return function(v,x){for(var g=v.length,y=a(g),k=0,h=0,M={},A=0;A2*k}(i,d)?"category":function(v,x){for(var g=v.length,y=0;y=2){var h,M,A="";if(k.length===2){for(h=0;h<2;h++)if(M=d(k[h])){A=u;break}}var C=y("pattern",A);if(C===u)for(h=0;h<2;h++)(M=d(k[h]))&&(x.bounds[h]=k[h]=M-1);if(C)for(h=0;h<2;h++)switch(M=k[h],C){case u:if(!_(M)||(M=+M)!==Math.floor(M)||M<0||M>=7)return void(x.enabled=!1);x.bounds[h]=k[h]=M;break;case p:if(!_(M)||(M=+M)<0||M>24)return void(x.enabled=!1);x.bounds[h]=k[h]=M}if(g.autorange===!1){var L=g.range;if(L[0]L[1])return void(x.enabled=!1)}else if(k[0]>L[0]&&k[1]l?1:-1:+(T.substr(1)||1)-+(m.substr(1)||1)},E.ref2id=function(T){return!!/^[xyz]/.test(T)&&T.split(" ")[0]},E.isLinked=function(T,m){return s(m,T._axisMatchGroups)||s(m,T._axisConstraintGroups)}},15258:function(D){D.exports=function(E,e,_,w){if(e.type==="category"){var s,T=E.categoryarray,m=Array.isArray(T)&&T.length>0;m&&(s="array");var f,l=_("categoryorder",s);l==="array"&&(f=_("categoryarray")),m||l!=="array"||(l=e.categoryorder="trace"),l==="trace"?e._initialCategories=[]:l==="array"?e._initialCategories=f.slice():(f=function(t,a){var r,n,o,i=a.dataAttr||t._id.charAt(0),u={};if(a.axData)r=a.axData;else for(r=[],n=0;nv?x.substr(v):g.substr(d))+y:x+g+c*b:y}function u(c,b){for(var d=b._size,v=d.h/d.w,x={},g=Object.keys(c),y=0;yl*P)||B){for(d=0;dK&&seX&&(X=se);h/=(X-Q)/(2*Y),Q=g.l2r(Q),X=g.l2r(X),g.range=g._input.range=V=0?Math.min(se,.9):1/(1/Math.max(se,-.3)+3.222))}function V(se,ce,xe,pe,de){return se.append("path").attr("class","zoombox").style({fill:ce>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",l(xe,pe)).attr("d",de+"Z")}function H(se,ce,xe){return se.append("path").attr("class","zoombox-corners").style({fill:a.background,stroke:a.defaultLine,"stroke-width":1,opacity:0}).attr("transform",l(ce,xe)).attr("d","M0,0Z")}function ee(se,ce,xe,pe,de,he){se.attr("d",pe+"M"+xe.l+","+xe.t+"v"+xe.h+"h"+xe.w+"v-"+xe.h+"h-"+xe.w+"Z"),Q(se,ce,de,he)}function Q(se,ce,xe,pe){xe||(se.transition().style("fill",pe>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ce.transition().style("opacity",1).duration(200))}function X(se){_.select(se).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function Y(se){I&&se.data&&se._context.showTips&&(w.notifier(w._(se,"Double-click to zoom back out"),"long"),I=!1)}function K(se){var ce=Math.floor(Math.min(se.b-se.t,se.r-se.l,P)/2);return"M"+(se.l-3.5)+","+(se.t-.5+ce)+"h3v"+-ce+"h"+ce+"v-3h-"+(ce+3)+"ZM"+(se.r+3.5)+","+(se.t-.5+ce)+"h-3v"+-ce+"h"+-ce+"v-3h"+(ce+3)+"ZM"+(se.r+3.5)+","+(se.b+.5-ce)+"h-3v"+ce+"h"+-ce+"v3h"+(ce+3)+"ZM"+(se.l-3.5)+","+(se.b+.5-ce)+"h3v"+ce+"h"+ce+"v3h-"+(ce+3)+"Z"}function te(se,ce,xe,pe,de){for(var he,ye,ze,Te,Ae=!1,Me={},Ce={},ne=(de||{}).xaHash,ue=(de||{}).yaHash,me=0;me=0)fn._fullLayout._deactivateShape(fn);else{var hn=fn._fullLayout.clickmode;if(X(fn),on!==2||Dt||nn(),xt)hn.indexOf("select")>-1&&M(_n,fn,ne,ue,ce.id,pt),hn.indexOf("event")>-1&&n.click(fn,_n,ce.id);else if(on===1&&Dt){var In=ye?Ae:Te,Cn=ye==="s"||ze==="w"?0:1,Nn=In._name+".range["+Cn+"]",Hn=function(tr,Tr){var gr,ir=tr.range[Tr],dr=Math.abs(ir-tr.range[1-Tr]);return tr.type==="date"?ir:tr.type==="log"?(gr=Math.ceil(Math.max(0,-Math.log(dr)/Math.LN10))+3,s("."+gr+"g")(Math.pow(10,ir))):(gr=Math.floor(Math.log(Math.abs(ir))/Math.LN10)-Math.floor(Math.log(dr)/Math.LN10)+4,s("."+String(gr)+"g")(ir))}(In,Cn),qn="left",or="middle";if(In.fixedrange)return;ye?(or=ye==="n"?"top":"bottom",In.side==="right"&&(qn="right")):ze==="e"&&(qn="right"),fn._context.showAxisRangeEntryBoxes&&_.select(qt).call(t.makeEditable,{gd:fn,immediate:!0,background:fn._fullLayout.paper_bgcolor,text:String(Hn),fill:In.tickfont?In.tickfont.color:"#444",horizontalAlign:qn,verticalAlign:or}).on("edit",function(tr){var Tr=In.d2r(tr);Tr!==void 0&&f.call("_guiRelayout",fn,Nn,Tr)})}}}function Ct(on,_n){if(se._transitioningWithDuration)return!1;var fn=Math.max(0,Math.min(Ee,yt*on+Nt)),hn=Math.max(0,Math.min(Ue,Et*_n+Je)),In=Math.abs(fn-Nt),Cn=Math.abs(hn-Je);function Nn(){Oe="",Ke.r=Ke.l,Ke.t=Ke.b,Qe.attr("d","M0,0Z")}if(Ke.l=Math.min(Nt,fn),Ke.r=Math.max(Nt,fn),Ke.t=Math.min(Je,hn),Ke.b=Math.max(Je,hn),De.isSubplotConstrained)In>P||Cn>P?(Oe="xy",In/Ee>Cn/Ue?(Cn=In*Ue/Ee,Je>hn?Ke.t=Je-Cn:Ke.b=Je+Cn):(In=Cn*Ee/Ue,Nt>fn?Ke.l=Nt-In:Ke.r=Nt+In),Qe.attr("d",K(Ke))):Nn();else if(je.isSubplotConstrained)if(In>P||Cn>P){Oe="xy";var Hn=Math.min(Ke.l/Ee,(Ue-Ke.b)/Ue),qn=Math.max(Ke.r/Ee,(Ue-Ke.t)/Ue);Ke.l=Hn*Ee,Ke.r=qn*Ee,Ke.b=(1-Hn)*Ue,Ke.t=(1-qn)*Ue,Qe.attr("d",K(Ke))}else Nn();else!be||Cn0){var or;if(je.isSubplotConstrained||!ge&&be.length===1){for(or=0;org[1]-.000244140625&&(T.domain=t),w.noneOrAll(s.domain,T.domain,t),T.tickmode==="sync"&&(T.tickmode="auto")}return m("layer"),T}},89426:function(D,E,e){var _=e(59652);D.exports=function(w,s,T,m,f){f||(f={});var l=f.tickSuffixDflt,t=_(w);T("tickprefix")&&T("showtickprefix",t),T("ticksuffix",l)&&T("showticksuffix",t)}},42449:function(D,E,e){var _=e(18783).FROM_BL;D.exports=function(w,s,T){T===void 0&&(T=_[w.constraintoward||"center"]);var m=[w.r2l(w.range[0]),w.r2l(w.range[1])],f=m[0]+(m[1]-m[0])*T;w.range=w._input.range=[w.l2r(f+(m[0]-f)*s),w.l2r(f+(m[1]-f)*s)],w.setScale()}},21994:function(D,E,e){var _=e(39898),w=e(84096).g0,s=e(71828),T=s.numberFormat,m=e(92770),f=s.cleanNumber,l=s.ms2DateTime,t=s.dateTime2ms,a=s.ensureNumber,r=s.isArrayOrTypedArray,n=e(50606),o=n.FP_SAFE,i=n.BADNUM,u=n.LOG_CLIP,p=n.ONEWEEK,c=n.ONEDAY,b=n.ONEHOUR,d=n.ONEMIN,v=n.ONESEC,x=e(41675),g=e(85555),y=g.HOUR_PATTERN,k=g.WEEKDAY_PATTERN;function h(A){return Math.pow(10,A)}function M(A){return A!=null}D.exports=function(A,C){C=C||{};var L=A._id||"x",P=L.charAt(0);function I(te,re){if(te>0)return Math.log(te)/Math.LN10;if(te<=0&&re&&A.range&&A.range.length===2){var oe=A.range[0],se=A.range[1];return .5*(oe+se-2*u*Math.abs(oe-se))}return i}function R(te,re,oe,se){if((se||{}).msUTC&&m(te))return+te;var ce=t(te,oe||A.calendar);if(ce===i){if(!m(te))return i;te=+te;var xe=Math.floor(10*s.mod(te+.05,1)),pe=Math.round(te-xe/10);ce=t(new Date(pe))+xe/10}return ce}function U(te,re,oe){return l(te,re,oe||A.calendar)}function B(te){return A._categories[Math.round(te)]}function G(te){if(M(te)){if(A._categoriesMap===void 0&&(A._categoriesMap={}),A._categoriesMap[te]!==void 0)return A._categoriesMap[te];A._categories.push(typeof te=="number"?String(te):te);var re=A._categories.length-1;return A._categoriesMap[te]=re,re}return i}function N(te){if(A._categoriesMap)return A._categoriesMap[te]}function j(te){var re=N(te);return re!==void 0?re:m(te)?+te:void 0}function V(te){return m(te)?+te:N(te)}function H(te,re,oe){return _.round(oe+re*te,2)}function ee(te,re,oe){return(te-oe)/re}var Q=function(te){return m(te)?H(te,A._m,A._b):i},X=function(te){return ee(te,A._m,A._b)};if(A.rangebreaks){var Y=P==="y";Q=function(te){if(!m(te))return i;var re=A._rangebreaks.length;if(!re)return H(te,A._m,A._b);var oe=Y;A.range[0]>A.range[1]&&(oe=!oe);for(var se=oe?-1:1,ce=se*te,xe=0,pe=0;pehe)){xe=ce<(de+he)/2?pe:pe+1;break}xe=pe+1}var ye=A._B[xe]||0;return isFinite(ye)?H(te,A._m2,ye):0},X=function(te){var re=A._rangebreaks.length;if(!re)return ee(te,A._m,A._b);for(var oe=0,se=0;seA._rangebreaks[se].pmax&&(oe=se+1);return ee(te,A._m2,A._B[oe])}}A.c2l=A.type==="log"?I:a,A.l2c=A.type==="log"?h:a,A.l2p=Q,A.p2l=X,A.c2p=A.type==="log"?function(te,re){return Q(I(te,re))}:Q,A.p2c=A.type==="log"?function(te){return h(X(te))}:X,["linear","-"].indexOf(A.type)!==-1?(A.d2r=A.r2d=A.d2c=A.r2c=A.d2l=A.r2l=f,A.c2d=A.c2r=A.l2d=A.l2r=a,A.d2p=A.r2p=function(te){return A.l2p(f(te))},A.p2d=A.p2r=X,A.cleanPos=a):A.type==="log"?(A.d2r=A.d2l=function(te,re){return I(f(te),re)},A.r2d=A.r2c=function(te){return h(f(te))},A.d2c=A.r2l=f,A.c2d=A.l2r=a,A.c2r=I,A.l2d=h,A.d2p=function(te,re){return A.l2p(A.d2r(te,re))},A.p2d=function(te){return h(X(te))},A.r2p=function(te){return A.l2p(f(te))},A.p2r=X,A.cleanPos=a):A.type==="date"?(A.d2r=A.r2d=s.identity,A.d2c=A.r2c=A.d2l=A.r2l=R,A.c2d=A.c2r=A.l2d=A.l2r=U,A.d2p=A.r2p=function(te,re,oe){return A.l2p(R(te,0,oe))},A.p2d=A.p2r=function(te,re,oe){return U(X(te),re,oe)},A.cleanPos=function(te){return s.cleanDate(te,i,A.calendar)}):A.type==="category"?(A.d2c=A.d2l=G,A.r2d=A.c2d=A.l2d=B,A.d2r=A.d2l_noadd=j,A.r2c=function(te){var re=V(te);return re!==void 0?re:A.fraction2r(.5)},A.l2r=A.c2r=a,A.r2l=V,A.d2p=function(te){return A.l2p(A.r2c(te))},A.p2d=function(te){return B(X(te))},A.r2p=A.d2p,A.p2r=X,A.cleanPos=function(te){return typeof te=="string"&&te!==""?te:a(te)}):A.type==="multicategory"&&(A.r2d=A.c2d=A.l2d=B,A.d2r=A.d2l_noadd=j,A.r2c=function(te){var re=j(te);return re!==void 0?re:A.fraction2r(.5)},A.r2c_just_indices=N,A.l2r=A.c2r=a,A.r2l=j,A.d2p=function(te){return A.l2p(A.r2c(te))},A.p2d=function(te){return B(X(te))},A.r2p=A.d2p,A.p2r=X,A.cleanPos=function(te){return Array.isArray(te)||typeof te=="string"&&te!==""?te:a(te)},A.setupMultiCategory=function(te){var re,oe,se=A._traceIndices,ce=A._matchGroup;if(ce&&A._categories.length===0){for(var xe in ce)if(xe!==L){var pe=C[x.id2name(xe)];se=se.concat(pe._traceIndices)}}var de=[[0,{}],[0,{}]],he=[];for(re=0;reo&&(ce[oe]=o),ce[0]===ce[1]){var pe=Math.max(1,Math.abs(1e-6*ce[0]));ce[0]-=pe,ce[1]+=pe}}else s.nestedProperty(A,te).set(se)},A.setScale=function(te){var re=C._size;if(A.overlaying){var oe=x.getFromId({_fullLayout:C},A.overlaying);A.domain=oe.domain}var se=te&&A._r?"_r":"range",ce=A.calendar;A.cleanRange(se);var xe,pe,de=A.r2l(A[se][0],ce),he=A.r2l(A[se][1],ce),ye=P==="y";if(ye?(A._offset=re.t+(1-A.domain[1])*re.h,A._length=re.h*(A.domain[1]-A.domain[0]),A._m=A._length/(de-he),A._b=-A._m*he):(A._offset=re.l+A.domain[0]*re.w,A._length=re.w*(A.domain[1]-A.domain[0]),A._m=A._length/(he-de),A._b=-A._m*de),A._rangebreaks=[],A._lBreaks=0,A._m2=0,A._B=[],A.rangebreaks&&(A._rangebreaks=A.locateBreaks(Math.min(de,he),Math.max(de,he)),A._rangebreaks.length)){for(xe=0;xehe&&(ze=!ze),ze&&A._rangebreaks.reverse();var Te=ze?-1:1;for(A._m2=Te*A._length/(Math.abs(he-de)-A._lBreaks),A._B.push(-A._m2*(ye?he:de)),xe=0;xese&&(se+=7,cese&&(se+=24,ce=oe&&ce=oe&&te=je.min&&(weje.max&&(je.max=Ee),Ue=!1)}Ue&&pe.push({min:we,max:Ee})}};for(oe=0;oet.duration?(function(){for(var y={},k=0;k rect").call(T.setTranslate,0,0).call(T.setScale,1,1),d.plot.call(T.setTranslate,v._offset,x._offset).call(T.setScale,1,1);var g=d.plot.selectAll(".scatterlayer .trace");g.selectAll(".point").call(T.setPointGroupScale,1,1),g.selectAll(".textpoint").call(T.setTextPointsScale,1,1),g.call(T.hideOutsideRangePoints,d)}function b(d,v){var x=d.plotinfo,g=x.xaxis,y=x.yaxis,k=g._length,h=y._length,M=!!d.xr1,A=!!d.yr1,C=[];if(M){var L=s.simpleMap(d.xr0,g.r2l),P=s.simpleMap(d.xr1,g.r2l),I=L[1]-L[0],R=P[1]-P[0];C[0]=(L[0]*(1-v)+v*P[0]-L[0])/(L[1]-L[0])*k,C[2]=k*(1-v+v*R/I),g.range[0]=g.l2r(L[0]*(1-v)+v*P[0]),g.range[1]=g.l2r(L[1]*(1-v)+v*P[1])}else C[0]=0,C[2]=k;if(A){var U=s.simpleMap(d.yr0,y.r2l),B=s.simpleMap(d.yr1,y.r2l),G=U[1]-U[0],N=B[1]-B[0];C[1]=(U[1]*(1-v)+v*B[1]-U[1])/(U[0]-U[1])*h,C[3]=h*(1-v+v*N/G),y.range[0]=g.l2r(U[0]*(1-v)+v*B[0]),y.range[1]=y.l2r(U[1]*(1-v)+v*B[1])}else C[1]=0,C[3]=h;m.drawOne(f,g,{skipTitle:!0}),m.drawOne(f,y,{skipTitle:!0}),m.redrawComponents(f,[g._id,y._id]);var j=M?k/C[2]:1,V=A?h/C[3]:1,H=M?C[0]:0,ee=A?C[1]:0,Q=M?C[0]/C[2]*k:0,X=A?C[1]/C[3]*h:0,Y=g._offset-Q,K=y._offset-X;x.clipRect.call(T.setTranslate,H,ee).call(T.setScale,1/j,1/V),x.plot.call(T.setTranslate,Y,K).call(T.setScale,j,V),T.setPointGroupScale(x.zoomScalePts,1/j,1/V),T.setTextPointsScale(x.zoomScaleTxt,1/j,1/V)}m.redrawComponents(f)}},951:function(D,E,e){var _=e(73972).traceIs,w=e(4322);function s(m){return{v:"x",h:"y"}[m.orientation||"v"]}function T(m,f){var l=s(m),t=_(m,"box-violin"),a=_(m._fullInput||{},"candlestick");return t&&!a&&f===l&&m[l]===void 0&&m[l+"0"]===void 0}D.exports=function(m,f,l,t){l("autotypenumbers",t.autotypenumbersDflt),l("type",(t.splomStash||{}).type)==="-"&&(function(a,r){if(a.type==="-"){var n,o=a._id,i=o.charAt(0);o.indexOf("scene")!==-1&&(o=i);var u=function(y,k,h){for(var M=0;M0&&(A["_"+h+"axes"]||{})[k]||(A[h+"axis"]||h)===k&&(T(A,h)||(A[h]||[]).length||A[h+"0"]))return A}}(r,o,i);if(u)if(u.type!=="histogram"||i!=={v:"y",h:"x"}[u.orientation||"v"]){var p=i+"calendar",c=u[p],b={noMultiCategory:!_(u,"cartesian")||_(u,"noMultiCategory")};if(u.type==="box"&&u._hasPreCompStats&&i==={h:"x",v:"y"}[u.orientation||"v"]&&(b.noMultiCategory=!0),b.autotypenumbers=a.autotypenumbers,T(u,i)){var d=s(u),v=[];for(n=0;n0?".":"")+n;w.isPlainObject(o)?f(o,t,i,r+1):t(i,n,o)}})}E.manageCommandObserver=function(l,t,a,r){var n={},o=!0;t&&t._commandObserver&&(n=t._commandObserver),n.cache||(n.cache={}),n.lookupTable={};var i=E.hasSimpleAPICommandBindings(l,a,n.lookupTable);if(t&&t._commandObserver){if(i)return n;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,n}if(i){s(l,i,n.cache),n.check=function(){if(o){var c=s(l,i,n.cache);return c.changed&&r&&n.lookupTable[c.value]!==void 0&&(n.disable(),Promise.resolve(r({value:c.value,type:i.type,prop:i.prop,traces:i.traces,index:n.lookupTable[c.value]})).then(n.enable,n.enable)),c.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],p=0;p0&&R<0&&(R+=360);var G=(R-I)/4;return{type:"Polygon",coordinates:[[[I,U],[I,B],[I+G,B],[I+2*G,B],[I+3*G,B],[R,B],[R,U],[R-G,U],[R-2*G,U],[R-3*G,U],[I,U]]]}}D.exports=function(C){return new h(C)},M.plot=function(C,L,P,I){var R=this;if(I)return R.update(C,L,!0);R._geoCalcData=C,R._fullLayout=L;var U=L[this.id],B=[],G=!1;for(var N in x.layerNameToAdjective)if(N!=="frame"&&U["show"+N]){G=!0;break}for(var j=!1,V=0;V0&&B._module.calcGeoJSON(U,L)}if(!P){if(this.updateProjection(C,L))return;this.viewInitial&&this.scope===I.scope||this.saveViewInitial(I)}this.scope=I.scope,this.updateBaseLayers(L,I),this.updateDims(L,I),this.updateFx(L,I),o.generalUpdatePerTraceModule(this.graphDiv,this,C,I);var G=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=G.selectAll(".point"),this.dataPoints.text=G.selectAll("text"),this.dataPaths.line=G.selectAll(".js-line");var N=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=N.selectAll("path"),this._render()},M.updateProjection=function(C,L){var P=this.graphDiv,I=L[this.id],R=L._size,U=I.domain,B=I.projection,G=I.lonaxis,N=I.lataxis,j=G._ax,V=N._ax,H=this.projection=function(Ce){var ne=Ce.projection,ue=ne.type,me=x.projNames[ue];me="geo"+l.titleCase(me);for(var we=(w[me]||m[me])(),Ee=Ce._isSatellite?180*Math.acos(1/ne.distance)/Math.PI:Ce._isClipped?x.lonaxisSpan[ue]/2:null,Ue=["center","rotate","parallels","clipExtent"],De=function(be){return be?we:[]},je=0;jeEe*Math.PI/180}return!1},we.getPath=function(){return s().projection(we)},we.getBounds=function(be){return we.getPath().bounds(be)},we.precision(x.precision),Ce._isSatellite&&we.tilt(ne.tilt).distance(ne.distance),Ee&&we.clipAngle(Ee-x.clipPad),we}(I),ee=[[R.l+R.w*U.x[0],R.t+R.h*(1-U.y[1])],[R.l+R.w*U.x[1],R.t+R.h*(1-U.y[0])]],Q=I.center||{},X=B.rotation||{},Y=G.range||[],K=N.range||[];if(I.fitbounds){j._length=ee[1][0]-ee[0][0],V._length=ee[1][1]-ee[0][1],j.range=u(P,j),V.range=u(P,V);var te=(j.range[0]+j.range[1])/2,re=(V.range[0]+V.range[1])/2;if(I._isScoped)Q={lon:te,lat:re};else if(I._isClipped){Q={lon:te,lat:re},X={lon:te,lat:re,roll:X.roll};var oe=B.type,se=x.lonaxisSpan[oe]/2||180,ce=x.lataxisSpan[oe]/2||90;Y=[te-se,te+se],K=[re-ce,re+ce]}else Q={lon:te,lat:re},X={lon:te,lat:X.lat,roll:X.roll}}H.center([Q.lon-X.lon,Q.lat-X.lat]).rotate([-X.lon,-X.lat,X.roll]).parallels(B.parallels);var xe=A(Y,K);H.fitExtent(ee,xe);var pe=this.bounds=H.getBounds(xe),de=this.fitScale=H.scale(),he=H.translate();if(I.fitbounds){var ye=H.getBounds(A(j.range,V.range)),ze=Math.min((pe[1][0]-pe[0][0])/(ye[1][0]-ye[0][0]),(pe[1][1]-pe[0][1])/(ye[1][1]-ye[0][1]));isFinite(ze)?H.scale(ze*de):l.warn("Something went wrong during"+this.id+"fitbounds computations.")}else H.scale(B.scale*de);var Te=this.midPt=[(pe[0][0]+pe[1][0])/2,(pe[0][1]+pe[1][1])/2];if(H.translate([he[0]+(Te[0]-he[0]),he[1]+(Te[1]-he[1])]).clipExtent(pe),I._isAlbersUsa){var Ae=H([Q.lon,Q.lat]),Me=H.translate();H.translate([Me[0]-(Ae[0]-Me[0]),Me[1]-(Ae[1]-Me[1])])}},M.updateBaseLayers=function(C,L){var P=this,I=P.topojson,R=P.layers,U=P.basePaths;function B(H){return H==="lonaxis"||H==="lataxis"}function G(H){return!!x.lineLayers[H]}function N(H){return!!x.fillLayers[H]}var j=(this.hasChoropleth?x.layersForChoropleth:x.layers).filter(function(H){return G(H)||N(H)?L["show"+H]:!B(H)||L[H].showgrid}),V=P.framework.selectAll(".layer").data(j,String);V.exit().each(function(H){delete R[H],delete U[H],_.select(this).remove()}),V.enter().append("g").attr("class",function(H){return"layer "+H}).each(function(H){var ee=R[H]=_.select(this);H==="bg"?P.bgRect=ee.append("rect").style("pointer-events","all"):B(H)?U[H]=ee.append("path").style("fill","none"):H==="backplot"?ee.append("g").classed("choroplethlayer",!0):H==="frontplot"?ee.append("g").classed("scatterlayer",!0):G(H)?U[H]=ee.append("path").style("fill","none").style("stroke-miterlimit",2):N(H)&&(U[H]=ee.append("path").style("stroke","none"))}),V.order(),V.each(function(H){var ee=U[H],Q=x.layerNameToAdjective[H];H==="frame"?ee.datum(x.sphereSVG):G(H)||N(H)?ee.datum(k(I,I.objects[H])):B(H)&&ee.datum(function(X,Y,K){var te,re,oe,se=Y[X],ce=x.scopeDefaults[Y.scope];X==="lonaxis"?(te=ce.lonaxisRange,re=ce.lataxisRange,oe=function(Me,Ce){return[Me,Ce]}):X==="lataxis"&&(te=ce.lataxisRange,re=ce.lonaxisRange,oe=function(Me,Ce){return[Ce,Me]});var xe={type:"linear",range:[te[0],te[1]-1e-6],tick0:se.tick0,dtick:se.dtick};i.setConvert(xe,K);var pe=i.calcTicks(xe);Y.isScoped||X!=="lonaxis"||pe.pop();for(var de=pe.length,he=new Array(de),ye=0;ye-1&&d(_.event,I,[P.xaxis],[P.yaxis],P.id,G),B.indexOf("event")>-1&&n.click(I,_.event))})}function N(j){return P.projection.invert([j[0]+P.xaxis._offset,j[1]+P.yaxis._offset])}},M.makeFramework=function(){var C=this,L=C.graphDiv,P=L._fullLayout,I="clip"+P._uid+C.id;C.clipDef=P._clips.append("clipPath").attr("id",I),C.clipRect=C.clipDef.append("rect"),C.framework=_.select(C.container).append("g").attr("class","geo "+C.id).call(r.setClipUrl,I,L),C.project=function(R){var U=C.projection(R);return U?[U[0]-C.xaxis._offset,U[1]-C.yaxis._offset]:[null,null]},C.xaxis={_id:"x",c2p:function(R){return C.project(R)[0]}},C.yaxis={_id:"y",c2p:function(R){return C.project(R)[1]}},C.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},i.setConvert(C.mockAxis,P)},M.saveViewInitial=function(C){var L,P=C.center||{},I=C.projection,R=I.rotation||{};this.viewInitial={fitbounds:C.fitbounds,"projection.scale":I.scale},L=C._isScoped?{"center.lon":P.lon,"center.lat":P.lat}:C._isClipped?{"projection.rotation.lon":R.lon,"projection.rotation.lat":R.lat}:{"center.lon":P.lon,"center.lat":P.lat,"projection.rotation.lon":R.lon},l.extendFlat(this.viewInitial,L)},M.render=function(C){this._hasMarkerAngles&&C?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},M._render=function(){var C,L=this.projection,P=L.getPath();function I(U){var B=L(U.lonlat);return B?t(B[0],B[1]):null}function R(U){return L.isLonLatOverEdges(U.lonlat)?"none":null}for(C in this.basePaths)this.basePaths[C].attr("d",P);for(C in this.dataPaths)this.dataPaths[C].attr("d",function(U){return P(U.geojson)});for(C in this.dataPoints)this.dataPoints[C].attr("display",R).attr("transform",I)}},44622:function(D,E,e){var _=e(27659).AU,w=e(71828).counterRegex,s=e(69082),T="geo",m=w(T),f={};f.geo={valType:"subplotid",dflt:T,editType:"calc"},D.exports={attr:T,name:T,idRoot:T,idRegex:m,attrRegex:m,attributes:f,layoutAttributes:e(77519),supplyLayoutDefaults:e(82161),plot:function(l){for(var t=l._fullLayout,a=l.calcdata,r=t._subplots.geo,n=0;n0&&N<0&&(N+=360);var j,V,H,ee=(G+N)/2;if(!b){var Q=d?p.projRotate:[ee,0,0];j=r("projection.rotation.lon",Q[0]),r("projection.rotation.lat",Q[1]),r("projection.rotation.roll",Q[2]),r("showcoastlines",!d&&k)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean",!!k&&void 0)&&r("oceancolor")}b?(V=-96.6,H=38.7):(V=d?ee:j,H=(B[0]+B[1])/2),r("center.lon",V),r("center.lat",H),v&&(r("projection.tilt"),r("projection.distance")),x&&r("projection.parallels",p.projParallels||[0,60]),r("projection.scale"),r("showland",!!k&&void 0)&&r("landcolor"),r("showlakes",!!k&&void 0)&&r("lakecolor"),r("showrivers",!!k&&void 0)&&(r("rivercolor"),r("riverwidth")),r("showcountries",d&&u!=="usa"&&k)&&(r("countrycolor"),r("countrywidth")),(u==="usa"||u==="north america"&&i===50)&&(r("showsubunits",k),r("subunitcolor"),r("subunitwidth")),d||r("showframe",k)&&(r("framecolor"),r("framewidth")),r("bgcolor"),r("fitbounds")&&(delete a.projection.scale,d?(delete a.center.lon,delete a.center.lat):g?(delete a.center.lon,delete a.center.lat,delete a.projection.rotation.lon,delete a.projection.rotation.lat,delete a.lonaxis.range,delete a.lataxis.range):(delete a.center.lon,delete a.center.lat,delete a.projection.rotation.lon))}D.exports=function(t,a,r){w(t,a,r,{type:"geo",attributes:m,handleDefaults:l,fullData:r,partition:"y"})}},74455:function(D,E,e){var _=e(39898),w=e(71828),s=e(73972),T=Math.PI/180,m=180/Math.PI,f={cursor:"pointer"},l={cursor:"auto"};function t(k,h){return _.behavior.zoom().translate(h.translate()).scale(h.scale())}function a(k,h,M){var A=k.id,C=k.graphDiv,L=C.layout,P=L[A],I=C._fullLayout,R=I[A],U={},B={};function G(N,j){U[A+"."+N]=w.nestedProperty(P,N).get(),s.call("_storeDirectGUIEdit",L,I._preGUI,U);var V=w.nestedProperty(R,N);V.get()!==j&&(V.set(j),w.nestedProperty(P,N).set(j),B[A+"."+N]=j)}M(G),G("projection.scale",h.scale()/k.fitScale),G("fitbounds",!1),C.emit("plotly_relayout",B)}function r(k,h){var M=t(0,h);function A(C){var L=h.invert(k.midPt);C("center.lon",L[0]),C("center.lat",L[1])}return M.on("zoomstart",function(){_.select(this).style(f)}).on("zoom",function(){h.scale(_.event.scale).translate(_.event.translate),k.render(!0);var C=h.invert(k.midPt);k.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":h.scale()/k.fitScale,"geo.center.lon":C[0],"geo.center.lat":C[1]})}).on("zoomend",function(){_.select(this).style(l),a(k,h,A)}),M}function n(k,h){var M,A,C,L,P,I,R,U,B,G=t(0,h);function N(V){return h.invert(V)}function j(V){var H=h.rotate(),ee=h.invert(k.midPt);V("projection.rotation.lon",-H[0]),V("center.lon",ee[0]),V("center.lat",ee[1])}return G.on("zoomstart",function(){_.select(this).style(f),M=_.mouse(this),A=h.rotate(),C=h.translate(),L=A,P=N(M)}).on("zoom",function(){if(I=_.mouse(this),function(ee){var Q=N(ee);if(!Q)return!0;var X=h(Q);return Math.abs(X[0]-ee[0])>2||Math.abs(X[1]-ee[1])>2}(M))return G.scale(h.scale()),void G.translate(h.translate());h.scale(_.event.scale),h.translate([C[0],_.event.translate[1]]),P?N(I)&&(U=N(I),R=[L[0]+(U[0]-P[0]),A[1],A[2]],h.rotate(R),L=R):P=N(M=I),B=!0,k.render(!0);var V=h.rotate(),H=h.invert(k.midPt);k.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":h.scale()/k.fitScale,"geo.center.lon":H[0],"geo.center.lat":H[1],"geo.projection.rotation.lon":-V[0]})}).on("zoomend",function(){_.select(this).style(l),B&&a(k,h,j)}),G}function o(k,h){var M;h.rotate(),h.scale();var A=t(0,h),C=function(G){for(var N=0,j=arguments.length,V=[];++Nj?(L=(B>0?90:-90)-N,C=0):(L=Math.asin(B/j)*m-N,C=Math.sqrt(j*j-B*B));var V=180-L-2*N,H=(Math.atan2(G,U)-Math.atan2(R,C))*m,ee=(Math.atan2(G,U)-Math.atan2(R,-C))*m;return d(M[0],M[1],L,H)<=d(M[0],M[1],V,ee)?[L,H,M[2]]:[V,ee,M[2]]}function d(k,h,M,A){var C=v(M-k),L=v(A-h);return Math.sqrt(C*C+L*L)}function v(k){return(k%360+540)%360-180}function x(k,h,M){var A=M*T,C=k.slice(),L=h===0?1:0,P=h===2?1:2,I=Math.cos(A),R=Math.sin(A);return C[L]=k[L]*I-k[P]*R,C[P]=k[P]*I+k[L]*R,C}function g(k){return[Math.atan2(2*(k[0]*k[1]+k[2]*k[3]),1-2*(k[1]*k[1]+k[2]*k[2]))*m,Math.asin(Math.max(-1,Math.min(1,2*(k[0]*k[2]-k[3]*k[1]))))*m,Math.atan2(2*(k[0]*k[3]+k[1]*k[2]),1-2*(k[2]*k[2]+k[3]*k[3]))*m]}function y(k,h){for(var M=0,A=0,C=k.length;AMath.abs(b)?(r.boxEnd[1]=r.boxStart[1]+Math.abs(c)*P*(b>=0?1:-1),r.boxEnd[1]d[3]&&(r.boxEnd[1]=d[3],r.boxEnd[0]=r.boxStart[0]+(d[3]-r.boxStart[1])/Math.abs(P))):(r.boxEnd[0]=r.boxStart[0]+Math.abs(b)/P*(c>=0?1:-1),r.boxEnd[0]d[2]&&(r.boxEnd[0]=d[2],r.boxEnd[1]=r.boxStart[1]+(d[2]-r.boxStart[0])*Math.abs(P)))}}else r.boxEnabled?(c=r.boxStart[0]!==r.boxEnd[0],b=r.boxStart[1]!==r.boxEnd[1],c||b?(c&&(h(0,r.boxStart[0],r.boxEnd[0]),l.xaxis.autorange=!1),b&&(h(1,r.boxStart[1],r.boxEnd[1]),l.yaxis.autorange=!1),l.relayoutCallback()):l.glplot.setDirty(),r.boxEnabled=!1,r.boxInited=!1):r.boxInited&&(r.boxInited=!1);break;case"pan":r.boxEnabled=!1,r.boxInited=!1,i?(r.panning||(r.dragStart[0]=u,r.dragStart[1]=p),Math.abs(r.dragStart[0]-u).999&&(g="turntable"):g="turntable")}else g="turntable";o("dragmode",g),o("hovermode",i.getDfltFromLayout("hovermode"))}D.exports=function(r,n,o){var i=n._basePlotModules.length>1;T(r,n,o,{type:t,attributes:f,handleDefaults:a,fullLayout:n,font:n.font,fullData:o,getDfltFromLayout:function(u){if(!i)return _.validate(r[u],f[u])?r[u]:void 0},autotypenumbersDflt:n.autotypenumbers,paper_bgcolor:n.paper_bgcolor,calendar:n.calendar})}},65500:function(D,E,e){var _=e(77894),w=e(27670).Y,s=e(1426).extendFlat,T=e(71828).counterRegex;function m(f,l,t){return{x:{valType:"number",dflt:f,editType:"camera"},y:{valType:"number",dflt:l,editType:"camera"},z:{valType:"number",dflt:t,editType:"camera"},editType:"camera"}}D.exports={_arrayAttrRegexps:[T("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:s(m(0,0,1),{}),center:s(m(0,0,0),{}),eye:s(m(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:w({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:_,yaxis:_,zaxis:_,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(D,E,e){var _=e(78614),w=["xaxis","yaxis","zaxis"];function s(){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]}s.prototype.merge=function(T){for(var m=0;m<3;++m){var f=T[w[m]];f.visible?(this.enabled[m]=f.showspikes,this.colors[m]=_(f.spikecolor),this.drawSides[m]=f.spikesides,this.lineWidth[m]=f.spikethickness):(this.enabled[m]=!1,this.drawSides[m]=!1)}},D.exports=function(T){var m=new s;return m.merge(T),m}},96085:function(D,E,e){D.exports=function(m){for(var f=m.axesOptions,l=m.glplot.axesPixels,t=m.fullSceneLayout,a=[[],[],[]],r=0;r<3;++r){var n=t[s[r]];if(n._length=(l[r].hi-l[r].lo)*l[r].pixelsPerDataUnit/m.dataScale[r],Math.abs(n._length)===1/0||isNaN(n._length))a[r]=[];else{n._input_range=n.range.slice(),n.range[0]=l[r].lo/m.dataScale[r],n.range[1]=l[r].hi/m.dataScale[r],n._m=1/(m.dataScale[r]*l[r].pixelsPerDataUnit),n.range[0]===n.range[1]&&(n.range[0]-=1,n.range[1]+=1);var o=n.tickmode;if(n.tickmode==="auto"){n.tickmode="linear";var i=n.nticks||w.constrain(n._length/40,4,9);_.autoTicks(n,Math.abs(n.range[1]-n.range[0])/i)}for(var u=_.calcTicks(n,{msUTC:!0}),p=0;p/g," "));a[r]=u,n.tickmode=o}}for(f.ticks=a,r=0;r<3;++r)for(T[r]=.5*(m.glplot.bounds[0][r]+m.glplot.bounds[1][r]),p=0;p<2;++p)f.bounds[p][r]=m.glplot.bounds[p][r];m.contourLevels=function(c){for(var b=new Array(3),d=0;d<3;++d){for(var v=c[d],x=new Array(v.length),g=0;gI.deltaY?1.1:.9090909090909091,U=M.glplot.getAspectratio();M.glplot.setAspectratio({x:R*U.x,y:R*U.y,z:R*U.z})}P(M)}},!!l&&{passive:!1}),M.glplot.canvas.addEventListener("mousemove",function(){if(M.fullSceneLayout.dragmode!==!1&&M.camera.mouseListener.buttons!==0){var I=L();M.graphDiv.emit("plotly_relayouting",I)}}),M.staticMode||M.glplot.canvas.addEventListener("webglcontextlost",function(I){A&&A.emit&&A.emit("plotly_webglcontextlost",{event:I,layer:M.id})},!1)),M.glplot.oncontextloss=function(){M.recoverContext()},M.glplot.onrender=function(){M.render()},!0},g.render=function(){var M,A=this,C=A.graphDiv,L=A.svgContainer,P=A.container.getBoundingClientRect();C._fullLayout._calcInverseTransform(C);var I=C._fullLayout._invScaleX,R=C._fullLayout._invScaleY,U=P.width*I,B=P.height*R;L.setAttributeNS(null,"viewBox","0 0 "+U+" "+B),L.setAttributeNS(null,"width",U),L.setAttributeNS(null,"height",B),d(A),A.glplot.axes.update(A.axesOptions);for(var G=Object.keys(A.traces),N=null,j=A.glplot.selection,V=0;V")):M.type==="isosurface"||M.type==="volume"?(K.valueLabel=n.hoverLabelText(A._mockAxis,A._mockAxis.d2l(j.traceCoordinate[3]),M.valuehoverformat),se.push("value: "+K.valueLabel),j.textLabel&&se.push(j.textLabel),Q=se.join("
")):Q=j.textLabel;var ce={x:j.traceCoordinate[0],y:j.traceCoordinate[1],z:j.traceCoordinate[2],data:X._input,fullData:X,curveNumber:X.index,pointNumber:Y};o.appendArrayPointValue(ce,X,Y),M._module.eventData&&(ce=X._module.eventData(ce,j,X,{},Y));var xe={points:[ce]};if(A.fullSceneLayout.hovermode){var pe=[];o.loneHover({trace:X,x:(.5+.5*ee[0]/ee[3])*U,y:(.5-.5*ee[1]/ee[3])*B,xLabel:K.xLabel,yLabel:K.yLabel,zLabel:K.zLabel,text:Q,name:N.name,color:o.castHoverOption(X,Y,"bgcolor")||N.color,borderColor:o.castHoverOption(X,Y,"bordercolor"),fontFamily:o.castHoverOption(X,Y,"font.family"),fontSize:o.castHoverOption(X,Y,"font.size"),fontColor:o.castHoverOption(X,Y,"font.color"),nameLength:o.castHoverOption(X,Y,"namelength"),textAlign:o.castHoverOption(X,Y,"align"),hovertemplate:a.castOption(X,Y,"hovertemplate"),hovertemplateLabels:a.extendFlat({},ce,K),eventData:[ce]},{container:L,gd:C,inOut_bbox:pe}),ce.bbox=pe[0]}j.distance<5&&(j.buttons||v)?C.emit("plotly_click",xe):C.emit("plotly_hover",xe),this.oldEventData=xe}else o.loneUnhover(L),this.oldEventData&&C.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;A.drawAnnotations(A)},g.recoverContext=function(){var M=this;M.glplot.dispose();var A=function(){M.glplot.gl.isContextLost()?requestAnimationFrame(A):M.initializeGLPlot()?M.plot.apply(M,M.plotArgs):a.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(A)};var k=["xaxis","yaxis","zaxis"];function h(M,A,C){for(var L=M.fullSceneLayout,P=0;P<3;P++){var I=k[P],R=I.charAt(0),U=L[I],B=A[R],G=A[R+"calendar"],N=A["_"+R+"length"];if(a.isArrayOrTypedArray(B))for(var j,V=0;V<(N||B.length);V++)if(a.isArrayOrTypedArray(B[V]))for(var H=0;HX[1][R])X[0][R]=-1,X[1][R]=1;else{var he=X[1][R]-X[0][R];X[0][R]-=he/32,X[1][R]+=he/32}if(B.autorange==="reversed"){var ye=X[0][R];X[0][R]=X[1][R],X[1][R]=ye}}else{var ze=B.range;X[0][R]=B.r2l(ze[0]),X[1][R]=B.r2l(ze[1])}X[0][R]===X[1][R]&&(X[0][R]-=1,X[1][R]+=1),Y[R]=X[1][R]-X[0][R],L.glplot.setBounds(R,{min:X[0][R]*H[R],max:X[1][R]*H[R]})}var Te=N.aspectmode;if(Te==="cube")Q=[1,1,1];else if(Te==="manual"){var Ae=N.aspectratio;Q=[Ae.x,Ae.y,Ae.z]}else{if(Te!=="auto"&&Te!=="data")throw new Error("scene.js aspectRatio was not one of the enumerated types");var Me=[1,1,1];for(R=0;R<3;++R){var Ce=K[G=(B=N[k[R]]).type];Me[R]=Math.pow(Ce.acc,1/Ce.count)/H[R]}Q=Te==="data"||Math.max.apply(null,Me)/Math.min.apply(null,Me)<=4?Me:[1,1,1]}N.aspectratio.x=j.aspectratio.x=Q[0],N.aspectratio.y=j.aspectratio.y=Q[1],N.aspectratio.z=j.aspectratio.z=Q[2],L.glplot.setAspectratio(N.aspectratio),L.viewInitial.aspectratio||(L.viewInitial.aspectratio={x:N.aspectratio.x,y:N.aspectratio.y,z:N.aspectratio.z}),L.viewInitial.aspectmode||(L.viewInitial.aspectmode=N.aspectmode);var ne=N.domain||null,ue=A._size||null;if(ne&&ue){var me=L.container.style;me.position="absolute",me.left=ue.l+ne.x[0]*ue.w+"px",me.top=ue.t+(1-ne.y[1])*ue.h+"px",me.width=ue.w*(ne.x[1]-ne.x[0])+"px",me.height=ue.h*(ne.y[1]-ne.y[0])+"px"}L.glplot.redraw()}},g.destroy=function(){var M=this;M.glplot&&(M.camera.mouseListener.enabled=!1,M.container.removeEventListener("wheel",M.camera.wheelListener),M.camera=null,M.glplot.dispose(),M.container.parentNode.removeChild(M.container),M.glplot=null)},g.getCamera=function(){var M,A=this;return A.camera.view.recalcMatrix(A.camera.view.lastT()),{up:{x:(M=A.camera).up[0],y:M.up[1],z:M.up[2]},center:{x:M.center[0],y:M.center[1],z:M.center[2]},eye:{x:M.eye[0],y:M.eye[1],z:M.eye[2]},projection:{type:M._ortho===!0?"orthographic":"perspective"}}},g.setViewport=function(M){var A,C=this,L=M.camera;C.camera.lookAt.apply(this,[[(A=L).eye.x,A.eye.y,A.eye.z],[A.center.x,A.center.y,A.center.z],[A.up.x,A.up.y,A.up.z]]),C.glplot.setAspectratio(M.aspectratio),L.projection.type==="orthographic"!==C.camera._ortho&&(C.glplot.redraw(),C.glplot.clearRGBA(),C.glplot.dispose(),C.initializeGLPlot())},g.isCameraChanged=function(M){var A=this.getCamera(),C=a.nestedProperty(M,this.id+".camera").get();function L(U,B,G,N){var j=["up","center","eye"],V=["x","y","z"];return B[j[G]]&&U[j[G]][V[N]]===B[j[G]][V[N]]}var P=!1;if(C===void 0)P=!0;else{for(var I=0;I<3;I++)for(var R=0;R<3;R++)if(!L(A,C,I,R)){P=!0;break}(!C.projection||A.projection&&A.projection.type!==C.projection.type)&&(P=!0)}return P},g.isAspectChanged=function(M){var A=this.glplot.getAspectratio(),C=a.nestedProperty(M,this.id+".aspectratio").get();return C===void 0||C.x!==A.x||C.y!==A.y||C.z!==A.z},g.saveLayout=function(M){var A,C,L,P,I,R,U=this,B=U.fullLayout,G=U.isCameraChanged(M),N=U.isAspectChanged(M),j=G||N;if(j){var V={};G&&(A=U.getCamera(),L=(C=a.nestedProperty(M,U.id+".camera")).get(),V[U.id+".camera"]=L),N&&(P=U.glplot.getAspectratio(),R=(I=a.nestedProperty(M,U.id+".aspectratio")).get(),V[U.id+".aspectratio"]=R),t.call("_storeDirectGUIEdit",M,B._preGUI,V),G&&(C.set(A),a.nestedProperty(B,U.id+".camera").set(A)),N&&(I.set(P),a.nestedProperty(B,U.id+".aspectratio").set(P),U.glplot.redraw())}return j},g.updateFx=function(M,A){var C=this,L=C.camera;if(L)if(M==="orbit")L.mode="orbit",L.keyBindingMode="rotate";else if(M==="turntable"){L.up=[0,0,1],L.mode="turntable",L.keyBindingMode="rotate";var P=C.graphDiv,I=P._fullLayout,R=C.fullSceneLayout.camera,U=R.up.x,B=R.up.y,G=R.up.z;if(G/Math.sqrt(U*U+B*B+G*G)<.999){var N=C.id+".camera.up",j={x:0,y:0,z:1},V={};V[N]=j;var H=P.layout;t.call("_storeDirectGUIEdit",H,I._preGUI,V),R.up=j,a.nestedProperty(H,N).set(j)}}else L.keyBindingMode=M;C.fullSceneLayout.hovermode=A},g.toImage=function(M){var A=this;M||(M="png"),A.staticMode&&A.container.appendChild(_),A.glplot.redraw();var C=A.glplot.gl,L=C.drawingBufferWidth,P=C.drawingBufferHeight;C.bindFramebuffer(C.FRAMEBUFFER,null);var I=new Uint8Array(L*P*4);C.readPixels(0,0,L,P,C.RGBA,C.UNSIGNED_BYTE,I),function(N,j,V){for(var H=0,ee=V-1;H0)for(var Y=255/X,K=0;K<3;++K)N[Q+K]=Math.min(Y*N[Q+K],255)}}(I,L,P);var R=document.createElement("canvas");R.width=L,R.height=P;var U,B=R.getContext("2d",{willReadFrequently:!0}),G=B.createImageData(L,P);switch(G.data.set(I),B.putImageData(G,0,0),M){case"jpeg":U=R.toDataURL("image/jpeg");break;case"webp":U=R.toDataURL("image/webp");break;default:U=R.toDataURL("image/png")}return A.staticMode&&A.container.removeChild(_),U},g.setConvert=function(){for(var M=0;M<3;M++){var A=this.fullSceneLayout[k[M]];n.setConvert(A,this.fullLayout),A.setScale=a.noop}},g.make4thDimension=function(){var M=this,A=M.graphDiv._fullLayout;M._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},n.setConvert(M._mockAxis,A)},D.exports=x},90060:function(D){D.exports=function(E,e,_,w){w=w||E.length;for(var s=new Array(w),T=0;TOpenStreetMap contributors',s=['© Carto',w].join(" "),T=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),m={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:w,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:s,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:s,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:T,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:T,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:['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),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}]}},f=_(m);D.exports={requiredVersion:"1.10.1",styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:m,styleValuesNonMapbox:f,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install mapbox-gl@1.10.1."].join(` @@ -2388,10 +2388,10 @@ void main() { `||v==="\\"?(h.push(d),v=d,g+1):(j(h.join("")),k=u,g)}function Q(){return d==="/"&&v==="*"?(h.push(d),j(h.join("")),k=u,g+1):(h.push(d),v=d,g+1)}function X(){if(v==="."&&/\d/.test(d))return k=5,g;if(v==="/"&&d==="*")return k=0,g;if(v==="/"&&d==="/")return k=1,g;if(d==="."&&h.length){for(;Y(h););return k=5,g}if(d===";"||d===")"||d==="("){if(h.length)for(;Y(h););return j(d),k=u,g+1}var se=h.length===2&&d!=="=";if(/[\w_\d\s]/.test(d)||se){for(;Y(h););return k=u,g}return h.push(d),v=d,g+1}function Y(se){for(var ce,xe,pe=0;;){if(ce=r.indexOf(se.slice(0,se.length+pe).join("")),xe=r[ce],ce===-1){if(pe--+se.length>0)continue;xe=se.slice(0,1).join("")}return j(xe),L+=xe.length,(h=h.slice(xe.length)).length}}function K(){return/[^a-fA-F0-9]/.test(d)?(j(h.join("")),k=u,g):(h.push(d),v=d,g+1)}function te(){return d==="."||/[eE]/.test(d)?(h.push(d),k=5,v=d,g+1):d==="x"&&h.length===1&&h[0]==="0"?(k=11,h.push(d),v=d,g+1):/[^\d]/.test(d)?(j(h.join("")),k=u,g):(h.push(d),v=d,g+1)}function re(){return d==="f"&&(h.push(d),v=d,g+=1),/[eE]/.test(d)?(h.push(d),v=d,g+1):(d!=="-"&&d!=="+"||!/[eE]/.test(v))&&/[^\d]/.test(d)?(j(h.join("")),k=u,g):(h.push(d),v=d,g+1)}function oe(){if(/[^\d\w_]/.test(d)){var se=h.join("");return k=N[se]?8:G[se]?7:6,j(h.join("")),k=u,g}return h.push(d),v=d,g+1}};var a=t(399),r=t(9746),n=t(9525),o=t(9458),i=t(3585),u=999,p=9999,c=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3585:function(f,l,t){var a=t(9525);a=a.slice().filter(function(r){return!/^(gl\_|texture)/.test(r)}),f.exports=a.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(f){f.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(f,l,t){var a=t(399);f.exports=a.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(f){f.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(f){f.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},8096:function(f,l,t){var a=t(3193);f.exports=function(r,n){var o=a(n),i=[];return(i=i.concat(o(r))).concat(o(null))}},6832:function(f){f.exports=function(l){typeof l=="string"&&(l=[l]);for(var t=[].slice.call(arguments,1),a=[],r=0;r0;)for(var h=(b=k.pop()).adjacent,M=0;M<=v;++M){var A=h[M];if(A.boundary&&!(A.lastVisited<=-x)){for(var C=A.vertices,L=0;L<=v;++L){var P=C[L];g[L]=P<0?d:y[P]}var I=this.orient();if(I>0)return A;A.lastVisited=-x,I===0&&k.push(A)}}return null},c.walk=function(b,d){var v=this.vertices.length-1,x=this.dimension,g=this.vertices,y=this.tuple,k=d?this.interior.length*Math.random()|0:this.interior.length-1,h=this.interior[k];e:for(;!h.boundary;){for(var M=h.vertices,A=h.adjacent,C=0;C<=x;++C)y[C]=g[M[C]];for(h.lastVisited=v,C=0;C<=x;++C){var L=A[C];if(!(L.lastVisited>=v)){var P=y[C];y[C]=b;var I=this.orient();if(y[C]=P,I<0){h=L;continue e}L.boundary?L.lastVisited=-v:L.lastVisited=v}}return}return h},c.addPeaks=function(b,d){var v=this.vertices.length-1,x=this.dimension,g=this.vertices,y=this.tuple,k=this.interior,h=this.simplices,M=[d];d.lastVisited=v,d.vertices[d.vertices.indexOf(-1)]=v,d.boundary=!1,k.push(d);for(var A=[];M.length>0;){var C=(d=M.pop()).vertices,L=d.adjacent,P=C.indexOf(v);if(!(P<0)){for(var I=0;I<=x;++I)if(I!==P){var R=L[I];if(R.boundary&&!(R.lastVisited>=v)){var U=R.vertices;if(R.lastVisited!==-v){for(var B=0,G=0;G<=x;++G)U[G]<0?(B=G,y[G]=b):y[G]=g[U[G]];if(this.orient()>0){U[B]=v,R.boundary=!1,k.push(R),M.push(R),R.lastVisited=v;continue}R.lastVisited=-v}var N=R.adjacent,j=C.slice(),V=L.slice(),H=new n(j,V,!0);h.push(H);var ee=N.indexOf(d);if(!(ee<0))for(N[ee]=H,V[P]=R,j[I]=-1,V[I]=d,L[I]=H,H.flip(),G=0;G<=x;++G){var Q=j[G];if(!(Q<0||Q===v)){for(var X=new Array(x-1),Y=0,K=0;K<=x;++K){var te=j[K];te<0||K===G||(X[Y++]=te)}A.push(new o(X,H,G))}}}}}}for(A.sort(i),I=0;I+1=0?k[M++]=h[C]:A=1&C;if(A===(1&b)){var L=k[0];k[0]=k[1],k[1]=L}d.push(k)}}return d}},9014:function(f,l,t){var a=t(5070);function r(M,A,C,L,P){this.mid=M,this.left=A,this.right=C,this.leftPoints=L,this.rightPoints=P,this.count=(A?A.count:0)+(C?C.count:0)+L.length}f.exports=function(M){return M&&M.length!==0?new k(y(M)):new k(null)};var n=r.prototype;function o(M,A){M.mid=A.mid,M.left=A.left,M.right=A.right,M.leftPoints=A.leftPoints,M.rightPoints=A.rightPoints,M.count=A.count}function i(M,A){var C=y(A);M.mid=C.mid,M.left=C.left,M.right=C.right,M.leftPoints=C.leftPoints,M.rightPoints=C.rightPoints,M.count=C.count}function u(M,A){var C=M.intervals([]);C.push(A),i(M,C)}function p(M,A){var C=M.intervals([]),L=C.indexOf(A);return L<0?0:(C.splice(L,1),i(M,C),1)}function c(M,A,C){for(var L=0;L=0&&M[L][1]>=A;--L){var P=C(M[L]);if(P)return P}}function d(M,A){for(var C=0;C>1],P=[],I=[],R=[];for(C=0;C3*(A+1)?u(this,M):this.left.insert(M):this.left=y([M]);else if(M[0]>this.mid)this.right?4*(this.right.count+1)>3*(A+1)?u(this,M):this.right.insert(M):this.right=y([M]);else{var C=a.ge(this.leftPoints,M,x),L=a.ge(this.rightPoints,M,g);this.leftPoints.splice(C,0,M),this.rightPoints.splice(L,0,M)}},n.remove=function(M){var A=this.count-this.leftPoints;if(M[1]3*(A-1)?p(this,M):(I=this.left.remove(M))===2?(this.left=null,this.count-=1,1):(I===1&&(this.count-=1),I):0;if(M[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(A-1)?p(this,M):(I=this.right.remove(M))===2?(this.right=null,this.count-=1,1):(I===1&&(this.count-=1),I):0;if(this.count===1)return this.leftPoints[0]===M?2:0;if(this.leftPoints.length===1&&this.leftPoints[0]===M){if(this.left&&this.right){for(var C=this,L=this.left;L.right;)C=L,L=L.right;if(C===this)L.right=this.right;else{var P=this.left,I=this.right;C.count-=L.count,C.right=L.left,L.left=P,L.right=I}o(this,L),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?o(this,this.left):o(this,this.right);return 1}for(P=a.ge(this.leftPoints,M,x);Pthis.mid?this.right&&(C=this.right.queryPoint(M,A))?C:b(this.rightPoints,M,A):d(this.leftPoints,A);var C},n.queryInterval=function(M,A,C){var L;return Mthis.mid&&this.right&&(L=this.right.queryInterval(M,A,C))?L:Athis.mid?b(this.rightPoints,M,C):d(this.leftPoints,C)};var h=k.prototype;h.insert=function(M){this.root?this.root.insert(M):this.root=new r(M[0],null,null,[M],[M])},h.remove=function(M){if(this.root){var A=this.root.remove(M);return A===2&&(this.root=null),A!==0}return!1},h.queryPoint=function(M,A){if(this.root)return this.root.queryPoint(M,A)},h.queryInterval=function(M,A,C){if(M<=A&&this.root)return this.root.queryInterval(M,A,C)},Object.defineProperty(h,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(h,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},9560:function(f){f.exports=function(l){for(var t=new Array(l),a=0;a13)&&t!==32&&t!==133&&t!==160&&t!==5760&&t!==6158&&(t<8192||t>8205)&&t!==8232&&t!==8233&&t!==8239&&t!==8287&&t!==8288&&t!==12288&&t!==65279)return!1;return!0}},3578:function(f){f.exports=function(l,t,a){return l*(1-a)+t*a}},7191:function(f,l,t){var a=t(4690),r=t(9823),n=t(7332),o=t(7787),i=t(7437),u=t(2142),p={length:t(4693),normalize:t(899),dot:t(9305),cross:t(903)},c=r(),b=r(),d=[0,0,0,0],v=[[0,0,0],[0,0,0],[0,0,0]],x=[0,0,0];function g(y,k,h,M,A){y[0]=k[0]*M+h[0]*A,y[1]=k[1]*M+h[1]*A,y[2]=k[2]*M+h[2]*A}f.exports=function(y,k,h,M,A,C){if(k||(k=[0,0,0]),h||(h=[0,0,0]),M||(M=[0,0,0]),A||(A=[0,0,0,1]),C||(C=[0,0,0,1]),!a(c,y)||(n(b,c),b[3]=0,b[7]=0,b[11]=0,b[15]=1,Math.abs(o(b)<1e-8)))return!1;var L,P,I,R,U,B,G,N=c[3],j=c[7],V=c[11],H=c[12],ee=c[13],Q=c[14],X=c[15];if(N!==0||j!==0||V!==0){if(d[0]=N,d[1]=j,d[2]=V,d[3]=X,!i(b,b))return!1;u(b,b),L=A,I=b,R=(P=d)[0],U=P[1],B=P[2],G=P[3],L[0]=I[0]*R+I[4]*U+I[8]*B+I[12]*G,L[1]=I[1]*R+I[5]*U+I[9]*B+I[13]*G,L[2]=I[2]*R+I[6]*U+I[10]*B+I[14]*G,L[3]=I[3]*R+I[7]*U+I[11]*B+I[15]*G}else A[0]=A[1]=A[2]=0,A[3]=1;if(k[0]=H,k[1]=ee,k[2]=Q,function(K,te){K[0][0]=te[0],K[0][1]=te[1],K[0][2]=te[2],K[1][0]=te[4],K[1][1]=te[5],K[1][2]=te[6],K[2][0]=te[8],K[2][1]=te[9],K[2][2]=te[10]}(v,c),h[0]=p.length(v[0]),p.normalize(v[0],v[0]),M[0]=p.dot(v[0],v[1]),g(v[1],v[1],v[0],1,-M[0]),h[1]=p.length(v[1]),p.normalize(v[1],v[1]),M[0]/=h[1],M[1]=p.dot(v[0],v[2]),g(v[2],v[2],v[0],1,-M[1]),M[2]=p.dot(v[1],v[2]),g(v[2],v[2],v[1],1,-M[2]),h[2]=p.length(v[2]),p.normalize(v[2],v[2]),M[1]/=h[2],M[2]/=h[2],p.cross(x,v[1],v[2]),p.dot(v[0],x)<0)for(var Y=0;Y<3;Y++)h[Y]*=-1,v[Y][0]*=-1,v[Y][1]*=-1,v[Y][2]*=-1;return C[0]=.5*Math.sqrt(Math.max(1+v[0][0]-v[1][1]-v[2][2],0)),C[1]=.5*Math.sqrt(Math.max(1-v[0][0]+v[1][1]-v[2][2],0)),C[2]=.5*Math.sqrt(Math.max(1-v[0][0]-v[1][1]+v[2][2],0)),C[3]=.5*Math.sqrt(Math.max(1+v[0][0]+v[1][1]+v[2][2],0)),v[2][1]>v[1][2]&&(C[0]=-C[0]),v[0][2]>v[2][0]&&(C[1]=-C[1]),v[1][0]>v[0][1]&&(C[2]=-C[2]),!0}},4690:function(f){f.exports=function(l,t){var a=t[15];if(a===0)return!1;for(var r=1/a,n=0;n<16;n++)l[n]=t[n]*r;return!0}},7649:function(f,l,t){var a=t(1868),r=t(1102),n=t(7191),o=t(7787),i=t(1116),u=b(),p=b(),c=b();function b(){return{translate:d(),scale:d(1),skew:d(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function d(v){return[v||0,v||0,v||0]}f.exports=function(v,x,g,y){if(o(x)===0||o(g)===0)return!1;var k=n(x,u.translate,u.scale,u.skew,u.perspective,u.quaternion),h=n(g,p.translate,p.scale,p.skew,p.perspective,p.quaternion);return!(!k||!h||(a(c.translate,u.translate,p.translate,y),a(c.skew,u.skew,p.skew,y),a(c.scale,u.scale,p.scale,y),a(c.perspective,u.perspective,p.perspective,y),i(c.quaternion,u.quaternion,p.quaternion,y),r(v,c.translate,c.scale,c.skew,c.perspective,c.quaternion),0))}},1102:function(f,l,t){var a={identity:t(9947),translate:t(998),multiply:t(104),create:t(9823),scale:t(3668),fromRotationTranslation:t(7280)},r=(a.create(),a.create());f.exports=function(n,o,i,u,p,c){return a.identity(n),a.fromRotationTranslation(n,c,o),n[3]=p[0],n[7]=p[1],n[11]=p[2],n[15]=p[3],a.identity(r),u[2]!==0&&(r[9]=u[2],a.multiply(n,n,r)),u[1]!==0&&(r[9]=0,r[8]=u[1],a.multiply(n,n,r)),u[0]!==0&&(r[8]=0,r[4]=u[0],a.multiply(n,n,r)),a.scale(n,n,i),n}},9298:function(f,l,t){var a=t(5070),r=t(7649),n=t(7437),o=t(6109),i=t(7115),u=t(5240),p=t(3012),c=t(998),b=(t(3668),t(899)),d=[0,0,0];function v(y){this._components=y.slice(),this._time=[0],this.prevMatrix=y.slice(),this.nextMatrix=y.slice(),this.computedMatrix=y.slice(),this.computedInverse=y.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]}f.exports=function(y){return new v((y=y||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var x=v.prototype;x.recalcMatrix=function(y){var k=this._time,h=a.le(k,y),M=this.computedMatrix;if(!(h<0)){var A=this._components;if(h===k.length-1)for(var C=16*h,L=0;L<16;++L)M[L]=A[C++];else{var P=k[h+1]-k[h],I=(C=16*h,this.prevMatrix),R=!0;for(L=0;L<16;++L)I[L]=A[C++];var U=this.nextMatrix;for(L=0;L<16;++L)U[L]=A[C++],R=R&&I[L]===U[L];if(P<1e-6||R)for(L=0;L<16;++L)M[L]=I[L];else r(M,I,U,(y-k[h])/P)}var B=this.computedUp;B[0]=M[1],B[1]=M[5],B[2]=M[9],b(B,B);var G=this.computedInverse;n(G,M);var N=this.computedEye,j=G[15];N[0]=G[12]/j,N[1]=G[13]/j,N[2]=G[14]/j;var V=this.computedCenter,H=Math.exp(this.computedRadius[0]);for(L=0;L<3;++L)V[L]=N[L]-M[2+4*L]*H}},x.idle=function(y){if(!(y1&&a(r[p[v-2]],r[p[v-1]],d)<=0;)v-=1,p.pop();for(p.push(b),v=c.length;v>1&&a(r[c[v-2]],r[c[v-1]],d)>=0;)v-=1,c.pop();c.push(b)}o=new Array(c.length+p.length-2);for(var x=0,g=(i=0,p.length);i0;--y)o[x++]=c[y];return o};var a=t(417)[3]},6145:function(f,l,t){f.exports=function(r,n){n||(n=r,r=window);var o=0,i=0,u=0,p={shift:!1,alt:!1,control:!1,meta:!1},c=!1;function b(C){var L=!1;return"altKey"in C&&(L=L||C.altKey!==p.alt,p.alt=!!C.altKey),"shiftKey"in C&&(L=L||C.shiftKey!==p.shift,p.shift=!!C.shiftKey),"ctrlKey"in C&&(L=L||C.ctrlKey!==p.control,p.control=!!C.ctrlKey),"metaKey"in C&&(L=L||C.metaKey!==p.meta,p.meta=!!C.metaKey),L}function d(C,L){var P=a.x(L),I=a.y(L);"buttons"in L&&(C=0|L.buttons),(C!==o||P!==i||I!==u||b(L))&&(o=0|C,i=P||0,u=I||0,n&&n(o,i,u,p))}function v(C){d(0,C)}function x(){(o||i||u||p.shift||p.alt||p.meta||p.control)&&(i=u=0,o=0,p.shift=p.alt=p.control=p.meta=!1,n&&n(0,0,0,p))}function g(C){b(C)&&n&&n(o,i,u,p)}function y(C){a.buttons(C)===0?d(0,C):d(o,C)}function k(C){d(o|a.buttons(C),C)}function h(C){d(o&~a.buttons(C),C)}function M(){c||(c=!0,r.addEventListener("mousemove",y),r.addEventListener("mousedown",k),r.addEventListener("mouseup",h),r.addEventListener("mouseleave",v),r.addEventListener("mouseenter",v),r.addEventListener("mouseout",v),r.addEventListener("mouseover",v),r.addEventListener("blur",x),r.addEventListener("keyup",g),r.addEventListener("keydown",g),r.addEventListener("keypress",g),r!==window&&(window.addEventListener("blur",x),window.addEventListener("keyup",g),window.addEventListener("keydown",g),window.addEventListener("keypress",g)))}M();var A={element:r};return Object.defineProperties(A,{enabled:{get:function(){return c},set:function(C){C?M():c&&(c=!1,r.removeEventListener("mousemove",y),r.removeEventListener("mousedown",k),r.removeEventListener("mouseup",h),r.removeEventListener("mouseleave",v),r.removeEventListener("mouseenter",v),r.removeEventListener("mouseout",v),r.removeEventListener("mouseover",v),r.removeEventListener("blur",x),r.removeEventListener("keyup",g),r.removeEventListener("keydown",g),r.removeEventListener("keypress",g),r!==window&&(window.removeEventListener("blur",x),window.removeEventListener("keyup",g),window.removeEventListener("keydown",g),window.removeEventListener("keypress",g)))},enumerable:!0},buttons:{get:function(){return o},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return u},enumerable:!0},mods:{get:function(){return p},enumerable:!0}}),A};var a=t(4110)},2565:function(f){var l={left:0,top:0};f.exports=function(t,a,r){a=a||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var n,o=t.clientX||0,i=t.clientY||0,u=(n=a)===window||n===document||n===document.body?l:n.getBoundingClientRect();return r[0]=o-u.left,r[1]=i-u.top,r}},4110:function(f,l){function t(a){return a.target||a.srcElement||window}l.buttons=function(a){if(typeof a=="object"){if("buttons"in a)return a.buttons;if("which"in a){if((r=a.which)===2)return 4;if(r===3)return 2;if(r>0)return 1<=0)return 1< 0"),typeof n.vertex!="function"&&o("Must specify vertex creation function"),typeof n.cell!="function"&&o("Must specify cell creation function"),typeof n.phase!="function"&&o("Must specify phase function");for(var p=n.getters||[],c=new Array(u),b=0;b=0?c[b]=!0:c[b]=!1;return function(d,v,x,g,y,k){var h=[k,y].join(",");return(0,r[h])(d,v,x,a.mallocUint32,a.freeUint32)}(n.vertex,n.cell,n.phase,0,i,c)};var r={"false,0,1":function(n,o,i,u,p){return function(c,b,d,v){var x,g=0|c.shape[0],y=0|c.shape[1],k=c.data,h=0|c.offset,M=0|c.stride[0],A=0|c.stride[1],C=h,L=0|-M,P=0,I=0|-A,R=0,U=-M-A|0,B=0,G=0|M,N=A-M*g|0,j=0,V=0,H=0,ee=2*g|0,Q=u(ee),X=u(ee),Y=0,K=0,te=-1,re=-1,oe=0,se=0|-g,ce=0|g,xe=0,pe=-g-1|0,de=g-1|0,he=0,ye=0,ze=0;for(j=0;j0){if(V=1,Q[Y++]=i(k[C],b,d,v),C+=G,g>0)for(j=1,x=k[C],K=Q[Y]=i(x,b,d,v),oe=Q[Y+te],xe=Q[Y+se],he=Q[Y+pe],K===oe&&K===xe&&K===he||(P=k[C+L],R=k[C+I],B=k[C+U],n(j,V,x,P,R,B,K,oe,xe,he,b,d,v),ye=X[Y]=H++),Y+=1,C+=G,j=2;j0)for(j=1,x=k[C],K=Q[Y]=i(x,b,d,v),oe=Q[Y+te],xe=Q[Y+se],he=Q[Y+pe],K===oe&&K===xe&&K===he||(P=k[C+L],R=k[C+I],B=k[C+U],n(j,V,x,P,R,B,K,oe,xe,he,b,d,v),ye=X[Y]=H++,he!==xe&&o(X[Y+se],ye,R,B,xe,he,b,d,v)),Y+=1,C+=G,j=2;j0){if(j=1,Q[Y++]=i(k[C],b,d,v),C+=G,y>0)for(V=1,x=k[C],K=Q[Y]=i(x,b,d,v),xe=Q[Y+se],oe=Q[Y+te],he=Q[Y+pe],K===xe&&K===oe&&K===he||(P=k[C+L],R=k[C+I],B=k[C+U],n(j,V,x,P,R,B,K,xe,oe,he,b,d,v),ye=X[Y]=H++),Y+=1,C+=G,V=2;V0)for(V=1,x=k[C],K=Q[Y]=i(x,b,d,v),xe=Q[Y+se],oe=Q[Y+te],he=Q[Y+pe],K===xe&&K===oe&&K===he||(P=k[C+L],R=k[C+I],B=k[C+U],n(j,V,x,P,R,B,K,xe,oe,he,b,d,v),ye=X[Y]=H++,he!==xe&&o(X[Y+se],ye,B,P,he,xe,b,d,v)),Y+=1,C+=G,V=2;V2&&C[1]>2&&h(A.pick(-1,-1).lo(1,1).hi(C[0]-2,C[1]-2),M.pick(-1,-1,0).lo(1,1).hi(C[0]-2,C[1]-2),M.pick(-1,-1,1).lo(1,1).hi(C[0]-2,C[1]-2)),C[1]>2&&(k(A.pick(0,-1).lo(1).hi(C[1]-2),M.pick(0,-1,1).lo(1).hi(C[1]-2)),y(M.pick(0,-1,0).lo(1).hi(C[1]-2))),C[1]>2&&(k(A.pick(C[0]-1,-1).lo(1).hi(C[1]-2),M.pick(C[0]-1,-1,1).lo(1).hi(C[1]-2)),y(M.pick(C[0]-1,-1,0).lo(1).hi(C[1]-2))),C[0]>2&&(k(A.pick(-1,0).lo(1).hi(C[0]-2),M.pick(-1,0,0).lo(1).hi(C[0]-2)),y(M.pick(-1,0,1).lo(1).hi(C[0]-2))),C[0]>2&&(k(A.pick(-1,C[1]-1).lo(1).hi(C[0]-2),M.pick(-1,C[1]-1,0).lo(1).hi(C[0]-2)),y(M.pick(-1,C[1]-1,1).lo(1).hi(C[0]-2))),M.set(0,0,0,0),M.set(0,0,1,0),M.set(C[0]-1,0,0,0),M.set(C[0]-1,0,1,0),M.set(0,C[1]-1,0,0),M.set(0,C[1]-1,1,0),M.set(C[0]-1,C[1]-1,0,0),M.set(C[0]-1,C[1]-1,1,0),M}}f.exports=function(g,y,k){return Array.isArray(k)||(k=a(y.dimension,typeof k=="string"?k:"clamp")),y.size===0?g:y.dimension===0?(g.set(0),g):function(h){var M=h.join();if(P=c[M])return P;for(var A=h.length,C=[b,d],L=1;L<=A;++L)C.push(v(L));var P=x.apply(void 0,C);return c[M]=P,P}(k)(g,y)}},3581:function(f){function l(n,o){var i=Math.floor(o),u=o-i,p=0<=i&&i0;){U<64?(g=U,U=0):(g=64,U-=64);for(var B=0|i[1];B>0;){B<64?(y=B,B=0):(y=64,B-=64),c=I+U*h+B*M,v=R+U*C+B*L;var G=0,N=0,j=0,V=A,H=h-k*A,ee=M-g*h,Q=P,X=C-k*P,Y=L-g*C;for(j=0;j0;){L<64?(g=L,L=0):(g=64,L-=64);for(var P=0|i[0];P>0;){P<64?(x=P,P=0):(x=64,P-=64),c=A+L*k+P*y,v=C+L*M+P*h;var I=0,R=0,U=k,B=y-g*k,G=M,N=h-g*M;for(R=0;R0;){R<64?(y=R,R=0):(y=64,R-=64);for(var U=0|i[0];U>0;){U<64?(x=U,U=0):(x=64,U-=64);for(var B=0|i[1];B>0;){B<64?(g=B,B=0):(g=64,B-=64),c=P+R*M+U*k+B*h,v=I+R*L+U*A+B*C;var G=0,N=0,j=0,V=M,H=k-y*M,ee=h-x*k,Q=L,X=A-y*L,Y=C-x*A;for(j=0;jc;){R=0,U=P-x;t:for(I=0;IG)break t;U+=M,R+=A}for(R=P,U=P-x,I=0;I>1,Ce=Me-ze,ne=Me+ze,ue=Te,me=Ce,we=Me,Ee=ne,Ue=Ae,De=d+1,je=v-1,ge=!0,be=0,Se=0,Ne=0,Ye=M,Ze=p(Ye),st=p(Ye);ee=y*ue,Q=y*me,ye=g;e:for(H=0;H0){I=ue,ue=me,me=I;break e}if(Ne<0)break e;ye+=C}ee=y*Ee,Q=y*Ue,ye=g;e:for(H=0;H0){I=Ee,Ee=Ue,Ue=I;break e}if(Ne<0)break e;ye+=C}ee=y*ue,Q=y*we,ye=g;e:for(H=0;H0){I=ue,ue=we,we=I;break e}if(Ne<0)break e;ye+=C}ee=y*me,Q=y*we,ye=g;e:for(H=0;H0){I=me,me=we,we=I;break e}if(Ne<0)break e;ye+=C}ee=y*ue,Q=y*Ee,ye=g;e:for(H=0;H0){I=ue,ue=Ee,Ee=I;break e}if(Ne<0)break e;ye+=C}ee=y*we,Q=y*Ee,ye=g;e:for(H=0;H0){I=we,we=Ee,Ee=I;break e}if(Ne<0)break e;ye+=C}ee=y*me,Q=y*Ue,ye=g;e:for(H=0;H0){I=me,me=Ue,Ue=I;break e}if(Ne<0)break e;ye+=C}ee=y*me,Q=y*we,ye=g;e:for(H=0;H0){I=me,me=we,we=I;break e}if(Ne<0)break e;ye+=C}ee=y*Ee,Q=y*Ue,ye=g;e:for(H=0;H0){I=Ee,Ee=Ue,Ue=I;break e}if(Ne<0)break e;ye+=C}for(ee=y*ue,Q=y*me,X=y*we,Y=y*Ee,K=y*Ue,te=y*Te,re=y*Me,oe=y*Ae,he=0,ye=g,H=0;H0)){if(Ne<0){for(ee=y*G,Q=y*De,X=y*je,ye=g,H=0;H0)for(;;){for(N=g+je*y,he=0,H=0;H0)){for(N=g+je*y,he=0,H=0;HAe){e:for(;;){for(N=g+De*y,he=0,ye=g,H=0;H1&&k?M(y,k[0],k[1]):M(y)}(u,p,d);return b(d,v)}},8729:function(f,l,t){var a=t(8139),r={};f.exports=function(n){var o=n.order,i=n.dtype,u=[o,i].join(":"),p=r[u];return p||(r[u]=p=a(o,i)),p(n),n}},5050:function(f,l,t){var a=t(4780),r=typeof Float64Array<"u";function n(c,b){return c[0]-b[0]}function o(){var c,b=this.stride,d=new Array(b.length);for(c=0;c=0&&(y+=M*(k=0|g),h-=k),new v(this.data,h,M,y)},x.step=function(g){var y=this.shape[0],k=this.stride[0],h=this.offset,M=0,A=Math.ceil;return typeof g=="number"&&((M=0|g)<0?(h+=k*(y-1),y=A(-y/M)):y=A(y/M),k*=M),new v(this.data,y,k,h)},x.transpose=function(g){g=g===void 0?0:0|g;var y=this.shape,k=this.stride;return new v(this.data,y[g],k[g],this.offset)},x.pick=function(g){var y=[],k=[],h=this.offset;return typeof g=="number"&&g>=0?h=h+this.stride[0]*g|0:(y.push(this.shape[0]),k.push(this.stride[0])),(0,b[y.length+1])(this.data,y,k,h)},function(g,y,k,h){return new v(g,y[0],k[0],h)}},2:function(c,b,d){function v(g,y,k,h,M,A){this.data=g,this.shape=[y,k],this.stride=[h,M],this.offset=0|A}var x=v.prototype;return x.dtype=c,x.dimension=2,Object.defineProperty(x,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(x,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),x.set=function(g,y,k){return c==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*y,k):this.data[this.offset+this.stride[0]*g+this.stride[1]*y]=k},x.get=function(g,y){return c==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*y):this.data[this.offset+this.stride[0]*g+this.stride[1]*y]},x.index=function(g,y){return this.offset+this.stride[0]*g+this.stride[1]*y},x.hi=function(g,y){return new v(this.data,typeof g!="number"||g<0?this.shape[0]:0|g,typeof y!="number"||y<0?this.shape[1]:0|y,this.stride[0],this.stride[1],this.offset)},x.lo=function(g,y){var k=this.offset,h=0,M=this.shape[0],A=this.shape[1],C=this.stride[0],L=this.stride[1];return typeof g=="number"&&g>=0&&(k+=C*(h=0|g),M-=h),typeof y=="number"&&y>=0&&(k+=L*(h=0|y),A-=h),new v(this.data,M,A,C,L,k)},x.step=function(g,y){var k=this.shape[0],h=this.shape[1],M=this.stride[0],A=this.stride[1],C=this.offset,L=0,P=Math.ceil;return typeof g=="number"&&((L=0|g)<0?(C+=M*(k-1),k=P(-k/L)):k=P(k/L),M*=L),typeof y=="number"&&((L=0|y)<0?(C+=A*(h-1),h=P(-h/L)):h=P(h/L),A*=L),new v(this.data,k,h,M,A,C)},x.transpose=function(g,y){g=g===void 0?0:0|g,y=y===void 0?1:0|y;var k=this.shape,h=this.stride;return new v(this.data,k[g],k[y],h[g],h[y],this.offset)},x.pick=function(g,y){var k=[],h=[],M=this.offset;return typeof g=="number"&&g>=0?M=M+this.stride[0]*g|0:(k.push(this.shape[0]),h.push(this.stride[0])),typeof y=="number"&&y>=0?M=M+this.stride[1]*y|0:(k.push(this.shape[1]),h.push(this.stride[1])),(0,b[k.length+1])(this.data,k,h,M)},function(g,y,k,h){return new v(g,y[0],y[1],k[0],k[1],h)}},3:function(c,b,d){function v(g,y,k,h,M,A,C,L){this.data=g,this.shape=[y,k,h],this.stride=[M,A,C],this.offset=0|L}var x=v.prototype;return x.dtype=c,x.dimension=3,Object.defineProperty(x,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(x,"order",{get:function(){var g=Math.abs(this.stride[0]),y=Math.abs(this.stride[1]),k=Math.abs(this.stride[2]);return g>y?y>k?[2,1,0]:g>k?[1,2,0]:[1,0,2]:g>k?[2,0,1]:k>y?[0,1,2]:[0,2,1]}}),x.set=function(g,y,k,h){return c==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k,h):this.data[this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k]=h},x.get=function(g,y,k){return c==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k):this.data[this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k]},x.index=function(g,y,k){return this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k},x.hi=function(g,y,k){return new v(this.data,typeof g!="number"||g<0?this.shape[0]:0|g,typeof y!="number"||y<0?this.shape[1]:0|y,typeof k!="number"||k<0?this.shape[2]:0|k,this.stride[0],this.stride[1],this.stride[2],this.offset)},x.lo=function(g,y,k){var h=this.offset,M=0,A=this.shape[0],C=this.shape[1],L=this.shape[2],P=this.stride[0],I=this.stride[1],R=this.stride[2];return typeof g=="number"&&g>=0&&(h+=P*(M=0|g),A-=M),typeof y=="number"&&y>=0&&(h+=I*(M=0|y),C-=M),typeof k=="number"&&k>=0&&(h+=R*(M=0|k),L-=M),new v(this.data,A,C,L,P,I,R,h)},x.step=function(g,y,k){var h=this.shape[0],M=this.shape[1],A=this.shape[2],C=this.stride[0],L=this.stride[1],P=this.stride[2],I=this.offset,R=0,U=Math.ceil;return typeof g=="number"&&((R=0|g)<0?(I+=C*(h-1),h=U(-h/R)):h=U(h/R),C*=R),typeof y=="number"&&((R=0|y)<0?(I+=L*(M-1),M=U(-M/R)):M=U(M/R),L*=R),typeof k=="number"&&((R=0|k)<0?(I+=P*(A-1),A=U(-A/R)):A=U(A/R),P*=R),new v(this.data,h,M,A,C,L,P,I)},x.transpose=function(g,y,k){g=g===void 0?0:0|g,y=y===void 0?1:0|y,k=k===void 0?2:0|k;var h=this.shape,M=this.stride;return new v(this.data,h[g],h[y],h[k],M[g],M[y],M[k],this.offset)},x.pick=function(g,y,k){var h=[],M=[],A=this.offset;return typeof g=="number"&&g>=0?A=A+this.stride[0]*g|0:(h.push(this.shape[0]),M.push(this.stride[0])),typeof y=="number"&&y>=0?A=A+this.stride[1]*y|0:(h.push(this.shape[1]),M.push(this.stride[1])),typeof k=="number"&&k>=0?A=A+this.stride[2]*k|0:(h.push(this.shape[2]),M.push(this.stride[2])),(0,b[h.length+1])(this.data,h,M,A)},function(g,y,k,h){return new v(g,y[0],y[1],y[2],k[0],k[1],k[2],h)}},4:function(c,b,d){function v(g,y,k,h,M,A,C,L,P,I){this.data=g,this.shape=[y,k,h,M],this.stride=[A,C,L,P],this.offset=0|I}var x=v.prototype;return x.dtype=c,x.dimension=4,Object.defineProperty(x,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(x,"order",{get:d}),x.set=function(g,y,k,h,M){return c==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k+this.stride[3]*h,M):this.data[this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k+this.stride[3]*h]=M},x.get=function(g,y,k,h){return c==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k+this.stride[3]*h):this.data[this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k+this.stride[3]*h]},x.index=function(g,y,k,h){return this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k+this.stride[3]*h},x.hi=function(g,y,k,h){return new v(this.data,typeof g!="number"||g<0?this.shape[0]:0|g,typeof y!="number"||y<0?this.shape[1]:0|y,typeof k!="number"||k<0?this.shape[2]:0|k,typeof h!="number"||h<0?this.shape[3]:0|h,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},x.lo=function(g,y,k,h){var M=this.offset,A=0,C=this.shape[0],L=this.shape[1],P=this.shape[2],I=this.shape[3],R=this.stride[0],U=this.stride[1],B=this.stride[2],G=this.stride[3];return typeof g=="number"&&g>=0&&(M+=R*(A=0|g),C-=A),typeof y=="number"&&y>=0&&(M+=U*(A=0|y),L-=A),typeof k=="number"&&k>=0&&(M+=B*(A=0|k),P-=A),typeof h=="number"&&h>=0&&(M+=G*(A=0|h),I-=A),new v(this.data,C,L,P,I,R,U,B,G,M)},x.step=function(g,y,k,h){var M=this.shape[0],A=this.shape[1],C=this.shape[2],L=this.shape[3],P=this.stride[0],I=this.stride[1],R=this.stride[2],U=this.stride[3],B=this.offset,G=0,N=Math.ceil;return typeof g=="number"&&((G=0|g)<0?(B+=P*(M-1),M=N(-M/G)):M=N(M/G),P*=G),typeof y=="number"&&((G=0|y)<0?(B+=I*(A-1),A=N(-A/G)):A=N(A/G),I*=G),typeof k=="number"&&((G=0|k)<0?(B+=R*(C-1),C=N(-C/G)):C=N(C/G),R*=G),typeof h=="number"&&((G=0|h)<0?(B+=U*(L-1),L=N(-L/G)):L=N(L/G),U*=G),new v(this.data,M,A,C,L,P,I,R,U,B)},x.transpose=function(g,y,k,h){g=g===void 0?0:0|g,y=y===void 0?1:0|y,k=k===void 0?2:0|k,h=h===void 0?3:0|h;var M=this.shape,A=this.stride;return new v(this.data,M[g],M[y],M[k],M[h],A[g],A[y],A[k],A[h],this.offset)},x.pick=function(g,y,k,h){var M=[],A=[],C=this.offset;return typeof g=="number"&&g>=0?C=C+this.stride[0]*g|0:(M.push(this.shape[0]),A.push(this.stride[0])),typeof y=="number"&&y>=0?C=C+this.stride[1]*y|0:(M.push(this.shape[1]),A.push(this.stride[1])),typeof k=="number"&&k>=0?C=C+this.stride[2]*k|0:(M.push(this.shape[2]),A.push(this.stride[2])),typeof h=="number"&&h>=0?C=C+this.stride[3]*h|0:(M.push(this.shape[3]),A.push(this.stride[3])),(0,b[M.length+1])(this.data,M,A,C)},function(g,y,k,h){return new v(g,y[0],y[1],y[2],y[3],k[0],k[1],k[2],k[3],h)}},5:function(c,b,d){function v(g,y,k,h,M,A,C,L,P,I,R,U){this.data=g,this.shape=[y,k,h,M,A],this.stride=[C,L,P,I,R],this.offset=0|U}var x=v.prototype;return x.dtype=c,x.dimension=5,Object.defineProperty(x,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(x,"order",{get:d}),x.set=function(g,y,k,h,M,A){return c==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k+this.stride[3]*h+this.stride[4]*M,A):this.data[this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k+this.stride[3]*h+this.stride[4]*M]=A},x.get=function(g,y,k,h,M){return c==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k+this.stride[3]*h+this.stride[4]*M):this.data[this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k+this.stride[3]*h+this.stride[4]*M]},x.index=function(g,y,k,h,M){return this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k+this.stride[3]*h+this.stride[4]*M},x.hi=function(g,y,k,h,M){return new v(this.data,typeof g!="number"||g<0?this.shape[0]:0|g,typeof y!="number"||y<0?this.shape[1]:0|y,typeof k!="number"||k<0?this.shape[2]:0|k,typeof h!="number"||h<0?this.shape[3]:0|h,typeof M!="number"||M<0?this.shape[4]:0|M,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},x.lo=function(g,y,k,h,M){var A=this.offset,C=0,L=this.shape[0],P=this.shape[1],I=this.shape[2],R=this.shape[3],U=this.shape[4],B=this.stride[0],G=this.stride[1],N=this.stride[2],j=this.stride[3],V=this.stride[4];return typeof g=="number"&&g>=0&&(A+=B*(C=0|g),L-=C),typeof y=="number"&&y>=0&&(A+=G*(C=0|y),P-=C),typeof k=="number"&&k>=0&&(A+=N*(C=0|k),I-=C),typeof h=="number"&&h>=0&&(A+=j*(C=0|h),R-=C),typeof M=="number"&&M>=0&&(A+=V*(C=0|M),U-=C),new v(this.data,L,P,I,R,U,B,G,N,j,V,A)},x.step=function(g,y,k,h,M){var A=this.shape[0],C=this.shape[1],L=this.shape[2],P=this.shape[3],I=this.shape[4],R=this.stride[0],U=this.stride[1],B=this.stride[2],G=this.stride[3],N=this.stride[4],j=this.offset,V=0,H=Math.ceil;return typeof g=="number"&&((V=0|g)<0?(j+=R*(A-1),A=H(-A/V)):A=H(A/V),R*=V),typeof y=="number"&&((V=0|y)<0?(j+=U*(C-1),C=H(-C/V)):C=H(C/V),U*=V),typeof k=="number"&&((V=0|k)<0?(j+=B*(L-1),L=H(-L/V)):L=H(L/V),B*=V),typeof h=="number"&&((V=0|h)<0?(j+=G*(P-1),P=H(-P/V)):P=H(P/V),G*=V),typeof M=="number"&&((V=0|M)<0?(j+=N*(I-1),I=H(-I/V)):I=H(I/V),N*=V),new v(this.data,A,C,L,P,I,R,U,B,G,N,j)},x.transpose=function(g,y,k,h,M){g=g===void 0?0:0|g,y=y===void 0?1:0|y,k=k===void 0?2:0|k,h=h===void 0?3:0|h,M=M===void 0?4:0|M;var A=this.shape,C=this.stride;return new v(this.data,A[g],A[y],A[k],A[h],A[M],C[g],C[y],C[k],C[h],C[M],this.offset)},x.pick=function(g,y,k,h,M){var A=[],C=[],L=this.offset;return typeof g=="number"&&g>=0?L=L+this.stride[0]*g|0:(A.push(this.shape[0]),C.push(this.stride[0])),typeof y=="number"&&y>=0?L=L+this.stride[1]*y|0:(A.push(this.shape[1]),C.push(this.stride[1])),typeof k=="number"&&k>=0?L=L+this.stride[2]*k|0:(A.push(this.shape[2]),C.push(this.stride[2])),typeof h=="number"&&h>=0?L=L+this.stride[3]*h|0:(A.push(this.shape[3]),C.push(this.stride[3])),typeof M=="number"&&M>=0?L=L+this.stride[4]*M|0:(A.push(this.shape[4]),C.push(this.stride[4])),(0,b[A.length+1])(this.data,A,C,L)},function(g,y,k,h){return new v(g,y[0],y[1],y[2],y[3],y[4],k[0],k[1],k[2],k[3],k[4],h)}}};function u(c,b){var d=b===-1?"T":String(b),v=i[d];return b===-1?v(c):b===0?v(c,p[c][0]):v(c,p[c],o)}var p={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};f.exports=function(c,b,d,v){if(c===void 0)return(0,p.array[0])([]);typeof c=="number"&&(c=[c]),b===void 0&&(b=[c.length]);var x=b.length;if(d===void 0){d=new Array(x);for(var g=x-1,y=1;g>=0;--g)d[g]=y,y*=b[g]}if(v===void 0)for(v=0,g=0;g>>0;f.exports=function(o,i){if(isNaN(o)||isNaN(i))return NaN;if(o===i)return o;if(o===0)return i<0?-r:r;var u=a.hi(o),p=a.lo(o);return i>o==o>0?p===n?(u+=1,p=0):p+=1:p===0?(p=n,u-=1):p-=1,a.pack(p,u)}},115:function(f,l){l.vertexNormals=function(t,a,r){for(var n=a.length,o=new Array(n),i=r===void 0?1e-6:r,u=0;ui){var L=o[b],P=1/Math.sqrt(h*A);for(C=0;C<3;++C){var I=(C+1)%3,R=(C+2)%3;L[C]+=P*(M[I]*k[R]-M[R]*k[I])}}}for(u=0;ui)for(P=1/Math.sqrt(U),C=0;C<3;++C)L[C]*=P;else for(C=0;C<3;++C)L[C]=0}return o},l.faceNormals=function(t,a,r){for(var n=t.length,o=new Array(n),i=r===void 0?1e-6:r,u=0;ui?1/Math.sqrt(g):0,b=0;b<3;++b)x[b]*=g;o[u]=x}return o}},567:function(f){f.exports=function(l,t,a,r,n,o,i,u,p,c){var b=t+o+c;if(d>0){var d=Math.sqrt(b+1);l[0]=.5*(i-p)/d,l[1]=.5*(u-r)/d,l[2]=.5*(a-o)/d,l[3]=.5*d}else{var v=Math.max(t,o,c);d=Math.sqrt(2*v-b+1),t>=v?(l[0]=.5*d,l[1]=.5*(n+a)/d,l[2]=.5*(u+r)/d,l[3]=.5*(i-p)/d):o>=v?(l[0]=.5*(a+n)/d,l[1]=.5*d,l[2]=.5*(p+i)/d,l[3]=.5*(u-r)/d):(l[0]=.5*(r+u)/d,l[1]=.5*(i+p)/d,l[2]=.5*d,l[3]=.5*(a-n)/d)}return l}},7774:function(f,l,t){f.exports=function(v){var x=(v=v||{}).center||[0,0,0],g=v.rotation||[0,0,0,1],y=v.radius||1;x=[].slice.call(x,0,3),c(g=[].slice.call(g,0,4),g);var k=new b(g,x,Math.log(y));return k.setDistanceLimits(v.zoomMin,v.zoomMax),("eye"in v||"up"in v)&&k.lookAt(0,v.eye,v.center,v.up),k};var a=t(8444),r=t(3012),n=t(5950),o=t(7437),i=t(567);function u(v,x,g){return Math.sqrt(Math.pow(v,2)+Math.pow(x,2)+Math.pow(g,2))}function p(v,x,g,y){return Math.sqrt(Math.pow(v,2)+Math.pow(x,2)+Math.pow(g,2)+Math.pow(y,2))}function c(v,x){var g=x[0],y=x[1],k=x[2],h=x[3],M=p(g,y,k,h);M>1e-6?(v[0]=g/M,v[1]=y/M,v[2]=k/M,v[3]=h/M):(v[0]=v[1]=v[2]=0,v[3]=1)}function b(v,x,g){this.radius=a([g]),this.center=a(x),this.rotation=a(v),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 d=b.prototype;d.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},d.recalcMatrix=function(v){this.radius.curve(v),this.center.curve(v),this.rotation.curve(v);var x=this.computedRotation;c(x,x);var g=this.computedMatrix;n(g,x);var y=this.computedCenter,k=this.computedEye,h=this.computedUp,M=Math.exp(this.computedRadius[0]);k[0]=y[0]+M*g[2],k[1]=y[1]+M*g[6],k[2]=y[2]+M*g[10],h[0]=g[1],h[1]=g[5],h[2]=g[9];for(var A=0;A<3;++A){for(var C=0,L=0;L<3;++L)C+=g[A+4*L]*k[L];g[12+A]=-C}},d.getMatrix=function(v,x){this.recalcMatrix(v);var g=this.computedMatrix;if(x){for(var y=0;y<16;++y)x[y]=g[y];return x}return g},d.idle=function(v){this.center.idle(v),this.radius.idle(v),this.rotation.idle(v)},d.flush=function(v){this.center.flush(v),this.radius.flush(v),this.rotation.flush(v)},d.pan=function(v,x,g,y){x=x||0,g=g||0,y=y||0,this.recalcMatrix(v);var k=this.computedMatrix,h=k[1],M=k[5],A=k[9],C=u(h,M,A);h/=C,M/=C,A/=C;var L=k[0],P=k[4],I=k[8],R=L*h+P*M+I*A,U=u(L-=h*R,P-=M*R,I-=A*R);L/=U,P/=U,I/=U,k[2],k[6],k[10];var B=L*x+h*g,G=P*x+M*g,N=I*x+A*g;this.center.move(v,B,G,N);var j=Math.exp(this.computedRadius[0]);j=Math.max(1e-4,j+y),this.radius.set(v,Math.log(j))},d.rotate=function(v,x,g,y){this.recalcMatrix(v),x=x||0,g=g||0;var k=this.computedMatrix,h=k[0],M=k[4],A=k[8],C=k[1],L=k[5],P=k[9],I=k[2],R=k[6],U=k[10],B=x*h+g*C,G=x*M+g*L,N=x*A+g*P,j=-(R*N-U*G),V=-(U*B-I*N),H=-(I*G-R*B),ee=Math.sqrt(Math.max(0,1-Math.pow(j,2)-Math.pow(V,2)-Math.pow(H,2))),Q=p(j,V,H,ee);Q>1e-6?(j/=Q,V/=Q,H/=Q,ee/=Q):(j=V=H=0,ee=1);var X=this.computedRotation,Y=X[0],K=X[1],te=X[2],re=X[3],oe=Y*ee+re*j+K*H-te*V,se=K*ee+re*V+te*j-Y*H,ce=te*ee+re*H+Y*V-K*j,xe=re*ee-Y*j-K*V-te*H;if(y){j=I,V=R,H=U;var pe=Math.sin(y)/u(j,V,H);j*=pe,V*=pe,H*=pe,xe=xe*(ee=Math.cos(x))-(oe=oe*ee+xe*j+se*H-ce*V)*j-(se=se*ee+xe*V+ce*j-oe*H)*V-(ce=ce*ee+xe*H+oe*V-se*j)*H}var de=p(oe,se,ce,xe);de>1e-6?(oe/=de,se/=de,ce/=de,xe/=de):(oe=se=ce=0,xe=1),this.rotation.set(v,oe,se,ce,xe)},d.lookAt=function(v,x,g,y){this.recalcMatrix(v),g=g||this.computedCenter,x=x||this.computedEye,y=y||this.computedUp;var k=this.computedMatrix;r(k,x,g,y);var h=this.computedRotation;i(h,k[0],k[1],k[2],k[4],k[5],k[6],k[8],k[9],k[10]),c(h,h),this.rotation.set(v,h[0],h[1],h[2],h[3]);for(var M=0,A=0;A<3;++A)M+=Math.pow(g[A]-x[A],2);this.radius.set(v,.5*Math.log(Math.max(M,1e-6))),this.center.set(v,g[0],g[1],g[2])},d.translate=function(v,x,g,y){this.center.move(v,x||0,g||0,y||0)},d.setMatrix=function(v,x){var g=this.computedRotation;i(g,x[0],x[1],x[2],x[4],x[5],x[6],x[8],x[9],x[10]),c(g,g),this.rotation.set(v,g[0],g[1],g[2],g[3]);var y=this.computedMatrix;o(y,x);var k=y[15];if(Math.abs(k)>1e-6){var h=y[12]/k,M=y[13]/k,A=y[14]/k;this.recalcMatrix(v);var C=Math.exp(this.computedRadius[0]);this.center.set(v,h-y[2]*C,M-y[6]*C,A-y[10]*C),this.radius.idle(v)}else this.center.idle(v),this.radius.idle(v)},d.setDistance=function(v,x){x>0&&this.radius.set(v,Math.log(x))},d.setDistanceLimits=function(v,x){v=v>0?Math.log(v):-1/0,x=x>0?Math.log(x):1/0,x=Math.max(x,v),this.radius.bounds[0][0]=v,this.radius.bounds[1][0]=x},d.getDistanceLimits=function(v){var x=this.radius.bounds;return v?(v[0]=Math.exp(x[0][0]),v[1]=Math.exp(x[1][0]),v):[Math.exp(x[0][0]),Math.exp(x[1][0])]},d.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]}},d.fromJSON=function(v){var x=this.lastT(),g=v.center;g&&this.center.set(x,g[0],g[1],g[2]);var y=v.rotation;y&&this.rotation.set(x,y[0],y[1],y[2],y[3]);var k=v.distance;k&&k>0&&this.radius.set(x,Math.log(k)),this.setDistanceLimits(v.zoomMin,v.zoomMax)}},4930:function(f,l,t){var a=t(6184);f.exports=function(r,n,o){return a(o=o!==void 0?o+"":" ",n)+r}},4405:function(f){f.exports=function(l,t){t||(t=[0,""]),l=String(l);var a=parseFloat(l,10);return t[0]=a,t[1]=l.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}},4166:function(f,l,t){f.exports=function(r,n){for(var o=0|n.length,i=r.length,u=[new Array(o),new Array(o)],p=0;p0){L=u[R][A][0],I=R;break}P=L[1^I];for(var U=0;U<2;++U)for(var B=u[U][A],G=0;G0&&(L=N,P=j,I=U)}return C||L&&d(L,I),P}function x(M,A){var C=u[A][M][0],L=[M];d(C,A);for(var P=C[1^A];;){for(;P!==M;)L.push(P),P=v(L[L.length-2],P,!1);if(u[0][M].length+u[1][M].length===0)break;var I=L[L.length-1],R=M,U=L[1],B=v(I,R,!0);if(a(n[I],n[R],n[U],n[B])<0)break;L.push(M),P=v(I,R)}return L}function g(M,A){return A[1]===A[A.length-1]}for(p=0;p0;){u[0][p].length;var h=x(p,y);g(0,h)?k.push.apply(k,h):(k.length>0&&b.push(k),k=h)}k.length>0&&b.push(k)}return b};var a=t(9398)},3959:function(f,l,t){f.exports=function(r,n){for(var o=a(r,n.length),i=new Array(n.length),u=new Array(n.length),p=[],c=0;c0;){var d=p.pop();i[d]=!1;var v=o[d];for(c=0;c0})).length,M=new Array(h),A=new Array(h);for(y=0;y0;){var se=re.pop(),ce=V[se];u(ce,function(ze,Te){return ze-Te});var xe,pe=ce.length,de=oe[se];if(de===0){var he=k[se];xe=[he]}for(y=0;y=0||(oe[ye]=1^de,re.push(ye),de===0&&(te(he=k[ye])||(he.reverse(),xe.push(he))))}de===0&&v.push(xe)}return v};var a=t(8348),r=t(4166),n=t(211),o=t(9660),i=t(9662),u=t(1215),p=t(3959);function c(b,d){for(var v=new Array(b),x=0;x0&&R[B]===U[0]))return 1;G=I[B-1]}for(var N=1;G;){var j=G.key,V=a(U,j[0],j[1]);if(j[0][0]0))return 0;N=-1,G=G.right}else if(V>0)G=G.left;else{if(!(V<0))return 0;N=1,G=G.right}}return N}}(L.slabs,L.coordinates);return v.length===0?P:function(I,R){return function(U){return I(U[0],U[1])?0:R(U)}}(u(v),P)};var a=t(417)[3],r=t(4385),n=t(9014),o=t(5070);function i(){return!0}function u(c){for(var b={},d=0;d=c?(R=1,M=c+2*v+g):M=v*(R=-v/c)+g):(R=0,x>=0?(U=0,M=g):-x>=d?(U=1,M=d+2*x+g):M=x*(U=-x/d)+g);else if(U<0)U=0,v>=0?(R=0,M=g):-v>=c?(R=1,M=c+2*v+g):M=v*(R=-v/c)+g;else{var B=1/I;M=(R*=B)*(c*R+b*(U*=B)+2*v)+U*(b*R+d*U+2*x)+g}else R<0?(C=d+x)>(A=b+v)?(L=C-A)>=(P=c-2*b+d)?(R=1,U=0,M=c+2*v+g):M=(R=L/P)*(c*R+b*(U=1-R)+2*v)+U*(b*R+d*U+2*x)+g:(R=0,C<=0?(U=1,M=d+2*x+g):x>=0?(U=0,M=g):M=x*(U=-x/d)+g):U<0?(C=c+v)>(A=b+x)?(L=C-A)>=(P=c-2*b+d)?(U=1,R=0,M=d+2*x+g):M=(R=1-(U=L/P))*(c*R+b*U+2*v)+U*(b*R+d*U+2*x)+g:(U=0,C<=0?(R=1,M=c+2*v+g):v>=0?(R=0,M=g):M=v*(R=-v/c)+g):(L=d+x-b-v)<=0?(R=0,U=1,M=d+2*x+g):L>=(P=c-2*b+d)?(R=1,U=0,M=c+2*v+g):M=(R=L/P)*(c*R+b*(U=1-R)+2*v)+U*(b*R+d*U+2*x)+g;var G=1-R-U;for(p=0;p0){var d=o[u-1];if(a(c,d)===0&&n(d)!==b){u-=1;continue}}o[u++]=c}}return o.length=u,o}},6184:function(f){var l,t="";f.exports=function(a,r){if(typeof a!="string")throw new TypeError("expected a string");if(r===1)return a;if(r===2)return a+a;var n=a.length*r;if(l!==a||l===void 0)l=a,t="";else if(t.length>=n)return t.substr(0,n);for(;n>t.length&&r>1;)1&r&&(t+=a),r>>=1,a+=a;return t=(t+=a).substr(0,n)}},8161:function(f,l,t){f.exports=t.g.performance&&t.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},402:function(f){f.exports=function(l){for(var t=l.length,a=l[l.length-1],r=t,n=t-2;n>=0;--n){var o=a,i=l[n];(p=i-((a=o+i)-o))&&(l[--r]=a,a=p)}var u=0;for(n=r;n0){if(C<=0)return L;M=A+C}else{if(!(A<0)||C>=0)return L;M=-(A+C)}var P=33306690738754716e-32*M;return L>=P||L<=-P?L:b(y,k,h)},function(y,k,h,M){var A=y[0]-M[0],C=k[0]-M[0],L=h[0]-M[0],P=y[1]-M[1],I=k[1]-M[1],R=h[1]-M[1],U=y[2]-M[2],B=k[2]-M[2],G=h[2]-M[2],N=C*R,j=L*I,V=L*P,H=A*R,ee=A*I,Q=C*P,X=U*(N-j)+B*(V-H)+G*(ee-Q),Y=7771561172376103e-31*((Math.abs(N)+Math.abs(j))*Math.abs(U)+(Math.abs(V)+Math.abs(H))*Math.abs(B)+(Math.abs(ee)+Math.abs(Q))*Math.abs(G));return X>Y||-X>Y?X:d(y,k,h,M)}];function x(y){var k=v[y.length];return k||(k=v[y.length]=c(y.length)),k.apply(void 0,y)}function g(y,k,h,M,A,C,L){return function(P,I,R,U,B){switch(arguments.length){case 0:case 1:return 0;case 2:return M(P,I);case 3:return A(P,I,R);case 4:return C(P,I,R,U);case 5:return L(P,I,R,U,B)}for(var G=new Array(arguments.length),N=0;N0&&p>0||u<0&&p<0)return!1;var c=a(o,r,n),b=a(i,r,n);return!(c>0&&b>0||c<0&&b<0)&&(u!==0||p!==0||c!==0||b!==0||function(d,v,x,g){for(var y=0;y<2;++y){var k=d[y],h=v[y],M=Math.min(k,h),A=Math.max(k,h),C=x[y],L=g[y],P=Math.min(C,L);if(Math.max(C,L)=r?(n=d,(p+=1)=r?(n=d,(p+=1)>1,d=r[2*b+1];if(d===u)return b;u>1,d=r[2*b+1];if(d===u)return b;u>1,d=r[2*b+1];if(d===u)return b;u0)-(r<0)},l.abs=function(r){var n=r>>31;return(r^n)-n},l.min=function(r,n){return n^(r^n)&-(r65535)<<4,n|=o=((r>>>=n)>255)<<3,n|=o=((r>>>=o)>15)<<2,(n|=o=((r>>>=o)>3)<<1)|(r>>>=o)>>1},l.log10=function(r){return r>=1e9?9:r>=1e8?8:r>=1e7?7:r>=1e6?6:r>=1e5?5:r>=1e4?4:r>=1e3?3:r>=100?2:r>=10?1:0},l.popCount=function(r){return 16843009*((r=(858993459&(r-=r>>>1&1431655765))+(r>>>2&858993459))+(r>>>4)&252645135)>>>24},l.countTrailingZeros=t,l.nextPow2=function(r){return r+=r===0,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,1+((r|=r>>>8)|r>>>16)},l.prevPow2=function(r){return r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,(r|=r>>>16)-(r>>>1)},l.parity=function(r){return r^=r>>>16,r^=r>>>8,r^=r>>>4,27030>>>(r&=15)&1};var a=new Array(256);(function(r){for(var n=0;n<256;++n){var o=n,i=n,u=7;for(o>>>=1;o;o>>>=1)i<<=1,i|=1&o,--u;r[n]=i<>>8&255]<<16|a[r>>>16&255]<<8|a[r>>>24&255]},l.interleave2=function(r,n){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r&=65535)|r<<8))|r<<4))|r<<2))|r<<1))|(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n&=65535)|n<<8))|n<<4))|n<<2))|n<<1))<<1},l.deinterleave2=function(r,n){return(r=65535&((r=16711935&((r=252645135&((r=858993459&((r=r>>>n&1431655765)|r>>>1))|r>>>2))|r>>>4))|r>>>16))<<16>>16},l.interleave3=function(r,n,o){return r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2),(r|=(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<1)|(o=1227133513&((o=3272356035&((o=251719695&((o=4278190335&((o&=1023)|o<<16))|o<<8))|o<<4))|o<<2))<<2},l.deinterleave3=function(r,n){return(r=1023&((r=4278190335&((r=251719695&((r=3272356035&((r=r>>>n&1227133513)|r>>>2))|r>>>4))|r>>>8))|r>>>16))<<22>>22},l.nextCombination=function(r){var n=r|r-1;return n+1|(~n&-~n)-1>>>t(r)+1}},6656:function(f,l,t){var a=t(9392),r=t(9521);function n(d,v){var x=d.length,g=d.length-v.length,y=Math.min;if(g)return g;switch(x){case 0:return 0;case 1:return d[0]-v[0];case 2:return(M=d[0]+d[1]-v[0]-v[1])||y(d[0],d[1])-y(v[0],v[1]);case 3:var k=d[0]+d[1],h=v[0]+v[1];if(M=k+d[2]-(h+v[2]))return M;var M,A=y(d[0],d[1]),C=y(v[0],v[1]);return(M=y(A,d[2])-y(C,v[2]))||y(A+d[2],k)-y(C+v[2],h);default:var L=d.slice(0);L.sort();var P=v.slice(0);P.sort();for(var I=0;I>1,h=n(d[k],v);h<=0?(h===0&&(y=k),x=k+1):h>0&&(g=k-1)}return y}function c(d,v){for(var x=new Array(d.length),g=0,y=x.length;g=d.length||n(d[R],k)!==0););}return x}function b(d,v){if(v<0)return[];for(var x=[],g=(1<>>C&1&&A.push(y[C]);v.push(A)}return i(v)},l.skeleton=b,l.boundary=function(d){for(var v=[],x=0,g=d.length;x>1:(Q>>1)-1}function L(Q){for(var X=A(Q);;){var Y=X,K=2*Q+1,te=2*(Q+1),re=Q;if(K0;){var Y=C(Q);if(!(Y>=0&&X0){var Q=B[0];return M(0,N-1),N-=1,L(0),Q}return-1}function R(Q,X){var Y=B[Q];return d[Y]===X?Q:(d[Y]=-1/0,P(Q),I(),d[Y]=X,P((N+=1)-1))}function U(Q){if(!v[Q]){v[Q]=!0;var X=c[Q],Y=b[Q];c[Y]>=0&&(c[Y]=X),b[X]>=0&&(b[X]=Y),G[X]>=0&&R(G[X],h(X)),G[Y]>=0&&R(G[Y],h(Y))}}var B=[],G=new Array(u);for(x=0;x>1;x>=0;--x)L(x);for(;;){var j=I();if(j<0||d[j]>i)break;U(j)}var V=[];for(x=0;x=0&&Y>=0&&X!==Y){var K=G[X],te=G[Y];K!==te&&ee.push([K,te])}}),r.unique(r.normalize(ee)),{positions:V,edges:ee}};var a=t(417),r=t(6656)},6638:function(f,l,t){f.exports=function(n,o){var i,u,p,c;if(o[0][0]o[1][0]))return r(o,n);i=o[1],u=o[0]}if(n[0][0]n[1][0]))return-r(n,o);p=n[1],c=n[0]}var b=a(i,u,c),d=a(i,u,p);if(b<0){if(d<=0)return b}else if(b>0){if(d>=0)return b}else if(d)return d;if(b=a(c,p,u),d=a(c,p,i),b<0){if(d<=0)return b}else if(b>0){if(d>=0)return b}else if(d)return d;return u[0]-c[0]};var a=t(417);function r(n,o){var i,u,p,c;if(o[0][0]o[1][0])){var b=Math.min(n[0][1],n[1][1]),d=Math.max(n[0][1],n[1][1]),v=Math.min(o[0][1],o[1][1]),x=Math.max(o[0][1],o[1][1]);return dx?b-x:d-x}i=o[1],u=o[0]}n[0][1]0)if(v[0]!==k[1][0])x=d,d=d.right;else{if(M=p(d.right,v))return M;d=d.left}else{if(v[0]!==k[1][0])return d;var M;if(M=p(d.right,v))return M;d=d.left}}return x}function c(d,v,x,g){this.y=d,this.index=v,this.start=x,this.closed=g}function b(d,v,x,g){this.x=d,this.segment=v,this.create=x,this.index=g}i.prototype.castUp=function(d){var v=a.le(this.coordinates,d[0]);if(v<0)return-1;this.slabs[v];var x=p(this.slabs[v],d),g=-1;if(x&&(g=x.value),this.coordinates[v]===d[0]){var y=null;if(x&&(y=x.key),v>0){var k=p(this.slabs[v-1],d);k&&(y?o(k.key,y)>0&&(y=k.key,g=k.value):(g=k.value,y=k.key))}var h=this.horizontal[v];if(h.length>0){var M=a.ge(h,d[1],u);if(M=h.length)return g;A=h[M]}}if(A.start)if(y){var C=n(y[0],y[1],[d[0],A.y]);y[0][0]>y[1][0]&&(C=-C),C>0&&(g=A.index)}else g=A.index;else A.y!==d[1]&&(g=A.index)}}}return g}},4670:function(f,l,t){var a=t(9130),r=t(9662);function n(i,u){var p=r(a(i,u),[u[u.length-1]]);return p[p.length-1]}function o(i,u,p,c){var b=-u/(c-u);b<0?b=0:b>1&&(b=1);for(var d=1-b,v=i.length,x=new Array(v),g=0;g0||b>0&&g<0){var y=o(d,g,v,b);p.push(y),c.push(y.slice())}g<0?c.push(v.slice()):g>0?p.push(v.slice()):(p.push(v.slice()),c.push(v.slice())),b=g}return{positive:p,negative:c}},f.exports.positive=function(i,u){for(var p=[],c=n(i[i.length-1],u),b=i[i.length-1],d=i[0],v=0;v0||c>0&&x<0)&&p.push(o(b,x,d,c)),x>=0&&p.push(d.slice()),c=x}return p},f.exports.negative=function(i,u){for(var p=[],c=n(i[i.length-1],u),b=i[i.length-1],d=i[0],v=0;v0||c>0&&x<0)&&p.push(o(b,x,d,c)),x<=0&&p.push(d.slice()),c=x}return p}},8974:function(f,l,t){var a;(function(){var r={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 n(c){return i(p(c),arguments)}function o(c,b){return n.apply(null,[c].concat(b||[]))}function i(c,b){var d,v,x,g,y,k,h,M,A,C=1,L=c.length,P="";for(v=0;v=0),g.type){case"b":d=parseInt(d,10).toString(2);break;case"c":d=String.fromCharCode(parseInt(d,10));break;case"d":case"i":d=parseInt(d,10);break;case"j":d=JSON.stringify(d,null,g.width?parseInt(g.width):0);break;case"e":d=g.precision?parseFloat(d).toExponential(g.precision):parseFloat(d).toExponential();break;case"f":d=g.precision?parseFloat(d).toFixed(g.precision):parseFloat(d);break;case"g":d=g.precision?String(Number(d.toPrecision(g.precision))):parseFloat(d);break;case"o":d=(parseInt(d,10)>>>0).toString(8);break;case"s":d=String(d),d=g.precision?d.substring(0,g.precision):d;break;case"t":d=String(!!d),d=g.precision?d.substring(0,g.precision):d;break;case"T":d=Object.prototype.toString.call(d).slice(8,-1).toLowerCase(),d=g.precision?d.substring(0,g.precision):d;break;case"u":d=parseInt(d,10)>>>0;break;case"v":d=d.valueOf(),d=g.precision?d.substring(0,g.precision):d;break;case"x":d=(parseInt(d,10)>>>0).toString(16);break;case"X":d=(parseInt(d,10)>>>0).toString(16).toUpperCase()}r.json.test(g.type)?P+=d:(!r.number.test(g.type)||M&&!g.sign?A="":(A=M?"+":"-",d=d.toString().replace(r.sign,"")),k=g.pad_char?g.pad_char==="0"?"0":g.pad_char.charAt(1):" ",h=g.width-(A+d).length,y=g.width&&h>0?k.repeat(h):"",P+=g.align?A+d+y:k==="0"?A+y+d:y+A+d)}return P}var u=Object.create(null);function p(c){if(u[c])return u[c];for(var b,d=c,v=[],x=0;d;){if((b=r.text.exec(d))!==null)v.push(b[0]);else if((b=r.modulo.exec(d))!==null)v.push("%");else{if((b=r.placeholder.exec(d))===null)throw new SyntaxError("[sprintf] unexpected placeholder");if(b[2]){x|=1;var g=[],y=b[2],k=[];if((k=r.key.exec(y))===null)throw new SyntaxError("[sprintf] failed to parse named argument key");for(g.push(k[1]);(y=y.substring(k[0].length))!=="";)if((k=r.key_access.exec(y))!==null)g.push(k[1]);else{if((k=r.index_access.exec(y))===null)throw new SyntaxError("[sprintf] failed to parse named argument key");g.push(k[1])}b[2]=g}else x|=2;if(x===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");v.push({placeholder:b[0],param_no:b[1],keys:b[2],sign:b[3],pad_char:b[4],align:b[5],width:b[6],precision:b[7],type:b[8]})}d=d.substring(b[0].length)}return u[c]=v}l.sprintf=n,l.vsprintf=o,typeof window<"u"&&(window.sprintf=n,window.vsprintf=o,(a=function(){return{sprintf:n,vsprintf:o}}.call(l,t,l,f))===void 0||(f.exports=a))})()},4162:function(f,l,t){f.exports=function(i,u){if(i.dimension<=0)return{positions:[],cells:[]};if(i.dimension===1)return function(b,d){for(var v=r(b,d),x=v.length,g=new Array(x),y=new Array(x),k=0;kx|0},vertex:function(b,d,v,x,g,y,k,h,M,A,C,L,P){var I=(k<<0)+(h<<1)+(M<<2)+(A<<3)|0;if(I!==0&&I!==15)switch(I){case 0:case 15:C.push([b-.5,d-.5]);break;case 1:C.push([b-.25-.25*(x+v-2*P)/(v-x),d-.25-.25*(g+v-2*P)/(v-g)]);break;case 2:C.push([b-.75-.25*(-x-v+2*P)/(x-v),d-.25-.25*(y+x-2*P)/(x-y)]);break;case 3:C.push([b-.5,d-.5-.5*(g+v+y+x-4*P)/(v-g+x-y)]);break;case 4:C.push([b-.25-.25*(y+g-2*P)/(g-y),d-.75-.25*(-g-v+2*P)/(g-v)]);break;case 5:C.push([b-.5-.5*(x+v+y+g-4*P)/(v-x+g-y),d-.5]);break;case 6:C.push([b-.5-.25*(-x-v+y+g)/(x-v+g-y),d-.5-.25*(-g-v+y+x)/(g-v+x-y)]);break;case 7:C.push([b-.75-.25*(y+g-2*P)/(g-y),d-.75-.25*(y+x-2*P)/(x-y)]);break;case 8:C.push([b-.75-.25*(-y-g+2*P)/(y-g),d-.75-.25*(-y-x+2*P)/(y-x)]);break;case 9:C.push([b-.5-.25*(x+v+-y-g)/(v-x+y-g),d-.5-.25*(g+v+-y-x)/(v-g+y-x)]);break;case 10:C.push([b-.5-.5*(-x-v-y-g+4*P)/(x-v+y-g),d-.5]);break;case 11:C.push([b-.25-.25*(-y-g+2*P)/(y-g),d-.75-.25*(g+v-2*P)/(v-g)]);break;case 12:C.push([b-.5,d-.5-.5*(-g-v-y-x+4*P)/(g-v+y-x)]);break;case 13:C.push([b-.75-.25*(x+v-2*P)/(v-x),d-.25-.25*(-y-x+2*P)/(y-x)]);break;case 14:C.push([b-.25-.25*(-x-v+2*P)/(x-v),d-.25-.25*(-g-v+2*P)/(g-v)])}},cell:function(b,d,v,x,g,y,k,h,M){g?h.push([b,d]):h.push([d,b])}});return function(b,d){var v=[],x=[];return c(b,v,x,d),{positions:v,cells:x}}}},o={}},6946:function(f,l,t){f.exports=function o(i,u,p){p=p||{};var c=n[i];c||(c=n[i]={" ":{data:new Float32Array(0),shape:.2}});var b=c[u];if(!b)if(u.length<=1||!/\d/.test(u))b=c[u]=function(L){for(var P=L.cells,I=L.positions,R=new Float32Array(6*P.length),U=0,B=0,G=0;G0&&(g+=.02);var k=new Float32Array(x),h=0,M=-.5*g;for(y=0;yMath.max(k,h)?M[2]=1:k>Math.max(y,h)?M[0]=1:M[1]=1;for(var A=0,C=0,L=0;L<3;++L)A+=g[L]*g[L],C+=M[L]*g[L];for(L=0;L<3;++L)M[L]-=C/A*g[L];return i(M,M),M}function d(g,y,k,h,M,A,C,L){this.center=a(k),this.up=a(h),this.right=a(M),this.radius=a([A]),this.angle=a([C,L]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(g,y),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 P=0;P<16;++P)this.computedMatrix[P]=.5;this.recalcMatrix(0)}var v=d.prototype;v.setDistanceLimits=function(g,y){g=g>0?Math.log(g):-1/0,y=y>0?Math.log(y):1/0,y=Math.max(y,g),this.radius.bounds[0][0]=g,this.radius.bounds[1][0]=y},v.getDistanceLimits=function(g){var y=this.radius.bounds[0];return g?(g[0]=Math.exp(y[0][0]),g[1]=Math.exp(y[1][0]),g):[Math.exp(y[0][0]),Math.exp(y[1][0])]},v.recalcMatrix=function(g){this.center.curve(g),this.up.curve(g),this.right.curve(g),this.radius.curve(g),this.angle.curve(g);for(var y=this.computedUp,k=this.computedRight,h=0,M=0,A=0;A<3;++A)M+=y[A]*k[A],h+=y[A]*y[A];var C=Math.sqrt(h),L=0;for(A=0;A<3;++A)k[A]-=y[A]*M/h,L+=k[A]*k[A],y[A]/=C;var P=Math.sqrt(L);for(A=0;A<3;++A)k[A]/=P;var I=this.computedToward;o(I,y,k),i(I,I);var R=Math.exp(this.computedRadius[0]),U=this.computedAngle[0],B=this.computedAngle[1],G=Math.cos(U),N=Math.sin(U),j=Math.cos(B),V=Math.sin(B),H=this.computedCenter,ee=G*j,Q=N*j,X=V,Y=-G*V,K=-N*V,te=j,re=this.computedEye,oe=this.computedMatrix;for(A=0;A<3;++A){var se=ee*k[A]+Q*I[A]+X*y[A];oe[4*A+1]=Y*k[A]+K*I[A]+te*y[A],oe[4*A+2]=se,oe[4*A+3]=0}var ce=oe[1],xe=oe[5],pe=oe[9],de=oe[2],he=oe[6],ye=oe[10],ze=xe*ye-pe*he,Te=pe*de-ce*ye,Ae=ce*he-xe*de,Me=p(ze,Te,Ae);for(ze/=Me,Te/=Me,Ae/=Me,oe[0]=ze,oe[4]=Te,oe[8]=Ae,A=0;A<3;++A)re[A]=H[A]+oe[2+4*A]*R;for(A=0;A<3;++A){L=0;for(var Ce=0;Ce<3;++Ce)L+=oe[A+4*Ce]*re[Ce];oe[12+A]=-L}oe[15]=1},v.getMatrix=function(g,y){this.recalcMatrix(g);var k=this.computedMatrix;if(y){for(var h=0;h<16;++h)y[h]=k[h];return y}return k};var x=[0,0,0];v.rotate=function(g,y,k,h){if(this.angle.move(g,y,k),h){this.recalcMatrix(g);var M=this.computedMatrix;x[0]=M[2],x[1]=M[6],x[2]=M[10];for(var A=this.computedUp,C=this.computedRight,L=this.computedToward,P=0;P<3;++P)M[4*P]=A[P],M[4*P+1]=C[P],M[4*P+2]=L[P];for(n(M,M,h,x),P=0;P<3;++P)A[P]=M[4*P],C[P]=M[4*P+1];this.up.set(g,A[0],A[1],A[2]),this.right.set(g,C[0],C[1],C[2])}},v.pan=function(g,y,k,h){y=y||0,k=k||0,h=h||0,this.recalcMatrix(g);var M=this.computedMatrix,A=(Math.exp(this.computedRadius[0]),M[1]),C=M[5],L=M[9],P=p(A,C,L);A/=P,C/=P,L/=P;var I=M[0],R=M[4],U=M[8],B=I*A+R*C+U*L,G=p(I-=A*B,R-=C*B,U-=L*B),N=(I/=G)*y+A*k,j=(R/=G)*y+C*k,V=(U/=G)*y+L*k;this.center.move(g,N,j,V);var H=Math.exp(this.computedRadius[0]);H=Math.max(1e-4,H+h),this.radius.set(g,Math.log(H))},v.translate=function(g,y,k,h){this.center.move(g,y||0,k||0,h||0)},v.setMatrix=function(g,y,k,h){var M=1;typeof k=="number"&&(M=0|k),(M<0||M>3)&&(M=1);var A=(M+2)%3;y||(this.recalcMatrix(g),y=this.computedMatrix);var C=y[M],L=y[M+4],P=y[M+8];if(h){var I=Math.abs(C),R=Math.abs(L),U=Math.abs(P),B=Math.max(I,R,U);I===B?(C=C<0?-1:1,L=P=0):U===B?(P=P<0?-1:1,C=L=0):(L=L<0?-1:1,C=P=0)}else{var G=p(C,L,P);C/=G,L/=G,P/=G}var N,j,V=y[A],H=y[A+4],ee=y[A+8],Q=V*C+H*L+ee*P,X=p(V-=C*Q,H-=L*Q,ee-=P*Q),Y=L*(ee/=X)-P*(H/=X),K=P*(V/=X)-C*ee,te=C*H-L*V,re=p(Y,K,te);if(Y/=re,K/=re,te/=re,this.center.jump(g,we,Ee,Ue),this.radius.idle(g),this.up.jump(g,C,L,P),this.right.jump(g,V,H,ee),M===2){var oe=y[1],se=y[5],ce=y[9],xe=oe*V+se*H+ce*ee,pe=oe*Y+se*K+ce*te;N=ze<0?-Math.PI/2:Math.PI/2,j=Math.atan2(pe,xe)}else{var de=y[2],he=y[6],ye=y[10],ze=de*C+he*L+ye*P,Te=de*V+he*H+ye*ee,Ae=de*Y+he*K+ye*te;N=Math.asin(c(ze)),j=Math.atan2(Ae,Te)}this.angle.jump(g,j,N),this.recalcMatrix(g);var Me=y[2],Ce=y[6],ne=y[10],ue=this.computedMatrix;r(ue,y);var me=ue[15],we=ue[12]/me,Ee=ue[13]/me,Ue=ue[14]/me,De=Math.exp(this.computedRadius[0]);this.center.jump(g,we-Me*De,Ee-Ce*De,Ue-ne*De)},v.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},v.idle=function(g){this.center.idle(g),this.up.idle(g),this.right.idle(g),this.radius.idle(g),this.angle.idle(g)},v.flush=function(g){this.center.flush(g),this.up.flush(g),this.right.flush(g),this.radius.flush(g),this.angle.flush(g)},v.setDistance=function(g,y){y>0&&this.radius.set(g,Math.log(y))},v.lookAt=function(g,y,k,h){this.recalcMatrix(g),y=y||this.computedEye,k=k||this.computedCenter;var M=(h=h||this.computedUp)[0],A=h[1],C=h[2],L=p(M,A,C);if(!(L<1e-6)){M/=L,A/=L,C/=L;var P=y[0]-k[0],I=y[1]-k[1],R=y[2]-k[2],U=p(P,I,R);if(!(U<1e-6)){P/=U,I/=U,R/=U;var B=this.computedRight,G=B[0],N=B[1],j=B[2],V=M*G+A*N+C*j,H=p(G-=V*M,N-=V*A,j-=V*C);if(!(H<.01&&(H=p(G=A*R-C*I,N=C*P-M*R,j=M*I-A*P))<1e-6)){G/=H,N/=H,j/=H,this.up.set(g,M,A,C),this.right.set(g,G,N,j),this.center.set(g,k[0],k[1],k[2]),this.radius.set(g,Math.log(U));var ee=A*j-C*N,Q=C*G-M*j,X=M*N-A*G,Y=p(ee,Q,X),K=M*P+A*I+C*R,te=G*P+N*I+j*R,re=(ee/=Y)*P+(Q/=Y)*I+(X/=Y)*R,oe=Math.asin(c(K)),se=Math.atan2(re,te),ce=this.angle._state,xe=ce[ce.length-1],pe=ce[ce.length-2];xe%=2*Math.PI;var de=Math.abs(xe+2*Math.PI-se),he=Math.abs(xe-se),ye=Math.abs(xe-2*Math.PI-se);de0?N.pop():new ArrayBuffer(B)}function x(B){return new Uint8Array(v(B),0,B)}function g(B){return new Uint16Array(v(2*B),0,B)}function y(B){return new Uint32Array(v(4*B),0,B)}function k(B){return new Int8Array(v(B),0,B)}function h(B){return new Int16Array(v(2*B),0,B)}function M(B){return new Int32Array(v(4*B),0,B)}function A(B){return new Float32Array(v(4*B),0,B)}function C(B){return new Float64Array(v(8*B),0,B)}function L(B){return o?new Uint8ClampedArray(v(B),0,B):x(B)}function P(B){return i?new BigUint64Array(v(8*B),0,B):null}function I(B){return u?new BigInt64Array(v(8*B),0,B):null}function R(B){return new DataView(v(B),0,B)}function U(B){B=a.nextPow2(B);var G=a.log2(B),N=b[G];return N.length>0?N.pop():new n(B)}l.free=function(B){if(n.isBuffer(B))b[a.log2(B.length)].push(B);else{if(Object.prototype.toString.call(B)!=="[object ArrayBuffer]"&&(B=B.buffer),!B)return;var G=B.length||B.byteLength,N=0|a.log2(G);c[N].push(B)}},l.freeUint8=l.freeUint16=l.freeUint32=l.freeBigUint64=l.freeInt8=l.freeInt16=l.freeInt32=l.freeBigInt64=l.freeFloat32=l.freeFloat=l.freeFloat64=l.freeDouble=l.freeUint8Clamped=l.freeDataView=function(B){d(B.buffer)},l.freeArrayBuffer=d,l.freeBuffer=function(B){b[a.log2(B.length)].push(B)},l.malloc=function(B,G){if(G===void 0||G==="arraybuffer")return v(B);switch(G){case"uint8":return x(B);case"uint16":return g(B);case"uint32":return y(B);case"int8":return k(B);case"int16":return h(B);case"int32":return M(B);case"float":case"float32":return A(B);case"double":case"float64":return C(B);case"uint8_clamped":return L(B);case"bigint64":return I(B);case"biguint64":return P(B);case"buffer":return U(B);case"data":case"dataview":return R(B);default:return null}return null},l.mallocArrayBuffer=v,l.mallocUint8=x,l.mallocUint16=g,l.mallocUint32=y,l.mallocInt8=k,l.mallocInt16=h,l.mallocInt32=M,l.mallocFloat32=l.mallocFloat=A,l.mallocFloat64=l.mallocDouble=C,l.mallocUint8Clamped=L,l.mallocBigUint64=P,l.mallocBigInt64=I,l.mallocDataView=R,l.mallocBuffer=U,l.clearCache=function(){for(var B=0;B<32;++B)p.UINT8[B].length=0,p.UINT16[B].length=0,p.UINT32[B].length=0,p.INT8[B].length=0,p.INT16[B].length=0,p.INT32[B].length=0,p.FLOAT[B].length=0,p.DOUBLE[B].length=0,p.BIGUINT64[B].length=0,p.BIGINT64[B].length=0,p.UINT8C[B].length=0,c[B].length=0,b[B].length=0}},1731:function(f){function l(a){this.roots=new Array(a),this.ranks=new Array(a);for(var r=0;r0&&(M=h.size),h.lineSpacing&&h.lineSpacing>0&&(A=h.lineSpacing),h.styletags&&h.styletags.breaklines&&(C.breaklines=!!h.styletags.breaklines),h.styletags&&h.styletags.bolds&&(C.bolds=!!h.styletags.bolds),h.styletags&&h.styletags.italics&&(C.italics=!!h.styletags.italics),h.styletags&&h.styletags.subscripts&&(C.subscripts=!!h.styletags.subscripts),h.styletags&&h.styletags.superscripts&&(C.superscripts=!!h.styletags.superscripts)),k.font=[h.fontStyle,h.fontVariant,h.fontWeight,M+"px",h.font].filter(function(L){return L}).join(" "),k.textAlign="start",k.textBaseline="alphabetic",k.direction="ltr",x(function(L,P,I,R,U,B){I=I.replace(/\n/g,""),I=B.breaklines===!0?I.replace(/\/g,` `):I.replace(/\/g," ");var G="",N=[];for(ee=0;ee-1?parseInt(ue[1+Ee]):0,je=Ue>-1?parseInt(me[1+Ue]):0;De!==je&&(we=we.replace(ye(),"?px "),Y*=Math.pow(.75,je-De),we=we.replace("?px ",ye())),X+=.25*re*(je-De)}if(B.superscripts===!0){var ge=ue.indexOf("+"),be=me.indexOf("+"),Se=ge>-1?parseInt(ue[1+ge]):0,Ne=be>-1?parseInt(me[1+be]):0;Se!==Ne&&(we=we.replace(ye(),"?px "),Y*=Math.pow(.75,Ne-Se),we=we.replace("?px ",ye())),X-=.25*re*(Ne-Se)}if(B.bolds===!0){var Ye=ue.indexOf(p)>-1,Ze=me.indexOf(p)>-1;!Ye&&Ze&&(we=st?we.replace("italic ","italic bold "):"bold "+we),Ye&&!Ze&&(we=we.replace("bold ",""))}if(B.italics===!0){var st=ue.indexOf(c)>-1,ot=me.indexOf(c)>-1;!st&&ot&&(we="italic "+we),st&&!ot&&(we=we.replace("italic ",""))}P.font=we}for(H=0;H",A="",C=M.length,L=A.length,P=y[0]==="+"||y[0]==="-",I=0,R=-L;I>-1&&(I=k.indexOf(M,I))!==-1&&(R=k.indexOf(A,I+C))!==-1&&!(R<=I);){for(var U=I;U=R)h[U]=null,k=k.substr(0,U)+" "+k.substr(U+1);else if(h[U]!==null){var B=h[U].indexOf(y[0]);B===-1?h[U]+=y:P&&(h[U]=h[U].substr(0,B+1)+(1+parseInt(h[U][B+1]))+h[U].substr(B+2))}var G=I+C,N=k.substr(G,R-G).indexOf(M);I=N!==-1?N:R+L}return h}function d(g,y){var k=a(g,128);return y?n(k.cells,k.positions,.25):{edges:k.cells,positions:k.positions}}function v(g,y,k,h){var M=d(g,h),A=function(H,ee,Q){for(var X=ee.textAlign||"start",Y=ee.textBaseline||"alphabetic",K=[1<<30,1<<30],te=[0,0],re=H.length,oe=0;oe"u"||!ses.ok||ses.ok()){typeof ses<"u"&&(ses.weakMapPermitHostObjects=y);var l=!1;if(typeof WeakMap=="function"){var t=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var a=new t,r=Object.freeze({});if(a.set(r,1),a.get(r)===1)return void(f.exports=WeakMap);l=!0}}var n=Object.getOwnPropertyNames,o=Object.defineProperty,i=Object.isExtensible,u="weakmap:",p="weakmap:ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var c=new ArrayBuffer(25),b=new Uint8Array(c);crypto.getRandomValues(b),p="weakmap:rand:"+Array.prototype.map.call(b,function(C){return(C%36).toString(36)}).join("")+"___"}if(o(Object,"getOwnPropertyNames",{value:function(C){return n(C).filter(k)}}),"getPropertyNames"in Object){var d=Object.getPropertyNames;o(Object,"getPropertyNames",{value:function(C){return d(C).filter(k)}})}(function(){var C=Object.freeze;o(Object,"freeze",{value:function(I){return h(I),C(I)}});var L=Object.seal;o(Object,"seal",{value:function(I){return h(I),L(I)}});var P=Object.preventExtensions;o(Object,"preventExtensions",{value:function(I){return h(I),P(I)}})})();var v=!1,x=0,g=function(){this instanceof g||A();var C=[],L=[],P=x++;return Object.create(g.prototype,{get___:{value:M(function(I,R){var U,B=h(I);return B?P in B?B[P]:R:(U=C.indexOf(I))>=0?L[U]:R})},has___:{value:M(function(I){var R=h(I);return R?P in R:C.indexOf(I)>=0})},set___:{value:M(function(I,R){var U,B=h(I);return B?B[P]=R:(U=C.indexOf(I))>=0?L[U]=R:(U=C.length,L[U]=R,C[U]=I),this})},delete___:{value:M(function(I){var R,U,B=h(I);return B?P in B&&delete B[P]:!((R=C.indexOf(I))<0||(U=C.length-1,C[R]=void 0,L[R]=L[U],C[R]=C[U],C.length=U,L.length=U,0))})}})};g.prototype=Object.create(Object.prototype,{get:{value:function(C,L){return this.get___(C,L)},writable:!0,configurable:!0},has:{value:function(C){return this.has___(C)},writable:!0,configurable:!0},set:{value:function(C,L){return this.set___(C,L)},writable:!0,configurable:!0},delete:{value:function(C){return this.delete___(C)},writable:!0,configurable:!0}}),typeof t=="function"?function(){function C(){this instanceof g||A();var L,P=new t,I=void 0,R=!1;return L=l?function(U,B){return P.set(U,B),P.has(U)||(I||(I=new g),I.set(U,B)),this}:function(U,B){if(R)try{P.set(U,B)}catch{I||(I=new g),I.set___(U,B)}else P.set(U,B);return this},Object.create(g.prototype,{get___:{value:M(function(U,B){return I?P.has(U)?P.get(U):I.get___(U,B):P.get(U,B)})},has___:{value:M(function(U){return P.has(U)||!!I&&I.has___(U)})},set___:{value:M(L)},delete___:{value:M(function(U){var B=!!P.delete(U);return I&&I.delete___(U)||B})},permitHostObjects___:{value:M(function(U){if(U!==y)throw new Error("bogus call to permitHostObjects___");R=!0})}})}l&&typeof Proxy<"u"&&(Proxy=void 0),C.prototype=g.prototype,f.exports=C,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),f.exports=g)}function y(C){C.permitHostObjects___&&C.permitHostObjects___(y)}function k(C){return!(C.substr(0,u.length)==u&&C.substr(C.length-3)==="___")}function h(C){if(C!==Object(C))throw new TypeError("Not an object: "+C);var L=C[p];if(L&&L.key===C)return L;if(i(C)){L={key:C};try{return o(C,p,{value:L,writable:!1,enumerable:!1,configurable:!1}),L}catch{return}}}function M(C){return C.prototype=null,Object.freeze(C)}function A(){v||typeof console>"u"||(v=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}})()},9222:function(f,l,t){var a=t(7178);f.exports=function(){var r={};return function(n){if((typeof n!="object"||n===null)&&typeof n!="function")throw new Error("Weakmap-shim: Key must be object");var o=n.valueOf(r);return o&&o.identity===r?o:a(n,r)}}},7178:function(f){f.exports=function(l,t){var a={identity:t},r=l.valueOf;return Object.defineProperty(l,"valueOf",{value:function(n){return n!==t?r.apply(this,arguments):a},writable:!0}),a}},4037:function(f,l,t){var a=t(9222);f.exports=function(){var r=a();return{get:function(n,o){var i=r(n);return i.hasOwnProperty("value")?i.value:o},set:function(n,o){return r(n).value=o,this},has:function(n){return"value"in r(n)},delete:function(n){return delete r(n).value}}}},6183:function(f){f.exports=function(l){var t={};return function(a,r,n){var o=a.dtype,i=a.order,u=[o,i.join()].join(),p=t[u];return p||(t[u]=p=l([o,i])),p(a.shape.slice(0),a.data,a.stride,0|a.offset,r,n)}}(function(){return function(l,t,a,r,n,o){var i=l[0],u=a[0],p=[0],c=u;r|=0;var b=0,d=u;for(b=0;b=0!=x>=0&&n.push(p[0]+.5+.5*(v+x)/(v-x)),r+=d,++p[0]}}}.bind(void 0,{funcName:"zeroCrossings"}))},9584:function(f,l,t){f.exports=function(r,n){var o=[];return n=+n||0,a(r.hi(r.shape[0]-1),o,n),o};var a=t(6183)},6601:function(){}},T={};function m(f){var l=T[f];if(l!==void 0)return l.exports;var t=T[f]={id:f,loaded:!1,exports:{}};return s[f].call(t.exports,t,t.exports,m),t.loaded=!0,t.exports}return m.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),m.nmd=function(f){return f.paths=[],f.children||(f.children=[]),f},m(7386)}()},D.exports=_()},12856:function(D,E,e){function _(ne,ue){if(!(ne instanceof ue))throw new TypeError("Cannot call a class as a function")}function w(ne,ue){for(var me=0;men)throw new RangeError('The value "'+ne+'" is invalid for option "size"');var ue=new Uint8Array(ne);return Object.setPrototypeOf(ue,i.prototype),ue}function i(ne,ue,me){if(typeof ne=="number"){if(typeof ue=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return c(ne)}return u(ne,ue,me)}function u(ne,ue,me){if(typeof ne=="string")return function(Ue,De){if(typeof De=="string"&&De!==""||(De="utf8"),!i.isEncoding(De))throw new TypeError("Unknown encoding: "+De);var je=0|x(Ue,De),ge=o(je),be=ge.write(Ue,De);return be!==je&&(ge=ge.slice(0,be)),ge}(ne,ue);if(ArrayBuffer.isView(ne))return function(Ue){if(ze(Ue,Uint8Array)){var De=new Uint8Array(Ue);return d(De.buffer,De.byteOffset,De.byteLength)}return b(Ue)}(ne);if(ne==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(ne));if(ze(ne,ArrayBuffer)||ne&&ze(ne.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ze(ne,SharedArrayBuffer)||ne&&ze(ne.buffer,SharedArrayBuffer)))return d(ne,ue,me);if(typeof ne=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var we=ne.valueOf&&ne.valueOf();if(we!=null&&we!==ne)return i.from(we,ue,me);var Ee=function(Ue){if(i.isBuffer(Ue)){var De=0|v(Ue.length),je=o(De);return je.length===0||Ue.copy(je,0,0,De),je}return Ue.length!==void 0?typeof Ue.length!="number"||Te(Ue.length)?o(0):b(Ue):Ue.type==="Buffer"&&Array.isArray(Ue.data)?b(Ue.data):void 0}(ne);if(Ee)return Ee;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ne[Symbol.toPrimitive]=="function")return i.from(ne[Symbol.toPrimitive]("string"),ue,me);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(ne))}function p(ne){if(typeof ne!="number")throw new TypeError('"size" argument must be of type number');if(ne<0)throw new RangeError('The value "'+ne+'" is invalid for option "size"')}function c(ne){return p(ne),o(ne<0?0:0|v(ne))}function b(ne){for(var ue=ne.length<0?0:0|v(ne.length),me=o(ue),we=0;we=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|ne}function x(ne,ue){if(i.isBuffer(ne))return ne.length;if(ArrayBuffer.isView(ne)||ze(ne,ArrayBuffer))return ne.byteLength;if(typeof ne!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+l(ne));var me=ne.length,we=arguments.length>2&&arguments[2]===!0;if(!we&&me===0)return 0;for(var Ee=!1;;)switch(ue){case"ascii":case"latin1":case"binary":return me;case"utf8":case"utf-8":return de(ne).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*me;case"hex":return me>>>1;case"base64":return he(ne).length;default:if(Ee)return we?-1:de(ne).length;ue=(""+ue).toLowerCase(),Ee=!0}}function g(ne,ue,me){var we=!1;if((ue===void 0||ue<0)&&(ue=0),ue>this.length||((me===void 0||me>this.length)&&(me=this.length),me<=0)||(me>>>=0)<=(ue>>>=0))return"";for(ne||(ne="utf8");;)switch(ne){case"hex":return N(this,ue,me);case"utf8":case"utf-8":return R(this,ue,me);case"ascii":return B(this,ue,me);case"latin1":case"binary":return G(this,ue,me);case"base64":return I(this,ue,me);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,ue,me);default:if(we)throw new TypeError("Unknown encoding: "+ne);ne=(ne+"").toLowerCase(),we=!0}}function y(ne,ue,me){var we=ne[ue];ne[ue]=ne[me],ne[me]=we}function k(ne,ue,me,we,Ee){if(ne.length===0)return-1;if(typeof me=="string"?(we=me,me=0):me>2147483647?me=2147483647:me<-2147483648&&(me=-2147483648),Te(me=+me)&&(me=Ee?0:ne.length-1),me<0&&(me=ne.length+me),me>=ne.length){if(Ee)return-1;me=ne.length-1}else if(me<0){if(!Ee)return-1;me=0}if(typeof ue=="string"&&(ue=i.from(ue,we)),i.isBuffer(ue))return ue.length===0?-1:h(ne,ue,me,we,Ee);if(typeof ue=="number")return ue&=255,typeof Uint8Array.prototype.indexOf=="function"?Ee?Uint8Array.prototype.indexOf.call(ne,ue,me):Uint8Array.prototype.lastIndexOf.call(ne,ue,me):h(ne,[ue],me,we,Ee);throw new TypeError("val must be string, number or Buffer")}function h(ne,ue,me,we,Ee){var Ue,De=1,je=ne.length,ge=ue.length;if(we!==void 0&&((we=String(we).toLowerCase())==="ucs2"||we==="ucs-2"||we==="utf16le"||we==="utf-16le")){if(ne.length<2||ue.length<2)return-1;De=2,je/=2,ge/=2,me/=2}function be(Ze,st){return De===1?Ze[st]:Ze.readUInt16BE(st*De)}if(Ee){var Se=-1;for(Ue=me;Ueje&&(me=je-ge),Ue=me;Ue>=0;Ue--){for(var Ne=!0,Ye=0;YeEe&&(we=Ee):we=Ee;var Ue,De=ue.length;for(we>De/2&&(we=De/2),Ue=0;Ue>8,ge=De%256,be.push(ge),be.push(je);return be}(ue,ne.length-me),ne,me,we)}function I(ne,ue,me){return ue===0&&me===ne.length?t.fromByteArray(ne):t.fromByteArray(ne.slice(ue,me))}function R(ne,ue,me){me=Math.min(ne.length,me);for(var we=[],Ee=ue;Ee239?4:Ue>223?3:Ue>191?2:1;if(Ee+je<=me){var ge=void 0,be=void 0,Se=void 0,Ne=void 0;switch(je){case 1:Ue<128&&(De=Ue);break;case 2:(192&(ge=ne[Ee+1]))==128&&(Ne=(31&Ue)<<6|63&ge)>127&&(De=Ne);break;case 3:ge=ne[Ee+1],be=ne[Ee+2],(192&ge)==128&&(192&be)==128&&(Ne=(15&Ue)<<12|(63&ge)<<6|63&be)>2047&&(Ne<55296||Ne>57343)&&(De=Ne);break;case 4:ge=ne[Ee+1],be=ne[Ee+2],Se=ne[Ee+3],(192&ge)==128&&(192&be)==128&&(192&Se)==128&&(Ne=(15&Ue)<<18|(63&ge)<<12|(63&be)<<6|63&Se)>65535&&Ne<1114112&&(De=Ne)}}De===null?(De=65533,je=1):De>65535&&(De-=65536,we.push(De>>>10&1023|55296),De=56320|1023&De),we.push(De),Ee+=je}return function(Ye){var Ze=Ye.length;if(Ze<=U)return String.fromCharCode.apply(String,Ye);for(var st="",ot=0;ot"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."),Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}}),i.poolSize=8192,i.from=function(ne,ue,me){return u(ne,ue,me)},Object.setPrototypeOf(i.prototype,Uint8Array.prototype),Object.setPrototypeOf(i,Uint8Array),i.alloc=function(ne,ue,me){return function(we,Ee,Ue){return p(we),we<=0?o(we):Ee!==void 0?typeof Ue=="string"?o(we).fill(Ee,Ue):o(we).fill(Ee):o(we)}(ne,ue,me)},i.allocUnsafe=function(ne){return c(ne)},i.allocUnsafeSlow=function(ne){return c(ne)},i.isBuffer=function(ne){return ne!=null&&ne._isBuffer===!0&&ne!==i.prototype},i.compare=function(ne,ue){if(ze(ne,Uint8Array)&&(ne=i.from(ne,ne.offset,ne.byteLength)),ze(ue,Uint8Array)&&(ue=i.from(ue,ue.offset,ue.byteLength)),!i.isBuffer(ne)||!i.isBuffer(ue))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ne===ue)return 0;for(var me=ne.length,we=ue.length,Ee=0,Ue=Math.min(me,we);Eewe.length?(i.isBuffer(Ue)||(Ue=i.from(Ue)),Ue.copy(we,Ee)):Uint8Array.prototype.set.call(we,Ue,Ee);else{if(!i.isBuffer(Ue))throw new TypeError('"list" argument must be an Array of Buffers');Ue.copy(we,Ee)}Ee+=Ue.length}return we},i.byteLength=x,i.prototype._isBuffer=!0,i.prototype.swap16=function(){var ne=this.length;if(ne%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ue=0;ueue&&(ne+=" ... "),""},r&&(i.prototype[r]=i.prototype.inspect),i.prototype.compare=function(ne,ue,me,we,Ee){if(ze(ne,Uint8Array)&&(ne=i.from(ne,ne.offset,ne.byteLength)),!i.isBuffer(ne))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+l(ne));if(ue===void 0&&(ue=0),me===void 0&&(me=ne?ne.length:0),we===void 0&&(we=0),Ee===void 0&&(Ee=this.length),ue<0||me>ne.length||we<0||Ee>this.length)throw new RangeError("out of range index");if(we>=Ee&&ue>=me)return 0;if(we>=Ee)return-1;if(ue>=me)return 1;if(this===ne)return 0;for(var Ue=(Ee>>>=0)-(we>>>=0),De=(me>>>=0)-(ue>>>=0),je=Math.min(Ue,De),ge=this.slice(we,Ee),be=ne.slice(ue,me),Se=0;Se>>=0,isFinite(me)?(me>>>=0,we===void 0&&(we="utf8")):(we=me,me=void 0)}var Ee=this.length-ue;if((me===void 0||me>Ee)&&(me=Ee),ne.length>0&&(me<0||ue<0)||ue>this.length)throw new RangeError("Attempt to write outside buffer bounds");we||(we="utf8");for(var Ue=!1;;)switch(we){case"hex":return M(this,ne,ue,me);case"utf8":case"utf-8":return A(this,ne,ue,me);case"ascii":case"latin1":case"binary":return C(this,ne,ue,me);case"base64":return L(this,ne,ue,me);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,ne,ue,me);default:if(Ue)throw new TypeError("Unknown encoding: "+we);we=(""+we).toLowerCase(),Ue=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var U=4096;function B(ne,ue,me){var we="";me=Math.min(ne.length,me);for(var Ee=ue;Eewe)&&(me=we);for(var Ee="",Ue=ue;Ueme)throw new RangeError("Trying to access beyond buffer length")}function H(ne,ue,me,we,Ee,Ue){if(!i.isBuffer(ne))throw new TypeError('"buffer" argument must be a Buffer instance');if(ue>Ee||uene.length)throw new RangeError("Index out of range")}function ee(ne,ue,me,we,Ee){se(ue,we,Ee,ne,me,7);var Ue=Number(ue&BigInt(4294967295));ne[me++]=Ue,Ue>>=8,ne[me++]=Ue,Ue>>=8,ne[me++]=Ue,Ue>>=8,ne[me++]=Ue;var De=Number(ue>>BigInt(32)&BigInt(4294967295));return ne[me++]=De,De>>=8,ne[me++]=De,De>>=8,ne[me++]=De,De>>=8,ne[me++]=De,me}function Q(ne,ue,me,we,Ee){se(ue,we,Ee,ne,me,7);var Ue=Number(ue&BigInt(4294967295));ne[me+7]=Ue,Ue>>=8,ne[me+6]=Ue,Ue>>=8,ne[me+5]=Ue,Ue>>=8,ne[me+4]=Ue;var De=Number(ue>>BigInt(32)&BigInt(4294967295));return ne[me+3]=De,De>>=8,ne[me+2]=De,De>>=8,ne[me+1]=De,De>>=8,ne[me]=De,me+8}function X(ne,ue,me,we,Ee,Ue){if(me+we>ne.length)throw new RangeError("Index out of range");if(me<0)throw new RangeError("Index out of range")}function Y(ne,ue,me,we,Ee){return ue=+ue,me>>>=0,Ee||X(ne,0,me,4),a.write(ne,ue,me,we,23,4),me+4}function K(ne,ue,me,we,Ee){return ue=+ue,me>>>=0,Ee||X(ne,0,me,8),a.write(ne,ue,me,we,52,8),me+8}i.prototype.slice=function(ne,ue){var me=this.length;(ne=~~ne)<0?(ne+=me)<0&&(ne=0):ne>me&&(ne=me),(ue=ue===void 0?me:~~ue)<0?(ue+=me)<0&&(ue=0):ue>me&&(ue=me),ue>>=0,ue>>>=0,me||V(ne,ue,this.length);for(var we=this[ne],Ee=1,Ue=0;++Ue>>=0,ue>>>=0,me||V(ne,ue,this.length);for(var we=this[ne+--ue],Ee=1;ue>0&&(Ee*=256);)we+=this[ne+--ue]*Ee;return we},i.prototype.readUint8=i.prototype.readUInt8=function(ne,ue){return ne>>>=0,ue||V(ne,1,this.length),this[ne]},i.prototype.readUint16LE=i.prototype.readUInt16LE=function(ne,ue){return ne>>>=0,ue||V(ne,2,this.length),this[ne]|this[ne+1]<<8},i.prototype.readUint16BE=i.prototype.readUInt16BE=function(ne,ue){return ne>>>=0,ue||V(ne,2,this.length),this[ne]<<8|this[ne+1]},i.prototype.readUint32LE=i.prototype.readUInt32LE=function(ne,ue){return ne>>>=0,ue||V(ne,4,this.length),(this[ne]|this[ne+1]<<8|this[ne+2]<<16)+16777216*this[ne+3]},i.prototype.readUint32BE=i.prototype.readUInt32BE=function(ne,ue){return ne>>>=0,ue||V(ne,4,this.length),16777216*this[ne]+(this[ne+1]<<16|this[ne+2]<<8|this[ne+3])},i.prototype.readBigUInt64LE=Me(function(ne){ce(ne>>>=0,"offset");var ue=this[ne],me=this[ne+7];ue!==void 0&&me!==void 0||xe(ne,this.length-8);var we=ue+this[++ne]*Math.pow(2,8)+this[++ne]*Math.pow(2,16)+this[++ne]*Math.pow(2,24),Ee=this[++ne]+this[++ne]*Math.pow(2,8)+this[++ne]*Math.pow(2,16)+me*Math.pow(2,24);return BigInt(we)+(BigInt(Ee)<>>=0,"offset");var ue=this[ne],me=this[ne+7];ue!==void 0&&me!==void 0||xe(ne,this.length-8);var we=ue*Math.pow(2,24)+this[++ne]*Math.pow(2,16)+this[++ne]*Math.pow(2,8)+this[++ne],Ee=this[++ne]*Math.pow(2,24)+this[++ne]*Math.pow(2,16)+this[++ne]*Math.pow(2,8)+me;return(BigInt(we)<>>=0,ue>>>=0,me||V(ne,ue,this.length);for(var we=this[ne],Ee=1,Ue=0;++Ue=(Ee*=128)&&(we-=Math.pow(2,8*ue)),we},i.prototype.readIntBE=function(ne,ue,me){ne>>>=0,ue>>>=0,me||V(ne,ue,this.length);for(var we=ue,Ee=1,Ue=this[ne+--we];we>0&&(Ee*=256);)Ue+=this[ne+--we]*Ee;return Ue>=(Ee*=128)&&(Ue-=Math.pow(2,8*ue)),Ue},i.prototype.readInt8=function(ne,ue){return ne>>>=0,ue||V(ne,1,this.length),128&this[ne]?-1*(255-this[ne]+1):this[ne]},i.prototype.readInt16LE=function(ne,ue){ne>>>=0,ue||V(ne,2,this.length);var me=this[ne]|this[ne+1]<<8;return 32768&me?4294901760|me:me},i.prototype.readInt16BE=function(ne,ue){ne>>>=0,ue||V(ne,2,this.length);var me=this[ne+1]|this[ne]<<8;return 32768&me?4294901760|me:me},i.prototype.readInt32LE=function(ne,ue){return ne>>>=0,ue||V(ne,4,this.length),this[ne]|this[ne+1]<<8|this[ne+2]<<16|this[ne+3]<<24},i.prototype.readInt32BE=function(ne,ue){return ne>>>=0,ue||V(ne,4,this.length),this[ne]<<24|this[ne+1]<<16|this[ne+2]<<8|this[ne+3]},i.prototype.readBigInt64LE=Me(function(ne){ce(ne>>>=0,"offset");var ue=this[ne],me=this[ne+7];ue!==void 0&&me!==void 0||xe(ne,this.length-8);var we=this[ne+4]+this[ne+5]*Math.pow(2,8)+this[ne+6]*Math.pow(2,16)+(me<<24);return(BigInt(we)<>>=0,"offset");var ue=this[ne],me=this[ne+7];ue!==void 0&&me!==void 0||xe(ne,this.length-8);var we=(ue<<24)+this[++ne]*Math.pow(2,16)+this[++ne]*Math.pow(2,8)+this[++ne];return(BigInt(we)<>>=0,ue||V(ne,4,this.length),a.read(this,ne,!0,23,4)},i.prototype.readFloatBE=function(ne,ue){return ne>>>=0,ue||V(ne,4,this.length),a.read(this,ne,!1,23,4)},i.prototype.readDoubleLE=function(ne,ue){return ne>>>=0,ue||V(ne,8,this.length),a.read(this,ne,!0,52,8)},i.prototype.readDoubleBE=function(ne,ue){return ne>>>=0,ue||V(ne,8,this.length),a.read(this,ne,!1,52,8)},i.prototype.writeUintLE=i.prototype.writeUIntLE=function(ne,ue,me,we){ne=+ne,ue>>>=0,me>>>=0,we||H(this,ne,ue,me,Math.pow(2,8*me)-1,0);var Ee=1,Ue=0;for(this[ue]=255≠++Ue>>=0,me>>>=0,we||H(this,ne,ue,me,Math.pow(2,8*me)-1,0);var Ee=me-1,Ue=1;for(this[ue+Ee]=255≠--Ee>=0&&(Ue*=256);)this[ue+Ee]=ne/Ue&255;return ue+me},i.prototype.writeUint8=i.prototype.writeUInt8=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,1,255,0),this[ue]=255&ne,ue+1},i.prototype.writeUint16LE=i.prototype.writeUInt16LE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,2,65535,0),this[ue]=255&ne,this[ue+1]=ne>>>8,ue+2},i.prototype.writeUint16BE=i.prototype.writeUInt16BE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,2,65535,0),this[ue]=ne>>>8,this[ue+1]=255&ne,ue+2},i.prototype.writeUint32LE=i.prototype.writeUInt32LE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,4,4294967295,0),this[ue+3]=ne>>>24,this[ue+2]=ne>>>16,this[ue+1]=ne>>>8,this[ue]=255&ne,ue+4},i.prototype.writeUint32BE=i.prototype.writeUInt32BE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,4,4294967295,0),this[ue]=ne>>>24,this[ue+1]=ne>>>16,this[ue+2]=ne>>>8,this[ue+3]=255&ne,ue+4},i.prototype.writeBigUInt64LE=Me(function(ne){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ee(this,ne,ue,BigInt(0),BigInt("0xffffffffffffffff"))}),i.prototype.writeBigUInt64BE=Me(function(ne){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Q(this,ne,ue,BigInt(0),BigInt("0xffffffffffffffff"))}),i.prototype.writeIntLE=function(ne,ue,me,we){if(ne=+ne,ue>>>=0,!we){var Ee=Math.pow(2,8*me-1);H(this,ne,ue,me,Ee-1,-Ee)}var Ue=0,De=1,je=0;for(this[ue]=255≠++Ue>0)-je&255;return ue+me},i.prototype.writeIntBE=function(ne,ue,me,we){if(ne=+ne,ue>>>=0,!we){var Ee=Math.pow(2,8*me-1);H(this,ne,ue,me,Ee-1,-Ee)}var Ue=me-1,De=1,je=0;for(this[ue+Ue]=255≠--Ue>=0&&(De*=256);)ne<0&&je===0&&this[ue+Ue+1]!==0&&(je=1),this[ue+Ue]=(ne/De>>0)-je&255;return ue+me},i.prototype.writeInt8=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,1,127,-128),ne<0&&(ne=255+ne+1),this[ue]=255&ne,ue+1},i.prototype.writeInt16LE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,2,32767,-32768),this[ue]=255&ne,this[ue+1]=ne>>>8,ue+2},i.prototype.writeInt16BE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,2,32767,-32768),this[ue]=ne>>>8,this[ue+1]=255&ne,ue+2},i.prototype.writeInt32LE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,4,2147483647,-2147483648),this[ue]=255&ne,this[ue+1]=ne>>>8,this[ue+2]=ne>>>16,this[ue+3]=ne>>>24,ue+4},i.prototype.writeInt32BE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,4,2147483647,-2147483648),ne<0&&(ne=4294967295+ne+1),this[ue]=ne>>>24,this[ue+1]=ne>>>16,this[ue+2]=ne>>>8,this[ue+3]=255&ne,ue+4},i.prototype.writeBigInt64LE=Me(function(ne){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ee(this,ne,ue,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),i.prototype.writeBigInt64BE=Me(function(ne){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Q(this,ne,ue,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),i.prototype.writeFloatLE=function(ne,ue,me){return Y(this,ne,ue,!0,me)},i.prototype.writeFloatBE=function(ne,ue,me){return Y(this,ne,ue,!1,me)},i.prototype.writeDoubleLE=function(ne,ue,me){return K(this,ne,ue,!0,me)},i.prototype.writeDoubleBE=function(ne,ue,me){return K(this,ne,ue,!1,me)},i.prototype.copy=function(ne,ue,me,we){if(!i.isBuffer(ne))throw new TypeError("argument should be a Buffer");if(me||(me=0),we||we===0||(we=this.length),ue>=ne.length&&(ue=ne.length),ue||(ue=0),we>0&&we=this.length)throw new RangeError("Index out of range");if(we<0)throw new RangeError("sourceEnd out of bounds");we>this.length&&(we=this.length),ne.length-ue>>=0,me=me===void 0?this.length:me>>>0,ne||(ne=0),typeof ne=="number")for(Ue=ue;Ue"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(){var Se,Ne=f(De);if(je){var Ye=f(this).constructor;Se=Reflect.construct(Ne,arguments,Ye)}else Se=Ne.apply(this,arguments);return T(this,Se)});function be(){var Se;return _(this,be),Se=ge.call(this),Object.defineProperty(m(Se),"message",{value:ue.apply(m(Se),arguments),writable:!0,configurable:!0}),Se.name="".concat(Se.name," [").concat(ne,"]"),Se.stack,delete Se.name,Se}return Ee=be,(Ue=[{key:"code",get:function(){return ne},set:function(Se){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Se,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(ne,"]: ").concat(this.message)}}])&&w(Ee.prototype,Ue),Object.defineProperty(Ee,"prototype",{writable:!1}),be}(me)}function oe(ne){for(var ue="",me=ne.length,we=ne[0]==="-"?1:0;me>=we+4;me-=3)ue="_".concat(ne.slice(me-3,me)).concat(ue);return"".concat(ne.slice(0,me)).concat(ue)}function se(ne,ue,me,we,Ee,Ue){if(ne>me||ne3?ue===0||ue===BigInt(0)?">= 0".concat(je," and < 2").concat(je," ** ").concat(8*(Ue+1)).concat(je):">= -(2".concat(je," ** ").concat(8*(Ue+1)-1).concat(je,") and < 2 ** ")+"".concat(8*(Ue+1)-1).concat(je):">= ".concat(ue).concat(je," and <= ").concat(me).concat(je),new te.ERR_OUT_OF_RANGE("value",De,ne)}(function(ge,be,Se){ce(be,"offset"),ge[be]!==void 0&&ge[be+Se]!==void 0||xe(be,ge.length-(Se+1))})(we,Ee,Ue)}function ce(ne,ue){if(typeof ne!="number")throw new te.ERR_INVALID_ARG_TYPE(ue,"number",ne)}function xe(ne,ue,me){throw Math.floor(ne)!==ne?(ce(ne,me),new te.ERR_OUT_OF_RANGE(me||"offset","an integer",ne)):ue<0?new te.ERR_BUFFER_OUT_OF_BOUNDS:new te.ERR_OUT_OF_RANGE(me||"offset",">= ".concat(me?1:0," and <= ").concat(ue),ne)}re("ERR_BUFFER_OUT_OF_BOUNDS",function(ne){return ne?"".concat(ne," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),re("ERR_INVALID_ARG_TYPE",function(ne,ue){return'The "'.concat(ne,'" argument must be of type number. Received type ').concat(l(ue))},TypeError),re("ERR_OUT_OF_RANGE",function(ne,ue,me){var we='The value of "'.concat(ne,'" is out of range.'),Ee=me;return Number.isInteger(me)&&Math.abs(me)>Math.pow(2,32)?Ee=oe(String(me)):typeof me=="bigint"&&(Ee=String(me),(me>Math.pow(BigInt(2),BigInt(32))||me<-Math.pow(BigInt(2),BigInt(32)))&&(Ee=oe(Ee)),Ee+="n"),we+" It must be ".concat(ue,". Received ").concat(Ee)},RangeError);var pe=/[^+/0-9A-Za-z-_]/g;function de(ne,ue){var me;ue=ue||1/0;for(var we=ne.length,Ee=null,Ue=[],De=0;De55295&&me<57344){if(!Ee){if(me>56319){(ue-=3)>-1&&Ue.push(239,191,189);continue}if(De+1===we){(ue-=3)>-1&&Ue.push(239,191,189);continue}Ee=me;continue}if(me<56320){(ue-=3)>-1&&Ue.push(239,191,189),Ee=me;continue}me=65536+(Ee-55296<<10|me-56320)}else Ee&&(ue-=3)>-1&&Ue.push(239,191,189);if(Ee=null,me<128){if((ue-=1)<0)break;Ue.push(me)}else if(me<2048){if((ue-=2)<0)break;Ue.push(me>>6|192,63&me|128)}else if(me<65536){if((ue-=3)<0)break;Ue.push(me>>12|224,me>>6&63|128,63&me|128)}else{if(!(me<1114112))throw new Error("Invalid code point");if((ue-=4)<0)break;Ue.push(me>>18|240,me>>12&63|128,me>>6&63|128,63&me|128)}}return Ue}function he(ne){return t.toByteArray(function(ue){if((ue=(ue=ue.split("=")[0]).trim().replace(pe,"")).length<2)return"";for(;ue.length%4!=0;)ue+="=";return ue}(ne))}function ye(ne,ue,me,we){var Ee;for(Ee=0;Ee=ue.length||Ee>=ne.length);++Ee)ue[Ee+me]=ne[Ee];return Ee}function ze(ne,ue){return ne instanceof ue||ne!=null&&ne.constructor!=null&&ne.constructor.name!=null&&ne.constructor.name===ue.name}function Te(ne){return ne!=ne}var Ae=function(){for(var ne="0123456789abcdef",ue=new Array(256),me=0;me<16;++me)for(var we=16*me,Ee=0;Ee<16;++Ee)ue[we+Ee]=ne[me]+ne[Ee];return ue}();function Me(ne){return typeof BigInt>"u"?Ce:ne}function Ce(){throw new Error("BigInt not supported")}},35791:function(D){D.exports=w,D.exports.isMobile=w,D.exports.default=w;var E=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,e=/CrOS/,_=/android|ipad|playbook|silk/i;function w(s){s||(s={});var T=s.ua;if(T||typeof navigator>"u"||(T=navigator.userAgent),T&&T.headers&&typeof T.headers["user-agent"]=="string"&&(T=T.headers["user-agent"]),typeof T!="string")return!1;var m=E.test(T)&&!e.test(T)||!!s.tablet&&_.test(T);return!m&&s.tablet&&s.featureDetect&&navigator&&navigator.maxTouchPoints>1&&T.indexOf("Macintosh")!==-1&&T.indexOf("Safari")!==-1&&(m=!0),m}},86781:function(D,E,e){e.r(E),e.d(E,{sankeyCenter:function(){return r},sankeyCircular:function(){return C},sankeyJustify:function(){return a},sankeyLeft:function(){return l},sankeyRight:function(){return t}});var _=e(33064),w=e(15140),s=e(45879),T=e(2502),m=e.n(T);function f(he){return he.target.depth}function l(he){return he.depth}function t(he,ye){return ye-1-he.height}function a(he,ye){return he.sourceLinks.length?he.depth:ye-1}function r(he){return he.targetLinks.length?he.depth:he.sourceLinks.length?(0,_.VV)(he.sourceLinks,f)-1:0}function n(he){return function(){return he}}var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(he){return typeof he}:function(he){return he&&typeof Symbol=="function"&&he.constructor===Symbol&&he!==Symbol.prototype?"symbol":typeof he};function i(he,ye){return p(he.source,ye.source)||he.index-ye.index}function u(he,ye){return p(he.target,ye.target)||he.index-ye.index}function p(he,ye){return he.partOfCycle===ye.partOfCycle?he.y0-ye.y0:he.circularLinkType==="top"||ye.circularLinkType==="bottom"?-1:1}function c(he){return he.value}function b(he){return(he.y0+he.y1)/2}function d(he){return b(he.source)}function v(he){return b(he.target)}function x(he){return he.index}function g(he){return he.nodes}function y(he){return he.links}function k(he,ye){var ze=he.get(ye);if(!ze)throw new Error("missing: "+ye);return ze}function h(he,ye){return ye(he)}var M=25,A=10;function C(){var he,ye,ze=0,Te=0,Ae=1,Me=1,Ce=24,ne=x,ue=a,me=g,we=y,Ee=32,Ue=2,De=null;function je(){var Ze={nodes:me.apply(null,arguments),links:we.apply(null,arguments)};ge(Ze),L(Ze,0,De),be(Ze),Se(Ze),P(Ze,ne),Ne(Ze,Ee,ne),Ye(Ze);for(var st=4,ot=0;ot0?Ke+M+A:Ke,bottom:Ge=Ge>0?Ge+M+A:Ge,left:ht=ht>0?ht+M+A:ht,right:nt=nt>0?nt+M+A:nt}}(Ze),Nt=function(Je,Ke){var Ge=(0,_.Fp)(Je.nodes,function(Qe){return Qe.column}),nt=Ae-ze,ht=Me-Te,Oe=nt/(nt+Ke.right+Ke.left),Be=ht/(ht+Ke.top+Ke.bottom);return ze=ze*Oe+Ke.left,Ae=Ke.right==0?Ae:Ae*Oe,Te=Te*Be+Ke.top,Me*=Be,Je.nodes.forEach(function(Qe){Qe.x0=ze+Qe.column*((Ae-ze-Ce)/Ge),Qe.x1=Qe.x0+Ce}),Be}(Ze,qt);Ft*=Nt,Ze.links.forEach(function(Je){Je.width=Je.value*Ft}),ft.forEach(function(Je){var Ke=Je.length;Je.forEach(function(Ge,nt){Ge.depth==ft.length-1&&Ke==1||Ge.depth==0&&Ke==1?(Ge.y0=Me/2-Ge.value*Ft,Ge.y1=Ge.y0+Ge.value*Ft):Ge.partOfCycle?R(Ge,Dt)==0?(Ge.y0=Me/2+nt,Ge.y1=Ge.y0+Ge.value*Ft):Ge.circularLinkType=="top"?(Ge.y0=Te+nt,Ge.y1=Ge.y0+Ge.value*Ft):(Ge.y0=Me-Ge.value*Ft-nt,Ge.y1=Ge.y0+Ge.value*Ft):qt.top==0||qt.bottom==0?(Ge.y0=(Me-Te)/Ke*nt,Ge.y1=Ge.y0+Ge.value*Ft):(Ge.y0=(Me-Te)/2-Ke/2+nt,Ge.y1=Ge.y0+Ge.value*Ft)})})})(ot),xt();for(var yt=1,Et=st;Et>0;--Et)Tt(yt*=.99,ot),xt();function Tt(Dt,It){var Ft=ft.length;ft.forEach(function(qt){var Nt=qt.length,Je=qt[0].depth;qt.forEach(function(Ke){var Ge;if((Ke.sourceLinks.length||Ke.targetLinks.length)&&!(Ke.partOfCycle&&R(Ke,It)>0))if(Je==0&&Nt==1)Ge=Ke.y1-Ke.y0,Ke.y0=Me/2-Ge/2,Ke.y1=Me/2+Ge/2;else if(Je==Ft-1&&Nt==1)Ge=Ke.y1-Ke.y0,Ke.y0=Me/2-Ge/2,Ke.y1=Me/2+Ge/2;else{var nt=(0,_.J6)(Ke.sourceLinks,v),ht=(0,_.J6)(Ke.targetLinks,d),Oe=((nt&&ht?(nt+ht)/2:nt||ht)-b(Ke))*Dt;Ke.y0+=Oe,Ke.y1+=Oe}})})}function xt(){ft.forEach(function(Dt){var It,Ft,qt,Nt=Te,Je=Dt.length;for(Dt.sort(p),qt=0;qt0&&(It.y0+=Ft,It.y1+=Ft),Nt=It.y1+he;if((Ft=Nt-he-Me)>0)for(Nt=It.y0-=Ft,It.y1-=Ft,qt=Je-2;qt>=0;--qt)(Ft=(It=Dt[qt]).y1+he-Nt)>0&&(It.y0-=Ft,It.y1-=Ft),Nt=It.y0})}}function Ye(Ze){Ze.nodes.forEach(function(st){st.sourceLinks.sort(u),st.targetLinks.sort(i)}),Ze.nodes.forEach(function(st){var ot=st.y0,ft=ot,yt=st.y1,Et=yt;st.sourceLinks.forEach(function(Tt){Tt.circular?(Tt.y0=yt-Tt.width/2,yt-=Tt.width):(Tt.y0=ot+Tt.width/2,ot+=Tt.width)}),st.targetLinks.forEach(function(Tt){Tt.circular?(Tt.y1=Et-Tt.width/2,Et-=Tt.width):(Tt.y1=ft+Tt.width/2,ft+=Tt.width)})})}return je.nodeId=function(Ze){return arguments.length?(ne=typeof Ze=="function"?Ze:n(Ze),je):ne},je.nodeAlign=function(Ze){return arguments.length?(ue=typeof Ze=="function"?Ze:n(Ze),je):ue},je.nodeWidth=function(Ze){return arguments.length?(Ce=+Ze,je):Ce},je.nodePadding=function(Ze){return arguments.length?(he=+Ze,je):he},je.nodes=function(Ze){return arguments.length?(me=typeof Ze=="function"?Ze:n(Ze),je):me},je.links=function(Ze){return arguments.length?(we=typeof Ze=="function"?Ze:n(Ze),je):we},je.size=function(Ze){return arguments.length?(ze=Te=0,Ae=+Ze[0],Me=+Ze[1],je):[Ae-ze,Me-Te]},je.extent=function(Ze){return arguments.length?(ze=+Ze[0][0],Ae=+Ze[1][0],Te=+Ze[0][1],Me=+Ze[1][1],je):[[ze,Te],[Ae,Me]]},je.iterations=function(Ze){return arguments.length?(Ee=+Ze,je):Ee},je.circularLinkGap=function(Ze){return arguments.length?(Ue=+Ze,je):Ue},je.nodePaddingRatio=function(Ze){return arguments.length?(ye=+Ze,je):ye},je.sortNodes=function(Ze){return arguments.length?(De=Ze,je):De},je.update=function(Ze){return P(Ze,ne),Ye(Ze),Ze.links.forEach(function(st){st.circular&&(st.circularLinkType=st.y0+st.y11||Ae>1)}function B(he,ye,ze){return he.sort(N),he.forEach(function(Te,Ae){var Me,Ce,ne=0;if(pe(Te,ze)&&U(Te))Te.circularPathData.verticalBuffer=ne+Te.width/2;else{for(var ue=0;ueCe.source.column)){var me=he[ue].circularPathData.verticalBuffer+he[ue].width/2+ye;ne=me>ne?me:ne}Te.circularPathData.verticalBuffer=ne+Te.width/2}}),he}function G(he,ye,ze,Te){var Ae=(0,_.VV)(he.links,function(Me){return Me.source.y0});he.links.forEach(function(Me){Me.circular&&(Me.circularPathData={})}),B(he.links.filter(function(Me){return Me.circularLinkType=="top"}),ye,Te),B(he.links.filter(function(Me){return Me.circularLinkType=="bottom"}),ye,Te),he.links.forEach(function(Me){if(Me.circular){if(Me.circularPathData.arcRadius=Me.width+A,Me.circularPathData.leftNodeBuffer=5,Me.circularPathData.rightNodeBuffer=5,Me.circularPathData.sourceWidth=Me.source.x1-Me.source.x0,Me.circularPathData.sourceX=Me.source.x0+Me.circularPathData.sourceWidth,Me.circularPathData.targetX=Me.target.x0,Me.circularPathData.sourceY=Me.y0,Me.circularPathData.targetY=Me.y1,pe(Me,Te)&&U(Me))Me.circularPathData.leftSmallArcRadius=A+Me.width/2,Me.circularPathData.leftLargeArcRadius=A+Me.width/2,Me.circularPathData.rightSmallArcRadius=A+Me.width/2,Me.circularPathData.rightLargeArcRadius=A+Me.width/2,Me.circularLinkType=="bottom"?(Me.circularPathData.verticalFullExtent=Me.source.y1+M+Me.circularPathData.verticalBuffer,Me.circularPathData.verticalLeftInnerExtent=Me.circularPathData.verticalFullExtent-Me.circularPathData.leftLargeArcRadius,Me.circularPathData.verticalRightInnerExtent=Me.circularPathData.verticalFullExtent-Me.circularPathData.rightLargeArcRadius):(Me.circularPathData.verticalFullExtent=Me.source.y0-M-Me.circularPathData.verticalBuffer,Me.circularPathData.verticalLeftInnerExtent=Me.circularPathData.verticalFullExtent+Me.circularPathData.leftLargeArcRadius,Me.circularPathData.verticalRightInnerExtent=Me.circularPathData.verticalFullExtent+Me.circularPathData.rightLargeArcRadius);else{var Ce=Me.source.column,ne=Me.circularLinkType,ue=he.links.filter(function(Ee){return Ee.source.column==Ce&&Ee.circularLinkType==ne});Me.circularLinkType=="bottom"?ue.sort(V):ue.sort(j);var me=0;ue.forEach(function(Ee,Ue){Ee.circularLinkID==Me.circularLinkID&&(Me.circularPathData.leftSmallArcRadius=A+Me.width/2+me,Me.circularPathData.leftLargeArcRadius=A+Me.width/2+Ue*ye+me),me+=Ee.width}),Ce=Me.target.column,ue=he.links.filter(function(Ee){return Ee.target.column==Ce&&Ee.circularLinkType==ne}),Me.circularLinkType=="bottom"?ue.sort(ee):ue.sort(H),me=0,ue.forEach(function(Ee,Ue){Ee.circularLinkID==Me.circularLinkID&&(Me.circularPathData.rightSmallArcRadius=A+Me.width/2+me,Me.circularPathData.rightLargeArcRadius=A+Me.width/2+Ue*ye+me),me+=Ee.width}),Me.circularLinkType=="bottom"?(Me.circularPathData.verticalFullExtent=Math.max(ze,Me.source.y1,Me.target.y1)+M+Me.circularPathData.verticalBuffer,Me.circularPathData.verticalLeftInnerExtent=Me.circularPathData.verticalFullExtent-Me.circularPathData.leftLargeArcRadius,Me.circularPathData.verticalRightInnerExtent=Me.circularPathData.verticalFullExtent-Me.circularPathData.rightLargeArcRadius):(Me.circularPathData.verticalFullExtent=Ae-M-Me.circularPathData.verticalBuffer,Me.circularPathData.verticalLeftInnerExtent=Me.circularPathData.verticalFullExtent+Me.circularPathData.leftLargeArcRadius,Me.circularPathData.verticalRightInnerExtent=Me.circularPathData.verticalFullExtent+Me.circularPathData.rightLargeArcRadius)}Me.circularPathData.leftInnerExtent=Me.circularPathData.sourceX+Me.circularPathData.leftNodeBuffer,Me.circularPathData.rightInnerExtent=Me.circularPathData.targetX-Me.circularPathData.rightNodeBuffer,Me.circularPathData.leftFullExtent=Me.circularPathData.sourceX+Me.circularPathData.leftLargeArcRadius+Me.circularPathData.leftNodeBuffer,Me.circularPathData.rightFullExtent=Me.circularPathData.targetX-Me.circularPathData.rightLargeArcRadius-Me.circularPathData.rightNodeBuffer}if(Me.circular)Me.path=function(Ee){return Ee.circularLinkType=="top"?"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:"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}(Me);else{var we=(0,s.h5)().source(function(Ee){return[Ee.source.x0+(Ee.source.x1-Ee.source.x0),Ee.y0]}).target(function(Ee){return[Ee.target.x0,Ee.y1]});Me.path=we(Me)}})}function N(he,ye){return Q(he)==Q(ye)?he.circularLinkType=="bottom"?V(he,ye):j(he,ye):Q(ye)-Q(he)}function j(he,ye){return he.y0-ye.y0}function V(he,ye){return ye.y0-he.y0}function H(he,ye){return he.y1-ye.y1}function ee(he,ye){return ye.y1-he.y1}function Q(he){return he.target.column-he.source.column}function X(he){return he.target.x0-he.source.x1}function Y(he,ye){var ze=I(he),Te=X(ye)/Math.tan(ze);return xe(he)=="up"?he.y1+Te:he.y1-Te}function K(he,ye){var ze=I(he),Te=X(ye)/Math.tan(ze);return xe(he)=="up"?he.y1-Te:he.y1+Te}function te(he,ye,ze,Te){he.links.forEach(function(Ae){if(!Ae.circular&&Ae.target.column-Ae.source.column>1){var Me=Ae.source.column+1,Ce=Ae.target.column-1,ne=1,ue=Ce-Me+1;for(ne=1;Me<=Ce;Me++,ne++)he.nodes.forEach(function(me){if(me.column==Me){var we,Ee=ne/(ue+1),Ue=Math.pow(1-Ee,3),De=3*Ee*Math.pow(1-Ee,2),je=3*Math.pow(Ee,2)*(1-Ee),ge=Math.pow(Ee,3),be=Ue*Ae.y0+De*Ae.y0+je*Ae.y1+ge*Ae.y1,Se=be-Ae.width/2,Ne=be+Ae.width/2;Se>me.y0&&Sest.y0&&Ze.y0st.y0&&Ze.y1st.y1)&&re(Ye,we,ye,ze)})):(Ne>me.y0&&Neme.y1)&&(we=Ne-me.y0+10,me=re(me,we,ye,ze),he.nodes.forEach(function(Ye){h(Ye,Te)!=h(me,Te)&&Ye.column==me.column&&Ye.y0me.y1&&re(Ye,we,ye,ze)}))}})}})}function re(he,ye,ze,Te){return he.y0+ye>=ze&&he.y1+ye<=Te&&(he.y0=he.y0+ye,he.y1=he.y1+ye,he.targetLinks.forEach(function(Ae){Ae.y1=Ae.y1+ye}),he.sourceLinks.forEach(function(Ae){Ae.y0=Ae.y0+ye})),he}function oe(he,ye,ze,Te){he.nodes.forEach(function(Ae){Te&&Ae.y+(Ae.y1-Ae.y0)>ye&&(Ae.y=Ae.y-(Ae.y+(Ae.y1-Ae.y0)-ye));var Me=he.links.filter(function(ue){return h(ue.source,ze)==h(Ae,ze)}),Ce=Me.length;Ce>1&&Me.sort(function(ue,me){if(!ue.circular&&!me.circular){if(ue.target.column==me.target.column||!ce(ue,me))return ue.y1-me.y1;if(ue.target.column>me.target.column){var we=K(me,ue);return ue.y1-we}if(me.target.column>ue.target.column)return K(ue,me)-me.y1}return ue.circular&&!me.circular?ue.circularLinkType=="top"?-1:1:me.circular&&!ue.circular?me.circularLinkType=="top"?1:-1:ue.circular&&me.circular?ue.circularLinkType===me.circularLinkType&&ue.circularLinkType=="top"?ue.target.column===me.target.column?ue.target.y1-me.target.y1:me.target.column-ue.target.column:ue.circularLinkType===me.circularLinkType&&ue.circularLinkType=="bottom"?ue.target.column===me.target.column?me.target.y1-ue.target.y1:ue.target.column-me.target.column:ue.circularLinkType=="top"?-1:1:void 0});var ne=Ae.y0;Me.forEach(function(ue){ue.y0=ne+ue.width/2,ne+=ue.width}),Me.forEach(function(ue,me){if(ue.circularLinkType=="bottom"){for(var we=me+1,Ee=0;we1&&Ae.sort(function(ne,ue){if(!ne.circular&&!ue.circular){if(ne.source.column==ue.source.column||!ce(ne,ue))return ne.y0-ue.y0;if(ue.source.column0?"up":"down"}function pe(he,ye){return h(he.source,ye)==h(he.target,ye)}function de(he,ye,ze){var Te=he.nodes,Ae=he.links,Me=!1,Ce=!1;if(Ae.forEach(function(me){me.circularLinkType=="top"?Me=!0:me.circularLinkType=="bottom"&&(Ce=!0)}),Me==0||Ce==0){var ne=(0,_.VV)(Te,function(me){return me.y0}),ue=(ze-ye)/((0,_.Fp)(Te,function(me){return me.y1})-ne);Te.forEach(function(me){var we=(me.y1-me.y0)*ue;me.y0=(me.y0-ne)*ue,me.y1=me.y0+we}),Ae.forEach(function(me){me.y0=(me.y0-ne)*ue,me.y1=(me.y1-ne)*ue,me.width=me.width*ue})}}},30838:function(D,E,e){e.r(E),e.d(E,{sankey:function(){return x},sankeyCenter:function(){return l},sankeyJustify:function(){return f},sankeyLeft:function(){return T},sankeyLinkHorizontal:function(){return h},sankeyRight:function(){return m}});var _=e(33064),w=e(15140);function s(M){return M.target.depth}function T(M){return M.depth}function m(M,A){return A-1-M.height}function f(M,A){return M.sourceLinks.length?M.depth:A-1}function l(M){return M.targetLinks.length?M.depth:M.sourceLinks.length?(0,_.VV)(M.sourceLinks,s)-1:0}function t(M){return function(){return M}}function a(M,A){return n(M.source,A.source)||M.index-A.index}function r(M,A){return n(M.target,A.target)||M.index-A.index}function n(M,A){return M.y0-A.y0}function o(M){return M.value}function i(M){return(M.y0+M.y1)/2}function u(M){return i(M.source)*M.value}function p(M){return i(M.target)*M.value}function c(M){return M.index}function b(M){return M.nodes}function d(M){return M.links}function v(M,A){var C=M.get(A);if(!C)throw new Error("missing: "+A);return C}function x(){var M=0,A=0,C=1,L=1,P=24,I=8,R=c,U=f,B=b,G=d,N=32;function j(){var Y={nodes:B.apply(null,arguments),links:G.apply(null,arguments)};return V(Y),H(Y),ee(Y),Q(Y),X(Y),Y}function V(Y){Y.nodes.forEach(function(te,re){te.index=re,te.sourceLinks=[],te.targetLinks=[]});var K=(0,w.UI)(Y.nodes,R);Y.links.forEach(function(te,re){te.index=re;var oe=te.source,se=te.target;typeof oe!="object"&&(oe=te.source=v(K,oe)),typeof se!="object"&&(se=te.target=v(K,se)),oe.sourceLinks.push(te),se.targetLinks.push(te)})}function H(Y){Y.nodes.forEach(function(K){K.value=Math.max((0,_.Sm)(K.sourceLinks,o),(0,_.Sm)(K.targetLinks,o))})}function ee(Y){var K,te,re;for(K=Y.nodes,te=[],re=0;K.length;++re,K=te,te=[])K.forEach(function(se){se.depth=re,se.sourceLinks.forEach(function(ce){te.indexOf(ce.target)<0&&te.push(ce.target)})});for(K=Y.nodes,te=[],re=0;K.length;++re,K=te,te=[])K.forEach(function(se){se.height=re,se.targetLinks.forEach(function(ce){te.indexOf(ce.source)<0&&te.push(ce.source)})});var oe=(C-M-P)/(re-1);Y.nodes.forEach(function(se){se.x1=(se.x0=M+Math.max(0,Math.min(re-1,Math.floor(U.call(null,se,re))))*oe)+P})}function Q(Y){var K=(0,w.b1)().key(function(xe){return xe.x0}).sortKeys(_.j2).entries(Y.nodes).map(function(xe){return xe.values});(function(){var xe=(0,_.Fp)(K,function(he){return he.length}),pe=.6666666666666666*(L-A)/(xe-1);I>pe&&(I=pe);var de=(0,_.VV)(K,function(he){return(L-A-(he.length-1)*I)/(0,_.Sm)(he,o)});K.forEach(function(he){he.forEach(function(ye,ze){ye.y1=(ye.y0=ze)+ye.value*de})}),Y.links.forEach(function(he){he.width=he.value*de})})(),ce();for(var te=1,re=N;re>0;--re)se(te*=.99),ce(),oe(te),ce();function oe(xe){K.forEach(function(pe){pe.forEach(function(de){if(de.targetLinks.length){var he=((0,_.Sm)(de.targetLinks,u)/(0,_.Sm)(de.targetLinks,o)-i(de))*xe;de.y0+=he,de.y1+=he}})})}function se(xe){K.slice().reverse().forEach(function(pe){pe.forEach(function(de){if(de.sourceLinks.length){var he=((0,_.Sm)(de.sourceLinks,p)/(0,_.Sm)(de.sourceLinks,o)-i(de))*xe;de.y0+=he,de.y1+=he}})})}function ce(){K.forEach(function(xe){var pe,de,he,ye=A,ze=xe.length;for(xe.sort(n),he=0;he0&&(pe.y0+=de,pe.y1+=de),ye=pe.y1+I;if((de=ye-I-L)>0)for(ye=pe.y0-=de,pe.y1-=de,he=ze-2;he>=0;--he)(de=(pe=xe[he]).y1+I-ye)>0&&(pe.y0-=de,pe.y1-=de),ye=pe.y0})}}function X(Y){Y.nodes.forEach(function(K){K.sourceLinks.sort(r),K.targetLinks.sort(a)}),Y.nodes.forEach(function(K){var te=K.y0,re=te;K.sourceLinks.forEach(function(oe){oe.y0=te+oe.width/2,te+=oe.width}),K.targetLinks.forEach(function(oe){oe.y1=re+oe.width/2,re+=oe.width})})}return j.update=function(Y){return X(Y),Y},j.nodeId=function(Y){return arguments.length?(R=typeof Y=="function"?Y:t(Y),j):R},j.nodeAlign=function(Y){return arguments.length?(U=typeof Y=="function"?Y:t(Y),j):U},j.nodeWidth=function(Y){return arguments.length?(P=+Y,j):P},j.nodePadding=function(Y){return arguments.length?(I=+Y,j):I},j.nodes=function(Y){return arguments.length?(B=typeof Y=="function"?Y:t(Y),j):B},j.links=function(Y){return arguments.length?(G=typeof Y=="function"?Y:t(Y),j):G},j.size=function(Y){return arguments.length?(M=A=0,C=+Y[0],L=+Y[1],j):[C-M,L-A]},j.extent=function(Y){return arguments.length?(M=+Y[0][0],C=+Y[1][0],A=+Y[0][1],L=+Y[1][1],j):[[M,A],[C,L]]},j.iterations=function(Y){return arguments.length?(N=+Y,j):N},j}var g=e(45879);function y(M){return[M.source.x1,M.y0]}function k(M){return[M.target.x0,M.y1]}function h(){return(0,g.h5)().source(y).target(k)}},39898:function(D,E,e){var _,w;(function(){var s={version:"3.8.0"},T=[].slice,m=function(ie){return T.call(ie)},f=self.document;function l(ie){return ie&&(ie.ownerDocument||ie.document||ie).documentElement}function t(ie){return ie&&(ie.ownerDocument&&ie.ownerDocument.defaultView||ie.document&&ie||ie.defaultView)}if(f)try{m(f.documentElement.childNodes)[0].nodeType}catch{m=function(ve){for(var Le=ve.length,Fe=new Array(Le);Le--;)Fe[Le]=ve[Le];return Fe}}if(Date.now||(Date.now=function(){return+new Date}),f)try{f.createElement("DIV").style.setProperty("opacity",0,"")}catch{var a=this.Element.prototype,r=a.setAttribute,n=a.setAttributeNS,o=this.CSSStyleDeclaration.prototype,i=o.setProperty;a.setAttribute=function(ve,Le){r.call(this,ve,Le+"")},a.setAttributeNS=function(ve,Le,Fe){n.call(this,ve,Le,Fe+"")},o.setProperty=function(ve,Le,Fe){i.call(this,ve,Le+"",Fe)}}function u(ie,ve){return ieve?1:ie>=ve?0:NaN}function p(ie){return ie===null?NaN:+ie}function c(ie){return!isNaN(ie)}function b(ie){return{left:function(ve,Le,Fe,Ve){for(arguments.length<3&&(Fe=0),arguments.length<4&&(Ve=ve.length);Fe>>1;ie(ve[We],Le)<0?Fe=We+1:Ve=We}return Fe},right:function(ve,Le,Fe,Ve){for(arguments.length<3&&(Fe=0),arguments.length<4&&(Ve=ve.length);Fe>>1;ie(ve[We],Le)>0?Ve=We:Fe=We+1}return Fe}}}s.ascending=u,s.descending=function(ie,ve){return veie?1:ve>=ie?0:NaN},s.min=function(ie,ve){var Le,Fe,Ve=-1,We=ie.length;if(arguments.length===1){for(;++Ve=Fe){Le=Fe;break}for(;++VeFe&&(Le=Fe)}else{for(;++Ve=Fe){Le=Fe;break}for(;++VeFe&&(Le=Fe)}return Le},s.max=function(ie,ve){var Le,Fe,Ve=-1,We=ie.length;if(arguments.length===1){for(;++Ve=Fe){Le=Fe;break}for(;++VeLe&&(Le=Fe)}else{for(;++Ve=Fe){Le=Fe;break}for(;++VeLe&&(Le=Fe)}return Le},s.extent=function(ie,ve){var Le,Fe,Ve,We=-1,$e=ie.length;if(arguments.length===1){for(;++We<$e;)if((Fe=ie[We])!=null&&Fe>=Fe){Le=Ve=Fe;break}for(;++We<$e;)(Fe=ie[We])!=null&&(Le>Fe&&(Le=Fe),Ve=Fe){Le=Ve=Fe;break}for(;++We<$e;)(Fe=ve.call(ie,ie[We],We))!=null&&(Le>Fe&&(Le=Fe),Ve1)return $e/(lt-1)},s.deviation=function(){var ie=s.variance.apply(this,arguments);return ie&&Math.sqrt(ie)};var d=b(u);function v(ie){return ie.length}s.bisectLeft=d.left,s.bisect=s.bisectRight=d.right,s.bisector=function(ie){return b(ie.length===1?function(ve,Le){return u(ie(ve),Le)}:ie)},s.shuffle=function(ie,ve,Le){(We=arguments.length)<3&&(Le=ie.length,We<2&&(ve=0));for(var Fe,Ve,We=Le-ve;We;)Ve=Math.random()*We--|0,Fe=ie[We+ve],ie[We+ve]=ie[Ve+ve],ie[Ve+ve]=Fe;return ie},s.permute=function(ie,ve){for(var Le=ve.length,Fe=new Array(Le);Le--;)Fe[Le]=ie[ve[Le]];return Fe},s.pairs=function(ie){for(var ve=0,Le=ie.length-1,Fe=ie[0],Ve=new Array(Le<0?0:Le);ve=0;)for(ve=(Fe=ie[Ve]).length;--ve>=0;)Le[--$e]=Fe[ve];return Le};var x=Math.abs;function g(ie){for(var ve=1;ie*ve%1;)ve*=10;return ve}function y(ie,ve){for(var Le in ve)Object.defineProperty(ie.prototype,Le,{value:ve[Le],enumerable:!1})}function k(){this._=Object.create(null)}function h(ie){return(ie+="")=="__proto__"||ie[0]==="\0"?"\0"+ie:ie}function M(ie){return(ie+="")[0]==="\0"?ie.slice(1):ie}function A(ie){return h(ie)in this._}function C(ie){return(ie=h(ie))in this._&&delete this._[ie]}function L(){var ie=[];for(var ve in this._)ie.push(M(ve));return ie}function P(){var ie=0;for(var ve in this._)++ie;return ie}function I(){for(var ie in this._)return!1;return!0}function R(){this._=Object.create(null)}function U(ie){return ie}function B(ie,ve,Le){return function(){var Fe=Le.apply(ve,arguments);return Fe===ve?ie:Fe}}function G(ie,ve){if(ve in ie)return ve;ve=ve.charAt(0).toUpperCase()+ve.slice(1);for(var Le=0,Fe=N.length;Leve;)Ve.push(Fe/We);else for(;(Fe=ie+Le*++$e)=Fe.length)return ve?ve.call(Le,lt):ie?lt.sort(ie):lt;for(var zt,Ut,Vt,Qt,gn=-1,en=lt.length,sn=Fe[gt++],rn=new k;++gn=Fe.length)return tt;var gt=[],zt=Ve[lt++];return tt.forEach(function(Ut,Vt){gt.push({key:Ut,values:$e(Vt,lt)})}),zt?gt.sort(function(Ut,Vt){return zt(Ut.key,Vt.key)}):gt}return Le.map=function(tt,lt){return We(lt,tt,0)},Le.entries=function(tt){return $e(We(s.map,tt,0),0)},Le.key=function(tt){return Fe.push(tt),Le},Le.sortKeys=function(tt){return Ve[Fe.length-1]=tt,Le},Le.sortValues=function(tt){return ie=tt,Le},Le.rollup=function(tt){return ve=tt,Le},Le},s.set=function(ie){var ve=new R;if(ie)for(var Le=0,Fe=ie.length;Le=0&&(Fe=ie.slice(Le+1),ie=ie.slice(0,Le)),ie)return arguments.length<2?this[ie].on(Fe):this[ie].on(Fe,ve);if(arguments.length===2){if(ve==null)for(ie in this)this.hasOwnProperty(ie)&&this[ie].on(Fe,null);return this}},s.event=null,s.requote=function(ie){return ie.replace(Y,"\\$&")};var Y=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,K={}.__proto__?function(ie,ve){ie.__proto__=ve}:function(ie,ve){for(var Le in ve)ie[Le]=ve[Le]};function te(ie){return K(ie,ce),ie}var re=function(ie,ve){return ve.querySelector(ie)},oe=function(ie,ve){return ve.querySelectorAll(ie)},se=function(ie,ve){var Le=ie.matches||ie[G(ie,"matchesSelector")];return se=function(Fe,Ve){return Le.call(Fe,Ve)},se(ie,ve)};typeof Sizzle=="function"&&(re=function(ie,ve){return Sizzle(ie,ve)[0]||null},oe=Sizzle,se=Sizzle.matchesSelector),s.selection=function(){return s.select(f.documentElement)};var ce=s.selection.prototype=[];function xe(ie){return typeof ie=="function"?ie:function(){return re(ie,this)}}function pe(ie){return typeof ie=="function"?ie:function(){return oe(ie,this)}}ce.select=function(ie){var ve,Le,Fe,Ve,We=[];ie=xe(ie);for(var $e=-1,tt=this.length;++$e=0&&(Le=ie.slice(0,ve))!=="xmlns"&&(ie=ie.slice(ve+1)),he.hasOwnProperty(Le)?{space:he[Le],local:ie}:ie}},ce.attr=function(ie,ve){if(arguments.length<2){if(typeof ie=="string"){var Le=this.node();return(ie=s.ns.qualify(ie)).local?Le.getAttributeNS(ie.space,ie.local):Le.getAttribute(ie)}for(ve in ie)this.each(ye(ve,ie[ve]));return this}return this.each(ye(ie,ve))},ce.classed=function(ie,ve){if(arguments.length<2){if(typeof ie=="string"){var Le=this.node(),Fe=(ie=Ae(ie)).length,Ve=-1;if(ve=Le.classList){for(;++Ve=0;)(Le=Fe[Ve])&&(We&&We!==Le.nextSibling&&We.parentNode.insertBefore(Le,We),We=Le);return this},ce.sort=function(ie){ie=De.apply(this,arguments);for(var ve=-1,Le=this.length;++ve=ve&&(ve=Ve+1);!($e=tt[ve])&&++ve0&&(ie=ie.slice(0,Ve));var $e=Ye.get(ie);function tt(){var lt=this[Fe];lt&&(this.removeEventListener(ie,lt,lt.$),delete this[Fe])}return $e&&(ie=$e,We=st),Ve?ve?function(){var lt=We(ve,m(arguments));tt.call(this),this.addEventListener(ie,this[Fe]=lt,lt.$=Le),lt._=ve}:tt:ve?j:function(){var lt,gt=new RegExp("^__on([^.]+)"+s.requote(ie)+"$");for(var zt in this)if(lt=zt.match(gt)){var Ut=this[zt];this.removeEventListener(lt[1],Ut,Ut.$),delete this[zt]}}}s.selection.enter=ge,s.selection.enter.prototype=be,be.append=ce.append,be.empty=ce.empty,be.node=ce.node,be.call=ce.call,be.size=ce.size,be.select=function(ie){for(var ve,Le,Fe,Ve,We,$e=[],tt=-1,lt=this.length;++tt1?Nt:ie<-1?-Nt:Math.asin(ie)}function nt(ie){return((ie=Math.exp(ie))+1/ie)/2}var ht=Math.SQRT2;s.interpolateZoom=function(ie,ve){var Le,Fe,Ve=ie[0],We=ie[1],$e=ie[2],tt=ve[0],lt=ve[1],gt=ve[2],zt=tt-Ve,Ut=lt-We,Vt=zt*zt+Ut*Ut;if(Vt<1e-12)Fe=Math.log(gt/$e)/ht,Le=function(Mn){return[Ve+Mn*zt,We+Mn*Ut,$e*Math.exp(ht*Mn*Fe)]};else{var Qt=Math.sqrt(Vt),gn=(gt*gt-$e*$e+4*Vt)/(2*$e*2*Qt),en=(gt*gt-$e*$e-4*Vt)/(2*gt*2*Qt),sn=Math.log(Math.sqrt(gn*gn+1)-gn),rn=Math.log(Math.sqrt(en*en+1)-en);Fe=(rn-sn)/ht,Le=function(Mn){var xn,an=Mn*Fe,zn=nt(sn),Un=$e/(2*Qt)*(zn*(xn=ht*an+sn,((xn=Math.exp(2*xn))-1)/(xn+1))-function(nr){return((nr=Math.exp(nr))-1/nr)/2}(sn));return[Ve+Un*zt,We+Un*Ut,$e*zn/nt(ht*an+sn)]}}return Le.duration=1e3*Fe,Le},s.behavior.zoom=function(){var ie,ve,Le,Fe,Ve,We,$e,tt,lt,gt={x:0,y:0,k:1},zt=[960,500],Ut=Qe,Vt=250,Qt=0,gn="mousedown.zoom",en="mousemove.zoom",sn="mouseup.zoom",rn="touchstart.zoom",Mn=X(xn,"zoomstart","zoom","zoomend");function xn(xr){xr.on(gn,_r).on(Be+".zoom",Jr).on("dblclick.zoom",Kr).on(rn,Rr)}function an(xr){return[(xr[0]-gt.x)/gt.k,(xr[1]-gt.y)/gt.k]}function zn(xr){gt.k=Math.max(Ut[0],Math.min(Ut[1],xr))}function Un(xr,zr){zr=function(Wr){return[Wr[0]*gt.k+gt.x,Wr[1]*gt.k+gt.y]}(zr),gt.x+=xr[0]-zr[0],gt.y+=xr[1]-zr[1]}function nr(xr,zr,Wr,Gr){xr.__chart__={x:gt.x,y:gt.y,k:gt.k},zn(Math.pow(2,Gr)),Un(ve=zr,Wr),xr=s.select(xr),Vt>0&&(xr=xr.transition().duration(Vt)),xr.call(xn.event)}function rr(){$e&&$e.domain(We.range().map(function(xr){return(xr-gt.x)/gt.k}).map(We.invert)),lt&<.domain(tt.range().map(function(xr){return(xr-gt.y)/gt.k}).map(tt.invert))}function wr(xr){Qt++||xr({type:"zoomstart"})}function kr(xr){rr(),xr({type:"zoom",scale:gt.k,translate:[gt.x,gt.y]})}function mr(xr){--Qt||(xr({type:"zoomend"}),ve=null)}function _r(){var xr=this,zr=Mn.of(xr,arguments),Wr=0,Gr=s.select(t(xr)).on(en,ui).on(sn,ki),ii=an(s.mouse(xr)),ni=yt(xr);function ui(){Wr=1,Un(s.mouse(xr),ii),kr(zr)}function ki(){Gr.on(en,null).on(sn,null),ni(Wr),mr(zr)}Si.call(xr),wr(zr)}function Rr(){var xr,zr=this,Wr=Mn.of(zr,arguments),Gr={},ii=0,ni=".zoom-"+s.event.changedTouches[0].identifier,ui="touchmove"+ni,ki="touchend"+ni,Ii=[],Ei=s.select(zr),wi=yt(zr);function Ai(){var ta=s.touches(zr);return xr=gt.k,ta.forEach(function(Yr){Yr.identifier in Gr&&(Gr[Yr.identifier]=an(Yr))}),ta}function Ci(){var ta=s.event.target;s.select(ta).on(ui,qi).on(ki,_s),Ii.push(ta);for(var Yr=s.event.changedTouches,pa=0,wa=Yr.length;pa1){ai=Ui[0];var na=Ui[1],Ba=ai[0]-na[0],Kl=ai[1]-na[1];ii=Ba*Ba+Kl*Kl}}function qi(){var ta,Yr,pa,wa,Ui=s.touches(zr);Si.call(zr);for(var ko=0,ai=Ui.length;ko360?tt-=360:tt<0&&(tt+=360),tt<60?Fe+(Ve-Fe)*tt/60:tt<180?Ve:tt<240?Fe+(Ve-Fe)*(240-tt)/60:Fe}($e))}return ie=isNaN(ie)?0:(ie%=360)<0?ie+360:ie,ve=isNaN(ve)||ve<0?0:ve>1?1:ve,Fe=2*(Le=Le<0?0:Le>1?1:Le)-(Ve=Le<=.5?Le*(1+ve):Le+ve-Le*ve),new kn(We(ie+120),We(ie),We(ie-120))}function Ct(ie,ve,Le){return this instanceof Ct?(this.h=+ie,this.c=+ve,void(this.l=+Le)):arguments.length<2?ie instanceof Ct?new Ct(ie.h,ie.c,ie.l):Kt(ie instanceof _t?ie.l:(ie=In((ie=s.rgb(ie)).r,ie.g,ie.b)).l,ie.a,ie.b):new Ct(ie,ve,Le)}bt.brighter=function(ie){return ie=Math.pow(.7,arguments.length?ie:1),new pt(this.h,this.s,this.l/ie)},bt.darker=function(ie){return ie=Math.pow(.7,arguments.length?ie:1),new pt(this.h,this.s,ie*this.l)},bt.rgb=function(){return Lt(this.h,this.s,this.l)},s.hcl=Ct;var mt=Ct.prototype=new ut;function Ot(ie,ve,Le){return isNaN(ie)&&(ie=0),isNaN(ve)&&(ve=0),new _t(Le,Math.cos(ie*=Je)*ve,Math.sin(ie)*ve)}function _t(ie,ve,Le){return this instanceof _t?(this.l=+ie,this.a=+ve,void(this.b=+Le)):arguments.length<2?ie instanceof _t?new _t(ie.l,ie.a,ie.b):ie instanceof Ct?Ot(ie.h,ie.c,ie.l):In((ie=kn(ie)).r,ie.g,ie.b):new _t(ie,ve,Le)}mt.brighter=function(ie){return new Ct(this.h,this.c,Math.min(100,this.l+Pt*(arguments.length?ie:1)))},mt.darker=function(ie){return new Ct(this.h,this.c,Math.max(0,this.l-Pt*(arguments.length?ie:1)))},mt.rgb=function(){return Ot(this.h,this.c,this.l).rgb()},s.lab=_t;var Pt=18,Bt=.95047,Wt=1.08883,Gt=_t.prototype=new ut;function Xt(ie,ve,Le){var Fe=(ie+16)/116,Ve=Fe+ve/500,We=Fe-Le/200;return new kn(ln(3.2404542*(Ve=nn(Ve)*Bt)-1.5371385*(Fe=1*nn(Fe))-.4985314*(We=nn(We)*Wt)),ln(-.969266*Ve+1.8760108*Fe+.041556*We),ln(.0556434*Ve-.2040259*Fe+1.0572252*We))}function Kt(ie,ve,Le){return ie>0?new Ct(Math.atan2(Le,ve)*Ke,Math.sqrt(ve*ve+Le*Le),ie):new Ct(NaN,NaN,ie)}function nn(ie){return ie>.206893034?ie*ie*ie:(ie-.13793103448275862)/7.787037}function yn(ie){return ie>.008856?Math.pow(ie,.3333333333333333):7.787037*ie+.13793103448275862}function ln(ie){return Math.round(255*(ie<=.00304?12.92*ie:1.055*Math.pow(ie,.4166666666666667)-.055))}function kn(ie,ve,Le){return this instanceof kn?(this.r=~~ie,this.g=~~ve,void(this.b=~~Le)):arguments.length<2?ie instanceof kn?new kn(ie.r,ie.g,ie.b):fn(""+ie,kn,Lt):new kn(ie,ve,Le)}function Wn(ie){return new kn(ie>>16,ie>>8&255,255&ie)}function wn(ie){return Wn(ie)+""}Gt.brighter=function(ie){return new _t(Math.min(100,this.l+Pt*(arguments.length?ie:1)),this.a,this.b)},Gt.darker=function(ie){return new _t(Math.max(0,this.l-Pt*(arguments.length?ie:1)),this.a,this.b)},Gt.rgb=function(){return Xt(this.l,this.a,this.b)},s.rgb=kn;var on=kn.prototype=new ut;function _n(ie){return ie<16?"0"+Math.max(0,ie).toString(16):Math.min(255,ie).toString(16)}function fn(ie,ve,Le){var Fe,Ve,We,$e=0,tt=0,lt=0;if(Fe=/([a-z]+)\((.*)\)/.exec(ie=ie.toLowerCase()))switch(Ve=Fe[2].split(","),Fe[1]){case"hsl":return Le(parseFloat(Ve[0]),parseFloat(Ve[1])/100,parseFloat(Ve[2])/100);case"rgb":return ve(Nn(Ve[0]),Nn(Ve[1]),Nn(Ve[2]))}return(We=Hn.get(ie))?ve(We.r,We.g,We.b):(ie==null||ie.charAt(0)!=="#"||isNaN(We=parseInt(ie.slice(1),16))||(ie.length===4?($e=(3840&We)>>4,$e|=$e>>4,tt=240&We,tt|=tt>>4,lt=15&We,lt|=lt<<4):ie.length===7&&($e=(16711680&We)>>16,tt=(65280&We)>>8,lt=255&We)),ve($e,tt,lt))}function hn(ie,ve,Le){var Fe,Ve,We=Math.min(ie/=255,ve/=255,Le/=255),$e=Math.max(ie,ve,Le),tt=$e-We,lt=($e+We)/2;return tt?(Ve=lt<.5?tt/($e+We):tt/(2-$e-We),Fe=ie==$e?(ve-Le)/tt+(ve0&<<1?0:Fe),new pt(Fe,Ve,lt)}function In(ie,ve,Le){var Fe=yn((.4124564*(ie=Cn(ie))+.3575761*(ve=Cn(ve))+.1804375*(Le=Cn(Le)))/Bt),Ve=yn((.2126729*ie+.7151522*ve+.072175*Le)/1);return _t(116*Ve-16,500*(Fe-Ve),200*(Ve-yn((.0193339*ie+.119192*ve+.9503041*Le)/Wt)))}function Cn(ie){return(ie/=255)<=.04045?ie/12.92:Math.pow((ie+.055)/1.055,2.4)}function Nn(ie){var ve=parseFloat(ie);return ie.charAt(ie.length-1)==="%"?Math.round(2.55*ve):ve}on.brighter=function(ie){ie=Math.pow(.7,arguments.length?ie:1);var ve=this.r,Le=this.g,Fe=this.b,Ve=30;return ve||Le||Fe?(ve&&ve=200&&Ut<300||Ut===304){try{zt=Le.call(Ve,tt)}catch(Vt){return void We.error.call(Ve,Vt)}We.load.call(Ve,zt)}else We.error.call(Ve,tt)}return self.XDomainRequest&&!("withCredentials"in tt)&&/^(http(s)?:)?\/\//.test(ie)&&(tt=new XDomainRequest),"onload"in tt?tt.onload=tt.onerror=gt:tt.onreadystatechange=function(){tt.readyState>3&>()},tt.onprogress=function(zt){var Ut=s.event;s.event=zt;try{We.progress.call(Ve,tt)}finally{s.event=Ut}},Ve.header=function(zt,Ut){return zt=(zt+"").toLowerCase(),arguments.length<2?$e[zt]:(Ut==null?delete $e[zt]:$e[zt]=Ut+"",Ve)},Ve.mimeType=function(zt){return arguments.length?(ve=zt==null?null:zt+"",Ve):ve},Ve.responseType=function(zt){return arguments.length?(lt=zt,Ve):lt},Ve.response=function(zt){return Le=zt,Ve},["get","post"].forEach(function(zt){Ve[zt]=function(){return Ve.send.apply(Ve,[zt].concat(m(arguments)))}}),Ve.send=function(zt,Ut,Vt){if(arguments.length===2&&typeof Ut=="function"&&(Vt=Ut,Ut=null),tt.open(zt,ie,!0),ve==null||"accept"in $e||($e.accept=ve+",*/*"),tt.setRequestHeader)for(var Qt in $e)tt.setRequestHeader(Qt,$e[Qt]);return ve!=null&&tt.overrideMimeType&&tt.overrideMimeType(ve),lt!=null&&(tt.responseType=lt),Vt!=null&&Ve.on("error",Vt).on("load",function(gn){Vt(null,gn)}),We.beforesend.call(Ve,tt),tt.send(Ut??null),Ve},Ve.abort=function(){return tt.abort(),Ve},s.rebind(Ve,We,"on"),Fe==null?Ve:Ve.get(function(zt){return zt.length===1?function(Ut,Vt){zt(Ut==null?Vt:null)}:zt}(Fe))}Hn.forEach(function(ie,ve){Hn.set(ie,Wn(ve))}),s.functor=qn,s.xhr=or(U),s.dsv=function(ie,ve){var Le=new RegExp('["'+ie+` -]`),Fe=ie.charCodeAt(0);function Ve(gt,zt,Ut){arguments.length<3&&(Ut=zt,zt=null);var Vt=tr(gt,ve,zt==null?We:$e(zt),Ut);return Vt.row=function(Qt){return arguments.length?Vt.response((zt=Qt)==null?We:$e(Qt)):zt},Vt}function We(gt){return Ve.parse(gt.responseText)}function $e(gt){return function(zt){return Ve.parse(zt.responseText,gt)}}function tt(gt){return gt.map(lt).join(ie)}function lt(gt){return Le.test(gt)?'"'+gt.replace(/\"/g,'""')+'"':gt}return Ve.parse=function(gt,zt){var Ut;return Ve.parseRows(gt,function(Vt,Qt){if(Ut)return Ut(Vt,Qt-1);var gn=function(en){for(var sn={},rn=Vt.length,Mn=0;Mn=sn)return gn;if(Vt)return Vt=!1,Qt;var zn=rn;if(gt.charCodeAt(zn)===34){for(var Un=zn;Un++",A="",C=M.length,L=A.length,P=y[0]==="+"||y[0]==="-",I=0,R=-L;I>-1&&(I=k.indexOf(M,I))!==-1&&(R=k.indexOf(A,I+C))!==-1&&!(R<=I);){for(var U=I;U=R)h[U]=null,k=k.substr(0,U)+" "+k.substr(U+1);else if(h[U]!==null){var B=h[U].indexOf(y[0]);B===-1?h[U]+=y:P&&(h[U]=h[U].substr(0,B+1)+(1+parseInt(h[U][B+1]))+h[U].substr(B+2))}var G=I+C,N=k.substr(G,R-G).indexOf(M);I=N!==-1?N:R+L}return h}function d(g,y){var k=a(g,128);return y?n(k.cells,k.positions,.25):{edges:k.cells,positions:k.positions}}function v(g,y,k,h){var M=d(g,h),A=function(H,ee,Q){for(var X=ee.textAlign||"start",Y=ee.textBaseline||"alphabetic",K=[1<<30,1<<30],te=[0,0],re=H.length,oe=0;oe"u"||!ses.ok||ses.ok()){typeof ses<"u"&&(ses.weakMapPermitHostObjects=y);var l=!1;if(typeof WeakMap=="function"){var t=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var a=new t,r=Object.freeze({});if(a.set(r,1),a.get(r)===1)return void(f.exports=WeakMap);l=!0}}var n=Object.getOwnPropertyNames,o=Object.defineProperty,i=Object.isExtensible,u="weakmap:",p="weakmap:ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var c=new ArrayBuffer(25),b=new Uint8Array(c);crypto.getRandomValues(b),p="weakmap:rand:"+Array.prototype.map.call(b,function(C){return(C%36).toString(36)}).join("")+"___"}if(o(Object,"getOwnPropertyNames",{value:function(C){return n(C).filter(k)}}),"getPropertyNames"in Object){var d=Object.getPropertyNames;o(Object,"getPropertyNames",{value:function(C){return d(C).filter(k)}})}(function(){var C=Object.freeze;o(Object,"freeze",{value:function(I){return h(I),C(I)}});var L=Object.seal;o(Object,"seal",{value:function(I){return h(I),L(I)}});var P=Object.preventExtensions;o(Object,"preventExtensions",{value:function(I){return h(I),P(I)}})})();var v=!1,x=0,g=function(){this instanceof g||A();var C=[],L=[],P=x++;return Object.create(g.prototype,{get___:{value:M(function(I,R){var U,B=h(I);return B?P in B?B[P]:R:(U=C.indexOf(I))>=0?L[U]:R})},has___:{value:M(function(I){var R=h(I);return R?P in R:C.indexOf(I)>=0})},set___:{value:M(function(I,R){var U,B=h(I);return B?B[P]=R:(U=C.indexOf(I))>=0?L[U]=R:(U=C.length,L[U]=R,C[U]=I),this})},delete___:{value:M(function(I){var R,U,B=h(I);return B?P in B&&delete B[P]:!((R=C.indexOf(I))<0||(U=C.length-1,C[R]=void 0,L[R]=L[U],C[R]=C[U],C.length=U,L.length=U,0))})}})};g.prototype=Object.create(Object.prototype,{get:{value:function(C,L){return this.get___(C,L)},writable:!0,configurable:!0},has:{value:function(C){return this.has___(C)},writable:!0,configurable:!0},set:{value:function(C,L){return this.set___(C,L)},writable:!0,configurable:!0},delete:{value:function(C){return this.delete___(C)},writable:!0,configurable:!0}}),typeof t=="function"?function(){function C(){this instanceof g||A();var L,P=new t,I=void 0,R=!1;return L=l?function(U,B){return P.set(U,B),P.has(U)||(I||(I=new g),I.set(U,B)),this}:function(U,B){if(R)try{P.set(U,B)}catch{I||(I=new g),I.set___(U,B)}else P.set(U,B);return this},Object.create(g.prototype,{get___:{value:M(function(U,B){return I?P.has(U)?P.get(U):I.get___(U,B):P.get(U,B)})},has___:{value:M(function(U){return P.has(U)||!!I&&I.has___(U)})},set___:{value:M(L)},delete___:{value:M(function(U){var B=!!P.delete(U);return I&&I.delete___(U)||B})},permitHostObjects___:{value:M(function(U){if(U!==y)throw new Error("bogus call to permitHostObjects___");R=!0})}})}l&&typeof Proxy<"u"&&(Proxy=void 0),C.prototype=g.prototype,f.exports=C,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),f.exports=g)}function y(C){C.permitHostObjects___&&C.permitHostObjects___(y)}function k(C){return!(C.substr(0,u.length)==u&&C.substr(C.length-3)==="___")}function h(C){if(C!==Object(C))throw new TypeError("Not an object: "+C);var L=C[p];if(L&&L.key===C)return L;if(i(C)){L={key:C};try{return o(C,p,{value:L,writable:!1,enumerable:!1,configurable:!1}),L}catch{return}}}function M(C){return C.prototype=null,Object.freeze(C)}function A(){v||typeof console>"u"||(v=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}})()},9222:function(f,l,t){var a=t(7178);f.exports=function(){var r={};return function(n){if((typeof n!="object"||n===null)&&typeof n!="function")throw new Error("Weakmap-shim: Key must be object");var o=n.valueOf(r);return o&&o.identity===r?o:a(n,r)}}},7178:function(f){f.exports=function(l,t){var a={identity:t},r=l.valueOf;return Object.defineProperty(l,"valueOf",{value:function(n){return n!==t?r.apply(this,arguments):a},writable:!0}),a}},4037:function(f,l,t){var a=t(9222);f.exports=function(){var r=a();return{get:function(n,o){var i=r(n);return i.hasOwnProperty("value")?i.value:o},set:function(n,o){return r(n).value=o,this},has:function(n){return"value"in r(n)},delete:function(n){return delete r(n).value}}}},6183:function(f){f.exports=function(l){var t={};return function(a,r,n){var o=a.dtype,i=a.order,u=[o,i.join()].join(),p=t[u];return p||(t[u]=p=l([o,i])),p(a.shape.slice(0),a.data,a.stride,0|a.offset,r,n)}}(function(){return function(l,t,a,r,n,o){var i=l[0],u=a[0],p=[0],c=u;r|=0;var b=0,d=u;for(b=0;b=0!=x>=0&&n.push(p[0]+.5+.5*(v+x)/(v-x)),r+=d,++p[0]}}}.bind(void 0,{funcName:"zeroCrossings"}))},9584:function(f,l,t){f.exports=function(r,n){var o=[];return n=+n||0,a(r.hi(r.shape[0]-1),o,n),o};var a=t(6183)},6601:function(){}},T={};function m(f){var l=T[f];if(l!==void 0)return l.exports;var t=T[f]={id:f,loaded:!1,exports:{}};return s[f].call(t.exports,t,t.exports,m),t.loaded=!0,t.exports}return m.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),m.nmd=function(f){return f.paths=[],f.children||(f.children=[]),f},m(7386)}()},D.exports=_()},12856:function(D,E,e){function _(ne,ue){if(!(ne instanceof ue))throw new TypeError("Cannot call a class as a function")}function w(ne,ue){for(var me=0;men)throw new RangeError('The value "'+ne+'" is invalid for option "size"');var ue=new Uint8Array(ne);return Object.setPrototypeOf(ue,i.prototype),ue}function i(ne,ue,me){if(typeof ne=="number"){if(typeof ue=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return c(ne)}return u(ne,ue,me)}function u(ne,ue,me){if(typeof ne=="string")return function(Ue,De){if(typeof De=="string"&&De!==""||(De="utf8"),!i.isEncoding(De))throw new TypeError("Unknown encoding: "+De);var je=0|x(Ue,De),ge=o(je),be=ge.write(Ue,De);return be!==je&&(ge=ge.slice(0,be)),ge}(ne,ue);if(ArrayBuffer.isView(ne))return function(Ue){if(ze(Ue,Uint8Array)){var De=new Uint8Array(Ue);return d(De.buffer,De.byteOffset,De.byteLength)}return b(Ue)}(ne);if(ne==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(ne));if(ze(ne,ArrayBuffer)||ne&&ze(ne.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ze(ne,SharedArrayBuffer)||ne&&ze(ne.buffer,SharedArrayBuffer)))return d(ne,ue,me);if(typeof ne=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var we=ne.valueOf&&ne.valueOf();if(we!=null&&we!==ne)return i.from(we,ue,me);var Ee=function(Ue){if(i.isBuffer(Ue)){var De=0|v(Ue.length),je=o(De);return je.length===0||Ue.copy(je,0,0,De),je}return Ue.length!==void 0?typeof Ue.length!="number"||Te(Ue.length)?o(0):b(Ue):Ue.type==="Buffer"&&Array.isArray(Ue.data)?b(Ue.data):void 0}(ne);if(Ee)return Ee;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ne[Symbol.toPrimitive]=="function")return i.from(ne[Symbol.toPrimitive]("string"),ue,me);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(ne))}function p(ne){if(typeof ne!="number")throw new TypeError('"size" argument must be of type number');if(ne<0)throw new RangeError('The value "'+ne+'" is invalid for option "size"')}function c(ne){return p(ne),o(ne<0?0:0|v(ne))}function b(ne){for(var ue=ne.length<0?0:0|v(ne.length),me=o(ue),we=0;we=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|ne}function x(ne,ue){if(i.isBuffer(ne))return ne.length;if(ArrayBuffer.isView(ne)||ze(ne,ArrayBuffer))return ne.byteLength;if(typeof ne!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+l(ne));var me=ne.length,we=arguments.length>2&&arguments[2]===!0;if(!we&&me===0)return 0;for(var Ee=!1;;)switch(ue){case"ascii":case"latin1":case"binary":return me;case"utf8":case"utf-8":return de(ne).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*me;case"hex":return me>>>1;case"base64":return he(ne).length;default:if(Ee)return we?-1:de(ne).length;ue=(""+ue).toLowerCase(),Ee=!0}}function g(ne,ue,me){var we=!1;if((ue===void 0||ue<0)&&(ue=0),ue>this.length||((me===void 0||me>this.length)&&(me=this.length),me<=0)||(me>>>=0)<=(ue>>>=0))return"";for(ne||(ne="utf8");;)switch(ne){case"hex":return N(this,ue,me);case"utf8":case"utf-8":return R(this,ue,me);case"ascii":return B(this,ue,me);case"latin1":case"binary":return G(this,ue,me);case"base64":return I(this,ue,me);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,ue,me);default:if(we)throw new TypeError("Unknown encoding: "+ne);ne=(ne+"").toLowerCase(),we=!0}}function y(ne,ue,me){var we=ne[ue];ne[ue]=ne[me],ne[me]=we}function k(ne,ue,me,we,Ee){if(ne.length===0)return-1;if(typeof me=="string"?(we=me,me=0):me>2147483647?me=2147483647:me<-2147483648&&(me=-2147483648),Te(me=+me)&&(me=Ee?0:ne.length-1),me<0&&(me=ne.length+me),me>=ne.length){if(Ee)return-1;me=ne.length-1}else if(me<0){if(!Ee)return-1;me=0}if(typeof ue=="string"&&(ue=i.from(ue,we)),i.isBuffer(ue))return ue.length===0?-1:h(ne,ue,me,we,Ee);if(typeof ue=="number")return ue&=255,typeof Uint8Array.prototype.indexOf=="function"?Ee?Uint8Array.prototype.indexOf.call(ne,ue,me):Uint8Array.prototype.lastIndexOf.call(ne,ue,me):h(ne,[ue],me,we,Ee);throw new TypeError("val must be string, number or Buffer")}function h(ne,ue,me,we,Ee){var Ue,De=1,je=ne.length,ge=ue.length;if(we!==void 0&&((we=String(we).toLowerCase())==="ucs2"||we==="ucs-2"||we==="utf16le"||we==="utf-16le")){if(ne.length<2||ue.length<2)return-1;De=2,je/=2,ge/=2,me/=2}function be(Ze,st){return De===1?Ze[st]:Ze.readUInt16BE(st*De)}if(Ee){var Se=-1;for(Ue=me;Ueje&&(me=je-ge),Ue=me;Ue>=0;Ue--){for(var Ne=!0,Ye=0;YeEe&&(we=Ee):we=Ee;var Ue,De=ue.length;for(we>De/2&&(we=De/2),Ue=0;Ue>8,ge=De%256,be.push(ge),be.push(je);return be}(ue,ne.length-me),ne,me,we)}function I(ne,ue,me){return ue===0&&me===ne.length?t.fromByteArray(ne):t.fromByteArray(ne.slice(ue,me))}function R(ne,ue,me){me=Math.min(ne.length,me);for(var we=[],Ee=ue;Ee239?4:Ue>223?3:Ue>191?2:1;if(Ee+je<=me){var ge=void 0,be=void 0,Se=void 0,Ne=void 0;switch(je){case 1:Ue<128&&(De=Ue);break;case 2:(192&(ge=ne[Ee+1]))==128&&(Ne=(31&Ue)<<6|63&ge)>127&&(De=Ne);break;case 3:ge=ne[Ee+1],be=ne[Ee+2],(192&ge)==128&&(192&be)==128&&(Ne=(15&Ue)<<12|(63&ge)<<6|63&be)>2047&&(Ne<55296||Ne>57343)&&(De=Ne);break;case 4:ge=ne[Ee+1],be=ne[Ee+2],Se=ne[Ee+3],(192&ge)==128&&(192&be)==128&&(192&Se)==128&&(Ne=(15&Ue)<<18|(63&ge)<<12|(63&be)<<6|63&Se)>65535&&Ne<1114112&&(De=Ne)}}De===null?(De=65533,je=1):De>65535&&(De-=65536,we.push(De>>>10&1023|55296),De=56320|1023&De),we.push(De),Ee+=je}return function(Ye){var Ze=Ye.length;if(Ze<=U)return String.fromCharCode.apply(String,Ye);for(var st="",ot=0;ot"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."),Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}}),i.poolSize=8192,i.from=function(ne,ue,me){return u(ne,ue,me)},Object.setPrototypeOf(i.prototype,Uint8Array.prototype),Object.setPrototypeOf(i,Uint8Array),i.alloc=function(ne,ue,me){return function(we,Ee,Ue){return p(we),we<=0?o(we):Ee!==void 0?typeof Ue=="string"?o(we).fill(Ee,Ue):o(we).fill(Ee):o(we)}(ne,ue,me)},i.allocUnsafe=function(ne){return c(ne)},i.allocUnsafeSlow=function(ne){return c(ne)},i.isBuffer=function(ne){return ne!=null&&ne._isBuffer===!0&&ne!==i.prototype},i.compare=function(ne,ue){if(ze(ne,Uint8Array)&&(ne=i.from(ne,ne.offset,ne.byteLength)),ze(ue,Uint8Array)&&(ue=i.from(ue,ue.offset,ue.byteLength)),!i.isBuffer(ne)||!i.isBuffer(ue))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ne===ue)return 0;for(var me=ne.length,we=ue.length,Ee=0,Ue=Math.min(me,we);Eewe.length?(i.isBuffer(Ue)||(Ue=i.from(Ue)),Ue.copy(we,Ee)):Uint8Array.prototype.set.call(we,Ue,Ee);else{if(!i.isBuffer(Ue))throw new TypeError('"list" argument must be an Array of Buffers');Ue.copy(we,Ee)}Ee+=Ue.length}return we},i.byteLength=x,i.prototype._isBuffer=!0,i.prototype.swap16=function(){var ne=this.length;if(ne%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ue=0;ueue&&(ne+=" ... "),""},r&&(i.prototype[r]=i.prototype.inspect),i.prototype.compare=function(ne,ue,me,we,Ee){if(ze(ne,Uint8Array)&&(ne=i.from(ne,ne.offset,ne.byteLength)),!i.isBuffer(ne))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+l(ne));if(ue===void 0&&(ue=0),me===void 0&&(me=ne?ne.length:0),we===void 0&&(we=0),Ee===void 0&&(Ee=this.length),ue<0||me>ne.length||we<0||Ee>this.length)throw new RangeError("out of range index");if(we>=Ee&&ue>=me)return 0;if(we>=Ee)return-1;if(ue>=me)return 1;if(this===ne)return 0;for(var Ue=(Ee>>>=0)-(we>>>=0),De=(me>>>=0)-(ue>>>=0),je=Math.min(Ue,De),ge=this.slice(we,Ee),be=ne.slice(ue,me),Se=0;Se>>=0,isFinite(me)?(me>>>=0,we===void 0&&(we="utf8")):(we=me,me=void 0)}var Ee=this.length-ue;if((me===void 0||me>Ee)&&(me=Ee),ne.length>0&&(me<0||ue<0)||ue>this.length)throw new RangeError("Attempt to write outside buffer bounds");we||(we="utf8");for(var Ue=!1;;)switch(we){case"hex":return M(this,ne,ue,me);case"utf8":case"utf-8":return A(this,ne,ue,me);case"ascii":case"latin1":case"binary":return C(this,ne,ue,me);case"base64":return L(this,ne,ue,me);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,ne,ue,me);default:if(Ue)throw new TypeError("Unknown encoding: "+we);we=(""+we).toLowerCase(),Ue=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var U=4096;function B(ne,ue,me){var we="";me=Math.min(ne.length,me);for(var Ee=ue;Eewe)&&(me=we);for(var Ee="",Ue=ue;Ueme)throw new RangeError("Trying to access beyond buffer length")}function H(ne,ue,me,we,Ee,Ue){if(!i.isBuffer(ne))throw new TypeError('"buffer" argument must be a Buffer instance');if(ue>Ee||uene.length)throw new RangeError("Index out of range")}function ee(ne,ue,me,we,Ee){se(ue,we,Ee,ne,me,7);var Ue=Number(ue&BigInt(4294967295));ne[me++]=Ue,Ue>>=8,ne[me++]=Ue,Ue>>=8,ne[me++]=Ue,Ue>>=8,ne[me++]=Ue;var De=Number(ue>>BigInt(32)&BigInt(4294967295));return ne[me++]=De,De>>=8,ne[me++]=De,De>>=8,ne[me++]=De,De>>=8,ne[me++]=De,me}function Q(ne,ue,me,we,Ee){se(ue,we,Ee,ne,me,7);var Ue=Number(ue&BigInt(4294967295));ne[me+7]=Ue,Ue>>=8,ne[me+6]=Ue,Ue>>=8,ne[me+5]=Ue,Ue>>=8,ne[me+4]=Ue;var De=Number(ue>>BigInt(32)&BigInt(4294967295));return ne[me+3]=De,De>>=8,ne[me+2]=De,De>>=8,ne[me+1]=De,De>>=8,ne[me]=De,me+8}function X(ne,ue,me,we,Ee,Ue){if(me+we>ne.length)throw new RangeError("Index out of range");if(me<0)throw new RangeError("Index out of range")}function Y(ne,ue,me,we,Ee){return ue=+ue,me>>>=0,Ee||X(ne,0,me,4),a.write(ne,ue,me,we,23,4),me+4}function K(ne,ue,me,we,Ee){return ue=+ue,me>>>=0,Ee||X(ne,0,me,8),a.write(ne,ue,me,we,52,8),me+8}i.prototype.slice=function(ne,ue){var me=this.length;(ne=~~ne)<0?(ne+=me)<0&&(ne=0):ne>me&&(ne=me),(ue=ue===void 0?me:~~ue)<0?(ue+=me)<0&&(ue=0):ue>me&&(ue=me),ue>>=0,ue>>>=0,me||V(ne,ue,this.length);for(var we=this[ne],Ee=1,Ue=0;++Ue>>=0,ue>>>=0,me||V(ne,ue,this.length);for(var we=this[ne+--ue],Ee=1;ue>0&&(Ee*=256);)we+=this[ne+--ue]*Ee;return we},i.prototype.readUint8=i.prototype.readUInt8=function(ne,ue){return ne>>>=0,ue||V(ne,1,this.length),this[ne]},i.prototype.readUint16LE=i.prototype.readUInt16LE=function(ne,ue){return ne>>>=0,ue||V(ne,2,this.length),this[ne]|this[ne+1]<<8},i.prototype.readUint16BE=i.prototype.readUInt16BE=function(ne,ue){return ne>>>=0,ue||V(ne,2,this.length),this[ne]<<8|this[ne+1]},i.prototype.readUint32LE=i.prototype.readUInt32LE=function(ne,ue){return ne>>>=0,ue||V(ne,4,this.length),(this[ne]|this[ne+1]<<8|this[ne+2]<<16)+16777216*this[ne+3]},i.prototype.readUint32BE=i.prototype.readUInt32BE=function(ne,ue){return ne>>>=0,ue||V(ne,4,this.length),16777216*this[ne]+(this[ne+1]<<16|this[ne+2]<<8|this[ne+3])},i.prototype.readBigUInt64LE=Me(function(ne){ce(ne>>>=0,"offset");var ue=this[ne],me=this[ne+7];ue!==void 0&&me!==void 0||xe(ne,this.length-8);var we=ue+this[++ne]*Math.pow(2,8)+this[++ne]*Math.pow(2,16)+this[++ne]*Math.pow(2,24),Ee=this[++ne]+this[++ne]*Math.pow(2,8)+this[++ne]*Math.pow(2,16)+me*Math.pow(2,24);return BigInt(we)+(BigInt(Ee)<>>=0,"offset");var ue=this[ne],me=this[ne+7];ue!==void 0&&me!==void 0||xe(ne,this.length-8);var we=ue*Math.pow(2,24)+this[++ne]*Math.pow(2,16)+this[++ne]*Math.pow(2,8)+this[++ne],Ee=this[++ne]*Math.pow(2,24)+this[++ne]*Math.pow(2,16)+this[++ne]*Math.pow(2,8)+me;return(BigInt(we)<>>=0,ue>>>=0,me||V(ne,ue,this.length);for(var we=this[ne],Ee=1,Ue=0;++Ue=(Ee*=128)&&(we-=Math.pow(2,8*ue)),we},i.prototype.readIntBE=function(ne,ue,me){ne>>>=0,ue>>>=0,me||V(ne,ue,this.length);for(var we=ue,Ee=1,Ue=this[ne+--we];we>0&&(Ee*=256);)Ue+=this[ne+--we]*Ee;return Ue>=(Ee*=128)&&(Ue-=Math.pow(2,8*ue)),Ue},i.prototype.readInt8=function(ne,ue){return ne>>>=0,ue||V(ne,1,this.length),128&this[ne]?-1*(255-this[ne]+1):this[ne]},i.prototype.readInt16LE=function(ne,ue){ne>>>=0,ue||V(ne,2,this.length);var me=this[ne]|this[ne+1]<<8;return 32768&me?4294901760|me:me},i.prototype.readInt16BE=function(ne,ue){ne>>>=0,ue||V(ne,2,this.length);var me=this[ne+1]|this[ne]<<8;return 32768&me?4294901760|me:me},i.prototype.readInt32LE=function(ne,ue){return ne>>>=0,ue||V(ne,4,this.length),this[ne]|this[ne+1]<<8|this[ne+2]<<16|this[ne+3]<<24},i.prototype.readInt32BE=function(ne,ue){return ne>>>=0,ue||V(ne,4,this.length),this[ne]<<24|this[ne+1]<<16|this[ne+2]<<8|this[ne+3]},i.prototype.readBigInt64LE=Me(function(ne){ce(ne>>>=0,"offset");var ue=this[ne],me=this[ne+7];ue!==void 0&&me!==void 0||xe(ne,this.length-8);var we=this[ne+4]+this[ne+5]*Math.pow(2,8)+this[ne+6]*Math.pow(2,16)+(me<<24);return(BigInt(we)<>>=0,"offset");var ue=this[ne],me=this[ne+7];ue!==void 0&&me!==void 0||xe(ne,this.length-8);var we=(ue<<24)+this[++ne]*Math.pow(2,16)+this[++ne]*Math.pow(2,8)+this[++ne];return(BigInt(we)<>>=0,ue||V(ne,4,this.length),a.read(this,ne,!0,23,4)},i.prototype.readFloatBE=function(ne,ue){return ne>>>=0,ue||V(ne,4,this.length),a.read(this,ne,!1,23,4)},i.prototype.readDoubleLE=function(ne,ue){return ne>>>=0,ue||V(ne,8,this.length),a.read(this,ne,!0,52,8)},i.prototype.readDoubleBE=function(ne,ue){return ne>>>=0,ue||V(ne,8,this.length),a.read(this,ne,!1,52,8)},i.prototype.writeUintLE=i.prototype.writeUIntLE=function(ne,ue,me,we){ne=+ne,ue>>>=0,me>>>=0,we||H(this,ne,ue,me,Math.pow(2,8*me)-1,0);var Ee=1,Ue=0;for(this[ue]=255≠++Ue>>=0,me>>>=0,we||H(this,ne,ue,me,Math.pow(2,8*me)-1,0);var Ee=me-1,Ue=1;for(this[ue+Ee]=255≠--Ee>=0&&(Ue*=256);)this[ue+Ee]=ne/Ue&255;return ue+me},i.prototype.writeUint8=i.prototype.writeUInt8=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,1,255,0),this[ue]=255&ne,ue+1},i.prototype.writeUint16LE=i.prototype.writeUInt16LE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,2,65535,0),this[ue]=255&ne,this[ue+1]=ne>>>8,ue+2},i.prototype.writeUint16BE=i.prototype.writeUInt16BE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,2,65535,0),this[ue]=ne>>>8,this[ue+1]=255&ne,ue+2},i.prototype.writeUint32LE=i.prototype.writeUInt32LE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,4,4294967295,0),this[ue+3]=ne>>>24,this[ue+2]=ne>>>16,this[ue+1]=ne>>>8,this[ue]=255&ne,ue+4},i.prototype.writeUint32BE=i.prototype.writeUInt32BE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,4,4294967295,0),this[ue]=ne>>>24,this[ue+1]=ne>>>16,this[ue+2]=ne>>>8,this[ue+3]=255&ne,ue+4},i.prototype.writeBigUInt64LE=Me(function(ne){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ee(this,ne,ue,BigInt(0),BigInt("0xffffffffffffffff"))}),i.prototype.writeBigUInt64BE=Me(function(ne){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Q(this,ne,ue,BigInt(0),BigInt("0xffffffffffffffff"))}),i.prototype.writeIntLE=function(ne,ue,me,we){if(ne=+ne,ue>>>=0,!we){var Ee=Math.pow(2,8*me-1);H(this,ne,ue,me,Ee-1,-Ee)}var Ue=0,De=1,je=0;for(this[ue]=255≠++Ue>0)-je&255;return ue+me},i.prototype.writeIntBE=function(ne,ue,me,we){if(ne=+ne,ue>>>=0,!we){var Ee=Math.pow(2,8*me-1);H(this,ne,ue,me,Ee-1,-Ee)}var Ue=me-1,De=1,je=0;for(this[ue+Ue]=255≠--Ue>=0&&(De*=256);)ne<0&&je===0&&this[ue+Ue+1]!==0&&(je=1),this[ue+Ue]=(ne/De>>0)-je&255;return ue+me},i.prototype.writeInt8=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,1,127,-128),ne<0&&(ne=255+ne+1),this[ue]=255&ne,ue+1},i.prototype.writeInt16LE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,2,32767,-32768),this[ue]=255&ne,this[ue+1]=ne>>>8,ue+2},i.prototype.writeInt16BE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,2,32767,-32768),this[ue]=ne>>>8,this[ue+1]=255&ne,ue+2},i.prototype.writeInt32LE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,4,2147483647,-2147483648),this[ue]=255&ne,this[ue+1]=ne>>>8,this[ue+2]=ne>>>16,this[ue+3]=ne>>>24,ue+4},i.prototype.writeInt32BE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,4,2147483647,-2147483648),ne<0&&(ne=4294967295+ne+1),this[ue]=ne>>>24,this[ue+1]=ne>>>16,this[ue+2]=ne>>>8,this[ue+3]=255&ne,ue+4},i.prototype.writeBigInt64LE=Me(function(ne){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ee(this,ne,ue,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),i.prototype.writeBigInt64BE=Me(function(ne){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Q(this,ne,ue,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),i.prototype.writeFloatLE=function(ne,ue,me){return Y(this,ne,ue,!0,me)},i.prototype.writeFloatBE=function(ne,ue,me){return Y(this,ne,ue,!1,me)},i.prototype.writeDoubleLE=function(ne,ue,me){return K(this,ne,ue,!0,me)},i.prototype.writeDoubleBE=function(ne,ue,me){return K(this,ne,ue,!1,me)},i.prototype.copy=function(ne,ue,me,we){if(!i.isBuffer(ne))throw new TypeError("argument should be a Buffer");if(me||(me=0),we||we===0||(we=this.length),ue>=ne.length&&(ue=ne.length),ue||(ue=0),we>0&&we=this.length)throw new RangeError("Index out of range");if(we<0)throw new RangeError("sourceEnd out of bounds");we>this.length&&(we=this.length),ne.length-ue>>=0,me=me===void 0?this.length:me>>>0,ne||(ne=0),typeof ne=="number")for(Ue=ue;Ue"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(){var Se,Ne=f(De);if(je){var Ye=f(this).constructor;Se=Reflect.construct(Ne,arguments,Ye)}else Se=Ne.apply(this,arguments);return T(this,Se)});function be(){var Se;return _(this,be),Se=ge.call(this),Object.defineProperty(m(Se),"message",{value:ue.apply(m(Se),arguments),writable:!0,configurable:!0}),Se.name="".concat(Se.name," [").concat(ne,"]"),Se.stack,delete Se.name,Se}return Ee=be,(Ue=[{key:"code",get:function(){return ne},set:function(Se){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Se,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(ne,"]: ").concat(this.message)}}])&&w(Ee.prototype,Ue),Object.defineProperty(Ee,"prototype",{writable:!1}),be}(me)}function oe(ne){for(var ue="",me=ne.length,we=ne[0]==="-"?1:0;me>=we+4;me-=3)ue="_".concat(ne.slice(me-3,me)).concat(ue);return"".concat(ne.slice(0,me)).concat(ue)}function se(ne,ue,me,we,Ee,Ue){if(ne>me||ne3?ue===0||ue===BigInt(0)?">= 0".concat(je," and < 2").concat(je," ** ").concat(8*(Ue+1)).concat(je):">= -(2".concat(je," ** ").concat(8*(Ue+1)-1).concat(je,") and < 2 ** ")+"".concat(8*(Ue+1)-1).concat(je):">= ".concat(ue).concat(je," and <= ").concat(me).concat(je),new te.ERR_OUT_OF_RANGE("value",De,ne)}(function(ge,be,Se){ce(be,"offset"),ge[be]!==void 0&&ge[be+Se]!==void 0||xe(be,ge.length-(Se+1))})(we,Ee,Ue)}function ce(ne,ue){if(typeof ne!="number")throw new te.ERR_INVALID_ARG_TYPE(ue,"number",ne)}function xe(ne,ue,me){throw Math.floor(ne)!==ne?(ce(ne,me),new te.ERR_OUT_OF_RANGE(me||"offset","an integer",ne)):ue<0?new te.ERR_BUFFER_OUT_OF_BOUNDS:new te.ERR_OUT_OF_RANGE(me||"offset",">= ".concat(me?1:0," and <= ").concat(ue),ne)}re("ERR_BUFFER_OUT_OF_BOUNDS",function(ne){return ne?"".concat(ne," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),re("ERR_INVALID_ARG_TYPE",function(ne,ue){return'The "'.concat(ne,'" argument must be of type number. Received type ').concat(l(ue))},TypeError),re("ERR_OUT_OF_RANGE",function(ne,ue,me){var we='The value of "'.concat(ne,'" is out of range.'),Ee=me;return Number.isInteger(me)&&Math.abs(me)>Math.pow(2,32)?Ee=oe(String(me)):typeof me=="bigint"&&(Ee=String(me),(me>Math.pow(BigInt(2),BigInt(32))||me<-Math.pow(BigInt(2),BigInt(32)))&&(Ee=oe(Ee)),Ee+="n"),we+" It must be ".concat(ue,". Received ").concat(Ee)},RangeError);var pe=/[^+/0-9A-Za-z-_]/g;function de(ne,ue){var me;ue=ue||1/0;for(var we=ne.length,Ee=null,Ue=[],De=0;De55295&&me<57344){if(!Ee){if(me>56319){(ue-=3)>-1&&Ue.push(239,191,189);continue}if(De+1===we){(ue-=3)>-1&&Ue.push(239,191,189);continue}Ee=me;continue}if(me<56320){(ue-=3)>-1&&Ue.push(239,191,189),Ee=me;continue}me=65536+(Ee-55296<<10|me-56320)}else Ee&&(ue-=3)>-1&&Ue.push(239,191,189);if(Ee=null,me<128){if((ue-=1)<0)break;Ue.push(me)}else if(me<2048){if((ue-=2)<0)break;Ue.push(me>>6|192,63&me|128)}else if(me<65536){if((ue-=3)<0)break;Ue.push(me>>12|224,me>>6&63|128,63&me|128)}else{if(!(me<1114112))throw new Error("Invalid code point");if((ue-=4)<0)break;Ue.push(me>>18|240,me>>12&63|128,me>>6&63|128,63&me|128)}}return Ue}function he(ne){return t.toByteArray(function(ue){if((ue=(ue=ue.split("=")[0]).trim().replace(pe,"")).length<2)return"";for(;ue.length%4!=0;)ue+="=";return ue}(ne))}function ye(ne,ue,me,we){var Ee;for(Ee=0;Ee=ue.length||Ee>=ne.length);++Ee)ue[Ee+me]=ne[Ee];return Ee}function ze(ne,ue){return ne instanceof ue||ne!=null&&ne.constructor!=null&&ne.constructor.name!=null&&ne.constructor.name===ue.name}function Te(ne){return ne!=ne}var Ae=function(){for(var ne="0123456789abcdef",ue=new Array(256),me=0;me<16;++me)for(var we=16*me,Ee=0;Ee<16;++Ee)ue[we+Ee]=ne[me]+ne[Ee];return ue}();function Me(ne){return typeof BigInt>"u"?Ce:ne}function Ce(){throw new Error("BigInt not supported")}},35791:function(D){D.exports=w,D.exports.isMobile=w,D.exports.default=w;var E=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,e=/CrOS/,_=/android|ipad|playbook|silk/i;function w(s){s||(s={});var T=s.ua;if(T||typeof navigator>"u"||(T=navigator.userAgent),T&&T.headers&&typeof T.headers["user-agent"]=="string"&&(T=T.headers["user-agent"]),typeof T!="string")return!1;var m=E.test(T)&&!e.test(T)||!!s.tablet&&_.test(T);return!m&&s.tablet&&s.featureDetect&&navigator&&navigator.maxTouchPoints>1&&T.indexOf("Macintosh")!==-1&&T.indexOf("Safari")!==-1&&(m=!0),m}},86781:function(D,E,e){e.r(E),e.d(E,{sankeyCenter:function(){return r},sankeyCircular:function(){return C},sankeyJustify:function(){return a},sankeyLeft:function(){return l},sankeyRight:function(){return t}});var _=e(33064),w=e(15140),s=e(45879),T=e(2502),m=e.n(T);function f(he){return he.target.depth}function l(he){return he.depth}function t(he,ye){return ye-1-he.height}function a(he,ye){return he.sourceLinks.length?he.depth:ye-1}function r(he){return he.targetLinks.length?he.depth:he.sourceLinks.length?(0,_.VV)(he.sourceLinks,f)-1:0}function n(he){return function(){return he}}var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(he){return typeof he}:function(he){return he&&typeof Symbol=="function"&&he.constructor===Symbol&&he!==Symbol.prototype?"symbol":typeof he};function i(he,ye){return p(he.source,ye.source)||he.index-ye.index}function u(he,ye){return p(he.target,ye.target)||he.index-ye.index}function p(he,ye){return he.partOfCycle===ye.partOfCycle?he.y0-ye.y0:he.circularLinkType==="top"||ye.circularLinkType==="bottom"?-1:1}function c(he){return he.value}function b(he){return(he.y0+he.y1)/2}function d(he){return b(he.source)}function v(he){return b(he.target)}function x(he){return he.index}function g(he){return he.nodes}function y(he){return he.links}function k(he,ye){var ze=he.get(ye);if(!ze)throw new Error("missing: "+ye);return ze}function h(he,ye){return ye(he)}var M=25,A=10;function C(){var he,ye,ze=0,Te=0,Ae=1,Me=1,Ce=24,ne=x,ue=a,me=g,we=y,Ee=32,Ue=2,De=null;function je(){var Ze={nodes:me.apply(null,arguments),links:we.apply(null,arguments)};ge(Ze),L(Ze,0,De),be(Ze),Se(Ze),P(Ze,ne),Ne(Ze,Ee,ne),Ye(Ze);for(var st=4,ot=0;ot0?Ke+M+A:Ke,bottom:Ge=Ge>0?Ge+M+A:Ge,left:ht=ht>0?ht+M+A:ht,right:nt=nt>0?nt+M+A:nt}}(Ze),Nt=function(Je,Ke){var Ge=(0,_.Fp)(Je.nodes,function(Qe){return Qe.column}),nt=Ae-ze,ht=Me-Te,Oe=nt/(nt+Ke.right+Ke.left),Be=ht/(ht+Ke.top+Ke.bottom);return ze=ze*Oe+Ke.left,Ae=Ke.right==0?Ae:Ae*Oe,Te=Te*Be+Ke.top,Me*=Be,Je.nodes.forEach(function(Qe){Qe.x0=ze+Qe.column*((Ae-ze-Ce)/Ge),Qe.x1=Qe.x0+Ce}),Be}(Ze,qt);Ft*=Nt,Ze.links.forEach(function(Je){Je.width=Je.value*Ft}),ft.forEach(function(Je){var Ke=Je.length;Je.forEach(function(Ge,nt){Ge.depth==ft.length-1&&Ke==1||Ge.depth==0&&Ke==1?(Ge.y0=Me/2-Ge.value*Ft,Ge.y1=Ge.y0+Ge.value*Ft):Ge.partOfCycle?R(Ge,Dt)==0?(Ge.y0=Me/2+nt,Ge.y1=Ge.y0+Ge.value*Ft):Ge.circularLinkType=="top"?(Ge.y0=Te+nt,Ge.y1=Ge.y0+Ge.value*Ft):(Ge.y0=Me-Ge.value*Ft-nt,Ge.y1=Ge.y0+Ge.value*Ft):qt.top==0||qt.bottom==0?(Ge.y0=(Me-Te)/Ke*nt,Ge.y1=Ge.y0+Ge.value*Ft):(Ge.y0=(Me-Te)/2-Ke/2+nt,Ge.y1=Ge.y0+Ge.value*Ft)})})})(ot),xt();for(var yt=1,Et=st;Et>0;--Et)Tt(yt*=.99,ot),xt();function Tt(Dt,It){var Ft=ft.length;ft.forEach(function(qt){var Nt=qt.length,Je=qt[0].depth;qt.forEach(function(Ke){var Ge;if((Ke.sourceLinks.length||Ke.targetLinks.length)&&!(Ke.partOfCycle&&R(Ke,It)>0))if(Je==0&&Nt==1)Ge=Ke.y1-Ke.y0,Ke.y0=Me/2-Ge/2,Ke.y1=Me/2+Ge/2;else if(Je==Ft-1&&Nt==1)Ge=Ke.y1-Ke.y0,Ke.y0=Me/2-Ge/2,Ke.y1=Me/2+Ge/2;else{var nt=(0,_.J6)(Ke.sourceLinks,v),ht=(0,_.J6)(Ke.targetLinks,d),Oe=((nt&&ht?(nt+ht)/2:nt||ht)-b(Ke))*Dt;Ke.y0+=Oe,Ke.y1+=Oe}})})}function xt(){ft.forEach(function(Dt){var It,Ft,qt,Nt=Te,Je=Dt.length;for(Dt.sort(p),qt=0;qt0&&(It.y0+=Ft,It.y1+=Ft),Nt=It.y1+he;if((Ft=Nt-he-Me)>0)for(Nt=It.y0-=Ft,It.y1-=Ft,qt=Je-2;qt>=0;--qt)(Ft=(It=Dt[qt]).y1+he-Nt)>0&&(It.y0-=Ft,It.y1-=Ft),Nt=It.y0})}}function Ye(Ze){Ze.nodes.forEach(function(st){st.sourceLinks.sort(u),st.targetLinks.sort(i)}),Ze.nodes.forEach(function(st){var ot=st.y0,ft=ot,yt=st.y1,Et=yt;st.sourceLinks.forEach(function(Tt){Tt.circular?(Tt.y0=yt-Tt.width/2,yt-=Tt.width):(Tt.y0=ot+Tt.width/2,ot+=Tt.width)}),st.targetLinks.forEach(function(Tt){Tt.circular?(Tt.y1=Et-Tt.width/2,Et-=Tt.width):(Tt.y1=ft+Tt.width/2,ft+=Tt.width)})})}return je.nodeId=function(Ze){return arguments.length?(ne=typeof Ze=="function"?Ze:n(Ze),je):ne},je.nodeAlign=function(Ze){return arguments.length?(ue=typeof Ze=="function"?Ze:n(Ze),je):ue},je.nodeWidth=function(Ze){return arguments.length?(Ce=+Ze,je):Ce},je.nodePadding=function(Ze){return arguments.length?(he=+Ze,je):he},je.nodes=function(Ze){return arguments.length?(me=typeof Ze=="function"?Ze:n(Ze),je):me},je.links=function(Ze){return arguments.length?(we=typeof Ze=="function"?Ze:n(Ze),je):we},je.size=function(Ze){return arguments.length?(ze=Te=0,Ae=+Ze[0],Me=+Ze[1],je):[Ae-ze,Me-Te]},je.extent=function(Ze){return arguments.length?(ze=+Ze[0][0],Ae=+Ze[1][0],Te=+Ze[0][1],Me=+Ze[1][1],je):[[ze,Te],[Ae,Me]]},je.iterations=function(Ze){return arguments.length?(Ee=+Ze,je):Ee},je.circularLinkGap=function(Ze){return arguments.length?(Ue=+Ze,je):Ue},je.nodePaddingRatio=function(Ze){return arguments.length?(ye=+Ze,je):ye},je.sortNodes=function(Ze){return arguments.length?(De=Ze,je):De},je.update=function(Ze){return P(Ze,ne),Ye(Ze),Ze.links.forEach(function(st){st.circular&&(st.circularLinkType=st.y0+st.y11||Ae>1)}function B(he,ye,ze){return he.sort(N),he.forEach(function(Te,Ae){var Me,Ce,ne=0;if(pe(Te,ze)&&U(Te))Te.circularPathData.verticalBuffer=ne+Te.width/2;else{for(var ue=0;ueCe.source.column)){var me=he[ue].circularPathData.verticalBuffer+he[ue].width/2+ye;ne=me>ne?me:ne}Te.circularPathData.verticalBuffer=ne+Te.width/2}}),he}function G(he,ye,ze,Te){var Ae=(0,_.VV)(he.links,function(Me){return Me.source.y0});he.links.forEach(function(Me){Me.circular&&(Me.circularPathData={})}),B(he.links.filter(function(Me){return Me.circularLinkType=="top"}),ye,Te),B(he.links.filter(function(Me){return Me.circularLinkType=="bottom"}),ye,Te),he.links.forEach(function(Me){if(Me.circular){if(Me.circularPathData.arcRadius=Me.width+A,Me.circularPathData.leftNodeBuffer=5,Me.circularPathData.rightNodeBuffer=5,Me.circularPathData.sourceWidth=Me.source.x1-Me.source.x0,Me.circularPathData.sourceX=Me.source.x0+Me.circularPathData.sourceWidth,Me.circularPathData.targetX=Me.target.x0,Me.circularPathData.sourceY=Me.y0,Me.circularPathData.targetY=Me.y1,pe(Me,Te)&&U(Me))Me.circularPathData.leftSmallArcRadius=A+Me.width/2,Me.circularPathData.leftLargeArcRadius=A+Me.width/2,Me.circularPathData.rightSmallArcRadius=A+Me.width/2,Me.circularPathData.rightLargeArcRadius=A+Me.width/2,Me.circularLinkType=="bottom"?(Me.circularPathData.verticalFullExtent=Me.source.y1+M+Me.circularPathData.verticalBuffer,Me.circularPathData.verticalLeftInnerExtent=Me.circularPathData.verticalFullExtent-Me.circularPathData.leftLargeArcRadius,Me.circularPathData.verticalRightInnerExtent=Me.circularPathData.verticalFullExtent-Me.circularPathData.rightLargeArcRadius):(Me.circularPathData.verticalFullExtent=Me.source.y0-M-Me.circularPathData.verticalBuffer,Me.circularPathData.verticalLeftInnerExtent=Me.circularPathData.verticalFullExtent+Me.circularPathData.leftLargeArcRadius,Me.circularPathData.verticalRightInnerExtent=Me.circularPathData.verticalFullExtent+Me.circularPathData.rightLargeArcRadius);else{var Ce=Me.source.column,ne=Me.circularLinkType,ue=he.links.filter(function(Ee){return Ee.source.column==Ce&&Ee.circularLinkType==ne});Me.circularLinkType=="bottom"?ue.sort(V):ue.sort(j);var me=0;ue.forEach(function(Ee,Ue){Ee.circularLinkID==Me.circularLinkID&&(Me.circularPathData.leftSmallArcRadius=A+Me.width/2+me,Me.circularPathData.leftLargeArcRadius=A+Me.width/2+Ue*ye+me),me+=Ee.width}),Ce=Me.target.column,ue=he.links.filter(function(Ee){return Ee.target.column==Ce&&Ee.circularLinkType==ne}),Me.circularLinkType=="bottom"?ue.sort(ee):ue.sort(H),me=0,ue.forEach(function(Ee,Ue){Ee.circularLinkID==Me.circularLinkID&&(Me.circularPathData.rightSmallArcRadius=A+Me.width/2+me,Me.circularPathData.rightLargeArcRadius=A+Me.width/2+Ue*ye+me),me+=Ee.width}),Me.circularLinkType=="bottom"?(Me.circularPathData.verticalFullExtent=Math.max(ze,Me.source.y1,Me.target.y1)+M+Me.circularPathData.verticalBuffer,Me.circularPathData.verticalLeftInnerExtent=Me.circularPathData.verticalFullExtent-Me.circularPathData.leftLargeArcRadius,Me.circularPathData.verticalRightInnerExtent=Me.circularPathData.verticalFullExtent-Me.circularPathData.rightLargeArcRadius):(Me.circularPathData.verticalFullExtent=Ae-M-Me.circularPathData.verticalBuffer,Me.circularPathData.verticalLeftInnerExtent=Me.circularPathData.verticalFullExtent+Me.circularPathData.leftLargeArcRadius,Me.circularPathData.verticalRightInnerExtent=Me.circularPathData.verticalFullExtent+Me.circularPathData.rightLargeArcRadius)}Me.circularPathData.leftInnerExtent=Me.circularPathData.sourceX+Me.circularPathData.leftNodeBuffer,Me.circularPathData.rightInnerExtent=Me.circularPathData.targetX-Me.circularPathData.rightNodeBuffer,Me.circularPathData.leftFullExtent=Me.circularPathData.sourceX+Me.circularPathData.leftLargeArcRadius+Me.circularPathData.leftNodeBuffer,Me.circularPathData.rightFullExtent=Me.circularPathData.targetX-Me.circularPathData.rightLargeArcRadius-Me.circularPathData.rightNodeBuffer}if(Me.circular)Me.path=function(Ee){return Ee.circularLinkType=="top"?"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:"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}(Me);else{var we=(0,s.h5)().source(function(Ee){return[Ee.source.x0+(Ee.source.x1-Ee.source.x0),Ee.y0]}).target(function(Ee){return[Ee.target.x0,Ee.y1]});Me.path=we(Me)}})}function N(he,ye){return Q(he)==Q(ye)?he.circularLinkType=="bottom"?V(he,ye):j(he,ye):Q(ye)-Q(he)}function j(he,ye){return he.y0-ye.y0}function V(he,ye){return ye.y0-he.y0}function H(he,ye){return he.y1-ye.y1}function ee(he,ye){return ye.y1-he.y1}function Q(he){return he.target.column-he.source.column}function X(he){return he.target.x0-he.source.x1}function Y(he,ye){var ze=I(he),Te=X(ye)/Math.tan(ze);return xe(he)=="up"?he.y1+Te:he.y1-Te}function K(he,ye){var ze=I(he),Te=X(ye)/Math.tan(ze);return xe(he)=="up"?he.y1-Te:he.y1+Te}function te(he,ye,ze,Te){he.links.forEach(function(Ae){if(!Ae.circular&&Ae.target.column-Ae.source.column>1){var Me=Ae.source.column+1,Ce=Ae.target.column-1,ne=1,ue=Ce-Me+1;for(ne=1;Me<=Ce;Me++,ne++)he.nodes.forEach(function(me){if(me.column==Me){var we,Ee=ne/(ue+1),Ue=Math.pow(1-Ee,3),De=3*Ee*Math.pow(1-Ee,2),je=3*Math.pow(Ee,2)*(1-Ee),ge=Math.pow(Ee,3),be=Ue*Ae.y0+De*Ae.y0+je*Ae.y1+ge*Ae.y1,Se=be-Ae.width/2,Ne=be+Ae.width/2;Se>me.y0&&Sest.y0&&Ze.y0st.y0&&Ze.y1st.y1)&&re(Ye,we,ye,ze)})):(Ne>me.y0&&Neme.y1)&&(we=Ne-me.y0+10,me=re(me,we,ye,ze),he.nodes.forEach(function(Ye){h(Ye,Te)!=h(me,Te)&&Ye.column==me.column&&Ye.y0me.y1&&re(Ye,we,ye,ze)}))}})}})}function re(he,ye,ze,Te){return he.y0+ye>=ze&&he.y1+ye<=Te&&(he.y0=he.y0+ye,he.y1=he.y1+ye,he.targetLinks.forEach(function(Ae){Ae.y1=Ae.y1+ye}),he.sourceLinks.forEach(function(Ae){Ae.y0=Ae.y0+ye})),he}function oe(he,ye,ze,Te){he.nodes.forEach(function(Ae){Te&&Ae.y+(Ae.y1-Ae.y0)>ye&&(Ae.y=Ae.y-(Ae.y+(Ae.y1-Ae.y0)-ye));var Me=he.links.filter(function(ue){return h(ue.source,ze)==h(Ae,ze)}),Ce=Me.length;Ce>1&&Me.sort(function(ue,me){if(!ue.circular&&!me.circular){if(ue.target.column==me.target.column||!ce(ue,me))return ue.y1-me.y1;if(ue.target.column>me.target.column){var we=K(me,ue);return ue.y1-we}if(me.target.column>ue.target.column)return K(ue,me)-me.y1}return ue.circular&&!me.circular?ue.circularLinkType=="top"?-1:1:me.circular&&!ue.circular?me.circularLinkType=="top"?1:-1:ue.circular&&me.circular?ue.circularLinkType===me.circularLinkType&&ue.circularLinkType=="top"?ue.target.column===me.target.column?ue.target.y1-me.target.y1:me.target.column-ue.target.column:ue.circularLinkType===me.circularLinkType&&ue.circularLinkType=="bottom"?ue.target.column===me.target.column?me.target.y1-ue.target.y1:ue.target.column-me.target.column:ue.circularLinkType=="top"?-1:1:void 0});var ne=Ae.y0;Me.forEach(function(ue){ue.y0=ne+ue.width/2,ne+=ue.width}),Me.forEach(function(ue,me){if(ue.circularLinkType=="bottom"){for(var we=me+1,Ee=0;we1&&Ae.sort(function(ne,ue){if(!ne.circular&&!ue.circular){if(ne.source.column==ue.source.column||!ce(ne,ue))return ne.y0-ue.y0;if(ue.source.column0?"up":"down"}function pe(he,ye){return h(he.source,ye)==h(he.target,ye)}function de(he,ye,ze){var Te=he.nodes,Ae=he.links,Me=!1,Ce=!1;if(Ae.forEach(function(me){me.circularLinkType=="top"?Me=!0:me.circularLinkType=="bottom"&&(Ce=!0)}),Me==0||Ce==0){var ne=(0,_.VV)(Te,function(me){return me.y0}),ue=(ze-ye)/((0,_.Fp)(Te,function(me){return me.y1})-ne);Te.forEach(function(me){var we=(me.y1-me.y0)*ue;me.y0=(me.y0-ne)*ue,me.y1=me.y0+we}),Ae.forEach(function(me){me.y0=(me.y0-ne)*ue,me.y1=(me.y1-ne)*ue,me.width=me.width*ue})}}},30838:function(D,E,e){e.r(E),e.d(E,{sankey:function(){return x},sankeyCenter:function(){return l},sankeyJustify:function(){return f},sankeyLeft:function(){return T},sankeyLinkHorizontal:function(){return h},sankeyRight:function(){return m}});var _=e(33064),w=e(15140);function s(M){return M.target.depth}function T(M){return M.depth}function m(M,A){return A-1-M.height}function f(M,A){return M.sourceLinks.length?M.depth:A-1}function l(M){return M.targetLinks.length?M.depth:M.sourceLinks.length?(0,_.VV)(M.sourceLinks,s)-1:0}function t(M){return function(){return M}}function a(M,A){return n(M.source,A.source)||M.index-A.index}function r(M,A){return n(M.target,A.target)||M.index-A.index}function n(M,A){return M.y0-A.y0}function o(M){return M.value}function i(M){return(M.y0+M.y1)/2}function u(M){return i(M.source)*M.value}function p(M){return i(M.target)*M.value}function c(M){return M.index}function b(M){return M.nodes}function d(M){return M.links}function v(M,A){var C=M.get(A);if(!C)throw new Error("missing: "+A);return C}function x(){var M=0,A=0,C=1,L=1,P=24,I=8,R=c,U=f,B=b,G=d,N=32;function j(){var Y={nodes:B.apply(null,arguments),links:G.apply(null,arguments)};return V(Y),H(Y),ee(Y),Q(Y),X(Y),Y}function V(Y){Y.nodes.forEach(function(te,re){te.index=re,te.sourceLinks=[],te.targetLinks=[]});var K=(0,w.UI)(Y.nodes,R);Y.links.forEach(function(te,re){te.index=re;var oe=te.source,se=te.target;typeof oe!="object"&&(oe=te.source=v(K,oe)),typeof se!="object"&&(se=te.target=v(K,se)),oe.sourceLinks.push(te),se.targetLinks.push(te)})}function H(Y){Y.nodes.forEach(function(K){K.value=Math.max((0,_.Sm)(K.sourceLinks,o),(0,_.Sm)(K.targetLinks,o))})}function ee(Y){var K,te,re;for(K=Y.nodes,te=[],re=0;K.length;++re,K=te,te=[])K.forEach(function(se){se.depth=re,se.sourceLinks.forEach(function(ce){te.indexOf(ce.target)<0&&te.push(ce.target)})});for(K=Y.nodes,te=[],re=0;K.length;++re,K=te,te=[])K.forEach(function(se){se.height=re,se.targetLinks.forEach(function(ce){te.indexOf(ce.source)<0&&te.push(ce.source)})});var oe=(C-M-P)/(re-1);Y.nodes.forEach(function(se){se.x1=(se.x0=M+Math.max(0,Math.min(re-1,Math.floor(U.call(null,se,re))))*oe)+P})}function Q(Y){var K=(0,w.b1)().key(function(xe){return xe.x0}).sortKeys(_.j2).entries(Y.nodes).map(function(xe){return xe.values});(function(){var xe=(0,_.Fp)(K,function(he){return he.length}),pe=.6666666666666666*(L-A)/(xe-1);I>pe&&(I=pe);var de=(0,_.VV)(K,function(he){return(L-A-(he.length-1)*I)/(0,_.Sm)(he,o)});K.forEach(function(he){he.forEach(function(ye,ze){ye.y1=(ye.y0=ze)+ye.value*de})}),Y.links.forEach(function(he){he.width=he.value*de})})(),ce();for(var te=1,re=N;re>0;--re)se(te*=.99),ce(),oe(te),ce();function oe(xe){K.forEach(function(pe){pe.forEach(function(de){if(de.targetLinks.length){var he=((0,_.Sm)(de.targetLinks,u)/(0,_.Sm)(de.targetLinks,o)-i(de))*xe;de.y0+=he,de.y1+=he}})})}function se(xe){K.slice().reverse().forEach(function(pe){pe.forEach(function(de){if(de.sourceLinks.length){var he=((0,_.Sm)(de.sourceLinks,p)/(0,_.Sm)(de.sourceLinks,o)-i(de))*xe;de.y0+=he,de.y1+=he}})})}function ce(){K.forEach(function(xe){var pe,de,he,ye=A,ze=xe.length;for(xe.sort(n),he=0;he0&&(pe.y0+=de,pe.y1+=de),ye=pe.y1+I;if((de=ye-I-L)>0)for(ye=pe.y0-=de,pe.y1-=de,he=ze-2;he>=0;--he)(de=(pe=xe[he]).y1+I-ye)>0&&(pe.y0-=de,pe.y1-=de),ye=pe.y0})}}function X(Y){Y.nodes.forEach(function(K){K.sourceLinks.sort(r),K.targetLinks.sort(a)}),Y.nodes.forEach(function(K){var te=K.y0,re=te;K.sourceLinks.forEach(function(oe){oe.y0=te+oe.width/2,te+=oe.width}),K.targetLinks.forEach(function(oe){oe.y1=re+oe.width/2,re+=oe.width})})}return j.update=function(Y){return X(Y),Y},j.nodeId=function(Y){return arguments.length?(R=typeof Y=="function"?Y:t(Y),j):R},j.nodeAlign=function(Y){return arguments.length?(U=typeof Y=="function"?Y:t(Y),j):U},j.nodeWidth=function(Y){return arguments.length?(P=+Y,j):P},j.nodePadding=function(Y){return arguments.length?(I=+Y,j):I},j.nodes=function(Y){return arguments.length?(B=typeof Y=="function"?Y:t(Y),j):B},j.links=function(Y){return arguments.length?(G=typeof Y=="function"?Y:t(Y),j):G},j.size=function(Y){return arguments.length?(M=A=0,C=+Y[0],L=+Y[1],j):[C-M,L-A]},j.extent=function(Y){return arguments.length?(M=+Y[0][0],C=+Y[1][0],A=+Y[0][1],L=+Y[1][1],j):[[M,A],[C,L]]},j.iterations=function(Y){return arguments.length?(N=+Y,j):N},j}var g=e(45879);function y(M){return[M.source.x1,M.y0]}function k(M){return[M.target.x0,M.y1]}function h(){return(0,g.h5)().source(y).target(k)}},39898:function(D,E,e){var _,w;(function(){var s={version:"3.8.0"},T=[].slice,m=function(ie){return T.call(ie)},f=self.document;function l(ie){return ie&&(ie.ownerDocument||ie.document||ie).documentElement}function t(ie){return ie&&(ie.ownerDocument&&ie.ownerDocument.defaultView||ie.document&&ie||ie.defaultView)}if(f)try{m(f.documentElement.childNodes)[0].nodeType}catch{m=function(ve){for(var Le=ve.length,Fe=new Array(Le);Le--;)Fe[Le]=ve[Le];return Fe}}if(Date.now||(Date.now=function(){return+new Date}),f)try{f.createElement("DIV").style.setProperty("opacity",0,"")}catch{var a=this.Element.prototype,r=a.setAttribute,n=a.setAttributeNS,o=this.CSSStyleDeclaration.prototype,i=o.setProperty;a.setAttribute=function(ve,Le){r.call(this,ve,Le+"")},a.setAttributeNS=function(ve,Le,Fe){n.call(this,ve,Le,Fe+"")},o.setProperty=function(ve,Le,Fe){i.call(this,ve,Le+"",Fe)}}function u(ie,ve){return ieve?1:ie>=ve?0:NaN}function p(ie){return ie===null?NaN:+ie}function c(ie){return!isNaN(ie)}function b(ie){return{left:function(ve,Le,Fe,Ve){for(arguments.length<3&&(Fe=0),arguments.length<4&&(Ve=ve.length);Fe>>1;ie(ve[We],Le)<0?Fe=We+1:Ve=We}return Fe},right:function(ve,Le,Fe,Ve){for(arguments.length<3&&(Fe=0),arguments.length<4&&(Ve=ve.length);Fe>>1;ie(ve[We],Le)>0?Ve=We:Fe=We+1}return Fe}}}s.ascending=u,s.descending=function(ie,ve){return veie?1:ve>=ie?0:NaN},s.min=function(ie,ve){var Le,Fe,Ve=-1,We=ie.length;if(arguments.length===1){for(;++Ve=Fe){Le=Fe;break}for(;++VeFe&&(Le=Fe)}else{for(;++Ve=Fe){Le=Fe;break}for(;++VeFe&&(Le=Fe)}return Le},s.max=function(ie,ve){var Le,Fe,Ve=-1,We=ie.length;if(arguments.length===1){for(;++Ve=Fe){Le=Fe;break}for(;++VeLe&&(Le=Fe)}else{for(;++Ve=Fe){Le=Fe;break}for(;++VeLe&&(Le=Fe)}return Le},s.extent=function(ie,ve){var Le,Fe,Ve,We=-1,$e=ie.length;if(arguments.length===1){for(;++We<$e;)if((Fe=ie[We])!=null&&Fe>=Fe){Le=Ve=Fe;break}for(;++We<$e;)(Fe=ie[We])!=null&&(Le>Fe&&(Le=Fe),Ve=Fe){Le=Ve=Fe;break}for(;++We<$e;)(Fe=ve.call(ie,ie[We],We))!=null&&(Le>Fe&&(Le=Fe),Ve1)return $e/(lt-1)},s.deviation=function(){var ie=s.variance.apply(this,arguments);return ie&&Math.sqrt(ie)};var d=b(u);function v(ie){return ie.length}s.bisectLeft=d.left,s.bisect=s.bisectRight=d.right,s.bisector=function(ie){return b(ie.length===1?function(ve,Le){return u(ie(ve),Le)}:ie)},s.shuffle=function(ie,ve,Le){(We=arguments.length)<3&&(Le=ie.length,We<2&&(ve=0));for(var Fe,Ve,We=Le-ve;We;)Ve=Math.random()*We--|0,Fe=ie[We+ve],ie[We+ve]=ie[Ve+ve],ie[Ve+ve]=Fe;return ie},s.permute=function(ie,ve){for(var Le=ve.length,Fe=new Array(Le);Le--;)Fe[Le]=ie[ve[Le]];return Fe},s.pairs=function(ie){for(var ve=0,Le=ie.length-1,Fe=ie[0],Ve=new Array(Le<0?0:Le);ve=0;)for(ve=(Fe=ie[Ve]).length;--ve>=0;)Le[--$e]=Fe[ve];return Le};var x=Math.abs;function g(ie){for(var ve=1;ie*ve%1;)ve*=10;return ve}function y(ie,ve){for(var Le in ve)Object.defineProperty(ie.prototype,Le,{value:ve[Le],enumerable:!1})}function k(){this._=Object.create(null)}function h(ie){return(ie+="")=="__proto__"||ie[0]==="\0"?"\0"+ie:ie}function M(ie){return(ie+="")[0]==="\0"?ie.slice(1):ie}function A(ie){return h(ie)in this._}function C(ie){return(ie=h(ie))in this._&&delete this._[ie]}function L(){var ie=[];for(var ve in this._)ie.push(M(ve));return ie}function P(){var ie=0;for(var ve in this._)++ie;return ie}function I(){for(var ie in this._)return!1;return!0}function R(){this._=Object.create(null)}function U(ie){return ie}function B(ie,ve,Le){return function(){var Fe=Le.apply(ve,arguments);return Fe===ve?ie:Fe}}function G(ie,ve){if(ve in ie)return ve;ve=ve.charAt(0).toUpperCase()+ve.slice(1);for(var Le=0,Fe=N.length;Leve;)Ve.push(Fe/We);else for(;(Fe=ie+Le*++$e)=Fe.length)return ve?ve.call(Le,lt):ie?lt.sort(ie):lt;for(var zt,Ut,Vt,Qt,gn=-1,en=lt.length,sn=Fe[gt++],rn=new k;++gn=Fe.length)return tt;var gt=[],zt=Ve[lt++];return tt.forEach(function(Ut,Vt){gt.push({key:Ut,values:$e(Vt,lt)})}),zt?gt.sort(function(Ut,Vt){return zt(Ut.key,Vt.key)}):gt}return Le.map=function(tt,lt){return We(lt,tt,0)},Le.entries=function(tt){return $e(We(s.map,tt,0),0)},Le.key=function(tt){return Fe.push(tt),Le},Le.sortKeys=function(tt){return Ve[Fe.length-1]=tt,Le},Le.sortValues=function(tt){return ie=tt,Le},Le.rollup=function(tt){return ve=tt,Le},Le},s.set=function(ie){var ve=new R;if(ie)for(var Le=0,Fe=ie.length;Le=0&&(Fe=ie.slice(Le+1),ie=ie.slice(0,Le)),ie)return arguments.length<2?this[ie].on(Fe):this[ie].on(Fe,ve);if(arguments.length===2){if(ve==null)for(ie in this)this.hasOwnProperty(ie)&&this[ie].on(Fe,null);return this}},s.event=null,s.requote=function(ie){return ie.replace(Y,"\\$&")};var Y=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,K={}.__proto__?function(ie,ve){ie.__proto__=ve}:function(ie,ve){for(var Le in ve)ie[Le]=ve[Le]};function te(ie){return K(ie,ce),ie}var re=function(ie,ve){return ve.querySelector(ie)},oe=function(ie,ve){return ve.querySelectorAll(ie)},se=function(ie,ve){var Le=ie.matches||ie[G(ie,"matchesSelector")];return se=function(Fe,Ve){return Le.call(Fe,Ve)},se(ie,ve)};typeof Sizzle=="function"&&(re=function(ie,ve){return Sizzle(ie,ve)[0]||null},oe=Sizzle,se=Sizzle.matchesSelector),s.selection=function(){return s.select(f.documentElement)};var ce=s.selection.prototype=[];function xe(ie){return typeof ie=="function"?ie:function(){return re(ie,this)}}function pe(ie){return typeof ie=="function"?ie:function(){return oe(ie,this)}}ce.select=function(ie){var ve,Le,Fe,Ve,We=[];ie=xe(ie);for(var $e=-1,tt=this.length;++$e=0&&(Le=ie.slice(0,ve))!=="xmlns"&&(ie=ie.slice(ve+1)),he.hasOwnProperty(Le)?{space:he[Le],local:ie}:ie}},ce.attr=function(ie,ve){if(arguments.length<2){if(typeof ie=="string"){var Le=this.node();return(ie=s.ns.qualify(ie)).local?Le.getAttributeNS(ie.space,ie.local):Le.getAttribute(ie)}for(ve in ie)this.each(ye(ve,ie[ve]));return this}return this.each(ye(ie,ve))},ce.classed=function(ie,ve){if(arguments.length<2){if(typeof ie=="string"){var Le=this.node(),Fe=(ie=Ae(ie)).length,Ve=-1;if(ve=Le.classList){for(;++Ve=0;)(Le=Fe[Ve])&&(We&&We!==Le.nextSibling&&We.parentNode.insertBefore(Le,We),We=Le);return this},ce.sort=function(ie){ie=De.apply(this,arguments);for(var ve=-1,Le=this.length;++ve=ve&&(ve=Ve+1);!($e=tt[ve])&&++ve0&&(ie=ie.slice(0,Ve));var $e=Ye.get(ie);function tt(){var lt=this[Fe];lt&&(this.removeEventListener(ie,lt,lt.$),delete this[Fe])}return $e&&(ie=$e,We=st),Ve?ve?function(){var lt=We(ve,m(arguments));tt.call(this),this.addEventListener(ie,this[Fe]=lt,lt.$=Le),lt._=ve}:tt:ve?j:function(){var lt,gt=new RegExp("^__on([^.]+)"+s.requote(ie)+"$");for(var zt in this)if(lt=zt.match(gt)){var Ut=this[zt];this.removeEventListener(lt[1],Ut,Ut.$),delete this[zt]}}}s.selection.enter=ge,s.selection.enter.prototype=be,be.append=ce.append,be.empty=ce.empty,be.node=ce.node,be.call=ce.call,be.size=ce.size,be.select=function(ie){for(var ve,Le,Fe,Ve,We,$e=[],tt=-1,lt=this.length;++tt1?Nt:ie<-1?-Nt:Math.asin(ie)}function nt(ie){return((ie=Math.exp(ie))+1/ie)/2}var ht=Math.SQRT2;s.interpolateZoom=function(ie,ve){var Le,Fe,Ve=ie[0],We=ie[1],$e=ie[2],tt=ve[0],lt=ve[1],gt=ve[2],zt=tt-Ve,Ut=lt-We,Vt=zt*zt+Ut*Ut;if(Vt<1e-12)Fe=Math.log(gt/$e)/ht,Le=function(Mn){return[Ve+Mn*zt,We+Mn*Ut,$e*Math.exp(ht*Mn*Fe)]};else{var Qt=Math.sqrt(Vt),gn=(gt*gt-$e*$e+4*Vt)/(2*$e*2*Qt),en=(gt*gt-$e*$e-4*Vt)/(2*gt*2*Qt),sn=Math.log(Math.sqrt(gn*gn+1)-gn),rn=Math.log(Math.sqrt(en*en+1)-en);Fe=(rn-sn)/ht,Le=function(Mn){var xn,an=Mn*Fe,zn=nt(sn),Vn=$e/(2*Qt)*(zn*(xn=ht*an+sn,((xn=Math.exp(2*xn))-1)/(xn+1))-function(nr){return((nr=Math.exp(nr))-1/nr)/2}(sn));return[Ve+Vn*zt,We+Vn*Ut,$e*zn/nt(ht*an+sn)]}}return Le.duration=1e3*Fe,Le},s.behavior.zoom=function(){var ie,ve,Le,Fe,Ve,We,$e,tt,lt,gt={x:0,y:0,k:1},zt=[960,500],Ut=Qe,Vt=250,Qt=0,gn="mousedown.zoom",en="mousemove.zoom",sn="mouseup.zoom",rn="touchstart.zoom",Mn=X(xn,"zoomstart","zoom","zoomend");function xn(xr){xr.on(gn,_r).on(Be+".zoom",Jr).on("dblclick.zoom",Kr).on(rn,Rr)}function an(xr){return[(xr[0]-gt.x)/gt.k,(xr[1]-gt.y)/gt.k]}function zn(xr){gt.k=Math.max(Ut[0],Math.min(Ut[1],xr))}function Vn(xr,zr){zr=function(Wr){return[Wr[0]*gt.k+gt.x,Wr[1]*gt.k+gt.y]}(zr),gt.x+=xr[0]-zr[0],gt.y+=xr[1]-zr[1]}function nr(xr,zr,Wr,Gr){xr.__chart__={x:gt.x,y:gt.y,k:gt.k},zn(Math.pow(2,Gr)),Vn(ve=zr,Wr),xr=s.select(xr),Vt>0&&(xr=xr.transition().duration(Vt)),xr.call(xn.event)}function rr(){$e&&$e.domain(We.range().map(function(xr){return(xr-gt.x)/gt.k}).map(We.invert)),lt&<.domain(tt.range().map(function(xr){return(xr-gt.y)/gt.k}).map(tt.invert))}function wr(xr){Qt++||xr({type:"zoomstart"})}function kr(xr){rr(),xr({type:"zoom",scale:gt.k,translate:[gt.x,gt.y]})}function mr(xr){--Qt||(xr({type:"zoomend"}),ve=null)}function _r(){var xr=this,zr=Mn.of(xr,arguments),Wr=0,Gr=s.select(t(xr)).on(en,ui).on(sn,ki),ii=an(s.mouse(xr)),ni=yt(xr);function ui(){Wr=1,Vn(s.mouse(xr),ii),kr(zr)}function ki(){Gr.on(en,null).on(sn,null),ni(Wr),mr(zr)}Si.call(xr),wr(zr)}function Rr(){var xr,zr=this,Wr=Mn.of(zr,arguments),Gr={},ii=0,ni=".zoom-"+s.event.changedTouches[0].identifier,ui="touchmove"+ni,ki="touchend"+ni,Ii=[],Ei=s.select(zr),wi=yt(zr);function Ai(){var ta=s.touches(zr);return xr=gt.k,ta.forEach(function(Yr){Yr.identifier in Gr&&(Gr[Yr.identifier]=an(Yr))}),ta}function Ci(){var ta=s.event.target;s.select(ta).on(ui,qi).on(ki,_s),Ii.push(ta);for(var Yr=s.event.changedTouches,pa=0,wa=Yr.length;pa1){ai=Ui[0];var na=Ui[1],Ba=ai[0]-na[0],Kl=ai[1]-na[1];ii=Ba*Ba+Kl*Kl}}function qi(){var ta,Yr,pa,wa,Ui=s.touches(zr);Si.call(zr);for(var ko=0,ai=Ui.length;ko360?tt-=360:tt<0&&(tt+=360),tt<60?Fe+(Ve-Fe)*tt/60:tt<180?Ve:tt<240?Fe+(Ve-Fe)*(240-tt)/60:Fe}($e))}return ie=isNaN(ie)?0:(ie%=360)<0?ie+360:ie,ve=isNaN(ve)||ve<0?0:ve>1?1:ve,Fe=2*(Le=Le<0?0:Le>1?1:Le)-(Ve=Le<=.5?Le*(1+ve):Le+ve-Le*ve),new kn(We(ie+120),We(ie),We(ie-120))}function Ct(ie,ve,Le){return this instanceof Ct?(this.h=+ie,this.c=+ve,void(this.l=+Le)):arguments.length<2?ie instanceof Ct?new Ct(ie.h,ie.c,ie.l):Kt(ie instanceof _t?ie.l:(ie=In((ie=s.rgb(ie)).r,ie.g,ie.b)).l,ie.a,ie.b):new Ct(ie,ve,Le)}bt.brighter=function(ie){return ie=Math.pow(.7,arguments.length?ie:1),new pt(this.h,this.s,this.l/ie)},bt.darker=function(ie){return ie=Math.pow(.7,arguments.length?ie:1),new pt(this.h,this.s,ie*this.l)},bt.rgb=function(){return Lt(this.h,this.s,this.l)},s.hcl=Ct;var mt=Ct.prototype=new ut;function Ot(ie,ve,Le){return isNaN(ie)&&(ie=0),isNaN(ve)&&(ve=0),new _t(Le,Math.cos(ie*=Je)*ve,Math.sin(ie)*ve)}function _t(ie,ve,Le){return this instanceof _t?(this.l=+ie,this.a=+ve,void(this.b=+Le)):arguments.length<2?ie instanceof _t?new _t(ie.l,ie.a,ie.b):ie instanceof Ct?Ot(ie.h,ie.c,ie.l):In((ie=kn(ie)).r,ie.g,ie.b):new _t(ie,ve,Le)}mt.brighter=function(ie){return new Ct(this.h,this.c,Math.min(100,this.l+Pt*(arguments.length?ie:1)))},mt.darker=function(ie){return new Ct(this.h,this.c,Math.max(0,this.l-Pt*(arguments.length?ie:1)))},mt.rgb=function(){return Ot(this.h,this.c,this.l).rgb()},s.lab=_t;var Pt=18,Bt=.95047,Wt=1.08883,Gt=_t.prototype=new ut;function Xt(ie,ve,Le){var Fe=(ie+16)/116,Ve=Fe+ve/500,We=Fe-Le/200;return new kn(ln(3.2404542*(Ve=nn(Ve)*Bt)-1.5371385*(Fe=1*nn(Fe))-.4985314*(We=nn(We)*Wt)),ln(-.969266*Ve+1.8760108*Fe+.041556*We),ln(.0556434*Ve-.2040259*Fe+1.0572252*We))}function Kt(ie,ve,Le){return ie>0?new Ct(Math.atan2(Le,ve)*Ke,Math.sqrt(ve*ve+Le*Le),ie):new Ct(NaN,NaN,ie)}function nn(ie){return ie>.206893034?ie*ie*ie:(ie-.13793103448275862)/7.787037}function yn(ie){return ie>.008856?Math.pow(ie,.3333333333333333):7.787037*ie+.13793103448275862}function ln(ie){return Math.round(255*(ie<=.00304?12.92*ie:1.055*Math.pow(ie,.4166666666666667)-.055))}function kn(ie,ve,Le){return this instanceof kn?(this.r=~~ie,this.g=~~ve,void(this.b=~~Le)):arguments.length<2?ie instanceof kn?new kn(ie.r,ie.g,ie.b):fn(""+ie,kn,Lt):new kn(ie,ve,Le)}function Wn(ie){return new kn(ie>>16,ie>>8&255,255&ie)}function wn(ie){return Wn(ie)+""}Gt.brighter=function(ie){return new _t(Math.min(100,this.l+Pt*(arguments.length?ie:1)),this.a,this.b)},Gt.darker=function(ie){return new _t(Math.max(0,this.l-Pt*(arguments.length?ie:1)),this.a,this.b)},Gt.rgb=function(){return Xt(this.l,this.a,this.b)},s.rgb=kn;var on=kn.prototype=new ut;function _n(ie){return ie<16?"0"+Math.max(0,ie).toString(16):Math.min(255,ie).toString(16)}function fn(ie,ve,Le){var Fe,Ve,We,$e=0,tt=0,lt=0;if(Fe=/([a-z]+)\((.*)\)/.exec(ie=ie.toLowerCase()))switch(Ve=Fe[2].split(","),Fe[1]){case"hsl":return Le(parseFloat(Ve[0]),parseFloat(Ve[1])/100,parseFloat(Ve[2])/100);case"rgb":return ve(Nn(Ve[0]),Nn(Ve[1]),Nn(Ve[2]))}return(We=Hn.get(ie))?ve(We.r,We.g,We.b):(ie==null||ie.charAt(0)!=="#"||isNaN(We=parseInt(ie.slice(1),16))||(ie.length===4?($e=(3840&We)>>4,$e|=$e>>4,tt=240&We,tt|=tt>>4,lt=15&We,lt|=lt<<4):ie.length===7&&($e=(16711680&We)>>16,tt=(65280&We)>>8,lt=255&We)),ve($e,tt,lt))}function hn(ie,ve,Le){var Fe,Ve,We=Math.min(ie/=255,ve/=255,Le/=255),$e=Math.max(ie,ve,Le),tt=$e-We,lt=($e+We)/2;return tt?(Ve=lt<.5?tt/($e+We):tt/(2-$e-We),Fe=ie==$e?(ve-Le)/tt+(ve0&<<1?0:Fe),new pt(Fe,Ve,lt)}function In(ie,ve,Le){var Fe=yn((.4124564*(ie=Cn(ie))+.3575761*(ve=Cn(ve))+.1804375*(Le=Cn(Le)))/Bt),Ve=yn((.2126729*ie+.7151522*ve+.072175*Le)/1);return _t(116*Ve-16,500*(Fe-Ve),200*(Ve-yn((.0193339*ie+.119192*ve+.9503041*Le)/Wt)))}function Cn(ie){return(ie/=255)<=.04045?ie/12.92:Math.pow((ie+.055)/1.055,2.4)}function Nn(ie){var ve=parseFloat(ie);return ie.charAt(ie.length-1)==="%"?Math.round(2.55*ve):ve}on.brighter=function(ie){ie=Math.pow(.7,arguments.length?ie:1);var ve=this.r,Le=this.g,Fe=this.b,Ve=30;return ve||Le||Fe?(ve&&ve=200&&Ut<300||Ut===304){try{zt=Le.call(Ve,tt)}catch(Vt){return void We.error.call(Ve,Vt)}We.load.call(Ve,zt)}else We.error.call(Ve,tt)}return self.XDomainRequest&&!("withCredentials"in tt)&&/^(http(s)?:)?\/\//.test(ie)&&(tt=new XDomainRequest),"onload"in tt?tt.onload=tt.onerror=gt:tt.onreadystatechange=function(){tt.readyState>3&>()},tt.onprogress=function(zt){var Ut=s.event;s.event=zt;try{We.progress.call(Ve,tt)}finally{s.event=Ut}},Ve.header=function(zt,Ut){return zt=(zt+"").toLowerCase(),arguments.length<2?$e[zt]:(Ut==null?delete $e[zt]:$e[zt]=Ut+"",Ve)},Ve.mimeType=function(zt){return arguments.length?(ve=zt==null?null:zt+"",Ve):ve},Ve.responseType=function(zt){return arguments.length?(lt=zt,Ve):lt},Ve.response=function(zt){return Le=zt,Ve},["get","post"].forEach(function(zt){Ve[zt]=function(){return Ve.send.apply(Ve,[zt].concat(m(arguments)))}}),Ve.send=function(zt,Ut,Vt){if(arguments.length===2&&typeof Ut=="function"&&(Vt=Ut,Ut=null),tt.open(zt,ie,!0),ve==null||"accept"in $e||($e.accept=ve+",*/*"),tt.setRequestHeader)for(var Qt in $e)tt.setRequestHeader(Qt,$e[Qt]);return ve!=null&&tt.overrideMimeType&&tt.overrideMimeType(ve),lt!=null&&(tt.responseType=lt),Vt!=null&&Ve.on("error",Vt).on("load",function(gn){Vt(null,gn)}),We.beforesend.call(Ve,tt),tt.send(Ut??null),Ve},Ve.abort=function(){return tt.abort(),Ve},s.rebind(Ve,We,"on"),Fe==null?Ve:Ve.get(function(zt){return zt.length===1?function(Ut,Vt){zt(Ut==null?Vt:null)}:zt}(Fe))}Hn.forEach(function(ie,ve){Hn.set(ie,Wn(ve))}),s.functor=qn,s.xhr=or(U),s.dsv=function(ie,ve){var Le=new RegExp('["'+ie+` +]`),Fe=ie.charCodeAt(0);function Ve(gt,zt,Ut){arguments.length<3&&(Ut=zt,zt=null);var Vt=tr(gt,ve,zt==null?We:$e(zt),Ut);return Vt.row=function(Qt){return arguments.length?Vt.response((zt=Qt)==null?We:$e(Qt)):zt},Vt}function We(gt){return Ve.parse(gt.responseText)}function $e(gt){return function(zt){return Ve.parse(zt.responseText,gt)}}function tt(gt){return gt.map(lt).join(ie)}function lt(gt){return Le.test(gt)?'"'+gt.replace(/\"/g,'""')+'"':gt}return Ve.parse=function(gt,zt){var Ut;return Ve.parseRows(gt,function(Vt,Qt){if(Ut)return Ut(Vt,Qt-1);var gn=function(en){for(var sn={},rn=Vt.length,Mn=0;Mn=sn)return gn;if(Vt)return Vt=!1,Qt;var zn=rn;if(gt.charCodeAt(zn)===34){for(var Vn=zn;Vn++24?(isFinite(ve)&&(clearTimeout(dr),dr=setTimeout(mn,ve)),ir=0):(ir=1,yr(mn))}function Ln(){for(var ie=Date.now(),ve=Tr;ve;)ie>=ve.t&&ve.c(ie-ve.t)&&(ve.c=null),ve=ve.n;return ie}function En(){for(var ie,ve=Tr,Le=1/0;ve;)ve.c?(ve.t1&&(ve=ie[We[$e-2]],Le=ie[We[$e-1]],Fe=ie[tt],(Le[0]-ve[0])*(Fe[1]-ve[1])-(Le[1]-ve[1])*(Fe[0]-ve[0])<=0);)--$e;We[$e++]=tt}return We.slice(0,$e)}function Qn(ie,ve){return ie[0]-ve[0]||ie[1]-ve[1]}s.timer=function(){$t.apply(this,arguments)},s.timer.flush=function(){Ln(),En()},s.round=function(ie,ve){return ve?Math.round(ie*(ve=Math.pow(10,ve)))/ve:Math.round(ie)},s.geom={},s.geom.hull=function(ie){var ve=jn,Le=$n;if(arguments.length)return Fe(ie);function Fe(Ve){if(Ve.length<3)return[];var We,$e=qn(ve),tt=qn(Le),lt=Ve.length,gt=[],zt=[];for(We=0;We=0;--We)en.push(Ve[gt[Ut[We]][2]]);for(We=+Qt;WeDt)tt=tt.L;else{if(!((Ve=We-Jn(tt,$e))>Dt)){Fe>-Dt?(ve=tt.P,Le=tt):Ve>-Dt?(ve=tt,Le=tt.N):ve=Le=tt;break}if(!tt.R){ve=tt;break}tt=tt.R}var lt=vn(ie);if(Rn.insert(ve,lt),ve||Le){if(ve===Le)return vr(ve),Le=vn(ve.site),Rn.insert(lt,Le),lt.edge=Le.edge=Lr(ve.site,lt.site),cr(ve),void cr(Le);if(Le){vr(ve),vr(Le);var gt=ve.site,zt=gt.x,Ut=gt.y,Vt=ie.x-zt,Qt=ie.y-Ut,gn=Le.site,en=gn.x-zt,sn=gn.y-Ut,rn=2*(Vt*sn-Qt*en),Mn=Vt*Vt+Qt*Qt,xn=en*en+sn*sn,an={x:(sn*Mn-Qt*xn)/rn+zt,y:(Vt*xn-en*Mn)/rn+Ut};pr(Le.edge,gt,gn,an),lt.edge=Lr(gt,ie,null,an),Le.edge=Lr(ie,gn,null,an),cr(ve),cr(Le)}else lt.edge=Lr(ve.site,lt.site)}}function er(ie,ve){var Le=ie.site,Fe=Le.x,Ve=Le.y,We=Ve-ve;if(!We)return Fe;var $e=ie.P;if(!$e)return-1/0;var tt=(Le=$e.site).x,lt=Le.y,gt=lt-ve;if(!gt)return tt;var zt=tt-Fe,Ut=1/We-1/gt,Vt=zt/gt;return Ut?(-Vt+Math.sqrt(Vt*Vt-2*Ut*(zt*zt/(-2*gt)-lt+gt/2+Ve-We/2)))/Ut+Fe:(Fe+tt)/2}function Jn(ie,ve){var Le=ie.N;if(Le)return er(Le,ve);var Fe=ie.site;return Fe.y===ve?Fe.x:1/0}function lr(ie){this.site=ie,this.edges=[]}function sr(ie,ve){return ve.angle-ie.angle}function fr(){ci(this),this.x=this.y=this.arc=this.site=this.cy=null}function cr(ie){var ve=ie.P,Le=ie.N;if(ve&&Le){var Fe=ve.site,Ve=ie.site,We=Le.site;if(Fe!==We){var $e=Ve.x,tt=Ve.y,lt=Fe.x-$e,gt=Fe.y-tt,zt=We.x-$e,Ut=2*(lt*(sn=We.y-tt)-gt*zt);if(!(Ut>=-1e-12)){var Vt=lt*lt+gt*gt,Qt=zt*zt+sn*sn,gn=(sn*Vt-gt*Qt)/Ut,en=(lt*Qt-zt*Vt)/Ut,sn=en+tt,rn=bn.pop()||new fr;rn.arc=ie,rn.site=Ve,rn.x=gn+$e,rn.y=sn+Math.sqrt(gn*gn+en*en),rn.cy=sn,ie.circle=rn;for(var Mn=null,xn=Sn._;xn;)if(rn.y=tt)return;if(Vt>gn){if(We){if(We.y>=gt)return}else We={x:sn,y:lt};Le={x:sn,y:gt}}else{if(We){if(We.y1)if(Vt>gn){if(We){if(We.y>=gt)return}else We={x:(lt-Ve)/Fe,y:lt};Le={x:(gt-Ve)/Fe,y:gt}}else{if(We){if(We.y=tt)return}else We={x:$e,y:Fe*$e+Ve};Le={x:tt,y:Fe*tt+Ve}}else{if(We){if(We.x<$e)return}else We={x:tt,y:Fe*tt+Ve};Le={x:$e,y:Fe*$e+Ve}}return ie.a=We,ie.b=Le,!0}function Mr(ie,ve){this.l=ie,this.r=ve,this.a=this.b=null}function Lr(ie,ve,Le,Fe){var Ve=new Mr(ie,ve);return Jt.push(Ve),Le&&pr(Ve,ie,ve,Le),Fe&&pr(Ve,ve,ie,Fe),un[ie.i].edges.push(new Pr(Ve,ie,ve)),un[ve.i].edges.push(new Pr(Ve,ve,ie)),Ve}function pr(ie,ve,Le,Fe){ie.a||ie.b?ie.l===Le?ie.b=Fe:ie.a=Fe:(ie.a=Fe,ie.l=ve,ie.r=Le)}function Pr(ie,ve,Le){var Fe=ie.a,Ve=ie.b;this.edge=ie,this.site=ve,this.angle=Le?Math.atan2(Le.y-ve.y,Le.x-ve.x):ie.l===ve?Math.atan2(Ve.x-Fe.x,Fe.y-Ve.y):Math.atan2(Fe.x-Ve.x,Ve.y-Fe.y)}function Hr(){this._=null}function ci(ie){ie.U=ie.C=ie.L=ie.R=ie.P=ie.N=null}function Ti(ie,ve){var Le=ve,Fe=ve.R,Ve=Le.U;Ve?Ve.L===Le?Ve.L=Fe:Ve.R=Fe:ie._=Fe,Fe.U=Ve,Le.U=Fe,Le.R=Fe.L,Le.R&&(Le.R.U=Le),Fe.L=Le}function Mi(ie,ve){var Le=ve,Fe=ve.L,Ve=Le.U;Ve?Ve.L===Le?Ve.L=Fe:Ve.R=Fe:ie._=Fe,Fe.U=Ve,Le.U=Fe,Le.L=Fe.R,Le.L&&(Le.L.U=Le),Fe.R=Le}function fa(ie){for(;ie.L;)ie=ie.L;return ie}function Hi(ie,ve){var Le,Fe,Ve,We=ie.sort(xi).pop();for(Jt=[],un=new Array(ie.length),Rn=new Hr,Sn=new Hr;;)if(Ve=On,We&&(!Ve||We.y0)){if(rn/=rr,rr<0){if(rn0){if(rn>nr)return;rn>Un&&(Un=rn)}if(rn=Ut-an,rr||!(rn<0)){if(rn/=rr,rr<0){if(rn>nr)return;rn>Un&&(Un=rn)}else if(rr>0){if(rn0)){if(rn/=wr,wr<0){if(rn0){if(rn>nr)return;rn>Un&&(Un=rn)}if(rn=Vt-zn,wr||!(rn<0)){if(rn/=wr,wr<0){if(rn>nr)return;rn>Un&&(Un=rn)}else if(wr>0){if(rn0&&(sn.a={x:an+Un*rr,y:zn+Un*wr}),nr<1&&(sn.b={x:an+nr*rr,y:zn+nr*wr}),sn}}}}}),en=Qt.length;en--;)(!Sr(lt=Qt[en],tt)||!gn(lt)||x(lt.a.x-lt.b.x)Dt||x(Ut-gt)>Dt)&&(gn.splice(Qt,0,new Pr((rr=Vt.site,wr=rn,kr=x(zt-Mn)Dt?{x:Mn,y:x(lt-Mn)Dt?{x:x(gt-zn)Dt?{x:xn,y:x(lt-xn)Dt?{x:x(gt-an)=zt&&rn.x<=Vt&&rn.y>=Ut&&rn.y<=Qt?[[zt,Qt],[Vt,Qt],[Vt,Ut],[zt,Ut]]:[]).point=lt[en]}),gt}function tt(lt){return lt.map(function(gt,zt){return{x:Math.round(Fe(gt,zt)/Dt)*Dt,y:Math.round(Ve(gt,zt)/Dt)*Dt,i:zt}})}return $e.links=function(lt){return Hi(tt(lt)).edges.filter(function(gt){return gt.l&>.r}).map(function(gt){return{source:lt[gt.l.i],target:lt[gt.r.i]}})},$e.triangles=function(lt){var gt=[];return Hi(tt(lt)).cells.forEach(function(zt,Ut){for(var Vt,Qt,gn,en,sn=zt.site,rn=zt.edges.sort(sr),Mn=-1,xn=rn.length,an=rn[xn-1].edge,zn=an.l===sn?an.r:an.l;++MnWe||Vt>$e||Qt=Un)<<1|ve>=zn,rr=nr+4;nrWe&&(Ve=ve.slice(We,Ve),tt[$e]?tt[$e]+=Ve:tt[++$e]=Ve),(Le=Le[0])===(Fe=Fe[0])?tt[$e]?tt[$e]+=Fe:tt[++$e]=Fe:(tt[++$e]=null,lt.push({i:$e,x:Qa(Le,Fe)})),We=yl.lastIndex;return Wern&&(rn=zt.x),zt.y>Mn&&(Mn=zt.y),Ut.push(zt.x),Vt.push(zt.y);else for(Qt=0;Qtrn&&(rn=zn),Un>Mn&&(Mn=Un),Ut.push(zn),Vt.push(Un)}var nr=rn-en,rr=Mn-sn;function wr(_r,Rr,Jr,Kr,xr,zr,Wr,Gr){if(!isNaN(Jr)&&!isNaN(Kr))if(_r.leaf){var ii=_r.x,ni=_r.y;if(ii!=null)if(x(ii-Jr)+x(ni-Kr)<.01)kr(_r,Rr,Jr,Kr,xr,zr,Wr,Gr);else{var ui=_r.point;_r.x=_r.y=_r.point=null,kr(_r,ui,ii,ni,xr,zr,Wr,Gr),kr(_r,Rr,Jr,Kr,xr,zr,Wr,Gr)}else _r.x=Jr,_r.y=Kr,_r.point=Rr}else kr(_r,Rr,Jr,Kr,xr,zr,Wr,Gr)}function kr(_r,Rr,Jr,Kr,xr,zr,Wr,Gr){var ii=.5*(xr+Wr),ni=.5*(zr+Gr),ui=Jr>=ii,ki=Kr>=ni,Ii=ki<<1|ui;_r.leaf=!1,ui?xr=ii:Wr=ii,ki?zr=ni:Gr=ni,wr(_r=_r.nodes[Ii]||(_r.nodes[Ii]={leaf:!0,nodes:[],point:null,x:null,y:null}),Rr,Jr,Kr,xr,zr,Wr,Gr)}nr>rr?Mn=sn+nr:rn=en+rr;var mr={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(_r){wr(mr,_r,+xn(_r,++Qt),+an(_r,Qt),en,sn,rn,Mn)},visit:function(_r){Xs(_r,mr,en,sn,rn,Mn)},find:function(_r){return Uu(mr,_r[0],_r[1],en,sn,rn,Mn)}};if(Qt=-1,ve==null){for(;++Qt=0&&!(Le=s.interpolators[Fe](ie,ve)););return Le}function eo(ie,ve){var Le,Fe=[],Ve=[],We=ie.length,$e=ve.length,tt=Math.min(ie.length,ve.length);for(Le=0;Le=1?1:ie(ve)}}function bo(ie){return function(ve){return 1-ie(1-ve)}}function Ro(ie){return function(ve){return .5*(ve<.5?ie(2*ve):2-ie(2-2*ve))}}function xl(ie){return ie*ie}function Vu(ie){return ie*ie*ie}function Xo(ie){if(ie<=0)return 0;if(ie>=1)return 1;var ve=ie*ie,Le=ve*ie;return 4*(ie<.5?Le:3*(ie-ve)+Le-.75)}function Hu(ie){return 1-Math.cos(ie*Nt)}function qu(ie){return Math.pow(2,10*(ie-1))}function Ec(ie){return 1-Math.sqrt(1-ie*ie)}function gu(ie){return ie<.36363636363636365?7.5625*ie*ie:ie<.7272727272727273?7.5625*(ie-=.5454545454545454)*ie+.75:ie<.9090909090909091?7.5625*(ie-=.8181818181818182)*ie+.9375:7.5625*(ie-=.9545454545454546)*ie+.984375}function Gu(ie,ve){return ve-=ie,function(Le){return Math.round(ie+ve*Le)}}function vu(ie){var ve,Le,Fe,Ve=[ie.a,ie.b],We=[ie.c,ie.d],$e=Jo(Ve),tt=$o(Ve,We),lt=Jo(((ve=We)[0]+=(Fe=-tt)*(Le=Ve)[0],ve[1]+=Fe*Le[1],ve))||0;Ve[0]*We[1]=0?ie.slice(0,ve):ie,Fe=ve>=0?ie.slice(ve+1):"in";return Le=fi.get(Le)||fs,ao((Fe=hs.get(Fe)||U)(Le.apply(null,T.call(arguments,1))))},s.interpolateHcl=function(ie,ve){ie=s.hcl(ie),ve=s.hcl(ve);var Le=ie.h,Fe=ie.c,Ve=ie.l,We=ve.h-Le,$e=ve.c-Fe,tt=ve.l-Ve;return isNaN($e)&&($e=0,Fe=isNaN(Fe)?ve.c:Fe),isNaN(We)?(We=0,Le=isNaN(Le)?ve.h:Le):We>180?We-=360:We<-180&&(We+=360),function(lt){return Ot(Le+We*lt,Fe+$e*lt,Ve+tt*lt)+""}},s.interpolateHsl=function(ie,ve){ie=s.hsl(ie),ve=s.hsl(ve);var Le=ie.h,Fe=ie.s,Ve=ie.l,We=ve.h-Le,$e=ve.s-Fe,tt=ve.l-Ve;return isNaN($e)&&($e=0,Fe=isNaN(Fe)?ve.s:Fe),isNaN(We)?(We=0,Le=isNaN(Le)?ve.h:Le):We>180?We-=360:We<-180&&(We+=360),function(lt){return Lt(Le+We*lt,Fe+$e*lt,Ve+tt*lt)+""}},s.interpolateLab=function(ie,ve){ie=s.lab(ie),ve=s.lab(ve);var Le=ie.l,Fe=ie.a,Ve=ie.b,We=ve.l-Le,$e=ve.a-Fe,tt=ve.b-Ve;return function(lt){return Xt(Le+We*lt,Fe+$e*lt,Ve+tt*lt)+""}},s.interpolateRound=Gu,s.transform=function(ie){var ve=f.createElementNS(s.ns.prefix.svg,"g");return(s.transform=function(Le){if(Le!=null){ve.setAttribute("transform",Le);var Fe=ve.transform.baseVal.consolidate()}return new vu(Fe?Fe.matrix:Js)})(ie)},vu.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Js={a:1,b:0,c:0,d:1,e:0,f:0};function Ko(ie){return ie.length?ie.pop()+",":""}function mu(ie,ve){var Le=[],Fe=[];return ie=s.transform(ie),ve=s.transform(ve),function(Ve,We,$e,tt){if(Ve[0]!==We[0]||Ve[1]!==We[1]){var lt=$e.push("translate(",null,",",null,")");tt.push({i:lt-4,x:Qa(Ve[0],We[0])},{i:lt-2,x:Qa(Ve[1],We[1])})}else(We[0]||We[1])&&$e.push("translate("+We+")")}(ie.translate,ve.translate,Le,Fe),function(Ve,We,$e,tt){Ve!==We?(Ve-We>180?We+=360:We-Ve>180&&(Ve+=360),tt.push({i:$e.push(Ko($e)+"rotate(",null,")")-2,x:Qa(Ve,We)})):We&&$e.push(Ko($e)+"rotate("+We+")")}(ie.rotate,ve.rotate,Le,Fe),function(Ve,We,$e,tt){Ve!==We?tt.push({i:$e.push(Ko($e)+"skewX(",null,")")-2,x:Qa(Ve,We)}):We&&$e.push(Ko($e)+"skewX("+We+")")}(ie.skew,ve.skew,Le,Fe),function(Ve,We,$e,tt){if(Ve[0]!==We[0]||Ve[1]!==We[1]){var lt=$e.push(Ko($e)+"scale(",null,",",null,")");tt.push({i:lt-4,x:Qa(Ve[0],We[0])},{i:lt-2,x:Qa(Ve[1],We[1])})}else We[0]===1&&We[1]===1||$e.push(Ko($e)+"scale("+We+")")}(ie.scale,ve.scale,Le,Fe),ie=ve=null,function(Ve){for(var We,$e=-1,tt=Fe.length;++$e0?Le=an:(ie.c=null,ie.t=NaN,ie=null,tt.end({type:"end",alpha:Le=0})):an>0&&(tt.start({type:"start",alpha:Le=an}),ie=$t($e.tick)),$e):Le},$e.start=function(){var an,zn,Un,nr=sn.length,rr=rn.length,wr=lt[0],kr=lt[1];for(an=0;an=0;)Le.push(Ve[Fe])}function oo(ie,ve){for(var Le=[ie],Fe=[];(ie=Le.pop())!=null;)if(Fe.push(ie),(We=ie.children)&&(Ve=We.length))for(var Ve,We,$e=-1;++$e=0;)$e.push(zt=gt[lt]),zt.parent=We,zt.depth=We.depth+1;Le&&(We.value=0),We.children=gt}else Le&&(We.value=+Le.call(Fe,We,We.depth)||0),delete We.children;return oo(Ve,function(Ut){var Vt,Qt;ie&&(Vt=Ut.children)&&Vt.sort(ie),Le&&(Qt=Ut.parent)&&(Qt.value+=Ut.value)}),tt}return Fe.sort=function(Ve){return arguments.length?(ie=Ve,Fe):ie},Fe.children=function(Ve){return arguments.length?(ve=Ve,Fe):ve},Fe.value=function(Ve){return arguments.length?(Le=Ve,Fe):Le},Fe.revalue=function(Ve){return Le&&(Qs(Ve,function(We){We.children&&(We.value=0)}),oo(Ve,function(We){var $e;We.children||(We.value=+Le.call(Fe,We,We.depth)||0),($e=We.parent)&&($e.value+=We.value)})),Ve},Fe},s.layout.partition=function(){var ie=s.layout.hierarchy(),ve=[1,1];function Le(We,$e,tt,lt){var gt=We.children;if(We.x=$e,We.y=We.depth*lt,We.dx=tt,We.dy=lt,gt&&(zt=gt.length)){var zt,Ut,Vt,Qt=-1;for(tt=We.value?tt/We.value:0;++Qttt&&(tt=Fe),$e.push(Fe)}for(Le=0;LeVe&&(Fe=Le,Ve=ve);return Fe}function gs(ie){return ie.reduce(ql,0)}function ql(ie,ve){return ie+ve[1]}function Sl(ie,ve){return _u(ie,Math.ceil(Math.log(ve.length)/Math.LN2+1))}function _u(ie,ve){for(var Le=-1,Fe=+ie[0],Ve=(ie[1]-Fe)/ve,We=[];++Le<=ve;)We[Le]=Ve*Le+Fe;return We}function El(ie){return[s.min(ie),s.max(ie)]}function nl(ie,ve){return ie.value-ve.value}function zs(ie,ve){var Le=ie._pack_next;ie._pack_next=ve,ve._pack_prev=ie,ve._pack_next=Le,Le._pack_prev=ve}function Ds(ie,ve){ie._pack_next=ve,ve._pack_prev=ie}function bi(ie,ve){var Le=ve.x-ie.x,Fe=ve.y-ie.y,Ve=ie.r+ve.r;return .999*Ve*Ve>Le*Le+Fe*Fe}function vs(ie){if((ve=ie.children)&&(lt=ve.length)){var ve,Le,Fe,Ve,We,$e,tt,lt,gt=1/0,zt=-1/0,Ut=1/0,Vt=-1/0;if(ve.forEach(ms),(Le=ve[0]).x=-Le.r,Le.y=0,xn(Le),lt>1&&((Fe=ve[1]).x=Fe.r,Fe.y=0,xn(Fe),lt>2))for(li(Le,Fe,Ve=ve[2]),xn(Ve),zs(Le,Ve),Le._pack_prev=Ve,zs(Ve,Fe),Fe=Le._pack_next,We=3;We0)for($e=-1;++$e=Ut[0]&<<=Ut[1]&&((tt=gt[s.bisect(Vt,lt,1,gn)-1]).y+=en,tt.push(We[$e]));return gt}return Ve.value=function(We){return arguments.length?(ve=We,Ve):ve},Ve.range=function(We){return arguments.length?(Le=qn(We),Ve):Le},Ve.bins=function(We){return arguments.length?(Fe=typeof We=="number"?function($e){return _u($e,We)}:qn(We),Ve):Fe},Ve.frequency=function(We){return arguments.length?(ie=!!We,Ve):ie},Ve},s.layout.pack=function(){var ie,ve=s.layout.hierarchy().sort(nl),Le=0,Fe=[1,1];function Ve(We,$e){var tt=ve.call(this,We,$e),lt=tt[0],gt=Fe[0],zt=Fe[1],Ut=ie==null?Math.sqrt:typeof ie=="function"?ie:function(){return ie};if(lt.x=lt.y=0,oo(lt,function(Qt){Qt.r=+Ut(Qt.value)}),oo(lt,vs),Le){var Vt=Le*(ie?1:Math.max(2*lt.r/gt,2*lt.r/zt))/2;oo(lt,function(Qt){Qt.r+=Vt}),oo(lt,vs),oo(lt,function(Qt){Qt.r-=Vt})}return oi(lt,gt/2,zt/2,ie?1:1/Math.max(2*lt.r/gt,2*lt.r/zt)),tt}return Ve.size=function(We){return arguments.length?(Fe=We,Ve):Fe},Ve.radius=function(We){return arguments.length?(ie=We==null||typeof We=="function"?We:+We,Ve):ie},Ve.padding=function(We){return arguments.length?(Le=+We,Ve):Le},Os(Ve,ve)},s.layout.tree=function(){var ie=s.layout.hierarchy().sort(null).value(null),ve=es,Le=[1,1],Fe=null;function Ve(lt,gt){var zt=ie.call(this,lt,gt),Ut=zt[0],Vt=function(xn){for(var an,zn={A:null,children:[xn]},Un=[zn];(an=Un.pop())!=null;)for(var nr,rr=an.children,wr=0,kr=rr.length;wrgn.x&&(gn=xn),xn.depth>en.depth&&(en=xn)});var sn=ve(Qt,gn)/2-Qt.x,rn=Le[0]/(gn.x+ve(gn,Qt)/2+sn),Mn=Le[1]/(en.depth||1);Qs(Ut,function(xn){xn.x=(xn.x+sn)*rn,xn.y=xn.depth*Mn})}return zt}function We(lt){var gt=lt.children,zt=lt.parent.children,Ut=lt.i?zt[lt.i-1]:null;if(gt.length){(function(Qt){for(var gn,en=0,sn=0,rn=Qt.children,Mn=rn.length;--Mn>=0;)(gn=rn[Mn]).z+=en,gn.m+=en,en+=gn.s+(sn+=gn.c)})(lt);var Vt=(gt[0].z+gt[gt.length-1].z)/2;Ut?(lt.z=Ut.z+ve(lt._,Ut._),lt.m=lt.z-Vt):lt.z=Vt}else Ut&&(lt.z=Ut.z+ve(lt._,Ut._));lt.parent.A=function(Qt,gn,en){if(gn){for(var sn,rn=Qt,Mn=Qt,xn=gn,an=rn.parent.children[0],zn=rn.m,Un=Mn.m,nr=xn.m,rr=an.m;xn=Gl(xn),rn=zo(rn),xn&&rn;)an=zo(an),(Mn=Gl(Mn)).a=Qt,(sn=xn.z+nr-rn.z-zn+ve(xn._,rn._))>0&&(wu(Fs(xn,Qt,en),Qt,sn),zn+=sn,Un+=sn),nr+=xn.m,zn+=rn.m,rr+=an.m,Un+=Mn.m;xn&&!Gl(Mn)&&(Mn.t=xn,Mn.m+=nr-Un),rn&&!zo(an)&&(an.t=rn,an.m+=zn-rr,en=Qt)}return en}(lt,Ut,lt.parent.A||zt[0])}function $e(lt){lt._.x=lt.z+lt.parent.m,lt.m+=lt.parent.m}function tt(lt){lt.x*=Le[0],lt.y=lt.depth*Le[1]}return Ve.separation=function(lt){return arguments.length?(ve=lt,Ve):ve},Ve.size=function(lt){return arguments.length?(Fe=(Le=lt)==null?tt:null,Ve):Fe?null:Le},Ve.nodeSize=function(lt){return arguments.length?(Fe=(Le=lt)==null?null:tt,Ve):Fe?Le:null},Os(Ve,ie)},s.layout.cluster=function(){var ie=s.layout.hierarchy().sort(null).value(null),ve=es,Le=[1,1],Fe=!1;function Ve(We,$e){var tt,lt=ie.call(this,We,$e),gt=lt[0],zt=0;oo(gt,function(en){var sn=en.children;sn&&sn.length?(en.x=function(rn){return rn.reduce(function(Mn,xn){return Mn+xn.x},0)/rn.length}(sn),en.y=function(rn){return 1+s.max(rn,function(Mn){return Mn.y})}(sn)):(en.x=tt?zt+=ve(en,tt):0,en.y=0,tt=en)});var Ut=Tu(gt),Vt=Bs(gt),Qt=Ut.x-ve(Ut,Vt)/2,gn=Vt.x+ve(Vt,Ut)/2;return oo(gt,Fe?function(en){en.x=(en.x-gt.x)*Le[0],en.y=(gt.y-en.y)*Le[1]}:function(en){en.x=(en.x-Qt)/(gn-Qt)*Le[0],en.y=(1-(gt.y?en.y/gt.y:1))*Le[1]}),lt}return Ve.separation=function(We){return arguments.length?(ve=We,Ve):ve},Ve.size=function(We){return arguments.length?(Fe=(Le=We)==null,Ve):Fe?null:Le},Ve.nodeSize=function(We){return arguments.length?(Fe=(Le=We)!=null,Ve):Fe?Le:null},Os(Ve,ie)},s.layout.treemap=function(){var ie,ve=s.layout.hierarchy(),Le=Math.round,Fe=[1,1],Ve=null,We=ts,$e=!1,tt="squarify",lt=.5*(1+Math.sqrt(5));function gt(en,sn){for(var rn,Mn,xn=-1,an=en.length;++xn0;)zn.push(rn=Un[xn-1]),zn.area+=rn.area,tt!=="squarify"||(Mn=Vt(zn,rr))<=nr?(Un.pop(),nr=Mn):(zn.area-=zn.pop().area,Qt(zn,rr,an,!1),rr=Math.min(an.dx,an.dy),zn.length=zn.area=0,nr=1/0);zn.length&&(Qt(zn,rr,an,!0),zn.length=zn.area=0),sn.forEach(zt)}}function Ut(en){var sn=en.children;if(sn&&sn.length){var rn,Mn=We(en),xn=sn.slice(),an=[];for(gt(xn,Mn.dx*Mn.dy/en.value),an.area=0;rn=xn.pop();)an.push(rn),an.area+=rn.area,rn.z!=null&&(Qt(an,rn.z?Mn.dx:Mn.dy,Mn,!xn.length),an.length=an.area=0);sn.forEach(Ut)}}function Vt(en,sn){for(var rn,Mn=en.area,xn=0,an=1/0,zn=-1,Un=en.length;++znxn&&(xn=rn));return sn*=sn,(Mn*=Mn)?Math.max(sn*xn*lt/Mn,Mn/(sn*an*lt)):1/0}function Qt(en,sn,rn,Mn){var xn,an=-1,zn=en.length,Un=rn.x,nr=rn.y,rr=sn?Le(en.area/sn):0;if(sn==rn.dx){for((Mn||rr>rn.dy)&&(rr=rn.dy);++anrn.dx)&&(rr=rn.dx);++an1);return ie+ve*Fe*Math.sqrt(-2*Math.log(We)/We)}},logNormal:function(){var ie=s.random.normal.apply(s,arguments);return function(){return Math.exp(ie())}},bates:function(ie){var ve=s.random.irwinHall(ie);return function(){return ve()/ie}},irwinHall:function(ie){return function(){for(var ve=0,Le=0;Le2?ha:js,gt=Fe?Ls:yu;return Ve=lt(ie,ve,gt,Le),We=lt(ve,ie,gt,qa),tt}function tt(lt){return Ve(lt)}return tt.invert=function(lt){return We(lt)},tt.domain=function(lt){return arguments.length?(ie=lt.map(Number),$e()):ie},tt.range=function(lt){return arguments.length?(ve=lt,$e()):ve},tt.rangeRound=function(lt){return tt.range(lt).interpolate(Gu)},tt.clamp=function(lt){return arguments.length?(Fe=lt,$e()):Fe},tt.interpolate=function(lt){return arguments.length?(Le=lt,$e()):Le},tt.ticks=function(lt){return Ga(ie,lt)},tt.tickFormat=function(lt,gt){return d3_scale_linearTickFormat(ie,lt,gt)},tt.nice=function(lt){return lo(ie,lt),$e()},tt.copy=function(){return Ia(ie,ve,Le,Fe)},$e()}function ys(ie,ve){return s.rebind(ie,ve,"range","rangeRound","interpolate","clamp")}function lo(ie,ve){return $i(ie,va(ea(ie,ve)[2])),$i(ie,va(ea(ie,ve)[2])),ie}function ea(ie,ve){ve==null&&(ve=10);var Le=Oi(ie),Fe=Le[1]-Le[0],Ve=Math.pow(10,Math.floor(Math.log(Fe/ve)/Math.LN10)),We=ve/Fe*Ve;return We<=.15?Ve*=10:We<=.35?Ve*=5:We<=.75&&(Ve*=2),Le[0]=Math.ceil(Le[0]/Ve)*Ve,Le[1]=Math.floor(Le[1]/Ve)*Ve+.5*Ve,Le[2]=Ve,Le}function Ga(ie,ve){return s.range.apply(s,ea(ie,ve))}function Wl(ie,ve,Le,Fe){function Ve(tt){return(Le?Math.log(tt<0?0:tt):-Math.log(tt>0?0:-tt))/Math.log(ve)}function We(tt){return Le?Math.pow(ve,tt):-Math.pow(ve,-tt)}function $e(tt){return ie(Ve(tt))}return $e.invert=function(tt){return We(ie.invert(tt))},$e.domain=function(tt){return arguments.length?(Le=tt[0]>=0,ie.domain((Fe=tt.map(Number)).map(Ve)),$e):Fe},$e.base=function(tt){return arguments.length?(ve=+tt,ie.domain(Fe.map(Ve)),$e):ve},$e.nice=function(){var tt=$i(Fe.map(Ve),Le?Math:Zl);return ie.domain(tt),Fe=tt.map(We),$e},$e.ticks=function(){var tt=Oi(Fe),lt=[],gt=tt[0],zt=tt[1],Ut=Math.floor(Ve(gt)),Vt=Math.ceil(Ve(zt)),Qt=ve%1?2:ve;if(isFinite(Vt-Ut)){if(Le){for(;Ut0;gn--)lt.push(We(Ut)*gn);for(Ut=0;lt[Ut]zt;Vt--);lt=lt.slice(Ut,Vt)}return lt},$e.copy=function(){return Wl(ie.copy(),ve,Le,Fe)},ys($e,ie)}s.scale.linear=function(){return Ia([0,1],[0,1],qa,!1)},s.scale.log=function(){return Wl(s.scale.linear().domain([0,1]),10,!0,[1,10])};var Zl={floor:function(ie){return-Math.ceil(-ie)},ceil:function(ie){return-Math.floor(-ie)}};function Sa(ie,ve,Le){var Fe=Cr(ve),Ve=Cr(1/ve);function We($e){return ie(Fe($e))}return We.invert=function($e){return Ve(ie.invert($e))},We.domain=function($e){return arguments.length?(ie.domain((Le=$e.map(Number)).map(Fe)),We):Le},We.ticks=function($e){return Ga(Le,$e)},We.tickFormat=function($e,tt){return d3_scale_linearTickFormat(Le,$e,tt)},We.nice=function($e){return We.domain(lo(Le,$e))},We.exponent=function($e){return arguments.length?(Fe=Cr(ve=$e),Ve=Cr(1/ve),ie.domain(Le.map(Fe)),We):ve},We.copy=function(){return Sa(ie.copy(),ve,Le)},ys(We,ie)}function Cr(ie){return function(ve){return ve<0?-Math.pow(-ve,ie):Math.pow(ve,ie)}}function Us(ie,ve){var Le,Fe,Ve;function We(tt){return Fe[((Le.get(tt)||(ve.t==="range"?Le.set(tt,ie.push(tt)):NaN))-1)%Fe.length]}function $e(tt,lt){return s.range(ie.length).map(function(gt){return tt+lt*gt})}return We.domain=function(tt){if(!arguments.length)return ie;ie=[],Le=new k;for(var lt,gt=-1,zt=tt.length;++gt0?Le[We-1]:ie[0],WeVt?0:1;if(zt=qt)return lt(zt,gn)+(gt?lt(gt,1-gn):"")+"Z";var en,sn,rn,Mn,xn,an,zn,Un,nr,rr,wr,kr,mr=0,_r=0,Rr=[];if((Mn=(+$e.apply(this,arguments)||0)/2)&&(rn=Fe===Cl?Math.sqrt(gt*gt+zt*zt):+Fe.apply(this,arguments),gn||(_r*=-1),zt&&(_r=Ge(rn/zt*Math.sin(Mn))),gt&&(mr=Ge(rn/gt*Math.sin(Mn)))),zt){xn=zt*Math.cos(Ut+_r),an=zt*Math.sin(Ut+_r),zn=zt*Math.cos(Vt-_r),Un=zt*Math.sin(Vt-_r);var Jr=Math.abs(Vt-Ut-2*_r)<=It?0:1;if(_r&&_o(xn,an,zn,Un)===gn^Jr){var Kr=(Ut+Vt)/2;xn=zt*Math.cos(Kr),an=zt*Math.sin(Kr),zn=Un=null}}else xn=an=0;if(gt){nr=gt*Math.cos(Vt-mr),rr=gt*Math.sin(Vt-mr),wr=gt*Math.cos(Ut+mr),kr=gt*Math.sin(Ut+mr);var xr=Math.abs(Ut-Vt+2*mr)<=It?0:1;if(mr&&_o(nr,rr,wr,kr)===1-gn^xr){var zr=(Ut+Vt)/2;nr=gt*Math.cos(zr),rr=gt*Math.sin(zr),wr=kr=null}}else nr=rr=0;if(Qt>Dt&&(en=Math.min(Math.abs(zt-gt)/2,+Le.apply(this,arguments)))>.001){sn=gt0?0:1}function co(ie,ve,Le,Fe,Ve){var We=ie[0]-ve[0],$e=ie[1]-ve[1],tt=(Ve?Fe:-Fe)/Math.sqrt(We*We+$e*$e),lt=tt*$e,gt=-tt*We,zt=ie[0]+lt,Ut=ie[1]+gt,Vt=ve[0]+lt,Qt=ve[1]+gt,gn=(zt+Vt)/2,en=(Ut+Qt)/2,sn=Vt-zt,rn=Qt-Ut,Mn=sn*sn+rn*rn,xn=Le-Fe,an=zt*Qt-Vt*Ut,zn=(rn<0?-1:1)*Math.sqrt(Math.max(0,xn*xn*Mn-an*an)),Un=(an*rn-sn*zn)/Mn,nr=(-an*sn-rn*zn)/Mn,rr=(an*rn+sn*zn)/Mn,wr=(-an*sn+rn*zn)/Mn,kr=Un-gn,mr=nr-en,_r=rr-gn,Rr=wr-en;return kr*kr+mr*mr>_r*_r+Rr*Rr&&(Un=rr,nr=wr),[[Un-lt,nr-gt],[Un*Le/xn,nr*Le/xn]]}function Hs(){return!0}function xa(ie){var ve=jn,Le=$n,Fe=Hs,Ve=vi,We=Ve.key,$e=.7;function tt(lt){var gt,zt=[],Ut=[],Vt=-1,Qt=lt.length,gn=qn(ve),en=qn(Le);function sn(){zt.push("M",Ve(ie(Ut),$e))}for(;++Vt1&&Ve.push("H",Fe[0]),Ve.join("")},"step-before":to,"step-after":ho,basis:di,"basis-open":function(ie){if(ie.length<4)return vi(ie);for(var ve,Le=[],Fe=-1,Ve=ie.length,We=[0],$e=[0];++Fe<3;)ve=ie[Fe],We.push(ve[0]),$e.push(ve[1]);for(Le.push(oa(Bo,We)+","+oa(Bo,$e)),--Fe;++Fe9&&(We=3*Le/Math.sqrt(We),tt[lt]=We*Fe,tt[lt+1]=We*Ve);for(lt=-1;++lt<=gt;)We=(ve[Math.min(gt,lt+1)][0]-ve[Math.max(0,lt-1)][0])/(6*(1+tt[lt]*tt[lt])),$e.push([We||0,tt[lt]*We||0]);return $e}(ie))}});function vi(ie){return ie.length>1?ie.join("L"):ie+"Z"}function Ll(ie){return ie.join("L")+"Z"}function to(ie){for(var ve=0,Le=ie.length,Fe=ie[0],Ve=[Fe[0],",",Fe[1]];++ve1){tt=ve[1],We=ie[lt],lt++,Fe+="C"+(Ve[0]+$e[0])+","+(Ve[1]+$e[1])+","+(We[0]-tt[0])+","+(We[1]-tt[1])+","+We[0]+","+We[1];for(var gt=2;gtIt)+",1 "+zt}function lt(gt,zt,Ut,Vt){return"Q 0,0 "+Vt}return We.radius=function(gt){return arguments.length?(Le=qn(gt),We):Le},We.source=function(gt){return arguments.length?(ie=qn(gt),We):ie},We.target=function(gt){return arguments.length?(ve=qn(gt),We):ve},We.startAngle=function(gt){return arguments.length?(Fe=qn(gt),We):Fe},We.endAngle=function(gt){return arguments.length?(Ve=qn(gt),We):Ve},We},s.svg.diagonal=function(){var ie=Fr,ve=Ur,Le=is;function Fe(Ve,We){var $e=ie.call(this,Ve,We),tt=ve.call(this,Ve,We),lt=($e.y+tt.y)/2,gt=[$e,{x:$e.x,y:lt},{x:tt.x,y:lt},tt];return"M"+(gt=gt.map(Le))[0]+"C"+gt[1]+" "+gt[2]+" "+gt[3]}return Fe.source=function(Ve){return arguments.length?(ie=qn(Ve),Fe):ie},Fe.target=function(Ve){return arguments.length?(ve=qn(Ve),Fe):ve},Fe.projection=function(Ve){return arguments.length?(Le=Ve,Fe):Le},Fe},s.svg.diagonal.radial=function(){var ie=s.svg.diagonal(),ve=is,Le=ie.projection;return ie.projection=function(Fe){return arguments.length?Le(To(ve=Fe)):ve},ie},s.svg.symbol=function(){var ie=$l,ve=_a;function Le(Fe,Ve){return(ll.get(ie.call(this,Fe,Ve))||Fa)(ve.call(this,Fe,Ve))}return Le.type=function(Fe){return arguments.length?(ie=qn(Fe),Le):ie},Le.size=function(Fe){return arguments.length?(ve=qn(Fe),Le):ve},Le};var ll=s.map({circle:Fa,cross:function(ie){var ve=Math.sqrt(ie/5)/2;return"M"+-3*ve+","+-ve+"H"+-ve+"V"+-3*ve+"H"+ve+"V"+-ve+"H"+3*ve+"V"+ve+"H"+ve+"V"+3*ve+"H"+-ve+"V"+ve+"H"+-3*ve+"Z"},diamond:function(ie){var ve=Math.sqrt(ie/(2*_i)),Le=ve*_i;return"M0,"+-ve+"L"+Le+",0 0,"+ve+" "+-Le+",0Z"},square:function(ie){var ve=Math.sqrt(ie)/2;return"M"+-ve+","+-ve+"L"+ve+","+-ve+" "+ve+","+ve+" "+-ve+","+ve+"Z"},"triangle-down":function(ie){var ve=Math.sqrt(ie/as),Le=ve*as/2;return"M0,"+Le+"L"+ve+","+-Le+" "+-ve+","+-Le+"Z"},"triangle-up":function(ie){var ve=Math.sqrt(ie/as),Le=ve*as/2;return"M0,"+-Le+"L"+ve+","+Le+" "+-ve+","+Le+"Z"}});s.svg.symbolTypes=ll.keys();var as=Math.sqrt(3),_i=Math.tan(30*Je);ce.transition=function(ie){for(var ve,Le,Fe=rt||++Mt,Ve=$(ie),We=[],$e=ct||{time:Date.now(),ease:Xo,delay:0,duration:250},tt=-1,lt=this.length;++tt0;)gt[--rn].call(ie,sn);if(en>=1)return Ut.event&&Ut.event.end.call(ie,ie.__data__,ve),--zt.count?delete zt[Fe]:delete ie[Le],1}Ut||(We=Ve.time,$e=$t(function(gn){var en=Ut.delay;if($e.t=en+We,en<=gn)return Vt(gn-en);$e.c=Vt},0,We),Ut=zt[Fe]={tween:new k,time:We,timer:$e,delay:Ve.delay,duration:Ve.duration,ease:Ve.ease,index:ve},Ve=null,++zt.count)}vt.call=ce.call,vt.empty=ce.empty,vt.node=ce.node,vt.size=ce.size,s.transition=function(ie,ve){return ie&&ie.transition?rt?ie.transition(ve):ie:s.selection().transition(ie)},s.transition.prototype=vt,vt.select=function(ie){var ve,Le,Fe,Ve=this.id,We=this.namespace,$e=[];ie=xe(ie);for(var tt=-1,lt=this.length;++ttrect,.s>rect").attr("width",We[1]-We[0])}function Qt(en){en.select(".extent").attr("y",$e[0]),en.selectAll(".extent,.e>rect,.w>rect").attr("height",$e[1]-$e[0])}function gn(){var en,sn,rn=this,Mn=s.select(s.event.target),xn=Le.of(rn,arguments),an=s.select(rn),zn=Mn.datum(),Un=!/^(n|s)$/.test(zn)&&Fe,nr=!/^(e|w)$/.test(zn)&&Ve,rr=Mn.classed("extent"),wr=yt(rn),kr=s.mouse(rn),mr=s.select(t(rn)).on("keydown.brush",Jr).on("keyup.brush",Kr);if(s.event.changedTouches?mr.on("touchmove.brush",xr).on("touchend.brush",Wr):mr.on("mousemove.brush",xr).on("mouseup.brush",Wr),an.interrupt().selectAll("*").interrupt(),rr)kr[0]=We[0]-kr[0],kr[1]=$e[0]-kr[1];else if(zn){var _r=+/w$/.test(zn),Rr=+/^n/.test(zn);sn=[We[1-_r]-kr[0],$e[1-Rr]-kr[1]],kr[0]=We[_r],kr[1]=$e[Rr]}else s.event.altKey&&(en=kr.slice());function Jr(){s.event.keyCode==32&&(rr||(en=null,kr[0]-=We[1],kr[1]-=$e[1],rr=2),ee())}function Kr(){s.event.keyCode==32&&rr==2&&(kr[0]+=We[1],kr[1]+=$e[1],rr=0,ee())}function xr(){var Gr=s.mouse(rn),ii=!1;sn&&(Gr[0]+=sn[0],Gr[1]+=sn[1]),rr||(s.event.altKey?(en||(en=[(We[0]+We[1])/2,($e[0]+$e[1])/2]),kr[0]=We[+(Gr[0]>>1;i.dtype||(i.dtype="array"),typeof i.dtype=="string"?c=new(a(i.dtype))(d):i.dtype&&(c=i.dtype,Array.isArray(c)&&(c.length=d));for(var v=0;vu||H>1073741824){for(var K=0;Khe+ze||re>ye+ze||oe=ce||Ae===Me)){var Ce=x[Te];Me===void 0&&(Me=Ce.length);for(var ne=Ae;ne=ee&&me<=X&&we>=Q&&we<=Y&&xe.push(ue)}var Ee=g[Te],Ue=Ee[4*Ae+0],De=Ee[4*Ae+1],je=Ee[4*Ae+2],ge=Ee[4*Ae+3],be=de(Ee,Ae+1),Se=.5*ze,Ne=Te+1;pe(he,ye,Se,Ne,Ue,De||je||ge||be),pe(he,ye+Se,Se,Ne,De,je||ge||be),pe(he+Se,ye,Se,Ne,je,ge||be),pe(he+Se,ye+Se,Se,Ne,ge,be)}}function de(he,ye){for(var ze=null,Te=0;ze===null;)if(ze=he[4*ye+Te],++Te>he.length)return null;return ze}return pe(0,0,1,0,0,1),xe},c;function I(U,B,G,N,j){for(var V=[],H=0;H0){l+=Math.abs(T(f[0]));for(var t=1;t2){for(o=0;o=0))throw new Error("precision must be a positive number");var u=Math.pow(10,i||0);return Math.round(o*u)/u},E.radiansToLength=t,E.lengthToRadians=a,E.lengthToDegrees=function(o,i){return r(a(o,i))},E.bearingToAzimuth=function(o){var i=o%360;return i<0&&(i+=360),i},E.radiansToDegrees=r,E.degreesToRadians=function(o){return o%360*Math.PI/180},E.convertLength=function(o,i,u){if(i===void 0&&(i="kilometers"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("length must be a positive number");return t(a(o,i),u)},E.convertArea=function(o,i,u){if(i===void 0&&(i="meters"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("area must be a positive number");var p=E.areaFactors[i];if(!p)throw new Error("invalid original units");var c=E.areaFactors[u];if(!c)throw new Error("invalid final units");return o/p*c},E.isNumber=n,E.isObject=function(o){return!!o&&o.constructor===Object},E.validateBBox=function(o){if(!o)throw new Error("bbox is required");if(!Array.isArray(o))throw new Error("bbox must be an Array");if(o.length!==4&&o.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");o.forEach(function(i){if(!n(i))throw new Error("bbox must only contain numbers")})},E.validateId=function(o){if(!o)throw new Error("id is required");if(["string","number"].indexOf(typeof o)===-1)throw new Error("id must be a number or a string")}},60302:function(D,E,e){Object.defineProperty(E,"__esModule",{value:!0});var _=e(23132);function w(a,r,n){if(a!==null)for(var o,i,u,p,c,b,d,v,x=0,g=0,y=a.type,k=y==="FeatureCollection",h=y==="Feature",M=k?a.features.length:1,A=0;Ab||k>d||h>v)return c=x,b=o,d=k,v=h,void(u=0);var M=_.lineString([c,x],n.properties);if(r(M,o,i,h,u)===!1)return!1;u++,c=x})!==!1&&void 0}}})}function t(a,r){if(!a)throw new Error("geojson is required");f(a,function(n,o,i){if(n.geometry!==null){var u=n.geometry.type,p=n.geometry.coordinates;switch(u){case"LineString":if(r(n,o,i,0,0)===!1)return!1;break;case"Polygon":for(var c=0;cm[0]&&(T[0]=m[0]),T[1]>m[1]&&(T[1]=m[1]),T[2]=0))throw new Error("precision must be a positive number");var u=Math.pow(10,i||0);return Math.round(o*u)/u},E.radiansToLength=t,E.lengthToRadians=a,E.lengthToDegrees=function(o,i){return r(a(o,i))},E.bearingToAzimuth=function(o){var i=o%360;return i<0&&(i+=360),i},E.radiansToDegrees=r,E.degreesToRadians=function(o){return o%360*Math.PI/180},E.convertLength=function(o,i,u){if(i===void 0&&(i="kilometers"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("length must be a positive number");return t(a(o,i),u)},E.convertArea=function(o,i,u){if(i===void 0&&(i="meters"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("area must be a positive number");var p=E.areaFactors[i];if(!p)throw new Error("invalid original units");var c=E.areaFactors[u];if(!c)throw new Error("invalid final units");return o/p*c},E.isNumber=n,E.isObject=function(o){return!!o&&o.constructor===Object},E.validateBBox=function(o){if(!o)throw new Error("bbox is required");if(!Array.isArray(o))throw new Error("bbox must be an Array");if(o.length!==4&&o.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");o.forEach(function(i){if(!n(i))throw new Error("bbox must only contain numbers")})},E.validateId=function(o){if(!o)throw new Error("id is required");if(["string","number"].indexOf(typeof o)===-1)throw new Error("id must be a number or a string")}},27138:function(D,E,e){Object.defineProperty(E,"__esModule",{value:!0});var _=e(94228);function w(a,r,n){if(a!==null)for(var o,i,u,p,c,b,d,v,x=0,g=0,y=a.type,k=y==="FeatureCollection",h=y==="Feature",M=k?a.features.length:1,A=0;Ab||k>d||h>v)return c=x,b=o,d=k,v=h,void(u=0);var M=_.lineString([c,x],n.properties);if(r(M,o,i,h,u)===!1)return!1;u++,c=x})!==!1&&void 0}}})}function t(a,r){if(!a)throw new Error("geojson is required");f(a,function(n,o,i){if(n.geometry!==null){var u=n.geometry.type,p=n.geometry.coordinates;switch(u){case"LineString":if(r(n,o,i,0,0)===!1)return!1;break;case"Polygon":for(var c=0;c=0))throw new Error("precision must be a positive number");var u=Math.pow(10,i||0);return Math.round(o*u)/u},E.radiansToLength=t,E.lengthToRadians=a,E.lengthToDegrees=function(o,i){return r(a(o,i))},E.bearingToAzimuth=function(o){var i=o%360;return i<0&&(i+=360),i},E.radiansToDegrees=r,E.degreesToRadians=function(o){return o%360*Math.PI/180},E.convertLength=function(o,i,u){if(i===void 0&&(i="kilometers"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("length must be a positive number");return t(a(o,i),u)},E.convertArea=function(o,i,u){if(i===void 0&&(i="meters"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("area must be a positive number");var p=E.areaFactors[i];if(!p)throw new Error("invalid original units");var c=E.areaFactors[u];if(!c)throw new Error("invalid final units");return o/p*c},E.isNumber=n,E.isObject=function(o){return!!o&&o.constructor===Object},E.validateBBox=function(o){if(!o)throw new Error("bbox is required");if(!Array.isArray(o))throw new Error("bbox must be an Array");if(o.length!==4&&o.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");o.forEach(function(i){if(!n(i))throw new Error("bbox must only contain numbers")})},E.validateId=function(o){if(!o)throw new Error("id is required");if(["string","number"].indexOf(typeof o)===-1)throw new Error("id must be a number or a string")},E.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},E.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},E.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},E.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},E.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},E.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},E.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},88553:function(D,E,e){Object.defineProperty(E,"__esModule",{value:!0});var _=e(64182);function w(a,r,n){if(a!==null)for(var o,i,u,p,c,b,d,v,x=0,g=0,y=a.type,k=y==="FeatureCollection",h=y==="Feature",M=k?a.features.length:1,A=0;Ab||k>d||h>v)return c=x,b=o,d=k,v=h,void(u=0);var M=_.lineString([c,x],n.properties);if(r(M,o,i,h,u)===!1)return!1;u++,c=x})!==!1&&void 0}}})}function t(a,r){if(!a)throw new Error("geojson is required");f(a,function(n,o,i){if(n.geometry!==null){var u=n.geometry.type,p=n.geometry.coordinates;switch(u){case"LineString":if(r(n,o,i,0,0)===!1)return!1;break;case"Polygon":for(var c=0;cs&&(s=E[m]),E[m]24?(isFinite(ve)&&(clearTimeout(dr),dr=setTimeout(mn,ve)),ir=0):(ir=1,yr(mn))}function Ln(){for(var ie=Date.now(),ve=Tr;ve;)ie>=ve.t&&ve.c(ie-ve.t)&&(ve.c=null),ve=ve.n;return ie}function En(){for(var ie,ve=Tr,Le=1/0;ve;)ve.c?(ve.t1&&(ve=ie[We[$e-2]],Le=ie[We[$e-1]],Fe=ie[tt],(Le[0]-ve[0])*(Fe[1]-ve[1])-(Le[1]-ve[1])*(Fe[0]-ve[0])<=0);)--$e;We[$e++]=tt}return We.slice(0,$e)}function Qn(ie,ve){return ie[0]-ve[0]||ie[1]-ve[1]}s.timer=function(){$t.apply(this,arguments)},s.timer.flush=function(){Ln(),En()},s.round=function(ie,ve){return ve?Math.round(ie*(ve=Math.pow(10,ve)))/ve:Math.round(ie)},s.geom={},s.geom.hull=function(ie){var ve=jn,Le=$n;if(arguments.length)return Fe(ie);function Fe(Ve){if(Ve.length<3)return[];var We,$e=qn(ve),tt=qn(Le),lt=Ve.length,gt=[],zt=[];for(We=0;We=0;--We)en.push(Ve[gt[Ut[We]][2]]);for(We=+Qt;WeDt)tt=tt.L;else{if(!((Ve=We-Jn(tt,$e))>Dt)){Fe>-Dt?(ve=tt.P,Le=tt):Ve>-Dt?(ve=tt,Le=tt.N):ve=Le=tt;break}if(!tt.R){ve=tt;break}tt=tt.R}var lt=vn(ie);if(Rn.insert(ve,lt),ve||Le){if(ve===Le)return vr(ve),Le=vn(ve.site),Rn.insert(lt,Le),lt.edge=Le.edge=Lr(ve.site,lt.site),cr(ve),void cr(Le);if(Le){vr(ve),vr(Le);var gt=ve.site,zt=gt.x,Ut=gt.y,Vt=ie.x-zt,Qt=ie.y-Ut,gn=Le.site,en=gn.x-zt,sn=gn.y-Ut,rn=2*(Vt*sn-Qt*en),Mn=Vt*Vt+Qt*Qt,xn=en*en+sn*sn,an={x:(sn*Mn-Qt*xn)/rn+zt,y:(Vt*xn-en*Mn)/rn+Ut};pr(Le.edge,gt,gn,an),lt.edge=Lr(gt,ie,null,an),Le.edge=Lr(ie,gn,null,an),cr(ve),cr(Le)}else lt.edge=Lr(ve.site,lt.site)}}function er(ie,ve){var Le=ie.site,Fe=Le.x,Ve=Le.y,We=Ve-ve;if(!We)return Fe;var $e=ie.P;if(!$e)return-1/0;var tt=(Le=$e.site).x,lt=Le.y,gt=lt-ve;if(!gt)return tt;var zt=tt-Fe,Ut=1/We-1/gt,Vt=zt/gt;return Ut?(-Vt+Math.sqrt(Vt*Vt-2*Ut*(zt*zt/(-2*gt)-lt+gt/2+Ve-We/2)))/Ut+Fe:(Fe+tt)/2}function Jn(ie,ve){var Le=ie.N;if(Le)return er(Le,ve);var Fe=ie.site;return Fe.y===ve?Fe.x:1/0}function lr(ie){this.site=ie,this.edges=[]}function sr(ie,ve){return ve.angle-ie.angle}function fr(){ci(this),this.x=this.y=this.arc=this.site=this.cy=null}function cr(ie){var ve=ie.P,Le=ie.N;if(ve&&Le){var Fe=ve.site,Ve=ie.site,We=Le.site;if(Fe!==We){var $e=Ve.x,tt=Ve.y,lt=Fe.x-$e,gt=Fe.y-tt,zt=We.x-$e,Ut=2*(lt*(sn=We.y-tt)-gt*zt);if(!(Ut>=-1e-12)){var Vt=lt*lt+gt*gt,Qt=zt*zt+sn*sn,gn=(sn*Vt-gt*Qt)/Ut,en=(lt*Qt-zt*Vt)/Ut,sn=en+tt,rn=bn.pop()||new fr;rn.arc=ie,rn.site=Ve,rn.x=gn+$e,rn.y=sn+Math.sqrt(gn*gn+en*en),rn.cy=sn,ie.circle=rn;for(var Mn=null,xn=Sn._;xn;)if(rn.y=tt)return;if(Vt>gn){if(We){if(We.y>=gt)return}else We={x:sn,y:lt};Le={x:sn,y:gt}}else{if(We){if(We.y1)if(Vt>gn){if(We){if(We.y>=gt)return}else We={x:(lt-Ve)/Fe,y:lt};Le={x:(gt-Ve)/Fe,y:gt}}else{if(We){if(We.y=tt)return}else We={x:$e,y:Fe*$e+Ve};Le={x:tt,y:Fe*tt+Ve}}else{if(We){if(We.x<$e)return}else We={x:tt,y:Fe*tt+Ve};Le={x:$e,y:Fe*$e+Ve}}return ie.a=We,ie.b=Le,!0}function Mr(ie,ve){this.l=ie,this.r=ve,this.a=this.b=null}function Lr(ie,ve,Le,Fe){var Ve=new Mr(ie,ve);return Jt.push(Ve),Le&&pr(Ve,ie,ve,Le),Fe&&pr(Ve,ve,ie,Fe),un[ie.i].edges.push(new Pr(Ve,ie,ve)),un[ve.i].edges.push(new Pr(Ve,ve,ie)),Ve}function pr(ie,ve,Le,Fe){ie.a||ie.b?ie.l===Le?ie.b=Fe:ie.a=Fe:(ie.a=Fe,ie.l=ve,ie.r=Le)}function Pr(ie,ve,Le){var Fe=ie.a,Ve=ie.b;this.edge=ie,this.site=ve,this.angle=Le?Math.atan2(Le.y-ve.y,Le.x-ve.x):ie.l===ve?Math.atan2(Ve.x-Fe.x,Fe.y-Ve.y):Math.atan2(Fe.x-Ve.x,Ve.y-Fe.y)}function Hr(){this._=null}function ci(ie){ie.U=ie.C=ie.L=ie.R=ie.P=ie.N=null}function Ti(ie,ve){var Le=ve,Fe=ve.R,Ve=Le.U;Ve?Ve.L===Le?Ve.L=Fe:Ve.R=Fe:ie._=Fe,Fe.U=Ve,Le.U=Fe,Le.R=Fe.L,Le.R&&(Le.R.U=Le),Fe.L=Le}function Mi(ie,ve){var Le=ve,Fe=ve.L,Ve=Le.U;Ve?Ve.L===Le?Ve.L=Fe:Ve.R=Fe:ie._=Fe,Fe.U=Ve,Le.U=Fe,Le.L=Fe.R,Le.L&&(Le.L.U=Le),Fe.R=Le}function fa(ie){for(;ie.L;)ie=ie.L;return ie}function Hi(ie,ve){var Le,Fe,Ve,We=ie.sort(xi).pop();for(Jt=[],un=new Array(ie.length),Rn=new Hr,Sn=new Hr;;)if(Ve=On,We&&(!Ve||We.y0)){if(rn/=rr,rr<0){if(rn0){if(rn>nr)return;rn>Vn&&(Vn=rn)}if(rn=Ut-an,rr||!(rn<0)){if(rn/=rr,rr<0){if(rn>nr)return;rn>Vn&&(Vn=rn)}else if(rr>0){if(rn0)){if(rn/=wr,wr<0){if(rn0){if(rn>nr)return;rn>Vn&&(Vn=rn)}if(rn=Vt-zn,wr||!(rn<0)){if(rn/=wr,wr<0){if(rn>nr)return;rn>Vn&&(Vn=rn)}else if(wr>0){if(rn0&&(sn.a={x:an+Vn*rr,y:zn+Vn*wr}),nr<1&&(sn.b={x:an+nr*rr,y:zn+nr*wr}),sn}}}}}),en=Qt.length;en--;)(!Sr(lt=Qt[en],tt)||!gn(lt)||x(lt.a.x-lt.b.x)Dt||x(Ut-gt)>Dt)&&(gn.splice(Qt,0,new Pr((rr=Vt.site,wr=rn,kr=x(zt-Mn)Dt?{x:Mn,y:x(lt-Mn)Dt?{x:x(gt-zn)Dt?{x:xn,y:x(lt-xn)Dt?{x:x(gt-an)=zt&&rn.x<=Vt&&rn.y>=Ut&&rn.y<=Qt?[[zt,Qt],[Vt,Qt],[Vt,Ut],[zt,Ut]]:[]).point=lt[en]}),gt}function tt(lt){return lt.map(function(gt,zt){return{x:Math.round(Fe(gt,zt)/Dt)*Dt,y:Math.round(Ve(gt,zt)/Dt)*Dt,i:zt}})}return $e.links=function(lt){return Hi(tt(lt)).edges.filter(function(gt){return gt.l&>.r}).map(function(gt){return{source:lt[gt.l.i],target:lt[gt.r.i]}})},$e.triangles=function(lt){var gt=[];return Hi(tt(lt)).cells.forEach(function(zt,Ut){for(var Vt,Qt,gn,en,sn=zt.site,rn=zt.edges.sort(sr),Mn=-1,xn=rn.length,an=rn[xn-1].edge,zn=an.l===sn?an.r:an.l;++MnWe||Vt>$e||Qt=Vn)<<1|ve>=zn,rr=nr+4;nrWe&&(Ve=ve.slice(We,Ve),tt[$e]?tt[$e]+=Ve:tt[++$e]=Ve),(Le=Le[0])===(Fe=Fe[0])?tt[$e]?tt[$e]+=Fe:tt[++$e]=Fe:(tt[++$e]=null,lt.push({i:$e,x:Qa(Le,Fe)})),We=yl.lastIndex;return Wern&&(rn=zt.x),zt.y>Mn&&(Mn=zt.y),Ut.push(zt.x),Vt.push(zt.y);else for(Qt=0;Qtrn&&(rn=zn),Vn>Mn&&(Mn=Vn),Ut.push(zn),Vt.push(Vn)}var nr=rn-en,rr=Mn-sn;function wr(_r,Rr,Jr,Kr,xr,zr,Wr,Gr){if(!isNaN(Jr)&&!isNaN(Kr))if(_r.leaf){var ii=_r.x,ni=_r.y;if(ii!=null)if(x(ii-Jr)+x(ni-Kr)<.01)kr(_r,Rr,Jr,Kr,xr,zr,Wr,Gr);else{var ui=_r.point;_r.x=_r.y=_r.point=null,kr(_r,ui,ii,ni,xr,zr,Wr,Gr),kr(_r,Rr,Jr,Kr,xr,zr,Wr,Gr)}else _r.x=Jr,_r.y=Kr,_r.point=Rr}else kr(_r,Rr,Jr,Kr,xr,zr,Wr,Gr)}function kr(_r,Rr,Jr,Kr,xr,zr,Wr,Gr){var ii=.5*(xr+Wr),ni=.5*(zr+Gr),ui=Jr>=ii,ki=Kr>=ni,Ii=ki<<1|ui;_r.leaf=!1,ui?xr=ii:Wr=ii,ki?zr=ni:Gr=ni,wr(_r=_r.nodes[Ii]||(_r.nodes[Ii]={leaf:!0,nodes:[],point:null,x:null,y:null}),Rr,Jr,Kr,xr,zr,Wr,Gr)}nr>rr?Mn=sn+nr:rn=en+rr;var mr={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(_r){wr(mr,_r,+xn(_r,++Qt),+an(_r,Qt),en,sn,rn,Mn)},visit:function(_r){Xs(_r,mr,en,sn,rn,Mn)},find:function(_r){return Uu(mr,_r[0],_r[1],en,sn,rn,Mn)}};if(Qt=-1,ve==null){for(;++Qt=0&&!(Le=s.interpolators[Fe](ie,ve)););return Le}function eo(ie,ve){var Le,Fe=[],Ve=[],We=ie.length,$e=ve.length,tt=Math.min(ie.length,ve.length);for(Le=0;Le=1?1:ie(ve)}}function bo(ie){return function(ve){return 1-ie(1-ve)}}function Ro(ie){return function(ve){return .5*(ve<.5?ie(2*ve):2-ie(2-2*ve))}}function xl(ie){return ie*ie}function Vu(ie){return ie*ie*ie}function Xo(ie){if(ie<=0)return 0;if(ie>=1)return 1;var ve=ie*ie,Le=ve*ie;return 4*(ie<.5?Le:3*(ie-ve)+Le-.75)}function Hu(ie){return 1-Math.cos(ie*Nt)}function qu(ie){return Math.pow(2,10*(ie-1))}function Ec(ie){return 1-Math.sqrt(1-ie*ie)}function gu(ie){return ie<.36363636363636365?7.5625*ie*ie:ie<.7272727272727273?7.5625*(ie-=.5454545454545454)*ie+.75:ie<.9090909090909091?7.5625*(ie-=.8181818181818182)*ie+.9375:7.5625*(ie-=.9545454545454546)*ie+.984375}function Gu(ie,ve){return ve-=ie,function(Le){return Math.round(ie+ve*Le)}}function vu(ie){var ve,Le,Fe,Ve=[ie.a,ie.b],We=[ie.c,ie.d],$e=Jo(Ve),tt=$o(Ve,We),lt=Jo(((ve=We)[0]+=(Fe=-tt)*(Le=Ve)[0],ve[1]+=Fe*Le[1],ve))||0;Ve[0]*We[1]=0?ie.slice(0,ve):ie,Fe=ve>=0?ie.slice(ve+1):"in";return Le=fi.get(Le)||fs,ao((Fe=hs.get(Fe)||U)(Le.apply(null,T.call(arguments,1))))},s.interpolateHcl=function(ie,ve){ie=s.hcl(ie),ve=s.hcl(ve);var Le=ie.h,Fe=ie.c,Ve=ie.l,We=ve.h-Le,$e=ve.c-Fe,tt=ve.l-Ve;return isNaN($e)&&($e=0,Fe=isNaN(Fe)?ve.c:Fe),isNaN(We)?(We=0,Le=isNaN(Le)?ve.h:Le):We>180?We-=360:We<-180&&(We+=360),function(lt){return Ot(Le+We*lt,Fe+$e*lt,Ve+tt*lt)+""}},s.interpolateHsl=function(ie,ve){ie=s.hsl(ie),ve=s.hsl(ve);var Le=ie.h,Fe=ie.s,Ve=ie.l,We=ve.h-Le,$e=ve.s-Fe,tt=ve.l-Ve;return isNaN($e)&&($e=0,Fe=isNaN(Fe)?ve.s:Fe),isNaN(We)?(We=0,Le=isNaN(Le)?ve.h:Le):We>180?We-=360:We<-180&&(We+=360),function(lt){return Lt(Le+We*lt,Fe+$e*lt,Ve+tt*lt)+""}},s.interpolateLab=function(ie,ve){ie=s.lab(ie),ve=s.lab(ve);var Le=ie.l,Fe=ie.a,Ve=ie.b,We=ve.l-Le,$e=ve.a-Fe,tt=ve.b-Ve;return function(lt){return Xt(Le+We*lt,Fe+$e*lt,Ve+tt*lt)+""}},s.interpolateRound=Gu,s.transform=function(ie){var ve=f.createElementNS(s.ns.prefix.svg,"g");return(s.transform=function(Le){if(Le!=null){ve.setAttribute("transform",Le);var Fe=ve.transform.baseVal.consolidate()}return new vu(Fe?Fe.matrix:Js)})(ie)},vu.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Js={a:1,b:0,c:0,d:1,e:0,f:0};function Ko(ie){return ie.length?ie.pop()+",":""}function mu(ie,ve){var Le=[],Fe=[];return ie=s.transform(ie),ve=s.transform(ve),function(Ve,We,$e,tt){if(Ve[0]!==We[0]||Ve[1]!==We[1]){var lt=$e.push("translate(",null,",",null,")");tt.push({i:lt-4,x:Qa(Ve[0],We[0])},{i:lt-2,x:Qa(Ve[1],We[1])})}else(We[0]||We[1])&&$e.push("translate("+We+")")}(ie.translate,ve.translate,Le,Fe),function(Ve,We,$e,tt){Ve!==We?(Ve-We>180?We+=360:We-Ve>180&&(Ve+=360),tt.push({i:$e.push(Ko($e)+"rotate(",null,")")-2,x:Qa(Ve,We)})):We&&$e.push(Ko($e)+"rotate("+We+")")}(ie.rotate,ve.rotate,Le,Fe),function(Ve,We,$e,tt){Ve!==We?tt.push({i:$e.push(Ko($e)+"skewX(",null,")")-2,x:Qa(Ve,We)}):We&&$e.push(Ko($e)+"skewX("+We+")")}(ie.skew,ve.skew,Le,Fe),function(Ve,We,$e,tt){if(Ve[0]!==We[0]||Ve[1]!==We[1]){var lt=$e.push(Ko($e)+"scale(",null,",",null,")");tt.push({i:lt-4,x:Qa(Ve[0],We[0])},{i:lt-2,x:Qa(Ve[1],We[1])})}else We[0]===1&&We[1]===1||$e.push(Ko($e)+"scale("+We+")")}(ie.scale,ve.scale,Le,Fe),ie=ve=null,function(Ve){for(var We,$e=-1,tt=Fe.length;++$e0?Le=an:(ie.c=null,ie.t=NaN,ie=null,tt.end({type:"end",alpha:Le=0})):an>0&&(tt.start({type:"start",alpha:Le=an}),ie=$t($e.tick)),$e):Le},$e.start=function(){var an,zn,Vn,nr=sn.length,rr=rn.length,wr=lt[0],kr=lt[1];for(an=0;an=0;)Le.push(Ve[Fe])}function oo(ie,ve){for(var Le=[ie],Fe=[];(ie=Le.pop())!=null;)if(Fe.push(ie),(We=ie.children)&&(Ve=We.length))for(var Ve,We,$e=-1;++$e=0;)$e.push(zt=gt[lt]),zt.parent=We,zt.depth=We.depth+1;Le&&(We.value=0),We.children=gt}else Le&&(We.value=+Le.call(Fe,We,We.depth)||0),delete We.children;return oo(Ve,function(Ut){var Vt,Qt;ie&&(Vt=Ut.children)&&Vt.sort(ie),Le&&(Qt=Ut.parent)&&(Qt.value+=Ut.value)}),tt}return Fe.sort=function(Ve){return arguments.length?(ie=Ve,Fe):ie},Fe.children=function(Ve){return arguments.length?(ve=Ve,Fe):ve},Fe.value=function(Ve){return arguments.length?(Le=Ve,Fe):Le},Fe.revalue=function(Ve){return Le&&(Qs(Ve,function(We){We.children&&(We.value=0)}),oo(Ve,function(We){var $e;We.children||(We.value=+Le.call(Fe,We,We.depth)||0),($e=We.parent)&&($e.value+=We.value)})),Ve},Fe},s.layout.partition=function(){var ie=s.layout.hierarchy(),ve=[1,1];function Le(We,$e,tt,lt){var gt=We.children;if(We.x=$e,We.y=We.depth*lt,We.dx=tt,We.dy=lt,gt&&(zt=gt.length)){var zt,Ut,Vt,Qt=-1;for(tt=We.value?tt/We.value:0;++Qttt&&(tt=Fe),$e.push(Fe)}for(Le=0;LeVe&&(Fe=Le,Ve=ve);return Fe}function gs(ie){return ie.reduce(ql,0)}function ql(ie,ve){return ie+ve[1]}function Sl(ie,ve){return _u(ie,Math.ceil(Math.log(ve.length)/Math.LN2+1))}function _u(ie,ve){for(var Le=-1,Fe=+ie[0],Ve=(ie[1]-Fe)/ve,We=[];++Le<=ve;)We[Le]=Ve*Le+Fe;return We}function El(ie){return[s.min(ie),s.max(ie)]}function nl(ie,ve){return ie.value-ve.value}function zs(ie,ve){var Le=ie._pack_next;ie._pack_next=ve,ve._pack_prev=ie,ve._pack_next=Le,Le._pack_prev=ve}function Ds(ie,ve){ie._pack_next=ve,ve._pack_prev=ie}function bi(ie,ve){var Le=ve.x-ie.x,Fe=ve.y-ie.y,Ve=ie.r+ve.r;return .999*Ve*Ve>Le*Le+Fe*Fe}function vs(ie){if((ve=ie.children)&&(lt=ve.length)){var ve,Le,Fe,Ve,We,$e,tt,lt,gt=1/0,zt=-1/0,Ut=1/0,Vt=-1/0;if(ve.forEach(ms),(Le=ve[0]).x=-Le.r,Le.y=0,xn(Le),lt>1&&((Fe=ve[1]).x=Fe.r,Fe.y=0,xn(Fe),lt>2))for(li(Le,Fe,Ve=ve[2]),xn(Ve),zs(Le,Ve),Le._pack_prev=Ve,zs(Ve,Fe),Fe=Le._pack_next,We=3;We0)for($e=-1;++$e=Ut[0]&<<=Ut[1]&&((tt=gt[s.bisect(Vt,lt,1,gn)-1]).y+=en,tt.push(We[$e]));return gt}return Ve.value=function(We){return arguments.length?(ve=We,Ve):ve},Ve.range=function(We){return arguments.length?(Le=qn(We),Ve):Le},Ve.bins=function(We){return arguments.length?(Fe=typeof We=="number"?function($e){return _u($e,We)}:qn(We),Ve):Fe},Ve.frequency=function(We){return arguments.length?(ie=!!We,Ve):ie},Ve},s.layout.pack=function(){var ie,ve=s.layout.hierarchy().sort(nl),Le=0,Fe=[1,1];function Ve(We,$e){var tt=ve.call(this,We,$e),lt=tt[0],gt=Fe[0],zt=Fe[1],Ut=ie==null?Math.sqrt:typeof ie=="function"?ie:function(){return ie};if(lt.x=lt.y=0,oo(lt,function(Qt){Qt.r=+Ut(Qt.value)}),oo(lt,vs),Le){var Vt=Le*(ie?1:Math.max(2*lt.r/gt,2*lt.r/zt))/2;oo(lt,function(Qt){Qt.r+=Vt}),oo(lt,vs),oo(lt,function(Qt){Qt.r-=Vt})}return oi(lt,gt/2,zt/2,ie?1:1/Math.max(2*lt.r/gt,2*lt.r/zt)),tt}return Ve.size=function(We){return arguments.length?(Fe=We,Ve):Fe},Ve.radius=function(We){return arguments.length?(ie=We==null||typeof We=="function"?We:+We,Ve):ie},Ve.padding=function(We){return arguments.length?(Le=+We,Ve):Le},Os(Ve,ve)},s.layout.tree=function(){var ie=s.layout.hierarchy().sort(null).value(null),ve=es,Le=[1,1],Fe=null;function Ve(lt,gt){var zt=ie.call(this,lt,gt),Ut=zt[0],Vt=function(xn){for(var an,zn={A:null,children:[xn]},Vn=[zn];(an=Vn.pop())!=null;)for(var nr,rr=an.children,wr=0,kr=rr.length;wrgn.x&&(gn=xn),xn.depth>en.depth&&(en=xn)});var sn=ve(Qt,gn)/2-Qt.x,rn=Le[0]/(gn.x+ve(gn,Qt)/2+sn),Mn=Le[1]/(en.depth||1);Qs(Ut,function(xn){xn.x=(xn.x+sn)*rn,xn.y=xn.depth*Mn})}return zt}function We(lt){var gt=lt.children,zt=lt.parent.children,Ut=lt.i?zt[lt.i-1]:null;if(gt.length){(function(Qt){for(var gn,en=0,sn=0,rn=Qt.children,Mn=rn.length;--Mn>=0;)(gn=rn[Mn]).z+=en,gn.m+=en,en+=gn.s+(sn+=gn.c)})(lt);var Vt=(gt[0].z+gt[gt.length-1].z)/2;Ut?(lt.z=Ut.z+ve(lt._,Ut._),lt.m=lt.z-Vt):lt.z=Vt}else Ut&&(lt.z=Ut.z+ve(lt._,Ut._));lt.parent.A=function(Qt,gn,en){if(gn){for(var sn,rn=Qt,Mn=Qt,xn=gn,an=rn.parent.children[0],zn=rn.m,Vn=Mn.m,nr=xn.m,rr=an.m;xn=Gl(xn),rn=zo(rn),xn&&rn;)an=zo(an),(Mn=Gl(Mn)).a=Qt,(sn=xn.z+nr-rn.z-zn+ve(xn._,rn._))>0&&(wu(Fs(xn,Qt,en),Qt,sn),zn+=sn,Vn+=sn),nr+=xn.m,zn+=rn.m,rr+=an.m,Vn+=Mn.m;xn&&!Gl(Mn)&&(Mn.t=xn,Mn.m+=nr-Vn),rn&&!zo(an)&&(an.t=rn,an.m+=zn-rr,en=Qt)}return en}(lt,Ut,lt.parent.A||zt[0])}function $e(lt){lt._.x=lt.z+lt.parent.m,lt.m+=lt.parent.m}function tt(lt){lt.x*=Le[0],lt.y=lt.depth*Le[1]}return Ve.separation=function(lt){return arguments.length?(ve=lt,Ve):ve},Ve.size=function(lt){return arguments.length?(Fe=(Le=lt)==null?tt:null,Ve):Fe?null:Le},Ve.nodeSize=function(lt){return arguments.length?(Fe=(Le=lt)==null?null:tt,Ve):Fe?Le:null},Os(Ve,ie)},s.layout.cluster=function(){var ie=s.layout.hierarchy().sort(null).value(null),ve=es,Le=[1,1],Fe=!1;function Ve(We,$e){var tt,lt=ie.call(this,We,$e),gt=lt[0],zt=0;oo(gt,function(en){var sn=en.children;sn&&sn.length?(en.x=function(rn){return rn.reduce(function(Mn,xn){return Mn+xn.x},0)/rn.length}(sn),en.y=function(rn){return 1+s.max(rn,function(Mn){return Mn.y})}(sn)):(en.x=tt?zt+=ve(en,tt):0,en.y=0,tt=en)});var Ut=Tu(gt),Vt=Bs(gt),Qt=Ut.x-ve(Ut,Vt)/2,gn=Vt.x+ve(Vt,Ut)/2;return oo(gt,Fe?function(en){en.x=(en.x-gt.x)*Le[0],en.y=(gt.y-en.y)*Le[1]}:function(en){en.x=(en.x-Qt)/(gn-Qt)*Le[0],en.y=(1-(gt.y?en.y/gt.y:1))*Le[1]}),lt}return Ve.separation=function(We){return arguments.length?(ve=We,Ve):ve},Ve.size=function(We){return arguments.length?(Fe=(Le=We)==null,Ve):Fe?null:Le},Ve.nodeSize=function(We){return arguments.length?(Fe=(Le=We)!=null,Ve):Fe?Le:null},Os(Ve,ie)},s.layout.treemap=function(){var ie,ve=s.layout.hierarchy(),Le=Math.round,Fe=[1,1],Ve=null,We=ts,$e=!1,tt="squarify",lt=.5*(1+Math.sqrt(5));function gt(en,sn){for(var rn,Mn,xn=-1,an=en.length;++xn0;)zn.push(rn=Vn[xn-1]),zn.area+=rn.area,tt!=="squarify"||(Mn=Vt(zn,rr))<=nr?(Vn.pop(),nr=Mn):(zn.area-=zn.pop().area,Qt(zn,rr,an,!1),rr=Math.min(an.dx,an.dy),zn.length=zn.area=0,nr=1/0);zn.length&&(Qt(zn,rr,an,!0),zn.length=zn.area=0),sn.forEach(zt)}}function Ut(en){var sn=en.children;if(sn&&sn.length){var rn,Mn=We(en),xn=sn.slice(),an=[];for(gt(xn,Mn.dx*Mn.dy/en.value),an.area=0;rn=xn.pop();)an.push(rn),an.area+=rn.area,rn.z!=null&&(Qt(an,rn.z?Mn.dx:Mn.dy,Mn,!xn.length),an.length=an.area=0);sn.forEach(Ut)}}function Vt(en,sn){for(var rn,Mn=en.area,xn=0,an=1/0,zn=-1,Vn=en.length;++znxn&&(xn=rn));return sn*=sn,(Mn*=Mn)?Math.max(sn*xn*lt/Mn,Mn/(sn*an*lt)):1/0}function Qt(en,sn,rn,Mn){var xn,an=-1,zn=en.length,Vn=rn.x,nr=rn.y,rr=sn?Le(en.area/sn):0;if(sn==rn.dx){for((Mn||rr>rn.dy)&&(rr=rn.dy);++anrn.dx)&&(rr=rn.dx);++an1);return ie+ve*Fe*Math.sqrt(-2*Math.log(We)/We)}},logNormal:function(){var ie=s.random.normal.apply(s,arguments);return function(){return Math.exp(ie())}},bates:function(ie){var ve=s.random.irwinHall(ie);return function(){return ve()/ie}},irwinHall:function(ie){return function(){for(var ve=0,Le=0;Le2?ha:js,gt=Fe?Ls:yu;return Ve=lt(ie,ve,gt,Le),We=lt(ve,ie,gt,qa),tt}function tt(lt){return Ve(lt)}return tt.invert=function(lt){return We(lt)},tt.domain=function(lt){return arguments.length?(ie=lt.map(Number),$e()):ie},tt.range=function(lt){return arguments.length?(ve=lt,$e()):ve},tt.rangeRound=function(lt){return tt.range(lt).interpolate(Gu)},tt.clamp=function(lt){return arguments.length?(Fe=lt,$e()):Fe},tt.interpolate=function(lt){return arguments.length?(Le=lt,$e()):Le},tt.ticks=function(lt){return Ga(ie,lt)},tt.tickFormat=function(lt,gt){return d3_scale_linearTickFormat(ie,lt,gt)},tt.nice=function(lt){return lo(ie,lt),$e()},tt.copy=function(){return Ia(ie,ve,Le,Fe)},$e()}function ys(ie,ve){return s.rebind(ie,ve,"range","rangeRound","interpolate","clamp")}function lo(ie,ve){return $i(ie,va(ea(ie,ve)[2])),$i(ie,va(ea(ie,ve)[2])),ie}function ea(ie,ve){ve==null&&(ve=10);var Le=Oi(ie),Fe=Le[1]-Le[0],Ve=Math.pow(10,Math.floor(Math.log(Fe/ve)/Math.LN10)),We=ve/Fe*Ve;return We<=.15?Ve*=10:We<=.35?Ve*=5:We<=.75&&(Ve*=2),Le[0]=Math.ceil(Le[0]/Ve)*Ve,Le[1]=Math.floor(Le[1]/Ve)*Ve+.5*Ve,Le[2]=Ve,Le}function Ga(ie,ve){return s.range.apply(s,ea(ie,ve))}function Wl(ie,ve,Le,Fe){function Ve(tt){return(Le?Math.log(tt<0?0:tt):-Math.log(tt>0?0:-tt))/Math.log(ve)}function We(tt){return Le?Math.pow(ve,tt):-Math.pow(ve,-tt)}function $e(tt){return ie(Ve(tt))}return $e.invert=function(tt){return We(ie.invert(tt))},$e.domain=function(tt){return arguments.length?(Le=tt[0]>=0,ie.domain((Fe=tt.map(Number)).map(Ve)),$e):Fe},$e.base=function(tt){return arguments.length?(ve=+tt,ie.domain(Fe.map(Ve)),$e):ve},$e.nice=function(){var tt=$i(Fe.map(Ve),Le?Math:Zl);return ie.domain(tt),Fe=tt.map(We),$e},$e.ticks=function(){var tt=Oi(Fe),lt=[],gt=tt[0],zt=tt[1],Ut=Math.floor(Ve(gt)),Vt=Math.ceil(Ve(zt)),Qt=ve%1?2:ve;if(isFinite(Vt-Ut)){if(Le){for(;Ut0;gn--)lt.push(We(Ut)*gn);for(Ut=0;lt[Ut]zt;Vt--);lt=lt.slice(Ut,Vt)}return lt},$e.copy=function(){return Wl(ie.copy(),ve,Le,Fe)},ys($e,ie)}s.scale.linear=function(){return Ia([0,1],[0,1],qa,!1)},s.scale.log=function(){return Wl(s.scale.linear().domain([0,1]),10,!0,[1,10])};var Zl={floor:function(ie){return-Math.ceil(-ie)},ceil:function(ie){return-Math.floor(-ie)}};function Sa(ie,ve,Le){var Fe=Cr(ve),Ve=Cr(1/ve);function We($e){return ie(Fe($e))}return We.invert=function($e){return Ve(ie.invert($e))},We.domain=function($e){return arguments.length?(ie.domain((Le=$e.map(Number)).map(Fe)),We):Le},We.ticks=function($e){return Ga(Le,$e)},We.tickFormat=function($e,tt){return d3_scale_linearTickFormat(Le,$e,tt)},We.nice=function($e){return We.domain(lo(Le,$e))},We.exponent=function($e){return arguments.length?(Fe=Cr(ve=$e),Ve=Cr(1/ve),ie.domain(Le.map(Fe)),We):ve},We.copy=function(){return Sa(ie.copy(),ve,Le)},ys(We,ie)}function Cr(ie){return function(ve){return ve<0?-Math.pow(-ve,ie):Math.pow(ve,ie)}}function Us(ie,ve){var Le,Fe,Ve;function We(tt){return Fe[((Le.get(tt)||(ve.t==="range"?Le.set(tt,ie.push(tt)):NaN))-1)%Fe.length]}function $e(tt,lt){return s.range(ie.length).map(function(gt){return tt+lt*gt})}return We.domain=function(tt){if(!arguments.length)return ie;ie=[],Le=new k;for(var lt,gt=-1,zt=tt.length;++gt0?Le[We-1]:ie[0],WeVt?0:1;if(zt=qt)return lt(zt,gn)+(gt?lt(gt,1-gn):"")+"Z";var en,sn,rn,Mn,xn,an,zn,Vn,nr,rr,wr,kr,mr=0,_r=0,Rr=[];if((Mn=(+$e.apply(this,arguments)||0)/2)&&(rn=Fe===Cl?Math.sqrt(gt*gt+zt*zt):+Fe.apply(this,arguments),gn||(_r*=-1),zt&&(_r=Ge(rn/zt*Math.sin(Mn))),gt&&(mr=Ge(rn/gt*Math.sin(Mn)))),zt){xn=zt*Math.cos(Ut+_r),an=zt*Math.sin(Ut+_r),zn=zt*Math.cos(Vt-_r),Vn=zt*Math.sin(Vt-_r);var Jr=Math.abs(Vt-Ut-2*_r)<=It?0:1;if(_r&&_o(xn,an,zn,Vn)===gn^Jr){var Kr=(Ut+Vt)/2;xn=zt*Math.cos(Kr),an=zt*Math.sin(Kr),zn=Vn=null}}else xn=an=0;if(gt){nr=gt*Math.cos(Vt-mr),rr=gt*Math.sin(Vt-mr),wr=gt*Math.cos(Ut+mr),kr=gt*Math.sin(Ut+mr);var xr=Math.abs(Ut-Vt+2*mr)<=It?0:1;if(mr&&_o(nr,rr,wr,kr)===1-gn^xr){var zr=(Ut+Vt)/2;nr=gt*Math.cos(zr),rr=gt*Math.sin(zr),wr=kr=null}}else nr=rr=0;if(Qt>Dt&&(en=Math.min(Math.abs(zt-gt)/2,+Le.apply(this,arguments)))>.001){sn=gt0?0:1}function co(ie,ve,Le,Fe,Ve){var We=ie[0]-ve[0],$e=ie[1]-ve[1],tt=(Ve?Fe:-Fe)/Math.sqrt(We*We+$e*$e),lt=tt*$e,gt=-tt*We,zt=ie[0]+lt,Ut=ie[1]+gt,Vt=ve[0]+lt,Qt=ve[1]+gt,gn=(zt+Vt)/2,en=(Ut+Qt)/2,sn=Vt-zt,rn=Qt-Ut,Mn=sn*sn+rn*rn,xn=Le-Fe,an=zt*Qt-Vt*Ut,zn=(rn<0?-1:1)*Math.sqrt(Math.max(0,xn*xn*Mn-an*an)),Vn=(an*rn-sn*zn)/Mn,nr=(-an*sn-rn*zn)/Mn,rr=(an*rn+sn*zn)/Mn,wr=(-an*sn+rn*zn)/Mn,kr=Vn-gn,mr=nr-en,_r=rr-gn,Rr=wr-en;return kr*kr+mr*mr>_r*_r+Rr*Rr&&(Vn=rr,nr=wr),[[Vn-lt,nr-gt],[Vn*Le/xn,nr*Le/xn]]}function Hs(){return!0}function xa(ie){var ve=jn,Le=$n,Fe=Hs,Ve=vi,We=Ve.key,$e=.7;function tt(lt){var gt,zt=[],Ut=[],Vt=-1,Qt=lt.length,gn=qn(ve),en=qn(Le);function sn(){zt.push("M",Ve(ie(Ut),$e))}for(;++Vt1&&Ve.push("H",Fe[0]),Ve.join("")},"step-before":to,"step-after":ho,basis:di,"basis-open":function(ie){if(ie.length<4)return vi(ie);for(var ve,Le=[],Fe=-1,Ve=ie.length,We=[0],$e=[0];++Fe<3;)ve=ie[Fe],We.push(ve[0]),$e.push(ve[1]);for(Le.push(oa(Bo,We)+","+oa(Bo,$e)),--Fe;++Fe9&&(We=3*Le/Math.sqrt(We),tt[lt]=We*Fe,tt[lt+1]=We*Ve);for(lt=-1;++lt<=gt;)We=(ve[Math.min(gt,lt+1)][0]-ve[Math.max(0,lt-1)][0])/(6*(1+tt[lt]*tt[lt])),$e.push([We||0,tt[lt]*We||0]);return $e}(ie))}});function vi(ie){return ie.length>1?ie.join("L"):ie+"Z"}function Ll(ie){return ie.join("L")+"Z"}function to(ie){for(var ve=0,Le=ie.length,Fe=ie[0],Ve=[Fe[0],",",Fe[1]];++ve1){tt=ve[1],We=ie[lt],lt++,Fe+="C"+(Ve[0]+$e[0])+","+(Ve[1]+$e[1])+","+(We[0]-tt[0])+","+(We[1]-tt[1])+","+We[0]+","+We[1];for(var gt=2;gtIt)+",1 "+zt}function lt(gt,zt,Ut,Vt){return"Q 0,0 "+Vt}return We.radius=function(gt){return arguments.length?(Le=qn(gt),We):Le},We.source=function(gt){return arguments.length?(ie=qn(gt),We):ie},We.target=function(gt){return arguments.length?(ve=qn(gt),We):ve},We.startAngle=function(gt){return arguments.length?(Fe=qn(gt),We):Fe},We.endAngle=function(gt){return arguments.length?(Ve=qn(gt),We):Ve},We},s.svg.diagonal=function(){var ie=Fr,ve=Ur,Le=is;function Fe(Ve,We){var $e=ie.call(this,Ve,We),tt=ve.call(this,Ve,We),lt=($e.y+tt.y)/2,gt=[$e,{x:$e.x,y:lt},{x:tt.x,y:lt},tt];return"M"+(gt=gt.map(Le))[0]+"C"+gt[1]+" "+gt[2]+" "+gt[3]}return Fe.source=function(Ve){return arguments.length?(ie=qn(Ve),Fe):ie},Fe.target=function(Ve){return arguments.length?(ve=qn(Ve),Fe):ve},Fe.projection=function(Ve){return arguments.length?(Le=Ve,Fe):Le},Fe},s.svg.diagonal.radial=function(){var ie=s.svg.diagonal(),ve=is,Le=ie.projection;return ie.projection=function(Fe){return arguments.length?Le(To(ve=Fe)):ve},ie},s.svg.symbol=function(){var ie=$l,ve=_a;function Le(Fe,Ve){return(ll.get(ie.call(this,Fe,Ve))||Fa)(ve.call(this,Fe,Ve))}return Le.type=function(Fe){return arguments.length?(ie=qn(Fe),Le):ie},Le.size=function(Fe){return arguments.length?(ve=qn(Fe),Le):ve},Le};var ll=s.map({circle:Fa,cross:function(ie){var ve=Math.sqrt(ie/5)/2;return"M"+-3*ve+","+-ve+"H"+-ve+"V"+-3*ve+"H"+ve+"V"+-ve+"H"+3*ve+"V"+ve+"H"+ve+"V"+3*ve+"H"+-ve+"V"+ve+"H"+-3*ve+"Z"},diamond:function(ie){var ve=Math.sqrt(ie/(2*_i)),Le=ve*_i;return"M0,"+-ve+"L"+Le+",0 0,"+ve+" "+-Le+",0Z"},square:function(ie){var ve=Math.sqrt(ie)/2;return"M"+-ve+","+-ve+"L"+ve+","+-ve+" "+ve+","+ve+" "+-ve+","+ve+"Z"},"triangle-down":function(ie){var ve=Math.sqrt(ie/as),Le=ve*as/2;return"M0,"+Le+"L"+ve+","+-Le+" "+-ve+","+-Le+"Z"},"triangle-up":function(ie){var ve=Math.sqrt(ie/as),Le=ve*as/2;return"M0,"+-Le+"L"+ve+","+Le+" "+-ve+","+Le+"Z"}});s.svg.symbolTypes=ll.keys();var as=Math.sqrt(3),_i=Math.tan(30*Je);ce.transition=function(ie){for(var ve,Le,Fe=rt||++Mt,Ve=$(ie),We=[],$e=ct||{time:Date.now(),ease:Xo,delay:0,duration:250},tt=-1,lt=this.length;++tt0;)gt[--rn].call(ie,sn);if(en>=1)return Ut.event&&Ut.event.end.call(ie,ie.__data__,ve),--zt.count?delete zt[Fe]:delete ie[Le],1}Ut||(We=Ve.time,$e=$t(function(gn){var en=Ut.delay;if($e.t=en+We,en<=gn)return Vt(gn-en);$e.c=Vt},0,We),Ut=zt[Fe]={tween:new k,time:We,timer:$e,delay:Ve.delay,duration:Ve.duration,ease:Ve.ease,index:ve},Ve=null,++zt.count)}vt.call=ce.call,vt.empty=ce.empty,vt.node=ce.node,vt.size=ce.size,s.transition=function(ie,ve){return ie&&ie.transition?rt?ie.transition(ve):ie:s.selection().transition(ie)},s.transition.prototype=vt,vt.select=function(ie){var ve,Le,Fe,Ve=this.id,We=this.namespace,$e=[];ie=xe(ie);for(var tt=-1,lt=this.length;++ttrect,.s>rect").attr("width",We[1]-We[0])}function Qt(en){en.select(".extent").attr("y",$e[0]),en.selectAll(".extent,.e>rect,.w>rect").attr("height",$e[1]-$e[0])}function gn(){var en,sn,rn=this,Mn=s.select(s.event.target),xn=Le.of(rn,arguments),an=s.select(rn),zn=Mn.datum(),Vn=!/^(n|s)$/.test(zn)&&Fe,nr=!/^(e|w)$/.test(zn)&&Ve,rr=Mn.classed("extent"),wr=yt(rn),kr=s.mouse(rn),mr=s.select(t(rn)).on("keydown.brush",Jr).on("keyup.brush",Kr);if(s.event.changedTouches?mr.on("touchmove.brush",xr).on("touchend.brush",Wr):mr.on("mousemove.brush",xr).on("mouseup.brush",Wr),an.interrupt().selectAll("*").interrupt(),rr)kr[0]=We[0]-kr[0],kr[1]=$e[0]-kr[1];else if(zn){var _r=+/w$/.test(zn),Rr=+/^n/.test(zn);sn=[We[1-_r]-kr[0],$e[1-Rr]-kr[1]],kr[0]=We[_r],kr[1]=$e[Rr]}else s.event.altKey&&(en=kr.slice());function Jr(){s.event.keyCode==32&&(rr||(en=null,kr[0]-=We[1],kr[1]-=$e[1],rr=2),ee())}function Kr(){s.event.keyCode==32&&rr==2&&(kr[0]+=We[1],kr[1]+=$e[1],rr=0,ee())}function xr(){var Gr=s.mouse(rn),ii=!1;sn&&(Gr[0]+=sn[0],Gr[1]+=sn[1]),rr||(s.event.altKey?(en||(en=[(We[0]+We[1])/2,($e[0]+$e[1])/2]),kr[0]=We[+(Gr[0]>>1;i.dtype||(i.dtype="array"),typeof i.dtype=="string"?c=new(a(i.dtype))(d):i.dtype&&(c=i.dtype,Array.isArray(c)&&(c.length=d));for(var v=0;vu||H>1073741824){for(var K=0;Khe+ze||re>ye+ze||oe=ce||Ae===Me)){var Ce=x[Te];Me===void 0&&(Me=Ce.length);for(var ne=Ae;ne=ee&&me<=X&&we>=Q&&we<=Y&&xe.push(ue)}var Ee=g[Te],Ue=Ee[4*Ae+0],De=Ee[4*Ae+1],je=Ee[4*Ae+2],ge=Ee[4*Ae+3],be=de(Ee,Ae+1),Se=.5*ze,Ne=Te+1;pe(he,ye,Se,Ne,Ue,De||je||ge||be),pe(he,ye+Se,Se,Ne,De,je||ge||be),pe(he+Se,ye,Se,Ne,je,ge||be),pe(he+Se,ye+Se,Se,Ne,ge,be)}}function de(he,ye){for(var ze=null,Te=0;ze===null;)if(ze=he[4*ye+Te],++Te>he.length)return null;return ze}return pe(0,0,1,0,0,1),xe},c;function I(U,B,G,N,j){for(var V=[],H=0;H0){l+=Math.abs(T(f[0]));for(var t=1;t2){for(o=0;o=0))throw new Error("precision must be a positive number");var u=Math.pow(10,i||0);return Math.round(o*u)/u},E.radiansToLength=t,E.lengthToRadians=a,E.lengthToDegrees=function(o,i){return r(a(o,i))},E.bearingToAzimuth=function(o){var i=o%360;return i<0&&(i+=360),i},E.radiansToDegrees=r,E.degreesToRadians=function(o){return o%360*Math.PI/180},E.convertLength=function(o,i,u){if(i===void 0&&(i="kilometers"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("length must be a positive number");return t(a(o,i),u)},E.convertArea=function(o,i,u){if(i===void 0&&(i="meters"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("area must be a positive number");var p=E.areaFactors[i];if(!p)throw new Error("invalid original units");var c=E.areaFactors[u];if(!c)throw new Error("invalid final units");return o/p*c},E.isNumber=n,E.isObject=function(o){return!!o&&o.constructor===Object},E.validateBBox=function(o){if(!o)throw new Error("bbox is required");if(!Array.isArray(o))throw new Error("bbox must be an Array");if(o.length!==4&&o.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");o.forEach(function(i){if(!n(i))throw new Error("bbox must only contain numbers")})},E.validateId=function(o){if(!o)throw new Error("id is required");if(["string","number"].indexOf(typeof o)===-1)throw new Error("id must be a number or a string")}},60302:function(D,E,e){Object.defineProperty(E,"__esModule",{value:!0});var _=e(23132);function w(a,r,n){if(a!==null)for(var o,i,u,p,c,b,d,v,x=0,g=0,y=a.type,k=y==="FeatureCollection",h=y==="Feature",M=k?a.features.length:1,A=0;Ab||k>d||h>v)return c=x,b=o,d=k,v=h,void(u=0);var M=_.lineString([c,x],n.properties);if(r(M,o,i,h,u)===!1)return!1;u++,c=x})!==!1&&void 0}}})}function t(a,r){if(!a)throw new Error("geojson is required");f(a,function(n,o,i){if(n.geometry!==null){var u=n.geometry.type,p=n.geometry.coordinates;switch(u){case"LineString":if(r(n,o,i,0,0)===!1)return!1;break;case"Polygon":for(var c=0;cm[0]&&(T[0]=m[0]),T[1]>m[1]&&(T[1]=m[1]),T[2]=0))throw new Error("precision must be a positive number");var u=Math.pow(10,i||0);return Math.round(o*u)/u},E.radiansToLength=t,E.lengthToRadians=a,E.lengthToDegrees=function(o,i){return r(a(o,i))},E.bearingToAzimuth=function(o){var i=o%360;return i<0&&(i+=360),i},E.radiansToDegrees=r,E.degreesToRadians=function(o){return o%360*Math.PI/180},E.convertLength=function(o,i,u){if(i===void 0&&(i="kilometers"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("length must be a positive number");return t(a(o,i),u)},E.convertArea=function(o,i,u){if(i===void 0&&(i="meters"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("area must be a positive number");var p=E.areaFactors[i];if(!p)throw new Error("invalid original units");var c=E.areaFactors[u];if(!c)throw new Error("invalid final units");return o/p*c},E.isNumber=n,E.isObject=function(o){return!!o&&o.constructor===Object},E.validateBBox=function(o){if(!o)throw new Error("bbox is required");if(!Array.isArray(o))throw new Error("bbox must be an Array");if(o.length!==4&&o.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");o.forEach(function(i){if(!n(i))throw new Error("bbox must only contain numbers")})},E.validateId=function(o){if(!o)throw new Error("id is required");if(["string","number"].indexOf(typeof o)===-1)throw new Error("id must be a number or a string")}},27138:function(D,E,e){Object.defineProperty(E,"__esModule",{value:!0});var _=e(94228);function w(a,r,n){if(a!==null)for(var o,i,u,p,c,b,d,v,x=0,g=0,y=a.type,k=y==="FeatureCollection",h=y==="Feature",M=k?a.features.length:1,A=0;Ab||k>d||h>v)return c=x,b=o,d=k,v=h,void(u=0);var M=_.lineString([c,x],n.properties);if(r(M,o,i,h,u)===!1)return!1;u++,c=x})!==!1&&void 0}}})}function t(a,r){if(!a)throw new Error("geojson is required");f(a,function(n,o,i){if(n.geometry!==null){var u=n.geometry.type,p=n.geometry.coordinates;switch(u){case"LineString":if(r(n,o,i,0,0)===!1)return!1;break;case"Polygon":for(var c=0;c=0))throw new Error("precision must be a positive number");var u=Math.pow(10,i||0);return Math.round(o*u)/u},E.radiansToLength=t,E.lengthToRadians=a,E.lengthToDegrees=function(o,i){return r(a(o,i))},E.bearingToAzimuth=function(o){var i=o%360;return i<0&&(i+=360),i},E.radiansToDegrees=r,E.degreesToRadians=function(o){return o%360*Math.PI/180},E.convertLength=function(o,i,u){if(i===void 0&&(i="kilometers"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("length must be a positive number");return t(a(o,i),u)},E.convertArea=function(o,i,u){if(i===void 0&&(i="meters"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("area must be a positive number");var p=E.areaFactors[i];if(!p)throw new Error("invalid original units");var c=E.areaFactors[u];if(!c)throw new Error("invalid final units");return o/p*c},E.isNumber=n,E.isObject=function(o){return!!o&&o.constructor===Object},E.validateBBox=function(o){if(!o)throw new Error("bbox is required");if(!Array.isArray(o))throw new Error("bbox must be an Array");if(o.length!==4&&o.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");o.forEach(function(i){if(!n(i))throw new Error("bbox must only contain numbers")})},E.validateId=function(o){if(!o)throw new Error("id is required");if(["string","number"].indexOf(typeof o)===-1)throw new Error("id must be a number or a string")},E.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},E.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},E.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},E.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},E.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},E.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},E.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},88553:function(D,E,e){Object.defineProperty(E,"__esModule",{value:!0});var _=e(64182);function w(a,r,n){if(a!==null)for(var o,i,u,p,c,b,d,v,x=0,g=0,y=a.type,k=y==="FeatureCollection",h=y==="Feature",M=k?a.features.length:1,A=0;Ab||k>d||h>v)return c=x,b=o,d=k,v=h,void(u=0);var M=_.lineString([c,x],n.properties);if(r(M,o,i,h,u)===!1)return!1;u++,c=x})!==!1&&void 0}}})}function t(a,r){if(!a)throw new Error("geojson is required");f(a,function(n,o,i){if(n.geometry!==null){var u=n.geometry.type,p=n.geometry.coordinates;switch(u){case"LineString":if(r(n,o,i,0,0)===!1)return!1;break;case"Polygon":for(var c=0;cs&&(s=E[m]),E[m]1?j-1:0),H=1;H1?j-1:0),H=1;H1?j-1:0),H=1;H1?j-1:0),H=1;H2?"one of ".concat(r," ").concat(a.slice(0,n-1).join(", "),", or ")+a[n-1]:n===2?"one of ".concat(r," ").concat(a[0]," or ").concat(a[1]):"of ".concat(r," ").concat(a[0])}return"of ".concat(r," ").concat(String(a))}l("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),l("ERR_INVALID_ARG_TYPE",function(a,r,n){var o,i,u,p,c;if(T===void 0&&(T=e(32791)),T(typeof a=="string","'name' must be a string"),typeof r=="string"&&(i="not ",r.substr(0,i.length)===i)?(o="must not be",r=r.replace(/^not /,"")):o="must be",function(d,v,x){return(x===void 0||x>d.length)&&(x=d.length),d.substring(x-v.length,x)===v}(a," argument"))u="The ".concat(a," ").concat(o," ").concat(t(r,"type"));else{var b=(typeof c!="number"&&(c=0),c+1>(p=a).length||p.indexOf(".",c)===-1?"argument":"property");u='The "'.concat(a,'" ').concat(b," ").concat(o," ").concat(t(r,"type"))}return u+". Received type ".concat(_(n))},TypeError),l("ERR_INVALID_ARG_VALUE",function(a,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";m===void 0&&(m=e(43827));var o=m.inspect(r);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(a,"' ").concat(n,". Received ").concat(o)},TypeError),l("ERR_INVALID_RETURN_VALUE",function(a,r,n){var o;return o=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(_(n)),"Expected ".concat(a,' to be returned from the "').concat(r,'"')+" function but got ".concat(o,".")},TypeError),l("ERR_MISSING_ARGS",function(){for(var a=arguments.length,r=new Array(a),n=0;n0,"At least one arg needs to be specified");var o="The ",i=r.length;switch(r=r.map(function(u){return'"'.concat(u,'"')}),i){case 1:o+="".concat(r[0]," argument");break;case 2:o+="".concat(r[0]," and ").concat(r[1]," arguments");break;default:o+=r.slice(0,i-1).join(", "),o+=", and ".concat(r[i-1]," arguments")}return"".concat(o," must be specified")},TypeError),D.exports.codes=f},74061:function(D,E,e){function _(X,Y){return function(K){if(Array.isArray(K))return K}(X)||function(K,te){var re=[],oe=!0,se=!1,ce=void 0;try{for(var xe,pe=K[Symbol.iterator]();!(oe=(xe=pe.next()).done)&&(re.push(xe.value),!te||re.length!==te);oe=!0);}catch(de){se=!0,ce=de}finally{try{oe||pe.return==null||pe.return()}finally{if(se)throw ce}}return re}(X,Y)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function w(X){return w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Y){return typeof Y}:function(Y){return Y&&typeof Symbol=="function"&&Y.constructor===Symbol&&Y!==Symbol.prototype?"symbol":typeof Y},w(X)}var s=/a/g.flags!==void 0,T=function(X){var Y=[];return X.forEach(function(K){return Y.push(K)}),Y},m=function(X){var Y=[];return X.forEach(function(K,te){return Y.push([te,K])}),Y},f=Object.is?Object.is:e(64003),l=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},t=Number.isNaN?Number.isNaN:e(15567);function a(X){return X.call.bind(X)}var r=a(Object.prototype.hasOwnProperty),n=a(Object.prototype.propertyIsEnumerable),o=a(Object.prototype.toString),i=e(43827).types,u=i.isAnyArrayBuffer,p=i.isArrayBufferView,c=i.isDate,b=i.isMap,d=i.isRegExp,v=i.isSet,x=i.isNativeError,g=i.isBoxedPrimitive,y=i.isNumberObject,k=i.isStringObject,h=i.isBooleanObject,M=i.isBigIntObject,A=i.isSymbolObject,C=i.isFloat32Array,L=i.isFloat64Array;function P(X){if(X.length===0||X.length>10)return!0;for(var Y=0;Y57)return!0}return X.length===10&&X>=Math.pow(2,32)}function I(X){return Object.keys(X).filter(P).concat(l(X).filter(Object.prototype.propertyIsEnumerable.bind(X)))}function R(X,Y){if(X===Y)return 0;for(var K=X.length,te=Y.length,re=0,oe=Math.min(K,te);re0?o-4:o;for(r=0;r>16&255,u[p++]=a>>8&255,u[p++]=255&a;return i===2&&(a=_[t.charCodeAt(r)]<<2|_[t.charCodeAt(r+1)]>>4,u[p++]=255&a),i===1&&(a=_[t.charCodeAt(r)]<<10|_[t.charCodeAt(r+1)]<<4|_[t.charCodeAt(r+2)]>>2,u[p++]=a>>8&255,u[p++]=255&a),u},E.fromByteArray=function(t){for(var a,r=t.length,n=r%3,o=[],i=16383,u=0,p=r-n;up?p:u+i));return n===1?(a=t[r-1],o.push(e[a>>2]+e[a<<4&63]+"==")):n===2&&(a=(t[r-2]<<8)+t[r-1],o.push(e[a>>10]+e[a>>4&63]+e[a<<2&63]+"=")),o.join("")};for(var e=[],_=[],w=typeof Uint8Array<"u"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T=0,m=s.length;T0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return r===-1&&(r=a),[r,r===a?0:4-r%4]}function l(t,a,r){for(var n,o,i=[],u=a;u>18&63]+e[o>>12&63]+e[o>>6&63]+e[63&o]);return i.join("")}_["-".charCodeAt(0)]=62,_["_".charCodeAt(0)]=63},91358:function(D){function E(m,f,l,t,a){for(var r=a+1;t<=a;){var n=t+a>>>1,o=m[n];(l!==void 0?l(o,f):o-f)>=0?(r=n,a=n-1):t=n+1}return r}function e(m,f,l,t,a){for(var r=a+1;t<=a;){var n=t+a>>>1,o=m[n];(l!==void 0?l(o,f):o-f)>0?(r=n,a=n-1):t=n+1}return r}function _(m,f,l,t,a){for(var r=t-1;t<=a;){var n=t+a>>>1,o=m[n];(l!==void 0?l(o,f):o-f)<0?(r=n,t=n+1):a=n-1}return r}function w(m,f,l,t,a){for(var r=t-1;t<=a;){var n=t+a>>>1,o=m[n];(l!==void 0?l(o,f):o-f)<=0?(r=n,t=n+1):a=n-1}return r}function s(m,f,l,t,a){for(;t<=a;){var r=t+a>>>1,n=m[r],o=l!==void 0?l(n,f):n-f;if(o===0)return r;o<=0?t=r+1:a=r-1}return-1}function T(m,f,l,t,a,r){return typeof l=="function"?r(m,f,l,t===void 0?0:0|t,a===void 0?m.length-1:0|a):r(m,f,void 0,l===void 0?0:0|l,t===void 0?m.length-1:0|t)}D.exports={ge:function(m,f,l,t,a){return T(m,f,l,t,a,E)},gt:function(m,f,l,t,a){return T(m,f,l,t,a,e)},lt:function(m,f,l,t,a){return T(m,f,l,t,a,_)},le:function(m,f,l,t,a){return T(m,f,l,t,a,w)},eq:function(m,f,l,t,a){return T(m,f,l,t,a,s)}}},13547:function(D,E){function e(w){var s=32;return(w&=-w)&&s--,65535&w&&(s-=16),16711935&w&&(s-=8),252645135&w&&(s-=4),858993459&w&&(s-=2),1431655765&w&&(s-=1),s}E.INT_BITS=32,E.INT_MAX=2147483647,E.INT_MIN=-2147483648,E.sign=function(w){return(w>0)-(w<0)},E.abs=function(w){var s=w>>31;return(w^s)-s},E.min=function(w,s){return s^(w^s)&-(w65535)<<4,s|=T=((w>>>=s)>255)<<3,s|=T=((w>>>=T)>15)<<2,(s|=T=((w>>>=T)>3)<<1)|(w>>>=T)>>1},E.log10=function(w){return w>=1e9?9:w>=1e8?8:w>=1e7?7:w>=1e6?6:w>=1e5?5:w>=1e4?4:w>=1e3?3:w>=100?2:w>=10?1:0},E.popCount=function(w){return 16843009*((w=(858993459&(w-=w>>>1&1431655765))+(w>>>2&858993459))+(w>>>4)&252645135)>>>24},E.countTrailingZeros=e,E.nextPow2=function(w){return w+=w===0,--w,w|=w>>>1,w|=w>>>2,w|=w>>>4,w|=w>>>8,1+(w|=w>>>16)},E.prevPow2=function(w){return w|=w>>>1,w|=w>>>2,w|=w>>>4,w|=w>>>8,(w|=w>>>16)-(w>>>1)},E.parity=function(w){return w^=w>>>16,w^=w>>>8,w^=w>>>4,27030>>>(w&=15)&1};var _=new Array(256);(function(w){for(var s=0;s<256;++s){var T=s,m=s,f=7;for(T>>>=1;T;T>>>=1)m<<=1,m|=1&T,--f;w[s]=m<>>8&255]<<16|_[w>>>16&255]<<8|_[w>>>24&255]},E.interleave2=function(w,s){return(w=1431655765&((w=858993459&((w=252645135&((w=16711935&((w&=65535)|w<<8))|w<<4))|w<<2))|w<<1))|(s=1431655765&((s=858993459&((s=252645135&((s=16711935&((s&=65535)|s<<8))|s<<4))|s<<2))|s<<1))<<1},E.deinterleave2=function(w,s){return(w=65535&((w=16711935&((w=252645135&((w=858993459&((w=w>>>s&1431655765)|w>>>1))|w>>>2))|w>>>4))|w>>>16))<<16>>16},E.interleave3=function(w,s,T){return w=1227133513&((w=3272356035&((w=251719695&((w=4278190335&((w&=1023)|w<<16))|w<<8))|w<<4))|w<<2),(w|=(s=1227133513&((s=3272356035&((s=251719695&((s=4278190335&((s&=1023)|s<<16))|s<<8))|s<<4))|s<<2))<<1)|(T=1227133513&((T=3272356035&((T=251719695&((T=4278190335&((T&=1023)|T<<16))|T<<8))|T<<4))|T<<2))<<2},E.deinterleave3=function(w,s){return(w=1023&((w=4278190335&((w=251719695&((w=3272356035&((w=w>>>s&1227133513)|w>>>2))|w>>>4))|w>>>8))|w>>>16))<<22>>22},E.nextCombination=function(w){var s=w|w-1;return s+1|(~s&-~s)-1>>>e(w)+1}},44781:function(D,E,e){var _=e(53435);D.exports=function(m,f){f||(f={});var l,t,a,r,n,o,i,u,p,c,b,d=f.cutoff==null?.25:f.cutoff,v=f.radius==null?8:f.radius,x=f.channel||0;if(ArrayBuffer.isView(m)||Array.isArray(m)){if(!f.width||!f.height)throw Error("For raw data width and height should be provided by options");l=f.width,t=f.height,r=m,o=f.stride?f.stride:Math.floor(m.length/l/t)}else window.HTMLCanvasElement&&m instanceof window.HTMLCanvasElement?(i=(u=m).getContext("2d"),l=u.width,t=u.height,r=(p=i.getImageData(0,0,l,t)).data,o=4):window.CanvasRenderingContext2D&&m instanceof window.CanvasRenderingContext2D?(i=m,l=(u=m.canvas).width,t=u.height,r=(p=i.getImageData(0,0,l,t)).data,o=4):window.ImageData&&m instanceof window.ImageData&&(p=m,l=m.width,t=m.height,r=p.data,o=4);if(a=Math.max(l,t),window.Uint8ClampedArray&&r instanceof window.Uint8ClampedArray||window.Uint8Array&&r instanceof window.Uint8Array)for(n=r,r=Array(l*t),c=0,b=n.length;c-1?w(f):f}},68222:function(D,E,e){var _=e(77575),w=e(68318),s=w("%Function.prototype.apply%"),T=w("%Function.prototype.call%"),m=w("%Reflect.apply%",!0)||_.call(T,s),f=w("%Object.getOwnPropertyDescriptor%",!0),l=w("%Object.defineProperty%",!0),t=w("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}D.exports=function(r){var n=m(_,T,arguments);if(f&&l){var o=f(n,"length");o.configurable&&l(n,"length",{value:1+t(0,r.length-(arguments.length-1))})}return n};var a=function(){return m(_,s,arguments)};l?l(D.exports,"apply",{value:a}):D.exports.apply=a},53435:function(D){D.exports=function(E,e,_){return e<_?E_?_:E:E<_?_:E>e?e:E}},6475:function(D,E,e){var _=e(53435);function w(s,T){T==null&&(T=!0);var m=s[0],f=s[1],l=s[2],t=s[3];return t==null&&(t=T?1:255),T&&(m*=255,f*=255,l*=255,t*=255),16777216*(m=255&_(m,0,255))+((f=255&_(f,0,255))<<16)+((l=255&_(l,0,255))<<8)+(255&_(t,0,255))}D.exports=w,D.exports.to=w,D.exports.from=function(s,T){var m=(s=+s)>>>24,f=(16711680&s)>>>16,l=(65280&s)>>>8,t=255&s;return T===!1?[m,f,l,t]:[m/255,f/255,l/255,t/255]}},76857:function(D){D.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(D,E,e){var _=e(36652),w=e(53435),s=e(90660);D.exports=function(T,m){m!=="float"&&m||(m="array"),m==="uint"&&(m="uint8"),m==="uint_clamped"&&(m="uint8_clamped");var f=new(s(m))(4),l=m!=="uint8"&&m!=="uint8_clamped";return T.length&&typeof T!="string"||((T=_(T))[0]/=255,T[1]/=255,T[2]/=255),function(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||!!(Array.isArray(t)&&(t[0]>1||t[0]===0)&&(t[1]>1||t[1]===0)&&(t[2]>1||t[2]===0)&&(!t[3]||t[3]>1))}(T)?(f[0]=T[0],f[1]=T[1],f[2]=T[2],f[3]=T[3]!=null?T[3]:255,l&&(f[0]/=255,f[1]/=255,f[2]/=255,f[3]/=255),f):(l?(f[0]=T[0],f[1]=T[1],f[2]=T[2],f[3]=T[3]!=null?T[3]:1):(f[0]=w(Math.floor(255*T[0]),0,255),f[1]=w(Math.floor(255*T[1]),0,255),f[2]=w(Math.floor(255*T[2]),0,255),f[3]=T[3]==null?255:w(Math.floor(255*T[3]),0,255)),f)}},90736:function(D,E,e){var _=e(76857),w=e(10973),s=e(46775);D.exports=function(m){var f,l,t=[],a=1;if(typeof m=="string")if(_[m])t=_[m].slice(),l="rgb";else if(m==="transparent")a=0,l="rgb",t=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(m)){var r=(i=m.slice(1)).length;a=1,r<=4?(t=[parseInt(i[0]+i[0],16),parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16)],r===4&&(a=parseInt(i[3]+i[3],16)/255)):(t=[parseInt(i[0]+i[1],16),parseInt(i[2]+i[3],16),parseInt(i[4]+i[5],16)],r===8&&(a=parseInt(i[6]+i[7],16)/255)),t[0]||(t[0]=0),t[1]||(t[1]=0),t[2]||(t[2]=0),l="rgb"}else if(f=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(m)){var n=f[1],o=n==="rgb",i=n.replace(/a$/,"");l=i,r=i==="cmyk"?4:i==="gray"?1:3,t=f[2].trim().split(/\s*,\s*/).map(function(p,c){if(/%$/.test(p))return c===r?parseFloat(p)/100:i==="rgb"?255*parseFloat(p)/100:parseFloat(p);if(i[c]==="h"){if(/deg$/.test(p))return parseFloat(p);if(T[p]!==void 0)return T[p]}return parseFloat(p)}),n===i&&t.push(1),a=o||t[r]===void 0?1:t[r],t=t.slice(0,r)}else m.length>10&&/[0-9](?:\s|\/)/.test(m)&&(t=m.match(/([0-9]+)/g).map(function(p){return parseFloat(p)}),l=m.match(/([a-z])/gi).join("").toLowerCase());else if(isNaN(m))if(w(m)){var u=s(m.r,m.red,m.R,null);u!==null?(l="rgb",t=[u,s(m.g,m.green,m.G),s(m.b,m.blue,m.B)]):(l="hsl",t=[s(m.h,m.hue,m.H),s(m.s,m.saturation,m.S),s(m.l,m.lightness,m.L,m.b,m.brightness)]),a=s(m.a,m.alpha,m.opacity,1),m.opacity!=null&&(a/=100)}else(Array.isArray(m)||e.g.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(m))&&(t=[m[0],m[1],m[2]],l="rgb",a=m.length===4?m[3]:1);else l="rgb",t=[m>>>16,(65280&m)>>>8,255&m];return{space:l,values:t,alpha:a}};var T={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},36652:function(D,E,e){var _=e(90736),w=e(80009),s=e(53435);D.exports=function(T){var m,f=_(T);return f.space?((m=Array(3))[0]=s(f.values[0],0,255),m[1]=s(f.values[1],0,255),m[2]=s(f.values[2],0,255),f.space[0]==="h"&&(m=w.rgb(m)),m.push(s(f.alpha,0,1)),m):[]}},80009:function(D,E,e){var _=e(6866);D.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(w){var s,T,m,f,l,t=w[0]/360,a=w[1]/100,r=w[2]/100;if(a===0)return[l=255*r,l,l];s=2*r-(T=r<.5?r*(1+a):r+a-r*a),f=[0,0,0];for(var n=0;n<3;n++)(m=t+.3333333333333333*-(n-1))<0?m++:m>1&&m--,l=6*m<1?s+6*(T-s)*m:2*m<1?T:3*m<2?s+(T-s)*(.6666666666666666-m)*6:s,f[n]=255*l;return f}},_.hsl=function(w){var s,T,m=w[0]/255,f=w[1]/255,l=w[2]/255,t=Math.min(m,f,l),a=Math.max(m,f,l),r=a-t;return a===t?s=0:m===a?s=(f-l)/r:f===a?s=2+(l-m)/r:l===a&&(s=4+(m-f)/r),(s=Math.min(60*s,360))<0&&(s+=360),T=(t+a)/2,[s,100*(a===t?0:T<=.5?r/(a+t):r/(2-a-t)),100*T]}},6866:function(D){D.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},24138:function(D){D.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(D,E,e){D.exports={parse:e(41004),stringify:e(53313)}},63625:function(D,E,e){var _=e(40402);D.exports={isSize:function(w){return/^[\d\.]/.test(w)||w.indexOf("/")!==-1||_.indexOf(w)!==-1}}},41004:function(D,E,e){var _=e(90448),w=e(38732),s=e(41901),T=e(15659),m=e(96209),f=e(83794),l=e(99011),t=e(63625).isSize;D.exports=r;var a=r.cache={};function r(o){if(typeof o!="string")throw new Error("Font argument must be a string.");if(a[o])return a[o];if(o==="")throw new Error("Cannot parse an empty string.");if(s.indexOf(o)!==-1)return a[o]={system:o};for(var i,u={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},p=l(o,/\s+/);i=p.shift();){if(w.indexOf(i)!==-1)return["style","variant","weight","stretch"].forEach(function(b){u[b]=i}),a[o]=u;if(m.indexOf(i)===-1)if(i!=="normal"&&i!=="small-caps")if(f.indexOf(i)===-1){if(T.indexOf(i)===-1){if(t(i)){var c=l(i,"/");if(u.size=c[0],c[1]!=null?u.lineHeight=n(c[1]):p[0]==="/"&&(p.shift(),u.lineHeight=n(p.shift())),!p.length)throw new Error("Missing required font-family.");return u.family=l(p.join(" "),/\s*,\s*/).map(_),a[o]=u}throw new Error("Unknown or unsupported font token: "+i)}u.weight=i}else u.stretch=i;else u.variant=i;else u.style=i}throw new Error("Missing required font-size.")}function n(o){var i=parseFloat(o);return i.toString()===o?i:o}},53313:function(D,E,e){var _=e(71299),w=e(63625).isSize,s=o(e(38732)),T=o(e(41901)),m=o(e(15659)),f=o(e(96209)),l=o(e(83794)),t={normal:1,"small-caps":1},a={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},r="serif";function n(i,u){if(i&&!u[i]&&!s[i])throw Error("Unknown keyword `"+i+"`");return i}function o(i){for(var u={},p=0;po?1:n>=o?0:NaN}e.d(E,{j2:function(){return _},Fp:function(){return T},J6:function(){return f},TS:function(){return l},VV:function(){return t},w6:function(){return a},Sm:function(){return r}}),(w=_).length===1&&(s=w,w=function(n,o){return _(s(n),o)});var w,s;function T(n,o){var i,u,p=n.length,c=-1;if(o==null){for(;++c=i)for(u=i;++cu&&(u=i)}else for(;++c=i)for(u=i;++cu&&(u=i);return u}function m(n){return n===null?NaN:+n}function f(n,o){var i,u=n.length,p=u,c=-1,b=0;if(o==null)for(;++c=0;)for(o=(u=n[p]).length;--o>=0;)i[--b]=u[o];return i}function t(n,o){var i,u,p=n.length,c=-1;if(o==null){for(;++c=i)for(u=i;++ci&&(u=i)}else for(;++c=i)for(u=i;++ci&&(u=i);return u}function a(n,o,i){n=+n,o=+o,i=(p=arguments.length)<2?(o=n,n=0,1):p<3?1:+i;for(var u=-1,p=0|Math.max(0,Math.ceil((o-n)/i)),c=new Array(p);++u=p.length)return o!=null&&v.sort(o),i!=null?i(v):v;for(var k,h,M,A=-1,C=v.length,L=p[x++],P=T(),I=g();++Ap.length)return v;var g,y=c[x-1];return i!=null&&x>=p.length?g=v.entries():(g=[],v.each(function(k,h){g.push({key:h,values:d(k,x)})})),y!=null?g.sort(function(k,h){return y(k.key,h.key)}):g}return u={object:function(v){return b(v,0,f,l)},map:function(v){return b(v,0,t,a)},entries:function(v){return d(b(v,0,t,a),0)},key:function(v){return p.push(v),u},sortKeys:function(v){return c[p.length-1]=v,u},sortValues:function(v){return o=v,u},rollup:function(v){return i=v,u}}}function f(){return{}}function l(o,i,u){o[i]=u}function t(){return T()}function a(o,i,u){o.set(i,u)}function r(){}var n=T.prototype;r.prototype={constructor:r,has:n.has,add:function(o){return this[_+(o+="")]=o,this},remove:n.remove,clear:n.clear,values:n.keys,size:n.size,empty:n.empty,each:n.each}},49887:function(D,E,e){function _(de,he){var ye;function ze(){var Te,Ae,Me=ye.length,Ce=0,ne=0;for(Te=0;Te=(Ae=(je+be)/2))?je=Ae:be=Ae,(me=ye>=(Me=(ge+Se)/2))?ge=Me:Se=Me,Te=Ue,!(Ue=Ue[we=me<<1|ue]))return Te[we]=De,de;if(Ce=+de._x.call(null,Ue.data),ne=+de._y.call(null,Ue.data),he===Ce&&ye===ne)return De.next=Ue,Te?Te[we]=De:de._root=De,de;do Te=Te?Te[we]=new Array(4):de._root=new Array(4),(ue=he>=(Ae=(je+be)/2))?je=Ae:be=Ae,(me=ye>=(Me=(ge+Se)/2))?ge=Me:Se=Me;while((we=me<<1|ue)==(Ee=(ne>=Me)<<1|Ce>=Ae));return Te[Ee]=Ue,Te[we]=De,de}function m(de,he,ye,ze,Te){this.node=de,this.x0=he,this.y0=ye,this.x1=ze,this.y1=Te}function f(de){return de[0]}function l(de){return de[1]}function t(de,he,ye){var ze=new a(he??f,ye??l,NaN,NaN,NaN,NaN);return de==null?ze:ze.addAll(de)}function a(de,he,ye,ze,Te,Ae){this._x=de,this._y=he,this._x0=ye,this._y0=ze,this._x1=Te,this._y1=Ae,this._root=void 0}function r(de){for(var he={data:de.data},ye=he;de=de.next;)ye=ye.next={data:de.data};return he}e.r(E),e.d(E,{forceCenter:function(){return _},forceCollide:function(){return u},forceLink:function(){return d},forceManyBody:function(){return se},forceRadial:function(){return ce},forceSimulation:function(){return oe},forceX:function(){return xe},forceY:function(){return pe}});var n=t.prototype=a.prototype;function o(de){return de.x+de.vx}function i(de){return de.y+de.vy}function u(de){var he,ye,ze=1,Te=1;function Ae(){for(var ne,ue,me,we,Ee,Ue,De,je=he.length,ge=0;gewe+yt||ZeEe+yt||stme.index){var Et=we-ot.x-ot.vx,Tt=Ee-ot.y-ot.vy,xt=Et*Et+Tt*Tt;xtne.r&&(ne.r=ne[ue].r)}function Ce(){if(he){var ne,ue,me=he.length;for(ye=new Array(me),ne=0;neme&&(me=ze),Tewe&&(we=Te));if(ne>me||ue>we)return this;for(this.cover(ne,ue).cover(me,we),ye=0;yede||de>=Te||ze>he||he>=Ae;)switch(Ce=(heEe||(Ae=ne.y0)>Ue||(Me=ne.x1)=be)<<1|de>=ge)&&(ne=De[De.length-1],De[De.length-1]=De[De.length-1-ue],De[De.length-1-ue]=ne)}else{var Se=de-+this._x.call(null,je.data),Ne=he-+this._y.call(null,je.data),Ye=Se*Se+Ne*Ne;if(Ye=(Ce=(De+ge)/2))?De=Ce:ge=Ce,(me=Me>=(ne=(je+be)/2))?je=ne:be=ne,he=Ue,!(Ue=Ue[we=me<<1|ue]))return this;if(!Ue.length)break;(he[we+1&3]||he[we+2&3]||he[we+3&3])&&(ye=he,Ee=we)}for(;Ue.data!==de;)if(ze=Ue,!(Ue=Ue.next))return this;return(Te=Ue.next)&&delete Ue.next,ze?(Te?ze.next=Te:delete ze.next,this):he?(Te?he[we]=Te:delete he[we],(Ue=he[0]||he[1]||he[2]||he[3])&&Ue===(he[3]||he[2]||he[1]||he[0])&&!Ue.length&&(ye?ye[Ee]=Ue:this._root=Ue),this):(this._root=Te,this)},n.removeAll=function(de){for(var he=0,ye=de.length;he=0&&(ze=ye.slice(Te+1),ye=ye.slice(0,Te)),ye&&!he.hasOwnProperty(ye))throw new Error("unknown type: "+ye);return{type:ye,name:ze}})}function k(de,he){for(var ye,ze=0,Te=de.length;ze0)for(var ye,ze,Te=new Array(ye),Ae=0;Ae=0&&he._call.call(null,de),he=he._next;--L})()}finally{L=0,function(){for(var de,he,ye=M,ze=1/0;ye;)ye._call?(ze>ye._time&&(ze=ye._time),de=ye,ye=ye._next):(he=ye._next,ye._next=null,ye=de?de._next=he:M=he);A=de,Y(ze)}(),U=0}}function X(){var de=G.now(),he=de-R;he>1e3&&(B-=he,R=de)}function Y(de){L||(P&&(P=clearTimeout(P)),de-U>24?(de<1/0&&(P=setTimeout(Q,de-G.now()-B)),I&&(I=clearInterval(I))):(I||(R=G.now(),I=setInterval(X,1e3)),L=1,N(Q)))}function K(de){return de.x}function te(de){return de.y}H.prototype=ee.prototype={constructor:H,restart:function(de,he,ye){if(typeof de!="function")throw new TypeError("callback is not a function");ye=(ye==null?j():+ye)+(he==null?0:+he),this._next||A===this||(A?A._next=this:M=this,A=this),this._call=de,this._time=ye,Y()},stop:function(){this._call&&(this._call=null,this._time=1/0,Y())}};var re=Math.PI*(3-Math.sqrt(5));function oe(de){var he,ye=1,ze=.001,Te=1-Math.pow(ze,1/300),Ae=0,Me=.6,Ce=(0,p.UI)(),ne=ee(me),ue=C("tick","end");function me(){we(),ue.call("tick",he),ye1?(je==null?Ce.remove(De):Ce.set(De,Ue(je)),he):Ce.get(De)},find:function(De,je,ge){var be,Se,Ne,Ye,Ze,st=0,ot=de.length;for(ge==null?ge=1/0:ge*=ge,st=0;st1?(ue.on(De,je),he):ue.on(De)}}}function se(){var de,he,ye,ze,Te=w(-30),Ae=1,Me=1/0,Ce=.81;function ne(Ee){var Ue,De=de.length,je=t(de,K,te).visitAfter(me);for(ye=Ee,Ue=0;Ue=Me)){(Ee.data!==he||Ee.next)&&(ge===0&&(Ne+=(ge=s())*ge),be===0&&(Ne+=(be=s())*be),Ne1?b[0]+b.slice(2):b,+u.slice(c+1)]}e.d(E,{WU:function(){return r},FF:function(){return i}});var w,s=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function T(u){if(!(p=s.exec(u)))throw new Error("invalid format: "+u);var p;return new m({fill:p[1],align:p[2],sign:p[3],symbol:p[4],zero:p[5],width:p[6],comma:p[7],precision:p[8]&&p[8].slice(1),trim:p[9],type:p[10]})}function m(u){this.fill=u.fill===void 0?" ":u.fill+"",this.align=u.align===void 0?">":u.align+"",this.sign=u.sign===void 0?"-":u.sign+"",this.symbol=u.symbol===void 0?"":u.symbol+"",this.zero=!!u.zero,this.width=u.width===void 0?void 0:+u.width,this.comma=!!u.comma,this.precision=u.precision===void 0?void 0:+u.precision,this.trim=!!u.trim,this.type=u.type===void 0?"":u.type+""}function f(u,p){var c=_(u,p);if(!c)return u+"";var b=c[0],d=c[1];return d<0?"0."+new Array(-d).join("0")+b:b.length>d+1?b.slice(0,d+1)+"."+b.slice(d+1):b+new Array(d-b.length+2).join("0")}T.prototype=m.prototype,m.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,0|this.width))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var l={"%":function(u,p){return(100*u).toFixed(p)},b:function(u){return Math.round(u).toString(2)},c:function(u){return u+""},d:function(u){return Math.abs(u=Math.round(u))>=1e21?u.toLocaleString("en").replace(/,/g,""):u.toString(10)},e:function(u,p){return u.toExponential(p)},f:function(u,p){return u.toFixed(p)},g:function(u,p){return u.toPrecision(p)},o:function(u){return Math.round(u).toString(8)},p:function(u,p){return f(100*u,p)},r:f,s:function(u,p){var c=_(u,p);if(!c)return u+"";var b=c[0],d=c[1],v=d-(w=3*Math.max(-8,Math.min(8,Math.floor(d/3))))+1,x=b.length;return v===x?b:v>x?b+new Array(v-x+1).join("0"):v>0?b.slice(0,v)+"."+b.slice(v):"0."+new Array(1-v).join("0")+_(u,Math.max(0,p+v-1))[0]},X:function(u){return Math.round(u).toString(16).toUpperCase()},x:function(u){return Math.round(u).toString(16)}};function t(u){return u}var a,r,n=Array.prototype.map,o=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function i(u){var p,c,b=u.grouping===void 0||u.thousands===void 0?t:(p=n.call(u.grouping,Number),c=u.thousands+"",function(A,C){for(var L=A.length,P=[],I=0,R=p[0],U=0;L>0&&R>0&&(U+R+1>C&&(R=Math.max(1,C-U)),P.push(A.substring(L-=R,L+R)),!((U+=R+1)>C));)R=p[I=(I+1)%p.length];return P.reverse().join(c)}),d=u.currency===void 0?"":u.currency[0]+"",v=u.currency===void 0?"":u.currency[1]+"",x=u.decimal===void 0?".":u.decimal+"",g=u.numerals===void 0?t:function(A){return function(C){return C.replace(/[0-9]/g,function(L){return A[+L]})}}(n.call(u.numerals,String)),y=u.percent===void 0?"%":u.percent+"",k=u.minus===void 0?"-":u.minus+"",h=u.nan===void 0?"NaN":u.nan+"";function M(A){var C=(A=T(A)).fill,L=A.align,P=A.sign,I=A.symbol,R=A.zero,U=A.width,B=A.comma,G=A.precision,N=A.trim,j=A.type;j==="n"?(B=!0,j="g"):l[j]||(G===void 0&&(G=12),N=!0,j="g"),(R||C==="0"&&L==="=")&&(R=!0,C="0",L="=");var V=I==="$"?d:I==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():"",H=I==="$"?v:/[%p]/.test(j)?y:"",ee=l[j],Q=/[defgprs%]/.test(j);function X(Y){var K,te,re,oe=V,se=H;if(j==="c")se=ee(Y)+se,Y="";else{var ce=(Y=+Y)<0||1/Y<0;if(Y=isNaN(Y)?h:ee(Math.abs(Y),G),N&&(Y=function(de){e:for(var he,ye=de.length,ze=1,Te=-1;ze0&&(Te=0)}return Te>0?de.slice(0,Te)+de.slice(he+1):de}(Y)),ce&&+Y==0&&P!=="+"&&(ce=!1),oe=(ce?P==="("?P:k:P==="-"||P==="("?"":P)+oe,se=(j==="s"?o[8+w/3]:"")+se+(ce&&P==="("?")":""),Q){for(K=-1,te=Y.length;++K(re=Y.charCodeAt(K))||re>57){se=(re===46?x+Y.slice(K+1):Y.slice(K))+se,Y=Y.slice(0,K);break}}}B&&!R&&(Y=b(Y,1/0));var xe=oe.length+Y.length+se.length,pe=xe>1)+oe+Y+se+pe.slice(xe);break;default:Y=pe+oe+Y+se}return g(Y)}return G=G===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,G)):Math.max(0,Math.min(20,G)),X.toString=function(){return A+""},X}return{format:M,formatPrefix:function(A,C){var L,P=M(((A=T(A)).type="f",A)),I=3*Math.max(-8,Math.min(8,Math.floor((L=C,((L=_(Math.abs(L)))?L[1]:NaN)/3)))),R=Math.pow(10,-I),U=o[8+I/3];return function(B){return P(R*B)+U}}}}a=i({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),r=a.format,a.formatPrefix},65704:function(D,E,e){e.r(E),e.d(E,{geoAiry:function(){return B},geoAiryRaw:function(){return U},geoAitoff:function(){return N},geoAitoffRaw:function(){return G},geoArmadillo:function(){return V},geoArmadilloRaw:function(){return j},geoAugust:function(){return ee},geoAugustRaw:function(){return H},geoBaker:function(){return K},geoBakerRaw:function(){return Y},geoBerghaus:function(){return oe},geoBerghausRaw:function(){return re},geoBertin1953:function(){return ze},geoBertin1953Raw:function(){return ye},geoBoggs:function(){return we},geoBoggsRaw:function(){return me},geoBonne:function(){return ge},geoBonneRaw:function(){return je},geoBottomley:function(){return Se},geoBottomleyRaw:function(){return be},geoBromley:function(){return Ye},geoBromleyRaw:function(){return Ne},geoChamberlin:function(){return Dt},geoChamberlinAfrica:function(){return xt},geoChamberlinRaw:function(){return Et},geoCollignon:function(){return Ft},geoCollignonRaw:function(){return It},geoCraig:function(){return Nt},geoCraigRaw:function(){return qt},geoCraster:function(){return Ge},geoCrasterRaw:function(){return Ke},geoCylindricalEqualArea:function(){return ht},geoCylindricalEqualAreaRaw:function(){return nt},geoCylindricalStereographic:function(){return Be},geoCylindricalStereographicRaw:function(){return Oe},geoEckert1:function(){return ut},geoEckert1Raw:function(){return Qe},geoEckert2:function(){return bt},geoEckert2Raw:function(){return pt},geoEckert3:function(){return Ct},geoEckert3Raw:function(){return Lt},geoEckert4:function(){return Ot},geoEckert4Raw:function(){return mt},geoEckert5:function(){return Pt},geoEckert5Raw:function(){return _t},geoEckert6:function(){return Wt},geoEckert6Raw:function(){return Bt},geoEisenlohr:function(){return Kt},geoEisenlohrRaw:function(){return Xt},geoFahey:function(){return ln},geoFaheyRaw:function(){return yn},geoFoucaut:function(){return Wn},geoFoucautRaw:function(){return kn},geoFoucautSinusoidal:function(){return on},geoFoucautSinusoidalRaw:function(){return wn},geoGilbert:function(){return Cn},geoGingery:function(){return or},geoGingeryRaw:function(){return Nn},geoGinzburg4:function(){return gr},geoGinzburg4Raw:function(){return Tr},geoGinzburg5:function(){return dr},geoGinzburg5Raw:function(){return ir},geoGinzburg6:function(){return $t},geoGinzburg6Raw:function(){return yr},geoGinzburg8:function(){return Ln},geoGinzburg8Raw:function(){return mn},geoGinzburg9:function(){return jn},geoGinzburg9Raw:function(){return En},geoGringorten:function(){return Qn},geoGringortenQuincuncial:function(){return Wl},geoGringortenRaw:function(){return Zn},geoGuyou:function(){return jt},geoGuyouRaw:function(){return Pn},geoHammer:function(){return pe},geoHammerRaw:function(){return ce},geoHammerRetroazimuthal:function(){return On},geoHammerRetroazimuthalRaw:function(){return un},geoHealpix:function(){return er},geoHealpixRaw:function(){return vn},geoHill:function(){return lr},geoHillRaw:function(){return Jn},geoHomolosine:function(){return Mr},geoHomolosineRaw:function(){return Sr},geoHufnagel:function(){return pr},geoHufnagelRaw:function(){return Lr},geoHyperelliptical:function(){return Ti},geoHyperellipticalRaw:function(){return ci},geoInterrupt:function(){return xi},geoInterruptedBoggs:function(){return Ka},geoInterruptedHomolosine:function(){return Xs},geoInterruptedMollweide:function(){return pu},geoInterruptedMollweideHemispheres:function(){return Qa},geoInterruptedQuarticAuthalic:function(){return Rs},geoInterruptedSinuMollweide:function(){return Qi},geoInterruptedSinusoidal:function(){return qa},geoKavrayskiy7:function(){return fs},geoKavrayskiy7Raw:function(){return eo},geoLagrange:function(){return hs},geoLagrangeRaw:function(){return fi},geoLarrivee:function(){return Ro},geoLarriveeRaw:function(){return bo},geoLaskowski:function(){return Vu},geoLaskowskiRaw:function(){return xl},geoLittrow:function(){return Hu},geoLittrowRaw:function(){return Xo},geoLoximuthal:function(){return Ec},geoLoximuthalRaw:function(){return qu},geoMiller:function(){return Gu},geoMillerRaw:function(){return gu},geoModifiedStereographic:function(){return Ps},geoModifiedStereographicAlaska:function(){return yu},geoModifiedStereographicGs48:function(){return Ls},geoModifiedStereographicGs50:function(){return Vl},geoModifiedStereographicLee:function(){return Ks},geoModifiedStereographicMiller:function(){return ps},geoModifiedStereographicRaw:function(){return vu},geoMollweide:function(){return Ce},geoMollweideRaw:function(){return Me},geoMtFlatPolarParabolic:function(){return Cc},geoMtFlatPolarParabolicRaw:function(){return ds},geoMtFlatPolarQuartic:function(){return bl},geoMtFlatPolarQuarticRaw:function(){return Hl},geoMtFlatPolarSinusoidal:function(){return Qs},geoMtFlatPolarSinusoidalRaw:function(){return Os},geoNaturalEarth:function(){return oo.Z},geoNaturalEarth2:function(){return _l},geoNaturalEarth2Raw:function(){return xu},geoNaturalEarthRaw:function(){return oo.K},geoNellHammer:function(){return wl},geoNellHammerRaw:function(){return el},geoNicolosi:function(){return Tl},geoNicolosiRaw:function(){return tl},geoPatterson:function(){return ql},geoPattersonRaw:function(){return gs},geoPeirceQuincuncial:function(){return Zl},geoPierceQuincuncial:function(){return Zl},geoPolyconic:function(){return _u},geoPolyconicRaw:function(){return Sl},geoPolyhedral:function(){return vs},geoPolyhedralButterfly:function(){return Gl},geoPolyhedralCollignon:function(){return Tu},geoPolyhedralWaterman:function(){return Bs},geoProject:function(){return js},geoQuantize:function(){return Sa},geoQuincuncial:function(){return Ga},geoRectangularPolyconic:function(){return Us},geoRectangularPolyconicRaw:function(){return Cr},geoRobinson:function(){return rl},geoRobinsonRaw:function(){return Yl},geoSatellite:function(){return al},geoSatelliteRaw:function(){return il},geoSinuMollweide:function(){return vr},geoSinuMollweideRaw:function(){return cr},geoSinusoidal:function(){return De},geoSinusoidalRaw:function(){return Ue},geoStitch:function(){return Hs},geoTimes:function(){return fo},geoTimesRaw:function(){return xa},geoTwoPointAzimuthal:function(){return ho},geoTwoPointAzimuthalRaw:function(){return Ll},geoTwoPointAzimuthalUsa:function(){return to},geoTwoPointEquidistant:function(){return di},geoTwoPointEquidistantRaw:function(){return Fo},geoTwoPointEquidistantUsa:function(){return za},geoVanDerGrinten:function(){return wo},geoVanDerGrinten2:function(){return Bo},geoVanDerGrinten2Raw:function(){return Da},geoVanDerGrinten3:function(){return rs},geoVanDerGrinten3Raw:function(){return bs},geoVanDerGrinten4:function(){return po},geoVanDerGrinten4Raw:function(){return ba},geoVanDerGrintenRaw:function(){return oa},geoWagner:function(){return Ur},geoWagner4:function(){return $l},geoWagner4Raw:function(){return _a},geoWagner6:function(){return ll},geoWagner6Raw:function(){return Fa},geoWagner7:function(){return sl},geoWagnerRaw:function(){return Fr},geoWiechel:function(){return _i},geoWiechelRaw:function(){return as},geoWinkel3:function(){return Jl},geoWinkel3Raw:function(){return Si}});var _=e(15002),w=Math.abs,s=Math.atan,T=Math.atan2,m=Math.cos,f=Math.exp,l=Math.floor,t=Math.log,a=Math.max,r=Math.min,n=Math.pow,o=Math.round,i=Math.sign||function(et){return et>0?1:et<0?-1:0},u=Math.sin,p=Math.tan,c=1e-6,b=1e-12,d=Math.PI,v=d/2,x=d/4,g=Math.SQRT1_2,y=P(2),k=P(d),h=2*d,M=180/d,A=d/180;function C(et){return et>1?v:et<-1?-v:Math.asin(et)}function L(et){return et>1?0:et<-1?d:Math.acos(et)}function P(et){return et>0?Math.sqrt(et):0}function I(et){return(f(et)-f(-et))/2}function R(et){return(f(et)+f(-et))/2}function U(et){var rt=p(et/2),ct=2*t(m(et/2))/(rt*rt);function vt(Mt,kt){var q=m(Mt),$=m(kt),W=u(kt),ae=$*q,_e=-((1-ae?t((1+ae)/2)/(1-ae):-.5)+ct/(1+ae));return[_e*$*u(Mt),_e*W]}return vt.invert=function(Mt,kt){var q,$=P(Mt*Mt+kt*kt),W=-et/2,ae=50;if(!$)return[0,0];do{var _e=W/2,Re=m(_e),He=u(_e),Xe=He/Re,at=-t(w(Re));W-=q=(2/Xe*at-ct*Xe-$)/(-at/(He*He)+1-ct/(2*Re*Re))*(Re<0?.7:1)}while(w(q)>c&&--ae>0);var wt=u(W);return[T(Mt*wt,$*m(W)),C(kt*wt/$)]},vt}function B(){var et=v,rt=(0,_.r)(U),ct=rt(et);return ct.radius=function(vt){return arguments.length?rt(et=vt*A):et*M},ct.scale(179.976).clipAngle(147)}function G(et,rt){var ct=m(rt),vt=function(Mt){return Mt?Mt/Math.sin(Mt):1}(L(ct*m(et/=2)));return[2*ct*u(et)*vt,u(rt)*vt]}function N(){return(0,_.Z)(G).scale(152.63)}function j(et){var rt=u(et),ct=m(et),vt=et>=0?1:-1,Mt=p(vt*et),kt=(1+rt-ct)/2;function q($,W){var ae=m(W),_e=m($/=2);return[(1+ae)*u($),(vt*W>-T(_e,Mt)-.001?0:10*-vt)+kt+u(W)*ct-(1+ae)*rt*_e]}return q.invert=function($,W){var ae=0,_e=0,Re=50;do{var He=m(ae),Xe=u(ae),at=m(_e),wt=u(_e),At=1+at,ie=At*Xe-$,ve=kt+wt*ct-At*rt*He-W,Le=At*He/2,Fe=-Xe*wt,Ve=rt*At*Xe/2,We=ct*at+rt*He*wt,$e=Fe*Ve-We*Le,tt=(ve*Fe-ie*We)/$e/2,lt=(ie*Ve-ve*Le)/$e;w(lt)>2&&(lt/=2),ae-=tt,_e-=lt}while((w(tt)>c||w(lt)>c)&&--Re>0);return vt*_e>-T(m(ae),Mt)-.001?[2*ae,_e]:null},q}function V(){var et=20*A,rt=et>=0?1:-1,ct=p(rt*et),vt=(0,_.r)(j),Mt=vt(et),kt=Mt.stream;return Mt.parallel=function(q){return arguments.length?(ct=p((rt=(et=q*A)>=0?1:-1)*et),vt(et)):et*M},Mt.stream=function(q){var $=Mt.rotate(),W=kt(q),ae=(Mt.rotate([0,0]),kt(q)),_e=Mt.precision();return Mt.rotate($),W.sphere=function(){ae.polygonStart(),ae.lineStart();for(var Re=-180*rt;rt*Re<180;Re+=90*rt)ae.point(Re,90*rt);if(et)for(;rt*(Re-=3*rt*_e)>=-180;)ae.point(Re,rt*-T(m(Re*A/2),ct)*M);ae.lineEnd(),ae.polygonEnd()},W},Mt.scale(218.695).center([0,28.0974])}function H(et,rt){var ct=p(rt/2),vt=P(1-ct*ct),Mt=1+vt*m(et/=2),kt=u(et)*vt/Mt,q=ct/Mt,$=kt*kt,W=q*q;return[1.3333333333333333*kt*(3+$-3*W),1.3333333333333333*q*(3+3*$-W)]}function ee(){return(0,_.Z)(H).scale(66.1603)}G.invert=function(et,rt){if(!(et*et+4*rt*rt>d*d+c)){var ct=et,vt=rt,Mt=25;do{var kt,q=u(ct),$=u(ct/2),W=m(ct/2),ae=u(vt),_e=m(vt),Re=u(2*vt),He=ae*ae,Xe=_e*_e,at=$*$,wt=1-Xe*W*W,At=wt?L(_e*W)*P(kt=1/wt):kt=0,ie=2*At*_e*$-et,ve=At*ae-rt,Le=kt*(Xe*at+At*_e*W*He),Fe=kt*(.5*q*Re-2*At*ae*$),Ve=.25*kt*(Re*$-At*ae*Xe*q),We=kt*(He*W+At*at*_e),$e=Fe*Ve-We*Le;if(!$e)break;var tt=(ve*Fe-ie*We)/$e,lt=(ie*Ve-ve*Le)/$e;ct-=tt,vt-=lt}while((w(tt)>c||w(lt)>c)&&--Mt>0);return[ct,vt]}},H.invert=function(et,rt){if(rt*=.375,!(et*=.375)&&w(rt)>1)return null;var ct=1+et*et+rt*rt,vt=P((ct-P(ct*ct-4*rt*rt))/2),Mt=C(vt)/3,kt=vt?function(ae){return t(ae+P(ae*ae-1))}(w(rt/vt))/3:function(ae){return t(ae+P(ae*ae+1))}(w(et))/3,q=m(Mt),$=R(kt),W=$*$-q*q;return[2*i(et)*T(I(kt)*q,.25-W),2*i(rt)*T($*u(Mt),.25+W)]};var Q=P(8),X=t(1+y);function Y(et,rt){var ct=w(rt);return ctb&&--kt>0);return[et/(m(Mt)*(Q-1/u(Mt))),i(rt)*Mt]};var te=e(17889);function re(et){var rt=2*d/et;function ct(vt,Mt){var kt=(0,te.N)(vt,Mt);if(w(vt)>v){var q=T(kt[1],kt[0]),$=P(kt[0]*kt[0]+kt[1]*kt[1]),W=rt*o((q-v)/rt)+v,ae=T(u(q-=W),2-m(q));q=W+C(d/$*u(ae))-ae,kt[0]=$*m(q),kt[1]=$*u(q)}return kt}return ct.invert=function(vt,Mt){var kt=P(vt*vt+Mt*Mt);if(kt>v){var q=T(Mt,vt),$=rt*o((q-v)/rt)+v,W=q>$?-1:1,ae=kt*m($-q),_e=1/p(W*L((ae-d)/P(d*(d-2*ae)+kt*kt)));q=$+2*s((_e+W*P(_e*_e-3))/3),vt=kt*m(q),Mt=kt*u(q)}return te.N.invert(vt,Mt)},ct}function oe(){var et=5,rt=(0,_.r)(re),ct=rt(et),vt=ct.stream,Mt=.01,kt=-m(Mt*A),q=u(Mt*A);return ct.lobes=function($){return arguments.length?rt(et=+$):et},ct.stream=function($){var W=ct.rotate(),ae=vt($),_e=(ct.rotate([0,0]),vt($));return ct.rotate(W),ae.sphere=function(){_e.polygonStart(),_e.lineStart();for(var Re=0,He=360/et,Xe=2*d/et,at=90-180/et,wt=v;Re0&&w(vt)>c);return q<0?NaN:ct}function he(et,rt,ct){return rt===void 0&&(rt=40),ct===void 0&&(ct=b),function(vt,Mt,kt,q){var $,W,ae;kt=kt===void 0?0:+kt,q=q===void 0?0:+q;for(var _e=0;_e$)kt-=W/=2,q-=ae/=2;else{$=at;var wt=(kt>0?-1:1)*ct,At=(q>0?-1:1)*ct,ie=et(kt+wt,q),ve=et(kt,q+At),Le=(ie[0]-Re[0])/wt,Fe=(ie[1]-Re[1])/wt,Ve=(ve[0]-Re[0])/At,We=(ve[1]-Re[1])/At,$e=We*Le-Fe*Ve,tt=(w($e)<.5?.5:1)/$e;if(kt+=W=(Xe*Ve-He*We)*tt,q+=ae=(He*Fe-Xe*Le)*tt,w(W)0&&(kt[1]*=1+q/1.5*kt[0]*kt[0]),kt}return rt.invert=he(rt),rt}function ze(){return(0,_.Z)(ye()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Te(et,rt){var ct,vt=et*u(rt),Mt=30;do rt-=ct=(rt+u(rt)-vt)/(1+m(rt));while(w(ct)>c&&--Mt>0);return rt/2}function Ae(et,rt,ct){function vt(Mt,kt){return[et*Mt*m(kt=Te(ct,kt)),rt*u(kt)]}return vt.invert=function(Mt,kt){return kt=C(kt/rt),[Mt/(et*m(kt)),C((2*kt+u(2*kt))/ct)]},vt}xe.invert=function(et,rt){var ct=2*C(rt/2);return[et*m(ct/2)/m(ct),ct]};var Me=Ae(y/v,y,d);function Ce(){return(0,_.Z)(Me).scale(169.529)}var ne=2.00276,ue=1.11072;function me(et,rt){var ct=Te(d,rt);return[ne*et/(1/m(rt)+ue/m(ct)),(rt+y*u(ct))/ne]}function we(){return(0,_.Z)(me).scale(160.857)}function Ee(et){var rt=0,ct=(0,_.r)(et),vt=ct(rt);return vt.parallel=function(Mt){return arguments.length?ct(rt=Mt*A):rt*M},vt}function Ue(et,rt){return[et*m(rt),rt]}function De(){return(0,_.Z)(Ue).scale(152.63)}function je(et){if(!et)return Ue;var rt=1/p(et);function ct(vt,Mt){var kt=rt+et-Mt,q=kt&&vt*m(Mt)/kt;return[kt*u(q),rt-kt*m(q)]}return ct.invert=function(vt,Mt){var kt=P(vt*vt+(Mt=rt-Mt)*Mt),q=rt+et-kt;return[kt/m(q)*T(vt,Mt),q]},ct}function ge(){return Ee(je).scale(123.082).center([0,26.1441]).parallel(45)}function be(et){function rt(ct,vt){var Mt=v-vt,kt=Mt&&ct*et*u(Mt)/Mt;return[Mt*u(kt)/et,v-Mt*m(kt)]}return rt.invert=function(ct,vt){var Mt=ct*et,kt=v-vt,q=P(Mt*Mt+kt*kt),$=T(Mt,kt);return[(q?q/u(q):1)*$/et,v-q]},rt}function Se(){var et=.5,rt=(0,_.r)(be),ct=rt(et);return ct.fraction=function(vt){return arguments.length?rt(et=+vt):et},ct.scale(158.837)}me.invert=function(et,rt){var ct,vt,Mt=ne*rt,kt=rt<0?-x:x,q=25;do vt=Mt-y*u(kt),kt-=ct=(u(2*kt)+2*kt-d*u(vt))/(2*m(2*kt)+2+d*m(vt)*y*m(kt));while(w(ct)>c&&--q>0);return vt=Mt-y*u(kt),[et*(1/m(vt)+ue/m(kt))/ne,vt]},Ue.invert=function(et,rt){return[et/m(rt),rt]};var Ne=Ae(1,4/d,d);function Ye(){return(0,_.Z)(Ne).scale(152.63)}var Ze=e(66624),st=e(49386);function ot(et,rt,ct,vt,Mt,kt){var q,$=m(kt);if(w(et)>1||w(kt)>1)q=L(ct*Mt+rt*vt*$);else{var W=u(et/2),ae=u(kt/2);q=2*C(P(W*W+rt*vt*ae*ae))}return w(q)>c?[q,T(vt*u(kt),rt*Mt-ct*vt*$)]:[0,0]}function ft(et,rt,ct){return L((et*et+rt*rt-ct*ct)/(2*et*rt))}function yt(et){return et-2*d*l((et+d)/(2*d))}function Et(et,rt,ct){for(var vt,Mt=[[et[0],et[1],u(et[1]),m(et[1])],[rt[0],rt[1],u(rt[1]),m(rt[1])],[ct[0],ct[1],u(ct[1]),m(ct[1])]],kt=Mt[2],q=0;q<3;++q,kt=vt)vt=Mt[q],kt.v=ot(vt[1]-kt[1],kt[3],kt[2],vt[3],vt[2],vt[0]-kt[0]),kt.point=[0,0];var $=ft(Mt[0].v[0],Mt[2].v[0],Mt[1].v[0]),W=ft(Mt[0].v[0],Mt[1].v[0],Mt[2].v[0]),ae=d-$;Mt[2].point[1]=0,Mt[0].point[0]=-(Mt[1].point[0]=Mt[0].v[0]/2);var _e=[Mt[2].point[0]=Mt[0].point[0]+Mt[2].v[0]*m($),2*(Mt[0].point[1]=Mt[1].point[1]=Mt[2].v[0]*u($))];return function(Re,He){var Xe,at=u(He),wt=m(He),At=new Array(3);for(Xe=0;Xe<3;++Xe){var ie=Mt[Xe];if(At[Xe]=ot(He-ie[1],ie[3],ie[2],wt,at,Re-ie[0]),!At[Xe][0])return ie.point;At[Xe][1]=yt(At[Xe][1]-ie.v[1])}var ve=_e.slice();for(Xe=0;Xe<3;++Xe){var Le=Xe==2?0:Xe+1,Fe=ft(Mt[Xe].v[0],At[Xe][0],At[Le][0]);At[Xe][1]<0&&(Fe=-Fe),Xe?Xe==1?(Fe=W-Fe,ve[0]-=At[Xe][0]*m(Fe),ve[1]-=At[Xe][0]*u(Fe)):(Fe=ae-Fe,ve[0]+=At[Xe][0]*m(Fe),ve[1]+=At[Xe][0]*u(Fe)):(ve[0]+=At[Xe][0]*m(Fe),ve[1]-=At[Xe][0]*u(Fe))}return ve[0]/=3,ve[1]/=3,ve}}function Tt(et){return et[0]*=A,et[1]*=A,et}function xt(){return Dt([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Dt(et,rt,ct){var vt=(0,Ze.Z)({type:"MultiPoint",coordinates:[et,rt,ct]}),Mt=[-vt[0],-vt[1]],kt=(0,st.Z)(Mt),q=Et(Tt(kt(et)),Tt(kt(rt)),Tt(kt(ct)));q.invert=he(q);var $=(0,_.Z)(q).rotate(Mt),W=$.center;return delete $.rotate,$.center=function(ae){return arguments.length?W(kt(ae)):kt.invert(W())},$.clipAngle(90)}function It(et,rt){var ct=P(1-u(rt));return[2/k*et*ct,k*(1-ct)]}function Ft(){return(0,_.Z)(It).scale(95.6464).center([0,30])}function qt(et){var rt=p(et);function ct(vt,Mt){return[vt,(vt?vt/u(vt):1)*(u(Mt)*m(vt)-rt*m(Mt))]}return ct.invert=rt?function(vt,Mt){vt&&(Mt*=u(vt)/vt);var kt=m(vt);return[vt,2*T(P(kt*kt+rt*rt-Mt*Mt)-kt,rt-Mt)]}:function(vt,Mt){return[vt,C(vt?Mt*p(vt)/vt:Mt)]},ct}function Nt(){return Ee(qt).scale(249.828).clipAngle(90)}It.invert=function(et,rt){var ct=(ct=rt/k-1)*ct;return[ct>0?et*P(d/ct)/2:0,C(1-ct)]};var Je=P(3);function Ke(et,rt){return[Je*et*(2*m(2*rt/3)-1)/k,Je*k*u(rt/3)]}function Ge(){return(0,_.Z)(Ke).scale(156.19)}function nt(et){var rt=m(et);function ct(vt,Mt){return[vt*rt,u(Mt)/rt]}return ct.invert=function(vt,Mt){return[vt/rt,C(Mt*rt)]},ct}function ht(){return Ee(nt).parallel(38.58).scale(195.044)}function Oe(et){var rt=m(et);function ct(vt,Mt){return[vt*rt,(1+rt)*p(Mt/2)]}return ct.invert=function(vt,Mt){return[vt/rt,2*s(Mt/(1+rt))]},ct}function Be(){return Ee(Oe).scale(124.75)}function Qe(et,rt){var ct=P(8/(3*d));return[ct*et*(1-w(rt)/d),ct*rt]}function ut(){return(0,_.Z)(Qe).scale(165.664)}function pt(et,rt){var ct=P(4-3*u(w(rt)));return[2/P(6*d)*et*ct,i(rt)*P(2*d/3)*(2-ct)]}function bt(){return(0,_.Z)(pt).scale(165.664)}function Lt(et,rt){var ct=P(d*(4+d));return[2/ct*et*(1+P(1-4*rt*rt/(d*d))),4/ct*rt]}function Ct(){return(0,_.Z)(Lt).scale(180.739)}function mt(et,rt){var ct=(2+v)*u(rt);rt/=2;for(var vt=0,Mt=1/0;vt<10&&w(Mt)>c;vt++){var kt=m(rt);rt-=Mt=(rt+u(rt)*(kt+2)-ct)/(2*kt*(1+kt))}return[2/P(d*(4+d))*et*(1+m(rt)),2*P(d/(4+d))*u(rt)]}function Ot(){return(0,_.Z)(mt).scale(180.739)}function _t(et,rt){return[et*(1+m(rt))/P(2+d),2*rt/P(2+d)]}function Pt(){return(0,_.Z)(_t).scale(173.044)}function Bt(et,rt){for(var ct=(1+v)*u(rt),vt=0,Mt=1/0;vt<10&&w(Mt)>c;vt++)rt-=Mt=(rt+u(rt)-ct)/(1+m(rt));return ct=P(2+d),[et*(1+m(rt))/ct,2*rt/ct]}function Wt(){return(0,_.Z)(Bt).scale(173.044)}Ke.invert=function(et,rt){var ct=3*C(rt/(Je*k));return[k*et/(Je*(2*m(2*ct/3)-1)),ct]},Qe.invert=function(et,rt){var ct=P(8/(3*d)),vt=rt/ct;return[et/(ct*(1-w(vt)/d)),vt]},pt.invert=function(et,rt){var ct=2-w(rt)/P(2*d/3);return[et*P(6*d)/(2*ct),i(rt)*C((4-ct*ct)/3)]},Lt.invert=function(et,rt){var ct=P(d*(4+d))/2;return[et*ct/(1+P(1-rt*rt*(4+d)/(4*d))),rt*ct/2]},mt.invert=function(et,rt){var ct=rt*P((4+d)/d)/2,vt=C(ct),Mt=m(vt);return[et/(2/P(d*(4+d))*(1+Mt)),C((vt+ct*(Mt+2))/(2+v))]},_t.invert=function(et,rt){var ct=P(2+d),vt=rt*ct/2;return[ct*et/(1+m(vt)),vt]},Bt.invert=function(et,rt){var ct=1+v,vt=P(ct/2);return[2*et*vt/(1+m(rt*=vt)),C((rt+u(rt))/ct)]};var Gt=3+2*y;function Xt(et,rt){var ct=u(et/=2),vt=m(et),Mt=P(m(rt)),kt=m(rt/=2),q=u(rt)/(kt+y*vt*Mt),$=P(2/(1+q*q)),W=P((y*kt+(vt+ct)*Mt)/(y*kt+(vt-ct)*Mt));return[Gt*($*(W-1/W)-2*t(W)),Gt*($*q*(W+1/W)-2*s(q))]}function Kt(){return(0,_.Z)(Xt).scale(62.5271)}Xt.invert=function(et,rt){if(!(ct=H.invert(et/1.2,1.065*rt)))return null;var ct,vt=ct[0],Mt=ct[1],kt=20;et/=Gt,rt/=Gt;do{var q=vt/2,$=Mt/2,W=u(q),ae=m(q),_e=u($),Re=m($),He=m(Mt),Xe=P(He),at=_e/(Re+y*ae*Xe),wt=at*at,At=P(2/(1+wt)),ie=(y*Re+(ae+W)*Xe)/(y*Re+(ae-W)*Xe),ve=P(ie),Le=ve-1/ve,Fe=ve+1/ve,Ve=At*Le-2*t(ve)-et,We=At*at*Fe-2*s(at)-rt,$e=_e&&g*Xe*W*wt/_e,tt=(y*ae*Re+Xe)/(2*(Re+y*ae*Xe)*(Re+y*ae*Xe)*Xe),lt=-.5*at*At*At*At,gt=lt*$e,zt=lt*tt,Ut=(Ut=2*Re+y*Xe*(ae-W))*Ut*ve,Vt=(y*ae*Re*Xe+He)/Ut,Qt=-y*W*_e/(Xe*Ut),gn=Le*gt-2*Vt/ve+At*(Vt+Vt/ie),en=Le*zt-2*Qt/ve+At*(Qt+Qt/ie),sn=at*Fe*gt-2*$e/(1+wt)+At*Fe*$e+At*at*(Vt-Vt/ie),rn=at*Fe*zt-2*tt/(1+wt)+At*Fe*tt+At*at*(Qt-Qt/ie),Mn=en*sn-rn*gn;if(!Mn)break;var xn=(We*en-Ve*rn)/Mn,an=(Ve*sn-We*gn)/Mn;vt-=xn,Mt=a(-v,r(v,Mt-an))}while((w(xn)>c||w(an)>c)&&--kt>0);return w(w(Mt)-v)vt){var Re=P(_e),He=T(ae,W),Xe=ct*o(He/ct),at=He-Xe,wt=et*m(at),At=(et*u(at)-at*u(wt))/(v-wt),ie=Hn(at,At),ve=(d-et)/qn(ie,wt,d);W=Re;var Le,Fe=50;do W-=Le=(et+qn(ie,wt,W)*ve-Re)/(ie(W)*ve);while(w(Le)>c&&--Fe>0);ae=at*u(W),Wvt){var W=P($),ae=T(q,kt),_e=ct*o(ae/ct),Re=ae-_e;kt=W*m(Re),q=W*u(Re);for(var He=kt-v,Xe=u(kt),at=q/Xe,wt=ktc||w(He)>c)&&--wt>0);return[Xe,at]},W}var Tr=tr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function gr(){return(0,_.Z)(Tr).scale(149.995)}var ir=tr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function dr(){return(0,_.Z)(ir).scale(153.93)}var yr=tr(5/6*d,-.62636,-.0344,0,1.3493,-.05524,0,.045);function $t(){return(0,_.Z)(yr).scale(130.945)}function mn(et,rt){var ct=et*et,vt=rt*rt;return[et*(1-.162388*vt)*(.87-952426e-9*ct*ct),rt*(1+vt/12)]}function Ln(){return(0,_.Z)(mn).scale(131.747)}mn.invert=function(et,rt){var ct,vt=et,Mt=rt,kt=50;do{var q=Mt*Mt;Mt-=ct=(Mt*(1+q/12)-rt)/(1+q/4)}while(w(ct)>c&&--kt>0);kt=50,et/=1-.162388*q;do{var $=($=vt*vt)*$;vt-=ct=(vt*(.87-952426e-9*$)-et)/(.87-.00476213*$)}while(w(ct)>c&&--kt>0);return[vt,Mt]};var En=tr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function jn(){return(0,_.Z)(En).scale(131.087)}function $n(et){var rt=et(v,0)[0]-et(-v,0)[0];function ct(vt,Mt){var kt=vt>0?-.5:.5,q=et(vt+kt*d,Mt);return q[0]-=kt*rt,q}return et.invert&&(ct.invert=function(vt,Mt){var kt=vt>0?-.5:.5,q=et.invert(vt+kt*rt,Mt),$=q[0]-kt*d;return $<-d?$+=2*d:$>d&&($-=2*d),q[0]=$,q}),ct}function Zn(et,rt){var ct=i(et),vt=i(rt),Mt=m(rt),kt=m(et)*Mt,q=u(et)*Mt,$=u(vt*rt);et=w(T(q,$)),rt=C(kt),w(et-v)>c&&(et%=v);var W=function(ae,_e){if(_e===v)return[0,0];var Re,He,Xe=u(_e),at=Xe*Xe,wt=at*at,At=1+wt,ie=1+3*wt,ve=1-wt,Le=C(1/P(At)),Fe=ve+at*At*Le,Ve=(1-Xe)/Fe,We=P(Ve),$e=Ve*At,tt=P($e),lt=We*ve;if(ae===0)return[0,-(lt+at*tt)];var gt,zt=m(_e),Ut=1/zt,Vt=2*Xe*zt,Qt=(-Fe*zt-(-3*at+Le*ie)*Vt*(1-Xe))/(Fe*Fe),gn=-Ut*Vt,en=-Ut*(at*At*Qt+Ve*ie*Vt),sn=-2*Ut*(ve*(.5*Qt/We)-2*at*We*Vt),rn=4*ae/d;if(ae>.222*d||_e.175*d){if(Re=(lt+at*P($e*(1+wt)-lt*lt))/(1+wt),ae>d/4)return[Re,Re];var Mn=Re,xn=.5*Re;Re=.5*(xn+Mn),He=50;do{var an=Re*(sn+gn*P($e-Re*Re))+en*C(Re/tt)-rn;if(!an)break;an<0?xn=Re:Mn=Re,Re=.5*(xn+Mn)}while(w(Mn-xn)>c&&--He>0)}else{Re=c,He=25;do{var zn=Re*Re,Un=P($e-zn),nr=sn+gn*Un,rr=Re*nr+en*C(Re/tt)-rn;Re-=gt=Un?rr/(nr+(en-gn*zn)/Un):0}while(w(gt)>c&&--He>0)}return[Re,-lt-at*P($e-Re*Re)]}(et>d/4?v-et:et,rt);return et>d/4&&($=W[0],W[0]=-W[1],W[1]=-$),W[0]*=ct,W[1]*=-vt,W}function Qn(){return(0,_.Z)($n(Zn)).scale(239.75)}function hr(et,rt){var ct,vt,Mt,kt,q,$;if(rt=.999999)return ct=(1-rt)/4,Mt=1/(vt=R(et)),[(kt=(($=f(2*($=et)))-1)/($+1))+ct*((q=vt*I(et))-et)/(vt*vt),Mt-ct*kt*Mt*(q-et),Mt+ct*kt*Mt*(q+et),2*s(f(et))-v+ct*(q-et)/vt];var W=[1,0,0,0,0,0,0,0,0],ae=[P(rt),0,0,0,0,0,0,0,0],_e=0;for(vt=P(1-rt),q=1;w(ae[_e]/W[_e])>c&&_e<8;)ct=W[_e++],ae[_e]=(ct-vt)/2,W[_e]=(ct+vt)/2,vt=P(ct*vt),q*=2;Mt=q*W[_e]*et;do Mt=(C(kt=ae[_e]*u(vt=Mt)/W[_e])+Mt)/2;while(--_e);return[u(Mt),kt=m(Mt),kt/m(Mt-vt),Mt]}function tn(et,rt){if(!rt)return et;if(rt===1)return t(p(et/2+x));for(var ct=1,vt=P(1-rt),Mt=P(rt),kt=0;w(Mt)>c;kt++){if(et%d){var q=s(vt*p(et)/ct);q<0&&(q+=d),et+=q+~~(et/d)*d}else et+=et;Mt=(ct+vt)/2,vt=P(ct*vt),Mt=((ct=Mt)-vt)/2}return et/(n(2,kt)*ct)}function Pn(et,rt){var ct=(y-1)/(y+1),vt=P(1-ct*ct),Mt=tn(v,vt*vt),kt=t(p(d/4+w(rt)/2)),q=f(-1*kt)/P(ct),$=function(ae,_e){var Re=ae*ae,He=_e+1,Xe=1-Re-_e*_e;return[.5*((ae>=0?v:-v)-T(Xe,2*ae)),-.25*t(Xe*Xe+4*Re)+.5*t(He*He+Re)]}(q*m(-1*et),q*u(-1*et)),W=function(ae,_e,Re){var He=w(ae),Xe=I(w(_e));if(He){var at=1/u(He),wt=1/(p(He)*p(He)),At=-(wt+Re*(Xe*Xe*at*at)-1+Re),ie=(-At+P(At*At-(Re-1)*wt*4))/2;return[tn(s(1/P(ie)),Re)*i(ae),tn(s(P((ie/wt-1)/Re)),1-Re)*i(_e)]}return[0,tn(s(Xe),1-Re)*i(_e)]}($[0],$[1],vt*vt);return[-W[1],(rt>=0?1:-1)*(.5*Mt-W[0])]}function jt(){return(0,_.Z)($n(Pn)).scale(151.496)}Zn.invert=function(et,rt){w(et)>1&&(et=2*i(et)-et),w(rt)>1&&(rt=2*i(rt)-rt);var ct=i(et),vt=i(rt),Mt=-ct*et,kt=-vt*rt,q=kt/Mt<1,$=function(Re,He){for(var Xe=0,at=1,wt=.5,At=50;;){var ie=wt*wt,ve=P(wt),Le=C(1/P(1+ie)),Fe=1-ie+wt*(1+ie)*Le,Ve=(1-ve)/Fe,We=P(Ve),$e=Ve*(1+ie),tt=We*(1-ie),lt=P($e-Re*Re),gt=He+tt+wt*lt;if(w(at-Xe)0?Xe=wt:at=wt,wt=.5*(Xe+at)}if(!At)return null;var zt=C(ve),Ut=m(zt),Vt=1/Ut,Qt=2*ve*Ut,gn=(-Fe*Ut-(-3*wt+Le*(1+3*ie))*Qt*(1-ve))/(Fe*Fe);return[d/4*(Re*(-2*Vt*(.5*gn/We*(1-ie)-2*wt*We*Qt)+-Vt*Qt*lt)+-Vt*(wt*(1+ie)*gn+Ve*(1+3*ie)*Qt)*C(Re/P($e))),zt]}(q?kt:Mt,q?Mt:kt),W=$[0],ae=$[1],_e=m(ae);return q&&(W=-v-W),[ct*(T(u(W)*_e,-u(ae))+d),vt*C(m(W)*_e)]},Pn.invert=function(et,rt){var ct,vt,Mt,kt,q,$,W=(y-1)/(y+1),ae=P(1-W*W),_e=(vt=-et,Mt=ae*ae,(ct=.5*tn(v,ae*ae)-rt)?(kt=hr(ct,Mt),vt?($=(q=hr(vt,1-Mt))[1]*q[1]+Mt*kt[0]*kt[0]*q[0]*q[0],[[kt[0]*q[2]/$,kt[1]*kt[2]*q[0]*q[1]/$],[kt[1]*q[1]/$,-kt[0]*kt[2]*q[0]*q[2]/$],[kt[2]*q[1]*q[2]/$,-Mt*kt[0]*kt[1]*q[0]/$]]):[[kt[0],0],[kt[1],0],[kt[2],0]]):[[0,(q=hr(vt,1-Mt))[0]/q[1]],[1/q[1],0],[q[2]/q[1],0]]),Re=function(He,Xe){var at=Xe[0]*Xe[0]+Xe[1]*Xe[1];return[(He[0]*Xe[0]+He[1]*Xe[1])/at,(He[1]*Xe[0]-He[0]*Xe[1])/at]}(_e[0],_e[1]);return[T(Re[1],Re[0])/-1,2*s(f(-.5*t(W*Re[0]*Re[0]+W*Re[1]*Re[1])))-v]};var Jt=e(7613);function un(et){var rt=u(et),ct=m(et),vt=Rn(et);function Mt(kt,q){var $=vt(kt,q);kt=$[0],q=$[1];var W=u(q),ae=m(q),_e=m(kt),Re=L(rt*W+ct*ae*_e),He=u(Re),Xe=w(He)>c?Re/He:1;return[Xe*ct*u(kt),(w(kt)>v?Xe:-Xe)*(rt*ae-ct*W*_e)]}return vt.invert=Rn(-et),Mt.invert=function(kt,q){var $=P(kt*kt+q*q),W=-u($),ae=m($),_e=$*ae,Re=-q*W,He=$*rt,Xe=P(_e*_e+Re*Re-He*He),at=T(_e*He+Re*Xe,Re*He-_e*Xe),wt=($>v?-1:1)*T(kt*W,$*m(at)*ae+q*u(at)*W);return vt.invert(wt,at)},Mt}function Rn(et){var rt=u(et),ct=m(et);return function(vt,Mt){var kt=m(Mt),q=m(vt)*kt,$=u(vt)*kt,W=u(Mt);return[T($,q*ct-W*rt),C(W*ct+q*rt)]}}function On(){var et=0,rt=(0,_.r)(un),ct=rt(et),vt=ct.rotate,Mt=ct.stream,kt=(0,Jt.Z)();return ct.parallel=function(q){if(!arguments.length)return et*M;var $=ct.rotate();return rt(et=q*A).rotate($)},ct.rotate=function(q){return arguments.length?(vt.call(ct,[q[0],q[1]-et*M]),kt.center([-q[0],-q[1]]),ct):((q=vt.call(ct))[1]+=et*M,q)},ct.stream=function(q){return(q=Mt(q)).sphere=function(){q.polygonStart();var $,W=kt.radius(89.99)().coordinates[0],ae=W.length-1,_e=-1;for(q.lineStart();++_e=0;)q.point(($=W[_e])[0],$[1]);q.lineEnd(),q.polygonEnd()},q},ct.scale(79.4187).parallel(45).clipAngle(179.999)}var Sn=e(33064),pn=e(72736),bn=C(1-1/3)*M,dn=nt(0);function vn(et){var rt=bn*A,ct=It(d,rt)[0]-It(-d,rt)[0],vt=dn(0,rt)[1],Mt=It(0,rt)[1],kt=k-Mt,q=h/et,$=4/h,W=vt+kt*kt*4/h;function ae(_e,Re){var He,Xe=w(Re);if(Xe>rt){var at=r(et-1,a(0,l((_e+d)/q)));(He=It(_e+=d*(et-1)/et-at*q,Xe))[0]=He[0]*h/ct-h*(et-1)/(2*et)+at*h/et,He[1]=vt+4*(He[1]-Mt)*kt/h,Re<0&&(He[1]=-He[1])}else He=dn(_e,Re);return He[0]*=$,He[1]/=W,He}return ae.invert=function(_e,Re){_e/=$;var He=w(Re*=W);if(He>vt){var Xe=r(et-1,a(0,l((_e+d)/q)));_e=(_e+d*(et-1)/et-Xe*q)*ct/h;var at=It.invert(_e,.25*(He-vt)*h/kt+Mt);return at[0]-=d*(et-1)/et-Xe*q,Re<0&&(at[1]=-at[1]),at}return dn.invert(_e,Re)},ae}function An(et,rt){return[et,1&rt?89.999999:bn]}function Bn(et,rt){return[et,1&rt?-89.999999:-bn]}function Xn(et){return[.999999*et[0],et[1]]}function er(){var et=4,rt=(0,_.r)(vn),ct=rt(et),vt=ct.stream;return ct.lobes=function(Mt){return arguments.length?rt(et=+Mt):et},ct.stream=function(Mt){var kt=ct.rotate(),q=vt(Mt),$=(ct.rotate([0,0]),vt(Mt));return ct.rotate(kt),q.sphere=function(){var W,ae;(0,pn.Z)((W=180/et,ae=[].concat((0,Sn.w6)(-180,180+W/2,W).map(An),(0,Sn.w6)(180,-180-W/2,-W).map(Bn)),{type:"Polygon",coordinates:[W===180?ae.map(Xn):ae]}),$)},q},ct.scale(239.75)}function Jn(et){var rt,ct=1+et,vt=C(u(1/ct)),Mt=2*P(d/(rt=d+4*vt*ct)),kt=.5*Mt*(ct+P(et*(2+et))),q=et*et,$=ct*ct;function W(ae,_e){var Re,He,Xe=1-u(_e);if(Xe&&Xe<2){var at,wt=v-_e,At=25;do{var ie=u(wt),ve=m(wt),Le=vt+T(ie,ct-ve),Fe=1+$-2*ct*ve;wt-=at=(wt-q*vt-ct*ie+Fe*Le-.5*Xe*rt)/(2*ct*ie*Le)}while(w(at)>b&&--At>0);Re=Mt*P(Fe),He=ae*Le/d}else Re=Mt*(et+Xe),He=ae*vt/d;return[Re*u(He),kt-Re*m(He)]}return W.invert=function(ae,_e){var Re=ae*ae+(_e-=kt)*_e,He=(1+$-Re/(Mt*Mt))/(2*ct),Xe=L(He),at=u(Xe),wt=vt+T(at,ct-He);return[C(ae/P(Re))*d/wt,C(1-2*(Xe-q*vt-ct*at+(1+$-2*ct*He)*wt)/rt)]},W}function lr(){var et=1,rt=(0,_.r)(Jn),ct=rt(et);return ct.ratio=function(vt){return arguments.length?rt(et=+vt):et},ct.scale(167.774).center([0,18.67])}var sr=.7109889596207567,fr=.0528035274542;function cr(et,rt){return rt>-sr?((et=Me(et,rt))[1]+=fr,et):Ue(et,rt)}function vr(){return(0,_.Z)(cr).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Sr(et,rt){return w(rt)>sr?((et=Me(et,rt))[1]-=rt>0?fr:-fr,et):Ue(et,rt)}function Mr(){return(0,_.Z)(Sr).scale(152.63)}function Lr(et,rt,ct,vt){var Mt=P(4*d/(2*ct+(1+et-rt/2)*u(2*ct)+(et+rt)/2*u(4*ct)+rt/2*u(6*ct))),kt=P(vt*u(ct)*P((1+et*m(2*ct)+rt*m(4*ct))/(1+et+rt))),q=ct*W(1);function $(Re){return P(1+et*m(2*Re)+rt*m(4*Re))}function W(Re){var He=Re*ct;return(2*He+(1+et-rt/2)*u(2*He)+(et+rt)/2*u(4*He)+rt/2*u(6*He))/ct}function ae(Re){return $(Re)*u(Re)}var _e=function(Re,He){var Xe=ct*de(W,q*u(He)/ct,He/d);isNaN(Xe)&&(Xe=ct*i(He));var at=Mt*$(Xe);return[at*kt*Re/d*m(Xe),at/kt*u(Xe)]};return _e.invert=function(Re,He){var Xe=de(ae,He*kt/Mt);return[Re*d/(m(Xe)*Mt*kt*$(Xe)),C(ct*W(Xe/ct)/q)]},ct===0&&(Mt=P(vt/d),(_e=function(Re,He){return[Re*Mt,u(He)/Mt]}).invert=function(Re,He){return[Re/Mt,C(He*Mt)]}),_e}function pr(){var et=1,rt=0,ct=45*A,vt=2,Mt=(0,_.r)(Lr),kt=Mt(et,rt,ct,vt);return kt.a=function(q){return arguments.length?Mt(et=+q,rt,ct,vt):et},kt.b=function(q){return arguments.length?Mt(et,rt=+q,ct,vt):rt},kt.psiMax=function(q){return arguments.length?Mt(et,rt,ct=+q*A,vt):ct*M},kt.ratio=function(q){return arguments.length?Mt(et,rt,ct,vt=+q):vt},kt.scale(180.739)}function Pr(et,rt,ct,vt,Mt,kt,q,$,W,ae,_e){if(_e.nanEncountered)return NaN;var Re,He,Xe,at,wt,At,ie,ve,Le,Fe;if(He=et(rt+.25*(Re=ct-rt)),Xe=et(ct-.25*Re),isNaN(He))_e.nanEncountered=!0;else{if(!isNaN(Xe))return Fe=((At=(at=Re*(vt+4*He+Mt)/12)+(wt=Re*(Mt+4*Xe+kt)/12))-q)/15,ae>W?(_e.maxDepthCount++,At+Fe):Math.abs(Fe)<$?At+Fe:(ve=Pr(et,rt,ie=rt+.5*Re,vt,He,Mt,at,.5*$,W,ae+1,_e),isNaN(ve)?(_e.nanEncountered=!0,NaN):(Le=Pr(et,ie,ct,Mt,Xe,kt,wt,.5*$,W,ae+1,_e),isNaN(Le)?(_e.nanEncountered=!0,NaN):ve+Le));_e.nanEncountered=!0}}function Hr(et,rt,ct,vt,Mt){vt===void 0&&(vt=1e-8),Mt===void 0&&(Mt=20);var kt=et(rt),q=et(.5*(rt+ct)),$=et(ct);return Pr(et,rt,ct,kt,q,$,(kt+4*q+$)*(ct-rt)/6,vt,Mt,1,{maxDepthCount:0,nanEncountered:!1})}function ci(et,rt,ct){function vt(Xe){return et+(1-et)*n(1-n(Xe,rt),1/rt)}function Mt(Xe){return Hr(vt,0,Xe,1e-4)}for(var kt=1/Mt(1),q=1e3,$=1.00000001*kt,W=[],ae=0;ae<=q;ae++)W.push(Mt(ae/q)*$);function _e(Xe){var at=0,wt=q,At=500;do W[At]>Xe?wt=At:at=At,At=at+wt>>1;while(At>at);var ie=W[At+1]-W[At];return ie&&(ie=(Xe-W[At+1])/ie),(At+1+ie)/q}var Re=2*_e(1)/d*kt/ct,He=function(Xe,at){var wt=_e(w(u(at))),At=vt(wt)*Xe;return wt/=Re,[At,at>=0?wt:-wt]};return He.invert=function(Xe,at){var wt;return w(at*=Re)<1&&(wt=i(at)*C(Mt(w(at))*kt)),[Xe/vt(w(at)),wt]},He}function Ti(){var et=0,rt=2.5,ct=1.183136,vt=(0,_.r)(ci),Mt=vt(et,rt,ct);return Mt.alpha=function(kt){return arguments.length?vt(et=+kt,rt,ct):et},Mt.k=function(kt){return arguments.length?vt(et,rt=+kt,ct):rt},Mt.gamma=function(kt){return arguments.length?vt(et,rt,ct=+kt):ct},Mt.scale(152.63)}function Mi(et,rt){return w(et[0]-rt[0])=0;--$)ct=(rt=et[1][$])[0][0],vt=rt[0][1],Mt=rt[1][1],kt=rt[2][0],q=rt[2][1],W.push(fa([[kt-c,q-c],[kt-c,Mt+c],[ct+c,Mt+c],[ct+c,vt-c]],30));return{type:"Polygon",coordinates:[(0,Sn.TS)(W)]}}function xi(et,rt,ct){var vt,Mt;function kt(W,ae){for(var _e=ae<0?-1:1,Re=rt[+(ae<0)],He=0,Xe=Re.length-1;HeRe[He][2][0];++He);var at=et(W-Re[He][1][0],ae);return at[0]+=et(Re[He][1][0],_e*ae>_e*Re[He][0][1]?Re[He][0][1]:ae)[0],at}ct?kt.invert=ct(kt):et.invert&&(kt.invert=function(W,ae){for(var _e=Mt[+(ae<0)],Re=rt[+(ae<0)],He=0,Xe=_e.length;Hewt&&(Re=at,at=wt,wt=Re),[[He,at],[Xe,wt]]})}),q):rt.map(function(ae){return ae.map(function(_e){return[[_e[0][0]*M,_e[0][1]*M],[_e[1][0]*M,_e[1][1]*M],[_e[2][0]*M,_e[2][1]*M]]})})},rt!=null&&q.lobes(rt),q}cr.invert=function(et,rt){return rt>-sr?Me.invert(et,rt-fr):Ue.invert(et,rt)},Sr.invert=function(et,rt){return w(rt)>sr?Me.invert(et,rt+(rt>0?fr:-fr)):Ue.invert(et,rt)};var Oa=[[[[-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 Ka(){return xi(me,Oa).scale(160.857)}var Yo=[[[[-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 Xs(){return xi(Sr,Yo).scale(152.63)}var Uu=[[[[-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 xi(Me,Uu).scale(169.529)}var $s=[[[[-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 Qa(){return xi(Me,$s).scale(169.529).rotate([20,0])}var du=[[[[-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 Qi(){return xi(cr,du,he).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var yl=[[[[-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 qa(){return xi(Ue,yl).scale(152.63).rotate([-20,0])}function eo(et,rt){return[3/h*et*P(d*d/3-rt*rt),rt]}function fs(){return(0,_.Z)(eo).scale(158.837)}function fi(et){function rt(ct,vt){if(w(w(vt)-v)2)return null;var kt=(ct/=2)*ct,q=(vt/=2)*vt,$=2*vt/(1+kt+q);return $=n((1+$)/(1-$),1/et),[T(2*ct,1-kt-q)/et,C(($-1)/($+1))]},rt}function hs(){var et=.5,rt=(0,_.r)(fi),ct=rt(et);return ct.spacing=function(vt){return arguments.length?rt(et=+vt):et},ct.scale(124.75)}eo.invert=function(et,rt){return[h/3*et/P(d*d/3-rt*rt),rt]};var ao=d/y;function bo(et,rt){return[et*(1+P(m(rt)))/2,rt/(m(rt/2)*m(et/6))]}function Ro(){return(0,_.Z)(bo).scale(97.2672)}function xl(et,rt){var ct=et*et,vt=rt*rt;return[et*(.975534+vt*(-.0143059*ct-.119161+-.0547009*vt)),rt*(1.00384+ct*(.0802894+-.02855*vt+199025e-9*ct)+vt*(.0998909+-.0491032*vt))]}function Vu(){return(0,_.Z)(xl).scale(139.98)}function Xo(et,rt){return[u(et)/m(rt),p(rt)*m(et)]}function Hu(){return(0,_.Z)(Xo).scale(144.049).clipAngle(89.999)}function qu(et){var rt=m(et),ct=p(x+et/2);function vt(Mt,kt){var q=kt-et,$=w(q)=0;)He=(Re=et[_e])[0]+W*(kt=He)-ae*Xe,Xe=Re[1]+W*Xe+ae*kt;return[He=W*(kt=He)-ae*Xe,Xe=W*Xe+ae*kt]}return ct.invert=function(vt,Mt){var kt=20,q=vt,$=Mt;do{for(var W,ae=rt,_e=et[ae],Re=_e[0],He=_e[1],Xe=0,at=0;--ae>=0;)Xe=Re+q*(W=Xe)-$*at,at=He+q*at+$*W,Re=(_e=et[ae])[0]+q*(W=Re)-$*He,He=_e[1]+q*He+$*W;var wt,At,ie=(Xe=Re+q*(W=Xe)-$*at)*Xe+(at=He+q*at+$*W)*at;q-=wt=((Re=q*(W=Re)-$*He-vt)*Xe+(He=q*He+$*W-Mt)*at)/ie,$-=At=(He*Xe-Re*at)/ie}while(w(wt)+w(At)>1e-12&&--kt>0);if(kt){var ve=P(q*q+$*$),Le=2*s(.5*ve),Fe=u(Le);return[T(q*Fe,ve*m(Le)),ve?C($*Fe/ve):0]}},ct}bo.invert=function(et,rt){var ct=w(et),vt=w(rt),Mt=c,kt=v;vtc||w(At)>c)&&--Mt>0);return Mt&&[ct,vt]},Xo.invert=function(et,rt){var ct=et*et,vt=rt*rt+1,Mt=ct+vt,kt=et?g*P((Mt-P(Mt*Mt-4*ct))/ct):1/P(vt);return[C(et*kt),i(rt)*L(kt)]},gu.invert=function(et,rt){return[et,2.5*s(f(.8*rt))-.625*d]};var $o=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Jo=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Js=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Ko=[[.9245,0],[0,0],[.01943,0]],mu=[[.721316,0],[0,0],[-.00881625,-.00617325]];function yu(){return Ps($o,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Ls(){return Ps(Jo,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Vl(){return Ps(Js,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function ps(){return Ps(Ko,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Ks(){return Ps(mu,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Ps(et,rt){var ct=(0,_.Z)(vu(et)).rotate(rt).clipAngle(90),vt=(0,st.Z)(rt),Mt=ct.center;return delete ct.rotate,ct.center=function(kt){return arguments.length?Mt(vt(kt)):vt.invert(Mt())},ct}var Qo=P(6),hi=P(7);function ds(et,rt){var ct=C(7*u(rt)/(3*Qo));return[Qo*et*(2*m(2*ct/3)-1)/hi,9*u(ct/3)/hi]}function Cc(){return(0,_.Z)(ds).scale(164.859)}function Hl(et,rt){for(var ct,vt=(1+g)*u(rt),Mt=rt,kt=0;kt<25&&(Mt-=ct=(u(Mt/2)+u(Mt)-vt)/(.5*m(Mt/2)+m(Mt)),!(w(ct)b&&--$>0);return[et/(.84719-.13063*(vt=q*q)+(kt=vt*(Mt=vt*vt))*kt*(.05494*vt-.04515-.02326*Mt+.00331*kt)),q]},el.invert=function(et,rt){for(var ct=rt/2,vt=0,Mt=1/0;vt<10&&w(Mt)>c;++vt){var kt=m(rt/2);rt-=Mt=(rt-p(rt/2)-ct)/(1-.5/(kt*kt))}return[2*et/(1+m(rt)),rt]};var Is=[[[[-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 Rs(){return xi(ce(1/0),Is).rotate([20,0]).scale(152.63)}function tl(et,rt){var ct=u(rt),vt=m(rt),Mt=i(et);if(et===0||w(rt)===v)return[0,rt];if(rt===0)return[et,0];if(w(et)===v)return[et*vt,v*ct];var kt=d/(2*et)-2*et/d,q=2*rt/d,$=(1-q*q)/(ct-q),W=kt*kt,ae=$*$,_e=1+W/ae,Re=1+ae/W,He=(kt*ct/$-kt/2)/_e,Xe=(ae*ct/W+$/2)/Re,at=Xe*Xe-(ae*ct*ct/W+$*ct-1)/Re;return[v*(He+P(He*He+vt*vt/_e)*Mt),v*(Xe+P(at<0?0:at)*i(-rt*kt)*Mt)]}function Tl(){return(0,_.Z)(tl).scale(127.267)}tl.invert=function(et,rt){var ct=(et/=v)*et,vt=ct+(rt/=v)*rt,Mt=d*d;return[et?(vt-1+P((1-vt)*(1-vt)+4*ct))/(2*et)*v:0,de(function(kt){return vt*(d*u(kt)-2*kt)*d+4*kt*kt*(rt-u(kt))+2*d*kt-Mt*rt},0)]};var kl=1.0148,so=.23185,Al=-.14499,Ml=.02406,bu=1.790857183;function gs(et,rt){var ct=rt*rt;return[et,rt*(kl+ct*ct*(so+ct*(Al+Ml*ct)))]}function ql(){return(0,_.Z)(gs).scale(139.319)}function Sl(et,rt){if(w(rt)bu?rt=bu:rt<-1.790857183&&(rt=-1.790857183);var ct,vt=rt;do{var Mt=vt*vt;vt-=ct=(vt*(kl+Mt*Mt*(so+Mt*(Al+Ml*Mt)))-rt)/(1.0148+Mt*Mt*(1.1592500000000001+Mt*(.21654*Mt-1.01493)))}while(w(ct)>c);return[et,vt]},Sl.invert=function(et,rt){if(w(rt)c&&--kt>0);return q=p(Mt),[(w(rt)=0;)if(tt=We[Ut],$e[0]===tt[0]&&$e[1]===tt[1]){if(gt)return[gt,$e];gt=$e}}}(W.face,ae.face),Re=(wt=_e.map(ae.project),At=_e.map(W.project),ie=Ds(wt[1],wt[0]),ve=Ds(At[1],At[0]),Le=function(Ve,We){return T(Ve[0]*We[1]-Ve[1]*We[0],Ve[0]*We[0]+Ve[1]*We[1])}(ie,ve),Fe=bi(ie)/bi(ve),zs([1,0,wt[0][0],0,1,wt[0][1]],zs([Fe,0,0,0,Fe,0],zs([m(Le),u(Le),0,-u(Le),m(Le),0],[1,0,-At[0][0],0,1,-At[0][1]]))));W.transform=ae.transform?zs(ae.transform,Re):Re;for(var He=ae.edges,Xe=0,at=He.length;Xe0?[-vt[0],0]:[180-vt[0],180])};var rt=zo.map(function(ct){return{face:ct,project:et(ct)}});return[-1,0,0,1,0,1,4,5].forEach(function(ct,vt){var Mt=rt[ct];Mt&&(Mt.children||(Mt.children=[])).push(rt[vt])}),vs(rt[0],function(ct,vt){return rt[ct<-d/2?vt<0?6:4:ct<0?vt<0?2:0:ctW^ve>W&&$<(ie-at)*(W-wt)/(ve-wt)+at&&(ae=!ae)}return ae}(Mt[0],vt))return Mt.push(ct),!0})||et.push([ct])}),Ia=[],et.length?et.length>1?{type:"MultiPolygon",coordinates:et}:{type:"Polygon",coordinates:et[0]}:null}};function Ga(et){var rt=et(v,0)[0]-et(-v,0)[0];function ct(vt,Mt){var kt=w(vt)0?vt-d:vt+d,Mt),$=(q[0]-q[1])*g,W=(q[0]+q[1])*g;if(kt)return[$,W];var ae=rt*g,_e=$>0^W>0?-1:1;return[_e*$-i(W)*ae,_e*W-i($)*ae]}return et.invert&&(ct.invert=function(vt,Mt){var kt=(vt+Mt)*g,q=(Mt-vt)*g,$=w(kt)<.5*rt&&w(q)<.5*rt;if(!$){var W=rt*g,ae=kt>0^q>0?-1:1,_e=-ae*vt+(q>0?1:-1)*W,Re=-ae*Mt+(kt>0?1:-1)*W;kt=(-_e-Re)*g,q=(_e-Re)*g}var He=et.invert(kt,q);return $||(He[0]+=kt>0?d:-d),He}),(0,_.Z)(ct).rotate([-90,-90,45]).clipAngle(179.999)}function Wl(){return Ga(Zn).scale(176.423)}function Zl(){return Ga(Pn).scale(111.48)}function Sa(et,rt){if(!(0<=(rt=+rt)&&rt<=20))throw new Error("invalid digits");function ct(ae){var _e=ae.length,Re=2,He=new Array(_e);for(He[0]=+ae[0].toFixed(rt),He[1]=+ae[1].toFixed(rt);Re<_e;)He[Re]=ae[Re],++Re;return He}function vt(ae){return ae.map(ct)}function Mt(ae){for(var _e=ct(ae[0]),Re=[_e],He=1;He2||Xe[0]!=_e[0]||Xe[1]!=_e[1])&&(Re.push(Xe),_e=Xe)}return Re.length===1&&ae.length>1&&Re.push(ct(ae[ae.length-1])),Re}function kt(ae){return ae.map(Mt)}function q(ae){if(ae==null)return ae;var _e;switch(ae.type){case"GeometryCollection":_e={type:"GeometryCollection",geometries:ae.geometries.map(q)};break;case"Point":_e={type:"Point",coordinates:ct(ae.coordinates)};break;case"MultiPoint":_e={type:ae.type,coordinates:vt(ae.coordinates)};break;case"LineString":_e={type:ae.type,coordinates:Mt(ae.coordinates)};break;case"MultiLineString":case"Polygon":_e={type:ae.type,coordinates:kt(ae.coordinates)};break;case"MultiPolygon":_e={type:"MultiPolygon",coordinates:ae.coordinates.map(kt)};break;default:return ae}return ae.bbox!=null&&(_e.bbox=ae.bbox),_e}function $(ae){var _e={type:"Feature",properties:ae.properties,geometry:q(ae.geometry)};return ae.id!=null&&(_e.id=ae.id),ae.bbox!=null&&(_e.bbox=ae.bbox),_e}if(et!=null)switch(et.type){case"Feature":return $(et);case"FeatureCollection":var W={type:"FeatureCollection",features:et.features.map($)};return et.bbox!=null&&(W.bbox=et.bbox),W;default:return q(et)}return et}function Cr(et){var rt=u(et);function ct(vt,Mt){var kt=rt?p(vt*rt/2)/rt:vt/2;if(!Mt)return[2*kt,-et];var q=2*s(kt*u(Mt)),$=1/p(Mt);return[u(q)*$,Mt+(1-m(q))*$-et]}return ct.invert=function(vt,Mt){if(w(Mt+=et)c&&--W>0);var He=vt*(ae=p($)),Xe=p(w(Mt)0?v:-v)*(ae+kt*(Re-$)/2+kt*kt*(Re-2*ae+$)/2)]}function rl(){return(0,_.Z)(Yl).scale(152.63)}function il(et,rt){var ct=function(q){function $(W,ae){var _e=m(ae),Re=(q-1)/(q-_e*m(W));return[Re*_e*u(W),Re*u(ae)]}return $.invert=function(W,ae){var _e=W*W+ae*ae,Re=P(_e),He=(q-P(1-_e*(q+1)/(q-1)))/((q-1)/Re+Re/(q-1));return[T(W*He,Re*P(1-He*He)),Re?C(ae*He/Re):0]},$}(et);if(!rt)return ct;var vt=m(rt),Mt=u(rt);function kt(q,$){var W=ct(q,$),ae=W[1],_e=ae*Mt/(et-1)+vt;return[W[0]*vt/_e,ae/_e]}return kt.invert=function(q,$){var W=(et-1)/(et-1-$*Mt);return ct.invert(W*q,W*$*vt)},kt}function al(){var et=2,rt=0,ct=(0,_.r)(il),vt=ct(et,rt);return vt.distance=function(Mt){return arguments.length?ct(et=+Mt,rt):et},vt.tilt=function(Mt){return arguments.length?ct(et,rt=Mt*A):rt*M},vt.scale(432.147).clipAngle(L(1/et)*M-1e-6)}Ra.forEach(function(et){et[1]*=1.0144}),Yl.invert=function(et,rt){var ct=rt/v,vt=90*ct,Mt=r(18,w(vt/5)),kt=a(0,l(Mt));do{var q=Ra[kt][1],$=Ra[kt+1][1],W=Ra[r(19,kt+2)][1],ae=W-q,_e=W-2*$+q,Re=2*(w(ct)-$)/ae,He=_e/ae,Xe=Re*(1-He*Re*(1-2*He*Re));if(Xe>=0||kt===1){vt=(rt>=0?5:-5)*(Xe+Mt);var at,wt=50;do Xe=(Mt=r(18,w(vt)/5))-(kt=l(Mt)),q=Ra[kt][1],$=Ra[kt+1][1],W=Ra[r(19,kt+2)][1],vt-=(at=(rt>=0?v:-v)*($+Xe*(W-q)/2+Xe*Xe*(W-2*$+q)/2)-rt)*M;while(w(at)>b&&--wt>0);break}}while(--kt>=0);var At=Ra[kt][0],ie=Ra[kt+1][0],ve=Ra[r(19,kt+2)][0];return[et/(ie+Xe*(ve-At)/2+Xe*Xe*(ve-2*ie+At)/2),vt*A]};var Or=-179.9999,ol=179.9999,uo=-89.9999,Xl=89.9999;function Cl(et){return et.length>0}function ya(et){return et===-90||et===90?[0,et]:[-180,(rt=et,Math.floor(1e4*rt)/1e4)];var rt}function Vs(et){var rt=et[0],ct=et[1],vt=!1;return rt<=Or?(rt=-180,vt=!0):rt>=ol&&(rt=180,vt=!0),ct<=uo?(ct=-90,vt=!0):ct>=Xl&&(ct=90,vt=!0),vt?[rt,ct]:et}function ns(et){return et.map(Vs)}function Wa(et,rt,ct){for(var vt=0,Mt=et.length;vt=ol||_e<=uo||_e>=Xl){kt[q]=Vs(W);for(var Re=q+1;Re<$;++Re){var He=kt[Re],Xe=He[0],at=He[1];if(Xe>Or&&Xeuo&&at=$)break;ct.push({index:-1,polygon:rt,ring:kt=kt.slice(Re-1)}),kt[0]=ya(kt[0][1]),q=-1,$=kt.length}}}}function xs(et){var rt,ct,vt,Mt,kt,q,$=et.length,W={},ae={};for(rt=0;rt<$;++rt)vt=(ct=et[rt]).ring[0],kt=ct.ring[ct.ring.length-1],vt[0]!==kt[0]||vt[1]!==kt[1]?(ct.index=rt,W[vt]=ae[kt]=ct):(ct.polygon.push(ct.ring),et[rt]=null);for(rt=0;rt<$;++rt)if(ct=et[rt]){if(vt=ct.ring[0],kt=ct.ring[ct.ring.length-1],Mt=ae[vt],q=W[kt],delete W[vt],delete ae[kt],vt[0]===kt[0]&&vt[1]===kt[1]){ct.polygon.push(ct.ring);continue}Mt?(delete ae[vt],delete W[Mt.ring[0]],Mt.ring.pop(),et[Mt.index]=null,ct={index:-1,polygon:Mt.polygon,ring:Mt.ring.concat(ct.ring)},Mt===q?ct.polygon.push(ct.ring):(ct.index=$++,et.push(W[ct.ring[0]]=ae[ct.ring[ct.ring.length-1]]=ct))):q?(delete W[kt],delete ae[q.ring[q.ring.length-1]],ct.ring.pop(),ct={index:$++,polygon:q.polygon,ring:ct.ring.concat(q.ring)},et[q.index]=null,et.push(W[ct.ring[0]]=ae[ct.ring[ct.ring.length-1]]=ct)):(ct.ring.push(ct.ring[0]),ct.polygon.push(ct.ring))}}function _o(et){var rt={type:"Feature",geometry:co(et.geometry)};return et.id!=null&&(rt.id=et.id),et.bbox!=null&&(rt.bbox=et.bbox),et.properties!=null&&(rt.properties=et.properties),rt}function co(et){if(et==null)return et;var rt,ct,vt,Mt;switch(et.type){case"GeometryCollection":rt={type:"GeometryCollection",geometries:et.geometries.map(co)};break;case"Point":rt={type:"Point",coordinates:Vs(et.coordinates)};break;case"MultiPoint":case"LineString":rt={type:et.type,coordinates:ns(et.coordinates)};break;case"MultiLineString":rt={type:"MultiLineString",coordinates:et.coordinates.map(ns)};break;case"Polygon":var kt=[];Wa(et.coordinates,kt,ct=[]),xs(ct),rt={type:"Polygon",coordinates:kt};break;case"MultiPolygon":ct=[],vt=-1,Mt=et.coordinates.length;for(var q=new Array(Mt);++vt0?d-$:$)*M],ae=(0,_.Z)(et(q)).rotate(W),_e=(0,st.Z)(W),Re=ae.center;return delete ae.rotate,ae.center=function(He){return arguments.length?Re(_e(He)):_e.invert(Re())},ae.clipAngle(90)}function Ll(et){var rt=m(et);function ct(vt,Mt){var kt=(0,li.M)(vt,Mt);return kt[0]*=rt,kt}return ct.invert=function(vt,Mt){return li.M.invert(vt/rt,Mt)},ct}function to(){return ho([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function ho(et,rt){return vi(Ll,et,rt)}function Fo(et){if(!(et*=2))return te.N;var rt=-et/2,ct=-rt,vt=et*et,Mt=p(ct),kt=.5/u(ct);function q($,W){var ae=L(m(W)*m($-rt)),_e=L(m(W)*m($-ct));return[((ae*=ae)-(_e*=_e))/(2*et),(W<0?-1:1)*P(4*vt*_e-(vt-ae+_e)*(vt-ae+_e))/(2*et)]}return q.invert=function($,W){var ae,_e,Re=W*W,He=m(P(Re+(ae=$+rt)*ae)),Xe=m(P(Re+(ae=$+ct)*ae));return[T(_e=He-Xe,ae=(He+Xe)*Mt),(W<0?-1:1)*L(P(ae*ae+_e*_e)*kt)]},q}function za(){return di([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function di(et,rt){return vi(Fo,et,rt)}function oa(et,rt){if(w(rt)c&&--$>0);return[i(et)*(P(Mt*Mt+4)+Mt)*d/4,v*q]};var is=4*d+3*P(3),To=2*P(2*d*P(3)/is),_a=Ae(To*P(3)/d,To,is/6);function $l(){return(0,_.Z)(_a).scale(176.84)}function Fa(et,rt){return[et*P(1-3*rt*rt/(d*d)),rt]}function ll(){return(0,_.Z)(Fa).scale(152.63)}function as(et,rt){var ct=m(rt),vt=m(et)*ct,Mt=1-vt,kt=m(et=T(u(et)*ct,-u(rt))),q=u(et);return[q*(ct=P(1-vt*vt))-kt*Mt,-kt*ct-q*Mt]}function _i(){return(0,_.Z)(as).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}function Si(et,rt){var ct=G(et,rt);return[(ct[0]+et/v)/2,(ct[1]+rt)/2]}function Jl(){return(0,_.Z)(Si).scale(158.837)}Fa.invert=function(et,rt){return[et/P(1-3*rt*rt/(d*d)),rt]},as.invert=function(et,rt){var ct=(et*et+rt*rt)/-2,vt=P(-ct*(2+ct)),Mt=rt*ct+et*vt,kt=et*ct-rt*vt,q=P(kt*kt+Mt*Mt);return[T(vt*Mt,q*(1+ct)),q?-C(vt*kt/q):0]},Si.invert=function(et,rt){var ct=et,vt=rt,Mt=25;do{var kt,q=m(vt),$=u(vt),W=u(2*vt),ae=$*$,_e=q*q,Re=u(ct),He=m(ct/2),Xe=u(ct/2),at=Xe*Xe,wt=1-_e*He*He,At=wt?L(q*He)*P(kt=1/wt):kt=0,ie=.5*(2*At*q*Xe+ct/v)-et,ve=.5*(At*$+vt)-rt,Le=.5*kt*(_e*at+At*q*He*ae)+.5/v,Fe=kt*(Re*W/4-At*$*Xe),Ve=.125*kt*(W*Xe-At*$*_e*Re),We=.5*kt*(ae*He+At*at*q)+.5,$e=Fe*Ve-We*Le,tt=(ve*Fe-ie*We)/$e,lt=(ie*Ve-ve*Le)/$e;ct-=tt,vt-=lt}while((w(tt)>c||w(lt)>c)&&--Mt>0);return[ct,vt]}},33940:function(D,E,e){function _(){return new w}function w(){this.reset()}e.d(E,{Z:function(){return _}}),w.prototype={constructor:w,reset:function(){this.s=this.t=0},add:function(m){T(s,m,this.t),T(this,s.s,this.s),this.s?this.t+=s.t:this.s=s.t},valueOf:function(){return this.s}};var s=new w;function T(m,f,l){var t=m.s=f+l,a=t-f,r=t-a;m.t=f-r+(l-a)}},97860:function(D,E,e){e.d(E,{L9:function(){return r},ZP:function(){return b},gL:function(){return o}});var _,w,s,T,m,f=e(33940),l=e(39695),t=e(73182),a=e(72736),r=(0,f.Z)(),n=(0,f.Z)(),o={point:t.Z,lineStart:t.Z,lineEnd:t.Z,polygonStart:function(){r.reset(),o.lineStart=i,o.lineEnd=u},polygonEnd:function(){var d=+r;n.add(d<0?l.BZ+d:d),this.lineStart=this.lineEnd=this.point=t.Z},sphere:function(){n.add(l.BZ)}};function i(){o.point=p}function u(){c(_,w)}function p(d,v){o.point=c,_=d,w=v,d*=l.uR,v*=l.uR,s=d,T=(0,l.mC)(v=v/2+l.pu),m=(0,l.O$)(v)}function c(d,v){d*=l.uR,v=(v*=l.uR)/2+l.pu;var x=d-s,g=x>=0?1:-1,y=g*x,k=(0,l.mC)(v),h=(0,l.O$)(v),M=m*h,A=T*k+M*(0,l.mC)(y),C=M*g*(0,l.O$)(y);r.add((0,l.fv)(C,A)),s=d,T=k,m=h}function b(d){return n.reset(),(0,a.Z)(d,o),2*n}},77338:function(D,E,e){e.d(E,{Z:function(){return L}});var _,w,s,T,m,f,l,t,a,r,n=e(33940),o=e(97860),i=e(7620),u=e(39695),p=e(72736),c=(0,n.Z)(),b={point:d,lineStart:x,lineEnd:g,polygonStart:function(){b.point=y,b.lineStart=k,b.lineEnd=h,c.reset(),o.gL.polygonStart()},polygonEnd:function(){o.gL.polygonEnd(),b.point=d,b.lineStart=x,b.lineEnd=g,o.L9<0?(_=-(s=180),w=-(T=90)):c>u.Ho?T=90:c<-u.Ho&&(w=-90),r[0]=_,r[1]=s},sphere:function(){_=-(s=180),w=-(T=90)}};function d(P,I){a.push(r=[_=P,s=P]),IT&&(T=I)}function v(P,I){var R=(0,i.Og)([P*u.uR,I*u.uR]);if(t){var U=(0,i.T5)(t,R),B=[U[1],-U[0],0],G=(0,i.T5)(B,U);(0,i.iJ)(G),G=(0,i.Y1)(G);var N,j=P-m,V=j>0?1:-1,H=G[0]*u.RW*V,ee=(0,u.Wn)(j)>180;ee^(V*mT&&(T=N):ee^(V*m<(H=(H+360)%360-180)&&HT&&(T=I)),ee?PM(_,s)&&(s=P):M(P,s)>M(_,s)&&(_=P):s>=_?(P<_&&(_=P),P>s&&(s=P)):P>m?M(_,P)>M(_,s)&&(s=P):M(P,s)>M(_,s)&&(_=P)}else a.push(r=[_=P,s=P]);IT&&(T=I),t=R,m=P}function x(){b.point=v}function g(){r[0]=_,r[1]=s,b.point=d,t=null}function y(P,I){if(t){var R=P-m;c.add((0,u.Wn)(R)>180?R+(R>0?360:-360):R)}else f=P,l=I;o.gL.point(P,I),v(P,I)}function k(){o.gL.lineStart()}function h(){y(f,l),o.gL.lineEnd(),(0,u.Wn)(c)>u.Ho&&(_=-(s=180)),r[0]=_,r[1]=s,t=null}function M(P,I){return(I-=P)<0?I+360:I}function A(P,I){return P[0]-I[0]}function C(P,I){return P[0]<=P[1]?P[0]<=I&&I<=P[1]:IM(U[0],U[1])&&(U[1]=B[1]),M(B[0],U[1])>M(U[0],U[1])&&(U[0]=B[0])):G.push(U=B);for(N=-1/0,I=0,U=G[R=G.length-1];I<=R;U=B,++I)B=G[I],(j=M(U[1],B[0]))>N&&(N=j,_=B[0],s=U[1])}return a=r=null,_===1/0||w===1/0?[[NaN,NaN],[NaN,NaN]]:[[_,w],[s,T]]}},7620:function(D,E,e){e.d(E,{Og:function(){return s},T:function(){return l},T5:function(){return m},Y1:function(){return w},iJ:function(){return t},j9:function(){return T},s0:function(){return f}});var _=e(39695);function w(a){return[(0,_.fv)(a[1],a[0]),(0,_.ZR)(a[2])]}function s(a){var r=a[0],n=a[1],o=(0,_.mC)(n);return[o*(0,_.mC)(r),o*(0,_.O$)(r),(0,_.O$)(n)]}function T(a,r){return a[0]*r[0]+a[1]*r[1]+a[2]*r[2]}function m(a,r){return[a[1]*r[2]-a[2]*r[1],a[2]*r[0]-a[0]*r[2],a[0]*r[1]-a[1]*r[0]]}function f(a,r){a[0]+=r[0],a[1]+=r[1],a[2]+=r[2]}function l(a,r){return[a[0]*r,a[1]*r,a[2]*r]}function t(a){var r=(0,_._b)(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]);a[0]/=r,a[1]/=r,a[2]/=r}},66624:function(D,E,e){e.d(E,{Z:function(){return R}});var _,w,s,T,m,f,l,t,a,r,n,o,i,u,p,c,b=e(39695),d=e(73182),v=e(72736),x={sphere:d.Z,point:g,lineStart:k,lineEnd:A,polygonStart:function(){x.lineStart=C,x.lineEnd=L},polygonEnd:function(){x.lineStart=k,x.lineEnd=A}};function g(U,B){U*=b.uR,B*=b.uR;var G=(0,b.mC)(B);y(G*(0,b.mC)(U),G*(0,b.O$)(U),(0,b.O$)(B))}function y(U,B,G){++_,s+=(U-s)/_,T+=(B-T)/_,m+=(G-m)/_}function k(){x.point=h}function h(U,B){U*=b.uR,B*=b.uR;var G=(0,b.mC)(B);u=G*(0,b.mC)(U),p=G*(0,b.O$)(U),c=(0,b.O$)(B),x.point=M,y(u,p,c)}function M(U,B){U*=b.uR,B*=b.uR;var G=(0,b.mC)(B),N=G*(0,b.mC)(U),j=G*(0,b.O$)(U),V=(0,b.O$)(B),H=(0,b.fv)((0,b._b)((H=p*V-c*j)*H+(H=c*N-u*V)*H+(H=u*j-p*N)*H),u*N+p*j+c*V);w+=H,f+=H*(u+(u=N)),l+=H*(p+(p=j)),t+=H*(c+(c=V)),y(u,p,c)}function A(){x.point=g}function C(){x.point=P}function L(){I(o,i),x.point=g}function P(U,B){o=U,i=B,U*=b.uR,B*=b.uR,x.point=I;var G=(0,b.mC)(B);u=G*(0,b.mC)(U),p=G*(0,b.O$)(U),c=(0,b.O$)(B),y(u,p,c)}function I(U,B){U*=b.uR,B*=b.uR;var G=(0,b.mC)(B),N=G*(0,b.mC)(U),j=G*(0,b.O$)(U),V=(0,b.O$)(B),H=p*V-c*j,ee=c*N-u*V,Q=u*j-p*N,X=(0,b._b)(H*H+ee*ee+Q*Q),Y=(0,b.ZR)(X),K=X&&-Y/X;a+=K*H,r+=K*ee,n+=K*Q,w+=Y,f+=Y*(u+(u=N)),l+=Y*(p+(p=j)),t+=Y*(c+(c=V)),y(u,p,c)}function R(U){_=w=s=T=m=f=l=t=a=r=n=0,(0,v.Z)(U,x);var B=a,G=r,N=n,j=B*B+G*G+N*N;return j0?oi)&&(o+=n*s.BZ));for(var b,d=o;n>0?d>i:d0?w.pi:-w.pi,n=(0,w.Wn)(t-m);(0,w.Wn)(n-w.pi)0?w.ou:-w.ou),s.point(l,f),s.lineEnd(),s.lineStart(),s.point(r,f),s.point(t,f),T=0):l!==r&&n>=w.pi&&((0,w.Wn)(m-l)w.Ho?(0,w.z4)(((0,w.O$)(i)*(b=(0,w.mC)(p))*(0,w.O$)(u)-(0,w.O$)(p)*(c=(0,w.mC)(i))*(0,w.O$)(o))/(c*b*d)):(i+p)/2}(m,f,t,a),s.point(l,f),s.lineEnd(),s.lineStart(),s.point(r,f),T=0),s.point(m=t,f=a),l=r},lineEnd:function(){s.lineEnd(),m=f=NaN},clean:function(){return 2-T}}},function(s,T,m,f){var l;if(s==null)l=m*w.ou,f.point(-w.pi,l),f.point(0,l),f.point(w.pi,l),f.point(w.pi,0),f.point(w.pi,-l),f.point(0,-l),f.point(-w.pi,-l),f.point(-w.pi,0),f.point(-w.pi,l);else if((0,w.Wn)(s[0]-T[0])>w.Ho){var t=s[0]1&&T.push(T.pop().concat(T.shift()))},result:function(){var m=T;return T=[],s=null,m}}}},1457:function(D,E,e){e.d(E,{Z:function(){return f}});var _=e(7620),w=e(7613),s=e(39695),T=e(67108),m=e(97023);function f(l){var t=(0,s.mC)(l),a=6*s.uR,r=t>0,n=(0,s.Wn)(t)>s.Ho;function o(p,c){return(0,s.mC)(p)*(0,s.mC)(c)>t}function i(p,c,b){var d=(0,_.Og)(p),v=(0,_.Og)(c),x=[1,0,0],g=(0,_.T5)(d,v),y=(0,_.j9)(g,g),k=g[0],h=y-k*k;if(!h)return!b&&p;var M=t*y/h,A=-t*k/h,C=(0,_.T5)(x,g),L=(0,_.T)(x,M),P=(0,_.T)(g,A);(0,_.s0)(L,P);var I=C,R=(0,_.j9)(L,I),U=(0,_.j9)(I,I),B=R*R-U*((0,_.j9)(L,L)-1);if(!(B<0)){var G=(0,s._b)(B),N=(0,_.T)(I,(-R-G)/U);if((0,_.s0)(N,L),N=(0,_.Y1)(N),!b)return N;var j,V=p[0],H=c[0],ee=p[1],Q=c[1];H0^N[1]<((0,s.Wn)(N[0]-V)s.pi^(V<=N[0]&&N[0]<=H)){var K=(0,_.T)(I,(-R+G)/U);return(0,_.s0)(K,L),[N,(0,_.Y1)(K)]}}}function u(p,c){var b=r?l:s.pi-l,d=0;return p<-b?d|=1:p>b&&(d|=2),c<-b?d|=4:c>b&&(d|=8),d}return(0,m.Z)(o,function(p){var c,b,d,v,x;return{lineStart:function(){v=d=!1,x=1},point:function(g,y){var k,h=[g,y],M=o(g,y),A=r?M?0:u(g,y):M?u(g+(g<0?s.pi:-s.pi),y):0;if(!c&&(v=d=M)&&p.lineStart(),M!==d&&(!(k=i(c,h))||(0,T.Z)(c,k)||(0,T.Z)(h,k))&&(h[2]=1),M!==d)x=0,M?(p.lineStart(),k=i(h,c),p.point(k[0],k[1])):(k=i(c,h),p.point(k[0],k[1],2),p.lineEnd()),c=k;else if(n&&c&&r^M){var C;A&b||!(C=i(h,c,!0))||(x=0,r?(p.lineStart(),p.point(C[0][0],C[0][1]),p.point(C[1][0],C[1][1]),p.lineEnd()):(p.point(C[1][0],C[1][1]),p.lineEnd(),p.lineStart(),p.point(C[0][0],C[0][1],3)))}!M||c&&(0,T.Z)(c,h)||p.point(h[0],h[1]),c=h,d=M,b=A},lineEnd:function(){d&&p.lineEnd(),c=null},clean:function(){return x|(v&&d)<<1}}},function(p,c,b,d){(0,w.m)(d,l,a,b,p,c)},r?[0,-l]:[-s.pi,l-s.pi])}},97023:function(D,E,e){e.d(E,{Z:function(){return f}});var _=e(85272),w=e(46225),s=e(39695),T=e(23071),m=e(33064);function f(a,r,n,o){return function(i){var u,p,c,b=r(i),d=(0,_.Z)(),v=r(d),x=!1,g={point:y,lineStart:h,lineEnd:M,polygonStart:function(){g.point=A,g.lineStart=C,g.lineEnd=L,p=[],u=[]},polygonEnd:function(){g.point=y,g.lineStart=h,g.lineEnd=M,p=(0,m.TS)(p);var P=(0,T.Z)(u,o);p.length?(x||(i.polygonStart(),x=!0),(0,w.Z)(p,t,P,n,i)):P&&(x||(i.polygonStart(),x=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),x&&(i.polygonEnd(),x=!1),p=u=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function y(P,I){a(P,I)&&i.point(P,I)}function k(P,I){b.point(P,I)}function h(){g.point=k,b.lineStart()}function M(){g.point=y,b.lineEnd()}function A(P,I){c.push([P,I]),v.point(P,I)}function C(){v.lineStart(),c=[]}function L(){A(c[0][0],c[0][1]),v.lineEnd();var P,I,R,U,B=v.clean(),G=d.result(),N=G.length;if(c.pop(),u.push(c),c=null,N)if(1&B){if((I=(R=G[0]).length-1)>0){for(x||(i.polygonStart(),x=!0),i.lineStart(),P=0;P1&&2&B&&G.push(G.pop().concat(G.shift())),p.push(G.filter(l))}return g}}function l(a){return a.length>1}function t(a,r){return((a=a.x)[0]<0?a[1]-s.ou-s.Ho:s.ou-a[1])-((r=r.x)[0]<0?r[1]-s.ou-s.Ho:s.ou-r[1])}},87605:function(D,E,e){e.d(E,{Z:function(){return l}});var _=e(39695),w=e(85272),s=e(46225),T=e(33064),m=1e9,f=-m;function l(t,a,r,n){function o(b,d){return t<=b&&b<=r&&a<=d&&d<=n}function i(b,d,v,x){var g=0,y=0;if(b==null||(g=u(b,v))!==(y=u(d,v))||c(b,d)<0^v>0)do x.point(g===0||g===3?t:r,g>1?n:a);while((g=(g+v+4)%4)!==y);else x.point(d[0],d[1])}function u(b,d){return(0,_.Wn)(b[0]-t)<_.Ho?d>0?0:3:(0,_.Wn)(b[0]-r)<_.Ho?d>0?2:1:(0,_.Wn)(b[1]-a)<_.Ho?d>0?1:0:d>0?3:2}function p(b,d){return c(b.x,d.x)}function c(b,d){var v=u(b,1),x=u(d,1);return v!==x?v-x:v===0?d[1]-b[1]:v===1?b[0]-d[0]:v===2?b[1]-d[1]:d[0]-b[0]}return function(b){var d,v,x,g,y,k,h,M,A,C,L,P=b,I=(0,w.Z)(),R={point:U,lineStart:function(){R.point=B,v&&v.push(x=[]),C=!0,A=!1,h=M=NaN},lineEnd:function(){d&&(B(g,y),k&&A&&I.rejoin(),d.push(I.result())),R.point=U,A&&P.lineEnd()},polygonStart:function(){P=I,d=[],v=[],L=!0},polygonEnd:function(){var G=function(){for(var V=0,H=0,ee=v.length;Hn&&(oe-Q)*(n-X)>(se-X)*(t-Q)&&++V:se<=n&&(oe-Q)*(n-X)<(se-X)*(t-Q)&&--V;return V}(),N=L&&G,j=(d=(0,T.TS)(d)).length;(N||j)&&(b.polygonStart(),N&&(b.lineStart(),i(null,null,1,b),b.lineEnd()),j&&(0,s.Z)(d,p,G,i,b),b.polygonEnd()),P=b,d=v=x=null}};function U(G,N){o(G,N)&&P.point(G,N)}function B(G,N){var j=o(G,N);if(v&&x.push([G,N]),C)g=G,y=N,k=j,C=!1,j&&(P.lineStart(),P.point(G,N));else if(j&&A)P.point(G,N);else{var V=[h=Math.max(f,Math.min(m,h)),M=Math.max(f,Math.min(m,M))],H=[G=Math.max(f,Math.min(m,G)),N=Math.max(f,Math.min(m,N))];(function(ee,Q,X,Y,K,te){var re,oe=ee[0],se=ee[1],ce=0,xe=1,pe=Q[0]-oe,de=Q[1]-se;if(re=X-oe,pe||!(re>0)){if(re/=pe,pe<0){if(re0){if(re>xe)return;re>ce&&(ce=re)}if(re=K-oe,pe||!(re<0)){if(re/=pe,pe<0){if(re>xe)return;re>ce&&(ce=re)}else if(pe>0){if(re0)){if(re/=de,de<0){if(re0){if(re>xe)return;re>ce&&(ce=re)}if(re=te-se,de||!(re<0)){if(re/=de,de<0){if(re>xe)return;re>ce&&(ce=re)}else if(de>0){if(re0&&(ee[0]=oe+ce*pe,ee[1]=se+ce*de),xe<1&&(Q[0]=oe+xe*pe,Q[1]=se+xe*de),!0}}}}})(V,H,t,a,r,n)?(A||(P.lineStart(),P.point(V[0],V[1])),P.point(H[0],H[1]),j||P.lineEnd(),L=!1):j&&(P.lineStart(),P.point(G,N),L=!1)}h=G,M=N,A=j}return R}}},46225:function(D,E,e){e.d(E,{Z:function(){return T}});var _=e(67108),w=e(39695);function s(f,l,t,a){this.x=f,this.z=l,this.o=t,this.e=a,this.v=!1,this.n=this.p=null}function T(f,l,t,a,r){var n,o,i=[],u=[];if(f.forEach(function(x){if(!((g=x.length-1)<=0)){var g,y,k=x[0],h=x[g];if((0,_.Z)(k,h)){if(!k[2]&&!h[2]){for(r.lineStart(),n=0;n=0;--n)r.point((c=p[n])[0],c[1]);else a(d.x,d.p.x,-1,r);d=d.p}p=(d=d.o).z,v=!v}while(!d.v);r.lineEnd()}}}function m(f){if(l=f.length){for(var l,t,a=0,r=f[0];++a0&&(jn=M($t[$n],$t[$n-1]))>0&&Ln<=jn&&En<=jn&&(Ln+En-jn)*(1-Math.pow((Ln-En)/jn,2))u.Ho}).map(hr)).concat((0,N.w6)((0,u.mD)($n/un)*un,jn,un).filter(function(dn){return(0,u.Wn)(dn%On)>u.Ho}).map(tn))}return pn.lines=function(){return bn().map(function(dn){return{type:"LineString",coordinates:dn}})},pn.outline=function(){return{type:"Polygon",coordinates:[Pn(En).concat(jt(Zn).slice(1),Pn(Ln).reverse().slice(1),jt(Qn).reverse().slice(1))]}},pn.extent=function(dn){return arguments.length?pn.extentMajor(dn).extentMinor(dn):pn.extentMinor()},pn.extentMajor=function(dn){return arguments.length?(En=+dn[0][0],Ln=+dn[1][0],Qn=+dn[0][1],Zn=+dn[1][1],En>Ln&&(dn=En,En=Ln,Ln=dn),Qn>Zn&&(dn=Qn,Qn=Zn,Zn=dn),pn.precision(Sn)):[[En,Qn],[Ln,Zn]]},pn.extentMinor=function(dn){return arguments.length?(mn=+dn[0][0],$t=+dn[1][0],$n=+dn[0][1],jn=+dn[1][1],mn>$t&&(dn=mn,mn=$t,$t=dn),$n>jn&&(dn=$n,$n=jn,jn=dn),pn.precision(Sn)):[[mn,$n],[$t,jn]]},pn.step=function(dn){return arguments.length?pn.stepMajor(dn).stepMinor(dn):pn.stepMinor()},pn.stepMajor=function(dn){return arguments.length?(Rn=+dn[0],On=+dn[1],pn):[Rn,On]},pn.stepMinor=function(dn){return arguments.length?(Jt=+dn[0],un=+dn[1],pn):[Jt,un]},pn.precision=function(dn){return arguments.length?(Sn=+dn,hr=j($n,jn,90),tn=V(mn,$t,Sn),Pn=j(Qn,Zn,90),jt=V(En,Ln,Sn),pn):Sn},pn.extentMajor([[-180,-90+u.Ho],[180,90-u.Ho]]).extentMinor([[-180,-80-u.Ho],[180,80+u.Ho]])}function ee(){return H()()}var Q,X,Y,K,te=e(83074),re=e(8593),oe=(0,i.Z)(),se=(0,i.Z)(),ce={point:p.Z,lineStart:p.Z,lineEnd:p.Z,polygonStart:function(){ce.lineStart=xe,ce.lineEnd=he},polygonEnd:function(){ce.lineStart=ce.lineEnd=ce.point=p.Z,oe.add((0,u.Wn)(se)),se.reset()},result:function(){var $t=oe/2;return oe.reset(),$t}};function xe(){ce.point=pe}function pe($t,mn){ce.point=de,Q=Y=$t,X=K=mn}function de($t,mn){se.add(K*$t-Y*mn),Y=$t,K=mn}function he(){de(Q,X)}var ye,ze,Te,Ae,Me=ce,Ce=e(3559),ne=0,ue=0,me=0,we=0,Ee=0,Ue=0,De=0,je=0,ge=0,be={point:Se,lineStart:Ne,lineEnd:st,polygonStart:function(){be.lineStart=ot,be.lineEnd=ft},polygonEnd:function(){be.point=Se,be.lineStart=Ne,be.lineEnd=st},result:function(){var $t=ge?[De/ge,je/ge]:Ue?[we/Ue,Ee/Ue]:me?[ne/me,ue/me]:[NaN,NaN];return ne=ue=me=we=Ee=Ue=De=je=ge=0,$t}};function Se($t,mn){ne+=$t,ue+=mn,++me}function Ne(){be.point=Ye}function Ye($t,mn){be.point=Ze,Se(Te=$t,Ae=mn)}function Ze($t,mn){var Ln=$t-Te,En=mn-Ae,jn=(0,u._b)(Ln*Ln+En*En);we+=jn*(Te+$t)/2,Ee+=jn*(Ae+mn)/2,Ue+=jn,Se(Te=$t,Ae=mn)}function st(){be.point=Se}function ot(){be.point=yt}function ft(){Et(ye,ze)}function yt($t,mn){be.point=Et,Se(ye=Te=$t,ze=Ae=mn)}function Et($t,mn){var Ln=$t-Te,En=mn-Ae,jn=(0,u._b)(Ln*Ln+En*En);we+=jn*(Te+$t)/2,Ee+=jn*(Ae+mn)/2,Ue+=jn,De+=(jn=Ae*$t-Te*mn)*(Te+$t),je+=jn*(Ae+mn),ge+=3*jn,Se(Te=$t,Ae=mn)}var Tt=be;function xt($t){this._context=$t}xt.prototype={_radius:4.5,pointRadius:function($t){return this._radius=$t,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($t,mn){switch(this._point){case 0:this._context.moveTo($t,mn),this._point=1;break;case 1:this._context.lineTo($t,mn);break;default:this._context.moveTo($t+this._radius,mn),this._context.arc($t,mn,this._radius,0,u.BZ)}},result:p.Z};var Dt,It,Ft,qt,Nt,Je=(0,i.Z)(),Ke={point:p.Z,lineStart:function(){Ke.point=Ge},lineEnd:function(){Dt&&nt(It,Ft),Ke.point=p.Z},polygonStart:function(){Dt=!0},polygonEnd:function(){Dt=null},result:function(){var $t=+Je;return Je.reset(),$t}};function Ge($t,mn){Ke.point=nt,It=qt=$t,Ft=Nt=mn}function nt($t,mn){qt-=$t,Nt-=mn,Je.add((0,u._b)(qt*qt+Nt*Nt)),qt=$t,Nt=mn}var ht=Ke;function Oe(){this._string=[]}function Be($t){return"m0,"+$t+"a"+$t+","+$t+" 0 1,1 0,"+-2*$t+"a"+$t+","+$t+" 0 1,1 0,"+2*$t+"z"}function Qe($t,mn){var Ln,En,jn=4.5;function $n(Zn){return Zn&&(typeof jn=="function"&&En.pointRadius(+jn.apply(this,arguments)),(0,c.Z)(Zn,Ln(En))),En.result()}return $n.area=function(Zn){return(0,c.Z)(Zn,Ln(Me)),Me.result()},$n.measure=function(Zn){return(0,c.Z)(Zn,Ln(ht)),ht.result()},$n.bounds=function(Zn){return(0,c.Z)(Zn,Ln(Ce.Z)),Ce.Z.result()},$n.centroid=function(Zn){return(0,c.Z)(Zn,Ln(Tt)),Tt.result()},$n.projection=function(Zn){return arguments.length?(Ln=Zn==null?($t=null,re.Z):($t=Zn).stream,$n):$t},$n.context=function(Zn){return arguments.length?(En=Zn==null?(mn=null,new Oe):new xt(mn=Zn),typeof jn!="function"&&En.pointRadius(jn),$n):mn},$n.pointRadius=function(Zn){return arguments.length?(jn=typeof Zn=="function"?Zn:(En.pointRadius(+Zn),+Zn),$n):jn},$n.projection($t).context(mn)}Oe.prototype={_radius:4.5,_circle:Be(4.5),pointRadius:function($t){return($t=+$t)!==this._radius&&(this._radius=$t,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($t,mn){switch(this._point){case 0:this._string.push("M",$t,",",mn),this._point=1;break;case 1:this._string.push("L",$t,",",mn);break;default:this._circle==null&&(this._circle=Be(this._radius)),this._string.push("M",$t,",",mn,this._circle)}},result:function(){if(this._string.length){var $t=this._string.join("");return this._string=[],$t}return null}};var ut=e(15002);function pt($t){var mn=0,Ln=u.pi/3,En=(0,ut.r)($t),jn=En(mn,Ln);return jn.parallels=function($n){return arguments.length?En(mn=$n[0]*u.uR,Ln=$n[1]*u.uR):[mn*u.RW,Ln*u.RW]},jn}function bt($t,mn){var Ln=(0,u.O$)($t),En=(Ln+(0,u.O$)(mn))/2;if((0,u.Wn)(En)=.12&&Sn<.234&&On>=-.425&&On<-.214?Qn:Sn>=.166&&Sn<.234&&On>=-.214&&On<-.115?hr:Zn).invert(Jt)},Pn.stream=function(Jt){return $t&&mn===Jt?$t:(un=[Zn.stream(mn=Jt),Qn.stream(Jt),hr.stream(Jt)],Rn=un.length,$t={point:function(On,Sn){for(var pn=-1;++pn0?Qn<-u.ou+u.Ho&&(Qn=-u.ou+u.Ho):Qn>u.ou-u.Ho&&(Qn=u.ou-u.Ho);var hr=jn/(0,u.sQ)(Kt(Qn),En);return[hr*(0,u.O$)(En*Zn),jn-hr*(0,u.mC)(En*Zn)]}return $n.invert=function(Zn,Qn){var hr=jn-Qn,tn=(0,u.Xx)(En)*(0,u._b)(Zn*Zn+hr*hr),Pn=(0,u.fv)(Zn,(0,u.Wn)(hr))*(0,u.Xx)(hr);return hr*En<0&&(Pn-=u.pi*(0,u.Xx)(Zn)*(0,u.Xx)(hr)),[Pn/En,2*(0,u.z4)((0,u.sQ)(jn/tn,1/En))-u.ou]},$n}function yn(){return pt(nn).scale(109.5).parallels([30,30])}Wt.invert=function($t,mn){return[$t,2*(0,u.z4)((0,u.Qq)(mn))-u.ou]};var ln=e(97492);function kn($t,mn){var Ln=(0,u.mC)($t),En=$t===mn?(0,u.O$)($t):(Ln-(0,u.mC)(mn))/(mn-$t),jn=Ln/En+$t;if((0,u.Wn)(En)2?En[2]+90:90]):[(En=Ln())[0],En[1],En[2]-90]},Ln([0,0,90]).scale(159.155)}gr.invert=(0,Tr.O)(function($t){return 2*(0,u.z4)($t)}),dr.invert=function($t,mn){return[-mn,2*(0,u.z4)((0,u.Qq)($t))-u.ou]}},83074:function(D,E,e){e.d(E,{Z:function(){return w}});var _=e(39695);function w(s,T){var m=s[0]*_.uR,f=s[1]*_.uR,l=T[0]*_.uR,t=T[1]*_.uR,a=(0,_.mC)(f),r=(0,_.O$)(f),n=(0,_.mC)(t),o=(0,_.O$)(t),i=a*(0,_.mC)(m),u=a*(0,_.O$)(m),p=n*(0,_.mC)(l),c=n*(0,_.O$)(l),b=2*(0,_.ZR)((0,_._b)((0,_.Jy)(t-f)+a*n*(0,_.Jy)(l-m))),d=(0,_.O$)(b),v=b?function(x){var g=(0,_.O$)(x*=b)/d,y=(0,_.O$)(b-x)/d,k=y*i+g*p,h=y*u+g*c,M=y*r+g*o;return[(0,_.fv)(h,k)*_.RW,(0,_.fv)(M,(0,_._b)(k*k+h*h))*_.RW]}:function(){return[m*_.RW,f*_.RW]};return v.distance=b,v}},39695:function(D,E,e){e.d(E,{BZ:function(){return f},Ho:function(){return _},Jy:function(){return k},Kh:function(){return g},O$:function(){return b},OR:function(){return x},Qq:function(){return u},RW:function(){return l},Wn:function(){return a},Xx:function(){return d},ZR:function(){return y},_b:function(){return v},aW:function(){return w},cM:function(){return p},fv:function(){return n},mC:function(){return o},mD:function(){return i},ou:function(){return T},pi:function(){return s},pu:function(){return m},sQ:function(){return c},uR:function(){return t},z4:function(){return r}});var _=1e-6,w=1e-12,s=Math.PI,T=s/2,m=s/4,f=2*s,l=180/s,t=s/180,a=Math.abs,r=Math.atan,n=Math.atan2,o=Math.cos,i=Math.ceil,u=Math.exp,p=Math.log,c=Math.pow,b=Math.sin,d=Math.sign||function(h){return h>0?1:h<0?-1:0},v=Math.sqrt,x=Math.tan;function g(h){return h>1?0:h<-1?s:Math.acos(h)}function y(h){return h>1?T:h<-1?-T:Math.asin(h)}function k(h){return(h=b(h/2))*h}},73182:function(D,E,e){function _(){}e.d(E,{Z:function(){return _}})},3559:function(D,E,e){var _=e(73182),w=1/0,s=w,T=-w,m=T,f={point:function(l,t){lT&&(T=l),tm&&(m=t)},lineStart:_.Z,lineEnd:_.Z,polygonStart:_.Z,polygonEnd:_.Z,result:function(){var l=[[w,s],[T,m]];return T=m=-(s=w=1/0),l}};E.Z=f},67108:function(D,E,e){e.d(E,{Z:function(){return w}});var _=e(39695);function w(s,T){return(0,_.Wn)(s[0]-T[0])<_.Ho&&(0,_.Wn)(s[1]-T[1])<_.Ho}},23071:function(D,E,e){e.d(E,{Z:function(){return f}});var _=e(33940),w=e(7620),s=e(39695),T=(0,_.Z)();function m(l){return(0,s.Wn)(l[0])<=s.pi?l[0]:(0,s.Xx)(l[0])*(((0,s.Wn)(l[0])+s.pi)%s.BZ-s.pi)}function f(l,t){var a=m(t),r=t[1],n=(0,s.O$)(r),o=[(0,s.O$)(a),-(0,s.mC)(a),0],i=0,u=0;T.reset(),n===1?r=s.ou+s.Ho:n===-1&&(r=-s.ou-s.Ho);for(var p=0,c=l.length;p=0?1:-1,U=R*I,B=U>s.pi,G=y*L;if(T.add((0,s.fv)(G*R*(0,s.O$)(U),k*P+G*(0,s.mC)(U))),i+=B?I+R*s.BZ:I,B^x>=a^A>=a){var N=(0,w.T5)((0,w.Og)(v),(0,w.Og)(M));(0,w.iJ)(N);var j=(0,w.T5)(o,N);(0,w.iJ)(j);var V=(B^I>=0?-1:1)*(0,s.ZR)(j[2]);(r>V||r===V&&(N[0]||N[1]))&&(u+=B^I>=0?1:-1)}}return(i<-s.Ho||i4*g&&N--){var Q=A+U,X=C+B,Y=L+G,K=(0,f._b)(Q*Q+X*X+Y*Y),te=(0,f.ZR)(Y/=K),re=(0,f.Wn)((0,f.Wn)(Y)-1)g||(0,f.Wn)((V*xe+H*pe)/ee-.5)>.3||A*U+C*B+L*G2?xe[2]%360*f.uR:0,se()):[G*f.RW,N*f.RW,j*f.RW]},re.angle=function(xe){return arguments.length?(V=xe%360*f.uR,se()):V*f.RW},re.reflectX=function(xe){return arguments.length?(H=xe?-1:1,se()):H<0},re.reflectY=function(xe){return arguments.length?(ee=xe?-1:1,se()):ee<0},re.precision=function(xe){return arguments.length?(h=o(M,te=xe*xe),ce()):(0,f._b)(te)},re.fitExtent=function(xe,pe){return(0,a.qg)(re,xe,pe)},re.fitSize=function(xe,pe){return(0,a.mF)(re,xe,pe)},re.fitWidth=function(xe,pe){return(0,a.V6)(re,xe,pe)},re.fitHeight=function(xe,pe){return(0,a.rf)(re,xe,pe)},function(){return v=d.apply(this,arguments),re.invert=v.invert&&oe,se()}}},26867:function(D,E,e){e.d(E,{K:function(){return s},Z:function(){return T}});var _=e(15002),w=e(39695);function s(m,f){var l=f*f,t=l*l;return[m*(.8707-.131979*l+t*(t*(.003971*l-.001529*t)-.013791)),f*(1.007226+l*(.015085+t*(.028874*l-.044475-.005916*t)))]}function T(){return(0,_.Z)(s).scale(175.295)}s.invert=function(m,f){var l,t=f,a=25;do{var r=t*t,n=r*r;t-=l=(t*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))-f)/(1.007226+r*(.045255+n*(.259866*r-.311325-.06507600000000001*n)))}while((0,w.Wn)(l)>w.Ho&&--a>0);return[m/(.8707+(r=t*t)*(r*(r*r*r*(.003971-.001529*r)-.013791)-.131979)),t]}},57962:function(D,E,e){e.d(E,{I:function(){return T},Z:function(){return m}});var _=e(39695),w=e(25382),s=e(15002);function T(f,l){return[(0,_.mC)(l)*(0,_.O$)(f),(0,_.O$)(l)]}function m(){return(0,s.Z)(T).scale(249.5).clipAngle(90+_.Ho)}T.invert=(0,w.O)(_.ZR)},49386:function(D,E,e){e.d(E,{I:function(){return T},Z:function(){return t}});var _=e(96059),w=e(39695);function s(a,r){return[(0,w.Wn)(a)>w.pi?a+Math.round(-a/w.BZ)*w.BZ:a,r]}function T(a,r,n){return(a%=w.BZ)?r||n?(0,_.Z)(f(a),l(r,n)):f(a):r||n?l(r,n):s}function m(a){return function(r,n){return[(r+=a)>w.pi?r-w.BZ:r<-w.pi?r+w.BZ:r,n]}}function f(a){var r=m(a);return r.invert=m(-a),r}function l(a,r){var n=(0,w.mC)(a),o=(0,w.O$)(a),i=(0,w.mC)(r),u=(0,w.O$)(r);function p(c,b){var d=(0,w.mC)(b),v=(0,w.mC)(c)*d,x=(0,w.O$)(c)*d,g=(0,w.O$)(b),y=g*n+v*o;return[(0,w.fv)(x*i-y*u,v*n-g*o),(0,w.ZR)(y*i+x*u)]}return p.invert=function(c,b){var d=(0,w.mC)(b),v=(0,w.mC)(c)*d,x=(0,w.O$)(c)*d,g=(0,w.O$)(b),y=g*i-x*u;return[(0,w.fv)(x*i+g*u,v*n+y*o),(0,w.ZR)(y*n-v*o)]},p}function t(a){function r(n){return(n=a(n[0]*w.uR,n[1]*w.uR))[0]*=w.RW,n[1]*=w.RW,n}return a=T(a[0]*w.uR,a[1]*w.uR,a.length>2?a[2]*w.uR:0),r.invert=function(n){return(n=a.invert(n[0]*w.uR,n[1]*w.uR))[0]*=w.RW,n[1]*=w.RW,n},r}s.invert=s},72736:function(D,E,e){function _(l,t){l&&s.hasOwnProperty(l.type)&&s[l.type](l,t)}e.d(E,{Z:function(){return f}});var w={Feature:function(l,t){_(l.geometry,t)},FeatureCollection:function(l,t){for(var a=l.features,r=-1,n=a.length;++r=0;)ne+=ue[me].value;else ne=1;Ce.value=ne}function f(Ce,ne){var ue,me,we,Ee,Ue,De=new r(Ce),je=+Ce.value&&(De.value=Ce.value),ge=[De];for(ne==null&&(ne=l);ue=ge.pop();)if(je&&(ue.value=+ue.data.value),(we=ne(ue.data))&&(Ue=we.length))for(ue.children=new Array(Ue),Ee=Ue-1;Ee>=0;--Ee)ge.push(me=ue.children[Ee]=new r(we[Ee])),me.parent=ue,me.depth=ue.depth+1;return De.eachBefore(a)}function l(Ce){return Ce.children}function t(Ce){Ce.data=Ce.data.data}function a(Ce){var ne=0;do Ce.height=ne;while((Ce=Ce.parent)&&Ce.height<++ne)}function r(Ce){this.data=Ce,this.depth=this.height=0,this.parent=null}e.r(E),e.d(E,{cluster:function(){return T},hierarchy:function(){return f},pack:function(){return R},packEnclose:function(){return o},packSiblings:function(){return M},partition:function(){return V},stratify:function(){return Y},tree:function(){return xe},treemap:function(){return ze},treemapBinary:function(){return Te},treemapDice:function(){return j},treemapResquarify:function(){return Me},treemapSlice:function(){return pe},treemapSliceDice:function(){return Ae},treemapSquarify:function(){return ye}}),r.prototype=f.prototype={constructor:r,count:function(){return this.eachAfter(m)},each:function(Ce){var ne,ue,me,we,Ee=this,Ue=[Ee];do for(ne=Ue.reverse(),Ue=[];Ee=ne.pop();)if(Ce(Ee),ue=Ee.children)for(me=0,we=ue.length;me=0;--ue)we.push(ne[ue]);return this},sum:function(Ce){return this.eachAfter(function(ne){for(var ue=+Ce(ne.data)||0,me=ne.children,we=me&&me.length;--we>=0;)ue+=me[we].value;ne.value=ue})},sort:function(Ce){return this.eachBefore(function(ne){ne.children&&ne.children.sort(Ce)})},path:function(Ce){for(var ne=this,ue=function(Ee,Ue){if(Ee===Ue)return Ee;var De=Ee.ancestors(),je=Ue.ancestors(),ge=null;for(Ee=De.pop(),Ue=je.pop();Ee===Ue;)ge=Ee,Ee=De.pop(),Ue=je.pop();return ge}(ne,Ce),me=[ne];ne!==ue;)ne=ne.parent,me.push(ne);for(var we=me.length;Ce!==ue;)me.splice(we,0,Ce),Ce=Ce.parent;return me},ancestors:function(){for(var Ce=this,ne=[Ce];Ce=Ce.parent;)ne.push(Ce);return ne},descendants:function(){var Ce=[];return this.each(function(ne){Ce.push(ne)}),Ce},leaves:function(){var Ce=[];return this.eachBefore(function(ne){ne.children||Ce.push(ne)}),Ce},links:function(){var Ce=this,ne=[];return Ce.each(function(ue){ue!==Ce&&ne.push({source:ue.parent,target:ue})}),ne},copy:function(){return f(this).eachBefore(t)}};var n=Array.prototype.slice;function o(Ce){for(var ne,ue,me=0,we=(Ce=function(Ue){for(var De,je,ge=Ue.length;ge;)je=Math.random()*ge--|0,De=Ue[ge],Ue[ge]=Ue[je],Ue[je]=De;return Ue}(n.call(Ce))).length,Ee=[];me0&&ue*ue>me*me+we*we}function c(Ce,ne){for(var ue=0;ue(Ue*=Ue)?(me=(ge+Ue-we)/(2*ge),Ee=Math.sqrt(Math.max(0,Ue/ge-me*me)),ue.x=Ce.x-me*De-Ee*je,ue.y=Ce.y-me*je+Ee*De):(me=(ge+we-Ue)/(2*ge),Ee=Math.sqrt(Math.max(0,we/ge-me*me)),ue.x=ne.x+me*De-Ee*je,ue.y=ne.y+me*je+Ee*De)):(ue.x=ne.x+ue.r,ue.y=ne.y)}function g(Ce,ne){var ue=Ce.r+ne.r-1e-6,me=ne.x-Ce.x,we=ne.y-Ce.y;return ue>0&&ue*ue>me*me+we*we}function y(Ce){var ne=Ce._,ue=Ce.next._,me=ne.r+ue.r,we=(ne.x*ue.r+ue.x*ne.r)/me,Ee=(ne.y*ue.r+ue.y*ne.r)/me;return we*we+Ee*Ee}function k(Ce){this._=Ce,this.next=null,this.previous=null}function h(Ce){if(!(we=Ce.length))return 0;var ne,ue,me,we,Ee,Ue,De,je,ge,be,Se;if((ne=Ce[0]).x=0,ne.y=0,!(we>1))return ne.r;if(ue=Ce[1],ne.x=-ue.r,ue.x=ne.r,ue.y=0,!(we>2))return ne.r+ue.r;x(ue,ne,me=Ce[2]),ne=new k(ne),ue=new k(ue),me=new k(me),ne.next=me.previous=ue,ue.next=ne.previous=me,me.next=ue.previous=ne;e:for(De=3;De0)throw new Error("cycle");return Ue}return ue.id=function(me){return arguments.length?(Ce=C(me),ue):Ce},ue.parentId=function(me){return arguments.length?(ne=C(me),ue):ne},ue}function K(Ce,ne){return Ce.parent===ne.parent?1:2}function te(Ce){var ne=Ce.children;return ne?ne[0]:Ce.t}function re(Ce){var ne=Ce.children;return ne?ne[ne.length-1]:Ce.t}function oe(Ce,ne,ue){var me=ue/(ne.i-Ce.i);ne.c-=me,ne.s+=ue,Ce.c+=me,ne.z+=ue,ne.m+=ue}function se(Ce,ne,ue){return Ce.a.parent===ne.parent?Ce.a:ue}function ce(Ce,ne){this._=Ce,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=ne}function xe(){var Ce=K,ne=1,ue=1,me=null;function we(je){var ge=function(ft){for(var yt,Et,Tt,xt,Dt,It=new ce(ft,0),Ft=[It];yt=Ft.pop();)if(Tt=yt._.children)for(yt.children=new Array(Dt=Tt.length),xt=Dt-1;xt>=0;--xt)Ft.push(Et=yt.children[xt]=new ce(Tt[xt],xt)),Et.parent=yt;return(It.parent=new ce(null,0)).children=[It],It}(je);if(ge.eachAfter(Ee),ge.parent.m=-ge.z,ge.eachBefore(Ue),me)je.eachBefore(De);else{var be=je,Se=je,Ne=je;je.eachBefore(function(ft){ft.xSe.x&&(Se=ft),ft.depth>Ne.depth&&(Ne=ft)});var Ye=be===Se?1:Ce(be,Se)/2,Ze=Ye-be.x,st=ne/(Se.x+Ye+Ze),ot=ue/(Ne.depth||1);je.eachBefore(function(ft){ft.x=(ft.x+Ze)*st,ft.y=ft.depth*ot})}return je}function Ee(je){var ge=je.children,be=je.parent.children,Se=je.i?be[je.i-1]:null;if(ge){(function(Ye){for(var Ze,st=0,ot=0,ft=Ye.children,yt=ft.length;--yt>=0;)(Ze=ft[yt]).z+=st,Ze.m+=st,st+=Ze.s+(ot+=Ze.c)})(je);var Ne=(ge[0].z+ge[ge.length-1].z)/2;Se?(je.z=Se.z+Ce(je._,Se._),je.m=je.z-Ne):je.z=Ne}else Se&&(je.z=Se.z+Ce(je._,Se._));je.parent.A=function(Ye,Ze,st){if(Ze){for(var ot,ft=Ye,yt=Ye,Et=Ze,Tt=ft.parent.children[0],xt=ft.m,Dt=yt.m,It=Et.m,Ft=Tt.m;Et=re(Et),ft=te(ft),Et&&ft;)Tt=te(Tt),(yt=re(yt)).a=Ye,(ot=Et.z+It-ft.z-xt+Ce(Et._,ft._))>0&&(oe(se(Et,Ye,st),Ye,ot),xt+=ot,Dt+=ot),It+=Et.m,xt+=ft.m,Ft+=Tt.m,Dt+=yt.m;Et&&!re(yt)&&(yt.t=Et,yt.m+=It-Dt),ft&&!te(Tt)&&(Tt.t=ft,Tt.m+=xt-Ft,st=Ye)}return st}(je,Se,je.parent.A||be[0])}function Ue(je){je._.x=je.z+je.parent.m,je.m+=je.parent.m}function De(je){je.x*=ne,je.y=je.depth*ue}return we.separation=function(je){return arguments.length?(Ce=je,we):Ce},we.size=function(je){return arguments.length?(me=!1,ne=+je[0],ue=+je[1],we):me?null:[ne,ue]},we.nodeSize=function(je){return arguments.length?(me=!0,ne=+je[0],ue=+je[1],we):me?[ne,ue]:null},we}function pe(Ce,ne,ue,me,we){for(var Ee,Ue=Ce.children,De=-1,je=Ue.length,ge=Ce.value&&(we-ue)/Ce.value;++DeNe&&(Ne=De),ot=be*be*st,(Ye=Math.max(Ne/ot,ot/Se))>Ze){be-=De;break}Ze=Ye}ft.push(Ue={value:be,dice:je1?me:1)},ue}(de);function ze(){var Ce=ye,ne=!1,ue=1,me=1,we=[0],Ee=L,Ue=L,De=L,je=L,ge=L;function be(Ne){return Ne.x0=Ne.y0=0,Ne.x1=ue,Ne.y1=me,Ne.eachBefore(Se),we=[0],ne&&Ne.eachBefore(N),Ne}function Se(Ne){var Ye=we[Ne.depth],Ze=Ne.x0+Ye,st=Ne.y0+Ye,ot=Ne.x1-Ye,ft=Ne.y1-Ye;ot=Ne-1){var yt=De[Se];return yt.x0=Ze,yt.y0=st,yt.x1=ot,void(yt.y1=ft)}for(var Et=ge[Se],Tt=Ye/2+Et,xt=Se+1,Dt=Ne-1;xt>>1;ge[It]ft-st){var Nt=(Ze*qt+ot*Ft)/Ye;be(Se,xt,Ft,Ze,st,Nt,ft),be(xt,Ne,qt,Nt,st,ot,ft)}else{var Je=(st*qt+ft*Ft)/Ye;be(Se,xt,Ft,Ze,st,ot,Je),be(xt,Ne,qt,Ze,Je,ot,ft)}})(0,je,Ce.value,ne,ue,me,we)}function Ae(Ce,ne,ue,me,we){(1&Ce.depth?pe:j)(Ce,ne,ue,me,we)}var Me=function Ce(ne){function ue(me,we,Ee,Ue,De){if((je=me._squarify)&&je.ratio===ne)for(var je,ge,be,Se,Ne,Ye=-1,Ze=je.length,st=me.value;++Ye1?me:1)},ue}(de)},45879:function(D,E,e){e.d(E,{h5:function(){return p}});var _=Math.PI,w=2*_,s=1e-6,T=w-s;function m(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function f(){return new m}m.prototype=f.prototype={constructor:m,moveTo:function(c,b){this._+="M"+(this._x0=this._x1=+c)+","+(this._y0=this._y1=+b)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(c,b){this._+="L"+(this._x1=+c)+","+(this._y1=+b)},quadraticCurveTo:function(c,b,d,v){this._+="Q"+ +c+","+ +b+","+(this._x1=+d)+","+(this._y1=+v)},bezierCurveTo:function(c,b,d,v,x,g){this._+="C"+ +c+","+ +b+","+ +d+","+ +v+","+(this._x1=+x)+","+(this._y1=+g)},arcTo:function(c,b,d,v,x){c=+c,b=+b,d=+d,v=+v,x=+x;var g=this._x1,y=this._y1,k=d-c,h=v-b,M=g-c,A=y-b,C=M*M+A*A;if(x<0)throw new Error("negative radius: "+x);if(this._x1===null)this._+="M"+(this._x1=c)+","+(this._y1=b);else if(C>s)if(Math.abs(A*k-h*M)>s&&x){var L=d-g,P=v-y,I=k*k+h*h,R=L*L+P*P,U=Math.sqrt(I),B=Math.sqrt(C),G=x*Math.tan((_-Math.acos((I+C-R)/(2*U*B)))/2),N=G/B,j=G/U;Math.abs(N-1)>s&&(this._+="L"+(c+N*M)+","+(b+N*A)),this._+="A"+x+","+x+",0,0,"+ +(A*L>M*P)+","+(this._x1=c+j*k)+","+(this._y1=b+j*h)}else this._+="L"+(this._x1=c)+","+(this._y1=b)},arc:function(c,b,d,v,x,g){c=+c,b=+b,g=!!g;var y=(d=+d)*Math.cos(v),k=d*Math.sin(v),h=c+y,M=b+k,A=1^g,C=g?v-x:x-v;if(d<0)throw new Error("negative radius: "+d);this._x1===null?this._+="M"+h+","+M:(Math.abs(this._x1-h)>s||Math.abs(this._y1-M)>s)&&(this._+="L"+h+","+M),d&&(C<0&&(C=C%w+w),C>T?this._+="A"+d+","+d+",0,1,"+A+","+(c-y)+","+(b-k)+"A"+d+","+d+",0,1,"+A+","+(this._x1=h)+","+(this._y1=M):C>s&&(this._+="A"+d+","+d+",0,"+ +(C>=_)+","+A+","+(this._x1=c+d*Math.cos(x))+","+(this._y1=b+d*Math.sin(x))))},rect:function(c,b,d,v){this._+="M"+(this._x0=this._x1=+c)+","+(this._y0=this._y1=+b)+"h"+ +d+"v"+ +v+"h"+-d+"Z"},toString:function(){return this._}};var l=f,t=Array.prototype.slice;function a(c){return function(){return c}}function r(c){return c[0]}function n(c){return c[1]}function o(c){return c.source}function i(c){return c.target}function u(c,b,d,v,x){c.moveTo(b,d),c.bezierCurveTo(b=(b+v)/2,d,b,x,v,x)}function p(){return function(c){var b=o,d=i,v=r,x=n,g=null;function y(){var k,h=t.call(arguments),M=b.apply(this,h),A=d.apply(this,h);if(g||(g=k=l()),c(g,+v.apply(this,(h[0]=M,h)),+x.apply(this,h),+v.apply(this,(h[0]=A,h)),+x.apply(this,h)),k)return g=null,k+""||null}return y.source=function(k){return arguments.length?(b=k,y):b},y.target=function(k){return arguments.length?(d=k,y):d},y.x=function(k){return arguments.length?(v=typeof k=="function"?k:a(+k),y):v},y.y=function(k){return arguments.length?(x=typeof k=="function"?k:a(+k),y):x},y.context=function(k){return arguments.length?(g=k??null,y):g},y}(u)}},84096:function(D,E,e){e.d(E,{i$:function(){return o},Dq:function(){return r},g0:function(){return i}});var _=e(58176),w=e(48480),s=e(59879),T=e(82301),m=e(34823),f=e(79791);function l(xt){if(0<=xt.y&&xt.y<100){var Dt=new Date(-1,xt.m,xt.d,xt.H,xt.M,xt.S,xt.L);return Dt.setFullYear(xt.y),Dt}return new Date(xt.y,xt.m,xt.d,xt.H,xt.M,xt.S,xt.L)}function t(xt){if(0<=xt.y&&xt.y<100){var Dt=new Date(Date.UTC(-1,xt.m,xt.d,xt.H,xt.M,xt.S,xt.L));return Dt.setUTCFullYear(xt.y),Dt}return new Date(Date.UTC(xt.y,xt.m,xt.d,xt.H,xt.M,xt.S,xt.L))}function a(xt,Dt,It){return{y:xt,m:Dt,d:It,H:0,M:0,S:0,L:0}}function r(xt){var Dt=xt.dateTime,It=xt.date,Ft=xt.time,qt=xt.periods,Nt=xt.days,Je=xt.shortDays,Ke=xt.months,Ge=xt.shortMonths,nt=x(qt),ht=g(qt),Oe=x(Nt),Be=g(Nt),Qe=x(Je),ut=g(Je),pt=x(Ke),bt=g(Ke),Lt=x(Ge),Ct=g(Ge),mt={a:function(Gt){return Je[Gt.getDay()]},A:function(Gt){return Nt[Gt.getDay()]},b:function(Gt){return Ge[Gt.getMonth()]},B:function(Gt){return Ke[Gt.getMonth()]},c:null,d:Y,e:Y,f:se,H:K,I:te,j:re,L:oe,m:ce,M:xe,p:function(Gt){return qt[+(Gt.getHours()>=12)]},q:function(Gt){return 1+~~(Gt.getMonth()/3)},Q:Et,s:Tt,S:pe,u:de,U:he,V:ye,w:ze,W:Te,x:null,X:null,y:Ae,Y:Me,Z:Ce,"%":yt},Ot={a:function(Gt){return Je[Gt.getUTCDay()]},A:function(Gt){return Nt[Gt.getUTCDay()]},b:function(Gt){return Ge[Gt.getUTCMonth()]},B:function(Gt){return Ke[Gt.getUTCMonth()]},c:null,d:ne,e:ne,f:Ue,H:ue,I:me,j:we,L:Ee,m:De,M:je,p:function(Gt){return qt[+(Gt.getUTCHours()>=12)]},q:function(Gt){return 1+~~(Gt.getUTCMonth()/3)},Q:Et,s:Tt,S:ge,u:be,U:Se,V:Ne,w:Ye,W:Ze,x:null,X:null,y:st,Y:ot,Z:ft,"%":yt},_t={a:function(Gt,Xt,Kt){var nn=Qe.exec(Xt.slice(Kt));return nn?(Gt.w=ut[nn[0].toLowerCase()],Kt+nn[0].length):-1},A:function(Gt,Xt,Kt){var nn=Oe.exec(Xt.slice(Kt));return nn?(Gt.w=Be[nn[0].toLowerCase()],Kt+nn[0].length):-1},b:function(Gt,Xt,Kt){var nn=Lt.exec(Xt.slice(Kt));return nn?(Gt.m=Ct[nn[0].toLowerCase()],Kt+nn[0].length):-1},B:function(Gt,Xt,Kt){var nn=pt.exec(Xt.slice(Kt));return nn?(Gt.m=bt[nn[0].toLowerCase()],Kt+nn[0].length):-1},c:function(Gt,Xt,Kt){return Wt(Gt,Dt,Xt,Kt)},d:U,e:U,f:H,H:G,I:G,j:B,L:V,m:R,M:N,p:function(Gt,Xt,Kt){var nn=nt.exec(Xt.slice(Kt));return nn?(Gt.p=ht[nn[0].toLowerCase()],Kt+nn[0].length):-1},q:I,Q,s:X,S:j,u:k,U:h,V:M,w:y,W:A,x:function(Gt,Xt,Kt){return Wt(Gt,It,Xt,Kt)},X:function(Gt,Xt,Kt){return Wt(Gt,Ft,Xt,Kt)},y:L,Y:C,Z:P,"%":ee};function Pt(Gt,Xt){return function(Kt){var nn,yn,ln,kn=[],Wn=-1,wn=0,on=Gt.length;for(Kt instanceof Date||(Kt=new Date(+Kt));++Wn53)return null;"w"in ln||(ln.w=1),"Z"in ln?(yn=(nn=t(a(ln.y,0,1))).getUTCDay(),nn=yn>4||yn===0?_.l6.ceil(nn):(0,_.l6)(nn),nn=w.Z.offset(nn,7*(ln.V-1)),ln.y=nn.getUTCFullYear(),ln.m=nn.getUTCMonth(),ln.d=nn.getUTCDate()+(ln.w+6)%7):(yn=(nn=l(a(ln.y,0,1))).getDay(),nn=yn>4||yn===0?s.wA.ceil(nn):(0,s.wA)(nn),nn=T.Z.offset(nn,7*(ln.V-1)),ln.y=nn.getFullYear(),ln.m=nn.getMonth(),ln.d=nn.getDate()+(ln.w+6)%7)}else("W"in ln||"U"in ln)&&("w"in ln||(ln.w="u"in ln?ln.u%7:"W"in ln?1:0),yn="Z"in ln?t(a(ln.y,0,1)).getUTCDay():l(a(ln.y,0,1)).getDay(),ln.m=0,ln.d="W"in ln?(ln.w+6)%7+7*ln.W-(yn+5)%7:ln.w+7*ln.U-(yn+6)%7);return"Z"in ln?(ln.H+=ln.Z/100|0,ln.M+=ln.Z%100,t(ln)):l(ln)}}function Wt(Gt,Xt,Kt,nn){for(var yn,ln,kn=0,Wn=Xt.length,wn=Kt.length;kn=wn)return-1;if((yn=Xt.charCodeAt(kn++))===37){if(yn=Xt.charAt(kn++),!(ln=_t[yn in u?Xt.charAt(kn++):yn])||(nn=ln(Gt,Kt,nn))<0)return-1}else if(yn!=Kt.charCodeAt(nn++))return-1}return nn}return mt.x=Pt(It,mt),mt.X=Pt(Ft,mt),mt.c=Pt(Dt,mt),Ot.x=Pt(It,Ot),Ot.X=Pt(Ft,Ot),Ot.c=Pt(Dt,Ot),{format:function(Gt){var Xt=Pt(Gt+="",mt);return Xt.toString=function(){return Gt},Xt},parse:function(Gt){var Xt=Bt(Gt+="",!1);return Xt.toString=function(){return Gt},Xt},utcFormat:function(Gt){var Xt=Pt(Gt+="",Ot);return Xt.toString=function(){return Gt},Xt},utcParse:function(Gt){var Xt=Bt(Gt+="",!0);return Xt.toString=function(){return Gt},Xt}}}var n,o,i,u={"-":"",_:" ",0:"0"},p=/^\s*\d+/,c=/^%/,b=/[\\^$*+?|[\]().{}]/g;function d(xt,Dt,It){var Ft=xt<0?"-":"",qt=(Ft?-xt:xt)+"",Nt=qt.length;return Ft+(Nt68?1900:2e3),It+Ft[0].length):-1}function P(xt,Dt,It){var Ft=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Dt.slice(It,It+6));return Ft?(xt.Z=Ft[1]?0:-(Ft[2]+(Ft[3]||"00")),It+Ft[0].length):-1}function I(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+1));return Ft?(xt.q=3*Ft[0]-3,It+Ft[0].length):-1}function R(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+2));return Ft?(xt.m=Ft[0]-1,It+Ft[0].length):-1}function U(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+2));return Ft?(xt.d=+Ft[0],It+Ft[0].length):-1}function B(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+3));return Ft?(xt.m=0,xt.d=+Ft[0],It+Ft[0].length):-1}function G(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+2));return Ft?(xt.H=+Ft[0],It+Ft[0].length):-1}function N(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+2));return Ft?(xt.M=+Ft[0],It+Ft[0].length):-1}function j(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+2));return Ft?(xt.S=+Ft[0],It+Ft[0].length):-1}function V(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+3));return Ft?(xt.L=+Ft[0],It+Ft[0].length):-1}function H(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+6));return Ft?(xt.L=Math.floor(Ft[0]/1e3),It+Ft[0].length):-1}function ee(xt,Dt,It){var Ft=c.exec(Dt.slice(It,It+1));return Ft?It+Ft[0].length:-1}function Q(xt,Dt,It){var Ft=p.exec(Dt.slice(It));return Ft?(xt.Q=+Ft[0],It+Ft[0].length):-1}function X(xt,Dt,It){var Ft=p.exec(Dt.slice(It));return Ft?(xt.s=+Ft[0],It+Ft[0].length):-1}function Y(xt,Dt){return d(xt.getDate(),Dt,2)}function K(xt,Dt){return d(xt.getHours(),Dt,2)}function te(xt,Dt){return d(xt.getHours()%12||12,Dt,2)}function re(xt,Dt){return d(1+T.Z.count((0,m.Z)(xt),xt),Dt,3)}function oe(xt,Dt){return d(xt.getMilliseconds(),Dt,3)}function se(xt,Dt){return oe(xt,Dt)+"000"}function ce(xt,Dt){return d(xt.getMonth()+1,Dt,2)}function xe(xt,Dt){return d(xt.getMinutes(),Dt,2)}function pe(xt,Dt){return d(xt.getSeconds(),Dt,2)}function de(xt){var Dt=xt.getDay();return Dt===0?7:Dt}function he(xt,Dt){return d(s.OM.count((0,m.Z)(xt)-1,xt),Dt,2)}function ye(xt,Dt){var It=xt.getDay();return xt=It>=4||It===0?(0,s.bL)(xt):s.bL.ceil(xt),d(s.bL.count((0,m.Z)(xt),xt)+((0,m.Z)(xt).getDay()===4),Dt,2)}function ze(xt){return xt.getDay()}function Te(xt,Dt){return d(s.wA.count((0,m.Z)(xt)-1,xt),Dt,2)}function Ae(xt,Dt){return d(xt.getFullYear()%100,Dt,2)}function Me(xt,Dt){return d(xt.getFullYear()%1e4,Dt,4)}function Ce(xt){var Dt=xt.getTimezoneOffset();return(Dt>0?"-":(Dt*=-1,"+"))+d(Dt/60|0,"0",2)+d(Dt%60,"0",2)}function ne(xt,Dt){return d(xt.getUTCDate(),Dt,2)}function ue(xt,Dt){return d(xt.getUTCHours(),Dt,2)}function me(xt,Dt){return d(xt.getUTCHours()%12||12,Dt,2)}function we(xt,Dt){return d(1+w.Z.count((0,f.Z)(xt),xt),Dt,3)}function Ee(xt,Dt){return d(xt.getUTCMilliseconds(),Dt,3)}function Ue(xt,Dt){return Ee(xt,Dt)+"000"}function De(xt,Dt){return d(xt.getUTCMonth()+1,Dt,2)}function je(xt,Dt){return d(xt.getUTCMinutes(),Dt,2)}function ge(xt,Dt){return d(xt.getUTCSeconds(),Dt,2)}function be(xt){var Dt=xt.getUTCDay();return Dt===0?7:Dt}function Se(xt,Dt){return d(_.Ox.count((0,f.Z)(xt)-1,xt),Dt,2)}function Ne(xt,Dt){var It=xt.getUTCDay();return xt=It>=4||It===0?(0,_.hB)(xt):_.hB.ceil(xt),d(_.hB.count((0,f.Z)(xt),xt)+((0,f.Z)(xt).getUTCDay()===4),Dt,2)}function Ye(xt){return xt.getUTCDay()}function Ze(xt,Dt){return d(_.l6.count((0,f.Z)(xt)-1,xt),Dt,2)}function st(xt,Dt){return d(xt.getUTCFullYear()%100,Dt,2)}function ot(xt,Dt){return d(xt.getUTCFullYear()%1e4,Dt,4)}function ft(){return"+0000"}function yt(){return"%"}function Et(xt){return+xt}function Tt(xt){return Math.floor(+xt/1e3)}n=r({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"]}),o=n.format,n.parse,i=n.utcFormat,n.utcParse},82301:function(D,E,e){e.d(E,{a:function(){return T}});var _=e(30052),w=e(54263),s=(0,_.Z)(function(m){m.setHours(0,0,0,0)},function(m,f){m.setDate(m.getDate()+f)},function(m,f){return(f-m-(f.getTimezoneOffset()-m.getTimezoneOffset())*w.yB)/w.UD},function(m){return m.getDate()-1});E.Z=s;var T=s.range},54263:function(D,E,e){e.d(E,{UD:function(){return T},Y2:function(){return s},Ym:function(){return _},iM:function(){return m},yB:function(){return w}});var _=1e3,w=6e4,s=36e5,T=864e5,m=6048e5},81041:function(D,E,e){e.r(E),e.d(E,{timeDay:function(){return p.Z},timeDays:function(){return p.a},timeFriday:function(){return c.mC},timeFridays:function(){return c.b$},timeHour:function(){return i},timeHours:function(){return u},timeInterval:function(){return _.Z},timeMillisecond:function(){return s},timeMilliseconds:function(){return T},timeMinute:function(){return r},timeMinutes:function(){return n},timeMonday:function(){return c.wA},timeMondays:function(){return c.bJ},timeMonth:function(){return d},timeMonths:function(){return v},timeSaturday:function(){return c.EY},timeSaturdays:function(){return c.Ff},timeSecond:function(){return l},timeSeconds:function(){return t},timeSunday:function(){return c.OM},timeSundays:function(){return c.vm},timeThursday:function(){return c.bL},timeThursdays:function(){return c.$t},timeTuesday:function(){return c.sy},timeTuesdays:function(){return c.aU},timeWednesday:function(){return c.zg},timeWednesdays:function(){return c.Ld},timeWeek:function(){return c.OM},timeWeeks:function(){return c.vm},timeYear:function(){return x.Z},timeYears:function(){return x.g},utcDay:function(){return C.Z},utcDays:function(){return C.y},utcFriday:function(){return L.QQ},utcFridays:function(){return L.fz},utcHour:function(){return M},utcHours:function(){return A},utcMillisecond:function(){return s},utcMilliseconds:function(){return T},utcMinute:function(){return y},utcMinutes:function(){return k},utcMonday:function(){return L.l6},utcMondays:function(){return L.$3},utcMonth:function(){return I},utcMonths:function(){return R},utcSaturday:function(){return L.g4},utcSaturdays:function(){return L.Q_},utcSecond:function(){return l},utcSeconds:function(){return t},utcSunday:function(){return L.Ox},utcSundays:function(){return L.SU},utcThursday:function(){return L.hB},utcThursdays:function(){return L.xj},utcTuesday:function(){return L.J1},utcTuesdays:function(){return L.DK},utcWednesday:function(){return L.b3},utcWednesdays:function(){return L.uy},utcWeek:function(){return L.Ox},utcWeeks:function(){return L.SU},utcYear:function(){return U.Z},utcYears:function(){return U.D}});var _=e(30052),w=(0,_.Z)(function(){},function(B,G){B.setTime(+B+G)},function(B,G){return G-B});w.every=function(B){return B=Math.floor(B),isFinite(B)&&B>0?B>1?(0,_.Z)(function(G){G.setTime(Math.floor(G/B)*B)},function(G,N){G.setTime(+G+N*B)},function(G,N){return(N-G)/B}):w:null};var s=w,T=w.range,m=e(54263),f=(0,_.Z)(function(B){B.setTime(B-B.getMilliseconds())},function(B,G){B.setTime(+B+G*m.Ym)},function(B,G){return(G-B)/m.Ym},function(B){return B.getUTCSeconds()}),l=f,t=f.range,a=(0,_.Z)(function(B){B.setTime(B-B.getMilliseconds()-B.getSeconds()*m.Ym)},function(B,G){B.setTime(+B+G*m.yB)},function(B,G){return(G-B)/m.yB},function(B){return B.getMinutes()}),r=a,n=a.range,o=(0,_.Z)(function(B){B.setTime(B-B.getMilliseconds()-B.getSeconds()*m.Ym-B.getMinutes()*m.yB)},function(B,G){B.setTime(+B+G*m.Y2)},function(B,G){return(G-B)/m.Y2},function(B){return B.getHours()}),i=o,u=o.range,p=e(82301),c=e(59879),b=(0,_.Z)(function(B){B.setDate(1),B.setHours(0,0,0,0)},function(B,G){B.setMonth(B.getMonth()+G)},function(B,G){return G.getMonth()-B.getMonth()+12*(G.getFullYear()-B.getFullYear())},function(B){return B.getMonth()}),d=b,v=b.range,x=e(34823),g=(0,_.Z)(function(B){B.setUTCSeconds(0,0)},function(B,G){B.setTime(+B+G*m.yB)},function(B,G){return(G-B)/m.yB},function(B){return B.getUTCMinutes()}),y=g,k=g.range,h=(0,_.Z)(function(B){B.setUTCMinutes(0,0,0)},function(B,G){B.setTime(+B+G*m.Y2)},function(B,G){return(G-B)/m.Y2},function(B){return B.getUTCHours()}),M=h,A=h.range,C=e(48480),L=e(58176),P=(0,_.Z)(function(B){B.setUTCDate(1),B.setUTCHours(0,0,0,0)},function(B,G){B.setUTCMonth(B.getUTCMonth()+G)},function(B,G){return G.getUTCMonth()-B.getUTCMonth()+12*(G.getUTCFullYear()-B.getUTCFullYear())},function(B){return B.getUTCMonth()}),I=P,R=P.range,U=e(79791)},30052:function(D,E,e){e.d(E,{Z:function(){return s}});var _=new Date,w=new Date;function s(T,m,f,l){function t(a){return T(a=arguments.length===0?new Date:new Date(+a)),a}return t.floor=function(a){return T(a=new Date(+a)),a},t.ceil=function(a){return T(a=new Date(a-1)),m(a,1),T(a),a},t.round=function(a){var r=t(a),n=t.ceil(a);return a-r0))return i;do i.push(o=new Date(+a)),m(a,n),T(a);while(o=r)for(;T(r),!a(r);)r.setTime(r-1)},function(r,n){if(r>=r)if(n<0)for(;++n<=0;)for(;m(r,-1),!a(r););else for(;--n>=0;)for(;m(r,1),!a(r););})},f&&(t.count=function(a,r){return _.setTime(+a),w.setTime(+r),T(_),T(w),Math.floor(f(_,w))},t.every=function(a){return a=Math.floor(a),isFinite(a)&&a>0?a>1?t.filter(l?function(r){return l(r)%a==0}:function(r){return t.count(0,r)%a==0}):t:null}),t}},48480:function(D,E,e){e.d(E,{y:function(){return T}});var _=e(30052),w=e(54263),s=(0,_.Z)(function(m){m.setUTCHours(0,0,0,0)},function(m,f){m.setUTCDate(m.getUTCDate()+f)},function(m,f){return(f-m)/w.UD},function(m){return m.getUTCDate()-1});E.Z=s;var T=s.range},58176:function(D,E,e){e.d(E,{$3:function(){return o},DK:function(){return i},J1:function(){return f},Ox:function(){return T},QQ:function(){return a},Q_:function(){return b},SU:function(){return n},b3:function(){return l},fz:function(){return c},g4:function(){return r},hB:function(){return t},l6:function(){return m},uy:function(){return u},xj:function(){return p}});var _=e(30052),w=e(54263);function s(d){return(0,_.Z)(function(v){v.setUTCDate(v.getUTCDate()-(v.getUTCDay()+7-d)%7),v.setUTCHours(0,0,0,0)},function(v,x){v.setUTCDate(v.getUTCDate()+7*x)},function(v,x){return(x-v)/w.iM})}var T=s(0),m=s(1),f=s(2),l=s(3),t=s(4),a=s(5),r=s(6),n=T.range,o=m.range,i=f.range,u=l.range,p=t.range,c=a.range,b=r.range},79791:function(D,E,e){e.d(E,{D:function(){return s}});var _=e(30052),w=(0,_.Z)(function(T){T.setUTCMonth(0,1),T.setUTCHours(0,0,0,0)},function(T,m){T.setUTCFullYear(T.getUTCFullYear()+m)},function(T,m){return m.getUTCFullYear()-T.getUTCFullYear()},function(T){return T.getUTCFullYear()});w.every=function(T){return isFinite(T=Math.floor(T))&&T>0?(0,_.Z)(function(m){m.setUTCFullYear(Math.floor(m.getUTCFullYear()/T)*T),m.setUTCMonth(0,1),m.setUTCHours(0,0,0,0)},function(m,f){m.setUTCFullYear(m.getUTCFullYear()+f*T)}):null},E.Z=w;var s=w.range},59879:function(D,E,e){e.d(E,{$t:function(){return p},EY:function(){return r},Ff:function(){return b},Ld:function(){return u},OM:function(){return T},aU:function(){return i},b$:function(){return c},bJ:function(){return o},bL:function(){return t},mC:function(){return a},sy:function(){return f},vm:function(){return n},wA:function(){return m},zg:function(){return l}});var _=e(30052),w=e(54263);function s(d){return(0,_.Z)(function(v){v.setDate(v.getDate()-(v.getDay()+7-d)%7),v.setHours(0,0,0,0)},function(v,x){v.setDate(v.getDate()+7*x)},function(v,x){return(x-v-(x.getTimezoneOffset()-v.getTimezoneOffset())*w.yB)/w.iM})}var T=s(0),m=s(1),f=s(2),l=s(3),t=s(4),a=s(5),r=s(6),n=T.range,o=m.range,i=f.range,u=l.range,p=t.range,c=a.range,b=r.range},34823:function(D,E,e){e.d(E,{g:function(){return s}});var _=e(30052),w=(0,_.Z)(function(T){T.setMonth(0,1),T.setHours(0,0,0,0)},function(T,m){T.setFullYear(T.getFullYear()+m)},function(T,m){return m.getFullYear()-T.getFullYear()},function(T){return T.getFullYear()});w.every=function(T){return isFinite(T=Math.floor(T))&&T>0?(0,_.Z)(function(m){m.setFullYear(Math.floor(m.getFullYear()/T)*T),m.setMonth(0,1),m.setHours(0,0,0,0)},function(m,f){m.setFullYear(m.getFullYear()+f*T)}):null},E.Z=w;var s=w.range},17045:function(D,E,e){var _=e(8709),w=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",s=Object.prototype.toString,T=Array.prototype.concat,m=Object.defineProperty,f=e(55622)(),l=m&&f,t=function(r,n,o,i){if(n in r){if(i===!0){if(r[n]===o)return}else if(typeof(u=i)!="function"||s.call(u)!=="[object Function]"||!i())return}var u;l?m(r,n,{configurable:!0,enumerable:!1,value:o,writable:!0}):r[n]=o},a=function(r,n){var o=arguments.length>2?arguments[2]:{},i=_(n);w&&(i=T.call(i,Object.getOwnPropertySymbols(n)));for(var u=0;ul*t){var i=(o-n)/l;f[r]=1e3*i}}return f}function w(s){for(var T=[],m=s[0];m<=s[1];m++)for(var f=String.fromCharCode(m),l=s[0];l0)return function(w,s){var T,m;for(T=new Array(w),m=0;m80*C){L=I=M[0],P=R=M[1];for(var ee=C;eeI&&(I=U),B>R&&(R=B);G=(G=Math.max(I-L,R-P))!==0?1/G:0}return w(V,H,C,L,P,G),H}function e(M,A,C,L,P){var I,R;if(P===h(M,A,C,L)>0)for(I=A;I=A;I-=L)R=g(I,M[I],M[I+1],R);return R&&p(R,R.next)&&(y(R),R=R.next),R}function _(M,A){if(!M)return M;A||(A=M);var C,L=M;do if(C=!1,L.steiner||!p(L,L.next)&&u(L.prev,L,L.next)!==0)L=L.next;else{if(y(L),(L=A=L.prev)===L.next)break;C=!0}while(C||L!==A);return A}function w(M,A,C,L,P,I,R){if(M){!R&&I&&function(N,j,V,H){var ee=N;do ee.z===null&&(ee.z=r(ee.x,ee.y,j,V,H)),ee.prevZ=ee.prev,ee.nextZ=ee.next,ee=ee.next;while(ee!==N);ee.prevZ.nextZ=null,ee.prevZ=null,function(Q){var X,Y,K,te,re,oe,se,ce,xe=1;do{for(Y=Q,Q=null,re=null,oe=0;Y;){for(oe++,K=Y,se=0,X=0;X0||ce>0&&K;)se!==0&&(ce===0||!K||Y.z<=K.z)?(te=Y,Y=Y.nextZ,se--):(te=K,K=K.nextZ,ce--),re?re.nextZ=te:Q=te,te.prevZ=re,re=te;Y=K}re.nextZ=null,xe*=2}while(oe>1)}(ee)}(M,L,P,I);for(var U,B,G=M;M.prev!==M.next;)if(U=M.prev,B=M.next,I?T(M,L,P,I):s(M))A.push(U.i/C),A.push(M.i/C),A.push(B.i/C),y(M),M=B.next,G=B.next;else if((M=B)===G){R?R===1?w(M=m(_(M),A,C),A,C,L,P,I,2):R===2&&f(M,A,C,L,P,I):w(_(M),A,C,L,P,I,1);break}}}function s(M){var A=M.prev,C=M,L=M.next;if(u(A,C,L)>=0)return!1;for(var P=M.next.next;P!==M.prev;){if(o(A.x,A.y,C.x,C.y,L.x,L.y,P.x,P.y)&&u(P.prev,P,P.next)>=0)return!1;P=P.next}return!0}function T(M,A,C,L){var P=M.prev,I=M,R=M.next;if(u(P,I,R)>=0)return!1;for(var U=P.xI.x?P.x>R.x?P.x:R.x:I.x>R.x?I.x:R.x,N=P.y>I.y?P.y>R.y?P.y:R.y:I.y>R.y?I.y:R.y,j=r(U,B,A,C,L),V=r(G,N,A,C,L),H=M.prevZ,ee=M.nextZ;H&&H.z>=j&&ee&&ee.z<=V;){if(H!==M.prev&&H!==M.next&&o(P.x,P.y,I.x,I.y,R.x,R.y,H.x,H.y)&&u(H.prev,H,H.next)>=0||(H=H.prevZ,ee!==M.prev&&ee!==M.next&&o(P.x,P.y,I.x,I.y,R.x,R.y,ee.x,ee.y)&&u(ee.prev,ee,ee.next)>=0))return!1;ee=ee.nextZ}for(;H&&H.z>=j;){if(H!==M.prev&&H!==M.next&&o(P.x,P.y,I.x,I.y,R.x,R.y,H.x,H.y)&&u(H.prev,H,H.next)>=0)return!1;H=H.prevZ}for(;ee&&ee.z<=V;){if(ee!==M.prev&&ee!==M.next&&o(P.x,P.y,I.x,I.y,R.x,R.y,ee.x,ee.y)&&u(ee.prev,ee,ee.next)>=0)return!1;ee=ee.nextZ}return!0}function m(M,A,C){var L=M;do{var P=L.prev,I=L.next.next;!p(P,I)&&c(P,L,L.next,I)&&v(P,I)&&v(I,P)&&(A.push(P.i/C),A.push(L.i/C),A.push(I.i/C),y(L),y(L.next),L=M=I),L=L.next}while(L!==M);return _(L)}function f(M,A,C,L,P,I){var R=M;do{for(var U=R.next.next;U!==R.prev;){if(R.i!==U.i&&i(R,U)){var B=x(R,U);return R=_(R,R.next),B=_(B,B.next),w(R,A,C,L,P,I),void w(B,A,C,L,P,I)}U=U.next}R=R.next}while(R!==M)}function l(M,A){return M.x-A.x}function t(M,A){if(A=function(L,P){var I,R=P,U=L.x,B=L.y,G=-1/0;do{if(B<=R.y&&B>=R.next.y&&R.next.y!==R.y){var N=R.x+(B-R.y)*(R.next.x-R.x)/(R.next.y-R.y);if(N<=U&&N>G){if(G=N,N===U){if(B===R.y)return R;if(B===R.next.y)return R.next}I=R.x=R.x&&R.x>=H&&U!==R.x&&o(BI.x||R.x===I.x&&a(I,R)))&&(I=R,Q=j)),R=R.next;while(R!==V);return I}(M,A),A){var C=x(A,M);_(A,A.next),_(C,C.next)}}function a(M,A){return u(M.prev,M,A.prev)<0&&u(A.next,M,M.next)<0}function r(M,A,C,L,P){return(M=1431655765&((M=858993459&((M=252645135&((M=16711935&((M=32767*(M-C)*P)|M<<8))|M<<4))|M<<2))|M<<1))|(A=1431655765&((A=858993459&((A=252645135&((A=16711935&((A=32767*(A-L)*P)|A<<8))|A<<4))|A<<2))|A<<1))<<1}function n(M){var A=M,C=M;do(A.x=0&&(M-R)*(L-U)-(C-R)*(A-U)>=0&&(C-R)*(I-U)-(P-R)*(L-U)>=0}function i(M,A){return M.next.i!==A.i&&M.prev.i!==A.i&&!function(C,L){var P=C;do{if(P.i!==C.i&&P.next.i!==C.i&&P.i!==L.i&&P.next.i!==L.i&&c(P,P.next,C,L))return!0;P=P.next}while(P!==C);return!1}(M,A)&&(v(M,A)&&v(A,M)&&function(C,L){var P=C,I=!1,R=(C.x+L.x)/2,U=(C.y+L.y)/2;do P.y>U!=P.next.y>U&&P.next.y!==P.y&&R<(P.next.x-P.x)*(U-P.y)/(P.next.y-P.y)+P.x&&(I=!I),P=P.next;while(P!==C);return I}(M,A)&&(u(M.prev,M,A.prev)||u(M,A.prev,A))||p(M,A)&&u(M.prev,M,M.next)>0&&u(A.prev,A,A.next)>0)}function u(M,A,C){return(A.y-M.y)*(C.x-A.x)-(A.x-M.x)*(C.y-A.y)}function p(M,A){return M.x===A.x&&M.y===A.y}function c(M,A,C,L){var P=d(u(M,A,C)),I=d(u(M,A,L)),R=d(u(C,L,M)),U=d(u(C,L,A));return P!==I&&R!==U||!(P!==0||!b(M,C,A))||!(I!==0||!b(M,L,A))||!(R!==0||!b(C,M,L))||!(U!==0||!b(C,A,L))}function b(M,A,C){return A.x<=Math.max(M.x,C.x)&&A.x>=Math.min(M.x,C.x)&&A.y<=Math.max(M.y,C.y)&&A.y>=Math.min(M.y,C.y)}function d(M){return M>0?1:M<0?-1:0}function v(M,A){return u(M.prev,M,M.next)<0?u(M,A,M.next)>=0&&u(M,M.prev,A)>=0:u(M,A,M.prev)<0||u(M,M.next,A)<0}function x(M,A){var C=new k(M.i,M.x,M.y),L=new k(A.i,A.x,A.y),P=M.next,I=A.prev;return M.next=A,A.prev=M,C.next=P,P.prev=C,L.next=C,C.prev=L,I.next=L,L.prev=I,L}function g(M,A,C,L){var P=new k(M,A,C);return L?(P.next=L.next,P.prev=L,L.next.prev=P,L.next=P):(P.prev=P,P.next=P),P}function y(M){M.next.prev=M.prev,M.prev.next=M.next,M.prevZ&&(M.prevZ.nextZ=M.nextZ),M.nextZ&&(M.nextZ.prevZ=M.prevZ)}function k(M,A,C){this.i=M,this.x=A,this.y=C,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function h(M,A,C,L){for(var P=0,I=A,R=C-L;I0&&(L+=M[P-1].length,C.holes.push(L))}return C}},2502:function(D,E,e){var _=e(68664);D.exports=function(w,s){var T,m=[],f=[],l=[],t={},a=[];function r(v){l[v]=!1,t.hasOwnProperty(v)&&Object.keys(t[v]).forEach(function(x){delete t[v][x],l[x]&&r(x)})}function n(v){var x,g,y=!1;for(f.push(v),l[v]=!0,x=0;x=C})})(v);for(var x,g=_(w).components.filter(function(C){return C.length>1}),y=1/0,k=0;k=55296&&v<=56319&&(k+=i[++p]),k=h?r.call(h,M,k,c):k,u?(n.value=k,o(b,c,n)):b[c]=k,++c;d=c}}if(d===void 0)for(d=T(i.length),u&&(b=new u(d)),p=0;p0?1:-1}},56247:function(D,E,e){var _=e(9953),w=Math.abs,s=Math.floor;D.exports=function(T){return isNaN(T)?0:(T=Number(T))!==0&&isFinite(T)?_(T)*s(w(T)):T}},35976:function(D,E,e){var _=e(56247),w=Math.max;D.exports=function(s){return w(0,_(s))}},67260:function(D,E,e){var _=e(78513),w=e(36672),s=Function.prototype.bind,T=Function.prototype.call,m=Object.keys,f=Object.prototype.propertyIsEnumerable;D.exports=function(l,t){return function(a,r){var n,o=arguments[2],i=arguments[3];return a=Object(w(a)),_(r),n=m(a),i&&n.sort(typeof i=="function"?s.call(i,a):void 0),typeof l!="function"&&(l=n[l]),T.call(l,n,function(u,p){return f.call(a,u)?T.call(r,o,a[u],u,a,p):t})}}},95879:function(D,E,e){D.exports=e(73583)()?Object.assign:e(34205)},73583:function(D){D.exports=function(){var E,e=Object.assign;return typeof e=="function"&&(e(E={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),E.foo+E.bar+E.trzy==="razdwatrzy")}},34205:function(D,E,e){var _=e(68700),w=e(36672),s=Math.max;D.exports=function(T,m){var f,l,t,a=s(arguments.length,2);for(T=Object(w(T)),t=function(r){try{T[r]=m[r]}catch(n){f||(f=n)}},l=1;l-1}},87963:function(D){var E=Object.prototype.toString,e=E.call("");D.exports=function(_){return typeof _=="string"||_&&typeof _=="object"&&(_ instanceof String||E.call(_)===e)||!1}},43043:function(D){var E=Object.create(null),e=Math.random;D.exports=function(){var _;do _=e().toString(36).slice(2);while(E[_]);return _}},32411:function(D,E,e){var _,w=e(1496),s=e(66741),T=e(62072),m=e(8260),f=e(95426),l=Object.defineProperty;_=D.exports=function(t,a){if(!(this instanceof _))throw new TypeError("Constructor requires 'new'");f.call(this,t),a=a?s.call(a,"key+value")?"key+value":s.call(a,"key")?"key":"value":"value",l(this,"__kind__",T("",a))},w&&w(_,f),delete _.prototype.constructor,_.prototype=Object.create(f.prototype,{_resolve:T(function(t){return this.__kind__==="value"?this.__list__[t]:this.__kind__==="key+value"?[t,this.__list__[t]]:t})}),l(_.prototype,m.toStringTag,T("c","Array Iterator"))},27515:function(D,E,e){var _=e(73051),w=e(78513),s=e(87963),T=e(66661),m=Array.isArray,f=Function.prototype.call,l=Array.prototype.some;D.exports=function(t,a){var r,n,o,i,u,p,c,b,d=arguments[2];if(m(t)||_(t)?r="array":s(t)?r="string":t=T(t),w(a),o=function(){i=!0},r!=="array")if(r!=="string")for(n=t.next();!n.done;){if(f.call(a,d,n.value,o),i)return;n=t.next()}else for(p=t.length,u=0;u=55296&&b<=56319&&(c+=t[++u]),f.call(a,d,c,o),!i);++u);else l.call(t,function(v){return f.call(a,d,v,o),i})}},66661:function(D,E,e){var _=e(73051),w=e(87963),s=e(32411),T=e(259),m=e(58095),f=e(8260).iterator;D.exports=function(l){return typeof m(l)[f]=="function"?l[f]():_(l)?new s(l):w(l)?new T(l):new s(l)}},95426:function(D,E,e){var _,w=e(16134),s=e(95879),T=e(78513),m=e(36672),f=e(62072),l=e(55174),t=e(8260),a=Object.defineProperty,r=Object.defineProperties;D.exports=_=function(n,o){if(!(this instanceof _))throw new TypeError("Constructor requires 'new'");r(this,{__list__:f("w",m(n)),__context__:f("w",o),__nextIndex__:f("w",0)}),o&&(T(o.on),o.on("_add",this._onAdd),o.on("_delete",this._onDelete),o.on("_clear",this._onClear))},delete _.prototype.constructor,r(_.prototype,s({_next:f(function(){var n;if(this.__list__)return this.__redo__&&(n=this.__redo__.shift())!==void 0?n:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach(function(o,i){o>=n&&(this.__redo__[i]=++o)},this),this.__redo__.push(n)):a(this,"__redo__",f("c",[n])))}),_onDelete:f(function(n){var o;n>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&((o=this.__redo__.indexOf(n))!==-1&&this.__redo__.splice(o,1),this.__redo__.forEach(function(i,u){i>n&&(this.__redo__[u]=--i)},this)))}),_onClear:f(function(){this.__redo__&&w.call(this.__redo__),this.__nextIndex__=0})}))),a(_.prototype,t.iterator,f(function(){return this}))},35940:function(D,E,e){var _=e(73051),w=e(95296),s=e(87963),T=e(8260).iterator,m=Array.isArray;D.exports=function(f){return!(!w(f)||!m(f)&&!s(f)&&!_(f)&&typeof f[T]!="function")}},259:function(D,E,e){var _,w=e(1496),s=e(62072),T=e(8260),m=e(95426),f=Object.defineProperty;_=D.exports=function(l){if(!(this instanceof _))throw new TypeError("Constructor requires 'new'");l=String(l),m.call(this,l),f(this,"__length__",s("",l.length))},w&&w(_,m),delete _.prototype.constructor,_.prototype=Object.create(m.prototype,{_next:s(function(){if(this.__list__)return this.__nextIndex__=55296&&t<=56319?a+this.__list__[this.__nextIndex__++]:a})}),f(_.prototype,T.toStringTag,s("c","String Iterator"))},58095:function(D,E,e){var _=e(35940);D.exports=function(w){if(!_(w))throw new TypeError(w+" is not iterable");return w}},73523:function(D){function E(e,_){if(e==null)throw new TypeError("Cannot convert first argument to object");for(var w=Object(e),s=1;s0&&x.length>d&&!x.warned){x.warned=!0;var y=new Error("Possible EventEmitter memory leak detected. "+x.length+" "+String(p)+" listeners added. Use emitter.setMaxListeners() to increase limit");y.name="MaxListenersExceededWarning",y.emitter=u,y.type=p,y.count=x.length,g=y,console&&console.warn&&console.warn(g)}return u}function t(){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 a(u,p,c){var b={fired:!1,wrapFn:void 0,target:u,type:p,listener:c},d=t.bind(b);return d.listener=c,b.wrapFn=d,d}function r(u,p,c){var b=u._events;if(b===void 0)return[];var d=b[p];return d===void 0?[]:typeof d=="function"?c?[d.listener||d]:[d]:c?function(v){for(var x=new Array(v.length),g=0;g0&&(v=p[0]),v instanceof Error)throw v;var x=new Error("Unhandled error."+(v?" ("+v.message+")":""));throw x.context=v,x}var g=d[u];if(g===void 0)return!1;if(typeof g=="function")_(g,this,p);else{var y=g.length,k=o(g,y);for(c=0;c=0;v--)if(c[v]===p||c[v].listener===p){x=c[v].listener,d=v;break}if(d<0)return this;d===0?c.shift():function(g,y){for(;y+1=0;b--)this.removeListener(u,p[b]);return this},s.prototype.listeners=function(u){return r(this,u,!0)},s.prototype.rawListeners=function(u){return r(this,u,!1)},s.listenerCount=function(u,p){return typeof u.listenerCount=="function"?u.listenerCount(p):n.call(u,p)},s.prototype.listenerCount=n,s.prototype.eventNames=function(){return this._eventsCount>0?E(this._events):[]}},60774:function(D){var E=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};D.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return E()}try{return __global__||E()}finally{delete Object.prototype.__global__}}()},94908:function(D,E,e){D.exports=e(51152)()?globalThis:e(60774)},51152:function(D){D.exports=function(){return typeof globalThis=="object"&&!!globalThis&&globalThis.Array===Array}},92770:function(D,E,e){var _=e(18546);D.exports=function(w){var s=typeof w;if(s==="string"){var T=w;if((w=+w)==0&&_(T))return!1}else if(s!=="number")return!1;return w-w<1}},30120:function(D,E,e){var _=e(90660);D.exports=function(w,s,T){if(!w)throw new TypeError("must specify data as first parameter");if(T=0|+(T||0),Array.isArray(w)&&w[0]&&typeof w[0][0]=="number"){var m,f,l,t,a=w[0].length,r=w.length*a;s&&typeof s!="string"||(s=new(_(s||"float32"))(r+T));var n=s.length-T;if(r!==n)throw new Error("source length "+r+" ("+a+"x"+w.length+") does not match destination length "+n);for(m=0,l=T;mT[0]-l[0]/2&&(i=l[0]/2,u+=l[1]);return m}},32879:function(D){function E(s,T){T||(T={}),(typeof s=="string"||Array.isArray(s))&&(T.family=s);var m=Array.isArray(T.family)?T.family.join(", "):T.family;if(!m)throw Error("`family` must be defined");var f=T.size||T.fontSize||T.em||48,l=T.weight||T.fontWeight||"",t=(s=[T.style||T.fontStyle||"",l,f].join(" ")+"px "+m,T.origin||"top");if(E.cache[m]&&f<=E.cache[m].em)return e(E.cache[m],t);var a=T.canvas||E.canvas,r=a.getContext("2d"),n={upper:T.upper!==void 0?T.upper:"H",lower:T.lower!==void 0?T.lower:"x",descent:T.descent!==void 0?T.descent:"p",ascent:T.ascent!==void 0?T.ascent:"h",tittle:T.tittle!==void 0?T.tittle:"i",overshoot:T.overshoot!==void 0?T.overshoot:"O"},o=Math.ceil(1.5*f);a.height=o,a.width=.5*o,r.font=s;var i="H",u={top:0};r.clearRect(0,0,o,o),r.textBaseline="top",r.fillStyle="black",r.fillText(i,0,0);var p=_(r.getImageData(0,0,o,o));r.clearRect(0,0,o,o),r.textBaseline="bottom",r.fillText(i,0,o);var c=_(r.getImageData(0,0,o,o));u.lineHeight=u.bottom=o-c+p,r.clearRect(0,0,o,o),r.textBaseline="alphabetic",r.fillText(i,0,o);var b=o-_(r.getImageData(0,0,o,o))-1+p;u.baseline=u.alphabetic=b,r.clearRect(0,0,o,o),r.textBaseline="middle",r.fillText(i,0,.5*o);var d=_(r.getImageData(0,0,o,o));u.median=u.middle=o-d-1+p-.5*o,r.clearRect(0,0,o,o),r.textBaseline="hanging",r.fillText(i,0,.5*o);var v=_(r.getImageData(0,0,o,o));u.hanging=o-v-1+p-.5*o,r.clearRect(0,0,o,o),r.textBaseline="ideographic",r.fillText(i,0,o);var x=_(r.getImageData(0,0,o,o));if(u.ideographic=o-x-1+p,n.upper&&(r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.upper,0,0),u.upper=_(r.getImageData(0,0,o,o)),u.capHeight=u.baseline-u.upper),n.lower&&(r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.lower,0,0),u.lower=_(r.getImageData(0,0,o,o)),u.xHeight=u.baseline-u.lower),n.tittle&&(r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.tittle,0,0),u.tittle=_(r.getImageData(0,0,o,o))),n.ascent&&(r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.ascent,0,0),u.ascent=_(r.getImageData(0,0,o,o))),n.descent&&(r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.descent,0,0),u.descent=w(r.getImageData(0,0,o,o))),n.overshoot){r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.overshoot,0,0);var g=w(r.getImageData(0,0,o,o));u.overshoot=g-b}for(var y in u)u[y]/=f;return u.em=f,E.cache[m]=u,e(u,t)}function e(s,T){var m={};for(var f in typeof T=="string"&&(T=s[T]),s)f!=="em"&&(m[f]=s[f]-T);return m}function _(s){for(var T=s.height,m=s.data,f=3;f0;f-=4)if(m[f]!==0)return Math.floor(.25*(f-3)/T)}D.exports=E,E.canvas=document.createElement("canvas"),E.cache={}},31353:function(D,E,e){var _=e(85395),w=Object.prototype.toString,s=Object.prototype.hasOwnProperty,T=function(l,t,a){for(var r=0,n=l.length;r=3&&(r=a),w.call(l)==="[object Array]"?T(l,t,r):typeof l=="string"?m(l,t,r):f(l,t,r)}},73047:function(D){var E="Function.prototype.bind called on incompatible ",e=Array.prototype.slice,_=Object.prototype.toString,w="[object Function]";D.exports=function(s){var T=this;if(typeof T!="function"||_.call(T)!==w)throw new TypeError(E+T);for(var m,f=e.call(arguments,1),l=function(){if(this instanceof m){var o=T.apply(this,f.concat(e.call(arguments)));return Object(o)===o?o:this}return T.apply(s,f.concat(e.call(arguments)))},t=Math.max(0,T.length-f.length),a=[],r=0;r"u"&&!e.canvas)return null;var _=e.canvas||document.createElement("canvas");typeof e.width=="number"&&(_.width=e.width),typeof e.height=="number"&&(_.height=e.height);var w,s=e;try{var T=[E];E.indexOf("webgl")===0&&T.push("experimental-"+E);for(var m=0;m"u"?_:r(Uint8Array),i={"%AggregateError%":typeof AggregateError>"u"?_:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?_:ArrayBuffer,"%ArrayIteratorPrototype%":a?r([][Symbol.iterator]()):_,"%AsyncFromSyncIteratorPrototype%":_,"%AsyncFunction%":n,"%AsyncGenerator%":n,"%AsyncGeneratorFunction%":n,"%AsyncIteratorPrototype%":n,"%Atomics%":typeof Atomics>"u"?_:Atomics,"%BigInt%":typeof BigInt>"u"?_:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?_:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?_:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?_:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?_:Float32Array,"%Float64Array%":typeof Float64Array>"u"?_:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?_:FinalizationRegistry,"%Function%":s,"%GeneratorFunction%":n,"%Int8Array%":typeof Int8Array>"u"?_:Int8Array,"%Int16Array%":typeof Int16Array>"u"?_:Int16Array,"%Int32Array%":typeof Int32Array>"u"?_:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":a?r(r([][Symbol.iterator]())):_,"%JSON%":typeof JSON=="object"?JSON:_,"%Map%":typeof Map>"u"?_:Map,"%MapIteratorPrototype%":typeof Map<"u"&&a?r(new Map()[Symbol.iterator]()):_,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?_:Promise,"%Proxy%":typeof Proxy>"u"?_:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?_:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?_:Set,"%SetIteratorPrototype%":typeof Set<"u"&&a?r(new Set()[Symbol.iterator]()):_,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?_:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":a?r(""[Symbol.iterator]()):_,"%Symbol%":a?Symbol:_,"%SyntaxError%":w,"%ThrowTypeError%":t,"%TypedArray%":o,"%TypeError%":T,"%Uint8Array%":typeof Uint8Array>"u"?_:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?_:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?_:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?_:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?_:WeakMap,"%WeakRef%":typeof WeakRef>"u"?_:WeakRef,"%WeakSet%":typeof WeakSet>"u"?_:WeakSet};try{null.error}catch(L){var u=r(r(L));i["%Error.prototype%"]=u}var p=function L(P){var I;if(P==="%AsyncFunction%")I=m("async function () {}");else if(P==="%GeneratorFunction%")I=m("function* () {}");else if(P==="%AsyncGeneratorFunction%")I=m("async function* () {}");else if(P==="%AsyncGenerator%"){var R=L("%AsyncGeneratorFunction%");R&&(I=R.prototype)}else if(P==="%AsyncIteratorPrototype%"){var U=L("%AsyncGenerator%");U&&(I=r(U.prototype))}return i[P]=I,I},c={"%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"]},b=e(77575),d=e(35065),v=b.call(Function.call,Array.prototype.concat),x=b.call(Function.apply,Array.prototype.splice),g=b.call(Function.call,String.prototype.replace),y=b.call(Function.call,String.prototype.slice),k=b.call(Function.call,RegExp.prototype.exec),h=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,M=/\\(\\)?/g,A=function(L){var P=y(L,0,1),I=y(L,-1);if(P==="%"&&I!=="%")throw new w("invalid intrinsic syntax, expected closing `%`");if(I==="%"&&P!=="%")throw new w("invalid intrinsic syntax, expected opening `%`");var R=[];return g(L,h,function(U,B,G,N){R[R.length]=G?g(N,M,"$1"):B||U}),R},C=function(L,P){var I,R=L;if(d(c,R)&&(R="%"+(I=c[R])[0]+"%"),d(i,R)){var U=i[R];if(U===n&&(U=p(R)),U===void 0&&!P)throw new T("intrinsic "+L+" exists, but is not available. Please file an issue!");return{alias:I,name:R,value:U}}throw new w("intrinsic "+L+" does not exist!")};D.exports=function(L,P){if(typeof L!="string"||L.length===0)throw new T("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof P!="boolean")throw new T('"allowMissing" argument must be a boolean');if(k(/^%?[^%]*%?$/,L)===null)throw new w("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var I=A(L),R=I.length>0?I[0]:"",U=C("%"+R+"%",P),B=U.name,G=U.value,N=!1,j=U.alias;j&&(R=j[0],x(I,v([0,1],j)));for(var V=1,H=!0;V=I.length){var Y=f(G,ee);G=(H=!!Y)&&"get"in Y&&!("originalValue"in Y.get)?Y.get:G[ee]}else H=d(G,ee),G=G[ee];H&&!N&&(i[B]=G)}}return G}},85400:function(D){D.exports=function(E,e){var _=e[0],w=e[1],s=e[2],T=e[3],m=e[4],f=e[5],l=e[6],t=e[7],a=e[8],r=e[9],n=e[10],o=e[11],i=e[12],u=e[13],p=e[14],c=e[15];return E[0]=f*(n*c-o*p)-r*(l*c-t*p)+u*(l*o-t*n),E[1]=-(w*(n*c-o*p)-r*(s*c-T*p)+u*(s*o-T*n)),E[2]=w*(l*c-t*p)-f*(s*c-T*p)+u*(s*t-T*l),E[3]=-(w*(l*o-t*n)-f*(s*o-T*n)+r*(s*t-T*l)),E[4]=-(m*(n*c-o*p)-a*(l*c-t*p)+i*(l*o-t*n)),E[5]=_*(n*c-o*p)-a*(s*c-T*p)+i*(s*o-T*n),E[6]=-(_*(l*c-t*p)-m*(s*c-T*p)+i*(s*t-T*l)),E[7]=_*(l*o-t*n)-m*(s*o-T*n)+a*(s*t-T*l),E[8]=m*(r*c-o*u)-a*(f*c-t*u)+i*(f*o-t*r),E[9]=-(_*(r*c-o*u)-a*(w*c-T*u)+i*(w*o-T*r)),E[10]=_*(f*c-t*u)-m*(w*c-T*u)+i*(w*t-T*f),E[11]=-(_*(f*o-t*r)-m*(w*o-T*r)+a*(w*t-T*f)),E[12]=-(m*(r*p-n*u)-a*(f*p-l*u)+i*(f*n-l*r)),E[13]=_*(r*p-n*u)-a*(w*p-s*u)+i*(w*n-s*r),E[14]=-(_*(f*p-l*u)-m*(w*p-s*u)+i*(w*l-s*f)),E[15]=_*(f*n-l*r)-m*(w*n-s*r)+a*(w*l-s*f),E}},42331:function(D){D.exports=function(E){var e=new Float32Array(16);return e[0]=E[0],e[1]=E[1],e[2]=E[2],e[3]=E[3],e[4]=E[4],e[5]=E[5],e[6]=E[6],e[7]=E[7],e[8]=E[8],e[9]=E[9],e[10]=E[10],e[11]=E[11],e[12]=E[12],e[13]=E[13],e[14]=E[14],e[15]=E[15],e}},31042:function(D){D.exports=function(E,e){return E[0]=e[0],E[1]=e[1],E[2]=e[2],E[3]=e[3],E[4]=e[4],E[5]=e[5],E[6]=e[6],E[7]=e[7],E[8]=e[8],E[9]=e[9],E[10]=e[10],E[11]=e[11],E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15],E}},11902:function(D){D.exports=function(){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(D){D.exports=function(E){var e=E[0],_=E[1],w=E[2],s=E[3],T=E[4],m=E[5],f=E[6],l=E[7],t=E[8],a=E[9],r=E[10],n=E[11],o=E[12],i=E[13],u=E[14],p=E[15];return(e*m-_*T)*(r*p-n*u)-(e*f-w*T)*(a*p-n*i)+(e*l-s*T)*(a*u-r*i)+(_*f-w*m)*(t*p-n*o)-(_*l-s*m)*(t*u-r*o)+(w*l-s*f)*(t*i-a*o)}},27812:function(D){D.exports=function(E,e){var _=e[0],w=e[1],s=e[2],T=e[3],m=_+_,f=w+w,l=s+s,t=_*m,a=w*m,r=w*f,n=s*m,o=s*f,i=s*l,u=T*m,p=T*f,c=T*l;return E[0]=1-r-i,E[1]=a+c,E[2]=n-p,E[3]=0,E[4]=a-c,E[5]=1-t-i,E[6]=o+u,E[7]=0,E[8]=n+p,E[9]=o-u,E[10]=1-t-r,E[11]=0,E[12]=0,E[13]=0,E[14]=0,E[15]=1,E}},34045:function(D){D.exports=function(E,e,_){var w,s,T,m=_[0],f=_[1],l=_[2],t=Math.sqrt(m*m+f*f+l*l);return Math.abs(t)<1e-6?null:(m*=t=1/t,f*=t,l*=t,w=Math.sin(e),T=1-(s=Math.cos(e)),E[0]=m*m*T+s,E[1]=f*m*T+l*w,E[2]=l*m*T-f*w,E[3]=0,E[4]=m*f*T-l*w,E[5]=f*f*T+s,E[6]=l*f*T+m*w,E[7]=0,E[8]=m*l*T+f*w,E[9]=f*l*T-m*w,E[10]=l*l*T+s,E[11]=0,E[12]=0,E[13]=0,E[14]=0,E[15]=1,E)}},45973:function(D){D.exports=function(E,e,_){var w=e[0],s=e[1],T=e[2],m=e[3],f=w+w,l=s+s,t=T+T,a=w*f,r=w*l,n=w*t,o=s*l,i=s*t,u=T*t,p=m*f,c=m*l,b=m*t;return E[0]=1-(o+u),E[1]=r+b,E[2]=n-c,E[3]=0,E[4]=r-b,E[5]=1-(a+u),E[6]=i+p,E[7]=0,E[8]=n+c,E[9]=i-p,E[10]=1-(a+o),E[11]=0,E[12]=_[0],E[13]=_[1],E[14]=_[2],E[15]=1,E}},81472:function(D){D.exports=function(E,e){return E[0]=e[0],E[1]=0,E[2]=0,E[3]=0,E[4]=0,E[5]=e[1],E[6]=0,E[7]=0,E[8]=0,E[9]=0,E[10]=e[2],E[11]=0,E[12]=0,E[13]=0,E[14]=0,E[15]=1,E}},14669:function(D){D.exports=function(E,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]=e[0],E[13]=e[1],E[14]=e[2],E[15]=1,E}},75262:function(D){D.exports=function(E,e){var _=Math.sin(e),w=Math.cos(e);return E[0]=1,E[1]=0,E[2]=0,E[3]=0,E[4]=0,E[5]=w,E[6]=_,E[7]=0,E[8]=0,E[9]=-_,E[10]=w,E[11]=0,E[12]=0,E[13]=0,E[14]=0,E[15]=1,E}},331:function(D){D.exports=function(E,e){var _=Math.sin(e),w=Math.cos(e);return E[0]=w,E[1]=0,E[2]=-_,E[3]=0,E[4]=0,E[5]=1,E[6]=0,E[7]=0,E[8]=_,E[9]=0,E[10]=w,E[11]=0,E[12]=0,E[13]=0,E[14]=0,E[15]=1,E}},11049:function(D){D.exports=function(E,e){var _=Math.sin(e),w=Math.cos(e);return E[0]=w,E[1]=_,E[2]=0,E[3]=0,E[4]=-_,E[5]=w,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(D){D.exports=function(E,e,_,w,s,T,m){var f=1/(_-e),l=1/(s-w),t=1/(T-m);return E[0]=2*T*f,E[1]=0,E[2]=0,E[3]=0,E[4]=0,E[5]=2*T*l,E[6]=0,E[7]=0,E[8]=(_+e)*f,E[9]=(s+w)*l,E[10]=(m+T)*t,E[11]=-1,E[12]=0,E[13]=0,E[14]=m*T*2*t,E[15]=0,E}},71551:function(D){D.exports=function(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(D,E,e){D.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(D){D.exports=function(E,e){var _=e[0],w=e[1],s=e[2],T=e[3],m=e[4],f=e[5],l=e[6],t=e[7],a=e[8],r=e[9],n=e[10],o=e[11],i=e[12],u=e[13],p=e[14],c=e[15],b=_*f-w*m,d=_*l-s*m,v=_*t-T*m,x=w*l-s*f,g=w*t-T*f,y=s*t-T*l,k=a*u-r*i,h=a*p-n*i,M=a*c-o*i,A=r*p-n*u,C=r*c-o*u,L=n*c-o*p,P=b*L-d*C+v*A+x*M-g*h+y*k;return P?(P=1/P,E[0]=(f*L-l*C+t*A)*P,E[1]=(s*C-w*L-T*A)*P,E[2]=(u*y-p*g+c*x)*P,E[3]=(n*g-r*y-o*x)*P,E[4]=(l*M-m*L-t*h)*P,E[5]=(_*L-s*M+T*h)*P,E[6]=(p*v-i*y-c*d)*P,E[7]=(a*y-n*v+o*d)*P,E[8]=(m*C-f*M+t*k)*P,E[9]=(w*M-_*C-T*k)*P,E[10]=(i*g-u*v+c*b)*P,E[11]=(r*v-a*g-o*b)*P,E[12]=(f*h-m*A-l*k)*P,E[13]=(_*A-w*h+s*k)*P,E[14]=(u*d-i*x-p*b)*P,E[15]=(a*x-r*d+n*b)*P,E):null}},65551:function(D,E,e){var _=e(71551);D.exports=function(w,s,T,m){var f,l,t,a,r,n,o,i,u,p,c=s[0],b=s[1],d=s[2],v=m[0],x=m[1],g=m[2],y=T[0],k=T[1],h=T[2];return Math.abs(c-y)<1e-6&&Math.abs(b-k)<1e-6&&Math.abs(d-h)<1e-6?_(w):(o=c-y,i=b-k,u=d-h,f=x*(u*=p=1/Math.sqrt(o*o+i*i+u*u))-g*(i*=p),l=g*(o*=p)-v*u,t=v*i-x*o,(p=Math.sqrt(f*f+l*l+t*t))?(f*=p=1/p,l*=p,t*=p):(f=0,l=0,t=0),a=i*t-u*l,r=u*f-o*t,n=o*l-i*f,(p=Math.sqrt(a*a+r*r+n*n))?(a*=p=1/p,r*=p,n*=p):(a=0,r=0,n=0),w[0]=f,w[1]=a,w[2]=o,w[3]=0,w[4]=l,w[5]=r,w[6]=i,w[7]=0,w[8]=t,w[9]=n,w[10]=u,w[11]=0,w[12]=-(f*c+l*b+t*d),w[13]=-(a*c+r*b+n*d),w[14]=-(o*c+i*b+u*d),w[15]=1,w)}},91362:function(D){D.exports=function(E,e,_){var w=e[0],s=e[1],T=e[2],m=e[3],f=e[4],l=e[5],t=e[6],a=e[7],r=e[8],n=e[9],o=e[10],i=e[11],u=e[12],p=e[13],c=e[14],b=e[15],d=_[0],v=_[1],x=_[2],g=_[3];return E[0]=d*w+v*f+x*r+g*u,E[1]=d*s+v*l+x*n+g*p,E[2]=d*T+v*t+x*o+g*c,E[3]=d*m+v*a+x*i+g*b,d=_[4],v=_[5],x=_[6],g=_[7],E[4]=d*w+v*f+x*r+g*u,E[5]=d*s+v*l+x*n+g*p,E[6]=d*T+v*t+x*o+g*c,E[7]=d*m+v*a+x*i+g*b,d=_[8],v=_[9],x=_[10],g=_[11],E[8]=d*w+v*f+x*r+g*u,E[9]=d*s+v*l+x*n+g*p,E[10]=d*T+v*t+x*o+g*c,E[11]=d*m+v*a+x*i+g*b,d=_[12],v=_[13],x=_[14],g=_[15],E[12]=d*w+v*f+x*r+g*u,E[13]=d*s+v*l+x*n+g*p,E[14]=d*T+v*t+x*o+g*c,E[15]=d*m+v*a+x*i+g*b,E}},60378:function(D){D.exports=function(E,e,_,w,s,T,m){var f=1/(e-_),l=1/(w-s),t=1/(T-m);return E[0]=-2*f,E[1]=0,E[2]=0,E[3]=0,E[4]=0,E[5]=-2*l,E[6]=0,E[7]=0,E[8]=0,E[9]=0,E[10]=2*t,E[11]=0,E[12]=(e+_)*f,E[13]=(s+w)*l,E[14]=(m+T)*t,E[15]=1,E}},7864:function(D){D.exports=function(E,e,_,w,s){var T=1/Math.tan(e/2),m=1/(w-s);return E[0]=T/_,E[1]=0,E[2]=0,E[3]=0,E[4]=0,E[5]=T,E[6]=0,E[7]=0,E[8]=0,E[9]=0,E[10]=(s+w)*m,E[11]=-1,E[12]=0,E[13]=0,E[14]=2*s*w*m,E[15]=0,E}},35279:function(D){D.exports=function(E,e,_,w){var s=Math.tan(e.upDegrees*Math.PI/180),T=Math.tan(e.downDegrees*Math.PI/180),m=Math.tan(e.leftDegrees*Math.PI/180),f=Math.tan(e.rightDegrees*Math.PI/180),l=2/(m+f),t=2/(s+T);return E[0]=l,E[1]=0,E[2]=0,E[3]=0,E[4]=0,E[5]=t,E[6]=0,E[7]=0,E[8]=-(m-f)*l*.5,E[9]=(s-T)*t*.5,E[10]=w/(_-w),E[11]=-1,E[12]=0,E[13]=0,E[14]=w*_/(_-w),E[15]=0,E}},65074:function(D){D.exports=function(E,e,_,w){var s,T,m,f,l,t,a,r,n,o,i,u,p,c,b,d,v,x,g,y,k,h,M,A,C=w[0],L=w[1],P=w[2],I=Math.sqrt(C*C+L*L+P*P);return Math.abs(I)<1e-6?null:(C*=I=1/I,L*=I,P*=I,s=Math.sin(_),m=1-(T=Math.cos(_)),f=e[0],l=e[1],t=e[2],a=e[3],r=e[4],n=e[5],o=e[6],i=e[7],u=e[8],p=e[9],c=e[10],b=e[11],d=C*C*m+T,v=L*C*m+P*s,x=P*C*m-L*s,g=C*L*m-P*s,y=L*L*m+T,k=P*L*m+C*s,h=C*P*m+L*s,M=L*P*m-C*s,A=P*P*m+T,E[0]=f*d+r*v+u*x,E[1]=l*d+n*v+p*x,E[2]=t*d+o*v+c*x,E[3]=a*d+i*v+b*x,E[4]=f*g+r*y+u*k,E[5]=l*g+n*y+p*k,E[6]=t*g+o*y+c*k,E[7]=a*g+i*y+b*k,E[8]=f*h+r*M+u*A,E[9]=l*h+n*M+p*A,E[10]=t*h+o*M+c*A,E[11]=a*h+i*M+b*A,e!==E&&(E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15]),E)}},35545:function(D){D.exports=function(E,e,_){var w=Math.sin(_),s=Math.cos(_),T=e[4],m=e[5],f=e[6],l=e[7],t=e[8],a=e[9],r=e[10],n=e[11];return e!==E&&(E[0]=e[0],E[1]=e[1],E[2]=e[2],E[3]=e[3],E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15]),E[4]=T*s+t*w,E[5]=m*s+a*w,E[6]=f*s+r*w,E[7]=l*s+n*w,E[8]=t*s-T*w,E[9]=a*s-m*w,E[10]=r*s-f*w,E[11]=n*s-l*w,E}},94918:function(D){D.exports=function(E,e,_){var w=Math.sin(_),s=Math.cos(_),T=e[0],m=e[1],f=e[2],l=e[3],t=e[8],a=e[9],r=e[10],n=e[11];return e!==E&&(E[4]=e[4],E[5]=e[5],E[6]=e[6],E[7]=e[7],E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15]),E[0]=T*s-t*w,E[1]=m*s-a*w,E[2]=f*s-r*w,E[3]=l*s-n*w,E[8]=T*w+t*s,E[9]=m*w+a*s,E[10]=f*w+r*s,E[11]=l*w+n*s,E}},15692:function(D){D.exports=function(E,e,_){var w=Math.sin(_),s=Math.cos(_),T=e[0],m=e[1],f=e[2],l=e[3],t=e[4],a=e[5],r=e[6],n=e[7];return e!==E&&(E[8]=e[8],E[9]=e[9],E[10]=e[10],E[11]=e[11],E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15]),E[0]=T*s+t*w,E[1]=m*s+a*w,E[2]=f*s+r*w,E[3]=l*s+n*w,E[4]=t*s-T*w,E[5]=a*s-m*w,E[6]=r*s-f*w,E[7]=n*s-l*w,E}},10789:function(D){D.exports=function(E,e,_){var w=_[0],s=_[1],T=_[2];return E[0]=e[0]*w,E[1]=e[1]*w,E[2]=e[2]*w,E[3]=e[3]*w,E[4]=e[4]*s,E[5]=e[5]*s,E[6]=e[6]*s,E[7]=e[7]*s,E[8]=e[8]*T,E[9]=e[9]*T,E[10]=e[10]*T,E[11]=e[11]*T,E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15],E}},6726:function(D){D.exports=function(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(D){D.exports=function(E,e,_){var w,s,T,m,f,l,t,a,r,n,o,i,u=_[0],p=_[1],c=_[2];return e===E?(E[12]=e[0]*u+e[4]*p+e[8]*c+e[12],E[13]=e[1]*u+e[5]*p+e[9]*c+e[13],E[14]=e[2]*u+e[6]*p+e[10]*c+e[14],E[15]=e[3]*u+e[7]*p+e[11]*c+e[15]):(w=e[0],s=e[1],T=e[2],m=e[3],f=e[4],l=e[5],t=e[6],a=e[7],r=e[8],n=e[9],o=e[10],i=e[11],E[0]=w,E[1]=s,E[2]=T,E[3]=m,E[4]=f,E[5]=l,E[6]=t,E[7]=a,E[8]=r,E[9]=n,E[10]=o,E[11]=i,E[12]=w*u+f*p+r*c+e[12],E[13]=s*u+l*p+n*c+e[13],E[14]=T*u+t*p+o*c+e[14],E[15]=m*u+a*p+i*c+e[15]),E}},88654:function(D){D.exports=function(E,e){if(E===e){var _=e[1],w=e[2],s=e[3],T=e[6],m=e[7],f=e[11];E[1]=e[4],E[2]=e[8],E[3]=e[12],E[4]=_,E[6]=e[9],E[7]=e[13],E[8]=w,E[9]=T,E[11]=e[14],E[12]=s,E[13]=m,E[14]=f}else E[0]=e[0],E[1]=e[4],E[2]=e[8],E[3]=e[12],E[4]=e[1],E[5]=e[5],E[6]=e[9],E[7]=e[13],E[8]=e[2],E[9]=e[6],E[10]=e[10],E[11]=e[14],E[12]=e[3],E[13]=e[7],E[14]=e[11],E[15]=e[15];return E}},42505:function(D,E,e){var _=e(72791),w=e(71299),s=e(98580),T=e(12018),m=e(83522),f=e(25075),l=e(68016),t=e(58404),a=e(18863),r=e(10973),n=e(25677),o=e(75686),i=e(53545),u=e(56131),p=e(32879),c=e(30120),b=e(13547).nextPow2,d=new m,v=!1;if(document.body){var x=document.body.appendChild(document.createElement("div"));x.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(x).fontStretch&&(v=!0),document.body.removeChild(x)}var g=function(y){(function(k){return typeof k=="function"&&k._gl&&k.prop&&k.texture&&k.buffer})(y)?(y={regl:y},this.gl=y.regl._gl):this.gl=T(y),this.shader=d.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=y.regl||s({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(),d.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(r(y)?y:{})};g.prototype.createShader=function(){var y=this.regl,k=y({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:y.prop("count"),offset:y.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:y.this("sizeBuffer")},width:{offset:0,stride:8,buffer:y.this("sizeBuffer")},char:y.this("charBuffer"),position:y.this("position")},uniforms:{atlasSize:function(h,M){return[M.atlas.width,M.atlas.height]},atlasDim:function(h,M){return[M.atlas.cols,M.atlas.rows]},atlas:function(h,M){return M.atlas.texture},charStep:function(h,M){return M.atlas.step},em:function(h,M){return M.atlas.em},color:y.prop("color"),opacity:y.prop("opacity"),viewport:y.this("viewportArray"),scale:y.this("scale"),align:y.prop("align"),baseline:y.prop("baseline"),translate:y.this("translate"),positionOffset:y.prop("positionOffset")},primitive:"points",viewport:y.this("viewport"),vert:` +`):H=" ".concat(I," ").concat(H)),L=T(this,r(h).call(this,"".concat(V).concat(H)))}return Error.stackTraceLimit=G,L.generatedMessage=!P,Object.defineProperty(m(L),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),L.code="ERR_ASSERTION",L.actual=U,L.expected=B,L.operator=I,Error.captureStackTrace&&Error.captureStackTrace(m(L),R),L.stack,L.name="AssertionError",T(L)}var M,A;return function(C,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function");C.prototype=Object.create(L&&L.prototype,{constructor:{value:C,writable:!0,configurable:!0}}),L&&a(C,L)}(h,k),M=h,A=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:o.custom,value:function(C,L){return o(this,function(P){for(var I=1;I2?"one of ".concat(r," ").concat(a.slice(0,n-1).join(", "),", or ")+a[n-1]:n===2?"one of ".concat(r," ").concat(a[0]," or ").concat(a[1]):"of ".concat(r," ").concat(a[0])}return"of ".concat(r," ").concat(String(a))}l("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),l("ERR_INVALID_ARG_TYPE",function(a,r,n){var o,i,u,p,c;if(T===void 0&&(T=e(32791)),T(typeof a=="string","'name' must be a string"),typeof r=="string"&&(i="not ",r.substr(0,i.length)===i)?(o="must not be",r=r.replace(/^not /,"")):o="must be",function(d,v,x){return(x===void 0||x>d.length)&&(x=d.length),d.substring(x-v.length,x)===v}(a," argument"))u="The ".concat(a," ").concat(o," ").concat(t(r,"type"));else{var b=(typeof c!="number"&&(c=0),c+1>(p=a).length||p.indexOf(".",c)===-1?"argument":"property");u='The "'.concat(a,'" ').concat(b," ").concat(o," ").concat(t(r,"type"))}return u+". Received type ".concat(_(n))},TypeError),l("ERR_INVALID_ARG_VALUE",function(a,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";m===void 0&&(m=e(43827));var o=m.inspect(r);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(a,"' ").concat(n,". Received ").concat(o)},TypeError),l("ERR_INVALID_RETURN_VALUE",function(a,r,n){var o;return o=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(_(n)),"Expected ".concat(a,' to be returned from the "').concat(r,'"')+" function but got ".concat(o,".")},TypeError),l("ERR_MISSING_ARGS",function(){for(var a=arguments.length,r=new Array(a),n=0;n0,"At least one arg needs to be specified");var o="The ",i=r.length;switch(r=r.map(function(u){return'"'.concat(u,'"')}),i){case 1:o+="".concat(r[0]," argument");break;case 2:o+="".concat(r[0]," and ").concat(r[1]," arguments");break;default:o+=r.slice(0,i-1).join(", "),o+=", and ".concat(r[i-1]," arguments")}return"".concat(o," must be specified")},TypeError),D.exports.codes=f},74061:function(D,E,e){function _(X,Y){return function(K){if(Array.isArray(K))return K}(X)||function(K,te){var re=[],oe=!0,se=!1,ce=void 0;try{for(var xe,pe=K[Symbol.iterator]();!(oe=(xe=pe.next()).done)&&(re.push(xe.value),!te||re.length!==te);oe=!0);}catch(de){se=!0,ce=de}finally{try{oe||pe.return==null||pe.return()}finally{if(se)throw ce}}return re}(X,Y)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function w(X){return w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Y){return typeof Y}:function(Y){return Y&&typeof Symbol=="function"&&Y.constructor===Symbol&&Y!==Symbol.prototype?"symbol":typeof Y},w(X)}var s=/a/g.flags!==void 0,T=function(X){var Y=[];return X.forEach(function(K){return Y.push(K)}),Y},m=function(X){var Y=[];return X.forEach(function(K,te){return Y.push([te,K])}),Y},f=Object.is?Object.is:e(64003),l=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},t=Number.isNaN?Number.isNaN:e(15567);function a(X){return X.call.bind(X)}var r=a(Object.prototype.hasOwnProperty),n=a(Object.prototype.propertyIsEnumerable),o=a(Object.prototype.toString),i=e(43827).types,u=i.isAnyArrayBuffer,p=i.isArrayBufferView,c=i.isDate,b=i.isMap,d=i.isRegExp,v=i.isSet,x=i.isNativeError,g=i.isBoxedPrimitive,y=i.isNumberObject,k=i.isStringObject,h=i.isBooleanObject,M=i.isBigIntObject,A=i.isSymbolObject,C=i.isFloat32Array,L=i.isFloat64Array;function P(X){if(X.length===0||X.length>10)return!0;for(var Y=0;Y57)return!0}return X.length===10&&X>=Math.pow(2,32)}function I(X){return Object.keys(X).filter(P).concat(l(X).filter(Object.prototype.propertyIsEnumerable.bind(X)))}function R(X,Y){if(X===Y)return 0;for(var K=X.length,te=Y.length,re=0,oe=Math.min(K,te);re0?o-4:o;for(r=0;r>16&255,u[p++]=a>>8&255,u[p++]=255&a;return i===2&&(a=_[t.charCodeAt(r)]<<2|_[t.charCodeAt(r+1)]>>4,u[p++]=255&a),i===1&&(a=_[t.charCodeAt(r)]<<10|_[t.charCodeAt(r+1)]<<4|_[t.charCodeAt(r+2)]>>2,u[p++]=a>>8&255,u[p++]=255&a),u},E.fromByteArray=function(t){for(var a,r=t.length,n=r%3,o=[],i=16383,u=0,p=r-n;up?p:u+i));return n===1?(a=t[r-1],o.push(e[a>>2]+e[a<<4&63]+"==")):n===2&&(a=(t[r-2]<<8)+t[r-1],o.push(e[a>>10]+e[a>>4&63]+e[a<<2&63]+"=")),o.join("")};for(var e=[],_=[],w=typeof Uint8Array<"u"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T=0,m=s.length;T0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return r===-1&&(r=a),[r,r===a?0:4-r%4]}function l(t,a,r){for(var n,o,i=[],u=a;u>18&63]+e[o>>12&63]+e[o>>6&63]+e[63&o]);return i.join("")}_["-".charCodeAt(0)]=62,_["_".charCodeAt(0)]=63},91358:function(D){function E(m,f,l,t,a){for(var r=a+1;t<=a;){var n=t+a>>>1,o=m[n];(l!==void 0?l(o,f):o-f)>=0?(r=n,a=n-1):t=n+1}return r}function e(m,f,l,t,a){for(var r=a+1;t<=a;){var n=t+a>>>1,o=m[n];(l!==void 0?l(o,f):o-f)>0?(r=n,a=n-1):t=n+1}return r}function _(m,f,l,t,a){for(var r=t-1;t<=a;){var n=t+a>>>1,o=m[n];(l!==void 0?l(o,f):o-f)<0?(r=n,t=n+1):a=n-1}return r}function w(m,f,l,t,a){for(var r=t-1;t<=a;){var n=t+a>>>1,o=m[n];(l!==void 0?l(o,f):o-f)<=0?(r=n,t=n+1):a=n-1}return r}function s(m,f,l,t,a){for(;t<=a;){var r=t+a>>>1,n=m[r],o=l!==void 0?l(n,f):n-f;if(o===0)return r;o<=0?t=r+1:a=r-1}return-1}function T(m,f,l,t,a,r){return typeof l=="function"?r(m,f,l,t===void 0?0:0|t,a===void 0?m.length-1:0|a):r(m,f,void 0,l===void 0?0:0|l,t===void 0?m.length-1:0|t)}D.exports={ge:function(m,f,l,t,a){return T(m,f,l,t,a,E)},gt:function(m,f,l,t,a){return T(m,f,l,t,a,e)},lt:function(m,f,l,t,a){return T(m,f,l,t,a,_)},le:function(m,f,l,t,a){return T(m,f,l,t,a,w)},eq:function(m,f,l,t,a){return T(m,f,l,t,a,s)}}},13547:function(D,E){function e(w){var s=32;return(w&=-w)&&s--,65535&w&&(s-=16),16711935&w&&(s-=8),252645135&w&&(s-=4),858993459&w&&(s-=2),1431655765&w&&(s-=1),s}E.INT_BITS=32,E.INT_MAX=2147483647,E.INT_MIN=-2147483648,E.sign=function(w){return(w>0)-(w<0)},E.abs=function(w){var s=w>>31;return(w^s)-s},E.min=function(w,s){return s^(w^s)&-(w65535)<<4,s|=T=((w>>>=s)>255)<<3,s|=T=((w>>>=T)>15)<<2,(s|=T=((w>>>=T)>3)<<1)|(w>>>=T)>>1},E.log10=function(w){return w>=1e9?9:w>=1e8?8:w>=1e7?7:w>=1e6?6:w>=1e5?5:w>=1e4?4:w>=1e3?3:w>=100?2:w>=10?1:0},E.popCount=function(w){return 16843009*((w=(858993459&(w-=w>>>1&1431655765))+(w>>>2&858993459))+(w>>>4)&252645135)>>>24},E.countTrailingZeros=e,E.nextPow2=function(w){return w+=w===0,--w,w|=w>>>1,w|=w>>>2,w|=w>>>4,w|=w>>>8,1+(w|=w>>>16)},E.prevPow2=function(w){return w|=w>>>1,w|=w>>>2,w|=w>>>4,w|=w>>>8,(w|=w>>>16)-(w>>>1)},E.parity=function(w){return w^=w>>>16,w^=w>>>8,w^=w>>>4,27030>>>(w&=15)&1};var _=new Array(256);(function(w){for(var s=0;s<256;++s){var T=s,m=s,f=7;for(T>>>=1;T;T>>>=1)m<<=1,m|=1&T,--f;w[s]=m<>>8&255]<<16|_[w>>>16&255]<<8|_[w>>>24&255]},E.interleave2=function(w,s){return(w=1431655765&((w=858993459&((w=252645135&((w=16711935&((w&=65535)|w<<8))|w<<4))|w<<2))|w<<1))|(s=1431655765&((s=858993459&((s=252645135&((s=16711935&((s&=65535)|s<<8))|s<<4))|s<<2))|s<<1))<<1},E.deinterleave2=function(w,s){return(w=65535&((w=16711935&((w=252645135&((w=858993459&((w=w>>>s&1431655765)|w>>>1))|w>>>2))|w>>>4))|w>>>16))<<16>>16},E.interleave3=function(w,s,T){return w=1227133513&((w=3272356035&((w=251719695&((w=4278190335&((w&=1023)|w<<16))|w<<8))|w<<4))|w<<2),(w|=(s=1227133513&((s=3272356035&((s=251719695&((s=4278190335&((s&=1023)|s<<16))|s<<8))|s<<4))|s<<2))<<1)|(T=1227133513&((T=3272356035&((T=251719695&((T=4278190335&((T&=1023)|T<<16))|T<<8))|T<<4))|T<<2))<<2},E.deinterleave3=function(w,s){return(w=1023&((w=4278190335&((w=251719695&((w=3272356035&((w=w>>>s&1227133513)|w>>>2))|w>>>4))|w>>>8))|w>>>16))<<22>>22},E.nextCombination=function(w){var s=w|w-1;return s+1|(~s&-~s)-1>>>e(w)+1}},44781:function(D,E,e){var _=e(53435);D.exports=function(m,f){f||(f={});var l,t,a,r,n,o,i,u,p,c,b,d=f.cutoff==null?.25:f.cutoff,v=f.radius==null?8:f.radius,x=f.channel||0;if(ArrayBuffer.isView(m)||Array.isArray(m)){if(!f.width||!f.height)throw Error("For raw data width and height should be provided by options");l=f.width,t=f.height,r=m,o=f.stride?f.stride:Math.floor(m.length/l/t)}else window.HTMLCanvasElement&&m instanceof window.HTMLCanvasElement?(i=(u=m).getContext("2d"),l=u.width,t=u.height,r=(p=i.getImageData(0,0,l,t)).data,o=4):window.CanvasRenderingContext2D&&m instanceof window.CanvasRenderingContext2D?(i=m,l=(u=m.canvas).width,t=u.height,r=(p=i.getImageData(0,0,l,t)).data,o=4):window.ImageData&&m instanceof window.ImageData&&(p=m,l=m.width,t=m.height,r=p.data,o=4);if(a=Math.max(l,t),window.Uint8ClampedArray&&r instanceof window.Uint8ClampedArray||window.Uint8Array&&r instanceof window.Uint8Array)for(n=r,r=Array(l*t),c=0,b=n.length;c-1?w(f):f}},68222:function(D,E,e){var _=e(77575),w=e(68318),s=w("%Function.prototype.apply%"),T=w("%Function.prototype.call%"),m=w("%Reflect.apply%",!0)||_.call(T,s),f=w("%Object.getOwnPropertyDescriptor%",!0),l=w("%Object.defineProperty%",!0),t=w("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}D.exports=function(r){var n=m(_,T,arguments);if(f&&l){var o=f(n,"length");o.configurable&&l(n,"length",{value:1+t(0,r.length-(arguments.length-1))})}return n};var a=function(){return m(_,s,arguments)};l?l(D.exports,"apply",{value:a}):D.exports.apply=a},53435:function(D){D.exports=function(E,e,_){return e<_?E_?_:E:E<_?_:E>e?e:E}},6475:function(D,E,e){var _=e(53435);function w(s,T){T==null&&(T=!0);var m=s[0],f=s[1],l=s[2],t=s[3];return t==null&&(t=T?1:255),T&&(m*=255,f*=255,l*=255,t*=255),16777216*(m=255&_(m,0,255))+((f=255&_(f,0,255))<<16)+((l=255&_(l,0,255))<<8)+(255&_(t,0,255))}D.exports=w,D.exports.to=w,D.exports.from=function(s,T){var m=(s=+s)>>>24,f=(16711680&s)>>>16,l=(65280&s)>>>8,t=255&s;return T===!1?[m,f,l,t]:[m/255,f/255,l/255,t/255]}},76857:function(D){D.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(D,E,e){var _=e(36652),w=e(53435),s=e(90660);D.exports=function(T,m){m!=="float"&&m||(m="array"),m==="uint"&&(m="uint8"),m==="uint_clamped"&&(m="uint8_clamped");var f=new(s(m))(4),l=m!=="uint8"&&m!=="uint8_clamped";return T.length&&typeof T!="string"||((T=_(T))[0]/=255,T[1]/=255,T[2]/=255),function(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||!!(Array.isArray(t)&&(t[0]>1||t[0]===0)&&(t[1]>1||t[1]===0)&&(t[2]>1||t[2]===0)&&(!t[3]||t[3]>1))}(T)?(f[0]=T[0],f[1]=T[1],f[2]=T[2],f[3]=T[3]!=null?T[3]:255,l&&(f[0]/=255,f[1]/=255,f[2]/=255,f[3]/=255),f):(l?(f[0]=T[0],f[1]=T[1],f[2]=T[2],f[3]=T[3]!=null?T[3]:1):(f[0]=w(Math.floor(255*T[0]),0,255),f[1]=w(Math.floor(255*T[1]),0,255),f[2]=w(Math.floor(255*T[2]),0,255),f[3]=T[3]==null?255:w(Math.floor(255*T[3]),0,255)),f)}},90736:function(D,E,e){var _=e(76857),w=e(10973),s=e(46775);D.exports=function(m){var f,l,t=[],a=1;if(typeof m=="string")if(_[m])t=_[m].slice(),l="rgb";else if(m==="transparent")a=0,l="rgb",t=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(m)){var r=(i=m.slice(1)).length;a=1,r<=4?(t=[parseInt(i[0]+i[0],16),parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16)],r===4&&(a=parseInt(i[3]+i[3],16)/255)):(t=[parseInt(i[0]+i[1],16),parseInt(i[2]+i[3],16),parseInt(i[4]+i[5],16)],r===8&&(a=parseInt(i[6]+i[7],16)/255)),t[0]||(t[0]=0),t[1]||(t[1]=0),t[2]||(t[2]=0),l="rgb"}else if(f=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(m)){var n=f[1],o=n==="rgb",i=n.replace(/a$/,"");l=i,r=i==="cmyk"?4:i==="gray"?1:3,t=f[2].trim().split(/\s*,\s*/).map(function(p,c){if(/%$/.test(p))return c===r?parseFloat(p)/100:i==="rgb"?255*parseFloat(p)/100:parseFloat(p);if(i[c]==="h"){if(/deg$/.test(p))return parseFloat(p);if(T[p]!==void 0)return T[p]}return parseFloat(p)}),n===i&&t.push(1),a=o||t[r]===void 0?1:t[r],t=t.slice(0,r)}else m.length>10&&/[0-9](?:\s|\/)/.test(m)&&(t=m.match(/([0-9]+)/g).map(function(p){return parseFloat(p)}),l=m.match(/([a-z])/gi).join("").toLowerCase());else if(isNaN(m))if(w(m)){var u=s(m.r,m.red,m.R,null);u!==null?(l="rgb",t=[u,s(m.g,m.green,m.G),s(m.b,m.blue,m.B)]):(l="hsl",t=[s(m.h,m.hue,m.H),s(m.s,m.saturation,m.S),s(m.l,m.lightness,m.L,m.b,m.brightness)]),a=s(m.a,m.alpha,m.opacity,1),m.opacity!=null&&(a/=100)}else(Array.isArray(m)||e.g.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(m))&&(t=[m[0],m[1],m[2]],l="rgb",a=m.length===4?m[3]:1);else l="rgb",t=[m>>>16,(65280&m)>>>8,255&m];return{space:l,values:t,alpha:a}};var T={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},36652:function(D,E,e){var _=e(90736),w=e(80009),s=e(53435);D.exports=function(T){var m,f=_(T);return f.space?((m=Array(3))[0]=s(f.values[0],0,255),m[1]=s(f.values[1],0,255),m[2]=s(f.values[2],0,255),f.space[0]==="h"&&(m=w.rgb(m)),m.push(s(f.alpha,0,1)),m):[]}},80009:function(D,E,e){var _=e(6866);D.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(w){var s,T,m,f,l,t=w[0]/360,a=w[1]/100,r=w[2]/100;if(a===0)return[l=255*r,l,l];s=2*r-(T=r<.5?r*(1+a):r+a-r*a),f=[0,0,0];for(var n=0;n<3;n++)(m=t+.3333333333333333*-(n-1))<0?m++:m>1&&m--,l=6*m<1?s+6*(T-s)*m:2*m<1?T:3*m<2?s+(T-s)*(.6666666666666666-m)*6:s,f[n]=255*l;return f}},_.hsl=function(w){var s,T,m=w[0]/255,f=w[1]/255,l=w[2]/255,t=Math.min(m,f,l),a=Math.max(m,f,l),r=a-t;return a===t?s=0:m===a?s=(f-l)/r:f===a?s=2+(l-m)/r:l===a&&(s=4+(m-f)/r),(s=Math.min(60*s,360))<0&&(s+=360),T=(t+a)/2,[s,100*(a===t?0:T<=.5?r/(a+t):r/(2-a-t)),100*T]}},6866:function(D){D.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},24138:function(D){D.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(D,E,e){D.exports={parse:e(41004),stringify:e(53313)}},63625:function(D,E,e){var _=e(40402);D.exports={isSize:function(w){return/^[\d\.]/.test(w)||w.indexOf("/")!==-1||_.indexOf(w)!==-1}}},41004:function(D,E,e){var _=e(90448),w=e(38732),s=e(41901),T=e(15659),m=e(96209),f=e(83794),l=e(99011),t=e(63625).isSize;D.exports=r;var a=r.cache={};function r(o){if(typeof o!="string")throw new Error("Font argument must be a string.");if(a[o])return a[o];if(o==="")throw new Error("Cannot parse an empty string.");if(s.indexOf(o)!==-1)return a[o]={system:o};for(var i,u={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},p=l(o,/\s+/);i=p.shift();){if(w.indexOf(i)!==-1)return["style","variant","weight","stretch"].forEach(function(b){u[b]=i}),a[o]=u;if(m.indexOf(i)===-1)if(i!=="normal"&&i!=="small-caps")if(f.indexOf(i)===-1){if(T.indexOf(i)===-1){if(t(i)){var c=l(i,"/");if(u.size=c[0],c[1]!=null?u.lineHeight=n(c[1]):p[0]==="/"&&(p.shift(),u.lineHeight=n(p.shift())),!p.length)throw new Error("Missing required font-family.");return u.family=l(p.join(" "),/\s*,\s*/).map(_),a[o]=u}throw new Error("Unknown or unsupported font token: "+i)}u.weight=i}else u.stretch=i;else u.variant=i;else u.style=i}throw new Error("Missing required font-size.")}function n(o){var i=parseFloat(o);return i.toString()===o?i:o}},53313:function(D,E,e){var _=e(71299),w=e(63625).isSize,s=o(e(38732)),T=o(e(41901)),m=o(e(15659)),f=o(e(96209)),l=o(e(83794)),t={normal:1,"small-caps":1},a={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},r="serif";function n(i,u){if(i&&!u[i]&&!s[i])throw Error("Unknown keyword `"+i+"`");return i}function o(i){for(var u={},p=0;po?1:n>=o?0:NaN}e.d(E,{j2:function(){return _},Fp:function(){return T},J6:function(){return f},TS:function(){return l},VV:function(){return t},w6:function(){return a},Sm:function(){return r}}),(w=_).length===1&&(s=w,w=function(n,o){return _(s(n),o)});var w,s;function T(n,o){var i,u,p=n.length,c=-1;if(o==null){for(;++c=i)for(u=i;++cu&&(u=i)}else for(;++c=i)for(u=i;++cu&&(u=i);return u}function m(n){return n===null?NaN:+n}function f(n,o){var i,u=n.length,p=u,c=-1,b=0;if(o==null)for(;++c=0;)for(o=(u=n[p]).length;--o>=0;)i[--b]=u[o];return i}function t(n,o){var i,u,p=n.length,c=-1;if(o==null){for(;++c=i)for(u=i;++ci&&(u=i)}else for(;++c=i)for(u=i;++ci&&(u=i);return u}function a(n,o,i){n=+n,o=+o,i=(p=arguments.length)<2?(o=n,n=0,1):p<3?1:+i;for(var u=-1,p=0|Math.max(0,Math.ceil((o-n)/i)),c=new Array(p);++u=p.length)return o!=null&&v.sort(o),i!=null?i(v):v;for(var k,h,M,A=-1,C=v.length,L=p[x++],P=T(),I=g();++Ap.length)return v;var g,y=c[x-1];return i!=null&&x>=p.length?g=v.entries():(g=[],v.each(function(k,h){g.push({key:h,values:d(k,x)})})),y!=null?g.sort(function(k,h){return y(k.key,h.key)}):g}return u={object:function(v){return b(v,0,f,l)},map:function(v){return b(v,0,t,a)},entries:function(v){return d(b(v,0,t,a),0)},key:function(v){return p.push(v),u},sortKeys:function(v){return c[p.length-1]=v,u},sortValues:function(v){return o=v,u},rollup:function(v){return i=v,u}}}function f(){return{}}function l(o,i,u){o[i]=u}function t(){return T()}function a(o,i,u){o.set(i,u)}function r(){}var n=T.prototype;r.prototype={constructor:r,has:n.has,add:function(o){return this[_+(o+="")]=o,this},remove:n.remove,clear:n.clear,values:n.keys,size:n.size,empty:n.empty,each:n.each}},49887:function(D,E,e){function _(de,he){var ye;function ze(){var Te,Ae,Me=ye.length,Ce=0,ne=0;for(Te=0;Te=(Ae=(je+be)/2))?je=Ae:be=Ae,(me=ye>=(Me=(ge+Se)/2))?ge=Me:Se=Me,Te=Ue,!(Ue=Ue[we=me<<1|ue]))return Te[we]=De,de;if(Ce=+de._x.call(null,Ue.data),ne=+de._y.call(null,Ue.data),he===Ce&&ye===ne)return De.next=Ue,Te?Te[we]=De:de._root=De,de;do Te=Te?Te[we]=new Array(4):de._root=new Array(4),(ue=he>=(Ae=(je+be)/2))?je=Ae:be=Ae,(me=ye>=(Me=(ge+Se)/2))?ge=Me:Se=Me;while((we=me<<1|ue)==(Ee=(ne>=Me)<<1|Ce>=Ae));return Te[Ee]=Ue,Te[we]=De,de}function m(de,he,ye,ze,Te){this.node=de,this.x0=he,this.y0=ye,this.x1=ze,this.y1=Te}function f(de){return de[0]}function l(de){return de[1]}function t(de,he,ye){var ze=new a(he??f,ye??l,NaN,NaN,NaN,NaN);return de==null?ze:ze.addAll(de)}function a(de,he,ye,ze,Te,Ae){this._x=de,this._y=he,this._x0=ye,this._y0=ze,this._x1=Te,this._y1=Ae,this._root=void 0}function r(de){for(var he={data:de.data},ye=he;de=de.next;)ye=ye.next={data:de.data};return he}e.r(E),e.d(E,{forceCenter:function(){return _},forceCollide:function(){return u},forceLink:function(){return d},forceManyBody:function(){return se},forceRadial:function(){return ce},forceSimulation:function(){return oe},forceX:function(){return xe},forceY:function(){return pe}});var n=t.prototype=a.prototype;function o(de){return de.x+de.vx}function i(de){return de.y+de.vy}function u(de){var he,ye,ze=1,Te=1;function Ae(){for(var ne,ue,me,we,Ee,Ue,De,je=he.length,ge=0;gewe+yt||ZeEe+yt||stme.index){var Et=we-ot.x-ot.vx,Tt=Ee-ot.y-ot.vy,xt=Et*Et+Tt*Tt;xtne.r&&(ne.r=ne[ue].r)}function Ce(){if(he){var ne,ue,me=he.length;for(ye=new Array(me),ne=0;neme&&(me=ze),Tewe&&(we=Te));if(ne>me||ue>we)return this;for(this.cover(ne,ue).cover(me,we),ye=0;yede||de>=Te||ze>he||he>=Ae;)switch(Ce=(heEe||(Ae=ne.y0)>Ue||(Me=ne.x1)=be)<<1|de>=ge)&&(ne=De[De.length-1],De[De.length-1]=De[De.length-1-ue],De[De.length-1-ue]=ne)}else{var Se=de-+this._x.call(null,je.data),Ne=he-+this._y.call(null,je.data),Ye=Se*Se+Ne*Ne;if(Ye=(Ce=(De+ge)/2))?De=Ce:ge=Ce,(me=Me>=(ne=(je+be)/2))?je=ne:be=ne,he=Ue,!(Ue=Ue[we=me<<1|ue]))return this;if(!Ue.length)break;(he[we+1&3]||he[we+2&3]||he[we+3&3])&&(ye=he,Ee=we)}for(;Ue.data!==de;)if(ze=Ue,!(Ue=Ue.next))return this;return(Te=Ue.next)&&delete Ue.next,ze?(Te?ze.next=Te:delete ze.next,this):he?(Te?he[we]=Te:delete he[we],(Ue=he[0]||he[1]||he[2]||he[3])&&Ue===(he[3]||he[2]||he[1]||he[0])&&!Ue.length&&(ye?ye[Ee]=Ue:this._root=Ue),this):(this._root=Te,this)},n.removeAll=function(de){for(var he=0,ye=de.length;he=0&&(ze=ye.slice(Te+1),ye=ye.slice(0,Te)),ye&&!he.hasOwnProperty(ye))throw new Error("unknown type: "+ye);return{type:ye,name:ze}})}function k(de,he){for(var ye,ze=0,Te=de.length;ze0)for(var ye,ze,Te=new Array(ye),Ae=0;Ae=0&&he._call.call(null,de),he=he._next;--L})()}finally{L=0,function(){for(var de,he,ye=M,ze=1/0;ye;)ye._call?(ze>ye._time&&(ze=ye._time),de=ye,ye=ye._next):(he=ye._next,ye._next=null,ye=de?de._next=he:M=he);A=de,Y(ze)}(),U=0}}function X(){var de=G.now(),he=de-R;he>1e3&&(B-=he,R=de)}function Y(de){L||(P&&(P=clearTimeout(P)),de-U>24?(de<1/0&&(P=setTimeout(Q,de-G.now()-B)),I&&(I=clearInterval(I))):(I||(R=G.now(),I=setInterval(X,1e3)),L=1,N(Q)))}function K(de){return de.x}function te(de){return de.y}H.prototype=ee.prototype={constructor:H,restart:function(de,he,ye){if(typeof de!="function")throw new TypeError("callback is not a function");ye=(ye==null?j():+ye)+(he==null?0:+he),this._next||A===this||(A?A._next=this:M=this,A=this),this._call=de,this._time=ye,Y()},stop:function(){this._call&&(this._call=null,this._time=1/0,Y())}};var re=Math.PI*(3-Math.sqrt(5));function oe(de){var he,ye=1,ze=.001,Te=1-Math.pow(ze,1/300),Ae=0,Me=.6,Ce=(0,p.UI)(),ne=ee(me),ue=C("tick","end");function me(){we(),ue.call("tick",he),ye1?(je==null?Ce.remove(De):Ce.set(De,Ue(je)),he):Ce.get(De)},find:function(De,je,ge){var be,Se,Ne,Ye,Ze,st=0,ot=de.length;for(ge==null?ge=1/0:ge*=ge,st=0;st1?(ue.on(De,je),he):ue.on(De)}}}function se(){var de,he,ye,ze,Te=w(-30),Ae=1,Me=1/0,Ce=.81;function ne(Ee){var Ue,De=de.length,je=t(de,K,te).visitAfter(me);for(ye=Ee,Ue=0;Ue=Me)){(Ee.data!==he||Ee.next)&&(ge===0&&(Ne+=(ge=s())*ge),be===0&&(Ne+=(be=s())*be),Ne1?b[0]+b.slice(2):b,+u.slice(c+1)]}e.d(E,{WU:function(){return r},FF:function(){return i}});var w,s=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function T(u){if(!(p=s.exec(u)))throw new Error("invalid format: "+u);var p;return new m({fill:p[1],align:p[2],sign:p[3],symbol:p[4],zero:p[5],width:p[6],comma:p[7],precision:p[8]&&p[8].slice(1),trim:p[9],type:p[10]})}function m(u){this.fill=u.fill===void 0?" ":u.fill+"",this.align=u.align===void 0?">":u.align+"",this.sign=u.sign===void 0?"-":u.sign+"",this.symbol=u.symbol===void 0?"":u.symbol+"",this.zero=!!u.zero,this.width=u.width===void 0?void 0:+u.width,this.comma=!!u.comma,this.precision=u.precision===void 0?void 0:+u.precision,this.trim=!!u.trim,this.type=u.type===void 0?"":u.type+""}function f(u,p){var c=_(u,p);if(!c)return u+"";var b=c[0],d=c[1];return d<0?"0."+new Array(-d).join("0")+b:b.length>d+1?b.slice(0,d+1)+"."+b.slice(d+1):b+new Array(d-b.length+2).join("0")}T.prototype=m.prototype,m.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,0|this.width))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var l={"%":function(u,p){return(100*u).toFixed(p)},b:function(u){return Math.round(u).toString(2)},c:function(u){return u+""},d:function(u){return Math.abs(u=Math.round(u))>=1e21?u.toLocaleString("en").replace(/,/g,""):u.toString(10)},e:function(u,p){return u.toExponential(p)},f:function(u,p){return u.toFixed(p)},g:function(u,p){return u.toPrecision(p)},o:function(u){return Math.round(u).toString(8)},p:function(u,p){return f(100*u,p)},r:f,s:function(u,p){var c=_(u,p);if(!c)return u+"";var b=c[0],d=c[1],v=d-(w=3*Math.max(-8,Math.min(8,Math.floor(d/3))))+1,x=b.length;return v===x?b:v>x?b+new Array(v-x+1).join("0"):v>0?b.slice(0,v)+"."+b.slice(v):"0."+new Array(1-v).join("0")+_(u,Math.max(0,p+v-1))[0]},X:function(u){return Math.round(u).toString(16).toUpperCase()},x:function(u){return Math.round(u).toString(16)}};function t(u){return u}var a,r,n=Array.prototype.map,o=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function i(u){var p,c,b=u.grouping===void 0||u.thousands===void 0?t:(p=n.call(u.grouping,Number),c=u.thousands+"",function(A,C){for(var L=A.length,P=[],I=0,R=p[0],U=0;L>0&&R>0&&(U+R+1>C&&(R=Math.max(1,C-U)),P.push(A.substring(L-=R,L+R)),!((U+=R+1)>C));)R=p[I=(I+1)%p.length];return P.reverse().join(c)}),d=u.currency===void 0?"":u.currency[0]+"",v=u.currency===void 0?"":u.currency[1]+"",x=u.decimal===void 0?".":u.decimal+"",g=u.numerals===void 0?t:function(A){return function(C){return C.replace(/[0-9]/g,function(L){return A[+L]})}}(n.call(u.numerals,String)),y=u.percent===void 0?"%":u.percent+"",k=u.minus===void 0?"-":u.minus+"",h=u.nan===void 0?"NaN":u.nan+"";function M(A){var C=(A=T(A)).fill,L=A.align,P=A.sign,I=A.symbol,R=A.zero,U=A.width,B=A.comma,G=A.precision,N=A.trim,j=A.type;j==="n"?(B=!0,j="g"):l[j]||(G===void 0&&(G=12),N=!0,j="g"),(R||C==="0"&&L==="=")&&(R=!0,C="0",L="=");var V=I==="$"?d:I==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():"",H=I==="$"?v:/[%p]/.test(j)?y:"",ee=l[j],Q=/[defgprs%]/.test(j);function X(Y){var K,te,re,oe=V,se=H;if(j==="c")se=ee(Y)+se,Y="";else{var ce=(Y=+Y)<0||1/Y<0;if(Y=isNaN(Y)?h:ee(Math.abs(Y),G),N&&(Y=function(de){e:for(var he,ye=de.length,ze=1,Te=-1;ze0&&(Te=0)}return Te>0?de.slice(0,Te)+de.slice(he+1):de}(Y)),ce&&+Y==0&&P!=="+"&&(ce=!1),oe=(ce?P==="("?P:k:P==="-"||P==="("?"":P)+oe,se=(j==="s"?o[8+w/3]:"")+se+(ce&&P==="("?")":""),Q){for(K=-1,te=Y.length;++K(re=Y.charCodeAt(K))||re>57){se=(re===46?x+Y.slice(K+1):Y.slice(K))+se,Y=Y.slice(0,K);break}}}B&&!R&&(Y=b(Y,1/0));var xe=oe.length+Y.length+se.length,pe=xe>1)+oe+Y+se+pe.slice(xe);break;default:Y=pe+oe+Y+se}return g(Y)}return G=G===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,G)):Math.max(0,Math.min(20,G)),X.toString=function(){return A+""},X}return{format:M,formatPrefix:function(A,C){var L,P=M(((A=T(A)).type="f",A)),I=3*Math.max(-8,Math.min(8,Math.floor((L=C,((L=_(Math.abs(L)))?L[1]:NaN)/3)))),R=Math.pow(10,-I),U=o[8+I/3];return function(B){return P(R*B)+U}}}}a=i({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),r=a.format,a.formatPrefix},65704:function(D,E,e){e.r(E),e.d(E,{geoAiry:function(){return B},geoAiryRaw:function(){return U},geoAitoff:function(){return N},geoAitoffRaw:function(){return G},geoArmadillo:function(){return V},geoArmadilloRaw:function(){return j},geoAugust:function(){return ee},geoAugustRaw:function(){return H},geoBaker:function(){return K},geoBakerRaw:function(){return Y},geoBerghaus:function(){return oe},geoBerghausRaw:function(){return re},geoBertin1953:function(){return ze},geoBertin1953Raw:function(){return ye},geoBoggs:function(){return we},geoBoggsRaw:function(){return me},geoBonne:function(){return ge},geoBonneRaw:function(){return je},geoBottomley:function(){return Se},geoBottomleyRaw:function(){return be},geoBromley:function(){return Ye},geoBromleyRaw:function(){return Ne},geoChamberlin:function(){return Dt},geoChamberlinAfrica:function(){return xt},geoChamberlinRaw:function(){return Et},geoCollignon:function(){return Ft},geoCollignonRaw:function(){return It},geoCraig:function(){return Nt},geoCraigRaw:function(){return qt},geoCraster:function(){return Ge},geoCrasterRaw:function(){return Ke},geoCylindricalEqualArea:function(){return ht},geoCylindricalEqualAreaRaw:function(){return nt},geoCylindricalStereographic:function(){return Be},geoCylindricalStereographicRaw:function(){return Oe},geoEckert1:function(){return ut},geoEckert1Raw:function(){return Qe},geoEckert2:function(){return bt},geoEckert2Raw:function(){return pt},geoEckert3:function(){return Ct},geoEckert3Raw:function(){return Lt},geoEckert4:function(){return Ot},geoEckert4Raw:function(){return mt},geoEckert5:function(){return Pt},geoEckert5Raw:function(){return _t},geoEckert6:function(){return Wt},geoEckert6Raw:function(){return Bt},geoEisenlohr:function(){return Kt},geoEisenlohrRaw:function(){return Xt},geoFahey:function(){return ln},geoFaheyRaw:function(){return yn},geoFoucaut:function(){return Wn},geoFoucautRaw:function(){return kn},geoFoucautSinusoidal:function(){return on},geoFoucautSinusoidalRaw:function(){return wn},geoGilbert:function(){return Cn},geoGingery:function(){return or},geoGingeryRaw:function(){return Nn},geoGinzburg4:function(){return gr},geoGinzburg4Raw:function(){return Tr},geoGinzburg5:function(){return dr},geoGinzburg5Raw:function(){return ir},geoGinzburg6:function(){return $t},geoGinzburg6Raw:function(){return yr},geoGinzburg8:function(){return Ln},geoGinzburg8Raw:function(){return mn},geoGinzburg9:function(){return jn},geoGinzburg9Raw:function(){return En},geoGringorten:function(){return Qn},geoGringortenQuincuncial:function(){return Wl},geoGringortenRaw:function(){return Zn},geoGuyou:function(){return jt},geoGuyouRaw:function(){return Pn},geoHammer:function(){return pe},geoHammerRaw:function(){return ce},geoHammerRetroazimuthal:function(){return On},geoHammerRetroazimuthalRaw:function(){return un},geoHealpix:function(){return er},geoHealpixRaw:function(){return vn},geoHill:function(){return lr},geoHillRaw:function(){return Jn},geoHomolosine:function(){return Mr},geoHomolosineRaw:function(){return Sr},geoHufnagel:function(){return pr},geoHufnagelRaw:function(){return Lr},geoHyperelliptical:function(){return Ti},geoHyperellipticalRaw:function(){return ci},geoInterrupt:function(){return xi},geoInterruptedBoggs:function(){return Ka},geoInterruptedHomolosine:function(){return Xs},geoInterruptedMollweide:function(){return pu},geoInterruptedMollweideHemispheres:function(){return Qa},geoInterruptedQuarticAuthalic:function(){return Rs},geoInterruptedSinuMollweide:function(){return Qi},geoInterruptedSinusoidal:function(){return qa},geoKavrayskiy7:function(){return fs},geoKavrayskiy7Raw:function(){return eo},geoLagrange:function(){return hs},geoLagrangeRaw:function(){return fi},geoLarrivee:function(){return Ro},geoLarriveeRaw:function(){return bo},geoLaskowski:function(){return Vu},geoLaskowskiRaw:function(){return xl},geoLittrow:function(){return Hu},geoLittrowRaw:function(){return Xo},geoLoximuthal:function(){return Ec},geoLoximuthalRaw:function(){return qu},geoMiller:function(){return Gu},geoMillerRaw:function(){return gu},geoModifiedStereographic:function(){return Ps},geoModifiedStereographicAlaska:function(){return yu},geoModifiedStereographicGs48:function(){return Ls},geoModifiedStereographicGs50:function(){return Vl},geoModifiedStereographicLee:function(){return Ks},geoModifiedStereographicMiller:function(){return ps},geoModifiedStereographicRaw:function(){return vu},geoMollweide:function(){return Ce},geoMollweideRaw:function(){return Me},geoMtFlatPolarParabolic:function(){return Cc},geoMtFlatPolarParabolicRaw:function(){return ds},geoMtFlatPolarQuartic:function(){return bl},geoMtFlatPolarQuarticRaw:function(){return Hl},geoMtFlatPolarSinusoidal:function(){return Qs},geoMtFlatPolarSinusoidalRaw:function(){return Os},geoNaturalEarth:function(){return oo.Z},geoNaturalEarth2:function(){return _l},geoNaturalEarth2Raw:function(){return xu},geoNaturalEarthRaw:function(){return oo.K},geoNellHammer:function(){return wl},geoNellHammerRaw:function(){return el},geoNicolosi:function(){return Tl},geoNicolosiRaw:function(){return tl},geoPatterson:function(){return ql},geoPattersonRaw:function(){return gs},geoPeirceQuincuncial:function(){return Zl},geoPierceQuincuncial:function(){return Zl},geoPolyconic:function(){return _u},geoPolyconicRaw:function(){return Sl},geoPolyhedral:function(){return vs},geoPolyhedralButterfly:function(){return Gl},geoPolyhedralCollignon:function(){return Tu},geoPolyhedralWaterman:function(){return Bs},geoProject:function(){return js},geoQuantize:function(){return Sa},geoQuincuncial:function(){return Ga},geoRectangularPolyconic:function(){return Us},geoRectangularPolyconicRaw:function(){return Cr},geoRobinson:function(){return rl},geoRobinsonRaw:function(){return Yl},geoSatellite:function(){return al},geoSatelliteRaw:function(){return il},geoSinuMollweide:function(){return vr},geoSinuMollweideRaw:function(){return cr},geoSinusoidal:function(){return De},geoSinusoidalRaw:function(){return Ue},geoStitch:function(){return Hs},geoTimes:function(){return fo},geoTimesRaw:function(){return xa},geoTwoPointAzimuthal:function(){return ho},geoTwoPointAzimuthalRaw:function(){return Ll},geoTwoPointAzimuthalUsa:function(){return to},geoTwoPointEquidistant:function(){return di},geoTwoPointEquidistantRaw:function(){return Fo},geoTwoPointEquidistantUsa:function(){return za},geoVanDerGrinten:function(){return wo},geoVanDerGrinten2:function(){return Bo},geoVanDerGrinten2Raw:function(){return Da},geoVanDerGrinten3:function(){return rs},geoVanDerGrinten3Raw:function(){return bs},geoVanDerGrinten4:function(){return po},geoVanDerGrinten4Raw:function(){return ba},geoVanDerGrintenRaw:function(){return oa},geoWagner:function(){return Ur},geoWagner4:function(){return $l},geoWagner4Raw:function(){return _a},geoWagner6:function(){return ll},geoWagner6Raw:function(){return Fa},geoWagner7:function(){return sl},geoWagnerRaw:function(){return Fr},geoWiechel:function(){return _i},geoWiechelRaw:function(){return as},geoWinkel3:function(){return Jl},geoWinkel3Raw:function(){return Si}});var _=e(15002),w=Math.abs,s=Math.atan,T=Math.atan2,m=Math.cos,f=Math.exp,l=Math.floor,t=Math.log,a=Math.max,r=Math.min,n=Math.pow,o=Math.round,i=Math.sign||function(et){return et>0?1:et<0?-1:0},u=Math.sin,p=Math.tan,c=1e-6,b=1e-12,d=Math.PI,v=d/2,x=d/4,g=Math.SQRT1_2,y=P(2),k=P(d),h=2*d,M=180/d,A=d/180;function C(et){return et>1?v:et<-1?-v:Math.asin(et)}function L(et){return et>1?0:et<-1?d:Math.acos(et)}function P(et){return et>0?Math.sqrt(et):0}function I(et){return(f(et)-f(-et))/2}function R(et){return(f(et)+f(-et))/2}function U(et){var rt=p(et/2),ct=2*t(m(et/2))/(rt*rt);function vt(Mt,kt){var q=m(Mt),$=m(kt),W=u(kt),ae=$*q,_e=-((1-ae?t((1+ae)/2)/(1-ae):-.5)+ct/(1+ae));return[_e*$*u(Mt),_e*W]}return vt.invert=function(Mt,kt){var q,$=P(Mt*Mt+kt*kt),W=-et/2,ae=50;if(!$)return[0,0];do{var _e=W/2,Re=m(_e),He=u(_e),Xe=He/Re,at=-t(w(Re));W-=q=(2/Xe*at-ct*Xe-$)/(-at/(He*He)+1-ct/(2*Re*Re))*(Re<0?.7:1)}while(w(q)>c&&--ae>0);var wt=u(W);return[T(Mt*wt,$*m(W)),C(kt*wt/$)]},vt}function B(){var et=v,rt=(0,_.r)(U),ct=rt(et);return ct.radius=function(vt){return arguments.length?rt(et=vt*A):et*M},ct.scale(179.976).clipAngle(147)}function G(et,rt){var ct=m(rt),vt=function(Mt){return Mt?Mt/Math.sin(Mt):1}(L(ct*m(et/=2)));return[2*ct*u(et)*vt,u(rt)*vt]}function N(){return(0,_.Z)(G).scale(152.63)}function j(et){var rt=u(et),ct=m(et),vt=et>=0?1:-1,Mt=p(vt*et),kt=(1+rt-ct)/2;function q($,W){var ae=m(W),_e=m($/=2);return[(1+ae)*u($),(vt*W>-T(_e,Mt)-.001?0:10*-vt)+kt+u(W)*ct-(1+ae)*rt*_e]}return q.invert=function($,W){var ae=0,_e=0,Re=50;do{var He=m(ae),Xe=u(ae),at=m(_e),wt=u(_e),At=1+at,ie=At*Xe-$,ve=kt+wt*ct-At*rt*He-W,Le=At*He/2,Fe=-Xe*wt,Ve=rt*At*Xe/2,We=ct*at+rt*He*wt,$e=Fe*Ve-We*Le,tt=(ve*Fe-ie*We)/$e/2,lt=(ie*Ve-ve*Le)/$e;w(lt)>2&&(lt/=2),ae-=tt,_e-=lt}while((w(tt)>c||w(lt)>c)&&--Re>0);return vt*_e>-T(m(ae),Mt)-.001?[2*ae,_e]:null},q}function V(){var et=20*A,rt=et>=0?1:-1,ct=p(rt*et),vt=(0,_.r)(j),Mt=vt(et),kt=Mt.stream;return Mt.parallel=function(q){return arguments.length?(ct=p((rt=(et=q*A)>=0?1:-1)*et),vt(et)):et*M},Mt.stream=function(q){var $=Mt.rotate(),W=kt(q),ae=(Mt.rotate([0,0]),kt(q)),_e=Mt.precision();return Mt.rotate($),W.sphere=function(){ae.polygonStart(),ae.lineStart();for(var Re=-180*rt;rt*Re<180;Re+=90*rt)ae.point(Re,90*rt);if(et)for(;rt*(Re-=3*rt*_e)>=-180;)ae.point(Re,rt*-T(m(Re*A/2),ct)*M);ae.lineEnd(),ae.polygonEnd()},W},Mt.scale(218.695).center([0,28.0974])}function H(et,rt){var ct=p(rt/2),vt=P(1-ct*ct),Mt=1+vt*m(et/=2),kt=u(et)*vt/Mt,q=ct/Mt,$=kt*kt,W=q*q;return[1.3333333333333333*kt*(3+$-3*W),1.3333333333333333*q*(3+3*$-W)]}function ee(){return(0,_.Z)(H).scale(66.1603)}G.invert=function(et,rt){if(!(et*et+4*rt*rt>d*d+c)){var ct=et,vt=rt,Mt=25;do{var kt,q=u(ct),$=u(ct/2),W=m(ct/2),ae=u(vt),_e=m(vt),Re=u(2*vt),He=ae*ae,Xe=_e*_e,at=$*$,wt=1-Xe*W*W,At=wt?L(_e*W)*P(kt=1/wt):kt=0,ie=2*At*_e*$-et,ve=At*ae-rt,Le=kt*(Xe*at+At*_e*W*He),Fe=kt*(.5*q*Re-2*At*ae*$),Ve=.25*kt*(Re*$-At*ae*Xe*q),We=kt*(He*W+At*at*_e),$e=Fe*Ve-We*Le;if(!$e)break;var tt=(ve*Fe-ie*We)/$e,lt=(ie*Ve-ve*Le)/$e;ct-=tt,vt-=lt}while((w(tt)>c||w(lt)>c)&&--Mt>0);return[ct,vt]}},H.invert=function(et,rt){if(rt*=.375,!(et*=.375)&&w(rt)>1)return null;var ct=1+et*et+rt*rt,vt=P((ct-P(ct*ct-4*rt*rt))/2),Mt=C(vt)/3,kt=vt?function(ae){return t(ae+P(ae*ae-1))}(w(rt/vt))/3:function(ae){return t(ae+P(ae*ae+1))}(w(et))/3,q=m(Mt),$=R(kt),W=$*$-q*q;return[2*i(et)*T(I(kt)*q,.25-W),2*i(rt)*T($*u(Mt),.25+W)]};var Q=P(8),X=t(1+y);function Y(et,rt){var ct=w(rt);return ctb&&--kt>0);return[et/(m(Mt)*(Q-1/u(Mt))),i(rt)*Mt]};var te=e(17889);function re(et){var rt=2*d/et;function ct(vt,Mt){var kt=(0,te.N)(vt,Mt);if(w(vt)>v){var q=T(kt[1],kt[0]),$=P(kt[0]*kt[0]+kt[1]*kt[1]),W=rt*o((q-v)/rt)+v,ae=T(u(q-=W),2-m(q));q=W+C(d/$*u(ae))-ae,kt[0]=$*m(q),kt[1]=$*u(q)}return kt}return ct.invert=function(vt,Mt){var kt=P(vt*vt+Mt*Mt);if(kt>v){var q=T(Mt,vt),$=rt*o((q-v)/rt)+v,W=q>$?-1:1,ae=kt*m($-q),_e=1/p(W*L((ae-d)/P(d*(d-2*ae)+kt*kt)));q=$+2*s((_e+W*P(_e*_e-3))/3),vt=kt*m(q),Mt=kt*u(q)}return te.N.invert(vt,Mt)},ct}function oe(){var et=5,rt=(0,_.r)(re),ct=rt(et),vt=ct.stream,Mt=.01,kt=-m(Mt*A),q=u(Mt*A);return ct.lobes=function($){return arguments.length?rt(et=+$):et},ct.stream=function($){var W=ct.rotate(),ae=vt($),_e=(ct.rotate([0,0]),vt($));return ct.rotate(W),ae.sphere=function(){_e.polygonStart(),_e.lineStart();for(var Re=0,He=360/et,Xe=2*d/et,at=90-180/et,wt=v;Re0&&w(vt)>c);return q<0?NaN:ct}function he(et,rt,ct){return rt===void 0&&(rt=40),ct===void 0&&(ct=b),function(vt,Mt,kt,q){var $,W,ae;kt=kt===void 0?0:+kt,q=q===void 0?0:+q;for(var _e=0;_e$)kt-=W/=2,q-=ae/=2;else{$=at;var wt=(kt>0?-1:1)*ct,At=(q>0?-1:1)*ct,ie=et(kt+wt,q),ve=et(kt,q+At),Le=(ie[0]-Re[0])/wt,Fe=(ie[1]-Re[1])/wt,Ve=(ve[0]-Re[0])/At,We=(ve[1]-Re[1])/At,$e=We*Le-Fe*Ve,tt=(w($e)<.5?.5:1)/$e;if(kt+=W=(Xe*Ve-He*We)*tt,q+=ae=(He*Fe-Xe*Le)*tt,w(W)0&&(kt[1]*=1+q/1.5*kt[0]*kt[0]),kt}return rt.invert=he(rt),rt}function ze(){return(0,_.Z)(ye()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Te(et,rt){var ct,vt=et*u(rt),Mt=30;do rt-=ct=(rt+u(rt)-vt)/(1+m(rt));while(w(ct)>c&&--Mt>0);return rt/2}function Ae(et,rt,ct){function vt(Mt,kt){return[et*Mt*m(kt=Te(ct,kt)),rt*u(kt)]}return vt.invert=function(Mt,kt){return kt=C(kt/rt),[Mt/(et*m(kt)),C((2*kt+u(2*kt))/ct)]},vt}xe.invert=function(et,rt){var ct=2*C(rt/2);return[et*m(ct/2)/m(ct),ct]};var Me=Ae(y/v,y,d);function Ce(){return(0,_.Z)(Me).scale(169.529)}var ne=2.00276,ue=1.11072;function me(et,rt){var ct=Te(d,rt);return[ne*et/(1/m(rt)+ue/m(ct)),(rt+y*u(ct))/ne]}function we(){return(0,_.Z)(me).scale(160.857)}function Ee(et){var rt=0,ct=(0,_.r)(et),vt=ct(rt);return vt.parallel=function(Mt){return arguments.length?ct(rt=Mt*A):rt*M},vt}function Ue(et,rt){return[et*m(rt),rt]}function De(){return(0,_.Z)(Ue).scale(152.63)}function je(et){if(!et)return Ue;var rt=1/p(et);function ct(vt,Mt){var kt=rt+et-Mt,q=kt&&vt*m(Mt)/kt;return[kt*u(q),rt-kt*m(q)]}return ct.invert=function(vt,Mt){var kt=P(vt*vt+(Mt=rt-Mt)*Mt),q=rt+et-kt;return[kt/m(q)*T(vt,Mt),q]},ct}function ge(){return Ee(je).scale(123.082).center([0,26.1441]).parallel(45)}function be(et){function rt(ct,vt){var Mt=v-vt,kt=Mt&&ct*et*u(Mt)/Mt;return[Mt*u(kt)/et,v-Mt*m(kt)]}return rt.invert=function(ct,vt){var Mt=ct*et,kt=v-vt,q=P(Mt*Mt+kt*kt),$=T(Mt,kt);return[(q?q/u(q):1)*$/et,v-q]},rt}function Se(){var et=.5,rt=(0,_.r)(be),ct=rt(et);return ct.fraction=function(vt){return arguments.length?rt(et=+vt):et},ct.scale(158.837)}me.invert=function(et,rt){var ct,vt,Mt=ne*rt,kt=rt<0?-x:x,q=25;do vt=Mt-y*u(kt),kt-=ct=(u(2*kt)+2*kt-d*u(vt))/(2*m(2*kt)+2+d*m(vt)*y*m(kt));while(w(ct)>c&&--q>0);return vt=Mt-y*u(kt),[et*(1/m(vt)+ue/m(kt))/ne,vt]},Ue.invert=function(et,rt){return[et/m(rt),rt]};var Ne=Ae(1,4/d,d);function Ye(){return(0,_.Z)(Ne).scale(152.63)}var Ze=e(66624),st=e(49386);function ot(et,rt,ct,vt,Mt,kt){var q,$=m(kt);if(w(et)>1||w(kt)>1)q=L(ct*Mt+rt*vt*$);else{var W=u(et/2),ae=u(kt/2);q=2*C(P(W*W+rt*vt*ae*ae))}return w(q)>c?[q,T(vt*u(kt),rt*Mt-ct*vt*$)]:[0,0]}function ft(et,rt,ct){return L((et*et+rt*rt-ct*ct)/(2*et*rt))}function yt(et){return et-2*d*l((et+d)/(2*d))}function Et(et,rt,ct){for(var vt,Mt=[[et[0],et[1],u(et[1]),m(et[1])],[rt[0],rt[1],u(rt[1]),m(rt[1])],[ct[0],ct[1],u(ct[1]),m(ct[1])]],kt=Mt[2],q=0;q<3;++q,kt=vt)vt=Mt[q],kt.v=ot(vt[1]-kt[1],kt[3],kt[2],vt[3],vt[2],vt[0]-kt[0]),kt.point=[0,0];var $=ft(Mt[0].v[0],Mt[2].v[0],Mt[1].v[0]),W=ft(Mt[0].v[0],Mt[1].v[0],Mt[2].v[0]),ae=d-$;Mt[2].point[1]=0,Mt[0].point[0]=-(Mt[1].point[0]=Mt[0].v[0]/2);var _e=[Mt[2].point[0]=Mt[0].point[0]+Mt[2].v[0]*m($),2*(Mt[0].point[1]=Mt[1].point[1]=Mt[2].v[0]*u($))];return function(Re,He){var Xe,at=u(He),wt=m(He),At=new Array(3);for(Xe=0;Xe<3;++Xe){var ie=Mt[Xe];if(At[Xe]=ot(He-ie[1],ie[3],ie[2],wt,at,Re-ie[0]),!At[Xe][0])return ie.point;At[Xe][1]=yt(At[Xe][1]-ie.v[1])}var ve=_e.slice();for(Xe=0;Xe<3;++Xe){var Le=Xe==2?0:Xe+1,Fe=ft(Mt[Xe].v[0],At[Xe][0],At[Le][0]);At[Xe][1]<0&&(Fe=-Fe),Xe?Xe==1?(Fe=W-Fe,ve[0]-=At[Xe][0]*m(Fe),ve[1]-=At[Xe][0]*u(Fe)):(Fe=ae-Fe,ve[0]+=At[Xe][0]*m(Fe),ve[1]+=At[Xe][0]*u(Fe)):(ve[0]+=At[Xe][0]*m(Fe),ve[1]-=At[Xe][0]*u(Fe))}return ve[0]/=3,ve[1]/=3,ve}}function Tt(et){return et[0]*=A,et[1]*=A,et}function xt(){return Dt([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Dt(et,rt,ct){var vt=(0,Ze.Z)({type:"MultiPoint",coordinates:[et,rt,ct]}),Mt=[-vt[0],-vt[1]],kt=(0,st.Z)(Mt),q=Et(Tt(kt(et)),Tt(kt(rt)),Tt(kt(ct)));q.invert=he(q);var $=(0,_.Z)(q).rotate(Mt),W=$.center;return delete $.rotate,$.center=function(ae){return arguments.length?W(kt(ae)):kt.invert(W())},$.clipAngle(90)}function It(et,rt){var ct=P(1-u(rt));return[2/k*et*ct,k*(1-ct)]}function Ft(){return(0,_.Z)(It).scale(95.6464).center([0,30])}function qt(et){var rt=p(et);function ct(vt,Mt){return[vt,(vt?vt/u(vt):1)*(u(Mt)*m(vt)-rt*m(Mt))]}return ct.invert=rt?function(vt,Mt){vt&&(Mt*=u(vt)/vt);var kt=m(vt);return[vt,2*T(P(kt*kt+rt*rt-Mt*Mt)-kt,rt-Mt)]}:function(vt,Mt){return[vt,C(vt?Mt*p(vt)/vt:Mt)]},ct}function Nt(){return Ee(qt).scale(249.828).clipAngle(90)}It.invert=function(et,rt){var ct=(ct=rt/k-1)*ct;return[ct>0?et*P(d/ct)/2:0,C(1-ct)]};var Je=P(3);function Ke(et,rt){return[Je*et*(2*m(2*rt/3)-1)/k,Je*k*u(rt/3)]}function Ge(){return(0,_.Z)(Ke).scale(156.19)}function nt(et){var rt=m(et);function ct(vt,Mt){return[vt*rt,u(Mt)/rt]}return ct.invert=function(vt,Mt){return[vt/rt,C(Mt*rt)]},ct}function ht(){return Ee(nt).parallel(38.58).scale(195.044)}function Oe(et){var rt=m(et);function ct(vt,Mt){return[vt*rt,(1+rt)*p(Mt/2)]}return ct.invert=function(vt,Mt){return[vt/rt,2*s(Mt/(1+rt))]},ct}function Be(){return Ee(Oe).scale(124.75)}function Qe(et,rt){var ct=P(8/(3*d));return[ct*et*(1-w(rt)/d),ct*rt]}function ut(){return(0,_.Z)(Qe).scale(165.664)}function pt(et,rt){var ct=P(4-3*u(w(rt)));return[2/P(6*d)*et*ct,i(rt)*P(2*d/3)*(2-ct)]}function bt(){return(0,_.Z)(pt).scale(165.664)}function Lt(et,rt){var ct=P(d*(4+d));return[2/ct*et*(1+P(1-4*rt*rt/(d*d))),4/ct*rt]}function Ct(){return(0,_.Z)(Lt).scale(180.739)}function mt(et,rt){var ct=(2+v)*u(rt);rt/=2;for(var vt=0,Mt=1/0;vt<10&&w(Mt)>c;vt++){var kt=m(rt);rt-=Mt=(rt+u(rt)*(kt+2)-ct)/(2*kt*(1+kt))}return[2/P(d*(4+d))*et*(1+m(rt)),2*P(d/(4+d))*u(rt)]}function Ot(){return(0,_.Z)(mt).scale(180.739)}function _t(et,rt){return[et*(1+m(rt))/P(2+d),2*rt/P(2+d)]}function Pt(){return(0,_.Z)(_t).scale(173.044)}function Bt(et,rt){for(var ct=(1+v)*u(rt),vt=0,Mt=1/0;vt<10&&w(Mt)>c;vt++)rt-=Mt=(rt+u(rt)-ct)/(1+m(rt));return ct=P(2+d),[et*(1+m(rt))/ct,2*rt/ct]}function Wt(){return(0,_.Z)(Bt).scale(173.044)}Ke.invert=function(et,rt){var ct=3*C(rt/(Je*k));return[k*et/(Je*(2*m(2*ct/3)-1)),ct]},Qe.invert=function(et,rt){var ct=P(8/(3*d)),vt=rt/ct;return[et/(ct*(1-w(vt)/d)),vt]},pt.invert=function(et,rt){var ct=2-w(rt)/P(2*d/3);return[et*P(6*d)/(2*ct),i(rt)*C((4-ct*ct)/3)]},Lt.invert=function(et,rt){var ct=P(d*(4+d))/2;return[et*ct/(1+P(1-rt*rt*(4+d)/(4*d))),rt*ct/2]},mt.invert=function(et,rt){var ct=rt*P((4+d)/d)/2,vt=C(ct),Mt=m(vt);return[et/(2/P(d*(4+d))*(1+Mt)),C((vt+ct*(Mt+2))/(2+v))]},_t.invert=function(et,rt){var ct=P(2+d),vt=rt*ct/2;return[ct*et/(1+m(vt)),vt]},Bt.invert=function(et,rt){var ct=1+v,vt=P(ct/2);return[2*et*vt/(1+m(rt*=vt)),C((rt+u(rt))/ct)]};var Gt=3+2*y;function Xt(et,rt){var ct=u(et/=2),vt=m(et),Mt=P(m(rt)),kt=m(rt/=2),q=u(rt)/(kt+y*vt*Mt),$=P(2/(1+q*q)),W=P((y*kt+(vt+ct)*Mt)/(y*kt+(vt-ct)*Mt));return[Gt*($*(W-1/W)-2*t(W)),Gt*($*q*(W+1/W)-2*s(q))]}function Kt(){return(0,_.Z)(Xt).scale(62.5271)}Xt.invert=function(et,rt){if(!(ct=H.invert(et/1.2,1.065*rt)))return null;var ct,vt=ct[0],Mt=ct[1],kt=20;et/=Gt,rt/=Gt;do{var q=vt/2,$=Mt/2,W=u(q),ae=m(q),_e=u($),Re=m($),He=m(Mt),Xe=P(He),at=_e/(Re+y*ae*Xe),wt=at*at,At=P(2/(1+wt)),ie=(y*Re+(ae+W)*Xe)/(y*Re+(ae-W)*Xe),ve=P(ie),Le=ve-1/ve,Fe=ve+1/ve,Ve=At*Le-2*t(ve)-et,We=At*at*Fe-2*s(at)-rt,$e=_e&&g*Xe*W*wt/_e,tt=(y*ae*Re+Xe)/(2*(Re+y*ae*Xe)*(Re+y*ae*Xe)*Xe),lt=-.5*at*At*At*At,gt=lt*$e,zt=lt*tt,Ut=(Ut=2*Re+y*Xe*(ae-W))*Ut*ve,Vt=(y*ae*Re*Xe+He)/Ut,Qt=-y*W*_e/(Xe*Ut),gn=Le*gt-2*Vt/ve+At*(Vt+Vt/ie),en=Le*zt-2*Qt/ve+At*(Qt+Qt/ie),sn=at*Fe*gt-2*$e/(1+wt)+At*Fe*$e+At*at*(Vt-Vt/ie),rn=at*Fe*zt-2*tt/(1+wt)+At*Fe*tt+At*at*(Qt-Qt/ie),Mn=en*sn-rn*gn;if(!Mn)break;var xn=(We*en-Ve*rn)/Mn,an=(Ve*sn-We*gn)/Mn;vt-=xn,Mt=a(-v,r(v,Mt-an))}while((w(xn)>c||w(an)>c)&&--kt>0);return w(w(Mt)-v)vt){var Re=P(_e),He=T(ae,W),Xe=ct*o(He/ct),at=He-Xe,wt=et*m(at),At=(et*u(at)-at*u(wt))/(v-wt),ie=Hn(at,At),ve=(d-et)/qn(ie,wt,d);W=Re;var Le,Fe=50;do W-=Le=(et+qn(ie,wt,W)*ve-Re)/(ie(W)*ve);while(w(Le)>c&&--Fe>0);ae=at*u(W),Wvt){var W=P($),ae=T(q,kt),_e=ct*o(ae/ct),Re=ae-_e;kt=W*m(Re),q=W*u(Re);for(var He=kt-v,Xe=u(kt),at=q/Xe,wt=ktc||w(He)>c)&&--wt>0);return[Xe,at]},W}var Tr=tr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function gr(){return(0,_.Z)(Tr).scale(149.995)}var ir=tr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function dr(){return(0,_.Z)(ir).scale(153.93)}var yr=tr(5/6*d,-.62636,-.0344,0,1.3493,-.05524,0,.045);function $t(){return(0,_.Z)(yr).scale(130.945)}function mn(et,rt){var ct=et*et,vt=rt*rt;return[et*(1-.162388*vt)*(.87-952426e-9*ct*ct),rt*(1+vt/12)]}function Ln(){return(0,_.Z)(mn).scale(131.747)}mn.invert=function(et,rt){var ct,vt=et,Mt=rt,kt=50;do{var q=Mt*Mt;Mt-=ct=(Mt*(1+q/12)-rt)/(1+q/4)}while(w(ct)>c&&--kt>0);kt=50,et/=1-.162388*q;do{var $=($=vt*vt)*$;vt-=ct=(vt*(.87-952426e-9*$)-et)/(.87-.00476213*$)}while(w(ct)>c&&--kt>0);return[vt,Mt]};var En=tr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function jn(){return(0,_.Z)(En).scale(131.087)}function $n(et){var rt=et(v,0)[0]-et(-v,0)[0];function ct(vt,Mt){var kt=vt>0?-.5:.5,q=et(vt+kt*d,Mt);return q[0]-=kt*rt,q}return et.invert&&(ct.invert=function(vt,Mt){var kt=vt>0?-.5:.5,q=et.invert(vt+kt*rt,Mt),$=q[0]-kt*d;return $<-d?$+=2*d:$>d&&($-=2*d),q[0]=$,q}),ct}function Zn(et,rt){var ct=i(et),vt=i(rt),Mt=m(rt),kt=m(et)*Mt,q=u(et)*Mt,$=u(vt*rt);et=w(T(q,$)),rt=C(kt),w(et-v)>c&&(et%=v);var W=function(ae,_e){if(_e===v)return[0,0];var Re,He,Xe=u(_e),at=Xe*Xe,wt=at*at,At=1+wt,ie=1+3*wt,ve=1-wt,Le=C(1/P(At)),Fe=ve+at*At*Le,Ve=(1-Xe)/Fe,We=P(Ve),$e=Ve*At,tt=P($e),lt=We*ve;if(ae===0)return[0,-(lt+at*tt)];var gt,zt=m(_e),Ut=1/zt,Vt=2*Xe*zt,Qt=(-Fe*zt-(-3*at+Le*ie)*Vt*(1-Xe))/(Fe*Fe),gn=-Ut*Vt,en=-Ut*(at*At*Qt+Ve*ie*Vt),sn=-2*Ut*(ve*(.5*Qt/We)-2*at*We*Vt),rn=4*ae/d;if(ae>.222*d||_e.175*d){if(Re=(lt+at*P($e*(1+wt)-lt*lt))/(1+wt),ae>d/4)return[Re,Re];var Mn=Re,xn=.5*Re;Re=.5*(xn+Mn),He=50;do{var an=Re*(sn+gn*P($e-Re*Re))+en*C(Re/tt)-rn;if(!an)break;an<0?xn=Re:Mn=Re,Re=.5*(xn+Mn)}while(w(Mn-xn)>c&&--He>0)}else{Re=c,He=25;do{var zn=Re*Re,Vn=P($e-zn),nr=sn+gn*Vn,rr=Re*nr+en*C(Re/tt)-rn;Re-=gt=Vn?rr/(nr+(en-gn*zn)/Vn):0}while(w(gt)>c&&--He>0)}return[Re,-lt-at*P($e-Re*Re)]}(et>d/4?v-et:et,rt);return et>d/4&&($=W[0],W[0]=-W[1],W[1]=-$),W[0]*=ct,W[1]*=-vt,W}function Qn(){return(0,_.Z)($n(Zn)).scale(239.75)}function hr(et,rt){var ct,vt,Mt,kt,q,$;if(rt=.999999)return ct=(1-rt)/4,Mt=1/(vt=R(et)),[(kt=(($=f(2*($=et)))-1)/($+1))+ct*((q=vt*I(et))-et)/(vt*vt),Mt-ct*kt*Mt*(q-et),Mt+ct*kt*Mt*(q+et),2*s(f(et))-v+ct*(q-et)/vt];var W=[1,0,0,0,0,0,0,0,0],ae=[P(rt),0,0,0,0,0,0,0,0],_e=0;for(vt=P(1-rt),q=1;w(ae[_e]/W[_e])>c&&_e<8;)ct=W[_e++],ae[_e]=(ct-vt)/2,W[_e]=(ct+vt)/2,vt=P(ct*vt),q*=2;Mt=q*W[_e]*et;do Mt=(C(kt=ae[_e]*u(vt=Mt)/W[_e])+Mt)/2;while(--_e);return[u(Mt),kt=m(Mt),kt/m(Mt-vt),Mt]}function tn(et,rt){if(!rt)return et;if(rt===1)return t(p(et/2+x));for(var ct=1,vt=P(1-rt),Mt=P(rt),kt=0;w(Mt)>c;kt++){if(et%d){var q=s(vt*p(et)/ct);q<0&&(q+=d),et+=q+~~(et/d)*d}else et+=et;Mt=(ct+vt)/2,vt=P(ct*vt),Mt=((ct=Mt)-vt)/2}return et/(n(2,kt)*ct)}function Pn(et,rt){var ct=(y-1)/(y+1),vt=P(1-ct*ct),Mt=tn(v,vt*vt),kt=t(p(d/4+w(rt)/2)),q=f(-1*kt)/P(ct),$=function(ae,_e){var Re=ae*ae,He=_e+1,Xe=1-Re-_e*_e;return[.5*((ae>=0?v:-v)-T(Xe,2*ae)),-.25*t(Xe*Xe+4*Re)+.5*t(He*He+Re)]}(q*m(-1*et),q*u(-1*et)),W=function(ae,_e,Re){var He=w(ae),Xe=I(w(_e));if(He){var at=1/u(He),wt=1/(p(He)*p(He)),At=-(wt+Re*(Xe*Xe*at*at)-1+Re),ie=(-At+P(At*At-(Re-1)*wt*4))/2;return[tn(s(1/P(ie)),Re)*i(ae),tn(s(P((ie/wt-1)/Re)),1-Re)*i(_e)]}return[0,tn(s(Xe),1-Re)*i(_e)]}($[0],$[1],vt*vt);return[-W[1],(rt>=0?1:-1)*(.5*Mt-W[0])]}function jt(){return(0,_.Z)($n(Pn)).scale(151.496)}Zn.invert=function(et,rt){w(et)>1&&(et=2*i(et)-et),w(rt)>1&&(rt=2*i(rt)-rt);var ct=i(et),vt=i(rt),Mt=-ct*et,kt=-vt*rt,q=kt/Mt<1,$=function(Re,He){for(var Xe=0,at=1,wt=.5,At=50;;){var ie=wt*wt,ve=P(wt),Le=C(1/P(1+ie)),Fe=1-ie+wt*(1+ie)*Le,Ve=(1-ve)/Fe,We=P(Ve),$e=Ve*(1+ie),tt=We*(1-ie),lt=P($e-Re*Re),gt=He+tt+wt*lt;if(w(at-Xe)0?Xe=wt:at=wt,wt=.5*(Xe+at)}if(!At)return null;var zt=C(ve),Ut=m(zt),Vt=1/Ut,Qt=2*ve*Ut,gn=(-Fe*Ut-(-3*wt+Le*(1+3*ie))*Qt*(1-ve))/(Fe*Fe);return[d/4*(Re*(-2*Vt*(.5*gn/We*(1-ie)-2*wt*We*Qt)+-Vt*Qt*lt)+-Vt*(wt*(1+ie)*gn+Ve*(1+3*ie)*Qt)*C(Re/P($e))),zt]}(q?kt:Mt,q?Mt:kt),W=$[0],ae=$[1],_e=m(ae);return q&&(W=-v-W),[ct*(T(u(W)*_e,-u(ae))+d),vt*C(m(W)*_e)]},Pn.invert=function(et,rt){var ct,vt,Mt,kt,q,$,W=(y-1)/(y+1),ae=P(1-W*W),_e=(vt=-et,Mt=ae*ae,(ct=.5*tn(v,ae*ae)-rt)?(kt=hr(ct,Mt),vt?($=(q=hr(vt,1-Mt))[1]*q[1]+Mt*kt[0]*kt[0]*q[0]*q[0],[[kt[0]*q[2]/$,kt[1]*kt[2]*q[0]*q[1]/$],[kt[1]*q[1]/$,-kt[0]*kt[2]*q[0]*q[2]/$],[kt[2]*q[1]*q[2]/$,-Mt*kt[0]*kt[1]*q[0]/$]]):[[kt[0],0],[kt[1],0],[kt[2],0]]):[[0,(q=hr(vt,1-Mt))[0]/q[1]],[1/q[1],0],[q[2]/q[1],0]]),Re=function(He,Xe){var at=Xe[0]*Xe[0]+Xe[1]*Xe[1];return[(He[0]*Xe[0]+He[1]*Xe[1])/at,(He[1]*Xe[0]-He[0]*Xe[1])/at]}(_e[0],_e[1]);return[T(Re[1],Re[0])/-1,2*s(f(-.5*t(W*Re[0]*Re[0]+W*Re[1]*Re[1])))-v]};var Jt=e(7613);function un(et){var rt=u(et),ct=m(et),vt=Rn(et);function Mt(kt,q){var $=vt(kt,q);kt=$[0],q=$[1];var W=u(q),ae=m(q),_e=m(kt),Re=L(rt*W+ct*ae*_e),He=u(Re),Xe=w(He)>c?Re/He:1;return[Xe*ct*u(kt),(w(kt)>v?Xe:-Xe)*(rt*ae-ct*W*_e)]}return vt.invert=Rn(-et),Mt.invert=function(kt,q){var $=P(kt*kt+q*q),W=-u($),ae=m($),_e=$*ae,Re=-q*W,He=$*rt,Xe=P(_e*_e+Re*Re-He*He),at=T(_e*He+Re*Xe,Re*He-_e*Xe),wt=($>v?-1:1)*T(kt*W,$*m(at)*ae+q*u(at)*W);return vt.invert(wt,at)},Mt}function Rn(et){var rt=u(et),ct=m(et);return function(vt,Mt){var kt=m(Mt),q=m(vt)*kt,$=u(vt)*kt,W=u(Mt);return[T($,q*ct-W*rt),C(W*ct+q*rt)]}}function On(){var et=0,rt=(0,_.r)(un),ct=rt(et),vt=ct.rotate,Mt=ct.stream,kt=(0,Jt.Z)();return ct.parallel=function(q){if(!arguments.length)return et*M;var $=ct.rotate();return rt(et=q*A).rotate($)},ct.rotate=function(q){return arguments.length?(vt.call(ct,[q[0],q[1]-et*M]),kt.center([-q[0],-q[1]]),ct):((q=vt.call(ct))[1]+=et*M,q)},ct.stream=function(q){return(q=Mt(q)).sphere=function(){q.polygonStart();var $,W=kt.radius(89.99)().coordinates[0],ae=W.length-1,_e=-1;for(q.lineStart();++_e=0;)q.point(($=W[_e])[0],$[1]);q.lineEnd(),q.polygonEnd()},q},ct.scale(79.4187).parallel(45).clipAngle(179.999)}var Sn=e(33064),pn=e(72736),bn=C(1-1/3)*M,dn=nt(0);function vn(et){var rt=bn*A,ct=It(d,rt)[0]-It(-d,rt)[0],vt=dn(0,rt)[1],Mt=It(0,rt)[1],kt=k-Mt,q=h/et,$=4/h,W=vt+kt*kt*4/h;function ae(_e,Re){var He,Xe=w(Re);if(Xe>rt){var at=r(et-1,a(0,l((_e+d)/q)));(He=It(_e+=d*(et-1)/et-at*q,Xe))[0]=He[0]*h/ct-h*(et-1)/(2*et)+at*h/et,He[1]=vt+4*(He[1]-Mt)*kt/h,Re<0&&(He[1]=-He[1])}else He=dn(_e,Re);return He[0]*=$,He[1]/=W,He}return ae.invert=function(_e,Re){_e/=$;var He=w(Re*=W);if(He>vt){var Xe=r(et-1,a(0,l((_e+d)/q)));_e=(_e+d*(et-1)/et-Xe*q)*ct/h;var at=It.invert(_e,.25*(He-vt)*h/kt+Mt);return at[0]-=d*(et-1)/et-Xe*q,Re<0&&(at[1]=-at[1]),at}return dn.invert(_e,Re)},ae}function An(et,rt){return[et,1&rt?89.999999:bn]}function Bn(et,rt){return[et,1&rt?-89.999999:-bn]}function Xn(et){return[.999999*et[0],et[1]]}function er(){var et=4,rt=(0,_.r)(vn),ct=rt(et),vt=ct.stream;return ct.lobes=function(Mt){return arguments.length?rt(et=+Mt):et},ct.stream=function(Mt){var kt=ct.rotate(),q=vt(Mt),$=(ct.rotate([0,0]),vt(Mt));return ct.rotate(kt),q.sphere=function(){var W,ae;(0,pn.Z)((W=180/et,ae=[].concat((0,Sn.w6)(-180,180+W/2,W).map(An),(0,Sn.w6)(180,-180-W/2,-W).map(Bn)),{type:"Polygon",coordinates:[W===180?ae.map(Xn):ae]}),$)},q},ct.scale(239.75)}function Jn(et){var rt,ct=1+et,vt=C(u(1/ct)),Mt=2*P(d/(rt=d+4*vt*ct)),kt=.5*Mt*(ct+P(et*(2+et))),q=et*et,$=ct*ct;function W(ae,_e){var Re,He,Xe=1-u(_e);if(Xe&&Xe<2){var at,wt=v-_e,At=25;do{var ie=u(wt),ve=m(wt),Le=vt+T(ie,ct-ve),Fe=1+$-2*ct*ve;wt-=at=(wt-q*vt-ct*ie+Fe*Le-.5*Xe*rt)/(2*ct*ie*Le)}while(w(at)>b&&--At>0);Re=Mt*P(Fe),He=ae*Le/d}else Re=Mt*(et+Xe),He=ae*vt/d;return[Re*u(He),kt-Re*m(He)]}return W.invert=function(ae,_e){var Re=ae*ae+(_e-=kt)*_e,He=(1+$-Re/(Mt*Mt))/(2*ct),Xe=L(He),at=u(Xe),wt=vt+T(at,ct-He);return[C(ae/P(Re))*d/wt,C(1-2*(Xe-q*vt-ct*at+(1+$-2*ct*He)*wt)/rt)]},W}function lr(){var et=1,rt=(0,_.r)(Jn),ct=rt(et);return ct.ratio=function(vt){return arguments.length?rt(et=+vt):et},ct.scale(167.774).center([0,18.67])}var sr=.7109889596207567,fr=.0528035274542;function cr(et,rt){return rt>-sr?((et=Me(et,rt))[1]+=fr,et):Ue(et,rt)}function vr(){return(0,_.Z)(cr).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Sr(et,rt){return w(rt)>sr?((et=Me(et,rt))[1]-=rt>0?fr:-fr,et):Ue(et,rt)}function Mr(){return(0,_.Z)(Sr).scale(152.63)}function Lr(et,rt,ct,vt){var Mt=P(4*d/(2*ct+(1+et-rt/2)*u(2*ct)+(et+rt)/2*u(4*ct)+rt/2*u(6*ct))),kt=P(vt*u(ct)*P((1+et*m(2*ct)+rt*m(4*ct))/(1+et+rt))),q=ct*W(1);function $(Re){return P(1+et*m(2*Re)+rt*m(4*Re))}function W(Re){var He=Re*ct;return(2*He+(1+et-rt/2)*u(2*He)+(et+rt)/2*u(4*He)+rt/2*u(6*He))/ct}function ae(Re){return $(Re)*u(Re)}var _e=function(Re,He){var Xe=ct*de(W,q*u(He)/ct,He/d);isNaN(Xe)&&(Xe=ct*i(He));var at=Mt*$(Xe);return[at*kt*Re/d*m(Xe),at/kt*u(Xe)]};return _e.invert=function(Re,He){var Xe=de(ae,He*kt/Mt);return[Re*d/(m(Xe)*Mt*kt*$(Xe)),C(ct*W(Xe/ct)/q)]},ct===0&&(Mt=P(vt/d),(_e=function(Re,He){return[Re*Mt,u(He)/Mt]}).invert=function(Re,He){return[Re/Mt,C(He*Mt)]}),_e}function pr(){var et=1,rt=0,ct=45*A,vt=2,Mt=(0,_.r)(Lr),kt=Mt(et,rt,ct,vt);return kt.a=function(q){return arguments.length?Mt(et=+q,rt,ct,vt):et},kt.b=function(q){return arguments.length?Mt(et,rt=+q,ct,vt):rt},kt.psiMax=function(q){return arguments.length?Mt(et,rt,ct=+q*A,vt):ct*M},kt.ratio=function(q){return arguments.length?Mt(et,rt,ct,vt=+q):vt},kt.scale(180.739)}function Pr(et,rt,ct,vt,Mt,kt,q,$,W,ae,_e){if(_e.nanEncountered)return NaN;var Re,He,Xe,at,wt,At,ie,ve,Le,Fe;if(He=et(rt+.25*(Re=ct-rt)),Xe=et(ct-.25*Re),isNaN(He))_e.nanEncountered=!0;else{if(!isNaN(Xe))return Fe=((At=(at=Re*(vt+4*He+Mt)/12)+(wt=Re*(Mt+4*Xe+kt)/12))-q)/15,ae>W?(_e.maxDepthCount++,At+Fe):Math.abs(Fe)<$?At+Fe:(ve=Pr(et,rt,ie=rt+.5*Re,vt,He,Mt,at,.5*$,W,ae+1,_e),isNaN(ve)?(_e.nanEncountered=!0,NaN):(Le=Pr(et,ie,ct,Mt,Xe,kt,wt,.5*$,W,ae+1,_e),isNaN(Le)?(_e.nanEncountered=!0,NaN):ve+Le));_e.nanEncountered=!0}}function Hr(et,rt,ct,vt,Mt){vt===void 0&&(vt=1e-8),Mt===void 0&&(Mt=20);var kt=et(rt),q=et(.5*(rt+ct)),$=et(ct);return Pr(et,rt,ct,kt,q,$,(kt+4*q+$)*(ct-rt)/6,vt,Mt,1,{maxDepthCount:0,nanEncountered:!1})}function ci(et,rt,ct){function vt(Xe){return et+(1-et)*n(1-n(Xe,rt),1/rt)}function Mt(Xe){return Hr(vt,0,Xe,1e-4)}for(var kt=1/Mt(1),q=1e3,$=1.00000001*kt,W=[],ae=0;ae<=q;ae++)W.push(Mt(ae/q)*$);function _e(Xe){var at=0,wt=q,At=500;do W[At]>Xe?wt=At:at=At,At=at+wt>>1;while(At>at);var ie=W[At+1]-W[At];return ie&&(ie=(Xe-W[At+1])/ie),(At+1+ie)/q}var Re=2*_e(1)/d*kt/ct,He=function(Xe,at){var wt=_e(w(u(at))),At=vt(wt)*Xe;return wt/=Re,[At,at>=0?wt:-wt]};return He.invert=function(Xe,at){var wt;return w(at*=Re)<1&&(wt=i(at)*C(Mt(w(at))*kt)),[Xe/vt(w(at)),wt]},He}function Ti(){var et=0,rt=2.5,ct=1.183136,vt=(0,_.r)(ci),Mt=vt(et,rt,ct);return Mt.alpha=function(kt){return arguments.length?vt(et=+kt,rt,ct):et},Mt.k=function(kt){return arguments.length?vt(et,rt=+kt,ct):rt},Mt.gamma=function(kt){return arguments.length?vt(et,rt,ct=+kt):ct},Mt.scale(152.63)}function Mi(et,rt){return w(et[0]-rt[0])=0;--$)ct=(rt=et[1][$])[0][0],vt=rt[0][1],Mt=rt[1][1],kt=rt[2][0],q=rt[2][1],W.push(fa([[kt-c,q-c],[kt-c,Mt+c],[ct+c,Mt+c],[ct+c,vt-c]],30));return{type:"Polygon",coordinates:[(0,Sn.TS)(W)]}}function xi(et,rt,ct){var vt,Mt;function kt(W,ae){for(var _e=ae<0?-1:1,Re=rt[+(ae<0)],He=0,Xe=Re.length-1;HeRe[He][2][0];++He);var at=et(W-Re[He][1][0],ae);return at[0]+=et(Re[He][1][0],_e*ae>_e*Re[He][0][1]?Re[He][0][1]:ae)[0],at}ct?kt.invert=ct(kt):et.invert&&(kt.invert=function(W,ae){for(var _e=Mt[+(ae<0)],Re=rt[+(ae<0)],He=0,Xe=_e.length;Hewt&&(Re=at,at=wt,wt=Re),[[He,at],[Xe,wt]]})}),q):rt.map(function(ae){return ae.map(function(_e){return[[_e[0][0]*M,_e[0][1]*M],[_e[1][0]*M,_e[1][1]*M],[_e[2][0]*M,_e[2][1]*M]]})})},rt!=null&&q.lobes(rt),q}cr.invert=function(et,rt){return rt>-sr?Me.invert(et,rt-fr):Ue.invert(et,rt)},Sr.invert=function(et,rt){return w(rt)>sr?Me.invert(et,rt+(rt>0?fr:-fr)):Ue.invert(et,rt)};var Oa=[[[[-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 Ka(){return xi(me,Oa).scale(160.857)}var Yo=[[[[-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 Xs(){return xi(Sr,Yo).scale(152.63)}var Uu=[[[[-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 xi(Me,Uu).scale(169.529)}var $s=[[[[-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 Qa(){return xi(Me,$s).scale(169.529).rotate([20,0])}var du=[[[[-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 Qi(){return xi(cr,du,he).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var yl=[[[[-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 qa(){return xi(Ue,yl).scale(152.63).rotate([-20,0])}function eo(et,rt){return[3/h*et*P(d*d/3-rt*rt),rt]}function fs(){return(0,_.Z)(eo).scale(158.837)}function fi(et){function rt(ct,vt){if(w(w(vt)-v)2)return null;var kt=(ct/=2)*ct,q=(vt/=2)*vt,$=2*vt/(1+kt+q);return $=n((1+$)/(1-$),1/et),[T(2*ct,1-kt-q)/et,C(($-1)/($+1))]},rt}function hs(){var et=.5,rt=(0,_.r)(fi),ct=rt(et);return ct.spacing=function(vt){return arguments.length?rt(et=+vt):et},ct.scale(124.75)}eo.invert=function(et,rt){return[h/3*et/P(d*d/3-rt*rt),rt]};var ao=d/y;function bo(et,rt){return[et*(1+P(m(rt)))/2,rt/(m(rt/2)*m(et/6))]}function Ro(){return(0,_.Z)(bo).scale(97.2672)}function xl(et,rt){var ct=et*et,vt=rt*rt;return[et*(.975534+vt*(-.0143059*ct-.119161+-.0547009*vt)),rt*(1.00384+ct*(.0802894+-.02855*vt+199025e-9*ct)+vt*(.0998909+-.0491032*vt))]}function Vu(){return(0,_.Z)(xl).scale(139.98)}function Xo(et,rt){return[u(et)/m(rt),p(rt)*m(et)]}function Hu(){return(0,_.Z)(Xo).scale(144.049).clipAngle(89.999)}function qu(et){var rt=m(et),ct=p(x+et/2);function vt(Mt,kt){var q=kt-et,$=w(q)=0;)He=(Re=et[_e])[0]+W*(kt=He)-ae*Xe,Xe=Re[1]+W*Xe+ae*kt;return[He=W*(kt=He)-ae*Xe,Xe=W*Xe+ae*kt]}return ct.invert=function(vt,Mt){var kt=20,q=vt,$=Mt;do{for(var W,ae=rt,_e=et[ae],Re=_e[0],He=_e[1],Xe=0,at=0;--ae>=0;)Xe=Re+q*(W=Xe)-$*at,at=He+q*at+$*W,Re=(_e=et[ae])[0]+q*(W=Re)-$*He,He=_e[1]+q*He+$*W;var wt,At,ie=(Xe=Re+q*(W=Xe)-$*at)*Xe+(at=He+q*at+$*W)*at;q-=wt=((Re=q*(W=Re)-$*He-vt)*Xe+(He=q*He+$*W-Mt)*at)/ie,$-=At=(He*Xe-Re*at)/ie}while(w(wt)+w(At)>1e-12&&--kt>0);if(kt){var ve=P(q*q+$*$),Le=2*s(.5*ve),Fe=u(Le);return[T(q*Fe,ve*m(Le)),ve?C($*Fe/ve):0]}},ct}bo.invert=function(et,rt){var ct=w(et),vt=w(rt),Mt=c,kt=v;vtc||w(At)>c)&&--Mt>0);return Mt&&[ct,vt]},Xo.invert=function(et,rt){var ct=et*et,vt=rt*rt+1,Mt=ct+vt,kt=et?g*P((Mt-P(Mt*Mt-4*ct))/ct):1/P(vt);return[C(et*kt),i(rt)*L(kt)]},gu.invert=function(et,rt){return[et,2.5*s(f(.8*rt))-.625*d]};var $o=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Jo=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Js=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Ko=[[.9245,0],[0,0],[.01943,0]],mu=[[.721316,0],[0,0],[-.00881625,-.00617325]];function yu(){return Ps($o,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Ls(){return Ps(Jo,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Vl(){return Ps(Js,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function ps(){return Ps(Ko,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Ks(){return Ps(mu,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Ps(et,rt){var ct=(0,_.Z)(vu(et)).rotate(rt).clipAngle(90),vt=(0,st.Z)(rt),Mt=ct.center;return delete ct.rotate,ct.center=function(kt){return arguments.length?Mt(vt(kt)):vt.invert(Mt())},ct}var Qo=P(6),hi=P(7);function ds(et,rt){var ct=C(7*u(rt)/(3*Qo));return[Qo*et*(2*m(2*ct/3)-1)/hi,9*u(ct/3)/hi]}function Cc(){return(0,_.Z)(ds).scale(164.859)}function Hl(et,rt){for(var ct,vt=(1+g)*u(rt),Mt=rt,kt=0;kt<25&&(Mt-=ct=(u(Mt/2)+u(Mt)-vt)/(.5*m(Mt/2)+m(Mt)),!(w(ct)b&&--$>0);return[et/(.84719-.13063*(vt=q*q)+(kt=vt*(Mt=vt*vt))*kt*(.05494*vt-.04515-.02326*Mt+.00331*kt)),q]},el.invert=function(et,rt){for(var ct=rt/2,vt=0,Mt=1/0;vt<10&&w(Mt)>c;++vt){var kt=m(rt/2);rt-=Mt=(rt-p(rt/2)-ct)/(1-.5/(kt*kt))}return[2*et/(1+m(rt)),rt]};var Is=[[[[-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 Rs(){return xi(ce(1/0),Is).rotate([20,0]).scale(152.63)}function tl(et,rt){var ct=u(rt),vt=m(rt),Mt=i(et);if(et===0||w(rt)===v)return[0,rt];if(rt===0)return[et,0];if(w(et)===v)return[et*vt,v*ct];var kt=d/(2*et)-2*et/d,q=2*rt/d,$=(1-q*q)/(ct-q),W=kt*kt,ae=$*$,_e=1+W/ae,Re=1+ae/W,He=(kt*ct/$-kt/2)/_e,Xe=(ae*ct/W+$/2)/Re,at=Xe*Xe-(ae*ct*ct/W+$*ct-1)/Re;return[v*(He+P(He*He+vt*vt/_e)*Mt),v*(Xe+P(at<0?0:at)*i(-rt*kt)*Mt)]}function Tl(){return(0,_.Z)(tl).scale(127.267)}tl.invert=function(et,rt){var ct=(et/=v)*et,vt=ct+(rt/=v)*rt,Mt=d*d;return[et?(vt-1+P((1-vt)*(1-vt)+4*ct))/(2*et)*v:0,de(function(kt){return vt*(d*u(kt)-2*kt)*d+4*kt*kt*(rt-u(kt))+2*d*kt-Mt*rt},0)]};var kl=1.0148,so=.23185,Al=-.14499,Ml=.02406,bu=1.790857183;function gs(et,rt){var ct=rt*rt;return[et,rt*(kl+ct*ct*(so+ct*(Al+Ml*ct)))]}function ql(){return(0,_.Z)(gs).scale(139.319)}function Sl(et,rt){if(w(rt)bu?rt=bu:rt<-1.790857183&&(rt=-1.790857183);var ct,vt=rt;do{var Mt=vt*vt;vt-=ct=(vt*(kl+Mt*Mt*(so+Mt*(Al+Ml*Mt)))-rt)/(1.0148+Mt*Mt*(1.1592500000000001+Mt*(.21654*Mt-1.01493)))}while(w(ct)>c);return[et,vt]},Sl.invert=function(et,rt){if(w(rt)c&&--kt>0);return q=p(Mt),[(w(rt)=0;)if(tt=We[Ut],$e[0]===tt[0]&&$e[1]===tt[1]){if(gt)return[gt,$e];gt=$e}}}(W.face,ae.face),Re=(wt=_e.map(ae.project),At=_e.map(W.project),ie=Ds(wt[1],wt[0]),ve=Ds(At[1],At[0]),Le=function(Ve,We){return T(Ve[0]*We[1]-Ve[1]*We[0],Ve[0]*We[0]+Ve[1]*We[1])}(ie,ve),Fe=bi(ie)/bi(ve),zs([1,0,wt[0][0],0,1,wt[0][1]],zs([Fe,0,0,0,Fe,0],zs([m(Le),u(Le),0,-u(Le),m(Le),0],[1,0,-At[0][0],0,1,-At[0][1]]))));W.transform=ae.transform?zs(ae.transform,Re):Re;for(var He=ae.edges,Xe=0,at=He.length;Xe0?[-vt[0],0]:[180-vt[0],180])};var rt=zo.map(function(ct){return{face:ct,project:et(ct)}});return[-1,0,0,1,0,1,4,5].forEach(function(ct,vt){var Mt=rt[ct];Mt&&(Mt.children||(Mt.children=[])).push(rt[vt])}),vs(rt[0],function(ct,vt){return rt[ct<-d/2?vt<0?6:4:ct<0?vt<0?2:0:ctW^ve>W&&$<(ie-at)*(W-wt)/(ve-wt)+at&&(ae=!ae)}return ae}(Mt[0],vt))return Mt.push(ct),!0})||et.push([ct])}),Ia=[],et.length?et.length>1?{type:"MultiPolygon",coordinates:et}:{type:"Polygon",coordinates:et[0]}:null}};function Ga(et){var rt=et(v,0)[0]-et(-v,0)[0];function ct(vt,Mt){var kt=w(vt)0?vt-d:vt+d,Mt),$=(q[0]-q[1])*g,W=(q[0]+q[1])*g;if(kt)return[$,W];var ae=rt*g,_e=$>0^W>0?-1:1;return[_e*$-i(W)*ae,_e*W-i($)*ae]}return et.invert&&(ct.invert=function(vt,Mt){var kt=(vt+Mt)*g,q=(Mt-vt)*g,$=w(kt)<.5*rt&&w(q)<.5*rt;if(!$){var W=rt*g,ae=kt>0^q>0?-1:1,_e=-ae*vt+(q>0?1:-1)*W,Re=-ae*Mt+(kt>0?1:-1)*W;kt=(-_e-Re)*g,q=(_e-Re)*g}var He=et.invert(kt,q);return $||(He[0]+=kt>0?d:-d),He}),(0,_.Z)(ct).rotate([-90,-90,45]).clipAngle(179.999)}function Wl(){return Ga(Zn).scale(176.423)}function Zl(){return Ga(Pn).scale(111.48)}function Sa(et,rt){if(!(0<=(rt=+rt)&&rt<=20))throw new Error("invalid digits");function ct(ae){var _e=ae.length,Re=2,He=new Array(_e);for(He[0]=+ae[0].toFixed(rt),He[1]=+ae[1].toFixed(rt);Re<_e;)He[Re]=ae[Re],++Re;return He}function vt(ae){return ae.map(ct)}function Mt(ae){for(var _e=ct(ae[0]),Re=[_e],He=1;He2||Xe[0]!=_e[0]||Xe[1]!=_e[1])&&(Re.push(Xe),_e=Xe)}return Re.length===1&&ae.length>1&&Re.push(ct(ae[ae.length-1])),Re}function kt(ae){return ae.map(Mt)}function q(ae){if(ae==null)return ae;var _e;switch(ae.type){case"GeometryCollection":_e={type:"GeometryCollection",geometries:ae.geometries.map(q)};break;case"Point":_e={type:"Point",coordinates:ct(ae.coordinates)};break;case"MultiPoint":_e={type:ae.type,coordinates:vt(ae.coordinates)};break;case"LineString":_e={type:ae.type,coordinates:Mt(ae.coordinates)};break;case"MultiLineString":case"Polygon":_e={type:ae.type,coordinates:kt(ae.coordinates)};break;case"MultiPolygon":_e={type:"MultiPolygon",coordinates:ae.coordinates.map(kt)};break;default:return ae}return ae.bbox!=null&&(_e.bbox=ae.bbox),_e}function $(ae){var _e={type:"Feature",properties:ae.properties,geometry:q(ae.geometry)};return ae.id!=null&&(_e.id=ae.id),ae.bbox!=null&&(_e.bbox=ae.bbox),_e}if(et!=null)switch(et.type){case"Feature":return $(et);case"FeatureCollection":var W={type:"FeatureCollection",features:et.features.map($)};return et.bbox!=null&&(W.bbox=et.bbox),W;default:return q(et)}return et}function Cr(et){var rt=u(et);function ct(vt,Mt){var kt=rt?p(vt*rt/2)/rt:vt/2;if(!Mt)return[2*kt,-et];var q=2*s(kt*u(Mt)),$=1/p(Mt);return[u(q)*$,Mt+(1-m(q))*$-et]}return ct.invert=function(vt,Mt){if(w(Mt+=et)c&&--W>0);var He=vt*(ae=p($)),Xe=p(w(Mt)0?v:-v)*(ae+kt*(Re-$)/2+kt*kt*(Re-2*ae+$)/2)]}function rl(){return(0,_.Z)(Yl).scale(152.63)}function il(et,rt){var ct=function(q){function $(W,ae){var _e=m(ae),Re=(q-1)/(q-_e*m(W));return[Re*_e*u(W),Re*u(ae)]}return $.invert=function(W,ae){var _e=W*W+ae*ae,Re=P(_e),He=(q-P(1-_e*(q+1)/(q-1)))/((q-1)/Re+Re/(q-1));return[T(W*He,Re*P(1-He*He)),Re?C(ae*He/Re):0]},$}(et);if(!rt)return ct;var vt=m(rt),Mt=u(rt);function kt(q,$){var W=ct(q,$),ae=W[1],_e=ae*Mt/(et-1)+vt;return[W[0]*vt/_e,ae/_e]}return kt.invert=function(q,$){var W=(et-1)/(et-1-$*Mt);return ct.invert(W*q,W*$*vt)},kt}function al(){var et=2,rt=0,ct=(0,_.r)(il),vt=ct(et,rt);return vt.distance=function(Mt){return arguments.length?ct(et=+Mt,rt):et},vt.tilt=function(Mt){return arguments.length?ct(et,rt=Mt*A):rt*M},vt.scale(432.147).clipAngle(L(1/et)*M-1e-6)}Ra.forEach(function(et){et[1]*=1.0144}),Yl.invert=function(et,rt){var ct=rt/v,vt=90*ct,Mt=r(18,w(vt/5)),kt=a(0,l(Mt));do{var q=Ra[kt][1],$=Ra[kt+1][1],W=Ra[r(19,kt+2)][1],ae=W-q,_e=W-2*$+q,Re=2*(w(ct)-$)/ae,He=_e/ae,Xe=Re*(1-He*Re*(1-2*He*Re));if(Xe>=0||kt===1){vt=(rt>=0?5:-5)*(Xe+Mt);var at,wt=50;do Xe=(Mt=r(18,w(vt)/5))-(kt=l(Mt)),q=Ra[kt][1],$=Ra[kt+1][1],W=Ra[r(19,kt+2)][1],vt-=(at=(rt>=0?v:-v)*($+Xe*(W-q)/2+Xe*Xe*(W-2*$+q)/2)-rt)*M;while(w(at)>b&&--wt>0);break}}while(--kt>=0);var At=Ra[kt][0],ie=Ra[kt+1][0],ve=Ra[r(19,kt+2)][0];return[et/(ie+Xe*(ve-At)/2+Xe*Xe*(ve-2*ie+At)/2),vt*A]};var Or=-179.9999,ol=179.9999,uo=-89.9999,Xl=89.9999;function Cl(et){return et.length>0}function ya(et){return et===-90||et===90?[0,et]:[-180,(rt=et,Math.floor(1e4*rt)/1e4)];var rt}function Vs(et){var rt=et[0],ct=et[1],vt=!1;return rt<=Or?(rt=-180,vt=!0):rt>=ol&&(rt=180,vt=!0),ct<=uo?(ct=-90,vt=!0):ct>=Xl&&(ct=90,vt=!0),vt?[rt,ct]:et}function ns(et){return et.map(Vs)}function Wa(et,rt,ct){for(var vt=0,Mt=et.length;vt=ol||_e<=uo||_e>=Xl){kt[q]=Vs(W);for(var Re=q+1;Re<$;++Re){var He=kt[Re],Xe=He[0],at=He[1];if(Xe>Or&&Xeuo&&at=$)break;ct.push({index:-1,polygon:rt,ring:kt=kt.slice(Re-1)}),kt[0]=ya(kt[0][1]),q=-1,$=kt.length}}}}function xs(et){var rt,ct,vt,Mt,kt,q,$=et.length,W={},ae={};for(rt=0;rt<$;++rt)vt=(ct=et[rt]).ring[0],kt=ct.ring[ct.ring.length-1],vt[0]!==kt[0]||vt[1]!==kt[1]?(ct.index=rt,W[vt]=ae[kt]=ct):(ct.polygon.push(ct.ring),et[rt]=null);for(rt=0;rt<$;++rt)if(ct=et[rt]){if(vt=ct.ring[0],kt=ct.ring[ct.ring.length-1],Mt=ae[vt],q=W[kt],delete W[vt],delete ae[kt],vt[0]===kt[0]&&vt[1]===kt[1]){ct.polygon.push(ct.ring);continue}Mt?(delete ae[vt],delete W[Mt.ring[0]],Mt.ring.pop(),et[Mt.index]=null,ct={index:-1,polygon:Mt.polygon,ring:Mt.ring.concat(ct.ring)},Mt===q?ct.polygon.push(ct.ring):(ct.index=$++,et.push(W[ct.ring[0]]=ae[ct.ring[ct.ring.length-1]]=ct))):q?(delete W[kt],delete ae[q.ring[q.ring.length-1]],ct.ring.pop(),ct={index:$++,polygon:q.polygon,ring:ct.ring.concat(q.ring)},et[q.index]=null,et.push(W[ct.ring[0]]=ae[ct.ring[ct.ring.length-1]]=ct)):(ct.ring.push(ct.ring[0]),ct.polygon.push(ct.ring))}}function _o(et){var rt={type:"Feature",geometry:co(et.geometry)};return et.id!=null&&(rt.id=et.id),et.bbox!=null&&(rt.bbox=et.bbox),et.properties!=null&&(rt.properties=et.properties),rt}function co(et){if(et==null)return et;var rt,ct,vt,Mt;switch(et.type){case"GeometryCollection":rt={type:"GeometryCollection",geometries:et.geometries.map(co)};break;case"Point":rt={type:"Point",coordinates:Vs(et.coordinates)};break;case"MultiPoint":case"LineString":rt={type:et.type,coordinates:ns(et.coordinates)};break;case"MultiLineString":rt={type:"MultiLineString",coordinates:et.coordinates.map(ns)};break;case"Polygon":var kt=[];Wa(et.coordinates,kt,ct=[]),xs(ct),rt={type:"Polygon",coordinates:kt};break;case"MultiPolygon":ct=[],vt=-1,Mt=et.coordinates.length;for(var q=new Array(Mt);++vt0?d-$:$)*M],ae=(0,_.Z)(et(q)).rotate(W),_e=(0,st.Z)(W),Re=ae.center;return delete ae.rotate,ae.center=function(He){return arguments.length?Re(_e(He)):_e.invert(Re())},ae.clipAngle(90)}function Ll(et){var rt=m(et);function ct(vt,Mt){var kt=(0,li.M)(vt,Mt);return kt[0]*=rt,kt}return ct.invert=function(vt,Mt){return li.M.invert(vt/rt,Mt)},ct}function to(){return ho([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function ho(et,rt){return vi(Ll,et,rt)}function Fo(et){if(!(et*=2))return te.N;var rt=-et/2,ct=-rt,vt=et*et,Mt=p(ct),kt=.5/u(ct);function q($,W){var ae=L(m(W)*m($-rt)),_e=L(m(W)*m($-ct));return[((ae*=ae)-(_e*=_e))/(2*et),(W<0?-1:1)*P(4*vt*_e-(vt-ae+_e)*(vt-ae+_e))/(2*et)]}return q.invert=function($,W){var ae,_e,Re=W*W,He=m(P(Re+(ae=$+rt)*ae)),Xe=m(P(Re+(ae=$+ct)*ae));return[T(_e=He-Xe,ae=(He+Xe)*Mt),(W<0?-1:1)*L(P(ae*ae+_e*_e)*kt)]},q}function za(){return di([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function di(et,rt){return vi(Fo,et,rt)}function oa(et,rt){if(w(rt)c&&--$>0);return[i(et)*(P(Mt*Mt+4)+Mt)*d/4,v*q]};var is=4*d+3*P(3),To=2*P(2*d*P(3)/is),_a=Ae(To*P(3)/d,To,is/6);function $l(){return(0,_.Z)(_a).scale(176.84)}function Fa(et,rt){return[et*P(1-3*rt*rt/(d*d)),rt]}function ll(){return(0,_.Z)(Fa).scale(152.63)}function as(et,rt){var ct=m(rt),vt=m(et)*ct,Mt=1-vt,kt=m(et=T(u(et)*ct,-u(rt))),q=u(et);return[q*(ct=P(1-vt*vt))-kt*Mt,-kt*ct-q*Mt]}function _i(){return(0,_.Z)(as).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}function Si(et,rt){var ct=G(et,rt);return[(ct[0]+et/v)/2,(ct[1]+rt)/2]}function Jl(){return(0,_.Z)(Si).scale(158.837)}Fa.invert=function(et,rt){return[et/P(1-3*rt*rt/(d*d)),rt]},as.invert=function(et,rt){var ct=(et*et+rt*rt)/-2,vt=P(-ct*(2+ct)),Mt=rt*ct+et*vt,kt=et*ct-rt*vt,q=P(kt*kt+Mt*Mt);return[T(vt*Mt,q*(1+ct)),q?-C(vt*kt/q):0]},Si.invert=function(et,rt){var ct=et,vt=rt,Mt=25;do{var kt,q=m(vt),$=u(vt),W=u(2*vt),ae=$*$,_e=q*q,Re=u(ct),He=m(ct/2),Xe=u(ct/2),at=Xe*Xe,wt=1-_e*He*He,At=wt?L(q*He)*P(kt=1/wt):kt=0,ie=.5*(2*At*q*Xe+ct/v)-et,ve=.5*(At*$+vt)-rt,Le=.5*kt*(_e*at+At*q*He*ae)+.5/v,Fe=kt*(Re*W/4-At*$*Xe),Ve=.125*kt*(W*Xe-At*$*_e*Re),We=.5*kt*(ae*He+At*at*q)+.5,$e=Fe*Ve-We*Le,tt=(ve*Fe-ie*We)/$e,lt=(ie*Ve-ve*Le)/$e;ct-=tt,vt-=lt}while((w(tt)>c||w(lt)>c)&&--Mt>0);return[ct,vt]}},33940:function(D,E,e){function _(){return new w}function w(){this.reset()}e.d(E,{Z:function(){return _}}),w.prototype={constructor:w,reset:function(){this.s=this.t=0},add:function(m){T(s,m,this.t),T(this,s.s,this.s),this.s?this.t+=s.t:this.s=s.t},valueOf:function(){return this.s}};var s=new w;function T(m,f,l){var t=m.s=f+l,a=t-f,r=t-a;m.t=f-r+(l-a)}},97860:function(D,E,e){e.d(E,{L9:function(){return r},ZP:function(){return b},gL:function(){return o}});var _,w,s,T,m,f=e(33940),l=e(39695),t=e(73182),a=e(72736),r=(0,f.Z)(),n=(0,f.Z)(),o={point:t.Z,lineStart:t.Z,lineEnd:t.Z,polygonStart:function(){r.reset(),o.lineStart=i,o.lineEnd=u},polygonEnd:function(){var d=+r;n.add(d<0?l.BZ+d:d),this.lineStart=this.lineEnd=this.point=t.Z},sphere:function(){n.add(l.BZ)}};function i(){o.point=p}function u(){c(_,w)}function p(d,v){o.point=c,_=d,w=v,d*=l.uR,v*=l.uR,s=d,T=(0,l.mC)(v=v/2+l.pu),m=(0,l.O$)(v)}function c(d,v){d*=l.uR,v=(v*=l.uR)/2+l.pu;var x=d-s,g=x>=0?1:-1,y=g*x,k=(0,l.mC)(v),h=(0,l.O$)(v),M=m*h,A=T*k+M*(0,l.mC)(y),C=M*g*(0,l.O$)(y);r.add((0,l.fv)(C,A)),s=d,T=k,m=h}function b(d){return n.reset(),(0,a.Z)(d,o),2*n}},77338:function(D,E,e){e.d(E,{Z:function(){return L}});var _,w,s,T,m,f,l,t,a,r,n=e(33940),o=e(97860),i=e(7620),u=e(39695),p=e(72736),c=(0,n.Z)(),b={point:d,lineStart:x,lineEnd:g,polygonStart:function(){b.point=y,b.lineStart=k,b.lineEnd=h,c.reset(),o.gL.polygonStart()},polygonEnd:function(){o.gL.polygonEnd(),b.point=d,b.lineStart=x,b.lineEnd=g,o.L9<0?(_=-(s=180),w=-(T=90)):c>u.Ho?T=90:c<-u.Ho&&(w=-90),r[0]=_,r[1]=s},sphere:function(){_=-(s=180),w=-(T=90)}};function d(P,I){a.push(r=[_=P,s=P]),IT&&(T=I)}function v(P,I){var R=(0,i.Og)([P*u.uR,I*u.uR]);if(t){var U=(0,i.T5)(t,R),B=[U[1],-U[0],0],G=(0,i.T5)(B,U);(0,i.iJ)(G),G=(0,i.Y1)(G);var N,j=P-m,V=j>0?1:-1,H=G[0]*u.RW*V,ee=(0,u.Wn)(j)>180;ee^(V*mT&&(T=N):ee^(V*m<(H=(H+360)%360-180)&&HT&&(T=I)),ee?PM(_,s)&&(s=P):M(P,s)>M(_,s)&&(_=P):s>=_?(P<_&&(_=P),P>s&&(s=P)):P>m?M(_,P)>M(_,s)&&(s=P):M(P,s)>M(_,s)&&(_=P)}else a.push(r=[_=P,s=P]);IT&&(T=I),t=R,m=P}function x(){b.point=v}function g(){r[0]=_,r[1]=s,b.point=d,t=null}function y(P,I){if(t){var R=P-m;c.add((0,u.Wn)(R)>180?R+(R>0?360:-360):R)}else f=P,l=I;o.gL.point(P,I),v(P,I)}function k(){o.gL.lineStart()}function h(){y(f,l),o.gL.lineEnd(),(0,u.Wn)(c)>u.Ho&&(_=-(s=180)),r[0]=_,r[1]=s,t=null}function M(P,I){return(I-=P)<0?I+360:I}function A(P,I){return P[0]-I[0]}function C(P,I){return P[0]<=P[1]?P[0]<=I&&I<=P[1]:IM(U[0],U[1])&&(U[1]=B[1]),M(B[0],U[1])>M(U[0],U[1])&&(U[0]=B[0])):G.push(U=B);for(N=-1/0,I=0,U=G[R=G.length-1];I<=R;U=B,++I)B=G[I],(j=M(U[1],B[0]))>N&&(N=j,_=B[0],s=U[1])}return a=r=null,_===1/0||w===1/0?[[NaN,NaN],[NaN,NaN]]:[[_,w],[s,T]]}},7620:function(D,E,e){e.d(E,{Og:function(){return s},T:function(){return l},T5:function(){return m},Y1:function(){return w},iJ:function(){return t},j9:function(){return T},s0:function(){return f}});var _=e(39695);function w(a){return[(0,_.fv)(a[1],a[0]),(0,_.ZR)(a[2])]}function s(a){var r=a[0],n=a[1],o=(0,_.mC)(n);return[o*(0,_.mC)(r),o*(0,_.O$)(r),(0,_.O$)(n)]}function T(a,r){return a[0]*r[0]+a[1]*r[1]+a[2]*r[2]}function m(a,r){return[a[1]*r[2]-a[2]*r[1],a[2]*r[0]-a[0]*r[2],a[0]*r[1]-a[1]*r[0]]}function f(a,r){a[0]+=r[0],a[1]+=r[1],a[2]+=r[2]}function l(a,r){return[a[0]*r,a[1]*r,a[2]*r]}function t(a){var r=(0,_._b)(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]);a[0]/=r,a[1]/=r,a[2]/=r}},66624:function(D,E,e){e.d(E,{Z:function(){return R}});var _,w,s,T,m,f,l,t,a,r,n,o,i,u,p,c,b=e(39695),d=e(73182),v=e(72736),x={sphere:d.Z,point:g,lineStart:k,lineEnd:A,polygonStart:function(){x.lineStart=C,x.lineEnd=L},polygonEnd:function(){x.lineStart=k,x.lineEnd=A}};function g(U,B){U*=b.uR,B*=b.uR;var G=(0,b.mC)(B);y(G*(0,b.mC)(U),G*(0,b.O$)(U),(0,b.O$)(B))}function y(U,B,G){++_,s+=(U-s)/_,T+=(B-T)/_,m+=(G-m)/_}function k(){x.point=h}function h(U,B){U*=b.uR,B*=b.uR;var G=(0,b.mC)(B);u=G*(0,b.mC)(U),p=G*(0,b.O$)(U),c=(0,b.O$)(B),x.point=M,y(u,p,c)}function M(U,B){U*=b.uR,B*=b.uR;var G=(0,b.mC)(B),N=G*(0,b.mC)(U),j=G*(0,b.O$)(U),V=(0,b.O$)(B),H=(0,b.fv)((0,b._b)((H=p*V-c*j)*H+(H=c*N-u*V)*H+(H=u*j-p*N)*H),u*N+p*j+c*V);w+=H,f+=H*(u+(u=N)),l+=H*(p+(p=j)),t+=H*(c+(c=V)),y(u,p,c)}function A(){x.point=g}function C(){x.point=P}function L(){I(o,i),x.point=g}function P(U,B){o=U,i=B,U*=b.uR,B*=b.uR,x.point=I;var G=(0,b.mC)(B);u=G*(0,b.mC)(U),p=G*(0,b.O$)(U),c=(0,b.O$)(B),y(u,p,c)}function I(U,B){U*=b.uR,B*=b.uR;var G=(0,b.mC)(B),N=G*(0,b.mC)(U),j=G*(0,b.O$)(U),V=(0,b.O$)(B),H=p*V-c*j,ee=c*N-u*V,Q=u*j-p*N,X=(0,b._b)(H*H+ee*ee+Q*Q),Y=(0,b.ZR)(X),K=X&&-Y/X;a+=K*H,r+=K*ee,n+=K*Q,w+=Y,f+=Y*(u+(u=N)),l+=Y*(p+(p=j)),t+=Y*(c+(c=V)),y(u,p,c)}function R(U){_=w=s=T=m=f=l=t=a=r=n=0,(0,v.Z)(U,x);var B=a,G=r,N=n,j=B*B+G*G+N*N;return j0?oi)&&(o+=n*s.BZ));for(var b,d=o;n>0?d>i:d0?w.pi:-w.pi,n=(0,w.Wn)(t-m);(0,w.Wn)(n-w.pi)0?w.ou:-w.ou),s.point(l,f),s.lineEnd(),s.lineStart(),s.point(r,f),s.point(t,f),T=0):l!==r&&n>=w.pi&&((0,w.Wn)(m-l)w.Ho?(0,w.z4)(((0,w.O$)(i)*(b=(0,w.mC)(p))*(0,w.O$)(u)-(0,w.O$)(p)*(c=(0,w.mC)(i))*(0,w.O$)(o))/(c*b*d)):(i+p)/2}(m,f,t,a),s.point(l,f),s.lineEnd(),s.lineStart(),s.point(r,f),T=0),s.point(m=t,f=a),l=r},lineEnd:function(){s.lineEnd(),m=f=NaN},clean:function(){return 2-T}}},function(s,T,m,f){var l;if(s==null)l=m*w.ou,f.point(-w.pi,l),f.point(0,l),f.point(w.pi,l),f.point(w.pi,0),f.point(w.pi,-l),f.point(0,-l),f.point(-w.pi,-l),f.point(-w.pi,0),f.point(-w.pi,l);else if((0,w.Wn)(s[0]-T[0])>w.Ho){var t=s[0]1&&T.push(T.pop().concat(T.shift()))},result:function(){var m=T;return T=[],s=null,m}}}},1457:function(D,E,e){e.d(E,{Z:function(){return f}});var _=e(7620),w=e(7613),s=e(39695),T=e(67108),m=e(97023);function f(l){var t=(0,s.mC)(l),a=6*s.uR,r=t>0,n=(0,s.Wn)(t)>s.Ho;function o(p,c){return(0,s.mC)(p)*(0,s.mC)(c)>t}function i(p,c,b){var d=(0,_.Og)(p),v=(0,_.Og)(c),x=[1,0,0],g=(0,_.T5)(d,v),y=(0,_.j9)(g,g),k=g[0],h=y-k*k;if(!h)return!b&&p;var M=t*y/h,A=-t*k/h,C=(0,_.T5)(x,g),L=(0,_.T)(x,M),P=(0,_.T)(g,A);(0,_.s0)(L,P);var I=C,R=(0,_.j9)(L,I),U=(0,_.j9)(I,I),B=R*R-U*((0,_.j9)(L,L)-1);if(!(B<0)){var G=(0,s._b)(B),N=(0,_.T)(I,(-R-G)/U);if((0,_.s0)(N,L),N=(0,_.Y1)(N),!b)return N;var j,V=p[0],H=c[0],ee=p[1],Q=c[1];H0^N[1]<((0,s.Wn)(N[0]-V)s.pi^(V<=N[0]&&N[0]<=H)){var K=(0,_.T)(I,(-R+G)/U);return(0,_.s0)(K,L),[N,(0,_.Y1)(K)]}}}function u(p,c){var b=r?l:s.pi-l,d=0;return p<-b?d|=1:p>b&&(d|=2),c<-b?d|=4:c>b&&(d|=8),d}return(0,m.Z)(o,function(p){var c,b,d,v,x;return{lineStart:function(){v=d=!1,x=1},point:function(g,y){var k,h=[g,y],M=o(g,y),A=r?M?0:u(g,y):M?u(g+(g<0?s.pi:-s.pi),y):0;if(!c&&(v=d=M)&&p.lineStart(),M!==d&&(!(k=i(c,h))||(0,T.Z)(c,k)||(0,T.Z)(h,k))&&(h[2]=1),M!==d)x=0,M?(p.lineStart(),k=i(h,c),p.point(k[0],k[1])):(k=i(c,h),p.point(k[0],k[1],2),p.lineEnd()),c=k;else if(n&&c&&r^M){var C;A&b||!(C=i(h,c,!0))||(x=0,r?(p.lineStart(),p.point(C[0][0],C[0][1]),p.point(C[1][0],C[1][1]),p.lineEnd()):(p.point(C[1][0],C[1][1]),p.lineEnd(),p.lineStart(),p.point(C[0][0],C[0][1],3)))}!M||c&&(0,T.Z)(c,h)||p.point(h[0],h[1]),c=h,d=M,b=A},lineEnd:function(){d&&p.lineEnd(),c=null},clean:function(){return x|(v&&d)<<1}}},function(p,c,b,d){(0,w.m)(d,l,a,b,p,c)},r?[0,-l]:[-s.pi,l-s.pi])}},97023:function(D,E,e){e.d(E,{Z:function(){return f}});var _=e(85272),w=e(46225),s=e(39695),T=e(23071),m=e(33064);function f(a,r,n,o){return function(i){var u,p,c,b=r(i),d=(0,_.Z)(),v=r(d),x=!1,g={point:y,lineStart:h,lineEnd:M,polygonStart:function(){g.point=A,g.lineStart=C,g.lineEnd=L,p=[],u=[]},polygonEnd:function(){g.point=y,g.lineStart=h,g.lineEnd=M,p=(0,m.TS)(p);var P=(0,T.Z)(u,o);p.length?(x||(i.polygonStart(),x=!0),(0,w.Z)(p,t,P,n,i)):P&&(x||(i.polygonStart(),x=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),x&&(i.polygonEnd(),x=!1),p=u=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function y(P,I){a(P,I)&&i.point(P,I)}function k(P,I){b.point(P,I)}function h(){g.point=k,b.lineStart()}function M(){g.point=y,b.lineEnd()}function A(P,I){c.push([P,I]),v.point(P,I)}function C(){v.lineStart(),c=[]}function L(){A(c[0][0],c[0][1]),v.lineEnd();var P,I,R,U,B=v.clean(),G=d.result(),N=G.length;if(c.pop(),u.push(c),c=null,N)if(1&B){if((I=(R=G[0]).length-1)>0){for(x||(i.polygonStart(),x=!0),i.lineStart(),P=0;P1&&2&B&&G.push(G.pop().concat(G.shift())),p.push(G.filter(l))}return g}}function l(a){return a.length>1}function t(a,r){return((a=a.x)[0]<0?a[1]-s.ou-s.Ho:s.ou-a[1])-((r=r.x)[0]<0?r[1]-s.ou-s.Ho:s.ou-r[1])}},87605:function(D,E,e){e.d(E,{Z:function(){return l}});var _=e(39695),w=e(85272),s=e(46225),T=e(33064),m=1e9,f=-m;function l(t,a,r,n){function o(b,d){return t<=b&&b<=r&&a<=d&&d<=n}function i(b,d,v,x){var g=0,y=0;if(b==null||(g=u(b,v))!==(y=u(d,v))||c(b,d)<0^v>0)do x.point(g===0||g===3?t:r,g>1?n:a);while((g=(g+v+4)%4)!==y);else x.point(d[0],d[1])}function u(b,d){return(0,_.Wn)(b[0]-t)<_.Ho?d>0?0:3:(0,_.Wn)(b[0]-r)<_.Ho?d>0?2:1:(0,_.Wn)(b[1]-a)<_.Ho?d>0?1:0:d>0?3:2}function p(b,d){return c(b.x,d.x)}function c(b,d){var v=u(b,1),x=u(d,1);return v!==x?v-x:v===0?d[1]-b[1]:v===1?b[0]-d[0]:v===2?b[1]-d[1]:d[0]-b[0]}return function(b){var d,v,x,g,y,k,h,M,A,C,L,P=b,I=(0,w.Z)(),R={point:U,lineStart:function(){R.point=B,v&&v.push(x=[]),C=!0,A=!1,h=M=NaN},lineEnd:function(){d&&(B(g,y),k&&A&&I.rejoin(),d.push(I.result())),R.point=U,A&&P.lineEnd()},polygonStart:function(){P=I,d=[],v=[],L=!0},polygonEnd:function(){var G=function(){for(var V=0,H=0,ee=v.length;Hn&&(oe-Q)*(n-X)>(se-X)*(t-Q)&&++V:se<=n&&(oe-Q)*(n-X)<(se-X)*(t-Q)&&--V;return V}(),N=L&&G,j=(d=(0,T.TS)(d)).length;(N||j)&&(b.polygonStart(),N&&(b.lineStart(),i(null,null,1,b),b.lineEnd()),j&&(0,s.Z)(d,p,G,i,b),b.polygonEnd()),P=b,d=v=x=null}};function U(G,N){o(G,N)&&P.point(G,N)}function B(G,N){var j=o(G,N);if(v&&x.push([G,N]),C)g=G,y=N,k=j,C=!1,j&&(P.lineStart(),P.point(G,N));else if(j&&A)P.point(G,N);else{var V=[h=Math.max(f,Math.min(m,h)),M=Math.max(f,Math.min(m,M))],H=[G=Math.max(f,Math.min(m,G)),N=Math.max(f,Math.min(m,N))];(function(ee,Q,X,Y,K,te){var re,oe=ee[0],se=ee[1],ce=0,xe=1,pe=Q[0]-oe,de=Q[1]-se;if(re=X-oe,pe||!(re>0)){if(re/=pe,pe<0){if(re0){if(re>xe)return;re>ce&&(ce=re)}if(re=K-oe,pe||!(re<0)){if(re/=pe,pe<0){if(re>xe)return;re>ce&&(ce=re)}else if(pe>0){if(re0)){if(re/=de,de<0){if(re0){if(re>xe)return;re>ce&&(ce=re)}if(re=te-se,de||!(re<0)){if(re/=de,de<0){if(re>xe)return;re>ce&&(ce=re)}else if(de>0){if(re0&&(ee[0]=oe+ce*pe,ee[1]=se+ce*de),xe<1&&(Q[0]=oe+xe*pe,Q[1]=se+xe*de),!0}}}}})(V,H,t,a,r,n)?(A||(P.lineStart(),P.point(V[0],V[1])),P.point(H[0],H[1]),j||P.lineEnd(),L=!1):j&&(P.lineStart(),P.point(G,N),L=!1)}h=G,M=N,A=j}return R}}},46225:function(D,E,e){e.d(E,{Z:function(){return T}});var _=e(67108),w=e(39695);function s(f,l,t,a){this.x=f,this.z=l,this.o=t,this.e=a,this.v=!1,this.n=this.p=null}function T(f,l,t,a,r){var n,o,i=[],u=[];if(f.forEach(function(x){if(!((g=x.length-1)<=0)){var g,y,k=x[0],h=x[g];if((0,_.Z)(k,h)){if(!k[2]&&!h[2]){for(r.lineStart(),n=0;n=0;--n)r.point((c=p[n])[0],c[1]);else a(d.x,d.p.x,-1,r);d=d.p}p=(d=d.o).z,v=!v}while(!d.v);r.lineEnd()}}}function m(f){if(l=f.length){for(var l,t,a=0,r=f[0];++a0&&(jn=M($t[$n],$t[$n-1]))>0&&Ln<=jn&&En<=jn&&(Ln+En-jn)*(1-Math.pow((Ln-En)/jn,2))u.Ho}).map(hr)).concat((0,N.w6)((0,u.mD)($n/un)*un,jn,un).filter(function(dn){return(0,u.Wn)(dn%On)>u.Ho}).map(tn))}return pn.lines=function(){return bn().map(function(dn){return{type:"LineString",coordinates:dn}})},pn.outline=function(){return{type:"Polygon",coordinates:[Pn(En).concat(jt(Zn).slice(1),Pn(Ln).reverse().slice(1),jt(Qn).reverse().slice(1))]}},pn.extent=function(dn){return arguments.length?pn.extentMajor(dn).extentMinor(dn):pn.extentMinor()},pn.extentMajor=function(dn){return arguments.length?(En=+dn[0][0],Ln=+dn[1][0],Qn=+dn[0][1],Zn=+dn[1][1],En>Ln&&(dn=En,En=Ln,Ln=dn),Qn>Zn&&(dn=Qn,Qn=Zn,Zn=dn),pn.precision(Sn)):[[En,Qn],[Ln,Zn]]},pn.extentMinor=function(dn){return arguments.length?(mn=+dn[0][0],$t=+dn[1][0],$n=+dn[0][1],jn=+dn[1][1],mn>$t&&(dn=mn,mn=$t,$t=dn),$n>jn&&(dn=$n,$n=jn,jn=dn),pn.precision(Sn)):[[mn,$n],[$t,jn]]},pn.step=function(dn){return arguments.length?pn.stepMajor(dn).stepMinor(dn):pn.stepMinor()},pn.stepMajor=function(dn){return arguments.length?(Rn=+dn[0],On=+dn[1],pn):[Rn,On]},pn.stepMinor=function(dn){return arguments.length?(Jt=+dn[0],un=+dn[1],pn):[Jt,un]},pn.precision=function(dn){return arguments.length?(Sn=+dn,hr=j($n,jn,90),tn=V(mn,$t,Sn),Pn=j(Qn,Zn,90),jt=V(En,Ln,Sn),pn):Sn},pn.extentMajor([[-180,-90+u.Ho],[180,90-u.Ho]]).extentMinor([[-180,-80-u.Ho],[180,80+u.Ho]])}function ee(){return H()()}var Q,X,Y,K,te=e(83074),re=e(8593),oe=(0,i.Z)(),se=(0,i.Z)(),ce={point:p.Z,lineStart:p.Z,lineEnd:p.Z,polygonStart:function(){ce.lineStart=xe,ce.lineEnd=he},polygonEnd:function(){ce.lineStart=ce.lineEnd=ce.point=p.Z,oe.add((0,u.Wn)(se)),se.reset()},result:function(){var $t=oe/2;return oe.reset(),$t}};function xe(){ce.point=pe}function pe($t,mn){ce.point=de,Q=Y=$t,X=K=mn}function de($t,mn){se.add(K*$t-Y*mn),Y=$t,K=mn}function he(){de(Q,X)}var ye,ze,Te,Ae,Me=ce,Ce=e(3559),ne=0,ue=0,me=0,we=0,Ee=0,Ue=0,De=0,je=0,ge=0,be={point:Se,lineStart:Ne,lineEnd:st,polygonStart:function(){be.lineStart=ot,be.lineEnd=ft},polygonEnd:function(){be.point=Se,be.lineStart=Ne,be.lineEnd=st},result:function(){var $t=ge?[De/ge,je/ge]:Ue?[we/Ue,Ee/Ue]:me?[ne/me,ue/me]:[NaN,NaN];return ne=ue=me=we=Ee=Ue=De=je=ge=0,$t}};function Se($t,mn){ne+=$t,ue+=mn,++me}function Ne(){be.point=Ye}function Ye($t,mn){be.point=Ze,Se(Te=$t,Ae=mn)}function Ze($t,mn){var Ln=$t-Te,En=mn-Ae,jn=(0,u._b)(Ln*Ln+En*En);we+=jn*(Te+$t)/2,Ee+=jn*(Ae+mn)/2,Ue+=jn,Se(Te=$t,Ae=mn)}function st(){be.point=Se}function ot(){be.point=yt}function ft(){Et(ye,ze)}function yt($t,mn){be.point=Et,Se(ye=Te=$t,ze=Ae=mn)}function Et($t,mn){var Ln=$t-Te,En=mn-Ae,jn=(0,u._b)(Ln*Ln+En*En);we+=jn*(Te+$t)/2,Ee+=jn*(Ae+mn)/2,Ue+=jn,De+=(jn=Ae*$t-Te*mn)*(Te+$t),je+=jn*(Ae+mn),ge+=3*jn,Se(Te=$t,Ae=mn)}var Tt=be;function xt($t){this._context=$t}xt.prototype={_radius:4.5,pointRadius:function($t){return this._radius=$t,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($t,mn){switch(this._point){case 0:this._context.moveTo($t,mn),this._point=1;break;case 1:this._context.lineTo($t,mn);break;default:this._context.moveTo($t+this._radius,mn),this._context.arc($t,mn,this._radius,0,u.BZ)}},result:p.Z};var Dt,It,Ft,qt,Nt,Je=(0,i.Z)(),Ke={point:p.Z,lineStart:function(){Ke.point=Ge},lineEnd:function(){Dt&&nt(It,Ft),Ke.point=p.Z},polygonStart:function(){Dt=!0},polygonEnd:function(){Dt=null},result:function(){var $t=+Je;return Je.reset(),$t}};function Ge($t,mn){Ke.point=nt,It=qt=$t,Ft=Nt=mn}function nt($t,mn){qt-=$t,Nt-=mn,Je.add((0,u._b)(qt*qt+Nt*Nt)),qt=$t,Nt=mn}var ht=Ke;function Oe(){this._string=[]}function Be($t){return"m0,"+$t+"a"+$t+","+$t+" 0 1,1 0,"+-2*$t+"a"+$t+","+$t+" 0 1,1 0,"+2*$t+"z"}function Qe($t,mn){var Ln,En,jn=4.5;function $n(Zn){return Zn&&(typeof jn=="function"&&En.pointRadius(+jn.apply(this,arguments)),(0,c.Z)(Zn,Ln(En))),En.result()}return $n.area=function(Zn){return(0,c.Z)(Zn,Ln(Me)),Me.result()},$n.measure=function(Zn){return(0,c.Z)(Zn,Ln(ht)),ht.result()},$n.bounds=function(Zn){return(0,c.Z)(Zn,Ln(Ce.Z)),Ce.Z.result()},$n.centroid=function(Zn){return(0,c.Z)(Zn,Ln(Tt)),Tt.result()},$n.projection=function(Zn){return arguments.length?(Ln=Zn==null?($t=null,re.Z):($t=Zn).stream,$n):$t},$n.context=function(Zn){return arguments.length?(En=Zn==null?(mn=null,new Oe):new xt(mn=Zn),typeof jn!="function"&&En.pointRadius(jn),$n):mn},$n.pointRadius=function(Zn){return arguments.length?(jn=typeof Zn=="function"?Zn:(En.pointRadius(+Zn),+Zn),$n):jn},$n.projection($t).context(mn)}Oe.prototype={_radius:4.5,_circle:Be(4.5),pointRadius:function($t){return($t=+$t)!==this._radius&&(this._radius=$t,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($t,mn){switch(this._point){case 0:this._string.push("M",$t,",",mn),this._point=1;break;case 1:this._string.push("L",$t,",",mn);break;default:this._circle==null&&(this._circle=Be(this._radius)),this._string.push("M",$t,",",mn,this._circle)}},result:function(){if(this._string.length){var $t=this._string.join("");return this._string=[],$t}return null}};var ut=e(15002);function pt($t){var mn=0,Ln=u.pi/3,En=(0,ut.r)($t),jn=En(mn,Ln);return jn.parallels=function($n){return arguments.length?En(mn=$n[0]*u.uR,Ln=$n[1]*u.uR):[mn*u.RW,Ln*u.RW]},jn}function bt($t,mn){var Ln=(0,u.O$)($t),En=(Ln+(0,u.O$)(mn))/2;if((0,u.Wn)(En)=.12&&Sn<.234&&On>=-.425&&On<-.214?Qn:Sn>=.166&&Sn<.234&&On>=-.214&&On<-.115?hr:Zn).invert(Jt)},Pn.stream=function(Jt){return $t&&mn===Jt?$t:(un=[Zn.stream(mn=Jt),Qn.stream(Jt),hr.stream(Jt)],Rn=un.length,$t={point:function(On,Sn){for(var pn=-1;++pn0?Qn<-u.ou+u.Ho&&(Qn=-u.ou+u.Ho):Qn>u.ou-u.Ho&&(Qn=u.ou-u.Ho);var hr=jn/(0,u.sQ)(Kt(Qn),En);return[hr*(0,u.O$)(En*Zn),jn-hr*(0,u.mC)(En*Zn)]}return $n.invert=function(Zn,Qn){var hr=jn-Qn,tn=(0,u.Xx)(En)*(0,u._b)(Zn*Zn+hr*hr),Pn=(0,u.fv)(Zn,(0,u.Wn)(hr))*(0,u.Xx)(hr);return hr*En<0&&(Pn-=u.pi*(0,u.Xx)(Zn)*(0,u.Xx)(hr)),[Pn/En,2*(0,u.z4)((0,u.sQ)(jn/tn,1/En))-u.ou]},$n}function yn(){return pt(nn).scale(109.5).parallels([30,30])}Wt.invert=function($t,mn){return[$t,2*(0,u.z4)((0,u.Qq)(mn))-u.ou]};var ln=e(97492);function kn($t,mn){var Ln=(0,u.mC)($t),En=$t===mn?(0,u.O$)($t):(Ln-(0,u.mC)(mn))/(mn-$t),jn=Ln/En+$t;if((0,u.Wn)(En)2?En[2]+90:90]):[(En=Ln())[0],En[1],En[2]-90]},Ln([0,0,90]).scale(159.155)}gr.invert=(0,Tr.O)(function($t){return 2*(0,u.z4)($t)}),dr.invert=function($t,mn){return[-mn,2*(0,u.z4)((0,u.Qq)($t))-u.ou]}},83074:function(D,E,e){e.d(E,{Z:function(){return w}});var _=e(39695);function w(s,T){var m=s[0]*_.uR,f=s[1]*_.uR,l=T[0]*_.uR,t=T[1]*_.uR,a=(0,_.mC)(f),r=(0,_.O$)(f),n=(0,_.mC)(t),o=(0,_.O$)(t),i=a*(0,_.mC)(m),u=a*(0,_.O$)(m),p=n*(0,_.mC)(l),c=n*(0,_.O$)(l),b=2*(0,_.ZR)((0,_._b)((0,_.Jy)(t-f)+a*n*(0,_.Jy)(l-m))),d=(0,_.O$)(b),v=b?function(x){var g=(0,_.O$)(x*=b)/d,y=(0,_.O$)(b-x)/d,k=y*i+g*p,h=y*u+g*c,M=y*r+g*o;return[(0,_.fv)(h,k)*_.RW,(0,_.fv)(M,(0,_._b)(k*k+h*h))*_.RW]}:function(){return[m*_.RW,f*_.RW]};return v.distance=b,v}},39695:function(D,E,e){e.d(E,{BZ:function(){return f},Ho:function(){return _},Jy:function(){return k},Kh:function(){return g},O$:function(){return b},OR:function(){return x},Qq:function(){return u},RW:function(){return l},Wn:function(){return a},Xx:function(){return d},ZR:function(){return y},_b:function(){return v},aW:function(){return w},cM:function(){return p},fv:function(){return n},mC:function(){return o},mD:function(){return i},ou:function(){return T},pi:function(){return s},pu:function(){return m},sQ:function(){return c},uR:function(){return t},z4:function(){return r}});var _=1e-6,w=1e-12,s=Math.PI,T=s/2,m=s/4,f=2*s,l=180/s,t=s/180,a=Math.abs,r=Math.atan,n=Math.atan2,o=Math.cos,i=Math.ceil,u=Math.exp,p=Math.log,c=Math.pow,b=Math.sin,d=Math.sign||function(h){return h>0?1:h<0?-1:0},v=Math.sqrt,x=Math.tan;function g(h){return h>1?0:h<-1?s:Math.acos(h)}function y(h){return h>1?T:h<-1?-T:Math.asin(h)}function k(h){return(h=b(h/2))*h}},73182:function(D,E,e){function _(){}e.d(E,{Z:function(){return _}})},3559:function(D,E,e){var _=e(73182),w=1/0,s=w,T=-w,m=T,f={point:function(l,t){lT&&(T=l),tm&&(m=t)},lineStart:_.Z,lineEnd:_.Z,polygonStart:_.Z,polygonEnd:_.Z,result:function(){var l=[[w,s],[T,m]];return T=m=-(s=w=1/0),l}};E.Z=f},67108:function(D,E,e){e.d(E,{Z:function(){return w}});var _=e(39695);function w(s,T){return(0,_.Wn)(s[0]-T[0])<_.Ho&&(0,_.Wn)(s[1]-T[1])<_.Ho}},23071:function(D,E,e){e.d(E,{Z:function(){return f}});var _=e(33940),w=e(7620),s=e(39695),T=(0,_.Z)();function m(l){return(0,s.Wn)(l[0])<=s.pi?l[0]:(0,s.Xx)(l[0])*(((0,s.Wn)(l[0])+s.pi)%s.BZ-s.pi)}function f(l,t){var a=m(t),r=t[1],n=(0,s.O$)(r),o=[(0,s.O$)(a),-(0,s.mC)(a),0],i=0,u=0;T.reset(),n===1?r=s.ou+s.Ho:n===-1&&(r=-s.ou-s.Ho);for(var p=0,c=l.length;p=0?1:-1,U=R*I,B=U>s.pi,G=y*L;if(T.add((0,s.fv)(G*R*(0,s.O$)(U),k*P+G*(0,s.mC)(U))),i+=B?I+R*s.BZ:I,B^x>=a^A>=a){var N=(0,w.T5)((0,w.Og)(v),(0,w.Og)(M));(0,w.iJ)(N);var j=(0,w.T5)(o,N);(0,w.iJ)(j);var V=(B^I>=0?-1:1)*(0,s.ZR)(j[2]);(r>V||r===V&&(N[0]||N[1]))&&(u+=B^I>=0?1:-1)}}return(i<-s.Ho||i4*g&&N--){var Q=A+U,X=C+B,Y=L+G,K=(0,f._b)(Q*Q+X*X+Y*Y),te=(0,f.ZR)(Y/=K),re=(0,f.Wn)((0,f.Wn)(Y)-1)g||(0,f.Wn)((V*xe+H*pe)/ee-.5)>.3||A*U+C*B+L*G2?xe[2]%360*f.uR:0,se()):[G*f.RW,N*f.RW,j*f.RW]},re.angle=function(xe){return arguments.length?(V=xe%360*f.uR,se()):V*f.RW},re.reflectX=function(xe){return arguments.length?(H=xe?-1:1,se()):H<0},re.reflectY=function(xe){return arguments.length?(ee=xe?-1:1,se()):ee<0},re.precision=function(xe){return arguments.length?(h=o(M,te=xe*xe),ce()):(0,f._b)(te)},re.fitExtent=function(xe,pe){return(0,a.qg)(re,xe,pe)},re.fitSize=function(xe,pe){return(0,a.mF)(re,xe,pe)},re.fitWidth=function(xe,pe){return(0,a.V6)(re,xe,pe)},re.fitHeight=function(xe,pe){return(0,a.rf)(re,xe,pe)},function(){return v=d.apply(this,arguments),re.invert=v.invert&&oe,se()}}},26867:function(D,E,e){e.d(E,{K:function(){return s},Z:function(){return T}});var _=e(15002),w=e(39695);function s(m,f){var l=f*f,t=l*l;return[m*(.8707-.131979*l+t*(t*(.003971*l-.001529*t)-.013791)),f*(1.007226+l*(.015085+t*(.028874*l-.044475-.005916*t)))]}function T(){return(0,_.Z)(s).scale(175.295)}s.invert=function(m,f){var l,t=f,a=25;do{var r=t*t,n=r*r;t-=l=(t*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))-f)/(1.007226+r*(.045255+n*(.259866*r-.311325-.06507600000000001*n)))}while((0,w.Wn)(l)>w.Ho&&--a>0);return[m/(.8707+(r=t*t)*(r*(r*r*r*(.003971-.001529*r)-.013791)-.131979)),t]}},57962:function(D,E,e){e.d(E,{I:function(){return T},Z:function(){return m}});var _=e(39695),w=e(25382),s=e(15002);function T(f,l){return[(0,_.mC)(l)*(0,_.O$)(f),(0,_.O$)(l)]}function m(){return(0,s.Z)(T).scale(249.5).clipAngle(90+_.Ho)}T.invert=(0,w.O)(_.ZR)},49386:function(D,E,e){e.d(E,{I:function(){return T},Z:function(){return t}});var _=e(96059),w=e(39695);function s(a,r){return[(0,w.Wn)(a)>w.pi?a+Math.round(-a/w.BZ)*w.BZ:a,r]}function T(a,r,n){return(a%=w.BZ)?r||n?(0,_.Z)(f(a),l(r,n)):f(a):r||n?l(r,n):s}function m(a){return function(r,n){return[(r+=a)>w.pi?r-w.BZ:r<-w.pi?r+w.BZ:r,n]}}function f(a){var r=m(a);return r.invert=m(-a),r}function l(a,r){var n=(0,w.mC)(a),o=(0,w.O$)(a),i=(0,w.mC)(r),u=(0,w.O$)(r);function p(c,b){var d=(0,w.mC)(b),v=(0,w.mC)(c)*d,x=(0,w.O$)(c)*d,g=(0,w.O$)(b),y=g*n+v*o;return[(0,w.fv)(x*i-y*u,v*n-g*o),(0,w.ZR)(y*i+x*u)]}return p.invert=function(c,b){var d=(0,w.mC)(b),v=(0,w.mC)(c)*d,x=(0,w.O$)(c)*d,g=(0,w.O$)(b),y=g*i-x*u;return[(0,w.fv)(x*i+g*u,v*n+y*o),(0,w.ZR)(y*n-v*o)]},p}function t(a){function r(n){return(n=a(n[0]*w.uR,n[1]*w.uR))[0]*=w.RW,n[1]*=w.RW,n}return a=T(a[0]*w.uR,a[1]*w.uR,a.length>2?a[2]*w.uR:0),r.invert=function(n){return(n=a.invert(n[0]*w.uR,n[1]*w.uR))[0]*=w.RW,n[1]*=w.RW,n},r}s.invert=s},72736:function(D,E,e){function _(l,t){l&&s.hasOwnProperty(l.type)&&s[l.type](l,t)}e.d(E,{Z:function(){return f}});var w={Feature:function(l,t){_(l.geometry,t)},FeatureCollection:function(l,t){for(var a=l.features,r=-1,n=a.length;++r=0;)ne+=ue[me].value;else ne=1;Ce.value=ne}function f(Ce,ne){var ue,me,we,Ee,Ue,De=new r(Ce),je=+Ce.value&&(De.value=Ce.value),ge=[De];for(ne==null&&(ne=l);ue=ge.pop();)if(je&&(ue.value=+ue.data.value),(we=ne(ue.data))&&(Ue=we.length))for(ue.children=new Array(Ue),Ee=Ue-1;Ee>=0;--Ee)ge.push(me=ue.children[Ee]=new r(we[Ee])),me.parent=ue,me.depth=ue.depth+1;return De.eachBefore(a)}function l(Ce){return Ce.children}function t(Ce){Ce.data=Ce.data.data}function a(Ce){var ne=0;do Ce.height=ne;while((Ce=Ce.parent)&&Ce.height<++ne)}function r(Ce){this.data=Ce,this.depth=this.height=0,this.parent=null}e.r(E),e.d(E,{cluster:function(){return T},hierarchy:function(){return f},pack:function(){return R},packEnclose:function(){return o},packSiblings:function(){return M},partition:function(){return V},stratify:function(){return Y},tree:function(){return xe},treemap:function(){return ze},treemapBinary:function(){return Te},treemapDice:function(){return j},treemapResquarify:function(){return Me},treemapSlice:function(){return pe},treemapSliceDice:function(){return Ae},treemapSquarify:function(){return ye}}),r.prototype=f.prototype={constructor:r,count:function(){return this.eachAfter(m)},each:function(Ce){var ne,ue,me,we,Ee=this,Ue=[Ee];do for(ne=Ue.reverse(),Ue=[];Ee=ne.pop();)if(Ce(Ee),ue=Ee.children)for(me=0,we=ue.length;me=0;--ue)we.push(ne[ue]);return this},sum:function(Ce){return this.eachAfter(function(ne){for(var ue=+Ce(ne.data)||0,me=ne.children,we=me&&me.length;--we>=0;)ue+=me[we].value;ne.value=ue})},sort:function(Ce){return this.eachBefore(function(ne){ne.children&&ne.children.sort(Ce)})},path:function(Ce){for(var ne=this,ue=function(Ee,Ue){if(Ee===Ue)return Ee;var De=Ee.ancestors(),je=Ue.ancestors(),ge=null;for(Ee=De.pop(),Ue=je.pop();Ee===Ue;)ge=Ee,Ee=De.pop(),Ue=je.pop();return ge}(ne,Ce),me=[ne];ne!==ue;)ne=ne.parent,me.push(ne);for(var we=me.length;Ce!==ue;)me.splice(we,0,Ce),Ce=Ce.parent;return me},ancestors:function(){for(var Ce=this,ne=[Ce];Ce=Ce.parent;)ne.push(Ce);return ne},descendants:function(){var Ce=[];return this.each(function(ne){Ce.push(ne)}),Ce},leaves:function(){var Ce=[];return this.eachBefore(function(ne){ne.children||Ce.push(ne)}),Ce},links:function(){var Ce=this,ne=[];return Ce.each(function(ue){ue!==Ce&&ne.push({source:ue.parent,target:ue})}),ne},copy:function(){return f(this).eachBefore(t)}};var n=Array.prototype.slice;function o(Ce){for(var ne,ue,me=0,we=(Ce=function(Ue){for(var De,je,ge=Ue.length;ge;)je=Math.random()*ge--|0,De=Ue[ge],Ue[ge]=Ue[je],Ue[je]=De;return Ue}(n.call(Ce))).length,Ee=[];me0&&ue*ue>me*me+we*we}function c(Ce,ne){for(var ue=0;ue(Ue*=Ue)?(me=(ge+Ue-we)/(2*ge),Ee=Math.sqrt(Math.max(0,Ue/ge-me*me)),ue.x=Ce.x-me*De-Ee*je,ue.y=Ce.y-me*je+Ee*De):(me=(ge+we-Ue)/(2*ge),Ee=Math.sqrt(Math.max(0,we/ge-me*me)),ue.x=ne.x+me*De-Ee*je,ue.y=ne.y+me*je+Ee*De)):(ue.x=ne.x+ue.r,ue.y=ne.y)}function g(Ce,ne){var ue=Ce.r+ne.r-1e-6,me=ne.x-Ce.x,we=ne.y-Ce.y;return ue>0&&ue*ue>me*me+we*we}function y(Ce){var ne=Ce._,ue=Ce.next._,me=ne.r+ue.r,we=(ne.x*ue.r+ue.x*ne.r)/me,Ee=(ne.y*ue.r+ue.y*ne.r)/me;return we*we+Ee*Ee}function k(Ce){this._=Ce,this.next=null,this.previous=null}function h(Ce){if(!(we=Ce.length))return 0;var ne,ue,me,we,Ee,Ue,De,je,ge,be,Se;if((ne=Ce[0]).x=0,ne.y=0,!(we>1))return ne.r;if(ue=Ce[1],ne.x=-ue.r,ue.x=ne.r,ue.y=0,!(we>2))return ne.r+ue.r;x(ue,ne,me=Ce[2]),ne=new k(ne),ue=new k(ue),me=new k(me),ne.next=me.previous=ue,ue.next=ne.previous=me,me.next=ue.previous=ne;e:for(De=3;De0)throw new Error("cycle");return Ue}return ue.id=function(me){return arguments.length?(Ce=C(me),ue):Ce},ue.parentId=function(me){return arguments.length?(ne=C(me),ue):ne},ue}function K(Ce,ne){return Ce.parent===ne.parent?1:2}function te(Ce){var ne=Ce.children;return ne?ne[0]:Ce.t}function re(Ce){var ne=Ce.children;return ne?ne[ne.length-1]:Ce.t}function oe(Ce,ne,ue){var me=ue/(ne.i-Ce.i);ne.c-=me,ne.s+=ue,Ce.c+=me,ne.z+=ue,ne.m+=ue}function se(Ce,ne,ue){return Ce.a.parent===ne.parent?Ce.a:ue}function ce(Ce,ne){this._=Ce,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=ne}function xe(){var Ce=K,ne=1,ue=1,me=null;function we(je){var ge=function(ft){for(var yt,Et,Tt,xt,Dt,It=new ce(ft,0),Ft=[It];yt=Ft.pop();)if(Tt=yt._.children)for(yt.children=new Array(Dt=Tt.length),xt=Dt-1;xt>=0;--xt)Ft.push(Et=yt.children[xt]=new ce(Tt[xt],xt)),Et.parent=yt;return(It.parent=new ce(null,0)).children=[It],It}(je);if(ge.eachAfter(Ee),ge.parent.m=-ge.z,ge.eachBefore(Ue),me)je.eachBefore(De);else{var be=je,Se=je,Ne=je;je.eachBefore(function(ft){ft.xSe.x&&(Se=ft),ft.depth>Ne.depth&&(Ne=ft)});var Ye=be===Se?1:Ce(be,Se)/2,Ze=Ye-be.x,st=ne/(Se.x+Ye+Ze),ot=ue/(Ne.depth||1);je.eachBefore(function(ft){ft.x=(ft.x+Ze)*st,ft.y=ft.depth*ot})}return je}function Ee(je){var ge=je.children,be=je.parent.children,Se=je.i?be[je.i-1]:null;if(ge){(function(Ye){for(var Ze,st=0,ot=0,ft=Ye.children,yt=ft.length;--yt>=0;)(Ze=ft[yt]).z+=st,Ze.m+=st,st+=Ze.s+(ot+=Ze.c)})(je);var Ne=(ge[0].z+ge[ge.length-1].z)/2;Se?(je.z=Se.z+Ce(je._,Se._),je.m=je.z-Ne):je.z=Ne}else Se&&(je.z=Se.z+Ce(je._,Se._));je.parent.A=function(Ye,Ze,st){if(Ze){for(var ot,ft=Ye,yt=Ye,Et=Ze,Tt=ft.parent.children[0],xt=ft.m,Dt=yt.m,It=Et.m,Ft=Tt.m;Et=re(Et),ft=te(ft),Et&&ft;)Tt=te(Tt),(yt=re(yt)).a=Ye,(ot=Et.z+It-ft.z-xt+Ce(Et._,ft._))>0&&(oe(se(Et,Ye,st),Ye,ot),xt+=ot,Dt+=ot),It+=Et.m,xt+=ft.m,Ft+=Tt.m,Dt+=yt.m;Et&&!re(yt)&&(yt.t=Et,yt.m+=It-Dt),ft&&!te(Tt)&&(Tt.t=ft,Tt.m+=xt-Ft,st=Ye)}return st}(je,Se,je.parent.A||be[0])}function Ue(je){je._.x=je.z+je.parent.m,je.m+=je.parent.m}function De(je){je.x*=ne,je.y=je.depth*ue}return we.separation=function(je){return arguments.length?(Ce=je,we):Ce},we.size=function(je){return arguments.length?(me=!1,ne=+je[0],ue=+je[1],we):me?null:[ne,ue]},we.nodeSize=function(je){return arguments.length?(me=!0,ne=+je[0],ue=+je[1],we):me?[ne,ue]:null},we}function pe(Ce,ne,ue,me,we){for(var Ee,Ue=Ce.children,De=-1,je=Ue.length,ge=Ce.value&&(we-ue)/Ce.value;++DeNe&&(Ne=De),ot=be*be*st,(Ye=Math.max(Ne/ot,ot/Se))>Ze){be-=De;break}Ze=Ye}ft.push(Ue={value:be,dice:je1?me:1)},ue}(de);function ze(){var Ce=ye,ne=!1,ue=1,me=1,we=[0],Ee=L,Ue=L,De=L,je=L,ge=L;function be(Ne){return Ne.x0=Ne.y0=0,Ne.x1=ue,Ne.y1=me,Ne.eachBefore(Se),we=[0],ne&&Ne.eachBefore(N),Ne}function Se(Ne){var Ye=we[Ne.depth],Ze=Ne.x0+Ye,st=Ne.y0+Ye,ot=Ne.x1-Ye,ft=Ne.y1-Ye;ot=Ne-1){var yt=De[Se];return yt.x0=Ze,yt.y0=st,yt.x1=ot,void(yt.y1=ft)}for(var Et=ge[Se],Tt=Ye/2+Et,xt=Se+1,Dt=Ne-1;xt>>1;ge[It]ft-st){var Nt=(Ze*qt+ot*Ft)/Ye;be(Se,xt,Ft,Ze,st,Nt,ft),be(xt,Ne,qt,Nt,st,ot,ft)}else{var Je=(st*qt+ft*Ft)/Ye;be(Se,xt,Ft,Ze,st,ot,Je),be(xt,Ne,qt,Ze,Je,ot,ft)}})(0,je,Ce.value,ne,ue,me,we)}function Ae(Ce,ne,ue,me,we){(1&Ce.depth?pe:j)(Ce,ne,ue,me,we)}var Me=function Ce(ne){function ue(me,we,Ee,Ue,De){if((je=me._squarify)&&je.ratio===ne)for(var je,ge,be,Se,Ne,Ye=-1,Ze=je.length,st=me.value;++Ye1?me:1)},ue}(de)},45879:function(D,E,e){e.d(E,{h5:function(){return p}});var _=Math.PI,w=2*_,s=1e-6,T=w-s;function m(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function f(){return new m}m.prototype=f.prototype={constructor:m,moveTo:function(c,b){this._+="M"+(this._x0=this._x1=+c)+","+(this._y0=this._y1=+b)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(c,b){this._+="L"+(this._x1=+c)+","+(this._y1=+b)},quadraticCurveTo:function(c,b,d,v){this._+="Q"+ +c+","+ +b+","+(this._x1=+d)+","+(this._y1=+v)},bezierCurveTo:function(c,b,d,v,x,g){this._+="C"+ +c+","+ +b+","+ +d+","+ +v+","+(this._x1=+x)+","+(this._y1=+g)},arcTo:function(c,b,d,v,x){c=+c,b=+b,d=+d,v=+v,x=+x;var g=this._x1,y=this._y1,k=d-c,h=v-b,M=g-c,A=y-b,C=M*M+A*A;if(x<0)throw new Error("negative radius: "+x);if(this._x1===null)this._+="M"+(this._x1=c)+","+(this._y1=b);else if(C>s)if(Math.abs(A*k-h*M)>s&&x){var L=d-g,P=v-y,I=k*k+h*h,R=L*L+P*P,U=Math.sqrt(I),B=Math.sqrt(C),G=x*Math.tan((_-Math.acos((I+C-R)/(2*U*B)))/2),N=G/B,j=G/U;Math.abs(N-1)>s&&(this._+="L"+(c+N*M)+","+(b+N*A)),this._+="A"+x+","+x+",0,0,"+ +(A*L>M*P)+","+(this._x1=c+j*k)+","+(this._y1=b+j*h)}else this._+="L"+(this._x1=c)+","+(this._y1=b)},arc:function(c,b,d,v,x,g){c=+c,b=+b,g=!!g;var y=(d=+d)*Math.cos(v),k=d*Math.sin(v),h=c+y,M=b+k,A=1^g,C=g?v-x:x-v;if(d<0)throw new Error("negative radius: "+d);this._x1===null?this._+="M"+h+","+M:(Math.abs(this._x1-h)>s||Math.abs(this._y1-M)>s)&&(this._+="L"+h+","+M),d&&(C<0&&(C=C%w+w),C>T?this._+="A"+d+","+d+",0,1,"+A+","+(c-y)+","+(b-k)+"A"+d+","+d+",0,1,"+A+","+(this._x1=h)+","+(this._y1=M):C>s&&(this._+="A"+d+","+d+",0,"+ +(C>=_)+","+A+","+(this._x1=c+d*Math.cos(x))+","+(this._y1=b+d*Math.sin(x))))},rect:function(c,b,d,v){this._+="M"+(this._x0=this._x1=+c)+","+(this._y0=this._y1=+b)+"h"+ +d+"v"+ +v+"h"+-d+"Z"},toString:function(){return this._}};var l=f,t=Array.prototype.slice;function a(c){return function(){return c}}function r(c){return c[0]}function n(c){return c[1]}function o(c){return c.source}function i(c){return c.target}function u(c,b,d,v,x){c.moveTo(b,d),c.bezierCurveTo(b=(b+v)/2,d,b,x,v,x)}function p(){return function(c){var b=o,d=i,v=r,x=n,g=null;function y(){var k,h=t.call(arguments),M=b.apply(this,h),A=d.apply(this,h);if(g||(g=k=l()),c(g,+v.apply(this,(h[0]=M,h)),+x.apply(this,h),+v.apply(this,(h[0]=A,h)),+x.apply(this,h)),k)return g=null,k+""||null}return y.source=function(k){return arguments.length?(b=k,y):b},y.target=function(k){return arguments.length?(d=k,y):d},y.x=function(k){return arguments.length?(v=typeof k=="function"?k:a(+k),y):v},y.y=function(k){return arguments.length?(x=typeof k=="function"?k:a(+k),y):x},y.context=function(k){return arguments.length?(g=k??null,y):g},y}(u)}},84096:function(D,E,e){e.d(E,{i$:function(){return o},Dq:function(){return r},g0:function(){return i}});var _=e(58176),w=e(48480),s=e(59879),T=e(82301),m=e(34823),f=e(79791);function l(xt){if(0<=xt.y&&xt.y<100){var Dt=new Date(-1,xt.m,xt.d,xt.H,xt.M,xt.S,xt.L);return Dt.setFullYear(xt.y),Dt}return new Date(xt.y,xt.m,xt.d,xt.H,xt.M,xt.S,xt.L)}function t(xt){if(0<=xt.y&&xt.y<100){var Dt=new Date(Date.UTC(-1,xt.m,xt.d,xt.H,xt.M,xt.S,xt.L));return Dt.setUTCFullYear(xt.y),Dt}return new Date(Date.UTC(xt.y,xt.m,xt.d,xt.H,xt.M,xt.S,xt.L))}function a(xt,Dt,It){return{y:xt,m:Dt,d:It,H:0,M:0,S:0,L:0}}function r(xt){var Dt=xt.dateTime,It=xt.date,Ft=xt.time,qt=xt.periods,Nt=xt.days,Je=xt.shortDays,Ke=xt.months,Ge=xt.shortMonths,nt=x(qt),ht=g(qt),Oe=x(Nt),Be=g(Nt),Qe=x(Je),ut=g(Je),pt=x(Ke),bt=g(Ke),Lt=x(Ge),Ct=g(Ge),mt={a:function(Gt){return Je[Gt.getDay()]},A:function(Gt){return Nt[Gt.getDay()]},b:function(Gt){return Ge[Gt.getMonth()]},B:function(Gt){return Ke[Gt.getMonth()]},c:null,d:Y,e:Y,f:se,H:K,I:te,j:re,L:oe,m:ce,M:xe,p:function(Gt){return qt[+(Gt.getHours()>=12)]},q:function(Gt){return 1+~~(Gt.getMonth()/3)},Q:Et,s:Tt,S:pe,u:de,U:he,V:ye,w:ze,W:Te,x:null,X:null,y:Ae,Y:Me,Z:Ce,"%":yt},Ot={a:function(Gt){return Je[Gt.getUTCDay()]},A:function(Gt){return Nt[Gt.getUTCDay()]},b:function(Gt){return Ge[Gt.getUTCMonth()]},B:function(Gt){return Ke[Gt.getUTCMonth()]},c:null,d:ne,e:ne,f:Ue,H:ue,I:me,j:we,L:Ee,m:De,M:je,p:function(Gt){return qt[+(Gt.getUTCHours()>=12)]},q:function(Gt){return 1+~~(Gt.getUTCMonth()/3)},Q:Et,s:Tt,S:ge,u:be,U:Se,V:Ne,w:Ye,W:Ze,x:null,X:null,y:st,Y:ot,Z:ft,"%":yt},_t={a:function(Gt,Xt,Kt){var nn=Qe.exec(Xt.slice(Kt));return nn?(Gt.w=ut[nn[0].toLowerCase()],Kt+nn[0].length):-1},A:function(Gt,Xt,Kt){var nn=Oe.exec(Xt.slice(Kt));return nn?(Gt.w=Be[nn[0].toLowerCase()],Kt+nn[0].length):-1},b:function(Gt,Xt,Kt){var nn=Lt.exec(Xt.slice(Kt));return nn?(Gt.m=Ct[nn[0].toLowerCase()],Kt+nn[0].length):-1},B:function(Gt,Xt,Kt){var nn=pt.exec(Xt.slice(Kt));return nn?(Gt.m=bt[nn[0].toLowerCase()],Kt+nn[0].length):-1},c:function(Gt,Xt,Kt){return Wt(Gt,Dt,Xt,Kt)},d:U,e:U,f:H,H:G,I:G,j:B,L:V,m:R,M:N,p:function(Gt,Xt,Kt){var nn=nt.exec(Xt.slice(Kt));return nn?(Gt.p=ht[nn[0].toLowerCase()],Kt+nn[0].length):-1},q:I,Q,s:X,S:j,u:k,U:h,V:M,w:y,W:A,x:function(Gt,Xt,Kt){return Wt(Gt,It,Xt,Kt)},X:function(Gt,Xt,Kt){return Wt(Gt,Ft,Xt,Kt)},y:L,Y:C,Z:P,"%":ee};function Pt(Gt,Xt){return function(Kt){var nn,yn,ln,kn=[],Wn=-1,wn=0,on=Gt.length;for(Kt instanceof Date||(Kt=new Date(+Kt));++Wn53)return null;"w"in ln||(ln.w=1),"Z"in ln?(yn=(nn=t(a(ln.y,0,1))).getUTCDay(),nn=yn>4||yn===0?_.l6.ceil(nn):(0,_.l6)(nn),nn=w.Z.offset(nn,7*(ln.V-1)),ln.y=nn.getUTCFullYear(),ln.m=nn.getUTCMonth(),ln.d=nn.getUTCDate()+(ln.w+6)%7):(yn=(nn=l(a(ln.y,0,1))).getDay(),nn=yn>4||yn===0?s.wA.ceil(nn):(0,s.wA)(nn),nn=T.Z.offset(nn,7*(ln.V-1)),ln.y=nn.getFullYear(),ln.m=nn.getMonth(),ln.d=nn.getDate()+(ln.w+6)%7)}else("W"in ln||"U"in ln)&&("w"in ln||(ln.w="u"in ln?ln.u%7:"W"in ln?1:0),yn="Z"in ln?t(a(ln.y,0,1)).getUTCDay():l(a(ln.y,0,1)).getDay(),ln.m=0,ln.d="W"in ln?(ln.w+6)%7+7*ln.W-(yn+5)%7:ln.w+7*ln.U-(yn+6)%7);return"Z"in ln?(ln.H+=ln.Z/100|0,ln.M+=ln.Z%100,t(ln)):l(ln)}}function Wt(Gt,Xt,Kt,nn){for(var yn,ln,kn=0,Wn=Xt.length,wn=Kt.length;kn=wn)return-1;if((yn=Xt.charCodeAt(kn++))===37){if(yn=Xt.charAt(kn++),!(ln=_t[yn in u?Xt.charAt(kn++):yn])||(nn=ln(Gt,Kt,nn))<0)return-1}else if(yn!=Kt.charCodeAt(nn++))return-1}return nn}return mt.x=Pt(It,mt),mt.X=Pt(Ft,mt),mt.c=Pt(Dt,mt),Ot.x=Pt(It,Ot),Ot.X=Pt(Ft,Ot),Ot.c=Pt(Dt,Ot),{format:function(Gt){var Xt=Pt(Gt+="",mt);return Xt.toString=function(){return Gt},Xt},parse:function(Gt){var Xt=Bt(Gt+="",!1);return Xt.toString=function(){return Gt},Xt},utcFormat:function(Gt){var Xt=Pt(Gt+="",Ot);return Xt.toString=function(){return Gt},Xt},utcParse:function(Gt){var Xt=Bt(Gt+="",!0);return Xt.toString=function(){return Gt},Xt}}}var n,o,i,u={"-":"",_:" ",0:"0"},p=/^\s*\d+/,c=/^%/,b=/[\\^$*+?|[\]().{}]/g;function d(xt,Dt,It){var Ft=xt<0?"-":"",qt=(Ft?-xt:xt)+"",Nt=qt.length;return Ft+(Nt68?1900:2e3),It+Ft[0].length):-1}function P(xt,Dt,It){var Ft=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Dt.slice(It,It+6));return Ft?(xt.Z=Ft[1]?0:-(Ft[2]+(Ft[3]||"00")),It+Ft[0].length):-1}function I(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+1));return Ft?(xt.q=3*Ft[0]-3,It+Ft[0].length):-1}function R(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+2));return Ft?(xt.m=Ft[0]-1,It+Ft[0].length):-1}function U(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+2));return Ft?(xt.d=+Ft[0],It+Ft[0].length):-1}function B(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+3));return Ft?(xt.m=0,xt.d=+Ft[0],It+Ft[0].length):-1}function G(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+2));return Ft?(xt.H=+Ft[0],It+Ft[0].length):-1}function N(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+2));return Ft?(xt.M=+Ft[0],It+Ft[0].length):-1}function j(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+2));return Ft?(xt.S=+Ft[0],It+Ft[0].length):-1}function V(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+3));return Ft?(xt.L=+Ft[0],It+Ft[0].length):-1}function H(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+6));return Ft?(xt.L=Math.floor(Ft[0]/1e3),It+Ft[0].length):-1}function ee(xt,Dt,It){var Ft=c.exec(Dt.slice(It,It+1));return Ft?It+Ft[0].length:-1}function Q(xt,Dt,It){var Ft=p.exec(Dt.slice(It));return Ft?(xt.Q=+Ft[0],It+Ft[0].length):-1}function X(xt,Dt,It){var Ft=p.exec(Dt.slice(It));return Ft?(xt.s=+Ft[0],It+Ft[0].length):-1}function Y(xt,Dt){return d(xt.getDate(),Dt,2)}function K(xt,Dt){return d(xt.getHours(),Dt,2)}function te(xt,Dt){return d(xt.getHours()%12||12,Dt,2)}function re(xt,Dt){return d(1+T.Z.count((0,m.Z)(xt),xt),Dt,3)}function oe(xt,Dt){return d(xt.getMilliseconds(),Dt,3)}function se(xt,Dt){return oe(xt,Dt)+"000"}function ce(xt,Dt){return d(xt.getMonth()+1,Dt,2)}function xe(xt,Dt){return d(xt.getMinutes(),Dt,2)}function pe(xt,Dt){return d(xt.getSeconds(),Dt,2)}function de(xt){var Dt=xt.getDay();return Dt===0?7:Dt}function he(xt,Dt){return d(s.OM.count((0,m.Z)(xt)-1,xt),Dt,2)}function ye(xt,Dt){var It=xt.getDay();return xt=It>=4||It===0?(0,s.bL)(xt):s.bL.ceil(xt),d(s.bL.count((0,m.Z)(xt),xt)+((0,m.Z)(xt).getDay()===4),Dt,2)}function ze(xt){return xt.getDay()}function Te(xt,Dt){return d(s.wA.count((0,m.Z)(xt)-1,xt),Dt,2)}function Ae(xt,Dt){return d(xt.getFullYear()%100,Dt,2)}function Me(xt,Dt){return d(xt.getFullYear()%1e4,Dt,4)}function Ce(xt){var Dt=xt.getTimezoneOffset();return(Dt>0?"-":(Dt*=-1,"+"))+d(Dt/60|0,"0",2)+d(Dt%60,"0",2)}function ne(xt,Dt){return d(xt.getUTCDate(),Dt,2)}function ue(xt,Dt){return d(xt.getUTCHours(),Dt,2)}function me(xt,Dt){return d(xt.getUTCHours()%12||12,Dt,2)}function we(xt,Dt){return d(1+w.Z.count((0,f.Z)(xt),xt),Dt,3)}function Ee(xt,Dt){return d(xt.getUTCMilliseconds(),Dt,3)}function Ue(xt,Dt){return Ee(xt,Dt)+"000"}function De(xt,Dt){return d(xt.getUTCMonth()+1,Dt,2)}function je(xt,Dt){return d(xt.getUTCMinutes(),Dt,2)}function ge(xt,Dt){return d(xt.getUTCSeconds(),Dt,2)}function be(xt){var Dt=xt.getUTCDay();return Dt===0?7:Dt}function Se(xt,Dt){return d(_.Ox.count((0,f.Z)(xt)-1,xt),Dt,2)}function Ne(xt,Dt){var It=xt.getUTCDay();return xt=It>=4||It===0?(0,_.hB)(xt):_.hB.ceil(xt),d(_.hB.count((0,f.Z)(xt),xt)+((0,f.Z)(xt).getUTCDay()===4),Dt,2)}function Ye(xt){return xt.getUTCDay()}function Ze(xt,Dt){return d(_.l6.count((0,f.Z)(xt)-1,xt),Dt,2)}function st(xt,Dt){return d(xt.getUTCFullYear()%100,Dt,2)}function ot(xt,Dt){return d(xt.getUTCFullYear()%1e4,Dt,4)}function ft(){return"+0000"}function yt(){return"%"}function Et(xt){return+xt}function Tt(xt){return Math.floor(+xt/1e3)}n=r({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"]}),o=n.format,n.parse,i=n.utcFormat,n.utcParse},82301:function(D,E,e){e.d(E,{a:function(){return T}});var _=e(30052),w=e(54263),s=(0,_.Z)(function(m){m.setHours(0,0,0,0)},function(m,f){m.setDate(m.getDate()+f)},function(m,f){return(f-m-(f.getTimezoneOffset()-m.getTimezoneOffset())*w.yB)/w.UD},function(m){return m.getDate()-1});E.Z=s;var T=s.range},54263:function(D,E,e){e.d(E,{UD:function(){return T},Y2:function(){return s},Ym:function(){return _},iM:function(){return m},yB:function(){return w}});var _=1e3,w=6e4,s=36e5,T=864e5,m=6048e5},81041:function(D,E,e){e.r(E),e.d(E,{timeDay:function(){return p.Z},timeDays:function(){return p.a},timeFriday:function(){return c.mC},timeFridays:function(){return c.b$},timeHour:function(){return i},timeHours:function(){return u},timeInterval:function(){return _.Z},timeMillisecond:function(){return s},timeMilliseconds:function(){return T},timeMinute:function(){return r},timeMinutes:function(){return n},timeMonday:function(){return c.wA},timeMondays:function(){return c.bJ},timeMonth:function(){return d},timeMonths:function(){return v},timeSaturday:function(){return c.EY},timeSaturdays:function(){return c.Ff},timeSecond:function(){return l},timeSeconds:function(){return t},timeSunday:function(){return c.OM},timeSundays:function(){return c.vm},timeThursday:function(){return c.bL},timeThursdays:function(){return c.$t},timeTuesday:function(){return c.sy},timeTuesdays:function(){return c.aU},timeWednesday:function(){return c.zg},timeWednesdays:function(){return c.Ld},timeWeek:function(){return c.OM},timeWeeks:function(){return c.vm},timeYear:function(){return x.Z},timeYears:function(){return x.g},utcDay:function(){return C.Z},utcDays:function(){return C.y},utcFriday:function(){return L.QQ},utcFridays:function(){return L.fz},utcHour:function(){return M},utcHours:function(){return A},utcMillisecond:function(){return s},utcMilliseconds:function(){return T},utcMinute:function(){return y},utcMinutes:function(){return k},utcMonday:function(){return L.l6},utcMondays:function(){return L.$3},utcMonth:function(){return I},utcMonths:function(){return R},utcSaturday:function(){return L.g4},utcSaturdays:function(){return L.Q_},utcSecond:function(){return l},utcSeconds:function(){return t},utcSunday:function(){return L.Ox},utcSundays:function(){return L.SU},utcThursday:function(){return L.hB},utcThursdays:function(){return L.xj},utcTuesday:function(){return L.J1},utcTuesdays:function(){return L.DK},utcWednesday:function(){return L.b3},utcWednesdays:function(){return L.uy},utcWeek:function(){return L.Ox},utcWeeks:function(){return L.SU},utcYear:function(){return U.Z},utcYears:function(){return U.D}});var _=e(30052),w=(0,_.Z)(function(){},function(B,G){B.setTime(+B+G)},function(B,G){return G-B});w.every=function(B){return B=Math.floor(B),isFinite(B)&&B>0?B>1?(0,_.Z)(function(G){G.setTime(Math.floor(G/B)*B)},function(G,N){G.setTime(+G+N*B)},function(G,N){return(N-G)/B}):w:null};var s=w,T=w.range,m=e(54263),f=(0,_.Z)(function(B){B.setTime(B-B.getMilliseconds())},function(B,G){B.setTime(+B+G*m.Ym)},function(B,G){return(G-B)/m.Ym},function(B){return B.getUTCSeconds()}),l=f,t=f.range,a=(0,_.Z)(function(B){B.setTime(B-B.getMilliseconds()-B.getSeconds()*m.Ym)},function(B,G){B.setTime(+B+G*m.yB)},function(B,G){return(G-B)/m.yB},function(B){return B.getMinutes()}),r=a,n=a.range,o=(0,_.Z)(function(B){B.setTime(B-B.getMilliseconds()-B.getSeconds()*m.Ym-B.getMinutes()*m.yB)},function(B,G){B.setTime(+B+G*m.Y2)},function(B,G){return(G-B)/m.Y2},function(B){return B.getHours()}),i=o,u=o.range,p=e(82301),c=e(59879),b=(0,_.Z)(function(B){B.setDate(1),B.setHours(0,0,0,0)},function(B,G){B.setMonth(B.getMonth()+G)},function(B,G){return G.getMonth()-B.getMonth()+12*(G.getFullYear()-B.getFullYear())},function(B){return B.getMonth()}),d=b,v=b.range,x=e(34823),g=(0,_.Z)(function(B){B.setUTCSeconds(0,0)},function(B,G){B.setTime(+B+G*m.yB)},function(B,G){return(G-B)/m.yB},function(B){return B.getUTCMinutes()}),y=g,k=g.range,h=(0,_.Z)(function(B){B.setUTCMinutes(0,0,0)},function(B,G){B.setTime(+B+G*m.Y2)},function(B,G){return(G-B)/m.Y2},function(B){return B.getUTCHours()}),M=h,A=h.range,C=e(48480),L=e(58176),P=(0,_.Z)(function(B){B.setUTCDate(1),B.setUTCHours(0,0,0,0)},function(B,G){B.setUTCMonth(B.getUTCMonth()+G)},function(B,G){return G.getUTCMonth()-B.getUTCMonth()+12*(G.getUTCFullYear()-B.getUTCFullYear())},function(B){return B.getUTCMonth()}),I=P,R=P.range,U=e(79791)},30052:function(D,E,e){e.d(E,{Z:function(){return s}});var _=new Date,w=new Date;function s(T,m,f,l){function t(a){return T(a=arguments.length===0?new Date:new Date(+a)),a}return t.floor=function(a){return T(a=new Date(+a)),a},t.ceil=function(a){return T(a=new Date(a-1)),m(a,1),T(a),a},t.round=function(a){var r=t(a),n=t.ceil(a);return a-r0))return i;do i.push(o=new Date(+a)),m(a,n),T(a);while(o=r)for(;T(r),!a(r);)r.setTime(r-1)},function(r,n){if(r>=r)if(n<0)for(;++n<=0;)for(;m(r,-1),!a(r););else for(;--n>=0;)for(;m(r,1),!a(r););})},f&&(t.count=function(a,r){return _.setTime(+a),w.setTime(+r),T(_),T(w),Math.floor(f(_,w))},t.every=function(a){return a=Math.floor(a),isFinite(a)&&a>0?a>1?t.filter(l?function(r){return l(r)%a==0}:function(r){return t.count(0,r)%a==0}):t:null}),t}},48480:function(D,E,e){e.d(E,{y:function(){return T}});var _=e(30052),w=e(54263),s=(0,_.Z)(function(m){m.setUTCHours(0,0,0,0)},function(m,f){m.setUTCDate(m.getUTCDate()+f)},function(m,f){return(f-m)/w.UD},function(m){return m.getUTCDate()-1});E.Z=s;var T=s.range},58176:function(D,E,e){e.d(E,{$3:function(){return o},DK:function(){return i},J1:function(){return f},Ox:function(){return T},QQ:function(){return a},Q_:function(){return b},SU:function(){return n},b3:function(){return l},fz:function(){return c},g4:function(){return r},hB:function(){return t},l6:function(){return m},uy:function(){return u},xj:function(){return p}});var _=e(30052),w=e(54263);function s(d){return(0,_.Z)(function(v){v.setUTCDate(v.getUTCDate()-(v.getUTCDay()+7-d)%7),v.setUTCHours(0,0,0,0)},function(v,x){v.setUTCDate(v.getUTCDate()+7*x)},function(v,x){return(x-v)/w.iM})}var T=s(0),m=s(1),f=s(2),l=s(3),t=s(4),a=s(5),r=s(6),n=T.range,o=m.range,i=f.range,u=l.range,p=t.range,c=a.range,b=r.range},79791:function(D,E,e){e.d(E,{D:function(){return s}});var _=e(30052),w=(0,_.Z)(function(T){T.setUTCMonth(0,1),T.setUTCHours(0,0,0,0)},function(T,m){T.setUTCFullYear(T.getUTCFullYear()+m)},function(T,m){return m.getUTCFullYear()-T.getUTCFullYear()},function(T){return T.getUTCFullYear()});w.every=function(T){return isFinite(T=Math.floor(T))&&T>0?(0,_.Z)(function(m){m.setUTCFullYear(Math.floor(m.getUTCFullYear()/T)*T),m.setUTCMonth(0,1),m.setUTCHours(0,0,0,0)},function(m,f){m.setUTCFullYear(m.getUTCFullYear()+f*T)}):null},E.Z=w;var s=w.range},59879:function(D,E,e){e.d(E,{$t:function(){return p},EY:function(){return r},Ff:function(){return b},Ld:function(){return u},OM:function(){return T},aU:function(){return i},b$:function(){return c},bJ:function(){return o},bL:function(){return t},mC:function(){return a},sy:function(){return f},vm:function(){return n},wA:function(){return m},zg:function(){return l}});var _=e(30052),w=e(54263);function s(d){return(0,_.Z)(function(v){v.setDate(v.getDate()-(v.getDay()+7-d)%7),v.setHours(0,0,0,0)},function(v,x){v.setDate(v.getDate()+7*x)},function(v,x){return(x-v-(x.getTimezoneOffset()-v.getTimezoneOffset())*w.yB)/w.iM})}var T=s(0),m=s(1),f=s(2),l=s(3),t=s(4),a=s(5),r=s(6),n=T.range,o=m.range,i=f.range,u=l.range,p=t.range,c=a.range,b=r.range},34823:function(D,E,e){e.d(E,{g:function(){return s}});var _=e(30052),w=(0,_.Z)(function(T){T.setMonth(0,1),T.setHours(0,0,0,0)},function(T,m){T.setFullYear(T.getFullYear()+m)},function(T,m){return m.getFullYear()-T.getFullYear()},function(T){return T.getFullYear()});w.every=function(T){return isFinite(T=Math.floor(T))&&T>0?(0,_.Z)(function(m){m.setFullYear(Math.floor(m.getFullYear()/T)*T),m.setMonth(0,1),m.setHours(0,0,0,0)},function(m,f){m.setFullYear(m.getFullYear()+f*T)}):null},E.Z=w;var s=w.range},17045:function(D,E,e){var _=e(8709),w=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",s=Object.prototype.toString,T=Array.prototype.concat,m=Object.defineProperty,f=e(55622)(),l=m&&f,t=function(r,n,o,i){if(n in r){if(i===!0){if(r[n]===o)return}else if(typeof(u=i)!="function"||s.call(u)!=="[object Function]"||!i())return}var u;l?m(r,n,{configurable:!0,enumerable:!1,value:o,writable:!0}):r[n]=o},a=function(r,n){var o=arguments.length>2?arguments[2]:{},i=_(n);w&&(i=T.call(i,Object.getOwnPropertySymbols(n)));for(var u=0;ul*t){var i=(o-n)/l;f[r]=1e3*i}}return f}function w(s){for(var T=[],m=s[0];m<=s[1];m++)for(var f=String.fromCharCode(m),l=s[0];l0)return function(w,s){var T,m;for(T=new Array(w),m=0;m80*C){L=I=M[0],P=R=M[1];for(var ee=C;eeI&&(I=U),B>R&&(R=B);G=(G=Math.max(I-L,R-P))!==0?1/G:0}return w(V,H,C,L,P,G),H}function e(M,A,C,L,P){var I,R;if(P===h(M,A,C,L)>0)for(I=A;I=A;I-=L)R=g(I,M[I],M[I+1],R);return R&&p(R,R.next)&&(y(R),R=R.next),R}function _(M,A){if(!M)return M;A||(A=M);var C,L=M;do if(C=!1,L.steiner||!p(L,L.next)&&u(L.prev,L,L.next)!==0)L=L.next;else{if(y(L),(L=A=L.prev)===L.next)break;C=!0}while(C||L!==A);return A}function w(M,A,C,L,P,I,R){if(M){!R&&I&&function(N,j,V,H){var ee=N;do ee.z===null&&(ee.z=r(ee.x,ee.y,j,V,H)),ee.prevZ=ee.prev,ee.nextZ=ee.next,ee=ee.next;while(ee!==N);ee.prevZ.nextZ=null,ee.prevZ=null,function(Q){var X,Y,K,te,re,oe,se,ce,xe=1;do{for(Y=Q,Q=null,re=null,oe=0;Y;){for(oe++,K=Y,se=0,X=0;X0||ce>0&&K;)se!==0&&(ce===0||!K||Y.z<=K.z)?(te=Y,Y=Y.nextZ,se--):(te=K,K=K.nextZ,ce--),re?re.nextZ=te:Q=te,te.prevZ=re,re=te;Y=K}re.nextZ=null,xe*=2}while(oe>1)}(ee)}(M,L,P,I);for(var U,B,G=M;M.prev!==M.next;)if(U=M.prev,B=M.next,I?T(M,L,P,I):s(M))A.push(U.i/C),A.push(M.i/C),A.push(B.i/C),y(M),M=B.next,G=B.next;else if((M=B)===G){R?R===1?w(M=m(_(M),A,C),A,C,L,P,I,2):R===2&&f(M,A,C,L,P,I):w(_(M),A,C,L,P,I,1);break}}}function s(M){var A=M.prev,C=M,L=M.next;if(u(A,C,L)>=0)return!1;for(var P=M.next.next;P!==M.prev;){if(o(A.x,A.y,C.x,C.y,L.x,L.y,P.x,P.y)&&u(P.prev,P,P.next)>=0)return!1;P=P.next}return!0}function T(M,A,C,L){var P=M.prev,I=M,R=M.next;if(u(P,I,R)>=0)return!1;for(var U=P.xI.x?P.x>R.x?P.x:R.x:I.x>R.x?I.x:R.x,N=P.y>I.y?P.y>R.y?P.y:R.y:I.y>R.y?I.y:R.y,j=r(U,B,A,C,L),V=r(G,N,A,C,L),H=M.prevZ,ee=M.nextZ;H&&H.z>=j&&ee&&ee.z<=V;){if(H!==M.prev&&H!==M.next&&o(P.x,P.y,I.x,I.y,R.x,R.y,H.x,H.y)&&u(H.prev,H,H.next)>=0||(H=H.prevZ,ee!==M.prev&&ee!==M.next&&o(P.x,P.y,I.x,I.y,R.x,R.y,ee.x,ee.y)&&u(ee.prev,ee,ee.next)>=0))return!1;ee=ee.nextZ}for(;H&&H.z>=j;){if(H!==M.prev&&H!==M.next&&o(P.x,P.y,I.x,I.y,R.x,R.y,H.x,H.y)&&u(H.prev,H,H.next)>=0)return!1;H=H.prevZ}for(;ee&&ee.z<=V;){if(ee!==M.prev&&ee!==M.next&&o(P.x,P.y,I.x,I.y,R.x,R.y,ee.x,ee.y)&&u(ee.prev,ee,ee.next)>=0)return!1;ee=ee.nextZ}return!0}function m(M,A,C){var L=M;do{var P=L.prev,I=L.next.next;!p(P,I)&&c(P,L,L.next,I)&&v(P,I)&&v(I,P)&&(A.push(P.i/C),A.push(L.i/C),A.push(I.i/C),y(L),y(L.next),L=M=I),L=L.next}while(L!==M);return _(L)}function f(M,A,C,L,P,I){var R=M;do{for(var U=R.next.next;U!==R.prev;){if(R.i!==U.i&&i(R,U)){var B=x(R,U);return R=_(R,R.next),B=_(B,B.next),w(R,A,C,L,P,I),void w(B,A,C,L,P,I)}U=U.next}R=R.next}while(R!==M)}function l(M,A){return M.x-A.x}function t(M,A){if(A=function(L,P){var I,R=P,U=L.x,B=L.y,G=-1/0;do{if(B<=R.y&&B>=R.next.y&&R.next.y!==R.y){var N=R.x+(B-R.y)*(R.next.x-R.x)/(R.next.y-R.y);if(N<=U&&N>G){if(G=N,N===U){if(B===R.y)return R;if(B===R.next.y)return R.next}I=R.x=R.x&&R.x>=H&&U!==R.x&&o(BI.x||R.x===I.x&&a(I,R)))&&(I=R,Q=j)),R=R.next;while(R!==V);return I}(M,A),A){var C=x(A,M);_(A,A.next),_(C,C.next)}}function a(M,A){return u(M.prev,M,A.prev)<0&&u(A.next,M,M.next)<0}function r(M,A,C,L,P){return(M=1431655765&((M=858993459&((M=252645135&((M=16711935&((M=32767*(M-C)*P)|M<<8))|M<<4))|M<<2))|M<<1))|(A=1431655765&((A=858993459&((A=252645135&((A=16711935&((A=32767*(A-L)*P)|A<<8))|A<<4))|A<<2))|A<<1))<<1}function n(M){var A=M,C=M;do(A.x=0&&(M-R)*(L-U)-(C-R)*(A-U)>=0&&(C-R)*(I-U)-(P-R)*(L-U)>=0}function i(M,A){return M.next.i!==A.i&&M.prev.i!==A.i&&!function(C,L){var P=C;do{if(P.i!==C.i&&P.next.i!==C.i&&P.i!==L.i&&P.next.i!==L.i&&c(P,P.next,C,L))return!0;P=P.next}while(P!==C);return!1}(M,A)&&(v(M,A)&&v(A,M)&&function(C,L){var P=C,I=!1,R=(C.x+L.x)/2,U=(C.y+L.y)/2;do P.y>U!=P.next.y>U&&P.next.y!==P.y&&R<(P.next.x-P.x)*(U-P.y)/(P.next.y-P.y)+P.x&&(I=!I),P=P.next;while(P!==C);return I}(M,A)&&(u(M.prev,M,A.prev)||u(M,A.prev,A))||p(M,A)&&u(M.prev,M,M.next)>0&&u(A.prev,A,A.next)>0)}function u(M,A,C){return(A.y-M.y)*(C.x-A.x)-(A.x-M.x)*(C.y-A.y)}function p(M,A){return M.x===A.x&&M.y===A.y}function c(M,A,C,L){var P=d(u(M,A,C)),I=d(u(M,A,L)),R=d(u(C,L,M)),U=d(u(C,L,A));return P!==I&&R!==U||!(P!==0||!b(M,C,A))||!(I!==0||!b(M,L,A))||!(R!==0||!b(C,M,L))||!(U!==0||!b(C,A,L))}function b(M,A,C){return A.x<=Math.max(M.x,C.x)&&A.x>=Math.min(M.x,C.x)&&A.y<=Math.max(M.y,C.y)&&A.y>=Math.min(M.y,C.y)}function d(M){return M>0?1:M<0?-1:0}function v(M,A){return u(M.prev,M,M.next)<0?u(M,A,M.next)>=0&&u(M,M.prev,A)>=0:u(M,A,M.prev)<0||u(M,M.next,A)<0}function x(M,A){var C=new k(M.i,M.x,M.y),L=new k(A.i,A.x,A.y),P=M.next,I=A.prev;return M.next=A,A.prev=M,C.next=P,P.prev=C,L.next=C,C.prev=L,I.next=L,L.prev=I,L}function g(M,A,C,L){var P=new k(M,A,C);return L?(P.next=L.next,P.prev=L,L.next.prev=P,L.next=P):(P.prev=P,P.next=P),P}function y(M){M.next.prev=M.prev,M.prev.next=M.next,M.prevZ&&(M.prevZ.nextZ=M.nextZ),M.nextZ&&(M.nextZ.prevZ=M.prevZ)}function k(M,A,C){this.i=M,this.x=A,this.y=C,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function h(M,A,C,L){for(var P=0,I=A,R=C-L;I0&&(L+=M[P-1].length,C.holes.push(L))}return C}},2502:function(D,E,e){var _=e(68664);D.exports=function(w,s){var T,m=[],f=[],l=[],t={},a=[];function r(v){l[v]=!1,t.hasOwnProperty(v)&&Object.keys(t[v]).forEach(function(x){delete t[v][x],l[x]&&r(x)})}function n(v){var x,g,y=!1;for(f.push(v),l[v]=!0,x=0;x=C})})(v);for(var x,g=_(w).components.filter(function(C){return C.length>1}),y=1/0,k=0;k=55296&&v<=56319&&(k+=i[++p]),k=h?r.call(h,M,k,c):k,u?(n.value=k,o(b,c,n)):b[c]=k,++c;d=c}}if(d===void 0)for(d=T(i.length),u&&(b=new u(d)),p=0;p0?1:-1}},56247:function(D,E,e){var _=e(9953),w=Math.abs,s=Math.floor;D.exports=function(T){return isNaN(T)?0:(T=Number(T))!==0&&isFinite(T)?_(T)*s(w(T)):T}},35976:function(D,E,e){var _=e(56247),w=Math.max;D.exports=function(s){return w(0,_(s))}},67260:function(D,E,e){var _=e(78513),w=e(36672),s=Function.prototype.bind,T=Function.prototype.call,m=Object.keys,f=Object.prototype.propertyIsEnumerable;D.exports=function(l,t){return function(a,r){var n,o=arguments[2],i=arguments[3];return a=Object(w(a)),_(r),n=m(a),i&&n.sort(typeof i=="function"?s.call(i,a):void 0),typeof l!="function"&&(l=n[l]),T.call(l,n,function(u,p){return f.call(a,u)?T.call(r,o,a[u],u,a,p):t})}}},95879:function(D,E,e){D.exports=e(73583)()?Object.assign:e(34205)},73583:function(D){D.exports=function(){var E,e=Object.assign;return typeof e=="function"&&(e(E={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),E.foo+E.bar+E.trzy==="razdwatrzy")}},34205:function(D,E,e){var _=e(68700),w=e(36672),s=Math.max;D.exports=function(T,m){var f,l,t,a=s(arguments.length,2);for(T=Object(w(T)),t=function(r){try{T[r]=m[r]}catch(n){f||(f=n)}},l=1;l-1}},87963:function(D){var E=Object.prototype.toString,e=E.call("");D.exports=function(_){return typeof _=="string"||_&&typeof _=="object"&&(_ instanceof String||E.call(_)===e)||!1}},43043:function(D){var E=Object.create(null),e=Math.random;D.exports=function(){var _;do _=e().toString(36).slice(2);while(E[_]);return _}},32411:function(D,E,e){var _,w=e(1496),s=e(66741),T=e(62072),m=e(8260),f=e(95426),l=Object.defineProperty;_=D.exports=function(t,a){if(!(this instanceof _))throw new TypeError("Constructor requires 'new'");f.call(this,t),a=a?s.call(a,"key+value")?"key+value":s.call(a,"key")?"key":"value":"value",l(this,"__kind__",T("",a))},w&&w(_,f),delete _.prototype.constructor,_.prototype=Object.create(f.prototype,{_resolve:T(function(t){return this.__kind__==="value"?this.__list__[t]:this.__kind__==="key+value"?[t,this.__list__[t]]:t})}),l(_.prototype,m.toStringTag,T("c","Array Iterator"))},27515:function(D,E,e){var _=e(73051),w=e(78513),s=e(87963),T=e(66661),m=Array.isArray,f=Function.prototype.call,l=Array.prototype.some;D.exports=function(t,a){var r,n,o,i,u,p,c,b,d=arguments[2];if(m(t)||_(t)?r="array":s(t)?r="string":t=T(t),w(a),o=function(){i=!0},r!=="array")if(r!=="string")for(n=t.next();!n.done;){if(f.call(a,d,n.value,o),i)return;n=t.next()}else for(p=t.length,u=0;u=55296&&b<=56319&&(c+=t[++u]),f.call(a,d,c,o),!i);++u);else l.call(t,function(v){return f.call(a,d,v,o),i})}},66661:function(D,E,e){var _=e(73051),w=e(87963),s=e(32411),T=e(259),m=e(58095),f=e(8260).iterator;D.exports=function(l){return typeof m(l)[f]=="function"?l[f]():_(l)?new s(l):w(l)?new T(l):new s(l)}},95426:function(D,E,e){var _,w=e(16134),s=e(95879),T=e(78513),m=e(36672),f=e(62072),l=e(55174),t=e(8260),a=Object.defineProperty,r=Object.defineProperties;D.exports=_=function(n,o){if(!(this instanceof _))throw new TypeError("Constructor requires 'new'");r(this,{__list__:f("w",m(n)),__context__:f("w",o),__nextIndex__:f("w",0)}),o&&(T(o.on),o.on("_add",this._onAdd),o.on("_delete",this._onDelete),o.on("_clear",this._onClear))},delete _.prototype.constructor,r(_.prototype,s({_next:f(function(){var n;if(this.__list__)return this.__redo__&&(n=this.__redo__.shift())!==void 0?n:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach(function(o,i){o>=n&&(this.__redo__[i]=++o)},this),this.__redo__.push(n)):a(this,"__redo__",f("c",[n])))}),_onDelete:f(function(n){var o;n>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&((o=this.__redo__.indexOf(n))!==-1&&this.__redo__.splice(o,1),this.__redo__.forEach(function(i,u){i>n&&(this.__redo__[u]=--i)},this)))}),_onClear:f(function(){this.__redo__&&w.call(this.__redo__),this.__nextIndex__=0})}))),a(_.prototype,t.iterator,f(function(){return this}))},35940:function(D,E,e){var _=e(73051),w=e(95296),s=e(87963),T=e(8260).iterator,m=Array.isArray;D.exports=function(f){return!(!w(f)||!m(f)&&!s(f)&&!_(f)&&typeof f[T]!="function")}},259:function(D,E,e){var _,w=e(1496),s=e(62072),T=e(8260),m=e(95426),f=Object.defineProperty;_=D.exports=function(l){if(!(this instanceof _))throw new TypeError("Constructor requires 'new'");l=String(l),m.call(this,l),f(this,"__length__",s("",l.length))},w&&w(_,m),delete _.prototype.constructor,_.prototype=Object.create(m.prototype,{_next:s(function(){if(this.__list__)return this.__nextIndex__=55296&&t<=56319?a+this.__list__[this.__nextIndex__++]:a})}),f(_.prototype,T.toStringTag,s("c","String Iterator"))},58095:function(D,E,e){var _=e(35940);D.exports=function(w){if(!_(w))throw new TypeError(w+" is not iterable");return w}},73523:function(D){function E(e,_){if(e==null)throw new TypeError("Cannot convert first argument to object");for(var w=Object(e),s=1;s0&&x.length>d&&!x.warned){x.warned=!0;var y=new Error("Possible EventEmitter memory leak detected. "+x.length+" "+String(p)+" listeners added. Use emitter.setMaxListeners() to increase limit");y.name="MaxListenersExceededWarning",y.emitter=u,y.type=p,y.count=x.length,g=y,console&&console.warn&&console.warn(g)}return u}function t(){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 a(u,p,c){var b={fired:!1,wrapFn:void 0,target:u,type:p,listener:c},d=t.bind(b);return d.listener=c,b.wrapFn=d,d}function r(u,p,c){var b=u._events;if(b===void 0)return[];var d=b[p];return d===void 0?[]:typeof d=="function"?c?[d.listener||d]:[d]:c?function(v){for(var x=new Array(v.length),g=0;g0&&(v=p[0]),v instanceof Error)throw v;var x=new Error("Unhandled error."+(v?" ("+v.message+")":""));throw x.context=v,x}var g=d[u];if(g===void 0)return!1;if(typeof g=="function")_(g,this,p);else{var y=g.length,k=o(g,y);for(c=0;c=0;v--)if(c[v]===p||c[v].listener===p){x=c[v].listener,d=v;break}if(d<0)return this;d===0?c.shift():function(g,y){for(;y+1=0;b--)this.removeListener(u,p[b]);return this},s.prototype.listeners=function(u){return r(this,u,!0)},s.prototype.rawListeners=function(u){return r(this,u,!1)},s.listenerCount=function(u,p){return typeof u.listenerCount=="function"?u.listenerCount(p):n.call(u,p)},s.prototype.listenerCount=n,s.prototype.eventNames=function(){return this._eventsCount>0?E(this._events):[]}},60774:function(D){var E=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};D.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return E()}try{return __global__||E()}finally{delete Object.prototype.__global__}}()},94908:function(D,E,e){D.exports=e(51152)()?globalThis:e(60774)},51152:function(D){D.exports=function(){return typeof globalThis=="object"&&!!globalThis&&globalThis.Array===Array}},92770:function(D,E,e){var _=e(18546);D.exports=function(w){var s=typeof w;if(s==="string"){var T=w;if((w=+w)==0&&_(T))return!1}else if(s!=="number")return!1;return w-w<1}},30120:function(D,E,e){var _=e(90660);D.exports=function(w,s,T){if(!w)throw new TypeError("must specify data as first parameter");if(T=0|+(T||0),Array.isArray(w)&&w[0]&&typeof w[0][0]=="number"){var m,f,l,t,a=w[0].length,r=w.length*a;s&&typeof s!="string"||(s=new(_(s||"float32"))(r+T));var n=s.length-T;if(r!==n)throw new Error("source length "+r+" ("+a+"x"+w.length+") does not match destination length "+n);for(m=0,l=T;mT[0]-l[0]/2&&(i=l[0]/2,u+=l[1]);return m}},32879:function(D){function E(s,T){T||(T={}),(typeof s=="string"||Array.isArray(s))&&(T.family=s);var m=Array.isArray(T.family)?T.family.join(", "):T.family;if(!m)throw Error("`family` must be defined");var f=T.size||T.fontSize||T.em||48,l=T.weight||T.fontWeight||"",t=(s=[T.style||T.fontStyle||"",l,f].join(" ")+"px "+m,T.origin||"top");if(E.cache[m]&&f<=E.cache[m].em)return e(E.cache[m],t);var a=T.canvas||E.canvas,r=a.getContext("2d"),n={upper:T.upper!==void 0?T.upper:"H",lower:T.lower!==void 0?T.lower:"x",descent:T.descent!==void 0?T.descent:"p",ascent:T.ascent!==void 0?T.ascent:"h",tittle:T.tittle!==void 0?T.tittle:"i",overshoot:T.overshoot!==void 0?T.overshoot:"O"},o=Math.ceil(1.5*f);a.height=o,a.width=.5*o,r.font=s;var i="H",u={top:0};r.clearRect(0,0,o,o),r.textBaseline="top",r.fillStyle="black",r.fillText(i,0,0);var p=_(r.getImageData(0,0,o,o));r.clearRect(0,0,o,o),r.textBaseline="bottom",r.fillText(i,0,o);var c=_(r.getImageData(0,0,o,o));u.lineHeight=u.bottom=o-c+p,r.clearRect(0,0,o,o),r.textBaseline="alphabetic",r.fillText(i,0,o);var b=o-_(r.getImageData(0,0,o,o))-1+p;u.baseline=u.alphabetic=b,r.clearRect(0,0,o,o),r.textBaseline="middle",r.fillText(i,0,.5*o);var d=_(r.getImageData(0,0,o,o));u.median=u.middle=o-d-1+p-.5*o,r.clearRect(0,0,o,o),r.textBaseline="hanging",r.fillText(i,0,.5*o);var v=_(r.getImageData(0,0,o,o));u.hanging=o-v-1+p-.5*o,r.clearRect(0,0,o,o),r.textBaseline="ideographic",r.fillText(i,0,o);var x=_(r.getImageData(0,0,o,o));if(u.ideographic=o-x-1+p,n.upper&&(r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.upper,0,0),u.upper=_(r.getImageData(0,0,o,o)),u.capHeight=u.baseline-u.upper),n.lower&&(r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.lower,0,0),u.lower=_(r.getImageData(0,0,o,o)),u.xHeight=u.baseline-u.lower),n.tittle&&(r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.tittle,0,0),u.tittle=_(r.getImageData(0,0,o,o))),n.ascent&&(r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.ascent,0,0),u.ascent=_(r.getImageData(0,0,o,o))),n.descent&&(r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.descent,0,0),u.descent=w(r.getImageData(0,0,o,o))),n.overshoot){r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.overshoot,0,0);var g=w(r.getImageData(0,0,o,o));u.overshoot=g-b}for(var y in u)u[y]/=f;return u.em=f,E.cache[m]=u,e(u,t)}function e(s,T){var m={};for(var f in typeof T=="string"&&(T=s[T]),s)f!=="em"&&(m[f]=s[f]-T);return m}function _(s){for(var T=s.height,m=s.data,f=3;f0;f-=4)if(m[f]!==0)return Math.floor(.25*(f-3)/T)}D.exports=E,E.canvas=document.createElement("canvas"),E.cache={}},31353:function(D,E,e){var _=e(85395),w=Object.prototype.toString,s=Object.prototype.hasOwnProperty,T=function(l,t,a){for(var r=0,n=l.length;r=3&&(r=a),w.call(l)==="[object Array]"?T(l,t,r):typeof l=="string"?m(l,t,r):f(l,t,r)}},73047:function(D){var E="Function.prototype.bind called on incompatible ",e=Array.prototype.slice,_=Object.prototype.toString,w="[object Function]";D.exports=function(s){var T=this;if(typeof T!="function"||_.call(T)!==w)throw new TypeError(E+T);for(var m,f=e.call(arguments,1),l=function(){if(this instanceof m){var o=T.apply(this,f.concat(e.call(arguments)));return Object(o)===o?o:this}return T.apply(s,f.concat(e.call(arguments)))},t=Math.max(0,T.length-f.length),a=[],r=0;r"u"&&!e.canvas)return null;var _=e.canvas||document.createElement("canvas");typeof e.width=="number"&&(_.width=e.width),typeof e.height=="number"&&(_.height=e.height);var w,s=e;try{var T=[E];E.indexOf("webgl")===0&&T.push("experimental-"+E);for(var m=0;m"u"?_:r(Uint8Array),i={"%AggregateError%":typeof AggregateError>"u"?_:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?_:ArrayBuffer,"%ArrayIteratorPrototype%":a?r([][Symbol.iterator]()):_,"%AsyncFromSyncIteratorPrototype%":_,"%AsyncFunction%":n,"%AsyncGenerator%":n,"%AsyncGeneratorFunction%":n,"%AsyncIteratorPrototype%":n,"%Atomics%":typeof Atomics>"u"?_:Atomics,"%BigInt%":typeof BigInt>"u"?_:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?_:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?_:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?_:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?_:Float32Array,"%Float64Array%":typeof Float64Array>"u"?_:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?_:FinalizationRegistry,"%Function%":s,"%GeneratorFunction%":n,"%Int8Array%":typeof Int8Array>"u"?_:Int8Array,"%Int16Array%":typeof Int16Array>"u"?_:Int16Array,"%Int32Array%":typeof Int32Array>"u"?_:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":a?r(r([][Symbol.iterator]())):_,"%JSON%":typeof JSON=="object"?JSON:_,"%Map%":typeof Map>"u"?_:Map,"%MapIteratorPrototype%":typeof Map<"u"&&a?r(new Map()[Symbol.iterator]()):_,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?_:Promise,"%Proxy%":typeof Proxy>"u"?_:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?_:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?_:Set,"%SetIteratorPrototype%":typeof Set<"u"&&a?r(new Set()[Symbol.iterator]()):_,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?_:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":a?r(""[Symbol.iterator]()):_,"%Symbol%":a?Symbol:_,"%SyntaxError%":w,"%ThrowTypeError%":t,"%TypedArray%":o,"%TypeError%":T,"%Uint8Array%":typeof Uint8Array>"u"?_:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?_:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?_:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?_:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?_:WeakMap,"%WeakRef%":typeof WeakRef>"u"?_:WeakRef,"%WeakSet%":typeof WeakSet>"u"?_:WeakSet};try{null.error}catch(L){var u=r(r(L));i["%Error.prototype%"]=u}var p=function L(P){var I;if(P==="%AsyncFunction%")I=m("async function () {}");else if(P==="%GeneratorFunction%")I=m("function* () {}");else if(P==="%AsyncGeneratorFunction%")I=m("async function* () {}");else if(P==="%AsyncGenerator%"){var R=L("%AsyncGeneratorFunction%");R&&(I=R.prototype)}else if(P==="%AsyncIteratorPrototype%"){var U=L("%AsyncGenerator%");U&&(I=r(U.prototype))}return i[P]=I,I},c={"%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"]},b=e(77575),d=e(35065),v=b.call(Function.call,Array.prototype.concat),x=b.call(Function.apply,Array.prototype.splice),g=b.call(Function.call,String.prototype.replace),y=b.call(Function.call,String.prototype.slice),k=b.call(Function.call,RegExp.prototype.exec),h=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,M=/\\(\\)?/g,A=function(L){var P=y(L,0,1),I=y(L,-1);if(P==="%"&&I!=="%")throw new w("invalid intrinsic syntax, expected closing `%`");if(I==="%"&&P!=="%")throw new w("invalid intrinsic syntax, expected opening `%`");var R=[];return g(L,h,function(U,B,G,N){R[R.length]=G?g(N,M,"$1"):B||U}),R},C=function(L,P){var I,R=L;if(d(c,R)&&(R="%"+(I=c[R])[0]+"%"),d(i,R)){var U=i[R];if(U===n&&(U=p(R)),U===void 0&&!P)throw new T("intrinsic "+L+" exists, but is not available. Please file an issue!");return{alias:I,name:R,value:U}}throw new w("intrinsic "+L+" does not exist!")};D.exports=function(L,P){if(typeof L!="string"||L.length===0)throw new T("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof P!="boolean")throw new T('"allowMissing" argument must be a boolean');if(k(/^%?[^%]*%?$/,L)===null)throw new w("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var I=A(L),R=I.length>0?I[0]:"",U=C("%"+R+"%",P),B=U.name,G=U.value,N=!1,j=U.alias;j&&(R=j[0],x(I,v([0,1],j)));for(var V=1,H=!0;V=I.length){var Y=f(G,ee);G=(H=!!Y)&&"get"in Y&&!("originalValue"in Y.get)?Y.get:G[ee]}else H=d(G,ee),G=G[ee];H&&!N&&(i[B]=G)}}return G}},85400:function(D){D.exports=function(E,e){var _=e[0],w=e[1],s=e[2],T=e[3],m=e[4],f=e[5],l=e[6],t=e[7],a=e[8],r=e[9],n=e[10],o=e[11],i=e[12],u=e[13],p=e[14],c=e[15];return E[0]=f*(n*c-o*p)-r*(l*c-t*p)+u*(l*o-t*n),E[1]=-(w*(n*c-o*p)-r*(s*c-T*p)+u*(s*o-T*n)),E[2]=w*(l*c-t*p)-f*(s*c-T*p)+u*(s*t-T*l),E[3]=-(w*(l*o-t*n)-f*(s*o-T*n)+r*(s*t-T*l)),E[4]=-(m*(n*c-o*p)-a*(l*c-t*p)+i*(l*o-t*n)),E[5]=_*(n*c-o*p)-a*(s*c-T*p)+i*(s*o-T*n),E[6]=-(_*(l*c-t*p)-m*(s*c-T*p)+i*(s*t-T*l)),E[7]=_*(l*o-t*n)-m*(s*o-T*n)+a*(s*t-T*l),E[8]=m*(r*c-o*u)-a*(f*c-t*u)+i*(f*o-t*r),E[9]=-(_*(r*c-o*u)-a*(w*c-T*u)+i*(w*o-T*r)),E[10]=_*(f*c-t*u)-m*(w*c-T*u)+i*(w*t-T*f),E[11]=-(_*(f*o-t*r)-m*(w*o-T*r)+a*(w*t-T*f)),E[12]=-(m*(r*p-n*u)-a*(f*p-l*u)+i*(f*n-l*r)),E[13]=_*(r*p-n*u)-a*(w*p-s*u)+i*(w*n-s*r),E[14]=-(_*(f*p-l*u)-m*(w*p-s*u)+i*(w*l-s*f)),E[15]=_*(f*n-l*r)-m*(w*n-s*r)+a*(w*l-s*f),E}},42331:function(D){D.exports=function(E){var e=new Float32Array(16);return e[0]=E[0],e[1]=E[1],e[2]=E[2],e[3]=E[3],e[4]=E[4],e[5]=E[5],e[6]=E[6],e[7]=E[7],e[8]=E[8],e[9]=E[9],e[10]=E[10],e[11]=E[11],e[12]=E[12],e[13]=E[13],e[14]=E[14],e[15]=E[15],e}},31042:function(D){D.exports=function(E,e){return E[0]=e[0],E[1]=e[1],E[2]=e[2],E[3]=e[3],E[4]=e[4],E[5]=e[5],E[6]=e[6],E[7]=e[7],E[8]=e[8],E[9]=e[9],E[10]=e[10],E[11]=e[11],E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15],E}},11902:function(D){D.exports=function(){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(D){D.exports=function(E){var e=E[0],_=E[1],w=E[2],s=E[3],T=E[4],m=E[5],f=E[6],l=E[7],t=E[8],a=E[9],r=E[10],n=E[11],o=E[12],i=E[13],u=E[14],p=E[15];return(e*m-_*T)*(r*p-n*u)-(e*f-w*T)*(a*p-n*i)+(e*l-s*T)*(a*u-r*i)+(_*f-w*m)*(t*p-n*o)-(_*l-s*m)*(t*u-r*o)+(w*l-s*f)*(t*i-a*o)}},27812:function(D){D.exports=function(E,e){var _=e[0],w=e[1],s=e[2],T=e[3],m=_+_,f=w+w,l=s+s,t=_*m,a=w*m,r=w*f,n=s*m,o=s*f,i=s*l,u=T*m,p=T*f,c=T*l;return E[0]=1-r-i,E[1]=a+c,E[2]=n-p,E[3]=0,E[4]=a-c,E[5]=1-t-i,E[6]=o+u,E[7]=0,E[8]=n+p,E[9]=o-u,E[10]=1-t-r,E[11]=0,E[12]=0,E[13]=0,E[14]=0,E[15]=1,E}},34045:function(D){D.exports=function(E,e,_){var w,s,T,m=_[0],f=_[1],l=_[2],t=Math.sqrt(m*m+f*f+l*l);return Math.abs(t)<1e-6?null:(m*=t=1/t,f*=t,l*=t,w=Math.sin(e),T=1-(s=Math.cos(e)),E[0]=m*m*T+s,E[1]=f*m*T+l*w,E[2]=l*m*T-f*w,E[3]=0,E[4]=m*f*T-l*w,E[5]=f*f*T+s,E[6]=l*f*T+m*w,E[7]=0,E[8]=m*l*T+f*w,E[9]=f*l*T-m*w,E[10]=l*l*T+s,E[11]=0,E[12]=0,E[13]=0,E[14]=0,E[15]=1,E)}},45973:function(D){D.exports=function(E,e,_){var w=e[0],s=e[1],T=e[2],m=e[3],f=w+w,l=s+s,t=T+T,a=w*f,r=w*l,n=w*t,o=s*l,i=s*t,u=T*t,p=m*f,c=m*l,b=m*t;return E[0]=1-(o+u),E[1]=r+b,E[2]=n-c,E[3]=0,E[4]=r-b,E[5]=1-(a+u),E[6]=i+p,E[7]=0,E[8]=n+c,E[9]=i-p,E[10]=1-(a+o),E[11]=0,E[12]=_[0],E[13]=_[1],E[14]=_[2],E[15]=1,E}},81472:function(D){D.exports=function(E,e){return E[0]=e[0],E[1]=0,E[2]=0,E[3]=0,E[4]=0,E[5]=e[1],E[6]=0,E[7]=0,E[8]=0,E[9]=0,E[10]=e[2],E[11]=0,E[12]=0,E[13]=0,E[14]=0,E[15]=1,E}},14669:function(D){D.exports=function(E,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]=e[0],E[13]=e[1],E[14]=e[2],E[15]=1,E}},75262:function(D){D.exports=function(E,e){var _=Math.sin(e),w=Math.cos(e);return E[0]=1,E[1]=0,E[2]=0,E[3]=0,E[4]=0,E[5]=w,E[6]=_,E[7]=0,E[8]=0,E[9]=-_,E[10]=w,E[11]=0,E[12]=0,E[13]=0,E[14]=0,E[15]=1,E}},331:function(D){D.exports=function(E,e){var _=Math.sin(e),w=Math.cos(e);return E[0]=w,E[1]=0,E[2]=-_,E[3]=0,E[4]=0,E[5]=1,E[6]=0,E[7]=0,E[8]=_,E[9]=0,E[10]=w,E[11]=0,E[12]=0,E[13]=0,E[14]=0,E[15]=1,E}},11049:function(D){D.exports=function(E,e){var _=Math.sin(e),w=Math.cos(e);return E[0]=w,E[1]=_,E[2]=0,E[3]=0,E[4]=-_,E[5]=w,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(D){D.exports=function(E,e,_,w,s,T,m){var f=1/(_-e),l=1/(s-w),t=1/(T-m);return E[0]=2*T*f,E[1]=0,E[2]=0,E[3]=0,E[4]=0,E[5]=2*T*l,E[6]=0,E[7]=0,E[8]=(_+e)*f,E[9]=(s+w)*l,E[10]=(m+T)*t,E[11]=-1,E[12]=0,E[13]=0,E[14]=m*T*2*t,E[15]=0,E}},71551:function(D){D.exports=function(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(D,E,e){D.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(D){D.exports=function(E,e){var _=e[0],w=e[1],s=e[2],T=e[3],m=e[4],f=e[5],l=e[6],t=e[7],a=e[8],r=e[9],n=e[10],o=e[11],i=e[12],u=e[13],p=e[14],c=e[15],b=_*f-w*m,d=_*l-s*m,v=_*t-T*m,x=w*l-s*f,g=w*t-T*f,y=s*t-T*l,k=a*u-r*i,h=a*p-n*i,M=a*c-o*i,A=r*p-n*u,C=r*c-o*u,L=n*c-o*p,P=b*L-d*C+v*A+x*M-g*h+y*k;return P?(P=1/P,E[0]=(f*L-l*C+t*A)*P,E[1]=(s*C-w*L-T*A)*P,E[2]=(u*y-p*g+c*x)*P,E[3]=(n*g-r*y-o*x)*P,E[4]=(l*M-m*L-t*h)*P,E[5]=(_*L-s*M+T*h)*P,E[6]=(p*v-i*y-c*d)*P,E[7]=(a*y-n*v+o*d)*P,E[8]=(m*C-f*M+t*k)*P,E[9]=(w*M-_*C-T*k)*P,E[10]=(i*g-u*v+c*b)*P,E[11]=(r*v-a*g-o*b)*P,E[12]=(f*h-m*A-l*k)*P,E[13]=(_*A-w*h+s*k)*P,E[14]=(u*d-i*x-p*b)*P,E[15]=(a*x-r*d+n*b)*P,E):null}},65551:function(D,E,e){var _=e(71551);D.exports=function(w,s,T,m){var f,l,t,a,r,n,o,i,u,p,c=s[0],b=s[1],d=s[2],v=m[0],x=m[1],g=m[2],y=T[0],k=T[1],h=T[2];return Math.abs(c-y)<1e-6&&Math.abs(b-k)<1e-6&&Math.abs(d-h)<1e-6?_(w):(o=c-y,i=b-k,u=d-h,f=x*(u*=p=1/Math.sqrt(o*o+i*i+u*u))-g*(i*=p),l=g*(o*=p)-v*u,t=v*i-x*o,(p=Math.sqrt(f*f+l*l+t*t))?(f*=p=1/p,l*=p,t*=p):(f=0,l=0,t=0),a=i*t-u*l,r=u*f-o*t,n=o*l-i*f,(p=Math.sqrt(a*a+r*r+n*n))?(a*=p=1/p,r*=p,n*=p):(a=0,r=0,n=0),w[0]=f,w[1]=a,w[2]=o,w[3]=0,w[4]=l,w[5]=r,w[6]=i,w[7]=0,w[8]=t,w[9]=n,w[10]=u,w[11]=0,w[12]=-(f*c+l*b+t*d),w[13]=-(a*c+r*b+n*d),w[14]=-(o*c+i*b+u*d),w[15]=1,w)}},91362:function(D){D.exports=function(E,e,_){var w=e[0],s=e[1],T=e[2],m=e[3],f=e[4],l=e[5],t=e[6],a=e[7],r=e[8],n=e[9],o=e[10],i=e[11],u=e[12],p=e[13],c=e[14],b=e[15],d=_[0],v=_[1],x=_[2],g=_[3];return E[0]=d*w+v*f+x*r+g*u,E[1]=d*s+v*l+x*n+g*p,E[2]=d*T+v*t+x*o+g*c,E[3]=d*m+v*a+x*i+g*b,d=_[4],v=_[5],x=_[6],g=_[7],E[4]=d*w+v*f+x*r+g*u,E[5]=d*s+v*l+x*n+g*p,E[6]=d*T+v*t+x*o+g*c,E[7]=d*m+v*a+x*i+g*b,d=_[8],v=_[9],x=_[10],g=_[11],E[8]=d*w+v*f+x*r+g*u,E[9]=d*s+v*l+x*n+g*p,E[10]=d*T+v*t+x*o+g*c,E[11]=d*m+v*a+x*i+g*b,d=_[12],v=_[13],x=_[14],g=_[15],E[12]=d*w+v*f+x*r+g*u,E[13]=d*s+v*l+x*n+g*p,E[14]=d*T+v*t+x*o+g*c,E[15]=d*m+v*a+x*i+g*b,E}},60378:function(D){D.exports=function(E,e,_,w,s,T,m){var f=1/(e-_),l=1/(w-s),t=1/(T-m);return E[0]=-2*f,E[1]=0,E[2]=0,E[3]=0,E[4]=0,E[5]=-2*l,E[6]=0,E[7]=0,E[8]=0,E[9]=0,E[10]=2*t,E[11]=0,E[12]=(e+_)*f,E[13]=(s+w)*l,E[14]=(m+T)*t,E[15]=1,E}},7864:function(D){D.exports=function(E,e,_,w,s){var T=1/Math.tan(e/2),m=1/(w-s);return E[0]=T/_,E[1]=0,E[2]=0,E[3]=0,E[4]=0,E[5]=T,E[6]=0,E[7]=0,E[8]=0,E[9]=0,E[10]=(s+w)*m,E[11]=-1,E[12]=0,E[13]=0,E[14]=2*s*w*m,E[15]=0,E}},35279:function(D){D.exports=function(E,e,_,w){var s=Math.tan(e.upDegrees*Math.PI/180),T=Math.tan(e.downDegrees*Math.PI/180),m=Math.tan(e.leftDegrees*Math.PI/180),f=Math.tan(e.rightDegrees*Math.PI/180),l=2/(m+f),t=2/(s+T);return E[0]=l,E[1]=0,E[2]=0,E[3]=0,E[4]=0,E[5]=t,E[6]=0,E[7]=0,E[8]=-(m-f)*l*.5,E[9]=(s-T)*t*.5,E[10]=w/(_-w),E[11]=-1,E[12]=0,E[13]=0,E[14]=w*_/(_-w),E[15]=0,E}},65074:function(D){D.exports=function(E,e,_,w){var s,T,m,f,l,t,a,r,n,o,i,u,p,c,b,d,v,x,g,y,k,h,M,A,C=w[0],L=w[1],P=w[2],I=Math.sqrt(C*C+L*L+P*P);return Math.abs(I)<1e-6?null:(C*=I=1/I,L*=I,P*=I,s=Math.sin(_),m=1-(T=Math.cos(_)),f=e[0],l=e[1],t=e[2],a=e[3],r=e[4],n=e[5],o=e[6],i=e[7],u=e[8],p=e[9],c=e[10],b=e[11],d=C*C*m+T,v=L*C*m+P*s,x=P*C*m-L*s,g=C*L*m-P*s,y=L*L*m+T,k=P*L*m+C*s,h=C*P*m+L*s,M=L*P*m-C*s,A=P*P*m+T,E[0]=f*d+r*v+u*x,E[1]=l*d+n*v+p*x,E[2]=t*d+o*v+c*x,E[3]=a*d+i*v+b*x,E[4]=f*g+r*y+u*k,E[5]=l*g+n*y+p*k,E[6]=t*g+o*y+c*k,E[7]=a*g+i*y+b*k,E[8]=f*h+r*M+u*A,E[9]=l*h+n*M+p*A,E[10]=t*h+o*M+c*A,E[11]=a*h+i*M+b*A,e!==E&&(E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15]),E)}},35545:function(D){D.exports=function(E,e,_){var w=Math.sin(_),s=Math.cos(_),T=e[4],m=e[5],f=e[6],l=e[7],t=e[8],a=e[9],r=e[10],n=e[11];return e!==E&&(E[0]=e[0],E[1]=e[1],E[2]=e[2],E[3]=e[3],E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15]),E[4]=T*s+t*w,E[5]=m*s+a*w,E[6]=f*s+r*w,E[7]=l*s+n*w,E[8]=t*s-T*w,E[9]=a*s-m*w,E[10]=r*s-f*w,E[11]=n*s-l*w,E}},94918:function(D){D.exports=function(E,e,_){var w=Math.sin(_),s=Math.cos(_),T=e[0],m=e[1],f=e[2],l=e[3],t=e[8],a=e[9],r=e[10],n=e[11];return e!==E&&(E[4]=e[4],E[5]=e[5],E[6]=e[6],E[7]=e[7],E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15]),E[0]=T*s-t*w,E[1]=m*s-a*w,E[2]=f*s-r*w,E[3]=l*s-n*w,E[8]=T*w+t*s,E[9]=m*w+a*s,E[10]=f*w+r*s,E[11]=l*w+n*s,E}},15692:function(D){D.exports=function(E,e,_){var w=Math.sin(_),s=Math.cos(_),T=e[0],m=e[1],f=e[2],l=e[3],t=e[4],a=e[5],r=e[6],n=e[7];return e!==E&&(E[8]=e[8],E[9]=e[9],E[10]=e[10],E[11]=e[11],E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15]),E[0]=T*s+t*w,E[1]=m*s+a*w,E[2]=f*s+r*w,E[3]=l*s+n*w,E[4]=t*s-T*w,E[5]=a*s-m*w,E[6]=r*s-f*w,E[7]=n*s-l*w,E}},10789:function(D){D.exports=function(E,e,_){var w=_[0],s=_[1],T=_[2];return E[0]=e[0]*w,E[1]=e[1]*w,E[2]=e[2]*w,E[3]=e[3]*w,E[4]=e[4]*s,E[5]=e[5]*s,E[6]=e[6]*s,E[7]=e[7]*s,E[8]=e[8]*T,E[9]=e[9]*T,E[10]=e[10]*T,E[11]=e[11]*T,E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15],E}},6726:function(D){D.exports=function(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(D){D.exports=function(E,e,_){var w,s,T,m,f,l,t,a,r,n,o,i,u=_[0],p=_[1],c=_[2];return e===E?(E[12]=e[0]*u+e[4]*p+e[8]*c+e[12],E[13]=e[1]*u+e[5]*p+e[9]*c+e[13],E[14]=e[2]*u+e[6]*p+e[10]*c+e[14],E[15]=e[3]*u+e[7]*p+e[11]*c+e[15]):(w=e[0],s=e[1],T=e[2],m=e[3],f=e[4],l=e[5],t=e[6],a=e[7],r=e[8],n=e[9],o=e[10],i=e[11],E[0]=w,E[1]=s,E[2]=T,E[3]=m,E[4]=f,E[5]=l,E[6]=t,E[7]=a,E[8]=r,E[9]=n,E[10]=o,E[11]=i,E[12]=w*u+f*p+r*c+e[12],E[13]=s*u+l*p+n*c+e[13],E[14]=T*u+t*p+o*c+e[14],E[15]=m*u+a*p+i*c+e[15]),E}},88654:function(D){D.exports=function(E,e){if(E===e){var _=e[1],w=e[2],s=e[3],T=e[6],m=e[7],f=e[11];E[1]=e[4],E[2]=e[8],E[3]=e[12],E[4]=_,E[6]=e[9],E[7]=e[13],E[8]=w,E[9]=T,E[11]=e[14],E[12]=s,E[13]=m,E[14]=f}else E[0]=e[0],E[1]=e[4],E[2]=e[8],E[3]=e[12],E[4]=e[1],E[5]=e[5],E[6]=e[9],E[7]=e[13],E[8]=e[2],E[9]=e[6],E[10]=e[10],E[11]=e[14],E[12]=e[3],E[13]=e[7],E[14]=e[11],E[15]=e[15];return E}},42505:function(D,E,e){var _=e(72791),w=e(71299),s=e(98580),T=e(12018),m=e(83522),f=e(25075),l=e(68016),t=e(58404),a=e(18863),r=e(10973),n=e(25677),o=e(75686),i=e(53545),u=e(56131),p=e(32879),c=e(30120),b=e(13547).nextPow2,d=new m,v=!1;if(document.body){var x=document.body.appendChild(document.createElement("div"));x.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(x).fontStretch&&(v=!0),document.body.removeChild(x)}var g=function(y){(function(k){return typeof k=="function"&&k._gl&&k.prop&&k.texture&&k.buffer})(y)?(y={regl:y},this.gl=y.regl._gl):this.gl=T(y),this.shader=d.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=y.regl||s({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(),d.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(r(y)?y:{})};g.prototype.createShader=function(){var y=this.regl,k=y({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:y.prop("count"),offset:y.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:y.this("sizeBuffer")},width:{offset:0,stride:8,buffer:y.this("sizeBuffer")},char:y.this("charBuffer"),position:y.this("position")},uniforms:{atlasSize:function(h,M){return[M.atlas.width,M.atlas.height]},atlasDim:function(h,M){return[M.atlas.cols,M.atlas.rows]},atlas:function(h,M){return M.atlas.texture},charStep:function(h,M){return M.atlas.step},em:function(h,M){return M.atlas.em},color:y.prop("color"),opacity:y.prop("opacity"),viewport:y.this("viewportArray"),scale:y.this("scale"),align:y.prop("align"),baseline:y.prop("baseline"),translate:y.this("translate"),positionOffset:y.prop("positionOffset")},primitive:"points",viewport:y.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; @@ -2517,7 +2517,7 @@ should equal // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; - }`});return{regl:y,draw:k,atlas:{}}},g.prototype.update=function(y){var k=this;if(typeof y=="string")y={text:y};else if(!y)return;(y=w(y,{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)).opacity!=null&&(Array.isArray(y.opacity)?this.opacity=y.opacity.map(function(ne){return parseFloat(ne)}):this.opacity=parseFloat(y.opacity)),y.viewport!=null&&(this.viewport=a(y.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]),y.kerning!=null&&(this.kerning=y.kerning),y.offset!=null&&(typeof y.offset=="number"&&(y.offset=[y.offset,0]),this.positionOffset=c(y.offset)),y.direction&&(this.direction=y.direction),y.range&&(this.range=y.range,this.scale=[1/(y.range[2]-y.range[0]),1/(y.range[3]-y.range[1])],this.translate=[-y.range[0],-y.range[1]]),y.scale&&(this.scale=y.scale),y.translate&&(this.translate=y.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||y.font||(y.font=g.baseFontSize+"px sans-serif");var h,M=!1,A=!1;if(y.font&&(Array.isArray(y.font)?y.font:[y.font]).forEach(function(ne,ue){if(typeof ne=="string")try{ne=_.parse(ne)}catch{ne=_.parse(g.baseFontSize+"px "+ne)}else ne=_.parse(_.stringify(ne));var me=_.stringify({size:g.baseFontSize,family:ne.family,stretch:v?ne.stretch:void 0,variant:ne.variant,weight:ne.weight,style:ne.style}),we=n(ne.size),Ee=Math.round(we[0]*o(we[1]));if(Ee!==k.fontSize[ue]&&(A=!0,k.fontSize[ue]=Ee),!(k.font[ue]&&me==k.font[ue].baseString||(M=!0,k.font[ue]=g.fonts[me],k.font[ue]))){var Ue=ne.family.join(", "),De=[ne.style];ne.style!=ne.variant&&De.push(ne.variant),ne.variant!=ne.weight&&De.push(ne.weight),v&&ne.weight!=ne.stretch&&De.push(ne.stretch),k.font[ue]={baseString:me,family:Ue,weight:ne.weight,stretch:ne.stretch,style:ne.style,variant:ne.variant,width:{},kerning:{},metrics:p(Ue,{origin:"top",fontSize:g.baseFontSize,fontStyle:De.join(" ")})},g.fonts[me]=k.font[ue]}}),(M||A)&&this.font.forEach(function(ne,ue){var me=_.stringify({size:k.fontSize[ue],family:ne.family,stretch:v?ne.stretch:void 0,variant:ne.variant,weight:ne.weight,style:ne.style});if(k.fontAtlas[ue]=k.shader.atlas[me],!k.fontAtlas[ue]){var we=ne.metrics;k.shader.atlas[me]=k.fontAtlas[ue]={fontString:me,step:2*Math.ceil(k.fontSize[ue]*we.bottom*.5),em:k.fontSize[ue],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:k.regl.texture()}}y.text==null&&(y.text=k.text)}),typeof y.text=="string"&&y.position&&y.position.length>2){for(var C=Array(.5*y.position.length),L=0;L2){for(var I=!y.position[0].length,R=t.mallocFloat(2*this.count),U=0,B=0;U1?k.align[ue]:k.align[0]:k.align;if(typeof me=="number")return me;switch(me){case"right":case"end":return-ne;case"center":case"centre":case"middle":return .5*-ne}return 0})),this.baseline==null&&y.baseline==null&&(y.baseline=0),y.baseline!=null&&(this.baseline=y.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(ne,ue){var me=(k.font[ue]||k.font[0]).metrics,we=0;return we+=.5*me.bottom,-1*(we+=typeof ne=="number"?ne-me.baseline:-me[ne])})),y.color!=null)if(y.color||(y.color="transparent"),typeof y.color!="string"&&isNaN(y.color)){var de;if(typeof y.color[0]=="number"&&y.color.length>this.counts.length){var he=y.color.length;de=t.mallocUint8(he);for(var ye=(y.color.subarray||y.color.slice).bind(y.color),ze=0;ze4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var Me=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array(Me);for(var Ce=0;Ce1?this.counts[Ce]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Ce]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*Ce,4*Ce+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Ce]:this.opacity,baseline:this.baselineOffset[Ce]!=null?this.baselineOffset[Ce]:this.baselineOffset[0],align:this.align?this.alignOffset[Ce]!=null?this.alignOffset[Ce]:this.alignOffset[0]:0,atlas:this.fontAtlas[Ce]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*Ce,2*Ce+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=[]},g.prototype.destroy=function(){},g.prototype.kerning=!0,g.prototype.position={constant:new Float32Array(2)},g.prototype.translate=null,g.prototype.scale=null,g.prototype.font=null,g.prototype.text="",g.prototype.positionOffset=[0,0],g.prototype.opacity=1,g.prototype.color=new Uint8Array([0,0,0,255]),g.prototype.alignOffset=[0,0],g.maxAtlasSize=1024,g.atlasCanvas=document.createElement("canvas"),g.atlasContext=g.atlasCanvas.getContext("2d",{alpha:!1}),g.baseFontSize=64,g.fonts={},D.exports=g},12018:function(D,E,e){var _=e(71299);function w(m){if(m.container)if(m.container==document.body)document.body.style.width||(m.canvas.width=m.width||m.pixelRatio*e.g.innerWidth),document.body.style.height||(m.canvas.height=m.height||m.pixelRatio*e.g.innerHeight);else{var f=m.container.getBoundingClientRect();m.canvas.width=m.width||f.right-f.left,m.canvas.height=m.height||f.bottom-f.top}}function s(m){return typeof m.getContext=="function"&&"width"in m&&"height"in m}function T(){var m=document.createElement("canvas");return m.style.position="absolute",m.style.top=0,m.style.left=0,m}D.exports=function(m){var f;if(m?typeof m=="string"&&(m={container:m}):m={},(m=s(m)||typeof(f=m).nodeName=="string"&&typeof f.appendChild=="function"&&typeof f.getBoundingClientRect=="function"?{container:m}:function(t){return typeof t.drawArrays=="function"||typeof t.drawElements=="function"}(m)?{gl:m}:_(m,{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)).pixelRatio||(m.pixelRatio=e.g.pixelRatio||1),m.gl)return m.gl;if(m.canvas&&(m.container=m.canvas.parentNode),m.container){if(typeof m.container=="string"){var l=document.querySelector(m.container);if(!l)throw Error("Element "+m.container+" is not found");m.container=l}s(m.container)?(m.canvas=m.container,m.container=m.canvas.parentNode):m.canvas||(m.canvas=T(),m.container.appendChild(m.canvas),w(m))}else if(!m.canvas){if(typeof document>"u")throw Error("Not DOM environment. Use headless-gl.");m.container=document.body||document.documentElement,m.canvas=T(),m.container.appendChild(m.canvas),w(m)}return m.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(t){try{m.gl=m.canvas.getContext(t,m.attrs)}catch{}return m.gl}),m.gl}},56068:function(D){D.exports=function(E){typeof E=="string"&&(E=[E]);for(var e=[].slice.call(arguments,1),_=[],w=0;w>1,r=-7,n=w?T-1:0,o=w?-1:1,i=e[_+n];for(n+=o,m=i&(1<<-r)-1,i>>=-r,r+=l;r>0;m=256*m+e[_+n],n+=o,r-=8);for(f=m&(1<<-r)-1,m>>=-r,r+=s;r>0;f=256*f+e[_+n],n+=o,r-=8);if(m===0)m=1-a;else{if(m===t)return f?NaN:1/0*(i?-1:1);f+=Math.pow(2,s),m-=a}return(i?-1:1)*f*Math.pow(2,m-s)},E.write=function(e,_,w,s,T,m){var f,l,t,a=8*m-T-1,r=(1<>1,o=T===23?Math.pow(2,-24)-Math.pow(2,-77):0,i=s?0:m-1,u=s?1:-1,p=_<0||_===0&&1/_<0?1:0;for(_=Math.abs(_),isNaN(_)||_===1/0?(l=isNaN(_)?1:0,f=r):(f=Math.floor(Math.log(_)/Math.LN2),_*(t=Math.pow(2,-f))<1&&(f--,t*=2),(_+=f+n>=1?o/t:o*Math.pow(2,1-n))*t>=2&&(f++,t/=2),f+n>=r?(l=0,f=r):f+n>=1?(l=(_*t-1)*Math.pow(2,T),f+=n):(l=_*Math.pow(2,n-1)*Math.pow(2,T),f=0));T>=8;e[w+i]=255&l,i+=u,l/=256,T-=8);for(f=f<0;e[w+i]=255&f,i+=u,f/=256,a-=8);e[w+i-u]|=128*p}},42018:function(D){typeof Object.create=="function"?D.exports=function(E,e){e&&(E.super_=e,E.prototype=Object.create(e.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}))}:D.exports=function(E,e){if(e){E.super_=e;var _=function(){};_.prototype=e.prototype,E.prototype=new _,E.prototype.constructor=E}}},47216:function(D,E,e){var _=e(84543)(),w=e(6614)("Object.prototype.toString"),s=function(f){return!(_&&f&&typeof f=="object"&&Symbol.toStringTag in f)&&w(f)==="[object Arguments]"},T=function(f){return!!s(f)||f!==null&&typeof f=="object"&&typeof f.length=="number"&&f.length>=0&&w(f)!=="[object Array]"&&w(f.callee)==="[object Function]"},m=function(){return s(arguments)}();s.isLegacyArguments=T,D.exports=m?s:T},54404:function(D){D.exports=!0},85395:function(D){var E,e,_=Function.prototype.toString,w=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply;if(typeof w=="function"&&typeof Object.defineProperty=="function")try{E=Object.defineProperty({},"length",{get:function(){throw e}}),e={},w(function(){throw 42},null,E)}catch(n){n!==e&&(w=null)}else w=null;var s=/^\s*class\b/,T=function(n){try{var o=_.call(n);return s.test(o)}catch{return!1}},m=function(n){try{return!T(n)&&(_.call(n),!0)}catch{return!1}},f=Object.prototype.toString,l=typeof Symbol=="function"&&!!Symbol.toStringTag,t=!(0 in[,]),a=function(){return!1};if(typeof document=="object"){var r=document.all;f.call(r)===f.call(document.all)&&(a=function(n){if((t||!n)&&(n===void 0||typeof n=="object"))try{var o=f.call(n);return(o==="[object HTMLAllCollection]"||o==="[object HTML document.all class]"||o==="[object HTMLCollection]"||o==="[object Object]")&&n("")==null}catch{}return!1})}D.exports=w?function(n){if(a(n))return!0;if(!n||typeof n!="function"&&typeof n!="object")return!1;try{w(n,null,E)}catch(o){if(o!==e)return!1}return!T(n)&&m(n)}:function(n){if(a(n))return!0;if(!n||typeof n!="function"&&typeof n!="object")return!1;if(l)return m(n);if(T(n))return!1;var o=f.call(n);return!(o!=="[object Function]"&&o!=="[object GeneratorFunction]"&&!/^\[object HTML/.test(o))&&m(n)}},65481:function(D,E,e){var _,w=Object.prototype.toString,s=Function.prototype.toString,T=/^\s*(?:function)?\*/,m=e(84543)(),f=Object.getPrototypeOf;D.exports=function(l){if(typeof l!="function")return!1;if(T.test(s.call(l)))return!0;if(!m)return w.call(l)==="[object GeneratorFunction]";if(!f)return!1;if(_===void 0){var t=function(){if(!m)return!1;try{return Function("return function*() {}")()}catch{}}();_=!!t&&f(t)}return f(l)===_}},62683:function(D){D.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},64274:function(D){D.exports=function(E){return E!=E}},15567:function(D,E,e){var _=e(68222),w=e(17045),s=e(64274),T=e(14922),m=e(22442),f=_(T(),Number);w(f,{getPolyfill:T,implementation:s,shim:m}),D.exports=f},14922:function(D,E,e){var _=e(64274);D.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:_}},22442:function(D,E,e){var _=e(17045),w=e(14922);D.exports=function(){var s=w();return _(Number,{isNaN:s},{isNaN:function(){return Number.isNaN!==s}}),s}},64941:function(D){D.exports=function(E){var e=typeof E;return E!==null&&(e==="object"||e==="function")}},10973:function(D){var E=Object.prototype.toString;D.exports=function(e){var _;return E.call(e)==="[object Object]"&&((_=Object.getPrototypeOf(e))===null||_===Object.getPrototypeOf({}))}},18546:function(D){D.exports=function(E){for(var e,_=E.length,w=0;w<_;w++)if(((e=E.charCodeAt(w))<9||e>13)&&e!==32&&e!==133&&e!==160&&e!==5760&&e!==6158&&(e<8192||e>8205)&&e!==8232&&e!==8233&&e!==8239&&e!==8287&&e!==8288&&e!==12288&&e!==65279)return!1;return!0}},89546:function(D){D.exports=function(E){return typeof E=="string"&&(E=E.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(E)&&/[\dz]$/i.test(E)&&E.length>4))}},9187:function(D,E,e){var _=e(31353),w=e(72077),s=e(6614),T=s("Object.prototype.toString"),m=e(84543)(),f=e(40383),l=typeof globalThis>"u"?e.g:globalThis,t=w(),a=s("Array.prototype.indexOf",!0)||function(i,u){for(var p=0;p-1}return!!f&&function(p){var c=!1;return _(n,function(b,d){if(!c)try{c=b.call(p)===d}catch{}}),c}(i)}},44517:function(D){D.exports=function(){var E,e,_;function w(s,T){if(E)if(e){var m="var sharedChunk = {}; ("+E+")(sharedChunk); ("+e+")(sharedChunk);",f={};E(f),(_=T(f)).workerUrl=window.URL.createObjectURL(new Blob([m],{type:"text/javascript"}))}else e=T;else E=T}return w(0,function(s){function T(S,z){return S(z={exports:{}},z.exports),z.exports}var m="1.10.1",f=l;function l(S,z,Z,le){this.cx=3*S,this.bx=3*(Z-S)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*z,this.by=3*(le-z)-this.cy,this.ay=1-this.cy-this.by,this.p1x=S,this.p1y=le,this.p2x=Z,this.p2y=le}l.prototype.sampleCurveX=function(S){return((this.ax*S+this.bx)*S+this.cx)*S},l.prototype.sampleCurveY=function(S){return((this.ay*S+this.by)*S+this.cy)*S},l.prototype.sampleCurveDerivativeX=function(S){return(3*this.ax*S+2*this.bx)*S+this.cx},l.prototype.solveCurveX=function(S,z){var Z,le,ke,Ie,qe;for(z===void 0&&(z=1e-6),ke=S,qe=0;qe<8;qe++){if(Ie=this.sampleCurveX(ke)-S,Math.abs(Ie)(le=1))return le;for(;ZIe?Z=ke:le=ke,ke=.5*(le-Z)+Z}return ke},l.prototype.solve=function(S,z){return this.sampleCurveY(this.solveCurveX(S,z))};var t=a;function a(S,z){this.x=S,this.y=z}function r(S,z,Z,le){var ke=new f(S,z,Z,le);return function(Ie){return ke.solve(Ie)}}a.prototype={clone:function(){return new a(this.x,this.y)},add:function(S){return this.clone()._add(S)},sub:function(S){return this.clone()._sub(S)},multByPoint:function(S){return this.clone()._multByPoint(S)},divByPoint:function(S){return this.clone()._divByPoint(S)},mult:function(S){return this.clone()._mult(S)},div:function(S){return this.clone()._div(S)},rotate:function(S){return this.clone()._rotate(S)},rotateAround:function(S,z){return this.clone()._rotateAround(S,z)},matMult:function(S){return this.clone()._matMult(S)},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(S){return this.x===S.x&&this.y===S.y},dist:function(S){return Math.sqrt(this.distSqr(S))},distSqr:function(S){var z=S.x-this.x,Z=S.y-this.y;return z*z+Z*Z},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(S){return Math.atan2(this.y-S.y,this.x-S.x)},angleWith:function(S){return this.angleWithSep(S.x,S.y)},angleWithSep:function(S,z){return Math.atan2(this.x*z-this.y*S,this.x*S+this.y*z)},_matMult:function(S){var z=S[0]*this.x+S[1]*this.y,Z=S[2]*this.x+S[3]*this.y;return this.x=z,this.y=Z,this},_add:function(S){return this.x+=S.x,this.y+=S.y,this},_sub:function(S){return this.x-=S.x,this.y-=S.y,this},_mult:function(S){return this.x*=S,this.y*=S,this},_div:function(S){return this.x/=S,this.y/=S,this},_multByPoint:function(S){return this.x*=S.x,this.y*=S.y,this},_divByPoint:function(S){return this.x/=S.x,this.y/=S.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var S=this.y;return this.y=this.x,this.x=-S,this},_rotate:function(S){var z=Math.cos(S),Z=Math.sin(S),le=z*this.x-Z*this.y,ke=Z*this.x+z*this.y;return this.x=le,this.y=ke,this},_rotateAround:function(S,z){var Z=Math.cos(S),le=Math.sin(S),ke=z.x+Z*(this.x-z.x)-le*(this.y-z.y),Ie=z.y+le*(this.x-z.x)+Z*(this.y-z.y);return this.x=ke,this.y=Ie,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},a.convert=function(S){return S instanceof a?S:Array.isArray(S)?new a(S[0],S[1]):S};var n=r(.25,.1,.25,1);function o(S,z,Z){return Math.min(Z,Math.max(z,S))}function i(S,z,Z){var le=Z-z,ke=((S-z)%le+le)%le+z;return ke===z?Z:ke}function u(S){for(var z=[],Z=arguments.length-1;Z-- >0;)z[Z]=arguments[Z+1];for(var le=0,ke=z;le>z/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,S)}()}function d(S){return!!S&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(S)}function v(S,z){S.forEach(function(Z){z[Z]&&(z[Z]=z[Z].bind(z))})}function x(S,z){return S.indexOf(z,S.length-z.length)!==-1}function g(S,z,Z){var le={};for(var ke in S)le[ke]=z.call(Z||this,S[ke],ke,S);return le}function y(S,z,Z){var le={};for(var ke in S)z.call(Z||this,S[ke],ke,S)&&(le[ke]=S[ke]);return le}function k(S){return Array.isArray(S)?S.map(k):typeof S=="object"&&S?g(S,k):S}var h={};function M(S){h[S]||(typeof console<"u"&&console.warn(S),h[S]=!0)}function A(S,z,Z){return(Z.y-S.y)*(z.x-S.x)>(z.y-S.y)*(Z.x-S.x)}function C(S){for(var z=0,Z=0,le=S.length,ke=le-1,Ie=void 0,qe=void 0;Z@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(le,ke,Ie,qe){var it=Ie||qe;return z[ke]=!it||it.toLowerCase(),""}),z["max-age"]){var Z=parseInt(z["max-age"],10);isNaN(Z)?delete z["max-age"]:z["max-age"]=Z}return z}var I=null;function R(S){if(I==null){var z=S.navigator?S.navigator.userAgent:null;I=!!S.safari||!(!z||!(/\b(iPad|iPhone|iPod)\b/.test(z)||z.match("Safari")&&!z.match("Chrome")))}return I}function U(S){try{var z=self[S];return z.setItem("_mapbox_test_",1),z.removeItem("_mapbox_test_"),!0}catch{return!1}}var B,G,N,j,V=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),H=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,ee=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,Q={now:V,frame:function(S){var z=H(S);return{cancel:function(){return ee(z)}}},getImageData:function(S,z){z===void 0&&(z=0);var Z=self.document.createElement("canvas"),le=Z.getContext("2d");if(!le)throw new Error("failed to create canvas 2d context");return Z.width=S.width,Z.height=S.height,le.drawImage(S,0,0,S.width,S.height),le.getImageData(-z,-z,S.width+2*z,S.height+2*z)},resolveURL:function(S){return B||(B=self.document.createElement("a")),B.href=S,B.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(G==null&&(G=self.matchMedia("(prefers-reduced-motion: reduce)")),G.matches)}},X={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},Y={supported:!1,testSupport:function(S){!K&&j&&(te?re(S):N=S)}},K=!1,te=!1;function re(S){var z=S.createTexture();S.bindTexture(S.TEXTURE_2D,z);try{if(S.texImage2D(S.TEXTURE_2D,0,S.RGBA,S.RGBA,S.UNSIGNED_BYTE,j),S.isContextLost())return;Y.supported=!0}catch{}S.deleteTexture(z),K=!0}self.document&&((j=self.document.createElement("img")).onload=function(){N&&re(N),N=null,te=!0},j.onerror=function(){K=!0,N=null},j.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var oe="01",se=function(S,z){this._transformRequestFn=S,this._customAccessToken=z,this._createSkuToken()};function ce(S){return S.indexOf("mapbox:")===0}se.prototype._createSkuToken=function(){var S=function(){for(var z="",Z=0;Z<10;Z++)z+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",oe,z].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=S.token,this._skuTokenExpiresAt=S.tokenExpiresAt},se.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},se.prototype.transformRequest=function(S,z){return this._transformRequestFn&&this._transformRequestFn(S,z)||{url:S}},se.prototype.normalizeStyleURL=function(S,z){if(!ce(S))return S;var Z=he(S);return Z.path="/styles/v1"+Z.path,this._makeAPIURL(Z,this._customAccessToken||z)},se.prototype.normalizeGlyphsURL=function(S,z){if(!ce(S))return S;var Z=he(S);return Z.path="/fonts/v1"+Z.path,this._makeAPIURL(Z,this._customAccessToken||z)},se.prototype.normalizeSourceURL=function(S,z){if(!ce(S))return S;var Z=he(S);return Z.path="/v4/"+Z.authority+".json",Z.params.push("secure"),this._makeAPIURL(Z,this._customAccessToken||z)},se.prototype.normalizeSpriteURL=function(S,z,Z,le){var ke=he(S);return ce(S)?(ke.path="/styles/v1"+ke.path+"/sprite"+z+Z,this._makeAPIURL(ke,this._customAccessToken||le)):(ke.path+=""+z+Z,ye(ke))},se.prototype.normalizeTileURL=function(S,z){if(this._isSkuTokenExpired()&&this._createSkuToken(),S&&!ce(S))return S;var Z=he(S),le=Q.devicePixelRatio>=2||z===512?"@2x":"",ke=Y.supported?".webp":"$1";Z.path=Z.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+le+ke),Z.path=Z.path.replace(/^.+\/v4\//,"/"),Z.path="/v4"+Z.path;var Ie=this._customAccessToken||function(qe){for(var it=0,dt=qe;it=1&&self.localStorage.setItem(z,JSON.stringify(this.eventData))}catch{M("Unable to write to LocalStorage")}},Ae.prototype.processRequests=function(S){},Ae.prototype.postEvent=function(S,z,Z,le){var ke=this;if(X.EVENTS_URL){var Ie=he(X.EVENTS_URL);Ie.params.push("access_token="+(le||X.ACCESS_TOKEN||""));var qe={event:this.type,created:new Date(S).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:m,skuId:oe,userId:this.anonId},it=z?u(qe,z):qe,dt={url:ye(Ie),headers:{"Content-Type":"text/plain"},body:JSON.stringify([it])};this.pendingRequest=It(dt,function(St){ke.pendingRequest=null,Z(St),ke.saveEventData(),ke.processRequests(le)})}},Ae.prototype.queueRequest=function(S,z){this.queue.push(S),this.processRequests(z)};var Me,Ce,ne=function(S){function z(){S.call(this,"map.load"),this.success={},this.skuToken=""}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.postMapLoadEvent=function(Z,le,ke,Ie){this.skuToken=ke,(X.EVENTS_URL&&Ie||X.ACCESS_TOKEN&&Array.isArray(Z)&&Z.some(function(qe){return ce(qe)||pe(qe)}))&&this.queueRequest({id:le,timestamp:Date.now()},Ie)},z.prototype.processRequests=function(Z){var le=this;if(!this.pendingRequest&&this.queue.length!==0){var ke=this.queue.shift(),Ie=ke.id,qe=ke.timestamp;Ie&&this.success[Ie]||(this.anonId||this.fetchEventData(),d(this.anonId)||(this.anonId=b()),this.postEvent(qe,{skuToken:this.skuToken},function(it){it||Ie&&(le.success[Ie]=!0)},Z))}},z}(Ae),ue=function(S){function z(Z){S.call(this,"appUserTurnstile"),this._customAccessToken=Z}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.postTurnstileEvent=function(Z,le){X.EVENTS_URL&&X.ACCESS_TOKEN&&Array.isArray(Z)&&Z.some(function(ke){return ce(ke)||pe(ke)})&&this.queueRequest(Date.now(),le)},z.prototype.processRequests=function(Z){var le=this;if(!this.pendingRequest&&this.queue.length!==0){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var ke=Te(X.ACCESS_TOKEN),Ie=ke?ke.u:X.ACCESS_TOKEN,qe=Ie!==this.eventData.tokenU;d(this.anonId)||(this.anonId=b(),qe=!0);var it=this.queue.shift();if(this.eventData.lastSuccess){var dt=new Date(this.eventData.lastSuccess),St=new Date(it),Rt=(it-this.eventData.lastSuccess)/864e5;qe=qe||Rt>=1||Rt<-1||dt.getDate()!==St.getDate()}else qe=!0;if(!qe)return this.processRequests();this.postEvent(it,{"enabled.telemetry":!1},function(Ht){Ht||(le.eventData.lastSuccess=it,le.eventData.tokenU=Ie)},Z)}},z}(Ae),me=new ue,we=me.postTurnstileEvent.bind(me),Ee=new ne,Ue=Ee.postMapLoadEvent.bind(Ee),De="mapbox-tiles",je=500,ge=50;function be(){self.caches&&!Me&&(Me=self.caches.open(De))}function Se(S,z,Z){if(be(),Me){var le={status:z.status,statusText:z.statusText,headers:new self.Headers};z.headers.forEach(function(Ie,qe){return le.headers.set(qe,Ie)});var ke=P(z.headers.get("Cache-Control")||"");ke["no-store"]||(ke["max-age"]&&le.headers.set("Expires",new Date(Z+1e3*ke["max-age"]).toUTCString()),new Date(le.headers.get("Expires")).getTime()-Z<42e4||function(Ie,qe){if(Ce===void 0)try{new Response(new ReadableStream),Ce=!0}catch{Ce=!1}Ce?qe(Ie.body):Ie.blob().then(qe)}(z,function(Ie){var qe=new self.Response(Ie,le);be(),Me&&Me.then(function(it){return it.put(Ne(S.url),qe)}).catch(function(it){return M(it.message)})}))}}function Ne(S){var z=S.indexOf("?");return z<0?S:S.slice(0,z)}function Ye(S,z){if(be(),!Me)return z(null);var Z=Ne(S.url);Me.then(function(le){le.match(Z).then(function(ke){var Ie=function(qe){if(!qe)return!1;var it=new Date(qe.headers.get("Expires")||0),dt=P(qe.headers.get("Cache-Control")||"");return it>Date.now()&&!dt["no-cache"]}(ke);le.delete(Z),Ie&&le.put(Z,ke.clone()),z(null,ke,Ie)}).catch(z)}).catch(z)}var Ze,st=1/0;function ot(){return Ze==null&&(Ze=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext("2d")&&typeof self.createImageBitmap=="function"),Ze}var ft={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(ft);var yt=function(S){function z(Z,le,ke){le===401&&pe(ke)&&(Z+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),S.call(this,Z),this.status=le,this.url=ke,this.name=this.constructor.name,this.message=Z}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},z}(Error),Et=L()?function(){return self.worker&&self.worker.referrer}:function(){return(self.location.protocol==="blob:"?self.parent:self).location.href};function Tt(S,z){var Z,le=new self.AbortController,ke=new self.Request(S.url,{method:S.method||"GET",body:S.body,credentials:S.credentials,headers:S.headers,referrer:Et(),signal:le.signal}),Ie=!1,qe=!1,it=(Z=ke.url).indexOf("sku=")>0&&pe(Z);S.type==="json"&&ke.headers.set("Accept","application/json");var dt=function(Rt,Ht,Yt){if(!qe){if(Rt&&Rt.message!=="SecurityError"&&M(Rt),Ht&&Yt)return St(Ht);var Zt=Date.now();self.fetch(ke).then(function(cn){if(cn.ok){var Tn=it?cn.clone():null;return St(cn,Tn,Zt)}return z(new yt(cn.statusText,cn.status,S.url))}).catch(function(cn){cn.code!==20&&z(new Error(cn.message))})}},St=function(Rt,Ht,Yt){(S.type==="arrayBuffer"?Rt.arrayBuffer():S.type==="json"?Rt.json():Rt.text()).then(function(Zt){qe||(Ht&&Yt&&Se(ke,Ht,Yt),Ie=!0,z(null,Zt,Rt.headers.get("Cache-Control"),Rt.headers.get("Expires")))}).catch(function(Zt){qe||z(new Error(Zt.message))})};return it?Ye(ke,dt):dt(null,null),{cancel:function(){qe=!0,Ie||le.abort()}}}var xt=function(S,z){if(Z=S.url,!(/^file:/.test(Z)||/^file:/.test(Et())&&!/^\w+:/.test(Z))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return Tt(S,z);if(L()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",S,z,void 0,!0)}var Z;return function(le,ke){var Ie=new self.XMLHttpRequest;for(var qe in Ie.open(le.method||"GET",le.url,!0),le.type==="arrayBuffer"&&(Ie.responseType="arraybuffer"),le.headers)Ie.setRequestHeader(qe,le.headers[qe]);return le.type==="json"&&(Ie.responseType="text",Ie.setRequestHeader("Accept","application/json")),Ie.withCredentials=le.credentials==="include",Ie.onerror=function(){ke(new Error(Ie.statusText))},Ie.onload=function(){if((Ie.status>=200&&Ie.status<300||Ie.status===0)&&Ie.response!==null){var it=Ie.response;if(le.type==="json")try{it=JSON.parse(Ie.response)}catch(dt){return ke(dt)}ke(null,it,Ie.getResponseHeader("Cache-Control"),Ie.getResponseHeader("Expires"))}else ke(new yt(Ie.statusText,Ie.status,le.url))},Ie.send(le.body),{cancel:function(){return Ie.abort()}}}(S,z)},Dt=function(S,z){return xt(u(S,{type:"arrayBuffer"}),z)},It=function(S,z){return xt(u(S,{method:"POST"}),z)},Ft,qt;Ft=[],qt=0;var Nt=function(S,z){if(Y.supported&&(S.headers||(S.headers={}),S.headers.accept="image/webp,*/*"),qt>=X.MAX_PARALLEL_IMAGE_REQUESTS){var Z={requestParameters:S,callback:z,cancelled:!1,cancel:function(){this.cancelled=!0}};return Ft.push(Z),Z}qt++;var le=!1,ke=function(){if(!le)for(le=!0,qt--;Ft.length&&qt0||this._oneTimeListeners&&this._oneTimeListeners[S]&&this._oneTimeListeners[S].length>0||this._eventedParent&&this._eventedParent.listens(S)},ht.prototype.setEventedParent=function(S,z){return this._eventedParent=S,this._eventedParentData=z,this};var Oe={$version:8,$root:{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"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{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:"*"}},source_raster:{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:"*"}},source_raster_dem:{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:"*"}},source_geojson:{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"}},source_video:{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"}}},source_image:{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"}}},layer:{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"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"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"}},layout_circle:{"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"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"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"}},layout_symbol:{"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"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},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:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{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"}}},light:{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}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"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"}},"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:{"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"}},paint_circle:{"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"}},paint_heatmap:{"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"}},paint_symbol:{"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"}},paint_raster:{"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"}},paint_hillshade:{"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"}},paint_background:{"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"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"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:{"*":{type:"string"}}},Be=function(S,z,Z,le){this.message=(S?S+": ":"")+Z,le&&(this.identifier=le),z!=null&&z.__line__&&(this.line=z.__line__)};function Qe(S){var z=S.key,Z=S.value;return Z?[new Be(z,Z,"constants have been deprecated as of v8")]:[]}function ut(S){for(var z=[],Z=arguments.length-1;Z-- >0;)z[Z]=arguments[Z+1];for(var le=0,ke=z;le":S.itemType.kind==="value"?"array":"array<"+z+">"}return S.kind}var kn=[mt,Ot,_t,Pt,Bt,Kt,Wt,yn(Gt),nn];function Wn(S,z){if(z.kind==="error")return null;if(S.kind==="array"){if(z.kind==="array"&&(z.N===0&&z.itemType.kind==="value"||!Wn(S.itemType,z.itemType))&&(typeof S.N!="number"||S.N===z.N))return null}else{if(S.kind===z.kind)return null;if(S.kind==="value"){for(var Z=0,le=kn;Z255?255:dt}function ke(dt){return dt<0?0:dt>1?1:dt}function Ie(dt){return dt[dt.length-1]==="%"?le(parseFloat(dt)/100*255):le(parseInt(dt))}function qe(dt){return dt[dt.length-1]==="%"?ke(parseFloat(dt)/100):ke(parseFloat(dt))}function it(dt,St,Rt){return Rt<0?Rt+=1:Rt>1&&(Rt-=1),6*Rt<1?dt+(St-dt)*Rt*6:2*Rt<1?St:3*Rt<2?dt+(St-dt)*(2/3-Rt)*6:dt}try{z.parseCSSColor=function(dt){var St,Rt=dt.replace(/ /g,"").toLowerCase();if(Rt in Z)return Z[Rt].slice();if(Rt[0]==="#")return Rt.length===4?(St=parseInt(Rt.substr(1),16))>=0&&St<=4095?[(3840&St)>>4|(3840&St)>>8,240&St|(240&St)>>4,15&St|(15&St)<<4,1]:null:Rt.length===7&&(St=parseInt(Rt.substr(1),16))>=0&&St<=16777215?[(16711680&St)>>16,(65280&St)>>8,255&St,1]:null;var Ht=Rt.indexOf("("),Yt=Rt.indexOf(")");if(Ht!==-1&&Yt+1===Rt.length){var Zt=Rt.substr(0,Ht),cn=Rt.substr(Ht+1,Yt-(Ht+1)).split(","),Tn=1;switch(Zt){case"rgba":if(cn.length!==4)return null;Tn=qe(cn.pop());case"rgb":return cn.length!==3?null:[Ie(cn[0]),Ie(cn[1]),Ie(cn[2]),Tn];case"hsla":if(cn.length!==4)return null;Tn=qe(cn.pop());case"hsl":if(cn.length!==3)return null;var Fn=(parseFloat(cn[0])%360+360)%360/360,Dn=qe(cn[1]),Gn=qe(cn[2]),Yn=Gn<=.5?Gn*(Dn+1):Gn+Dn-Gn*Dn,Kn=2*Gn-Yn;return[le(255*it(Kn,Yn,Fn+1/3)),le(255*it(Kn,Yn,Fn)),le(255*it(Kn,Yn,Fn-1/3)),Tn];default:return null}}return null}}catch{}}),fn=_n.parseCSSColor,hn=function(S,z,Z,le){le===void 0&&(le=1),this.r=S,this.g=z,this.b=Z,this.a=le};hn.parse=function(S){if(S){if(S instanceof hn)return S;if(typeof S=="string"){var z=fn(S);if(z)return new hn(z[0]/255*z[3],z[1]/255*z[3],z[2]/255*z[3],z[3])}}},hn.prototype.toString=function(){var S=this.toArray(),z=S[0],Z=S[1],le=S[2],ke=S[3];return"rgba("+Math.round(z)+","+Math.round(Z)+","+Math.round(le)+","+ke+")"},hn.prototype.toArray=function(){var S=this,z=S.r,Z=S.g,le=S.b,ke=S.a;return ke===0?[0,0,0,0]:[255*z/ke,255*Z/ke,255*le/ke,ke]},hn.black=new hn(0,0,0,1),hn.white=new hn(1,1,1,1),hn.transparent=new hn(0,0,0,0),hn.red=new hn(1,0,0,1);var In=function(S,z,Z){this.sensitivity=S?z?"variant":"case":z?"accent":"base",this.locale=Z,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};In.prototype.compare=function(S,z){return this.collator.compare(S,z)},In.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Cn=function(S,z,Z,le,ke){this.text=S,this.image=z,this.scale=Z,this.fontStack=le,this.textColor=ke},Nn=function(S){this.sections=S};Nn.fromString=function(S){return new Nn([new Cn(S,null,null,null,null)])},Nn.prototype.isEmpty=function(){return this.sections.length===0||!this.sections.some(function(S){return S.text.length!==0||S.image&&S.image.name.length!==0})},Nn.factory=function(S){return S instanceof Nn?S:Nn.fromString(S)},Nn.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(S){return S.text}).join("")},Nn.prototype.serialize=function(){for(var S=["format"],z=0,Z=this.sections;z=0&&S<=255&&typeof z=="number"&&z>=0&&z<=255&&typeof Z=="number"&&Z>=0&&Z<=255?le===void 0||typeof le=="number"&&le>=0&&le<=1?null:"Invalid rgba value ["+[S,z,Z,le].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+(typeof le=="number"?[S,z,Z,le]:[S,z,Z]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function or(S){if(S===null||typeof S=="string"||typeof S=="boolean"||typeof S=="number"||S instanceof hn||S instanceof In||S instanceof Nn||S instanceof Hn)return!0;if(Array.isArray(S)){for(var z=0,Z=S;z2){var it=S[1];if(typeof it!="string"||!(it in dr)||it==="object")return z.error('The item type argument of "array" must be one of string, number, boolean',1);Ie=dr[it],le++}else Ie=Gt;if(S.length>3){if(S[2]!==null&&(typeof S[2]!="number"||S[2]<0||S[2]!==Math.floor(S[2])))return z.error('The length argument to "array" must be a positive integer literal',2);qe=S[2],le++}Z=yn(Ie,qe)}else Z=dr[ke];for(var dt=[];le1)&&z.push(le)}}return z.concat(this.args.map(function(ke){return ke.serialize()}))};var $t=function(S){this.type=Kt,this.sections=S};$t.parse=function(S,z){if(S.length<2)return z.error("Expected at least one argument.");var Z=S[1];if(!Array.isArray(Z)&&typeof Z=="object")return z.error("First argument must be an image or text section.");for(var le=[],ke=!1,Ie=1;Ie<=S.length-1;++Ie){var qe=S[Ie];if(ke&&typeof qe=="object"&&!Array.isArray(qe)){ke=!1;var it=null;if(qe["font-scale"]&&!(it=z.parse(qe["font-scale"],1,Ot)))return null;var dt=null;if(qe["text-font"]&&!(dt=z.parse(qe["text-font"],1,yn(_t))))return null;var St=null;if(qe["text-color"]&&!(St=z.parse(qe["text-color"],1,Bt)))return null;var Rt=le[le.length-1];Rt.scale=it,Rt.font=dt,Rt.textColor=St}else{var Ht=z.parse(S[Ie],1,Gt);if(!Ht)return null;var Yt=Ht.type.kind;if(Yt!=="string"&&Yt!=="value"&&Yt!=="null"&&Yt!=="resolvedImage")return z.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ke=!0,le.push({content:Ht,scale:null,font:null,textColor:null})}}return new $t(le)},$t.prototype.evaluate=function(S){return new Nn(this.sections.map(function(z){var Z=z.content.evaluate(S);return tr(Z)===nn?new Cn("",Z,null,null,null):new Cn(Tr(Z),null,z.scale?z.scale.evaluate(S):null,z.font?z.font.evaluate(S).join(","):null,z.textColor?z.textColor.evaluate(S):null)}))},$t.prototype.eachChild=function(S){for(var z=0,Z=this.sections;z-1),Z},mn.prototype.eachChild=function(S){S(this.input)},mn.prototype.outputDefined=function(){return!1},mn.prototype.serialize=function(){return["image",this.input.serialize()]};var Ln={"to-boolean":Pt,"to-color":Bt,"to-number":Ot,"to-string":_t},En=function(S,z){this.type=S,this.args=z};En.parse=function(S,z){if(S.length<2)return z.error("Expected at least one argument.");var Z=S[0];if((Z==="to-boolean"||Z==="to-string")&&S.length!==2)return z.error("Expected one argument.");for(var le=Ln[Z],ke=[],Ie=1;Ie4?"Invalid rbga value "+JSON.stringify(z)+": expected an array containing either three or four numeric values.":qn(z[0],z[1],z[2],z[3])))return new hn(z[0]/255,z[1]/255,z[2]/255,z[3])}throw new ir(Z||"Could not parse color from value '"+(typeof z=="string"?z:String(JSON.stringify(z)))+"'")}if(this.type.kind==="number"){for(var qe=null,it=0,dt=this.args;it=z[2]||S[1]<=z[1]||S[3]>=z[3])}function jt(S,z){var Z,le=(180+S[0])/360,ke=(Z=S[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+Z*Math.PI/360)))/360),Ie=Math.pow(2,z.z);return[Math.round(le*Ie*hr),Math.round(ke*Ie*hr)]}function Jt(S,z,Z){return z[1]>S[1]!=Z[1]>S[1]&&S[0]<(Z[0]-z[0])*(S[1]-z[1])/(Z[1]-z[1])+z[0]}function un(S,z){for(var Z=!1,le=0,ke=z.length;le0&&Ht<0||Rt<0&&Ht>0}function Sn(S,z,Z){for(var le=0,ke=Z;leZ[2]){var ke=.5*le,Ie=S[0]-Z[0]>ke?-le:Z[0]-S[0]>ke?le:0;Ie===0&&(Ie=S[0]-Z[2]>ke?-le:Z[2]-S[0]>ke?le:0),S[0]+=Ie}tn(z,S)}function Bn(S,z,Z,le){for(var ke=Math.pow(2,le.z)*hr,Ie=[le.x*hr,le.y*hr],qe=[],it=0,dt=S;it=0)return!1;var Z=!0;return S.eachChild(function(le){Z&&!sr(le,z)&&(Z=!1)}),Z}er.parse=function(S,z){if(S.length!==2)return z.error("'within' expression requires exactly one argument, but found "+(S.length-1)+" instead.");if(or(S[1])){var Z=S[1];if(Z.type==="FeatureCollection")for(var le=0;lez))throw new ir("Input is not a number.");qe=it-1}return 0}cr.prototype.parse=function(S,z,Z,le,ke){return ke===void 0&&(ke={}),z?this.concat(z,Z,le)._parse(S,ke):this._parse(S,ke)},cr.prototype._parse=function(S,z){function Z(St,Rt,Ht){return Ht==="assert"?new yr(Rt,[St]):Ht==="coerce"?new En(Rt,[St]):St}if(S!==null&&typeof S!="string"&&typeof S!="boolean"&&typeof S!="number"||(S=["literal",S]),Array.isArray(S)){if(S.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var le=S[0];if(typeof le!="string")return this.error("Expression name must be a string, but found "+typeof le+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var ke=this.registry[le];if(ke){var Ie=ke.parse(S,this);if(!Ie)return null;if(this.expectedType){var qe=this.expectedType,it=Ie.type;if(qe.kind!=="string"&&qe.kind!=="number"&&qe.kind!=="boolean"&&qe.kind!=="object"&&qe.kind!=="array"||it.kind!=="value")if(qe.kind!=="color"&&qe.kind!=="formatted"&&qe.kind!=="resolvedImage"||it.kind!=="value"&&it.kind!=="string"){if(this.checkSubtype(qe,it))return null}else Ie=Z(Ie,qe,z.typeAnnotation||"coerce");else Ie=Z(Ie,qe,z.typeAnnotation||"assert")}if(!(Ie instanceof gr)&&Ie.type.kind!=="resolvedImage"&&vr(Ie)){var dt=new $n;try{Ie=new gr(Ie.type,Ie.evaluate(dt))}catch(St){return this.error(St.message),null}}return Ie}return this.error('Unknown expression "'+le+'". If you wanted a literal array, use ["literal", [...]].',0)}return S===void 0?this.error("'undefined' value invalid. Use null instead."):typeof S=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof S+" instead.")},cr.prototype.concat=function(S,z,Z){var le=typeof S=="number"?this.path.concat(S):this.path,ke=Z?this.scope.concat(Z):this.scope;return new cr(this.registry,le,z||null,ke,this.errors)},cr.prototype.error=function(S){for(var z=[],Z=arguments.length-1;Z-- >0;)z[Z]=arguments[Z+1];var le=""+this.key+z.map(function(ke){return"["+ke+"]"}).join("");this.errors.push(new Lt(le,S))},cr.prototype.checkSubtype=function(S,z){var Z=Wn(S,z);return Z&&this.error(Z),Z};var Mr=function(S,z,Z){this.type=S,this.input=z,this.labels=[],this.outputs=[];for(var le=0,ke=Z;le=qe)return z.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',dt);var Rt=z.parse(it,St,ke);if(!Rt)return null;ke=ke||Rt.type,le.push([qe,Rt])}return new Mr(ke,Z,le)},Mr.prototype.evaluate=function(S){var z=this.labels,Z=this.outputs;if(z.length===1)return Z[0].evaluate(S);var le=this.input.evaluate(S);if(le<=z[0])return Z[0].evaluate(S);var ke=z.length;return le>=z[ke-1]?Z[ke-1].evaluate(S):Z[Sr(z,le)].evaluate(S)},Mr.prototype.eachChild=function(S){S(this.input);for(var z=0,Z=this.outputs;z0&&S.push(this.labels[z]),S.push(this.outputs[z].serialize());return S};var pr=Object.freeze({__proto__:null,number:Lr,color:function(S,z,Z){return new hn(Lr(S.r,z.r,Z),Lr(S.g,z.g,Z),Lr(S.b,z.b,Z),Lr(S.a,z.a,Z))},array:function(S,z,Z){return S.map(function(le,ke){return Lr(le,z[ke],Z)})}}),Pr=.95047,Hr=1.08883,ci=4/29,Ti=6/29,Mi=3*Ti*Ti,fa=Math.PI/180,Hi=180/Math.PI;function xi(S){return S>.008856451679035631?Math.pow(S,.3333333333333333):S/Mi+ci}function Oa(S){return S>Ti?S*S*S:Mi*(S-ci)}function Ka(S){return 255*(S<=.0031308?12.92*S:1.055*Math.pow(S,.4166666666666667)-.055)}function Yo(S){return(S/=255)<=.04045?S/12.92:Math.pow((S+.055)/1.055,2.4)}function Xs(S){var z=Yo(S.r),Z=Yo(S.g),le=Yo(S.b),ke=xi((.4124564*z+.3575761*Z+.1804375*le)/Pr),Ie=xi((.2126729*z+.7151522*Z+.072175*le)/1);return{l:116*Ie-16,a:500*(ke-Ie),b:200*(Ie-xi((.0193339*z+.119192*Z+.9503041*le)/Hr)),alpha:S.a}}function Uu(S){var z=(S.l+16)/116,Z=isNaN(S.a)?z:z+S.a/500,le=isNaN(S.b)?z:z-S.b/200;return z=1*Oa(z),Z=Pr*Oa(Z),le=Hr*Oa(le),new hn(Ka(3.2404542*Z-1.5371385*z-.4985314*le),Ka(-.969266*Z+1.8760108*z+.041556*le),Ka(.0556434*Z-.2040259*z+1.0572252*le),S.alpha)}function pu(S,z,Z){var le=z-S;return S+Z*(le>180||le<-180?le-360*Math.round(le/360):le)}var $s={forward:Xs,reverse:Uu,interpolate:function(S,z,Z){return{l:Lr(S.l,z.l,Z),a:Lr(S.a,z.a,Z),b:Lr(S.b,z.b,Z),alpha:Lr(S.alpha,z.alpha,Z)}}},Qa={forward:function(S){var z=Xs(S),Z=z.l,le=z.a,ke=z.b,Ie=Math.atan2(ke,le)*Hi;return{h:Ie<0?Ie+360:Ie,c:Math.sqrt(le*le+ke*ke),l:Z,alpha:S.a}},reverse:function(S){var z=S.h*fa,Z=S.c;return Uu({l:S.l,a:Math.cos(z)*Z,b:Math.sin(z)*Z,alpha:S.alpha})},interpolate:function(S,z,Z){return{h:pu(S.h,z.h,Z),c:Lr(S.c,z.c,Z),l:Lr(S.l,z.l,Z),alpha:Lr(S.alpha,z.alpha,Z)}}},du=Object.freeze({__proto__:null,lab:$s,hcl:Qa}),Qi=function(S,z,Z,le,ke){this.type=S,this.operator=z,this.interpolation=Z,this.input=le,this.labels=[],this.outputs=[];for(var Ie=0,qe=ke;Ie1}))return z.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);le={name:"cubic-bezier",controlPoints:it}}if(S.length-1<4)return z.error("Expected at least 4 arguments, but found only "+(S.length-1)+".");if((S.length-1)%2!=0)return z.error("Expected an even number of arguments.");if(!(ke=z.parse(ke,2,Ot)))return null;var dt=[],St=null;Z==="interpolate-hcl"||Z==="interpolate-lab"?St=Bt:z.expectedType&&z.expectedType.kind!=="value"&&(St=z.expectedType);for(var Rt=0;Rt=Ht)return z.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Zt);var Tn=z.parse(Yt,cn,St);if(!Tn)return null;St=St||Tn.type,dt.push([Ht,Tn])}return St.kind==="number"||St.kind==="color"||St.kind==="array"&&St.itemType.kind==="number"&&typeof St.N=="number"?new Qi(St,Z,le,ke,dt):z.error("Type "+ln(St)+" is not interpolatable.")},Qi.prototype.evaluate=function(S){var z=this.labels,Z=this.outputs;if(z.length===1)return Z[0].evaluate(S);var le=this.input.evaluate(S);if(le<=z[0])return Z[0].evaluate(S);var ke=z.length;if(le>=z[ke-1])return Z[ke-1].evaluate(S);var Ie=Sr(z,le),qe=z[Ie],it=z[Ie+1],dt=Qi.interpolationFactor(this.interpolation,le,qe,it),St=Z[Ie].evaluate(S),Rt=Z[Ie+1].evaluate(S);return this.operator==="interpolate"?pr[this.type.kind.toLowerCase()](St,Rt,dt):this.operator==="interpolate-hcl"?Qa.reverse(Qa.interpolate(Qa.forward(St),Qa.forward(Rt),dt)):$s.reverse($s.interpolate($s.forward(St),$s.forward(Rt),dt))},Qi.prototype.eachChild=function(S){S(this.input);for(var z=0,Z=this.outputs;z=Z.length)throw new ir("Array index out of bounds: "+z+" > "+(Z.length-1)+".");if(z!==Math.floor(z))throw new ir("Array index must be an integer, but found "+z+" instead.");return Z[z]},fs.prototype.eachChild=function(S){S(this.index),S(this.input)},fs.prototype.outputDefined=function(){return!1},fs.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var fi=function(S,z){this.type=Pt,this.needle=S,this.haystack=z};fi.parse=function(S,z){if(S.length!==3)return z.error("Expected 2 arguments, but found "+(S.length-1)+" instead.");var Z=z.parse(S[1],1,Gt),le=z.parse(S[2],2,Gt);return Z&&le?wn(Z.type,[Pt,_t,Ot,mt,Gt])?new fi(Z,le):z.error("Expected first argument to be of type boolean, string, number or null, but found "+ln(Z.type)+" instead"):null},fi.prototype.evaluate=function(S){var z=this.needle.evaluate(S),Z=this.haystack.evaluate(S);if(!Z)return!1;if(!on(z,["boolean","string","number","null"]))throw new ir("Expected first argument to be of type boolean, string, number or null, but found "+ln(tr(z))+" instead.");if(!on(Z,["string","array"]))throw new ir("Expected second argument to be of type array or string, but found "+ln(tr(Z))+" instead.");return Z.indexOf(z)>=0},fi.prototype.eachChild=function(S){S(this.needle),S(this.haystack)},fi.prototype.outputDefined=function(){return!0},fi.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var hs=function(S,z,Z){this.type=Ot,this.needle=S,this.haystack=z,this.fromIndex=Z};hs.parse=function(S,z){if(S.length<=2||S.length>=5)return z.error("Expected 3 or 4 arguments, but found "+(S.length-1)+" instead.");var Z=z.parse(S[1],1,Gt),le=z.parse(S[2],2,Gt);if(!Z||!le)return null;if(!wn(Z.type,[Pt,_t,Ot,mt,Gt]))return z.error("Expected first argument to be of type boolean, string, number or null, but found "+ln(Z.type)+" instead");if(S.length===4){var ke=z.parse(S[3],3,Ot);return ke?new hs(Z,le,ke):null}return new hs(Z,le)},hs.prototype.evaluate=function(S){var z=this.needle.evaluate(S),Z=this.haystack.evaluate(S);if(!on(z,["boolean","string","number","null"]))throw new ir("Expected first argument to be of type boolean, string, number or null, but found "+ln(tr(z))+" instead.");if(!on(Z,["string","array"]))throw new ir("Expected second argument to be of type array or string, but found "+ln(tr(Z))+" instead.");if(this.fromIndex){var le=this.fromIndex.evaluate(S);return Z.indexOf(z,le)}return Z.indexOf(z)},hs.prototype.eachChild=function(S){S(this.needle),S(this.haystack),this.fromIndex&&S(this.fromIndex)},hs.prototype.outputDefined=function(){return!1},hs.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var S=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),S]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var ao=function(S,z,Z,le,ke,Ie){this.inputType=S,this.type=z,this.input=Z,this.cases=le,this.outputs=ke,this.otherwise=Ie};ao.parse=function(S,z){if(S.length<5)return z.error("Expected at least 4 arguments, but found only "+(S.length-1)+".");if(S.length%2!=1)return z.error("Expected an even number of arguments.");var Z,le;z.expectedType&&z.expectedType.kind!=="value"&&(le=z.expectedType);for(var ke={},Ie=[],qe=2;qeNumber.MAX_SAFE_INTEGER)return St.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof Yt=="number"&&Math.floor(Yt)!==Yt)return St.error("Numeric branch labels must be integer values.");if(Z){if(St.checkSubtype(Z,tr(Yt)))return null}else Z=tr(Yt);if(ke[String(Yt)]!==void 0)return St.error("Branch labels must be unique.");ke[String(Yt)]=Ie.length}var Zt=z.parse(dt,qe,le);if(!Zt)return null;le=le||Zt.type,Ie.push(Zt)}var cn=z.parse(S[1],1,Gt);if(!cn)return null;var Tn=z.parse(S[S.length-1],S.length-1,le);return Tn?cn.type.kind!=="value"&&z.concat(1).checkSubtype(Z,cn.type)?null:new ao(Z,le,cn,ke,Ie,Tn):null},ao.prototype.evaluate=function(S){var z=this.input.evaluate(S);return(tr(z)===this.inputType&&this.outputs[this.cases[z]]||this.otherwise).evaluate(S)},ao.prototype.eachChild=function(S){S(this.input),this.outputs.forEach(S),S(this.otherwise)},ao.prototype.outputDefined=function(){return this.outputs.every(function(S){return S.outputDefined()})&&this.otherwise.outputDefined()},ao.prototype.serialize=function(){for(var S=this,z=["match",this.input.serialize()],Z=[],le={},ke=0,Ie=Object.keys(this.cases).sort();ke=5)return z.error("Expected 3 or 4 arguments, but found "+(S.length-1)+" instead.");var Z=z.parse(S[1],1,Gt),le=z.parse(S[2],2,Ot);if(!Z||!le)return null;if(!wn(Z.type,[yn(Gt),_t,Gt]))return z.error("Expected first argument to be of type array or string, but found "+ln(Z.type)+" instead");if(S.length===4){var ke=z.parse(S[3],3,Ot);return ke?new Ro(Z.type,Z,le,ke):null}return new Ro(Z.type,Z,le)},Ro.prototype.evaluate=function(S){var z=this.input.evaluate(S),Z=this.beginIndex.evaluate(S);if(!on(z,["string","array"]))throw new ir("Expected first argument to be of type array or string, but found "+ln(tr(z))+" instead.");if(this.endIndex){var le=this.endIndex.evaluate(S);return z.slice(Z,le)}return z.slice(Z)},Ro.prototype.eachChild=function(S){S(this.input),S(this.beginIndex),this.endIndex&&S(this.endIndex)},Ro.prototype.outputDefined=function(){return!1},Ro.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var S=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),S]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var Hu=Xo("==",function(S,z,Z){return z===Z},Vu),qu=Xo("!=",function(S,z,Z){return z!==Z},function(S,z,Z,le){return!Vu(0,z,Z,le)}),Ec=Xo("<",function(S,z,Z){return z",function(S,z,Z){return z>Z},function(S,z,Z,le){return le.compare(z,Z)>0}),Gu=Xo("<=",function(S,z,Z){return z<=Z},function(S,z,Z,le){return le.compare(z,Z)<=0}),vu=Xo(">=",function(S,z,Z){return z>=Z},function(S,z,Z,le){return le.compare(z,Z)>=0}),$o=function(S,z,Z,le,ke){this.type=_t,this.number=S,this.locale=z,this.currency=Z,this.minFractionDigits=le,this.maxFractionDigits=ke};$o.parse=function(S,z){if(S.length!==3)return z.error("Expected two arguments.");var Z=z.parse(S[1],1,Ot);if(!Z)return null;var le=S[2];if(typeof le!="object"||Array.isArray(le))return z.error("NumberFormat options argument must be an object.");var ke=null;if(le.locale&&!(ke=z.parse(le.locale,1,_t)))return null;var Ie=null;if(le.currency&&!(Ie=z.parse(le.currency,1,_t)))return null;var qe=null;if(le["min-fraction-digits"]&&!(qe=z.parse(le["min-fraction-digits"],1,Ot)))return null;var it=null;return le["max-fraction-digits"]&&!(it=z.parse(le["max-fraction-digits"],1,Ot))?null:new $o(Z,ke,Ie,qe,it)},$o.prototype.evaluate=function(S){return new Intl.NumberFormat(this.locale?this.locale.evaluate(S):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(S):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(S):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(S):void 0}).format(this.number.evaluate(S))},$o.prototype.eachChild=function(S){S(this.number),this.locale&&S(this.locale),this.currency&&S(this.currency),this.minFractionDigits&&S(this.minFractionDigits),this.maxFractionDigits&&S(this.maxFractionDigits)},$o.prototype.outputDefined=function(){return!1},$o.prototype.serialize=function(){var S={};return this.locale&&(S.locale=this.locale.serialize()),this.currency&&(S.currency=this.currency.serialize()),this.minFractionDigits&&(S["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(S["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),S]};var Jo=function(S){this.type=Ot,this.input=S};Jo.parse=function(S,z){if(S.length!==2)return z.error("Expected 1 argument, but found "+(S.length-1)+" instead.");var Z=z.parse(S[1],1);return Z?Z.type.kind!=="array"&&Z.type.kind!=="string"&&Z.type.kind!=="value"?z.error("Expected argument of type string or array, but found "+ln(Z.type)+" instead."):new Jo(Z):null},Jo.prototype.evaluate=function(S){var z=this.input.evaluate(S);if(typeof z=="string"||Array.isArray(z))return z.length;throw new ir("Expected value to be of type string or array, but found "+ln(tr(z))+" instead.")},Jo.prototype.eachChild=function(S){S(this.input)},Jo.prototype.outputDefined=function(){return!1},Jo.prototype.serialize=function(){var S=["length"];return this.eachChild(function(z){S.push(z.serialize())}),S};var Js={"==":Hu,"!=":qu,">":gu,"<":Ec,">=":vu,"<=":Gu,array:yr,at:fs,boolean:yr,case:bo,coalesce:qa,collator:Qn,format:$t,image:mn,in:fi,"index-of":hs,interpolate:Qi,"interpolate-hcl":Qi,"interpolate-lab":Qi,length:Jo,let:eo,literal:gr,match:ao,number:yr,"number-format":$o,object:yr,slice:Ro,step:Mr,string:yr,"to-boolean":En,"to-color":En,"to-number":En,"to-string":En,var:fr,within:er};function Ko(S,z){var Z=z[0],le=z[1],ke=z[2],Ie=z[3];Z=Z.evaluate(S),le=le.evaluate(S),ke=ke.evaluate(S);var qe=Ie?Ie.evaluate(S):1,it=qn(Z,le,ke,qe);if(it)throw new ir(it);return new hn(Z/255*qe,le/255*qe,ke/255*qe,qe)}function mu(S,z){return S in z}function yu(S,z){var Z=z[S];return Z===void 0?null:Z}function Ls(S){return{type:S}}function Vl(S){return{result:"success",value:S}}function ps(S){return{result:"error",value:S}}function Ks(S){return S["property-type"]==="data-driven"||S["property-type"]==="cross-faded-data-driven"}function Ps(S){return!!S.expression&&S.expression.parameters.indexOf("zoom")>-1}function Qo(S){return!!S.expression&&S.expression.interpolated}function hi(S){return S instanceof Number?"number":S instanceof String?"string":S instanceof Boolean?"boolean":Array.isArray(S)?"array":S===null?"null":typeof S}function ds(S){return typeof S=="object"&&S!==null&&!Array.isArray(S)}function Cc(S){return S}function Hl(S,z){var Z,le,ke,Ie=z.type==="color",qe=S.stops&&typeof S.stops[0][0]=="object",it=qe||S.property!==void 0,dt=qe||!it,St=S.type||(Qo(z)?"exponential":"interval");if(Ie&&((S=ut({},S)).stops&&(S.stops=S.stops.map(function(br){return[br[0],hn.parse(br[1])]})),S.default?S.default=hn.parse(S.default):S.default=hn.parse(z.default)),S.colorSpace&&S.colorSpace!=="rgb"&&!du[S.colorSpace])throw new Error("Unknown color space: "+S.colorSpace);if(St==="exponential")Z=oo;else if(St==="interval")Z=Qs;else if(St==="categorical"){Z=Os,le=Object.create(null);for(var Rt=0,Ht=S.stops;Rt=S.stops[le-1][0])return S.stops[le-1][1];var ke=Sr(S.stops.map(function(Ie){return Ie[0]}),Z);return S.stops[ke][1]}function oo(S,z,Z){var le=S.base!==void 0?S.base:1;if(hi(Z)!=="number")return bl(S.default,z.default);var ke=S.stops.length;if(ke===1||Z<=S.stops[0][0])return S.stops[0][1];if(Z>=S.stops[ke-1][0])return S.stops[ke-1][1];var Ie=Sr(S.stops.map(function(Ht){return Ht[0]}),Z),qe=function(Ht,Yt,Zt,cn){var Tn=cn-Zt,Fn=Ht-Zt;return Tn===0?0:Yt===1?Fn/Tn:(Math.pow(Yt,Fn)-1)/(Math.pow(Yt,Tn)-1)}(Z,le,S.stops[Ie][0],S.stops[Ie+1][0]),it=S.stops[Ie][1],dt=S.stops[Ie+1][1],St=pr[z.type]||Cc;if(S.colorSpace&&S.colorSpace!=="rgb"){var Rt=du[S.colorSpace];St=function(Ht,Yt){return Rt.reverse(Rt.interpolate(Rt.forward(Ht),Rt.forward(Yt),qe))}}return typeof it.evaluate=="function"?{evaluate:function(){for(var Ht=[],Yt=arguments.length;Yt--;)Ht[Yt]=arguments[Yt];var Zt=it.evaluate.apply(void 0,Ht),cn=dt.evaluate.apply(void 0,Ht);if(Zt!==void 0&&cn!==void 0)return St(Zt,cn,qe)}}:St(it,dt,qe)}function xu(S,z,Z){return z.type==="color"?Z=hn.parse(Z):z.type==="formatted"?Z=Nn.fromString(Z.toString()):z.type==="resolvedImage"?Z=Hn.fromString(Z.toString()):hi(Z)===z.type||z.type==="enum"&&z.values[Z]||(Z=void 0),bl(Z,S.default,z.default)}Zn.register(Js,{error:[{kind:"error"},[_t],function(S,z){var Z=z[0];throw new ir(Z.evaluate(S))}],typeof:[_t,[Gt],function(S,z){return ln(tr(z[0].evaluate(S)))}],"to-rgba":[yn(Ot,4),[Bt],function(S,z){return z[0].evaluate(S).toArray()}],rgb:[Bt,[Ot,Ot,Ot],Ko],rgba:[Bt,[Ot,Ot,Ot,Ot],Ko],has:{type:Pt,overloads:[[[_t],function(S,z){return mu(z[0].evaluate(S),S.properties())}],[[_t,Wt],function(S,z){var Z=z[0],le=z[1];return mu(Z.evaluate(S),le.evaluate(S))}]]},get:{type:Gt,overloads:[[[_t],function(S,z){return yu(z[0].evaluate(S),S.properties())}],[[_t,Wt],function(S,z){var Z=z[0],le=z[1];return yu(Z.evaluate(S),le.evaluate(S))}]]},"feature-state":[Gt,[_t],function(S,z){return yu(z[0].evaluate(S),S.featureState||{})}],properties:[Wt,[],function(S){return S.properties()}],"geometry-type":[_t,[],function(S){return S.geometryType()}],id:[Gt,[],function(S){return S.id()}],zoom:[Ot,[],function(S){return S.globals.zoom}],"heatmap-density":[Ot,[],function(S){return S.globals.heatmapDensity||0}],"line-progress":[Ot,[],function(S){return S.globals.lineProgress||0}],accumulated:[Gt,[],function(S){return S.globals.accumulated===void 0?null:S.globals.accumulated}],"+":[Ot,Ls(Ot),function(S,z){for(var Z=0,le=0,ke=z;le":[Pt,[_t,Gt],function(S,z){var Z=z[0],le=z[1],ke=S.properties()[Z.value],Ie=le.value;return typeof ke==typeof Ie&&ke>Ie}],"filter-id->":[Pt,[Gt],function(S,z){var Z=z[0],le=S.id(),ke=Z.value;return typeof le==typeof ke&&le>ke}],"filter-<=":[Pt,[_t,Gt],function(S,z){var Z=z[0],le=z[1],ke=S.properties()[Z.value],Ie=le.value;return typeof ke==typeof Ie&&ke<=Ie}],"filter-id-<=":[Pt,[Gt],function(S,z){var Z=z[0],le=S.id(),ke=Z.value;return typeof le==typeof ke&&le<=ke}],"filter->=":[Pt,[_t,Gt],function(S,z){var Z=z[0],le=z[1],ke=S.properties()[Z.value],Ie=le.value;return typeof ke==typeof Ie&&ke>=Ie}],"filter-id->=":[Pt,[Gt],function(S,z){var Z=z[0],le=S.id(),ke=Z.value;return typeof le==typeof ke&&le>=ke}],"filter-has":[Pt,[Gt],function(S,z){return z[0].value in S.properties()}],"filter-has-id":[Pt,[],function(S){return S.id()!==null&&S.id()!==void 0}],"filter-type-in":[Pt,[yn(_t)],function(S,z){return z[0].value.indexOf(S.geometryType())>=0}],"filter-id-in":[Pt,[yn(Gt)],function(S,z){return z[0].value.indexOf(S.id())>=0}],"filter-in-small":[Pt,[_t,yn(Gt)],function(S,z){var Z=z[0];return z[1].value.indexOf(S.properties()[Z.value])>=0}],"filter-in-large":[Pt,[_t,yn(Gt)],function(S,z){var Z=z[0],le=z[1];return function(ke,Ie,qe,it){for(;qe<=it;){var dt=qe+it>>1;if(Ie[dt]===ke)return!0;Ie[dt]>ke?it=dt-1:qe=dt+1}return!1}(S.properties()[Z.value],le.value,0,le.value.length-1)}],all:{type:Pt,overloads:[[[Pt,Pt],function(S,z){var Z=z[0],le=z[1];return Z.evaluate(S)&&le.evaluate(S)}],[Ls(Pt),function(S,z){for(var Z=0,le=z;Z0&&typeof S[0]=="string"&&S[0]in Js}function wl(S,z){var Z=new cr(Js,[],z?function(ke){var Ie={color:Bt,string:_t,number:Ot,enum:_t,boolean:Pt,formatted:Kt,resolvedImage:nn};return ke.type==="array"?yn(Ie[ke.value]||Gt,ke.length):Ie[ke.type]}(z):void 0),le=Z.parse(S,void 0,void 0,void 0,z&&z.type==="string"?{typeAnnotation:"coerce"}:void 0);return le?Vl(new _l(le,z)):ps(Z.errors)}_l.prototype.evaluateWithoutErrorHandling=function(S,z,Z,le,ke,Ie){return this._evaluator.globals=S,this._evaluator.feature=z,this._evaluator.featureState=Z,this._evaluator.canonical=le,this._evaluator.availableImages=ke||null,this._evaluator.formattedSection=Ie,this.expression.evaluate(this._evaluator)},_l.prototype.evaluate=function(S,z,Z,le,ke,Ie){this._evaluator.globals=S,this._evaluator.feature=z||null,this._evaluator.featureState=Z||null,this._evaluator.canonical=le,this._evaluator.availableImages=ke||null,this._evaluator.formattedSection=Ie||null;try{var qe=this.expression.evaluate(this._evaluator);if(qe==null||typeof qe=="number"&&qe!=qe)return this._defaultValue;if(this._enumValues&&!(qe in this._enumValues))throw new ir("Expected value to be one of "+Object.keys(this._enumValues).map(function(it){return JSON.stringify(it)}).join(", ")+", but found "+JSON.stringify(qe)+" instead.");return qe}catch(it){return this._warningHistory[it.message]||(this._warningHistory[it.message]=!0,typeof console<"u"&&console.warn(it.message)),this._defaultValue}};var Is=function(S,z){this.kind=S,this._styleExpression=z,this.isStateDependent=S!=="constant"&&!lr(z.expression)};Is.prototype.evaluateWithoutErrorHandling=function(S,z,Z,le,ke,Ie){return this._styleExpression.evaluateWithoutErrorHandling(S,z,Z,le,ke,Ie)},Is.prototype.evaluate=function(S,z,Z,le,ke,Ie){return this._styleExpression.evaluate(S,z,Z,le,ke,Ie)};var Rs=function(S,z,Z,le){this.kind=S,this.zoomStops=Z,this._styleExpression=z,this.isStateDependent=S!=="camera"&&!lr(z.expression),this.interpolationType=le};function tl(S,z){if((S=wl(S,z)).result==="error")return S;var Z=S.value.expression,le=Jn(Z);if(!le&&!Ks(z))return ps([new Lt("","data expressions not supported")]);var ke=sr(Z,["zoom"]);if(!ke&&!Ps(z))return ps([new Lt("","zoom expressions not supported")]);var Ie=kl(Z);if(!Ie&&!ke)return ps([new Lt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(Ie instanceof Lt)return ps([Ie]);if(Ie instanceof Qi&&!Qo(z))return ps([new Lt("",'"interpolate" expressions cannot be used with this property')]);if(!Ie)return Vl(new Is(le?"constant":"source",S.value));var qe=Ie instanceof Qi?Ie.interpolation:void 0;return Vl(new Rs(le?"camera":"composite",S.value,Ie.labels,qe))}Rs.prototype.evaluateWithoutErrorHandling=function(S,z,Z,le,ke,Ie){return this._styleExpression.evaluateWithoutErrorHandling(S,z,Z,le,ke,Ie)},Rs.prototype.evaluate=function(S,z,Z,le,ke,Ie){return this._styleExpression.evaluate(S,z,Z,le,ke,Ie)},Rs.prototype.interpolationFactor=function(S,z,Z){return this.interpolationType?Qi.interpolationFactor(this.interpolationType,S,z,Z):0};var Tl=function(S,z){this._parameters=S,this._specification=z,ut(this,Hl(this._parameters,this._specification))};function kl(S){var z=null;if(S instanceof eo)z=kl(S.result);else if(S instanceof qa)for(var Z=0,le=S.args;Zle.maximum?[new Be(z,Z,Z+" is greater than the maximum value "+le.maximum)]:[]}function bu(S){var z,Z,le,ke=S.valueSpec,Ie=pt(S.value.type),qe={},it=Ie!=="categorical"&&S.value.property===void 0,dt=!it,St=hi(S.value.stops)==="array"&&hi(S.value.stops[0])==="array"&&hi(S.value.stops[0][0])==="object",Rt=so({key:S.key,value:S.value,valueSpec:S.styleSpec.function,style:S.style,styleSpec:S.styleSpec,objectElementValidators:{stops:function(Zt){if(Ie==="identity")return[new Be(Zt.key,Zt.value,'identity function may not have a "stops" property')];var cn=[],Tn=Zt.value;return cn=cn.concat(Al({key:Zt.key,value:Tn,valueSpec:Zt.valueSpec,style:Zt.style,styleSpec:Zt.styleSpec,arrayElementValidator:Ht})),hi(Tn)==="array"&&Tn.length===0&&cn.push(new Be(Zt.key,Tn,"array must have at least one stop")),cn},default:function(Zt){return Oi({key:Zt.key,value:Zt.value,valueSpec:ke,style:Zt.style,styleSpec:Zt.styleSpec})}}});return Ie==="identity"&&it&&Rt.push(new Be(S.key,S.value,'missing required property "property"')),Ie==="identity"||S.value.stops||Rt.push(new Be(S.key,S.value,'missing required property "stops"')),Ie==="exponential"&&S.valueSpec.expression&&!Qo(S.valueSpec)&&Rt.push(new Be(S.key,S.value,"exponential functions not supported")),S.styleSpec.$version>=8&&(dt&&!Ks(S.valueSpec)?Rt.push(new Be(S.key,S.value,"property functions not supported")):it&&!Ps(S.valueSpec)&&Rt.push(new Be(S.key,S.value,"zoom functions not supported"))),Ie!=="categorical"&&!St||S.value.property!==void 0||Rt.push(new Be(S.key,S.value,'"property" property is required')),Rt;function Ht(Zt){var cn=[],Tn=Zt.value,Fn=Zt.key;if(hi(Tn)!=="array")return[new Be(Fn,Tn,"array expected, "+hi(Tn)+" found")];if(Tn.length!==2)return[new Be(Fn,Tn,"array length 2 expected, length "+Tn.length+" found")];if(St){if(hi(Tn[0])!=="object")return[new Be(Fn,Tn,"object expected, "+hi(Tn[0])+" found")];if(Tn[0].zoom===void 0)return[new Be(Fn,Tn,"object stop key must have zoom")];if(Tn[0].value===void 0)return[new Be(Fn,Tn,"object stop key must have value")];if(le&&le>pt(Tn[0].zoom))return[new Be(Fn,Tn[0].zoom,"stop zoom values must appear in ascending order")];pt(Tn[0].zoom)!==le&&(le=pt(Tn[0].zoom),Z=void 0,qe={}),cn=cn.concat(so({key:Fn+"[0]",value:Tn[0],valueSpec:{zoom:{}},style:Zt.style,styleSpec:Zt.styleSpec,objectElementValidators:{zoom:Ml,value:Yt}}))}else cn=cn.concat(Yt({key:Fn+"[0]",value:Tn[0],valueSpec:{},style:Zt.style,styleSpec:Zt.styleSpec},Tn));return el(bt(Tn[1]))?cn.concat([new Be(Fn+"[1]",Tn[1],"expressions are not allowed in function stops.")]):cn.concat(Oi({key:Fn+"[1]",value:Tn[1],valueSpec:ke,style:Zt.style,styleSpec:Zt.styleSpec}))}function Yt(Zt,cn){var Tn=hi(Zt.value),Fn=pt(Zt.value),Dn=Zt.value!==null?Zt.value:cn;if(z){if(Tn!==z)return[new Be(Zt.key,Dn,Tn+" stop domain type must match previous stop domain type "+z)]}else z=Tn;if(Tn!=="number"&&Tn!=="string"&&Tn!=="boolean")return[new Be(Zt.key,Dn,"stop domain value must be a number, string, or boolean")];if(Tn!=="number"&&Ie!=="categorical"){var Gn="number expected, "+Tn+" found";return Ks(ke)&&Ie===void 0&&(Gn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Be(Zt.key,Dn,Gn)]}return Ie!=="categorical"||Tn!=="number"||isFinite(Fn)&&Math.floor(Fn)===Fn?Ie!=="categorical"&&Tn==="number"&&Z!==void 0&&Fn=2&&S[1]!=="$id"&&S[1]!=="$type";case"in":return S.length>=3&&(typeof S[1]!="string"||Array.isArray(S[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return S.length!==3||Array.isArray(S[1])||Array.isArray(S[2]);case"any":case"all":for(var z=0,Z=S.slice(1);zz?1:0}function zs(S){if(!Array.isArray(S))return!1;if(S[0]==="within")return!0;for(var z=1;z"||Z==="<="||Z===">="?bi(S[1],S[2],Z):Z==="any"?(z=S.slice(1),["any"].concat(z.map(Ds))):Z==="all"?["all"].concat(S.slice(1).map(Ds)):Z==="none"?["all"].concat(S.slice(1).map(Ds).map(ga)):Z==="in"?vs(S[1],S.slice(2)):Z==="!in"?ga(vs(S[1],S.slice(2))):Z==="has"?ms(S[1]):Z==="!has"?ga(ms(S[1])):Z!=="within"||S}function bi(S,z,Z){switch(S){case"$type":return["filter-type-"+Z,z];case"$id":return["filter-id-"+Z,z];default:return["filter-"+Z,S,z]}}function vs(S,z){if(z.length===0)return!1;switch(S){case"$type":return["filter-type-in",["literal",z]];case"$id":return["filter-id-in",["literal",z]];default:return z.length>200&&!z.some(function(Z){return typeof Z!=typeof z[0]})?["filter-in-large",S,["literal",z.sort(nl)]]:["filter-in-small",S,["literal",z]]}}function ms(S){switch(S){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",S]}}function ga(S){return["!",S]}function oi(S){return Sl(bt(S.value))?gs(ut({},S,{expressionContext:"filter",valueSpec:{value:"boolean"}})):li(S)}function li(S){var z=S.value,Z=S.key;if(hi(z)!=="array")return[new Be(Z,z,"array expected, "+hi(z)+" found")];var le,ke=S.styleSpec,Ie=[];if(z.length<1)return[new Be(Z,z,"filter array must have at least 1 element")];switch(Ie=Ie.concat(ql({key:Z+"[0]",value:z[0],valueSpec:ke.filter_operator,style:S.style,styleSpec:S.styleSpec})),pt(z[0])){case"<":case"<=":case">":case">=":z.length>=2&&pt(z[1])==="$type"&&Ie.push(new Be(Z,z,'"$type" cannot be use with operator "'+z[0]+'"'));case"==":case"!=":z.length!==3&&Ie.push(new Be(Z,z,'filter array for operator "'+z[0]+'" must have 3 elements'));case"in":case"!in":z.length>=2&&(le=hi(z[1]))!=="string"&&Ie.push(new Be(Z+"[1]",z[1],"string expected, "+le+" found"));for(var qe=2;qe=Rt[Zt+0]&&le>=Rt[Zt+1])?(qe[Yt]=!0,Ie.push(St[Yt])):qe[Yt]=!1}}},Ga.prototype._forEachCell=function(S,z,Z,le,ke,Ie,qe,it){for(var dt=this._convertToCellCoord(S),St=this._convertToCellCoord(z),Rt=this._convertToCellCoord(Z),Ht=this._convertToCellCoord(le),Yt=dt;Yt<=Rt;Yt++)for(var Zt=St;Zt<=Ht;Zt++){var cn=this.d*Zt+Yt;if((!it||it(this._convertFromCellCoord(Yt),this._convertFromCellCoord(Zt),this._convertFromCellCoord(Yt+1),this._convertFromCellCoord(Zt+1)))&&ke.call(this,S,z,Z,le,cn,Ie,qe,it))return}},Ga.prototype._convertFromCellCoord=function(S){return(S-this.padding)/this.scale},Ga.prototype._convertToCellCoord=function(S){return Math.max(0,Math.min(this.d-1,Math.floor(S*this.scale)+this.padding))},Ga.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var S=this.cells,z=3+this.cells.length+1+1,Z=0,le=0;le=0)){var Ht=S[Rt];St[Rt]=Sa[dt].shallow.indexOf(Rt)>=0?Ht:rl(Ht,z)}S instanceof Error&&(St.message=S.message)}if(St.$name)throw new Error("$name property is reserved for worker serialization logic.");return dt!=="Object"&&(St.$name=dt),St}throw new Error("can't serialize object of type "+typeof S)}function il(S){if(S==null||typeof S=="boolean"||typeof S=="number"||typeof S=="string"||S instanceof Boolean||S instanceof Number||S instanceof String||S instanceof Date||S instanceof RegExp||Ra(S)||Yl(S)||ArrayBuffer.isView(S)||S instanceof Wl)return S;if(Array.isArray(S))return S.map(il);if(typeof S=="object"){var z=S.$name||"Object",Z=Sa[z].klass;if(!Z)throw new Error("can't deserialize unregistered class "+z);if(Z.deserialize)return Z.deserialize(S);for(var le=Object.create(Z.prototype),ke=0,Ie=Object.keys(S);ke=0?it:il(it)}}return le}throw new Error("can't deserialize object of type "+typeof S)}var al=function(){this.first=!0};al.prototype.update=function(S,z){var Z=Math.floor(S);return this.first?(this.first=!1,this.lastIntegerZoom=Z,this.lastIntegerZoomTime=0,this.lastZoom=S,this.lastFloorZoom=Z,!0):(this.lastFloorZoom>Z?(this.lastIntegerZoom=Z+1,this.lastIntegerZoomTime=z):this.lastFloorZoom=128&&S<=255},Arabic:function(S){return S>=1536&&S<=1791},"Arabic Supplement":function(S){return S>=1872&&S<=1919},"Arabic Extended-A":function(S){return S>=2208&&S<=2303},"Hangul Jamo":function(S){return S>=4352&&S<=4607},"Unified Canadian Aboriginal Syllabics":function(S){return S>=5120&&S<=5759},Khmer:function(S){return S>=6016&&S<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(S){return S>=6320&&S<=6399},"General Punctuation":function(S){return S>=8192&&S<=8303},"Letterlike Symbols":function(S){return S>=8448&&S<=8527},"Number Forms":function(S){return S>=8528&&S<=8591},"Miscellaneous Technical":function(S){return S>=8960&&S<=9215},"Control Pictures":function(S){return S>=9216&&S<=9279},"Optical Character Recognition":function(S){return S>=9280&&S<=9311},"Enclosed Alphanumerics":function(S){return S>=9312&&S<=9471},"Geometric Shapes":function(S){return S>=9632&&S<=9727},"Miscellaneous Symbols":function(S){return S>=9728&&S<=9983},"Miscellaneous Symbols and Arrows":function(S){return S>=11008&&S<=11263},"CJK Radicals Supplement":function(S){return S>=11904&&S<=12031},"Kangxi Radicals":function(S){return S>=12032&&S<=12255},"Ideographic Description Characters":function(S){return S>=12272&&S<=12287},"CJK Symbols and Punctuation":function(S){return S>=12288&&S<=12351},Hiragana:function(S){return S>=12352&&S<=12447},Katakana:function(S){return S>=12448&&S<=12543},Bopomofo:function(S){return S>=12544&&S<=12591},"Hangul Compatibility Jamo":function(S){return S>=12592&&S<=12687},Kanbun:function(S){return S>=12688&&S<=12703},"Bopomofo Extended":function(S){return S>=12704&&S<=12735},"CJK Strokes":function(S){return S>=12736&&S<=12783},"Katakana Phonetic Extensions":function(S){return S>=12784&&S<=12799},"Enclosed CJK Letters and Months":function(S){return S>=12800&&S<=13055},"CJK Compatibility":function(S){return S>=13056&&S<=13311},"CJK Unified Ideographs Extension A":function(S){return S>=13312&&S<=19903},"Yijing Hexagram Symbols":function(S){return S>=19904&&S<=19967},"CJK Unified Ideographs":function(S){return S>=19968&&S<=40959},"Yi Syllables":function(S){return S>=40960&&S<=42127},"Yi Radicals":function(S){return S>=42128&&S<=42191},"Hangul Jamo Extended-A":function(S){return S>=43360&&S<=43391},"Hangul Syllables":function(S){return S>=44032&&S<=55215},"Hangul Jamo Extended-B":function(S){return S>=55216&&S<=55295},"Private Use Area":function(S){return S>=57344&&S<=63743},"CJK Compatibility Ideographs":function(S){return S>=63744&&S<=64255},"Arabic Presentation Forms-A":function(S){return S>=64336&&S<=65023},"Vertical Forms":function(S){return S>=65040&&S<=65055},"CJK Compatibility Forms":function(S){return S>=65072&&S<=65103},"Small Form Variants":function(S){return S>=65104&&S<=65135},"Arabic Presentation Forms-B":function(S){return S>=65136&&S<=65279},"Halfwidth and Fullwidth Forms":function(S){return S>=65280&&S<=65519}};function ol(S){for(var z=0,Z=S;z=65097&&S<=65103)||Or["CJK Compatibility Ideographs"](S)||Or["CJK Compatibility"](S)||Or["CJK Radicals Supplement"](S)||Or["CJK Strokes"](S)||!(!Or["CJK Symbols and Punctuation"](S)||S>=12296&&S<=12305||S>=12308&&S<=12319||S===12336)||Or["CJK Unified Ideographs Extension A"](S)||Or["CJK Unified Ideographs"](S)||Or["Enclosed CJK Letters and Months"](S)||Or["Hangul Compatibility Jamo"](S)||Or["Hangul Jamo Extended-A"](S)||Or["Hangul Jamo Extended-B"](S)||Or["Hangul Jamo"](S)||Or["Hangul Syllables"](S)||Or.Hiragana(S)||Or["Ideographic Description Characters"](S)||Or.Kanbun(S)||Or["Kangxi Radicals"](S)||Or["Katakana Phonetic Extensions"](S)||Or.Katakana(S)&&S!==12540||!(!Or["Halfwidth and Fullwidth Forms"](S)||S===65288||S===65289||S===65293||S>=65306&&S<=65310||S===65339||S===65341||S===65343||S>=65371&&S<=65503||S===65507||S>=65512&&S<=65519)||!(!Or["Small Form Variants"](S)||S>=65112&&S<=65118||S>=65123&&S<=65126)||Or["Unified Canadian Aboriginal Syllabics"](S)||Or["Unified Canadian Aboriginal Syllabics Extended"](S)||Or["Vertical Forms"](S)||Or["Yijing Hexagram Symbols"](S)||Or["Yi Syllables"](S)||Or["Yi Radicals"](S))))}function Xl(S){return!(uo(S)||function(z){return!!(Or["Latin-1 Supplement"](z)&&(z===167||z===169||z===174||z===177||z===188||z===189||z===190||z===215||z===247)||Or["General Punctuation"](z)&&(z===8214||z===8224||z===8225||z===8240||z===8241||z===8251||z===8252||z===8258||z===8263||z===8264||z===8265||z===8273)||Or["Letterlike Symbols"](z)||Or["Number Forms"](z)||Or["Miscellaneous Technical"](z)&&(z>=8960&&z<=8967||z>=8972&&z<=8991||z>=8996&&z<=9e3||z===9003||z>=9085&&z<=9114||z>=9150&&z<=9165||z===9167||z>=9169&&z<=9179||z>=9186&&z<=9215)||Or["Control Pictures"](z)&&z!==9251||Or["Optical Character Recognition"](z)||Or["Enclosed Alphanumerics"](z)||Or["Geometric Shapes"](z)||Or["Miscellaneous Symbols"](z)&&!(z>=9754&&z<=9759)||Or["Miscellaneous Symbols and Arrows"](z)&&(z>=11026&&z<=11055||z>=11088&&z<=11097||z>=11192&&z<=11243)||Or["CJK Symbols and Punctuation"](z)||Or.Katakana(z)||Or["Private Use Area"](z)||Or["CJK Compatibility Forms"](z)||Or["Small Form Variants"](z)||Or["Halfwidth and Fullwidth Forms"](z)||z===8734||z===8756||z===8757||z>=9984&&z<=10087||z>=10102&&z<=10131||z===65532||z===65533)}(S))}function Cl(S){return Or.Arabic(S)||Or["Arabic Supplement"](S)||Or["Arabic Extended-A"](S)||Or["Arabic Presentation Forms-A"](S)||Or["Arabic Presentation Forms-B"](S)}function ya(S){return S>=1424&&S<=2303||Or["Arabic Presentation Forms-A"](S)||Or["Arabic Presentation Forms-B"](S)}function Vs(S,z){return!(!z&&ya(S)||S>=2304&&S<=3583||S>=3840&&S<=4255||Or.Khmer(S))}function ns(S){for(var z=0,Z=S;z-1&&(xa=co),Hs&&Hs(S)};function Ll(){to.fire(new Ge("pluginStateChange",{pluginStatus:xa,pluginURL:fo}))}var to=new ht,ho=function(){return xa},Fo=function(){if(xa!==Wa||!fo)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");xa=xs,Ll(),fo&&Dt({url:fo},function(S){S?vi(S):(xa=_o,Ll())})},za={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return xa===_o||za.applyArabicShaping!=null},isLoading:function(){return xa===xs},setState:function(S){xa=S.pluginStatus,fo=S.pluginURL},isParsed:function(){return za.applyArabicShaping!=null&&za.processBidirectionalText!=null&&za.processStyledBidirectionalText!=null},getPluginURL:function(){return fo}},di=function(S,z){this.zoom=S,z?(this.now=z.now,this.fadeDuration=z.fadeDuration,this.zoomHistory=z.zoomHistory,this.transition=z.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new al,this.transition={})};di.prototype.isSupportedScript=function(S){return function(z,Z){for(var le=0,ke=z;lethis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:z+(1-z)*Z}:{fromScale:.5,toScale:1,t:1-(1-Z)*z}};var oa=function(S,z){this.property=S,this.value=z,this.expression=function(Z,le){if(ds(Z))return new Tl(Z,le);if(el(Z)){var ke=tl(Z,le);if(ke.result==="error")throw new Error(ke.value.map(function(qe){return qe.key+": "+qe.message}).join(", "));return ke.value}var Ie=Z;return typeof Z=="string"&&le.type==="color"&&(Ie=hn.parse(Z)),{kind:"constant",evaluate:function(){return Ie}}}(z===void 0?S.specification.default:z,S.specification)};oa.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},oa.prototype.possiblyEvaluate=function(S,z,Z){return this.property.possiblyEvaluate(this,S,z,Z)};var wo=function(S){this.property=S,this.value=new oa(S,void 0)};wo.prototype.transitioned=function(S,z){return new Bo(this.property,this.value,z,u({},S.transition,this.transition),S.now)},wo.prototype.untransitioned=function(){return new Bo(this.property,this.value,null,{},0)};var Da=function(S){this._properties=S,this._values=Object.create(S.defaultTransitionablePropertyValues)};Da.prototype.getValue=function(S){return k(this._values[S].value.value)},Da.prototype.setValue=function(S,z){this._values.hasOwnProperty(S)||(this._values[S]=new wo(this._values[S].property)),this._values[S].value=new oa(this._values[S].property,z===null?void 0:k(z))},Da.prototype.getTransition=function(S){return k(this._values[S].transition)},Da.prototype.setTransition=function(S,z){this._values.hasOwnProperty(S)||(this._values[S]=new wo(this._values[S].property)),this._values[S].transition=k(z)||void 0},Da.prototype.serialize=function(){for(var S={},z=0,Z=Object.keys(this._values);zthis.end)return this.prior=null,ke;if(this.value.isDataDriven())return this.prior=null,ke;if(le=1)return 1;var dt=it*it,St=dt*it;return 4*(it<.5?St:3*(it-dt)+St-.75)}(qe))}return ke};var bs=function(S){this._properties=S,this._values=Object.create(S.defaultTransitioningPropertyValues)};bs.prototype.possiblyEvaluate=function(S,z,Z){for(var le=new po(this._properties),ke=0,Ie=Object.keys(this._values);keIe.zoomHistory.lastIntegerZoom?{from:Z,to:le}:{from:ke,to:le}},z.prototype.interpolate=function(Z){return Z},z}(Ur),is=function(S){this.specification=S};is.prototype.possiblyEvaluate=function(S,z,Z,le){if(S.value!==void 0){if(S.expression.kind==="constant"){var ke=S.expression.evaluate(z,null,{},Z,le);return this._calculate(ke,ke,ke,z)}return this._calculate(S.expression.evaluate(new di(Math.floor(z.zoom-1),z)),S.expression.evaluate(new di(Math.floor(z.zoom),z)),S.expression.evaluate(new di(Math.floor(z.zoom+1),z)),z)}},is.prototype._calculate=function(S,z,Z,le){return le.zoom>le.zoomHistory.lastIntegerZoom?{from:S,to:z}:{from:Z,to:z}},is.prototype.interpolate=function(S){return S};var To=function(S){this.specification=S};To.prototype.possiblyEvaluate=function(S,z,Z,le){return!!S.expression.evaluate(z,null,{},Z,le)},To.prototype.interpolate=function(){return!1};var _a=function(S){for(var z in this.properties=S,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],S){var Z=S[z];Z.specification.overridable&&this.overridableProperties.push(z);var le=this.defaultPropertyValues[z]=new oa(Z,void 0),ke=this.defaultTransitionablePropertyValues[z]=new wo(Z);this.defaultTransitioningPropertyValues[z]=ke.untransitioned(),this.defaultPossiblyEvaluatedValues[z]=le.possiblyEvaluate({})}};Cr("DataDrivenProperty",Ur),Cr("DataConstantProperty",Fr),Cr("CrossFadedDataDrivenProperty",sl),Cr("CrossFadedProperty",is),Cr("ColorRampProperty",To);var $l="-transition",Fa=function(S){function z(Z,le){if(S.call(this),this.id=Z.id,this.type=Z.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},Z.type!=="custom"&&(this.metadata=Z.metadata,this.minzoom=Z.minzoom,this.maxzoom=Z.maxzoom,Z.type!=="background"&&(this.source=Z.source,this.sourceLayer=Z["source-layer"],this.filter=Z.filter),le.layout&&(this._unevaluatedLayout=new rs(le.layout)),le.paint)){for(var ke in this._transitionablePaint=new Da(le.paint),Z.paint)this.setPaintProperty(ke,Z.paint[ke],{validate:!1});for(var Ie in Z.layout)this.setLayoutProperty(Ie,Z.layout[Ie],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new po(le.paint)}}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},z.prototype.getLayoutProperty=function(Z){return Z==="visibility"?this.visibility:this._unevaluatedLayout.getValue(Z)},z.prototype.setLayoutProperty=function(Z,le,ke){if(ke===void 0&&(ke={}),le!=null){var Ie="layers."+this.id+".layout."+Z;if(this._validate(ys,Ie,Z,le,ke))return}Z!=="visibility"?this._unevaluatedLayout.setValue(Z,le):this.visibility=le},z.prototype.getPaintProperty=function(Z){return x(Z,$l)?this._transitionablePaint.getTransition(Z.slice(0,-$l.length)):this._transitionablePaint.getValue(Z)},z.prototype.setPaintProperty=function(Z,le,ke){if(ke===void 0&&(ke={}),le!=null){var Ie="layers."+this.id+".paint."+Z;if(this._validate(Ia,Ie,Z,le,ke))return!1}if(x(Z,$l))return this._transitionablePaint.setTransition(Z.slice(0,-$l.length),le||void 0),!1;var qe=this._transitionablePaint._values[Z],it=qe.property.specification["property-type"]==="cross-faded-data-driven",dt=qe.value.isDataDriven(),St=qe.value;this._transitionablePaint.setValue(Z,le),this._handleSpecialPaintPropertyUpdate(Z);var Rt=this._transitionablePaint._values[Z].value;return Rt.isDataDriven()||dt||it||this._handleOverridablePaintPropertyUpdate(Z,St,Rt)},z.prototype._handleSpecialPaintPropertyUpdate=function(Z){},z.prototype._handleOverridablePaintPropertyUpdate=function(Z,le,ke){return!1},z.prototype.isHidden=function(Z){return!!(this.minzoom&&Z=this.maxzoom)||this.visibility==="none"},z.prototype.updateTransitions=function(Z){this._transitioningPaint=this._transitionablePaint.transitioned(Z,this._transitioningPaint)},z.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},z.prototype.recalculate=function(Z,le){Z.getCrossfadeParameters&&(this._crossfadeParameters=Z.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(Z,void 0,le)),this.paint=this._transitioningPaint.possiblyEvaluate(Z,void 0,le)},z.prototype.serialize=function(){var Z={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&&(Z.layout=Z.layout||{},Z.layout.visibility=this.visibility),y(Z,function(le,ke){return!(le===void 0||ke==="layout"&&!Object.keys(le).length||ke==="paint"&&!Object.keys(le).length)})},z.prototype._validate=function(Z,le,ke,Ie,qe){return qe===void 0&&(qe={}),(!qe||qe.validate!==!1)&&lo(this,Z.call(ma,{key:le,layerType:this.type,objectKey:ke,value:Ie,styleSpec:Oe,style:{glyphs:!0,sprite:!0}}))},z.prototype.is3D=function(){return!1},z.prototype.isTileClipped=function(){return!1},z.prototype.hasOffscreenPass=function(){return!1},z.prototype.resize=function(){},z.prototype.isStateDependent=function(){for(var Z in this.paint._values){var le=this.paint.get(Z);if(le instanceof ba&&Ks(le.property.specification)&&(le.value.kind==="source"||le.value.kind==="composite")&&le.value.isStateDependent)return!0}return!1},z}(ht),ll={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},as=function(S,z){this._structArray=S,this._pos1=z*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},_i=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Si(S,z){z===void 0&&(z=1);var Z=0,le=0;return{members:S.map(function(ke){var Ie,qe=(Ie=ke.type,ll[Ie].BYTES_PER_ELEMENT),it=Z=Jl(Z,Math.max(z,qe)),dt=ke.components||1;return le=Math.max(le,qe),Z+=qe*dt,{name:ke.name,type:ke.type,components:dt,offset:it}}),size:Jl(Z,Math.max(le,z)),alignment:z}}function Jl(S,z){return Math.ceil(S/z)*z}_i.serialize=function(S,z){return S._trim(),z&&(S.isTransferred=!0,z.push(S.arrayBuffer)),{length:S.length,arrayBuffer:S.arrayBuffer}},_i.deserialize=function(S){var z=Object.create(this.prototype);return z.arrayBuffer=S.arrayBuffer,z.length=S.length,z.capacity=S.arrayBuffer.byteLength/z.bytesPerElement,z._refreshViews(),z},_i.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},_i.prototype.clear=function(){this.length=0},_i.prototype.resize=function(S){this.reserve(S),this.length=S},_i.prototype.reserve=function(S){if(S>this.capacity){this.capacity=Math.max(S,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var z=this.uint8;this._refreshViews(),z&&this.uint8.set(z)}},_i.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var et=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le){var ke=this.length;return this.resize(ke+1),this.emplace(ke,Z,le)},z.prototype.emplace=function(Z,le,ke){var Ie=2*Z;return this.int16[Ie+0]=le,this.int16[Ie+1]=ke,Z},z}(_i);et.prototype.bytesPerElement=4,Cr("StructArrayLayout2i4",et);var rt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie){var qe=this.length;return this.resize(qe+1),this.emplace(qe,Z,le,ke,Ie)},z.prototype.emplace=function(Z,le,ke,Ie,qe){var it=4*Z;return this.int16[it+0]=le,this.int16[it+1]=ke,this.int16[it+2]=Ie,this.int16[it+3]=qe,Z},z}(_i);rt.prototype.bytesPerElement=8,Cr("StructArrayLayout4i8",rt);var ct=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it){var dt=this.length;return this.resize(dt+1),this.emplace(dt,Z,le,ke,Ie,qe,it)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt){var St=6*Z;return this.int16[St+0]=le,this.int16[St+1]=ke,this.int16[St+2]=Ie,this.int16[St+3]=qe,this.int16[St+4]=it,this.int16[St+5]=dt,Z},z}(_i);ct.prototype.bytesPerElement=12,Cr("StructArrayLayout2i4i12",ct);var vt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it){var dt=this.length;return this.resize(dt+1),this.emplace(dt,Z,le,ke,Ie,qe,it)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt){var St=4*Z,Rt=8*Z;return this.int16[St+0]=le,this.int16[St+1]=ke,this.uint8[Rt+4]=Ie,this.uint8[Rt+5]=qe,this.uint8[Rt+6]=it,this.uint8[Rt+7]=dt,Z},z}(_i);vt.prototype.bytesPerElement=8,Cr("StructArrayLayout2i4ub8",vt);var Mt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht){var Yt=this.length;return this.resize(Yt+1),this.emplace(Yt,Z,le,ke,Ie,qe,it,dt,St,Rt,Ht)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt){var Zt=9*Z,cn=18*Z;return this.uint16[Zt+0]=le,this.uint16[Zt+1]=ke,this.uint16[Zt+2]=Ie,this.uint16[Zt+3]=qe,this.uint16[Zt+4]=it,this.uint16[Zt+5]=dt,this.uint16[Zt+6]=St,this.uint16[Zt+7]=Rt,this.uint8[cn+16]=Ht,this.uint8[cn+17]=Yt,Z},z}(_i);Mt.prototype.bytesPerElement=18,Cr("StructArrayLayout8ui2ub18",Mt);var kt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt){var cn=this.length;return this.resize(cn+1),this.emplace(cn,Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn){var Tn=12*Z;return this.int16[Tn+0]=le,this.int16[Tn+1]=ke,this.int16[Tn+2]=Ie,this.int16[Tn+3]=qe,this.uint16[Tn+4]=it,this.uint16[Tn+5]=dt,this.uint16[Tn+6]=St,this.uint16[Tn+7]=Rt,this.int16[Tn+8]=Ht,this.int16[Tn+9]=Yt,this.int16[Tn+10]=Zt,this.int16[Tn+11]=cn,Z},z}(_i);kt.prototype.bytesPerElement=24,Cr("StructArrayLayout4i4ui4i24",kt);var q=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,Z,le,ke)},z.prototype.emplace=function(Z,le,ke,Ie){var qe=3*Z;return this.float32[qe+0]=le,this.float32[qe+1]=ke,this.float32[qe+2]=Ie,Z},z}(_i);q.prototype.bytesPerElement=12,Cr("StructArrayLayout3f12",q);var $=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z){var le=this.length;return this.resize(le+1),this.emplace(le,Z)},z.prototype.emplace=function(Z,le){var ke=1*Z;return this.uint32[ke+0]=le,Z},z}(_i);$.prototype.bytesPerElement=4,Cr("StructArrayLayout1ul4",$);var W=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.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)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it,dt,St,Rt){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,Z,le,ke,Ie,qe,it,dt,St,Rt)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht){var Yt=10*Z,Zt=5*Z;return this.int16[Yt+0]=le,this.int16[Yt+1]=ke,this.int16[Yt+2]=Ie,this.int16[Yt+3]=qe,this.int16[Yt+4]=it,this.int16[Yt+5]=dt,this.uint32[Zt+3]=St,this.uint16[Yt+8]=Rt,this.uint16[Yt+9]=Ht,Z},z}(_i);W.prototype.bytesPerElement=20,Cr("StructArrayLayout6i1ul2ui20",W);var ae=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it){var dt=this.length;return this.resize(dt+1),this.emplace(dt,Z,le,ke,Ie,qe,it)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt){var St=6*Z;return this.int16[St+0]=le,this.int16[St+1]=ke,this.int16[St+2]=Ie,this.int16[St+3]=qe,this.int16[St+4]=it,this.int16[St+5]=dt,Z},z}(_i);ae.prototype.bytesPerElement=12,Cr("StructArrayLayout2i2i2i12",ae);var _e=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe){var it=this.length;return this.resize(it+1),this.emplace(it,Z,le,ke,Ie,qe)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it){var dt=4*Z,St=8*Z;return this.float32[dt+0]=le,this.float32[dt+1]=ke,this.float32[dt+2]=Ie,this.int16[St+6]=qe,this.int16[St+7]=it,Z},z}(_i);_e.prototype.bytesPerElement=16,Cr("StructArrayLayout2f1f2i16",_e);var Re=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie){var qe=this.length;return this.resize(qe+1),this.emplace(qe,Z,le,ke,Ie)},z.prototype.emplace=function(Z,le,ke,Ie,qe){var it=12*Z,dt=3*Z;return this.uint8[it+0]=le,this.uint8[it+1]=ke,this.float32[dt+1]=Ie,this.float32[dt+2]=qe,Z},z}(_i);Re.prototype.bytesPerElement=12,Cr("StructArrayLayout2ub2f12",Re);var He=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,Z,le,ke)},z.prototype.emplace=function(Z,le,ke,Ie){var qe=3*Z;return this.uint16[qe+0]=le,this.uint16[qe+1]=ke,this.uint16[qe+2]=Ie,Z},z}(_i);He.prototype.bytesPerElement=6,Cr("StructArrayLayout3ui6",He);var Xe=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.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)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn){var Yn=this.length;return this.resize(Yn+1),this.emplace(Yn,Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn,Yn){var Kn=24*Z,ar=12*Z,ur=48*Z;return this.int16[Kn+0]=le,this.int16[Kn+1]=ke,this.uint16[Kn+2]=Ie,this.uint16[Kn+3]=qe,this.uint32[ar+2]=it,this.uint32[ar+3]=dt,this.uint32[ar+4]=St,this.uint16[Kn+10]=Rt,this.uint16[Kn+11]=Ht,this.uint16[Kn+12]=Yt,this.float32[ar+7]=Zt,this.float32[ar+8]=cn,this.uint8[ur+36]=Tn,this.uint8[ur+37]=Fn,this.uint8[ur+38]=Dn,this.uint32[ar+10]=Gn,this.int16[Kn+22]=Yn,Z},z}(_i);Xe.prototype.bytesPerElement=48,Cr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Xe);var at=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.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)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn,Yn,Kn,ar,ur,Er,br,Ir,Br,$r,jr,Xr){var Vr=this.length;return this.resize(Vr+1),this.emplace(Vr,Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn,Yn,Kn,ar,ur,Er,br,Ir,Br,$r,jr,Xr)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn,Yn,Kn,ar,ur,Er,br,Ir,Br,$r,jr,Xr,Vr){var Nr=34*Z,si=17*Z;return this.int16[Nr+0]=le,this.int16[Nr+1]=ke,this.int16[Nr+2]=Ie,this.int16[Nr+3]=qe,this.int16[Nr+4]=it,this.int16[Nr+5]=dt,this.int16[Nr+6]=St,this.int16[Nr+7]=Rt,this.uint16[Nr+8]=Ht,this.uint16[Nr+9]=Yt,this.uint16[Nr+10]=Zt,this.uint16[Nr+11]=cn,this.uint16[Nr+12]=Tn,this.uint16[Nr+13]=Fn,this.uint16[Nr+14]=Dn,this.uint16[Nr+15]=Gn,this.uint16[Nr+16]=Yn,this.uint16[Nr+17]=Kn,this.uint16[Nr+18]=ar,this.uint16[Nr+19]=ur,this.uint16[Nr+20]=Er,this.uint16[Nr+21]=br,this.uint16[Nr+22]=Ir,this.uint32[si+12]=Br,this.float32[si+13]=$r,this.float32[si+14]=jr,this.float32[si+15]=Xr,this.float32[si+16]=Vr,Z},z}(_i);at.prototype.bytesPerElement=68,Cr("StructArrayLayout8i15ui1ul4f68",at);var wt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z){var le=this.length;return this.resize(le+1),this.emplace(le,Z)},z.prototype.emplace=function(Z,le){var ke=1*Z;return this.float32[ke+0]=le,Z},z}(_i);wt.prototype.bytesPerElement=4,Cr("StructArrayLayout1f4",wt);var At=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,Z,le,ke)},z.prototype.emplace=function(Z,le,ke,Ie){var qe=3*Z;return this.int16[qe+0]=le,this.int16[qe+1]=ke,this.int16[qe+2]=Ie,Z},z}(_i);At.prototype.bytesPerElement=6,Cr("StructArrayLayout3i6",At);var ie=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,Z,le,ke)},z.prototype.emplace=function(Z,le,ke,Ie){var qe=2*Z,it=4*Z;return this.uint32[qe+0]=le,this.uint16[it+2]=ke,this.uint16[it+3]=Ie,Z},z}(_i);ie.prototype.bytesPerElement=8,Cr("StructArrayLayout1ul2ui8",ie);var ve=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le){var ke=this.length;return this.resize(ke+1),this.emplace(ke,Z,le)},z.prototype.emplace=function(Z,le,ke){var Ie=2*Z;return this.uint16[Ie+0]=le,this.uint16[Ie+1]=ke,Z},z}(_i);ve.prototype.bytesPerElement=4,Cr("StructArrayLayout2ui4",ve);var Le=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z){var le=this.length;return this.resize(le+1),this.emplace(le,Z)},z.prototype.emplace=function(Z,le){var ke=1*Z;return this.uint16[ke+0]=le,Z},z}(_i);Le.prototype.bytesPerElement=2,Cr("StructArrayLayout1ui2",Le);var Fe=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le){var ke=this.length;return this.resize(ke+1),this.emplace(ke,Z,le)},z.prototype.emplace=function(Z,le,ke){var Ie=2*Z;return this.float32[Ie+0]=le,this.float32[Ie+1]=ke,Z},z}(_i);Fe.prototype.bytesPerElement=8,Cr("StructArrayLayout2f8",Fe);var Ve=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie){var qe=this.length;return this.resize(qe+1),this.emplace(qe,Z,le,ke,Ie)},z.prototype.emplace=function(Z,le,ke,Ie,qe){var it=4*Z;return this.float32[it+0]=le,this.float32[it+1]=ke,this.float32[it+2]=Ie,this.float32[it+3]=qe,Z},z}(_i);Ve.prototype.bytesPerElement=16,Cr("StructArrayLayout4f16",Ve);var We=function(S){function z(){S.apply(this,arguments)}S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z;var Z={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 Z.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},Z.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},Z.x1.get=function(){return this._structArray.int16[this._pos2+2]},Z.y1.get=function(){return this._structArray.int16[this._pos2+3]},Z.x2.get=function(){return this._structArray.int16[this._pos2+4]},Z.y2.get=function(){return this._structArray.int16[this._pos2+5]},Z.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},Z.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},Z.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},Z.anchorPoint.get=function(){return new t(this.anchorPointX,this.anchorPointY)},Object.defineProperties(z.prototype,Z),z}(as);We.prototype.size=20;var $e=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.get=function(Z){return new We(this,Z)},z}(W);Cr("CollisionBoxArray",$e);var tt=function(S){function z(){S.apply(this,arguments)}S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z;var Z={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 Z.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},Z.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},Z.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},Z.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},Z.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},Z.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},Z.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},Z.segment.get=function(){return this._structArray.uint16[this._pos2+10]},Z.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},Z.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},Z.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},Z.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},Z.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},Z.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},Z.placedOrientation.set=function(le){this._structArray.uint8[this._pos1+37]=le},Z.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},Z.hidden.set=function(le){this._structArray.uint8[this._pos1+38]=le},Z.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},Z.crossTileID.set=function(le){this._structArray.uint32[this._pos4+10]=le},Z.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(z.prototype,Z),z}(as);tt.prototype.size=48;var lt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.get=function(Z){return new tt(this,Z)},z}(Xe);Cr("PlacedSymbolArray",lt);var gt=function(S){function z(){S.apply(this,arguments)}S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z;var Z={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 Z.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},Z.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},Z.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},Z.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},Z.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},Z.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},Z.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},Z.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},Z.key.get=function(){return this._structArray.uint16[this._pos2+8]},Z.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},Z.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},Z.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},Z.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},Z.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},Z.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},Z.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},Z.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},Z.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},Z.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},Z.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},Z.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},Z.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},Z.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},Z.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},Z.crossTileID.set=function(le){this._structArray.uint32[this._pos4+12]=le},Z.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},Z.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},Z.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},Z.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(z.prototype,Z),z}(as);gt.prototype.size=68;var zt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.get=function(Z){return new gt(this,Z)},z}(at);Cr("SymbolInstanceArray",zt);var Ut=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.getoffsetX=function(Z){return this.float32[1*Z+0]},z}(wt);Cr("GlyphOffsetArray",Ut);var Vt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.getx=function(Z){return this.int16[3*Z+0]},z.prototype.gety=function(Z){return this.int16[3*Z+1]},z.prototype.gettileUnitDistanceFromAnchor=function(Z){return this.int16[3*Z+2]},z}(At);Cr("SymbolLineVertexArray",Vt);var Qt=function(S){function z(){S.apply(this,arguments)}S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z;var Z={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return Z.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},Z.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},Z.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(z.prototype,Z),z}(as);Qt.prototype.size=8;var gn=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.get=function(Z){return new Qt(this,Z)},z}(ie);Cr("FeatureIndexArray",gn);var en=Si([{name:"a_pos",components:2,type:"Int16"}],4).members,sn=function(S){S===void 0&&(S=[]),this.segments=S};function rn(S,z){return 256*(S=o(Math.floor(S),0,255))+o(Math.floor(z),0,255)}sn.prototype.prepareSegment=function(S,z,Z,le){var ke=this.segments[this.segments.length-1];return S>sn.MAX_VERTEX_ARRAY_LENGTH&&M("Max vertices per segment is "+sn.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+S),(!ke||ke.vertexLength+S>sn.MAX_VERTEX_ARRAY_LENGTH||ke.sortKey!==le)&&(ke={vertexOffset:z.length,primitiveOffset:Z.length,vertexLength:0,primitiveLength:0},le!==void 0&&(ke.sortKey=le),this.segments.push(ke)),ke},sn.prototype.get=function(){return this.segments},sn.prototype.destroy=function(){for(var S=0,z=this.segments;S>>16)*it&65535)<<16)&4294967295)<<15|St>>>17))*dt+(((St>>>16)*dt&65535)<<16)&4294967295)<<13|Ie>>>19))+((5*(Ie>>>16)&65535)<<16)&4294967295))+((58964+(qe>>>16)&65535)<<16);switch(St=0,le){case 3:St^=(255&z.charCodeAt(Rt+2))<<16;case 2:St^=(255&z.charCodeAt(Rt+1))<<8;case 1:Ie^=St=(65535&(St=(St=(65535&(St^=255&z.charCodeAt(Rt)))*it+(((St>>>16)*it&65535)<<16)&4294967295)<<15|St>>>17))*dt+(((St>>>16)*dt&65535)<<16)&4294967295}return Ie^=z.length,Ie=2246822507*(65535&(Ie^=Ie>>>16))+((2246822507*(Ie>>>16)&65535)<<16)&4294967295,Ie=3266489909*(65535&(Ie^=Ie>>>13))+((3266489909*(Ie>>>16)&65535)<<16)&4294967295,(Ie^=Ie>>>16)>>>0}}),an=T(function(S){S.exports=function(z,Z){for(var le,ke=z.length,Ie=Z^ke,qe=0;ke>=4;)le=1540483477*(65535&(le=255&z.charCodeAt(qe)|(255&z.charCodeAt(++qe))<<8|(255&z.charCodeAt(++qe))<<16|(255&z.charCodeAt(++qe))<<24))+((1540483477*(le>>>16)&65535)<<16),Ie=1540483477*(65535&Ie)+((1540483477*(Ie>>>16)&65535)<<16)^(le=1540483477*(65535&(le^=le>>>24))+((1540483477*(le>>>16)&65535)<<16)),ke-=4,++qe;switch(ke){case 3:Ie^=(255&z.charCodeAt(qe+2))<<16;case 2:Ie^=(255&z.charCodeAt(qe+1))<<8;case 1:Ie=1540483477*(65535&(Ie^=255&z.charCodeAt(qe)))+((1540483477*(Ie>>>16)&65535)<<16)}return Ie=1540483477*(65535&(Ie^=Ie>>>13))+((1540483477*(Ie>>>16)&65535)<<16),(Ie^=Ie>>>15)>>>0}}),zn=xn,Un=xn,nr=an;zn.murmur3=Un,zn.murmur2=nr;var rr=function(){this.ids=[],this.positions=[],this.indexed=!1};rr.prototype.add=function(S,z,Z,le){this.ids.push(kr(S)),this.positions.push(z,Z,le)},rr.prototype.getPositions=function(S){for(var z=kr(S),Z=0,le=this.ids.length-1;Z>1;this.ids[ke]>=z?le=ke:Z=ke+1}for(var Ie=[];this.ids[Z]===z;){var qe=this.positions[3*Z],it=this.positions[3*Z+1],dt=this.positions[3*Z+2];Ie.push({index:qe,start:it,end:dt}),Z++}return Ie},rr.serialize=function(S,z){var Z=new Float64Array(S.ids),le=new Uint32Array(S.positions);return mr(Z,le,0,Z.length-1),z&&z.push(Z.buffer,le.buffer),{ids:Z,positions:le}},rr.deserialize=function(S){var z=new rr;return z.ids=S.ids,z.positions=S.positions,z.indexed=!0,z};var wr=Math.pow(2,53)-1;function kr(S){var z=+S;return!isNaN(z)&&z<=wr?z:zn(String(S))}function mr(S,z,Z,le){for(;Z>1],Ie=Z-1,qe=le+1;;){do Ie++;while(S[Ie]ke);if(Ie>=qe)break;_r(S,Ie,qe),_r(z,3*Ie,3*qe),_r(z,3*Ie+1,3*qe+1),_r(z,3*Ie+2,3*qe+2)}qe-Zwa.max||qe.ywa.max)&&(M("Geometry exceeds allowed extent, reduce your vector tile buffer size"),qe.x=o(qe.x,wa.min,wa.max),qe.y=o(qe.y,wa.min,wa.max))}return Z}function ko(S,z,Z,le,ke){S.emplaceBack(2*z+(le+1)/2,2*Z+(ke+1)/2)}var ai=function(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(function(z){return z.id}),this.index=S.index,this.hasPattern=!1,this.layoutVertexArray=new et,this.indexArray=new He,this.segments=new sn,this.programConfigurations=new qi(en,S.layers,S.zoom),this.stateDependentLayerIds=this.layers.filter(function(z){return z.isStateDependent()}).map(function(z){return z.id})};function na(S,z){for(var Z=0;Z1){if(vh(S,z))return!0;for(var le=0;le1?S.distSqr(Z):S.distSqr(Z.sub(z)._mult(ke)._add(z))}function Lc(S,z){for(var Z,le,ke,Ie=!1,qe=0;qez.y!=ke.y>z.y&&z.x<(ke.x-le.x)*(z.y-le.y)/(ke.y-le.y)+le.x&&(Ie=!Ie);return Ie}function Zu(S,z){for(var Z=!1,le=0,ke=S.length-1;lez.y!=qe.y>z.y&&z.x<(qe.x-Ie.x)*(z.y-Ie.y)/(qe.y-Ie.y)+Ie.x&&(Z=!Z)}return Z}function d1(S,z,Z){var le=Z[0],ke=Z[2];if(S.xke.x&&z.x>ke.x||S.yke.y&&z.y>ke.y)return!1;var Ie=A(S,z,Z[0]);return Ie!==A(S,z,Z[1])||Ie!==A(S,z,Z[2])||Ie!==A(S,z,Z[3])}function ku(S,z,Z){var le=z.paint.get(S).value;return le.kind==="constant"?le.value:Z.programConfigurations.get(z.id).getMaxValue(S)}function $p(S){return Math.sqrt(S[0]*S[0]+S[1]*S[1])}function Jp(S,z,Z,le,ke){if(!z[0]&&!z[1])return S;var Ie=t.convert(z)._mult(ke);Z==="viewport"&&Ie._rotate(-le);for(var qe=[],it=0;it=Yr||Rt<0||Rt>=Yr)){var Ht=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,S.sortKey),Yt=Ht.vertexLength;ko(this.layoutVertexArray,St,Rt,-1,-1),ko(this.layoutVertexArray,St,Rt,1,-1),ko(this.layoutVertexArray,St,Rt,1,1),ko(this.layoutVertexArray,St,Rt,-1,1),this.indexArray.emplaceBack(Yt,Yt+1,Yt+2),this.indexArray.emplaceBack(Yt,Yt+3,Yt+2),Ht.vertexLength+=4,Ht.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,Z,{},le)},Cr("CircleBucket",ai,{omit:["layers"]});var qw=new _a({"circle-sort-key":new Ur(Oe.layout_circle["circle-sort-key"])}),Gw={paint:new _a({"circle-radius":new Ur(Oe.paint_circle["circle-radius"]),"circle-color":new Ur(Oe.paint_circle["circle-color"]),"circle-blur":new Ur(Oe.paint_circle["circle-blur"]),"circle-opacity":new Ur(Oe.paint_circle["circle-opacity"]),"circle-translate":new Fr(Oe.paint_circle["circle-translate"]),"circle-translate-anchor":new Fr(Oe.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Fr(Oe.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Fr(Oe.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Ur(Oe.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Ur(Oe.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Ur(Oe.paint_circle["circle-stroke-opacity"])}),layout:qw},ws=typeof Float32Array<"u"?Float32Array:Array;function g1(S){return S[0]=1,S[1]=0,S[2]=0,S[3]=0,S[4]=0,S[5]=1,S[6]=0,S[7]=0,S[8]=0,S[9]=0,S[10]=1,S[11]=0,S[12]=0,S[13]=0,S[14]=0,S[15]=1,S}function ny(S,z,Z){var le=z[0],ke=z[1],Ie=z[2],qe=z[3],it=z[4],dt=z[5],St=z[6],Rt=z[7],Ht=z[8],Yt=z[9],Zt=z[10],cn=z[11],Tn=z[12],Fn=z[13],Dn=z[14],Gn=z[15],Yn=Z[0],Kn=Z[1],ar=Z[2],ur=Z[3];return S[0]=Yn*le+Kn*it+ar*Ht+ur*Tn,S[1]=Yn*ke+Kn*dt+ar*Yt+ur*Fn,S[2]=Yn*Ie+Kn*St+ar*Zt+ur*Dn,S[3]=Yn*qe+Kn*Rt+ar*cn+ur*Gn,Yn=Z[4],Kn=Z[5],ar=Z[6],ur=Z[7],S[4]=Yn*le+Kn*it+ar*Ht+ur*Tn,S[5]=Yn*ke+Kn*dt+ar*Yt+ur*Fn,S[6]=Yn*Ie+Kn*St+ar*Zt+ur*Dn,S[7]=Yn*qe+Kn*Rt+ar*cn+ur*Gn,Yn=Z[8],Kn=Z[9],ar=Z[10],ur=Z[11],S[8]=Yn*le+Kn*it+ar*Ht+ur*Tn,S[9]=Yn*ke+Kn*dt+ar*Yt+ur*Fn,S[10]=Yn*Ie+Kn*St+ar*Zt+ur*Dn,S[11]=Yn*qe+Kn*Rt+ar*cn+ur*Gn,Yn=Z[12],Kn=Z[13],ar=Z[14],ur=Z[15],S[12]=Yn*le+Kn*it+ar*Ht+ur*Tn,S[13]=Yn*ke+Kn*dt+ar*Yt+ur*Fn,S[14]=Yn*Ie+Kn*St+ar*Zt+ur*Dn,S[15]=Yn*qe+Kn*Rt+ar*cn+ur*Gn,S}Math.hypot||(Math.hypot=function(){for(var S=arguments,z=0,Z=arguments.length;Z--;)z+=S[Z]*S[Z];return Math.sqrt(z)});var Ww=ny,Kp,Zw=function(S,z,Z){return S[0]=z[0]-Z[0],S[1]=z[1]-Z[1],S[2]=z[2]-Z[2],S};function Qp(S,z,Z){var le=z[0],ke=z[1],Ie=z[2],qe=z[3];return S[0]=Z[0]*le+Z[4]*ke+Z[8]*Ie+Z[12]*qe,S[1]=Z[1]*le+Z[5]*ke+Z[9]*Ie+Z[13]*qe,S[2]=Z[2]*le+Z[6]*ke+Z[10]*Ie+Z[14]*qe,S[3]=Z[3]*le+Z[7]*ke+Z[11]*Ie+Z[15]*qe,S}Kp=new ws(3),ws!=Float32Array&&(Kp[0]=0,Kp[1]=0,Kp[2]=0),function(){var S=new ws(4);ws!=Float32Array&&(S[0]=0,S[1]=0,S[2]=0,S[3]=0)}();var Yw=function(S){var z=S[0],Z=S[1];return z*z+Z*Z},Xw=(function(){var S=new ws(2);ws!=Float32Array&&(S[0]=0,S[1]=0)}(),function(S){function z(Z){S.call(this,Z,Gw)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.createBucket=function(Z){return new ai(Z)},z.prototype.queryRadius=function(Z){var le=Z;return ku("circle-radius",this,le)+ku("circle-stroke-width",this,le)+$p(this.paint.get("circle-translate"))},z.prototype.queryIntersectsFeature=function(Z,le,ke,Ie,qe,it,dt,St){for(var Rt=Jp(Z,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),it.angle,dt),Ht=this.paint.get("circle-radius").evaluate(le,ke)+this.paint.get("circle-stroke-width").evaluate(le,ke),Yt=this.paint.get("circle-pitch-alignment")==="map",Zt=Yt?Rt:function(Er,br){return Er.map(function(Ir){return ry(Ir,br)})}(Rt,St),cn=Yt?Ht*dt:Ht,Tn=0,Fn=Ie;TnS.width||ke.height>S.height||Z.x>S.width-ke.width||Z.y>S.height-ke.height)throw new RangeError("out of range source coordinates for image copy");if(ke.width>z.width||ke.height>z.height||le.x>z.width-ke.width||le.y>z.height-ke.height)throw new RangeError("out of range destination coordinates for image copy");for(var qe=S.data,it=z.data,dt=0;dt80*Z){le=Ie=S[0],ke=qe=S[1];for(var cn=Z;cnIe&&(Ie=it),dt>qe&&(qe=dt);St=(St=Math.max(Ie-le,qe-ke))!==0?1/St:0}return mh(Yt,Zt,Z,le,ke,St),Zt}function ly(S,z,Z,le,ke){var Ie,qe;if(ke===_1(S,z,Z,le)>0)for(Ie=z;Ie=z;Ie-=le)qe=fy(Ie,S[Ie],S[Ie+1],qe);return qe&&td(qe,qe.next)&&(xh(qe),qe=qe.next),qe}function Yu(S,z){if(!S)return S;z||(z=S);var Z,le=S;do if(Z=!1,le.steiner||!td(le,le.next)&&Ta(le.prev,le,le.next)!==0)le=le.next;else{if(xh(le),(le=z=le.prev)===le.next)break;Z=!0}while(Z||le!==z);return z}function mh(S,z,Z,le,ke,Ie,qe){if(S){!qe&&Ie&&function(Rt,Ht,Yt,Zt){var cn=Rt;do cn.z===null&&(cn.z=x1(cn.x,cn.y,Ht,Yt,Zt)),cn.prevZ=cn.prev,cn.nextZ=cn.next,cn=cn.next;while(cn!==Rt);cn.prevZ.nextZ=null,cn.prevZ=null,function(Tn){var Fn,Dn,Gn,Yn,Kn,ar,ur,Er,br=1;do{for(Dn=Tn,Tn=null,Kn=null,ar=0;Dn;){for(ar++,Gn=Dn,ur=0,Fn=0;Fn0||Er>0&&Gn;)ur!==0&&(Er===0||!Gn||Dn.z<=Gn.z)?(Yn=Dn,Dn=Dn.nextZ,ur--):(Yn=Gn,Gn=Gn.nextZ,Er--),Kn?Kn.nextZ=Yn:Tn=Yn,Yn.prevZ=Kn,Kn=Yn;Dn=Gn}Kn.nextZ=null,br*=2}while(ar>1)}(cn)}(S,le,ke,Ie);for(var it,dt,St=S;S.prev!==S.next;)if(it=S.prev,dt=S.next,Ie?n5(S,le,ke,Ie):t5(S))z.push(it.i/Z),z.push(S.i/Z),z.push(dt.i/Z),xh(S),S=dt.next,St=dt.next;else if((S=dt)===St){qe?qe===1?mh(S=r5(Yu(S),z,Z),z,Z,le,ke,Ie,2):qe===2&&i5(S,z,Z,le,ke,Ie):mh(Yu(S),z,Z,le,ke,Ie,1);break}}}function t5(S){var z=S.prev,Z=S,le=S.next;if(Ta(z,Z,le)>=0)return!1;for(var ke=S.next.next;ke!==S.prev;){if(df(z.x,z.y,Z.x,Z.y,le.x,le.y,ke.x,ke.y)&&Ta(ke.prev,ke,ke.next)>=0)return!1;ke=ke.next}return!0}function n5(S,z,Z,le){var ke=S.prev,Ie=S,qe=S.next;if(Ta(ke,Ie,qe)>=0)return!1;for(var it=ke.xIe.x?ke.x>qe.x?ke.x:qe.x:Ie.x>qe.x?Ie.x:qe.x,Rt=ke.y>Ie.y?ke.y>qe.y?ke.y:qe.y:Ie.y>qe.y?Ie.y:qe.y,Ht=x1(it,dt,z,Z,le),Yt=x1(St,Rt,z,Z,le),Zt=S.prevZ,cn=S.nextZ;Zt&&Zt.z>=Ht&&cn&&cn.z<=Yt;){if(Zt!==S.prev&&Zt!==S.next&&df(ke.x,ke.y,Ie.x,Ie.y,qe.x,qe.y,Zt.x,Zt.y)&&Ta(Zt.prev,Zt,Zt.next)>=0||(Zt=Zt.prevZ,cn!==S.prev&&cn!==S.next&&df(ke.x,ke.y,Ie.x,Ie.y,qe.x,qe.y,cn.x,cn.y)&&Ta(cn.prev,cn,cn.next)>=0))return!1;cn=cn.nextZ}for(;Zt&&Zt.z>=Ht;){if(Zt!==S.prev&&Zt!==S.next&&df(ke.x,ke.y,Ie.x,Ie.y,qe.x,qe.y,Zt.x,Zt.y)&&Ta(Zt.prev,Zt,Zt.next)>=0)return!1;Zt=Zt.prevZ}for(;cn&&cn.z<=Yt;){if(cn!==S.prev&&cn!==S.next&&df(ke.x,ke.y,Ie.x,Ie.y,qe.x,qe.y,cn.x,cn.y)&&Ta(cn.prev,cn,cn.next)>=0)return!1;cn=cn.nextZ}return!0}function r5(S,z,Z){var le=S;do{var ke=le.prev,Ie=le.next.next;!td(ke,Ie)&&uy(ke,le,le.next,Ie)&&yh(ke,Ie)&&yh(Ie,ke)&&(z.push(ke.i/Z),z.push(le.i/Z),z.push(Ie.i/Z),xh(le),xh(le.next),le=S=Ie),le=le.next}while(le!==S);return Yu(le)}function i5(S,z,Z,le,ke,Ie){var qe=S;do{for(var it=qe.next.next;it!==qe.prev;){if(qe.i!==it.i&&u5(qe,it)){var dt=cy(qe,it);return qe=Yu(qe,qe.next),dt=Yu(dt,dt.next),mh(qe,z,Z,le,ke,Ie),void mh(dt,z,Z,le,ke,Ie)}it=it.next}qe=qe.next}while(qe!==S)}function a5(S,z){return S.x-z.x}function o5(S,z){if(z=function(le,ke){var Ie,qe=ke,it=le.x,dt=le.y,St=-1/0;do{if(dt<=qe.y&&dt>=qe.next.y&&qe.next.y!==qe.y){var Rt=qe.x+(dt-qe.y)*(qe.next.x-qe.x)/(qe.next.y-qe.y);if(Rt<=it&&Rt>St){if(St=Rt,Rt===it){if(dt===qe.y)return qe;if(dt===qe.next.y)return qe.next}Ie=qe.x=qe.x&&qe.x>=Zt&&it!==qe.x&&df(dtIe.x||qe.x===Ie.x&&s5(Ie,qe)))&&(Ie=qe,Tn=Ht)),qe=qe.next;while(qe!==Yt);return Ie}(S,z)){var Z=cy(z,S);Yu(z,z.next),Yu(Z,Z.next)}}function s5(S,z){return Ta(S.prev,S,z.prev)<0&&Ta(z.next,S,S.next)<0}function x1(S,z,Z,le,ke){return(S=1431655765&((S=858993459&((S=252645135&((S=16711935&((S=32767*(S-Z)*ke)|S<<8))|S<<4))|S<<2))|S<<1))|(z=1431655765&((z=858993459&((z=252645135&((z=16711935&((z=32767*(z-le)*ke)|z<<8))|z<<4))|z<<2))|z<<1))<<1}function l5(S){var z=S,Z=S;do(z.x=0&&(S-qe)*(le-it)-(Z-qe)*(z-it)>=0&&(Z-qe)*(Ie-it)-(ke-qe)*(le-it)>=0}function u5(S,z){return S.next.i!==z.i&&S.prev.i!==z.i&&!function(Z,le){var ke=Z;do{if(ke.i!==Z.i&&ke.next.i!==Z.i&&ke.i!==le.i&&ke.next.i!==le.i&&uy(ke,ke.next,Z,le))return!0;ke=ke.next}while(ke!==Z);return!1}(S,z)&&(yh(S,z)&&yh(z,S)&&function(Z,le){var ke=Z,Ie=!1,qe=(Z.x+le.x)/2,it=(Z.y+le.y)/2;do ke.y>it!=ke.next.y>it&&ke.next.y!==ke.y&&qe<(ke.next.x-ke.x)*(it-ke.y)/(ke.next.y-ke.y)+ke.x&&(Ie=!Ie),ke=ke.next;while(ke!==Z);return Ie}(S,z)&&(Ta(S.prev,S,z.prev)||Ta(S,z.prev,z))||td(S,z)&&Ta(S.prev,S,S.next)>0&&Ta(z.prev,z,z.next)>0)}function Ta(S,z,Z){return(z.y-S.y)*(Z.x-z.x)-(z.x-S.x)*(Z.y-z.y)}function td(S,z){return S.x===z.x&&S.y===z.y}function uy(S,z,Z,le){var ke=rd(Ta(S,z,Z)),Ie=rd(Ta(S,z,le)),qe=rd(Ta(Z,le,S)),it=rd(Ta(Z,le,z));return ke!==Ie&&qe!==it||!(ke!==0||!nd(S,Z,z))||!(Ie!==0||!nd(S,le,z))||!(qe!==0||!nd(Z,S,le))||!(it!==0||!nd(Z,z,le))}function nd(S,z,Z){return z.x<=Math.max(S.x,Z.x)&&z.x>=Math.min(S.x,Z.x)&&z.y<=Math.max(S.y,Z.y)&&z.y>=Math.min(S.y,Z.y)}function rd(S){return S>0?1:S<0?-1:0}function yh(S,z){return Ta(S.prev,S,S.next)<0?Ta(S,z,S.next)>=0&&Ta(S,S.prev,z)>=0:Ta(S,z,S.prev)<0||Ta(S,S.next,z)<0}function cy(S,z){var Z=new b1(S.i,S.x,S.y),le=new b1(z.i,z.x,z.y),ke=S.next,Ie=z.prev;return S.next=z,z.prev=S,Z.next=ke,ke.prev=Z,le.next=Z,Z.prev=le,Ie.next=le,le.prev=Ie,le}function fy(S,z,Z,le){var ke=new b1(S,z,Z);return le?(ke.next=le.next,ke.prev=le,le.next.prev=ke,le.next=ke):(ke.prev=ke,ke.next=ke),ke}function xh(S){S.next.prev=S.prev,S.prev.next=S.next,S.prevZ&&(S.prevZ.nextZ=S.nextZ),S.nextZ&&(S.nextZ.prevZ=S.prevZ)}function b1(S,z,Z){this.i=S,this.x=z,this.y=Z,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function _1(S,z,Z,le){for(var ke=0,Ie=z,qe=Z-le;IeZ;){if(le-Z>600){var Ie=le-Z+1,qe=z-Z+1,it=Math.log(Ie),dt=.5*Math.exp(2*it/3),St=.5*Math.sqrt(it*dt*(Ie-dt)/Ie)*(qe-Ie/2<0?-1:1);hy(S,z,Math.max(Z,Math.floor(z-qe*dt/Ie+St)),Math.min(le,Math.floor(z+(Ie-qe)*dt/Ie+St)),ke)}var Rt=S[z],Ht=Z,Yt=le;for(bh(S,Z,z),ke(S[le],Rt)>0&&bh(S,Z,le);Ht0;)Yt--}ke(S[Z],Rt)===0?bh(S,Z,Yt):bh(S,++Yt,le),Yt<=z&&(Z=Yt+1),z<=Yt&&(le=Yt-1)}}function bh(S,z,Z){var le=S[z];S[z]=S[Z],S[Z]=le}function f5(S,z){return Sz?1:0}function w1(S,z){var Z=S.length;if(Z<=1)return[S];for(var le,ke,Ie=[],qe=0;qe1)for(var dt=0;dt0&&(le+=S[ke-1].length,Z.holes.push(le))}return Z},y1.default=e5;var Pl=function(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(function(z){return z.id}),this.index=S.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new et,this.indexArray=new He,this.indexArray2=new ve,this.programConfigurations=new qi(sy,S.layers,S.zoom),this.segments=new sn,this.segments2=new sn,this.stateDependentLayerIds=this.layers.filter(function(z){return z.isStateDependent()}).map(function(z){return z.id})};Pl.prototype.populate=function(S,z,Z){this.hasPattern=T1("fill",this.layers,z);for(var le=this.layers[0].layout.get("fill-sort-key"),ke=[],Ie=0,qe=S;Ie>3}if(ke--,le===1||le===2)Ie+=S.readSVarint(),qe+=S.readSVarint(),le===1&&(z&&it.push(z),z=[]),z.push(new t(Ie,qe));else{if(le!==7)throw new Error("unknown command "+le);z&&z.push(z[0].clone())}}return z&&it.push(z),it},gf.prototype.bbox=function(){var S=this._pbf;S.pos=this._geometry;for(var z=S.readVarint()+S.pos,Z=1,le=0,ke=0,Ie=0,qe=1/0,it=-1/0,dt=1/0,St=-1/0;S.pos>3}if(le--,Z===1||Z===2)(ke+=S.readSVarint())it&&(it=ke),(Ie+=S.readSVarint())St&&(St=Ie);else if(Z!==7)throw new Error("unknown command "+Z)}return[qe,dt,it,St]},gf.prototype.toGeoJSON=function(S,z,Z){var le,ke,Ie=this.extent*Math.pow(2,Z),qe=this.extent*S,it=this.extent*z,dt=this.loadGeometry(),St=gf.types[this.type];function Rt(Zt){for(var cn=0;cn>3;ke=qe===1?le.readString():qe===2?le.readFloat():qe===3?le.readDouble():qe===4?le.readVarint64():qe===5?le.readVarint():qe===6?le.readSVarint():qe===7?le.readBoolean():null}return ke}(Z))}function x5(S,z,Z){if(S===3){var le=new gy(Z,Z.readVarint()+Z.pos);le.length&&(z[le.name]=le)}}vy.prototype.feature=function(S){if(S<0||S>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[S];var z=this._pbf.readVarint()+this._pbf.pos;return new dy(this._pbf,z,this.extent,this._keys,this._values)};var vf={VectorTile:function(S,z){this.layers=S.readFields(x5,{},z)},VectorTileFeature:dy,VectorTileLayer:gy},b5=vf.VectorTileFeature.types,A1=Math.pow(2,13);function _h(S,z,Z,le,ke,Ie,qe,it){S.emplaceBack(z,Z,2*Math.floor(le*A1)+qe,ke*A1*2,Ie*A1*2,Math.round(it))}var Ol=function(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(function(z){return z.id}),this.index=S.index,this.hasPattern=!1,this.layoutVertexArray=new ct,this.indexArray=new He,this.programConfigurations=new qi(py,S.layers,S.zoom),this.segments=new sn,this.stateDependentLayerIds=this.layers.filter(function(z){return z.isStateDependent()}).map(function(z){return z.id})};function _5(S,z){return S.x===z.x&&(S.x<0||S.x>Yr)||S.y===z.y&&(S.y<0||S.y>Yr)}Ol.prototype.populate=function(S,z,Z){this.features=[],this.hasPattern=T1("fill-extrusion",this.layers,z);for(var le=0,ke=S;leYr})||si.every(function(Qr){return Qr.y<0})||si.every(function(Qr){return Qr.y>Yr})))for(var Tn=0,Fn=0;Fn=1){var Gn=cn[Fn-1];if(!_5(Dn,Gn)){Ht.vertexLength+4>sn.MAX_VERTEX_ARRAY_LENGTH&&(Ht=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var Yn=Dn.sub(Gn)._perp()._unit(),Kn=Gn.dist(Dn);Tn+Kn>32768&&(Tn=0),_h(this.layoutVertexArray,Dn.x,Dn.y,Yn.x,Yn.y,0,0,Tn),_h(this.layoutVertexArray,Dn.x,Dn.y,Yn.x,Yn.y,0,1,Tn),Tn+=Kn,_h(this.layoutVertexArray,Gn.x,Gn.y,Yn.x,Yn.y,0,0,Tn),_h(this.layoutVertexArray,Gn.x,Gn.y,Yn.x,Yn.y,0,1,Tn);var ar=Ht.vertexLength;this.indexArray.emplaceBack(ar,ar+2,ar+1),this.indexArray.emplaceBack(ar+1,ar+2,ar+3),Ht.vertexLength+=4,Ht.primitiveLength+=2}}}}if(Ht.vertexLength+dt>sn.MAX_VERTEX_ARRAY_LENGTH&&(Ht=this.segments.prepareSegment(dt,this.layoutVertexArray,this.indexArray)),b5[S.type]==="Polygon"){for(var ur=[],Er=[],br=Ht.vertexLength,Ir=0,Br=it;Ir=2&&S[dt-1].equals(S[dt-2]);)dt--;for(var St=0;St0;if(Er&&Dn>St){var Ir=Rt.dist(Zt);if(Ir>2*Ht){var Br=Rt.sub(Rt.sub(Zt)._mult(Ht/Ir)._round());this.updateDistance(Zt,Br),this.addCurrentVertex(Br,Tn,0,0,Yt),Zt=Br}}var $r=Zt&&cn,jr=$r?Z:it?"butt":le;if($r&&jr==="round"&&(arke&&(jr="bevel"),jr==="bevel"&&(ar>2&&(jr="flipbevel"),ar100)Gn=Fn.mult(-1);else{var Xr=ar*Tn.add(Fn).mag()/Tn.sub(Fn).mag();Gn._perp()._mult(Xr*(br?-1:1))}this.addCurrentVertex(Rt,Gn,0,0,Yt),this.addCurrentVertex(Rt,Gn.mult(-1),0,0,Yt)}else if(jr==="bevel"||jr==="fakeround"){var Vr=-Math.sqrt(ar*ar-1),Nr=br?Vr:0,si=br?0:Vr;if(Zt&&this.addCurrentVertex(Rt,Tn,Nr,si,Yt),jr==="fakeround")for(var Qr=Math.round(180*ur/Math.PI/20),Di=1;Di2*Ht){var Fi=Rt.add(cn.sub(Rt)._mult(Ht/Wi)._round());this.updateDistance(Rt,Fi),this.addCurrentVertex(Fi,Fn,0,0,Yt),Rt=Fi}}}}},jo.prototype.addCurrentVertex=function(S,z,Z,le,ke,Ie){Ie===void 0&&(Ie=!1);var qe=z.x+z.y*Z,it=z.y-z.x*Z,dt=-z.x+z.y*le,St=-z.y-z.x*le;this.addHalfVertex(S,qe,it,Ie,!1,Z,ke),this.addHalfVertex(S,dt,St,Ie,!0,-le,ke),this.distance>xy/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(S,z,Z,le,ke,Ie))},jo.prototype.addHalfVertex=function(S,z,Z,le,ke,Ie,qe){var it=S.x,dt=S.y,St=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((it<<1)+(le?1:0),(dt<<1)+(ke?1:0),Math.round(63*z)+128,Math.round(63*Z)+128,1+(Ie===0?0:Ie<0?-1:1)|(63&St)<<2,St>>6);var Rt=qe.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Rt),qe.primitiveLength++),ke?this.e2=Rt:this.e1=Rt},jo.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(xy-1):this.distance},jo.prototype.updateDistance=function(S,z){this.distance+=S.dist(z),this.updateScaledDistance()},Cr("LineBucket",jo,{omit:["layers","patternFeatures"]});var M5=new _a({"line-cap":new Fr(Oe.layout_line["line-cap"]),"line-join":new Ur(Oe.layout_line["line-join"]),"line-miter-limit":new Fr(Oe.layout_line["line-miter-limit"]),"line-round-limit":new Fr(Oe.layout_line["line-round-limit"]),"line-sort-key":new Ur(Oe.layout_line["line-sort-key"])}),by={paint:new _a({"line-opacity":new Ur(Oe.paint_line["line-opacity"]),"line-color":new Ur(Oe.paint_line["line-color"]),"line-translate":new Fr(Oe.paint_line["line-translate"]),"line-translate-anchor":new Fr(Oe.paint_line["line-translate-anchor"]),"line-width":new Ur(Oe.paint_line["line-width"]),"line-gap-width":new Ur(Oe.paint_line["line-gap-width"]),"line-offset":new Ur(Oe.paint_line["line-offset"]),"line-blur":new Ur(Oe.paint_line["line-blur"]),"line-dasharray":new is(Oe.paint_line["line-dasharray"]),"line-pattern":new sl(Oe.paint_line["line-pattern"]),"line-gradient":new To(Oe.paint_line["line-gradient"])}),layout:M5},S5=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.possiblyEvaluate=function(Z,le){return le=new di(Math.floor(le.zoom),{now:le.now,fadeDuration:le.fadeDuration,zoomHistory:le.zoomHistory,transition:le.transition}),S.prototype.possiblyEvaluate.call(this,Z,le)},z.prototype.evaluate=function(Z,le,ke,Ie){return le=u({},le,{zoom:Math.floor(le.zoom)}),S.prototype.evaluate.call(this,Z,le,ke,Ie)},z}(Ur),_y=new S5(by.paint.properties["line-width"].specification);_y.useIntegerZoom=!0;var E5=function(S){function z(Z){S.call(this,Z,by)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._handleSpecialPaintPropertyUpdate=function(Z){Z==="line-gradient"&&this._updateGradient()},z.prototype._updateGradient=function(){var Z=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=oy(Z,"lineProgress"),this.gradientTexture=null},z.prototype.recalculate=function(Z,le){S.prototype.recalculate.call(this,Z,le),this.paint._values["line-floorwidth"]=_y.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,Z)},z.prototype.createBucket=function(Z){return new jo(Z)},z.prototype.queryRadius=function(Z){var le=Z,ke=wy(ku("line-width",this,le),ku("line-gap-width",this,le)),Ie=ku("line-offset",this,le);return ke/2+Math.abs(Ie)+$p(this.paint.get("line-translate"))},z.prototype.queryIntersectsFeature=function(Z,le,ke,Ie,qe,it,dt){var St=Jp(Z,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),it.angle,dt),Rt=dt/2*wy(this.paint.get("line-width").evaluate(le,ke),this.paint.get("line-gap-width").evaluate(le,ke)),Ht=this.paint.get("line-offset").evaluate(le,ke);return Ht&&(Ie=function(Yt,Zt){for(var cn=[],Tn=new t(0,0),Fn=0;Fn=3){for(var Dn=0;Dn0?z+2*S:S}var M1=Si([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),C5=Si([{name:"a_projected_pos",components:3,type:"Float32"}],4),L5=(Si([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Si([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Ty=(Si([{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"}]),Si([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),P5=Si([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function O5(S,z,Z){return S.sections.forEach(function(le){le.text=function(ke,Ie,qe){var it=Ie.layout.get("text-transform").evaluate(qe,{});return it==="uppercase"?ke=ke.toLocaleUpperCase():it==="lowercase"&&(ke=ke.toLocaleLowerCase()),za.applyArabicShaping&&(ke=za.applyArabicShaping(ke)),ke}(le.text,z,Z)}),S}Si([{name:"triangle",components:3,type:"Uint16"}]),Si([{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"}]),Si([{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"}]),Si([{type:"Float32",name:"offsetX"}]),Si([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Th={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},no=24,ky=function(S,z,Z,le,ke){var Ie,qe,it=8*ke-le-1,dt=(1<>1,Rt=-7,Ht=Z?ke-1:0,Yt=Z?-1:1,Zt=S[z+Ht];for(Ht+=Yt,Ie=Zt&(1<<-Rt)-1,Zt>>=-Rt,Rt+=it;Rt>0;Ie=256*Ie+S[z+Ht],Ht+=Yt,Rt-=8);for(qe=Ie&(1<<-Rt)-1,Ie>>=-Rt,Rt+=le;Rt>0;qe=256*qe+S[z+Ht],Ht+=Yt,Rt-=8);if(Ie===0)Ie=1-St;else{if(Ie===dt)return qe?NaN:1/0*(Zt?-1:1);qe+=Math.pow(2,le),Ie-=St}return(Zt?-1:1)*qe*Math.pow(2,Ie-le)},Ay=function(S,z,Z,le,ke,Ie){var qe,it,dt,St=8*Ie-ke-1,Rt=(1<>1,Yt=ke===23?Math.pow(2,-24)-Math.pow(2,-77):0,Zt=le?0:Ie-1,cn=le?1:-1,Tn=z<0||z===0&&1/z<0?1:0;for(z=Math.abs(z),isNaN(z)||z===1/0?(it=isNaN(z)?1:0,qe=Rt):(qe=Math.floor(Math.log(z)/Math.LN2),z*(dt=Math.pow(2,-qe))<1&&(qe--,dt*=2),(z+=qe+Ht>=1?Yt/dt:Yt*Math.pow(2,1-Ht))*dt>=2&&(qe++,dt/=2),qe+Ht>=Rt?(it=0,qe=Rt):qe+Ht>=1?(it=(z*dt-1)*Math.pow(2,ke),qe+=Ht):(it=z*Math.pow(2,Ht-1)*Math.pow(2,ke),qe=0));ke>=8;S[Z+Zt]=255&it,Zt+=cn,it/=256,ke-=8);for(qe=qe<0;S[Z+Zt]=255&qe,Zt+=cn,qe/=256,St-=8);S[Z+Zt-cn]|=128*Tn},id=Ni;function Ni(S){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(S)?S:new Uint8Array(S||0),this.pos=0,this.type=0,this.length=this.buf.length}Ni.Varint=0,Ni.Fixed64=1,Ni.Bytes=2,Ni.Fixed32=5;var S1=4294967296,My=1/S1,Sy=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function Au(S){return S.type===Ni.Bytes?S.readVarint()+S.pos:S.pos+1}function mf(S,z,Z){return Z?4294967296*z+(S>>>0):4294967296*(z>>>0)+(S>>>0)}function Ey(S,z,Z){var le=z<=16383?1:z<=2097151?2:z<=268435455?3:Math.floor(Math.log(z)/(7*Math.LN2));Z.realloc(le);for(var ke=Z.pos-1;ke>=S;ke--)Z.buf[ke+le]=Z.buf[ke]}function I5(S,z){for(var Z=0;Z>>8,S[Z+2]=z>>>16,S[Z+3]=z>>>24}function Cy(S,z){return(S[z]|S[z+1]<<8|S[z+2]<<16)+(S[z+3]<<24)}Ni.prototype={destroy:function(){this.buf=null},readFields:function(S,z,Z){for(Z=Z||this.length;this.pos>3,Ie=this.pos;this.type=7&le,S(ke,z,this),this.pos===Ie&&this.skip(le)}return z},readMessage:function(S,z){return this.readFields(S,z,this.readVarint()+this.pos)},readFixed32:function(){var S=ad(this.buf,this.pos);return this.pos+=4,S},readSFixed32:function(){var S=Cy(this.buf,this.pos);return this.pos+=4,S},readFixed64:function(){var S=ad(this.buf,this.pos)+ad(this.buf,this.pos+4)*S1;return this.pos+=8,S},readSFixed64:function(){var S=ad(this.buf,this.pos)+Cy(this.buf,this.pos+4)*S1;return this.pos+=8,S},readFloat:function(){var S=ky(this.buf,this.pos,!0,23,4);return this.pos+=4,S},readDouble:function(){var S=ky(this.buf,this.pos,!0,52,8);return this.pos+=8,S},readVarint:function(S){var z,Z,le=this.buf;return z=127&(Z=le[this.pos++]),Z<128?z:(z|=(127&(Z=le[this.pos++]))<<7,Z<128?z:(z|=(127&(Z=le[this.pos++]))<<14,Z<128?z:(z|=(127&(Z=le[this.pos++]))<<21,Z<128?z:function(ke,Ie,qe){var it,dt,St=qe.buf;if(it=(112&(dt=St[qe.pos++]))>>4,dt<128||(it|=(127&(dt=St[qe.pos++]))<<3,dt<128)||(it|=(127&(dt=St[qe.pos++]))<<10,dt<128)||(it|=(127&(dt=St[qe.pos++]))<<17,dt<128)||(it|=(127&(dt=St[qe.pos++]))<<24,dt<128)||(it|=(1&(dt=St[qe.pos++]))<<31,dt<128))return mf(ke,it,Ie);throw new Error("Expected varint not more than 10 bytes")}(z|=(15&(Z=le[this.pos]))<<28,S,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var S=this.readVarint();return S%2==1?(S+1)/-2:S/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var S=this.readVarint()+this.pos,z=this.pos;return this.pos=S,S-z>=12&&Sy?function(Z,le,ke){return Sy.decode(Z.subarray(le,ke))}(this.buf,z,S):function(Z,le,ke){for(var Ie="",qe=le;qe239?4:Rt>223?3:Rt>191?2:1;if(qe+Yt>ke)break;Yt===1?Rt<128&&(Ht=Rt):Yt===2?(192&(it=Z[qe+1]))==128&&(Ht=(31&Rt)<<6|63&it)<=127&&(Ht=null):Yt===3?(it=Z[qe+1],dt=Z[qe+2],(192&it)==128&&(192&dt)==128&&((Ht=(15&Rt)<<12|(63&it)<<6|63&dt)<=2047||Ht>=55296&&Ht<=57343)&&(Ht=null)):Yt===4&&(it=Z[qe+1],dt=Z[qe+2],St=Z[qe+3],(192&it)==128&&(192&dt)==128&&(192&St)==128&&((Ht=(15&Rt)<<18|(63&it)<<12|(63&dt)<<6|63&St)<=65535||Ht>=1114112)&&(Ht=null)),Ht===null?(Ht=65533,Yt=1):Ht>65535&&(Ht-=65536,Ie+=String.fromCharCode(Ht>>>10&1023|55296),Ht=56320|1023&Ht),Ie+=String.fromCharCode(Ht),qe+=Yt}return Ie}(this.buf,z,S)},readBytes:function(){var S=this.readVarint()+this.pos,z=this.buf.subarray(this.pos,S);return this.pos=S,z},readPackedVarint:function(S,z){if(this.type!==Ni.Bytes)return S.push(this.readVarint(z));var Z=Au(this);for(S=S||[];this.pos127;);else if(z===Ni.Bytes)this.pos=this.readVarint()+this.pos;else if(z===Ni.Fixed32)this.pos+=4;else{if(z!==Ni.Fixed64)throw new Error("Unimplemented type: "+z);this.pos+=8}},writeTag:function(S,z){this.writeVarint(S<<3|z)},realloc:function(S){for(var z=this.length||16;z268435455||S<0?function(z,Z){var le,ke;if(z>=0?(le=z%4294967296|0,ke=z/4294967296|0):(ke=~(-z/4294967296),4294967295^(le=~(-z%4294967296))?le=le+1|0:(le=0,ke=ke+1|0)),z>=18446744073709552e3||z<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");Z.realloc(10),function(Ie,qe,it){it.buf[it.pos++]=127&Ie|128,Ie>>>=7,it.buf[it.pos++]=127&Ie|128,Ie>>>=7,it.buf[it.pos++]=127&Ie|128,Ie>>>=7,it.buf[it.pos++]=127&Ie|128,Ie>>>=7,it.buf[it.pos]=127&Ie}(le,0,Z),function(Ie,qe){var it=(7&Ie)<<4;qe.buf[qe.pos++]|=it|((Ie>>>=3)?128:0),Ie&&(qe.buf[qe.pos++]=127&Ie|((Ie>>>=7)?128:0),Ie&&(qe.buf[qe.pos++]=127&Ie|((Ie>>>=7)?128:0),Ie&&(qe.buf[qe.pos++]=127&Ie|((Ie>>>=7)?128:0),Ie&&(qe.buf[qe.pos++]=127&Ie|((Ie>>>=7)?128:0),Ie&&(qe.buf[qe.pos++]=127&Ie)))))}(ke,Z)}(S,this):(this.realloc(4),this.buf[this.pos++]=127&S|(S>127?128:0),S<=127||(this.buf[this.pos++]=127&(S>>>=7)|(S>127?128:0),S<=127||(this.buf[this.pos++]=127&(S>>>=7)|(S>127?128:0),S<=127||(this.buf[this.pos++]=S>>>7&127))))},writeSVarint:function(S){this.writeVarint(S<0?2*-S-1:2*S)},writeBoolean:function(S){this.writeVarint(!!S)},writeString:function(S){S=String(S),this.realloc(4*S.length),this.pos++;var z=this.pos;this.pos=function(le,ke,Ie){for(var qe,it,dt=0;dt55295&&qe<57344){if(!it){qe>56319||dt+1===ke.length?(le[Ie++]=239,le[Ie++]=191,le[Ie++]=189):it=qe;continue}if(qe<56320){le[Ie++]=239,le[Ie++]=191,le[Ie++]=189,it=qe;continue}qe=it-55296<<10|qe-56320|65536,it=null}else it&&(le[Ie++]=239,le[Ie++]=191,le[Ie++]=189,it=null);qe<128?le[Ie++]=qe:(qe<2048?le[Ie++]=qe>>6|192:(qe<65536?le[Ie++]=qe>>12|224:(le[Ie++]=qe>>18|240,le[Ie++]=qe>>12&63|128),le[Ie++]=qe>>6&63|128),le[Ie++]=63&qe|128)}return Ie}(this.buf,S,this.pos);var Z=this.pos-z;Z>=128&&Ey(z,Z,this),this.pos=z-1,this.writeVarint(Z),this.pos+=Z},writeFloat:function(S){this.realloc(4),Ay(this.buf,S,this.pos,!0,23,4),this.pos+=4},writeDouble:function(S){this.realloc(8),Ay(this.buf,S,this.pos,!0,52,8),this.pos+=8},writeBytes:function(S){var z=S.length;this.writeVarint(z),this.realloc(z);for(var Z=0;Z=128&&Ey(Z,le,this),this.pos=Z-1,this.writeVarint(le),this.pos+=le},writeMessage:function(S,z,Z){this.writeTag(S,Ni.Bytes),this.writeRawMessage(z,Z)},writePackedVarint:function(S,z){z.length&&this.writeMessage(S,I5,z)},writePackedSVarint:function(S,z){z.length&&this.writeMessage(S,R5,z)},writePackedBoolean:function(S,z){z.length&&this.writeMessage(S,F5,z)},writePackedFloat:function(S,z){z.length&&this.writeMessage(S,z5,z)},writePackedDouble:function(S,z){z.length&&this.writeMessage(S,D5,z)},writePackedFixed32:function(S,z){z.length&&this.writeMessage(S,B5,z)},writePackedSFixed32:function(S,z){z.length&&this.writeMessage(S,N5,z)},writePackedFixed64:function(S,z){z.length&&this.writeMessage(S,j5,z)},writePackedSFixed64:function(S,z){z.length&&this.writeMessage(S,U5,z)},writeBytesField:function(S,z){this.writeTag(S,Ni.Bytes),this.writeBytes(z)},writeFixed32Field:function(S,z){this.writeTag(S,Ni.Fixed32),this.writeFixed32(z)},writeSFixed32Field:function(S,z){this.writeTag(S,Ni.Fixed32),this.writeSFixed32(z)},writeFixed64Field:function(S,z){this.writeTag(S,Ni.Fixed64),this.writeFixed64(z)},writeSFixed64Field:function(S,z){this.writeTag(S,Ni.Fixed64),this.writeSFixed64(z)},writeVarintField:function(S,z){this.writeTag(S,Ni.Varint),this.writeVarint(z)},writeSVarintField:function(S,z){this.writeTag(S,Ni.Varint),this.writeSVarint(z)},writeStringField:function(S,z){this.writeTag(S,Ni.Bytes),this.writeString(z)},writeFloatField:function(S,z){this.writeTag(S,Ni.Fixed32),this.writeFloat(z)},writeDoubleField:function(S,z){this.writeTag(S,Ni.Fixed64),this.writeDouble(z)},writeBooleanField:function(S,z){this.writeVarintField(S,!!z)}};function V5(S,z,Z){S===1&&Z.readMessage(H5,z)}function H5(S,z,Z){if(S===3){var le=Z.readMessage(q5,{}),ke=le.id,Ie=le.bitmap,qe=le.width,it=le.height,dt=le.left,St=le.top,Rt=le.advance;z.push({id:ke,bitmap:new Pc({width:qe+6,height:it+6},Ie),metrics:{width:qe,height:it,left:dt,top:St,advance:Rt}})}}function q5(S,z,Z){S===1?z.id=Z.readVarint():S===2?z.bitmap=Z.readBytes():S===3?z.width=Z.readVarint():S===4?z.height=Z.readVarint():S===5?z.left=Z.readSVarint():S===6?z.top=Z.readSVarint():S===7&&(z.advance=Z.readVarint())}function Ly(S){for(var z=0,Z=0,le=0,ke=S;le=0;Yt--){var Zt=qe[Yt];if(!(Ht.w>Zt.w||Ht.h>Zt.h)){if(Ht.x=Zt.x,Ht.y=Zt.y,dt=Math.max(dt,Ht.y+Ht.h),it=Math.max(it,Ht.x+Ht.w),Ht.w===Zt.w&&Ht.h===Zt.h){var cn=qe.pop();Yt0&&zc>Ji&&(Ji=zc)}else{var yd=Qr[mi.fontStack],Dc=yd&&yd[Mo];if(Dc&&Dc.rect)Il=Dc.rect,vo=Dc.metrics;else{var xd=si[mi.fontStack],Eh=xd&&xd[Mo];if(!Eh)continue;vo=Eh.metrics}ss=(ei-mi.scale)*no}Rl?(Nr.verticalizable=!0,Ri.push({glyph:Mo,imageName:Eu,x:ja,y:ro+ss,vertical:Rl,scale:mi.scale,fontStack:mi.fontStack,sectionIndex:ia,metrics:vo,rect:Il}),ja+=Va*mi.scale+Fi):(Ri.push({glyph:Mo,imageName:Eu,x:ja,y:ro+ss,vertical:Rl,scale:mi.scale,fontStack:mi.fontStack,sectionIndex:ia,metrics:vo,rect:Il}),ja+=vo.advance*mi.scale+Fi)}if(Ri.length!==0){var B1=ja-Fi;Za=Math.max(B1,Za),W5(Ri,0,Ri.length-1,Ya,Ji)}ja=0;var bd=Pi*ei+Ji;ra.lineOffset=Math.max(Ji,pi),ro+=bd,Ao=Math.max(bd,Ao),++Ea}else ro+=Pi,++Ea}var Sf=ro-sd,_d=C1(ji),wd=_d.horizontalAlign,Ch=_d.verticalAlign;(function(N1,Lh,Fc,Ef,Td,kd,Cf,Ad,Md){var Ph=(Lh-Fc)*Td,Oh=0;Oh=kd!==Cf?-Ad*Ef-sd:(-Ef*Md+.5)*Cf;for(var Bc=0,Ih=N1;Bc=0&&le>=S&&ud[this.text.charCodeAt(le)];le--)Z--;this.text=this.text.substring(S,Z),this.sectionIndex=this.sectionIndex.slice(S,Z)},go.prototype.substring=function(S,z){var Z=new go;return Z.text=this.text.substring(S,z),Z.sectionIndex=this.sectionIndex.slice(S,z),Z.sections=this.sections,Z},go.prototype.toString=function(){return this.text},go.prototype.getMaxScale=function(){var S=this;return this.sectionIndex.reduce(function(z,Z){return Math.max(z,S.sections[Z].scale)},0)},go.prototype.addTextSection=function(S,z){this.text+=S.text,this.sections.push(xf.forText(S.scale,S.fontStack||z));for(var Z=this.sections.length-1,le=0;le=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var ud={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},os={};function Py(S,z,Z,le,ke,Ie){if(z.imageName){var qe=le[z.imageName];return qe?qe.displaySize[0]*z.scale*no/Ie+ke:0}var it=Z[z.fontStack],dt=it&&it[S];return dt?dt.metrics.advance*z.scale+ke:0}function Oy(S,z,Z,le){var ke=Math.pow(S-z,2);return le?S=0,Rt=0,Ht=0;Ht-Z/2;){if(--qe<0)return!1;it-=S[qe].dist(Ie),Ie=S[qe]}it+=S[qe].dist(S[qe+1]),qe++;for(var dt=[],St=0;itle;)St-=dt.shift().angleDelta;if(St>ke)return!1;qe++,it+=Ht.dist(Yt)}return!0}function Ny(S){for(var z=0,Z=0;ZSt){var cn=(St-dt)/Zt,Tn=Lr(Ht.x,Yt.x,cn),Fn=Lr(Ht.y,Yt.y,cn),Dn=new bf(Tn,Fn,Yt.angleTo(Ht),Rt);return Dn._round(),!qe||By(S,Dn,it,qe,z)?Dn:void 0}dt+=Zt}}function X5(S,z,Z,le,ke,Ie,qe,it,dt){var St=jy(le,Ie,qe),Rt=Uy(le,ke),Ht=Rt*qe,Yt=S[0].x===0||S[0].x===dt||S[0].y===0||S[0].y===dt;return z-Ht=0&&Kn=0&&ar=0&&Yt+St<=Rt){var ur=new bf(Kn,ar,Gn,cn);ur._round(),le&&!By(S,ur,Ie,le,ke)||Zt.push(ur)}}Ht+=Dn}return it||Zt.length||qe||(Zt=Vy(S,Ht/2,Z,le,ke,Ie,qe,!0,dt)),Zt}function Hy(S,z,Z,le,ke){for(var Ie=[],qe=0;qe=le&&Ht.x>=le||(Rt.x>=le?Rt=new t(le,Rt.y+(Ht.y-Rt.y)*((le-Rt.x)/(Ht.x-Rt.x)))._round():Ht.x>=le&&(Ht=new t(le,Rt.y+(Ht.y-Rt.y)*((le-Rt.x)/(Ht.x-Rt.x)))._round()),Rt.y>=ke&&Ht.y>=ke||(Rt.y>=ke?Rt=new t(Rt.x+(Ht.x-Rt.x)*((ke-Rt.y)/(Ht.y-Rt.y)),ke)._round():Ht.y>=ke&&(Ht=new t(Rt.x+(Ht.x-Rt.x)*((ke-Rt.y)/(Ht.y-Rt.y)),ke)._round()),dt&&Rt.equals(dt[dt.length-1])||(dt=[Rt],Ie.push(dt)),dt.push(Ht)))))}return Ie}function qy(S,z,Z,le){var ke=[],Ie=S.image,qe=Ie.pixelRatio,it=Ie.paddedRect.w-2,dt=Ie.paddedRect.h-2,St=S.right-S.left,Rt=S.bottom-S.top,Ht=Ie.stretchX||[[0,it]],Yt=Ie.stretchY||[[0,dt]],Zt=function(Pi,ji){return Pi+ji[1]-ji[0]},cn=Ht.reduce(Zt,0),Tn=Yt.reduce(Zt,0),Fn=it-cn,Dn=dt-Tn,Gn=0,Yn=cn,Kn=0,ar=Tn,ur=0,Er=Fn,br=0,Ir=Dn;if(Ie.content&&le){var Br=Ie.content;Gn=cd(Ht,0,Br[0]),Kn=cd(Yt,0,Br[1]),Yn=cd(Ht,Br[0],Br[2]),ar=cd(Yt,Br[1],Br[3]),ur=Br[0]-Gn,br=Br[1]-Kn,Er=Br[2]-Br[0]-Yn,Ir=Br[3]-Br[1]-ar}var $r=function(Pi,ji,Vi,Wi){var Fi=fd(Pi.stretch-Gn,Yn,St,S.left),Ma=hd(Pi.fixed-ur,Er,Pi.stretch,cn),Xi=fd(ji.stretch-Kn,ar,Rt,S.top),ja=hd(ji.fixed-br,Ir,ji.stretch,Tn),ro=fd(Vi.stretch-Gn,Yn,St,S.left),Za=hd(Vi.fixed-ur,Er,Vi.stretch,cn),Ao=fd(Wi.stretch-Kn,ar,Rt,S.top),Ya=hd(Wi.fixed-br,Ir,Wi.stretch,Tn),Ea=new t(Fi,Xi),Xa=new t(ro,Xi),Ua=new t(ro,Ao),Ca=new t(Fi,Ao),ei=new t(Ma/qe,ja/qe),pi=new t(Za/qe,Ya/qe),ra=z*Math.PI/180;if(ra){var Ri=Math.sin(ra),Ji=Math.cos(ra),Zi=[Ji,-Ri,Ri,Ji];Ea._matMult(Zi),Xa._matMult(Zi),Ca._matMult(Zi),Ua._matMult(Zi)}var mi=Pi.stretch+Pi.fixed,ia=Vi.stretch+Vi.fixed,Mo=ji.stretch+ji.fixed,ss=Wi.stretch+Wi.fixed;return{tl:Ea,tr:Xa,bl:Ca,br:Ua,tex:{x:Ie.paddedRect.x+1+mi,y:Ie.paddedRect.y+1+Mo,w:ia-mi,h:ss-Mo},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:ei,pixelOffsetBR:pi,minFontScaleX:Er/qe/St,minFontScaleY:Ir/qe/Rt,isSDF:Z}};if(le&&(Ie.stretchX||Ie.stretchY))for(var jr=Gy(Ht,Fn,cn),Xr=Gy(Yt,Dn,Tn),Vr=0;Vr0&&(Zt=Math.max(10,Zt),this.circleDiameter=Zt)}else{var cn=Ie.top*qe-it,Tn=Ie.bottom*qe+it,Fn=Ie.left*qe-it,Dn=Ie.right*qe+it,Gn=Ie.collisionPadding;if(Gn&&(Fn-=Gn[0]*qe,cn-=Gn[1]*qe,Dn+=Gn[2]*qe,Tn+=Gn[3]*qe),St){var Yn=new t(Fn,cn),Kn=new t(Dn,cn),ar=new t(Fn,Tn),ur=new t(Dn,Tn),Er=St*Math.PI/180;Yn._rotate(Er),Kn._rotate(Er),ar._rotate(Er),ur._rotate(Er),Fn=Math.min(Yn.x,Kn.x,ar.x,ur.x),Dn=Math.max(Yn.x,Kn.x,ar.x,ur.x),cn=Math.min(Yn.y,Kn.y,ar.y,ur.y),Tn=Math.max(Yn.y,Kn.y,ar.y,ur.y)}S.emplaceBack(z.x,z.y,Fn,cn,Dn,Tn,Z,le,ke)}this.boxEndIndex=S.length},_f=function(S,z){if(S===void 0&&(S=[]),z===void 0&&(z=$5),this.data=S,this.length=this.data.length,this.compare=z,this.length>0)for(var Z=(this.length>>1)-1;Z>=0;Z--)this._down(Z)};function $5(S,z){return Sz?1:0}function J5(S,z,Z){z===void 0&&(z=1),Z===void 0&&(Z=!1);for(var le=1/0,ke=1/0,Ie=-1/0,qe=-1/0,it=S[0],dt=0;dtIe)&&(Ie=St.x),(!dt||St.y>qe)&&(qe=St.y)}var Rt=Ie-le,Ht=qe-ke,Yt=Math.min(Rt,Ht),Zt=Yt/2,cn=new _f([],K5);if(Yt===0)return new t(le,ke);for(var Tn=le;TnDn.d||!Dn.d)&&(Dn=Yn,Z&&console.log("found best %d after %d probes",Math.round(1e4*Yn.d)/1e4,Gn)),Yn.max-Dn.d<=z||(Zt=Yn.h/2,cn.push(new wf(Yn.p.x-Zt,Yn.p.y-Zt,Zt,S)),cn.push(new wf(Yn.p.x+Zt,Yn.p.y-Zt,Zt,S)),cn.push(new wf(Yn.p.x-Zt,Yn.p.y+Zt,Zt,S)),cn.push(new wf(Yn.p.x+Zt,Yn.p.y+Zt,Zt,S)),Gn+=4)}return Z&&(console.log("num probes: "+Gn),console.log("best distance: "+Dn.d)),Dn.p}function K5(S,z){return z.max-S.max}function wf(S,z,Z,le){this.p=new t(S,z),this.h=Z,this.d=function(ke,Ie){for(var qe=!1,it=1/0,dt=0;dtke.y!=cn.y>ke.y&&ke.x<(cn.x-Zt.x)*(ke.y-Zt.y)/(cn.y-Zt.y)+Zt.x&&(qe=!qe),it=Math.min(it,Xp(ke,Zt,cn))}return(qe?1:-1)*Math.sqrt(it)}(this.p,le),this.max=this.d+this.h*Math.SQRT2}_f.prototype.push=function(S){this.data.push(S),this.length++,this._up(this.length-1)},_f.prototype.pop=function(){if(this.length!==0){var S=this.data[0],z=this.data.pop();return this.length--,this.length>0&&(this.data[0]=z,this._down(0)),S}},_f.prototype.peek=function(){return this.data[0]},_f.prototype._up=function(S){for(var z=this.data,Z=this.compare,le=z[S];S>0;){var ke=S-1>>1,Ie=z[ke];if(Z(le,Ie)>=0)break;z[S]=Ie,S=ke}z[S]=le},_f.prototype._down=function(S){for(var z=this.data,Z=this.compare,le=this.length>>1,ke=z[S];S=0)break;z[S]=qe,S=Ie}z[S]=ke};var P1=Number.POSITIVE_INFINITY;function Wy(S,z){return z[1]!==P1?function(Z,le,ke){var Ie=0,qe=0;switch(le=Math.abs(le),ke=Math.abs(ke),Z){case"top-right":case"top-left":case"top":qe=ke-7;break;case"bottom-right":case"bottom-left":case"bottom":qe=7-ke}switch(Z){case"top-right":case"bottom-right":case"right":Ie=-le;break;case"top-left":case"bottom-left":case"left":Ie=le}return[Ie,qe]}(S,z[0],z[1]):function(Z,le){var ke=0,Ie=0;le<0&&(le=0);var qe=le/Math.sqrt(2);switch(Z){case"top-right":case"top-left":Ie=qe-7;break;case"bottom-right":case"bottom-left":Ie=7-qe;break;case"bottom":Ie=7-le;break;case"top":Ie=le-7}switch(Z){case"top-right":case"bottom-right":ke=-qe;break;case"top-left":case"bottom-left":ke=qe;break;case"left":ke=le;break;case"right":ke=-le}return[ke,Ie]}(S,z[0])}function O1(S){switch(S){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}var Xu=32640;function Zy(S,z,Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn){var Tn=function(Kn,ar,ur,Er,br,Ir,Br,$r){for(var jr=Er.layout.get("text-rotate").evaluate(Ir,{})*Math.PI/180,Xr=[],Vr=0,Nr=ar.positionedLines;VrXu&&M(S.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):Fn.kind==="composite"&&((Dn=[Ql*Zt.compositeTextSizes[0].evaluate(qe,{},cn),Ql*Zt.compositeTextSizes[1].evaluate(qe,{},cn)])[0]>Xu||Dn[1]>Xu)&&M(S.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),S.addSymbols(S.text,Tn,Dn,it,Ie,qe,St,z,dt.lineStartIndex,dt.lineLength,Yt,cn);for(var Gn=0,Yn=Rt;Gn=0;qe--)if(le.dist(Ie[qe])0)&&(Ie.value.kind!=="constant"||Ie.value.value.length>0),St=it.value.kind!=="constant"||!!it.value.value||Object.keys(it.parameters).length>0,Rt=ke.get("symbol-sort-key");if(this.features=[],dt||St){for(var Ht=z.iconDependencies,Yt=z.glyphDependencies,Zt=z.availableImages,cn=new di(this.zoom),Tn=0,Fn=S;Tn=0;for(var Qr=0,Di=br.sections;Qr=0;it--)Ie[it]={x:z[it].x,y:z[it].y,tileUnitDistanceFromAnchor:ke},it>0&&(ke+=z[it-1].dist(z[it]));for(var dt=0;dt0},Li.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Li.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Li.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Li.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Li.prototype.addIndicesForPlacedSymbol=function(S,z){for(var Z=S.placedSymbolArray.get(z),le=Z.vertexStartIndex+4*Z.numGlyphs,ke=Z.vertexStartIndex;ke1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(S),this.sortedAngle=S,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var Z=0,le=this.symbolInstanceIndexes;Z=0&&dt.indexOf(qe)===it&&z.addIndicesForPlacedSymbol(z.text,qe)}),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)}},Cr("SymbolBucket",Li,{omit:["layers","collisionBoxArray","features","compareText"]}),Li.MAX_GLYPHS=65535,Li.addDynamicAttributes=I1;var r4=new _a({"symbol-placement":new Fr(Oe.layout_symbol["symbol-placement"]),"symbol-spacing":new Fr(Oe.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Fr(Oe.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ur(Oe.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Fr(Oe.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Fr(Oe.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Fr(Oe.layout_symbol["icon-ignore-placement"]),"icon-optional":new Fr(Oe.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Fr(Oe.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ur(Oe.layout_symbol["icon-size"]),"icon-text-fit":new Fr(Oe.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Fr(Oe.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ur(Oe.layout_symbol["icon-image"]),"icon-rotate":new Ur(Oe.layout_symbol["icon-rotate"]),"icon-padding":new Fr(Oe.layout_symbol["icon-padding"]),"icon-keep-upright":new Fr(Oe.layout_symbol["icon-keep-upright"]),"icon-offset":new Ur(Oe.layout_symbol["icon-offset"]),"icon-anchor":new Ur(Oe.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Fr(Oe.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Fr(Oe.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Fr(Oe.layout_symbol["text-rotation-alignment"]),"text-field":new Ur(Oe.layout_symbol["text-field"]),"text-font":new Ur(Oe.layout_symbol["text-font"]),"text-size":new Ur(Oe.layout_symbol["text-size"]),"text-max-width":new Ur(Oe.layout_symbol["text-max-width"]),"text-line-height":new Fr(Oe.layout_symbol["text-line-height"]),"text-letter-spacing":new Ur(Oe.layout_symbol["text-letter-spacing"]),"text-justify":new Ur(Oe.layout_symbol["text-justify"]),"text-radial-offset":new Ur(Oe.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Fr(Oe.layout_symbol["text-variable-anchor"]),"text-anchor":new Ur(Oe.layout_symbol["text-anchor"]),"text-max-angle":new Fr(Oe.layout_symbol["text-max-angle"]),"text-writing-mode":new Fr(Oe.layout_symbol["text-writing-mode"]),"text-rotate":new Ur(Oe.layout_symbol["text-rotate"]),"text-padding":new Fr(Oe.layout_symbol["text-padding"]),"text-keep-upright":new Fr(Oe.layout_symbol["text-keep-upright"]),"text-transform":new Ur(Oe.layout_symbol["text-transform"]),"text-offset":new Ur(Oe.layout_symbol["text-offset"]),"text-allow-overlap":new Fr(Oe.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Fr(Oe.layout_symbol["text-ignore-placement"]),"text-optional":new Fr(Oe.layout_symbol["text-optional"])}),R1={paint:new _a({"icon-opacity":new Ur(Oe.paint_symbol["icon-opacity"]),"icon-color":new Ur(Oe.paint_symbol["icon-color"]),"icon-halo-color":new Ur(Oe.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ur(Oe.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ur(Oe.paint_symbol["icon-halo-blur"]),"icon-translate":new Fr(Oe.paint_symbol["icon-translate"]),"icon-translate-anchor":new Fr(Oe.paint_symbol["icon-translate-anchor"]),"text-opacity":new Ur(Oe.paint_symbol["text-opacity"]),"text-color":new Ur(Oe.paint_symbol["text-color"],{runtimeType:Bt,getOverride:function(S){return S.textColor},hasOverride:function(S){return!!S.textColor}}),"text-halo-color":new Ur(Oe.paint_symbol["text-halo-color"]),"text-halo-width":new Ur(Oe.paint_symbol["text-halo-width"]),"text-halo-blur":new Ur(Oe.paint_symbol["text-halo-blur"]),"text-translate":new Fr(Oe.paint_symbol["text-translate"]),"text-translate-anchor":new Fr(Oe.paint_symbol["text-translate-anchor"])}),layout:r4},kf=function(S){this.type=S.property.overrides?S.property.overrides.runtimeType:mt,this.defaultValue=S};kf.prototype.evaluate=function(S){if(S.formattedSection){var z=this.defaultValue.property.overrides;if(z&&z.hasOverride(S.formattedSection))return z.getOverride(S.formattedSection)}return S.feature&&S.featureState?this.defaultValue.evaluate(S.feature,S.featureState):this.defaultValue.property.specification.default},kf.prototype.eachChild=function(S){this.defaultValue.isConstant()||S(this.defaultValue.value._styleExpression.expression)},kf.prototype.outputDefined=function(){return!1},kf.prototype.serialize=function(){return null},Cr("FormatSectionOverride",kf,{omit:["defaultValue"]});var i4=function(S){function z(Z){S.call(this,Z,R1)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.recalculate=function(Z,le){if(S.prototype.recalculate.call(this,Z,le),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 ke=this.layout.get("text-writing-mode");if(ke){for(var Ie=[],qe=0,it=ke;qe",targetMapId:le,sourceMapId:Ie.mapId})}}},Af.prototype.receive=function(S){var z=S.data,Z=z.id;if(Z&&(!z.targetMapId||this.mapId===z.targetMapId))if(z.type===""){delete this.tasks[Z];var le=this.cancelCallbacks[Z];delete this.cancelCallbacks[Z],le&&le()}else L()||z.mustQueue?(this.tasks[Z]=z,this.taskQueue.push(Z),this.invoker.trigger()):this.processTask(Z,z)},Af.prototype.process=function(){if(this.taskQueue.length){var S=this.taskQueue.shift(),z=this.tasks[S];delete this.tasks[S],this.taskQueue.length&&this.invoker.trigger(),z&&this.processTask(S,z)}},Af.prototype.processTask=function(S,z){var Z=this;if(z.type===""){var le=this.callbacks[S];delete this.callbacks[S],le&&(z.error?le(il(z.error)):le(null,il(z.data)))}else{var ke=!1,Ie=R(this.globalScope)?void 0:[],qe=z.hasCallback?function(Rt,Ht){ke=!0,delete Z.cancelCallbacks[S],Z.target.postMessage({id:S,type:"",sourceMapId:Z.mapId,error:Rt?rl(Rt):null,data:rl(Ht,Ie)},Ie)}:function(Rt){ke=!0},it=null,dt=il(z.data);if(this.parent[z.type])it=this.parent[z.type](z.sourceMapId,dt,qe);else if(this.parent.getWorkerSource){var St=z.type.split(".");it=this.parent.getWorkerSource(z.sourceMapId,St[0],dt.source)[St[1]](dt,qe)}else qe(new Error("Could not find function "+z.type));!ke&&it&&it.cancel&&(this.cancelCallbacks[S]=it.cancel)}},Af.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var ka=function(S,z){S&&(z?this.setSouthWest(S).setNorthEast(z):S.length===4?this.setSouthWest([S[0],S[1]]).setNorthEast([S[2],S[3]]):this.setSouthWest(S[0]).setNorthEast(S[1]))};ka.prototype.setNorthEast=function(S){return this._ne=S instanceof Gi?new Gi(S.lng,S.lat):Gi.convert(S),this},ka.prototype.setSouthWest=function(S){return this._sw=S instanceof Gi?new Gi(S.lng,S.lat):Gi.convert(S),this},ka.prototype.extend=function(S){var z,Z,le=this._sw,ke=this._ne;if(S instanceof Gi)z=S,Z=S;else{if(!(S instanceof ka)){if(Array.isArray(S)){if(S.length===4||S.every(Array.isArray)){var Ie=S;return this.extend(ka.convert(Ie))}var qe=S;return this.extend(Gi.convert(qe))}return this}if(z=S._sw,Z=S._ne,!z||!Z)return this}return le||ke?(le.lng=Math.min(z.lng,le.lng),le.lat=Math.min(z.lat,le.lat),ke.lng=Math.max(Z.lng,ke.lng),ke.lat=Math.max(Z.lat,ke.lat)):(this._sw=new Gi(z.lng,z.lat),this._ne=new Gi(Z.lng,Z.lat)),this},ka.prototype.getCenter=function(){return new Gi((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},ka.prototype.getSouthWest=function(){return this._sw},ka.prototype.getNorthEast=function(){return this._ne},ka.prototype.getNorthWest=function(){return new Gi(this.getWest(),this.getNorth())},ka.prototype.getSouthEast=function(){return new Gi(this.getEast(),this.getSouth())},ka.prototype.getWest=function(){return this._sw.lng},ka.prototype.getSouth=function(){return this._sw.lat},ka.prototype.getEast=function(){return this._ne.lng},ka.prototype.getNorth=function(){return this._ne.lat},ka.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},ka.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},ka.prototype.isEmpty=function(){return!(this._sw&&this._ne)},ka.prototype.contains=function(S){var z=Gi.convert(S),Z=z.lng,le=z.lat,ke=this._sw.lat<=le&&le<=this._ne.lat,Ie=this._sw.lng<=Z&&Z<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Ie=this._sw.lng>=Z&&Z>=this._ne.lng),ke&&Ie},ka.convert=function(S){return!S||S instanceof ka?S:new ka(S)};var ex=63710088e-1,Gi=function(S,z){if(isNaN(S)||isNaN(z))throw new Error("Invalid LngLat object: ("+S+", "+z+")");if(this.lng=+S,this.lat=+z,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Gi.prototype.wrap=function(){return new Gi(i(this.lng,-180,180),this.lat)},Gi.prototype.toArray=function(){return[this.lng,this.lat]},Gi.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Gi.prototype.distanceTo=function(S){var z=Math.PI/180,Z=this.lat*z,le=S.lat*z,ke=Math.sin(Z)*Math.sin(le)+Math.cos(Z)*Math.cos(le)*Math.cos((S.lng-this.lng)*z);return ex*Math.acos(Math.min(ke,1))},Gi.prototype.toBounds=function(S){S===void 0&&(S=0);var z=360*S/40075017,Z=z/Math.cos(Math.PI/180*this.lat);return new ka(new Gi(this.lng-Z,this.lat-z),new Gi(this.lng+Z,this.lat+z))},Gi.convert=function(S){if(S instanceof Gi)return S;if(Array.isArray(S)&&(S.length===2||S.length===3))return new Gi(Number(S[0]),Number(S[1]));if(!Array.isArray(S)&&typeof S=="object"&&S!==null)return new Gi(Number("lng"in S?S.lng:S.lon),Number(S.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var tx=2*Math.PI*ex;function nx(S){return tx*Math.cos(S*Math.PI/180)}function rx(S){return(180+S)/360}function ix(S){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+S*Math.PI/360)))/360}function ax(S,z){return S/nx(z)}function D1(S){var z=180-360*S;return 360/Math.PI*Math.atan(Math.exp(z*Math.PI/180))-90}var Ic=function(S,z,Z){Z===void 0&&(Z=0),this.x=+S,this.y=+z,this.z=+Z};Ic.fromLngLat=function(S,z){z===void 0&&(z=0);var Z=Gi.convert(S);return new Ic(rx(Z.lng),ix(Z.lat),ax(z,Z.lat))},Ic.prototype.toLngLat=function(){return new Gi(360*this.x-180,D1(this.y))},Ic.prototype.toAltitude=function(){return S=this.z,z=this.y,S*nx(D1(z));var S,z},Ic.prototype.meterInMercatorCoordinateUnits=function(){return 1/tx*(S=D1(this.y),1/Math.cos(S*Math.PI/180));var S};var Rc=function(S,z,Z){this.z=S,this.x=z,this.y=Z,this.key=Sh(0,S,S,z,Z)};Rc.prototype.equals=function(S){return this.z===S.z&&this.x===S.x&&this.y===S.y},Rc.prototype.url=function(S,z){var Z,le,ke,Ie,qe,it=(Z=this.x,le=this.y,ke=this.z,Ie=Qy(256*Z,256*(le=Math.pow(2,ke)-le-1),ke),qe=Qy(256*(Z+1),256*(le+1),ke),Ie[0]+","+Ie[1]+","+qe[0]+","+qe[1]),dt=function(St,Rt,Ht){for(var Yt,Zt="",cn=St;cn>0;cn--)Zt+=(Rt&(Yt=1<this.canonical.z?new Aa(S,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Aa(S,this.wrap,S,this.canonical.x>>z,this.canonical.y>>z)},Aa.prototype.calculateScaledKey=function(S,z){var Z=this.canonical.z-S;return S>this.canonical.z?Sh(this.wrap*+z,S,this.canonical.z,this.canonical.x,this.canonical.y):Sh(this.wrap*+z,S,S,this.canonical.x>>Z,this.canonical.y>>Z)},Aa.prototype.isChildOf=function(S){if(S.wrap!==this.wrap)return!1;var z=this.canonical.z-S.canonical.z;return S.overscaledZ===0||S.overscaledZ>z&&S.canonical.y===this.canonical.y>>z},Aa.prototype.children=function(S){if(this.overscaledZ>=S)return[new Aa(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var z=this.canonical.z+1,Z=2*this.canonical.x,le=2*this.canonical.y;return[new Aa(z,this.wrap,z,Z,le),new Aa(z,this.wrap,z,Z+1,le),new Aa(z,this.wrap,z,Z,le+1),new Aa(z,this.wrap,z,Z+1,le+1)]},Aa.prototype.isLessThan=function(S){return this.wrapS.wrap)&&(this.overscaledZS.overscaledZ)&&(this.canonical.xS.canonical.x)&&this.canonical.y=this.dim+1||z<-1||z>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(z+1)*this.stride+(S+1)},Mu.prototype._unpackMapbox=function(S,z,Z){return(256*S*256+256*z+Z)/10-1e4},Mu.prototype._unpackTerrarium=function(S,z,Z){return 256*S+z+Z/256-32768},Mu.prototype.getPixels=function(){return new No({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Mu.prototype.backfillBorder=function(S,z,Z){if(this.dim!==S.dim)throw new Error("dem dimension mismatch");var le=z*this.dim,ke=z*this.dim+this.dim,Ie=Z*this.dim,qe=Z*this.dim+this.dim;switch(z){case-1:le=ke-1;break;case 1:ke=le+1}switch(Z){case-1:Ie=qe-1;break;case 1:qe=Ie+1}for(var it=-z*this.dim,dt=-Z*this.dim,St=Ie;St=0&&Rt[3]>=0&&it.insert(qe,Rt[0],Rt[1],Rt[2],Rt[3])}},Su.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new vf.VectorTile(new id(this.rawTileData)).layers,this.sourceLayerCoder=new vd(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Su.prototype.query=function(S,z,Z,le){var ke=this;this.loadVTLayers();for(var Ie=S.params||{},qe=Yr/S.tileSize/S.scale,it=El(Ie.filter),dt=S.queryGeometry,St=S.queryPadding*qe,Rt=lx(dt),Ht=this.grid.query(Rt.minX-St,Rt.minY-St,Rt.maxX+St,Rt.maxY+St),Yt=lx(S.cameraQueryGeometry),Zt=0,cn=this.grid3D.query(Yt.minX-St,Yt.minY-St,Yt.maxX+St,Yt.maxY+St,function(Kn,ar,ur,Er){return function(br,Ir,Br,$r,jr){for(var Xr=0,Vr=br;Xr=Nr.x&&jr>=Nr.y)return!0}var si=[new t(Ir,Br),new t(Ir,jr),new t($r,jr),new t($r,Br)];if(br.length>2){for(var Qr=0,Di=si;Qr=0)return!0;return!1}(Ie,Ht)){var Yt=this.sourceLayerCoder.decode(Z),Zt=this.vtLayers[Yt].feature(le);if(ke.filter(new di(this.tileID.overscaledZ),Zt))for(var cn=this.getId(Zt,Yt),Tn=0;Tnle)ke=!1;else if(z)if(this.expirationTimege&&(S.getActor().send("enforceCacheSizeLimit",je),st=0)},s.clamp=o,s.clearTileCache=function(S){var z=self.caches.delete(De);S&&z.catch(S).then(function(){return S()})},s.clipLine=Hy,s.clone=function(S){var z=new ws(16);return z[0]=S[0],z[1]=S[1],z[2]=S[2],z[3]=S[3],z[4]=S[4],z[5]=S[5],z[6]=S[6],z[7]=S[7],z[8]=S[8],z[9]=S[9],z[10]=S[10],z[11]=S[11],z[12]=S[12],z[13]=S[13],z[14]=S[14],z[15]=S[15],z},s.clone$1=k,s.clone$2=function(S){var z=new ws(3);return z[0]=S[0],z[1]=S[1],z[2]=S[2],z},s.collisionCircleLayout=P5,s.config=X,s.create=function(){var S=new ws(16);return ws!=Float32Array&&(S[1]=0,S[2]=0,S[3]=0,S[4]=0,S[6]=0,S[7]=0,S[8]=0,S[9]=0,S[11]=0,S[12]=0,S[13]=0,S[14]=0),S[0]=1,S[5]=1,S[10]=1,S[15]=1,S},s.create$1=function(){var S=new ws(9);return ws!=Float32Array&&(S[1]=0,S[2]=0,S[3]=0,S[5]=0,S[6]=0,S[7]=0),S[0]=1,S[4]=1,S[8]=1,S},s.create$2=function(){var S=new ws(4);return ws!=Float32Array&&(S[1]=0,S[2]=0),S[0]=1,S[3]=1,S},s.createCommonjsModule=T,s.createExpression=wl,s.createLayout=Si,s.createStyleLayer=function(S){return S.type==="custom"?new u4(S):new c4[S.type](S)},s.cross=function(S,z,Z){var le=z[0],ke=z[1],Ie=z[2],qe=Z[0],it=Z[1],dt=Z[2];return S[0]=ke*dt-Ie*it,S[1]=Ie*qe-le*dt,S[2]=le*it-ke*qe,S},s.deepEqual=function S(z,Z){if(Array.isArray(z)){if(!Array.isArray(Z)||z.length!==Z.length)return!1;for(var le=0;le0&&(Ie=1/Math.sqrt(Ie)),S[0]=z[0]*Ie,S[1]=z[1]*Ie,S[2]=z[2]*Ie,S},s.number=Lr,s.offscreenCanvasSupported=ot,s.ortho=function(S,z,Z,le,ke,Ie,qe){var it=1/(z-Z),dt=1/(le-ke),St=1/(Ie-qe);return S[0]=-2*it,S[1]=0,S[2]=0,S[3]=0,S[4]=0,S[5]=-2*dt,S[6]=0,S[7]=0,S[8]=0,S[9]=0,S[10]=2*St,S[11]=0,S[12]=(z+Z)*it,S[13]=(ke+le)*dt,S[14]=(qe+Ie)*St,S[15]=1,S},s.parseGlyphPBF=function(S){return new id(S).readFields(V5,[])},s.pbf=id,s.performSymbolLayout=function(S,z,Z,le,ke,Ie,qe){S.createArrays();var it=512*S.overscaling;S.tilePixelRatio=Yr/it,S.compareText={},S.iconsNeedLinear=!1;var dt=S.layers[0].layout,St=S.layers[0]._unevaluatedLayout._values,Rt={};if(S.textSizeData.kind==="composite"){var Ht=S.textSizeData,Yt=Ht.minZoom,Zt=Ht.maxZoom;Rt.compositeTextSizes=[St["text-size"].possiblyEvaluate(new di(Yt),qe),St["text-size"].possiblyEvaluate(new di(Zt),qe)]}if(S.iconSizeData.kind==="composite"){var cn=S.iconSizeData,Tn=cn.minZoom,Fn=cn.maxZoom;Rt.compositeIconSizes=[St["icon-size"].possiblyEvaluate(new di(Tn),qe),St["icon-size"].possiblyEvaluate(new di(Fn),qe)]}Rt.layoutTextSize=St["text-size"].possiblyEvaluate(new di(S.zoom+1),qe),Rt.layoutIconSize=St["icon-size"].possiblyEvaluate(new di(S.zoom+1),qe),Rt.textMaxSize=St["text-size"].possiblyEvaluate(new di(18));for(var Dn=dt.get("text-line-height")*no,Gn=dt.get("text-rotation-alignment")==="map"&&dt.get("symbol-placement")!=="point",Yn=dt.get("text-keep-upright"),Kn=dt.get("text-size"),ar=function(){var br=Er[ur],Ir=dt.get("text-font").evaluate(br,{},qe).join(","),Br=Kn.evaluate(br,{},qe),$r=Rt.layoutTextSize.evaluate(br,{},qe),jr=Rt.layoutIconSize.evaluate(br,{},qe),Xr={horizontal:{},vertical:void 0},Vr=br.text,Nr=[0,0];if(Vr){var si=Vr.toString(),Qr=dt.get("text-letter-spacing").evaluate(br,{},qe)*no,Di=function(ei){for(var pi=0,ra=ei;pi=Yr||Dh.y<0||Dh.y>=Yr||function(sa,zl,p4,Ju,G1,dx,Sd,eu,Ed,Fh,Cd,Ld,W1,gx,Bh,vx,mx,yx,xx,bx,ks,Pd,_x,tu,d4){var wx,jc,Lf,Pf,Of,If=sa.addToLineVertexArray(zl,p4),Tx=0,kx=0,Ax=0,Mx=0,Z1=-1,Y1=-1,Cu={},Sx=zn(""),X1=0,$1=0;if(eu._unevaluatedLayout.getValue("text-radial-offset")===void 0?(X1=(wx=eu.layout.get("text-offset").evaluate(ks,{},tu).map(function(jh){return jh*no}))[0],$1=wx[1]):(X1=eu.layout.get("text-radial-offset").evaluate(ks,{},tu)*no,$1=P1),sa.allowVerticalPlacement&&Ju.vertical){var Ex=eu.layout.get("text-rotate").evaluate(ks,{},tu)+90,g4=Ju.vertical;Pf=new pd(Ed,zl,Fh,Cd,Ld,g4,W1,gx,Bh,Ex),Sd&&(Of=new pd(Ed,zl,Fh,Cd,Ld,Sd,mx,yx,Bh,Ex))}if(G1){var J1=eu.layout.get("icon-rotate").evaluate(ks,{}),Cx=eu.layout.get("icon-text-fit")!=="none",Lx=qy(G1,J1,_x,Cx),K1=Sd?qy(Sd,J1,_x,Cx):void 0;Lf=new pd(Ed,zl,Fh,Cd,Ld,G1,mx,yx,!1,J1),Tx=4*Lx.length;var Px=sa.iconSizeData,Nh=null;Px.kind==="source"?(Nh=[Ql*eu.layout.get("icon-size").evaluate(ks,{})])[0]>Xu&&M(sa.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):Px.kind==="composite"&&((Nh=[Ql*Pd.compositeIconSizes[0].evaluate(ks,{},tu),Ql*Pd.compositeIconSizes[1].evaluate(ks,{},tu)])[0]>Xu||Nh[1]>Xu)&&M(sa.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),sa.addSymbols(sa.icon,Lx,Nh,bx,xx,ks,!1,zl,If.lineStartIndex,If.lineLength,-1,tu),Z1=sa.icon.placedSymbolArray.length-1,K1&&(kx=4*K1.length,sa.addSymbols(sa.icon,K1,Nh,bx,xx,ks,Ts.vertical,zl,If.lineStartIndex,If.lineLength,-1,tu),Y1=sa.icon.placedSymbolArray.length-1)}for(var Ox in Ju.horizontal){var Od=Ju.horizontal[Ox];if(!jc){Sx=zn(Od.text);var v4=eu.layout.get("text-rotate").evaluate(ks,{},tu);jc=new pd(Ed,zl,Fh,Cd,Ld,Od,W1,gx,Bh,v4)}var Ix=Od.positionedLines.length===1;if(Ax+=Zy(sa,zl,Od,dx,eu,Bh,ks,vx,If,Ju.vertical?Ts.horizontal:Ts.horizontalOnly,Ix?Object.keys(Ju.horizontal):[Ox],Cu,Z1,Pd,tu),Ix)break}Ju.vertical&&(Mx+=Zy(sa,zl,Ju.vertical,dx,eu,Bh,ks,vx,If,Ts.vertical,["vertical"],Cu,Y1,Pd,tu));var m4=jc?jc.boxStartIndex:sa.collisionBoxArray.length,y4=jc?jc.boxEndIndex:sa.collisionBoxArray.length,x4=Pf?Pf.boxStartIndex:sa.collisionBoxArray.length,b4=Pf?Pf.boxEndIndex:sa.collisionBoxArray.length,_4=Lf?Lf.boxStartIndex:sa.collisionBoxArray.length,w4=Lf?Lf.boxEndIndex:sa.collisionBoxArray.length,T4=Of?Of.boxStartIndex:sa.collisionBoxArray.length,k4=Of?Of.boxEndIndex:sa.collisionBoxArray.length,nu=-1,Id=function(jh,zx){return jh&&jh.circleDiameter?Math.max(jh.circleDiameter,zx):zx};nu=Id(jc,nu),nu=Id(Pf,nu),nu=Id(Lf,nu);var Rx=(nu=Id(Of,nu))>-1?1:0;Rx&&(nu*=d4/no),sa.glyphOffsetArray.length>=Li.MAX_GLYPHS&&M("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),ks.sortKey!==void 0&&sa.addToSortKeyRanges(sa.symbolInstances.length,ks.sortKey),sa.symbolInstances.emplaceBack(zl.x,zl.y,Cu.right>=0?Cu.right:-1,Cu.center>=0?Cu.center:-1,Cu.left>=0?Cu.left:-1,Cu.vertical||-1,Z1,Y1,Sx,m4,y4,x4,b4,_4,w4,T4,k4,Fh,Ax,Mx,Tx,kx,Rx,0,W1,X1,$1,nu)}(ei,Dh,h4,ra,Ri,Ji,Eu,ei.layers[0],ei.collisionBoxArray,pi.index,pi.sourceLayerIndex,ei.index,yd,B1,_d,Mo,xd,bd,wd,Rl,pi,Zi,ss,vo,mi)};if(Ch==="line")for(var Ef=0,Td=Hy(pi.geometry,0,0,Yr,Yr);Ef1){var Ih=Y5(Bc,Sf,ra.vertical||ul,Ri,cl,Dc);Ih&&Fc(Bc,Ih)}}else if(pi.type==="Polygon")for(var Nc=0,Rh=w1(pi.geometry,0);Nc=kn.maxzoom||kn.visibility!=="none"&&(a(ln,this.zoom,Ge),(Ct[kn.id]=kn.createBucket({index:Qe.bucketLayerIDs.length,layers:ln,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Bt,sourceID:this.source})).populate(Wt,mt,this.tileID.canonical),Qe.bucketLayerIDs.push(ln.map(function(fn){return fn.id})))}}}var Wn=s.mapObject(mt.glyphDependencies,function(fn){return Object.keys(fn).map(Number)});Object.keys(Wn).length?nt.send("getGlyphs",{uid:this.uid,stacks:Wn},function(fn,hn){ut||(ut=fn,pt=hn,_n.call(Oe))}):pt={};var wn=Object.keys(mt.iconDependencies);wn.length?nt.send("getImages",{icons:wn,source:this.source,tileID:this.tileID,type:"icons"},function(fn,hn){ut||(ut=fn,bt=hn,_n.call(Oe))}):bt={};var on=Object.keys(mt.patternDependencies);function _n(){if(ut)return ht(ut);if(pt&&bt&&Lt){var fn=new l(pt),hn=new s.ImageAtlas(bt,Lt);for(var In in Ct){var Cn=Ct[In];Cn instanceof s.SymbolBucket?(a(Cn.layers,this.zoom,Ge),s.performSymbolLayout(Cn,pt,fn.positions,bt,hn.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Cn.hasPattern&&(Cn instanceof s.LineBucket||Cn instanceof s.FillBucket||Cn instanceof s.FillExtrusionBucket)&&(a(Cn.layers,this.zoom,Ge),Cn.addFeatures(mt,this.tileID.canonical,hn.patternPositions))}this.status="done",ht(null,{buckets:s.values(Ct).filter(function(Nn){return!Nn.isEmpty()}),featureIndex:Qe,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:fn.image,imageAtlas:hn,glyphMap:this.returnDependencies?pt:null,iconMap:this.returnDependencies?bt:null,glyphPositions:this.returnDependencies?fn.positions:null})}}on.length?nt.send("getImages",{icons:on,source:this.source,tileID:this.tileID,type:"patterns"},function(fn,hn){ut||(ut=fn,Lt=hn,_n.call(Oe))}):Lt={},_n.call(this)};var n=function(Je,Ke,Ge,nt){this.actor=Je,this.layerIndex=Ke,this.availableImages=Ge,this.loadVectorData=nt||r,this.loading={},this.loaded={}};n.prototype.loadTile=function(Je,Ke){var Ge=this,nt=Je.uid;this.loading||(this.loading={});var ht=!!(Je&&Je.request&&Je.request.collectResourceTiming)&&new s.RequestPerformance(Je.request),Oe=this.loading[nt]=new t(Je);Oe.abort=this.loadVectorData(Je,function(Be,Qe){if(delete Ge.loading[nt],Be||!Qe)return Oe.status="done",Ge.loaded[nt]=Oe,Ke(Be);var ut=Qe.rawData,pt={};Qe.expires&&(pt.expires=Qe.expires),Qe.cacheControl&&(pt.cacheControl=Qe.cacheControl);var bt={};if(ht){var Lt=ht.finish();Lt&&(bt.resourceTiming=JSON.parse(JSON.stringify(Lt)))}Oe.vectorTile=Qe.vectorTile,Oe.parse(Qe.vectorTile,Ge.layerIndex,Ge.availableImages,Ge.actor,function(Ct,mt){if(Ct||!mt)return Ke(Ct);Ke(null,s.extend({rawTileData:ut.slice(0)},mt,pt,bt))}),Ge.loaded=Ge.loaded||{},Ge.loaded[nt]=Oe})},n.prototype.reloadTile=function(Je,Ke){var Ge=this,nt=this.loaded,ht=Je.uid,Oe=this;if(nt&&nt[ht]){var Be=nt[ht];Be.showCollisionBoxes=Je.showCollisionBoxes;var Qe=function(ut,pt){var bt=Be.reloadCallback;bt&&(delete Be.reloadCallback,Be.parse(Be.vectorTile,Oe.layerIndex,Ge.availableImages,Oe.actor,bt)),Ke(ut,pt)};Be.status==="parsing"?Be.reloadCallback=Qe:Be.status==="done"&&(Be.vectorTile?Be.parse(Be.vectorTile,this.layerIndex,this.availableImages,this.actor,Qe):Qe())}},n.prototype.abortTile=function(Je,Ke){var Ge=this.loading,nt=Je.uid;Ge&&Ge[nt]&&Ge[nt].abort&&(Ge[nt].abort(),delete Ge[nt]),Ke()},n.prototype.removeTile=function(Je,Ke){var Ge=this.loaded,nt=Je.uid;Ge&&Ge[nt]&&delete Ge[nt],Ke()};var o=s.window.ImageBitmap,i=function(){this.loaded={}};i.prototype.loadTile=function(Je,Ke){var Ge=Je.uid,nt=Je.encoding,ht=Je.rawImageData,Oe=o&&ht instanceof o?this.getImageData(ht):ht,Be=new s.DEMData(Ge,Oe,nt);this.loaded=this.loaded||{},this.loaded[Ge]=Be,Ke(null,Be)},i.prototype.getImageData=function(Je){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(Je.width,Je.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=Je.width,this.offscreenCanvas.height=Je.height,this.offscreenCanvasContext.drawImage(Je,0,0,Je.width,Je.height);var Ke=this.offscreenCanvasContext.getImageData(-1,-1,Je.width+2,Je.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new s.RGBAImage({width:Ke.width,height:Ke.height},Ke.data)},i.prototype.removeTile=function(Je){var Ke=this.loaded,Ge=Je.uid;Ke&&Ke[Ge]&&delete Ke[Ge]};var u=function Je(Ke,Ge){var nt,ht=Ke&&Ke.type;if(ht==="FeatureCollection")for(nt=0;nt=0!=!!Ke&&Je.reverse()}var b=s.vectorTile.VectorTileFeature.prototype.toGeoJSON,d=function(Je){this._feature=Je,this.extent=s.EXTENT,this.type=Je.type,this.properties=Je.tags,"id"in Je&&!isNaN(Je.id)&&(this.id=parseInt(Je.id,10))};d.prototype.loadGeometry=function(){if(this._feature.type===1){for(var Je=[],Ke=0,Ge=this._feature.geometry;Ke>31}function G(Je,Ke){for(var Ge=Je.loadGeometry(),nt=Je.type,ht=0,Oe=0,Be=Ge.length,Qe=0;Qe>1;V(Je,Ke,Be,nt,ht,Oe%2),j(Je,Ke,Ge,nt,Be-1,Oe+1),j(Je,Ke,Ge,Be+1,ht,Oe+1)}}function V(Je,Ke,Ge,nt,ht,Oe){for(;ht>nt;){if(ht-nt>600){var Be=ht-nt+1,Qe=Ge-nt+1,ut=Math.log(Be),pt=.5*Math.exp(2*ut/3),bt=.5*Math.sqrt(ut*pt*(Be-pt)/Be)*(Qe-Be/2<0?-1:1);V(Je,Ke,Ge,Math.max(nt,Math.floor(Ge-Qe*pt/Be+bt)),Math.min(ht,Math.floor(Ge+(Be-Qe)*pt/Be+bt)),Oe)}var Lt=Ke[2*Ge+Oe],Ct=nt,mt=ht;for(H(Je,Ke,nt,Ge),Ke[2*ht+Oe]>Lt&&H(Je,Ke,nt,ht);CtLt;)mt--}Ke[2*nt+Oe]===Lt?H(Je,Ke,nt,mt):H(Je,Ke,++mt,ht),mt<=Ge&&(nt=mt+1),Ge<=mt&&(ht=mt-1)}}function H(Je,Ke,Ge,nt){ee(Je,Ge,nt),ee(Ke,2*Ge,2*nt),ee(Ke,2*Ge+1,2*nt+1)}function ee(Je,Ke,Ge){var nt=Je[Ke];Je[Ke]=Je[Ge],Je[Ge]=nt}function Q(Je,Ke,Ge,nt){var ht=Je-Ge,Oe=Ke-nt;return ht*ht+Oe*Oe}h.fromVectorTileJs=M,h.fromGeojsonVt=A,h.GeoJSONWrapper=C;var X=function(Je){return Je[0]},Y=function(Je){return Je[1]},K=function(Je,Ke,Ge,nt,ht){Ke===void 0&&(Ke=X),Ge===void 0&&(Ge=Y),nt===void 0&&(nt=64),ht===void 0&&(ht=Float64Array),this.nodeSize=nt,this.points=Je;for(var Oe=Je.length<65536?Uint16Array:Uint32Array,Be=this.ids=new Oe(Je.length),Qe=this.coords=new ht(2*Je.length),ut=0;ut=Be&&Lt<=ut&&Ct>=Qe&&Ct<=pt&&Ot.push(ht[Wt]);else{var Gt=Math.floor((Bt+Pt)/2);Lt=Oe[2*Gt],Ct=Oe[2*Gt+1],Lt>=Be&&Lt<=ut&&Ct>=Qe&&Ct<=pt&&Ot.push(ht[Gt]);var Xt=(_t+1)%2;(_t===0?Be<=Lt:Qe<=Ct)&&(mt.push(Bt),mt.push(Gt-1),mt.push(Xt)),(_t===0?ut>=Lt:pt>=Ct)&&(mt.push(Gt+1),mt.push(Pt),mt.push(Xt))}}return Ot}(this.ids,this.coords,Je,Ke,Ge,nt,this.nodeSize)},K.prototype.within=function(Je,Ke,Ge){return function(nt,ht,Oe,Be,Qe,ut){for(var pt=[0,nt.length-1,0],bt=[],Lt=Qe*Qe;pt.length;){var Ct=pt.pop(),mt=pt.pop(),Ot=pt.pop();if(mt-Ot<=ut)for(var _t=Ot;_t<=mt;_t++)Q(ht[2*_t],ht[2*_t+1],Oe,Be)<=Lt&&bt.push(nt[_t]);else{var Pt=Math.floor((Ot+mt)/2),Bt=ht[2*Pt],Wt=ht[2*Pt+1];Q(Bt,Wt,Oe,Be)<=Lt&&bt.push(nt[Pt]);var Gt=(Ct+1)%2;(Ct===0?Oe-Qe<=Bt:Be-Qe<=Wt)&&(pt.push(Ot),pt.push(Pt-1),pt.push(Gt)),(Ct===0?Oe+Qe>=Bt:Be+Qe>=Wt)&&(pt.push(Pt+1),pt.push(mt),pt.push(Gt))}}return bt}(this.ids,this.coords,Je,Ke,Ge,this.nodeSize)};var te={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(Je){return Je}},re=function(Je){this.options=he(Object.create(te),Je),this.trees=new Array(this.options.maxZoom+1)};function oe(Je,Ke,Ge,nt,ht){return{x:Je,y:Ke,zoom:1/0,id:Ge,parentId:-1,numPoints:nt,properties:ht}}function se(Je,Ke){var Ge=Je.geometry.coordinates,nt=Ge[0],ht=Ge[1];return{x:pe(nt),y:de(ht),zoom:1/0,index:Ke,parentId:-1}}function ce(Je){return{type:"Feature",id:Je.id,properties:xe(Je),geometry:{type:"Point",coordinates:[(nt=Je.x,360*(nt-.5)),(Ke=Je.y,Ge=(180-360*Ke)*Math.PI/180,360*Math.atan(Math.exp(Ge))/Math.PI-90)]}};var Ke,Ge,nt}function xe(Je){var Ke=Je.numPoints,Ge=Ke>=1e4?Math.round(Ke/1e3)+"k":Ke>=1e3?Math.round(Ke/100)/10+"k":Ke;return he(he({},Je.properties),{cluster:!0,cluster_id:Je.id,point_count:Ke,point_count_abbreviated:Ge})}function pe(Je){return Je/360+.5}function de(Je){var Ke=Math.sin(Je*Math.PI/180),Ge=.5-.25*Math.log((1+Ke)/(1-Ke))/Math.PI;return Ge<0?0:Ge>1?1:Ge}function he(Je,Ke){for(var Ge in Ke)Je[Ge]=Ke[Ge];return Je}function ye(Je){return Je.x}function ze(Je){return Je.y}function Te(Je,Ke,Ge,nt){for(var ht,Oe=nt,Be=Ge-Ke>>1,Qe=Ge-Ke,ut=Je[Ke],pt=Je[Ke+1],bt=Je[Ge],Lt=Je[Ge+1],Ct=Ke+3;CtOe)ht=Ct,Oe=mt;else if(mt===Oe){var Ot=Math.abs(Ct-Be);Otnt&&(ht-Ke>3&&Te(Je,Ke,ht,nt),Je[ht+2]=Oe,Ge-ht>3&&Te(Je,ht,Ge,nt))}function Ae(Je,Ke,Ge,nt,ht,Oe){var Be=ht-Ge,Qe=Oe-nt;if(Be!==0||Qe!==0){var ut=((Je-Ge)*Be+(Ke-nt)*Qe)/(Be*Be+Qe*Qe);ut>1?(Ge=ht,nt=Oe):ut>0&&(Ge+=Be*ut,nt+=Qe*ut)}return(Be=Je-Ge)*Be+(Qe=Ke-nt)*Qe}function Me(Je,Ke,Ge,nt){var ht={id:Je===void 0?null:Je,type:Ke,geometry:Ge,tags:nt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(Oe){var Be=Oe.geometry,Qe=Oe.type;if(Qe==="Point"||Qe==="MultiPoint"||Qe==="LineString")Ce(Oe,Be);else if(Qe==="Polygon"||Qe==="MultiLineString")for(var ut=0;ut0&&(Be+=nt?(ht*pt-ut*Oe)/2:Math.sqrt(Math.pow(ut-ht,2)+Math.pow(pt-Oe,2))),ht=ut,Oe=pt}var bt=Ke.length-3;Ke[2]=1,Te(Ke,0,bt,Ge),Ke[bt+2]=1,Ke.size=Math.abs(Be),Ke.start=0,Ke.end=Ke.size}function we(Je,Ke,Ge,nt){for(var ht=0;ht1?1:Ge}function De(Je,Ke,Ge,nt,ht,Oe,Be,Qe){if(nt/=Ke,Oe>=(Ge/=Ke)&&Be=nt)return null;for(var ut=[],pt=0;pt=Ge&&Ot=nt)){var _t=[];if(Ct==="Point"||Ct==="MultiPoint")je(Lt,_t,Ge,nt,ht);else if(Ct==="LineString")ge(Lt,_t,Ge,nt,ht,!1,Qe.lineMetrics);else if(Ct==="MultiLineString")Se(Lt,_t,Ge,nt,ht,!1);else if(Ct==="Polygon")Se(Lt,_t,Ge,nt,ht,!0);else if(Ct==="MultiPolygon")for(var Pt=0;Pt=Ge&&Be<=nt&&(Ke.push(Je[Oe]),Ke.push(Je[Oe+1]),Ke.push(Je[Oe+2]))}}function ge(Je,Ke,Ge,nt,ht,Oe,Be){for(var Qe,ut,pt=be(Je),bt=ht===0?Ye:Ze,Lt=Je.start,Ct=0;CtGe&&(ut=bt(pt,mt,Ot,Pt,Bt,Ge),Be&&(pt.start=Lt+Qe*ut)):Wt>nt?Gt=Ge&&(ut=bt(pt,mt,Ot,Pt,Bt,Ge),Xt=!0),Gt>nt&&Wt<=nt&&(ut=bt(pt,mt,Ot,Pt,Bt,nt),Xt=!0),!Oe&&Xt&&(Be&&(pt.end=Lt+Qe*ut),Ke.push(pt),pt=be(Je)),Be&&(Lt+=Qe)}var Kt=Je.length-3;mt=Je[Kt],Ot=Je[Kt+1],_t=Je[Kt+2],(Wt=ht===0?mt:Ot)>=Ge&&Wt<=nt&&Ne(pt,mt,Ot,_t),Kt=pt.length-3,Oe&&Kt>=3&&(pt[Kt]!==pt[0]||pt[Kt+1]!==pt[1])&&Ne(pt,pt[0],pt[1],pt[2]),pt.length&&Ke.push(pt)}function be(Je){var Ke=[];return Ke.size=Je.size,Ke.start=Je.start,Ke.end=Je.end,Ke}function Se(Je,Ke,Ge,nt,ht,Oe){for(var Be=0;BeBe.maxX&&(Be.maxX=bt),Lt>Be.maxY&&(Be.maxY=Lt)}return Be}function Tt(Je,Ke,Ge,nt){var ht=Ke.geometry,Oe=Ke.type,Be=[];if(Oe==="Point"||Oe==="MultiPoint")for(var Qe=0;Qe0&&Ke.size<(ht?Be:nt))Ge.numPoints+=Ke.length/3;else{for(var Qe=[],ut=0;utBe)&&(Ge.numSimplified++,Qe.push(Ke[ut]),Qe.push(Ke[ut+1])),Ge.numPoints++;ht&&function(pt,bt){for(var Lt=0,Ct=0,mt=pt.length,Ot=mt-2;Ct0===bt)for(Ct=0,mt=pt.length;Ct24)throw new Error("maxZoom should be in the 0-24 range");if(Ke.promoteId&&Ke.generateId)throw new Error("promoteId and generateId cannot be used together.");var nt=function(ht,Oe){var Be=[];if(ht.type==="FeatureCollection")for(var Qe=0;Qe=nt;pt--){var bt=+Date.now();Qe=this._cluster(Qe,pt),this.trees[pt]=new K(Qe,ye,ze,Oe,Float32Array),Ge&&console.log("z%d: %d clusters in %dms",pt,Qe.length,+Date.now()-bt)}return Ge&&console.timeEnd("total time"),this},re.prototype.getClusters=function(Je,Ke){var Ge=((Je[0]+180)%360+360)%360-180,nt=Math.max(-90,Math.min(90,Je[1])),ht=Je[2]===180?180:((Je[2]+180)%360+360)%360-180,Oe=Math.max(-90,Math.min(90,Je[3]));if(Je[2]-Je[0]>=360)Ge=-180,ht=180;else if(Ge>ht){var Be=this.getClusters([Ge,nt,180,Oe],Ke),Qe=this.getClusters([-180,nt,ht,Oe],Ke);return Be.concat(Qe)}for(var ut=this.trees[this._limitZoom(Ke)],pt=[],bt=0,Lt=ut.range(pe(Ge),de(Oe),pe(ht),de(nt));bt1?this._map(pt,!0):null,Pt=(ut<<5)+(Ke+1)+this.points.length,Bt=0,Wt=Lt;Bt>5},re.prototype._getOriginZoom=function(Je){return(Je-this.points.length)%32},re.prototype._map=function(Je,Ke){if(Je.numPoints)return Ke?he({},Je.properties):Je.properties;var Ge=this.points[Je.index].properties,nt=this.options.map(Ge);return Ke&&nt===Ge?he({},nt):nt},Dt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Dt.prototype.splitTile=function(Je,Ke,Ge,nt,ht,Oe,Be){for(var Qe=[Je,Ke,Ge,nt],ut=this.options,pt=ut.debug;Qe.length;){nt=Qe.pop(),Ge=Qe.pop(),Ke=Qe.pop(),Je=Qe.pop();var bt=1<1&&console.time("creation"),Ct=this.tiles[Lt]=Et(Je,Ke,Ge,nt,ut),this.tileCoords.push({z:Ke,x:Ge,y:nt}),pt)){pt>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Ke,Ge,nt,Ct.numFeatures,Ct.numPoints,Ct.numSimplified),console.timeEnd("creation"));var mt="z"+Ke;this.stats[mt]=(this.stats[mt]||0)+1,this.total++}if(Ct.source=Je,ht){if(Ke===ut.maxZoom||Ke===ht)continue;var Ot=1<1&&console.time("clipping");var _t,Pt,Bt,Wt,Gt,Xt,Kt=.5*ut.buffer/ut.extent,nn=.5-Kt,yn=.5+Kt,ln=1+Kt;_t=Pt=Bt=Wt=null,Gt=De(Je,bt,Ge-Kt,Ge+yn,0,Ct.minX,Ct.maxX,ut),Xt=De(Je,bt,Ge+nn,Ge+ln,0,Ct.minX,Ct.maxX,ut),Je=null,Gt&&(_t=De(Gt,bt,nt-Kt,nt+yn,1,Ct.minY,Ct.maxY,ut),Pt=De(Gt,bt,nt+nn,nt+ln,1,Ct.minY,Ct.maxY,ut),Gt=null),Xt&&(Bt=De(Xt,bt,nt-Kt,nt+yn,1,Ct.minY,Ct.maxY,ut),Wt=De(Xt,bt,nt+nn,nt+ln,1,Ct.minY,Ct.maxY,ut),Xt=null),pt>1&&console.timeEnd("clipping"),Qe.push(_t||[],Ke+1,2*Ge,2*nt),Qe.push(Pt||[],Ke+1,2*Ge,2*nt+1),Qe.push(Bt||[],Ke+1,2*Ge+1,2*nt),Qe.push(Wt||[],Ke+1,2*Ge+1,2*nt+1)}}},Dt.prototype.getTile=function(Je,Ke,Ge){var nt=this.options,ht=nt.extent,Oe=nt.debug;if(Je<0||Je>24)return null;var Be=1<1&&console.log("drilling down to z%d-%d-%d",Je,Ke,Ge);for(var ut,pt=Je,bt=Ke,Lt=Ge;!ut&&pt>0;)pt--,bt=Math.floor(bt/2),Lt=Math.floor(Lt/2),ut=this.tiles[It(pt,bt,Lt)];return ut&&ut.source?(Oe>1&&console.log("found parent tile z%d-%d-%d",pt,bt,Lt),Oe>1&&console.time("drilling down"),this.splitTile(ut.source,pt,bt,Lt,Je,Ke,Ge),Oe>1&&console.timeEnd("drilling down"),this.tiles[Qe]?ft(this.tiles[Qe],ht):null):null};var qt=function(Je){function Ke(Ge,nt,ht,Oe){Je.call(this,Ge,nt,ht,Ft),Oe&&(this.loadGeoJSON=Oe)}return Je&&(Ke.__proto__=Je),Ke.prototype=Object.create(Je&&Je.prototype),Ke.prototype.constructor=Ke,Ke.prototype.loadData=function(Ge,nt){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=nt,this._pendingLoadDataParams=Ge,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},Ke.prototype._loadData=function(){var Ge=this;if(this._pendingCallback&&this._pendingLoadDataParams){var nt=this._pendingCallback,ht=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var Oe=!!(ht&&ht.request&&ht.request.collectResourceTiming)&&new s.RequestPerformance(ht.request);this.loadGeoJSON(ht,function(Be,Qe){if(Be||!Qe)return nt(Be);if(typeof Qe!="object")return nt(new Error("Input data given to '"+ht.source+"' is not a valid GeoJSON object."));u(Qe,!0);try{Ge._geoJSONIndex=ht.cluster?new re(function(bt){var Lt=bt.superclusterOptions,Ct=bt.clusterProperties;if(!Ct||!Lt)return Lt;for(var mt={},Ot={},_t={accumulated:null,zoom:0},Pt={properties:null},Bt=Object.keys(Ct),Wt=0,Gt=Bt;Wt=0?0:q.button},m.remove=function(q){q.parentNode&&q.parentNode.removeChild(q)};var p=function(q){function $(){q.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new s.RGBAImage({width:1,height:1}),this.dirty=!0}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.isLoaded=function(){return this.loaded},$.prototype.setLoaded=function(W){if(this.loaded!==W&&(this.loaded=W,W)){for(var ae=0,_e=this.requestors;ae<_e.length;ae+=1){var Re=_e[ae],He=Re.ids,Xe=Re.callback;this._notify(He,Xe)}this.requestors=[]}},$.prototype.getImage=function(W){return this.images[W]},$.prototype.addImage=function(W,ae){this._validate(W,ae)&&(this.images[W]=ae)},$.prototype._validate=function(W,ae){var _e=!0;return this._validateStretch(ae.stretchX,ae.data&&ae.data.width)||(this.fire(new s.ErrorEvent(new Error('Image "'+W+'" has invalid "stretchX" value'))),_e=!1),this._validateStretch(ae.stretchY,ae.data&&ae.data.height)||(this.fire(new s.ErrorEvent(new Error('Image "'+W+'" has invalid "stretchY" value'))),_e=!1),this._validateContent(ae.content,ae)||(this.fire(new s.ErrorEvent(new Error('Image "'+W+'" has invalid "content" value'))),_e=!1),_e},$.prototype._validateStretch=function(W,ae){if(!W)return!0;for(var _e=0,Re=0,He=W;Re=0?1.2:1))}function x(q,$,W,ae,_e,Re,He){for(var Xe=0;Xe<$;Xe++){for(var at=0;at65535)wt(new Error("glyphs > 65535 not supported"));else if(ve.ranges[Fe])wt(null,{stack:At,id:ie,glyph:Le});else{var Ve=ve.requests[Fe];Ve||(Ve=ve.requests[Fe]=[],y.loadGlyphRange(At,Fe,W.url,W.requestManager,function(We,$e){if($e){for(var tt in $e)W._doesCharSupportLocalGlyph(+tt)||(ve.glyphs[+tt]=$e[+tt]);ve.ranges[Fe]=!0}for(var lt=0,gt=Ve;lt1&&(at=q[++Xe]);var At=Math.abs(wt-at.left),ie=Math.abs(wt-at.right),ve=Math.min(At,ie),Le=void 0,Fe=_e/W*(ae+1);if(at.isDash){var Ve=ae-Math.abs(Fe);Le=Math.sqrt(ve*ve+Ve*Ve)}else Le=ae-Math.sqrt(ve*ve+Fe*Fe);this.data[He+wt]=Math.max(0,Math.min(255,Le+128))}},C.prototype.addRegularDash=function(q){for(var $=q.length-1;$>=0;--$){var W=q[$],ae=q[$+1];W.zeroLength?q.splice($,1):ae&&ae.isDash===W.isDash&&(ae.left=W.left,q.splice($,1))}var _e=q[0],Re=q[q.length-1];_e.isDash===Re.isDash&&(_e.left=Re.left-this.width,Re.right=_e.right+this.width);for(var He=this.width*this.nextRow,Xe=0,at=q[Xe],wt=0;wt1&&(at=q[++Xe]);var At=Math.abs(wt-at.left),ie=Math.abs(wt-at.right),ve=Math.min(At,ie),Le=at.isDash?ve:-ve;this.data[He+wt]=Math.max(0,Math.min(255,Le+128))}},C.prototype.addDash=function(q,$){var W=$?7:0,ae=2*W+1;if(this.nextRow+ae>this.height)return s.warnOnce("LineAtlas out of space"),null;for(var _e=0,Re=0;Re=W&&q.x<_e&&q.y>=ae&&q.y0&&(wt[new s.OverscaledTileID(W.overscaledZ,He,ae.z,Re,ae.y-1).key]={backfilled:!1},wt[new s.OverscaledTileID(W.overscaledZ,W.wrap,ae.z,ae.x,ae.y-1).key]={backfilled:!1},wt[new s.OverscaledTileID(W.overscaledZ,at,ae.z,Xe,ae.y-1).key]={backfilled:!1}),ae.y+1<_e&&(wt[new s.OverscaledTileID(W.overscaledZ,He,ae.z,Re,ae.y+1).key]={backfilled:!1},wt[new s.OverscaledTileID(W.overscaledZ,W.wrap,ae.z,ae.x,ae.y+1).key]={backfilled:!1},wt[new s.OverscaledTileID(W.overscaledZ,at,ae.z,Xe,ae.y+1).key]={backfilled:!1}),wt},$.prototype.unloadTile=function(W){W.demTexture&&this.map.painter.saveTileTexture(W.demTexture),W.fbo&&(W.fbo.destroy(),delete W.fbo),W.dem&&delete W.dem,delete W.neighboringTiles,W.state="unloaded",W.actor&&W.actor.send("removeDEMTile",{uid:W.uid,source:this.id})},$}(U),G=function(q){function $(W,ae,_e,Re){q.call(this),this.id=W,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=_e.getActor(),this.setEventedParent(Re),this._data=ae.data,this._options=s.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 He=s.EXTENT/this.tileSize;this.workerOptions=s.extend({source:this.id,cluster:ae.cluster||!1,geojsonVtOptions:{buffer:(ae.buffer!==void 0?ae.buffer:128)*He,tolerance:(ae.tolerance!==void 0?ae.tolerance:.375)*He,extent:s.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:s.EXTENT,radius:(ae.clusterRadius||50)*He,log:!1,generateId:ae.generateId||!1},clusterProperties:ae.clusterProperties},ae.workerOptions)}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.load=function(){var W=this;this.fire(new s.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(ae){if(ae)W.fire(new s.ErrorEvent(ae));else{var _e={dataType:"source",sourceDataType:"metadata"};W._collectResourceTiming&&W._resourceTiming&&W._resourceTiming.length>0&&(_e.resourceTiming=W._resourceTiming,W._resourceTiming=[]),W.fire(new s.Event("data",_e))}})},$.prototype.onAdd=function(W){this.map=W,this.load()},$.prototype.setData=function(W){var ae=this;return this._data=W,this.fire(new s.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(_e){if(_e)ae.fire(new s.ErrorEvent(_e));else{var Re={dataType:"source",sourceDataType:"content"};ae._collectResourceTiming&&ae._resourceTiming&&ae._resourceTiming.length>0&&(Re.resourceTiming=ae._resourceTiming,ae._resourceTiming=[]),ae.fire(new s.Event("data",Re))}}),this},$.prototype.getClusterExpansionZoom=function(W,ae){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:W,source:this.id},ae),this},$.prototype.getClusterChildren=function(W,ae){return this.actor.send("geojson.getClusterChildren",{clusterId:W,source:this.id},ae),this},$.prototype.getClusterLeaves=function(W,ae,_e,Re){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:W,limit:ae,offset:_e},Re),this},$.prototype._updateWorkerData=function(W){var ae=this;this._loaded=!1;var _e=s.extend({},this.workerOptions),Re=this._data;typeof Re=="string"?(_e.request=this.map._requestManager.transformRequest(s.browser.resolveURL(Re),s.ResourceType.Source),_e.request.collectResourceTiming=this._collectResourceTiming):_e.data=JSON.stringify(Re),this.actor.send(this.type+".loadData",_e,function(He,Xe){ae._removed||Xe&&Xe.abandoned||(ae._loaded=!0,Xe&&Xe.resourceTiming&&Xe.resourceTiming[ae.id]&&(ae._resourceTiming=Xe.resourceTiming[ae.id].slice(0)),ae.actor.send(ae.type+".coalesce",{source:_e.source},null),W(He))})},$.prototype.loaded=function(){return this._loaded},$.prototype.loadTile=function(W,ae){var _e=this,Re=W.actor?"reloadTile":"loadTile";W.actor=this.actor;var He={type:this.type,uid:W.uid,tileID:W.tileID,zoom:W.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:s.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};W.request=this.actor.send(Re,He,function(Xe,at){return delete W.request,W.unloadVectorData(),W.aborted?ae(null):Xe?ae(Xe):(W.loadVectorData(at,_e.map.painter,Re==="reloadTile"),ae(null))})},$.prototype.abortTile=function(W){W.request&&(W.request.cancel(),delete W.request),W.aborted=!0},$.prototype.unloadTile=function(W){W.unloadVectorData(),this.actor.send("removeTile",{uid:W.uid,type:this.type,source:this.id})},$.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},$.prototype.serialize=function(){return s.extend({},this._options,{type:this.type,data:this._data})},$.prototype.hasTransition=function(){return!1},$}(s.Evented),N=s.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),j=function(q){function $(W,ae,_e,Re){q.call(this),this.id=W,this.dispatcher=_e,this.coordinates=ae.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Re),this.options=ae}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.load=function(W,ae){var _e=this;this._loaded=!1,this.fire(new s.Event("dataloading",{dataType:"source"})),this.url=this.options.url,s.getImage(this.map._requestManager.transformRequest(this.url,s.ResourceType.Image),function(Re,He){_e._loaded=!0,Re?_e.fire(new s.ErrorEvent(Re)):He&&(_e.image=He,W&&(_e.coordinates=W),ae&&ae(),_e._finishLoading())})},$.prototype.loaded=function(){return this._loaded},$.prototype.updateImage=function(W){var ae=this;return this.image&&W.url?(this.options.url=W.url,this.load(W.coordinates,function(){ae.texture=null}),this):this},$.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new s.Event("data",{dataType:"source",sourceDataType:"metadata"})))},$.prototype.onAdd=function(W){this.map=W,this.load()},$.prototype.setCoordinates=function(W){var ae=this;this.coordinates=W;var _e=W.map(s.MercatorCoordinate.fromLngLat);this.tileID=function(He){for(var Xe=1/0,at=1/0,wt=-1/0,At=-1/0,ie=0,ve=He;ieae.end(0)?this.fire(new s.ErrorEvent(new s.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+ae.start(0)+" and "+ae.end(0)+"-second mark."))):this.video.currentTime=W}},$.prototype.getVideo=function(){return this.video},$.prototype.onAdd=function(W){this.map||(this.map=W,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},$.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var W=this.map.painter.context,ae=W.gl;for(var _e in this.boundsBuffer||(this.boundsBuffer=W.createVertexBuffer(this._boundsArray,N.members)),this.boundsSegments||(this.boundsSegments=s.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(ae.LINEAR,ae.CLAMP_TO_EDGE),ae.texSubImage2D(ae.TEXTURE_2D,0,0,0,ae.RGBA,ae.UNSIGNED_BYTE,this.video)):(this.texture=new s.Texture(W,this.video,ae.RGBA),this.texture.bind(ae.LINEAR,ae.CLAMP_TO_EDGE)),this.tiles){var Re=this.tiles[_e];Re.state!=="loaded"&&(Re.state="loaded",Re.texture=this.texture)}}},$.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},$.prototype.hasTransition=function(){return this.video&&!this.video.paused},$}(j),H=function(q){function $(W,ae,_e,Re){q.call(this,W,ae,_e,Re),ae.coordinates?Array.isArray(ae.coordinates)&&ae.coordinates.length===4&&!ae.coordinates.some(function(He){return!Array.isArray(He)||He.length!==2||He.some(function(Xe){return typeof Xe!="number"})})||this.fire(new s.ErrorEvent(new s.ValidationError("sources."+W,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new s.ErrorEvent(new s.ValidationError("sources."+W,null,'missing required property "coordinates"'))),ae.animate&&typeof ae.animate!="boolean"&&this.fire(new s.ErrorEvent(new s.ValidationError("sources."+W,null,'optional "animate" property must be a boolean value'))),ae.canvas?typeof ae.canvas=="string"||ae.canvas instanceof s.window.HTMLCanvasElement||this.fire(new s.ErrorEvent(new s.ValidationError("sources."+W,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 s.ErrorEvent(new s.ValidationError("sources."+W,null,'missing required property "canvas"'))),this.options=ae,this.animate=ae.animate===void 0||ae.animate}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof s.window.HTMLCanvasElement?this.options.canvas:s.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new s.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},$.prototype.getCanvas=function(){return this.canvas},$.prototype.onAdd=function(W){this.map=W,this.load(),this.canvas&&this.animate&&this.play()},$.prototype.onRemove=function(){this.pause()},$.prototype.prepare=function(){var W=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,W=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,W=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var ae=this.map.painter.context,_e=ae.gl;for(var Re in this.boundsBuffer||(this.boundsBuffer=ae.createVertexBuffer(this._boundsArray,N.members)),this.boundsSegments||(this.boundsSegments=s.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(W||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new s.Texture(ae,this.canvas,_e.RGBA,{premultiply:!0}),this.tiles){var He=this.tiles[Re];He.state!=="loaded"&&(He.state="loaded",He.texture=this.texture)}}},$.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},$.prototype.hasTransition=function(){return this._playing},$.prototype._hasInvalidDimensions=function(){for(var W=0,ae=[this.canvas.width,this.canvas.height];Wthis.max){var He=this._getAndRemoveByKey(this.order[0]);He&&this.onRemove(He)}return this},K.prototype.has=function(q){return q.wrapped().key in this.data},K.prototype.getAndRemove=function(q){return this.has(q)?this._getAndRemoveByKey(q.wrapped().key):null},K.prototype._getAndRemoveByKey=function(q){var $=this.data[q].shift();return $.timeout&&clearTimeout($.timeout),this.data[q].length===0&&delete this.data[q],this.order.splice(this.order.indexOf(q),1),$.value},K.prototype.getByKey=function(q){var $=this.data[q];return $?$[0].value:null},K.prototype.get=function(q){return this.has(q)?this.data[q.wrapped().key][0].value:null},K.prototype.remove=function(q,$){if(!this.has(q))return this;var W=q.wrapped().key,ae=$===void 0?0:this.data[W].indexOf($),_e=this.data[W][ae];return this.data[W].splice(ae,1),_e.timeout&&clearTimeout(_e.timeout),this.data[W].length===0&&delete this.data[W],this.onRemove(_e.value),this.order.splice(this.order.indexOf(W),1),this},K.prototype.setMaxSize=function(q){for(this.max=q;this.order.length>this.max;){var $=this._getAndRemoveByKey(this.order[0]);$&&this.onRemove($)}return this},K.prototype.filter=function(q){var $=[];for(var W in this.data)for(var ae=0,_e=this.data[W];ae<_e.length;ae+=1){var Re=_e[ae];q(Re.value)||$.push(Re)}for(var He=0,Xe=$;He1||(Math.abs(At)>1&&(Math.abs(At+ve)===1?At+=ve:Math.abs(At-ve)===1&&(At-=ve)),wt.dem&&at.dem&&(at.dem.backfillBorder(wt.dem,At,ie),at.neighboringTiles&&at.neighboringTiles[Le]&&(at.neighboringTiles[Le].backfilled=!0)))}},$.prototype.getTile=function(W){return this.getTileByID(W.key)},$.prototype.getTileByID=function(W){return this._tiles[W]},$.prototype._retainLoadedChildren=function(W,ae,_e,Re){for(var He in this._tiles){var Xe=this._tiles[He];if(!(Re[He]||!Xe.hasData()||Xe.tileID.overscaledZ<=ae||Xe.tileID.overscaledZ>_e)){for(var at=Xe.tileID;Xe&&Xe.tileID.overscaledZ>ae+1;){var wt=Xe.tileID.scaledTo(Xe.tileID.overscaledZ-1);(Xe=this._tiles[wt.key])&&Xe.hasData()&&(at=wt)}for(var At=at;At.overscaledZ>ae;)if(W[(At=At.scaledTo(At.overscaledZ-1)).key]){Re[at.key]=at;break}}}},$.prototype.findLoadedParent=function(W,ae){if(W.key in this._loadedParentTiles){var _e=this._loadedParentTiles[W.key];return _e&&_e.tileID.overscaledZ>=ae?_e:null}for(var Re=W.overscaledZ-1;Re>=ae;Re--){var He=W.scaledTo(Re),Xe=this._getLoadedTile(He);if(Xe)return Xe}},$.prototype._getLoadedTile=function(W){var ae=this._tiles[W.key];return ae&&ae.hasData()?ae:this._cache.getByKey(W.wrapped().key)},$.prototype.updateCacheSize=function(W){var ae=(Math.ceil(W.width/this._source.tileSize)+1)*(Math.ceil(W.height/this._source.tileSize)+1),_e=Math.floor(5*ae),Re=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,_e):_e;this._cache.setMaxSize(Re)},$.prototype.handleWrapJump=function(W){var ae=(W-(this._prevLng===void 0?W:this._prevLng))/360,_e=Math.round(ae);if(this._prevLng=W,_e){var Re={};for(var He in this._tiles){var Xe=this._tiles[He];Xe.tileID=Xe.tileID.unwrapTo(Xe.tileID.wrap+_e),Re[Xe.tileID.key]=Xe}for(var at in this._tiles=Re,this._timers)clearTimeout(this._timers[at]),delete this._timers[at];for(var wt in this._tiles){var At=this._tiles[wt];this._setTileReloadTimer(wt,At)}}},$.prototype.update=function(W){var ae=this;if(this.transform=W,this._sourceLoaded&&!this._paused){var _e;this.updateCacheSize(W),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?_e=W.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(Vt){return new s.OverscaledTileID(Vt.canonical.z,Vt.wrap,Vt.canonical.z,Vt.canonical.x,Vt.canonical.y)}):(_e=W.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(_e=_e.filter(function(Vt){return ae._source.hasTile(Vt)}))):_e=[];var Re=W.coveringZoomLevel(this._source),He=Math.max(Re-$.maxOverzooming,this._source.minzoom),Xe=Math.max(Re+$.maxUnderzooming,this._source.minzoom),at=this._updateRetainedTiles(_e,Re);if(Be(this._source.type)){for(var wt={},At={},ie=0,ve=Object.keys(at);iethis._source.maxzoom){var $e=Ve.children(this._source.maxzoom)[0],tt=this.getTile($e);if(tt&&tt.hasData()){_e[$e.key]=$e;continue}}else{var lt=Ve.children(this._source.maxzoom);if(_e[lt[0].key]&&_e[lt[1].key]&&_e[lt[2].key]&&_e[lt[3].key])continue}for(var gt=We.wasRequested(),zt=Ve.overscaledZ-1;zt>=He;--zt){var Ut=Ve.scaledTo(zt);if(Re[Ut.key]||(Re[Ut.key]=!0,!(We=this.getTile(Ut))&>&&(We=this._addTile(Ut)),We&&(_e[Ut.key]=Ut,gt=We.wasRequested(),We.hasData())))break}}}return _e},$.prototype._updateLoadedParentTileCache=function(){for(var W in this._loadedParentTiles={},this._tiles){for(var ae=[],_e=void 0,Re=this._tiles[W].tileID;Re.overscaledZ>0;){if(Re.key in this._loadedParentTiles){_e=this._loadedParentTiles[Re.key];break}ae.push(Re.key);var He=Re.scaledTo(Re.overscaledZ-1);if(_e=this._getLoadedTile(He))break;Re=He}for(var Xe=0,at=ae;Xe0||(ae.hasData()&&ae.state!=="reloading"?this._cache.add(ae.tileID,ae,ae.getExpiryTimeout()):(ae.aborted=!0,this._abortTile(ae),this._unloadTile(ae))))},$.prototype.clearTiles=function(){for(var W in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(W);this._cache.reset()},$.prototype.tilesIn=function(W,ae,_e){var Re=this,He=[],Xe=this.transform;if(!Xe)return He;for(var at=_e?Xe.getCameraQueryGeometry(W):W,wt=W.map(function(zt){return Xe.pointCoordinate(zt)}),At=at.map(function(zt){return Xe.pointCoordinate(zt)}),ie=this.getIds(),ve=1/0,Le=1/0,Fe=-1/0,Ve=-1/0,We=0,$e=At;We<$e.length;We+=1){var tt=$e[We];ve=Math.min(ve,tt.x),Le=Math.min(Le,tt.y),Fe=Math.max(Fe,tt.x),Ve=Math.max(Ve,tt.y)}for(var lt=function(zt){var Ut=Re._tiles[ie[zt]];if(!Ut.holdingForFade()){var Vt=Ut.tileID,Qt=Math.pow(2,Xe.zoom-Ut.tileID.overscaledZ),gn=ae*Ut.queryPadding*s.EXTENT/Ut.tileSize/Qt,en=[Vt.getTilePoint(new s.MercatorCoordinate(ve,Le)),Vt.getTilePoint(new s.MercatorCoordinate(Fe,Ve))];if(en[0].x-gn=0&&en[1].y+gn>=0){var sn=wt.map(function(Mn){return Vt.getTilePoint(Mn)}),rn=At.map(function(Mn){return Vt.getTilePoint(Mn)});He.push({tile:Ut,tileID:Vt,queryGeometry:sn,cameraQueryGeometry:rn,scale:Qt})}}},gt=0;gt=s.browser.now())return!0}return!1},$.prototype.setFeatureState=function(W,ae,_e){W=W||"_geojsonTileLayer",this._state.updateState(W,ae,_e)},$.prototype.removeFeatureState=function(W,ae,_e){W=W||"_geojsonTileLayer",this._state.removeFeatureState(W,ae,_e)},$.prototype.getFeatureState=function(W,ae){return W=W||"_geojsonTileLayer",this._state.getState(W,ae)},$.prototype.setDependencies=function(W,ae,_e){var Re=this._tiles[W];Re&&Re.setDependencies(ae,_e)},$.prototype.reloadTilesForDependencies=function(W,ae){for(var _e in this._tiles)this._tiles[_e].hasDependency(W,ae)&&this._reloadTile(_e,"reloading");this._cache.filter(function(Re){return!Re.hasDependency(W,ae)})},$}(s.Evented);function Oe(q,$){var W=Math.abs(2*q.wrap)-+(q.wrap<0),ae=Math.abs(2*$.wrap)-+($.wrap<0);return q.overscaledZ-$.overscaledZ||ae-W||$.canonical.y-q.canonical.y||$.canonical.x-q.canonical.x}function Be(q){return q==="raster"||q==="image"||q==="video"}function Qe(){return new s.window.Worker(kt.workerUrl)}ht.maxOverzooming=10,ht.maxUnderzooming=3;var ut="mapboxgl_preloaded_worker_pool",pt=function(){this.active={}};pt.prototype.acquire=function(q){if(!this.workers)for(this.workers=[];this.workers.length0?(ae-Re)/He:0;return this.points[_e].mult(1-Xe).add(this.points[$].mult(Xe))};var kn=function(q,$,W){var ae=this.boxCells=[],_e=this.circleCells=[];this.xCellCount=Math.ceil(q/W),this.yCellCount=Math.ceil($/W);for(var Re=0;Re=-$[0]&&W<=$[0]&&ae>=-$[1]&&ae<=$[1]}function hn(q,$,W,ae,_e,Re,He,Xe){var at=ae?q.textSizeData:q.iconSizeData,wt=s.evaluateSizeForZoom(at,W.transform.zoom),At=[256/W.width*2+1,256/W.height*2+1],ie=ae?q.text.dynamicLayoutVertexArray:q.icon.dynamicLayoutVertexArray;ie.clear();for(var ve=q.lineVertexArray,Le=ae?q.text.placedSymbolArray:q.icon.placedSymbolArray,Fe=W.transform.width/W.transform.height,Ve=!1,We=0;WeMath.abs(W.x-$.x)*ae?{useVertical:!0}:(q===s.WritingMode.vertical?$.yW.x)?{needsFlipping:!0}:null}function Nn(q,$,W,ae,_e,Re,He,Xe,at,wt,At,ie,ve,Le){var Fe,Ve=$/24,We=q.lineOffsetX*Ve,$e=q.lineOffsetY*Ve;if(q.numGlyphs>1){var tt=q.glyphStartIndex+q.numGlyphs,lt=q.lineStartIndex,gt=q.lineStartIndex+q.lineLength,zt=In(Ve,Xe,We,$e,W,At,ie,q,at,Re,ve);if(!zt)return{notEnoughRoom:!0};var Ut=on(zt.first.point,He).point,Vt=on(zt.last.point,He).point;if(ae&&!W){var Qt=Cn(q.writingMode,Ut,Vt,Le);if(Qt)return Qt}Fe=[zt.first];for(var gn=q.glyphStartIndex+1;gn0?Mn.point:Hn(ie,rn,en,1,_e),an=Cn(q.writingMode,en,xn,Le);if(an)return an}var zn=qn(Ve*Xe.getoffsetX(q.glyphStartIndex),We,$e,W,At,ie,q.segment,q.lineStartIndex,q.lineStartIndex+q.lineLength,at,Re,ve);if(!zn)return{notEnoughRoom:!0};Fe=[zn]}for(var Un=0,nr=Fe;Un0?1:-1,Fe=0;ae&&(Le*=-1,Fe=Math.PI),Le<0&&(Fe+=Math.PI);for(var Ve=Le>0?Xe+He:Xe+He+1,We=_e,$e=_e,tt=0,lt=0,gt=Math.abs(ve),zt=[];tt+lt<=gt;){if((Ve+=Le)=at)return null;if($e=We,zt.push(We),(We=ie[Ve])===void 0){var Ut=new s.Point(wt.getx(Ve),wt.gety(Ve)),Vt=on(Ut,At);if(Vt.signedDistanceFromCamera>0)We=ie[Ve]=Vt.point;else{var Qt=Ve-Le;We=Hn(tt===0?Re:new s.Point(wt.getx(Qt),wt.gety(Qt)),Ut,$e,gt-tt+1,At)}}tt+=lt,lt=$e.dist(We)}var gn=(gt-tt)/lt,en=We.sub($e),sn=en.mult(gn)._add($e);sn._add(en._unit()._perp()._mult(W*Le));var rn=Fe+Math.atan2(We.y-$e.y,We.x-$e.x);return zt.push(sn),{point:sn,angle:rn,path:zt}}kn.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},kn.prototype.insert=function(q,$,W,ae,_e){this._forEachCell($,W,ae,_e,this._insertBoxCell,this.boxUid++),this.boxKeys.push(q),this.bboxes.push($),this.bboxes.push(W),this.bboxes.push(ae),this.bboxes.push(_e)},kn.prototype.insertCircle=function(q,$,W,ae){this._forEachCell($-ae,W-ae,$+ae,W+ae,this._insertCircleCell,this.circleUid++),this.circleKeys.push(q),this.circles.push($),this.circles.push(W),this.circles.push(ae)},kn.prototype._insertBoxCell=function(q,$,W,ae,_e,Re){this.boxCells[_e].push(Re)},kn.prototype._insertCircleCell=function(q,$,W,ae,_e,Re){this.circleCells[_e].push(Re)},kn.prototype._query=function(q,$,W,ae,_e,Re){if(W<0||q>this.width||ae<0||$>this.height)return!_e&&[];var He=[];if(q<=0&&$<=0&&this.width<=W&&this.height<=ae){if(_e)return!0;for(var Xe=0;Xe0:He},kn.prototype._queryCircle=function(q,$,W,ae,_e){var Re=q-W,He=q+W,Xe=$-W,at=$+W;if(He<0||Re>this.width||at<0||Xe>this.height)return!ae&&[];var wt=[],At={hitTest:ae,circle:{x:q,y:$,radius:W},seenUids:{box:{},circle:{}}};return this._forEachCell(Re,Xe,He,at,this._queryCellCircle,wt,At,_e),ae?wt.length>0:wt},kn.prototype.query=function(q,$,W,ae,_e){return this._query(q,$,W,ae,!1,_e)},kn.prototype.hitTest=function(q,$,W,ae,_e){return this._query(q,$,W,ae,!0,_e)},kn.prototype.hitTestCircle=function(q,$,W,ae){return this._queryCircle(q,$,W,!0,ae)},kn.prototype._queryCell=function(q,$,W,ae,_e,Re,He,Xe){var at=He.seenUids,wt=this.boxCells[_e];if(wt!==null)for(var At=this.bboxes,ie=0,ve=wt;ie=At[Fe+0]&&ae>=At[Fe+1]&&(!Xe||Xe(this.boxKeys[Le]))){if(He.hitTest)return Re.push(!0),!0;Re.push({key:this.boxKeys[Le],x1:At[Fe],y1:At[Fe+1],x2:At[Fe+2],y2:At[Fe+3]})}}}var Ve=this.circleCells[_e];if(Ve!==null)for(var We=this.circles,$e=0,tt=Ve;$eHe*He+Xe*Xe},kn.prototype._circleAndRectCollide=function(q,$,W,ae,_e,Re,He){var Xe=(Re-ae)/2,at=Math.abs(q-(ae+Xe));if(at>Xe+W)return!1;var wt=(He-_e)/2,At=Math.abs($-(_e+wt));if(At>wt+W)return!1;if(at<=Xe||At<=wt)return!0;var ie=at-Xe,ve=At-wt;return ie*ie+ve*ve<=W*W};var or=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function tr(q,$){for(var W=0;W=1;xn--)Mn.push(sn.path[xn]);for(var an=1;an0){for(var rr=Mn[0].clone(),wr=Mn[0].clone(),kr=1;kr=Qt.x&&wr.x<=gn.x&&rr.y>=Qt.y&&wr.y<=gn.y?[Mn]:wr.xgn.x||wr.ygn.y?[]:s.clipLine([Mn],Qt.x,Qt.y,gn.x,gn.y)}for(var mr=0,_r=nr;mr<_r.length;mr+=1){var Rr=_r[mr];en.reset(Rr,.25*Vt);var Jr;Jr=en.length<=.5*Vt?1:Math.ceil(en.paddedLength/zn)+1;for(var Kr=0;Kr=this.screenRightBoundary||aethis.screenBottomBoundary},ir.prototype.isInsideGrid=function(q,$,W,ae){return W>=0&&q=0&&$0?(this.prevPlacement&&this.prevPlacement.variableOffsets[ie.crossTileID]&&this.prevPlacement.placements[ie.crossTileID]&&this.prevPlacement.placements[ie.crossTileID].text&&(Ve=this.prevPlacement.variableOffsets[ie.crossTileID].anchor),this.variableOffsets[ie.crossTileID]={textOffset:We,width:W,height:ae,anchor:q,textBoxScale:_e,prevAnchor:Ve},this.markUsedJustification(ve,q,ie,Le),ve.allowVerticalPlacement&&(this.markUsedOrientation(ve,Le,ie),this.placedOrientations[ie.crossTileID]=Le),{shift:$e,placedGlyphBoxes:tt}):void 0},Qn.prototype.placeLayerBucketPart=function(q,$,W){var ae=this,_e=q.parameters,Re=_e.bucket,He=_e.layout,Xe=_e.posMatrix,at=_e.textLabelPlaneMatrix,wt=_e.labelToScreenMatrix,At=_e.textPixelRatio,ie=_e.holdingForFade,ve=_e.collisionBoxArray,Le=_e.partiallyEvaluatedTextSize,Fe=_e.collisionGroup,Ve=He.get("text-optional"),We=He.get("icon-optional"),$e=He.get("text-allow-overlap"),tt=He.get("icon-allow-overlap"),lt=He.get("text-rotation-alignment")==="map",gt=He.get("text-pitch-alignment")==="map",zt=He.get("icon-text-fit")!=="none",Ut=He.get("symbol-z-order")==="viewport-y",Vt=$e&&(tt||!Re.hasIconData()||We),Qt=tt&&($e||!Re.hasTextData()||Ve);!Re.collisionArrays&&ve&&Re.deserializeCollisionBoxes(ve);var gn=function(an,zn){if(!$[an.crossTileID])if(ie)ae.placements[an.crossTileID]=new mn(!1,!1,!1);else{var Un,nr=!1,rr=!1,wr=!0,kr=null,mr={box:null,offscreen:null},_r={box:null,offscreen:null},Rr=null,Jr=null,Kr=0,xr=0,zr=0;zn.textFeatureIndex?Kr=zn.textFeatureIndex:an.useRuntimeCollisionCircles&&(Kr=an.featureIndex),zn.verticalTextFeatureIndex&&(xr=zn.verticalTextFeatureIndex);var Wr=zn.textBox;if(Wr){var Gr=function(ai){var na=s.WritingMode.horizontal;if(Re.allowVerticalPlacement&&!ai&&ae.prevPlacement){var Ba=ae.prevPlacement.placedOrientations[an.crossTileID];Ba&&(ae.placedOrientations[an.crossTileID]=Ba,na=Ba,ae.markUsedOrientation(Re,na,an))}return na},ii=function(ai,na){if(Re.allowVerticalPlacement&&an.numVerticalGlyphVertices>0&&zn.verticalTextBox)for(var Ba=0,Kl=Re.writingModes;Ba0&&(ni=ni.filter(function(ai){return ai!==ui.anchor})).unshift(ui.anchor)}var ki=function(ai,na,Ba){for(var Kl=ai.x2-ai.x1,h1=ai.y2-ai.y1,vh=an.textBoxScale,p1=zt&&!tt?na:null,Wu={box:[],offscreen:!1},Xp=$e?2*ni.length:ni.length,Lc=0;Lc=ni.length,ku=ae.attemptAnchorPlacement(Zu,ai,Kl,h1,vh,lt,gt,At,Xe,Fe,d1,an,Re,Ba,p1);if(ku&&(Wu=ku.placedGlyphBoxes)&&Wu.box&&Wu.box.length){nr=!0,kr=ku.shift;break}}return Wu};ii(function(){return ki(Wr,zn.iconBox,s.WritingMode.horizontal)},function(){var ai=zn.verticalTextBox,na=mr&&mr.box&&mr.box.length;return Re.allowVerticalPlacement&&!na&&an.numVerticalGlyphVertices>0&&ai?ki(ai,zn.verticalIconBox,s.WritingMode.vertical):{box:null,offscreen:null}}),mr&&(nr=mr.box,wr=mr.offscreen);var Ii=Gr(mr&&mr.box);if(!nr&&ae.prevPlacement){var Ei=ae.prevPlacement.variableOffsets[an.crossTileID];Ei&&(ae.variableOffsets[an.crossTileID]=Ei,ae.markUsedJustification(Re,Ei.anchor,an,Ii))}}else{var wi=function(ai,na){var Ba=ae.collisionIndex.placeCollisionBox(ai,$e,At,Xe,Fe.predicate);return Ba&&Ba.box&&Ba.box.length&&(ae.markUsedOrientation(Re,na,an),ae.placedOrientations[an.crossTileID]=na),Ba};ii(function(){return wi(Wr,s.WritingMode.horizontal)},function(){var ai=zn.verticalTextBox;return Re.allowVerticalPlacement&&an.numVerticalGlyphVertices>0&&ai?wi(ai,s.WritingMode.vertical):{box:null,offscreen:null}}),Gr(mr&&mr.box&&mr.box.length)}}if(nr=(Un=mr)&&Un.box&&Un.box.length>0,wr=Un&&Un.offscreen,an.useRuntimeCollisionCircles){var Ai=Re.text.placedSymbolArray.get(an.centerJustifiedTextSymbolIndex),Ci=s.evaluateSizeForFeature(Re.textSizeData,Le,Ai),qi=He.get("text-padding"),_s=an.collisionCircleDiameter;Rr=ae.collisionIndex.placeCollisionCircles($e,Ai,Re.lineVertexArray,Re.glyphOffsetArray,Ci,Xe,at,wt,W,gt,Fe.predicate,_s,qi),nr=$e||Rr.circles.length>0&&!Rr.collisionDetected,wr=wr&&Rr.offscreen}if(zn.iconFeatureIndex&&(zr=zn.iconFeatureIndex),zn.iconBox){var ta=function(ai){var na=zt&&kr?Zn(ai,kr.x,kr.y,lt,gt,ae.transform.angle):ai;return ae.collisionIndex.placeCollisionBox(na,tt,At,Xe,Fe.predicate)};rr=_r&&_r.box&&_r.box.length&&zn.verticalIconBox?(Jr=ta(zn.verticalIconBox)).box.length>0:(Jr=ta(zn.iconBox)).box.length>0,wr=wr&&Jr.offscreen}var Yr=Ve||an.numHorizontalGlyphVertices===0&&an.numVerticalGlyphVertices===0,pa=We||an.numIconVertices===0;if(Yr||pa?pa?Yr||(rr=rr&&nr):nr=rr&&nr:rr=nr=rr&&nr,nr&&Un&&Un.box&&(_r&&_r.box&&xr?ae.collisionIndex.insertCollisionBox(Un.box,He.get("text-ignore-placement"),Re.bucketInstanceId,xr,Fe.ID):ae.collisionIndex.insertCollisionBox(Un.box,He.get("text-ignore-placement"),Re.bucketInstanceId,Kr,Fe.ID)),rr&&Jr&&ae.collisionIndex.insertCollisionBox(Jr.box,He.get("icon-ignore-placement"),Re.bucketInstanceId,zr,Fe.ID),Rr&&(nr&&ae.collisionIndex.insertCollisionCircles(Rr.circles,He.get("text-ignore-placement"),Re.bucketInstanceId,Kr,Fe.ID),W)){var wa=Re.bucketInstanceId,Ui=ae.collisionCircleArrays[wa];Ui===void 0&&(Ui=ae.collisionCircleArrays[wa]=new Ln);for(var ko=0;ko=0;--sn){var rn=en[sn];gn(Re.symbolInstances.get(rn),Re.collisionArrays[rn])}else for(var Mn=q.symbolInstanceStart;Mn=0&&(q.text.placedSymbolArray.get(at).crossTileID=_e>=0&&at!==_e?0:W.crossTileID)}},Qn.prototype.markUsedOrientation=function(q,$,W){for(var ae=$===s.WritingMode.horizontal||$===s.WritingMode.horizontalOnly?$:0,_e=$===s.WritingMode.vertical?$:0,Re=0,He=[W.leftJustifiedTextSymbolIndex,W.centerJustifiedTextSymbolIndex,W.rightJustifiedTextSymbolIndex];Re0||gt>0,gn=tt.numIconVertices>0,en=ae.placedOrientations[tt.crossTileID],sn=en===s.WritingMode.vertical,rn=en===s.WritingMode.horizontal||en===s.WritingMode.horizontalOnly;if(Qt){var Mn=Sn(Vt.text),xn=sn?pn:Mn;Le(q.text,lt,xn);var an=rn?pn:Mn;Le(q.text,gt,an);var zn=Vt.text.isHidden();[tt.rightJustifiedTextSymbolIndex,tt.centerJustifiedTextSymbolIndex,tt.leftJustifiedTextSymbolIndex].forEach(function(zr){zr>=0&&(q.text.placedSymbolArray.get(zr).hidden=zn||sn?1:0)}),tt.verticalPlacedTextSymbolIndex>=0&&(q.text.placedSymbolArray.get(tt.verticalPlacedTextSymbolIndex).hidden=zn||rn?1:0);var Un=ae.variableOffsets[tt.crossTileID];Un&&ae.markUsedJustification(q,Un.anchor,tt,en);var nr=ae.placedOrientations[tt.crossTileID];nr&&(ae.markUsedJustification(q,"left",tt,nr),ae.markUsedOrientation(q,nr,tt))}if(gn){var rr=Sn(Vt.icon),wr=!(ie&&tt.verticalPlacedIconSymbolIndex&&sn);if(tt.placedIconSymbolIndex>=0){var kr=wr?rr:pn;Le(q.icon,tt.numIconVertices,kr),q.icon.placedSymbolArray.get(tt.placedIconSymbolIndex).hidden=Vt.icon.isHidden()}if(tt.verticalPlacedIconSymbolIndex>=0){var mr=wr?pn:rr;Le(q.icon,tt.numVerticalIconVertices,mr),q.icon.placedSymbolArray.get(tt.verticalPlacedIconSymbolIndex).hidden=Vt.icon.isHidden()}}if(q.hasIconCollisionBoxData()||q.hasTextCollisionBoxData()){var _r=q.collisionArrays[$e];if(_r){var Rr=new s.Point(0,0);if(_r.textBox||_r.verticalTextBox){var Jr=!0;if(at){var Kr=ae.variableOffsets[zt];Kr?(Rr=$n(Kr.anchor,Kr.width,Kr.height,Kr.textOffset,Kr.textBoxScale),wt&&Rr._rotate(At?ae.transform.angle:-ae.transform.angle)):Jr=!1}_r.textBox&&hr(q.textCollisionBox.collisionVertexArray,Vt.text.placed,!Jr||sn,Rr.x,Rr.y),_r.verticalTextBox&&hr(q.textCollisionBox.collisionVertexArray,Vt.text.placed,!Jr||rn,Rr.x,Rr.y)}var xr=!!(!rn&&_r.verticalIconBox);_r.iconBox&&hr(q.iconCollisionBox.collisionVertexArray,Vt.icon.placed,xr,ie?Rr.x:0,ie?Rr.y:0),_r.verticalIconBox&&hr(q.iconCollisionBox.collisionVertexArray,Vt.icon.placed,!xr,ie?Rr.x:0,ie?Rr.y:0)}}},Ve=0;Veq},Qn.prototype.setStale=function(){this.stale=!0};var tn=Math.pow(2,25),Pn=Math.pow(2,24),jt=Math.pow(2,17),Jt=Math.pow(2,16),un=Math.pow(2,9),Rn=Math.pow(2,8),On=Math.pow(2,1);function Sn(q){if(q.opacity===0&&!q.placed)return 0;if(q.opacity===1&&q.placed)return 4294967295;var $=q.placed?1:0,W=Math.floor(127*q.opacity);return W*tn+$*Pn+W*jt+$*Jt+W*un+$*Rn+W*On+$}var pn=0,bn=function(q){this._sortAcrossTiles=q.layout.get("symbol-z-order")!=="viewport-y"&&q.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};bn.prototype.continuePlacement=function(q,$,W,ae,_e){for(var Re=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var He=$[q[this._currentPlacementIndex]],Xe=this.placement.collisionIndex.transform.zoom;if(He.type==="symbol"&&(!He.minzoom||He.minzoom<=Xe)&&(!He.maxzoom||He.maxzoom>Xe)){if(this._inProgressLayer||(this._inProgressLayer=new bn(He)),this._inProgressLayer.continuePlacement(W[He.source],this.placement,this._showCollisionBoxes,He,Re))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},dn.prototype.commit=function(q){return this.placement.commit(q),this.placement};var vn=512/s.EXTENT/2,An=function(q,$,W){this.tileID=q,this.indexedSymbolInstances={},this.bucketInstanceId=W;for(var ae=0;ae<$.length;ae++){var _e=$.get(ae),Re=_e.key;this.indexedSymbolInstances[Re]||(this.indexedSymbolInstances[Re]=[]),this.indexedSymbolInstances[Re].push({crossTileID:_e.crossTileID,coord:this.getScaledCoordinates(_e,q)})}};An.prototype.getScaledCoordinates=function(q,$){var W=$.canonical.z-this.tileID.canonical.z,ae=vn/Math.pow(2,W);return{x:Math.floor(($.canonical.x*s.EXTENT+q.anchorX)*ae),y:Math.floor(($.canonical.y*s.EXTENT+q.anchorY)*ae)}},An.prototype.findMatches=function(q,$,W){for(var ae=this.tileID.canonical.z<$.canonical.z?1:Math.pow(2,this.tileID.canonical.z-$.canonical.z),_e=0;_eq.overscaledZ)for(var Xe in He){var at=He[Xe];at.tileID.isChildOf(q)&&at.findMatches($.symbolInstances,q,_e)}else{var wt=He[q.scaledTo(Number(Re)).key];wt&&wt.findMatches($.symbolInstances,q,_e)}}for(var At=0;At<$.symbolInstances.length;At++){var ie=$.symbolInstances.get(At);ie.crossTileID||(ie.crossTileID=W.generate(),_e[ie.crossTileID]=!0)}return this.indexes[q.overscaledZ]===void 0&&(this.indexes[q.overscaledZ]={}),this.indexes[q.overscaledZ][q.key]=new An(q,$.symbolInstances,$.bucketInstanceId),!0},Xn.prototype.removeBucketCrossTileIDs=function(q,$){for(var W in $.indexedSymbolInstances)for(var ae=0,_e=$.indexedSymbolInstances[W];ae<_e.length;ae+=1){var Re=_e[ae];delete this.usedCrossTileIDs[q][Re.crossTileID]}},Xn.prototype.removeStaleBuckets=function(q){var $=!1;for(var W in this.indexes){var ae=this.indexes[W];for(var _e in ae)q[ae[_e].bucketInstanceId]||(this.removeBucketCrossTileIDs(W,ae[_e]),delete ae[_e],$=!0)}return $};var er=function(){this.layerIndexes={},this.crossTileIDs=new Bn,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};er.prototype.addLayer=function(q,$,W){var ae=this.layerIndexes[q.id];ae===void 0&&(ae=this.layerIndexes[q.id]=new Xn);var _e=!1,Re={};ae.handleWrapJump(W);for(var He=0,Xe=$;He1?"@2x":"",ie=s.getJSON(Re.transformRequest(Re.normalizeSpriteURL(_e,At,".json"),s.ResourceType.SpriteJSON),function(Fe,Ve){ie=null,wt||(wt=Fe,Xe=Ve,Le())}),ve=s.getImage(Re.transformRequest(Re.normalizeSpriteURL(_e,At,".png"),s.ResourceType.SpriteImage),function(Fe,Ve){ve=null,wt||(wt=Fe,at=Ve,Le())});function Le(){if(wt)He(wt);else if(Xe&&at){var Fe=s.browser.getImageData(at),Ve={};for(var We in Xe){var $e=Xe[We],tt=$e.width,lt=$e.height,gt=$e.x,zt=$e.y,Ut=$e.sdf,Vt=$e.pixelRatio,Qt=$e.stretchX,gn=$e.stretchY,en=$e.content,sn=new s.RGBAImage({width:tt,height:lt});s.RGBAImage.copy(Fe,sn,{x:gt,y:zt},{x:0,y:0},{width:tt,height:lt}),Ve[We]={data:sn,pixelRatio:Vt,sdf:Ut,stretchX:Qt,stretchY:gn,content:en}}He(null,Ve)}}return{cancel:function(){ie&&(ie.cancel(),ie=null),ve&&(ve.cancel(),ve=null)}}}(W,this.map._requestManager,function(_e,Re){if(ae._spriteRequest=null,_e)ae.fire(new s.ErrorEvent(_e));else if(Re)for(var He in Re)ae.imageManager.addImage(He,Re[He]);ae.imageManager.setLoaded(!0),ae._availableImages=ae.imageManager.listImages(),ae.dispatcher.broadcast("setImages",ae._availableImages),ae.fire(new s.Event("data",{dataType:"style"}))})},$.prototype._validateLayer=function(W){var ae=this.sourceCaches[W.source];if(ae){var _e=W.sourceLayer;if(_e){var Re=ae.getSource();(Re.type==="geojson"||Re.vectorLayerIds&&Re.vectorLayerIds.indexOf(_e)===-1)&&this.fire(new s.ErrorEvent(new Error('Source layer "'+_e+'" does not exist on source "'+Re.id+'" as specified by style layer "'+W.id+'"')))}}},$.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var W in this.sourceCaches)if(!this.sourceCaches[W].loaded())return!1;return!!this.imageManager.isLoaded()},$.prototype._serializeLayers=function(W){for(var ae=[],_e=0,Re=W;_e0)throw new Error("Unimplemented: "+Re.map(function(He){return He.command}).join(", ")+".");return _e.forEach(function(He){He.command!=="setTransition"&&ae[He.command].apply(ae,He.args)}),this.stylesheet=W,!0},$.prototype.addImage=function(W,ae){if(this.getImage(W))return this.fire(new s.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(W,ae),this._availableImages=this.imageManager.listImages(),this._changedImages[W]=!0,this._changed=!0,this.fire(new s.Event("data",{dataType:"style"}))},$.prototype.updateImage=function(W,ae){this.imageManager.updateImage(W,ae)},$.prototype.getImage=function(W){return this.imageManager.getImage(W)},$.prototype.removeImage=function(W){if(!this.getImage(W))return this.fire(new s.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(W),this._availableImages=this.imageManager.listImages(),this._changedImages[W]=!0,this._changed=!0,this.fire(new s.Event("data",{dataType:"style"}))},$.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},$.prototype.addSource=function(W,ae,_e){var Re=this;if(_e===void 0&&(_e={}),this._checkLoaded(),this.sourceCaches[W]!==void 0)throw new Error("There is already a source with this ID");if(!ae.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(ae).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(ae.type)>=0&&this._validate(s.validateStyle.source,"sources."+W,ae,null,_e))){this.map&&this.map._collectResourceTiming&&(ae.collectResourceTiming=!0);var He=this.sourceCaches[W]=new ht(W,ae,this.dispatcher);He.style=this,He.setEventedParent(this,function(){return{isSourceLoaded:Re.loaded(),source:He.serialize(),sourceId:W}}),He.onAdd(this.map),this._changed=!0}},$.prototype.removeSource=function(W){if(this._checkLoaded(),this.sourceCaches[W]===void 0)throw new Error("There is no source with this ID");for(var ae in this._layers)if(this._layers[ae].source===W)return this.fire(new s.ErrorEvent(new Error('Source "'+W+'" cannot be removed while layer "'+ae+'" is using it.')));var _e=this.sourceCaches[W];delete this.sourceCaches[W],delete this._updatedSources[W],_e.fire(new s.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:W})),_e.setEventedParent(null),_e.clearTiles(),_e.onRemove&&_e.onRemove(this.map),this._changed=!0},$.prototype.setGeoJSONSourceData=function(W,ae){this._checkLoaded(),this.sourceCaches[W].getSource().setData(ae),this._changed=!0},$.prototype.getSource=function(W){return this.sourceCaches[W]&&this.sourceCaches[W].getSource()},$.prototype.addLayer=function(W,ae,_e){_e===void 0&&(_e={}),this._checkLoaded();var Re=W.id;if(this.getLayer(Re))this.fire(new s.ErrorEvent(new Error('Layer with id "'+Re+'" already exists on this map')));else{var He;if(W.type==="custom"){if(Jn(this,s.validateCustomStyleLayer(W)))return;He=s.createStyleLayer(W)}else{if(typeof W.source=="object"&&(this.addSource(Re,W.source),W=s.clone$1(W),W=s.extend(W,{source:Re})),this._validate(s.validateStyle.layer,"layers."+Re,W,{arrayIndex:-1},_e))return;He=s.createStyleLayer(W),this._validateLayer(He),He.setEventedParent(this,{layer:{id:Re}}),this._serializedLayers[He.id]=He.serialize()}var Xe=ae?this._order.indexOf(ae):this._order.length;if(ae&&Xe===-1)this.fire(new s.ErrorEvent(new Error('Layer with id "'+ae+'" does not exist on this map.')));else{if(this._order.splice(Xe,0,Re),this._layerOrderChanged=!0,this._layers[Re]=He,this._removedLayers[Re]&&He.source&&He.type!=="custom"){var at=this._removedLayers[Re];delete this._removedLayers[Re],at.type!==He.type?this._updatedSources[He.source]="clear":(this._updatedSources[He.source]="reload",this.sourceCaches[He.source].pause())}this._updateLayer(He),He.onAdd&&He.onAdd(this.map)}}},$.prototype.moveLayer=function(W,ae){if(this._checkLoaded(),this._changed=!0,this._layers[W]){if(W!==ae){var _e=this._order.indexOf(W);this._order.splice(_e,1);var Re=ae?this._order.indexOf(ae):this._order.length;ae&&Re===-1?this.fire(new s.ErrorEvent(new Error('Layer with id "'+ae+'" does not exist on this map.'))):(this._order.splice(Re,0,W),this._layerOrderChanged=!0)}}else this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be moved.")))},$.prototype.removeLayer=function(W){this._checkLoaded();var ae=this._layers[W];if(ae){ae.setEventedParent(null);var _e=this._order.indexOf(W);this._order.splice(_e,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[W]=ae,delete this._layers[W],delete this._serializedLayers[W],delete this._updatedLayers[W],delete this._updatedPaintProps[W],ae.onRemove&&ae.onRemove(this.map)}else this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be removed.")))},$.prototype.getLayer=function(W){return this._layers[W]},$.prototype.hasLayer=function(W){return W in this._layers},$.prototype.setLayerZoomRange=function(W,ae,_e){this._checkLoaded();var Re=this.getLayer(W);Re?Re.minzoom===ae&&Re.maxzoom===_e||(ae!=null&&(Re.minzoom=ae),_e!=null&&(Re.maxzoom=_e),this._updateLayer(Re)):this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot have zoom extent.")))},$.prototype.setFilter=function(W,ae,_e){_e===void 0&&(_e={}),this._checkLoaded();var Re=this.getLayer(W);if(Re){if(!s.deepEqual(Re.filter,ae))return ae==null?(Re.filter=void 0,void this._updateLayer(Re)):void(this._validate(s.validateStyle.filter,"layers."+Re.id+".filter",ae,null,_e)||(Re.filter=s.clone$1(ae),this._updateLayer(Re)))}else this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be filtered.")))},$.prototype.getFilter=function(W){return s.clone$1(this.getLayer(W).filter)},$.prototype.setLayoutProperty=function(W,ae,_e,Re){Re===void 0&&(Re={}),this._checkLoaded();var He=this.getLayer(W);He?s.deepEqual(He.getLayoutProperty(ae),_e)||(He.setLayoutProperty(ae,_e,Re),this._updateLayer(He)):this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be styled.")))},$.prototype.getLayoutProperty=function(W,ae){var _e=this.getLayer(W);if(_e)return _e.getLayoutProperty(ae);this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style.")))},$.prototype.setPaintProperty=function(W,ae,_e,Re){Re===void 0&&(Re={}),this._checkLoaded();var He=this.getLayer(W);He?s.deepEqual(He.getPaintProperty(ae),_e)||(He.setPaintProperty(ae,_e,Re)&&this._updateLayer(He),this._changed=!0,this._updatedPaintProps[W]=!0):this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be styled.")))},$.prototype.getPaintProperty=function(W,ae){return this.getLayer(W).getPaintProperty(ae)},$.prototype.setFeatureState=function(W,ae){this._checkLoaded();var _e=W.source,Re=W.sourceLayer,He=this.sourceCaches[_e];if(He!==void 0){var Xe=He.getSource().type;Xe==="geojson"&&Re?this.fire(new s.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):Xe!=="vector"||Re?(W.id===void 0&&this.fire(new s.ErrorEvent(new Error("The feature id parameter must be provided."))),He.setFeatureState(Re,W.id,ae)):this.fire(new s.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new s.ErrorEvent(new Error("The source '"+_e+"' does not exist in the map's style.")))},$.prototype.removeFeatureState=function(W,ae){this._checkLoaded();var _e=W.source,Re=this.sourceCaches[_e];if(Re!==void 0){var He=Re.getSource().type,Xe=He==="vector"?W.sourceLayer:void 0;He!=="vector"||Xe?ae&&typeof W.id!="string"&&typeof W.id!="number"?this.fire(new s.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):Re.removeFeatureState(Xe,W.id,ae):this.fire(new s.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new s.ErrorEvent(new Error("The source '"+_e+"' does not exist in the map's style.")))},$.prototype.getFeatureState=function(W){this._checkLoaded();var ae=W.source,_e=W.sourceLayer,Re=this.sourceCaches[ae];if(Re!==void 0){if(Re.getSource().type!=="vector"||_e)return W.id===void 0&&this.fire(new s.ErrorEvent(new Error("The feature id parameter must be provided."))),Re.getFeatureState(_e,W.id);this.fire(new s.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new s.ErrorEvent(new Error("The source '"+ae+"' does not exist in the map's style.")))},$.prototype.getTransition=function(){return s.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},$.prototype.serialize=function(){return s.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:s.mapObject(this.sourceCaches,function(W){return W.serialize()}),layers:this._serializeLayers(this._order)},function(W){return W!==void 0})},$.prototype._updateLayer=function(W){this._updatedLayers[W.id]=!0,W.source&&!this._updatedSources[W.source]&&this.sourceCaches[W.source].getSource().type!=="raster"&&(this._updatedSources[W.source]="reload",this.sourceCaches[W.source].pause()),this._changed=!0},$.prototype._flattenAndSortRenderedFeatures=function(W){for(var ae=this,_e=function(en){return ae._layers[en].type==="fill-extrusion"},Re={},He=[],Xe=this._order.length-1;Xe>=0;Xe--){var at=this._order[Xe];if(_e(at)){Re[at]=Xe;for(var wt=0,At=W;wt=0;We--){var $e=this._order[We];if(_e($e))for(var tt=He.length-1;tt>=0;tt--){var lt=He[tt].feature;if(Re[lt.layer.id]2){for(var C=Array(.5*y.position.length),L=0;L2){for(var I=!y.position[0].length,R=t.mallocFloat(2*this.count),U=0,B=0;U1?k.align[ue]:k.align[0]:k.align;if(typeof me=="number")return me;switch(me){case"right":case"end":return-ne;case"center":case"centre":case"middle":return .5*-ne}return 0})),this.baseline==null&&y.baseline==null&&(y.baseline=0),y.baseline!=null&&(this.baseline=y.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(ne,ue){var me=(k.font[ue]||k.font[0]).metrics,we=0;return we+=.5*me.bottom,-1*(we+=typeof ne=="number"?ne-me.baseline:-me[ne])})),y.color!=null)if(y.color||(y.color="transparent"),typeof y.color!="string"&&isNaN(y.color)){var de;if(typeof y.color[0]=="number"&&y.color.length>this.counts.length){var he=y.color.length;de=t.mallocUint8(he);for(var ye=(y.color.subarray||y.color.slice).bind(y.color),ze=0;ze4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var Me=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array(Me);for(var Ce=0;Ce1?this.counts[Ce]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Ce]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*Ce,4*Ce+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Ce]:this.opacity,baseline:this.baselineOffset[Ce]!=null?this.baselineOffset[Ce]:this.baselineOffset[0],align:this.align?this.alignOffset[Ce]!=null?this.alignOffset[Ce]:this.alignOffset[0]:0,atlas:this.fontAtlas[Ce]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*Ce,2*Ce+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=[]},g.prototype.destroy=function(){},g.prototype.kerning=!0,g.prototype.position={constant:new Float32Array(2)},g.prototype.translate=null,g.prototype.scale=null,g.prototype.font=null,g.prototype.text="",g.prototype.positionOffset=[0,0],g.prototype.opacity=1,g.prototype.color=new Uint8Array([0,0,0,255]),g.prototype.alignOffset=[0,0],g.maxAtlasSize=1024,g.atlasCanvas=document.createElement("canvas"),g.atlasContext=g.atlasCanvas.getContext("2d",{alpha:!1}),g.baseFontSize=64,g.fonts={},D.exports=g},12018:function(D,E,e){var _=e(71299);function w(m){if(m.container)if(m.container==document.body)document.body.style.width||(m.canvas.width=m.width||m.pixelRatio*e.g.innerWidth),document.body.style.height||(m.canvas.height=m.height||m.pixelRatio*e.g.innerHeight);else{var f=m.container.getBoundingClientRect();m.canvas.width=m.width||f.right-f.left,m.canvas.height=m.height||f.bottom-f.top}}function s(m){return typeof m.getContext=="function"&&"width"in m&&"height"in m}function T(){var m=document.createElement("canvas");return m.style.position="absolute",m.style.top=0,m.style.left=0,m}D.exports=function(m){var f;if(m?typeof m=="string"&&(m={container:m}):m={},(m=s(m)||typeof(f=m).nodeName=="string"&&typeof f.appendChild=="function"&&typeof f.getBoundingClientRect=="function"?{container:m}:function(t){return typeof t.drawArrays=="function"||typeof t.drawElements=="function"}(m)?{gl:m}:_(m,{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)).pixelRatio||(m.pixelRatio=e.g.pixelRatio||1),m.gl)return m.gl;if(m.canvas&&(m.container=m.canvas.parentNode),m.container){if(typeof m.container=="string"){var l=document.querySelector(m.container);if(!l)throw Error("Element "+m.container+" is not found");m.container=l}s(m.container)?(m.canvas=m.container,m.container=m.canvas.parentNode):m.canvas||(m.canvas=T(),m.container.appendChild(m.canvas),w(m))}else if(!m.canvas){if(typeof document>"u")throw Error("Not DOM environment. Use headless-gl.");m.container=document.body||document.documentElement,m.canvas=T(),m.container.appendChild(m.canvas),w(m)}return m.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(t){try{m.gl=m.canvas.getContext(t,m.attrs)}catch{}return m.gl}),m.gl}},56068:function(D){D.exports=function(E){typeof E=="string"&&(E=[E]);for(var e=[].slice.call(arguments,1),_=[],w=0;w>1,r=-7,n=w?T-1:0,o=w?-1:1,i=e[_+n];for(n+=o,m=i&(1<<-r)-1,i>>=-r,r+=l;r>0;m=256*m+e[_+n],n+=o,r-=8);for(f=m&(1<<-r)-1,m>>=-r,r+=s;r>0;f=256*f+e[_+n],n+=o,r-=8);if(m===0)m=1-a;else{if(m===t)return f?NaN:1/0*(i?-1:1);f+=Math.pow(2,s),m-=a}return(i?-1:1)*f*Math.pow(2,m-s)},E.write=function(e,_,w,s,T,m){var f,l,t,a=8*m-T-1,r=(1<>1,o=T===23?Math.pow(2,-24)-Math.pow(2,-77):0,i=s?0:m-1,u=s?1:-1,p=_<0||_===0&&1/_<0?1:0;for(_=Math.abs(_),isNaN(_)||_===1/0?(l=isNaN(_)?1:0,f=r):(f=Math.floor(Math.log(_)/Math.LN2),_*(t=Math.pow(2,-f))<1&&(f--,t*=2),(_+=f+n>=1?o/t:o*Math.pow(2,1-n))*t>=2&&(f++,t/=2),f+n>=r?(l=0,f=r):f+n>=1?(l=(_*t-1)*Math.pow(2,T),f+=n):(l=_*Math.pow(2,n-1)*Math.pow(2,T),f=0));T>=8;e[w+i]=255&l,i+=u,l/=256,T-=8);for(f=f<0;e[w+i]=255&f,i+=u,f/=256,a-=8);e[w+i-u]|=128*p}},42018:function(D){typeof Object.create=="function"?D.exports=function(E,e){e&&(E.super_=e,E.prototype=Object.create(e.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}))}:D.exports=function(E,e){if(e){E.super_=e;var _=function(){};_.prototype=e.prototype,E.prototype=new _,E.prototype.constructor=E}}},47216:function(D,E,e){var _=e(84543)(),w=e(6614)("Object.prototype.toString"),s=function(f){return!(_&&f&&typeof f=="object"&&Symbol.toStringTag in f)&&w(f)==="[object Arguments]"},T=function(f){return!!s(f)||f!==null&&typeof f=="object"&&typeof f.length=="number"&&f.length>=0&&w(f)!=="[object Array]"&&w(f.callee)==="[object Function]"},m=function(){return s(arguments)}();s.isLegacyArguments=T,D.exports=m?s:T},54404:function(D){D.exports=!0},85395:function(D){var E,e,_=Function.prototype.toString,w=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply;if(typeof w=="function"&&typeof Object.defineProperty=="function")try{E=Object.defineProperty({},"length",{get:function(){throw e}}),e={},w(function(){throw 42},null,E)}catch(n){n!==e&&(w=null)}else w=null;var s=/^\s*class\b/,T=function(n){try{var o=_.call(n);return s.test(o)}catch{return!1}},m=function(n){try{return!T(n)&&(_.call(n),!0)}catch{return!1}},f=Object.prototype.toString,l=typeof Symbol=="function"&&!!Symbol.toStringTag,t=!(0 in[,]),a=function(){return!1};if(typeof document=="object"){var r=document.all;f.call(r)===f.call(document.all)&&(a=function(n){if((t||!n)&&(n===void 0||typeof n=="object"))try{var o=f.call(n);return(o==="[object HTMLAllCollection]"||o==="[object HTML document.all class]"||o==="[object HTMLCollection]"||o==="[object Object]")&&n("")==null}catch{}return!1})}D.exports=w?function(n){if(a(n))return!0;if(!n||typeof n!="function"&&typeof n!="object")return!1;try{w(n,null,E)}catch(o){if(o!==e)return!1}return!T(n)&&m(n)}:function(n){if(a(n))return!0;if(!n||typeof n!="function"&&typeof n!="object")return!1;if(l)return m(n);if(T(n))return!1;var o=f.call(n);return!(o!=="[object Function]"&&o!=="[object GeneratorFunction]"&&!/^\[object HTML/.test(o))&&m(n)}},65481:function(D,E,e){var _,w=Object.prototype.toString,s=Function.prototype.toString,T=/^\s*(?:function)?\*/,m=e(84543)(),f=Object.getPrototypeOf;D.exports=function(l){if(typeof l!="function")return!1;if(T.test(s.call(l)))return!0;if(!m)return w.call(l)==="[object GeneratorFunction]";if(!f)return!1;if(_===void 0){var t=function(){if(!m)return!1;try{return Function("return function*() {}")()}catch{}}();_=!!t&&f(t)}return f(l)===_}},62683:function(D){D.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},64274:function(D){D.exports=function(E){return E!=E}},15567:function(D,E,e){var _=e(68222),w=e(17045),s=e(64274),T=e(14922),m=e(22442),f=_(T(),Number);w(f,{getPolyfill:T,implementation:s,shim:m}),D.exports=f},14922:function(D,E,e){var _=e(64274);D.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:_}},22442:function(D,E,e){var _=e(17045),w=e(14922);D.exports=function(){var s=w();return _(Number,{isNaN:s},{isNaN:function(){return Number.isNaN!==s}}),s}},64941:function(D){D.exports=function(E){var e=typeof E;return E!==null&&(e==="object"||e==="function")}},10973:function(D){var E=Object.prototype.toString;D.exports=function(e){var _;return E.call(e)==="[object Object]"&&((_=Object.getPrototypeOf(e))===null||_===Object.getPrototypeOf({}))}},18546:function(D){D.exports=function(E){for(var e,_=E.length,w=0;w<_;w++)if(((e=E.charCodeAt(w))<9||e>13)&&e!==32&&e!==133&&e!==160&&e!==5760&&e!==6158&&(e<8192||e>8205)&&e!==8232&&e!==8233&&e!==8239&&e!==8287&&e!==8288&&e!==12288&&e!==65279)return!1;return!0}},89546:function(D){D.exports=function(E){return typeof E=="string"&&(E=E.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(E)&&/[\dz]$/i.test(E)&&E.length>4))}},9187:function(D,E,e){var _=e(31353),w=e(72077),s=e(6614),T=s("Object.prototype.toString"),m=e(84543)(),f=e(40383),l=typeof globalThis>"u"?e.g:globalThis,t=w(),a=s("Array.prototype.indexOf",!0)||function(i,u){for(var p=0;p-1}return!!f&&function(p){var c=!1;return _(n,function(b,d){if(!c)try{c=b.call(p)===d}catch{}}),c}(i)}},44517:function(D){D.exports=function(){var E,e,_;function w(s,T){if(E)if(e){var m="var sharedChunk = {}; ("+E+")(sharedChunk); ("+e+")(sharedChunk);",f={};E(f),(_=T(f)).workerUrl=window.URL.createObjectURL(new Blob([m],{type:"text/javascript"}))}else e=T;else E=T}return w(0,function(s){function T(S,z){return S(z={exports:{}},z.exports),z.exports}var m="1.10.1",f=l;function l(S,z,Z,le){this.cx=3*S,this.bx=3*(Z-S)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*z,this.by=3*(le-z)-this.cy,this.ay=1-this.cy-this.by,this.p1x=S,this.p1y=le,this.p2x=Z,this.p2y=le}l.prototype.sampleCurveX=function(S){return((this.ax*S+this.bx)*S+this.cx)*S},l.prototype.sampleCurveY=function(S){return((this.ay*S+this.by)*S+this.cy)*S},l.prototype.sampleCurveDerivativeX=function(S){return(3*this.ax*S+2*this.bx)*S+this.cx},l.prototype.solveCurveX=function(S,z){var Z,le,ke,Ie,qe;for(z===void 0&&(z=1e-6),ke=S,qe=0;qe<8;qe++){if(Ie=this.sampleCurveX(ke)-S,Math.abs(Ie)(le=1))return le;for(;ZIe?Z=ke:le=ke,ke=.5*(le-Z)+Z}return ke},l.prototype.solve=function(S,z){return this.sampleCurveY(this.solveCurveX(S,z))};var t=a;function a(S,z){this.x=S,this.y=z}function r(S,z,Z,le){var ke=new f(S,z,Z,le);return function(Ie){return ke.solve(Ie)}}a.prototype={clone:function(){return new a(this.x,this.y)},add:function(S){return this.clone()._add(S)},sub:function(S){return this.clone()._sub(S)},multByPoint:function(S){return this.clone()._multByPoint(S)},divByPoint:function(S){return this.clone()._divByPoint(S)},mult:function(S){return this.clone()._mult(S)},div:function(S){return this.clone()._div(S)},rotate:function(S){return this.clone()._rotate(S)},rotateAround:function(S,z){return this.clone()._rotateAround(S,z)},matMult:function(S){return this.clone()._matMult(S)},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(S){return this.x===S.x&&this.y===S.y},dist:function(S){return Math.sqrt(this.distSqr(S))},distSqr:function(S){var z=S.x-this.x,Z=S.y-this.y;return z*z+Z*Z},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(S){return Math.atan2(this.y-S.y,this.x-S.x)},angleWith:function(S){return this.angleWithSep(S.x,S.y)},angleWithSep:function(S,z){return Math.atan2(this.x*z-this.y*S,this.x*S+this.y*z)},_matMult:function(S){var z=S[0]*this.x+S[1]*this.y,Z=S[2]*this.x+S[3]*this.y;return this.x=z,this.y=Z,this},_add:function(S){return this.x+=S.x,this.y+=S.y,this},_sub:function(S){return this.x-=S.x,this.y-=S.y,this},_mult:function(S){return this.x*=S,this.y*=S,this},_div:function(S){return this.x/=S,this.y/=S,this},_multByPoint:function(S){return this.x*=S.x,this.y*=S.y,this},_divByPoint:function(S){return this.x/=S.x,this.y/=S.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var S=this.y;return this.y=this.x,this.x=-S,this},_rotate:function(S){var z=Math.cos(S),Z=Math.sin(S),le=z*this.x-Z*this.y,ke=Z*this.x+z*this.y;return this.x=le,this.y=ke,this},_rotateAround:function(S,z){var Z=Math.cos(S),le=Math.sin(S),ke=z.x+Z*(this.x-z.x)-le*(this.y-z.y),Ie=z.y+le*(this.x-z.x)+Z*(this.y-z.y);return this.x=ke,this.y=Ie,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},a.convert=function(S){return S instanceof a?S:Array.isArray(S)?new a(S[0],S[1]):S};var n=r(.25,.1,.25,1);function o(S,z,Z){return Math.min(Z,Math.max(z,S))}function i(S,z,Z){var le=Z-z,ke=((S-z)%le+le)%le+z;return ke===z?Z:ke}function u(S){for(var z=[],Z=arguments.length-1;Z-- >0;)z[Z]=arguments[Z+1];for(var le=0,ke=z;le>z/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,S)}()}function d(S){return!!S&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(S)}function v(S,z){S.forEach(function(Z){z[Z]&&(z[Z]=z[Z].bind(z))})}function x(S,z){return S.indexOf(z,S.length-z.length)!==-1}function g(S,z,Z){var le={};for(var ke in S)le[ke]=z.call(Z||this,S[ke],ke,S);return le}function y(S,z,Z){var le={};for(var ke in S)z.call(Z||this,S[ke],ke,S)&&(le[ke]=S[ke]);return le}function k(S){return Array.isArray(S)?S.map(k):typeof S=="object"&&S?g(S,k):S}var h={};function M(S){h[S]||(typeof console<"u"&&console.warn(S),h[S]=!0)}function A(S,z,Z){return(Z.y-S.y)*(z.x-S.x)>(z.y-S.y)*(Z.x-S.x)}function C(S){for(var z=0,Z=0,le=S.length,ke=le-1,Ie=void 0,qe=void 0;Z@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(le,ke,Ie,qe){var it=Ie||qe;return z[ke]=!it||it.toLowerCase(),""}),z["max-age"]){var Z=parseInt(z["max-age"],10);isNaN(Z)?delete z["max-age"]:z["max-age"]=Z}return z}var I=null;function R(S){if(I==null){var z=S.navigator?S.navigator.userAgent:null;I=!!S.safari||!(!z||!(/\b(iPad|iPhone|iPod)\b/.test(z)||z.match("Safari")&&!z.match("Chrome")))}return I}function U(S){try{var z=self[S];return z.setItem("_mapbox_test_",1),z.removeItem("_mapbox_test_"),!0}catch{return!1}}var B,G,N,j,V=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),H=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,ee=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,Q={now:V,frame:function(S){var z=H(S);return{cancel:function(){return ee(z)}}},getImageData:function(S,z){z===void 0&&(z=0);var Z=self.document.createElement("canvas"),le=Z.getContext("2d");if(!le)throw new Error("failed to create canvas 2d context");return Z.width=S.width,Z.height=S.height,le.drawImage(S,0,0,S.width,S.height),le.getImageData(-z,-z,S.width+2*z,S.height+2*z)},resolveURL:function(S){return B||(B=self.document.createElement("a")),B.href=S,B.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(G==null&&(G=self.matchMedia("(prefers-reduced-motion: reduce)")),G.matches)}},X={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},Y={supported:!1,testSupport:function(S){!K&&j&&(te?re(S):N=S)}},K=!1,te=!1;function re(S){var z=S.createTexture();S.bindTexture(S.TEXTURE_2D,z);try{if(S.texImage2D(S.TEXTURE_2D,0,S.RGBA,S.RGBA,S.UNSIGNED_BYTE,j),S.isContextLost())return;Y.supported=!0}catch{}S.deleteTexture(z),K=!0}self.document&&((j=self.document.createElement("img")).onload=function(){N&&re(N),N=null,te=!0},j.onerror=function(){K=!0,N=null},j.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var oe="01",se=function(S,z){this._transformRequestFn=S,this._customAccessToken=z,this._createSkuToken()};function ce(S){return S.indexOf("mapbox:")===0}se.prototype._createSkuToken=function(){var S=function(){for(var z="",Z=0;Z<10;Z++)z+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",oe,z].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=S.token,this._skuTokenExpiresAt=S.tokenExpiresAt},se.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},se.prototype.transformRequest=function(S,z){return this._transformRequestFn&&this._transformRequestFn(S,z)||{url:S}},se.prototype.normalizeStyleURL=function(S,z){if(!ce(S))return S;var Z=he(S);return Z.path="/styles/v1"+Z.path,this._makeAPIURL(Z,this._customAccessToken||z)},se.prototype.normalizeGlyphsURL=function(S,z){if(!ce(S))return S;var Z=he(S);return Z.path="/fonts/v1"+Z.path,this._makeAPIURL(Z,this._customAccessToken||z)},se.prototype.normalizeSourceURL=function(S,z){if(!ce(S))return S;var Z=he(S);return Z.path="/v4/"+Z.authority+".json",Z.params.push("secure"),this._makeAPIURL(Z,this._customAccessToken||z)},se.prototype.normalizeSpriteURL=function(S,z,Z,le){var ke=he(S);return ce(S)?(ke.path="/styles/v1"+ke.path+"/sprite"+z+Z,this._makeAPIURL(ke,this._customAccessToken||le)):(ke.path+=""+z+Z,ye(ke))},se.prototype.normalizeTileURL=function(S,z){if(this._isSkuTokenExpired()&&this._createSkuToken(),S&&!ce(S))return S;var Z=he(S),le=Q.devicePixelRatio>=2||z===512?"@2x":"",ke=Y.supported?".webp":"$1";Z.path=Z.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+le+ke),Z.path=Z.path.replace(/^.+\/v4\//,"/"),Z.path="/v4"+Z.path;var Ie=this._customAccessToken||function(qe){for(var it=0,dt=qe;it=1&&self.localStorage.setItem(z,JSON.stringify(this.eventData))}catch{M("Unable to write to LocalStorage")}},Ae.prototype.processRequests=function(S){},Ae.prototype.postEvent=function(S,z,Z,le){var ke=this;if(X.EVENTS_URL){var Ie=he(X.EVENTS_URL);Ie.params.push("access_token="+(le||X.ACCESS_TOKEN||""));var qe={event:this.type,created:new Date(S).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:m,skuId:oe,userId:this.anonId},it=z?u(qe,z):qe,dt={url:ye(Ie),headers:{"Content-Type":"text/plain"},body:JSON.stringify([it])};this.pendingRequest=It(dt,function(St){ke.pendingRequest=null,Z(St),ke.saveEventData(),ke.processRequests(le)})}},Ae.prototype.queueRequest=function(S,z){this.queue.push(S),this.processRequests(z)};var Me,Ce,ne=function(S){function z(){S.call(this,"map.load"),this.success={},this.skuToken=""}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.postMapLoadEvent=function(Z,le,ke,Ie){this.skuToken=ke,(X.EVENTS_URL&&Ie||X.ACCESS_TOKEN&&Array.isArray(Z)&&Z.some(function(qe){return ce(qe)||pe(qe)}))&&this.queueRequest({id:le,timestamp:Date.now()},Ie)},z.prototype.processRequests=function(Z){var le=this;if(!this.pendingRequest&&this.queue.length!==0){var ke=this.queue.shift(),Ie=ke.id,qe=ke.timestamp;Ie&&this.success[Ie]||(this.anonId||this.fetchEventData(),d(this.anonId)||(this.anonId=b()),this.postEvent(qe,{skuToken:this.skuToken},function(it){it||Ie&&(le.success[Ie]=!0)},Z))}},z}(Ae),ue=function(S){function z(Z){S.call(this,"appUserTurnstile"),this._customAccessToken=Z}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.postTurnstileEvent=function(Z,le){X.EVENTS_URL&&X.ACCESS_TOKEN&&Array.isArray(Z)&&Z.some(function(ke){return ce(ke)||pe(ke)})&&this.queueRequest(Date.now(),le)},z.prototype.processRequests=function(Z){var le=this;if(!this.pendingRequest&&this.queue.length!==0){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var ke=Te(X.ACCESS_TOKEN),Ie=ke?ke.u:X.ACCESS_TOKEN,qe=Ie!==this.eventData.tokenU;d(this.anonId)||(this.anonId=b(),qe=!0);var it=this.queue.shift();if(this.eventData.lastSuccess){var dt=new Date(this.eventData.lastSuccess),St=new Date(it),Rt=(it-this.eventData.lastSuccess)/864e5;qe=qe||Rt>=1||Rt<-1||dt.getDate()!==St.getDate()}else qe=!0;if(!qe)return this.processRequests();this.postEvent(it,{"enabled.telemetry":!1},function(Ht){Ht||(le.eventData.lastSuccess=it,le.eventData.tokenU=Ie)},Z)}},z}(Ae),me=new ue,we=me.postTurnstileEvent.bind(me),Ee=new ne,Ue=Ee.postMapLoadEvent.bind(Ee),De="mapbox-tiles",je=500,ge=50;function be(){self.caches&&!Me&&(Me=self.caches.open(De))}function Se(S,z,Z){if(be(),Me){var le={status:z.status,statusText:z.statusText,headers:new self.Headers};z.headers.forEach(function(Ie,qe){return le.headers.set(qe,Ie)});var ke=P(z.headers.get("Cache-Control")||"");ke["no-store"]||(ke["max-age"]&&le.headers.set("Expires",new Date(Z+1e3*ke["max-age"]).toUTCString()),new Date(le.headers.get("Expires")).getTime()-Z<42e4||function(Ie,qe){if(Ce===void 0)try{new Response(new ReadableStream),Ce=!0}catch{Ce=!1}Ce?qe(Ie.body):Ie.blob().then(qe)}(z,function(Ie){var qe=new self.Response(Ie,le);be(),Me&&Me.then(function(it){return it.put(Ne(S.url),qe)}).catch(function(it){return M(it.message)})}))}}function Ne(S){var z=S.indexOf("?");return z<0?S:S.slice(0,z)}function Ye(S,z){if(be(),!Me)return z(null);var Z=Ne(S.url);Me.then(function(le){le.match(Z).then(function(ke){var Ie=function(qe){if(!qe)return!1;var it=new Date(qe.headers.get("Expires")||0),dt=P(qe.headers.get("Cache-Control")||"");return it>Date.now()&&!dt["no-cache"]}(ke);le.delete(Z),Ie&&le.put(Z,ke.clone()),z(null,ke,Ie)}).catch(z)}).catch(z)}var Ze,st=1/0;function ot(){return Ze==null&&(Ze=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext("2d")&&typeof self.createImageBitmap=="function"),Ze}var ft={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(ft);var yt=function(S){function z(Z,le,ke){le===401&&pe(ke)&&(Z+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),S.call(this,Z),this.status=le,this.url=ke,this.name=this.constructor.name,this.message=Z}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},z}(Error),Et=L()?function(){return self.worker&&self.worker.referrer}:function(){return(self.location.protocol==="blob:"?self.parent:self).location.href};function Tt(S,z){var Z,le=new self.AbortController,ke=new self.Request(S.url,{method:S.method||"GET",body:S.body,credentials:S.credentials,headers:S.headers,referrer:Et(),signal:le.signal}),Ie=!1,qe=!1,it=(Z=ke.url).indexOf("sku=")>0&&pe(Z);S.type==="json"&&ke.headers.set("Accept","application/json");var dt=function(Rt,Ht,Yt){if(!qe){if(Rt&&Rt.message!=="SecurityError"&&M(Rt),Ht&&Yt)return St(Ht);var Zt=Date.now();self.fetch(ke).then(function(cn){if(cn.ok){var Tn=it?cn.clone():null;return St(cn,Tn,Zt)}return z(new yt(cn.statusText,cn.status,S.url))}).catch(function(cn){cn.code!==20&&z(new Error(cn.message))})}},St=function(Rt,Ht,Yt){(S.type==="arrayBuffer"?Rt.arrayBuffer():S.type==="json"?Rt.json():Rt.text()).then(function(Zt){qe||(Ht&&Yt&&Se(ke,Ht,Yt),Ie=!0,z(null,Zt,Rt.headers.get("Cache-Control"),Rt.headers.get("Expires")))}).catch(function(Zt){qe||z(new Error(Zt.message))})};return it?Ye(ke,dt):dt(null,null),{cancel:function(){qe=!0,Ie||le.abort()}}}var xt=function(S,z){if(Z=S.url,!(/^file:/.test(Z)||/^file:/.test(Et())&&!/^\w+:/.test(Z))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return Tt(S,z);if(L()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",S,z,void 0,!0)}var Z;return function(le,ke){var Ie=new self.XMLHttpRequest;for(var qe in Ie.open(le.method||"GET",le.url,!0),le.type==="arrayBuffer"&&(Ie.responseType="arraybuffer"),le.headers)Ie.setRequestHeader(qe,le.headers[qe]);return le.type==="json"&&(Ie.responseType="text",Ie.setRequestHeader("Accept","application/json")),Ie.withCredentials=le.credentials==="include",Ie.onerror=function(){ke(new Error(Ie.statusText))},Ie.onload=function(){if((Ie.status>=200&&Ie.status<300||Ie.status===0)&&Ie.response!==null){var it=Ie.response;if(le.type==="json")try{it=JSON.parse(Ie.response)}catch(dt){return ke(dt)}ke(null,it,Ie.getResponseHeader("Cache-Control"),Ie.getResponseHeader("Expires"))}else ke(new yt(Ie.statusText,Ie.status,le.url))},Ie.send(le.body),{cancel:function(){return Ie.abort()}}}(S,z)},Dt=function(S,z){return xt(u(S,{type:"arrayBuffer"}),z)},It=function(S,z){return xt(u(S,{method:"POST"}),z)},Ft,qt;Ft=[],qt=0;var Nt=function(S,z){if(Y.supported&&(S.headers||(S.headers={}),S.headers.accept="image/webp,*/*"),qt>=X.MAX_PARALLEL_IMAGE_REQUESTS){var Z={requestParameters:S,callback:z,cancelled:!1,cancel:function(){this.cancelled=!0}};return Ft.push(Z),Z}qt++;var le=!1,ke=function(){if(!le)for(le=!0,qt--;Ft.length&&qt0||this._oneTimeListeners&&this._oneTimeListeners[S]&&this._oneTimeListeners[S].length>0||this._eventedParent&&this._eventedParent.listens(S)},ht.prototype.setEventedParent=function(S,z){return this._eventedParent=S,this._eventedParentData=z,this};var Oe={$version:8,$root:{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"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{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:"*"}},source_raster:{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:"*"}},source_raster_dem:{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:"*"}},source_geojson:{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"}},source_video:{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"}}},source_image:{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"}}},layer:{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"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"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"}},layout_circle:{"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"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"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"}},layout_symbol:{"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"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},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:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{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"}}},light:{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}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"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"}},"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:{"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"}},paint_circle:{"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"}},paint_heatmap:{"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"}},paint_symbol:{"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"}},paint_raster:{"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"}},paint_hillshade:{"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"}},paint_background:{"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"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"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:{"*":{type:"string"}}},Be=function(S,z,Z,le){this.message=(S?S+": ":"")+Z,le&&(this.identifier=le),z!=null&&z.__line__&&(this.line=z.__line__)};function Qe(S){var z=S.key,Z=S.value;return Z?[new Be(z,Z,"constants have been deprecated as of v8")]:[]}function ut(S){for(var z=[],Z=arguments.length-1;Z-- >0;)z[Z]=arguments[Z+1];for(var le=0,ke=z;le":S.itemType.kind==="value"?"array":"array<"+z+">"}return S.kind}var kn=[mt,Ot,_t,Pt,Bt,Kt,Wt,yn(Gt),nn];function Wn(S,z){if(z.kind==="error")return null;if(S.kind==="array"){if(z.kind==="array"&&(z.N===0&&z.itemType.kind==="value"||!Wn(S.itemType,z.itemType))&&(typeof S.N!="number"||S.N===z.N))return null}else{if(S.kind===z.kind)return null;if(S.kind==="value"){for(var Z=0,le=kn;Z255?255:dt}function ke(dt){return dt<0?0:dt>1?1:dt}function Ie(dt){return dt[dt.length-1]==="%"?le(parseFloat(dt)/100*255):le(parseInt(dt))}function qe(dt){return dt[dt.length-1]==="%"?ke(parseFloat(dt)/100):ke(parseFloat(dt))}function it(dt,St,Rt){return Rt<0?Rt+=1:Rt>1&&(Rt-=1),6*Rt<1?dt+(St-dt)*Rt*6:2*Rt<1?St:3*Rt<2?dt+(St-dt)*(2/3-Rt)*6:dt}try{z.parseCSSColor=function(dt){var St,Rt=dt.replace(/ /g,"").toLowerCase();if(Rt in Z)return Z[Rt].slice();if(Rt[0]==="#")return Rt.length===4?(St=parseInt(Rt.substr(1),16))>=0&&St<=4095?[(3840&St)>>4|(3840&St)>>8,240&St|(240&St)>>4,15&St|(15&St)<<4,1]:null:Rt.length===7&&(St=parseInt(Rt.substr(1),16))>=0&&St<=16777215?[(16711680&St)>>16,(65280&St)>>8,255&St,1]:null;var Ht=Rt.indexOf("("),Yt=Rt.indexOf(")");if(Ht!==-1&&Yt+1===Rt.length){var Zt=Rt.substr(0,Ht),cn=Rt.substr(Ht+1,Yt-(Ht+1)).split(","),Tn=1;switch(Zt){case"rgba":if(cn.length!==4)return null;Tn=qe(cn.pop());case"rgb":return cn.length!==3?null:[Ie(cn[0]),Ie(cn[1]),Ie(cn[2]),Tn];case"hsla":if(cn.length!==4)return null;Tn=qe(cn.pop());case"hsl":if(cn.length!==3)return null;var Fn=(parseFloat(cn[0])%360+360)%360/360,Dn=qe(cn[1]),Gn=qe(cn[2]),Yn=Gn<=.5?Gn*(Dn+1):Gn+Dn-Gn*Dn,Kn=2*Gn-Yn;return[le(255*it(Kn,Yn,Fn+1/3)),le(255*it(Kn,Yn,Fn)),le(255*it(Kn,Yn,Fn-1/3)),Tn];default:return null}}return null}}catch{}}),fn=_n.parseCSSColor,hn=function(S,z,Z,le){le===void 0&&(le=1),this.r=S,this.g=z,this.b=Z,this.a=le};hn.parse=function(S){if(S){if(S instanceof hn)return S;if(typeof S=="string"){var z=fn(S);if(z)return new hn(z[0]/255*z[3],z[1]/255*z[3],z[2]/255*z[3],z[3])}}},hn.prototype.toString=function(){var S=this.toArray(),z=S[0],Z=S[1],le=S[2],ke=S[3];return"rgba("+Math.round(z)+","+Math.round(Z)+","+Math.round(le)+","+ke+")"},hn.prototype.toArray=function(){var S=this,z=S.r,Z=S.g,le=S.b,ke=S.a;return ke===0?[0,0,0,0]:[255*z/ke,255*Z/ke,255*le/ke,ke]},hn.black=new hn(0,0,0,1),hn.white=new hn(1,1,1,1),hn.transparent=new hn(0,0,0,0),hn.red=new hn(1,0,0,1);var In=function(S,z,Z){this.sensitivity=S?z?"variant":"case":z?"accent":"base",this.locale=Z,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};In.prototype.compare=function(S,z){return this.collator.compare(S,z)},In.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Cn=function(S,z,Z,le,ke){this.text=S,this.image=z,this.scale=Z,this.fontStack=le,this.textColor=ke},Nn=function(S){this.sections=S};Nn.fromString=function(S){return new Nn([new Cn(S,null,null,null,null)])},Nn.prototype.isEmpty=function(){return this.sections.length===0||!this.sections.some(function(S){return S.text.length!==0||S.image&&S.image.name.length!==0})},Nn.factory=function(S){return S instanceof Nn?S:Nn.fromString(S)},Nn.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(S){return S.text}).join("")},Nn.prototype.serialize=function(){for(var S=["format"],z=0,Z=this.sections;z=0&&S<=255&&typeof z=="number"&&z>=0&&z<=255&&typeof Z=="number"&&Z>=0&&Z<=255?le===void 0||typeof le=="number"&&le>=0&&le<=1?null:"Invalid rgba value ["+[S,z,Z,le].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+(typeof le=="number"?[S,z,Z,le]:[S,z,Z]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function or(S){if(S===null||typeof S=="string"||typeof S=="boolean"||typeof S=="number"||S instanceof hn||S instanceof In||S instanceof Nn||S instanceof Hn)return!0;if(Array.isArray(S)){for(var z=0,Z=S;z2){var it=S[1];if(typeof it!="string"||!(it in dr)||it==="object")return z.error('The item type argument of "array" must be one of string, number, boolean',1);Ie=dr[it],le++}else Ie=Gt;if(S.length>3){if(S[2]!==null&&(typeof S[2]!="number"||S[2]<0||S[2]!==Math.floor(S[2])))return z.error('The length argument to "array" must be a positive integer literal',2);qe=S[2],le++}Z=yn(Ie,qe)}else Z=dr[ke];for(var dt=[];le1)&&z.push(le)}}return z.concat(this.args.map(function(ke){return ke.serialize()}))};var $t=function(S){this.type=Kt,this.sections=S};$t.parse=function(S,z){if(S.length<2)return z.error("Expected at least one argument.");var Z=S[1];if(!Array.isArray(Z)&&typeof Z=="object")return z.error("First argument must be an image or text section.");for(var le=[],ke=!1,Ie=1;Ie<=S.length-1;++Ie){var qe=S[Ie];if(ke&&typeof qe=="object"&&!Array.isArray(qe)){ke=!1;var it=null;if(qe["font-scale"]&&!(it=z.parse(qe["font-scale"],1,Ot)))return null;var dt=null;if(qe["text-font"]&&!(dt=z.parse(qe["text-font"],1,yn(_t))))return null;var St=null;if(qe["text-color"]&&!(St=z.parse(qe["text-color"],1,Bt)))return null;var Rt=le[le.length-1];Rt.scale=it,Rt.font=dt,Rt.textColor=St}else{var Ht=z.parse(S[Ie],1,Gt);if(!Ht)return null;var Yt=Ht.type.kind;if(Yt!=="string"&&Yt!=="value"&&Yt!=="null"&&Yt!=="resolvedImage")return z.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ke=!0,le.push({content:Ht,scale:null,font:null,textColor:null})}}return new $t(le)},$t.prototype.evaluate=function(S){return new Nn(this.sections.map(function(z){var Z=z.content.evaluate(S);return tr(Z)===nn?new Cn("",Z,null,null,null):new Cn(Tr(Z),null,z.scale?z.scale.evaluate(S):null,z.font?z.font.evaluate(S).join(","):null,z.textColor?z.textColor.evaluate(S):null)}))},$t.prototype.eachChild=function(S){for(var z=0,Z=this.sections;z-1),Z},mn.prototype.eachChild=function(S){S(this.input)},mn.prototype.outputDefined=function(){return!1},mn.prototype.serialize=function(){return["image",this.input.serialize()]};var Ln={"to-boolean":Pt,"to-color":Bt,"to-number":Ot,"to-string":_t},En=function(S,z){this.type=S,this.args=z};En.parse=function(S,z){if(S.length<2)return z.error("Expected at least one argument.");var Z=S[0];if((Z==="to-boolean"||Z==="to-string")&&S.length!==2)return z.error("Expected one argument.");for(var le=Ln[Z],ke=[],Ie=1;Ie4?"Invalid rbga value "+JSON.stringify(z)+": expected an array containing either three or four numeric values.":qn(z[0],z[1],z[2],z[3])))return new hn(z[0]/255,z[1]/255,z[2]/255,z[3])}throw new ir(Z||"Could not parse color from value '"+(typeof z=="string"?z:String(JSON.stringify(z)))+"'")}if(this.type.kind==="number"){for(var qe=null,it=0,dt=this.args;it=z[2]||S[1]<=z[1]||S[3]>=z[3])}function jt(S,z){var Z,le=(180+S[0])/360,ke=(Z=S[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+Z*Math.PI/360)))/360),Ie=Math.pow(2,z.z);return[Math.round(le*Ie*hr),Math.round(ke*Ie*hr)]}function Jt(S,z,Z){return z[1]>S[1]!=Z[1]>S[1]&&S[0]<(Z[0]-z[0])*(S[1]-z[1])/(Z[1]-z[1])+z[0]}function un(S,z){for(var Z=!1,le=0,ke=z.length;le0&&Ht<0||Rt<0&&Ht>0}function Sn(S,z,Z){for(var le=0,ke=Z;leZ[2]){var ke=.5*le,Ie=S[0]-Z[0]>ke?-le:Z[0]-S[0]>ke?le:0;Ie===0&&(Ie=S[0]-Z[2]>ke?-le:Z[2]-S[0]>ke?le:0),S[0]+=Ie}tn(z,S)}function Bn(S,z,Z,le){for(var ke=Math.pow(2,le.z)*hr,Ie=[le.x*hr,le.y*hr],qe=[],it=0,dt=S;it=0)return!1;var Z=!0;return S.eachChild(function(le){Z&&!sr(le,z)&&(Z=!1)}),Z}er.parse=function(S,z){if(S.length!==2)return z.error("'within' expression requires exactly one argument, but found "+(S.length-1)+" instead.");if(or(S[1])){var Z=S[1];if(Z.type==="FeatureCollection")for(var le=0;lez))throw new ir("Input is not a number.");qe=it-1}return 0}cr.prototype.parse=function(S,z,Z,le,ke){return ke===void 0&&(ke={}),z?this.concat(z,Z,le)._parse(S,ke):this._parse(S,ke)},cr.prototype._parse=function(S,z){function Z(St,Rt,Ht){return Ht==="assert"?new yr(Rt,[St]):Ht==="coerce"?new En(Rt,[St]):St}if(S!==null&&typeof S!="string"&&typeof S!="boolean"&&typeof S!="number"||(S=["literal",S]),Array.isArray(S)){if(S.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var le=S[0];if(typeof le!="string")return this.error("Expression name must be a string, but found "+typeof le+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var ke=this.registry[le];if(ke){var Ie=ke.parse(S,this);if(!Ie)return null;if(this.expectedType){var qe=this.expectedType,it=Ie.type;if(qe.kind!=="string"&&qe.kind!=="number"&&qe.kind!=="boolean"&&qe.kind!=="object"&&qe.kind!=="array"||it.kind!=="value")if(qe.kind!=="color"&&qe.kind!=="formatted"&&qe.kind!=="resolvedImage"||it.kind!=="value"&&it.kind!=="string"){if(this.checkSubtype(qe,it))return null}else Ie=Z(Ie,qe,z.typeAnnotation||"coerce");else Ie=Z(Ie,qe,z.typeAnnotation||"assert")}if(!(Ie instanceof gr)&&Ie.type.kind!=="resolvedImage"&&vr(Ie)){var dt=new $n;try{Ie=new gr(Ie.type,Ie.evaluate(dt))}catch(St){return this.error(St.message),null}}return Ie}return this.error('Unknown expression "'+le+'". If you wanted a literal array, use ["literal", [...]].',0)}return S===void 0?this.error("'undefined' value invalid. Use null instead."):typeof S=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof S+" instead.")},cr.prototype.concat=function(S,z,Z){var le=typeof S=="number"?this.path.concat(S):this.path,ke=Z?this.scope.concat(Z):this.scope;return new cr(this.registry,le,z||null,ke,this.errors)},cr.prototype.error=function(S){for(var z=[],Z=arguments.length-1;Z-- >0;)z[Z]=arguments[Z+1];var le=""+this.key+z.map(function(ke){return"["+ke+"]"}).join("");this.errors.push(new Lt(le,S))},cr.prototype.checkSubtype=function(S,z){var Z=Wn(S,z);return Z&&this.error(Z),Z};var Mr=function(S,z,Z){this.type=S,this.input=z,this.labels=[],this.outputs=[];for(var le=0,ke=Z;le=qe)return z.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',dt);var Rt=z.parse(it,St,ke);if(!Rt)return null;ke=ke||Rt.type,le.push([qe,Rt])}return new Mr(ke,Z,le)},Mr.prototype.evaluate=function(S){var z=this.labels,Z=this.outputs;if(z.length===1)return Z[0].evaluate(S);var le=this.input.evaluate(S);if(le<=z[0])return Z[0].evaluate(S);var ke=z.length;return le>=z[ke-1]?Z[ke-1].evaluate(S):Z[Sr(z,le)].evaluate(S)},Mr.prototype.eachChild=function(S){S(this.input);for(var z=0,Z=this.outputs;z0&&S.push(this.labels[z]),S.push(this.outputs[z].serialize());return S};var pr=Object.freeze({__proto__:null,number:Lr,color:function(S,z,Z){return new hn(Lr(S.r,z.r,Z),Lr(S.g,z.g,Z),Lr(S.b,z.b,Z),Lr(S.a,z.a,Z))},array:function(S,z,Z){return S.map(function(le,ke){return Lr(le,z[ke],Z)})}}),Pr=.95047,Hr=1.08883,ci=4/29,Ti=6/29,Mi=3*Ti*Ti,fa=Math.PI/180,Hi=180/Math.PI;function xi(S){return S>.008856451679035631?Math.pow(S,.3333333333333333):S/Mi+ci}function Oa(S){return S>Ti?S*S*S:Mi*(S-ci)}function Ka(S){return 255*(S<=.0031308?12.92*S:1.055*Math.pow(S,.4166666666666667)-.055)}function Yo(S){return(S/=255)<=.04045?S/12.92:Math.pow((S+.055)/1.055,2.4)}function Xs(S){var z=Yo(S.r),Z=Yo(S.g),le=Yo(S.b),ke=xi((.4124564*z+.3575761*Z+.1804375*le)/Pr),Ie=xi((.2126729*z+.7151522*Z+.072175*le)/1);return{l:116*Ie-16,a:500*(ke-Ie),b:200*(Ie-xi((.0193339*z+.119192*Z+.9503041*le)/Hr)),alpha:S.a}}function Uu(S){var z=(S.l+16)/116,Z=isNaN(S.a)?z:z+S.a/500,le=isNaN(S.b)?z:z-S.b/200;return z=1*Oa(z),Z=Pr*Oa(Z),le=Hr*Oa(le),new hn(Ka(3.2404542*Z-1.5371385*z-.4985314*le),Ka(-.969266*Z+1.8760108*z+.041556*le),Ka(.0556434*Z-.2040259*z+1.0572252*le),S.alpha)}function pu(S,z,Z){var le=z-S;return S+Z*(le>180||le<-180?le-360*Math.round(le/360):le)}var $s={forward:Xs,reverse:Uu,interpolate:function(S,z,Z){return{l:Lr(S.l,z.l,Z),a:Lr(S.a,z.a,Z),b:Lr(S.b,z.b,Z),alpha:Lr(S.alpha,z.alpha,Z)}}},Qa={forward:function(S){var z=Xs(S),Z=z.l,le=z.a,ke=z.b,Ie=Math.atan2(ke,le)*Hi;return{h:Ie<0?Ie+360:Ie,c:Math.sqrt(le*le+ke*ke),l:Z,alpha:S.a}},reverse:function(S){var z=S.h*fa,Z=S.c;return Uu({l:S.l,a:Math.cos(z)*Z,b:Math.sin(z)*Z,alpha:S.alpha})},interpolate:function(S,z,Z){return{h:pu(S.h,z.h,Z),c:Lr(S.c,z.c,Z),l:Lr(S.l,z.l,Z),alpha:Lr(S.alpha,z.alpha,Z)}}},du=Object.freeze({__proto__:null,lab:$s,hcl:Qa}),Qi=function(S,z,Z,le,ke){this.type=S,this.operator=z,this.interpolation=Z,this.input=le,this.labels=[],this.outputs=[];for(var Ie=0,qe=ke;Ie1}))return z.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);le={name:"cubic-bezier",controlPoints:it}}if(S.length-1<4)return z.error("Expected at least 4 arguments, but found only "+(S.length-1)+".");if((S.length-1)%2!=0)return z.error("Expected an even number of arguments.");if(!(ke=z.parse(ke,2,Ot)))return null;var dt=[],St=null;Z==="interpolate-hcl"||Z==="interpolate-lab"?St=Bt:z.expectedType&&z.expectedType.kind!=="value"&&(St=z.expectedType);for(var Rt=0;Rt=Ht)return z.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Zt);var Tn=z.parse(Yt,cn,St);if(!Tn)return null;St=St||Tn.type,dt.push([Ht,Tn])}return St.kind==="number"||St.kind==="color"||St.kind==="array"&&St.itemType.kind==="number"&&typeof St.N=="number"?new Qi(St,Z,le,ke,dt):z.error("Type "+ln(St)+" is not interpolatable.")},Qi.prototype.evaluate=function(S){var z=this.labels,Z=this.outputs;if(z.length===1)return Z[0].evaluate(S);var le=this.input.evaluate(S);if(le<=z[0])return Z[0].evaluate(S);var ke=z.length;if(le>=z[ke-1])return Z[ke-1].evaluate(S);var Ie=Sr(z,le),qe=z[Ie],it=z[Ie+1],dt=Qi.interpolationFactor(this.interpolation,le,qe,it),St=Z[Ie].evaluate(S),Rt=Z[Ie+1].evaluate(S);return this.operator==="interpolate"?pr[this.type.kind.toLowerCase()](St,Rt,dt):this.operator==="interpolate-hcl"?Qa.reverse(Qa.interpolate(Qa.forward(St),Qa.forward(Rt),dt)):$s.reverse($s.interpolate($s.forward(St),$s.forward(Rt),dt))},Qi.prototype.eachChild=function(S){S(this.input);for(var z=0,Z=this.outputs;z=Z.length)throw new ir("Array index out of bounds: "+z+" > "+(Z.length-1)+".");if(z!==Math.floor(z))throw new ir("Array index must be an integer, but found "+z+" instead.");return Z[z]},fs.prototype.eachChild=function(S){S(this.index),S(this.input)},fs.prototype.outputDefined=function(){return!1},fs.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var fi=function(S,z){this.type=Pt,this.needle=S,this.haystack=z};fi.parse=function(S,z){if(S.length!==3)return z.error("Expected 2 arguments, but found "+(S.length-1)+" instead.");var Z=z.parse(S[1],1,Gt),le=z.parse(S[2],2,Gt);return Z&&le?wn(Z.type,[Pt,_t,Ot,mt,Gt])?new fi(Z,le):z.error("Expected first argument to be of type boolean, string, number or null, but found "+ln(Z.type)+" instead"):null},fi.prototype.evaluate=function(S){var z=this.needle.evaluate(S),Z=this.haystack.evaluate(S);if(!Z)return!1;if(!on(z,["boolean","string","number","null"]))throw new ir("Expected first argument to be of type boolean, string, number or null, but found "+ln(tr(z))+" instead.");if(!on(Z,["string","array"]))throw new ir("Expected second argument to be of type array or string, but found "+ln(tr(Z))+" instead.");return Z.indexOf(z)>=0},fi.prototype.eachChild=function(S){S(this.needle),S(this.haystack)},fi.prototype.outputDefined=function(){return!0},fi.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var hs=function(S,z,Z){this.type=Ot,this.needle=S,this.haystack=z,this.fromIndex=Z};hs.parse=function(S,z){if(S.length<=2||S.length>=5)return z.error("Expected 3 or 4 arguments, but found "+(S.length-1)+" instead.");var Z=z.parse(S[1],1,Gt),le=z.parse(S[2],2,Gt);if(!Z||!le)return null;if(!wn(Z.type,[Pt,_t,Ot,mt,Gt]))return z.error("Expected first argument to be of type boolean, string, number or null, but found "+ln(Z.type)+" instead");if(S.length===4){var ke=z.parse(S[3],3,Ot);return ke?new hs(Z,le,ke):null}return new hs(Z,le)},hs.prototype.evaluate=function(S){var z=this.needle.evaluate(S),Z=this.haystack.evaluate(S);if(!on(z,["boolean","string","number","null"]))throw new ir("Expected first argument to be of type boolean, string, number or null, but found "+ln(tr(z))+" instead.");if(!on(Z,["string","array"]))throw new ir("Expected second argument to be of type array or string, but found "+ln(tr(Z))+" instead.");if(this.fromIndex){var le=this.fromIndex.evaluate(S);return Z.indexOf(z,le)}return Z.indexOf(z)},hs.prototype.eachChild=function(S){S(this.needle),S(this.haystack),this.fromIndex&&S(this.fromIndex)},hs.prototype.outputDefined=function(){return!1},hs.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var S=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),S]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var ao=function(S,z,Z,le,ke,Ie){this.inputType=S,this.type=z,this.input=Z,this.cases=le,this.outputs=ke,this.otherwise=Ie};ao.parse=function(S,z){if(S.length<5)return z.error("Expected at least 4 arguments, but found only "+(S.length-1)+".");if(S.length%2!=1)return z.error("Expected an even number of arguments.");var Z,le;z.expectedType&&z.expectedType.kind!=="value"&&(le=z.expectedType);for(var ke={},Ie=[],qe=2;qeNumber.MAX_SAFE_INTEGER)return St.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof Yt=="number"&&Math.floor(Yt)!==Yt)return St.error("Numeric branch labels must be integer values.");if(Z){if(St.checkSubtype(Z,tr(Yt)))return null}else Z=tr(Yt);if(ke[String(Yt)]!==void 0)return St.error("Branch labels must be unique.");ke[String(Yt)]=Ie.length}var Zt=z.parse(dt,qe,le);if(!Zt)return null;le=le||Zt.type,Ie.push(Zt)}var cn=z.parse(S[1],1,Gt);if(!cn)return null;var Tn=z.parse(S[S.length-1],S.length-1,le);return Tn?cn.type.kind!=="value"&&z.concat(1).checkSubtype(Z,cn.type)?null:new ao(Z,le,cn,ke,Ie,Tn):null},ao.prototype.evaluate=function(S){var z=this.input.evaluate(S);return(tr(z)===this.inputType&&this.outputs[this.cases[z]]||this.otherwise).evaluate(S)},ao.prototype.eachChild=function(S){S(this.input),this.outputs.forEach(S),S(this.otherwise)},ao.prototype.outputDefined=function(){return this.outputs.every(function(S){return S.outputDefined()})&&this.otherwise.outputDefined()},ao.prototype.serialize=function(){for(var S=this,z=["match",this.input.serialize()],Z=[],le={},ke=0,Ie=Object.keys(this.cases).sort();ke=5)return z.error("Expected 3 or 4 arguments, but found "+(S.length-1)+" instead.");var Z=z.parse(S[1],1,Gt),le=z.parse(S[2],2,Ot);if(!Z||!le)return null;if(!wn(Z.type,[yn(Gt),_t,Gt]))return z.error("Expected first argument to be of type array or string, but found "+ln(Z.type)+" instead");if(S.length===4){var ke=z.parse(S[3],3,Ot);return ke?new Ro(Z.type,Z,le,ke):null}return new Ro(Z.type,Z,le)},Ro.prototype.evaluate=function(S){var z=this.input.evaluate(S),Z=this.beginIndex.evaluate(S);if(!on(z,["string","array"]))throw new ir("Expected first argument to be of type array or string, but found "+ln(tr(z))+" instead.");if(this.endIndex){var le=this.endIndex.evaluate(S);return z.slice(Z,le)}return z.slice(Z)},Ro.prototype.eachChild=function(S){S(this.input),S(this.beginIndex),this.endIndex&&S(this.endIndex)},Ro.prototype.outputDefined=function(){return!1},Ro.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var S=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),S]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var Hu=Xo("==",function(S,z,Z){return z===Z},Vu),qu=Xo("!=",function(S,z,Z){return z!==Z},function(S,z,Z,le){return!Vu(0,z,Z,le)}),Ec=Xo("<",function(S,z,Z){return z",function(S,z,Z){return z>Z},function(S,z,Z,le){return le.compare(z,Z)>0}),Gu=Xo("<=",function(S,z,Z){return z<=Z},function(S,z,Z,le){return le.compare(z,Z)<=0}),vu=Xo(">=",function(S,z,Z){return z>=Z},function(S,z,Z,le){return le.compare(z,Z)>=0}),$o=function(S,z,Z,le,ke){this.type=_t,this.number=S,this.locale=z,this.currency=Z,this.minFractionDigits=le,this.maxFractionDigits=ke};$o.parse=function(S,z){if(S.length!==3)return z.error("Expected two arguments.");var Z=z.parse(S[1],1,Ot);if(!Z)return null;var le=S[2];if(typeof le!="object"||Array.isArray(le))return z.error("NumberFormat options argument must be an object.");var ke=null;if(le.locale&&!(ke=z.parse(le.locale,1,_t)))return null;var Ie=null;if(le.currency&&!(Ie=z.parse(le.currency,1,_t)))return null;var qe=null;if(le["min-fraction-digits"]&&!(qe=z.parse(le["min-fraction-digits"],1,Ot)))return null;var it=null;return le["max-fraction-digits"]&&!(it=z.parse(le["max-fraction-digits"],1,Ot))?null:new $o(Z,ke,Ie,qe,it)},$o.prototype.evaluate=function(S){return new Intl.NumberFormat(this.locale?this.locale.evaluate(S):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(S):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(S):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(S):void 0}).format(this.number.evaluate(S))},$o.prototype.eachChild=function(S){S(this.number),this.locale&&S(this.locale),this.currency&&S(this.currency),this.minFractionDigits&&S(this.minFractionDigits),this.maxFractionDigits&&S(this.maxFractionDigits)},$o.prototype.outputDefined=function(){return!1},$o.prototype.serialize=function(){var S={};return this.locale&&(S.locale=this.locale.serialize()),this.currency&&(S.currency=this.currency.serialize()),this.minFractionDigits&&(S["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(S["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),S]};var Jo=function(S){this.type=Ot,this.input=S};Jo.parse=function(S,z){if(S.length!==2)return z.error("Expected 1 argument, but found "+(S.length-1)+" instead.");var Z=z.parse(S[1],1);return Z?Z.type.kind!=="array"&&Z.type.kind!=="string"&&Z.type.kind!=="value"?z.error("Expected argument of type string or array, but found "+ln(Z.type)+" instead."):new Jo(Z):null},Jo.prototype.evaluate=function(S){var z=this.input.evaluate(S);if(typeof z=="string"||Array.isArray(z))return z.length;throw new ir("Expected value to be of type string or array, but found "+ln(tr(z))+" instead.")},Jo.prototype.eachChild=function(S){S(this.input)},Jo.prototype.outputDefined=function(){return!1},Jo.prototype.serialize=function(){var S=["length"];return this.eachChild(function(z){S.push(z.serialize())}),S};var Js={"==":Hu,"!=":qu,">":gu,"<":Ec,">=":vu,"<=":Gu,array:yr,at:fs,boolean:yr,case:bo,coalesce:qa,collator:Qn,format:$t,image:mn,in:fi,"index-of":hs,interpolate:Qi,"interpolate-hcl":Qi,"interpolate-lab":Qi,length:Jo,let:eo,literal:gr,match:ao,number:yr,"number-format":$o,object:yr,slice:Ro,step:Mr,string:yr,"to-boolean":En,"to-color":En,"to-number":En,"to-string":En,var:fr,within:er};function Ko(S,z){var Z=z[0],le=z[1],ke=z[2],Ie=z[3];Z=Z.evaluate(S),le=le.evaluate(S),ke=ke.evaluate(S);var qe=Ie?Ie.evaluate(S):1,it=qn(Z,le,ke,qe);if(it)throw new ir(it);return new hn(Z/255*qe,le/255*qe,ke/255*qe,qe)}function mu(S,z){return S in z}function yu(S,z){var Z=z[S];return Z===void 0?null:Z}function Ls(S){return{type:S}}function Vl(S){return{result:"success",value:S}}function ps(S){return{result:"error",value:S}}function Ks(S){return S["property-type"]==="data-driven"||S["property-type"]==="cross-faded-data-driven"}function Ps(S){return!!S.expression&&S.expression.parameters.indexOf("zoom")>-1}function Qo(S){return!!S.expression&&S.expression.interpolated}function hi(S){return S instanceof Number?"number":S instanceof String?"string":S instanceof Boolean?"boolean":Array.isArray(S)?"array":S===null?"null":typeof S}function ds(S){return typeof S=="object"&&S!==null&&!Array.isArray(S)}function Cc(S){return S}function Hl(S,z){var Z,le,ke,Ie=z.type==="color",qe=S.stops&&typeof S.stops[0][0]=="object",it=qe||S.property!==void 0,dt=qe||!it,St=S.type||(Qo(z)?"exponential":"interval");if(Ie&&((S=ut({},S)).stops&&(S.stops=S.stops.map(function(br){return[br[0],hn.parse(br[1])]})),S.default?S.default=hn.parse(S.default):S.default=hn.parse(z.default)),S.colorSpace&&S.colorSpace!=="rgb"&&!du[S.colorSpace])throw new Error("Unknown color space: "+S.colorSpace);if(St==="exponential")Z=oo;else if(St==="interval")Z=Qs;else if(St==="categorical"){Z=Os,le=Object.create(null);for(var Rt=0,Ht=S.stops;Rt=S.stops[le-1][0])return S.stops[le-1][1];var ke=Sr(S.stops.map(function(Ie){return Ie[0]}),Z);return S.stops[ke][1]}function oo(S,z,Z){var le=S.base!==void 0?S.base:1;if(hi(Z)!=="number")return bl(S.default,z.default);var ke=S.stops.length;if(ke===1||Z<=S.stops[0][0])return S.stops[0][1];if(Z>=S.stops[ke-1][0])return S.stops[ke-1][1];var Ie=Sr(S.stops.map(function(Ht){return Ht[0]}),Z),qe=function(Ht,Yt,Zt,cn){var Tn=cn-Zt,Fn=Ht-Zt;return Tn===0?0:Yt===1?Fn/Tn:(Math.pow(Yt,Fn)-1)/(Math.pow(Yt,Tn)-1)}(Z,le,S.stops[Ie][0],S.stops[Ie+1][0]),it=S.stops[Ie][1],dt=S.stops[Ie+1][1],St=pr[z.type]||Cc;if(S.colorSpace&&S.colorSpace!=="rgb"){var Rt=du[S.colorSpace];St=function(Ht,Yt){return Rt.reverse(Rt.interpolate(Rt.forward(Ht),Rt.forward(Yt),qe))}}return typeof it.evaluate=="function"?{evaluate:function(){for(var Ht=[],Yt=arguments.length;Yt--;)Ht[Yt]=arguments[Yt];var Zt=it.evaluate.apply(void 0,Ht),cn=dt.evaluate.apply(void 0,Ht);if(Zt!==void 0&&cn!==void 0)return St(Zt,cn,qe)}}:St(it,dt,qe)}function xu(S,z,Z){return z.type==="color"?Z=hn.parse(Z):z.type==="formatted"?Z=Nn.fromString(Z.toString()):z.type==="resolvedImage"?Z=Hn.fromString(Z.toString()):hi(Z)===z.type||z.type==="enum"&&z.values[Z]||(Z=void 0),bl(Z,S.default,z.default)}Zn.register(Js,{error:[{kind:"error"},[_t],function(S,z){var Z=z[0];throw new ir(Z.evaluate(S))}],typeof:[_t,[Gt],function(S,z){return ln(tr(z[0].evaluate(S)))}],"to-rgba":[yn(Ot,4),[Bt],function(S,z){return z[0].evaluate(S).toArray()}],rgb:[Bt,[Ot,Ot,Ot],Ko],rgba:[Bt,[Ot,Ot,Ot,Ot],Ko],has:{type:Pt,overloads:[[[_t],function(S,z){return mu(z[0].evaluate(S),S.properties())}],[[_t,Wt],function(S,z){var Z=z[0],le=z[1];return mu(Z.evaluate(S),le.evaluate(S))}]]},get:{type:Gt,overloads:[[[_t],function(S,z){return yu(z[0].evaluate(S),S.properties())}],[[_t,Wt],function(S,z){var Z=z[0],le=z[1];return yu(Z.evaluate(S),le.evaluate(S))}]]},"feature-state":[Gt,[_t],function(S,z){return yu(z[0].evaluate(S),S.featureState||{})}],properties:[Wt,[],function(S){return S.properties()}],"geometry-type":[_t,[],function(S){return S.geometryType()}],id:[Gt,[],function(S){return S.id()}],zoom:[Ot,[],function(S){return S.globals.zoom}],"heatmap-density":[Ot,[],function(S){return S.globals.heatmapDensity||0}],"line-progress":[Ot,[],function(S){return S.globals.lineProgress||0}],accumulated:[Gt,[],function(S){return S.globals.accumulated===void 0?null:S.globals.accumulated}],"+":[Ot,Ls(Ot),function(S,z){for(var Z=0,le=0,ke=z;le":[Pt,[_t,Gt],function(S,z){var Z=z[0],le=z[1],ke=S.properties()[Z.value],Ie=le.value;return typeof ke==typeof Ie&&ke>Ie}],"filter-id->":[Pt,[Gt],function(S,z){var Z=z[0],le=S.id(),ke=Z.value;return typeof le==typeof ke&&le>ke}],"filter-<=":[Pt,[_t,Gt],function(S,z){var Z=z[0],le=z[1],ke=S.properties()[Z.value],Ie=le.value;return typeof ke==typeof Ie&&ke<=Ie}],"filter-id-<=":[Pt,[Gt],function(S,z){var Z=z[0],le=S.id(),ke=Z.value;return typeof le==typeof ke&&le<=ke}],"filter->=":[Pt,[_t,Gt],function(S,z){var Z=z[0],le=z[1],ke=S.properties()[Z.value],Ie=le.value;return typeof ke==typeof Ie&&ke>=Ie}],"filter-id->=":[Pt,[Gt],function(S,z){var Z=z[0],le=S.id(),ke=Z.value;return typeof le==typeof ke&&le>=ke}],"filter-has":[Pt,[Gt],function(S,z){return z[0].value in S.properties()}],"filter-has-id":[Pt,[],function(S){return S.id()!==null&&S.id()!==void 0}],"filter-type-in":[Pt,[yn(_t)],function(S,z){return z[0].value.indexOf(S.geometryType())>=0}],"filter-id-in":[Pt,[yn(Gt)],function(S,z){return z[0].value.indexOf(S.id())>=0}],"filter-in-small":[Pt,[_t,yn(Gt)],function(S,z){var Z=z[0];return z[1].value.indexOf(S.properties()[Z.value])>=0}],"filter-in-large":[Pt,[_t,yn(Gt)],function(S,z){var Z=z[0],le=z[1];return function(ke,Ie,qe,it){for(;qe<=it;){var dt=qe+it>>1;if(Ie[dt]===ke)return!0;Ie[dt]>ke?it=dt-1:qe=dt+1}return!1}(S.properties()[Z.value],le.value,0,le.value.length-1)}],all:{type:Pt,overloads:[[[Pt,Pt],function(S,z){var Z=z[0],le=z[1];return Z.evaluate(S)&&le.evaluate(S)}],[Ls(Pt),function(S,z){for(var Z=0,le=z;Z0&&typeof S[0]=="string"&&S[0]in Js}function wl(S,z){var Z=new cr(Js,[],z?function(ke){var Ie={color:Bt,string:_t,number:Ot,enum:_t,boolean:Pt,formatted:Kt,resolvedImage:nn};return ke.type==="array"?yn(Ie[ke.value]||Gt,ke.length):Ie[ke.type]}(z):void 0),le=Z.parse(S,void 0,void 0,void 0,z&&z.type==="string"?{typeAnnotation:"coerce"}:void 0);return le?Vl(new _l(le,z)):ps(Z.errors)}_l.prototype.evaluateWithoutErrorHandling=function(S,z,Z,le,ke,Ie){return this._evaluator.globals=S,this._evaluator.feature=z,this._evaluator.featureState=Z,this._evaluator.canonical=le,this._evaluator.availableImages=ke||null,this._evaluator.formattedSection=Ie,this.expression.evaluate(this._evaluator)},_l.prototype.evaluate=function(S,z,Z,le,ke,Ie){this._evaluator.globals=S,this._evaluator.feature=z||null,this._evaluator.featureState=Z||null,this._evaluator.canonical=le,this._evaluator.availableImages=ke||null,this._evaluator.formattedSection=Ie||null;try{var qe=this.expression.evaluate(this._evaluator);if(qe==null||typeof qe=="number"&&qe!=qe)return this._defaultValue;if(this._enumValues&&!(qe in this._enumValues))throw new ir("Expected value to be one of "+Object.keys(this._enumValues).map(function(it){return JSON.stringify(it)}).join(", ")+", but found "+JSON.stringify(qe)+" instead.");return qe}catch(it){return this._warningHistory[it.message]||(this._warningHistory[it.message]=!0,typeof console<"u"&&console.warn(it.message)),this._defaultValue}};var Is=function(S,z){this.kind=S,this._styleExpression=z,this.isStateDependent=S!=="constant"&&!lr(z.expression)};Is.prototype.evaluateWithoutErrorHandling=function(S,z,Z,le,ke,Ie){return this._styleExpression.evaluateWithoutErrorHandling(S,z,Z,le,ke,Ie)},Is.prototype.evaluate=function(S,z,Z,le,ke,Ie){return this._styleExpression.evaluate(S,z,Z,le,ke,Ie)};var Rs=function(S,z,Z,le){this.kind=S,this.zoomStops=Z,this._styleExpression=z,this.isStateDependent=S!=="camera"&&!lr(z.expression),this.interpolationType=le};function tl(S,z){if((S=wl(S,z)).result==="error")return S;var Z=S.value.expression,le=Jn(Z);if(!le&&!Ks(z))return ps([new Lt("","data expressions not supported")]);var ke=sr(Z,["zoom"]);if(!ke&&!Ps(z))return ps([new Lt("","zoom expressions not supported")]);var Ie=kl(Z);if(!Ie&&!ke)return ps([new Lt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(Ie instanceof Lt)return ps([Ie]);if(Ie instanceof Qi&&!Qo(z))return ps([new Lt("",'"interpolate" expressions cannot be used with this property')]);if(!Ie)return Vl(new Is(le?"constant":"source",S.value));var qe=Ie instanceof Qi?Ie.interpolation:void 0;return Vl(new Rs(le?"camera":"composite",S.value,Ie.labels,qe))}Rs.prototype.evaluateWithoutErrorHandling=function(S,z,Z,le,ke,Ie){return this._styleExpression.evaluateWithoutErrorHandling(S,z,Z,le,ke,Ie)},Rs.prototype.evaluate=function(S,z,Z,le,ke,Ie){return this._styleExpression.evaluate(S,z,Z,le,ke,Ie)},Rs.prototype.interpolationFactor=function(S,z,Z){return this.interpolationType?Qi.interpolationFactor(this.interpolationType,S,z,Z):0};var Tl=function(S,z){this._parameters=S,this._specification=z,ut(this,Hl(this._parameters,this._specification))};function kl(S){var z=null;if(S instanceof eo)z=kl(S.result);else if(S instanceof qa)for(var Z=0,le=S.args;Zle.maximum?[new Be(z,Z,Z+" is greater than the maximum value "+le.maximum)]:[]}function bu(S){var z,Z,le,ke=S.valueSpec,Ie=pt(S.value.type),qe={},it=Ie!=="categorical"&&S.value.property===void 0,dt=!it,St=hi(S.value.stops)==="array"&&hi(S.value.stops[0])==="array"&&hi(S.value.stops[0][0])==="object",Rt=so({key:S.key,value:S.value,valueSpec:S.styleSpec.function,style:S.style,styleSpec:S.styleSpec,objectElementValidators:{stops:function(Zt){if(Ie==="identity")return[new Be(Zt.key,Zt.value,'identity function may not have a "stops" property')];var cn=[],Tn=Zt.value;return cn=cn.concat(Al({key:Zt.key,value:Tn,valueSpec:Zt.valueSpec,style:Zt.style,styleSpec:Zt.styleSpec,arrayElementValidator:Ht})),hi(Tn)==="array"&&Tn.length===0&&cn.push(new Be(Zt.key,Tn,"array must have at least one stop")),cn},default:function(Zt){return Oi({key:Zt.key,value:Zt.value,valueSpec:ke,style:Zt.style,styleSpec:Zt.styleSpec})}}});return Ie==="identity"&&it&&Rt.push(new Be(S.key,S.value,'missing required property "property"')),Ie==="identity"||S.value.stops||Rt.push(new Be(S.key,S.value,'missing required property "stops"')),Ie==="exponential"&&S.valueSpec.expression&&!Qo(S.valueSpec)&&Rt.push(new Be(S.key,S.value,"exponential functions not supported")),S.styleSpec.$version>=8&&(dt&&!Ks(S.valueSpec)?Rt.push(new Be(S.key,S.value,"property functions not supported")):it&&!Ps(S.valueSpec)&&Rt.push(new Be(S.key,S.value,"zoom functions not supported"))),Ie!=="categorical"&&!St||S.value.property!==void 0||Rt.push(new Be(S.key,S.value,'"property" property is required')),Rt;function Ht(Zt){var cn=[],Tn=Zt.value,Fn=Zt.key;if(hi(Tn)!=="array")return[new Be(Fn,Tn,"array expected, "+hi(Tn)+" found")];if(Tn.length!==2)return[new Be(Fn,Tn,"array length 2 expected, length "+Tn.length+" found")];if(St){if(hi(Tn[0])!=="object")return[new Be(Fn,Tn,"object expected, "+hi(Tn[0])+" found")];if(Tn[0].zoom===void 0)return[new Be(Fn,Tn,"object stop key must have zoom")];if(Tn[0].value===void 0)return[new Be(Fn,Tn,"object stop key must have value")];if(le&&le>pt(Tn[0].zoom))return[new Be(Fn,Tn[0].zoom,"stop zoom values must appear in ascending order")];pt(Tn[0].zoom)!==le&&(le=pt(Tn[0].zoom),Z=void 0,qe={}),cn=cn.concat(so({key:Fn+"[0]",value:Tn[0],valueSpec:{zoom:{}},style:Zt.style,styleSpec:Zt.styleSpec,objectElementValidators:{zoom:Ml,value:Yt}}))}else cn=cn.concat(Yt({key:Fn+"[0]",value:Tn[0],valueSpec:{},style:Zt.style,styleSpec:Zt.styleSpec},Tn));return el(bt(Tn[1]))?cn.concat([new Be(Fn+"[1]",Tn[1],"expressions are not allowed in function stops.")]):cn.concat(Oi({key:Fn+"[1]",value:Tn[1],valueSpec:ke,style:Zt.style,styleSpec:Zt.styleSpec}))}function Yt(Zt,cn){var Tn=hi(Zt.value),Fn=pt(Zt.value),Dn=Zt.value!==null?Zt.value:cn;if(z){if(Tn!==z)return[new Be(Zt.key,Dn,Tn+" stop domain type must match previous stop domain type "+z)]}else z=Tn;if(Tn!=="number"&&Tn!=="string"&&Tn!=="boolean")return[new Be(Zt.key,Dn,"stop domain value must be a number, string, or boolean")];if(Tn!=="number"&&Ie!=="categorical"){var Gn="number expected, "+Tn+" found";return Ks(ke)&&Ie===void 0&&(Gn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Be(Zt.key,Dn,Gn)]}return Ie!=="categorical"||Tn!=="number"||isFinite(Fn)&&Math.floor(Fn)===Fn?Ie!=="categorical"&&Tn==="number"&&Z!==void 0&&Fn=2&&S[1]!=="$id"&&S[1]!=="$type";case"in":return S.length>=3&&(typeof S[1]!="string"||Array.isArray(S[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return S.length!==3||Array.isArray(S[1])||Array.isArray(S[2]);case"any":case"all":for(var z=0,Z=S.slice(1);zz?1:0}function zs(S){if(!Array.isArray(S))return!1;if(S[0]==="within")return!0;for(var z=1;z"||Z==="<="||Z===">="?bi(S[1],S[2],Z):Z==="any"?(z=S.slice(1),["any"].concat(z.map(Ds))):Z==="all"?["all"].concat(S.slice(1).map(Ds)):Z==="none"?["all"].concat(S.slice(1).map(Ds).map(ga)):Z==="in"?vs(S[1],S.slice(2)):Z==="!in"?ga(vs(S[1],S.slice(2))):Z==="has"?ms(S[1]):Z==="!has"?ga(ms(S[1])):Z!=="within"||S}function bi(S,z,Z){switch(S){case"$type":return["filter-type-"+Z,z];case"$id":return["filter-id-"+Z,z];default:return["filter-"+Z,S,z]}}function vs(S,z){if(z.length===0)return!1;switch(S){case"$type":return["filter-type-in",["literal",z]];case"$id":return["filter-id-in",["literal",z]];default:return z.length>200&&!z.some(function(Z){return typeof Z!=typeof z[0]})?["filter-in-large",S,["literal",z.sort(nl)]]:["filter-in-small",S,["literal",z]]}}function ms(S){switch(S){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",S]}}function ga(S){return["!",S]}function oi(S){return Sl(bt(S.value))?gs(ut({},S,{expressionContext:"filter",valueSpec:{value:"boolean"}})):li(S)}function li(S){var z=S.value,Z=S.key;if(hi(z)!=="array")return[new Be(Z,z,"array expected, "+hi(z)+" found")];var le,ke=S.styleSpec,Ie=[];if(z.length<1)return[new Be(Z,z,"filter array must have at least 1 element")];switch(Ie=Ie.concat(ql({key:Z+"[0]",value:z[0],valueSpec:ke.filter_operator,style:S.style,styleSpec:S.styleSpec})),pt(z[0])){case"<":case"<=":case">":case">=":z.length>=2&&pt(z[1])==="$type"&&Ie.push(new Be(Z,z,'"$type" cannot be use with operator "'+z[0]+'"'));case"==":case"!=":z.length!==3&&Ie.push(new Be(Z,z,'filter array for operator "'+z[0]+'" must have 3 elements'));case"in":case"!in":z.length>=2&&(le=hi(z[1]))!=="string"&&Ie.push(new Be(Z+"[1]",z[1],"string expected, "+le+" found"));for(var qe=2;qe=Rt[Zt+0]&&le>=Rt[Zt+1])?(qe[Yt]=!0,Ie.push(St[Yt])):qe[Yt]=!1}}},Ga.prototype._forEachCell=function(S,z,Z,le,ke,Ie,qe,it){for(var dt=this._convertToCellCoord(S),St=this._convertToCellCoord(z),Rt=this._convertToCellCoord(Z),Ht=this._convertToCellCoord(le),Yt=dt;Yt<=Rt;Yt++)for(var Zt=St;Zt<=Ht;Zt++){var cn=this.d*Zt+Yt;if((!it||it(this._convertFromCellCoord(Yt),this._convertFromCellCoord(Zt),this._convertFromCellCoord(Yt+1),this._convertFromCellCoord(Zt+1)))&&ke.call(this,S,z,Z,le,cn,Ie,qe,it))return}},Ga.prototype._convertFromCellCoord=function(S){return(S-this.padding)/this.scale},Ga.prototype._convertToCellCoord=function(S){return Math.max(0,Math.min(this.d-1,Math.floor(S*this.scale)+this.padding))},Ga.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var S=this.cells,z=3+this.cells.length+1+1,Z=0,le=0;le=0)){var Ht=S[Rt];St[Rt]=Sa[dt].shallow.indexOf(Rt)>=0?Ht:rl(Ht,z)}S instanceof Error&&(St.message=S.message)}if(St.$name)throw new Error("$name property is reserved for worker serialization logic.");return dt!=="Object"&&(St.$name=dt),St}throw new Error("can't serialize object of type "+typeof S)}function il(S){if(S==null||typeof S=="boolean"||typeof S=="number"||typeof S=="string"||S instanceof Boolean||S instanceof Number||S instanceof String||S instanceof Date||S instanceof RegExp||Ra(S)||Yl(S)||ArrayBuffer.isView(S)||S instanceof Wl)return S;if(Array.isArray(S))return S.map(il);if(typeof S=="object"){var z=S.$name||"Object",Z=Sa[z].klass;if(!Z)throw new Error("can't deserialize unregistered class "+z);if(Z.deserialize)return Z.deserialize(S);for(var le=Object.create(Z.prototype),ke=0,Ie=Object.keys(S);ke=0?it:il(it)}}return le}throw new Error("can't deserialize object of type "+typeof S)}var al=function(){this.first=!0};al.prototype.update=function(S,z){var Z=Math.floor(S);return this.first?(this.first=!1,this.lastIntegerZoom=Z,this.lastIntegerZoomTime=0,this.lastZoom=S,this.lastFloorZoom=Z,!0):(this.lastFloorZoom>Z?(this.lastIntegerZoom=Z+1,this.lastIntegerZoomTime=z):this.lastFloorZoom=128&&S<=255},Arabic:function(S){return S>=1536&&S<=1791},"Arabic Supplement":function(S){return S>=1872&&S<=1919},"Arabic Extended-A":function(S){return S>=2208&&S<=2303},"Hangul Jamo":function(S){return S>=4352&&S<=4607},"Unified Canadian Aboriginal Syllabics":function(S){return S>=5120&&S<=5759},Khmer:function(S){return S>=6016&&S<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(S){return S>=6320&&S<=6399},"General Punctuation":function(S){return S>=8192&&S<=8303},"Letterlike Symbols":function(S){return S>=8448&&S<=8527},"Number Forms":function(S){return S>=8528&&S<=8591},"Miscellaneous Technical":function(S){return S>=8960&&S<=9215},"Control Pictures":function(S){return S>=9216&&S<=9279},"Optical Character Recognition":function(S){return S>=9280&&S<=9311},"Enclosed Alphanumerics":function(S){return S>=9312&&S<=9471},"Geometric Shapes":function(S){return S>=9632&&S<=9727},"Miscellaneous Symbols":function(S){return S>=9728&&S<=9983},"Miscellaneous Symbols and Arrows":function(S){return S>=11008&&S<=11263},"CJK Radicals Supplement":function(S){return S>=11904&&S<=12031},"Kangxi Radicals":function(S){return S>=12032&&S<=12255},"Ideographic Description Characters":function(S){return S>=12272&&S<=12287},"CJK Symbols and Punctuation":function(S){return S>=12288&&S<=12351},Hiragana:function(S){return S>=12352&&S<=12447},Katakana:function(S){return S>=12448&&S<=12543},Bopomofo:function(S){return S>=12544&&S<=12591},"Hangul Compatibility Jamo":function(S){return S>=12592&&S<=12687},Kanbun:function(S){return S>=12688&&S<=12703},"Bopomofo Extended":function(S){return S>=12704&&S<=12735},"CJK Strokes":function(S){return S>=12736&&S<=12783},"Katakana Phonetic Extensions":function(S){return S>=12784&&S<=12799},"Enclosed CJK Letters and Months":function(S){return S>=12800&&S<=13055},"CJK Compatibility":function(S){return S>=13056&&S<=13311},"CJK Unified Ideographs Extension A":function(S){return S>=13312&&S<=19903},"Yijing Hexagram Symbols":function(S){return S>=19904&&S<=19967},"CJK Unified Ideographs":function(S){return S>=19968&&S<=40959},"Yi Syllables":function(S){return S>=40960&&S<=42127},"Yi Radicals":function(S){return S>=42128&&S<=42191},"Hangul Jamo Extended-A":function(S){return S>=43360&&S<=43391},"Hangul Syllables":function(S){return S>=44032&&S<=55215},"Hangul Jamo Extended-B":function(S){return S>=55216&&S<=55295},"Private Use Area":function(S){return S>=57344&&S<=63743},"CJK Compatibility Ideographs":function(S){return S>=63744&&S<=64255},"Arabic Presentation Forms-A":function(S){return S>=64336&&S<=65023},"Vertical Forms":function(S){return S>=65040&&S<=65055},"CJK Compatibility Forms":function(S){return S>=65072&&S<=65103},"Small Form Variants":function(S){return S>=65104&&S<=65135},"Arabic Presentation Forms-B":function(S){return S>=65136&&S<=65279},"Halfwidth and Fullwidth Forms":function(S){return S>=65280&&S<=65519}};function ol(S){for(var z=0,Z=S;z=65097&&S<=65103)||Or["CJK Compatibility Ideographs"](S)||Or["CJK Compatibility"](S)||Or["CJK Radicals Supplement"](S)||Or["CJK Strokes"](S)||!(!Or["CJK Symbols and Punctuation"](S)||S>=12296&&S<=12305||S>=12308&&S<=12319||S===12336)||Or["CJK Unified Ideographs Extension A"](S)||Or["CJK Unified Ideographs"](S)||Or["Enclosed CJK Letters and Months"](S)||Or["Hangul Compatibility Jamo"](S)||Or["Hangul Jamo Extended-A"](S)||Or["Hangul Jamo Extended-B"](S)||Or["Hangul Jamo"](S)||Or["Hangul Syllables"](S)||Or.Hiragana(S)||Or["Ideographic Description Characters"](S)||Or.Kanbun(S)||Or["Kangxi Radicals"](S)||Or["Katakana Phonetic Extensions"](S)||Or.Katakana(S)&&S!==12540||!(!Or["Halfwidth and Fullwidth Forms"](S)||S===65288||S===65289||S===65293||S>=65306&&S<=65310||S===65339||S===65341||S===65343||S>=65371&&S<=65503||S===65507||S>=65512&&S<=65519)||!(!Or["Small Form Variants"](S)||S>=65112&&S<=65118||S>=65123&&S<=65126)||Or["Unified Canadian Aboriginal Syllabics"](S)||Or["Unified Canadian Aboriginal Syllabics Extended"](S)||Or["Vertical Forms"](S)||Or["Yijing Hexagram Symbols"](S)||Or["Yi Syllables"](S)||Or["Yi Radicals"](S))))}function Xl(S){return!(uo(S)||function(z){return!!(Or["Latin-1 Supplement"](z)&&(z===167||z===169||z===174||z===177||z===188||z===189||z===190||z===215||z===247)||Or["General Punctuation"](z)&&(z===8214||z===8224||z===8225||z===8240||z===8241||z===8251||z===8252||z===8258||z===8263||z===8264||z===8265||z===8273)||Or["Letterlike Symbols"](z)||Or["Number Forms"](z)||Or["Miscellaneous Technical"](z)&&(z>=8960&&z<=8967||z>=8972&&z<=8991||z>=8996&&z<=9e3||z===9003||z>=9085&&z<=9114||z>=9150&&z<=9165||z===9167||z>=9169&&z<=9179||z>=9186&&z<=9215)||Or["Control Pictures"](z)&&z!==9251||Or["Optical Character Recognition"](z)||Or["Enclosed Alphanumerics"](z)||Or["Geometric Shapes"](z)||Or["Miscellaneous Symbols"](z)&&!(z>=9754&&z<=9759)||Or["Miscellaneous Symbols and Arrows"](z)&&(z>=11026&&z<=11055||z>=11088&&z<=11097||z>=11192&&z<=11243)||Or["CJK Symbols and Punctuation"](z)||Or.Katakana(z)||Or["Private Use Area"](z)||Or["CJK Compatibility Forms"](z)||Or["Small Form Variants"](z)||Or["Halfwidth and Fullwidth Forms"](z)||z===8734||z===8756||z===8757||z>=9984&&z<=10087||z>=10102&&z<=10131||z===65532||z===65533)}(S))}function Cl(S){return Or.Arabic(S)||Or["Arabic Supplement"](S)||Or["Arabic Extended-A"](S)||Or["Arabic Presentation Forms-A"](S)||Or["Arabic Presentation Forms-B"](S)}function ya(S){return S>=1424&&S<=2303||Or["Arabic Presentation Forms-A"](S)||Or["Arabic Presentation Forms-B"](S)}function Vs(S,z){return!(!z&&ya(S)||S>=2304&&S<=3583||S>=3840&&S<=4255||Or.Khmer(S))}function ns(S){for(var z=0,Z=S;z-1&&(xa=co),Hs&&Hs(S)};function Ll(){to.fire(new Ge("pluginStateChange",{pluginStatus:xa,pluginURL:fo}))}var to=new ht,ho=function(){return xa},Fo=function(){if(xa!==Wa||!fo)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");xa=xs,Ll(),fo&&Dt({url:fo},function(S){S?vi(S):(xa=_o,Ll())})},za={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return xa===_o||za.applyArabicShaping!=null},isLoading:function(){return xa===xs},setState:function(S){xa=S.pluginStatus,fo=S.pluginURL},isParsed:function(){return za.applyArabicShaping!=null&&za.processBidirectionalText!=null&&za.processStyledBidirectionalText!=null},getPluginURL:function(){return fo}},di=function(S,z){this.zoom=S,z?(this.now=z.now,this.fadeDuration=z.fadeDuration,this.zoomHistory=z.zoomHistory,this.transition=z.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new al,this.transition={})};di.prototype.isSupportedScript=function(S){return function(z,Z){for(var le=0,ke=z;lethis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:z+(1-z)*Z}:{fromScale:.5,toScale:1,t:1-(1-Z)*z}};var oa=function(S,z){this.property=S,this.value=z,this.expression=function(Z,le){if(ds(Z))return new Tl(Z,le);if(el(Z)){var ke=tl(Z,le);if(ke.result==="error")throw new Error(ke.value.map(function(qe){return qe.key+": "+qe.message}).join(", "));return ke.value}var Ie=Z;return typeof Z=="string"&&le.type==="color"&&(Ie=hn.parse(Z)),{kind:"constant",evaluate:function(){return Ie}}}(z===void 0?S.specification.default:z,S.specification)};oa.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},oa.prototype.possiblyEvaluate=function(S,z,Z){return this.property.possiblyEvaluate(this,S,z,Z)};var wo=function(S){this.property=S,this.value=new oa(S,void 0)};wo.prototype.transitioned=function(S,z){return new Bo(this.property,this.value,z,u({},S.transition,this.transition),S.now)},wo.prototype.untransitioned=function(){return new Bo(this.property,this.value,null,{},0)};var Da=function(S){this._properties=S,this._values=Object.create(S.defaultTransitionablePropertyValues)};Da.prototype.getValue=function(S){return k(this._values[S].value.value)},Da.prototype.setValue=function(S,z){this._values.hasOwnProperty(S)||(this._values[S]=new wo(this._values[S].property)),this._values[S].value=new oa(this._values[S].property,z===null?void 0:k(z))},Da.prototype.getTransition=function(S){return k(this._values[S].transition)},Da.prototype.setTransition=function(S,z){this._values.hasOwnProperty(S)||(this._values[S]=new wo(this._values[S].property)),this._values[S].transition=k(z)||void 0},Da.prototype.serialize=function(){for(var S={},z=0,Z=Object.keys(this._values);zthis.end)return this.prior=null,ke;if(this.value.isDataDriven())return this.prior=null,ke;if(le=1)return 1;var dt=it*it,St=dt*it;return 4*(it<.5?St:3*(it-dt)+St-.75)}(qe))}return ke};var bs=function(S){this._properties=S,this._values=Object.create(S.defaultTransitioningPropertyValues)};bs.prototype.possiblyEvaluate=function(S,z,Z){for(var le=new po(this._properties),ke=0,Ie=Object.keys(this._values);keIe.zoomHistory.lastIntegerZoom?{from:Z,to:le}:{from:ke,to:le}},z.prototype.interpolate=function(Z){return Z},z}(Ur),is=function(S){this.specification=S};is.prototype.possiblyEvaluate=function(S,z,Z,le){if(S.value!==void 0){if(S.expression.kind==="constant"){var ke=S.expression.evaluate(z,null,{},Z,le);return this._calculate(ke,ke,ke,z)}return this._calculate(S.expression.evaluate(new di(Math.floor(z.zoom-1),z)),S.expression.evaluate(new di(Math.floor(z.zoom),z)),S.expression.evaluate(new di(Math.floor(z.zoom+1),z)),z)}},is.prototype._calculate=function(S,z,Z,le){return le.zoom>le.zoomHistory.lastIntegerZoom?{from:S,to:z}:{from:Z,to:z}},is.prototype.interpolate=function(S){return S};var To=function(S){this.specification=S};To.prototype.possiblyEvaluate=function(S,z,Z,le){return!!S.expression.evaluate(z,null,{},Z,le)},To.prototype.interpolate=function(){return!1};var _a=function(S){for(var z in this.properties=S,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],S){var Z=S[z];Z.specification.overridable&&this.overridableProperties.push(z);var le=this.defaultPropertyValues[z]=new oa(Z,void 0),ke=this.defaultTransitionablePropertyValues[z]=new wo(Z);this.defaultTransitioningPropertyValues[z]=ke.untransitioned(),this.defaultPossiblyEvaluatedValues[z]=le.possiblyEvaluate({})}};Cr("DataDrivenProperty",Ur),Cr("DataConstantProperty",Fr),Cr("CrossFadedDataDrivenProperty",sl),Cr("CrossFadedProperty",is),Cr("ColorRampProperty",To);var $l="-transition",Fa=function(S){function z(Z,le){if(S.call(this),this.id=Z.id,this.type=Z.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},Z.type!=="custom"&&(this.metadata=Z.metadata,this.minzoom=Z.minzoom,this.maxzoom=Z.maxzoom,Z.type!=="background"&&(this.source=Z.source,this.sourceLayer=Z["source-layer"],this.filter=Z.filter),le.layout&&(this._unevaluatedLayout=new rs(le.layout)),le.paint)){for(var ke in this._transitionablePaint=new Da(le.paint),Z.paint)this.setPaintProperty(ke,Z.paint[ke],{validate:!1});for(var Ie in Z.layout)this.setLayoutProperty(Ie,Z.layout[Ie],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new po(le.paint)}}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},z.prototype.getLayoutProperty=function(Z){return Z==="visibility"?this.visibility:this._unevaluatedLayout.getValue(Z)},z.prototype.setLayoutProperty=function(Z,le,ke){if(ke===void 0&&(ke={}),le!=null){var Ie="layers."+this.id+".layout."+Z;if(this._validate(ys,Ie,Z,le,ke))return}Z!=="visibility"?this._unevaluatedLayout.setValue(Z,le):this.visibility=le},z.prototype.getPaintProperty=function(Z){return x(Z,$l)?this._transitionablePaint.getTransition(Z.slice(0,-$l.length)):this._transitionablePaint.getValue(Z)},z.prototype.setPaintProperty=function(Z,le,ke){if(ke===void 0&&(ke={}),le!=null){var Ie="layers."+this.id+".paint."+Z;if(this._validate(Ia,Ie,Z,le,ke))return!1}if(x(Z,$l))return this._transitionablePaint.setTransition(Z.slice(0,-$l.length),le||void 0),!1;var qe=this._transitionablePaint._values[Z],it=qe.property.specification["property-type"]==="cross-faded-data-driven",dt=qe.value.isDataDriven(),St=qe.value;this._transitionablePaint.setValue(Z,le),this._handleSpecialPaintPropertyUpdate(Z);var Rt=this._transitionablePaint._values[Z].value;return Rt.isDataDriven()||dt||it||this._handleOverridablePaintPropertyUpdate(Z,St,Rt)},z.prototype._handleSpecialPaintPropertyUpdate=function(Z){},z.prototype._handleOverridablePaintPropertyUpdate=function(Z,le,ke){return!1},z.prototype.isHidden=function(Z){return!!(this.minzoom&&Z=this.maxzoom)||this.visibility==="none"},z.prototype.updateTransitions=function(Z){this._transitioningPaint=this._transitionablePaint.transitioned(Z,this._transitioningPaint)},z.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},z.prototype.recalculate=function(Z,le){Z.getCrossfadeParameters&&(this._crossfadeParameters=Z.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(Z,void 0,le)),this.paint=this._transitioningPaint.possiblyEvaluate(Z,void 0,le)},z.prototype.serialize=function(){var Z={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&&(Z.layout=Z.layout||{},Z.layout.visibility=this.visibility),y(Z,function(le,ke){return!(le===void 0||ke==="layout"&&!Object.keys(le).length||ke==="paint"&&!Object.keys(le).length)})},z.prototype._validate=function(Z,le,ke,Ie,qe){return qe===void 0&&(qe={}),(!qe||qe.validate!==!1)&&lo(this,Z.call(ma,{key:le,layerType:this.type,objectKey:ke,value:Ie,styleSpec:Oe,style:{glyphs:!0,sprite:!0}}))},z.prototype.is3D=function(){return!1},z.prototype.isTileClipped=function(){return!1},z.prototype.hasOffscreenPass=function(){return!1},z.prototype.resize=function(){},z.prototype.isStateDependent=function(){for(var Z in this.paint._values){var le=this.paint.get(Z);if(le instanceof ba&&Ks(le.property.specification)&&(le.value.kind==="source"||le.value.kind==="composite")&&le.value.isStateDependent)return!0}return!1},z}(ht),ll={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},as=function(S,z){this._structArray=S,this._pos1=z*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},_i=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Si(S,z){z===void 0&&(z=1);var Z=0,le=0;return{members:S.map(function(ke){var Ie,qe=(Ie=ke.type,ll[Ie].BYTES_PER_ELEMENT),it=Z=Jl(Z,Math.max(z,qe)),dt=ke.components||1;return le=Math.max(le,qe),Z+=qe*dt,{name:ke.name,type:ke.type,components:dt,offset:it}}),size:Jl(Z,Math.max(le,z)),alignment:z}}function Jl(S,z){return Math.ceil(S/z)*z}_i.serialize=function(S,z){return S._trim(),z&&(S.isTransferred=!0,z.push(S.arrayBuffer)),{length:S.length,arrayBuffer:S.arrayBuffer}},_i.deserialize=function(S){var z=Object.create(this.prototype);return z.arrayBuffer=S.arrayBuffer,z.length=S.length,z.capacity=S.arrayBuffer.byteLength/z.bytesPerElement,z._refreshViews(),z},_i.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},_i.prototype.clear=function(){this.length=0},_i.prototype.resize=function(S){this.reserve(S),this.length=S},_i.prototype.reserve=function(S){if(S>this.capacity){this.capacity=Math.max(S,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var z=this.uint8;this._refreshViews(),z&&this.uint8.set(z)}},_i.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var et=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le){var ke=this.length;return this.resize(ke+1),this.emplace(ke,Z,le)},z.prototype.emplace=function(Z,le,ke){var Ie=2*Z;return this.int16[Ie+0]=le,this.int16[Ie+1]=ke,Z},z}(_i);et.prototype.bytesPerElement=4,Cr("StructArrayLayout2i4",et);var rt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie){var qe=this.length;return this.resize(qe+1),this.emplace(qe,Z,le,ke,Ie)},z.prototype.emplace=function(Z,le,ke,Ie,qe){var it=4*Z;return this.int16[it+0]=le,this.int16[it+1]=ke,this.int16[it+2]=Ie,this.int16[it+3]=qe,Z},z}(_i);rt.prototype.bytesPerElement=8,Cr("StructArrayLayout4i8",rt);var ct=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it){var dt=this.length;return this.resize(dt+1),this.emplace(dt,Z,le,ke,Ie,qe,it)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt){var St=6*Z;return this.int16[St+0]=le,this.int16[St+1]=ke,this.int16[St+2]=Ie,this.int16[St+3]=qe,this.int16[St+4]=it,this.int16[St+5]=dt,Z},z}(_i);ct.prototype.bytesPerElement=12,Cr("StructArrayLayout2i4i12",ct);var vt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it){var dt=this.length;return this.resize(dt+1),this.emplace(dt,Z,le,ke,Ie,qe,it)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt){var St=4*Z,Rt=8*Z;return this.int16[St+0]=le,this.int16[St+1]=ke,this.uint8[Rt+4]=Ie,this.uint8[Rt+5]=qe,this.uint8[Rt+6]=it,this.uint8[Rt+7]=dt,Z},z}(_i);vt.prototype.bytesPerElement=8,Cr("StructArrayLayout2i4ub8",vt);var Mt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht){var Yt=this.length;return this.resize(Yt+1),this.emplace(Yt,Z,le,ke,Ie,qe,it,dt,St,Rt,Ht)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt){var Zt=9*Z,cn=18*Z;return this.uint16[Zt+0]=le,this.uint16[Zt+1]=ke,this.uint16[Zt+2]=Ie,this.uint16[Zt+3]=qe,this.uint16[Zt+4]=it,this.uint16[Zt+5]=dt,this.uint16[Zt+6]=St,this.uint16[Zt+7]=Rt,this.uint8[cn+16]=Ht,this.uint8[cn+17]=Yt,Z},z}(_i);Mt.prototype.bytesPerElement=18,Cr("StructArrayLayout8ui2ub18",Mt);var kt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt){var cn=this.length;return this.resize(cn+1),this.emplace(cn,Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn){var Tn=12*Z;return this.int16[Tn+0]=le,this.int16[Tn+1]=ke,this.int16[Tn+2]=Ie,this.int16[Tn+3]=qe,this.uint16[Tn+4]=it,this.uint16[Tn+5]=dt,this.uint16[Tn+6]=St,this.uint16[Tn+7]=Rt,this.int16[Tn+8]=Ht,this.int16[Tn+9]=Yt,this.int16[Tn+10]=Zt,this.int16[Tn+11]=cn,Z},z}(_i);kt.prototype.bytesPerElement=24,Cr("StructArrayLayout4i4ui4i24",kt);var q=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,Z,le,ke)},z.prototype.emplace=function(Z,le,ke,Ie){var qe=3*Z;return this.float32[qe+0]=le,this.float32[qe+1]=ke,this.float32[qe+2]=Ie,Z},z}(_i);q.prototype.bytesPerElement=12,Cr("StructArrayLayout3f12",q);var $=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z){var le=this.length;return this.resize(le+1),this.emplace(le,Z)},z.prototype.emplace=function(Z,le){var ke=1*Z;return this.uint32[ke+0]=le,Z},z}(_i);$.prototype.bytesPerElement=4,Cr("StructArrayLayout1ul4",$);var W=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.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)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it,dt,St,Rt){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,Z,le,ke,Ie,qe,it,dt,St,Rt)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht){var Yt=10*Z,Zt=5*Z;return this.int16[Yt+0]=le,this.int16[Yt+1]=ke,this.int16[Yt+2]=Ie,this.int16[Yt+3]=qe,this.int16[Yt+4]=it,this.int16[Yt+5]=dt,this.uint32[Zt+3]=St,this.uint16[Yt+8]=Rt,this.uint16[Yt+9]=Ht,Z},z}(_i);W.prototype.bytesPerElement=20,Cr("StructArrayLayout6i1ul2ui20",W);var ae=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it){var dt=this.length;return this.resize(dt+1),this.emplace(dt,Z,le,ke,Ie,qe,it)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt){var St=6*Z;return this.int16[St+0]=le,this.int16[St+1]=ke,this.int16[St+2]=Ie,this.int16[St+3]=qe,this.int16[St+4]=it,this.int16[St+5]=dt,Z},z}(_i);ae.prototype.bytesPerElement=12,Cr("StructArrayLayout2i2i2i12",ae);var _e=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe){var it=this.length;return this.resize(it+1),this.emplace(it,Z,le,ke,Ie,qe)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it){var dt=4*Z,St=8*Z;return this.float32[dt+0]=le,this.float32[dt+1]=ke,this.float32[dt+2]=Ie,this.int16[St+6]=qe,this.int16[St+7]=it,Z},z}(_i);_e.prototype.bytesPerElement=16,Cr("StructArrayLayout2f1f2i16",_e);var Re=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie){var qe=this.length;return this.resize(qe+1),this.emplace(qe,Z,le,ke,Ie)},z.prototype.emplace=function(Z,le,ke,Ie,qe){var it=12*Z,dt=3*Z;return this.uint8[it+0]=le,this.uint8[it+1]=ke,this.float32[dt+1]=Ie,this.float32[dt+2]=qe,Z},z}(_i);Re.prototype.bytesPerElement=12,Cr("StructArrayLayout2ub2f12",Re);var He=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,Z,le,ke)},z.prototype.emplace=function(Z,le,ke,Ie){var qe=3*Z;return this.uint16[qe+0]=le,this.uint16[qe+1]=ke,this.uint16[qe+2]=Ie,Z},z}(_i);He.prototype.bytesPerElement=6,Cr("StructArrayLayout3ui6",He);var Xe=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.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)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn){var Yn=this.length;return this.resize(Yn+1),this.emplace(Yn,Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn,Yn){var Kn=24*Z,ar=12*Z,ur=48*Z;return this.int16[Kn+0]=le,this.int16[Kn+1]=ke,this.uint16[Kn+2]=Ie,this.uint16[Kn+3]=qe,this.uint32[ar+2]=it,this.uint32[ar+3]=dt,this.uint32[ar+4]=St,this.uint16[Kn+10]=Rt,this.uint16[Kn+11]=Ht,this.uint16[Kn+12]=Yt,this.float32[ar+7]=Zt,this.float32[ar+8]=cn,this.uint8[ur+36]=Tn,this.uint8[ur+37]=Fn,this.uint8[ur+38]=Dn,this.uint32[ar+10]=Gn,this.int16[Kn+22]=Yn,Z},z}(_i);Xe.prototype.bytesPerElement=48,Cr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Xe);var at=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.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)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn,Yn,Kn,ar,ur,Er,br,Ir,Br,$r,jr,Xr){var Vr=this.length;return this.resize(Vr+1),this.emplace(Vr,Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn,Yn,Kn,ar,ur,Er,br,Ir,Br,$r,jr,Xr)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn,Yn,Kn,ar,ur,Er,br,Ir,Br,$r,jr,Xr,Vr){var Nr=34*Z,si=17*Z;return this.int16[Nr+0]=le,this.int16[Nr+1]=ke,this.int16[Nr+2]=Ie,this.int16[Nr+3]=qe,this.int16[Nr+4]=it,this.int16[Nr+5]=dt,this.int16[Nr+6]=St,this.int16[Nr+7]=Rt,this.uint16[Nr+8]=Ht,this.uint16[Nr+9]=Yt,this.uint16[Nr+10]=Zt,this.uint16[Nr+11]=cn,this.uint16[Nr+12]=Tn,this.uint16[Nr+13]=Fn,this.uint16[Nr+14]=Dn,this.uint16[Nr+15]=Gn,this.uint16[Nr+16]=Yn,this.uint16[Nr+17]=Kn,this.uint16[Nr+18]=ar,this.uint16[Nr+19]=ur,this.uint16[Nr+20]=Er,this.uint16[Nr+21]=br,this.uint16[Nr+22]=Ir,this.uint32[si+12]=Br,this.float32[si+13]=$r,this.float32[si+14]=jr,this.float32[si+15]=Xr,this.float32[si+16]=Vr,Z},z}(_i);at.prototype.bytesPerElement=68,Cr("StructArrayLayout8i15ui1ul4f68",at);var wt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z){var le=this.length;return this.resize(le+1),this.emplace(le,Z)},z.prototype.emplace=function(Z,le){var ke=1*Z;return this.float32[ke+0]=le,Z},z}(_i);wt.prototype.bytesPerElement=4,Cr("StructArrayLayout1f4",wt);var At=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,Z,le,ke)},z.prototype.emplace=function(Z,le,ke,Ie){var qe=3*Z;return this.int16[qe+0]=le,this.int16[qe+1]=ke,this.int16[qe+2]=Ie,Z},z}(_i);At.prototype.bytesPerElement=6,Cr("StructArrayLayout3i6",At);var ie=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,Z,le,ke)},z.prototype.emplace=function(Z,le,ke,Ie){var qe=2*Z,it=4*Z;return this.uint32[qe+0]=le,this.uint16[it+2]=ke,this.uint16[it+3]=Ie,Z},z}(_i);ie.prototype.bytesPerElement=8,Cr("StructArrayLayout1ul2ui8",ie);var ve=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le){var ke=this.length;return this.resize(ke+1),this.emplace(ke,Z,le)},z.prototype.emplace=function(Z,le,ke){var Ie=2*Z;return this.uint16[Ie+0]=le,this.uint16[Ie+1]=ke,Z},z}(_i);ve.prototype.bytesPerElement=4,Cr("StructArrayLayout2ui4",ve);var Le=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z){var le=this.length;return this.resize(le+1),this.emplace(le,Z)},z.prototype.emplace=function(Z,le){var ke=1*Z;return this.uint16[ke+0]=le,Z},z}(_i);Le.prototype.bytesPerElement=2,Cr("StructArrayLayout1ui2",Le);var Fe=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le){var ke=this.length;return this.resize(ke+1),this.emplace(ke,Z,le)},z.prototype.emplace=function(Z,le,ke){var Ie=2*Z;return this.float32[Ie+0]=le,this.float32[Ie+1]=ke,Z},z}(_i);Fe.prototype.bytesPerElement=8,Cr("StructArrayLayout2f8",Fe);var Ve=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie){var qe=this.length;return this.resize(qe+1),this.emplace(qe,Z,le,ke,Ie)},z.prototype.emplace=function(Z,le,ke,Ie,qe){var it=4*Z;return this.float32[it+0]=le,this.float32[it+1]=ke,this.float32[it+2]=Ie,this.float32[it+3]=qe,Z},z}(_i);Ve.prototype.bytesPerElement=16,Cr("StructArrayLayout4f16",Ve);var We=function(S){function z(){S.apply(this,arguments)}S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z;var Z={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 Z.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},Z.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},Z.x1.get=function(){return this._structArray.int16[this._pos2+2]},Z.y1.get=function(){return this._structArray.int16[this._pos2+3]},Z.x2.get=function(){return this._structArray.int16[this._pos2+4]},Z.y2.get=function(){return this._structArray.int16[this._pos2+5]},Z.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},Z.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},Z.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},Z.anchorPoint.get=function(){return new t(this.anchorPointX,this.anchorPointY)},Object.defineProperties(z.prototype,Z),z}(as);We.prototype.size=20;var $e=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.get=function(Z){return new We(this,Z)},z}(W);Cr("CollisionBoxArray",$e);var tt=function(S){function z(){S.apply(this,arguments)}S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z;var Z={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 Z.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},Z.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},Z.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},Z.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},Z.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},Z.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},Z.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},Z.segment.get=function(){return this._structArray.uint16[this._pos2+10]},Z.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},Z.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},Z.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},Z.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},Z.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},Z.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},Z.placedOrientation.set=function(le){this._structArray.uint8[this._pos1+37]=le},Z.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},Z.hidden.set=function(le){this._structArray.uint8[this._pos1+38]=le},Z.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},Z.crossTileID.set=function(le){this._structArray.uint32[this._pos4+10]=le},Z.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(z.prototype,Z),z}(as);tt.prototype.size=48;var lt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.get=function(Z){return new tt(this,Z)},z}(Xe);Cr("PlacedSymbolArray",lt);var gt=function(S){function z(){S.apply(this,arguments)}S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z;var Z={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 Z.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},Z.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},Z.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},Z.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},Z.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},Z.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},Z.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},Z.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},Z.key.get=function(){return this._structArray.uint16[this._pos2+8]},Z.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},Z.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},Z.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},Z.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},Z.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},Z.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},Z.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},Z.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},Z.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},Z.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},Z.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},Z.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},Z.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},Z.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},Z.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},Z.crossTileID.set=function(le){this._structArray.uint32[this._pos4+12]=le},Z.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},Z.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},Z.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},Z.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(z.prototype,Z),z}(as);gt.prototype.size=68;var zt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.get=function(Z){return new gt(this,Z)},z}(at);Cr("SymbolInstanceArray",zt);var Ut=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.getoffsetX=function(Z){return this.float32[1*Z+0]},z}(wt);Cr("GlyphOffsetArray",Ut);var Vt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.getx=function(Z){return this.int16[3*Z+0]},z.prototype.gety=function(Z){return this.int16[3*Z+1]},z.prototype.gettileUnitDistanceFromAnchor=function(Z){return this.int16[3*Z+2]},z}(At);Cr("SymbolLineVertexArray",Vt);var Qt=function(S){function z(){S.apply(this,arguments)}S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z;var Z={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return Z.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},Z.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},Z.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(z.prototype,Z),z}(as);Qt.prototype.size=8;var gn=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.get=function(Z){return new Qt(this,Z)},z}(ie);Cr("FeatureIndexArray",gn);var en=Si([{name:"a_pos",components:2,type:"Int16"}],4).members,sn=function(S){S===void 0&&(S=[]),this.segments=S};function rn(S,z){return 256*(S=o(Math.floor(S),0,255))+o(Math.floor(z),0,255)}sn.prototype.prepareSegment=function(S,z,Z,le){var ke=this.segments[this.segments.length-1];return S>sn.MAX_VERTEX_ARRAY_LENGTH&&M("Max vertices per segment is "+sn.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+S),(!ke||ke.vertexLength+S>sn.MAX_VERTEX_ARRAY_LENGTH||ke.sortKey!==le)&&(ke={vertexOffset:z.length,primitiveOffset:Z.length,vertexLength:0,primitiveLength:0},le!==void 0&&(ke.sortKey=le),this.segments.push(ke)),ke},sn.prototype.get=function(){return this.segments},sn.prototype.destroy=function(){for(var S=0,z=this.segments;S>>16)*it&65535)<<16)&4294967295)<<15|St>>>17))*dt+(((St>>>16)*dt&65535)<<16)&4294967295)<<13|Ie>>>19))+((5*(Ie>>>16)&65535)<<16)&4294967295))+((58964+(qe>>>16)&65535)<<16);switch(St=0,le){case 3:St^=(255&z.charCodeAt(Rt+2))<<16;case 2:St^=(255&z.charCodeAt(Rt+1))<<8;case 1:Ie^=St=(65535&(St=(St=(65535&(St^=255&z.charCodeAt(Rt)))*it+(((St>>>16)*it&65535)<<16)&4294967295)<<15|St>>>17))*dt+(((St>>>16)*dt&65535)<<16)&4294967295}return Ie^=z.length,Ie=2246822507*(65535&(Ie^=Ie>>>16))+((2246822507*(Ie>>>16)&65535)<<16)&4294967295,Ie=3266489909*(65535&(Ie^=Ie>>>13))+((3266489909*(Ie>>>16)&65535)<<16)&4294967295,(Ie^=Ie>>>16)>>>0}}),an=T(function(S){S.exports=function(z,Z){for(var le,ke=z.length,Ie=Z^ke,qe=0;ke>=4;)le=1540483477*(65535&(le=255&z.charCodeAt(qe)|(255&z.charCodeAt(++qe))<<8|(255&z.charCodeAt(++qe))<<16|(255&z.charCodeAt(++qe))<<24))+((1540483477*(le>>>16)&65535)<<16),Ie=1540483477*(65535&Ie)+((1540483477*(Ie>>>16)&65535)<<16)^(le=1540483477*(65535&(le^=le>>>24))+((1540483477*(le>>>16)&65535)<<16)),ke-=4,++qe;switch(ke){case 3:Ie^=(255&z.charCodeAt(qe+2))<<16;case 2:Ie^=(255&z.charCodeAt(qe+1))<<8;case 1:Ie=1540483477*(65535&(Ie^=255&z.charCodeAt(qe)))+((1540483477*(Ie>>>16)&65535)<<16)}return Ie=1540483477*(65535&(Ie^=Ie>>>13))+((1540483477*(Ie>>>16)&65535)<<16),(Ie^=Ie>>>15)>>>0}}),zn=xn,Vn=xn,nr=an;zn.murmur3=Vn,zn.murmur2=nr;var rr=function(){this.ids=[],this.positions=[],this.indexed=!1};rr.prototype.add=function(S,z,Z,le){this.ids.push(kr(S)),this.positions.push(z,Z,le)},rr.prototype.getPositions=function(S){for(var z=kr(S),Z=0,le=this.ids.length-1;Z>1;this.ids[ke]>=z?le=ke:Z=ke+1}for(var Ie=[];this.ids[Z]===z;){var qe=this.positions[3*Z],it=this.positions[3*Z+1],dt=this.positions[3*Z+2];Ie.push({index:qe,start:it,end:dt}),Z++}return Ie},rr.serialize=function(S,z){var Z=new Float64Array(S.ids),le=new Uint32Array(S.positions);return mr(Z,le,0,Z.length-1),z&&z.push(Z.buffer,le.buffer),{ids:Z,positions:le}},rr.deserialize=function(S){var z=new rr;return z.ids=S.ids,z.positions=S.positions,z.indexed=!0,z};var wr=Math.pow(2,53)-1;function kr(S){var z=+S;return!isNaN(z)&&z<=wr?z:zn(String(S))}function mr(S,z,Z,le){for(;Z>1],Ie=Z-1,qe=le+1;;){do Ie++;while(S[Ie]ke);if(Ie>=qe)break;_r(S,Ie,qe),_r(z,3*Ie,3*qe),_r(z,3*Ie+1,3*qe+1),_r(z,3*Ie+2,3*qe+2)}qe-Zwa.max||qe.ywa.max)&&(M("Geometry exceeds allowed extent, reduce your vector tile buffer size"),qe.x=o(qe.x,wa.min,wa.max),qe.y=o(qe.y,wa.min,wa.max))}return Z}function ko(S,z,Z,le,ke){S.emplaceBack(2*z+(le+1)/2,2*Z+(ke+1)/2)}var ai=function(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(function(z){return z.id}),this.index=S.index,this.hasPattern=!1,this.layoutVertexArray=new et,this.indexArray=new He,this.segments=new sn,this.programConfigurations=new qi(en,S.layers,S.zoom),this.stateDependentLayerIds=this.layers.filter(function(z){return z.isStateDependent()}).map(function(z){return z.id})};function na(S,z){for(var Z=0;Z1){if(vh(S,z))return!0;for(var le=0;le1?S.distSqr(Z):S.distSqr(Z.sub(z)._mult(ke)._add(z))}function Lc(S,z){for(var Z,le,ke,Ie=!1,qe=0;qez.y!=ke.y>z.y&&z.x<(ke.x-le.x)*(z.y-le.y)/(ke.y-le.y)+le.x&&(Ie=!Ie);return Ie}function Zu(S,z){for(var Z=!1,le=0,ke=S.length-1;lez.y!=qe.y>z.y&&z.x<(qe.x-Ie.x)*(z.y-Ie.y)/(qe.y-Ie.y)+Ie.x&&(Z=!Z)}return Z}function d1(S,z,Z){var le=Z[0],ke=Z[2];if(S.xke.x&&z.x>ke.x||S.yke.y&&z.y>ke.y)return!1;var Ie=A(S,z,Z[0]);return Ie!==A(S,z,Z[1])||Ie!==A(S,z,Z[2])||Ie!==A(S,z,Z[3])}function ku(S,z,Z){var le=z.paint.get(S).value;return le.kind==="constant"?le.value:Z.programConfigurations.get(z.id).getMaxValue(S)}function $p(S){return Math.sqrt(S[0]*S[0]+S[1]*S[1])}function Jp(S,z,Z,le,ke){if(!z[0]&&!z[1])return S;var Ie=t.convert(z)._mult(ke);Z==="viewport"&&Ie._rotate(-le);for(var qe=[],it=0;it=Yr||Rt<0||Rt>=Yr)){var Ht=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,S.sortKey),Yt=Ht.vertexLength;ko(this.layoutVertexArray,St,Rt,-1,-1),ko(this.layoutVertexArray,St,Rt,1,-1),ko(this.layoutVertexArray,St,Rt,1,1),ko(this.layoutVertexArray,St,Rt,-1,1),this.indexArray.emplaceBack(Yt,Yt+1,Yt+2),this.indexArray.emplaceBack(Yt,Yt+3,Yt+2),Ht.vertexLength+=4,Ht.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,Z,{},le)},Cr("CircleBucket",ai,{omit:["layers"]});var qw=new _a({"circle-sort-key":new Ur(Oe.layout_circle["circle-sort-key"])}),Gw={paint:new _a({"circle-radius":new Ur(Oe.paint_circle["circle-radius"]),"circle-color":new Ur(Oe.paint_circle["circle-color"]),"circle-blur":new Ur(Oe.paint_circle["circle-blur"]),"circle-opacity":new Ur(Oe.paint_circle["circle-opacity"]),"circle-translate":new Fr(Oe.paint_circle["circle-translate"]),"circle-translate-anchor":new Fr(Oe.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Fr(Oe.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Fr(Oe.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Ur(Oe.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Ur(Oe.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Ur(Oe.paint_circle["circle-stroke-opacity"])}),layout:qw},ws=typeof Float32Array<"u"?Float32Array:Array;function g1(S){return S[0]=1,S[1]=0,S[2]=0,S[3]=0,S[4]=0,S[5]=1,S[6]=0,S[7]=0,S[8]=0,S[9]=0,S[10]=1,S[11]=0,S[12]=0,S[13]=0,S[14]=0,S[15]=1,S}function ny(S,z,Z){var le=z[0],ke=z[1],Ie=z[2],qe=z[3],it=z[4],dt=z[5],St=z[6],Rt=z[7],Ht=z[8],Yt=z[9],Zt=z[10],cn=z[11],Tn=z[12],Fn=z[13],Dn=z[14],Gn=z[15],Yn=Z[0],Kn=Z[1],ar=Z[2],ur=Z[3];return S[0]=Yn*le+Kn*it+ar*Ht+ur*Tn,S[1]=Yn*ke+Kn*dt+ar*Yt+ur*Fn,S[2]=Yn*Ie+Kn*St+ar*Zt+ur*Dn,S[3]=Yn*qe+Kn*Rt+ar*cn+ur*Gn,Yn=Z[4],Kn=Z[5],ar=Z[6],ur=Z[7],S[4]=Yn*le+Kn*it+ar*Ht+ur*Tn,S[5]=Yn*ke+Kn*dt+ar*Yt+ur*Fn,S[6]=Yn*Ie+Kn*St+ar*Zt+ur*Dn,S[7]=Yn*qe+Kn*Rt+ar*cn+ur*Gn,Yn=Z[8],Kn=Z[9],ar=Z[10],ur=Z[11],S[8]=Yn*le+Kn*it+ar*Ht+ur*Tn,S[9]=Yn*ke+Kn*dt+ar*Yt+ur*Fn,S[10]=Yn*Ie+Kn*St+ar*Zt+ur*Dn,S[11]=Yn*qe+Kn*Rt+ar*cn+ur*Gn,Yn=Z[12],Kn=Z[13],ar=Z[14],ur=Z[15],S[12]=Yn*le+Kn*it+ar*Ht+ur*Tn,S[13]=Yn*ke+Kn*dt+ar*Yt+ur*Fn,S[14]=Yn*Ie+Kn*St+ar*Zt+ur*Dn,S[15]=Yn*qe+Kn*Rt+ar*cn+ur*Gn,S}Math.hypot||(Math.hypot=function(){for(var S=arguments,z=0,Z=arguments.length;Z--;)z+=S[Z]*S[Z];return Math.sqrt(z)});var Ww=ny,Kp,Zw=function(S,z,Z){return S[0]=z[0]-Z[0],S[1]=z[1]-Z[1],S[2]=z[2]-Z[2],S};function Qp(S,z,Z){var le=z[0],ke=z[1],Ie=z[2],qe=z[3];return S[0]=Z[0]*le+Z[4]*ke+Z[8]*Ie+Z[12]*qe,S[1]=Z[1]*le+Z[5]*ke+Z[9]*Ie+Z[13]*qe,S[2]=Z[2]*le+Z[6]*ke+Z[10]*Ie+Z[14]*qe,S[3]=Z[3]*le+Z[7]*ke+Z[11]*Ie+Z[15]*qe,S}Kp=new ws(3),ws!=Float32Array&&(Kp[0]=0,Kp[1]=0,Kp[2]=0),function(){var S=new ws(4);ws!=Float32Array&&(S[0]=0,S[1]=0,S[2]=0,S[3]=0)}();var Yw=function(S){var z=S[0],Z=S[1];return z*z+Z*Z},Xw=(function(){var S=new ws(2);ws!=Float32Array&&(S[0]=0,S[1]=0)}(),function(S){function z(Z){S.call(this,Z,Gw)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.createBucket=function(Z){return new ai(Z)},z.prototype.queryRadius=function(Z){var le=Z;return ku("circle-radius",this,le)+ku("circle-stroke-width",this,le)+$p(this.paint.get("circle-translate"))},z.prototype.queryIntersectsFeature=function(Z,le,ke,Ie,qe,it,dt,St){for(var Rt=Jp(Z,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),it.angle,dt),Ht=this.paint.get("circle-radius").evaluate(le,ke)+this.paint.get("circle-stroke-width").evaluate(le,ke),Yt=this.paint.get("circle-pitch-alignment")==="map",Zt=Yt?Rt:function(Er,br){return Er.map(function(Ir){return ry(Ir,br)})}(Rt,St),cn=Yt?Ht*dt:Ht,Tn=0,Fn=Ie;TnS.width||ke.height>S.height||Z.x>S.width-ke.width||Z.y>S.height-ke.height)throw new RangeError("out of range source coordinates for image copy");if(ke.width>z.width||ke.height>z.height||le.x>z.width-ke.width||le.y>z.height-ke.height)throw new RangeError("out of range destination coordinates for image copy");for(var qe=S.data,it=z.data,dt=0;dt80*Z){le=Ie=S[0],ke=qe=S[1];for(var cn=Z;cnIe&&(Ie=it),dt>qe&&(qe=dt);St=(St=Math.max(Ie-le,qe-ke))!==0?1/St:0}return mh(Yt,Zt,Z,le,ke,St),Zt}function ly(S,z,Z,le,ke){var Ie,qe;if(ke===_1(S,z,Z,le)>0)for(Ie=z;Ie=z;Ie-=le)qe=fy(Ie,S[Ie],S[Ie+1],qe);return qe&&td(qe,qe.next)&&(xh(qe),qe=qe.next),qe}function Yu(S,z){if(!S)return S;z||(z=S);var Z,le=S;do if(Z=!1,le.steiner||!td(le,le.next)&&Ta(le.prev,le,le.next)!==0)le=le.next;else{if(xh(le),(le=z=le.prev)===le.next)break;Z=!0}while(Z||le!==z);return z}function mh(S,z,Z,le,ke,Ie,qe){if(S){!qe&&Ie&&function(Rt,Ht,Yt,Zt){var cn=Rt;do cn.z===null&&(cn.z=x1(cn.x,cn.y,Ht,Yt,Zt)),cn.prevZ=cn.prev,cn.nextZ=cn.next,cn=cn.next;while(cn!==Rt);cn.prevZ.nextZ=null,cn.prevZ=null,function(Tn){var Fn,Dn,Gn,Yn,Kn,ar,ur,Er,br=1;do{for(Dn=Tn,Tn=null,Kn=null,ar=0;Dn;){for(ar++,Gn=Dn,ur=0,Fn=0;Fn0||Er>0&&Gn;)ur!==0&&(Er===0||!Gn||Dn.z<=Gn.z)?(Yn=Dn,Dn=Dn.nextZ,ur--):(Yn=Gn,Gn=Gn.nextZ,Er--),Kn?Kn.nextZ=Yn:Tn=Yn,Yn.prevZ=Kn,Kn=Yn;Dn=Gn}Kn.nextZ=null,br*=2}while(ar>1)}(cn)}(S,le,ke,Ie);for(var it,dt,St=S;S.prev!==S.next;)if(it=S.prev,dt=S.next,Ie?n5(S,le,ke,Ie):t5(S))z.push(it.i/Z),z.push(S.i/Z),z.push(dt.i/Z),xh(S),S=dt.next,St=dt.next;else if((S=dt)===St){qe?qe===1?mh(S=r5(Yu(S),z,Z),z,Z,le,ke,Ie,2):qe===2&&i5(S,z,Z,le,ke,Ie):mh(Yu(S),z,Z,le,ke,Ie,1);break}}}function t5(S){var z=S.prev,Z=S,le=S.next;if(Ta(z,Z,le)>=0)return!1;for(var ke=S.next.next;ke!==S.prev;){if(df(z.x,z.y,Z.x,Z.y,le.x,le.y,ke.x,ke.y)&&Ta(ke.prev,ke,ke.next)>=0)return!1;ke=ke.next}return!0}function n5(S,z,Z,le){var ke=S.prev,Ie=S,qe=S.next;if(Ta(ke,Ie,qe)>=0)return!1;for(var it=ke.xIe.x?ke.x>qe.x?ke.x:qe.x:Ie.x>qe.x?Ie.x:qe.x,Rt=ke.y>Ie.y?ke.y>qe.y?ke.y:qe.y:Ie.y>qe.y?Ie.y:qe.y,Ht=x1(it,dt,z,Z,le),Yt=x1(St,Rt,z,Z,le),Zt=S.prevZ,cn=S.nextZ;Zt&&Zt.z>=Ht&&cn&&cn.z<=Yt;){if(Zt!==S.prev&&Zt!==S.next&&df(ke.x,ke.y,Ie.x,Ie.y,qe.x,qe.y,Zt.x,Zt.y)&&Ta(Zt.prev,Zt,Zt.next)>=0||(Zt=Zt.prevZ,cn!==S.prev&&cn!==S.next&&df(ke.x,ke.y,Ie.x,Ie.y,qe.x,qe.y,cn.x,cn.y)&&Ta(cn.prev,cn,cn.next)>=0))return!1;cn=cn.nextZ}for(;Zt&&Zt.z>=Ht;){if(Zt!==S.prev&&Zt!==S.next&&df(ke.x,ke.y,Ie.x,Ie.y,qe.x,qe.y,Zt.x,Zt.y)&&Ta(Zt.prev,Zt,Zt.next)>=0)return!1;Zt=Zt.prevZ}for(;cn&&cn.z<=Yt;){if(cn!==S.prev&&cn!==S.next&&df(ke.x,ke.y,Ie.x,Ie.y,qe.x,qe.y,cn.x,cn.y)&&Ta(cn.prev,cn,cn.next)>=0)return!1;cn=cn.nextZ}return!0}function r5(S,z,Z){var le=S;do{var ke=le.prev,Ie=le.next.next;!td(ke,Ie)&&uy(ke,le,le.next,Ie)&&yh(ke,Ie)&&yh(Ie,ke)&&(z.push(ke.i/Z),z.push(le.i/Z),z.push(Ie.i/Z),xh(le),xh(le.next),le=S=Ie),le=le.next}while(le!==S);return Yu(le)}function i5(S,z,Z,le,ke,Ie){var qe=S;do{for(var it=qe.next.next;it!==qe.prev;){if(qe.i!==it.i&&u5(qe,it)){var dt=cy(qe,it);return qe=Yu(qe,qe.next),dt=Yu(dt,dt.next),mh(qe,z,Z,le,ke,Ie),void mh(dt,z,Z,le,ke,Ie)}it=it.next}qe=qe.next}while(qe!==S)}function a5(S,z){return S.x-z.x}function o5(S,z){if(z=function(le,ke){var Ie,qe=ke,it=le.x,dt=le.y,St=-1/0;do{if(dt<=qe.y&&dt>=qe.next.y&&qe.next.y!==qe.y){var Rt=qe.x+(dt-qe.y)*(qe.next.x-qe.x)/(qe.next.y-qe.y);if(Rt<=it&&Rt>St){if(St=Rt,Rt===it){if(dt===qe.y)return qe;if(dt===qe.next.y)return qe.next}Ie=qe.x=qe.x&&qe.x>=Zt&&it!==qe.x&&df(dtIe.x||qe.x===Ie.x&&s5(Ie,qe)))&&(Ie=qe,Tn=Ht)),qe=qe.next;while(qe!==Yt);return Ie}(S,z)){var Z=cy(z,S);Yu(z,z.next),Yu(Z,Z.next)}}function s5(S,z){return Ta(S.prev,S,z.prev)<0&&Ta(z.next,S,S.next)<0}function x1(S,z,Z,le,ke){return(S=1431655765&((S=858993459&((S=252645135&((S=16711935&((S=32767*(S-Z)*ke)|S<<8))|S<<4))|S<<2))|S<<1))|(z=1431655765&((z=858993459&((z=252645135&((z=16711935&((z=32767*(z-le)*ke)|z<<8))|z<<4))|z<<2))|z<<1))<<1}function l5(S){var z=S,Z=S;do(z.x=0&&(S-qe)*(le-it)-(Z-qe)*(z-it)>=0&&(Z-qe)*(Ie-it)-(ke-qe)*(le-it)>=0}function u5(S,z){return S.next.i!==z.i&&S.prev.i!==z.i&&!function(Z,le){var ke=Z;do{if(ke.i!==Z.i&&ke.next.i!==Z.i&&ke.i!==le.i&&ke.next.i!==le.i&&uy(ke,ke.next,Z,le))return!0;ke=ke.next}while(ke!==Z);return!1}(S,z)&&(yh(S,z)&&yh(z,S)&&function(Z,le){var ke=Z,Ie=!1,qe=(Z.x+le.x)/2,it=(Z.y+le.y)/2;do ke.y>it!=ke.next.y>it&&ke.next.y!==ke.y&&qe<(ke.next.x-ke.x)*(it-ke.y)/(ke.next.y-ke.y)+ke.x&&(Ie=!Ie),ke=ke.next;while(ke!==Z);return Ie}(S,z)&&(Ta(S.prev,S,z.prev)||Ta(S,z.prev,z))||td(S,z)&&Ta(S.prev,S,S.next)>0&&Ta(z.prev,z,z.next)>0)}function Ta(S,z,Z){return(z.y-S.y)*(Z.x-z.x)-(z.x-S.x)*(Z.y-z.y)}function td(S,z){return S.x===z.x&&S.y===z.y}function uy(S,z,Z,le){var ke=rd(Ta(S,z,Z)),Ie=rd(Ta(S,z,le)),qe=rd(Ta(Z,le,S)),it=rd(Ta(Z,le,z));return ke!==Ie&&qe!==it||!(ke!==0||!nd(S,Z,z))||!(Ie!==0||!nd(S,le,z))||!(qe!==0||!nd(Z,S,le))||!(it!==0||!nd(Z,z,le))}function nd(S,z,Z){return z.x<=Math.max(S.x,Z.x)&&z.x>=Math.min(S.x,Z.x)&&z.y<=Math.max(S.y,Z.y)&&z.y>=Math.min(S.y,Z.y)}function rd(S){return S>0?1:S<0?-1:0}function yh(S,z){return Ta(S.prev,S,S.next)<0?Ta(S,z,S.next)>=0&&Ta(S,S.prev,z)>=0:Ta(S,z,S.prev)<0||Ta(S,S.next,z)<0}function cy(S,z){var Z=new b1(S.i,S.x,S.y),le=new b1(z.i,z.x,z.y),ke=S.next,Ie=z.prev;return S.next=z,z.prev=S,Z.next=ke,ke.prev=Z,le.next=Z,Z.prev=le,Ie.next=le,le.prev=Ie,le}function fy(S,z,Z,le){var ke=new b1(S,z,Z);return le?(ke.next=le.next,ke.prev=le,le.next.prev=ke,le.next=ke):(ke.prev=ke,ke.next=ke),ke}function xh(S){S.next.prev=S.prev,S.prev.next=S.next,S.prevZ&&(S.prevZ.nextZ=S.nextZ),S.nextZ&&(S.nextZ.prevZ=S.prevZ)}function b1(S,z,Z){this.i=S,this.x=z,this.y=Z,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function _1(S,z,Z,le){for(var ke=0,Ie=z,qe=Z-le;IeZ;){if(le-Z>600){var Ie=le-Z+1,qe=z-Z+1,it=Math.log(Ie),dt=.5*Math.exp(2*it/3),St=.5*Math.sqrt(it*dt*(Ie-dt)/Ie)*(qe-Ie/2<0?-1:1);hy(S,z,Math.max(Z,Math.floor(z-qe*dt/Ie+St)),Math.min(le,Math.floor(z+(Ie-qe)*dt/Ie+St)),ke)}var Rt=S[z],Ht=Z,Yt=le;for(bh(S,Z,z),ke(S[le],Rt)>0&&bh(S,Z,le);Ht0;)Yt--}ke(S[Z],Rt)===0?bh(S,Z,Yt):bh(S,++Yt,le),Yt<=z&&(Z=Yt+1),z<=Yt&&(le=Yt-1)}}function bh(S,z,Z){var le=S[z];S[z]=S[Z],S[Z]=le}function f5(S,z){return Sz?1:0}function w1(S,z){var Z=S.length;if(Z<=1)return[S];for(var le,ke,Ie=[],qe=0;qe1)for(var dt=0;dt0&&(le+=S[ke-1].length,Z.holes.push(le))}return Z},y1.default=e5;var Pl=function(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(function(z){return z.id}),this.index=S.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new et,this.indexArray=new He,this.indexArray2=new ve,this.programConfigurations=new qi(sy,S.layers,S.zoom),this.segments=new sn,this.segments2=new sn,this.stateDependentLayerIds=this.layers.filter(function(z){return z.isStateDependent()}).map(function(z){return z.id})};Pl.prototype.populate=function(S,z,Z){this.hasPattern=T1("fill",this.layers,z);for(var le=this.layers[0].layout.get("fill-sort-key"),ke=[],Ie=0,qe=S;Ie>3}if(ke--,le===1||le===2)Ie+=S.readSVarint(),qe+=S.readSVarint(),le===1&&(z&&it.push(z),z=[]),z.push(new t(Ie,qe));else{if(le!==7)throw new Error("unknown command "+le);z&&z.push(z[0].clone())}}return z&&it.push(z),it},gf.prototype.bbox=function(){var S=this._pbf;S.pos=this._geometry;for(var z=S.readVarint()+S.pos,Z=1,le=0,ke=0,Ie=0,qe=1/0,it=-1/0,dt=1/0,St=-1/0;S.pos>3}if(le--,Z===1||Z===2)(ke+=S.readSVarint())it&&(it=ke),(Ie+=S.readSVarint())St&&(St=Ie);else if(Z!==7)throw new Error("unknown command "+Z)}return[qe,dt,it,St]},gf.prototype.toGeoJSON=function(S,z,Z){var le,ke,Ie=this.extent*Math.pow(2,Z),qe=this.extent*S,it=this.extent*z,dt=this.loadGeometry(),St=gf.types[this.type];function Rt(Zt){for(var cn=0;cn>3;ke=qe===1?le.readString():qe===2?le.readFloat():qe===3?le.readDouble():qe===4?le.readVarint64():qe===5?le.readVarint():qe===6?le.readSVarint():qe===7?le.readBoolean():null}return ke}(Z))}function x5(S,z,Z){if(S===3){var le=new gy(Z,Z.readVarint()+Z.pos);le.length&&(z[le.name]=le)}}vy.prototype.feature=function(S){if(S<0||S>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[S];var z=this._pbf.readVarint()+this._pbf.pos;return new dy(this._pbf,z,this.extent,this._keys,this._values)};var vf={VectorTile:function(S,z){this.layers=S.readFields(x5,{},z)},VectorTileFeature:dy,VectorTileLayer:gy},b5=vf.VectorTileFeature.types,A1=Math.pow(2,13);function _h(S,z,Z,le,ke,Ie,qe,it){S.emplaceBack(z,Z,2*Math.floor(le*A1)+qe,ke*A1*2,Ie*A1*2,Math.round(it))}var Ol=function(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(function(z){return z.id}),this.index=S.index,this.hasPattern=!1,this.layoutVertexArray=new ct,this.indexArray=new He,this.programConfigurations=new qi(py,S.layers,S.zoom),this.segments=new sn,this.stateDependentLayerIds=this.layers.filter(function(z){return z.isStateDependent()}).map(function(z){return z.id})};function _5(S,z){return S.x===z.x&&(S.x<0||S.x>Yr)||S.y===z.y&&(S.y<0||S.y>Yr)}Ol.prototype.populate=function(S,z,Z){this.features=[],this.hasPattern=T1("fill-extrusion",this.layers,z);for(var le=0,ke=S;leYr})||si.every(function(Qr){return Qr.y<0})||si.every(function(Qr){return Qr.y>Yr})))for(var Tn=0,Fn=0;Fn=1){var Gn=cn[Fn-1];if(!_5(Dn,Gn)){Ht.vertexLength+4>sn.MAX_VERTEX_ARRAY_LENGTH&&(Ht=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var Yn=Dn.sub(Gn)._perp()._unit(),Kn=Gn.dist(Dn);Tn+Kn>32768&&(Tn=0),_h(this.layoutVertexArray,Dn.x,Dn.y,Yn.x,Yn.y,0,0,Tn),_h(this.layoutVertexArray,Dn.x,Dn.y,Yn.x,Yn.y,0,1,Tn),Tn+=Kn,_h(this.layoutVertexArray,Gn.x,Gn.y,Yn.x,Yn.y,0,0,Tn),_h(this.layoutVertexArray,Gn.x,Gn.y,Yn.x,Yn.y,0,1,Tn);var ar=Ht.vertexLength;this.indexArray.emplaceBack(ar,ar+2,ar+1),this.indexArray.emplaceBack(ar+1,ar+2,ar+3),Ht.vertexLength+=4,Ht.primitiveLength+=2}}}}if(Ht.vertexLength+dt>sn.MAX_VERTEX_ARRAY_LENGTH&&(Ht=this.segments.prepareSegment(dt,this.layoutVertexArray,this.indexArray)),b5[S.type]==="Polygon"){for(var ur=[],Er=[],br=Ht.vertexLength,Ir=0,Br=it;Ir=2&&S[dt-1].equals(S[dt-2]);)dt--;for(var St=0;St0;if(Er&&Dn>St){var Ir=Rt.dist(Zt);if(Ir>2*Ht){var Br=Rt.sub(Rt.sub(Zt)._mult(Ht/Ir)._round());this.updateDistance(Zt,Br),this.addCurrentVertex(Br,Tn,0,0,Yt),Zt=Br}}var $r=Zt&&cn,jr=$r?Z:it?"butt":le;if($r&&jr==="round"&&(arke&&(jr="bevel"),jr==="bevel"&&(ar>2&&(jr="flipbevel"),ar100)Gn=Fn.mult(-1);else{var Xr=ar*Tn.add(Fn).mag()/Tn.sub(Fn).mag();Gn._perp()._mult(Xr*(br?-1:1))}this.addCurrentVertex(Rt,Gn,0,0,Yt),this.addCurrentVertex(Rt,Gn.mult(-1),0,0,Yt)}else if(jr==="bevel"||jr==="fakeround"){var Vr=-Math.sqrt(ar*ar-1),Nr=br?Vr:0,si=br?0:Vr;if(Zt&&this.addCurrentVertex(Rt,Tn,Nr,si,Yt),jr==="fakeround")for(var Qr=Math.round(180*ur/Math.PI/20),Di=1;Di2*Ht){var Fi=Rt.add(cn.sub(Rt)._mult(Ht/Wi)._round());this.updateDistance(Rt,Fi),this.addCurrentVertex(Fi,Fn,0,0,Yt),Rt=Fi}}}}},jo.prototype.addCurrentVertex=function(S,z,Z,le,ke,Ie){Ie===void 0&&(Ie=!1);var qe=z.x+z.y*Z,it=z.y-z.x*Z,dt=-z.x+z.y*le,St=-z.y-z.x*le;this.addHalfVertex(S,qe,it,Ie,!1,Z,ke),this.addHalfVertex(S,dt,St,Ie,!0,-le,ke),this.distance>xy/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(S,z,Z,le,ke,Ie))},jo.prototype.addHalfVertex=function(S,z,Z,le,ke,Ie,qe){var it=S.x,dt=S.y,St=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((it<<1)+(le?1:0),(dt<<1)+(ke?1:0),Math.round(63*z)+128,Math.round(63*Z)+128,1+(Ie===0?0:Ie<0?-1:1)|(63&St)<<2,St>>6);var Rt=qe.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Rt),qe.primitiveLength++),ke?this.e2=Rt:this.e1=Rt},jo.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(xy-1):this.distance},jo.prototype.updateDistance=function(S,z){this.distance+=S.dist(z),this.updateScaledDistance()},Cr("LineBucket",jo,{omit:["layers","patternFeatures"]});var M5=new _a({"line-cap":new Fr(Oe.layout_line["line-cap"]),"line-join":new Ur(Oe.layout_line["line-join"]),"line-miter-limit":new Fr(Oe.layout_line["line-miter-limit"]),"line-round-limit":new Fr(Oe.layout_line["line-round-limit"]),"line-sort-key":new Ur(Oe.layout_line["line-sort-key"])}),by={paint:new _a({"line-opacity":new Ur(Oe.paint_line["line-opacity"]),"line-color":new Ur(Oe.paint_line["line-color"]),"line-translate":new Fr(Oe.paint_line["line-translate"]),"line-translate-anchor":new Fr(Oe.paint_line["line-translate-anchor"]),"line-width":new Ur(Oe.paint_line["line-width"]),"line-gap-width":new Ur(Oe.paint_line["line-gap-width"]),"line-offset":new Ur(Oe.paint_line["line-offset"]),"line-blur":new Ur(Oe.paint_line["line-blur"]),"line-dasharray":new is(Oe.paint_line["line-dasharray"]),"line-pattern":new sl(Oe.paint_line["line-pattern"]),"line-gradient":new To(Oe.paint_line["line-gradient"])}),layout:M5},S5=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.possiblyEvaluate=function(Z,le){return le=new di(Math.floor(le.zoom),{now:le.now,fadeDuration:le.fadeDuration,zoomHistory:le.zoomHistory,transition:le.transition}),S.prototype.possiblyEvaluate.call(this,Z,le)},z.prototype.evaluate=function(Z,le,ke,Ie){return le=u({},le,{zoom:Math.floor(le.zoom)}),S.prototype.evaluate.call(this,Z,le,ke,Ie)},z}(Ur),_y=new S5(by.paint.properties["line-width"].specification);_y.useIntegerZoom=!0;var E5=function(S){function z(Z){S.call(this,Z,by)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._handleSpecialPaintPropertyUpdate=function(Z){Z==="line-gradient"&&this._updateGradient()},z.prototype._updateGradient=function(){var Z=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=oy(Z,"lineProgress"),this.gradientTexture=null},z.prototype.recalculate=function(Z,le){S.prototype.recalculate.call(this,Z,le),this.paint._values["line-floorwidth"]=_y.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,Z)},z.prototype.createBucket=function(Z){return new jo(Z)},z.prototype.queryRadius=function(Z){var le=Z,ke=wy(ku("line-width",this,le),ku("line-gap-width",this,le)),Ie=ku("line-offset",this,le);return ke/2+Math.abs(Ie)+$p(this.paint.get("line-translate"))},z.prototype.queryIntersectsFeature=function(Z,le,ke,Ie,qe,it,dt){var St=Jp(Z,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),it.angle,dt),Rt=dt/2*wy(this.paint.get("line-width").evaluate(le,ke),this.paint.get("line-gap-width").evaluate(le,ke)),Ht=this.paint.get("line-offset").evaluate(le,ke);return Ht&&(Ie=function(Yt,Zt){for(var cn=[],Tn=new t(0,0),Fn=0;Fn=3){for(var Dn=0;Dn0?z+2*S:S}var M1=Si([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),C5=Si([{name:"a_projected_pos",components:3,type:"Float32"}],4),L5=(Si([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Si([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Ty=(Si([{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"}]),Si([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),P5=Si([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function O5(S,z,Z){return S.sections.forEach(function(le){le.text=function(ke,Ie,qe){var it=Ie.layout.get("text-transform").evaluate(qe,{});return it==="uppercase"?ke=ke.toLocaleUpperCase():it==="lowercase"&&(ke=ke.toLocaleLowerCase()),za.applyArabicShaping&&(ke=za.applyArabicShaping(ke)),ke}(le.text,z,Z)}),S}Si([{name:"triangle",components:3,type:"Uint16"}]),Si([{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"}]),Si([{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"}]),Si([{type:"Float32",name:"offsetX"}]),Si([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Th={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},no=24,ky=function(S,z,Z,le,ke){var Ie,qe,it=8*ke-le-1,dt=(1<>1,Rt=-7,Ht=Z?ke-1:0,Yt=Z?-1:1,Zt=S[z+Ht];for(Ht+=Yt,Ie=Zt&(1<<-Rt)-1,Zt>>=-Rt,Rt+=it;Rt>0;Ie=256*Ie+S[z+Ht],Ht+=Yt,Rt-=8);for(qe=Ie&(1<<-Rt)-1,Ie>>=-Rt,Rt+=le;Rt>0;qe=256*qe+S[z+Ht],Ht+=Yt,Rt-=8);if(Ie===0)Ie=1-St;else{if(Ie===dt)return qe?NaN:1/0*(Zt?-1:1);qe+=Math.pow(2,le),Ie-=St}return(Zt?-1:1)*qe*Math.pow(2,Ie-le)},Ay=function(S,z,Z,le,ke,Ie){var qe,it,dt,St=8*Ie-ke-1,Rt=(1<>1,Yt=ke===23?Math.pow(2,-24)-Math.pow(2,-77):0,Zt=le?0:Ie-1,cn=le?1:-1,Tn=z<0||z===0&&1/z<0?1:0;for(z=Math.abs(z),isNaN(z)||z===1/0?(it=isNaN(z)?1:0,qe=Rt):(qe=Math.floor(Math.log(z)/Math.LN2),z*(dt=Math.pow(2,-qe))<1&&(qe--,dt*=2),(z+=qe+Ht>=1?Yt/dt:Yt*Math.pow(2,1-Ht))*dt>=2&&(qe++,dt/=2),qe+Ht>=Rt?(it=0,qe=Rt):qe+Ht>=1?(it=(z*dt-1)*Math.pow(2,ke),qe+=Ht):(it=z*Math.pow(2,Ht-1)*Math.pow(2,ke),qe=0));ke>=8;S[Z+Zt]=255&it,Zt+=cn,it/=256,ke-=8);for(qe=qe<0;S[Z+Zt]=255&qe,Zt+=cn,qe/=256,St-=8);S[Z+Zt-cn]|=128*Tn},id=Ni;function Ni(S){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(S)?S:new Uint8Array(S||0),this.pos=0,this.type=0,this.length=this.buf.length}Ni.Varint=0,Ni.Fixed64=1,Ni.Bytes=2,Ni.Fixed32=5;var S1=4294967296,My=1/S1,Sy=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function Au(S){return S.type===Ni.Bytes?S.readVarint()+S.pos:S.pos+1}function mf(S,z,Z){return Z?4294967296*z+(S>>>0):4294967296*(z>>>0)+(S>>>0)}function Ey(S,z,Z){var le=z<=16383?1:z<=2097151?2:z<=268435455?3:Math.floor(Math.log(z)/(7*Math.LN2));Z.realloc(le);for(var ke=Z.pos-1;ke>=S;ke--)Z.buf[ke+le]=Z.buf[ke]}function I5(S,z){for(var Z=0;Z>>8,S[Z+2]=z>>>16,S[Z+3]=z>>>24}function Cy(S,z){return(S[z]|S[z+1]<<8|S[z+2]<<16)+(S[z+3]<<24)}Ni.prototype={destroy:function(){this.buf=null},readFields:function(S,z,Z){for(Z=Z||this.length;this.pos>3,Ie=this.pos;this.type=7&le,S(ke,z,this),this.pos===Ie&&this.skip(le)}return z},readMessage:function(S,z){return this.readFields(S,z,this.readVarint()+this.pos)},readFixed32:function(){var S=ad(this.buf,this.pos);return this.pos+=4,S},readSFixed32:function(){var S=Cy(this.buf,this.pos);return this.pos+=4,S},readFixed64:function(){var S=ad(this.buf,this.pos)+ad(this.buf,this.pos+4)*S1;return this.pos+=8,S},readSFixed64:function(){var S=ad(this.buf,this.pos)+Cy(this.buf,this.pos+4)*S1;return this.pos+=8,S},readFloat:function(){var S=ky(this.buf,this.pos,!0,23,4);return this.pos+=4,S},readDouble:function(){var S=ky(this.buf,this.pos,!0,52,8);return this.pos+=8,S},readVarint:function(S){var z,Z,le=this.buf;return z=127&(Z=le[this.pos++]),Z<128?z:(z|=(127&(Z=le[this.pos++]))<<7,Z<128?z:(z|=(127&(Z=le[this.pos++]))<<14,Z<128?z:(z|=(127&(Z=le[this.pos++]))<<21,Z<128?z:function(ke,Ie,qe){var it,dt,St=qe.buf;if(it=(112&(dt=St[qe.pos++]))>>4,dt<128||(it|=(127&(dt=St[qe.pos++]))<<3,dt<128)||(it|=(127&(dt=St[qe.pos++]))<<10,dt<128)||(it|=(127&(dt=St[qe.pos++]))<<17,dt<128)||(it|=(127&(dt=St[qe.pos++]))<<24,dt<128)||(it|=(1&(dt=St[qe.pos++]))<<31,dt<128))return mf(ke,it,Ie);throw new Error("Expected varint not more than 10 bytes")}(z|=(15&(Z=le[this.pos]))<<28,S,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var S=this.readVarint();return S%2==1?(S+1)/-2:S/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var S=this.readVarint()+this.pos,z=this.pos;return this.pos=S,S-z>=12&&Sy?function(Z,le,ke){return Sy.decode(Z.subarray(le,ke))}(this.buf,z,S):function(Z,le,ke){for(var Ie="",qe=le;qe239?4:Rt>223?3:Rt>191?2:1;if(qe+Yt>ke)break;Yt===1?Rt<128&&(Ht=Rt):Yt===2?(192&(it=Z[qe+1]))==128&&(Ht=(31&Rt)<<6|63&it)<=127&&(Ht=null):Yt===3?(it=Z[qe+1],dt=Z[qe+2],(192&it)==128&&(192&dt)==128&&((Ht=(15&Rt)<<12|(63&it)<<6|63&dt)<=2047||Ht>=55296&&Ht<=57343)&&(Ht=null)):Yt===4&&(it=Z[qe+1],dt=Z[qe+2],St=Z[qe+3],(192&it)==128&&(192&dt)==128&&(192&St)==128&&((Ht=(15&Rt)<<18|(63&it)<<12|(63&dt)<<6|63&St)<=65535||Ht>=1114112)&&(Ht=null)),Ht===null?(Ht=65533,Yt=1):Ht>65535&&(Ht-=65536,Ie+=String.fromCharCode(Ht>>>10&1023|55296),Ht=56320|1023&Ht),Ie+=String.fromCharCode(Ht),qe+=Yt}return Ie}(this.buf,z,S)},readBytes:function(){var S=this.readVarint()+this.pos,z=this.buf.subarray(this.pos,S);return this.pos=S,z},readPackedVarint:function(S,z){if(this.type!==Ni.Bytes)return S.push(this.readVarint(z));var Z=Au(this);for(S=S||[];this.pos127;);else if(z===Ni.Bytes)this.pos=this.readVarint()+this.pos;else if(z===Ni.Fixed32)this.pos+=4;else{if(z!==Ni.Fixed64)throw new Error("Unimplemented type: "+z);this.pos+=8}},writeTag:function(S,z){this.writeVarint(S<<3|z)},realloc:function(S){for(var z=this.length||16;z268435455||S<0?function(z,Z){var le,ke;if(z>=0?(le=z%4294967296|0,ke=z/4294967296|0):(ke=~(-z/4294967296),4294967295^(le=~(-z%4294967296))?le=le+1|0:(le=0,ke=ke+1|0)),z>=18446744073709552e3||z<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");Z.realloc(10),function(Ie,qe,it){it.buf[it.pos++]=127&Ie|128,Ie>>>=7,it.buf[it.pos++]=127&Ie|128,Ie>>>=7,it.buf[it.pos++]=127&Ie|128,Ie>>>=7,it.buf[it.pos++]=127&Ie|128,Ie>>>=7,it.buf[it.pos]=127&Ie}(le,0,Z),function(Ie,qe){var it=(7&Ie)<<4;qe.buf[qe.pos++]|=it|((Ie>>>=3)?128:0),Ie&&(qe.buf[qe.pos++]=127&Ie|((Ie>>>=7)?128:0),Ie&&(qe.buf[qe.pos++]=127&Ie|((Ie>>>=7)?128:0),Ie&&(qe.buf[qe.pos++]=127&Ie|((Ie>>>=7)?128:0),Ie&&(qe.buf[qe.pos++]=127&Ie|((Ie>>>=7)?128:0),Ie&&(qe.buf[qe.pos++]=127&Ie)))))}(ke,Z)}(S,this):(this.realloc(4),this.buf[this.pos++]=127&S|(S>127?128:0),S<=127||(this.buf[this.pos++]=127&(S>>>=7)|(S>127?128:0),S<=127||(this.buf[this.pos++]=127&(S>>>=7)|(S>127?128:0),S<=127||(this.buf[this.pos++]=S>>>7&127))))},writeSVarint:function(S){this.writeVarint(S<0?2*-S-1:2*S)},writeBoolean:function(S){this.writeVarint(!!S)},writeString:function(S){S=String(S),this.realloc(4*S.length),this.pos++;var z=this.pos;this.pos=function(le,ke,Ie){for(var qe,it,dt=0;dt55295&&qe<57344){if(!it){qe>56319||dt+1===ke.length?(le[Ie++]=239,le[Ie++]=191,le[Ie++]=189):it=qe;continue}if(qe<56320){le[Ie++]=239,le[Ie++]=191,le[Ie++]=189,it=qe;continue}qe=it-55296<<10|qe-56320|65536,it=null}else it&&(le[Ie++]=239,le[Ie++]=191,le[Ie++]=189,it=null);qe<128?le[Ie++]=qe:(qe<2048?le[Ie++]=qe>>6|192:(qe<65536?le[Ie++]=qe>>12|224:(le[Ie++]=qe>>18|240,le[Ie++]=qe>>12&63|128),le[Ie++]=qe>>6&63|128),le[Ie++]=63&qe|128)}return Ie}(this.buf,S,this.pos);var Z=this.pos-z;Z>=128&&Ey(z,Z,this),this.pos=z-1,this.writeVarint(Z),this.pos+=Z},writeFloat:function(S){this.realloc(4),Ay(this.buf,S,this.pos,!0,23,4),this.pos+=4},writeDouble:function(S){this.realloc(8),Ay(this.buf,S,this.pos,!0,52,8),this.pos+=8},writeBytes:function(S){var z=S.length;this.writeVarint(z),this.realloc(z);for(var Z=0;Z=128&&Ey(Z,le,this),this.pos=Z-1,this.writeVarint(le),this.pos+=le},writeMessage:function(S,z,Z){this.writeTag(S,Ni.Bytes),this.writeRawMessage(z,Z)},writePackedVarint:function(S,z){z.length&&this.writeMessage(S,I5,z)},writePackedSVarint:function(S,z){z.length&&this.writeMessage(S,R5,z)},writePackedBoolean:function(S,z){z.length&&this.writeMessage(S,F5,z)},writePackedFloat:function(S,z){z.length&&this.writeMessage(S,z5,z)},writePackedDouble:function(S,z){z.length&&this.writeMessage(S,D5,z)},writePackedFixed32:function(S,z){z.length&&this.writeMessage(S,B5,z)},writePackedSFixed32:function(S,z){z.length&&this.writeMessage(S,N5,z)},writePackedFixed64:function(S,z){z.length&&this.writeMessage(S,j5,z)},writePackedSFixed64:function(S,z){z.length&&this.writeMessage(S,U5,z)},writeBytesField:function(S,z){this.writeTag(S,Ni.Bytes),this.writeBytes(z)},writeFixed32Field:function(S,z){this.writeTag(S,Ni.Fixed32),this.writeFixed32(z)},writeSFixed32Field:function(S,z){this.writeTag(S,Ni.Fixed32),this.writeSFixed32(z)},writeFixed64Field:function(S,z){this.writeTag(S,Ni.Fixed64),this.writeFixed64(z)},writeSFixed64Field:function(S,z){this.writeTag(S,Ni.Fixed64),this.writeSFixed64(z)},writeVarintField:function(S,z){this.writeTag(S,Ni.Varint),this.writeVarint(z)},writeSVarintField:function(S,z){this.writeTag(S,Ni.Varint),this.writeSVarint(z)},writeStringField:function(S,z){this.writeTag(S,Ni.Bytes),this.writeString(z)},writeFloatField:function(S,z){this.writeTag(S,Ni.Fixed32),this.writeFloat(z)},writeDoubleField:function(S,z){this.writeTag(S,Ni.Fixed64),this.writeDouble(z)},writeBooleanField:function(S,z){this.writeVarintField(S,!!z)}};function V5(S,z,Z){S===1&&Z.readMessage(H5,z)}function H5(S,z,Z){if(S===3){var le=Z.readMessage(q5,{}),ke=le.id,Ie=le.bitmap,qe=le.width,it=le.height,dt=le.left,St=le.top,Rt=le.advance;z.push({id:ke,bitmap:new Pc({width:qe+6,height:it+6},Ie),metrics:{width:qe,height:it,left:dt,top:St,advance:Rt}})}}function q5(S,z,Z){S===1?z.id=Z.readVarint():S===2?z.bitmap=Z.readBytes():S===3?z.width=Z.readVarint():S===4?z.height=Z.readVarint():S===5?z.left=Z.readSVarint():S===6?z.top=Z.readSVarint():S===7&&(z.advance=Z.readVarint())}function Ly(S){for(var z=0,Z=0,le=0,ke=S;le=0;Yt--){var Zt=qe[Yt];if(!(Ht.w>Zt.w||Ht.h>Zt.h)){if(Ht.x=Zt.x,Ht.y=Zt.y,dt=Math.max(dt,Ht.y+Ht.h),it=Math.max(it,Ht.x+Ht.w),Ht.w===Zt.w&&Ht.h===Zt.h){var cn=qe.pop();Yt0&&zc>Ji&&(Ji=zc)}else{var yd=Qr[mi.fontStack],Dc=yd&&yd[Mo];if(Dc&&Dc.rect)Il=Dc.rect,vo=Dc.metrics;else{var xd=si[mi.fontStack],Eh=xd&&xd[Mo];if(!Eh)continue;vo=Eh.metrics}ss=(ei-mi.scale)*no}Rl?(Nr.verticalizable=!0,Ri.push({glyph:Mo,imageName:Eu,x:ja,y:ro+ss,vertical:Rl,scale:mi.scale,fontStack:mi.fontStack,sectionIndex:ia,metrics:vo,rect:Il}),ja+=Va*mi.scale+Fi):(Ri.push({glyph:Mo,imageName:Eu,x:ja,y:ro+ss,vertical:Rl,scale:mi.scale,fontStack:mi.fontStack,sectionIndex:ia,metrics:vo,rect:Il}),ja+=vo.advance*mi.scale+Fi)}if(Ri.length!==0){var B1=ja-Fi;Za=Math.max(B1,Za),W5(Ri,0,Ri.length-1,Ya,Ji)}ja=0;var bd=Pi*ei+Ji;ra.lineOffset=Math.max(Ji,pi),ro+=bd,Ao=Math.max(bd,Ao),++Ea}else ro+=Pi,++Ea}var Sf=ro-sd,_d=C1(ji),wd=_d.horizontalAlign,Ch=_d.verticalAlign;(function(N1,Lh,Fc,Ef,Td,kd,Cf,Ad,Md){var Ph=(Lh-Fc)*Td,Oh=0;Oh=kd!==Cf?-Ad*Ef-sd:(-Ef*Md+.5)*Cf;for(var Bc=0,Ih=N1;Bc=0&&le>=S&&ud[this.text.charCodeAt(le)];le--)Z--;this.text=this.text.substring(S,Z),this.sectionIndex=this.sectionIndex.slice(S,Z)},go.prototype.substring=function(S,z){var Z=new go;return Z.text=this.text.substring(S,z),Z.sectionIndex=this.sectionIndex.slice(S,z),Z.sections=this.sections,Z},go.prototype.toString=function(){return this.text},go.prototype.getMaxScale=function(){var S=this;return this.sectionIndex.reduce(function(z,Z){return Math.max(z,S.sections[Z].scale)},0)},go.prototype.addTextSection=function(S,z){this.text+=S.text,this.sections.push(xf.forText(S.scale,S.fontStack||z));for(var Z=this.sections.length-1,le=0;le=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var ud={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},os={};function Py(S,z,Z,le,ke,Ie){if(z.imageName){var qe=le[z.imageName];return qe?qe.displaySize[0]*z.scale*no/Ie+ke:0}var it=Z[z.fontStack],dt=it&&it[S];return dt?dt.metrics.advance*z.scale+ke:0}function Oy(S,z,Z,le){var ke=Math.pow(S-z,2);return le?S=0,Rt=0,Ht=0;Ht-Z/2;){if(--qe<0)return!1;it-=S[qe].dist(Ie),Ie=S[qe]}it+=S[qe].dist(S[qe+1]),qe++;for(var dt=[],St=0;itle;)St-=dt.shift().angleDelta;if(St>ke)return!1;qe++,it+=Ht.dist(Yt)}return!0}function Ny(S){for(var z=0,Z=0;ZSt){var cn=(St-dt)/Zt,Tn=Lr(Ht.x,Yt.x,cn),Fn=Lr(Ht.y,Yt.y,cn),Dn=new bf(Tn,Fn,Yt.angleTo(Ht),Rt);return Dn._round(),!qe||By(S,Dn,it,qe,z)?Dn:void 0}dt+=Zt}}function X5(S,z,Z,le,ke,Ie,qe,it,dt){var St=jy(le,Ie,qe),Rt=Uy(le,ke),Ht=Rt*qe,Yt=S[0].x===0||S[0].x===dt||S[0].y===0||S[0].y===dt;return z-Ht=0&&Kn=0&&ar=0&&Yt+St<=Rt){var ur=new bf(Kn,ar,Gn,cn);ur._round(),le&&!By(S,ur,Ie,le,ke)||Zt.push(ur)}}Ht+=Dn}return it||Zt.length||qe||(Zt=Vy(S,Ht/2,Z,le,ke,Ie,qe,!0,dt)),Zt}function Hy(S,z,Z,le,ke){for(var Ie=[],qe=0;qe=le&&Ht.x>=le||(Rt.x>=le?Rt=new t(le,Rt.y+(Ht.y-Rt.y)*((le-Rt.x)/(Ht.x-Rt.x)))._round():Ht.x>=le&&(Ht=new t(le,Rt.y+(Ht.y-Rt.y)*((le-Rt.x)/(Ht.x-Rt.x)))._round()),Rt.y>=ke&&Ht.y>=ke||(Rt.y>=ke?Rt=new t(Rt.x+(Ht.x-Rt.x)*((ke-Rt.y)/(Ht.y-Rt.y)),ke)._round():Ht.y>=ke&&(Ht=new t(Rt.x+(Ht.x-Rt.x)*((ke-Rt.y)/(Ht.y-Rt.y)),ke)._round()),dt&&Rt.equals(dt[dt.length-1])||(dt=[Rt],Ie.push(dt)),dt.push(Ht)))))}return Ie}function qy(S,z,Z,le){var ke=[],Ie=S.image,qe=Ie.pixelRatio,it=Ie.paddedRect.w-2,dt=Ie.paddedRect.h-2,St=S.right-S.left,Rt=S.bottom-S.top,Ht=Ie.stretchX||[[0,it]],Yt=Ie.stretchY||[[0,dt]],Zt=function(Pi,ji){return Pi+ji[1]-ji[0]},cn=Ht.reduce(Zt,0),Tn=Yt.reduce(Zt,0),Fn=it-cn,Dn=dt-Tn,Gn=0,Yn=cn,Kn=0,ar=Tn,ur=0,Er=Fn,br=0,Ir=Dn;if(Ie.content&&le){var Br=Ie.content;Gn=cd(Ht,0,Br[0]),Kn=cd(Yt,0,Br[1]),Yn=cd(Ht,Br[0],Br[2]),ar=cd(Yt,Br[1],Br[3]),ur=Br[0]-Gn,br=Br[1]-Kn,Er=Br[2]-Br[0]-Yn,Ir=Br[3]-Br[1]-ar}var $r=function(Pi,ji,Vi,Wi){var Fi=fd(Pi.stretch-Gn,Yn,St,S.left),Ma=hd(Pi.fixed-ur,Er,Pi.stretch,cn),Xi=fd(ji.stretch-Kn,ar,Rt,S.top),ja=hd(ji.fixed-br,Ir,ji.stretch,Tn),ro=fd(Vi.stretch-Gn,Yn,St,S.left),Za=hd(Vi.fixed-ur,Er,Vi.stretch,cn),Ao=fd(Wi.stretch-Kn,ar,Rt,S.top),Ya=hd(Wi.fixed-br,Ir,Wi.stretch,Tn),Ea=new t(Fi,Xi),Xa=new t(ro,Xi),Ua=new t(ro,Ao),Ca=new t(Fi,Ao),ei=new t(Ma/qe,ja/qe),pi=new t(Za/qe,Ya/qe),ra=z*Math.PI/180;if(ra){var Ri=Math.sin(ra),Ji=Math.cos(ra),Zi=[Ji,-Ri,Ri,Ji];Ea._matMult(Zi),Xa._matMult(Zi),Ca._matMult(Zi),Ua._matMult(Zi)}var mi=Pi.stretch+Pi.fixed,ia=Vi.stretch+Vi.fixed,Mo=ji.stretch+ji.fixed,ss=Wi.stretch+Wi.fixed;return{tl:Ea,tr:Xa,bl:Ca,br:Ua,tex:{x:Ie.paddedRect.x+1+mi,y:Ie.paddedRect.y+1+Mo,w:ia-mi,h:ss-Mo},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:ei,pixelOffsetBR:pi,minFontScaleX:Er/qe/St,minFontScaleY:Ir/qe/Rt,isSDF:Z}};if(le&&(Ie.stretchX||Ie.stretchY))for(var jr=Gy(Ht,Fn,cn),Xr=Gy(Yt,Dn,Tn),Vr=0;Vr0&&(Zt=Math.max(10,Zt),this.circleDiameter=Zt)}else{var cn=Ie.top*qe-it,Tn=Ie.bottom*qe+it,Fn=Ie.left*qe-it,Dn=Ie.right*qe+it,Gn=Ie.collisionPadding;if(Gn&&(Fn-=Gn[0]*qe,cn-=Gn[1]*qe,Dn+=Gn[2]*qe,Tn+=Gn[3]*qe),St){var Yn=new t(Fn,cn),Kn=new t(Dn,cn),ar=new t(Fn,Tn),ur=new t(Dn,Tn),Er=St*Math.PI/180;Yn._rotate(Er),Kn._rotate(Er),ar._rotate(Er),ur._rotate(Er),Fn=Math.min(Yn.x,Kn.x,ar.x,ur.x),Dn=Math.max(Yn.x,Kn.x,ar.x,ur.x),cn=Math.min(Yn.y,Kn.y,ar.y,ur.y),Tn=Math.max(Yn.y,Kn.y,ar.y,ur.y)}S.emplaceBack(z.x,z.y,Fn,cn,Dn,Tn,Z,le,ke)}this.boxEndIndex=S.length},_f=function(S,z){if(S===void 0&&(S=[]),z===void 0&&(z=$5),this.data=S,this.length=this.data.length,this.compare=z,this.length>0)for(var Z=(this.length>>1)-1;Z>=0;Z--)this._down(Z)};function $5(S,z){return Sz?1:0}function J5(S,z,Z){z===void 0&&(z=1),Z===void 0&&(Z=!1);for(var le=1/0,ke=1/0,Ie=-1/0,qe=-1/0,it=S[0],dt=0;dtIe)&&(Ie=St.x),(!dt||St.y>qe)&&(qe=St.y)}var Rt=Ie-le,Ht=qe-ke,Yt=Math.min(Rt,Ht),Zt=Yt/2,cn=new _f([],K5);if(Yt===0)return new t(le,ke);for(var Tn=le;TnDn.d||!Dn.d)&&(Dn=Yn,Z&&console.log("found best %d after %d probes",Math.round(1e4*Yn.d)/1e4,Gn)),Yn.max-Dn.d<=z||(Zt=Yn.h/2,cn.push(new wf(Yn.p.x-Zt,Yn.p.y-Zt,Zt,S)),cn.push(new wf(Yn.p.x+Zt,Yn.p.y-Zt,Zt,S)),cn.push(new wf(Yn.p.x-Zt,Yn.p.y+Zt,Zt,S)),cn.push(new wf(Yn.p.x+Zt,Yn.p.y+Zt,Zt,S)),Gn+=4)}return Z&&(console.log("num probes: "+Gn),console.log("best distance: "+Dn.d)),Dn.p}function K5(S,z){return z.max-S.max}function wf(S,z,Z,le){this.p=new t(S,z),this.h=Z,this.d=function(ke,Ie){for(var qe=!1,it=1/0,dt=0;dtke.y!=cn.y>ke.y&&ke.x<(cn.x-Zt.x)*(ke.y-Zt.y)/(cn.y-Zt.y)+Zt.x&&(qe=!qe),it=Math.min(it,Xp(ke,Zt,cn))}return(qe?1:-1)*Math.sqrt(it)}(this.p,le),this.max=this.d+this.h*Math.SQRT2}_f.prototype.push=function(S){this.data.push(S),this.length++,this._up(this.length-1)},_f.prototype.pop=function(){if(this.length!==0){var S=this.data[0],z=this.data.pop();return this.length--,this.length>0&&(this.data[0]=z,this._down(0)),S}},_f.prototype.peek=function(){return this.data[0]},_f.prototype._up=function(S){for(var z=this.data,Z=this.compare,le=z[S];S>0;){var ke=S-1>>1,Ie=z[ke];if(Z(le,Ie)>=0)break;z[S]=Ie,S=ke}z[S]=le},_f.prototype._down=function(S){for(var z=this.data,Z=this.compare,le=this.length>>1,ke=z[S];S=0)break;z[S]=qe,S=Ie}z[S]=ke};var P1=Number.POSITIVE_INFINITY;function Wy(S,z){return z[1]!==P1?function(Z,le,ke){var Ie=0,qe=0;switch(le=Math.abs(le),ke=Math.abs(ke),Z){case"top-right":case"top-left":case"top":qe=ke-7;break;case"bottom-right":case"bottom-left":case"bottom":qe=7-ke}switch(Z){case"top-right":case"bottom-right":case"right":Ie=-le;break;case"top-left":case"bottom-left":case"left":Ie=le}return[Ie,qe]}(S,z[0],z[1]):function(Z,le){var ke=0,Ie=0;le<0&&(le=0);var qe=le/Math.sqrt(2);switch(Z){case"top-right":case"top-left":Ie=qe-7;break;case"bottom-right":case"bottom-left":Ie=7-qe;break;case"bottom":Ie=7-le;break;case"top":Ie=le-7}switch(Z){case"top-right":case"bottom-right":ke=-qe;break;case"top-left":case"bottom-left":ke=qe;break;case"left":ke=le;break;case"right":ke=-le}return[ke,Ie]}(S,z[0])}function O1(S){switch(S){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}var Xu=32640;function Zy(S,z,Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn){var Tn=function(Kn,ar,ur,Er,br,Ir,Br,$r){for(var jr=Er.layout.get("text-rotate").evaluate(Ir,{})*Math.PI/180,Xr=[],Vr=0,Nr=ar.positionedLines;VrXu&&M(S.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):Fn.kind==="composite"&&((Dn=[Ql*Zt.compositeTextSizes[0].evaluate(qe,{},cn),Ql*Zt.compositeTextSizes[1].evaluate(qe,{},cn)])[0]>Xu||Dn[1]>Xu)&&M(S.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),S.addSymbols(S.text,Tn,Dn,it,Ie,qe,St,z,dt.lineStartIndex,dt.lineLength,Yt,cn);for(var Gn=0,Yn=Rt;Gn=0;qe--)if(le.dist(Ie[qe])0)&&(Ie.value.kind!=="constant"||Ie.value.value.length>0),St=it.value.kind!=="constant"||!!it.value.value||Object.keys(it.parameters).length>0,Rt=ke.get("symbol-sort-key");if(this.features=[],dt||St){for(var Ht=z.iconDependencies,Yt=z.glyphDependencies,Zt=z.availableImages,cn=new di(this.zoom),Tn=0,Fn=S;Tn=0;for(var Qr=0,Di=br.sections;Qr=0;it--)Ie[it]={x:z[it].x,y:z[it].y,tileUnitDistanceFromAnchor:ke},it>0&&(ke+=z[it-1].dist(z[it]));for(var dt=0;dt0},Li.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Li.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Li.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Li.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Li.prototype.addIndicesForPlacedSymbol=function(S,z){for(var Z=S.placedSymbolArray.get(z),le=Z.vertexStartIndex+4*Z.numGlyphs,ke=Z.vertexStartIndex;ke1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(S),this.sortedAngle=S,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var Z=0,le=this.symbolInstanceIndexes;Z=0&&dt.indexOf(qe)===it&&z.addIndicesForPlacedSymbol(z.text,qe)}),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)}},Cr("SymbolBucket",Li,{omit:["layers","collisionBoxArray","features","compareText"]}),Li.MAX_GLYPHS=65535,Li.addDynamicAttributes=I1;var r4=new _a({"symbol-placement":new Fr(Oe.layout_symbol["symbol-placement"]),"symbol-spacing":new Fr(Oe.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Fr(Oe.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ur(Oe.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Fr(Oe.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Fr(Oe.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Fr(Oe.layout_symbol["icon-ignore-placement"]),"icon-optional":new Fr(Oe.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Fr(Oe.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ur(Oe.layout_symbol["icon-size"]),"icon-text-fit":new Fr(Oe.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Fr(Oe.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ur(Oe.layout_symbol["icon-image"]),"icon-rotate":new Ur(Oe.layout_symbol["icon-rotate"]),"icon-padding":new Fr(Oe.layout_symbol["icon-padding"]),"icon-keep-upright":new Fr(Oe.layout_symbol["icon-keep-upright"]),"icon-offset":new Ur(Oe.layout_symbol["icon-offset"]),"icon-anchor":new Ur(Oe.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Fr(Oe.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Fr(Oe.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Fr(Oe.layout_symbol["text-rotation-alignment"]),"text-field":new Ur(Oe.layout_symbol["text-field"]),"text-font":new Ur(Oe.layout_symbol["text-font"]),"text-size":new Ur(Oe.layout_symbol["text-size"]),"text-max-width":new Ur(Oe.layout_symbol["text-max-width"]),"text-line-height":new Fr(Oe.layout_symbol["text-line-height"]),"text-letter-spacing":new Ur(Oe.layout_symbol["text-letter-spacing"]),"text-justify":new Ur(Oe.layout_symbol["text-justify"]),"text-radial-offset":new Ur(Oe.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Fr(Oe.layout_symbol["text-variable-anchor"]),"text-anchor":new Ur(Oe.layout_symbol["text-anchor"]),"text-max-angle":new Fr(Oe.layout_symbol["text-max-angle"]),"text-writing-mode":new Fr(Oe.layout_symbol["text-writing-mode"]),"text-rotate":new Ur(Oe.layout_symbol["text-rotate"]),"text-padding":new Fr(Oe.layout_symbol["text-padding"]),"text-keep-upright":new Fr(Oe.layout_symbol["text-keep-upright"]),"text-transform":new Ur(Oe.layout_symbol["text-transform"]),"text-offset":new Ur(Oe.layout_symbol["text-offset"]),"text-allow-overlap":new Fr(Oe.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Fr(Oe.layout_symbol["text-ignore-placement"]),"text-optional":new Fr(Oe.layout_symbol["text-optional"])}),R1={paint:new _a({"icon-opacity":new Ur(Oe.paint_symbol["icon-opacity"]),"icon-color":new Ur(Oe.paint_symbol["icon-color"]),"icon-halo-color":new Ur(Oe.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ur(Oe.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ur(Oe.paint_symbol["icon-halo-blur"]),"icon-translate":new Fr(Oe.paint_symbol["icon-translate"]),"icon-translate-anchor":new Fr(Oe.paint_symbol["icon-translate-anchor"]),"text-opacity":new Ur(Oe.paint_symbol["text-opacity"]),"text-color":new Ur(Oe.paint_symbol["text-color"],{runtimeType:Bt,getOverride:function(S){return S.textColor},hasOverride:function(S){return!!S.textColor}}),"text-halo-color":new Ur(Oe.paint_symbol["text-halo-color"]),"text-halo-width":new Ur(Oe.paint_symbol["text-halo-width"]),"text-halo-blur":new Ur(Oe.paint_symbol["text-halo-blur"]),"text-translate":new Fr(Oe.paint_symbol["text-translate"]),"text-translate-anchor":new Fr(Oe.paint_symbol["text-translate-anchor"])}),layout:r4},kf=function(S){this.type=S.property.overrides?S.property.overrides.runtimeType:mt,this.defaultValue=S};kf.prototype.evaluate=function(S){if(S.formattedSection){var z=this.defaultValue.property.overrides;if(z&&z.hasOverride(S.formattedSection))return z.getOverride(S.formattedSection)}return S.feature&&S.featureState?this.defaultValue.evaluate(S.feature,S.featureState):this.defaultValue.property.specification.default},kf.prototype.eachChild=function(S){this.defaultValue.isConstant()||S(this.defaultValue.value._styleExpression.expression)},kf.prototype.outputDefined=function(){return!1},kf.prototype.serialize=function(){return null},Cr("FormatSectionOverride",kf,{omit:["defaultValue"]});var i4=function(S){function z(Z){S.call(this,Z,R1)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.recalculate=function(Z,le){if(S.prototype.recalculate.call(this,Z,le),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 ke=this.layout.get("text-writing-mode");if(ke){for(var Ie=[],qe=0,it=ke;qe",targetMapId:le,sourceMapId:Ie.mapId})}}},Af.prototype.receive=function(S){var z=S.data,Z=z.id;if(Z&&(!z.targetMapId||this.mapId===z.targetMapId))if(z.type===""){delete this.tasks[Z];var le=this.cancelCallbacks[Z];delete this.cancelCallbacks[Z],le&&le()}else L()||z.mustQueue?(this.tasks[Z]=z,this.taskQueue.push(Z),this.invoker.trigger()):this.processTask(Z,z)},Af.prototype.process=function(){if(this.taskQueue.length){var S=this.taskQueue.shift(),z=this.tasks[S];delete this.tasks[S],this.taskQueue.length&&this.invoker.trigger(),z&&this.processTask(S,z)}},Af.prototype.processTask=function(S,z){var Z=this;if(z.type===""){var le=this.callbacks[S];delete this.callbacks[S],le&&(z.error?le(il(z.error)):le(null,il(z.data)))}else{var ke=!1,Ie=R(this.globalScope)?void 0:[],qe=z.hasCallback?function(Rt,Ht){ke=!0,delete Z.cancelCallbacks[S],Z.target.postMessage({id:S,type:"",sourceMapId:Z.mapId,error:Rt?rl(Rt):null,data:rl(Ht,Ie)},Ie)}:function(Rt){ke=!0},it=null,dt=il(z.data);if(this.parent[z.type])it=this.parent[z.type](z.sourceMapId,dt,qe);else if(this.parent.getWorkerSource){var St=z.type.split(".");it=this.parent.getWorkerSource(z.sourceMapId,St[0],dt.source)[St[1]](dt,qe)}else qe(new Error("Could not find function "+z.type));!ke&&it&&it.cancel&&(this.cancelCallbacks[S]=it.cancel)}},Af.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var ka=function(S,z){S&&(z?this.setSouthWest(S).setNorthEast(z):S.length===4?this.setSouthWest([S[0],S[1]]).setNorthEast([S[2],S[3]]):this.setSouthWest(S[0]).setNorthEast(S[1]))};ka.prototype.setNorthEast=function(S){return this._ne=S instanceof Gi?new Gi(S.lng,S.lat):Gi.convert(S),this},ka.prototype.setSouthWest=function(S){return this._sw=S instanceof Gi?new Gi(S.lng,S.lat):Gi.convert(S),this},ka.prototype.extend=function(S){var z,Z,le=this._sw,ke=this._ne;if(S instanceof Gi)z=S,Z=S;else{if(!(S instanceof ka)){if(Array.isArray(S)){if(S.length===4||S.every(Array.isArray)){var Ie=S;return this.extend(ka.convert(Ie))}var qe=S;return this.extend(Gi.convert(qe))}return this}if(z=S._sw,Z=S._ne,!z||!Z)return this}return le||ke?(le.lng=Math.min(z.lng,le.lng),le.lat=Math.min(z.lat,le.lat),ke.lng=Math.max(Z.lng,ke.lng),ke.lat=Math.max(Z.lat,ke.lat)):(this._sw=new Gi(z.lng,z.lat),this._ne=new Gi(Z.lng,Z.lat)),this},ka.prototype.getCenter=function(){return new Gi((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},ka.prototype.getSouthWest=function(){return this._sw},ka.prototype.getNorthEast=function(){return this._ne},ka.prototype.getNorthWest=function(){return new Gi(this.getWest(),this.getNorth())},ka.prototype.getSouthEast=function(){return new Gi(this.getEast(),this.getSouth())},ka.prototype.getWest=function(){return this._sw.lng},ka.prototype.getSouth=function(){return this._sw.lat},ka.prototype.getEast=function(){return this._ne.lng},ka.prototype.getNorth=function(){return this._ne.lat},ka.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},ka.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},ka.prototype.isEmpty=function(){return!(this._sw&&this._ne)},ka.prototype.contains=function(S){var z=Gi.convert(S),Z=z.lng,le=z.lat,ke=this._sw.lat<=le&&le<=this._ne.lat,Ie=this._sw.lng<=Z&&Z<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Ie=this._sw.lng>=Z&&Z>=this._ne.lng),ke&&Ie},ka.convert=function(S){return!S||S instanceof ka?S:new ka(S)};var ex=63710088e-1,Gi=function(S,z){if(isNaN(S)||isNaN(z))throw new Error("Invalid LngLat object: ("+S+", "+z+")");if(this.lng=+S,this.lat=+z,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Gi.prototype.wrap=function(){return new Gi(i(this.lng,-180,180),this.lat)},Gi.prototype.toArray=function(){return[this.lng,this.lat]},Gi.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Gi.prototype.distanceTo=function(S){var z=Math.PI/180,Z=this.lat*z,le=S.lat*z,ke=Math.sin(Z)*Math.sin(le)+Math.cos(Z)*Math.cos(le)*Math.cos((S.lng-this.lng)*z);return ex*Math.acos(Math.min(ke,1))},Gi.prototype.toBounds=function(S){S===void 0&&(S=0);var z=360*S/40075017,Z=z/Math.cos(Math.PI/180*this.lat);return new ka(new Gi(this.lng-Z,this.lat-z),new Gi(this.lng+Z,this.lat+z))},Gi.convert=function(S){if(S instanceof Gi)return S;if(Array.isArray(S)&&(S.length===2||S.length===3))return new Gi(Number(S[0]),Number(S[1]));if(!Array.isArray(S)&&typeof S=="object"&&S!==null)return new Gi(Number("lng"in S?S.lng:S.lon),Number(S.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var tx=2*Math.PI*ex;function nx(S){return tx*Math.cos(S*Math.PI/180)}function rx(S){return(180+S)/360}function ix(S){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+S*Math.PI/360)))/360}function ax(S,z){return S/nx(z)}function D1(S){var z=180-360*S;return 360/Math.PI*Math.atan(Math.exp(z*Math.PI/180))-90}var Ic=function(S,z,Z){Z===void 0&&(Z=0),this.x=+S,this.y=+z,this.z=+Z};Ic.fromLngLat=function(S,z){z===void 0&&(z=0);var Z=Gi.convert(S);return new Ic(rx(Z.lng),ix(Z.lat),ax(z,Z.lat))},Ic.prototype.toLngLat=function(){return new Gi(360*this.x-180,D1(this.y))},Ic.prototype.toAltitude=function(){return S=this.z,z=this.y,S*nx(D1(z));var S,z},Ic.prototype.meterInMercatorCoordinateUnits=function(){return 1/tx*(S=D1(this.y),1/Math.cos(S*Math.PI/180));var S};var Rc=function(S,z,Z){this.z=S,this.x=z,this.y=Z,this.key=Sh(0,S,S,z,Z)};Rc.prototype.equals=function(S){return this.z===S.z&&this.x===S.x&&this.y===S.y},Rc.prototype.url=function(S,z){var Z,le,ke,Ie,qe,it=(Z=this.x,le=this.y,ke=this.z,Ie=Qy(256*Z,256*(le=Math.pow(2,ke)-le-1),ke),qe=Qy(256*(Z+1),256*(le+1),ke),Ie[0]+","+Ie[1]+","+qe[0]+","+qe[1]),dt=function(St,Rt,Ht){for(var Yt,Zt="",cn=St;cn>0;cn--)Zt+=(Rt&(Yt=1<this.canonical.z?new Aa(S,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Aa(S,this.wrap,S,this.canonical.x>>z,this.canonical.y>>z)},Aa.prototype.calculateScaledKey=function(S,z){var Z=this.canonical.z-S;return S>this.canonical.z?Sh(this.wrap*+z,S,this.canonical.z,this.canonical.x,this.canonical.y):Sh(this.wrap*+z,S,S,this.canonical.x>>Z,this.canonical.y>>Z)},Aa.prototype.isChildOf=function(S){if(S.wrap!==this.wrap)return!1;var z=this.canonical.z-S.canonical.z;return S.overscaledZ===0||S.overscaledZ>z&&S.canonical.y===this.canonical.y>>z},Aa.prototype.children=function(S){if(this.overscaledZ>=S)return[new Aa(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var z=this.canonical.z+1,Z=2*this.canonical.x,le=2*this.canonical.y;return[new Aa(z,this.wrap,z,Z,le),new Aa(z,this.wrap,z,Z+1,le),new Aa(z,this.wrap,z,Z,le+1),new Aa(z,this.wrap,z,Z+1,le+1)]},Aa.prototype.isLessThan=function(S){return this.wrapS.wrap)&&(this.overscaledZS.overscaledZ)&&(this.canonical.xS.canonical.x)&&this.canonical.y=this.dim+1||z<-1||z>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(z+1)*this.stride+(S+1)},Mu.prototype._unpackMapbox=function(S,z,Z){return(256*S*256+256*z+Z)/10-1e4},Mu.prototype._unpackTerrarium=function(S,z,Z){return 256*S+z+Z/256-32768},Mu.prototype.getPixels=function(){return new No({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Mu.prototype.backfillBorder=function(S,z,Z){if(this.dim!==S.dim)throw new Error("dem dimension mismatch");var le=z*this.dim,ke=z*this.dim+this.dim,Ie=Z*this.dim,qe=Z*this.dim+this.dim;switch(z){case-1:le=ke-1;break;case 1:ke=le+1}switch(Z){case-1:Ie=qe-1;break;case 1:qe=Ie+1}for(var it=-z*this.dim,dt=-Z*this.dim,St=Ie;St=0&&Rt[3]>=0&&it.insert(qe,Rt[0],Rt[1],Rt[2],Rt[3])}},Su.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new vf.VectorTile(new id(this.rawTileData)).layers,this.sourceLayerCoder=new vd(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Su.prototype.query=function(S,z,Z,le){var ke=this;this.loadVTLayers();for(var Ie=S.params||{},qe=Yr/S.tileSize/S.scale,it=El(Ie.filter),dt=S.queryGeometry,St=S.queryPadding*qe,Rt=lx(dt),Ht=this.grid.query(Rt.minX-St,Rt.minY-St,Rt.maxX+St,Rt.maxY+St),Yt=lx(S.cameraQueryGeometry),Zt=0,cn=this.grid3D.query(Yt.minX-St,Yt.minY-St,Yt.maxX+St,Yt.maxY+St,function(Kn,ar,ur,Er){return function(br,Ir,Br,$r,jr){for(var Xr=0,Vr=br;Xr=Nr.x&&jr>=Nr.y)return!0}var si=[new t(Ir,Br),new t(Ir,jr),new t($r,jr),new t($r,Br)];if(br.length>2){for(var Qr=0,Di=si;Qr=0)return!0;return!1}(Ie,Ht)){var Yt=this.sourceLayerCoder.decode(Z),Zt=this.vtLayers[Yt].feature(le);if(ke.filter(new di(this.tileID.overscaledZ),Zt))for(var cn=this.getId(Zt,Yt),Tn=0;Tnle)ke=!1;else if(z)if(this.expirationTimege&&(S.getActor().send("enforceCacheSizeLimit",je),st=0)},s.clamp=o,s.clearTileCache=function(S){var z=self.caches.delete(De);S&&z.catch(S).then(function(){return S()})},s.clipLine=Hy,s.clone=function(S){var z=new ws(16);return z[0]=S[0],z[1]=S[1],z[2]=S[2],z[3]=S[3],z[4]=S[4],z[5]=S[5],z[6]=S[6],z[7]=S[7],z[8]=S[8],z[9]=S[9],z[10]=S[10],z[11]=S[11],z[12]=S[12],z[13]=S[13],z[14]=S[14],z[15]=S[15],z},s.clone$1=k,s.clone$2=function(S){var z=new ws(3);return z[0]=S[0],z[1]=S[1],z[2]=S[2],z},s.collisionCircleLayout=P5,s.config=X,s.create=function(){var S=new ws(16);return ws!=Float32Array&&(S[1]=0,S[2]=0,S[3]=0,S[4]=0,S[6]=0,S[7]=0,S[8]=0,S[9]=0,S[11]=0,S[12]=0,S[13]=0,S[14]=0),S[0]=1,S[5]=1,S[10]=1,S[15]=1,S},s.create$1=function(){var S=new ws(9);return ws!=Float32Array&&(S[1]=0,S[2]=0,S[3]=0,S[5]=0,S[6]=0,S[7]=0),S[0]=1,S[4]=1,S[8]=1,S},s.create$2=function(){var S=new ws(4);return ws!=Float32Array&&(S[1]=0,S[2]=0),S[0]=1,S[3]=1,S},s.createCommonjsModule=T,s.createExpression=wl,s.createLayout=Si,s.createStyleLayer=function(S){return S.type==="custom"?new u4(S):new c4[S.type](S)},s.cross=function(S,z,Z){var le=z[0],ke=z[1],Ie=z[2],qe=Z[0],it=Z[1],dt=Z[2];return S[0]=ke*dt-Ie*it,S[1]=Ie*qe-le*dt,S[2]=le*it-ke*qe,S},s.deepEqual=function S(z,Z){if(Array.isArray(z)){if(!Array.isArray(Z)||z.length!==Z.length)return!1;for(var le=0;le0&&(Ie=1/Math.sqrt(Ie)),S[0]=z[0]*Ie,S[1]=z[1]*Ie,S[2]=z[2]*Ie,S},s.number=Lr,s.offscreenCanvasSupported=ot,s.ortho=function(S,z,Z,le,ke,Ie,qe){var it=1/(z-Z),dt=1/(le-ke),St=1/(Ie-qe);return S[0]=-2*it,S[1]=0,S[2]=0,S[3]=0,S[4]=0,S[5]=-2*dt,S[6]=0,S[7]=0,S[8]=0,S[9]=0,S[10]=2*St,S[11]=0,S[12]=(z+Z)*it,S[13]=(ke+le)*dt,S[14]=(qe+Ie)*St,S[15]=1,S},s.parseGlyphPBF=function(S){return new id(S).readFields(V5,[])},s.pbf=id,s.performSymbolLayout=function(S,z,Z,le,ke,Ie,qe){S.createArrays();var it=512*S.overscaling;S.tilePixelRatio=Yr/it,S.compareText={},S.iconsNeedLinear=!1;var dt=S.layers[0].layout,St=S.layers[0]._unevaluatedLayout._values,Rt={};if(S.textSizeData.kind==="composite"){var Ht=S.textSizeData,Yt=Ht.minZoom,Zt=Ht.maxZoom;Rt.compositeTextSizes=[St["text-size"].possiblyEvaluate(new di(Yt),qe),St["text-size"].possiblyEvaluate(new di(Zt),qe)]}if(S.iconSizeData.kind==="composite"){var cn=S.iconSizeData,Tn=cn.minZoom,Fn=cn.maxZoom;Rt.compositeIconSizes=[St["icon-size"].possiblyEvaluate(new di(Tn),qe),St["icon-size"].possiblyEvaluate(new di(Fn),qe)]}Rt.layoutTextSize=St["text-size"].possiblyEvaluate(new di(S.zoom+1),qe),Rt.layoutIconSize=St["icon-size"].possiblyEvaluate(new di(S.zoom+1),qe),Rt.textMaxSize=St["text-size"].possiblyEvaluate(new di(18));for(var Dn=dt.get("text-line-height")*no,Gn=dt.get("text-rotation-alignment")==="map"&&dt.get("symbol-placement")!=="point",Yn=dt.get("text-keep-upright"),Kn=dt.get("text-size"),ar=function(){var br=Er[ur],Ir=dt.get("text-font").evaluate(br,{},qe).join(","),Br=Kn.evaluate(br,{},qe),$r=Rt.layoutTextSize.evaluate(br,{},qe),jr=Rt.layoutIconSize.evaluate(br,{},qe),Xr={horizontal:{},vertical:void 0},Vr=br.text,Nr=[0,0];if(Vr){var si=Vr.toString(),Qr=dt.get("text-letter-spacing").evaluate(br,{},qe)*no,Di=function(ei){for(var pi=0,ra=ei;pi=Yr||Dh.y<0||Dh.y>=Yr||function(sa,zl,p4,Ju,G1,dx,Sd,eu,Ed,Fh,Cd,Ld,W1,gx,Bh,vx,mx,yx,xx,bx,ks,Pd,_x,tu,d4){var wx,jc,Lf,Pf,Of,If=sa.addToLineVertexArray(zl,p4),Tx=0,kx=0,Ax=0,Mx=0,Z1=-1,Y1=-1,Cu={},Sx=zn(""),X1=0,$1=0;if(eu._unevaluatedLayout.getValue("text-radial-offset")===void 0?(X1=(wx=eu.layout.get("text-offset").evaluate(ks,{},tu).map(function(jh){return jh*no}))[0],$1=wx[1]):(X1=eu.layout.get("text-radial-offset").evaluate(ks,{},tu)*no,$1=P1),sa.allowVerticalPlacement&&Ju.vertical){var Ex=eu.layout.get("text-rotate").evaluate(ks,{},tu)+90,g4=Ju.vertical;Pf=new pd(Ed,zl,Fh,Cd,Ld,g4,W1,gx,Bh,Ex),Sd&&(Of=new pd(Ed,zl,Fh,Cd,Ld,Sd,mx,yx,Bh,Ex))}if(G1){var J1=eu.layout.get("icon-rotate").evaluate(ks,{}),Cx=eu.layout.get("icon-text-fit")!=="none",Lx=qy(G1,J1,_x,Cx),K1=Sd?qy(Sd,J1,_x,Cx):void 0;Lf=new pd(Ed,zl,Fh,Cd,Ld,G1,mx,yx,!1,J1),Tx=4*Lx.length;var Px=sa.iconSizeData,Nh=null;Px.kind==="source"?(Nh=[Ql*eu.layout.get("icon-size").evaluate(ks,{})])[0]>Xu&&M(sa.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):Px.kind==="composite"&&((Nh=[Ql*Pd.compositeIconSizes[0].evaluate(ks,{},tu),Ql*Pd.compositeIconSizes[1].evaluate(ks,{},tu)])[0]>Xu||Nh[1]>Xu)&&M(sa.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),sa.addSymbols(sa.icon,Lx,Nh,bx,xx,ks,!1,zl,If.lineStartIndex,If.lineLength,-1,tu),Z1=sa.icon.placedSymbolArray.length-1,K1&&(kx=4*K1.length,sa.addSymbols(sa.icon,K1,Nh,bx,xx,ks,Ts.vertical,zl,If.lineStartIndex,If.lineLength,-1,tu),Y1=sa.icon.placedSymbolArray.length-1)}for(var Ox in Ju.horizontal){var Od=Ju.horizontal[Ox];if(!jc){Sx=zn(Od.text);var v4=eu.layout.get("text-rotate").evaluate(ks,{},tu);jc=new pd(Ed,zl,Fh,Cd,Ld,Od,W1,gx,Bh,v4)}var Ix=Od.positionedLines.length===1;if(Ax+=Zy(sa,zl,Od,dx,eu,Bh,ks,vx,If,Ju.vertical?Ts.horizontal:Ts.horizontalOnly,Ix?Object.keys(Ju.horizontal):[Ox],Cu,Z1,Pd,tu),Ix)break}Ju.vertical&&(Mx+=Zy(sa,zl,Ju.vertical,dx,eu,Bh,ks,vx,If,Ts.vertical,["vertical"],Cu,Y1,Pd,tu));var m4=jc?jc.boxStartIndex:sa.collisionBoxArray.length,y4=jc?jc.boxEndIndex:sa.collisionBoxArray.length,x4=Pf?Pf.boxStartIndex:sa.collisionBoxArray.length,b4=Pf?Pf.boxEndIndex:sa.collisionBoxArray.length,_4=Lf?Lf.boxStartIndex:sa.collisionBoxArray.length,w4=Lf?Lf.boxEndIndex:sa.collisionBoxArray.length,T4=Of?Of.boxStartIndex:sa.collisionBoxArray.length,k4=Of?Of.boxEndIndex:sa.collisionBoxArray.length,nu=-1,Id=function(jh,zx){return jh&&jh.circleDiameter?Math.max(jh.circleDiameter,zx):zx};nu=Id(jc,nu),nu=Id(Pf,nu),nu=Id(Lf,nu);var Rx=(nu=Id(Of,nu))>-1?1:0;Rx&&(nu*=d4/no),sa.glyphOffsetArray.length>=Li.MAX_GLYPHS&&M("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),ks.sortKey!==void 0&&sa.addToSortKeyRanges(sa.symbolInstances.length,ks.sortKey),sa.symbolInstances.emplaceBack(zl.x,zl.y,Cu.right>=0?Cu.right:-1,Cu.center>=0?Cu.center:-1,Cu.left>=0?Cu.left:-1,Cu.vertical||-1,Z1,Y1,Sx,m4,y4,x4,b4,_4,w4,T4,k4,Fh,Ax,Mx,Tx,kx,Rx,0,W1,X1,$1,nu)}(ei,Dh,h4,ra,Ri,Ji,Eu,ei.layers[0],ei.collisionBoxArray,pi.index,pi.sourceLayerIndex,ei.index,yd,B1,_d,Mo,xd,bd,wd,Rl,pi,Zi,ss,vo,mi)};if(Ch==="line")for(var Ef=0,Td=Hy(pi.geometry,0,0,Yr,Yr);Ef1){var Ih=Y5(Bc,Sf,ra.vertical||ul,Ri,cl,Dc);Ih&&Fc(Bc,Ih)}}else if(pi.type==="Polygon")for(var Nc=0,Rh=w1(pi.geometry,0);Nc=kn.maxzoom||kn.visibility!=="none"&&(a(ln,this.zoom,Ge),(Ct[kn.id]=kn.createBucket({index:Qe.bucketLayerIDs.length,layers:ln,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Bt,sourceID:this.source})).populate(Wt,mt,this.tileID.canonical),Qe.bucketLayerIDs.push(ln.map(function(fn){return fn.id})))}}}var Wn=s.mapObject(mt.glyphDependencies,function(fn){return Object.keys(fn).map(Number)});Object.keys(Wn).length?nt.send("getGlyphs",{uid:this.uid,stacks:Wn},function(fn,hn){ut||(ut=fn,pt=hn,_n.call(Oe))}):pt={};var wn=Object.keys(mt.iconDependencies);wn.length?nt.send("getImages",{icons:wn,source:this.source,tileID:this.tileID,type:"icons"},function(fn,hn){ut||(ut=fn,bt=hn,_n.call(Oe))}):bt={};var on=Object.keys(mt.patternDependencies);function _n(){if(ut)return ht(ut);if(pt&&bt&&Lt){var fn=new l(pt),hn=new s.ImageAtlas(bt,Lt);for(var In in Ct){var Cn=Ct[In];Cn instanceof s.SymbolBucket?(a(Cn.layers,this.zoom,Ge),s.performSymbolLayout(Cn,pt,fn.positions,bt,hn.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Cn.hasPattern&&(Cn instanceof s.LineBucket||Cn instanceof s.FillBucket||Cn instanceof s.FillExtrusionBucket)&&(a(Cn.layers,this.zoom,Ge),Cn.addFeatures(mt,this.tileID.canonical,hn.patternPositions))}this.status="done",ht(null,{buckets:s.values(Ct).filter(function(Nn){return!Nn.isEmpty()}),featureIndex:Qe,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:fn.image,imageAtlas:hn,glyphMap:this.returnDependencies?pt:null,iconMap:this.returnDependencies?bt:null,glyphPositions:this.returnDependencies?fn.positions:null})}}on.length?nt.send("getImages",{icons:on,source:this.source,tileID:this.tileID,type:"patterns"},function(fn,hn){ut||(ut=fn,Lt=hn,_n.call(Oe))}):Lt={},_n.call(this)};var n=function(Je,Ke,Ge,nt){this.actor=Je,this.layerIndex=Ke,this.availableImages=Ge,this.loadVectorData=nt||r,this.loading={},this.loaded={}};n.prototype.loadTile=function(Je,Ke){var Ge=this,nt=Je.uid;this.loading||(this.loading={});var ht=!!(Je&&Je.request&&Je.request.collectResourceTiming)&&new s.RequestPerformance(Je.request),Oe=this.loading[nt]=new t(Je);Oe.abort=this.loadVectorData(Je,function(Be,Qe){if(delete Ge.loading[nt],Be||!Qe)return Oe.status="done",Ge.loaded[nt]=Oe,Ke(Be);var ut=Qe.rawData,pt={};Qe.expires&&(pt.expires=Qe.expires),Qe.cacheControl&&(pt.cacheControl=Qe.cacheControl);var bt={};if(ht){var Lt=ht.finish();Lt&&(bt.resourceTiming=JSON.parse(JSON.stringify(Lt)))}Oe.vectorTile=Qe.vectorTile,Oe.parse(Qe.vectorTile,Ge.layerIndex,Ge.availableImages,Ge.actor,function(Ct,mt){if(Ct||!mt)return Ke(Ct);Ke(null,s.extend({rawTileData:ut.slice(0)},mt,pt,bt))}),Ge.loaded=Ge.loaded||{},Ge.loaded[nt]=Oe})},n.prototype.reloadTile=function(Je,Ke){var Ge=this,nt=this.loaded,ht=Je.uid,Oe=this;if(nt&&nt[ht]){var Be=nt[ht];Be.showCollisionBoxes=Je.showCollisionBoxes;var Qe=function(ut,pt){var bt=Be.reloadCallback;bt&&(delete Be.reloadCallback,Be.parse(Be.vectorTile,Oe.layerIndex,Ge.availableImages,Oe.actor,bt)),Ke(ut,pt)};Be.status==="parsing"?Be.reloadCallback=Qe:Be.status==="done"&&(Be.vectorTile?Be.parse(Be.vectorTile,this.layerIndex,this.availableImages,this.actor,Qe):Qe())}},n.prototype.abortTile=function(Je,Ke){var Ge=this.loading,nt=Je.uid;Ge&&Ge[nt]&&Ge[nt].abort&&(Ge[nt].abort(),delete Ge[nt]),Ke()},n.prototype.removeTile=function(Je,Ke){var Ge=this.loaded,nt=Je.uid;Ge&&Ge[nt]&&delete Ge[nt],Ke()};var o=s.window.ImageBitmap,i=function(){this.loaded={}};i.prototype.loadTile=function(Je,Ke){var Ge=Je.uid,nt=Je.encoding,ht=Je.rawImageData,Oe=o&&ht instanceof o?this.getImageData(ht):ht,Be=new s.DEMData(Ge,Oe,nt);this.loaded=this.loaded||{},this.loaded[Ge]=Be,Ke(null,Be)},i.prototype.getImageData=function(Je){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(Je.width,Je.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=Je.width,this.offscreenCanvas.height=Je.height,this.offscreenCanvasContext.drawImage(Je,0,0,Je.width,Je.height);var Ke=this.offscreenCanvasContext.getImageData(-1,-1,Je.width+2,Je.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new s.RGBAImage({width:Ke.width,height:Ke.height},Ke.data)},i.prototype.removeTile=function(Je){var Ke=this.loaded,Ge=Je.uid;Ke&&Ke[Ge]&&delete Ke[Ge]};var u=function Je(Ke,Ge){var nt,ht=Ke&&Ke.type;if(ht==="FeatureCollection")for(nt=0;nt=0!=!!Ke&&Je.reverse()}var b=s.vectorTile.VectorTileFeature.prototype.toGeoJSON,d=function(Je){this._feature=Je,this.extent=s.EXTENT,this.type=Je.type,this.properties=Je.tags,"id"in Je&&!isNaN(Je.id)&&(this.id=parseInt(Je.id,10))};d.prototype.loadGeometry=function(){if(this._feature.type===1){for(var Je=[],Ke=0,Ge=this._feature.geometry;Ke>31}function G(Je,Ke){for(var Ge=Je.loadGeometry(),nt=Je.type,ht=0,Oe=0,Be=Ge.length,Qe=0;Qe>1;V(Je,Ke,Be,nt,ht,Oe%2),j(Je,Ke,Ge,nt,Be-1,Oe+1),j(Je,Ke,Ge,Be+1,ht,Oe+1)}}function V(Je,Ke,Ge,nt,ht,Oe){for(;ht>nt;){if(ht-nt>600){var Be=ht-nt+1,Qe=Ge-nt+1,ut=Math.log(Be),pt=.5*Math.exp(2*ut/3),bt=.5*Math.sqrt(ut*pt*(Be-pt)/Be)*(Qe-Be/2<0?-1:1);V(Je,Ke,Ge,Math.max(nt,Math.floor(Ge-Qe*pt/Be+bt)),Math.min(ht,Math.floor(Ge+(Be-Qe)*pt/Be+bt)),Oe)}var Lt=Ke[2*Ge+Oe],Ct=nt,mt=ht;for(H(Je,Ke,nt,Ge),Ke[2*ht+Oe]>Lt&&H(Je,Ke,nt,ht);CtLt;)mt--}Ke[2*nt+Oe]===Lt?H(Je,Ke,nt,mt):H(Je,Ke,++mt,ht),mt<=Ge&&(nt=mt+1),Ge<=mt&&(ht=mt-1)}}function H(Je,Ke,Ge,nt){ee(Je,Ge,nt),ee(Ke,2*Ge,2*nt),ee(Ke,2*Ge+1,2*nt+1)}function ee(Je,Ke,Ge){var nt=Je[Ke];Je[Ke]=Je[Ge],Je[Ge]=nt}function Q(Je,Ke,Ge,nt){var ht=Je-Ge,Oe=Ke-nt;return ht*ht+Oe*Oe}h.fromVectorTileJs=M,h.fromGeojsonVt=A,h.GeoJSONWrapper=C;var X=function(Je){return Je[0]},Y=function(Je){return Je[1]},K=function(Je,Ke,Ge,nt,ht){Ke===void 0&&(Ke=X),Ge===void 0&&(Ge=Y),nt===void 0&&(nt=64),ht===void 0&&(ht=Float64Array),this.nodeSize=nt,this.points=Je;for(var Oe=Je.length<65536?Uint16Array:Uint32Array,Be=this.ids=new Oe(Je.length),Qe=this.coords=new ht(2*Je.length),ut=0;ut=Be&&Lt<=ut&&Ct>=Qe&&Ct<=pt&&Ot.push(ht[Wt]);else{var Gt=Math.floor((Bt+Pt)/2);Lt=Oe[2*Gt],Ct=Oe[2*Gt+1],Lt>=Be&&Lt<=ut&&Ct>=Qe&&Ct<=pt&&Ot.push(ht[Gt]);var Xt=(_t+1)%2;(_t===0?Be<=Lt:Qe<=Ct)&&(mt.push(Bt),mt.push(Gt-1),mt.push(Xt)),(_t===0?ut>=Lt:pt>=Ct)&&(mt.push(Gt+1),mt.push(Pt),mt.push(Xt))}}return Ot}(this.ids,this.coords,Je,Ke,Ge,nt,this.nodeSize)},K.prototype.within=function(Je,Ke,Ge){return function(nt,ht,Oe,Be,Qe,ut){for(var pt=[0,nt.length-1,0],bt=[],Lt=Qe*Qe;pt.length;){var Ct=pt.pop(),mt=pt.pop(),Ot=pt.pop();if(mt-Ot<=ut)for(var _t=Ot;_t<=mt;_t++)Q(ht[2*_t],ht[2*_t+1],Oe,Be)<=Lt&&bt.push(nt[_t]);else{var Pt=Math.floor((Ot+mt)/2),Bt=ht[2*Pt],Wt=ht[2*Pt+1];Q(Bt,Wt,Oe,Be)<=Lt&&bt.push(nt[Pt]);var Gt=(Ct+1)%2;(Ct===0?Oe-Qe<=Bt:Be-Qe<=Wt)&&(pt.push(Ot),pt.push(Pt-1),pt.push(Gt)),(Ct===0?Oe+Qe>=Bt:Be+Qe>=Wt)&&(pt.push(Pt+1),pt.push(mt),pt.push(Gt))}}return bt}(this.ids,this.coords,Je,Ke,Ge,this.nodeSize)};var te={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(Je){return Je}},re=function(Je){this.options=he(Object.create(te),Je),this.trees=new Array(this.options.maxZoom+1)};function oe(Je,Ke,Ge,nt,ht){return{x:Je,y:Ke,zoom:1/0,id:Ge,parentId:-1,numPoints:nt,properties:ht}}function se(Je,Ke){var Ge=Je.geometry.coordinates,nt=Ge[0],ht=Ge[1];return{x:pe(nt),y:de(ht),zoom:1/0,index:Ke,parentId:-1}}function ce(Je){return{type:"Feature",id:Je.id,properties:xe(Je),geometry:{type:"Point",coordinates:[(nt=Je.x,360*(nt-.5)),(Ke=Je.y,Ge=(180-360*Ke)*Math.PI/180,360*Math.atan(Math.exp(Ge))/Math.PI-90)]}};var Ke,Ge,nt}function xe(Je){var Ke=Je.numPoints,Ge=Ke>=1e4?Math.round(Ke/1e3)+"k":Ke>=1e3?Math.round(Ke/100)/10+"k":Ke;return he(he({},Je.properties),{cluster:!0,cluster_id:Je.id,point_count:Ke,point_count_abbreviated:Ge})}function pe(Je){return Je/360+.5}function de(Je){var Ke=Math.sin(Je*Math.PI/180),Ge=.5-.25*Math.log((1+Ke)/(1-Ke))/Math.PI;return Ge<0?0:Ge>1?1:Ge}function he(Je,Ke){for(var Ge in Ke)Je[Ge]=Ke[Ge];return Je}function ye(Je){return Je.x}function ze(Je){return Je.y}function Te(Je,Ke,Ge,nt){for(var ht,Oe=nt,Be=Ge-Ke>>1,Qe=Ge-Ke,ut=Je[Ke],pt=Je[Ke+1],bt=Je[Ge],Lt=Je[Ge+1],Ct=Ke+3;CtOe)ht=Ct,Oe=mt;else if(mt===Oe){var Ot=Math.abs(Ct-Be);Otnt&&(ht-Ke>3&&Te(Je,Ke,ht,nt),Je[ht+2]=Oe,Ge-ht>3&&Te(Je,ht,Ge,nt))}function Ae(Je,Ke,Ge,nt,ht,Oe){var Be=ht-Ge,Qe=Oe-nt;if(Be!==0||Qe!==0){var ut=((Je-Ge)*Be+(Ke-nt)*Qe)/(Be*Be+Qe*Qe);ut>1?(Ge=ht,nt=Oe):ut>0&&(Ge+=Be*ut,nt+=Qe*ut)}return(Be=Je-Ge)*Be+(Qe=Ke-nt)*Qe}function Me(Je,Ke,Ge,nt){var ht={id:Je===void 0?null:Je,type:Ke,geometry:Ge,tags:nt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(Oe){var Be=Oe.geometry,Qe=Oe.type;if(Qe==="Point"||Qe==="MultiPoint"||Qe==="LineString")Ce(Oe,Be);else if(Qe==="Polygon"||Qe==="MultiLineString")for(var ut=0;ut0&&(Be+=nt?(ht*pt-ut*Oe)/2:Math.sqrt(Math.pow(ut-ht,2)+Math.pow(pt-Oe,2))),ht=ut,Oe=pt}var bt=Ke.length-3;Ke[2]=1,Te(Ke,0,bt,Ge),Ke[bt+2]=1,Ke.size=Math.abs(Be),Ke.start=0,Ke.end=Ke.size}function we(Je,Ke,Ge,nt){for(var ht=0;ht1?1:Ge}function De(Je,Ke,Ge,nt,ht,Oe,Be,Qe){if(nt/=Ke,Oe>=(Ge/=Ke)&&Be=nt)return null;for(var ut=[],pt=0;pt=Ge&&Ot=nt)){var _t=[];if(Ct==="Point"||Ct==="MultiPoint")je(Lt,_t,Ge,nt,ht);else if(Ct==="LineString")ge(Lt,_t,Ge,nt,ht,!1,Qe.lineMetrics);else if(Ct==="MultiLineString")Se(Lt,_t,Ge,nt,ht,!1);else if(Ct==="Polygon")Se(Lt,_t,Ge,nt,ht,!0);else if(Ct==="MultiPolygon")for(var Pt=0;Pt=Ge&&Be<=nt&&(Ke.push(Je[Oe]),Ke.push(Je[Oe+1]),Ke.push(Je[Oe+2]))}}function ge(Je,Ke,Ge,nt,ht,Oe,Be){for(var Qe,ut,pt=be(Je),bt=ht===0?Ye:Ze,Lt=Je.start,Ct=0;CtGe&&(ut=bt(pt,mt,Ot,Pt,Bt,Ge),Be&&(pt.start=Lt+Qe*ut)):Wt>nt?Gt=Ge&&(ut=bt(pt,mt,Ot,Pt,Bt,Ge),Xt=!0),Gt>nt&&Wt<=nt&&(ut=bt(pt,mt,Ot,Pt,Bt,nt),Xt=!0),!Oe&&Xt&&(Be&&(pt.end=Lt+Qe*ut),Ke.push(pt),pt=be(Je)),Be&&(Lt+=Qe)}var Kt=Je.length-3;mt=Je[Kt],Ot=Je[Kt+1],_t=Je[Kt+2],(Wt=ht===0?mt:Ot)>=Ge&&Wt<=nt&&Ne(pt,mt,Ot,_t),Kt=pt.length-3,Oe&&Kt>=3&&(pt[Kt]!==pt[0]||pt[Kt+1]!==pt[1])&&Ne(pt,pt[0],pt[1],pt[2]),pt.length&&Ke.push(pt)}function be(Je){var Ke=[];return Ke.size=Je.size,Ke.start=Je.start,Ke.end=Je.end,Ke}function Se(Je,Ke,Ge,nt,ht,Oe){for(var Be=0;BeBe.maxX&&(Be.maxX=bt),Lt>Be.maxY&&(Be.maxY=Lt)}return Be}function Tt(Je,Ke,Ge,nt){var ht=Ke.geometry,Oe=Ke.type,Be=[];if(Oe==="Point"||Oe==="MultiPoint")for(var Qe=0;Qe0&&Ke.size<(ht?Be:nt))Ge.numPoints+=Ke.length/3;else{for(var Qe=[],ut=0;utBe)&&(Ge.numSimplified++,Qe.push(Ke[ut]),Qe.push(Ke[ut+1])),Ge.numPoints++;ht&&function(pt,bt){for(var Lt=0,Ct=0,mt=pt.length,Ot=mt-2;Ct0===bt)for(Ct=0,mt=pt.length;Ct24)throw new Error("maxZoom should be in the 0-24 range");if(Ke.promoteId&&Ke.generateId)throw new Error("promoteId and generateId cannot be used together.");var nt=function(ht,Oe){var Be=[];if(ht.type==="FeatureCollection")for(var Qe=0;Qe=nt;pt--){var bt=+Date.now();Qe=this._cluster(Qe,pt),this.trees[pt]=new K(Qe,ye,ze,Oe,Float32Array),Ge&&console.log("z%d: %d clusters in %dms",pt,Qe.length,+Date.now()-bt)}return Ge&&console.timeEnd("total time"),this},re.prototype.getClusters=function(Je,Ke){var Ge=((Je[0]+180)%360+360)%360-180,nt=Math.max(-90,Math.min(90,Je[1])),ht=Je[2]===180?180:((Je[2]+180)%360+360)%360-180,Oe=Math.max(-90,Math.min(90,Je[3]));if(Je[2]-Je[0]>=360)Ge=-180,ht=180;else if(Ge>ht){var Be=this.getClusters([Ge,nt,180,Oe],Ke),Qe=this.getClusters([-180,nt,ht,Oe],Ke);return Be.concat(Qe)}for(var ut=this.trees[this._limitZoom(Ke)],pt=[],bt=0,Lt=ut.range(pe(Ge),de(Oe),pe(ht),de(nt));bt1?this._map(pt,!0):null,Pt=(ut<<5)+(Ke+1)+this.points.length,Bt=0,Wt=Lt;Bt>5},re.prototype._getOriginZoom=function(Je){return(Je-this.points.length)%32},re.prototype._map=function(Je,Ke){if(Je.numPoints)return Ke?he({},Je.properties):Je.properties;var Ge=this.points[Je.index].properties,nt=this.options.map(Ge);return Ke&&nt===Ge?he({},nt):nt},Dt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Dt.prototype.splitTile=function(Je,Ke,Ge,nt,ht,Oe,Be){for(var Qe=[Je,Ke,Ge,nt],ut=this.options,pt=ut.debug;Qe.length;){nt=Qe.pop(),Ge=Qe.pop(),Ke=Qe.pop(),Je=Qe.pop();var bt=1<1&&console.time("creation"),Ct=this.tiles[Lt]=Et(Je,Ke,Ge,nt,ut),this.tileCoords.push({z:Ke,x:Ge,y:nt}),pt)){pt>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Ke,Ge,nt,Ct.numFeatures,Ct.numPoints,Ct.numSimplified),console.timeEnd("creation"));var mt="z"+Ke;this.stats[mt]=(this.stats[mt]||0)+1,this.total++}if(Ct.source=Je,ht){if(Ke===ut.maxZoom||Ke===ht)continue;var Ot=1<1&&console.time("clipping");var _t,Pt,Bt,Wt,Gt,Xt,Kt=.5*ut.buffer/ut.extent,nn=.5-Kt,yn=.5+Kt,ln=1+Kt;_t=Pt=Bt=Wt=null,Gt=De(Je,bt,Ge-Kt,Ge+yn,0,Ct.minX,Ct.maxX,ut),Xt=De(Je,bt,Ge+nn,Ge+ln,0,Ct.minX,Ct.maxX,ut),Je=null,Gt&&(_t=De(Gt,bt,nt-Kt,nt+yn,1,Ct.minY,Ct.maxY,ut),Pt=De(Gt,bt,nt+nn,nt+ln,1,Ct.minY,Ct.maxY,ut),Gt=null),Xt&&(Bt=De(Xt,bt,nt-Kt,nt+yn,1,Ct.minY,Ct.maxY,ut),Wt=De(Xt,bt,nt+nn,nt+ln,1,Ct.minY,Ct.maxY,ut),Xt=null),pt>1&&console.timeEnd("clipping"),Qe.push(_t||[],Ke+1,2*Ge,2*nt),Qe.push(Pt||[],Ke+1,2*Ge,2*nt+1),Qe.push(Bt||[],Ke+1,2*Ge+1,2*nt),Qe.push(Wt||[],Ke+1,2*Ge+1,2*nt+1)}}},Dt.prototype.getTile=function(Je,Ke,Ge){var nt=this.options,ht=nt.extent,Oe=nt.debug;if(Je<0||Je>24)return null;var Be=1<1&&console.log("drilling down to z%d-%d-%d",Je,Ke,Ge);for(var ut,pt=Je,bt=Ke,Lt=Ge;!ut&&pt>0;)pt--,bt=Math.floor(bt/2),Lt=Math.floor(Lt/2),ut=this.tiles[It(pt,bt,Lt)];return ut&&ut.source?(Oe>1&&console.log("found parent tile z%d-%d-%d",pt,bt,Lt),Oe>1&&console.time("drilling down"),this.splitTile(ut.source,pt,bt,Lt,Je,Ke,Ge),Oe>1&&console.timeEnd("drilling down"),this.tiles[Qe]?ft(this.tiles[Qe],ht):null):null};var qt=function(Je){function Ke(Ge,nt,ht,Oe){Je.call(this,Ge,nt,ht,Ft),Oe&&(this.loadGeoJSON=Oe)}return Je&&(Ke.__proto__=Je),Ke.prototype=Object.create(Je&&Je.prototype),Ke.prototype.constructor=Ke,Ke.prototype.loadData=function(Ge,nt){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=nt,this._pendingLoadDataParams=Ge,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},Ke.prototype._loadData=function(){var Ge=this;if(this._pendingCallback&&this._pendingLoadDataParams){var nt=this._pendingCallback,ht=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var Oe=!!(ht&&ht.request&&ht.request.collectResourceTiming)&&new s.RequestPerformance(ht.request);this.loadGeoJSON(ht,function(Be,Qe){if(Be||!Qe)return nt(Be);if(typeof Qe!="object")return nt(new Error("Input data given to '"+ht.source+"' is not a valid GeoJSON object."));u(Qe,!0);try{Ge._geoJSONIndex=ht.cluster?new re(function(bt){var Lt=bt.superclusterOptions,Ct=bt.clusterProperties;if(!Ct||!Lt)return Lt;for(var mt={},Ot={},_t={accumulated:null,zoom:0},Pt={properties:null},Bt=Object.keys(Ct),Wt=0,Gt=Bt;Wt=0?0:q.button},m.remove=function(q){q.parentNode&&q.parentNode.removeChild(q)};var p=function(q){function $(){q.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new s.RGBAImage({width:1,height:1}),this.dirty=!0}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.isLoaded=function(){return this.loaded},$.prototype.setLoaded=function(W){if(this.loaded!==W&&(this.loaded=W,W)){for(var ae=0,_e=this.requestors;ae<_e.length;ae+=1){var Re=_e[ae],He=Re.ids,Xe=Re.callback;this._notify(He,Xe)}this.requestors=[]}},$.prototype.getImage=function(W){return this.images[W]},$.prototype.addImage=function(W,ae){this._validate(W,ae)&&(this.images[W]=ae)},$.prototype._validate=function(W,ae){var _e=!0;return this._validateStretch(ae.stretchX,ae.data&&ae.data.width)||(this.fire(new s.ErrorEvent(new Error('Image "'+W+'" has invalid "stretchX" value'))),_e=!1),this._validateStretch(ae.stretchY,ae.data&&ae.data.height)||(this.fire(new s.ErrorEvent(new Error('Image "'+W+'" has invalid "stretchY" value'))),_e=!1),this._validateContent(ae.content,ae)||(this.fire(new s.ErrorEvent(new Error('Image "'+W+'" has invalid "content" value'))),_e=!1),_e},$.prototype._validateStretch=function(W,ae){if(!W)return!0;for(var _e=0,Re=0,He=W;Re=0?1.2:1))}function x(q,$,W,ae,_e,Re,He){for(var Xe=0;Xe<$;Xe++){for(var at=0;at65535)wt(new Error("glyphs > 65535 not supported"));else if(ve.ranges[Fe])wt(null,{stack:At,id:ie,glyph:Le});else{var Ve=ve.requests[Fe];Ve||(Ve=ve.requests[Fe]=[],y.loadGlyphRange(At,Fe,W.url,W.requestManager,function(We,$e){if($e){for(var tt in $e)W._doesCharSupportLocalGlyph(+tt)||(ve.glyphs[+tt]=$e[+tt]);ve.ranges[Fe]=!0}for(var lt=0,gt=Ve;lt1&&(at=q[++Xe]);var At=Math.abs(wt-at.left),ie=Math.abs(wt-at.right),ve=Math.min(At,ie),Le=void 0,Fe=_e/W*(ae+1);if(at.isDash){var Ve=ae-Math.abs(Fe);Le=Math.sqrt(ve*ve+Ve*Ve)}else Le=ae-Math.sqrt(ve*ve+Fe*Fe);this.data[He+wt]=Math.max(0,Math.min(255,Le+128))}},C.prototype.addRegularDash=function(q){for(var $=q.length-1;$>=0;--$){var W=q[$],ae=q[$+1];W.zeroLength?q.splice($,1):ae&&ae.isDash===W.isDash&&(ae.left=W.left,q.splice($,1))}var _e=q[0],Re=q[q.length-1];_e.isDash===Re.isDash&&(_e.left=Re.left-this.width,Re.right=_e.right+this.width);for(var He=this.width*this.nextRow,Xe=0,at=q[Xe],wt=0;wt1&&(at=q[++Xe]);var At=Math.abs(wt-at.left),ie=Math.abs(wt-at.right),ve=Math.min(At,ie),Le=at.isDash?ve:-ve;this.data[He+wt]=Math.max(0,Math.min(255,Le+128))}},C.prototype.addDash=function(q,$){var W=$?7:0,ae=2*W+1;if(this.nextRow+ae>this.height)return s.warnOnce("LineAtlas out of space"),null;for(var _e=0,Re=0;Re=W&&q.x<_e&&q.y>=ae&&q.y0&&(wt[new s.OverscaledTileID(W.overscaledZ,He,ae.z,Re,ae.y-1).key]={backfilled:!1},wt[new s.OverscaledTileID(W.overscaledZ,W.wrap,ae.z,ae.x,ae.y-1).key]={backfilled:!1},wt[new s.OverscaledTileID(W.overscaledZ,at,ae.z,Xe,ae.y-1).key]={backfilled:!1}),ae.y+1<_e&&(wt[new s.OverscaledTileID(W.overscaledZ,He,ae.z,Re,ae.y+1).key]={backfilled:!1},wt[new s.OverscaledTileID(W.overscaledZ,W.wrap,ae.z,ae.x,ae.y+1).key]={backfilled:!1},wt[new s.OverscaledTileID(W.overscaledZ,at,ae.z,Xe,ae.y+1).key]={backfilled:!1}),wt},$.prototype.unloadTile=function(W){W.demTexture&&this.map.painter.saveTileTexture(W.demTexture),W.fbo&&(W.fbo.destroy(),delete W.fbo),W.dem&&delete W.dem,delete W.neighboringTiles,W.state="unloaded",W.actor&&W.actor.send("removeDEMTile",{uid:W.uid,source:this.id})},$}(U),G=function(q){function $(W,ae,_e,Re){q.call(this),this.id=W,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=_e.getActor(),this.setEventedParent(Re),this._data=ae.data,this._options=s.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 He=s.EXTENT/this.tileSize;this.workerOptions=s.extend({source:this.id,cluster:ae.cluster||!1,geojsonVtOptions:{buffer:(ae.buffer!==void 0?ae.buffer:128)*He,tolerance:(ae.tolerance!==void 0?ae.tolerance:.375)*He,extent:s.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:s.EXTENT,radius:(ae.clusterRadius||50)*He,log:!1,generateId:ae.generateId||!1},clusterProperties:ae.clusterProperties},ae.workerOptions)}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.load=function(){var W=this;this.fire(new s.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(ae){if(ae)W.fire(new s.ErrorEvent(ae));else{var _e={dataType:"source",sourceDataType:"metadata"};W._collectResourceTiming&&W._resourceTiming&&W._resourceTiming.length>0&&(_e.resourceTiming=W._resourceTiming,W._resourceTiming=[]),W.fire(new s.Event("data",_e))}})},$.prototype.onAdd=function(W){this.map=W,this.load()},$.prototype.setData=function(W){var ae=this;return this._data=W,this.fire(new s.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(_e){if(_e)ae.fire(new s.ErrorEvent(_e));else{var Re={dataType:"source",sourceDataType:"content"};ae._collectResourceTiming&&ae._resourceTiming&&ae._resourceTiming.length>0&&(Re.resourceTiming=ae._resourceTiming,ae._resourceTiming=[]),ae.fire(new s.Event("data",Re))}}),this},$.prototype.getClusterExpansionZoom=function(W,ae){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:W,source:this.id},ae),this},$.prototype.getClusterChildren=function(W,ae){return this.actor.send("geojson.getClusterChildren",{clusterId:W,source:this.id},ae),this},$.prototype.getClusterLeaves=function(W,ae,_e,Re){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:W,limit:ae,offset:_e},Re),this},$.prototype._updateWorkerData=function(W){var ae=this;this._loaded=!1;var _e=s.extend({},this.workerOptions),Re=this._data;typeof Re=="string"?(_e.request=this.map._requestManager.transformRequest(s.browser.resolveURL(Re),s.ResourceType.Source),_e.request.collectResourceTiming=this._collectResourceTiming):_e.data=JSON.stringify(Re),this.actor.send(this.type+".loadData",_e,function(He,Xe){ae._removed||Xe&&Xe.abandoned||(ae._loaded=!0,Xe&&Xe.resourceTiming&&Xe.resourceTiming[ae.id]&&(ae._resourceTiming=Xe.resourceTiming[ae.id].slice(0)),ae.actor.send(ae.type+".coalesce",{source:_e.source},null),W(He))})},$.prototype.loaded=function(){return this._loaded},$.prototype.loadTile=function(W,ae){var _e=this,Re=W.actor?"reloadTile":"loadTile";W.actor=this.actor;var He={type:this.type,uid:W.uid,tileID:W.tileID,zoom:W.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:s.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};W.request=this.actor.send(Re,He,function(Xe,at){return delete W.request,W.unloadVectorData(),W.aborted?ae(null):Xe?ae(Xe):(W.loadVectorData(at,_e.map.painter,Re==="reloadTile"),ae(null))})},$.prototype.abortTile=function(W){W.request&&(W.request.cancel(),delete W.request),W.aborted=!0},$.prototype.unloadTile=function(W){W.unloadVectorData(),this.actor.send("removeTile",{uid:W.uid,type:this.type,source:this.id})},$.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},$.prototype.serialize=function(){return s.extend({},this._options,{type:this.type,data:this._data})},$.prototype.hasTransition=function(){return!1},$}(s.Evented),N=s.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),j=function(q){function $(W,ae,_e,Re){q.call(this),this.id=W,this.dispatcher=_e,this.coordinates=ae.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Re),this.options=ae}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.load=function(W,ae){var _e=this;this._loaded=!1,this.fire(new s.Event("dataloading",{dataType:"source"})),this.url=this.options.url,s.getImage(this.map._requestManager.transformRequest(this.url,s.ResourceType.Image),function(Re,He){_e._loaded=!0,Re?_e.fire(new s.ErrorEvent(Re)):He&&(_e.image=He,W&&(_e.coordinates=W),ae&&ae(),_e._finishLoading())})},$.prototype.loaded=function(){return this._loaded},$.prototype.updateImage=function(W){var ae=this;return this.image&&W.url?(this.options.url=W.url,this.load(W.coordinates,function(){ae.texture=null}),this):this},$.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new s.Event("data",{dataType:"source",sourceDataType:"metadata"})))},$.prototype.onAdd=function(W){this.map=W,this.load()},$.prototype.setCoordinates=function(W){var ae=this;this.coordinates=W;var _e=W.map(s.MercatorCoordinate.fromLngLat);this.tileID=function(He){for(var Xe=1/0,at=1/0,wt=-1/0,At=-1/0,ie=0,ve=He;ieae.end(0)?this.fire(new s.ErrorEvent(new s.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+ae.start(0)+" and "+ae.end(0)+"-second mark."))):this.video.currentTime=W}},$.prototype.getVideo=function(){return this.video},$.prototype.onAdd=function(W){this.map||(this.map=W,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},$.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var W=this.map.painter.context,ae=W.gl;for(var _e in this.boundsBuffer||(this.boundsBuffer=W.createVertexBuffer(this._boundsArray,N.members)),this.boundsSegments||(this.boundsSegments=s.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(ae.LINEAR,ae.CLAMP_TO_EDGE),ae.texSubImage2D(ae.TEXTURE_2D,0,0,0,ae.RGBA,ae.UNSIGNED_BYTE,this.video)):(this.texture=new s.Texture(W,this.video,ae.RGBA),this.texture.bind(ae.LINEAR,ae.CLAMP_TO_EDGE)),this.tiles){var Re=this.tiles[_e];Re.state!=="loaded"&&(Re.state="loaded",Re.texture=this.texture)}}},$.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},$.prototype.hasTransition=function(){return this.video&&!this.video.paused},$}(j),H=function(q){function $(W,ae,_e,Re){q.call(this,W,ae,_e,Re),ae.coordinates?Array.isArray(ae.coordinates)&&ae.coordinates.length===4&&!ae.coordinates.some(function(He){return!Array.isArray(He)||He.length!==2||He.some(function(Xe){return typeof Xe!="number"})})||this.fire(new s.ErrorEvent(new s.ValidationError("sources."+W,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new s.ErrorEvent(new s.ValidationError("sources."+W,null,'missing required property "coordinates"'))),ae.animate&&typeof ae.animate!="boolean"&&this.fire(new s.ErrorEvent(new s.ValidationError("sources."+W,null,'optional "animate" property must be a boolean value'))),ae.canvas?typeof ae.canvas=="string"||ae.canvas instanceof s.window.HTMLCanvasElement||this.fire(new s.ErrorEvent(new s.ValidationError("sources."+W,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 s.ErrorEvent(new s.ValidationError("sources."+W,null,'missing required property "canvas"'))),this.options=ae,this.animate=ae.animate===void 0||ae.animate}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof s.window.HTMLCanvasElement?this.options.canvas:s.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new s.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},$.prototype.getCanvas=function(){return this.canvas},$.prototype.onAdd=function(W){this.map=W,this.load(),this.canvas&&this.animate&&this.play()},$.prototype.onRemove=function(){this.pause()},$.prototype.prepare=function(){var W=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,W=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,W=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var ae=this.map.painter.context,_e=ae.gl;for(var Re in this.boundsBuffer||(this.boundsBuffer=ae.createVertexBuffer(this._boundsArray,N.members)),this.boundsSegments||(this.boundsSegments=s.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(W||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new s.Texture(ae,this.canvas,_e.RGBA,{premultiply:!0}),this.tiles){var He=this.tiles[Re];He.state!=="loaded"&&(He.state="loaded",He.texture=this.texture)}}},$.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},$.prototype.hasTransition=function(){return this._playing},$.prototype._hasInvalidDimensions=function(){for(var W=0,ae=[this.canvas.width,this.canvas.height];Wthis.max){var He=this._getAndRemoveByKey(this.order[0]);He&&this.onRemove(He)}return this},K.prototype.has=function(q){return q.wrapped().key in this.data},K.prototype.getAndRemove=function(q){return this.has(q)?this._getAndRemoveByKey(q.wrapped().key):null},K.prototype._getAndRemoveByKey=function(q){var $=this.data[q].shift();return $.timeout&&clearTimeout($.timeout),this.data[q].length===0&&delete this.data[q],this.order.splice(this.order.indexOf(q),1),$.value},K.prototype.getByKey=function(q){var $=this.data[q];return $?$[0].value:null},K.prototype.get=function(q){return this.has(q)?this.data[q.wrapped().key][0].value:null},K.prototype.remove=function(q,$){if(!this.has(q))return this;var W=q.wrapped().key,ae=$===void 0?0:this.data[W].indexOf($),_e=this.data[W][ae];return this.data[W].splice(ae,1),_e.timeout&&clearTimeout(_e.timeout),this.data[W].length===0&&delete this.data[W],this.onRemove(_e.value),this.order.splice(this.order.indexOf(W),1),this},K.prototype.setMaxSize=function(q){for(this.max=q;this.order.length>this.max;){var $=this._getAndRemoveByKey(this.order[0]);$&&this.onRemove($)}return this},K.prototype.filter=function(q){var $=[];for(var W in this.data)for(var ae=0,_e=this.data[W];ae<_e.length;ae+=1){var Re=_e[ae];q(Re.value)||$.push(Re)}for(var He=0,Xe=$;He1||(Math.abs(At)>1&&(Math.abs(At+ve)===1?At+=ve:Math.abs(At-ve)===1&&(At-=ve)),wt.dem&&at.dem&&(at.dem.backfillBorder(wt.dem,At,ie),at.neighboringTiles&&at.neighboringTiles[Le]&&(at.neighboringTiles[Le].backfilled=!0)))}},$.prototype.getTile=function(W){return this.getTileByID(W.key)},$.prototype.getTileByID=function(W){return this._tiles[W]},$.prototype._retainLoadedChildren=function(W,ae,_e,Re){for(var He in this._tiles){var Xe=this._tiles[He];if(!(Re[He]||!Xe.hasData()||Xe.tileID.overscaledZ<=ae||Xe.tileID.overscaledZ>_e)){for(var at=Xe.tileID;Xe&&Xe.tileID.overscaledZ>ae+1;){var wt=Xe.tileID.scaledTo(Xe.tileID.overscaledZ-1);(Xe=this._tiles[wt.key])&&Xe.hasData()&&(at=wt)}for(var At=at;At.overscaledZ>ae;)if(W[(At=At.scaledTo(At.overscaledZ-1)).key]){Re[at.key]=at;break}}}},$.prototype.findLoadedParent=function(W,ae){if(W.key in this._loadedParentTiles){var _e=this._loadedParentTiles[W.key];return _e&&_e.tileID.overscaledZ>=ae?_e:null}for(var Re=W.overscaledZ-1;Re>=ae;Re--){var He=W.scaledTo(Re),Xe=this._getLoadedTile(He);if(Xe)return Xe}},$.prototype._getLoadedTile=function(W){var ae=this._tiles[W.key];return ae&&ae.hasData()?ae:this._cache.getByKey(W.wrapped().key)},$.prototype.updateCacheSize=function(W){var ae=(Math.ceil(W.width/this._source.tileSize)+1)*(Math.ceil(W.height/this._source.tileSize)+1),_e=Math.floor(5*ae),Re=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,_e):_e;this._cache.setMaxSize(Re)},$.prototype.handleWrapJump=function(W){var ae=(W-(this._prevLng===void 0?W:this._prevLng))/360,_e=Math.round(ae);if(this._prevLng=W,_e){var Re={};for(var He in this._tiles){var Xe=this._tiles[He];Xe.tileID=Xe.tileID.unwrapTo(Xe.tileID.wrap+_e),Re[Xe.tileID.key]=Xe}for(var at in this._tiles=Re,this._timers)clearTimeout(this._timers[at]),delete this._timers[at];for(var wt in this._tiles){var At=this._tiles[wt];this._setTileReloadTimer(wt,At)}}},$.prototype.update=function(W){var ae=this;if(this.transform=W,this._sourceLoaded&&!this._paused){var _e;this.updateCacheSize(W),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?_e=W.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(Vt){return new s.OverscaledTileID(Vt.canonical.z,Vt.wrap,Vt.canonical.z,Vt.canonical.x,Vt.canonical.y)}):(_e=W.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(_e=_e.filter(function(Vt){return ae._source.hasTile(Vt)}))):_e=[];var Re=W.coveringZoomLevel(this._source),He=Math.max(Re-$.maxOverzooming,this._source.minzoom),Xe=Math.max(Re+$.maxUnderzooming,this._source.minzoom),at=this._updateRetainedTiles(_e,Re);if(Be(this._source.type)){for(var wt={},At={},ie=0,ve=Object.keys(at);iethis._source.maxzoom){var $e=Ve.children(this._source.maxzoom)[0],tt=this.getTile($e);if(tt&&tt.hasData()){_e[$e.key]=$e;continue}}else{var lt=Ve.children(this._source.maxzoom);if(_e[lt[0].key]&&_e[lt[1].key]&&_e[lt[2].key]&&_e[lt[3].key])continue}for(var gt=We.wasRequested(),zt=Ve.overscaledZ-1;zt>=He;--zt){var Ut=Ve.scaledTo(zt);if(Re[Ut.key]||(Re[Ut.key]=!0,!(We=this.getTile(Ut))&>&&(We=this._addTile(Ut)),We&&(_e[Ut.key]=Ut,gt=We.wasRequested(),We.hasData())))break}}}return _e},$.prototype._updateLoadedParentTileCache=function(){for(var W in this._loadedParentTiles={},this._tiles){for(var ae=[],_e=void 0,Re=this._tiles[W].tileID;Re.overscaledZ>0;){if(Re.key in this._loadedParentTiles){_e=this._loadedParentTiles[Re.key];break}ae.push(Re.key);var He=Re.scaledTo(Re.overscaledZ-1);if(_e=this._getLoadedTile(He))break;Re=He}for(var Xe=0,at=ae;Xe0||(ae.hasData()&&ae.state!=="reloading"?this._cache.add(ae.tileID,ae,ae.getExpiryTimeout()):(ae.aborted=!0,this._abortTile(ae),this._unloadTile(ae))))},$.prototype.clearTiles=function(){for(var W in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(W);this._cache.reset()},$.prototype.tilesIn=function(W,ae,_e){var Re=this,He=[],Xe=this.transform;if(!Xe)return He;for(var at=_e?Xe.getCameraQueryGeometry(W):W,wt=W.map(function(zt){return Xe.pointCoordinate(zt)}),At=at.map(function(zt){return Xe.pointCoordinate(zt)}),ie=this.getIds(),ve=1/0,Le=1/0,Fe=-1/0,Ve=-1/0,We=0,$e=At;We<$e.length;We+=1){var tt=$e[We];ve=Math.min(ve,tt.x),Le=Math.min(Le,tt.y),Fe=Math.max(Fe,tt.x),Ve=Math.max(Ve,tt.y)}for(var lt=function(zt){var Ut=Re._tiles[ie[zt]];if(!Ut.holdingForFade()){var Vt=Ut.tileID,Qt=Math.pow(2,Xe.zoom-Ut.tileID.overscaledZ),gn=ae*Ut.queryPadding*s.EXTENT/Ut.tileSize/Qt,en=[Vt.getTilePoint(new s.MercatorCoordinate(ve,Le)),Vt.getTilePoint(new s.MercatorCoordinate(Fe,Ve))];if(en[0].x-gn=0&&en[1].y+gn>=0){var sn=wt.map(function(Mn){return Vt.getTilePoint(Mn)}),rn=At.map(function(Mn){return Vt.getTilePoint(Mn)});He.push({tile:Ut,tileID:Vt,queryGeometry:sn,cameraQueryGeometry:rn,scale:Qt})}}},gt=0;gt=s.browser.now())return!0}return!1},$.prototype.setFeatureState=function(W,ae,_e){W=W||"_geojsonTileLayer",this._state.updateState(W,ae,_e)},$.prototype.removeFeatureState=function(W,ae,_e){W=W||"_geojsonTileLayer",this._state.removeFeatureState(W,ae,_e)},$.prototype.getFeatureState=function(W,ae){return W=W||"_geojsonTileLayer",this._state.getState(W,ae)},$.prototype.setDependencies=function(W,ae,_e){var Re=this._tiles[W];Re&&Re.setDependencies(ae,_e)},$.prototype.reloadTilesForDependencies=function(W,ae){for(var _e in this._tiles)this._tiles[_e].hasDependency(W,ae)&&this._reloadTile(_e,"reloading");this._cache.filter(function(Re){return!Re.hasDependency(W,ae)})},$}(s.Evented);function Oe(q,$){var W=Math.abs(2*q.wrap)-+(q.wrap<0),ae=Math.abs(2*$.wrap)-+($.wrap<0);return q.overscaledZ-$.overscaledZ||ae-W||$.canonical.y-q.canonical.y||$.canonical.x-q.canonical.x}function Be(q){return q==="raster"||q==="image"||q==="video"}function Qe(){return new s.window.Worker(kt.workerUrl)}ht.maxOverzooming=10,ht.maxUnderzooming=3;var ut="mapboxgl_preloaded_worker_pool",pt=function(){this.active={}};pt.prototype.acquire=function(q){if(!this.workers)for(this.workers=[];this.workers.length0?(ae-Re)/He:0;return this.points[_e].mult(1-Xe).add(this.points[$].mult(Xe))};var kn=function(q,$,W){var ae=this.boxCells=[],_e=this.circleCells=[];this.xCellCount=Math.ceil(q/W),this.yCellCount=Math.ceil($/W);for(var Re=0;Re=-$[0]&&W<=$[0]&&ae>=-$[1]&&ae<=$[1]}function hn(q,$,W,ae,_e,Re,He,Xe){var at=ae?q.textSizeData:q.iconSizeData,wt=s.evaluateSizeForZoom(at,W.transform.zoom),At=[256/W.width*2+1,256/W.height*2+1],ie=ae?q.text.dynamicLayoutVertexArray:q.icon.dynamicLayoutVertexArray;ie.clear();for(var ve=q.lineVertexArray,Le=ae?q.text.placedSymbolArray:q.icon.placedSymbolArray,Fe=W.transform.width/W.transform.height,Ve=!1,We=0;WeMath.abs(W.x-$.x)*ae?{useVertical:!0}:(q===s.WritingMode.vertical?$.yW.x)?{needsFlipping:!0}:null}function Nn(q,$,W,ae,_e,Re,He,Xe,at,wt,At,ie,ve,Le){var Fe,Ve=$/24,We=q.lineOffsetX*Ve,$e=q.lineOffsetY*Ve;if(q.numGlyphs>1){var tt=q.glyphStartIndex+q.numGlyphs,lt=q.lineStartIndex,gt=q.lineStartIndex+q.lineLength,zt=In(Ve,Xe,We,$e,W,At,ie,q,at,Re,ve);if(!zt)return{notEnoughRoom:!0};var Ut=on(zt.first.point,He).point,Vt=on(zt.last.point,He).point;if(ae&&!W){var Qt=Cn(q.writingMode,Ut,Vt,Le);if(Qt)return Qt}Fe=[zt.first];for(var gn=q.glyphStartIndex+1;gn0?Mn.point:Hn(ie,rn,en,1,_e),an=Cn(q.writingMode,en,xn,Le);if(an)return an}var zn=qn(Ve*Xe.getoffsetX(q.glyphStartIndex),We,$e,W,At,ie,q.segment,q.lineStartIndex,q.lineStartIndex+q.lineLength,at,Re,ve);if(!zn)return{notEnoughRoom:!0};Fe=[zn]}for(var Vn=0,nr=Fe;Vn0?1:-1,Fe=0;ae&&(Le*=-1,Fe=Math.PI),Le<0&&(Fe+=Math.PI);for(var Ve=Le>0?Xe+He:Xe+He+1,We=_e,$e=_e,tt=0,lt=0,gt=Math.abs(ve),zt=[];tt+lt<=gt;){if((Ve+=Le)=at)return null;if($e=We,zt.push(We),(We=ie[Ve])===void 0){var Ut=new s.Point(wt.getx(Ve),wt.gety(Ve)),Vt=on(Ut,At);if(Vt.signedDistanceFromCamera>0)We=ie[Ve]=Vt.point;else{var Qt=Ve-Le;We=Hn(tt===0?Re:new s.Point(wt.getx(Qt),wt.gety(Qt)),Ut,$e,gt-tt+1,At)}}tt+=lt,lt=$e.dist(We)}var gn=(gt-tt)/lt,en=We.sub($e),sn=en.mult(gn)._add($e);sn._add(en._unit()._perp()._mult(W*Le));var rn=Fe+Math.atan2(We.y-$e.y,We.x-$e.x);return zt.push(sn),{point:sn,angle:rn,path:zt}}kn.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},kn.prototype.insert=function(q,$,W,ae,_e){this._forEachCell($,W,ae,_e,this._insertBoxCell,this.boxUid++),this.boxKeys.push(q),this.bboxes.push($),this.bboxes.push(W),this.bboxes.push(ae),this.bboxes.push(_e)},kn.prototype.insertCircle=function(q,$,W,ae){this._forEachCell($-ae,W-ae,$+ae,W+ae,this._insertCircleCell,this.circleUid++),this.circleKeys.push(q),this.circles.push($),this.circles.push(W),this.circles.push(ae)},kn.prototype._insertBoxCell=function(q,$,W,ae,_e,Re){this.boxCells[_e].push(Re)},kn.prototype._insertCircleCell=function(q,$,W,ae,_e,Re){this.circleCells[_e].push(Re)},kn.prototype._query=function(q,$,W,ae,_e,Re){if(W<0||q>this.width||ae<0||$>this.height)return!_e&&[];var He=[];if(q<=0&&$<=0&&this.width<=W&&this.height<=ae){if(_e)return!0;for(var Xe=0;Xe0:He},kn.prototype._queryCircle=function(q,$,W,ae,_e){var Re=q-W,He=q+W,Xe=$-W,at=$+W;if(He<0||Re>this.width||at<0||Xe>this.height)return!ae&&[];var wt=[],At={hitTest:ae,circle:{x:q,y:$,radius:W},seenUids:{box:{},circle:{}}};return this._forEachCell(Re,Xe,He,at,this._queryCellCircle,wt,At,_e),ae?wt.length>0:wt},kn.prototype.query=function(q,$,W,ae,_e){return this._query(q,$,W,ae,!1,_e)},kn.prototype.hitTest=function(q,$,W,ae,_e){return this._query(q,$,W,ae,!0,_e)},kn.prototype.hitTestCircle=function(q,$,W,ae){return this._queryCircle(q,$,W,!0,ae)},kn.prototype._queryCell=function(q,$,W,ae,_e,Re,He,Xe){var at=He.seenUids,wt=this.boxCells[_e];if(wt!==null)for(var At=this.bboxes,ie=0,ve=wt;ie=At[Fe+0]&&ae>=At[Fe+1]&&(!Xe||Xe(this.boxKeys[Le]))){if(He.hitTest)return Re.push(!0),!0;Re.push({key:this.boxKeys[Le],x1:At[Fe],y1:At[Fe+1],x2:At[Fe+2],y2:At[Fe+3]})}}}var Ve=this.circleCells[_e];if(Ve!==null)for(var We=this.circles,$e=0,tt=Ve;$eHe*He+Xe*Xe},kn.prototype._circleAndRectCollide=function(q,$,W,ae,_e,Re,He){var Xe=(Re-ae)/2,at=Math.abs(q-(ae+Xe));if(at>Xe+W)return!1;var wt=(He-_e)/2,At=Math.abs($-(_e+wt));if(At>wt+W)return!1;if(at<=Xe||At<=wt)return!0;var ie=at-Xe,ve=At-wt;return ie*ie+ve*ve<=W*W};var or=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function tr(q,$){for(var W=0;W=1;xn--)Mn.push(sn.path[xn]);for(var an=1;an0){for(var rr=Mn[0].clone(),wr=Mn[0].clone(),kr=1;kr=Qt.x&&wr.x<=gn.x&&rr.y>=Qt.y&&wr.y<=gn.y?[Mn]:wr.xgn.x||wr.ygn.y?[]:s.clipLine([Mn],Qt.x,Qt.y,gn.x,gn.y)}for(var mr=0,_r=nr;mr<_r.length;mr+=1){var Rr=_r[mr];en.reset(Rr,.25*Vt);var Jr;Jr=en.length<=.5*Vt?1:Math.ceil(en.paddedLength/zn)+1;for(var Kr=0;Kr=this.screenRightBoundary||aethis.screenBottomBoundary},ir.prototype.isInsideGrid=function(q,$,W,ae){return W>=0&&q=0&&$0?(this.prevPlacement&&this.prevPlacement.variableOffsets[ie.crossTileID]&&this.prevPlacement.placements[ie.crossTileID]&&this.prevPlacement.placements[ie.crossTileID].text&&(Ve=this.prevPlacement.variableOffsets[ie.crossTileID].anchor),this.variableOffsets[ie.crossTileID]={textOffset:We,width:W,height:ae,anchor:q,textBoxScale:_e,prevAnchor:Ve},this.markUsedJustification(ve,q,ie,Le),ve.allowVerticalPlacement&&(this.markUsedOrientation(ve,Le,ie),this.placedOrientations[ie.crossTileID]=Le),{shift:$e,placedGlyphBoxes:tt}):void 0},Qn.prototype.placeLayerBucketPart=function(q,$,W){var ae=this,_e=q.parameters,Re=_e.bucket,He=_e.layout,Xe=_e.posMatrix,at=_e.textLabelPlaneMatrix,wt=_e.labelToScreenMatrix,At=_e.textPixelRatio,ie=_e.holdingForFade,ve=_e.collisionBoxArray,Le=_e.partiallyEvaluatedTextSize,Fe=_e.collisionGroup,Ve=He.get("text-optional"),We=He.get("icon-optional"),$e=He.get("text-allow-overlap"),tt=He.get("icon-allow-overlap"),lt=He.get("text-rotation-alignment")==="map",gt=He.get("text-pitch-alignment")==="map",zt=He.get("icon-text-fit")!=="none",Ut=He.get("symbol-z-order")==="viewport-y",Vt=$e&&(tt||!Re.hasIconData()||We),Qt=tt&&($e||!Re.hasTextData()||Ve);!Re.collisionArrays&&ve&&Re.deserializeCollisionBoxes(ve);var gn=function(an,zn){if(!$[an.crossTileID])if(ie)ae.placements[an.crossTileID]=new mn(!1,!1,!1);else{var Vn,nr=!1,rr=!1,wr=!0,kr=null,mr={box:null,offscreen:null},_r={box:null,offscreen:null},Rr=null,Jr=null,Kr=0,xr=0,zr=0;zn.textFeatureIndex?Kr=zn.textFeatureIndex:an.useRuntimeCollisionCircles&&(Kr=an.featureIndex),zn.verticalTextFeatureIndex&&(xr=zn.verticalTextFeatureIndex);var Wr=zn.textBox;if(Wr){var Gr=function(ai){var na=s.WritingMode.horizontal;if(Re.allowVerticalPlacement&&!ai&&ae.prevPlacement){var Ba=ae.prevPlacement.placedOrientations[an.crossTileID];Ba&&(ae.placedOrientations[an.crossTileID]=Ba,na=Ba,ae.markUsedOrientation(Re,na,an))}return na},ii=function(ai,na){if(Re.allowVerticalPlacement&&an.numVerticalGlyphVertices>0&&zn.verticalTextBox)for(var Ba=0,Kl=Re.writingModes;Ba0&&(ni=ni.filter(function(ai){return ai!==ui.anchor})).unshift(ui.anchor)}var ki=function(ai,na,Ba){for(var Kl=ai.x2-ai.x1,h1=ai.y2-ai.y1,vh=an.textBoxScale,p1=zt&&!tt?na:null,Wu={box:[],offscreen:!1},Xp=$e?2*ni.length:ni.length,Lc=0;Lc=ni.length,ku=ae.attemptAnchorPlacement(Zu,ai,Kl,h1,vh,lt,gt,At,Xe,Fe,d1,an,Re,Ba,p1);if(ku&&(Wu=ku.placedGlyphBoxes)&&Wu.box&&Wu.box.length){nr=!0,kr=ku.shift;break}}return Wu};ii(function(){return ki(Wr,zn.iconBox,s.WritingMode.horizontal)},function(){var ai=zn.verticalTextBox,na=mr&&mr.box&&mr.box.length;return Re.allowVerticalPlacement&&!na&&an.numVerticalGlyphVertices>0&&ai?ki(ai,zn.verticalIconBox,s.WritingMode.vertical):{box:null,offscreen:null}}),mr&&(nr=mr.box,wr=mr.offscreen);var Ii=Gr(mr&&mr.box);if(!nr&&ae.prevPlacement){var Ei=ae.prevPlacement.variableOffsets[an.crossTileID];Ei&&(ae.variableOffsets[an.crossTileID]=Ei,ae.markUsedJustification(Re,Ei.anchor,an,Ii))}}else{var wi=function(ai,na){var Ba=ae.collisionIndex.placeCollisionBox(ai,$e,At,Xe,Fe.predicate);return Ba&&Ba.box&&Ba.box.length&&(ae.markUsedOrientation(Re,na,an),ae.placedOrientations[an.crossTileID]=na),Ba};ii(function(){return wi(Wr,s.WritingMode.horizontal)},function(){var ai=zn.verticalTextBox;return Re.allowVerticalPlacement&&an.numVerticalGlyphVertices>0&&ai?wi(ai,s.WritingMode.vertical):{box:null,offscreen:null}}),Gr(mr&&mr.box&&mr.box.length)}}if(nr=(Vn=mr)&&Vn.box&&Vn.box.length>0,wr=Vn&&Vn.offscreen,an.useRuntimeCollisionCircles){var Ai=Re.text.placedSymbolArray.get(an.centerJustifiedTextSymbolIndex),Ci=s.evaluateSizeForFeature(Re.textSizeData,Le,Ai),qi=He.get("text-padding"),_s=an.collisionCircleDiameter;Rr=ae.collisionIndex.placeCollisionCircles($e,Ai,Re.lineVertexArray,Re.glyphOffsetArray,Ci,Xe,at,wt,W,gt,Fe.predicate,_s,qi),nr=$e||Rr.circles.length>0&&!Rr.collisionDetected,wr=wr&&Rr.offscreen}if(zn.iconFeatureIndex&&(zr=zn.iconFeatureIndex),zn.iconBox){var ta=function(ai){var na=zt&&kr?Zn(ai,kr.x,kr.y,lt,gt,ae.transform.angle):ai;return ae.collisionIndex.placeCollisionBox(na,tt,At,Xe,Fe.predicate)};rr=_r&&_r.box&&_r.box.length&&zn.verticalIconBox?(Jr=ta(zn.verticalIconBox)).box.length>0:(Jr=ta(zn.iconBox)).box.length>0,wr=wr&&Jr.offscreen}var Yr=Ve||an.numHorizontalGlyphVertices===0&&an.numVerticalGlyphVertices===0,pa=We||an.numIconVertices===0;if(Yr||pa?pa?Yr||(rr=rr&&nr):nr=rr&&nr:rr=nr=rr&&nr,nr&&Vn&&Vn.box&&(_r&&_r.box&&xr?ae.collisionIndex.insertCollisionBox(Vn.box,He.get("text-ignore-placement"),Re.bucketInstanceId,xr,Fe.ID):ae.collisionIndex.insertCollisionBox(Vn.box,He.get("text-ignore-placement"),Re.bucketInstanceId,Kr,Fe.ID)),rr&&Jr&&ae.collisionIndex.insertCollisionBox(Jr.box,He.get("icon-ignore-placement"),Re.bucketInstanceId,zr,Fe.ID),Rr&&(nr&&ae.collisionIndex.insertCollisionCircles(Rr.circles,He.get("text-ignore-placement"),Re.bucketInstanceId,Kr,Fe.ID),W)){var wa=Re.bucketInstanceId,Ui=ae.collisionCircleArrays[wa];Ui===void 0&&(Ui=ae.collisionCircleArrays[wa]=new Ln);for(var ko=0;ko=0;--sn){var rn=en[sn];gn(Re.symbolInstances.get(rn),Re.collisionArrays[rn])}else for(var Mn=q.symbolInstanceStart;Mn=0&&(q.text.placedSymbolArray.get(at).crossTileID=_e>=0&&at!==_e?0:W.crossTileID)}},Qn.prototype.markUsedOrientation=function(q,$,W){for(var ae=$===s.WritingMode.horizontal||$===s.WritingMode.horizontalOnly?$:0,_e=$===s.WritingMode.vertical?$:0,Re=0,He=[W.leftJustifiedTextSymbolIndex,W.centerJustifiedTextSymbolIndex,W.rightJustifiedTextSymbolIndex];Re0||gt>0,gn=tt.numIconVertices>0,en=ae.placedOrientations[tt.crossTileID],sn=en===s.WritingMode.vertical,rn=en===s.WritingMode.horizontal||en===s.WritingMode.horizontalOnly;if(Qt){var Mn=Sn(Vt.text),xn=sn?pn:Mn;Le(q.text,lt,xn);var an=rn?pn:Mn;Le(q.text,gt,an);var zn=Vt.text.isHidden();[tt.rightJustifiedTextSymbolIndex,tt.centerJustifiedTextSymbolIndex,tt.leftJustifiedTextSymbolIndex].forEach(function(zr){zr>=0&&(q.text.placedSymbolArray.get(zr).hidden=zn||sn?1:0)}),tt.verticalPlacedTextSymbolIndex>=0&&(q.text.placedSymbolArray.get(tt.verticalPlacedTextSymbolIndex).hidden=zn||rn?1:0);var Vn=ae.variableOffsets[tt.crossTileID];Vn&&ae.markUsedJustification(q,Vn.anchor,tt,en);var nr=ae.placedOrientations[tt.crossTileID];nr&&(ae.markUsedJustification(q,"left",tt,nr),ae.markUsedOrientation(q,nr,tt))}if(gn){var rr=Sn(Vt.icon),wr=!(ie&&tt.verticalPlacedIconSymbolIndex&&sn);if(tt.placedIconSymbolIndex>=0){var kr=wr?rr:pn;Le(q.icon,tt.numIconVertices,kr),q.icon.placedSymbolArray.get(tt.placedIconSymbolIndex).hidden=Vt.icon.isHidden()}if(tt.verticalPlacedIconSymbolIndex>=0){var mr=wr?pn:rr;Le(q.icon,tt.numVerticalIconVertices,mr),q.icon.placedSymbolArray.get(tt.verticalPlacedIconSymbolIndex).hidden=Vt.icon.isHidden()}}if(q.hasIconCollisionBoxData()||q.hasTextCollisionBoxData()){var _r=q.collisionArrays[$e];if(_r){var Rr=new s.Point(0,0);if(_r.textBox||_r.verticalTextBox){var Jr=!0;if(at){var Kr=ae.variableOffsets[zt];Kr?(Rr=$n(Kr.anchor,Kr.width,Kr.height,Kr.textOffset,Kr.textBoxScale),wt&&Rr._rotate(At?ae.transform.angle:-ae.transform.angle)):Jr=!1}_r.textBox&&hr(q.textCollisionBox.collisionVertexArray,Vt.text.placed,!Jr||sn,Rr.x,Rr.y),_r.verticalTextBox&&hr(q.textCollisionBox.collisionVertexArray,Vt.text.placed,!Jr||rn,Rr.x,Rr.y)}var xr=!!(!rn&&_r.verticalIconBox);_r.iconBox&&hr(q.iconCollisionBox.collisionVertexArray,Vt.icon.placed,xr,ie?Rr.x:0,ie?Rr.y:0),_r.verticalIconBox&&hr(q.iconCollisionBox.collisionVertexArray,Vt.icon.placed,!xr,ie?Rr.x:0,ie?Rr.y:0)}}},Ve=0;Veq},Qn.prototype.setStale=function(){this.stale=!0};var tn=Math.pow(2,25),Pn=Math.pow(2,24),jt=Math.pow(2,17),Jt=Math.pow(2,16),un=Math.pow(2,9),Rn=Math.pow(2,8),On=Math.pow(2,1);function Sn(q){if(q.opacity===0&&!q.placed)return 0;if(q.opacity===1&&q.placed)return 4294967295;var $=q.placed?1:0,W=Math.floor(127*q.opacity);return W*tn+$*Pn+W*jt+$*Jt+W*un+$*Rn+W*On+$}var pn=0,bn=function(q){this._sortAcrossTiles=q.layout.get("symbol-z-order")!=="viewport-y"&&q.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};bn.prototype.continuePlacement=function(q,$,W,ae,_e){for(var Re=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var He=$[q[this._currentPlacementIndex]],Xe=this.placement.collisionIndex.transform.zoom;if(He.type==="symbol"&&(!He.minzoom||He.minzoom<=Xe)&&(!He.maxzoom||He.maxzoom>Xe)){if(this._inProgressLayer||(this._inProgressLayer=new bn(He)),this._inProgressLayer.continuePlacement(W[He.source],this.placement,this._showCollisionBoxes,He,Re))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},dn.prototype.commit=function(q){return this.placement.commit(q),this.placement};var vn=512/s.EXTENT/2,An=function(q,$,W){this.tileID=q,this.indexedSymbolInstances={},this.bucketInstanceId=W;for(var ae=0;ae<$.length;ae++){var _e=$.get(ae),Re=_e.key;this.indexedSymbolInstances[Re]||(this.indexedSymbolInstances[Re]=[]),this.indexedSymbolInstances[Re].push({crossTileID:_e.crossTileID,coord:this.getScaledCoordinates(_e,q)})}};An.prototype.getScaledCoordinates=function(q,$){var W=$.canonical.z-this.tileID.canonical.z,ae=vn/Math.pow(2,W);return{x:Math.floor(($.canonical.x*s.EXTENT+q.anchorX)*ae),y:Math.floor(($.canonical.y*s.EXTENT+q.anchorY)*ae)}},An.prototype.findMatches=function(q,$,W){for(var ae=this.tileID.canonical.z<$.canonical.z?1:Math.pow(2,this.tileID.canonical.z-$.canonical.z),_e=0;_eq.overscaledZ)for(var Xe in He){var at=He[Xe];at.tileID.isChildOf(q)&&at.findMatches($.symbolInstances,q,_e)}else{var wt=He[q.scaledTo(Number(Re)).key];wt&&wt.findMatches($.symbolInstances,q,_e)}}for(var At=0;At<$.symbolInstances.length;At++){var ie=$.symbolInstances.get(At);ie.crossTileID||(ie.crossTileID=W.generate(),_e[ie.crossTileID]=!0)}return this.indexes[q.overscaledZ]===void 0&&(this.indexes[q.overscaledZ]={}),this.indexes[q.overscaledZ][q.key]=new An(q,$.symbolInstances,$.bucketInstanceId),!0},Xn.prototype.removeBucketCrossTileIDs=function(q,$){for(var W in $.indexedSymbolInstances)for(var ae=0,_e=$.indexedSymbolInstances[W];ae<_e.length;ae+=1){var Re=_e[ae];delete this.usedCrossTileIDs[q][Re.crossTileID]}},Xn.prototype.removeStaleBuckets=function(q){var $=!1;for(var W in this.indexes){var ae=this.indexes[W];for(var _e in ae)q[ae[_e].bucketInstanceId]||(this.removeBucketCrossTileIDs(W,ae[_e]),delete ae[_e],$=!0)}return $};var er=function(){this.layerIndexes={},this.crossTileIDs=new Bn,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};er.prototype.addLayer=function(q,$,W){var ae=this.layerIndexes[q.id];ae===void 0&&(ae=this.layerIndexes[q.id]=new Xn);var _e=!1,Re={};ae.handleWrapJump(W);for(var He=0,Xe=$;He1?"@2x":"",ie=s.getJSON(Re.transformRequest(Re.normalizeSpriteURL(_e,At,".json"),s.ResourceType.SpriteJSON),function(Fe,Ve){ie=null,wt||(wt=Fe,Xe=Ve,Le())}),ve=s.getImage(Re.transformRequest(Re.normalizeSpriteURL(_e,At,".png"),s.ResourceType.SpriteImage),function(Fe,Ve){ve=null,wt||(wt=Fe,at=Ve,Le())});function Le(){if(wt)He(wt);else if(Xe&&at){var Fe=s.browser.getImageData(at),Ve={};for(var We in Xe){var $e=Xe[We],tt=$e.width,lt=$e.height,gt=$e.x,zt=$e.y,Ut=$e.sdf,Vt=$e.pixelRatio,Qt=$e.stretchX,gn=$e.stretchY,en=$e.content,sn=new s.RGBAImage({width:tt,height:lt});s.RGBAImage.copy(Fe,sn,{x:gt,y:zt},{x:0,y:0},{width:tt,height:lt}),Ve[We]={data:sn,pixelRatio:Vt,sdf:Ut,stretchX:Qt,stretchY:gn,content:en}}He(null,Ve)}}return{cancel:function(){ie&&(ie.cancel(),ie=null),ve&&(ve.cancel(),ve=null)}}}(W,this.map._requestManager,function(_e,Re){if(ae._spriteRequest=null,_e)ae.fire(new s.ErrorEvent(_e));else if(Re)for(var He in Re)ae.imageManager.addImage(He,Re[He]);ae.imageManager.setLoaded(!0),ae._availableImages=ae.imageManager.listImages(),ae.dispatcher.broadcast("setImages",ae._availableImages),ae.fire(new s.Event("data",{dataType:"style"}))})},$.prototype._validateLayer=function(W){var ae=this.sourceCaches[W.source];if(ae){var _e=W.sourceLayer;if(_e){var Re=ae.getSource();(Re.type==="geojson"||Re.vectorLayerIds&&Re.vectorLayerIds.indexOf(_e)===-1)&&this.fire(new s.ErrorEvent(new Error('Source layer "'+_e+'" does not exist on source "'+Re.id+'" as specified by style layer "'+W.id+'"')))}}},$.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var W in this.sourceCaches)if(!this.sourceCaches[W].loaded())return!1;return!!this.imageManager.isLoaded()},$.prototype._serializeLayers=function(W){for(var ae=[],_e=0,Re=W;_e0)throw new Error("Unimplemented: "+Re.map(function(He){return He.command}).join(", ")+".");return _e.forEach(function(He){He.command!=="setTransition"&&ae[He.command].apply(ae,He.args)}),this.stylesheet=W,!0},$.prototype.addImage=function(W,ae){if(this.getImage(W))return this.fire(new s.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(W,ae),this._availableImages=this.imageManager.listImages(),this._changedImages[W]=!0,this._changed=!0,this.fire(new s.Event("data",{dataType:"style"}))},$.prototype.updateImage=function(W,ae){this.imageManager.updateImage(W,ae)},$.prototype.getImage=function(W){return this.imageManager.getImage(W)},$.prototype.removeImage=function(W){if(!this.getImage(W))return this.fire(new s.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(W),this._availableImages=this.imageManager.listImages(),this._changedImages[W]=!0,this._changed=!0,this.fire(new s.Event("data",{dataType:"style"}))},$.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},$.prototype.addSource=function(W,ae,_e){var Re=this;if(_e===void 0&&(_e={}),this._checkLoaded(),this.sourceCaches[W]!==void 0)throw new Error("There is already a source with this ID");if(!ae.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(ae).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(ae.type)>=0&&this._validate(s.validateStyle.source,"sources."+W,ae,null,_e))){this.map&&this.map._collectResourceTiming&&(ae.collectResourceTiming=!0);var He=this.sourceCaches[W]=new ht(W,ae,this.dispatcher);He.style=this,He.setEventedParent(this,function(){return{isSourceLoaded:Re.loaded(),source:He.serialize(),sourceId:W}}),He.onAdd(this.map),this._changed=!0}},$.prototype.removeSource=function(W){if(this._checkLoaded(),this.sourceCaches[W]===void 0)throw new Error("There is no source with this ID");for(var ae in this._layers)if(this._layers[ae].source===W)return this.fire(new s.ErrorEvent(new Error('Source "'+W+'" cannot be removed while layer "'+ae+'" is using it.')));var _e=this.sourceCaches[W];delete this.sourceCaches[W],delete this._updatedSources[W],_e.fire(new s.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:W})),_e.setEventedParent(null),_e.clearTiles(),_e.onRemove&&_e.onRemove(this.map),this._changed=!0},$.prototype.setGeoJSONSourceData=function(W,ae){this._checkLoaded(),this.sourceCaches[W].getSource().setData(ae),this._changed=!0},$.prototype.getSource=function(W){return this.sourceCaches[W]&&this.sourceCaches[W].getSource()},$.prototype.addLayer=function(W,ae,_e){_e===void 0&&(_e={}),this._checkLoaded();var Re=W.id;if(this.getLayer(Re))this.fire(new s.ErrorEvent(new Error('Layer with id "'+Re+'" already exists on this map')));else{var He;if(W.type==="custom"){if(Jn(this,s.validateCustomStyleLayer(W)))return;He=s.createStyleLayer(W)}else{if(typeof W.source=="object"&&(this.addSource(Re,W.source),W=s.clone$1(W),W=s.extend(W,{source:Re})),this._validate(s.validateStyle.layer,"layers."+Re,W,{arrayIndex:-1},_e))return;He=s.createStyleLayer(W),this._validateLayer(He),He.setEventedParent(this,{layer:{id:Re}}),this._serializedLayers[He.id]=He.serialize()}var Xe=ae?this._order.indexOf(ae):this._order.length;if(ae&&Xe===-1)this.fire(new s.ErrorEvent(new Error('Layer with id "'+ae+'" does not exist on this map.')));else{if(this._order.splice(Xe,0,Re),this._layerOrderChanged=!0,this._layers[Re]=He,this._removedLayers[Re]&&He.source&&He.type!=="custom"){var at=this._removedLayers[Re];delete this._removedLayers[Re],at.type!==He.type?this._updatedSources[He.source]="clear":(this._updatedSources[He.source]="reload",this.sourceCaches[He.source].pause())}this._updateLayer(He),He.onAdd&&He.onAdd(this.map)}}},$.prototype.moveLayer=function(W,ae){if(this._checkLoaded(),this._changed=!0,this._layers[W]){if(W!==ae){var _e=this._order.indexOf(W);this._order.splice(_e,1);var Re=ae?this._order.indexOf(ae):this._order.length;ae&&Re===-1?this.fire(new s.ErrorEvent(new Error('Layer with id "'+ae+'" does not exist on this map.'))):(this._order.splice(Re,0,W),this._layerOrderChanged=!0)}}else this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be moved.")))},$.prototype.removeLayer=function(W){this._checkLoaded();var ae=this._layers[W];if(ae){ae.setEventedParent(null);var _e=this._order.indexOf(W);this._order.splice(_e,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[W]=ae,delete this._layers[W],delete this._serializedLayers[W],delete this._updatedLayers[W],delete this._updatedPaintProps[W],ae.onRemove&&ae.onRemove(this.map)}else this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be removed.")))},$.prototype.getLayer=function(W){return this._layers[W]},$.prototype.hasLayer=function(W){return W in this._layers},$.prototype.setLayerZoomRange=function(W,ae,_e){this._checkLoaded();var Re=this.getLayer(W);Re?Re.minzoom===ae&&Re.maxzoom===_e||(ae!=null&&(Re.minzoom=ae),_e!=null&&(Re.maxzoom=_e),this._updateLayer(Re)):this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot have zoom extent.")))},$.prototype.setFilter=function(W,ae,_e){_e===void 0&&(_e={}),this._checkLoaded();var Re=this.getLayer(W);if(Re){if(!s.deepEqual(Re.filter,ae))return ae==null?(Re.filter=void 0,void this._updateLayer(Re)):void(this._validate(s.validateStyle.filter,"layers."+Re.id+".filter",ae,null,_e)||(Re.filter=s.clone$1(ae),this._updateLayer(Re)))}else this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be filtered.")))},$.prototype.getFilter=function(W){return s.clone$1(this.getLayer(W).filter)},$.prototype.setLayoutProperty=function(W,ae,_e,Re){Re===void 0&&(Re={}),this._checkLoaded();var He=this.getLayer(W);He?s.deepEqual(He.getLayoutProperty(ae),_e)||(He.setLayoutProperty(ae,_e,Re),this._updateLayer(He)):this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be styled.")))},$.prototype.getLayoutProperty=function(W,ae){var _e=this.getLayer(W);if(_e)return _e.getLayoutProperty(ae);this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style.")))},$.prototype.setPaintProperty=function(W,ae,_e,Re){Re===void 0&&(Re={}),this._checkLoaded();var He=this.getLayer(W);He?s.deepEqual(He.getPaintProperty(ae),_e)||(He.setPaintProperty(ae,_e,Re)&&this._updateLayer(He),this._changed=!0,this._updatedPaintProps[W]=!0):this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be styled.")))},$.prototype.getPaintProperty=function(W,ae){return this.getLayer(W).getPaintProperty(ae)},$.prototype.setFeatureState=function(W,ae){this._checkLoaded();var _e=W.source,Re=W.sourceLayer,He=this.sourceCaches[_e];if(He!==void 0){var Xe=He.getSource().type;Xe==="geojson"&&Re?this.fire(new s.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):Xe!=="vector"||Re?(W.id===void 0&&this.fire(new s.ErrorEvent(new Error("The feature id parameter must be provided."))),He.setFeatureState(Re,W.id,ae)):this.fire(new s.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new s.ErrorEvent(new Error("The source '"+_e+"' does not exist in the map's style.")))},$.prototype.removeFeatureState=function(W,ae){this._checkLoaded();var _e=W.source,Re=this.sourceCaches[_e];if(Re!==void 0){var He=Re.getSource().type,Xe=He==="vector"?W.sourceLayer:void 0;He!=="vector"||Xe?ae&&typeof W.id!="string"&&typeof W.id!="number"?this.fire(new s.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):Re.removeFeatureState(Xe,W.id,ae):this.fire(new s.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new s.ErrorEvent(new Error("The source '"+_e+"' does not exist in the map's style.")))},$.prototype.getFeatureState=function(W){this._checkLoaded();var ae=W.source,_e=W.sourceLayer,Re=this.sourceCaches[ae];if(Re!==void 0){if(Re.getSource().type!=="vector"||_e)return W.id===void 0&&this.fire(new s.ErrorEvent(new Error("The feature id parameter must be provided."))),Re.getFeatureState(_e,W.id);this.fire(new s.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new s.ErrorEvent(new Error("The source '"+ae+"' does not exist in the map's style.")))},$.prototype.getTransition=function(){return s.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},$.prototype.serialize=function(){return s.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:s.mapObject(this.sourceCaches,function(W){return W.serialize()}),layers:this._serializeLayers(this._order)},function(W){return W!==void 0})},$.prototype._updateLayer=function(W){this._updatedLayers[W.id]=!0,W.source&&!this._updatedSources[W.source]&&this.sourceCaches[W.source].getSource().type!=="raster"&&(this._updatedSources[W.source]="reload",this.sourceCaches[W.source].pause()),this._changed=!0},$.prototype._flattenAndSortRenderedFeatures=function(W){for(var ae=this,_e=function(en){return ae._layers[en].type==="fill-extrusion"},Re={},He=[],Xe=this._order.length-1;Xe>=0;Xe--){var at=this._order[Xe];if(_e(at)){Re[at]=Xe;for(var wt=0,At=W;wt=0;We--){var $e=this._order[We];if(_e($e))for(var tt=He.length-1;tt>=0;tt--){var lt=He[tt].feature;if(Re[lt.layer.id]>16,Xe>>16],u_pixel_coord_lower:[65535&He,65535&Xe]}}bo.prototype.draw=function(q,$,W,ae,_e,Re,He,Xe,at,wt,At,ie,ve,Le,Fe,Ve){var We,$e=q.gl;if(!this.failedToCreate){for(var tt in q.program.set(this.program),q.setDepthMode(W),q.setStencilMode(ae),q.setColorMode(_e),q.setCullFace(Re),this.fixedUniforms)this.fixedUniforms[tt].set(He[tt]);Le&&Le.setUniforms(q,this.binderUniforms,ie,{zoom:ve});for(var lt=(We={},We[$e.LINES]=2,We[$e.TRIANGLES]=3,We[$e.LINE_STRIP]=1,We)[$],gt=0,zt=At.get();gt0?1-1/(1.001-He):-He),u_contrast_factor:(Re=_e.paint.get("raster-contrast"),Re>0?1/(1-Re):1+Re),u_spin_weights:Ps(_e.paint.get("raster-hue-rotate"))};var Re,He};function Ps(q){q*=Math.PI/180;var $=Math.sin(q),W=Math.cos(q);return[(2*W+1)/3,(-Math.sqrt(3)*$-W+1)/3,(Math.sqrt(3)*$-W+1)/3]}var Qo,hi=function(q,$,W,ae,_e,Re,He,Xe,at,wt){var At=_e.transform;return{u_is_size_zoom_constant:+(q==="constant"||q==="source"),u_is_size_feature_constant:+(q==="constant"||q==="camera"),u_size_t:$?$.uSizeT:0,u_size:$?$.uSize:0,u_camera_to_center_distance:At.cameraToCenterDistance,u_pitch:At.pitch/360*2*Math.PI,u_rotate_symbol:+W,u_aspect_ratio:At.width/At.height,u_fade_change:_e.options.fadeDuration?_e.symbolFadeChange:1,u_matrix:Re,u_label_plane_matrix:He,u_coord_matrix:Xe,u_is_text:+at,u_pitch_with_map:+ae,u_texsize:wt,u_texture:0}},ds=function(q,$,W,ae,_e,Re,He,Xe,at,wt,At){var ie=_e.transform;return s.extend(hi(q,$,W,ae,_e,Re,He,Xe,at,wt),{u_gamma_scale:ae?Math.cos(ie._pitch)*ie.cameraToCenterDistance:1,u_device_pixel_ratio:s.browser.devicePixelRatio,u_is_halo:+At})},Cc=function(q,$,W,ae,_e,Re,He,Xe,at,wt){return s.extend(ds(q,$,W,ae,_e,Re,He,Xe,!0,at,!0),{u_texsize_icon:wt,u_texture_icon:1})},Hl=function(q,$,W){return{u_matrix:q,u_opacity:$,u_color:W}},bl=function(q,$,W,ae,_e,Re){return s.extend(function(He,Xe,at,wt){var At=at.imageManager.getPattern(He.from.toString()),ie=at.imageManager.getPattern(He.to.toString()),ve=at.imageManager.getPixelSize(),Le=ve.width,Fe=ve.height,Ve=Math.pow(2,wt.tileID.overscaledZ),We=wt.tileSize*Math.pow(2,at.transform.tileZoom)/Ve,$e=We*(wt.tileID.canonical.x+wt.tileID.wrap*Ve),tt=We*wt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:At.tl,u_pattern_br_a:At.br,u_pattern_tl_b:ie.tl,u_pattern_br_b:ie.br,u_texsize:[Le,Fe],u_mix:Xe.t,u_pattern_size_a:At.displaySize,u_pattern_size_b:ie.displaySize,u_scale_a:Xe.fromScale,u_scale_b:Xe.toScale,u_tile_units_to_pixels:1/dr(wt,1,at.transform.tileZoom),u_pixel_coord_upper:[$e>>16,tt>>16],u_pixel_coord_lower:[65535&$e,65535&tt]}}(ae,Re,W,_e),{u_matrix:q,u_opacity:$})},Os={fillExtrusion:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_lightpos:new s.Uniform3f(q,$.u_lightpos),u_lightintensity:new s.Uniform1f(q,$.u_lightintensity),u_lightcolor:new s.Uniform3f(q,$.u_lightcolor),u_vertical_gradient:new s.Uniform1f(q,$.u_vertical_gradient),u_opacity:new s.Uniform1f(q,$.u_opacity)}},fillExtrusionPattern:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_lightpos:new s.Uniform3f(q,$.u_lightpos),u_lightintensity:new s.Uniform1f(q,$.u_lightintensity),u_lightcolor:new s.Uniform3f(q,$.u_lightcolor),u_vertical_gradient:new s.Uniform1f(q,$.u_vertical_gradient),u_height_factor:new s.Uniform1f(q,$.u_height_factor),u_image:new s.Uniform1i(q,$.u_image),u_texsize:new s.Uniform2f(q,$.u_texsize),u_pixel_coord_upper:new s.Uniform2f(q,$.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(q,$.u_pixel_coord_lower),u_scale:new s.Uniform3f(q,$.u_scale),u_fade:new s.Uniform1f(q,$.u_fade),u_opacity:new s.Uniform1f(q,$.u_opacity)}},fill:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix)}},fillPattern:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_image:new s.Uniform1i(q,$.u_image),u_texsize:new s.Uniform2f(q,$.u_texsize),u_pixel_coord_upper:new s.Uniform2f(q,$.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(q,$.u_pixel_coord_lower),u_scale:new s.Uniform3f(q,$.u_scale),u_fade:new s.Uniform1f(q,$.u_fade)}},fillOutline:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_world:new s.Uniform2f(q,$.u_world)}},fillOutlinePattern:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_world:new s.Uniform2f(q,$.u_world),u_image:new s.Uniform1i(q,$.u_image),u_texsize:new s.Uniform2f(q,$.u_texsize),u_pixel_coord_upper:new s.Uniform2f(q,$.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(q,$.u_pixel_coord_lower),u_scale:new s.Uniform3f(q,$.u_scale),u_fade:new s.Uniform1f(q,$.u_fade)}},circle:function(q,$){return{u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_scale_with_map:new s.Uniform1i(q,$.u_scale_with_map),u_pitch_with_map:new s.Uniform1i(q,$.u_pitch_with_map),u_extrude_scale:new s.Uniform2f(q,$.u_extrude_scale),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_matrix:new s.UniformMatrix4f(q,$.u_matrix)}},collisionBox:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_pixels_to_tile_units:new s.Uniform1f(q,$.u_pixels_to_tile_units),u_extrude_scale:new s.Uniform2f(q,$.u_extrude_scale),u_overscale_factor:new s.Uniform1f(q,$.u_overscale_factor)}},collisionCircle:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_inv_matrix:new s.UniformMatrix4f(q,$.u_inv_matrix),u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_viewport_size:new s.Uniform2f(q,$.u_viewport_size)}},debug:function(q,$){return{u_color:new s.UniformColor(q,$.u_color),u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_overlay:new s.Uniform1i(q,$.u_overlay),u_overlay_scale:new s.Uniform1f(q,$.u_overlay_scale)}},clippingMask:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix)}},heatmap:function(q,$){return{u_extrude_scale:new s.Uniform1f(q,$.u_extrude_scale),u_intensity:new s.Uniform1f(q,$.u_intensity),u_matrix:new s.UniformMatrix4f(q,$.u_matrix)}},heatmapTexture:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_world:new s.Uniform2f(q,$.u_world),u_image:new s.Uniform1i(q,$.u_image),u_color_ramp:new s.Uniform1i(q,$.u_color_ramp),u_opacity:new s.Uniform1f(q,$.u_opacity)}},hillshade:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_image:new s.Uniform1i(q,$.u_image),u_latrange:new s.Uniform2f(q,$.u_latrange),u_light:new s.Uniform2f(q,$.u_light),u_shadow:new s.UniformColor(q,$.u_shadow),u_highlight:new s.UniformColor(q,$.u_highlight),u_accent:new s.UniformColor(q,$.u_accent)}},hillshadePrepare:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_image:new s.Uniform1i(q,$.u_image),u_dimension:new s.Uniform2f(q,$.u_dimension),u_zoom:new s.Uniform1f(q,$.u_zoom),u_maxzoom:new s.Uniform1f(q,$.u_maxzoom),u_unpack:new s.Uniform4f(q,$.u_unpack)}},line:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_ratio:new s.Uniform1f(q,$.u_ratio),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_units_to_pixels:new s.Uniform2f(q,$.u_units_to_pixels)}},lineGradient:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_ratio:new s.Uniform1f(q,$.u_ratio),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_units_to_pixels:new s.Uniform2f(q,$.u_units_to_pixels),u_image:new s.Uniform1i(q,$.u_image)}},linePattern:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_texsize:new s.Uniform2f(q,$.u_texsize),u_ratio:new s.Uniform1f(q,$.u_ratio),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_image:new s.Uniform1i(q,$.u_image),u_units_to_pixels:new s.Uniform2f(q,$.u_units_to_pixels),u_scale:new s.Uniform3f(q,$.u_scale),u_fade:new s.Uniform1f(q,$.u_fade)}},lineSDF:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_ratio:new s.Uniform1f(q,$.u_ratio),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_units_to_pixels:new s.Uniform2f(q,$.u_units_to_pixels),u_patternscale_a:new s.Uniform2f(q,$.u_patternscale_a),u_patternscale_b:new s.Uniform2f(q,$.u_patternscale_b),u_sdfgamma:new s.Uniform1f(q,$.u_sdfgamma),u_image:new s.Uniform1i(q,$.u_image),u_tex_y_a:new s.Uniform1f(q,$.u_tex_y_a),u_tex_y_b:new s.Uniform1f(q,$.u_tex_y_b),u_mix:new s.Uniform1f(q,$.u_mix)}},raster:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_tl_parent:new s.Uniform2f(q,$.u_tl_parent),u_scale_parent:new s.Uniform1f(q,$.u_scale_parent),u_buffer_scale:new s.Uniform1f(q,$.u_buffer_scale),u_fade_t:new s.Uniform1f(q,$.u_fade_t),u_opacity:new s.Uniform1f(q,$.u_opacity),u_image0:new s.Uniform1i(q,$.u_image0),u_image1:new s.Uniform1i(q,$.u_image1),u_brightness_low:new s.Uniform1f(q,$.u_brightness_low),u_brightness_high:new s.Uniform1f(q,$.u_brightness_high),u_saturation_factor:new s.Uniform1f(q,$.u_saturation_factor),u_contrast_factor:new s.Uniform1f(q,$.u_contrast_factor),u_spin_weights:new s.Uniform3f(q,$.u_spin_weights)}},symbolIcon:function(q,$){return{u_is_size_zoom_constant:new s.Uniform1i(q,$.u_is_size_zoom_constant),u_is_size_feature_constant:new s.Uniform1i(q,$.u_is_size_feature_constant),u_size_t:new s.Uniform1f(q,$.u_size_t),u_size:new s.Uniform1f(q,$.u_size),u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_pitch:new s.Uniform1f(q,$.u_pitch),u_rotate_symbol:new s.Uniform1i(q,$.u_rotate_symbol),u_aspect_ratio:new s.Uniform1f(q,$.u_aspect_ratio),u_fade_change:new s.Uniform1f(q,$.u_fade_change),u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_label_plane_matrix:new s.UniformMatrix4f(q,$.u_label_plane_matrix),u_coord_matrix:new s.UniformMatrix4f(q,$.u_coord_matrix),u_is_text:new s.Uniform1i(q,$.u_is_text),u_pitch_with_map:new s.Uniform1i(q,$.u_pitch_with_map),u_texsize:new s.Uniform2f(q,$.u_texsize),u_texture:new s.Uniform1i(q,$.u_texture)}},symbolSDF:function(q,$){return{u_is_size_zoom_constant:new s.Uniform1i(q,$.u_is_size_zoom_constant),u_is_size_feature_constant:new s.Uniform1i(q,$.u_is_size_feature_constant),u_size_t:new s.Uniform1f(q,$.u_size_t),u_size:new s.Uniform1f(q,$.u_size),u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_pitch:new s.Uniform1f(q,$.u_pitch),u_rotate_symbol:new s.Uniform1i(q,$.u_rotate_symbol),u_aspect_ratio:new s.Uniform1f(q,$.u_aspect_ratio),u_fade_change:new s.Uniform1f(q,$.u_fade_change),u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_label_plane_matrix:new s.UniformMatrix4f(q,$.u_label_plane_matrix),u_coord_matrix:new s.UniformMatrix4f(q,$.u_coord_matrix),u_is_text:new s.Uniform1i(q,$.u_is_text),u_pitch_with_map:new s.Uniform1i(q,$.u_pitch_with_map),u_texsize:new s.Uniform2f(q,$.u_texsize),u_texture:new s.Uniform1i(q,$.u_texture),u_gamma_scale:new s.Uniform1f(q,$.u_gamma_scale),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_is_halo:new s.Uniform1i(q,$.u_is_halo)}},symbolTextAndIcon:function(q,$){return{u_is_size_zoom_constant:new s.Uniform1i(q,$.u_is_size_zoom_constant),u_is_size_feature_constant:new s.Uniform1i(q,$.u_is_size_feature_constant),u_size_t:new s.Uniform1f(q,$.u_size_t),u_size:new s.Uniform1f(q,$.u_size),u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_pitch:new s.Uniform1f(q,$.u_pitch),u_rotate_symbol:new s.Uniform1i(q,$.u_rotate_symbol),u_aspect_ratio:new s.Uniform1f(q,$.u_aspect_ratio),u_fade_change:new s.Uniform1f(q,$.u_fade_change),u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_label_plane_matrix:new s.UniformMatrix4f(q,$.u_label_plane_matrix),u_coord_matrix:new s.UniformMatrix4f(q,$.u_coord_matrix),u_is_text:new s.Uniform1i(q,$.u_is_text),u_pitch_with_map:new s.Uniform1i(q,$.u_pitch_with_map),u_texsize:new s.Uniform2f(q,$.u_texsize),u_texsize_icon:new s.Uniform2f(q,$.u_texsize_icon),u_texture:new s.Uniform1i(q,$.u_texture),u_texture_icon:new s.Uniform1i(q,$.u_texture_icon),u_gamma_scale:new s.Uniform1f(q,$.u_gamma_scale),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_is_halo:new s.Uniform1i(q,$.u_is_halo)}},background:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_opacity:new s.Uniform1f(q,$.u_opacity),u_color:new s.UniformColor(q,$.u_color)}},backgroundPattern:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_opacity:new s.Uniform1f(q,$.u_opacity),u_image:new s.Uniform1i(q,$.u_image),u_pattern_tl_a:new s.Uniform2f(q,$.u_pattern_tl_a),u_pattern_br_a:new s.Uniform2f(q,$.u_pattern_br_a),u_pattern_tl_b:new s.Uniform2f(q,$.u_pattern_tl_b),u_pattern_br_b:new s.Uniform2f(q,$.u_pattern_br_b),u_texsize:new s.Uniform2f(q,$.u_texsize),u_mix:new s.Uniform1f(q,$.u_mix),u_pattern_size_a:new s.Uniform2f(q,$.u_pattern_size_a),u_pattern_size_b:new s.Uniform2f(q,$.u_pattern_size_b),u_scale_a:new s.Uniform1f(q,$.u_scale_a),u_scale_b:new s.Uniform1f(q,$.u_scale_b),u_pixel_coord_upper:new s.Uniform2f(q,$.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(q,$.u_pixel_coord_lower),u_tile_units_to_pixels:new s.Uniform1f(q,$.u_tile_units_to_pixels)}}};function Qs(q,$,W,ae,_e,Re,He){for(var Xe=q.context,at=Xe.gl,wt=q.useProgram("collisionBox"),At=[],ie=0,ve=0,Le=0;Le0){var gt=s.create(),zt=$e;s.mul(gt,We.placementInvProjMatrix,q.transform.glCoordMatrix),s.mul(gt,gt,We.placementViewportMatrix),At.push({circleArray:lt,circleOffset:ve,transform:zt,invTransform:gt}),ve=ie+=lt.length/4}tt&&wt.draw(Xe,at.LINES,qt.disabled,Je.disabled,q.colorModeForRenderPass(),Ge.disabled,Gu($e,q.transform,Ve),W.id,tt.layoutVertexBuffer,tt.indexBuffer,tt.segments,null,q.transform.zoom,null,null,tt.collisionVertexBuffer)}}if(He&&At.length){var Ut=q.useProgram("collisionCircle"),Vt=new s.StructArrayLayout2f1f2i16;Vt.resize(4*ie),Vt._trim();for(var Qt=0,gn=0,en=At;gn=0&&(Fe[We.associatedIconIndex]={shiftedAnchor:en,angle:sn})}else tr(We.numGlyphs,ve)}if(At){Le.clear();for(var Mn=q.icon.placedSymbolArray,xn=0;xn0){var He=s.browser.now(),Xe=(He-q.timeAdded)/Re,at=$?(He-$.timeAdded)/Re:-1,wt=W.getSource(),At=_e.coveringZoomLevel({tileSize:wt.tileSize,roundZoom:wt.roundZoom}),ie=!$||Math.abs($.tileID.overscaledZ-At)>Math.abs(q.tileID.overscaledZ-At),ve=ie&&q.refreshedUponExpiration?1:s.clamp(ie?Xe:1-at,0,1);return q.refreshedUponExpiration&&Xe>=1&&(q.refreshedUponExpiration=!1),$?{opacity:1,mix:1-ve}:{opacity:ve,mix:0}}return{opacity:1,mix:0}}var Al=new s.Color(1,0,0,1),Ml=new s.Color(0,1,0,1),bu=new s.Color(0,0,1,1),gs=new s.Color(1,0,1,1),ql=new s.Color(0,1,1,1);function Sl(q){var $=q.transform.padding;_u(q,q.transform.height-($.top||0),3,Al),_u(q,$.bottom||0,3,Ml),El(q,$.left||0,3,bu),El(q,q.transform.width-($.right||0),3,gs);var W=q.transform.centerPoint;(function(ae,_e,Re,He){var Xe=20,at=2;nl(ae,_e-at/2,Re-Xe/2,at,Xe,He),nl(ae,_e-Xe/2,Re-at/2,Xe,at,He)})(q,W.x,q.transform.height-W.y,ql)}function _u(q,$,W,ae){nl(q,0,$+W/2,q.transform.width,W,ae)}function El(q,$,W,ae){nl(q,$-W/2,0,W,q.transform.height,ae)}function nl(q,$,W,ae,_e,Re){var He=q.context,Xe=He.gl;Xe.enable(Xe.SCISSOR_TEST),Xe.scissor($*s.browser.devicePixelRatio,W*s.browser.devicePixelRatio,ae*s.browser.devicePixelRatio,_e*s.browser.devicePixelRatio),He.clear({color:Re}),Xe.disable(Xe.SCISSOR_TEST)}function zs(q,$,W){var ae=q.context,_e=ae.gl,Re=W.posMatrix,He=q.useProgram("debug"),Xe=qt.disabled,at=Je.disabled,wt=q.colorModeForRenderPass(),At="$debug";ae.activeTexture.set(_e.TEXTURE0),q.emptyTexture.bind(_e.LINEAR,_e.CLAMP_TO_EDGE),He.draw(ae,_e.LINE_STRIP,Xe,at,wt,Ge.disabled,$o(Re,s.Color.red),At,q.debugBuffer,q.tileBorderIndexBuffer,q.debugSegments);var ie=$.getTileByID(W.key).latestRawTileData,ve=ie&&ie.byteLength||0,Le=Math.floor(ve/1024),Fe=$.getTile(W).tileSize,Ve=512/Math.min(Fe,512)*(W.overscaledZ/q.transform.zoom)*.5,We=W.canonical.toString();W.overscaledZ!==W.canonical.z&&(We+=" => "+W.overscaledZ),function($e,tt){$e.initDebugOverlayCanvas();var lt=$e.debugOverlayCanvas,gt=$e.context.gl,zt=$e.debugOverlayCanvas.getContext("2d");zt.clearRect(0,0,lt.width,lt.height),zt.shadowColor="white",zt.shadowBlur=2,zt.lineWidth=1.5,zt.strokeStyle="white",zt.textBaseline="top",zt.font="bold 36px Open Sans, sans-serif",zt.fillText(tt,5,5),zt.strokeText(tt,5,5),$e.debugOverlayTexture.update(lt),$e.debugOverlayTexture.bind(gt.LINEAR,gt.CLAMP_TO_EDGE)}(q,We+" "+Le+"kb"),He.draw(ae,_e.TRIANGLES,Xe,at,Ke.alphaBlended,Ge.disabled,$o(Re,s.Color.transparent,Ve),At,q.debugBuffer,q.quadTriangleIndexBuffer,q.debugSegments)}var Ds={symbol:function(q,$,W,ae,_e){if(q.renderPass==="translucent"){var Re=Je.disabled,He=q.colorModeForRenderPass();W.layout.get("text-variable-anchor")&&function(Xe,at,wt,At,ie,ve,Le){for(var Fe=at.transform,Ve=ie==="map",We=ve==="map",$e=0,tt=Xe;$e256&&this.clearStencil(),W.setColorMode(Ke.disabled),W.setDepthMode(qt.disabled);var _e=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var Re=0,He=$;Re256&&this.clearStencil();var q=this.nextStencilID++,$=this.context.gl;return new Je({func:$.NOTEQUAL,mask:255},q,255,$.KEEP,$.KEEP,$.REPLACE)},bi.prototype.stencilModeForClipping=function(q){var $=this.context.gl;return new Je({func:$.EQUAL,mask:255},this._tileClippingMaskIDs[q.key],0,$.KEEP,$.KEEP,$.REPLACE)},bi.prototype.stencilConfigForOverlap=function(q){var $,W=this.context.gl,ae=q.sort(function(at,wt){return wt.overscaledZ-at.overscaledZ}),_e=ae[ae.length-1].overscaledZ,Re=ae[0].overscaledZ-_e+1;if(Re>1){this.currentStencilSource=void 0,this.nextStencilID+Re>256&&this.clearStencil();for(var He={},Xe=0;Xe=0;this.currentLayer--){var zt=this.style._layers[ae[this.currentLayer]],Ut=_e[zt.source],Vt=wt[zt.source];this._renderTileClippingMasks(zt,Vt),this.renderLayer(this,Ut,zt,Vt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?$.pop():null},bi.prototype.isPatternMissing=function(q){if(!q)return!1;if(!q.from||!q.to)return!0;var $=this.imageManager.getPattern(q.from.toString()),W=this.imageManager.getPattern(q.to.toString());return!$||!W},bi.prototype.useProgram=function(q,$){this.cache=this.cache||{};var W=""+q+($?$.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[W]||(this.cache[W]=new bo(this.context,hs[q],$,Os[q],this._showOverdrawInspector)),this.cache[W]},bi.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()},bi.prototype.setBaseState=function(){var q=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(q.FUNC_ADD)},bi.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=s.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var q=this.context.gl;this.debugOverlayTexture=new s.Texture(this.context,this.debugOverlayCanvas,q.RGBA)}},bi.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var vs=function(q,$){this.points=q,this.planes=$};vs.fromInvProjectionMatrix=function(q,$,W){var ae=Math.pow(2,W),_e=[[-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]].map(function(He){return s.transformMat4([],He,q)}).map(function(He){return s.scale$1([],He,1/He[3]/$*ae)}),Re=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function(He){var Xe=s.sub([],_e[He[0]],_e[He[1]]),at=s.sub([],_e[He[2]],_e[He[1]]),wt=s.normalize([],s.cross([],Xe,at)),At=-s.dot(wt,_e[He[1]]);return wt.concat(At)});return new vs(_e,Re)};var ms=function(q,$){this.min=q,this.max=$,this.center=s.scale$2([],s.add([],this.min,this.max),.5)};ms.prototype.quadrant=function(q){for(var $=[q%2==0,q<2],W=s.clone$2(this.min),ae=s.clone$2(this.max),_e=0;_e<$.length;_e++)W[_e]=$[_e]?this.min[_e]:this.center[_e],ae[_e]=$[_e]?this.center[_e]:this.max[_e];return ae[2]=this.max[2],new ms(W,ae)},ms.prototype.distanceX=function(q){return Math.max(Math.min(this.max[0],q[0]),this.min[0])-q[0]},ms.prototype.distanceY=function(q){return Math.max(Math.min(this.max[1],q[1]),this.min[1])-q[1]},ms.prototype.intersects=function(q){for(var $=[[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]],W=!0,ae=0;ae=0;if(Re===0)return 0;Re!==$.length&&(W=!1)}if(W)return 2;for(var Xe=0;Xe<3;Xe++){for(var at=Number.MAX_VALUE,wt=-Number.MAX_VALUE,At=0;Atthis.max[Xe]-this.min[Xe])return 0}return 1};var ga=function(q,$,W,ae){if(q===void 0&&(q=0),$===void 0&&($=0),W===void 0&&(W=0),ae===void 0&&(ae=0),isNaN(q)||q<0||isNaN($)||$<0||isNaN(W)||W<0||isNaN(ae)||ae<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=q,this.bottom=$,this.left=W,this.right=ae};ga.prototype.interpolate=function(q,$,W){return $.top!=null&&q.top!=null&&(this.top=s.number(q.top,$.top,W)),$.bottom!=null&&q.bottom!=null&&(this.bottom=s.number(q.bottom,$.bottom,W)),$.left!=null&&q.left!=null&&(this.left=s.number(q.left,$.left,W)),$.right!=null&&q.right!=null&&(this.right=s.number(q.right,$.right,W)),this},ga.prototype.getCenter=function(q,$){var W=s.clamp((this.left+q-this.right)/2,0,q),ae=s.clamp((this.top+$-this.bottom)/2,0,$);return new s.Point(W,ae)},ga.prototype.equals=function(q){return this.top===q.top&&this.bottom===q.bottom&&this.left===q.left&&this.right===q.right},ga.prototype.clone=function(){return new ga(this.top,this.bottom,this.left,this.right)},ga.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var oi=function(q,$,W,ae,_e){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=_e===void 0||_e,this._minZoom=q||0,this._maxZoom=$||22,this._minPitch=W??0,this._maxPitch=ae??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new s.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new ga,this._posMatrixCache={},this._alignedPosMatrixCache={}},li={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}};oi.prototype.clone=function(){var q=new oi(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return q.tileSize=this.tileSize,q.latRange=this.latRange,q.width=this.width,q.height=this.height,q._center=this._center,q.zoom=this.zoom,q.angle=this.angle,q._fov=this._fov,q._pitch=this._pitch,q._unmodified=this._unmodified,q._edgeInsets=this._edgeInsets.clone(),q._calcMatrices(),q},li.minZoom.get=function(){return this._minZoom},li.minZoom.set=function(q){this._minZoom!==q&&(this._minZoom=q,this.zoom=Math.max(this.zoom,q))},li.maxZoom.get=function(){return this._maxZoom},li.maxZoom.set=function(q){this._maxZoom!==q&&(this._maxZoom=q,this.zoom=Math.min(this.zoom,q))},li.minPitch.get=function(){return this._minPitch},li.minPitch.set=function(q){this._minPitch!==q&&(this._minPitch=q,this.pitch=Math.max(this.pitch,q))},li.maxPitch.get=function(){return this._maxPitch},li.maxPitch.set=function(q){this._maxPitch!==q&&(this._maxPitch=q,this.pitch=Math.min(this.pitch,q))},li.renderWorldCopies.get=function(){return this._renderWorldCopies},li.renderWorldCopies.set=function(q){q===void 0?q=!0:q===null&&(q=!1),this._renderWorldCopies=q},li.worldSize.get=function(){return this.tileSize*this.scale},li.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},li.size.get=function(){return new s.Point(this.width,this.height)},li.bearing.get=function(){return-this.angle/Math.PI*180},li.bearing.set=function(q){var $=-s.wrap(q,-180,180)*Math.PI/180;this.angle!==$&&(this._unmodified=!1,this.angle=$,this._calcMatrices(),this.rotationMatrix=s.create$2(),s.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},li.pitch.get=function(){return this._pitch/Math.PI*180},li.pitch.set=function(q){var $=s.clamp(q,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==$&&(this._unmodified=!1,this._pitch=$,this._calcMatrices())},li.fov.get=function(){return this._fov/Math.PI*180},li.fov.set=function(q){q=Math.max(.01,Math.min(60,q)),this._fov!==q&&(this._unmodified=!1,this._fov=q/180*Math.PI,this._calcMatrices())},li.zoom.get=function(){return this._zoom},li.zoom.set=function(q){var $=Math.min(Math.max(q,this.minZoom),this.maxZoom);this._zoom!==$&&(this._unmodified=!1,this._zoom=$,this.scale=this.zoomScale($),this.tileZoom=Math.floor($),this.zoomFraction=$-this.tileZoom,this._constrain(),this._calcMatrices())},li.center.get=function(){return this._center},li.center.set=function(q){q.lat===this._center.lat&&q.lng===this._center.lng||(this._unmodified=!1,this._center=q,this._constrain(),this._calcMatrices())},li.padding.get=function(){return this._edgeInsets.toJSON()},li.padding.set=function(q){this._edgeInsets.equals(q)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,q,1),this._calcMatrices())},li.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},oi.prototype.isPaddingEqual=function(q){return this._edgeInsets.equals(q)},oi.prototype.interpolatePadding=function(q,$,W){this._unmodified=!1,this._edgeInsets.interpolate(q,$,W),this._constrain(),this._calcMatrices()},oi.prototype.coveringZoomLevel=function(q){var $=(q.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/q.tileSize));return Math.max(0,$)},oi.prototype.getVisibleUnwrappedCoordinates=function(q){var $=[new s.UnwrappedTileID(0,q)];if(this._renderWorldCopies)for(var W=this.pointCoordinate(new s.Point(0,0)),ae=this.pointCoordinate(new s.Point(this.width,0)),_e=this.pointCoordinate(new s.Point(this.width,this.height)),Re=this.pointCoordinate(new s.Point(0,this.height)),He=Math.floor(Math.min(W.x,ae.x,_e.x,Re.x)),Xe=Math.floor(Math.max(W.x,ae.x,_e.x,Re.x)),at=He-1;at<=Xe+1;at++)at!==0&&$.push(new s.UnwrappedTileID(at,q));return $},oi.prototype.coveringTiles=function(q){var $=this.coveringZoomLevel(q),W=$;if(q.minzoom!==void 0&&$q.maxzoom&&($=q.maxzoom);var ae=s.MercatorCoordinate.fromLngLat(this.center),_e=Math.pow(2,$),Re=[_e*ae.x,_e*ae.y,0],He=vs.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,$),Xe=q.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Xe=$);var at=function(en){return{aabb:new ms([en*_e,0,0],[(en+1)*_e,_e,0]),zoom:0,x:0,y:0,wrap:en,fullyVisible:!1}},wt=[],At=[],ie=$,ve=q.reparseOverscaled?W:$;if(this._renderWorldCopies)for(var Le=1;Le<=3;Le++)wt.push(at(-Le)),wt.push(at(Le));for(wt.push(at(0));wt.length>0;){var Fe=wt.pop(),Ve=Fe.x,We=Fe.y,$e=Fe.fullyVisible;if(!$e){var tt=Fe.aabb.intersects(He);if(tt===0)continue;$e=tt===2}var lt=Fe.aabb.distanceX(Re),gt=Fe.aabb.distanceY(Re),zt=Math.max(Math.abs(lt),Math.abs(gt)),Ut=3+(1<Ut&&Fe.zoom>=Xe)At.push({tileID:new s.OverscaledTileID(Fe.zoom===ie?ve:Fe.zoom,Fe.wrap,Fe.zoom,Ve,We),distanceSq:s.sqrLen([Re[0]-.5-Ve,Re[1]-.5-We])});else for(var Vt=0;Vt<4;Vt++){var Qt=(Ve<<1)+Vt%2,gn=(We<<1)+(Vt>>1);wt.push({aabb:Fe.aabb.quadrant(Vt),zoom:Fe.zoom+1,x:Qt,y:gn,wrap:Fe.wrap,fullyVisible:$e})}}return At.sort(function(en,sn){return en.distanceSq-sn.distanceSq}).map(function(en){return en.tileID})},oi.prototype.resize=function(q,$){this.width=q,this.height=$,this.pixelsToGLUnits=[2/q,-2/$],this._constrain(),this._calcMatrices()},li.unmodified.get=function(){return this._unmodified},oi.prototype.zoomScale=function(q){return Math.pow(2,q)},oi.prototype.scaleZoom=function(q){return Math.log(q)/Math.LN2},oi.prototype.project=function(q){var $=s.clamp(q.lat,-this.maxValidLatitude,this.maxValidLatitude);return new s.Point(s.mercatorXfromLng(q.lng)*this.worldSize,s.mercatorYfromLat($)*this.worldSize)},oi.prototype.unproject=function(q){return new s.MercatorCoordinate(q.x/this.worldSize,q.y/this.worldSize).toLngLat()},li.point.get=function(){return this.project(this.center)},oi.prototype.setLocationAtPoint=function(q,$){var W=this.pointCoordinate($),ae=this.pointCoordinate(this.centerPoint),_e=this.locationCoordinate(q),Re=new s.MercatorCoordinate(_e.x-(W.x-ae.x),_e.y-(W.y-ae.y));this.center=this.coordinateLocation(Re),this._renderWorldCopies&&(this.center=this.center.wrap())},oi.prototype.locationPoint=function(q){return this.coordinatePoint(this.locationCoordinate(q))},oi.prototype.pointLocation=function(q){return this.coordinateLocation(this.pointCoordinate(q))},oi.prototype.locationCoordinate=function(q){return s.MercatorCoordinate.fromLngLat(q)},oi.prototype.coordinateLocation=function(q){return q.toLngLat()},oi.prototype.pointCoordinate=function(q){var $=[q.x,q.y,0,1],W=[q.x,q.y,1,1];s.transformMat4($,$,this.pixelMatrixInverse),s.transformMat4(W,W,this.pixelMatrixInverse);var ae=$[3],_e=W[3],Re=$[0]/ae,He=W[0]/_e,Xe=$[1]/ae,at=W[1]/_e,wt=$[2]/ae,At=W[2]/_e,ie=wt===At?0:(0-wt)/(At-wt);return new s.MercatorCoordinate(s.number(Re,He,ie)/this.worldSize,s.number(Xe,at,ie)/this.worldSize)},oi.prototype.coordinatePoint=function(q){var $=[q.x*this.worldSize,q.y*this.worldSize,0,1];return s.transformMat4($,$,this.pixelMatrix),new s.Point($[0]/$[3],$[1]/$[3])},oi.prototype.getBounds=function(){return new s.LngLatBounds().extend(this.pointLocation(new s.Point(0,0))).extend(this.pointLocation(new s.Point(this.width,0))).extend(this.pointLocation(new s.Point(this.width,this.height))).extend(this.pointLocation(new s.Point(0,this.height)))},oi.prototype.getMaxBounds=function(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new s.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},oi.prototype.setMaxBounds=function(q){q?(this.lngRange=[q.getWest(),q.getEast()],this.latRange=[q.getSouth(),q.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},oi.prototype.calculatePosMatrix=function(q,$){$===void 0&&($=!1);var W=q.key,ae=$?this._alignedPosMatrixCache:this._posMatrixCache;if(ae[W])return ae[W];var _e=q.canonical,Re=this.worldSize/this.zoomScale(_e.z),He=_e.x+Math.pow(2,_e.z)*q.wrap,Xe=s.identity(new Float64Array(16));return s.translate(Xe,Xe,[He*Re,_e.y*Re,0]),s.scale(Xe,Xe,[Re/s.EXTENT,Re/s.EXTENT,1]),s.multiply(Xe,$?this.alignedProjMatrix:this.projMatrix,Xe),ae[W]=new Float32Array(Xe),ae[W]},oi.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},oi.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var q,$,W,ae,_e=-90,Re=90,He=-180,Xe=180,at=this.size,wt=this._unmodified;if(this.latRange){var At=this.latRange;_e=s.mercatorYfromLat(At[1])*this.worldSize,q=(Re=s.mercatorYfromLat(At[0])*this.worldSize)-_eRe&&(ae=Re-Ve)}if(this.lngRange){var We=ve.x,$e=at.x/2;We-$eXe&&(W=Xe-$e)}W===void 0&&ae===void 0||(this.center=this.unproject(new s.Point(W!==void 0?W:ve.x,ae!==void 0?ae:ve.y))),this._unmodified=wt,this._constraining=!1}},oi.prototype._calcMatrices=function(){if(this.height){var q=this._fov/2,$=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(q)*this.height;var W=Math.PI/2+this._pitch,ae=this._fov*(.5+$.y/this.height),_e=Math.sin(ae)*this.cameraToCenterDistance/Math.sin(s.clamp(Math.PI-W-ae,.01,Math.PI-.01)),Re=this.point,He=Re.x,Xe=Re.y,at=1.01*(Math.cos(Math.PI/2-this._pitch)*_e+this.cameraToCenterDistance),wt=this.height/50,At=new Float64Array(16);s.perspective(At,this._fov,this.width/this.height,wt,at),At[8]=2*-$.x/this.width,At[9]=2*$.y/this.height,s.scale(At,At,[1,-1,1]),s.translate(At,At,[0,0,-this.cameraToCenterDistance]),s.rotateX(At,At,this._pitch),s.rotateZ(At,At,this.angle),s.translate(At,At,[-He,-Xe,0]),this.mercatorMatrix=s.scale([],At,[this.worldSize,this.worldSize,this.worldSize]),s.scale(At,At,[1,1,s.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=At,this.invProjMatrix=s.invert([],this.projMatrix);var ie=this.width%2/2,ve=this.height%2/2,Le=Math.cos(this.angle),Fe=Math.sin(this.angle),Ve=He-Math.round(He)+Le*ie+Fe*ve,We=Xe-Math.round(Xe)+Le*ve+Fe*ie,$e=new Float64Array(At);if(s.translate($e,$e,[Ve>.5?Ve-1:Ve,We>.5?We-1:We,0]),this.alignedProjMatrix=$e,At=s.create(),s.scale(At,At,[this.width/2,-this.height/2,1]),s.translate(At,At,[1,-1,0]),this.labelPlaneMatrix=At,At=s.create(),s.scale(At,At,[1,-1,1]),s.translate(At,At,[-1,-1,0]),s.scale(At,At,[2/this.width,2/this.height,1]),this.glCoordMatrix=At,this.pixelMatrix=s.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(At=s.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=At,this._posMatrixCache={},this._alignedPosMatrixCache={}}},oi.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var q=this.pointCoordinate(new s.Point(0,0)),$=[q.x*this.worldSize,q.y*this.worldSize,0,1];return s.transformMat4($,$,this.pixelMatrix)[3]/this.cameraToCenterDistance},oi.prototype.getCameraPoint=function(){var q=this._pitch,$=Math.tan(q)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new s.Point(0,$))},oi.prototype.getCameraQueryGeometry=function(q){var $=this.getCameraPoint();if(q.length===1)return[q[0],$];for(var W=$.x,ae=$.y,_e=$.x,Re=$.y,He=0,Xe=q;He=3&&!q.some(function(W){return isNaN(W)})){var $=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(q[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+q[2],+q[1]],zoom:+q[0],bearing:$,pitch:+(q[4]||0)}),!0}return!1},es.prototype._updateHashUnthrottled=function(){var q=this.getHashString();try{s.window.history.replaceState(s.window.history.state,"",q)}catch{}};var zo={linearity:.3,easing:s.bezier(0,0,.3,1)},Gl=s.extend({deceleration:2500,maxSpeed:1400},zo),wu=s.extend({deceleration:20,maxSpeed:1400},zo),Fs=s.extend({deceleration:1e3,maxSpeed:360},zo),Tu=s.extend({deceleration:1e3,maxSpeed:90},zo),Bs=function(q){this._map=q,this.clear()};function ts(q,$){(!q.duration||q.duration<$.duration)&&(q.duration=$.duration,q.easing=$.easing)}function Ns(q,$,W){var ae=W.maxSpeed,_e=W.linearity,Re=W.deceleration,He=s.clamp(q*_e/($/1e3),-ae,ae),Xe=Math.abs(He)/(Re*_e);return{easing:W.easing,duration:1e3*Xe,amount:He*(Xe/2)}}Bs.prototype.clear=function(){this._inertiaBuffer=[]},Bs.prototype.record=function(q){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:s.browser.now(),settings:q})},Bs.prototype._drainInertiaBuffer=function(){for(var q=this._inertiaBuffer,$=s.browser.now();q.length>0&&$-q[0].time>160;)q.shift()},Bs.prototype._onMoveEnd=function(q){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var $={zoom:0,bearing:0,pitch:0,pan:new s.Point(0,0),pinchAround:void 0,around:void 0},W=0,ae=this._inertiaBuffer;W=this._clickTolerance||this._map.fire(new Oi(q.type,this._map,q))},$i.prototype.dblclick=function(q){return this._firePreventable(new Oi(q.type,this._map,q))},$i.prototype.mouseover=function(q){this._map.fire(new Oi(q.type,this._map,q))},$i.prototype.mouseout=function(q){this._map.fire(new Oi(q.type,this._map,q))},$i.prototype.touchstart=function(q){return this._firePreventable(new Do(q.type,this._map,q))},$i.prototype.touchmove=function(q){this._map.fire(new Do(q.type,this._map,q))},$i.prototype.touchend=function(q){this._map.fire(new Do(q.type,this._map,q))},$i.prototype.touchcancel=function(q){this._map.fire(new Do(q.type,this._map,q))},$i.prototype._firePreventable=function(q){if(this._map.fire(q),q.defaultPrevented)return{}},$i.prototype.isEnabled=function(){return!0},$i.prototype.isActive=function(){return!1},$i.prototype.enable=function(){},$i.prototype.disable=function(){};var va=function(q){this._map=q};va.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},va.prototype.mousemove=function(q){this._map.fire(new Oi(q.type,this._map,q))},va.prototype.mousedown=function(){this._delayContextMenu=!0},va.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Oi("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},va.prototype.contextmenu=function(q){this._delayContextMenu?this._contextMenuEvent=q:this._map.fire(new Oi(q.type,this._map,q)),this._map.listens("contextmenu")&&q.preventDefault()},va.prototype.isEnabled=function(){return!0},va.prototype.isActive=function(){return!1},va.prototype.enable=function(){},va.prototype.disable=function(){};var ma=function(q,$){this._map=q,this._el=q.getCanvasContainer(),this._container=q.getContainer(),this._clickTolerance=$.clickTolerance||1};function ha(q,$){for(var W={},ae=0;aethis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=q.timeStamp),W.length===this.numTouches&&(this.centroid=function(ae){for(var _e=new s.Point(0,0),Re=0,He=ae;Re30)&&(this.aborted=!0)}}},Ia.prototype.touchend=function(q,$,W){if((!this.centroid||q.timeStamp-this.startTime>500)&&(this.aborted=!0),W.length===0){var ae=!this.aborted&&this.centroid;if(this.reset(),ae)return ae}};var ys=function(q){this.singleTap=new Ia(q),this.numTaps=q.numTaps,this.reset()};ys.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},ys.prototype.touchstart=function(q,$,W){this.singleTap.touchstart(q,$,W)},ys.prototype.touchmove=function(q,$,W){this.singleTap.touchmove(q,$,W)},ys.prototype.touchend=function(q,$,W){var ae=this.singleTap.touchend(q,$,W);if(ae){var _e=q.timeStamp-this.lastTime<500,Re=!this.lastTap||this.lastTap.dist(ae)<30;if(_e&&Re||this.reset(),this.count++,this.lastTime=q.timeStamp,this.lastTap=ae,this.count===this.numTaps)return this.reset(),ae}};var lo=function(){this._zoomIn=new ys({numTouches:1,numTaps:2}),this._zoomOut=new ys({numTouches:2,numTaps:1}),this.reset()};lo.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},lo.prototype.touchstart=function(q,$,W){this._zoomIn.touchstart(q,$,W),this._zoomOut.touchstart(q,$,W)},lo.prototype.touchmove=function(q,$,W){this._zoomIn.touchmove(q,$,W),this._zoomOut.touchmove(q,$,W)},lo.prototype.touchend=function(q,$,W){var ae=this,_e=this._zoomIn.touchend(q,$,W),Re=this._zoomOut.touchend(q,$,W);return _e?(this._active=!0,q.preventDefault(),setTimeout(function(){return ae.reset()},0),{cameraAnimation:function(He){return He.easeTo({duration:300,zoom:He.getZoom()+1,around:He.unproject(_e)},{originalEvent:q})}}):Re?(this._active=!0,q.preventDefault(),setTimeout(function(){return ae.reset()},0),{cameraAnimation:function(He){return He.easeTo({duration:300,zoom:He.getZoom()-1,around:He.unproject(Re)},{originalEvent:q})}}):void 0},lo.prototype.touchcancel=function(){this.reset()},lo.prototype.enable=function(){this._enabled=!0},lo.prototype.disable=function(){this._enabled=!1,this.reset()},lo.prototype.isEnabled=function(){return this._enabled},lo.prototype.isActive=function(){return this._active};var ea=function(q){this.reset(),this._clickTolerance=q.clickTolerance||1};ea.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},ea.prototype._correctButton=function(q,$){return!1},ea.prototype._move=function(q,$){return{}},ea.prototype.mousedown=function(q,$){if(!this._lastPoint){var W=m.mouseButton(q);this._correctButton(q,W)&&(this._lastPoint=$,this._eventButton=W)}},ea.prototype.mousemoveWindow=function(q,$){var W=this._lastPoint;if(W&&(q.preventDefault(),this._moved||!($.dist(W)0&&(this._active=!0);var ae=ha(W,$),_e=new s.Point(0,0),Re=new s.Point(0,0),He=0;for(var Xe in ae){var at=ae[Xe],wt=this._touches[Xe];wt&&(_e._add(at),Re._add(at.sub(wt)),He++,ae[Xe]=at)}if(this._touches=ae,!(HeMath.abs(q.x)}var Or=function(q){function $(){q.apply(this,arguments)}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.reset=function(){q.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},$.prototype._start=function(W){this._lastPoints=W,al(W[0].sub(W[1]))&&(this._valid=!1)},$.prototype._move=function(W,ae,_e){var Re=W[0].sub(this._lastPoints[0]),He=W[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(Re,He,_e.timeStamp),this._valid)return this._lastPoints=W,this._active=!0,{pitchDelta:(Re.y+He.y)/2*-.5}},$.prototype.gestureBeginsVertically=function(W,ae,_e){if(this._valid!==void 0)return this._valid;var Re=W.mag()>=2,He=ae.mag()>=2;if(Re||He){if(!Re||!He)return this._firstMove===void 0&&(this._firstMove=_e),_e-this._firstMove<100&&void 0;var Xe=W.y>0==ae.y>0;return al(W)&&al(ae)&&Xe}},$}(Cr),ol={panStep:100,bearingStep:15,pitchStep:10},uo=function(){var q=ol;this._panStep=q.panStep,this._bearingStep=q.bearingStep,this._pitchStep=q.pitchStep};function Xl(q){return q*(2-q)}uo.prototype.reset=function(){this._active=!1},uo.prototype.keydown=function(q){var $=this;if(!(q.altKey||q.ctrlKey||q.metaKey)){var W=0,ae=0,_e=0,Re=0,He=0;switch(q.keyCode){case 61:case 107:case 171:case 187:W=1;break;case 189:case 109:case 173:W=-1;break;case 37:q.shiftKey?ae=-1:(q.preventDefault(),Re=-1);break;case 39:q.shiftKey?ae=1:(q.preventDefault(),Re=1);break;case 38:q.shiftKey?_e=1:(q.preventDefault(),He=-1);break;case 40:q.shiftKey?_e=-1:(q.preventDefault(),He=1);break;default:return}return{cameraAnimation:function(Xe){var at=Xe.getZoom();Xe.easeTo({duration:300,easeId:"keyboardHandler",easing:Xl,zoom:W?Math.round(at)+W*(q.shiftKey?2:1):at,bearing:Xe.getBearing()+ae*$._bearingStep,pitch:Xe.getPitch()+_e*$._pitchStep,offset:[-Re*$._panStep,-He*$._panStep],center:Xe.getCenter()},{originalEvent:q})}}}},uo.prototype.enable=function(){this._enabled=!0},uo.prototype.disable=function(){this._enabled=!1,this.reset()},uo.prototype.isEnabled=function(){return this._enabled},uo.prototype.isActive=function(){return this._active};var Cl=4.000244140625,ya=function(q,$){this._map=q,this._el=q.getCanvasContainer(),this._handler=$,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,s.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};ya.prototype.setZoomRate=function(q){this._defaultZoomRate=q},ya.prototype.setWheelZoomRate=function(q){this._wheelZoomRate=q},ya.prototype.isEnabled=function(){return!!this._enabled},ya.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},ya.prototype.isZooming=function(){return!!this._zooming},ya.prototype.enable=function(q){this.isEnabled()||(this._enabled=!0,this._aroundCenter=q&&q.around==="center")},ya.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},ya.prototype.wheel=function(q){if(this.isEnabled()){var $=q.deltaMode===s.window.WheelEvent.DOM_DELTA_LINE?40*q.deltaY:q.deltaY,W=s.browser.now(),ae=W-(this._lastWheelEventTime||0);this._lastWheelEventTime=W,$!==0&&$%Cl==0?this._type="wheel":$!==0&&Math.abs($)<4?this._type="trackpad":ae>400?(this._type=null,this._lastValue=$,this._timeout=setTimeout(this._onTimeout,40,q)):this._type||(this._type=Math.abs(ae*$)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,$+=this._lastValue)),q.shiftKey&&$&&($/=4),this._type&&(this._lastWheelEvent=q,this._delta-=$,this._active||this._start(q)),q.preventDefault()}},ya.prototype._onTimeout=function(q){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(q)},ya.prototype._start=function(q){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 $=m.mousePos(this._el,q);this._around=s.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject($)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},ya.prototype.renderFrame=function(){return this._onScrollFrame()},ya.prototype._onScrollFrame=function(){var q=this;if(this._frameId&&(this._frameId=null,this.isActive())){var $=this._map.transform;if(this._delta!==0){var W=this._type==="wheel"&&Math.abs(this._delta)>Cl?this._wheelZoomRate:this._defaultZoomRate,ae=2/(1+Math.exp(-Math.abs(this._delta*W)));this._delta<0&&ae!==0&&(ae=1/ae);var _e=typeof this._targetZoom=="number"?$.zoomScale(this._targetZoom):$.scale;this._targetZoom=Math.min($.maxZoom,Math.max($.minZoom,$.scaleZoom(_e*ae))),this._type==="wheel"&&(this._startZoom=$.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var Re,He=typeof this._targetZoom=="number"?this._targetZoom:$.zoom,Xe=this._startZoom,at=this._easing,wt=!1;if(this._type==="wheel"&&Xe&&at){var At=Math.min((s.browser.now()-this._lastWheelEventTime)/200,1),ie=at(At);Re=s.number(Xe,He,ie),At<1?this._frameId||(this._frameId=!0):wt=!0}else Re=He,wt=!0;return this._active=!0,wt&&(this._active=!1,this._finishTimeout=setTimeout(function(){q._zooming=!1,q._handler._triggerRenderFrame(),delete q._targetZoom,delete q._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!wt,zoomDelta:Re-$.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},ya.prototype._smoothOutEasing=function(q){var $=s.ease;if(this._prevEase){var W=this._prevEase,ae=(s.browser.now()-W.start)/W.duration,_e=W.easing(ae+.01)-W.easing(ae),Re=.27/Math.sqrt(_e*_e+1e-4)*.01,He=Math.sqrt(.0729-Re*Re);$=s.bezier(Re,He,.25,1)}return this._prevEase={start:s.browser.now(),duration:q,easing:$},$},ya.prototype.reset=function(){this._active=!1};var Vs=function(q,$){this._clickZoom=q,this._tapZoom=$};Vs.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Vs.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Vs.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Vs.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var ns=function(){this.reset()};ns.prototype.reset=function(){this._active=!1},ns.prototype.dblclick=function(q,$){return q.preventDefault(),{cameraAnimation:function(W){W.easeTo({duration:300,zoom:W.getZoom()+(q.shiftKey?-1:1),around:W.unproject($)},{originalEvent:q})}}},ns.prototype.enable=function(){this._enabled=!0},ns.prototype.disable=function(){this._enabled=!1,this.reset()},ns.prototype.isEnabled=function(){return this._enabled},ns.prototype.isActive=function(){return this._active};var Wa=function(){this._tap=new ys({numTouches:1,numTaps:1}),this.reset()};Wa.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Wa.prototype.touchstart=function(q,$,W){this._swipePoint||(this._tapTime&&q.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?W.length>0&&(this._swipePoint=$[0],this._swipeTouch=W[0].identifier):this._tap.touchstart(q,$,W))},Wa.prototype.touchmove=function(q,$,W){if(this._tapTime){if(this._swipePoint){if(W[0].identifier!==this._swipeTouch)return;var ae=$[0],_e=ae.y-this._swipePoint.y;return this._swipePoint=ae,q.preventDefault(),this._active=!0,{zoomDelta:_e/128}}}else this._tap.touchmove(q,$,W)},Wa.prototype.touchend=function(q,$,W){this._tapTime?this._swipePoint&&W.length===0&&this.reset():this._tap.touchend(q,$,W)&&(this._tapTime=q.timeStamp)},Wa.prototype.touchcancel=function(){this.reset()},Wa.prototype.enable=function(){this._enabled=!0},Wa.prototype.disable=function(){this._enabled=!1,this.reset()},Wa.prototype.isEnabled=function(){return this._enabled},Wa.prototype.isActive=function(){return this._active};var xs=function(q,$,W){this._el=q,this._mousePan=$,this._touchPan=W};xs.prototype.enable=function(q){this._inertiaOptions=q||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},xs.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},xs.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},xs.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var _o=function(q,$,W){this._pitchWithRotate=q.pitchWithRotate,this._mouseRotate=$,this._mousePitch=W};_o.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},_o.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},_o.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},_o.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var co=function(q,$,W,ae){this._el=q,this._touchZoom=$,this._touchRotate=W,this._tapDragZoom=ae,this._rotationDisabled=!1,this._enabled=!0};co.prototype.enable=function(q){this._touchZoom.enable(q),this._rotationDisabled||this._touchRotate.enable(q),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},co.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},co.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},co.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},co.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},co.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Hs=function(q){return q.zoom||q.drag||q.pitch||q.rotate},xa=function(q){function $(){q.apply(this,arguments)}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$}(s.Event);function fo(q){return q.panDelta&&q.panDelta.mag()||q.zoomDelta||q.bearingDelta||q.pitchDelta}var vi=function(q,$){this._map=q,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Bs(q),this._bearingSnap=$.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers($),s.bindAll(["handleEvent","handleWindowEvent"],this);var W=this._el;this._listeners=[[W,"touchstart",{passive:!1}],[W,"touchmove",{passive:!1}],[W,"touchend",void 0],[W,"touchcancel",void 0],[W,"mousedown",void 0],[W,"mousemove",void 0],[W,"mouseup",void 0],[s.window.document,"mousemove",{capture:!0}],[s.window.document,"mouseup",void 0],[W,"mouseover",void 0],[W,"mouseout",void 0],[W,"dblclick",void 0],[W,"click",void 0],[W,"keydown",{capture:!1}],[W,"keyup",void 0],[W,"wheel",{passive:!1}],[W,"contextmenu",void 0],[s.window,"blur",void 0]];for(var ae=0,_e=this._listeners;ae<_e.length;ae+=1){var Re=_e[ae],He=Re[0],Xe=Re[1],at=Re[2];m.addEventListener(He,Xe,He===s.window.document?this.handleWindowEvent:this.handleEvent,at)}};vi.prototype.destroy=function(){for(var q=0,$=this._listeners;q<$.length;q+=1){var W=$[q],ae=W[0],_e=W[1],Re=W[2];m.removeEventListener(ae,_e,ae===s.window.document?this.handleWindowEvent:this.handleEvent,Re)}},vi.prototype._addDefaultHandlers=function(q){var $=this._map,W=$.getCanvasContainer();this._add("mapEvent",new $i($,q));var ae=$.boxZoom=new ma($,q);this._add("boxZoom",ae);var _e=new lo,Re=new ns;$.doubleClickZoom=new Vs(Re,_e),this._add("tapZoom",_e),this._add("clickZoom",Re);var He=new Wa;this._add("tapDragZoom",He);var Xe=$.touchPitch=new Or;this._add("touchPitch",Xe);var at=new Wl(q),wt=new Zl(q);$.dragRotate=new _o(q,at,wt),this._add("mouseRotate",at,["mousePitch"]),this._add("mousePitch",wt,["mouseRotate"]);var At=new Ga(q),ie=new Sa(q);$.dragPan=new xs(W,At,ie),this._add("mousePan",At),this._add("touchPan",ie,["touchZoom","touchRotate"]);var ve=new il,Le=new Yl;$.touchZoomRotate=new co(W,Le,ve,He),this._add("touchRotate",ve,["touchPan","touchZoom"]),this._add("touchZoom",Le,["touchPan","touchRotate"]);var Fe=$.scrollZoom=new ya($,this);this._add("scrollZoom",Fe,["mousePan"]);var Ve=$.keyboard=new uo;this._add("keyboard",Ve),this._add("blockableMapEvent",new va($));for(var We=0,$e=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];We<$e.length;We+=1){var tt=$e[We];q.interactive&&q[tt]&&$[tt].enable(q[tt])}},vi.prototype._add=function(q,$,W){this._handlers.push({handlerName:q,handler:$,allowed:W}),this._handlersById[q]=$},vi.prototype.stop=function(){if(!this._updatingCamera){for(var q=0,$=this._handlers;q<$.length;q+=1)$[q].handler.reset();this._inertia.clear(),this._fireEvents({},{}),this._changes=[]}},vi.prototype.isActive=function(){for(var q=0,$=this._handlers;q<$.length;q+=1)if($[q].handler.isActive())return!0;return!1},vi.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},vi.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},vi.prototype.isMoving=function(){return!!Hs(this._eventsInProgress)||this.isZooming()},vi.prototype._blockedByActive=function(q,$,W){for(var ae in q)if(ae!==W&&(!$||$.indexOf(ae)<0))return!0;return!1},vi.prototype.handleWindowEvent=function(q){this.handleEvent(q,q.type+"Window")},vi.prototype._getMapTouches=function(q){for(var $=[],W=0,ae=q;WHe?Math.min(2,Ut):Math.max(.5,Ut),sn=Math.pow(en,1-Qt),rn=Re.unproject(gt.add(zt.mult(Qt*sn)).mult(gn));Re.setLocationAtPoint(Re.renderWorldCopies?rn.wrap():rn,Ve)}_e._fireMoveEvents(ae)},function(Qt){_e._afterEase(ae,Qt)},W),this},$.prototype._prepareEase=function(W,ae,_e){_e===void 0&&(_e={}),this._moving=!0,ae||_e.moving||this.fire(new s.Event("movestart",W)),this._zooming&&!_e.zooming&&this.fire(new s.Event("zoomstart",W)),this._rotating&&!_e.rotating&&this.fire(new s.Event("rotatestart",W)),this._pitching&&!_e.pitching&&this.fire(new s.Event("pitchstart",W))},$.prototype._fireMoveEvents=function(W){this.fire(new s.Event("move",W)),this._zooming&&this.fire(new s.Event("zoom",W)),this._rotating&&this.fire(new s.Event("rotate",W)),this._pitching&&this.fire(new s.Event("pitch",W))},$.prototype._afterEase=function(W,ae){if(!this._easeId||!ae||this._easeId!==ae){delete this._easeId;var _e=this._zooming,Re=this._rotating,He=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,_e&&this.fire(new s.Event("zoomend",W)),Re&&this.fire(new s.Event("rotateend",W)),He&&this.fire(new s.Event("pitchend",W)),this.fire(new s.Event("moveend",W))}},$.prototype.flyTo=function(W,ae){var _e=this;if(!W.essential&&s.browser.prefersReducedMotion){var Re=s.pick(W,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Re,ae)}this.stop(),W=s.extend({offset:[0,0],speed:1.2,curve:1.42,easing:s.ease},W);var He=this.transform,Xe=this.getZoom(),at=this.getBearing(),wt=this.getPitch(),At=this.getPadding(),ie="zoom"in W?s.clamp(+W.zoom,He.minZoom,He.maxZoom):Xe,ve="bearing"in W?this._normalizeBearing(W.bearing,at):at,Le="pitch"in W?+W.pitch:wt,Fe="padding"in W?W.padding:He.padding,Ve=He.zoomScale(ie-Xe),We=s.Point.convert(W.offset),$e=He.centerPoint.add(We),tt=He.pointLocation($e),lt=s.LngLat.convert(W.center||tt);this._normalizeCenter(lt);var gt=He.project(tt),zt=He.project(lt).sub(gt),Ut=W.curve,Vt=Math.max(He.width,He.height),Qt=Vt/Ve,gn=zt.mag();if("minZoom"in W){var en=s.clamp(Math.min(W.minZoom,Xe,ie),He.minZoom,He.maxZoom),sn=Vt/He.zoomScale(en-Xe);Ut=Math.sqrt(sn/gn*2)}var rn=Ut*Ut;function Mn(mr){var _r=(Qt*Qt-Vt*Vt+(mr?-1:1)*rn*rn*gn*gn)/(2*(mr?Qt:Vt)*rn*gn);return Math.log(Math.sqrt(_r*_r+1)-_r)}function xn(mr){return(Math.exp(mr)-Math.exp(-mr))/2}function an(mr){return(Math.exp(mr)+Math.exp(-mr))/2}var zn=Mn(0),Un=function(mr){return an(zn)/an(zn+Ut*mr)},nr=function(mr){return Vt*((an(zn)*(xn(_r=zn+Ut*mr)/an(_r))-xn(zn))/rn)/gn;var _r},rr=(Mn(1)-zn)/Ut;if(Math.abs(gn)<1e-6||!isFinite(rr)){if(Math.abs(Vt-Qt)<1e-6)return this.easeTo(W,ae);var wr=QtW.maxDuration&&(W.duration=0),this._zooming=!0,this._rotating=at!==ve,this._pitching=Le!==wt,this._padding=!He.isPaddingEqual(Fe),this._prepareEase(ae,!1),this._ease(function(mr){var _r=mr*rr,Rr=1/Un(_r);He.zoom=mr===1?ie:Xe+He.scaleZoom(Rr),_e._rotating&&(He.bearing=s.number(at,ve,mr)),_e._pitching&&(He.pitch=s.number(wt,Le,mr)),_e._padding&&(He.interpolatePadding(At,Fe,mr),$e=He.centerPoint.add(We));var Jr=mr===1?lt:He.unproject(gt.add(zt.mult(nr(_r))).mult(Rr));He.setLocationAtPoint(He.renderWorldCopies?Jr.wrap():Jr,$e),_e._fireMoveEvents(ae)},function(){return _e._afterEase(ae)},W),this},$.prototype.isEasing=function(){return!!this._easeFrameId},$.prototype.stop=function(){return this._stop()},$.prototype._stop=function(W,ae){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var _e=this._onEaseEnd;delete this._onEaseEnd,_e.call(this,ae)}if(!W){var Re=this.handlers;Re&&Re.stop()}return this},$.prototype._ease=function(W,ae,_e){_e.animate===!1||_e.duration===0?(W(1),ae()):(this._easeStart=s.browser.now(),this._easeOptions=_e,this._onEaseFrame=W,this._onEaseEnd=ae,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},$.prototype._renderFrameCallback=function(){var W=Math.min((s.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(W)),W<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},$.prototype._normalizeBearing=function(W,ae){W=s.wrap(W,-180,180);var _e=Math.abs(W-ae);return Math.abs(W-360-ae)<_e&&(W-=360),Math.abs(W+360-ae)<_e&&(W+=360),W},$.prototype._normalizeCenter=function(W){var ae=this.transform;if(ae.renderWorldCopies&&!ae.lngRange){var _e=W.lng-ae.center.lng;W.lng+=_e>180?-360:_e<-180?360:0}},$}(s.Evented),to=function(q){q===void 0&&(q={}),this.options=q,s.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};to.prototype.getDefaultPosition=function(){return"bottom-right"},to.prototype.onAdd=function(q){var $=this.options&&this.options.compact;return this._map=q,this._container=m.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=m.create("div","mapboxgl-ctrl-attrib-inner",this._container),$&&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),$===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},to.prototype.onRemove=function(){m.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},to.prototype._updateEditLink=function(){var q=this._editLink;q||(q=this._editLink=this._container.querySelector(".mapbox-improve-map"));var $=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||s.config.ACCESS_TOKEN}];if(q){var W=$.reduce(function(ae,_e,Re){return _e.value&&(ae+=_e.key+"="+_e.value+(Re<$.length-1?"&":"")),ae},"?");q.href=s.config.FEEDBACK_URL+"/"+W+(this._map._hash?this._map._hash.getHashString(!0):""),q.rel="noopener nofollow"}},to.prototype._updateData=function(q){!q||q.sourceDataType!=="metadata"&&q.dataType!=="style"||(this._updateAttributions(),this._updateEditLink())},to.prototype._updateAttributions=function(){if(this._map.style){var q=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?q=q.concat(this.options.customAttribution.map(function(Xe){return typeof Xe!="string"?"":Xe})):typeof this.options.customAttribution=="string"&&q.push(this.options.customAttribution)),this._map.style.stylesheet){var $=this._map.style.stylesheet;this.styleOwner=$.owner,this.styleId=$.id}var W=this._map.style.sourceCaches;for(var ae in W){var _e=W[ae];if(_e.used){var Re=_e.getSource();Re.attribution&&q.indexOf(Re.attribution)<0&&q.push(Re.attribution)}}q.sort(function(Xe,at){return Xe.length-at.length});var He=(q=q.filter(function(Xe,at){for(var wt=at+1;wt=0)return!1;return!0})).join(" | ");He!==this._attribHTML&&(this._attribHTML=He,q.length?(this._innerContainer.innerHTML=He,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},to.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var ho=function(){s.bindAll(["_updateLogo"],this),s.bindAll(["_updateCompact"],this)};ho.prototype.onAdd=function(q){this._map=q,this._container=m.create("div","mapboxgl-ctrl");var $=m.create("a","mapboxgl-ctrl-logo");return $.target="_blank",$.rel="noopener nofollow",$.href="https://www.mapbox.com/",$.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),$.setAttribute("rel","noopener nofollow"),this._container.appendChild($),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},ho.prototype.onRemove=function(){m.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},ho.prototype.getDefaultPosition=function(){return"bottom-left"},ho.prototype._updateLogo=function(q){q&&q.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")},ho.prototype._logoRequired=function(){if(this._map.style){var q=this._map.style.sourceCaches;for(var $ in q)if(q[$].getSource().mapbox_logo)return!0;return!1}},ho.prototype._updateCompact=function(){var q=this._container.children;if(q.length){var $=q[0];this._map.getCanvasContainer().offsetWidth<250?$.classList.add("mapboxgl-compact"):$.classList.remove("mapboxgl-compact")}};var Fo=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Fo.prototype.add=function(q){var $=++this._id;return this._queue.push({callback:q,id:$,cancelled:!1}),$},Fo.prototype.remove=function(q){for(var $=this._currentlyRunning,W=0,ae=$?this._queue.concat($):this._queue;Wae.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<0)throw new Error("minPitch must be greater than or equal to 0");if(ae.maxPitch!=null&&ae.maxPitch>Da)throw new Error("maxPitch must be less than or equal to 60");var Re=new oi(ae.minZoom,ae.maxZoom,ae.minPitch,ae.maxPitch,ae.renderWorldCopies);if(q.call(this,Re,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 Fo,this._controls=[],this._mapId=s.uniqueId(),this._locale=s.extend({},za,ae.locale),this._requestManager=new s.RequestManager(ae.transformRequest,ae.accessToken),typeof ae.container=="string"){if(this._container=s.window.document.getElementById(ae.container),!this._container)throw new Error("Container '"+ae.container+"' not found.")}else{if(!(ae.container instanceof oa))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=ae.container}if(ae.maxBounds&&this.setMaxBounds(ae.maxBounds),s.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 _e._update(!1)}),this.on("moveend",function(){return _e._update(!1)}),this.on("zoom",function(){return _e._update(!0)}),s.window!==void 0&&(s.window.addEventListener("online",this._onWindowOnline,!1),s.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new vi(this,ae);var He=typeof ae.hash=="string"&&ae.hash||void 0;this._hash=ae.hash&&new es(He).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,s.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 to({customAttribution:ae.customAttribution})),this.addControl(new ho,ae.logoPosition),this.on("style.load",function(){_e.transform.unmodified&&_e.jumpTo(_e.style.stylesheet)}),this.on("data",function(Xe){_e._update(Xe.dataType==="style"),_e.fire(new s.Event(Xe.dataType+"data",Xe))}),this.on("dataloading",function(Xe){_e.fire(new s.Event(Xe.dataType+"dataloading",Xe))})}q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$;var W={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return $.prototype._getMapId=function(){return this._mapId},$.prototype.addControl=function(ae,_e){if(_e===void 0&&ae.getDefaultPosition&&(_e=ae.getDefaultPosition()),_e===void 0&&(_e="top-right"),!ae||!ae.onAdd)return this.fire(new s.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var Re=ae.onAdd(this);this._controls.push(ae);var He=this._controlPositions[_e];return _e.indexOf("bottom")!==-1?He.insertBefore(Re,He.firstChild):He.appendChild(Re),this},$.prototype.removeControl=function(ae){if(!ae||!ae.onRemove)return this.fire(new s.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var _e=this._controls.indexOf(ae);return _e>-1&&this._controls.splice(_e,1),ae.onRemove(this),this},$.prototype.resize=function(ae){var _e=this._containerDimensions(),Re=_e[0],He=_e[1];this._resizeCanvas(Re,He),this.transform.resize(Re,He),this.painter.resize(Re,He);var Xe=!this._moving;return Xe&&(this.stop(),this.fire(new s.Event("movestart",ae)).fire(new s.Event("move",ae))),this.fire(new s.Event("resize",ae)),Xe&&this.fire(new s.Event("moveend",ae)),this},$.prototype.getBounds=function(){return this.transform.getBounds()},$.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},$.prototype.setMaxBounds=function(ae){return this.transform.setMaxBounds(s.LngLatBounds.convert(ae)),this._update()},$.prototype.setMinZoom=function(ae){if((ae=ae??-2)>=-2&&ae<=this.transform.maxZoom)return this.transform.minZoom=ae,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=ae,this._update(),this.getZoom()>ae&&this.setZoom(ae),this;throw new Error("maxZoom must be greater than the current minZoom")},$.prototype.getMaxZoom=function(){return this.transform.maxZoom},$.prototype.setMinPitch=function(ae){if((ae=ae??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(ae>=0&&ae<=this.transform.maxPitch)return this.transform.minPitch=ae,this._update(),this.getPitch()Da)throw new Error("maxPitch must be less than or equal to 60");if(ae>=this.transform.minPitch)return this.transform.maxPitch=ae,this._update(),this.getPitch()>ae&&this.setPitch(ae),this;throw new Error("maxPitch must be greater than the current minPitch")},$.prototype.getMaxPitch=function(){return this.transform.maxPitch},$.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},$.prototype.setRenderWorldCopies=function(ae){return this.transform.renderWorldCopies=ae,this._update()},$.prototype.project=function(ae){return this.transform.locationPoint(s.LngLat.convert(ae))},$.prototype.unproject=function(ae){return this.transform.pointLocation(s.Point.convert(ae))},$.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},$.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},$.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},$.prototype._createDelegatedListener=function(ae,_e,Re){var He,Xe=this;if(ae==="mouseenter"||ae==="mouseover"){var at=!1;return{layer:_e,listener:Re,delegates:{mousemove:function(At){var ie=Xe.getLayer(_e)?Xe.queryRenderedFeatures(At.point,{layers:[_e]}):[];ie.length?at||(at=!0,Re.call(Xe,new Oi(ae,Xe,At.originalEvent,{features:ie}))):at=!1},mouseout:function(){at=!1}}}}if(ae==="mouseleave"||ae==="mouseout"){var wt=!1;return{layer:_e,listener:Re,delegates:{mousemove:function(At){(Xe.getLayer(_e)?Xe.queryRenderedFeatures(At.point,{layers:[_e]}):[]).length?wt=!0:wt&&(wt=!1,Re.call(Xe,new Oi(ae,Xe,At.originalEvent)))},mouseout:function(At){wt&&(wt=!1,Re.call(Xe,new Oi(ae,Xe,At.originalEvent)))}}}}return{layer:_e,listener:Re,delegates:(He={},He[ae]=function(At){var ie=Xe.getLayer(_e)?Xe.queryRenderedFeatures(At.point,{layers:[_e]}):[];ie.length&&(At.features=ie,Re.call(Xe,At),delete At.features)},He)}},$.prototype.on=function(ae,_e,Re){if(Re===void 0)return q.prototype.on.call(this,ae,_e);var He=this._createDelegatedListener(ae,_e,Re);for(var Xe in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[ae]=this._delegatedListeners[ae]||[],this._delegatedListeners[ae].push(He),He.delegates)this.on(Xe,He.delegates[Xe]);return this},$.prototype.once=function(ae,_e,Re){if(Re===void 0)return q.prototype.once.call(this,ae,_e);var He=this._createDelegatedListener(ae,_e,Re);for(var Xe in He.delegates)this.once(Xe,He.delegates[Xe]);return this},$.prototype.off=function(ae,_e,Re){var He=this;return Re===void 0?q.prototype.off.call(this,ae,_e):(this._delegatedListeners&&this._delegatedListeners[ae]&&function(Xe){for(var at=Xe[ae],wt=0;wt180;){var He=W.locationPoint(q);if(He.x>=0&&He.y>=0&&He.x<=W.width&&He.y<=W.height)break;q.lng>W.center.lng?q.lng-=360:q.lng+=360}return q}Fr.prototype.down=function(q,$){this.mouseRotate.mousedown(q,$),this.mousePitch&&this.mousePitch.mousedown(q,$),m.disableDrag()},Fr.prototype.move=function(q,$){var W=this.map,ae=this.mouseRotate.mousemoveWindow(q,$);if(ae&&ae.bearingDelta&&W.setBearing(W.getBearing()+ae.bearingDelta),this.mousePitch){var _e=this.mousePitch.mousemoveWindow(q,$);_e&&_e.pitchDelta&&W.setPitch(W.getPitch()+_e.pitchDelta)}},Fr.prototype.off=function(){var q=this.element;m.removeEventListener(q,"mousedown",this.mousedown),m.removeEventListener(q,"touchstart",this.touchstart,{passive:!1}),m.removeEventListener(q,"touchmove",this.touchmove),m.removeEventListener(q,"touchend",this.touchend),m.removeEventListener(q,"touchcancel",this.reset),this.offTemp()},Fr.prototype.offTemp=function(){m.enableDrag(),m.removeEventListener(s.window,"mousemove",this.mousemove),m.removeEventListener(s.window,"mouseup",this.mouseup)},Fr.prototype.mousedown=function(q){this.down(s.extend({},q,{ctrlKey:!0,preventDefault:function(){return q.preventDefault()}}),m.mousePos(this.element,q)),m.addEventListener(s.window,"mousemove",this.mousemove),m.addEventListener(s.window,"mouseup",this.mouseup)},Fr.prototype.mousemove=function(q){this.move(q,m.mousePos(this.element,q))},Fr.prototype.mouseup=function(q){this.mouseRotate.mouseupWindow(q),this.mousePitch&&this.mousePitch.mouseupWindow(q),this.offTemp()},Fr.prototype.touchstart=function(q){q.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=m.touchPos(this.element,q.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return q.preventDefault()}},this._startPos))},Fr.prototype.touchmove=function(q){q.targetTouches.length!==1?this.reset():(this._lastPos=m.touchPos(this.element,q.targetTouches)[0],this.move({preventDefault:function(){return q.preventDefault()}},this._lastPos))},Fr.prototype.touchend=function(q){q.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)ae.getEast()||_e.latitudeae.getNorth())},$.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")}},$.prototype._onSuccess=function(W){if(this._map){if(this._isOutOfMapMaxBounds(W))return this._setErrorState(),this.fire(new s.Event("outofmaxbounds",W)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=W,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(W),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(W),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new s.Event("geolocate",W)),this._finish()}},$.prototype._updateCamera=function(W){var ae=new s.LngLat(W.coords.longitude,W.coords.latitude),_e=W.coords.accuracy,Re=this._map.getBearing(),He=s.extend({bearing:Re},this.options.fitBoundsOptions);this._map.fitBounds(ae.toBounds(_e),He,{geolocateSource:!0})},$.prototype._updateMarker=function(W){if(W){var ae=new s.LngLat(W.coords.longitude,W.coords.latitude);this._accuracyCircleMarker.setLngLat(ae).addTo(this._map),this._userLocationDotMarker.setLngLat(ae).addTo(this._map),this._accuracy=W.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},$.prototype._updateCircleRadius=function(){var W=this._map._container.clientHeight/2,ae=this._map.unproject([0,W]),_e=this._map.unproject([1,W]),Re=ae.distanceTo(_e),He=Math.ceil(2*this._accuracy/Re);this._circleElement.style.width=He+"px",this._circleElement.style.height=He+"px"},$.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},$.prototype._onError=function(W){if(this._map){if(this.options.trackUserLocation)if(W.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var ae=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ae,this._geolocateButton.setAttribute("aria-label",ae),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(W.code===3&&ll)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new s.Event("error",W)),this._finish()}},$.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},$.prototype._setupUI=function(W){var ae=this;if(this._container.addEventListener("contextmenu",function(He){return He.preventDefault()}),this._geolocateButton=m.create("button","mapboxgl-ctrl-geolocate",this._container),m.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",W===!1){s.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var _e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=_e,this._geolocateButton.setAttribute("aria-label",_e)}else{var Re=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=Re,this._geolocateButton.setAttribute("aria-label",Re)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=m.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new _a(this._dotElement),this._circleElement=m.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new _a({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(He){var Xe=He.originalEvent&&He.originalEvent.type==="resize";He.geolocateSource||ae._watchState!=="ACTIVE_LOCK"||Xe||(ae._watchState="BACKGROUND",ae._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),ae._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),ae.fire(new s.Event("trackuserlocationend")))})},$.prototype.trigger=function(){if(!this._setup)return s.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 s.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Fa--,ll=!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 s.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 s.Event("trackuserlocationstart"))}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")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){var W;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++Fa>1?(W={maximumAge:6e5,timeout:0},ll=!0):(W=this.options.positionOptions,ll=!1),this._geolocationWatchID=s.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,W)}}else s.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},$.prototype._clearWatch=function(){s.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)},$}(s.Evented),_i={maxWidth:100,unit:"metric"},Si=function(q){this.options=s.extend({},_i,q),s.bindAll(["_onMove","setUnit"],this)};function Jl(q,$,W){var ae=W&&W.maxWidth||100,_e=q._container.clientHeight/2,Re=q.unproject([0,_e]),He=q.unproject([ae,_e]),Xe=Re.distanceTo(He);if(W&&W.unit==="imperial"){var at=3.2808*Xe;at>5280?et($,ae,at/5280,q._getUIString("ScaleControl.Miles")):et($,ae,at,q._getUIString("ScaleControl.Feet"))}else W&&W.unit==="nautical"?et($,ae,Xe/1852,q._getUIString("ScaleControl.NauticalMiles")):Xe>=1e3?et($,ae,Xe/1e3,q._getUIString("ScaleControl.Kilometers")):et($,ae,Xe,q._getUIString("ScaleControl.Meters"))}function et(q,$,W,ae){var _e,Re,He,Xe=(_e=W,(Re=Math.pow(10,(""+Math.floor(_e)).length-1))*((He=_e/Re)>=10?10:He>=5?5:He>=3?3:He>=2?2:He>=1?1:function(wt){var At=Math.pow(10,Math.ceil(-Math.log(wt)/Math.LN10));return Math.round(wt*At)/At}(He))),at=Xe/W;q.style.width=$*at+"px",q.innerHTML=Xe+" "+ae}Si.prototype.getDefaultPosition=function(){return"bottom-left"},Si.prototype._onMove=function(){Jl(this._map,this._container,this.options)},Si.prototype.onAdd=function(q){return this._map=q,this._container=m.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",q.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Si.prototype.onRemove=function(){m.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Si.prototype.setUnit=function(q){this.options.unit=q,Jl(this._map,this._container,this.options)};var rt=function(q){this._fullscreen=!1,q&&q.container&&(q.container instanceof s.window.HTMLElement?this._container=q.container:s.warnOnce("Full screen control 'container' must be a DOM element.")),s.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in s.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in s.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in s.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in s.window.document&&(this._fullscreenchange="MSFullscreenChange")};rt.prototype.onAdd=function(q){return this._map=q,this._container||(this._container=this._map.getContainer()),this._controlContainer=m.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",s.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},rt.prototype.onRemove=function(){m.remove(this._controlContainer),this._map=null,s.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},rt.prototype._checkFullscreenSupport=function(){return!!(s.window.document.fullscreenEnabled||s.window.document.mozFullScreenEnabled||s.window.document.msFullscreenEnabled||s.window.document.webkitFullscreenEnabled)},rt.prototype._setupUI=function(){var q=this._fullscreenButton=m.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);m.create("span","mapboxgl-ctrl-icon",q).setAttribute("aria-hidden",!0),q.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),s.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},rt.prototype._updateTitle=function(){var q=this._getTitle();this._fullscreenButton.setAttribute("aria-label",q),this._fullscreenButton.title=q},rt.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},rt.prototype._isFullscreen=function(){return this._fullscreen},rt.prototype._changeIcon=function(){(s.window.document.fullscreenElement||s.window.document.mozFullScreenElement||s.window.document.webkitFullscreenElement||s.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},rt.prototype._onClickFullscreen=function(){this._isFullscreen()?s.window.document.exitFullscreen?s.window.document.exitFullscreen():s.window.document.mozCancelFullScreen?s.window.document.mozCancelFullScreen():s.window.document.msExitFullscreen?s.window.document.msExitFullscreen():s.window.document.webkitCancelFullScreen&&s.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 ct={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},vt=function(q){function $(W){q.call(this),this.options=s.extend(Object.create(ct),W),s.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.addTo=function(W){return this._map&&this.remove(),this._map=W,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._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 s.Event("open")),this},$.prototype.isOpen=function(){return!!this._map},$.prototype.remove=function(){return this._content&&m.remove(this._content),this._container&&(m.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 s.Event("close")),this},$.prototype.getLngLat=function(){return this._lngLat},$.prototype.setLngLat=function(W){return this._lngLat=s.LngLat.convert(W),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},$.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},$.prototype.getElement=function(){return this._container},$.prototype.setText=function(W){return this.setDOMContent(s.window.document.createTextNode(W))},$.prototype.setHTML=function(W){var ae,_e=s.window.document.createDocumentFragment(),Re=s.window.document.createElement("body");for(Re.innerHTML=W;ae=Re.firstChild;)_e.appendChild(ae);return this.setDOMContent(_e)},$.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},$.prototype.setMaxWidth=function(W){return this.options.maxWidth=W,this._update(),this},$.prototype.setDOMContent=function(W){return this._createContent(),this._content.appendChild(W),this._update(),this},$.prototype.addClassName=function(W){this._container&&this._container.classList.add(W)},$.prototype.removeClassName=function(W){this._container&&this._container.classList.remove(W)},$.prototype.toggleClassName=function(W){if(this._container)return this._container.classList.toggle(W)},$.prototype._createContent=function(){this._content&&m.remove(this._content),this._content=m.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=m.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},$.prototype._onMouseUp=function(W){this._update(W.point)},$.prototype._onMouseMove=function(W){this._update(W.point)},$.prototype._onDrag=function(W){this._update(W.point)},$.prototype._update=function(W){var ae=this,_e=this._lngLat||this._trackPointer;if(this._map&&_e&&this._content&&(this._container||(this._container=m.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=m.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(ve){return ae._container.classList.add(ve)}),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=Ur(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||W)){var Re=this._pos=this._trackPointer&&W?W:this._map.project(this._lngLat),He=this.options.anchor,Xe=Mt(this.options.offset);if(!He){var at,wt=this._container.offsetWidth,At=this._container.offsetHeight;at=Re.y+Xe.bottom.ythis._map.transform.height-At?["bottom"]:[],Re.xthis._map.transform.width-wt/2&&at.push("right"),He=at.length===0?"bottom":at.join("-")}var ie=Re.add(Xe[He]).round();m.setTransform(this._container,sl[He]+" translate("+ie.x+"px,"+ie.y+"px)"),is(this._container,He,"popup")}},$.prototype._onClose=function(){this.remove()},$}(s.Evented);function Mt(q){if(q){if(typeof q=="number"){var $=Math.round(Math.sqrt(.5*Math.pow(q,2)));return{center:new s.Point(0,0),top:new s.Point(0,q),"top-left":new s.Point($,$),"top-right":new s.Point(-$,$),bottom:new s.Point(0,-q),"bottom-left":new s.Point($,-$),"bottom-right":new s.Point(-$,-$),left:new s.Point(q,0),right:new s.Point(-q,0)}}if(q instanceof s.Point||Array.isArray(q)){var W=s.Point.convert(q);return{center:W,top:W,"top-left":W,"top-right":W,bottom:W,"bottom-left":W,"bottom-right":W,left:W,right:W}}return{center:s.Point.convert(q.center||[0,0]),top:s.Point.convert(q.top||[0,0]),"top-left":s.Point.convert(q["top-left"]||[0,0]),"top-right":s.Point.convert(q["top-right"]||[0,0]),bottom:s.Point.convert(q.bottom||[0,0]),"bottom-left":s.Point.convert(q["bottom-left"]||[0,0]),"bottom-right":s.Point.convert(q["bottom-right"]||[0,0]),left:s.Point.convert(q.left||[0,0]),right:s.Point.convert(q.right||[0,0])}}return Mt(new s.Point(0,0))}var kt={version:s.version,supported:T,setRTLTextPlugin:s.setRTLTextPlugin,getRTLTextPluginStatus:s.getRTLTextPluginStatus,Map:bs,NavigationControl:po,GeolocateControl:as,AttributionControl:to,ScaleControl:Si,FullscreenControl:rt,Popup:vt,Marker:_a,Style:cr,LngLat:s.LngLat,LngLatBounds:s.LngLatBounds,Point:s.Point,MercatorCoordinate:s.MercatorCoordinate,Evented:s.Evented,config:s.config,prewarm:function(){Ct().acquire(ut)},clearPrewarmedResources:function(){var q=bt;q&&(q.isPreloaded()&&q.numActive()===1?(q.release(ut),bt=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()"))},get accessToken(){return s.config.ACCESS_TOKEN},set accessToken(q){s.config.ACCESS_TOKEN=q},get baseApiUrl(){return s.config.API_URL},set baseApiUrl(q){s.config.API_URL=q},get workerCount(){return pt.workerCount},set workerCount(q){pt.workerCount=q},get maxParallelImageRequests(){return s.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(q){s.config.MAX_PARALLEL_IMAGE_REQUESTS=q},clearStorage:function(q){s.clearTileCache(q)},workerUrl:""};return kt}),_}()},27084:function(D){D.exports=Math.log2||function(E){return Math.log(E)*Math.LOG2E}},16825:function(D,E,e){D.exports=function(w,s){s||(s=w,w=window);var T=0,m=0,f=0,l={shift:!1,alt:!1,control:!1,meta:!1},t=!1;function a(v){var x=!1;return"altKey"in v&&(x=x||v.altKey!==l.alt,l.alt=!!v.altKey),"shiftKey"in v&&(x=x||v.shiftKey!==l.shift,l.shift=!!v.shiftKey),"ctrlKey"in v&&(x=x||v.ctrlKey!==l.control,l.control=!!v.ctrlKey),"metaKey"in v&&(x=x||v.metaKey!==l.meta,l.meta=!!v.metaKey),x}function r(v,x){var g=_.x(x),y=_.y(x);"buttons"in x&&(v=0|x.buttons),(v!==T||g!==m||y!==f||a(x))&&(T=0|v,m=g||0,f=y||0,s&&s(T,m,f,l))}function n(v){r(0,v)}function o(){(T||m||f||l.shift||l.alt||l.meta||l.control)&&(m=f=0,T=0,l.shift=l.alt=l.control=l.meta=!1,s&&s(0,0,0,l))}function i(v){a(v)&&s&&s(T,m,f,l)}function u(v){_.buttons(v)===0?r(0,v):r(T,v)}function p(v){r(T|_.buttons(v),v)}function c(v){r(T&~_.buttons(v),v)}function b(){t||(t=!0,w.addEventListener("mousemove",u),w.addEventListener("mousedown",p),w.addEventListener("mouseup",c),w.addEventListener("mouseleave",n),w.addEventListener("mouseenter",n),w.addEventListener("mouseout",n),w.addEventListener("mouseover",n),w.addEventListener("blur",o),w.addEventListener("keyup",i),w.addEventListener("keydown",i),w.addEventListener("keypress",i),w!==window&&(window.addEventListener("blur",o),window.addEventListener("keyup",i),window.addEventListener("keydown",i),window.addEventListener("keypress",i)))}b();var d={element:w};return Object.defineProperties(d,{enabled:{get:function(){return t},set:function(v){v?b():t&&(t=!1,w.removeEventListener("mousemove",u),w.removeEventListener("mousedown",p),w.removeEventListener("mouseup",c),w.removeEventListener("mouseleave",n),w.removeEventListener("mouseenter",n),w.removeEventListener("mouseout",n),w.removeEventListener("mouseover",n),w.removeEventListener("blur",o),w.removeEventListener("keyup",i),w.removeEventListener("keydown",i),w.removeEventListener("keypress",i),w!==window&&(window.removeEventListener("blur",o),window.removeEventListener("keyup",i),window.removeEventListener("keydown",i),window.removeEventListener("keypress",i)))},enumerable:!0},buttons:{get:function(){return T},enumerable:!0},x:{get:function(){return m},enumerable:!0},y:{get:function(){return f},enumerable:!0},mods:{get:function(){return l},enumerable:!0}}),d};var _=e(74311)},48956:function(D){var E={left:0,top:0};D.exports=function(e,_,w){_=_||e.currentTarget||e.srcElement,Array.isArray(w)||(w=[0,0]);var s,T=e.clientX||0,m=e.clientY||0,f=(s=_)===window||s===document||s===document.body?E:s.getBoundingClientRect();return w[0]=T-f.left,w[1]=m-f.top,w}},74311:function(D,E){function e(_){return _.target||_.srcElement||window}E.buttons=function(_){if(typeof _=="object"){if("buttons"in _)return _.buttons;if("which"in _){if((w=_.which)===2)return 4;if(w===3)return 2;if(w>0)return 1<=0)return 1<0&&r(o,k))}catch(h){p.call(new b(k),h)}}}function p(g){var y=this;y.triggered||(y.triggered=!0,y.def&&(y=y.def),y.msg=g,y.state=2,y.chain.length>0&&r(o,y))}function c(g,y,k,h){for(var M=0;M1&&(t*=v=Math.sqrt(v),a*=v);var x=t*t,g=a*a,y=(n==o?-1:1)*Math.sqrt(Math.abs((x*g-x*d*d-g*b*b)/(x*d*d+g*b*b)));y==1/0&&(y=1);var k=y*t*d/a+(f+i)/2,h=y*-a*b/t+(l+u)/2,M=Math.asin(((l-h)/a).toFixed(9)),A=Math.asin(((u-h)/a).toFixed(9));(M=fA&&(M-=2*E),!o&&A>M&&(A-=2*E)}if(Math.abs(A-M)>e){var C=A,L=i,P=u;A=M+e*(o&&A>M?1:-1);var I=s(i=k+t*Math.cos(A),u=h+a*Math.sin(A),t,a,r,0,o,L,P,[A,C,k,h])}var R=Math.tan((A-M)/4),U=4/3*t*R,B=4/3*a*R,G=[2*f-(f+U*Math.sin(M)),2*l-(l-B*Math.cos(M)),i+U*Math.sin(A),u-B*Math.cos(A),i,u];if(p)return G;I&&(G=G.concat(I));for(var N=0;N7&&(t.push(v.splice(0,7)),v.unshift("C"));break;case"S":var g=p,y=c;l!="C"&&l!="S"||(g+=g-a,y+=y-r),v=["C",g,y,v[1],v[2],v[3],v[4]];break;case"T":l=="Q"||l=="T"?(i=2*p-i,u=2*c-u):(i=p,u=c),v=w(p,c,i,u,v[1],v[2]);break;case"Q":i=v[1],u=v[2],v=w(p,c,v[1],v[2],v[3],v[4]);break;case"L":v=_(p,c,v[1],v[2]);break;case"H":v=_(p,c,v[1],c);break;case"V":v=_(p,c,p,v[1]);break;case"Z":v=_(p,c,n,o)}l=x,p=v[v.length-2],c=v[v.length-1],v.length>4?(a=v[v.length-4],r=v[v.length-3]):(a=p,r=c),t.push(v)}return t}},56131:function(D){var E=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;function w(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}D.exports=function(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var T={},m=0;m<10;m++)T["_"+String.fromCharCode(m)]=m;if(Object.getOwnPropertyNames(T).map(function(l){return T[l]}).join("")!=="0123456789")return!1;var f={};return"abcdefghijklmnopqrst".split("").forEach(function(l){f[l]=l}),Object.keys(Object.assign({},f)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}()?Object.assign:function(s,T){for(var m,f,l=w(s),t=1;t"u")return!1;for(var o in window)try{if(!r["$"+o]&&w.call(window,o)&&window[o]!==null&&typeof window[o]=="object")try{a(window[o])}catch{return!0}}catch{return!0}return!1}();_=function(o){var i=o!==null&&typeof o=="object",u=s.call(o)==="[object Function]",p=T(o),c=i&&s.call(o)==="[object String]",b=[];if(!i&&!u&&!p)throw new TypeError("Object.keys called on a non-object");var d=l&&u;if(c&&o.length>0&&!w.call(o,0))for(var v=0;v0)for(var x=0;x"u"||!n)return a(h);try{return a(h)}catch{return!1}}(o),k=0;k=0&&E.call(e.callee)==="[object Function]"),w}},88641:function(D){function E(w,s){if(typeof w!="string")return[w];var T=[w];typeof s=="string"||Array.isArray(s)?s={brackets:s}:s||(s={});var m=s.brackets?Array.isArray(s.brackets)?s.brackets:[s.brackets]:["{}","[]","()"],f=s.escape||"___",l=!!s.flat;m.forEach(function(a){var r=new RegExp(["\\",a[0],"[^\\",a[0],"\\",a[1],"]*\\",a[1]].join("")),n=[];function o(i,u,p){var c=T.push(i.slice(a[0].length,-a[1].length))-1;return n.push(c),f+c+f}T.forEach(function(i,u){for(var p,c=0;i!=p;)if(p=i,i=i.replace(r,o),c++>1e4)throw Error("References have circular dependency. Please, check them.");T[u]=i}),n=n.reverse(),T=T.map(function(i){return n.forEach(function(u){i=i.replace(new RegExp("(\\"+f+u+"\\"+f+")","g"),a[0]+"$1"+a[1])}),i})});var t=new RegExp("\\"+f+"([0-9]+)\\"+f);return l?T:function a(r,n,o){for(var i,u=[],p=0;i=t.exec(r);){if(p++>1e4)throw Error("Circular references in parenthesis");u.push(r.slice(0,i.index)),u.push(a(n[i[1]],n)),r=r.slice(i.index+i[0].length)}return u.push(r),u}(T[0],T)}function e(w,s){if(s&&s.flat){var T,m=s&&s.escape||"___",f=w[0];if(!f)return"";for(var l=new RegExp("\\"+m+"([0-9]+)\\"+m),t=0;f!=T;){if(t++>1e4)throw Error("Circular references in "+w);T=f,f=f.replace(l,a)}return f}return w.reduce(function r(n,o){return Array.isArray(o)&&(o=o.reduce(r,"")),n+o},"");function a(r,n){if(w[n]==null)throw Error("Reference "+n+"is undefined");return w[n]}}function _(w,s){return Array.isArray(w)?e(w,s):E(w,s)}_.parse=E,_.stringify=e,D.exports=_},18863:function(D,E,e){var _=e(71299);D.exports=function(w){var s;return arguments.length>1&&(w=arguments),typeof w=="string"?w=w.split(/\s/).map(parseFloat):typeof w=="number"&&(w=[w]),w.length&&typeof w[0]=="number"?s=w.length===1?{width:w[0],height:w[0],x:0,y:0}:w.length===2?{width:w[0],height:w[1],x:0,y:0}:{x:w[0],y:w[1],width:w[2]-w[0]||0,height:w[3]-w[1]||0}:w&&(s={x:(w=_(w,{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"})).left||0,y:w.top||0},w.width==null?w.right?s.width=w.right-s.x:s.width=0:s.width=w.width,w.height==null?w.bottom?s.height=w.bottom-s.y:s.height=0:s.height=w.height),s}},95616:function(D){D.exports=function(w){var s=[];return w.replace(e,function(T,m,f){var l=m.toLowerCase();for(f=function(t){var a=t.match(_);return a?a.map(Number):[]}(f),l=="m"&&f.length>2&&(s.push([m].concat(f.splice(0,2))),l="l",m=m=="m"?"l":"L");;){if(f.length==E[l])return f.unshift(m),s.push(f);if(f.lengthT!=o>T&&s<(n-a)*(T-r)/(o-r)+a&&(m=!m)}return m}},52142:function(D,E,e){var _,w=e(69444),s=e(29023),T=e(87263),m=e(11328),f=e(55968),l=e(10670),t=!1,a=s();function r(n,o,i){var u=_.segments(n),p=_.segments(o),c=i(_.combine(u,p));return _.polygon(c)}_={buildLog:function(n){return n===!0?t=w():n===!1&&(t=!1),t!==!1&&t.list},epsilon:function(n){return a.epsilon(n)},segments:function(n){var o=T(!0,a,t);return n.regions.forEach(o.addRegion),{segments:o.calculate(n.inverted),inverted:n.inverted}},combine:function(n,o){return{combined:T(!1,a,t).calculate(n.segments,n.inverted,o.segments,o.inverted),inverted1:n.inverted,inverted2:o.inverted}},selectUnion:function(n){return{segments:f.union(n.combined,t),inverted:n.inverted1||n.inverted2}},selectIntersect:function(n){return{segments:f.intersect(n.combined,t),inverted:n.inverted1&&n.inverted2}},selectDifference:function(n){return{segments:f.difference(n.combined,t),inverted:n.inverted1&&!n.inverted2}},selectDifferenceRev:function(n){return{segments:f.differenceRev(n.combined,t),inverted:!n.inverted1&&n.inverted2}},selectXor:function(n){return{segments:f.xor(n.combined,t),inverted:n.inverted1!==n.inverted2}},polygon:function(n){return{regions:m(n.segments,a,t),inverted:n.inverted}},polygonFromGeoJSON:function(n){return l.toPolygon(_,n)},polygonToGeoJSON:function(n){return l.fromPolygon(_,a,n)},union:function(n,o){return r(n,o,_.selectUnion)},intersect:function(n,o){return r(n,o,_.selectIntersect)},difference:function(n,o){return r(n,o,_.selectDifference)},differenceRev:function(n,o){return r(n,o,_.selectDifferenceRev)},xor:function(n,o){return r(n,o,_.selectXor)}},typeof window=="object"&&(window.PolyBool=_),D.exports=_},69444:function(D){D.exports=function(){var E,e=0,_=!1;function w(s,T){return E.list.push({type:s,data:T?JSON.parse(JSON.stringify(T)):void 0}),E}return E={list:[],segmentId:function(){return e++},checkIntersection:function(s,T){return w("check",{seg1:s,seg2:T})},segmentChop:function(s,T){return w("div_seg",{seg:s,pt:T}),w("chop",{seg:s,pt:T})},statusRemove:function(s){return w("pop_seg",{seg:s})},segmentUpdate:function(s){return w("seg_update",{seg:s})},segmentNew:function(s,T){return w("new_seg",{seg:s,primary:T})},segmentRemove:function(s){return w("rem_seg",{seg:s})},tempStatus:function(s,T,m){return w("temp_status",{seg:s,above:T,below:m})},rewind:function(s){return w("rewind",{seg:s})},status:function(s,T,m){return w("status",{seg:s,above:T,below:m})},vert:function(s){return s===_?E:(_=s,w("vert",{x:s}))},log:function(s){return typeof s!="string"&&(s=JSON.stringify(s,!1," ")),w("log",{txt:s})},reset:function(){return w("reset")},selected:function(s){return w("selected",{segs:s})},chainStart:function(s){return w("chain_start",{seg:s})},chainRemoveHead:function(s,T){return w("chain_rem_head",{index:s,pt:T})},chainRemoveTail:function(s,T){return w("chain_rem_tail",{index:s,pt:T})},chainNew:function(s,T){return w("chain_new",{pt1:s,pt2:T})},chainMatch:function(s){return w("chain_match",{index:s})},chainClose:function(s){return w("chain_close",{index:s})},chainAddHead:function(s,T){return w("chain_add_head",{index:s,pt:T})},chainAddTail:function(s,T){return w("chain_add_tail",{index:s,pt:T})},chainConnect:function(s,T){return w("chain_con",{index1:s,index2:T})},chainReverse:function(s){return w("chain_rev",{index:s})},chainJoin:function(s,T){return w("chain_join",{index1:s,index2:T})},done:function(){return w("done")}}}},29023:function(D){D.exports=function(E){typeof E!="number"&&(E=1e-10);var e={epsilon:function(_){return typeof _=="number"&&(E=_),E},pointAboveOrOnLine:function(_,w,s){var T=w[0],m=w[1],f=s[0],l=s[1],t=_[0];return(f-T)*(_[1]-m)-(l-m)*(t-T)>=-E},pointBetween:function(_,w,s){var T=_[1]-w[1],m=s[0]-w[0],f=_[0]-w[0],l=s[1]-w[1],t=f*m+T*l;return!(t-E)},pointsSameX:function(_,w){return Math.abs(_[0]-w[0])E!=f-T>E&&(m-a)*(T-r)/(f-r)+a-s>E&&(l=!l),m=a,f=r}return l}};return e}},10670:function(D){var E={toPolygon:function(e,_){function w(m){if(m.length<=0)return e.segments({inverted:!1,regions:[]});function f(a){var r=a.slice(0,a.length-1);return e.segments({inverted:!1,regions:[r]})}for(var l=f(m[0]),t=1;t0})}function p(C,L){var P=C.seg,I=L.seg,R=P.start,U=P.end,B=I.start,G=I.end;T&&T.checkIntersection(P,I);var N=s.linesIntersect(R,U,B,G);if(N===!1){if(!s.pointsCollinear(R,U,B)||s.pointsSame(R,G)||s.pointsSame(U,B))return!1;var j=s.pointsSame(R,B),V=s.pointsSame(U,G);if(j&&V)return L;var H=!j&&s.pointBetween(R,B,G),ee=!V&&s.pointBetween(U,B,G);if(j)return ee?a(L,U):a(C,G),L;H&&(V||(ee?a(L,U):a(C,G)),a(L,R))}else N.alongA===0&&(N.alongB===-1?a(C,B):N.alongB===0?a(C,N.pt):N.alongB===1&&a(C,G)),N.alongB===0&&(N.alongA===-1?a(L,R):N.alongA===0?a(L,N.pt):N.alongA===1&&a(L,U));return!1}for(var c=[];!f.isEmpty();){var b=f.getHead();if(T&&T.vert(b.pt[0]),b.isStart){let C=function(){if(v){var L=p(b,v);if(L)return L}return!!x&&p(b,x)};var A=C;T&&T.segmentNew(b.seg,b.primary);var d=u(b),v=d.before?d.before.ev:null,x=d.after?d.after.ev:null;T&&T.tempStatus(b.seg,!!v&&v.seg,!!x&&x.seg);var g,y,k=C();if(k&&(w?(y=b.seg.myFill.below===null||b.seg.myFill.above!==b.seg.myFill.below)&&(k.seg.myFill.above=!k.seg.myFill.above):k.seg.otherFill=b.seg.myFill,T&&T.segmentUpdate(k.seg),b.other.remove(),b.remove()),f.getHead()!==b){T&&T.rewind(b.seg);continue}w?(y=b.seg.myFill.below===null||b.seg.myFill.above!==b.seg.myFill.below,b.seg.myFill.below=x?x.seg.myFill.above:n,b.seg.myFill.above=y?!b.seg.myFill.below:b.seg.myFill.below):b.seg.otherFill===null&&(g=x?b.primary===x.primary?x.seg.otherFill.above:x.seg.myFill.above:b.primary?o:n,b.seg.otherFill={above:g,below:g}),T&&T.status(b.seg,!!v&&v.seg,!!x&&x.seg),b.other.status=d.insert(_.node({ev:b}))}else{var h=b.status;if(h===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(i.exists(h.prev)&&i.exists(h.next)&&p(h.prev.ev,h.next.ev),T&&T.statusRemove(h.ev.seg),h.remove(),!b.primary){var M=b.seg.myFill;b.seg.myFill=b.seg.otherFill,b.seg.otherFill=M}c.push(b.seg)}f.getHead().remove()}return T&&T.done(),c}return w?{addRegion:function(n){for(var o,i,u,p=n[n.length-1],c=0;c0&&!this.aborted;){var T=this.ifds_to_read.shift();T.offset&&this.scan_ifd(T.id,T.offset,w)}},_.prototype.read_uint16=function(w){var s=this.input;if(w+2>s.length)throw E("unexpected EOF","EBADDATA");return this.big_endian?256*s[w]+s[w+1]:s[w]+256*s[w+1]},_.prototype.read_uint32=function(w){var s=this.input;if(w+4>s.length)throw E("unexpected EOF","EBADDATA");return this.big_endian?16777216*s[w]+65536*s[w+1]+256*s[w+2]+s[w+3]:s[w]+256*s[w+1]+65536*s[w+2]+16777216*s[w+3]},_.prototype.is_subifd_link=function(w,s){return w===0&&s===34665||w===0&&s===34853||w===34665&&s===40965},_.prototype.exif_format_length=function(w){switch(w){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}},_.prototype.exif_format_read=function(w,s){var T;switch(w){case 1:case 2:return this.input[s];case 6:return(T=this.input[s])|33554430*(128&T);case 3:return this.read_uint16(s);case 8:return(T=this.read_uint16(s))|131070*(32768&T);case 4:return this.read_uint32(s);case 9:return 0|this.read_uint32(s);default:return null}},_.prototype.scan_ifd=function(w,s,T){var m=this.read_uint16(s);s+=2;for(var f=0;fthis.input.length)throw E("unexpected EOF","EBADDATA");for(var u=[],p=o,c=0;c0&&(this.ifds_to_read.push({id:l,offset:u[0]}),i=!0),T({is_big_endian:this.big_endian,ifd:w,tag:l,format:t,count:a,entry_offset:s+this.start,data_length:n,data_offset:o+this.start,value:u,is_subifd_link:i})===!1)return void(this.aborted=!0);s+=12}w===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(s)})},D.exports.ExifParser=_,D.exports.get_orientation=function(w){var s=0;try{return new _(w,0,w.length).each(function(T){if(T.ifd===0&&T.tag===274&&Array.isArray(T.value))return s=T.value[0],!1}),s}catch{return-1}}},76767:function(D,E,e){var _=e(14847).n8,w=e(14847).Ag;function s(a,r){if(a.length<4+r)return null;var n=w(a,r);return a.length>4&15,o=15&a[4],i=a[5]>>4&15,u=_(a,6),p=8,c=0;cd.width||b.width===d.width&&b.height>d.height?b:d}),i=n.reduce(function(b,d){return b.height>d.height||b.height===d.height&&b.width>d.width?b:d}),o.width>i.height||o.width===i.height&&o.height>i.width?o:i),p=1;r.transforms.forEach(function(b){var d={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},v={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(b.type==="imir"&&(p=b.value===0?v[p]:d[p=d[p=v[p]]]),b.type==="irot")for(var x=0;x1&&(u.variants=i.variants),i.orientation&&(u.orientation=i.orientation),i.exif_location&&i.exif_location.offset+i.exif_location.length<=l.length){var p=s(l,i.exif_location.offset),c=l.slice(i.exif_location.offset+p+4,i.exif_location.offset+i.exif_location.length),b=m.get_orientation(c);b>0&&(u.orientation=b)}return u}}}}}}},2504:function(D,E,e){var _=e(14847).eG,w=e(14847).OF,s=e(14847).mP,T=_("BM");D.exports=function(m){if(!(m.length<26)&&w(m,0,T))return{width:s(m,18),height:s(m,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},47342:function(D,E,e){var _=e(14847).eG,w=e(14847).OF,s=e(14847).mP,T=_("GIF87a"),m=_("GIF89a");D.exports=function(f){if(!(f.length<10)&&(w(f,0,T)||w(f,0,m)))return{width:s(f,6),height:s(f,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},31355:function(D,E,e){var _=e(14847).mP;D.exports=function(w){var s=_(w,0),T=_(w,2),m=_(w,4);if(s===0&&T===1&&m){for(var f=[],l={width:0,height:0},t=0;tl.width||r>l.height)&&(l=n)}return{width:l.width,height:l.height,variants:f,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},54261:function(D,E,e){var _=e(14847).n8,w=e(14847).eG,s=e(14847).OF,T=e(71371),m=w("Exif\0\0");D.exports=function(f){if(!(f.length<2)&&f[0]===255&&f[1]===216&&f[2]===255)for(var l=2;;){for(;;){if(f.length-l<2)return;if(f[l++]===255)break}for(var t,a,r=f[l++];r===255;)r=f[l++];if(208<=r&&r<=217||r===1)t=0;else{if(!(192<=r&&r<=254)||f.length-l<2)return;t=_(f,l)-2,l+=2}if(r===217||r===218)return;if(r===225&&t>=10&&s(f,l,m)&&(a=T.get_orientation(f.slice(l+6,l+t))),t>=5&&192<=r&&r<=207&&r!==196&&r!==200&&r!==204){if(f.length-l0&&(n.orientation=a),n}l+=t}}},6303:function(D,E,e){var _=e(14847).eG,w=e(14847).OF,s=e(14847).Ag,T=_(`‰PNG\r +`),wt=Re.createShader(Re.FRAGMENT_SHADER);if(Re.isContextLost())this.failedToCreate=!0;else{Re.shaderSource(wt,Xe),Re.compileShader(wt),Re.attachShader(this.program,wt);var At=Re.createShader(Re.VERTEX_SHADER);if(Re.isContextLost())this.failedToCreate=!0;else{Re.shaderSource(At,at),Re.compileShader(At),Re.attachShader(this.program,At);for(var ie=W?W.layoutAttributes:[],ve=0;ve>16,Xe>>16],u_pixel_coord_lower:[65535&He,65535&Xe]}}bo.prototype.draw=function(q,$,W,ae,_e,Re,He,Xe,at,wt,At,ie,ve,Le,Fe,Ve){var We,$e=q.gl;if(!this.failedToCreate){for(var tt in q.program.set(this.program),q.setDepthMode(W),q.setStencilMode(ae),q.setColorMode(_e),q.setCullFace(Re),this.fixedUniforms)this.fixedUniforms[tt].set(He[tt]);Le&&Le.setUniforms(q,this.binderUniforms,ie,{zoom:ve});for(var lt=(We={},We[$e.LINES]=2,We[$e.TRIANGLES]=3,We[$e.LINE_STRIP]=1,We)[$],gt=0,zt=At.get();gt0?1-1/(1.001-He):-He),u_contrast_factor:(Re=_e.paint.get("raster-contrast"),Re>0?1/(1-Re):1+Re),u_spin_weights:Ps(_e.paint.get("raster-hue-rotate"))};var Re,He};function Ps(q){q*=Math.PI/180;var $=Math.sin(q),W=Math.cos(q);return[(2*W+1)/3,(-Math.sqrt(3)*$-W+1)/3,(Math.sqrt(3)*$-W+1)/3]}var Qo,hi=function(q,$,W,ae,_e,Re,He,Xe,at,wt){var At=_e.transform;return{u_is_size_zoom_constant:+(q==="constant"||q==="source"),u_is_size_feature_constant:+(q==="constant"||q==="camera"),u_size_t:$?$.uSizeT:0,u_size:$?$.uSize:0,u_camera_to_center_distance:At.cameraToCenterDistance,u_pitch:At.pitch/360*2*Math.PI,u_rotate_symbol:+W,u_aspect_ratio:At.width/At.height,u_fade_change:_e.options.fadeDuration?_e.symbolFadeChange:1,u_matrix:Re,u_label_plane_matrix:He,u_coord_matrix:Xe,u_is_text:+at,u_pitch_with_map:+ae,u_texsize:wt,u_texture:0}},ds=function(q,$,W,ae,_e,Re,He,Xe,at,wt,At){var ie=_e.transform;return s.extend(hi(q,$,W,ae,_e,Re,He,Xe,at,wt),{u_gamma_scale:ae?Math.cos(ie._pitch)*ie.cameraToCenterDistance:1,u_device_pixel_ratio:s.browser.devicePixelRatio,u_is_halo:+At})},Cc=function(q,$,W,ae,_e,Re,He,Xe,at,wt){return s.extend(ds(q,$,W,ae,_e,Re,He,Xe,!0,at,!0),{u_texsize_icon:wt,u_texture_icon:1})},Hl=function(q,$,W){return{u_matrix:q,u_opacity:$,u_color:W}},bl=function(q,$,W,ae,_e,Re){return s.extend(function(He,Xe,at,wt){var At=at.imageManager.getPattern(He.from.toString()),ie=at.imageManager.getPattern(He.to.toString()),ve=at.imageManager.getPixelSize(),Le=ve.width,Fe=ve.height,Ve=Math.pow(2,wt.tileID.overscaledZ),We=wt.tileSize*Math.pow(2,at.transform.tileZoom)/Ve,$e=We*(wt.tileID.canonical.x+wt.tileID.wrap*Ve),tt=We*wt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:At.tl,u_pattern_br_a:At.br,u_pattern_tl_b:ie.tl,u_pattern_br_b:ie.br,u_texsize:[Le,Fe],u_mix:Xe.t,u_pattern_size_a:At.displaySize,u_pattern_size_b:ie.displaySize,u_scale_a:Xe.fromScale,u_scale_b:Xe.toScale,u_tile_units_to_pixels:1/dr(wt,1,at.transform.tileZoom),u_pixel_coord_upper:[$e>>16,tt>>16],u_pixel_coord_lower:[65535&$e,65535&tt]}}(ae,Re,W,_e),{u_matrix:q,u_opacity:$})},Os={fillExtrusion:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_lightpos:new s.Uniform3f(q,$.u_lightpos),u_lightintensity:new s.Uniform1f(q,$.u_lightintensity),u_lightcolor:new s.Uniform3f(q,$.u_lightcolor),u_vertical_gradient:new s.Uniform1f(q,$.u_vertical_gradient),u_opacity:new s.Uniform1f(q,$.u_opacity)}},fillExtrusionPattern:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_lightpos:new s.Uniform3f(q,$.u_lightpos),u_lightintensity:new s.Uniform1f(q,$.u_lightintensity),u_lightcolor:new s.Uniform3f(q,$.u_lightcolor),u_vertical_gradient:new s.Uniform1f(q,$.u_vertical_gradient),u_height_factor:new s.Uniform1f(q,$.u_height_factor),u_image:new s.Uniform1i(q,$.u_image),u_texsize:new s.Uniform2f(q,$.u_texsize),u_pixel_coord_upper:new s.Uniform2f(q,$.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(q,$.u_pixel_coord_lower),u_scale:new s.Uniform3f(q,$.u_scale),u_fade:new s.Uniform1f(q,$.u_fade),u_opacity:new s.Uniform1f(q,$.u_opacity)}},fill:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix)}},fillPattern:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_image:new s.Uniform1i(q,$.u_image),u_texsize:new s.Uniform2f(q,$.u_texsize),u_pixel_coord_upper:new s.Uniform2f(q,$.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(q,$.u_pixel_coord_lower),u_scale:new s.Uniform3f(q,$.u_scale),u_fade:new s.Uniform1f(q,$.u_fade)}},fillOutline:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_world:new s.Uniform2f(q,$.u_world)}},fillOutlinePattern:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_world:new s.Uniform2f(q,$.u_world),u_image:new s.Uniform1i(q,$.u_image),u_texsize:new s.Uniform2f(q,$.u_texsize),u_pixel_coord_upper:new s.Uniform2f(q,$.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(q,$.u_pixel_coord_lower),u_scale:new s.Uniform3f(q,$.u_scale),u_fade:new s.Uniform1f(q,$.u_fade)}},circle:function(q,$){return{u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_scale_with_map:new s.Uniform1i(q,$.u_scale_with_map),u_pitch_with_map:new s.Uniform1i(q,$.u_pitch_with_map),u_extrude_scale:new s.Uniform2f(q,$.u_extrude_scale),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_matrix:new s.UniformMatrix4f(q,$.u_matrix)}},collisionBox:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_pixels_to_tile_units:new s.Uniform1f(q,$.u_pixels_to_tile_units),u_extrude_scale:new s.Uniform2f(q,$.u_extrude_scale),u_overscale_factor:new s.Uniform1f(q,$.u_overscale_factor)}},collisionCircle:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_inv_matrix:new s.UniformMatrix4f(q,$.u_inv_matrix),u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_viewport_size:new s.Uniform2f(q,$.u_viewport_size)}},debug:function(q,$){return{u_color:new s.UniformColor(q,$.u_color),u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_overlay:new s.Uniform1i(q,$.u_overlay),u_overlay_scale:new s.Uniform1f(q,$.u_overlay_scale)}},clippingMask:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix)}},heatmap:function(q,$){return{u_extrude_scale:new s.Uniform1f(q,$.u_extrude_scale),u_intensity:new s.Uniform1f(q,$.u_intensity),u_matrix:new s.UniformMatrix4f(q,$.u_matrix)}},heatmapTexture:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_world:new s.Uniform2f(q,$.u_world),u_image:new s.Uniform1i(q,$.u_image),u_color_ramp:new s.Uniform1i(q,$.u_color_ramp),u_opacity:new s.Uniform1f(q,$.u_opacity)}},hillshade:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_image:new s.Uniform1i(q,$.u_image),u_latrange:new s.Uniform2f(q,$.u_latrange),u_light:new s.Uniform2f(q,$.u_light),u_shadow:new s.UniformColor(q,$.u_shadow),u_highlight:new s.UniformColor(q,$.u_highlight),u_accent:new s.UniformColor(q,$.u_accent)}},hillshadePrepare:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_image:new s.Uniform1i(q,$.u_image),u_dimension:new s.Uniform2f(q,$.u_dimension),u_zoom:new s.Uniform1f(q,$.u_zoom),u_maxzoom:new s.Uniform1f(q,$.u_maxzoom),u_unpack:new s.Uniform4f(q,$.u_unpack)}},line:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_ratio:new s.Uniform1f(q,$.u_ratio),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_units_to_pixels:new s.Uniform2f(q,$.u_units_to_pixels)}},lineGradient:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_ratio:new s.Uniform1f(q,$.u_ratio),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_units_to_pixels:new s.Uniform2f(q,$.u_units_to_pixels),u_image:new s.Uniform1i(q,$.u_image)}},linePattern:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_texsize:new s.Uniform2f(q,$.u_texsize),u_ratio:new s.Uniform1f(q,$.u_ratio),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_image:new s.Uniform1i(q,$.u_image),u_units_to_pixels:new s.Uniform2f(q,$.u_units_to_pixels),u_scale:new s.Uniform3f(q,$.u_scale),u_fade:new s.Uniform1f(q,$.u_fade)}},lineSDF:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_ratio:new s.Uniform1f(q,$.u_ratio),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_units_to_pixels:new s.Uniform2f(q,$.u_units_to_pixels),u_patternscale_a:new s.Uniform2f(q,$.u_patternscale_a),u_patternscale_b:new s.Uniform2f(q,$.u_patternscale_b),u_sdfgamma:new s.Uniform1f(q,$.u_sdfgamma),u_image:new s.Uniform1i(q,$.u_image),u_tex_y_a:new s.Uniform1f(q,$.u_tex_y_a),u_tex_y_b:new s.Uniform1f(q,$.u_tex_y_b),u_mix:new s.Uniform1f(q,$.u_mix)}},raster:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_tl_parent:new s.Uniform2f(q,$.u_tl_parent),u_scale_parent:new s.Uniform1f(q,$.u_scale_parent),u_buffer_scale:new s.Uniform1f(q,$.u_buffer_scale),u_fade_t:new s.Uniform1f(q,$.u_fade_t),u_opacity:new s.Uniform1f(q,$.u_opacity),u_image0:new s.Uniform1i(q,$.u_image0),u_image1:new s.Uniform1i(q,$.u_image1),u_brightness_low:new s.Uniform1f(q,$.u_brightness_low),u_brightness_high:new s.Uniform1f(q,$.u_brightness_high),u_saturation_factor:new s.Uniform1f(q,$.u_saturation_factor),u_contrast_factor:new s.Uniform1f(q,$.u_contrast_factor),u_spin_weights:new s.Uniform3f(q,$.u_spin_weights)}},symbolIcon:function(q,$){return{u_is_size_zoom_constant:new s.Uniform1i(q,$.u_is_size_zoom_constant),u_is_size_feature_constant:new s.Uniform1i(q,$.u_is_size_feature_constant),u_size_t:new s.Uniform1f(q,$.u_size_t),u_size:new s.Uniform1f(q,$.u_size),u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_pitch:new s.Uniform1f(q,$.u_pitch),u_rotate_symbol:new s.Uniform1i(q,$.u_rotate_symbol),u_aspect_ratio:new s.Uniform1f(q,$.u_aspect_ratio),u_fade_change:new s.Uniform1f(q,$.u_fade_change),u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_label_plane_matrix:new s.UniformMatrix4f(q,$.u_label_plane_matrix),u_coord_matrix:new s.UniformMatrix4f(q,$.u_coord_matrix),u_is_text:new s.Uniform1i(q,$.u_is_text),u_pitch_with_map:new s.Uniform1i(q,$.u_pitch_with_map),u_texsize:new s.Uniform2f(q,$.u_texsize),u_texture:new s.Uniform1i(q,$.u_texture)}},symbolSDF:function(q,$){return{u_is_size_zoom_constant:new s.Uniform1i(q,$.u_is_size_zoom_constant),u_is_size_feature_constant:new s.Uniform1i(q,$.u_is_size_feature_constant),u_size_t:new s.Uniform1f(q,$.u_size_t),u_size:new s.Uniform1f(q,$.u_size),u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_pitch:new s.Uniform1f(q,$.u_pitch),u_rotate_symbol:new s.Uniform1i(q,$.u_rotate_symbol),u_aspect_ratio:new s.Uniform1f(q,$.u_aspect_ratio),u_fade_change:new s.Uniform1f(q,$.u_fade_change),u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_label_plane_matrix:new s.UniformMatrix4f(q,$.u_label_plane_matrix),u_coord_matrix:new s.UniformMatrix4f(q,$.u_coord_matrix),u_is_text:new s.Uniform1i(q,$.u_is_text),u_pitch_with_map:new s.Uniform1i(q,$.u_pitch_with_map),u_texsize:new s.Uniform2f(q,$.u_texsize),u_texture:new s.Uniform1i(q,$.u_texture),u_gamma_scale:new s.Uniform1f(q,$.u_gamma_scale),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_is_halo:new s.Uniform1i(q,$.u_is_halo)}},symbolTextAndIcon:function(q,$){return{u_is_size_zoom_constant:new s.Uniform1i(q,$.u_is_size_zoom_constant),u_is_size_feature_constant:new s.Uniform1i(q,$.u_is_size_feature_constant),u_size_t:new s.Uniform1f(q,$.u_size_t),u_size:new s.Uniform1f(q,$.u_size),u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_pitch:new s.Uniform1f(q,$.u_pitch),u_rotate_symbol:new s.Uniform1i(q,$.u_rotate_symbol),u_aspect_ratio:new s.Uniform1f(q,$.u_aspect_ratio),u_fade_change:new s.Uniform1f(q,$.u_fade_change),u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_label_plane_matrix:new s.UniformMatrix4f(q,$.u_label_plane_matrix),u_coord_matrix:new s.UniformMatrix4f(q,$.u_coord_matrix),u_is_text:new s.Uniform1i(q,$.u_is_text),u_pitch_with_map:new s.Uniform1i(q,$.u_pitch_with_map),u_texsize:new s.Uniform2f(q,$.u_texsize),u_texsize_icon:new s.Uniform2f(q,$.u_texsize_icon),u_texture:new s.Uniform1i(q,$.u_texture),u_texture_icon:new s.Uniform1i(q,$.u_texture_icon),u_gamma_scale:new s.Uniform1f(q,$.u_gamma_scale),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_is_halo:new s.Uniform1i(q,$.u_is_halo)}},background:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_opacity:new s.Uniform1f(q,$.u_opacity),u_color:new s.UniformColor(q,$.u_color)}},backgroundPattern:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_opacity:new s.Uniform1f(q,$.u_opacity),u_image:new s.Uniform1i(q,$.u_image),u_pattern_tl_a:new s.Uniform2f(q,$.u_pattern_tl_a),u_pattern_br_a:new s.Uniform2f(q,$.u_pattern_br_a),u_pattern_tl_b:new s.Uniform2f(q,$.u_pattern_tl_b),u_pattern_br_b:new s.Uniform2f(q,$.u_pattern_br_b),u_texsize:new s.Uniform2f(q,$.u_texsize),u_mix:new s.Uniform1f(q,$.u_mix),u_pattern_size_a:new s.Uniform2f(q,$.u_pattern_size_a),u_pattern_size_b:new s.Uniform2f(q,$.u_pattern_size_b),u_scale_a:new s.Uniform1f(q,$.u_scale_a),u_scale_b:new s.Uniform1f(q,$.u_scale_b),u_pixel_coord_upper:new s.Uniform2f(q,$.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(q,$.u_pixel_coord_lower),u_tile_units_to_pixels:new s.Uniform1f(q,$.u_tile_units_to_pixels)}}};function Qs(q,$,W,ae,_e,Re,He){for(var Xe=q.context,at=Xe.gl,wt=q.useProgram("collisionBox"),At=[],ie=0,ve=0,Le=0;Le0){var gt=s.create(),zt=$e;s.mul(gt,We.placementInvProjMatrix,q.transform.glCoordMatrix),s.mul(gt,gt,We.placementViewportMatrix),At.push({circleArray:lt,circleOffset:ve,transform:zt,invTransform:gt}),ve=ie+=lt.length/4}tt&&wt.draw(Xe,at.LINES,qt.disabled,Je.disabled,q.colorModeForRenderPass(),Ge.disabled,Gu($e,q.transform,Ve),W.id,tt.layoutVertexBuffer,tt.indexBuffer,tt.segments,null,q.transform.zoom,null,null,tt.collisionVertexBuffer)}}if(He&&At.length){var Ut=q.useProgram("collisionCircle"),Vt=new s.StructArrayLayout2f1f2i16;Vt.resize(4*ie),Vt._trim();for(var Qt=0,gn=0,en=At;gn=0&&(Fe[We.associatedIconIndex]={shiftedAnchor:en,angle:sn})}else tr(We.numGlyphs,ve)}if(At){Le.clear();for(var Mn=q.icon.placedSymbolArray,xn=0;xn0){var He=s.browser.now(),Xe=(He-q.timeAdded)/Re,at=$?(He-$.timeAdded)/Re:-1,wt=W.getSource(),At=_e.coveringZoomLevel({tileSize:wt.tileSize,roundZoom:wt.roundZoom}),ie=!$||Math.abs($.tileID.overscaledZ-At)>Math.abs(q.tileID.overscaledZ-At),ve=ie&&q.refreshedUponExpiration?1:s.clamp(ie?Xe:1-at,0,1);return q.refreshedUponExpiration&&Xe>=1&&(q.refreshedUponExpiration=!1),$?{opacity:1,mix:1-ve}:{opacity:ve,mix:0}}return{opacity:1,mix:0}}var Al=new s.Color(1,0,0,1),Ml=new s.Color(0,1,0,1),bu=new s.Color(0,0,1,1),gs=new s.Color(1,0,1,1),ql=new s.Color(0,1,1,1);function Sl(q){var $=q.transform.padding;_u(q,q.transform.height-($.top||0),3,Al),_u(q,$.bottom||0,3,Ml),El(q,$.left||0,3,bu),El(q,q.transform.width-($.right||0),3,gs);var W=q.transform.centerPoint;(function(ae,_e,Re,He){var Xe=20,at=2;nl(ae,_e-at/2,Re-Xe/2,at,Xe,He),nl(ae,_e-Xe/2,Re-at/2,Xe,at,He)})(q,W.x,q.transform.height-W.y,ql)}function _u(q,$,W,ae){nl(q,0,$+W/2,q.transform.width,W,ae)}function El(q,$,W,ae){nl(q,$-W/2,0,W,q.transform.height,ae)}function nl(q,$,W,ae,_e,Re){var He=q.context,Xe=He.gl;Xe.enable(Xe.SCISSOR_TEST),Xe.scissor($*s.browser.devicePixelRatio,W*s.browser.devicePixelRatio,ae*s.browser.devicePixelRatio,_e*s.browser.devicePixelRatio),He.clear({color:Re}),Xe.disable(Xe.SCISSOR_TEST)}function zs(q,$,W){var ae=q.context,_e=ae.gl,Re=W.posMatrix,He=q.useProgram("debug"),Xe=qt.disabled,at=Je.disabled,wt=q.colorModeForRenderPass(),At="$debug";ae.activeTexture.set(_e.TEXTURE0),q.emptyTexture.bind(_e.LINEAR,_e.CLAMP_TO_EDGE),He.draw(ae,_e.LINE_STRIP,Xe,at,wt,Ge.disabled,$o(Re,s.Color.red),At,q.debugBuffer,q.tileBorderIndexBuffer,q.debugSegments);var ie=$.getTileByID(W.key).latestRawTileData,ve=ie&&ie.byteLength||0,Le=Math.floor(ve/1024),Fe=$.getTile(W).tileSize,Ve=512/Math.min(Fe,512)*(W.overscaledZ/q.transform.zoom)*.5,We=W.canonical.toString();W.overscaledZ!==W.canonical.z&&(We+=" => "+W.overscaledZ),function($e,tt){$e.initDebugOverlayCanvas();var lt=$e.debugOverlayCanvas,gt=$e.context.gl,zt=$e.debugOverlayCanvas.getContext("2d");zt.clearRect(0,0,lt.width,lt.height),zt.shadowColor="white",zt.shadowBlur=2,zt.lineWidth=1.5,zt.strokeStyle="white",zt.textBaseline="top",zt.font="bold 36px Open Sans, sans-serif",zt.fillText(tt,5,5),zt.strokeText(tt,5,5),$e.debugOverlayTexture.update(lt),$e.debugOverlayTexture.bind(gt.LINEAR,gt.CLAMP_TO_EDGE)}(q,We+" "+Le+"kb"),He.draw(ae,_e.TRIANGLES,Xe,at,Ke.alphaBlended,Ge.disabled,$o(Re,s.Color.transparent,Ve),At,q.debugBuffer,q.quadTriangleIndexBuffer,q.debugSegments)}var Ds={symbol:function(q,$,W,ae,_e){if(q.renderPass==="translucent"){var Re=Je.disabled,He=q.colorModeForRenderPass();W.layout.get("text-variable-anchor")&&function(Xe,at,wt,At,ie,ve,Le){for(var Fe=at.transform,Ve=ie==="map",We=ve==="map",$e=0,tt=Xe;$e256&&this.clearStencil(),W.setColorMode(Ke.disabled),W.setDepthMode(qt.disabled);var _e=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var Re=0,He=$;Re256&&this.clearStencil();var q=this.nextStencilID++,$=this.context.gl;return new Je({func:$.NOTEQUAL,mask:255},q,255,$.KEEP,$.KEEP,$.REPLACE)},bi.prototype.stencilModeForClipping=function(q){var $=this.context.gl;return new Je({func:$.EQUAL,mask:255},this._tileClippingMaskIDs[q.key],0,$.KEEP,$.KEEP,$.REPLACE)},bi.prototype.stencilConfigForOverlap=function(q){var $,W=this.context.gl,ae=q.sort(function(at,wt){return wt.overscaledZ-at.overscaledZ}),_e=ae[ae.length-1].overscaledZ,Re=ae[0].overscaledZ-_e+1;if(Re>1){this.currentStencilSource=void 0,this.nextStencilID+Re>256&&this.clearStencil();for(var He={},Xe=0;Xe=0;this.currentLayer--){var zt=this.style._layers[ae[this.currentLayer]],Ut=_e[zt.source],Vt=wt[zt.source];this._renderTileClippingMasks(zt,Vt),this.renderLayer(this,Ut,zt,Vt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?$.pop():null},bi.prototype.isPatternMissing=function(q){if(!q)return!1;if(!q.from||!q.to)return!0;var $=this.imageManager.getPattern(q.from.toString()),W=this.imageManager.getPattern(q.to.toString());return!$||!W},bi.prototype.useProgram=function(q,$){this.cache=this.cache||{};var W=""+q+($?$.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[W]||(this.cache[W]=new bo(this.context,hs[q],$,Os[q],this._showOverdrawInspector)),this.cache[W]},bi.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()},bi.prototype.setBaseState=function(){var q=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(q.FUNC_ADD)},bi.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=s.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var q=this.context.gl;this.debugOverlayTexture=new s.Texture(this.context,this.debugOverlayCanvas,q.RGBA)}},bi.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var vs=function(q,$){this.points=q,this.planes=$};vs.fromInvProjectionMatrix=function(q,$,W){var ae=Math.pow(2,W),_e=[[-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]].map(function(He){return s.transformMat4([],He,q)}).map(function(He){return s.scale$1([],He,1/He[3]/$*ae)}),Re=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function(He){var Xe=s.sub([],_e[He[0]],_e[He[1]]),at=s.sub([],_e[He[2]],_e[He[1]]),wt=s.normalize([],s.cross([],Xe,at)),At=-s.dot(wt,_e[He[1]]);return wt.concat(At)});return new vs(_e,Re)};var ms=function(q,$){this.min=q,this.max=$,this.center=s.scale$2([],s.add([],this.min,this.max),.5)};ms.prototype.quadrant=function(q){for(var $=[q%2==0,q<2],W=s.clone$2(this.min),ae=s.clone$2(this.max),_e=0;_e<$.length;_e++)W[_e]=$[_e]?this.min[_e]:this.center[_e],ae[_e]=$[_e]?this.center[_e]:this.max[_e];return ae[2]=this.max[2],new ms(W,ae)},ms.prototype.distanceX=function(q){return Math.max(Math.min(this.max[0],q[0]),this.min[0])-q[0]},ms.prototype.distanceY=function(q){return Math.max(Math.min(this.max[1],q[1]),this.min[1])-q[1]},ms.prototype.intersects=function(q){for(var $=[[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]],W=!0,ae=0;ae=0;if(Re===0)return 0;Re!==$.length&&(W=!1)}if(W)return 2;for(var Xe=0;Xe<3;Xe++){for(var at=Number.MAX_VALUE,wt=-Number.MAX_VALUE,At=0;Atthis.max[Xe]-this.min[Xe])return 0}return 1};var ga=function(q,$,W,ae){if(q===void 0&&(q=0),$===void 0&&($=0),W===void 0&&(W=0),ae===void 0&&(ae=0),isNaN(q)||q<0||isNaN($)||$<0||isNaN(W)||W<0||isNaN(ae)||ae<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=q,this.bottom=$,this.left=W,this.right=ae};ga.prototype.interpolate=function(q,$,W){return $.top!=null&&q.top!=null&&(this.top=s.number(q.top,$.top,W)),$.bottom!=null&&q.bottom!=null&&(this.bottom=s.number(q.bottom,$.bottom,W)),$.left!=null&&q.left!=null&&(this.left=s.number(q.left,$.left,W)),$.right!=null&&q.right!=null&&(this.right=s.number(q.right,$.right,W)),this},ga.prototype.getCenter=function(q,$){var W=s.clamp((this.left+q-this.right)/2,0,q),ae=s.clamp((this.top+$-this.bottom)/2,0,$);return new s.Point(W,ae)},ga.prototype.equals=function(q){return this.top===q.top&&this.bottom===q.bottom&&this.left===q.left&&this.right===q.right},ga.prototype.clone=function(){return new ga(this.top,this.bottom,this.left,this.right)},ga.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var oi=function(q,$,W,ae,_e){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=_e===void 0||_e,this._minZoom=q||0,this._maxZoom=$||22,this._minPitch=W??0,this._maxPitch=ae??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new s.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new ga,this._posMatrixCache={},this._alignedPosMatrixCache={}},li={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}};oi.prototype.clone=function(){var q=new oi(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return q.tileSize=this.tileSize,q.latRange=this.latRange,q.width=this.width,q.height=this.height,q._center=this._center,q.zoom=this.zoom,q.angle=this.angle,q._fov=this._fov,q._pitch=this._pitch,q._unmodified=this._unmodified,q._edgeInsets=this._edgeInsets.clone(),q._calcMatrices(),q},li.minZoom.get=function(){return this._minZoom},li.minZoom.set=function(q){this._minZoom!==q&&(this._minZoom=q,this.zoom=Math.max(this.zoom,q))},li.maxZoom.get=function(){return this._maxZoom},li.maxZoom.set=function(q){this._maxZoom!==q&&(this._maxZoom=q,this.zoom=Math.min(this.zoom,q))},li.minPitch.get=function(){return this._minPitch},li.minPitch.set=function(q){this._minPitch!==q&&(this._minPitch=q,this.pitch=Math.max(this.pitch,q))},li.maxPitch.get=function(){return this._maxPitch},li.maxPitch.set=function(q){this._maxPitch!==q&&(this._maxPitch=q,this.pitch=Math.min(this.pitch,q))},li.renderWorldCopies.get=function(){return this._renderWorldCopies},li.renderWorldCopies.set=function(q){q===void 0?q=!0:q===null&&(q=!1),this._renderWorldCopies=q},li.worldSize.get=function(){return this.tileSize*this.scale},li.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},li.size.get=function(){return new s.Point(this.width,this.height)},li.bearing.get=function(){return-this.angle/Math.PI*180},li.bearing.set=function(q){var $=-s.wrap(q,-180,180)*Math.PI/180;this.angle!==$&&(this._unmodified=!1,this.angle=$,this._calcMatrices(),this.rotationMatrix=s.create$2(),s.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},li.pitch.get=function(){return this._pitch/Math.PI*180},li.pitch.set=function(q){var $=s.clamp(q,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==$&&(this._unmodified=!1,this._pitch=$,this._calcMatrices())},li.fov.get=function(){return this._fov/Math.PI*180},li.fov.set=function(q){q=Math.max(.01,Math.min(60,q)),this._fov!==q&&(this._unmodified=!1,this._fov=q/180*Math.PI,this._calcMatrices())},li.zoom.get=function(){return this._zoom},li.zoom.set=function(q){var $=Math.min(Math.max(q,this.minZoom),this.maxZoom);this._zoom!==$&&(this._unmodified=!1,this._zoom=$,this.scale=this.zoomScale($),this.tileZoom=Math.floor($),this.zoomFraction=$-this.tileZoom,this._constrain(),this._calcMatrices())},li.center.get=function(){return this._center},li.center.set=function(q){q.lat===this._center.lat&&q.lng===this._center.lng||(this._unmodified=!1,this._center=q,this._constrain(),this._calcMatrices())},li.padding.get=function(){return this._edgeInsets.toJSON()},li.padding.set=function(q){this._edgeInsets.equals(q)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,q,1),this._calcMatrices())},li.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},oi.prototype.isPaddingEqual=function(q){return this._edgeInsets.equals(q)},oi.prototype.interpolatePadding=function(q,$,W){this._unmodified=!1,this._edgeInsets.interpolate(q,$,W),this._constrain(),this._calcMatrices()},oi.prototype.coveringZoomLevel=function(q){var $=(q.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/q.tileSize));return Math.max(0,$)},oi.prototype.getVisibleUnwrappedCoordinates=function(q){var $=[new s.UnwrappedTileID(0,q)];if(this._renderWorldCopies)for(var W=this.pointCoordinate(new s.Point(0,0)),ae=this.pointCoordinate(new s.Point(this.width,0)),_e=this.pointCoordinate(new s.Point(this.width,this.height)),Re=this.pointCoordinate(new s.Point(0,this.height)),He=Math.floor(Math.min(W.x,ae.x,_e.x,Re.x)),Xe=Math.floor(Math.max(W.x,ae.x,_e.x,Re.x)),at=He-1;at<=Xe+1;at++)at!==0&&$.push(new s.UnwrappedTileID(at,q));return $},oi.prototype.coveringTiles=function(q){var $=this.coveringZoomLevel(q),W=$;if(q.minzoom!==void 0&&$q.maxzoom&&($=q.maxzoom);var ae=s.MercatorCoordinate.fromLngLat(this.center),_e=Math.pow(2,$),Re=[_e*ae.x,_e*ae.y,0],He=vs.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,$),Xe=q.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Xe=$);var at=function(en){return{aabb:new ms([en*_e,0,0],[(en+1)*_e,_e,0]),zoom:0,x:0,y:0,wrap:en,fullyVisible:!1}},wt=[],At=[],ie=$,ve=q.reparseOverscaled?W:$;if(this._renderWorldCopies)for(var Le=1;Le<=3;Le++)wt.push(at(-Le)),wt.push(at(Le));for(wt.push(at(0));wt.length>0;){var Fe=wt.pop(),Ve=Fe.x,We=Fe.y,$e=Fe.fullyVisible;if(!$e){var tt=Fe.aabb.intersects(He);if(tt===0)continue;$e=tt===2}var lt=Fe.aabb.distanceX(Re),gt=Fe.aabb.distanceY(Re),zt=Math.max(Math.abs(lt),Math.abs(gt)),Ut=3+(1<Ut&&Fe.zoom>=Xe)At.push({tileID:new s.OverscaledTileID(Fe.zoom===ie?ve:Fe.zoom,Fe.wrap,Fe.zoom,Ve,We),distanceSq:s.sqrLen([Re[0]-.5-Ve,Re[1]-.5-We])});else for(var Vt=0;Vt<4;Vt++){var Qt=(Ve<<1)+Vt%2,gn=(We<<1)+(Vt>>1);wt.push({aabb:Fe.aabb.quadrant(Vt),zoom:Fe.zoom+1,x:Qt,y:gn,wrap:Fe.wrap,fullyVisible:$e})}}return At.sort(function(en,sn){return en.distanceSq-sn.distanceSq}).map(function(en){return en.tileID})},oi.prototype.resize=function(q,$){this.width=q,this.height=$,this.pixelsToGLUnits=[2/q,-2/$],this._constrain(),this._calcMatrices()},li.unmodified.get=function(){return this._unmodified},oi.prototype.zoomScale=function(q){return Math.pow(2,q)},oi.prototype.scaleZoom=function(q){return Math.log(q)/Math.LN2},oi.prototype.project=function(q){var $=s.clamp(q.lat,-this.maxValidLatitude,this.maxValidLatitude);return new s.Point(s.mercatorXfromLng(q.lng)*this.worldSize,s.mercatorYfromLat($)*this.worldSize)},oi.prototype.unproject=function(q){return new s.MercatorCoordinate(q.x/this.worldSize,q.y/this.worldSize).toLngLat()},li.point.get=function(){return this.project(this.center)},oi.prototype.setLocationAtPoint=function(q,$){var W=this.pointCoordinate($),ae=this.pointCoordinate(this.centerPoint),_e=this.locationCoordinate(q),Re=new s.MercatorCoordinate(_e.x-(W.x-ae.x),_e.y-(W.y-ae.y));this.center=this.coordinateLocation(Re),this._renderWorldCopies&&(this.center=this.center.wrap())},oi.prototype.locationPoint=function(q){return this.coordinatePoint(this.locationCoordinate(q))},oi.prototype.pointLocation=function(q){return this.coordinateLocation(this.pointCoordinate(q))},oi.prototype.locationCoordinate=function(q){return s.MercatorCoordinate.fromLngLat(q)},oi.prototype.coordinateLocation=function(q){return q.toLngLat()},oi.prototype.pointCoordinate=function(q){var $=[q.x,q.y,0,1],W=[q.x,q.y,1,1];s.transformMat4($,$,this.pixelMatrixInverse),s.transformMat4(W,W,this.pixelMatrixInverse);var ae=$[3],_e=W[3],Re=$[0]/ae,He=W[0]/_e,Xe=$[1]/ae,at=W[1]/_e,wt=$[2]/ae,At=W[2]/_e,ie=wt===At?0:(0-wt)/(At-wt);return new s.MercatorCoordinate(s.number(Re,He,ie)/this.worldSize,s.number(Xe,at,ie)/this.worldSize)},oi.prototype.coordinatePoint=function(q){var $=[q.x*this.worldSize,q.y*this.worldSize,0,1];return s.transformMat4($,$,this.pixelMatrix),new s.Point($[0]/$[3],$[1]/$[3])},oi.prototype.getBounds=function(){return new s.LngLatBounds().extend(this.pointLocation(new s.Point(0,0))).extend(this.pointLocation(new s.Point(this.width,0))).extend(this.pointLocation(new s.Point(this.width,this.height))).extend(this.pointLocation(new s.Point(0,this.height)))},oi.prototype.getMaxBounds=function(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new s.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},oi.prototype.setMaxBounds=function(q){q?(this.lngRange=[q.getWest(),q.getEast()],this.latRange=[q.getSouth(),q.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},oi.prototype.calculatePosMatrix=function(q,$){$===void 0&&($=!1);var W=q.key,ae=$?this._alignedPosMatrixCache:this._posMatrixCache;if(ae[W])return ae[W];var _e=q.canonical,Re=this.worldSize/this.zoomScale(_e.z),He=_e.x+Math.pow(2,_e.z)*q.wrap,Xe=s.identity(new Float64Array(16));return s.translate(Xe,Xe,[He*Re,_e.y*Re,0]),s.scale(Xe,Xe,[Re/s.EXTENT,Re/s.EXTENT,1]),s.multiply(Xe,$?this.alignedProjMatrix:this.projMatrix,Xe),ae[W]=new Float32Array(Xe),ae[W]},oi.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},oi.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var q,$,W,ae,_e=-90,Re=90,He=-180,Xe=180,at=this.size,wt=this._unmodified;if(this.latRange){var At=this.latRange;_e=s.mercatorYfromLat(At[1])*this.worldSize,q=(Re=s.mercatorYfromLat(At[0])*this.worldSize)-_eRe&&(ae=Re-Ve)}if(this.lngRange){var We=ve.x,$e=at.x/2;We-$eXe&&(W=Xe-$e)}W===void 0&&ae===void 0||(this.center=this.unproject(new s.Point(W!==void 0?W:ve.x,ae!==void 0?ae:ve.y))),this._unmodified=wt,this._constraining=!1}},oi.prototype._calcMatrices=function(){if(this.height){var q=this._fov/2,$=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(q)*this.height;var W=Math.PI/2+this._pitch,ae=this._fov*(.5+$.y/this.height),_e=Math.sin(ae)*this.cameraToCenterDistance/Math.sin(s.clamp(Math.PI-W-ae,.01,Math.PI-.01)),Re=this.point,He=Re.x,Xe=Re.y,at=1.01*(Math.cos(Math.PI/2-this._pitch)*_e+this.cameraToCenterDistance),wt=this.height/50,At=new Float64Array(16);s.perspective(At,this._fov,this.width/this.height,wt,at),At[8]=2*-$.x/this.width,At[9]=2*$.y/this.height,s.scale(At,At,[1,-1,1]),s.translate(At,At,[0,0,-this.cameraToCenterDistance]),s.rotateX(At,At,this._pitch),s.rotateZ(At,At,this.angle),s.translate(At,At,[-He,-Xe,0]),this.mercatorMatrix=s.scale([],At,[this.worldSize,this.worldSize,this.worldSize]),s.scale(At,At,[1,1,s.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=At,this.invProjMatrix=s.invert([],this.projMatrix);var ie=this.width%2/2,ve=this.height%2/2,Le=Math.cos(this.angle),Fe=Math.sin(this.angle),Ve=He-Math.round(He)+Le*ie+Fe*ve,We=Xe-Math.round(Xe)+Le*ve+Fe*ie,$e=new Float64Array(At);if(s.translate($e,$e,[Ve>.5?Ve-1:Ve,We>.5?We-1:We,0]),this.alignedProjMatrix=$e,At=s.create(),s.scale(At,At,[this.width/2,-this.height/2,1]),s.translate(At,At,[1,-1,0]),this.labelPlaneMatrix=At,At=s.create(),s.scale(At,At,[1,-1,1]),s.translate(At,At,[-1,-1,0]),s.scale(At,At,[2/this.width,2/this.height,1]),this.glCoordMatrix=At,this.pixelMatrix=s.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(At=s.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=At,this._posMatrixCache={},this._alignedPosMatrixCache={}}},oi.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var q=this.pointCoordinate(new s.Point(0,0)),$=[q.x*this.worldSize,q.y*this.worldSize,0,1];return s.transformMat4($,$,this.pixelMatrix)[3]/this.cameraToCenterDistance},oi.prototype.getCameraPoint=function(){var q=this._pitch,$=Math.tan(q)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new s.Point(0,$))},oi.prototype.getCameraQueryGeometry=function(q){var $=this.getCameraPoint();if(q.length===1)return[q[0],$];for(var W=$.x,ae=$.y,_e=$.x,Re=$.y,He=0,Xe=q;He=3&&!q.some(function(W){return isNaN(W)})){var $=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(q[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+q[2],+q[1]],zoom:+q[0],bearing:$,pitch:+(q[4]||0)}),!0}return!1},es.prototype._updateHashUnthrottled=function(){var q=this.getHashString();try{s.window.history.replaceState(s.window.history.state,"",q)}catch{}};var zo={linearity:.3,easing:s.bezier(0,0,.3,1)},Gl=s.extend({deceleration:2500,maxSpeed:1400},zo),wu=s.extend({deceleration:20,maxSpeed:1400},zo),Fs=s.extend({deceleration:1e3,maxSpeed:360},zo),Tu=s.extend({deceleration:1e3,maxSpeed:90},zo),Bs=function(q){this._map=q,this.clear()};function ts(q,$){(!q.duration||q.duration<$.duration)&&(q.duration=$.duration,q.easing=$.easing)}function Ns(q,$,W){var ae=W.maxSpeed,_e=W.linearity,Re=W.deceleration,He=s.clamp(q*_e/($/1e3),-ae,ae),Xe=Math.abs(He)/(Re*_e);return{easing:W.easing,duration:1e3*Xe,amount:He*(Xe/2)}}Bs.prototype.clear=function(){this._inertiaBuffer=[]},Bs.prototype.record=function(q){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:s.browser.now(),settings:q})},Bs.prototype._drainInertiaBuffer=function(){for(var q=this._inertiaBuffer,$=s.browser.now();q.length>0&&$-q[0].time>160;)q.shift()},Bs.prototype._onMoveEnd=function(q){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var $={zoom:0,bearing:0,pitch:0,pan:new s.Point(0,0),pinchAround:void 0,around:void 0},W=0,ae=this._inertiaBuffer;W=this._clickTolerance||this._map.fire(new Oi(q.type,this._map,q))},$i.prototype.dblclick=function(q){return this._firePreventable(new Oi(q.type,this._map,q))},$i.prototype.mouseover=function(q){this._map.fire(new Oi(q.type,this._map,q))},$i.prototype.mouseout=function(q){this._map.fire(new Oi(q.type,this._map,q))},$i.prototype.touchstart=function(q){return this._firePreventable(new Do(q.type,this._map,q))},$i.prototype.touchmove=function(q){this._map.fire(new Do(q.type,this._map,q))},$i.prototype.touchend=function(q){this._map.fire(new Do(q.type,this._map,q))},$i.prototype.touchcancel=function(q){this._map.fire(new Do(q.type,this._map,q))},$i.prototype._firePreventable=function(q){if(this._map.fire(q),q.defaultPrevented)return{}},$i.prototype.isEnabled=function(){return!0},$i.prototype.isActive=function(){return!1},$i.prototype.enable=function(){},$i.prototype.disable=function(){};var va=function(q){this._map=q};va.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},va.prototype.mousemove=function(q){this._map.fire(new Oi(q.type,this._map,q))},va.prototype.mousedown=function(){this._delayContextMenu=!0},va.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Oi("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},va.prototype.contextmenu=function(q){this._delayContextMenu?this._contextMenuEvent=q:this._map.fire(new Oi(q.type,this._map,q)),this._map.listens("contextmenu")&&q.preventDefault()},va.prototype.isEnabled=function(){return!0},va.prototype.isActive=function(){return!1},va.prototype.enable=function(){},va.prototype.disable=function(){};var ma=function(q,$){this._map=q,this._el=q.getCanvasContainer(),this._container=q.getContainer(),this._clickTolerance=$.clickTolerance||1};function ha(q,$){for(var W={},ae=0;aethis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=q.timeStamp),W.length===this.numTouches&&(this.centroid=function(ae){for(var _e=new s.Point(0,0),Re=0,He=ae;Re30)&&(this.aborted=!0)}}},Ia.prototype.touchend=function(q,$,W){if((!this.centroid||q.timeStamp-this.startTime>500)&&(this.aborted=!0),W.length===0){var ae=!this.aborted&&this.centroid;if(this.reset(),ae)return ae}};var ys=function(q){this.singleTap=new Ia(q),this.numTaps=q.numTaps,this.reset()};ys.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},ys.prototype.touchstart=function(q,$,W){this.singleTap.touchstart(q,$,W)},ys.prototype.touchmove=function(q,$,W){this.singleTap.touchmove(q,$,W)},ys.prototype.touchend=function(q,$,W){var ae=this.singleTap.touchend(q,$,W);if(ae){var _e=q.timeStamp-this.lastTime<500,Re=!this.lastTap||this.lastTap.dist(ae)<30;if(_e&&Re||this.reset(),this.count++,this.lastTime=q.timeStamp,this.lastTap=ae,this.count===this.numTaps)return this.reset(),ae}};var lo=function(){this._zoomIn=new ys({numTouches:1,numTaps:2}),this._zoomOut=new ys({numTouches:2,numTaps:1}),this.reset()};lo.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},lo.prototype.touchstart=function(q,$,W){this._zoomIn.touchstart(q,$,W),this._zoomOut.touchstart(q,$,W)},lo.prototype.touchmove=function(q,$,W){this._zoomIn.touchmove(q,$,W),this._zoomOut.touchmove(q,$,W)},lo.prototype.touchend=function(q,$,W){var ae=this,_e=this._zoomIn.touchend(q,$,W),Re=this._zoomOut.touchend(q,$,W);return _e?(this._active=!0,q.preventDefault(),setTimeout(function(){return ae.reset()},0),{cameraAnimation:function(He){return He.easeTo({duration:300,zoom:He.getZoom()+1,around:He.unproject(_e)},{originalEvent:q})}}):Re?(this._active=!0,q.preventDefault(),setTimeout(function(){return ae.reset()},0),{cameraAnimation:function(He){return He.easeTo({duration:300,zoom:He.getZoom()-1,around:He.unproject(Re)},{originalEvent:q})}}):void 0},lo.prototype.touchcancel=function(){this.reset()},lo.prototype.enable=function(){this._enabled=!0},lo.prototype.disable=function(){this._enabled=!1,this.reset()},lo.prototype.isEnabled=function(){return this._enabled},lo.prototype.isActive=function(){return this._active};var ea=function(q){this.reset(),this._clickTolerance=q.clickTolerance||1};ea.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},ea.prototype._correctButton=function(q,$){return!1},ea.prototype._move=function(q,$){return{}},ea.prototype.mousedown=function(q,$){if(!this._lastPoint){var W=m.mouseButton(q);this._correctButton(q,W)&&(this._lastPoint=$,this._eventButton=W)}},ea.prototype.mousemoveWindow=function(q,$){var W=this._lastPoint;if(W&&(q.preventDefault(),this._moved||!($.dist(W)0&&(this._active=!0);var ae=ha(W,$),_e=new s.Point(0,0),Re=new s.Point(0,0),He=0;for(var Xe in ae){var at=ae[Xe],wt=this._touches[Xe];wt&&(_e._add(at),Re._add(at.sub(wt)),He++,ae[Xe]=at)}if(this._touches=ae,!(HeMath.abs(q.x)}var Or=function(q){function $(){q.apply(this,arguments)}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.reset=function(){q.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},$.prototype._start=function(W){this._lastPoints=W,al(W[0].sub(W[1]))&&(this._valid=!1)},$.prototype._move=function(W,ae,_e){var Re=W[0].sub(this._lastPoints[0]),He=W[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(Re,He,_e.timeStamp),this._valid)return this._lastPoints=W,this._active=!0,{pitchDelta:(Re.y+He.y)/2*-.5}},$.prototype.gestureBeginsVertically=function(W,ae,_e){if(this._valid!==void 0)return this._valid;var Re=W.mag()>=2,He=ae.mag()>=2;if(Re||He){if(!Re||!He)return this._firstMove===void 0&&(this._firstMove=_e),_e-this._firstMove<100&&void 0;var Xe=W.y>0==ae.y>0;return al(W)&&al(ae)&&Xe}},$}(Cr),ol={panStep:100,bearingStep:15,pitchStep:10},uo=function(){var q=ol;this._panStep=q.panStep,this._bearingStep=q.bearingStep,this._pitchStep=q.pitchStep};function Xl(q){return q*(2-q)}uo.prototype.reset=function(){this._active=!1},uo.prototype.keydown=function(q){var $=this;if(!(q.altKey||q.ctrlKey||q.metaKey)){var W=0,ae=0,_e=0,Re=0,He=0;switch(q.keyCode){case 61:case 107:case 171:case 187:W=1;break;case 189:case 109:case 173:W=-1;break;case 37:q.shiftKey?ae=-1:(q.preventDefault(),Re=-1);break;case 39:q.shiftKey?ae=1:(q.preventDefault(),Re=1);break;case 38:q.shiftKey?_e=1:(q.preventDefault(),He=-1);break;case 40:q.shiftKey?_e=-1:(q.preventDefault(),He=1);break;default:return}return{cameraAnimation:function(Xe){var at=Xe.getZoom();Xe.easeTo({duration:300,easeId:"keyboardHandler",easing:Xl,zoom:W?Math.round(at)+W*(q.shiftKey?2:1):at,bearing:Xe.getBearing()+ae*$._bearingStep,pitch:Xe.getPitch()+_e*$._pitchStep,offset:[-Re*$._panStep,-He*$._panStep],center:Xe.getCenter()},{originalEvent:q})}}}},uo.prototype.enable=function(){this._enabled=!0},uo.prototype.disable=function(){this._enabled=!1,this.reset()},uo.prototype.isEnabled=function(){return this._enabled},uo.prototype.isActive=function(){return this._active};var Cl=4.000244140625,ya=function(q,$){this._map=q,this._el=q.getCanvasContainer(),this._handler=$,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,s.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};ya.prototype.setZoomRate=function(q){this._defaultZoomRate=q},ya.prototype.setWheelZoomRate=function(q){this._wheelZoomRate=q},ya.prototype.isEnabled=function(){return!!this._enabled},ya.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},ya.prototype.isZooming=function(){return!!this._zooming},ya.prototype.enable=function(q){this.isEnabled()||(this._enabled=!0,this._aroundCenter=q&&q.around==="center")},ya.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},ya.prototype.wheel=function(q){if(this.isEnabled()){var $=q.deltaMode===s.window.WheelEvent.DOM_DELTA_LINE?40*q.deltaY:q.deltaY,W=s.browser.now(),ae=W-(this._lastWheelEventTime||0);this._lastWheelEventTime=W,$!==0&&$%Cl==0?this._type="wheel":$!==0&&Math.abs($)<4?this._type="trackpad":ae>400?(this._type=null,this._lastValue=$,this._timeout=setTimeout(this._onTimeout,40,q)):this._type||(this._type=Math.abs(ae*$)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,$+=this._lastValue)),q.shiftKey&&$&&($/=4),this._type&&(this._lastWheelEvent=q,this._delta-=$,this._active||this._start(q)),q.preventDefault()}},ya.prototype._onTimeout=function(q){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(q)},ya.prototype._start=function(q){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 $=m.mousePos(this._el,q);this._around=s.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject($)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},ya.prototype.renderFrame=function(){return this._onScrollFrame()},ya.prototype._onScrollFrame=function(){var q=this;if(this._frameId&&(this._frameId=null,this.isActive())){var $=this._map.transform;if(this._delta!==0){var W=this._type==="wheel"&&Math.abs(this._delta)>Cl?this._wheelZoomRate:this._defaultZoomRate,ae=2/(1+Math.exp(-Math.abs(this._delta*W)));this._delta<0&&ae!==0&&(ae=1/ae);var _e=typeof this._targetZoom=="number"?$.zoomScale(this._targetZoom):$.scale;this._targetZoom=Math.min($.maxZoom,Math.max($.minZoom,$.scaleZoom(_e*ae))),this._type==="wheel"&&(this._startZoom=$.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var Re,He=typeof this._targetZoom=="number"?this._targetZoom:$.zoom,Xe=this._startZoom,at=this._easing,wt=!1;if(this._type==="wheel"&&Xe&&at){var At=Math.min((s.browser.now()-this._lastWheelEventTime)/200,1),ie=at(At);Re=s.number(Xe,He,ie),At<1?this._frameId||(this._frameId=!0):wt=!0}else Re=He,wt=!0;return this._active=!0,wt&&(this._active=!1,this._finishTimeout=setTimeout(function(){q._zooming=!1,q._handler._triggerRenderFrame(),delete q._targetZoom,delete q._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!wt,zoomDelta:Re-$.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},ya.prototype._smoothOutEasing=function(q){var $=s.ease;if(this._prevEase){var W=this._prevEase,ae=(s.browser.now()-W.start)/W.duration,_e=W.easing(ae+.01)-W.easing(ae),Re=.27/Math.sqrt(_e*_e+1e-4)*.01,He=Math.sqrt(.0729-Re*Re);$=s.bezier(Re,He,.25,1)}return this._prevEase={start:s.browser.now(),duration:q,easing:$},$},ya.prototype.reset=function(){this._active=!1};var Vs=function(q,$){this._clickZoom=q,this._tapZoom=$};Vs.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Vs.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Vs.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Vs.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var ns=function(){this.reset()};ns.prototype.reset=function(){this._active=!1},ns.prototype.dblclick=function(q,$){return q.preventDefault(),{cameraAnimation:function(W){W.easeTo({duration:300,zoom:W.getZoom()+(q.shiftKey?-1:1),around:W.unproject($)},{originalEvent:q})}}},ns.prototype.enable=function(){this._enabled=!0},ns.prototype.disable=function(){this._enabled=!1,this.reset()},ns.prototype.isEnabled=function(){return this._enabled},ns.prototype.isActive=function(){return this._active};var Wa=function(){this._tap=new ys({numTouches:1,numTaps:1}),this.reset()};Wa.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Wa.prototype.touchstart=function(q,$,W){this._swipePoint||(this._tapTime&&q.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?W.length>0&&(this._swipePoint=$[0],this._swipeTouch=W[0].identifier):this._tap.touchstart(q,$,W))},Wa.prototype.touchmove=function(q,$,W){if(this._tapTime){if(this._swipePoint){if(W[0].identifier!==this._swipeTouch)return;var ae=$[0],_e=ae.y-this._swipePoint.y;return this._swipePoint=ae,q.preventDefault(),this._active=!0,{zoomDelta:_e/128}}}else this._tap.touchmove(q,$,W)},Wa.prototype.touchend=function(q,$,W){this._tapTime?this._swipePoint&&W.length===0&&this.reset():this._tap.touchend(q,$,W)&&(this._tapTime=q.timeStamp)},Wa.prototype.touchcancel=function(){this.reset()},Wa.prototype.enable=function(){this._enabled=!0},Wa.prototype.disable=function(){this._enabled=!1,this.reset()},Wa.prototype.isEnabled=function(){return this._enabled},Wa.prototype.isActive=function(){return this._active};var xs=function(q,$,W){this._el=q,this._mousePan=$,this._touchPan=W};xs.prototype.enable=function(q){this._inertiaOptions=q||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},xs.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},xs.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},xs.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var _o=function(q,$,W){this._pitchWithRotate=q.pitchWithRotate,this._mouseRotate=$,this._mousePitch=W};_o.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},_o.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},_o.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},_o.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var co=function(q,$,W,ae){this._el=q,this._touchZoom=$,this._touchRotate=W,this._tapDragZoom=ae,this._rotationDisabled=!1,this._enabled=!0};co.prototype.enable=function(q){this._touchZoom.enable(q),this._rotationDisabled||this._touchRotate.enable(q),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},co.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},co.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},co.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},co.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},co.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Hs=function(q){return q.zoom||q.drag||q.pitch||q.rotate},xa=function(q){function $(){q.apply(this,arguments)}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$}(s.Event);function fo(q){return q.panDelta&&q.panDelta.mag()||q.zoomDelta||q.bearingDelta||q.pitchDelta}var vi=function(q,$){this._map=q,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Bs(q),this._bearingSnap=$.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers($),s.bindAll(["handleEvent","handleWindowEvent"],this);var W=this._el;this._listeners=[[W,"touchstart",{passive:!1}],[W,"touchmove",{passive:!1}],[W,"touchend",void 0],[W,"touchcancel",void 0],[W,"mousedown",void 0],[W,"mousemove",void 0],[W,"mouseup",void 0],[s.window.document,"mousemove",{capture:!0}],[s.window.document,"mouseup",void 0],[W,"mouseover",void 0],[W,"mouseout",void 0],[W,"dblclick",void 0],[W,"click",void 0],[W,"keydown",{capture:!1}],[W,"keyup",void 0],[W,"wheel",{passive:!1}],[W,"contextmenu",void 0],[s.window,"blur",void 0]];for(var ae=0,_e=this._listeners;ae<_e.length;ae+=1){var Re=_e[ae],He=Re[0],Xe=Re[1],at=Re[2];m.addEventListener(He,Xe,He===s.window.document?this.handleWindowEvent:this.handleEvent,at)}};vi.prototype.destroy=function(){for(var q=0,$=this._listeners;q<$.length;q+=1){var W=$[q],ae=W[0],_e=W[1],Re=W[2];m.removeEventListener(ae,_e,ae===s.window.document?this.handleWindowEvent:this.handleEvent,Re)}},vi.prototype._addDefaultHandlers=function(q){var $=this._map,W=$.getCanvasContainer();this._add("mapEvent",new $i($,q));var ae=$.boxZoom=new ma($,q);this._add("boxZoom",ae);var _e=new lo,Re=new ns;$.doubleClickZoom=new Vs(Re,_e),this._add("tapZoom",_e),this._add("clickZoom",Re);var He=new Wa;this._add("tapDragZoom",He);var Xe=$.touchPitch=new Or;this._add("touchPitch",Xe);var at=new Wl(q),wt=new Zl(q);$.dragRotate=new _o(q,at,wt),this._add("mouseRotate",at,["mousePitch"]),this._add("mousePitch",wt,["mouseRotate"]);var At=new Ga(q),ie=new Sa(q);$.dragPan=new xs(W,At,ie),this._add("mousePan",At),this._add("touchPan",ie,["touchZoom","touchRotate"]);var ve=new il,Le=new Yl;$.touchZoomRotate=new co(W,Le,ve,He),this._add("touchRotate",ve,["touchPan","touchZoom"]),this._add("touchZoom",Le,["touchPan","touchRotate"]);var Fe=$.scrollZoom=new ya($,this);this._add("scrollZoom",Fe,["mousePan"]);var Ve=$.keyboard=new uo;this._add("keyboard",Ve),this._add("blockableMapEvent",new va($));for(var We=0,$e=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];We<$e.length;We+=1){var tt=$e[We];q.interactive&&q[tt]&&$[tt].enable(q[tt])}},vi.prototype._add=function(q,$,W){this._handlers.push({handlerName:q,handler:$,allowed:W}),this._handlersById[q]=$},vi.prototype.stop=function(){if(!this._updatingCamera){for(var q=0,$=this._handlers;q<$.length;q+=1)$[q].handler.reset();this._inertia.clear(),this._fireEvents({},{}),this._changes=[]}},vi.prototype.isActive=function(){for(var q=0,$=this._handlers;q<$.length;q+=1)if($[q].handler.isActive())return!0;return!1},vi.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},vi.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},vi.prototype.isMoving=function(){return!!Hs(this._eventsInProgress)||this.isZooming()},vi.prototype._blockedByActive=function(q,$,W){for(var ae in q)if(ae!==W&&(!$||$.indexOf(ae)<0))return!0;return!1},vi.prototype.handleWindowEvent=function(q){this.handleEvent(q,q.type+"Window")},vi.prototype._getMapTouches=function(q){for(var $=[],W=0,ae=q;WHe?Math.min(2,Ut):Math.max(.5,Ut),sn=Math.pow(en,1-Qt),rn=Re.unproject(gt.add(zt.mult(Qt*sn)).mult(gn));Re.setLocationAtPoint(Re.renderWorldCopies?rn.wrap():rn,Ve)}_e._fireMoveEvents(ae)},function(Qt){_e._afterEase(ae,Qt)},W),this},$.prototype._prepareEase=function(W,ae,_e){_e===void 0&&(_e={}),this._moving=!0,ae||_e.moving||this.fire(new s.Event("movestart",W)),this._zooming&&!_e.zooming&&this.fire(new s.Event("zoomstart",W)),this._rotating&&!_e.rotating&&this.fire(new s.Event("rotatestart",W)),this._pitching&&!_e.pitching&&this.fire(new s.Event("pitchstart",W))},$.prototype._fireMoveEvents=function(W){this.fire(new s.Event("move",W)),this._zooming&&this.fire(new s.Event("zoom",W)),this._rotating&&this.fire(new s.Event("rotate",W)),this._pitching&&this.fire(new s.Event("pitch",W))},$.prototype._afterEase=function(W,ae){if(!this._easeId||!ae||this._easeId!==ae){delete this._easeId;var _e=this._zooming,Re=this._rotating,He=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,_e&&this.fire(new s.Event("zoomend",W)),Re&&this.fire(new s.Event("rotateend",W)),He&&this.fire(new s.Event("pitchend",W)),this.fire(new s.Event("moveend",W))}},$.prototype.flyTo=function(W,ae){var _e=this;if(!W.essential&&s.browser.prefersReducedMotion){var Re=s.pick(W,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Re,ae)}this.stop(),W=s.extend({offset:[0,0],speed:1.2,curve:1.42,easing:s.ease},W);var He=this.transform,Xe=this.getZoom(),at=this.getBearing(),wt=this.getPitch(),At=this.getPadding(),ie="zoom"in W?s.clamp(+W.zoom,He.minZoom,He.maxZoom):Xe,ve="bearing"in W?this._normalizeBearing(W.bearing,at):at,Le="pitch"in W?+W.pitch:wt,Fe="padding"in W?W.padding:He.padding,Ve=He.zoomScale(ie-Xe),We=s.Point.convert(W.offset),$e=He.centerPoint.add(We),tt=He.pointLocation($e),lt=s.LngLat.convert(W.center||tt);this._normalizeCenter(lt);var gt=He.project(tt),zt=He.project(lt).sub(gt),Ut=W.curve,Vt=Math.max(He.width,He.height),Qt=Vt/Ve,gn=zt.mag();if("minZoom"in W){var en=s.clamp(Math.min(W.minZoom,Xe,ie),He.minZoom,He.maxZoom),sn=Vt/He.zoomScale(en-Xe);Ut=Math.sqrt(sn/gn*2)}var rn=Ut*Ut;function Mn(mr){var _r=(Qt*Qt-Vt*Vt+(mr?-1:1)*rn*rn*gn*gn)/(2*(mr?Qt:Vt)*rn*gn);return Math.log(Math.sqrt(_r*_r+1)-_r)}function xn(mr){return(Math.exp(mr)-Math.exp(-mr))/2}function an(mr){return(Math.exp(mr)+Math.exp(-mr))/2}var zn=Mn(0),Vn=function(mr){return an(zn)/an(zn+Ut*mr)},nr=function(mr){return Vt*((an(zn)*(xn(_r=zn+Ut*mr)/an(_r))-xn(zn))/rn)/gn;var _r},rr=(Mn(1)-zn)/Ut;if(Math.abs(gn)<1e-6||!isFinite(rr)){if(Math.abs(Vt-Qt)<1e-6)return this.easeTo(W,ae);var wr=QtW.maxDuration&&(W.duration=0),this._zooming=!0,this._rotating=at!==ve,this._pitching=Le!==wt,this._padding=!He.isPaddingEqual(Fe),this._prepareEase(ae,!1),this._ease(function(mr){var _r=mr*rr,Rr=1/Vn(_r);He.zoom=mr===1?ie:Xe+He.scaleZoom(Rr),_e._rotating&&(He.bearing=s.number(at,ve,mr)),_e._pitching&&(He.pitch=s.number(wt,Le,mr)),_e._padding&&(He.interpolatePadding(At,Fe,mr),$e=He.centerPoint.add(We));var Jr=mr===1?lt:He.unproject(gt.add(zt.mult(nr(_r))).mult(Rr));He.setLocationAtPoint(He.renderWorldCopies?Jr.wrap():Jr,$e),_e._fireMoveEvents(ae)},function(){return _e._afterEase(ae)},W),this},$.prototype.isEasing=function(){return!!this._easeFrameId},$.prototype.stop=function(){return this._stop()},$.prototype._stop=function(W,ae){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var _e=this._onEaseEnd;delete this._onEaseEnd,_e.call(this,ae)}if(!W){var Re=this.handlers;Re&&Re.stop()}return this},$.prototype._ease=function(W,ae,_e){_e.animate===!1||_e.duration===0?(W(1),ae()):(this._easeStart=s.browser.now(),this._easeOptions=_e,this._onEaseFrame=W,this._onEaseEnd=ae,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},$.prototype._renderFrameCallback=function(){var W=Math.min((s.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(W)),W<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},$.prototype._normalizeBearing=function(W,ae){W=s.wrap(W,-180,180);var _e=Math.abs(W-ae);return Math.abs(W-360-ae)<_e&&(W-=360),Math.abs(W+360-ae)<_e&&(W+=360),W},$.prototype._normalizeCenter=function(W){var ae=this.transform;if(ae.renderWorldCopies&&!ae.lngRange){var _e=W.lng-ae.center.lng;W.lng+=_e>180?-360:_e<-180?360:0}},$}(s.Evented),to=function(q){q===void 0&&(q={}),this.options=q,s.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};to.prototype.getDefaultPosition=function(){return"bottom-right"},to.prototype.onAdd=function(q){var $=this.options&&this.options.compact;return this._map=q,this._container=m.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=m.create("div","mapboxgl-ctrl-attrib-inner",this._container),$&&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),$===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},to.prototype.onRemove=function(){m.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},to.prototype._updateEditLink=function(){var q=this._editLink;q||(q=this._editLink=this._container.querySelector(".mapbox-improve-map"));var $=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||s.config.ACCESS_TOKEN}];if(q){var W=$.reduce(function(ae,_e,Re){return _e.value&&(ae+=_e.key+"="+_e.value+(Re<$.length-1?"&":"")),ae},"?");q.href=s.config.FEEDBACK_URL+"/"+W+(this._map._hash?this._map._hash.getHashString(!0):""),q.rel="noopener nofollow"}},to.prototype._updateData=function(q){!q||q.sourceDataType!=="metadata"&&q.dataType!=="style"||(this._updateAttributions(),this._updateEditLink())},to.prototype._updateAttributions=function(){if(this._map.style){var q=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?q=q.concat(this.options.customAttribution.map(function(Xe){return typeof Xe!="string"?"":Xe})):typeof this.options.customAttribution=="string"&&q.push(this.options.customAttribution)),this._map.style.stylesheet){var $=this._map.style.stylesheet;this.styleOwner=$.owner,this.styleId=$.id}var W=this._map.style.sourceCaches;for(var ae in W){var _e=W[ae];if(_e.used){var Re=_e.getSource();Re.attribution&&q.indexOf(Re.attribution)<0&&q.push(Re.attribution)}}q.sort(function(Xe,at){return Xe.length-at.length});var He=(q=q.filter(function(Xe,at){for(var wt=at+1;wt=0)return!1;return!0})).join(" | ");He!==this._attribHTML&&(this._attribHTML=He,q.length?(this._innerContainer.innerHTML=He,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},to.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var ho=function(){s.bindAll(["_updateLogo"],this),s.bindAll(["_updateCompact"],this)};ho.prototype.onAdd=function(q){this._map=q,this._container=m.create("div","mapboxgl-ctrl");var $=m.create("a","mapboxgl-ctrl-logo");return $.target="_blank",$.rel="noopener nofollow",$.href="https://www.mapbox.com/",$.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),$.setAttribute("rel","noopener nofollow"),this._container.appendChild($),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},ho.prototype.onRemove=function(){m.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},ho.prototype.getDefaultPosition=function(){return"bottom-left"},ho.prototype._updateLogo=function(q){q&&q.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")},ho.prototype._logoRequired=function(){if(this._map.style){var q=this._map.style.sourceCaches;for(var $ in q)if(q[$].getSource().mapbox_logo)return!0;return!1}},ho.prototype._updateCompact=function(){var q=this._container.children;if(q.length){var $=q[0];this._map.getCanvasContainer().offsetWidth<250?$.classList.add("mapboxgl-compact"):$.classList.remove("mapboxgl-compact")}};var Fo=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Fo.prototype.add=function(q){var $=++this._id;return this._queue.push({callback:q,id:$,cancelled:!1}),$},Fo.prototype.remove=function(q){for(var $=this._currentlyRunning,W=0,ae=$?this._queue.concat($):this._queue;Wae.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<0)throw new Error("minPitch must be greater than or equal to 0");if(ae.maxPitch!=null&&ae.maxPitch>Da)throw new Error("maxPitch must be less than or equal to 60");var Re=new oi(ae.minZoom,ae.maxZoom,ae.minPitch,ae.maxPitch,ae.renderWorldCopies);if(q.call(this,Re,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 Fo,this._controls=[],this._mapId=s.uniqueId(),this._locale=s.extend({},za,ae.locale),this._requestManager=new s.RequestManager(ae.transformRequest,ae.accessToken),typeof ae.container=="string"){if(this._container=s.window.document.getElementById(ae.container),!this._container)throw new Error("Container '"+ae.container+"' not found.")}else{if(!(ae.container instanceof oa))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=ae.container}if(ae.maxBounds&&this.setMaxBounds(ae.maxBounds),s.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 _e._update(!1)}),this.on("moveend",function(){return _e._update(!1)}),this.on("zoom",function(){return _e._update(!0)}),s.window!==void 0&&(s.window.addEventListener("online",this._onWindowOnline,!1),s.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new vi(this,ae);var He=typeof ae.hash=="string"&&ae.hash||void 0;this._hash=ae.hash&&new es(He).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,s.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 to({customAttribution:ae.customAttribution})),this.addControl(new ho,ae.logoPosition),this.on("style.load",function(){_e.transform.unmodified&&_e.jumpTo(_e.style.stylesheet)}),this.on("data",function(Xe){_e._update(Xe.dataType==="style"),_e.fire(new s.Event(Xe.dataType+"data",Xe))}),this.on("dataloading",function(Xe){_e.fire(new s.Event(Xe.dataType+"dataloading",Xe))})}q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$;var W={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return $.prototype._getMapId=function(){return this._mapId},$.prototype.addControl=function(ae,_e){if(_e===void 0&&ae.getDefaultPosition&&(_e=ae.getDefaultPosition()),_e===void 0&&(_e="top-right"),!ae||!ae.onAdd)return this.fire(new s.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var Re=ae.onAdd(this);this._controls.push(ae);var He=this._controlPositions[_e];return _e.indexOf("bottom")!==-1?He.insertBefore(Re,He.firstChild):He.appendChild(Re),this},$.prototype.removeControl=function(ae){if(!ae||!ae.onRemove)return this.fire(new s.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var _e=this._controls.indexOf(ae);return _e>-1&&this._controls.splice(_e,1),ae.onRemove(this),this},$.prototype.resize=function(ae){var _e=this._containerDimensions(),Re=_e[0],He=_e[1];this._resizeCanvas(Re,He),this.transform.resize(Re,He),this.painter.resize(Re,He);var Xe=!this._moving;return Xe&&(this.stop(),this.fire(new s.Event("movestart",ae)).fire(new s.Event("move",ae))),this.fire(new s.Event("resize",ae)),Xe&&this.fire(new s.Event("moveend",ae)),this},$.prototype.getBounds=function(){return this.transform.getBounds()},$.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},$.prototype.setMaxBounds=function(ae){return this.transform.setMaxBounds(s.LngLatBounds.convert(ae)),this._update()},$.prototype.setMinZoom=function(ae){if((ae=ae??-2)>=-2&&ae<=this.transform.maxZoom)return this.transform.minZoom=ae,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=ae,this._update(),this.getZoom()>ae&&this.setZoom(ae),this;throw new Error("maxZoom must be greater than the current minZoom")},$.prototype.getMaxZoom=function(){return this.transform.maxZoom},$.prototype.setMinPitch=function(ae){if((ae=ae??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(ae>=0&&ae<=this.transform.maxPitch)return this.transform.minPitch=ae,this._update(),this.getPitch()Da)throw new Error("maxPitch must be less than or equal to 60");if(ae>=this.transform.minPitch)return this.transform.maxPitch=ae,this._update(),this.getPitch()>ae&&this.setPitch(ae),this;throw new Error("maxPitch must be greater than the current minPitch")},$.prototype.getMaxPitch=function(){return this.transform.maxPitch},$.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},$.prototype.setRenderWorldCopies=function(ae){return this.transform.renderWorldCopies=ae,this._update()},$.prototype.project=function(ae){return this.transform.locationPoint(s.LngLat.convert(ae))},$.prototype.unproject=function(ae){return this.transform.pointLocation(s.Point.convert(ae))},$.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},$.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},$.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},$.prototype._createDelegatedListener=function(ae,_e,Re){var He,Xe=this;if(ae==="mouseenter"||ae==="mouseover"){var at=!1;return{layer:_e,listener:Re,delegates:{mousemove:function(At){var ie=Xe.getLayer(_e)?Xe.queryRenderedFeatures(At.point,{layers:[_e]}):[];ie.length?at||(at=!0,Re.call(Xe,new Oi(ae,Xe,At.originalEvent,{features:ie}))):at=!1},mouseout:function(){at=!1}}}}if(ae==="mouseleave"||ae==="mouseout"){var wt=!1;return{layer:_e,listener:Re,delegates:{mousemove:function(At){(Xe.getLayer(_e)?Xe.queryRenderedFeatures(At.point,{layers:[_e]}):[]).length?wt=!0:wt&&(wt=!1,Re.call(Xe,new Oi(ae,Xe,At.originalEvent)))},mouseout:function(At){wt&&(wt=!1,Re.call(Xe,new Oi(ae,Xe,At.originalEvent)))}}}}return{layer:_e,listener:Re,delegates:(He={},He[ae]=function(At){var ie=Xe.getLayer(_e)?Xe.queryRenderedFeatures(At.point,{layers:[_e]}):[];ie.length&&(At.features=ie,Re.call(Xe,At),delete At.features)},He)}},$.prototype.on=function(ae,_e,Re){if(Re===void 0)return q.prototype.on.call(this,ae,_e);var He=this._createDelegatedListener(ae,_e,Re);for(var Xe in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[ae]=this._delegatedListeners[ae]||[],this._delegatedListeners[ae].push(He),He.delegates)this.on(Xe,He.delegates[Xe]);return this},$.prototype.once=function(ae,_e,Re){if(Re===void 0)return q.prototype.once.call(this,ae,_e);var He=this._createDelegatedListener(ae,_e,Re);for(var Xe in He.delegates)this.once(Xe,He.delegates[Xe]);return this},$.prototype.off=function(ae,_e,Re){var He=this;return Re===void 0?q.prototype.off.call(this,ae,_e):(this._delegatedListeners&&this._delegatedListeners[ae]&&function(Xe){for(var at=Xe[ae],wt=0;wt180;){var He=W.locationPoint(q);if(He.x>=0&&He.y>=0&&He.x<=W.width&&He.y<=W.height)break;q.lng>W.center.lng?q.lng-=360:q.lng+=360}return q}Fr.prototype.down=function(q,$){this.mouseRotate.mousedown(q,$),this.mousePitch&&this.mousePitch.mousedown(q,$),m.disableDrag()},Fr.prototype.move=function(q,$){var W=this.map,ae=this.mouseRotate.mousemoveWindow(q,$);if(ae&&ae.bearingDelta&&W.setBearing(W.getBearing()+ae.bearingDelta),this.mousePitch){var _e=this.mousePitch.mousemoveWindow(q,$);_e&&_e.pitchDelta&&W.setPitch(W.getPitch()+_e.pitchDelta)}},Fr.prototype.off=function(){var q=this.element;m.removeEventListener(q,"mousedown",this.mousedown),m.removeEventListener(q,"touchstart",this.touchstart,{passive:!1}),m.removeEventListener(q,"touchmove",this.touchmove),m.removeEventListener(q,"touchend",this.touchend),m.removeEventListener(q,"touchcancel",this.reset),this.offTemp()},Fr.prototype.offTemp=function(){m.enableDrag(),m.removeEventListener(s.window,"mousemove",this.mousemove),m.removeEventListener(s.window,"mouseup",this.mouseup)},Fr.prototype.mousedown=function(q){this.down(s.extend({},q,{ctrlKey:!0,preventDefault:function(){return q.preventDefault()}}),m.mousePos(this.element,q)),m.addEventListener(s.window,"mousemove",this.mousemove),m.addEventListener(s.window,"mouseup",this.mouseup)},Fr.prototype.mousemove=function(q){this.move(q,m.mousePos(this.element,q))},Fr.prototype.mouseup=function(q){this.mouseRotate.mouseupWindow(q),this.mousePitch&&this.mousePitch.mouseupWindow(q),this.offTemp()},Fr.prototype.touchstart=function(q){q.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=m.touchPos(this.element,q.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return q.preventDefault()}},this._startPos))},Fr.prototype.touchmove=function(q){q.targetTouches.length!==1?this.reset():(this._lastPos=m.touchPos(this.element,q.targetTouches)[0],this.move({preventDefault:function(){return q.preventDefault()}},this._lastPos))},Fr.prototype.touchend=function(q){q.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)ae.getEast()||_e.latitudeae.getNorth())},$.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")}},$.prototype._onSuccess=function(W){if(this._map){if(this._isOutOfMapMaxBounds(W))return this._setErrorState(),this.fire(new s.Event("outofmaxbounds",W)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=W,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(W),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(W),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new s.Event("geolocate",W)),this._finish()}},$.prototype._updateCamera=function(W){var ae=new s.LngLat(W.coords.longitude,W.coords.latitude),_e=W.coords.accuracy,Re=this._map.getBearing(),He=s.extend({bearing:Re},this.options.fitBoundsOptions);this._map.fitBounds(ae.toBounds(_e),He,{geolocateSource:!0})},$.prototype._updateMarker=function(W){if(W){var ae=new s.LngLat(W.coords.longitude,W.coords.latitude);this._accuracyCircleMarker.setLngLat(ae).addTo(this._map),this._userLocationDotMarker.setLngLat(ae).addTo(this._map),this._accuracy=W.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},$.prototype._updateCircleRadius=function(){var W=this._map._container.clientHeight/2,ae=this._map.unproject([0,W]),_e=this._map.unproject([1,W]),Re=ae.distanceTo(_e),He=Math.ceil(2*this._accuracy/Re);this._circleElement.style.width=He+"px",this._circleElement.style.height=He+"px"},$.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},$.prototype._onError=function(W){if(this._map){if(this.options.trackUserLocation)if(W.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var ae=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ae,this._geolocateButton.setAttribute("aria-label",ae),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(W.code===3&&ll)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new s.Event("error",W)),this._finish()}},$.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},$.prototype._setupUI=function(W){var ae=this;if(this._container.addEventListener("contextmenu",function(He){return He.preventDefault()}),this._geolocateButton=m.create("button","mapboxgl-ctrl-geolocate",this._container),m.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",W===!1){s.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var _e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=_e,this._geolocateButton.setAttribute("aria-label",_e)}else{var Re=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=Re,this._geolocateButton.setAttribute("aria-label",Re)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=m.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new _a(this._dotElement),this._circleElement=m.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new _a({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(He){var Xe=He.originalEvent&&He.originalEvent.type==="resize";He.geolocateSource||ae._watchState!=="ACTIVE_LOCK"||Xe||(ae._watchState="BACKGROUND",ae._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),ae._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),ae.fire(new s.Event("trackuserlocationend")))})},$.prototype.trigger=function(){if(!this._setup)return s.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 s.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Fa--,ll=!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 s.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 s.Event("trackuserlocationstart"))}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")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){var W;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++Fa>1?(W={maximumAge:6e5,timeout:0},ll=!0):(W=this.options.positionOptions,ll=!1),this._geolocationWatchID=s.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,W)}}else s.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},$.prototype._clearWatch=function(){s.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)},$}(s.Evented),_i={maxWidth:100,unit:"metric"},Si=function(q){this.options=s.extend({},_i,q),s.bindAll(["_onMove","setUnit"],this)};function Jl(q,$,W){var ae=W&&W.maxWidth||100,_e=q._container.clientHeight/2,Re=q.unproject([0,_e]),He=q.unproject([ae,_e]),Xe=Re.distanceTo(He);if(W&&W.unit==="imperial"){var at=3.2808*Xe;at>5280?et($,ae,at/5280,q._getUIString("ScaleControl.Miles")):et($,ae,at,q._getUIString("ScaleControl.Feet"))}else W&&W.unit==="nautical"?et($,ae,Xe/1852,q._getUIString("ScaleControl.NauticalMiles")):Xe>=1e3?et($,ae,Xe/1e3,q._getUIString("ScaleControl.Kilometers")):et($,ae,Xe,q._getUIString("ScaleControl.Meters"))}function et(q,$,W,ae){var _e,Re,He,Xe=(_e=W,(Re=Math.pow(10,(""+Math.floor(_e)).length-1))*((He=_e/Re)>=10?10:He>=5?5:He>=3?3:He>=2?2:He>=1?1:function(wt){var At=Math.pow(10,Math.ceil(-Math.log(wt)/Math.LN10));return Math.round(wt*At)/At}(He))),at=Xe/W;q.style.width=$*at+"px",q.innerHTML=Xe+" "+ae}Si.prototype.getDefaultPosition=function(){return"bottom-left"},Si.prototype._onMove=function(){Jl(this._map,this._container,this.options)},Si.prototype.onAdd=function(q){return this._map=q,this._container=m.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",q.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Si.prototype.onRemove=function(){m.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Si.prototype.setUnit=function(q){this.options.unit=q,Jl(this._map,this._container,this.options)};var rt=function(q){this._fullscreen=!1,q&&q.container&&(q.container instanceof s.window.HTMLElement?this._container=q.container:s.warnOnce("Full screen control 'container' must be a DOM element.")),s.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in s.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in s.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in s.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in s.window.document&&(this._fullscreenchange="MSFullscreenChange")};rt.prototype.onAdd=function(q){return this._map=q,this._container||(this._container=this._map.getContainer()),this._controlContainer=m.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",s.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},rt.prototype.onRemove=function(){m.remove(this._controlContainer),this._map=null,s.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},rt.prototype._checkFullscreenSupport=function(){return!!(s.window.document.fullscreenEnabled||s.window.document.mozFullScreenEnabled||s.window.document.msFullscreenEnabled||s.window.document.webkitFullscreenEnabled)},rt.prototype._setupUI=function(){var q=this._fullscreenButton=m.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);m.create("span","mapboxgl-ctrl-icon",q).setAttribute("aria-hidden",!0),q.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),s.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},rt.prototype._updateTitle=function(){var q=this._getTitle();this._fullscreenButton.setAttribute("aria-label",q),this._fullscreenButton.title=q},rt.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},rt.prototype._isFullscreen=function(){return this._fullscreen},rt.prototype._changeIcon=function(){(s.window.document.fullscreenElement||s.window.document.mozFullScreenElement||s.window.document.webkitFullscreenElement||s.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},rt.prototype._onClickFullscreen=function(){this._isFullscreen()?s.window.document.exitFullscreen?s.window.document.exitFullscreen():s.window.document.mozCancelFullScreen?s.window.document.mozCancelFullScreen():s.window.document.msExitFullscreen?s.window.document.msExitFullscreen():s.window.document.webkitCancelFullScreen&&s.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 ct={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},vt=function(q){function $(W){q.call(this),this.options=s.extend(Object.create(ct),W),s.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.addTo=function(W){return this._map&&this.remove(),this._map=W,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._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 s.Event("open")),this},$.prototype.isOpen=function(){return!!this._map},$.prototype.remove=function(){return this._content&&m.remove(this._content),this._container&&(m.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 s.Event("close")),this},$.prototype.getLngLat=function(){return this._lngLat},$.prototype.setLngLat=function(W){return this._lngLat=s.LngLat.convert(W),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},$.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},$.prototype.getElement=function(){return this._container},$.prototype.setText=function(W){return this.setDOMContent(s.window.document.createTextNode(W))},$.prototype.setHTML=function(W){var ae,_e=s.window.document.createDocumentFragment(),Re=s.window.document.createElement("body");for(Re.innerHTML=W;ae=Re.firstChild;)_e.appendChild(ae);return this.setDOMContent(_e)},$.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},$.prototype.setMaxWidth=function(W){return this.options.maxWidth=W,this._update(),this},$.prototype.setDOMContent=function(W){return this._createContent(),this._content.appendChild(W),this._update(),this},$.prototype.addClassName=function(W){this._container&&this._container.classList.add(W)},$.prototype.removeClassName=function(W){this._container&&this._container.classList.remove(W)},$.prototype.toggleClassName=function(W){if(this._container)return this._container.classList.toggle(W)},$.prototype._createContent=function(){this._content&&m.remove(this._content),this._content=m.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=m.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},$.prototype._onMouseUp=function(W){this._update(W.point)},$.prototype._onMouseMove=function(W){this._update(W.point)},$.prototype._onDrag=function(W){this._update(W.point)},$.prototype._update=function(W){var ae=this,_e=this._lngLat||this._trackPointer;if(this._map&&_e&&this._content&&(this._container||(this._container=m.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=m.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(ve){return ae._container.classList.add(ve)}),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=Ur(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||W)){var Re=this._pos=this._trackPointer&&W?W:this._map.project(this._lngLat),He=this.options.anchor,Xe=Mt(this.options.offset);if(!He){var at,wt=this._container.offsetWidth,At=this._container.offsetHeight;at=Re.y+Xe.bottom.ythis._map.transform.height-At?["bottom"]:[],Re.xthis._map.transform.width-wt/2&&at.push("right"),He=at.length===0?"bottom":at.join("-")}var ie=Re.add(Xe[He]).round();m.setTransform(this._container,sl[He]+" translate("+ie.x+"px,"+ie.y+"px)"),is(this._container,He,"popup")}},$.prototype._onClose=function(){this.remove()},$}(s.Evented);function Mt(q){if(q){if(typeof q=="number"){var $=Math.round(Math.sqrt(.5*Math.pow(q,2)));return{center:new s.Point(0,0),top:new s.Point(0,q),"top-left":new s.Point($,$),"top-right":new s.Point(-$,$),bottom:new s.Point(0,-q),"bottom-left":new s.Point($,-$),"bottom-right":new s.Point(-$,-$),left:new s.Point(q,0),right:new s.Point(-q,0)}}if(q instanceof s.Point||Array.isArray(q)){var W=s.Point.convert(q);return{center:W,top:W,"top-left":W,"top-right":W,bottom:W,"bottom-left":W,"bottom-right":W,left:W,right:W}}return{center:s.Point.convert(q.center||[0,0]),top:s.Point.convert(q.top||[0,0]),"top-left":s.Point.convert(q["top-left"]||[0,0]),"top-right":s.Point.convert(q["top-right"]||[0,0]),bottom:s.Point.convert(q.bottom||[0,0]),"bottom-left":s.Point.convert(q["bottom-left"]||[0,0]),"bottom-right":s.Point.convert(q["bottom-right"]||[0,0]),left:s.Point.convert(q.left||[0,0]),right:s.Point.convert(q.right||[0,0])}}return Mt(new s.Point(0,0))}var kt={version:s.version,supported:T,setRTLTextPlugin:s.setRTLTextPlugin,getRTLTextPluginStatus:s.getRTLTextPluginStatus,Map:bs,NavigationControl:po,GeolocateControl:as,AttributionControl:to,ScaleControl:Si,FullscreenControl:rt,Popup:vt,Marker:_a,Style:cr,LngLat:s.LngLat,LngLatBounds:s.LngLatBounds,Point:s.Point,MercatorCoordinate:s.MercatorCoordinate,Evented:s.Evented,config:s.config,prewarm:function(){Ct().acquire(ut)},clearPrewarmedResources:function(){var q=bt;q&&(q.isPreloaded()&&q.numActive()===1?(q.release(ut),bt=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()"))},get accessToken(){return s.config.ACCESS_TOKEN},set accessToken(q){s.config.ACCESS_TOKEN=q},get baseApiUrl(){return s.config.API_URL},set baseApiUrl(q){s.config.API_URL=q},get workerCount(){return pt.workerCount},set workerCount(q){pt.workerCount=q},get maxParallelImageRequests(){return s.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(q){s.config.MAX_PARALLEL_IMAGE_REQUESTS=q},clearStorage:function(q){s.clearTileCache(q)},workerUrl:""};return kt}),_}()},27084:function(D){D.exports=Math.log2||function(E){return Math.log(E)*Math.LOG2E}},16825:function(D,E,e){D.exports=function(w,s){s||(s=w,w=window);var T=0,m=0,f=0,l={shift:!1,alt:!1,control:!1,meta:!1},t=!1;function a(v){var x=!1;return"altKey"in v&&(x=x||v.altKey!==l.alt,l.alt=!!v.altKey),"shiftKey"in v&&(x=x||v.shiftKey!==l.shift,l.shift=!!v.shiftKey),"ctrlKey"in v&&(x=x||v.ctrlKey!==l.control,l.control=!!v.ctrlKey),"metaKey"in v&&(x=x||v.metaKey!==l.meta,l.meta=!!v.metaKey),x}function r(v,x){var g=_.x(x),y=_.y(x);"buttons"in x&&(v=0|x.buttons),(v!==T||g!==m||y!==f||a(x))&&(T=0|v,m=g||0,f=y||0,s&&s(T,m,f,l))}function n(v){r(0,v)}function o(){(T||m||f||l.shift||l.alt||l.meta||l.control)&&(m=f=0,T=0,l.shift=l.alt=l.control=l.meta=!1,s&&s(0,0,0,l))}function i(v){a(v)&&s&&s(T,m,f,l)}function u(v){_.buttons(v)===0?r(0,v):r(T,v)}function p(v){r(T|_.buttons(v),v)}function c(v){r(T&~_.buttons(v),v)}function b(){t||(t=!0,w.addEventListener("mousemove",u),w.addEventListener("mousedown",p),w.addEventListener("mouseup",c),w.addEventListener("mouseleave",n),w.addEventListener("mouseenter",n),w.addEventListener("mouseout",n),w.addEventListener("mouseover",n),w.addEventListener("blur",o),w.addEventListener("keyup",i),w.addEventListener("keydown",i),w.addEventListener("keypress",i),w!==window&&(window.addEventListener("blur",o),window.addEventListener("keyup",i),window.addEventListener("keydown",i),window.addEventListener("keypress",i)))}b();var d={element:w};return Object.defineProperties(d,{enabled:{get:function(){return t},set:function(v){v?b():t&&(t=!1,w.removeEventListener("mousemove",u),w.removeEventListener("mousedown",p),w.removeEventListener("mouseup",c),w.removeEventListener("mouseleave",n),w.removeEventListener("mouseenter",n),w.removeEventListener("mouseout",n),w.removeEventListener("mouseover",n),w.removeEventListener("blur",o),w.removeEventListener("keyup",i),w.removeEventListener("keydown",i),w.removeEventListener("keypress",i),w!==window&&(window.removeEventListener("blur",o),window.removeEventListener("keyup",i),window.removeEventListener("keydown",i),window.removeEventListener("keypress",i)))},enumerable:!0},buttons:{get:function(){return T},enumerable:!0},x:{get:function(){return m},enumerable:!0},y:{get:function(){return f},enumerable:!0},mods:{get:function(){return l},enumerable:!0}}),d};var _=e(74311)},48956:function(D){var E={left:0,top:0};D.exports=function(e,_,w){_=_||e.currentTarget||e.srcElement,Array.isArray(w)||(w=[0,0]);var s,T=e.clientX||0,m=e.clientY||0,f=(s=_)===window||s===document||s===document.body?E:s.getBoundingClientRect();return w[0]=T-f.left,w[1]=m-f.top,w}},74311:function(D,E){function e(_){return _.target||_.srcElement||window}E.buttons=function(_){if(typeof _=="object"){if("buttons"in _)return _.buttons;if("which"in _){if((w=_.which)===2)return 4;if(w===3)return 2;if(w>0)return 1<=0)return 1<0&&r(o,k))}catch(h){p.call(new b(k),h)}}}function p(g){var y=this;y.triggered||(y.triggered=!0,y.def&&(y=y.def),y.msg=g,y.state=2,y.chain.length>0&&r(o,y))}function c(g,y,k,h){for(var M=0;M1&&(t*=v=Math.sqrt(v),a*=v);var x=t*t,g=a*a,y=(n==o?-1:1)*Math.sqrt(Math.abs((x*g-x*d*d-g*b*b)/(x*d*d+g*b*b)));y==1/0&&(y=1);var k=y*t*d/a+(f+i)/2,h=y*-a*b/t+(l+u)/2,M=Math.asin(((l-h)/a).toFixed(9)),A=Math.asin(((u-h)/a).toFixed(9));(M=fA&&(M-=2*E),!o&&A>M&&(A-=2*E)}if(Math.abs(A-M)>e){var C=A,L=i,P=u;A=M+e*(o&&A>M?1:-1);var I=s(i=k+t*Math.cos(A),u=h+a*Math.sin(A),t,a,r,0,o,L,P,[A,C,k,h])}var R=Math.tan((A-M)/4),U=4/3*t*R,B=4/3*a*R,G=[2*f-(f+U*Math.sin(M)),2*l-(l-B*Math.cos(M)),i+U*Math.sin(A),u-B*Math.cos(A),i,u];if(p)return G;I&&(G=G.concat(I));for(var N=0;N7&&(t.push(v.splice(0,7)),v.unshift("C"));break;case"S":var g=p,y=c;l!="C"&&l!="S"||(g+=g-a,y+=y-r),v=["C",g,y,v[1],v[2],v[3],v[4]];break;case"T":l=="Q"||l=="T"?(i=2*p-i,u=2*c-u):(i=p,u=c),v=w(p,c,i,u,v[1],v[2]);break;case"Q":i=v[1],u=v[2],v=w(p,c,v[1],v[2],v[3],v[4]);break;case"L":v=_(p,c,v[1],v[2]);break;case"H":v=_(p,c,v[1],c);break;case"V":v=_(p,c,p,v[1]);break;case"Z":v=_(p,c,n,o)}l=x,p=v[v.length-2],c=v[v.length-1],v.length>4?(a=v[v.length-4],r=v[v.length-3]):(a=p,r=c),t.push(v)}return t}},56131:function(D){var E=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;function w(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}D.exports=function(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var T={},m=0;m<10;m++)T["_"+String.fromCharCode(m)]=m;if(Object.getOwnPropertyNames(T).map(function(l){return T[l]}).join("")!=="0123456789")return!1;var f={};return"abcdefghijklmnopqrst".split("").forEach(function(l){f[l]=l}),Object.keys(Object.assign({},f)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}()?Object.assign:function(s,T){for(var m,f,l=w(s),t=1;t"u")return!1;for(var o in window)try{if(!r["$"+o]&&w.call(window,o)&&window[o]!==null&&typeof window[o]=="object")try{a(window[o])}catch{return!0}}catch{return!0}return!1}();_=function(o){var i=o!==null&&typeof o=="object",u=s.call(o)==="[object Function]",p=T(o),c=i&&s.call(o)==="[object String]",b=[];if(!i&&!u&&!p)throw new TypeError("Object.keys called on a non-object");var d=l&&u;if(c&&o.length>0&&!w.call(o,0))for(var v=0;v0)for(var x=0;x"u"||!n)return a(h);try{return a(h)}catch{return!1}}(o),k=0;k=0&&E.call(e.callee)==="[object Function]"),w}},88641:function(D){function E(w,s){if(typeof w!="string")return[w];var T=[w];typeof s=="string"||Array.isArray(s)?s={brackets:s}:s||(s={});var m=s.brackets?Array.isArray(s.brackets)?s.brackets:[s.brackets]:["{}","[]","()"],f=s.escape||"___",l=!!s.flat;m.forEach(function(a){var r=new RegExp(["\\",a[0],"[^\\",a[0],"\\",a[1],"]*\\",a[1]].join("")),n=[];function o(i,u,p){var c=T.push(i.slice(a[0].length,-a[1].length))-1;return n.push(c),f+c+f}T.forEach(function(i,u){for(var p,c=0;i!=p;)if(p=i,i=i.replace(r,o),c++>1e4)throw Error("References have circular dependency. Please, check them.");T[u]=i}),n=n.reverse(),T=T.map(function(i){return n.forEach(function(u){i=i.replace(new RegExp("(\\"+f+u+"\\"+f+")","g"),a[0]+"$1"+a[1])}),i})});var t=new RegExp("\\"+f+"([0-9]+)\\"+f);return l?T:function a(r,n,o){for(var i,u=[],p=0;i=t.exec(r);){if(p++>1e4)throw Error("Circular references in parenthesis");u.push(r.slice(0,i.index)),u.push(a(n[i[1]],n)),r=r.slice(i.index+i[0].length)}return u.push(r),u}(T[0],T)}function e(w,s){if(s&&s.flat){var T,m=s&&s.escape||"___",f=w[0];if(!f)return"";for(var l=new RegExp("\\"+m+"([0-9]+)\\"+m),t=0;f!=T;){if(t++>1e4)throw Error("Circular references in "+w);T=f,f=f.replace(l,a)}return f}return w.reduce(function r(n,o){return Array.isArray(o)&&(o=o.reduce(r,"")),n+o},"");function a(r,n){if(w[n]==null)throw Error("Reference "+n+"is undefined");return w[n]}}function _(w,s){return Array.isArray(w)?e(w,s):E(w,s)}_.parse=E,_.stringify=e,D.exports=_},18863:function(D,E,e){var _=e(71299);D.exports=function(w){var s;return arguments.length>1&&(w=arguments),typeof w=="string"?w=w.split(/\s/).map(parseFloat):typeof w=="number"&&(w=[w]),w.length&&typeof w[0]=="number"?s=w.length===1?{width:w[0],height:w[0],x:0,y:0}:w.length===2?{width:w[0],height:w[1],x:0,y:0}:{x:w[0],y:w[1],width:w[2]-w[0]||0,height:w[3]-w[1]||0}:w&&(s={x:(w=_(w,{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"})).left||0,y:w.top||0},w.width==null?w.right?s.width=w.right-s.x:s.width=0:s.width=w.width,w.height==null?w.bottom?s.height=w.bottom-s.y:s.height=0:s.height=w.height),s}},95616:function(D){D.exports=function(w){var s=[];return w.replace(e,function(T,m,f){var l=m.toLowerCase();for(f=function(t){var a=t.match(_);return a?a.map(Number):[]}(f),l=="m"&&f.length>2&&(s.push([m].concat(f.splice(0,2))),l="l",m=m=="m"?"l":"L");;){if(f.length==E[l])return f.unshift(m),s.push(f);if(f.lengthT!=o>T&&s<(n-a)*(T-r)/(o-r)+a&&(m=!m)}return m}},52142:function(D,E,e){var _,w=e(69444),s=e(29023),T=e(87263),m=e(11328),f=e(55968),l=e(10670),t=!1,a=s();function r(n,o,i){var u=_.segments(n),p=_.segments(o),c=i(_.combine(u,p));return _.polygon(c)}_={buildLog:function(n){return n===!0?t=w():n===!1&&(t=!1),t!==!1&&t.list},epsilon:function(n){return a.epsilon(n)},segments:function(n){var o=T(!0,a,t);return n.regions.forEach(o.addRegion),{segments:o.calculate(n.inverted),inverted:n.inverted}},combine:function(n,o){return{combined:T(!1,a,t).calculate(n.segments,n.inverted,o.segments,o.inverted),inverted1:n.inverted,inverted2:o.inverted}},selectUnion:function(n){return{segments:f.union(n.combined,t),inverted:n.inverted1||n.inverted2}},selectIntersect:function(n){return{segments:f.intersect(n.combined,t),inverted:n.inverted1&&n.inverted2}},selectDifference:function(n){return{segments:f.difference(n.combined,t),inverted:n.inverted1&&!n.inverted2}},selectDifferenceRev:function(n){return{segments:f.differenceRev(n.combined,t),inverted:!n.inverted1&&n.inverted2}},selectXor:function(n){return{segments:f.xor(n.combined,t),inverted:n.inverted1!==n.inverted2}},polygon:function(n){return{regions:m(n.segments,a,t),inverted:n.inverted}},polygonFromGeoJSON:function(n){return l.toPolygon(_,n)},polygonToGeoJSON:function(n){return l.fromPolygon(_,a,n)},union:function(n,o){return r(n,o,_.selectUnion)},intersect:function(n,o){return r(n,o,_.selectIntersect)},difference:function(n,o){return r(n,o,_.selectDifference)},differenceRev:function(n,o){return r(n,o,_.selectDifferenceRev)},xor:function(n,o){return r(n,o,_.selectXor)}},typeof window=="object"&&(window.PolyBool=_),D.exports=_},69444:function(D){D.exports=function(){var E,e=0,_=!1;function w(s,T){return E.list.push({type:s,data:T?JSON.parse(JSON.stringify(T)):void 0}),E}return E={list:[],segmentId:function(){return e++},checkIntersection:function(s,T){return w("check",{seg1:s,seg2:T})},segmentChop:function(s,T){return w("div_seg",{seg:s,pt:T}),w("chop",{seg:s,pt:T})},statusRemove:function(s){return w("pop_seg",{seg:s})},segmentUpdate:function(s){return w("seg_update",{seg:s})},segmentNew:function(s,T){return w("new_seg",{seg:s,primary:T})},segmentRemove:function(s){return w("rem_seg",{seg:s})},tempStatus:function(s,T,m){return w("temp_status",{seg:s,above:T,below:m})},rewind:function(s){return w("rewind",{seg:s})},status:function(s,T,m){return w("status",{seg:s,above:T,below:m})},vert:function(s){return s===_?E:(_=s,w("vert",{x:s}))},log:function(s){return typeof s!="string"&&(s=JSON.stringify(s,!1," ")),w("log",{txt:s})},reset:function(){return w("reset")},selected:function(s){return w("selected",{segs:s})},chainStart:function(s){return w("chain_start",{seg:s})},chainRemoveHead:function(s,T){return w("chain_rem_head",{index:s,pt:T})},chainRemoveTail:function(s,T){return w("chain_rem_tail",{index:s,pt:T})},chainNew:function(s,T){return w("chain_new",{pt1:s,pt2:T})},chainMatch:function(s){return w("chain_match",{index:s})},chainClose:function(s){return w("chain_close",{index:s})},chainAddHead:function(s,T){return w("chain_add_head",{index:s,pt:T})},chainAddTail:function(s,T){return w("chain_add_tail",{index:s,pt:T})},chainConnect:function(s,T){return w("chain_con",{index1:s,index2:T})},chainReverse:function(s){return w("chain_rev",{index:s})},chainJoin:function(s,T){return w("chain_join",{index1:s,index2:T})},done:function(){return w("done")}}}},29023:function(D){D.exports=function(E){typeof E!="number"&&(E=1e-10);var e={epsilon:function(_){return typeof _=="number"&&(E=_),E},pointAboveOrOnLine:function(_,w,s){var T=w[0],m=w[1],f=s[0],l=s[1],t=_[0];return(f-T)*(_[1]-m)-(l-m)*(t-T)>=-E},pointBetween:function(_,w,s){var T=_[1]-w[1],m=s[0]-w[0],f=_[0]-w[0],l=s[1]-w[1],t=f*m+T*l;return!(t-E)},pointsSameX:function(_,w){return Math.abs(_[0]-w[0])E!=f-T>E&&(m-a)*(T-r)/(f-r)+a-s>E&&(l=!l),m=a,f=r}return l}};return e}},10670:function(D){var E={toPolygon:function(e,_){function w(m){if(m.length<=0)return e.segments({inverted:!1,regions:[]});function f(a){var r=a.slice(0,a.length-1);return e.segments({inverted:!1,regions:[r]})}for(var l=f(m[0]),t=1;t0})}function p(C,L){var P=C.seg,I=L.seg,R=P.start,U=P.end,B=I.start,G=I.end;T&&T.checkIntersection(P,I);var N=s.linesIntersect(R,U,B,G);if(N===!1){if(!s.pointsCollinear(R,U,B)||s.pointsSame(R,G)||s.pointsSame(U,B))return!1;var j=s.pointsSame(R,B),V=s.pointsSame(U,G);if(j&&V)return L;var H=!j&&s.pointBetween(R,B,G),ee=!V&&s.pointBetween(U,B,G);if(j)return ee?a(L,U):a(C,G),L;H&&(V||(ee?a(L,U):a(C,G)),a(L,R))}else N.alongA===0&&(N.alongB===-1?a(C,B):N.alongB===0?a(C,N.pt):N.alongB===1&&a(C,G)),N.alongB===0&&(N.alongA===-1?a(L,R):N.alongA===0?a(L,N.pt):N.alongA===1&&a(L,U));return!1}for(var c=[];!f.isEmpty();){var b=f.getHead();if(T&&T.vert(b.pt[0]),b.isStart){let C=function(){if(v){var L=p(b,v);if(L)return L}return!!x&&p(b,x)};var A=C;T&&T.segmentNew(b.seg,b.primary);var d=u(b),v=d.before?d.before.ev:null,x=d.after?d.after.ev:null;T&&T.tempStatus(b.seg,!!v&&v.seg,!!x&&x.seg);var g,y,k=C();if(k&&(w?(y=b.seg.myFill.below===null||b.seg.myFill.above!==b.seg.myFill.below)&&(k.seg.myFill.above=!k.seg.myFill.above):k.seg.otherFill=b.seg.myFill,T&&T.segmentUpdate(k.seg),b.other.remove(),b.remove()),f.getHead()!==b){T&&T.rewind(b.seg);continue}w?(y=b.seg.myFill.below===null||b.seg.myFill.above!==b.seg.myFill.below,b.seg.myFill.below=x?x.seg.myFill.above:n,b.seg.myFill.above=y?!b.seg.myFill.below:b.seg.myFill.below):b.seg.otherFill===null&&(g=x?b.primary===x.primary?x.seg.otherFill.above:x.seg.myFill.above:b.primary?o:n,b.seg.otherFill={above:g,below:g}),T&&T.status(b.seg,!!v&&v.seg,!!x&&x.seg),b.other.status=d.insert(_.node({ev:b}))}else{var h=b.status;if(h===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(i.exists(h.prev)&&i.exists(h.next)&&p(h.prev.ev,h.next.ev),T&&T.statusRemove(h.ev.seg),h.remove(),!b.primary){var M=b.seg.myFill;b.seg.myFill=b.seg.otherFill,b.seg.otherFill=M}c.push(b.seg)}f.getHead().remove()}return T&&T.done(),c}return w?{addRegion:function(n){for(var o,i,u,p=n[n.length-1],c=0;c0&&!this.aborted;){var T=this.ifds_to_read.shift();T.offset&&this.scan_ifd(T.id,T.offset,w)}},_.prototype.read_uint16=function(w){var s=this.input;if(w+2>s.length)throw E("unexpected EOF","EBADDATA");return this.big_endian?256*s[w]+s[w+1]:s[w]+256*s[w+1]},_.prototype.read_uint32=function(w){var s=this.input;if(w+4>s.length)throw E("unexpected EOF","EBADDATA");return this.big_endian?16777216*s[w]+65536*s[w+1]+256*s[w+2]+s[w+3]:s[w]+256*s[w+1]+65536*s[w+2]+16777216*s[w+3]},_.prototype.is_subifd_link=function(w,s){return w===0&&s===34665||w===0&&s===34853||w===34665&&s===40965},_.prototype.exif_format_length=function(w){switch(w){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}},_.prototype.exif_format_read=function(w,s){var T;switch(w){case 1:case 2:return this.input[s];case 6:return(T=this.input[s])|33554430*(128&T);case 3:return this.read_uint16(s);case 8:return(T=this.read_uint16(s))|131070*(32768&T);case 4:return this.read_uint32(s);case 9:return 0|this.read_uint32(s);default:return null}},_.prototype.scan_ifd=function(w,s,T){var m=this.read_uint16(s);s+=2;for(var f=0;fthis.input.length)throw E("unexpected EOF","EBADDATA");for(var u=[],p=o,c=0;c0&&(this.ifds_to_read.push({id:l,offset:u[0]}),i=!0),T({is_big_endian:this.big_endian,ifd:w,tag:l,format:t,count:a,entry_offset:s+this.start,data_length:n,data_offset:o+this.start,value:u,is_subifd_link:i})===!1)return void(this.aborted=!0);s+=12}w===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(s)})},D.exports.ExifParser=_,D.exports.get_orientation=function(w){var s=0;try{return new _(w,0,w.length).each(function(T){if(T.ifd===0&&T.tag===274&&Array.isArray(T.value))return s=T.value[0],!1}),s}catch{return-1}}},76767:function(D,E,e){var _=e(14847).n8,w=e(14847).Ag;function s(a,r){if(a.length<4+r)return null;var n=w(a,r);return a.length>4&15,o=15&a[4],i=a[5]>>4&15,u=_(a,6),p=8,c=0;cd.width||b.width===d.width&&b.height>d.height?b:d}),i=n.reduce(function(b,d){return b.height>d.height||b.height===d.height&&b.width>d.width?b:d}),o.width>i.height||o.width===i.height&&o.height>i.width?o:i),p=1;r.transforms.forEach(function(b){var d={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},v={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(b.type==="imir"&&(p=b.value===0?v[p]:d[p=d[p=v[p]]]),b.type==="irot")for(var x=0;x1&&(u.variants=i.variants),i.orientation&&(u.orientation=i.orientation),i.exif_location&&i.exif_location.offset+i.exif_location.length<=l.length){var p=s(l,i.exif_location.offset),c=l.slice(i.exif_location.offset+p+4,i.exif_location.offset+i.exif_location.length),b=m.get_orientation(c);b>0&&(u.orientation=b)}return u}}}}}}},2504:function(D,E,e){var _=e(14847).eG,w=e(14847).OF,s=e(14847).mP,T=_("BM");D.exports=function(m){if(!(m.length<26)&&w(m,0,T))return{width:s(m,18),height:s(m,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},47342:function(D,E,e){var _=e(14847).eG,w=e(14847).OF,s=e(14847).mP,T=_("GIF87a"),m=_("GIF89a");D.exports=function(f){if(!(f.length<10)&&(w(f,0,T)||w(f,0,m)))return{width:s(f,6),height:s(f,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},31355:function(D,E,e){var _=e(14847).mP;D.exports=function(w){var s=_(w,0),T=_(w,2),m=_(w,4);if(s===0&&T===1&&m){for(var f=[],l={width:0,height:0},t=0;tl.width||r>l.height)&&(l=n)}return{width:l.width,height:l.height,variants:f,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},54261:function(D,E,e){var _=e(14847).n8,w=e(14847).eG,s=e(14847).OF,T=e(71371),m=w("Exif\0\0");D.exports=function(f){if(!(f.length<2)&&f[0]===255&&f[1]===216&&f[2]===255)for(var l=2;;){for(;;){if(f.length-l<2)return;if(f[l++]===255)break}for(var t,a,r=f[l++];r===255;)r=f[l++];if(208<=r&&r<=217||r===1)t=0;else{if(!(192<=r&&r<=254)||f.length-l<2)return;t=_(f,l)-2,l+=2}if(r===217||r===218)return;if(r===225&&t>=10&&s(f,l,m)&&(a=T.get_orientation(f.slice(l+6,l+t))),t>=5&&192<=r&&r<=207&&r!==196&&r!==200&&r!==204){if(f.length-l0&&(n.orientation=a),n}l+=t}}},6303:function(D,E,e){var _=e(14847).eG,w=e(14847).OF,s=e(14847).Ag,T=_(`‰PNG\r  `),m=_("IHDR");D.exports=function(f){if(!(f.length<24)&&w(f,0,T)&&w(f,12,m))return{width:s(f,16),height:s(f,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},38689:function(D,E,e){var _=e(14847).eG,w=e(14847).OF,s=e(14847).Ag,T=_("8BPS\0");D.exports=function(m){if(!(m.length<22)&&w(m,0,T))return{width:s(m,18),height:s(m,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},6881:function(D){function E(l){return typeof l=="number"&&isFinite(l)&&l>0}var e=/<[-_.:a-zA-Z0-9][^>]*>/,_=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,w=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,s=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,T=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,m=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function f(l){return m.test(l)?l.match(m)[0]:"px"}D.exports=function(l){if(function(v){var x,g=0,y=v.length;for(v[0]===239&&v[1]===187&&v[2]===191&&(g=3);g>14&16383),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function r(n,o){return{width:1+(n[o+6]<<16|n[o+5]<<8|n[o+4]),height:1+(n[o+9]<n.length)){for(;o+8=10?i=i||t(n,o+8):c==="VP8L"&&b>=9?i=i||a(n,o+8):c==="VP8X"&&b>=10?i=i||r(n,o+8):c==="EXIF"&&(u=m.get_orientation(n.slice(o+8,o+8+b)),o=1/0),o+=8+b}else o++;if(i)return u>0&&(i.orientation=u),i}}}},91497:function(D,E,e){D.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(D,E,e){var _=e(91497);D.exports=function(w){return function(s){for(var T=Object.keys(_),m=0;m1)for(var p=1;p"u"?e.g:window,s=["moz","webkit"],T="AnimationFrame",m=w["request"+T],f=w["cancel"+T]||w["cancelRequest"+T],l=0;!m&&l"u"?e.g:globalThis,t=w(),a=s("String.prototype.slice"),r={},n=Object.getPrototypeOf;f&&T&&n&&_(t,function(i){if(typeof l[i]=="function"){var u=new l[i];if(Symbol.toStringTag in u){var p=n(u),c=T(p,Symbol.toStringTag);if(!c){var b=n(p);c=T(b,Symbol.toStringTag)}r[i]=c.get}}});var o=e(9187);D.exports=function(i){return!!o(i)&&(f&&Symbol.toStringTag in i?function(u){var p=!1;return _(r,function(c,b){if(!p)try{var d=c.call(u);d===b&&(p=d)}catch{}}),p}(i):a(m(i),8,-1))}},3961:function(D,E,e){var _=e(63489),w=e(56131),s=_.instance();function T(n){this.local=this.regionalOptions[n||""]||this.regionalOptions[""]}T.prototype=new _.baseCalendar,w(T.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(n,o){if(typeof n=="string"){var i=n.match(f);return i?i[0]:""}var u=this._validateYear(n),p=n.month(),c=""+this.toChineseMonth(u,p);return o&&c.length<2&&(c="0"+c),this.isIntercalaryMonth(u,p)&&(c+="i"),c},monthNames:function(n){if(typeof n=="string"){var o=n.match(l);return o?o[0]:""}var i=this._validateYear(n),u=n.month(),p=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(i,u)-1];return this.isIntercalaryMonth(i,u)&&(p="闰"+p),p},monthNamesShort:function(n){if(typeof n=="string"){var o=n.match(t);return o?o[0]:""}var i=this._validateYear(n),u=n.month(),p=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(i,u)-1];return this.isIntercalaryMonth(i,u)&&(p="闰"+p),p},parseMonth:function(n,o){n=this._validateYear(n);var i,u=parseInt(o);if(isNaN(u))o[0]==="闰"&&(i=!0,o=o.substring(1)),o[o.length-1]==="月"&&(o=o.substring(0,o.length-1)),u=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(o);else{var p=o[o.length-1];i=p==="i"||p==="I"}return this.toMonthIndex(n,u,i)},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(n,o){if(n.year&&(n=n.year()),typeof n!="number"||n<1888||n>2111)throw o.replace(/\{0\}/,this.local.name);return n},toMonthIndex:function(n,o,i){var u=this.intercalaryMonth(n);if(i&&o!==u||o<1||o>12)throw _.local.invalidMonth.replace(/\{0\}/,this.local.name);return u?!i&&o<=u?o-1:o:o-1},toChineseMonth:function(n,o){n.year&&(o=(n=n.year()).month());var i=this.intercalaryMonth(n);if(o<0||o>(i?12:11))throw _.local.invalidMonth.replace(/\{0\}/,this.local.name);return i?o>13},isIntercalaryMonth:function(n,o){n.year&&(o=(n=n.year()).month());var i=this.intercalaryMonth(n);return!!i&&i===o},leapYear:function(n){return this.intercalaryMonth(n)!==0},weekOfYear:function(n,o,i){var u,p=this._validateYear(n,_.local.invalidyear),c=r[p-r[0]],b=c>>9&4095,d=c>>5&15,v=31&c;(u=s.newDate(b,d,v)).add(4-(u.dayOfWeek()||7),"d");var x=this.toJD(n,o,i)-u.toJD();return 1+Math.floor(x/7)},monthsInYear:function(n){return this.leapYear(n)?13:12},daysInMonth:function(n,o){n.year&&(o=n.month(),n=n.year()),n=this._validateYear(n);var i=a[n-a[0]];if(o>(i>>13?12:11))throw _.local.invalidMonth.replace(/\{0\}/,this.local.name);return i&1<<12-o?30:29},weekDay:function(n,o,i){return(this.dayOfWeek(n,o,i)||7)<6},toJD:function(n,o,i){var u=this._validate(n,c,i,_.local.invalidDate);n=this._validateYear(u.year()),o=u.month(),i=u.day();var p=this.isIntercalaryMonth(n,o),c=this.toChineseMonth(n,o),b=function(d,v,x,g,y){var k,h,M;if(typeof d=="object")h=d,k=v||{};else{var A;if(!(typeof d=="number"&&d>=1888&&d<=2111))throw new Error("Lunar year outside range 1888-2111");if(!(typeof v=="number"&&v>=1&&v<=12))throw new Error("Lunar month outside range 1 - 12");if(!(typeof x=="number"&&x>=1&&x<=30))throw new Error("Lunar day outside range 1 - 30");typeof g=="object"?(A=!1,k=g):(A=!!g,k={}),h={year:d,month:v,day:x,isIntercalary:A}}M=h.day-1;var C,L=a[h.year-a[0]],P=L>>13;C=P&&(h.month>P||h.isIntercalary)?h.month:h.month-1;for(var I=0;I>9&4095,(R>>5&15)-1,(31&R)+M);return k.year=U.getFullYear(),k.month=1+U.getMonth(),k.day=U.getDate(),k}(n,c,i,p);return s.toJD(b.year,b.month,b.day)},fromJD:function(n){var o=s.fromJD(n),i=function(p,c,b,d){var v,x;if(typeof p=="object")v=p,x=c||{};else{if(!(typeof p=="number"&&p>=1888&&p<=2111))throw new Error("Solar year outside range 1888-2111");if(!(typeof c=="number"&&c>=1&&c<=12))throw new Error("Solar month outside range 1 - 12");if(!(typeof b=="number"&&b>=1&&b<=31))throw new Error("Solar day outside range 1 - 31");v={year:p,month:c,day:b},x={}}var g=r[v.year-r[0]],y=v.year<<9|v.month<<5|v.day;x.year=y>=g?v.year:v.year-1,g=r[x.year-r[0]];var k,h=new Date(g>>9&4095,(g>>5&15)-1,31&g),M=new Date(v.year,v.month-1,v.day);k=Math.round((M-h)/864e5);var A,C=a[x.year-a[0]];for(A=0;A<13;A++){var L=C&1<<12-A?30:29;if(k>13;return!P||A=2&&t<=6},extraInfo:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate);return{century:T[Math.floor((t.year()-1)/100)+1]||""}},toJD:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate);return m=t.year()+(t.year()<0?1:0),f=t.month(),(l=t.day())+(f>1?16:0)+(f>2?32*(f-2):0)+400*(m-1)+this.jdEpoch-1},fromJD:function(m){m=Math.floor(m+.5)-Math.floor(this.jdEpoch)-1;var f=Math.floor(m/400)+1;m-=400*(f-1),m+=m>15?16:0;var l=Math.floor(m/32)+1,t=m-32*(l-1)+1;return this.newDate(f<=0?f-1:f,l,t)}});var T={20:"Fruitbat",21:"Anchovy"};_.calendars.discworld=s},37715:function(D,E,e){var _=e(63489),w=e(56131);function s(T){this.local=this.regionalOptions[T||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar,w(s.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(T){var m=this._validate(T,this.minMonth,this.minDay,_.local.invalidYear);return(T=m.year()+(m.year()<0?1:0))%4==3||T%4==-1},monthsInYear:function(T){return this._validate(T,this.minMonth,this.minDay,_.local.invalidYear||_.regionalOptions[""].invalidYear),13},weekOfYear:function(T,m,f){var l=this.newDate(T,m,f);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(T,m){var f=this._validate(T,m,this.minDay,_.local.invalidMonth);return this.daysPerMonth[f.month()-1]+(f.month()===13&&this.leapYear(f.year())?1:0)},weekDay:function(T,m,f){return(this.dayOfWeek(T,m,f)||7)<6},toJD:function(T,m,f){var l=this._validate(T,m,f,_.local.invalidDate);return(T=l.year())<0&&T++,l.day()+30*(l.month()-1)+365*(T-1)+Math.floor(T/4)+this.jdEpoch-1},fromJD:function(T){var m=Math.floor(T)+.5-this.jdEpoch,f=Math.floor((m-Math.floor((m+366)/1461))/365)+1;f<=0&&f--,m=Math.floor(T)+.5-this.newDate(f,1,1).toJD();var l=Math.floor(m/30)+1,t=m-30*(l-1)+1;return this.newDate(f,l,t)}}),_.calendars.ethiopian=s},99384:function(D,E,e){var _=e(63489),w=e(56131);function s(m){this.local=this.regionalOptions[m||""]||this.regionalOptions[""]}function T(m,f){return m-f*Math.floor(m/f)}s.prototype=new _.baseCalendar,w(s.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(m){var f=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear);return this._leapYear(f.year())},_leapYear:function(m){return T(7*(m=m<0?m+1:m)+1,19)<7},monthsInYear:function(m){return this._validate(m,this.minMonth,this.minDay,_.local.invalidYear),this._leapYear(m.year?m.year():m)?13:12},weekOfYear:function(m,f,l){var t=this.newDate(m,f,l);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(m){return m=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear).year(),this.toJD(m===-1?1:m+1,7,1)-this.toJD(m,7,1)},daysInMonth:function(m,f){return m.year&&(f=m.month(),m=m.year()),this._validate(m,f,this.minDay,_.local.invalidMonth),f===12&&this.leapYear(m)||f===8&&T(this.daysInYear(m),10)===5?30:f===9&&T(this.daysInYear(m),10)===3?29:this.daysPerMonth[f-1]},weekDay:function(m,f,l){return this.dayOfWeek(m,f,l)!==6},extraInfo:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate);return{yearType:(this.leapYear(t)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(t)%10-3]}},toJD:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate);m=t.year(),f=t.month(),l=t.day();var a=m<=0?m+1:m,r=this.jdEpoch+this._delay1(a)+this._delay2(a)+l+1;if(f<7){for(var n=7;n<=this.monthsInYear(m);n++)r+=this.daysInMonth(m,n);for(n=1;n=this.toJD(f===-1?1:f+1,7,1);)f++;for(var l=mthis.toJD(f,l,this.daysInMonth(f,l));)l++;var t=m-this.toJD(f,l,1)+1;return this.newDate(f,l,t)}}),_.calendars.hebrew=s},43805:function(D,E,e){var _=e(63489),w=e(56131);function s(T){this.local=this.regionalOptions[T||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar,w(s.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(T){return(11*this._validate(T,this.minMonth,this.minDay,_.local.invalidYear).year()+14)%30<11},weekOfYear:function(T,m,f){var l=this.newDate(T,m,f);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(T){return this.leapYear(T)?355:354},daysInMonth:function(T,m){var f=this._validate(T,m,this.minDay,_.local.invalidMonth);return this.daysPerMonth[f.month()-1]+(f.month()===12&&this.leapYear(f.year())?1:0)},weekDay:function(T,m,f){return this.dayOfWeek(T,m,f)!==5},toJD:function(T,m,f){var l=this._validate(T,m,f,_.local.invalidDate);return T=l.year(),m=l.month(),T=T<=0?T+1:T,(f=l.day())+Math.ceil(29.5*(m-1))+354*(T-1)+Math.floor((3+11*T)/30)+this.jdEpoch-1},fromJD:function(T){T=Math.floor(T)+.5;var m=Math.floor((30*(T-this.jdEpoch)+10646)/10631);m=m<=0?m-1:m;var f=Math.min(12,Math.ceil((T-29-this.toJD(m,1,1))/29.5)+1),l=T-this.toJD(m,f,1)+1;return this.newDate(m,f,l)}}),_.calendars.islamic=s},88874:function(D,E,e){var _=e(63489),w=e(56131);function s(T){this.local=this.regionalOptions[T||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar,w(s.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(T){var m=this._validate(T,this.minMonth,this.minDay,_.local.invalidYear);return(T=m.year()<0?m.year()+1:m.year())%4==0},weekOfYear:function(T,m,f){var l=this.newDate(T,m,f);return l.add(4-(l.dayOfWeek()||7),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(T,m){var f=this._validate(T,m,this.minDay,_.local.invalidMonth);return this.daysPerMonth[f.month()-1]+(f.month()===2&&this.leapYear(f.year())?1:0)},weekDay:function(T,m,f){return(this.dayOfWeek(T,m,f)||7)<6},toJD:function(T,m,f){var l=this._validate(T,m,f,_.local.invalidDate);return T=l.year(),m=l.month(),f=l.day(),T<0&&T++,m<=2&&(T--,m+=12),Math.floor(365.25*(T+4716))+Math.floor(30.6001*(m+1))+f-1524.5},fromJD:function(T){var m=Math.floor(T+.5)+1524,f=Math.floor((m-122.1)/365.25),l=Math.floor(365.25*f),t=Math.floor((m-l)/30.6001),a=t-Math.floor(t<14?1:13),r=f-Math.floor(a>2?4716:4715),n=m-l-Math.floor(30.6001*t);return r<=0&&r--,this.newDate(r,a,n)}}),_.calendars.julian=s},83290:function(D,E,e){var _=e(63489),w=e(56131);function s(f){this.local=this.regionalOptions[f||""]||this.regionalOptions[""]}function T(f,l){return f-l*Math.floor(f/l)}function m(f,l){return T(f-1,l)+1}s.prototype=new _.baseCalendar,w(s.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(f){return this._validate(f,this.minMonth,this.minDay,_.local.invalidYear),!1},formatYear:function(f){f=this._validate(f,this.minMonth,this.minDay,_.local.invalidYear).year();var l=Math.floor(f/400);return f%=400,f+=f<0?400:0,l+"."+Math.floor(f/20)+"."+f%20},forYear:function(f){if((f=f.split(".")).length<3)throw"Invalid Mayan year";for(var l=0,t=0;t19||t>0&&a<0)throw"Invalid Mayan year";l=20*l+a}return l},monthsInYear:function(f){return this._validate(f,this.minMonth,this.minDay,_.local.invalidYear),18},weekOfYear:function(f,l,t){return this._validate(f,l,t,_.local.invalidDate),0},daysInYear:function(f){return this._validate(f,this.minMonth,this.minDay,_.local.invalidYear),360},daysInMonth:function(f,l){return this._validate(f,l,this.minDay,_.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(f,l,t){return this._validate(f,l,t,_.local.invalidDate).day()},weekDay:function(f,l,t){return this._validate(f,l,t,_.local.invalidDate),!0},extraInfo:function(f,l,t){var a=this._validate(f,l,t,_.local.invalidDate).toJD(),r=this._toHaab(a),n=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[r[0]-1],haabMonth:r[0],haabDay:r[1],tzolkinDayName:this.local.tzolkinMonths[n[0]-1],tzolkinDay:n[0],tzolkinTrecena:n[1]}},_toHaab:function(f){var l=T(8+(f-=this.jdEpoch)+340,365);return[Math.floor(l/20)+1,T(l,20)]},_toTzolkin:function(f){return[m(20+(f-=this.jdEpoch),20),m(f+4,13)]},toJD:function(f,l,t){var a=this._validate(f,l,t,_.local.invalidDate);return a.day()+20*a.month()+360*a.year()+this.jdEpoch},fromJD:function(f){f=Math.floor(f)+.5-this.jdEpoch;var l=Math.floor(f/360);f%=360,f+=f<0?360:0;var t=Math.floor(f/20),a=f%20;return this.newDate(l,t,a)}}),_.calendars.mayan=s},29108:function(D,E,e){var _=e(63489),w=e(56131);function s(m){this.local=this.regionalOptions[m||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar;var T=_.instance("gregorian");w(s.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(m){var f=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear||_.regionalOptions[""].invalidYear);return T.leapYear(f.year()+(f.year()<1?1:0)+1469)},weekOfYear:function(m,f,l){var t=this.newDate(m,f,l);return t.add(1-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(m,f){var l=this._validate(m,f,this.minDay,_.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(m,f,l){return(this.dayOfWeek(m,f,l)||7)<6},toJD:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidMonth);(m=t.year())<0&&m++;for(var a=t.day(),r=1;r=this.toJD(f+1,1,1);)f++;for(var l=m-Math.floor(this.toJD(f,1,1)+.5)+1,t=1;l>this.daysInMonth(f,t);)l-=this.daysInMonth(f,t),t++;return this.newDate(f,t,l)}}),_.calendars.nanakshahi=s},55422:function(D,E,e){var _=e(63489),w=e(56131);function s(T){this.local=this.regionalOptions[T||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar,w(s.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(T){return this.daysInYear(T)!==this.daysPerYear},weekOfYear:function(T,m,f){var l=this.newDate(T,m,f);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(T){if(T=this._validate(T,this.minMonth,this.minDay,_.local.invalidYear).year(),this.NEPALI_CALENDAR_DATA[T]===void 0)return this.daysPerYear;for(var m=0,f=this.minMonth;f<=12;f++)m+=this.NEPALI_CALENDAR_DATA[T][f];return m},daysInMonth:function(T,m){return T.year&&(m=T.month(),T=T.year()),this._validate(T,m,this.minDay,_.local.invalidMonth),this.NEPALI_CALENDAR_DATA[T]===void 0?this.daysPerMonth[m-1]:this.NEPALI_CALENDAR_DATA[T][m]},weekDay:function(T,m,f){return this.dayOfWeek(T,m,f)!==6},toJD:function(T,m,f){var l=this._validate(T,m,f,_.local.invalidDate);T=l.year(),m=l.month(),f=l.day();var t=_.instance(),a=0,r=m,n=T;this._createMissingCalendarData(T);var o=T-(r>9||r===9&&f>=this.NEPALI_CALENDAR_DATA[n][0]?56:57);for(m!==9&&(a=f,r--);r!==9;)r<=0&&(r=12,n--),a+=this.NEPALI_CALENDAR_DATA[n][r],r--;return m===9?(a+=f-this.NEPALI_CALENDAR_DATA[n][0])<0&&(a+=t.daysInYear(o)):a+=this.NEPALI_CALENDAR_DATA[n][9]-this.NEPALI_CALENDAR_DATA[n][0],t.newDate(o,1,1).add(a,"d").toJD()},fromJD:function(T){var m=_.instance().fromJD(T),f=m.year(),l=m.dayOfYear(),t=f+56;this._createMissingCalendarData(t);for(var a=9,r=this.NEPALI_CALENDAR_DATA[t][0],n=this.NEPALI_CALENDAR_DATA[t][a]-r+1;l>n;)++a>12&&(a=1,t++),n+=this.NEPALI_CALENDAR_DATA[t][a];var o=this.NEPALI_CALENDAR_DATA[t][a]-(n-l);return this.newDate(t,a,o)},_createMissingCalendarData:function(T){var m=this.daysPerMonth.slice(0);m.unshift(17);for(var f=T-1;f0?474:473))%2820+474+38)%2816<682},weekOfYear:function(m,f,l){var t=this.newDate(m,f,l);return t.add(-(t.dayOfWeek()+1)%7,"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(m,f){var l=this._validate(m,f,this.minDay,_.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(m,f,l){return this.dayOfWeek(m,f,l)!==5},toJD:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate);m=t.year(),f=t.month(),l=t.day();var a=m-(m>=0?474:473),r=474+T(a,2820);return l+(f<=7?31*(f-1):30*(f-1)+6)+Math.floor((682*r-110)/2816)+365*(r-1)+1029983*Math.floor(a/2820)+this.jdEpoch-1},fromJD:function(m){var f=(m=Math.floor(m)+.5)-this.toJD(475,1,1),l=Math.floor(f/1029983),t=T(f,1029983),a=2820;if(t!==1029982){var r=Math.floor(t/366),n=T(t,366);a=Math.floor((2134*r+2816*n+2815)/1028522)+r+1}var o=a+2820*l+474;o=o<=0?o-1:o;var i=m-this.toJD(o,1,1)+1,u=i<=186?Math.ceil(i/31):Math.ceil((i-6)/30),p=m-this.toJD(o,u,1)+1;return this.newDate(o,u,p)}}),_.calendars.persian=s,_.calendars.jalali=s},31320:function(D,E,e){var _=e(63489),w=e(56131),s=_.instance();function T(m){this.local=this.regionalOptions[m||""]||this.regionalOptions[""]}T.prototype=new _.baseCalendar,w(T.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(m){var f=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear);return m=this._t2gYear(f.year()),s.leapYear(m)},weekOfYear:function(m,f,l){var t=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear);return m=this._t2gYear(t.year()),s.weekOfYear(m,t.month(),t.day())},daysInMonth:function(m,f){var l=this._validate(m,f,this.minDay,_.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(m,f,l){return(this.dayOfWeek(m,f,l)||7)<6},toJD:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate);return m=this._t2gYear(t.year()),s.toJD(m,t.month(),t.day())},fromJD:function(m){var f=s.fromJD(m),l=this._g2tYear(f.year());return this.newDate(l,f.month(),f.day())},_t2gYear:function(m){return m+this.yearsOffset+(m>=-this.yearsOffset&&m<=-1?1:0)},_g2tYear:function(m){return m-this.yearsOffset-(m>=1&&m<=this.yearsOffset?1:0)}}),_.calendars.taiwan=T},51367:function(D,E,e){var _=e(63489),w=e(56131),s=_.instance();function T(m){this.local=this.regionalOptions[m||""]||this.regionalOptions[""]}T.prototype=new _.baseCalendar,w(T.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(m){var f=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear);return m=this._t2gYear(f.year()),s.leapYear(m)},weekOfYear:function(m,f,l){var t=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear);return m=this._t2gYear(t.year()),s.weekOfYear(m,t.month(),t.day())},daysInMonth:function(m,f){var l=this._validate(m,f,this.minDay,_.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(m,f,l){return(this.dayOfWeek(m,f,l)||7)<6},toJD:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate);return m=this._t2gYear(t.year()),s.toJD(m,t.month(),t.day())},fromJD:function(m){var f=s.fromJD(m),l=this._g2tYear(f.year());return this.newDate(l,f.month(),f.day())},_t2gYear:function(m){return m-this.yearsOffset-(m>=1&&m<=this.yearsOffset?1:0)},_g2tYear:function(m){return m+this.yearsOffset+(m>=-this.yearsOffset&&m<=-1?1:0)}}),_.calendars.thai=T},21457:function(D,E,e){var _=e(63489),w=e(56131);function s(m){this.local=this.regionalOptions[m||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar,w(s.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(m){var f=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear);return this.daysInYear(f.year())===355},weekOfYear:function(m,f,l){var t=this.newDate(m,f,l);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(m){for(var f=0,l=1;l<=12;l++)f+=this.daysInMonth(m,l);return f},daysInMonth:function(m,f){for(var l=this._validate(m,f,this.minDay,_.local.invalidMonth).toJD()-24e5+.5,t=0,a=0;al)return T[t]-T[t-1];t++}return 30},weekDay:function(m,f,l){return this.dayOfWeek(m,f,l)!==5},toJD:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate),a=12*(t.year()-1)+t.month()-15292;return t.day()+T[a-1]-1+24e5-.5},fromJD:function(m){for(var f=m-24e5+.5,l=0,t=0;tf);t++)l++;var a=l+15292,r=Math.floor((a-1)/12),n=r+1,o=a-12*r,i=f-T[l-1]+1;return this.newDate(n,o,i)},isValid:function(m,f,l){var t=_.baseCalendar.prototype.isValid.apply(this,arguments);return t&&(t=(m=m.year!=null?m.year:m)>=1276&&m<=1500),t},_validate:function(m,f,l,t){var a=_.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw t.replace(/\{0\}/,this.local.name);return a}}),_.calendars.ummalqura=s;var T=[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(D,E,e){var _=e(56131);function w(){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={}}function s(t,a,r,n){if(this._calendar=t,this._year=a,this._month=r,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(l.local.invalidDate||l.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function T(t,a){return"000000".substring(0,a-(t=""+t).length)+t}function m(){this.shortYearCutoff="+10"}function f(t){this.local=this.regionalOptions[t]||this.regionalOptions[""]}_(w.prototype,{instance:function(t,a){t=(t||"gregorian").toLowerCase(),a=a||"";var r=this._localCals[t+"-"+a];if(!r&&this.calendars[t]&&(r=new this.calendars[t](a),this._localCals[t+"-"+a]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,t);return r},newDate:function(t,a,r,n,o){return(n=(t!=null&&t.year?t.calendar():typeof n=="string"?this.instance(n,o):n)||this.instance()).newDate(t,a,r)},substituteDigits:function(t){return function(a){return(a+"").replace(/[0-9]/g,function(r){return t[r]})}},substituteChineseDigits:function(t,a){return function(r){for(var n="",o=0;r>0;){var i=r%10;n=(i===0?"":t[i]+a[o])+n,o++,r=Math.floor(r/10)}return n.indexOf(t[1]+a[1])===0&&(n=n.substr(1)),n||t[0]}}}),_(s.prototype,{newDate:function(t,a,r){return this._calendar.newDate(t??this,a,r)},year:function(t){return arguments.length===0?this._year:this.set(t,"y")},month:function(t){return arguments.length===0?this._month:this.set(t,"m")},day:function(t){return arguments.length===0?this._day:this.set(t,"d")},date:function(t,a,r){if(!this._calendar.isValid(t,a,r))throw(l.local.invalidDate||l.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=t,this._month=a,this._day=r,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(t,a){return this._calendar.add(this,t,a)},set:function(t,a){return this._calendar.set(this,t,a)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(l.local.differentCalendars||l.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,t._calendar.local.name);var a=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return a===0?0:a<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(t){return this._calendar.fromJD(t)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(t){return this._calendar.fromJSDate(t)},toString:function(){return(this.year()<0?"-":"")+T(Math.abs(this.year()),4)+"-"+T(this.month(),2)+"-"+T(this.day(),2)}}),_(m.prototype,{_validateLevel:0,newDate:function(t,a,r){return t==null?this.today():(t.year&&(this._validate(t,a,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),r=t.day(),a=t.month(),t=t.year()),new s(this,t,a,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var a=this._validate(t,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear);return(a.year()<0?"-":"")+T(Math.abs(a.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear),12},monthOfYear:function(t,a){var r=this._validate(t,a,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,a){var r=(a+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth),r},daysInYear:function(t){var a=this._validate(t,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear);return this.leapYear(a)?366:365},dayOfYear:function(t,a,r){var n=this._validate(t,a,r,l.local.invalidDate||l.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(t,a,r){var n=this._validate(t,a,r,l.local.invalidDate||l.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,a,r){return this._validate(t,a,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),{}},add:function(t,a,r){return this._validate(t,this.minMonth,this.minDay,l.local.invalidDate||l.regionalOptions[""].invalidDate),this._correctAdd(t,this._add(t,a,r),a,r)},_add:function(t,a,r){if(this._validateLevel++,r==="d"||r==="w"){var n=t.toJD()+a*(r==="w"?this.daysInWeek():1),o=t.calendar().fromJD(n);return this._validateLevel--,[o.year(),o.month(),o.day()]}try{var i=t.year()+(r==="y"?a:0),u=t.monthOfYear()+(r==="m"?a:0);o=t.day(),r==="y"?(t.month()!==this.fromMonthOfYear(i,u)&&(u=this.newDate(i,t.month(),this.minDay).monthOfYear()),u=Math.min(u,this.monthsInYear(i)),o=Math.min(o,this.daysInMonth(i,this.fromMonthOfYear(i,u)))):r==="m"&&(function(c){for(;ub-1+c.minMonth;)i++,u-=b,b=c.monthsInYear(i)}(this),o=Math.min(o,this.daysInMonth(i,this.fromMonthOfYear(i,u))));var p=[i,this.fromMonthOfYear(i,u),o];return this._validateLevel--,p}catch(c){throw this._validateLevel--,c}},_correctAdd:function(t,a,r,n){if(!(this.hasYearZero||n!=="y"&&n!=="m"||a[0]!==0&&t.year()>0==a[0]>0)){var o={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],i=r<0?-1:1;a=this._add(t,r*o[0]+i*o[1],o[2])}return t.date(a[0],a[1],a[2])},set:function(t,a,r){this._validate(t,this.minMonth,this.minDay,l.local.invalidDate||l.regionalOptions[""].invalidDate);var n=r==="y"?a:t.year(),o=r==="m"?a:t.month(),i=r==="d"?a:t.day();return r!=="y"&&r!=="m"||(i=Math.min(i,this.daysInMonth(n,o))),t.date(n,o,i)},isValid:function(t,a,r){this._validateLevel++;var n=this.hasYearZero||t!==0;if(n){var o=this.newDate(t,a,this.minDay);n=a>=this.minMonth&&a-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),b=o-(c>2.5?4716:4715);return b<=0&&b--,this.newDate(b,c,p)},toJSDate:function(t,a,r){var n=this._validate(t,a,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),o=new Date(n.year(),n.month()-1,n.day());return o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0),o.setHours(o.getHours()>12?o.getHours()+2:0),o},fromJSDate:function(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var l=D.exports=new w;l.cdate=s,l.baseCalendar=m,l.calendars.gregorian=f},94338:function(D,E,e){var _=e(56131),w=e(63489);_(w.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"}),w.local=w.regionalOptions[""],_(w.cdate.prototype,{formatDate:function(s,T){return typeof s!="string"&&(T=s,s=""),this._calendar.formatDate(s||"",this,T)}}),_(w.baseCalendar.prototype,{UNIX_EPOCH:w.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:w.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(s,T,m){if(typeof s!="string"&&(m=T,T=s,s=""),!T)return"";if(T.calendar()!==this)throw w.local.invalidFormat||w.regionalOptions[""].invalidFormat;s=s||this.local.dateFormat;for(var f,l,t,a=(m=m||{}).dayNamesShort||this.local.dayNamesShort,r=m.dayNames||this.local.dayNames,n=m.monthNumbers||this.local.monthNumbers,o=m.monthNamesShort||this.local.monthNamesShort,i=m.monthNames||this.local.monthNames,u=(m.calculateWeek||this.local.calculateWeek,function(h,M){for(var A=1;k+A1}),p=function(h,M,A,C){var L=""+M;if(u(h,C))for(;L.length1},g=function(R,U){var B=x(R,U),G=[2,3,B?4:2,B?4:2,10,11,20]["oyYJ@!".indexOf(R)+1],N=new RegExp("^-?\\d{1,"+G+"}"),j=T.substring(C).match(N);if(!j)throw(w.local.missingNumberAt||w.regionalOptions[""].missingNumberAt).replace(/\{0\}/,C);return C+=j[0].length,parseInt(j[0],10)},y=this,k=function(){if(typeof r=="function"){x("m");var R=r.call(y,T.substring(C));return C+=R.length,R}return g("m")},h=function(R,U,B,G){for(var N=x(R,G)?B:U,j=0;j-1){p=1,c=b;for(var I=this.daysInMonth(u,p);c>I;I=this.daysInMonth(u,p))p++,c-=I}return i>-1?this.fromJD(i):this.newDate(u,p,c)},determineDate:function(s,T,m,f,l){m&&typeof m!="object"&&(l=f,f=m,m=null),typeof f!="string"&&(l=f,f="");var t=this;return T=T?T.newDate():null,s==null?T:typeof s=="string"?function(a){try{return t.parseDate(f,a,l)}catch{}for(var r=((a=a.toLowerCase()).match(/^c/)&&m?m.newDate():null)||t.today(),n=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,o=n.exec(a);o;)r.add(parseInt(o[1],10),o[2]||"d"),o=n.exec(a);return r}(s):typeof s=="number"?isNaN(s)||s===1/0||s===-1/0?T:t.today().add(s,"d"):t.newDate(s)}})},69862:function(){},40964:function(){},72077:function(D,E,e){var _=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],w=typeof globalThis>"u"?e.g:globalThis;D.exports=function(){for(var s=[],T=0;T<_.length;T++)typeof w[_[T]]=="function"&&(s[s.length]=_[T]);return s}},81684:function(D,E,e){function _(pe,de,he){pe.prototype=de.prototype=he,he.constructor=pe}function w(pe,de){var he=Object.create(pe.prototype);for(var ye in de)he[ye]=de[ye];return he}function s(){}e.d(E,{sX:function(){return xe},k4:function(){return X}});var T=.7,m=1/T,f="\\s*([+-]?\\d+)\\s*",l="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",t="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",a=/^#([0-9a-f]{3,8})$/,r=new RegExp("^rgb\\(".concat(f,",").concat(f,",").concat(f,"\\)$")),n=new RegExp("^rgb\\(".concat(t,",").concat(t,",").concat(t,"\\)$")),o=new RegExp("^rgba\\(".concat(f,",").concat(f,",").concat(f,",").concat(l,"\\)$")),i=new RegExp("^rgba\\(".concat(t,",").concat(t,",").concat(t,",").concat(l,"\\)$")),u=new RegExp("^hsl\\(".concat(l,",").concat(t,",").concat(t,"\\)$")),p=new RegExp("^hsla\\(".concat(l,",").concat(t,",").concat(t,",").concat(l,"\\)$")),c={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};function b(){return this.rgb().formatHex()}function d(){return this.rgb().formatRgb()}function v(pe){var de,he;return pe=(pe+"").trim().toLowerCase(),(de=a.exec(pe))?(he=de[1].length,de=parseInt(de[1],16),he===6?x(de):he===3?new h(de>>8&15|de>>4&240,de>>4&15|240&de,(15&de)<<4|15&de,1):he===8?g(de>>24&255,de>>16&255,de>>8&255,(255&de)/255):he===4?g(de>>12&15|de>>8&240,de>>8&15|de>>4&240,de>>4&15|240&de,((15&de)<<4|15&de)/255):null):(de=r.exec(pe))?new h(de[1],de[2],de[3],1):(de=n.exec(pe))?new h(255*de[1]/100,255*de[2]/100,255*de[3]/100,1):(de=o.exec(pe))?g(de[1],de[2],de[3],de[4]):(de=i.exec(pe))?g(255*de[1]/100,255*de[2]/100,255*de[3]/100,de[4]):(de=u.exec(pe))?I(de[1],de[2]/100,de[3]/100,1):(de=p.exec(pe))?I(de[1],de[2]/100,de[3]/100,de[4]):c.hasOwnProperty(pe)?x(c[pe]):pe==="transparent"?new h(NaN,NaN,NaN,0):null}function x(pe){return new h(pe>>16&255,pe>>8&255,255&pe,1)}function g(pe,de,he,ye){return ye<=0&&(pe=de=he=NaN),new h(pe,de,he,ye)}function y(pe){return pe instanceof s||(pe=v(pe)),pe?new h((pe=pe.rgb()).r,pe.g,pe.b,pe.opacity):new h}function k(pe,de,he,ye){return arguments.length===1?y(pe):new h(pe,de,he,ye??1)}function h(pe,de,he,ye){this.r=+pe,this.g=+de,this.b=+he,this.opacity=+ye}function M(){return"#".concat(P(this.r)).concat(P(this.g)).concat(P(this.b))}function A(){var pe=C(this.opacity);return"".concat(pe===1?"rgb(":"rgba(").concat(L(this.r),", ").concat(L(this.g),", ").concat(L(this.b)).concat(pe===1?")":", ".concat(pe,")"))}function C(pe){return isNaN(pe)?1:Math.max(0,Math.min(1,pe))}function L(pe){return Math.max(0,Math.min(255,Math.round(pe)||0))}function P(pe){return((pe=L(pe))<16?"0":"")+pe.toString(16)}function I(pe,de,he,ye){return ye<=0?pe=de=he=NaN:he<=0||he>=1?pe=de=NaN:de<=0&&(pe=NaN),new U(pe,de,he,ye)}function R(pe){if(pe instanceof U)return new U(pe.h,pe.s,pe.l,pe.opacity);if(pe instanceof s||(pe=v(pe)),!pe)return new U;if(pe instanceof U)return pe;var de=(pe=pe.rgb()).r/255,he=pe.g/255,ye=pe.b/255,ze=Math.min(de,he,ye),Te=Math.max(de,he,ye),Ae=NaN,Me=Te-ze,Ce=(Te+ze)/2;return Me?(Ae=de===Te?(he-ye)/Me+6*(he0&&Ce<1?0:Ae,new U(Ae,Me,Ce,pe.opacity)}function U(pe,de,he,ye){this.h=+pe,this.s=+de,this.l=+he,this.opacity=+ye}function B(pe){return(pe=(pe||0)%360)<0?pe+360:pe}function G(pe){return Math.max(0,Math.min(1,pe||0))}function N(pe,de,he){return 255*(pe<60?de+(he-de)*pe/60:pe<180?he:pe<240?de+(he-de)*(240-pe)/60:de)}_(s,v,{copy:function(pe){return Object.assign(new this.constructor,this,pe)},displayable:function(){return this.rgb().displayable()},hex:b,formatHex:b,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return R(this).formatHsl()},formatRgb:d,toString:d}),_(h,k,w(s,{brighter:function(pe){return pe=pe==null?m:Math.pow(m,pe),new h(this.r*pe,this.g*pe,this.b*pe,this.opacity)},darker:function(pe){return pe=pe==null?T:Math.pow(T,pe),new h(this.r*pe,this.g*pe,this.b*pe,this.opacity)},rgb:function(){return this},clamp:function(){return new h(L(this.r),L(this.g),L(this.b),C(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:M,formatHex:M,formatHex8:function(){return"#".concat(P(this.r)).concat(P(this.g)).concat(P(this.b)).concat(P(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:A,toString:A})),_(U,function(pe,de,he,ye){return arguments.length===1?R(pe):new U(pe,de,he,ye??1)},w(s,{brighter:function(pe){return pe=pe==null?m:Math.pow(m,pe),new U(this.h,this.s,this.l*pe,this.opacity)},darker:function(pe){return pe=pe==null?T:Math.pow(T,pe),new U(this.h,this.s,this.l*pe,this.opacity)},rgb:function(){var pe=this.h%360+360*(this.h<0),de=isNaN(pe)||isNaN(this.s)?0:this.s,he=this.l,ye=he+(he<.5?he:1-he)*de,ze=2*he-ye;return new h(N(pe>=240?pe-240:pe+120,ze,ye),N(pe,ze,ye),N(pe<120?pe+240:pe-120,ze,ye),this.opacity)},clamp:function(){return new U(B(this.h),G(this.s),G(this.l),C(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 pe=C(this.opacity);return"".concat(pe===1?"hsl(":"hsla(").concat(B(this.h),", ").concat(100*G(this.s),"%, ").concat(100*G(this.l),"%").concat(pe===1?")":", ".concat(pe,")"))}}));var j=function(pe){return function(){return pe}};function V(pe,de){var he=de-pe;return he?function(ye,ze){return function(Te){return ye+Te*ze}}(pe,he):j(isNaN(pe)?de:pe)}var H=function pe(de){var he=function(ze){return(ze=+ze)==1?V:function(Te,Ae){return Ae-Te?function(Me,Ce,ne){return Me=Math.pow(Me,ne),Ce=Math.pow(Ce,ne)-Me,ne=1/ne,function(ue){return Math.pow(Me+ue*Ce,ne)}}(Te,Ae,ze):j(isNaN(Te)?Ae:Te)}}(de);function ye(ze,Te){var Ae=he((ze=k(ze)).r,(Te=k(Te)).r),Me=he(ze.g,Te.g),Ce=he(ze.b,Te.b),ne=V(ze.opacity,Te.opacity);return function(ue){return ze.r=Ae(ue),ze.g=Me(ue),ze.b=Ce(ue),ze.opacity=ne(ue),ze+""}}return ye.gamma=pe,ye}(1);function ee(pe,de){var he,ye=de?de.length:0,ze=pe?Math.min(ye,pe.length):0,Te=new Array(ze),Ae=new Array(ye);for(he=0;heTe&&(ze=de.slice(Te,ze),Me[Ae]?Me[Ae]+=ze:Me[++Ae]=ze),(he=he[0])===(ye=ye[0])?Me[Ae]?Me[Ae]+=ye:Me[++Ae]=ye:(Me[++Ae]=null,Ce.push({i:Ae,x:X(he,ye)})),Te=re.lastIndex;return Te"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 a(u){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c)},a(u)}var r=["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"],n=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],o=typeof window<"u";function i(u){var p=function(c){s(d,c);var b=m(d);function d(v){var x;return e(this,d),x=b.call(this,v),x.p=Promise.resolve(),x.resizeHandler=null,x.handlers={},x.syncWindowResize=x.syncWindowResize.bind(l(x)),x.syncEventHandlers=x.syncEventHandlers.bind(l(x)),x.attachUpdateEvents=x.attachUpdateEvents.bind(l(x)),x.getRef=x.getRef.bind(l(x)),x.handleUpdate=x.handleUpdate.bind(l(x)),x.figureCallback=x.figureCallback.bind(l(x)),x.updatePlotly=x.updatePlotly.bind(l(x)),x}return w(d,[{key:"updatePlotly",value:function(x,g,y){var k=this;this.p=this.p.then(function(){if(!k.unmounting){if(!k.el)throw new Error("Missing element reference");return u.react(k.el,{data:k.props.data,layout:k.props.layout,config:k.props.config,frames:k.props.frames})}}).then(function(){k.unmounting||(k.syncWindowResize(x),k.syncEventHandlers(),k.figureCallback(g),y&&k.attachUpdateEvents())}).catch(function(h){k.props.onError&&k.props.onError(h)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(x){this.unmounting=!1;var g=x.frames&&x.frames.length?x.frames.length:0,y=this.props.frames&&this.props.frames.length?this.props.frames.length:0,k=!(x.layout===this.props.layout&&x.data===this.props.data&&x.config===this.props.config&&y===g),h=x.revision!==void 0,M=x.revision!==this.props.revision;!k&&(!h||h&&!M)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&o&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),u.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var x=this;!this.el||!this.el.removeListener||n.forEach(function(g){x.el.on(g,x.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var x=this;!this.el||!this.el.removeListener||n.forEach(function(g){x.el.removeListener(g,x.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(x){if(typeof x=="function"){var g=this.el,y=g.data,k=g.layout,h=this.el._transitionData?this.el._transitionData._frames:null,M={data:y,layout:k,frames:h};x(M,this.el)}}},{key:"syncWindowResize",value:function(x){var g=this;o&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return u.Plots.resize(g.el)},window.addEventListener("resize",this.resizeHandler),x&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(x){this.el=x,this.props.debug&&o&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var x=this;r.forEach(function(g){var y=x.props["on"+g],k=x.handlers[g],h=!!k;y&&!h?x.addEventHandler(g,y):!y&&h?x.removeEventHandler(g):y&&h&&y!==k&&(x.removeEventHandler(g),x.addEventHandler(g,y))})}},{key:"addEventHandler",value:function(x,g){this.handlers[x]=g,this.el.on(this.getPlotlyEventName(x),this.handlers[x])}},{key:"removeEventHandler",value:function(x){this.el.removeListener(this.getPlotlyEventName(x),this.handlers[x]),delete this.handlers[x]}},{key:"getPlotlyEventName",value:function(x){return"plotly_"+x.toLowerCase()}},{key:"render",value:function(){return J.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),d}(J.Component);return p.propTypes={data:fe.default.arrayOf(fe.default.object),config:fe.default.object,layout:fe.default.object,frames:fe.default.arrayOf(fe.default.object),revision:fe.default.number,onInitialized:fe.default.func,onPurge:fe.default.func,onError:fe.default.func,onUpdate:fe.default.func,debug:fe.default.bool,style:fe.default.object,className:fe.default.string,useResizeHandler:fe.default.bool,divId:fe.default.string},r.forEach(function(c){p.propTypes["on"+c]=fe.default.func}),p.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},p}})(pw);const KT=jp(pw),Pu={sunIcon:{viewBox:"0 0 16 16",width:16,height:16,path:"M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z"},moonIcon:{viewBox:"0 0 25 25",width:25,height:25,path:"M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z"},plotCsv:{width:900,height:900,path:"M170.666667 106.666667l0.192 736H906.666667v64H149.546667c-23.552 0-42.666667-19.093333-42.666667-42.666667L106.666667 106.666667h64z m686.506666 454.144l13.653334 16.362666a21.333333 21.333333 0 0 1-2.666667 30.058667l-171.157333 143.146667a21.333333 21.333333 0 0 1-21.546667 3.477333l-229.973333-91.285333-113.834667 94.997333a21.333333 21.333333 0 0 1-30.037333-2.709333l-13.653334-16.362667a21.333333 21.333333 0 0 1 2.688-30.058667l133.312-111.274666a21.333333 21.333333 0 0 1 21.546667-3.456l229.930667 91.264 151.68-126.826667a21.333333 21.333333 0 0 1 30.037333 2.666667z m-1.621333-417.962667l16.896 13.013333a21.333333 21.333333 0 0 1 3.925333 29.888L685.802667 433.706667a21.333333 21.333333 0 0 1-20.202667 8.085333l-226.794667-35.413333-150.186666 222.357333a21.333333 21.333333 0 0 1-27.477334 7.018667l-2.133333-1.28-17.685333-11.946667a21.333333 21.333333 0 0 1-5.738667-29.610667l165.354667-244.821333a21.333333 21.333333 0 0 1 20.992-9.130667L650.453333 374.613333l175.146667-227.882666a21.333333 21.333333 0 0 1 29.930667-3.904z"},addText:{path:"M896 928H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32z m-736-64h704v-704h-704z M704 352H320a32 32 0 0 1 0-64h384a32 32 0 0 1 0 64z M512 736a32 32 0 0 1-32-32V320a32 32 0 0 1 64 0v384a32 32 0 0 1-32 32z",width:950,height:950},changeTitle:{path:"M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z M244.736 656.896h534.016v62.464H244.736z M373.76 358.4H307.2v219.136h-45.568V358.4H192v-41.472H373.76V358.4zM403.968 316.928h44.032v50.176h-44.032v-50.176z m0 67.072h44.032v194.048h-44.032V384zM576.512 541.184l8.704 31.744c-13.312 5.12-26.624 8.192-38.912 8.704-32.768 1.024-48.64-15.36-48.128-48.128V422.912h-26.624V384h26.624v-46.592l44.032-21.504V384h36.352v38.912h-36.352V532.48c-1.024 10.24 3.072 14.848 11.264 13.824 5.12 0 12.8-1.536 23.04-5.12zM619.008 316.928h44.032v260.608h-44.032V316.928zM813.056 509.952l41.472 12.8c-11.776 40.96-37.888 61.44-78.336 60.416-52.736-1.536-80.384-34.304-81.92-98.304 2.56-67.072 29.696-102.4 81.92-105.984 52.224 1.536 78.336 36.864 79.36 105.984v13.824h-117.248c3.584 30.208 15.872 45.568 37.888 46.592 19.968 0.512 32.256-11.264 36.864-35.328z m-72.704-51.712h70.656c-1.024-25.088-12.288-38.4-33.792-38.912-21.504 0.512-33.792 13.824-36.864 38.912z",width:920,height:900},changeColor:{path:"M8 3C5.79 3 4 4.79 4 7V14C4 15.1 4.9 16 6 16H9V20C9 21.1 9.9 22 11 22H13C14.1 22 15 21.1 15 20V16H18C19.1 16 20 15.1 20 14V3H8M8 5H12V7H14V5H15V9H17V5H18V10H6V7C6 5.9 6.9 5 8 5M6 14V12H18V14H6Z",width:22,height:22},uploadImage:{path:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5",width:1024,height:1024},downloadCsv:{path:`M486.2,196.121h-13.164V132.59c0-0.399-0.064-0.795-0.116-1.2c-0.021-2.52-0.824-5-2.551-6.96L364.656,3.677 +`)):H=R.stylize("[Circular]","special")),d(V)){if(j&&N.match(/^\d+$/))return H;(V=JSON.stringify(""+N)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(V=V.slice(1,-1),V=R.stylize(V,"name")):(V=V.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),V=R.stylize(V,"string"))}return V+": "+H}function i(R){return Array.isArray(R)}function u(R){return typeof R=="boolean"}function p(R){return R===null}function c(R){return typeof R=="number"}function b(R){return typeof R=="string"}function d(R){return R===void 0}function v(R){return x(R)&&h(R)==="[object RegExp]"}function x(R){return typeof R=="object"&&R!==null}function g(R){return x(R)&&h(R)==="[object Date]"}function y(R){return x(R)&&(h(R)==="[object Error]"||R instanceof Error)}function k(R){return typeof R=="function"}function h(R){return Object.prototype.toString.call(R)}function M(R){return R<10?"0"+R.toString(10):R.toString(10)}E.debuglog=function(R){if(R=R.toUpperCase(),!T[R])if(m.test(R)){var U=_.pid;T[R]=function(){var B=E.format.apply(E,arguments);console.error("%s %d: %s",R,U,B)}}else T[R]=function(){};return T[R]},E.inspect=l,l.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]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},E.types=e(4936),E.isArray=i,E.isBoolean=u,E.isNull=p,E.isNullOrUndefined=function(R){return R==null},E.isNumber=c,E.isString=b,E.isSymbol=function(R){return typeof R=="symbol"},E.isUndefined=d,E.isRegExp=v,E.types.isRegExp=v,E.isObject=x,E.isDate=g,E.types.isDate=g,E.isError=y,E.types.isNativeError=y,E.isFunction=k,E.isPrimitive=function(R){return R===null||typeof R=="boolean"||typeof R=="number"||typeof R=="string"||typeof R=="symbol"||R===void 0},E.isBuffer=e(45920);var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(){var R=new Date,U=[M(R.getHours()),M(R.getMinutes()),M(R.getSeconds())].join(":");return[R.getDate(),A[R.getMonth()],U].join(" ")}function L(R,U){return Object.prototype.hasOwnProperty.call(R,U)}E.log=function(){console.log("%s - %s",C(),E.format.apply(E,arguments))},E.inherits=e(42018),E._extend=function(R,U){if(!U||!x(U))return R;for(var B=Object.keys(U),G=B.length;G--;)R[B[G]]=U[B[G]];return R};var P=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function I(R,U){if(!R){var B=new Error("Promise was rejected with a falsy value");B.reason=R,R=B}return U(R)}E.promisify=function(R){if(typeof R!="function")throw new TypeError('The "original" argument must be of type Function');if(P&&R[P]){var U;if(typeof(U=R[P])!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(U,P,{value:U,enumerable:!1,writable:!1,configurable:!0}),U}function U(){for(var B,G,N=new Promise(function(H,ee){B=H,G=ee}),j=[],V=0;V"u"?e.g:globalThis,t=w(),a=s("String.prototype.slice"),r={},n=Object.getPrototypeOf;f&&T&&n&&_(t,function(i){if(typeof l[i]=="function"){var u=new l[i];if(Symbol.toStringTag in u){var p=n(u),c=T(p,Symbol.toStringTag);if(!c){var b=n(p);c=T(b,Symbol.toStringTag)}r[i]=c.get}}});var o=e(9187);D.exports=function(i){return!!o(i)&&(f&&Symbol.toStringTag in i?function(u){var p=!1;return _(r,function(c,b){if(!p)try{var d=c.call(u);d===b&&(p=d)}catch{}}),p}(i):a(m(i),8,-1))}},3961:function(D,E,e){var _=e(63489),w=e(56131),s=_.instance();function T(n){this.local=this.regionalOptions[n||""]||this.regionalOptions[""]}T.prototype=new _.baseCalendar,w(T.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(n,o){if(typeof n=="string"){var i=n.match(f);return i?i[0]:""}var u=this._validateYear(n),p=n.month(),c=""+this.toChineseMonth(u,p);return o&&c.length<2&&(c="0"+c),this.isIntercalaryMonth(u,p)&&(c+="i"),c},monthNames:function(n){if(typeof n=="string"){var o=n.match(l);return o?o[0]:""}var i=this._validateYear(n),u=n.month(),p=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(i,u)-1];return this.isIntercalaryMonth(i,u)&&(p="闰"+p),p},monthNamesShort:function(n){if(typeof n=="string"){var o=n.match(t);return o?o[0]:""}var i=this._validateYear(n),u=n.month(),p=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(i,u)-1];return this.isIntercalaryMonth(i,u)&&(p="闰"+p),p},parseMonth:function(n,o){n=this._validateYear(n);var i,u=parseInt(o);if(isNaN(u))o[0]==="闰"&&(i=!0,o=o.substring(1)),o[o.length-1]==="月"&&(o=o.substring(0,o.length-1)),u=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(o);else{var p=o[o.length-1];i=p==="i"||p==="I"}return this.toMonthIndex(n,u,i)},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(n,o){if(n.year&&(n=n.year()),typeof n!="number"||n<1888||n>2111)throw o.replace(/\{0\}/,this.local.name);return n},toMonthIndex:function(n,o,i){var u=this.intercalaryMonth(n);if(i&&o!==u||o<1||o>12)throw _.local.invalidMonth.replace(/\{0\}/,this.local.name);return u?!i&&o<=u?o-1:o:o-1},toChineseMonth:function(n,o){n.year&&(o=(n=n.year()).month());var i=this.intercalaryMonth(n);if(o<0||o>(i?12:11))throw _.local.invalidMonth.replace(/\{0\}/,this.local.name);return i?o>13},isIntercalaryMonth:function(n,o){n.year&&(o=(n=n.year()).month());var i=this.intercalaryMonth(n);return!!i&&i===o},leapYear:function(n){return this.intercalaryMonth(n)!==0},weekOfYear:function(n,o,i){var u,p=this._validateYear(n,_.local.invalidyear),c=r[p-r[0]],b=c>>9&4095,d=c>>5&15,v=31&c;(u=s.newDate(b,d,v)).add(4-(u.dayOfWeek()||7),"d");var x=this.toJD(n,o,i)-u.toJD();return 1+Math.floor(x/7)},monthsInYear:function(n){return this.leapYear(n)?13:12},daysInMonth:function(n,o){n.year&&(o=n.month(),n=n.year()),n=this._validateYear(n);var i=a[n-a[0]];if(o>(i>>13?12:11))throw _.local.invalidMonth.replace(/\{0\}/,this.local.name);return i&1<<12-o?30:29},weekDay:function(n,o,i){return(this.dayOfWeek(n,o,i)||7)<6},toJD:function(n,o,i){var u=this._validate(n,c,i,_.local.invalidDate);n=this._validateYear(u.year()),o=u.month(),i=u.day();var p=this.isIntercalaryMonth(n,o),c=this.toChineseMonth(n,o),b=function(d,v,x,g,y){var k,h,M;if(typeof d=="object")h=d,k=v||{};else{var A;if(!(typeof d=="number"&&d>=1888&&d<=2111))throw new Error("Lunar year outside range 1888-2111");if(!(typeof v=="number"&&v>=1&&v<=12))throw new Error("Lunar month outside range 1 - 12");if(!(typeof x=="number"&&x>=1&&x<=30))throw new Error("Lunar day outside range 1 - 30");typeof g=="object"?(A=!1,k=g):(A=!!g,k={}),h={year:d,month:v,day:x,isIntercalary:A}}M=h.day-1;var C,L=a[h.year-a[0]],P=L>>13;C=P&&(h.month>P||h.isIntercalary)?h.month:h.month-1;for(var I=0;I>9&4095,(R>>5&15)-1,(31&R)+M);return k.year=U.getFullYear(),k.month=1+U.getMonth(),k.day=U.getDate(),k}(n,c,i,p);return s.toJD(b.year,b.month,b.day)},fromJD:function(n){var o=s.fromJD(n),i=function(p,c,b,d){var v,x;if(typeof p=="object")v=p,x=c||{};else{if(!(typeof p=="number"&&p>=1888&&p<=2111))throw new Error("Solar year outside range 1888-2111");if(!(typeof c=="number"&&c>=1&&c<=12))throw new Error("Solar month outside range 1 - 12");if(!(typeof b=="number"&&b>=1&&b<=31))throw new Error("Solar day outside range 1 - 31");v={year:p,month:c,day:b},x={}}var g=r[v.year-r[0]],y=v.year<<9|v.month<<5|v.day;x.year=y>=g?v.year:v.year-1,g=r[x.year-r[0]];var k,h=new Date(g>>9&4095,(g>>5&15)-1,31&g),M=new Date(v.year,v.month-1,v.day);k=Math.round((M-h)/864e5);var A,C=a[x.year-a[0]];for(A=0;A<13;A++){var L=C&1<<12-A?30:29;if(k>13;return!P||A=2&&t<=6},extraInfo:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate);return{century:T[Math.floor((t.year()-1)/100)+1]||""}},toJD:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate);return m=t.year()+(t.year()<0?1:0),f=t.month(),(l=t.day())+(f>1?16:0)+(f>2?32*(f-2):0)+400*(m-1)+this.jdEpoch-1},fromJD:function(m){m=Math.floor(m+.5)-Math.floor(this.jdEpoch)-1;var f=Math.floor(m/400)+1;m-=400*(f-1),m+=m>15?16:0;var l=Math.floor(m/32)+1,t=m-32*(l-1)+1;return this.newDate(f<=0?f-1:f,l,t)}});var T={20:"Fruitbat",21:"Anchovy"};_.calendars.discworld=s},37715:function(D,E,e){var _=e(63489),w=e(56131);function s(T){this.local=this.regionalOptions[T||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar,w(s.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(T){var m=this._validate(T,this.minMonth,this.minDay,_.local.invalidYear);return(T=m.year()+(m.year()<0?1:0))%4==3||T%4==-1},monthsInYear:function(T){return this._validate(T,this.minMonth,this.minDay,_.local.invalidYear||_.regionalOptions[""].invalidYear),13},weekOfYear:function(T,m,f){var l=this.newDate(T,m,f);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(T,m){var f=this._validate(T,m,this.minDay,_.local.invalidMonth);return this.daysPerMonth[f.month()-1]+(f.month()===13&&this.leapYear(f.year())?1:0)},weekDay:function(T,m,f){return(this.dayOfWeek(T,m,f)||7)<6},toJD:function(T,m,f){var l=this._validate(T,m,f,_.local.invalidDate);return(T=l.year())<0&&T++,l.day()+30*(l.month()-1)+365*(T-1)+Math.floor(T/4)+this.jdEpoch-1},fromJD:function(T){var m=Math.floor(T)+.5-this.jdEpoch,f=Math.floor((m-Math.floor((m+366)/1461))/365)+1;f<=0&&f--,m=Math.floor(T)+.5-this.newDate(f,1,1).toJD();var l=Math.floor(m/30)+1,t=m-30*(l-1)+1;return this.newDate(f,l,t)}}),_.calendars.ethiopian=s},99384:function(D,E,e){var _=e(63489),w=e(56131);function s(m){this.local=this.regionalOptions[m||""]||this.regionalOptions[""]}function T(m,f){return m-f*Math.floor(m/f)}s.prototype=new _.baseCalendar,w(s.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(m){var f=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear);return this._leapYear(f.year())},_leapYear:function(m){return T(7*(m=m<0?m+1:m)+1,19)<7},monthsInYear:function(m){return this._validate(m,this.minMonth,this.minDay,_.local.invalidYear),this._leapYear(m.year?m.year():m)?13:12},weekOfYear:function(m,f,l){var t=this.newDate(m,f,l);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(m){return m=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear).year(),this.toJD(m===-1?1:m+1,7,1)-this.toJD(m,7,1)},daysInMonth:function(m,f){return m.year&&(f=m.month(),m=m.year()),this._validate(m,f,this.minDay,_.local.invalidMonth),f===12&&this.leapYear(m)||f===8&&T(this.daysInYear(m),10)===5?30:f===9&&T(this.daysInYear(m),10)===3?29:this.daysPerMonth[f-1]},weekDay:function(m,f,l){return this.dayOfWeek(m,f,l)!==6},extraInfo:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate);return{yearType:(this.leapYear(t)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(t)%10-3]}},toJD:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate);m=t.year(),f=t.month(),l=t.day();var a=m<=0?m+1:m,r=this.jdEpoch+this._delay1(a)+this._delay2(a)+l+1;if(f<7){for(var n=7;n<=this.monthsInYear(m);n++)r+=this.daysInMonth(m,n);for(n=1;n=this.toJD(f===-1?1:f+1,7,1);)f++;for(var l=mthis.toJD(f,l,this.daysInMonth(f,l));)l++;var t=m-this.toJD(f,l,1)+1;return this.newDate(f,l,t)}}),_.calendars.hebrew=s},43805:function(D,E,e){var _=e(63489),w=e(56131);function s(T){this.local=this.regionalOptions[T||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar,w(s.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(T){return(11*this._validate(T,this.minMonth,this.minDay,_.local.invalidYear).year()+14)%30<11},weekOfYear:function(T,m,f){var l=this.newDate(T,m,f);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(T){return this.leapYear(T)?355:354},daysInMonth:function(T,m){var f=this._validate(T,m,this.minDay,_.local.invalidMonth);return this.daysPerMonth[f.month()-1]+(f.month()===12&&this.leapYear(f.year())?1:0)},weekDay:function(T,m,f){return this.dayOfWeek(T,m,f)!==5},toJD:function(T,m,f){var l=this._validate(T,m,f,_.local.invalidDate);return T=l.year(),m=l.month(),T=T<=0?T+1:T,(f=l.day())+Math.ceil(29.5*(m-1))+354*(T-1)+Math.floor((3+11*T)/30)+this.jdEpoch-1},fromJD:function(T){T=Math.floor(T)+.5;var m=Math.floor((30*(T-this.jdEpoch)+10646)/10631);m=m<=0?m-1:m;var f=Math.min(12,Math.ceil((T-29-this.toJD(m,1,1))/29.5)+1),l=T-this.toJD(m,f,1)+1;return this.newDate(m,f,l)}}),_.calendars.islamic=s},88874:function(D,E,e){var _=e(63489),w=e(56131);function s(T){this.local=this.regionalOptions[T||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar,w(s.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(T){var m=this._validate(T,this.minMonth,this.minDay,_.local.invalidYear);return(T=m.year()<0?m.year()+1:m.year())%4==0},weekOfYear:function(T,m,f){var l=this.newDate(T,m,f);return l.add(4-(l.dayOfWeek()||7),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(T,m){var f=this._validate(T,m,this.minDay,_.local.invalidMonth);return this.daysPerMonth[f.month()-1]+(f.month()===2&&this.leapYear(f.year())?1:0)},weekDay:function(T,m,f){return(this.dayOfWeek(T,m,f)||7)<6},toJD:function(T,m,f){var l=this._validate(T,m,f,_.local.invalidDate);return T=l.year(),m=l.month(),f=l.day(),T<0&&T++,m<=2&&(T--,m+=12),Math.floor(365.25*(T+4716))+Math.floor(30.6001*(m+1))+f-1524.5},fromJD:function(T){var m=Math.floor(T+.5)+1524,f=Math.floor((m-122.1)/365.25),l=Math.floor(365.25*f),t=Math.floor((m-l)/30.6001),a=t-Math.floor(t<14?1:13),r=f-Math.floor(a>2?4716:4715),n=m-l-Math.floor(30.6001*t);return r<=0&&r--,this.newDate(r,a,n)}}),_.calendars.julian=s},83290:function(D,E,e){var _=e(63489),w=e(56131);function s(f){this.local=this.regionalOptions[f||""]||this.regionalOptions[""]}function T(f,l){return f-l*Math.floor(f/l)}function m(f,l){return T(f-1,l)+1}s.prototype=new _.baseCalendar,w(s.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(f){return this._validate(f,this.minMonth,this.minDay,_.local.invalidYear),!1},formatYear:function(f){f=this._validate(f,this.minMonth,this.minDay,_.local.invalidYear).year();var l=Math.floor(f/400);return f%=400,f+=f<0?400:0,l+"."+Math.floor(f/20)+"."+f%20},forYear:function(f){if((f=f.split(".")).length<3)throw"Invalid Mayan year";for(var l=0,t=0;t19||t>0&&a<0)throw"Invalid Mayan year";l=20*l+a}return l},monthsInYear:function(f){return this._validate(f,this.minMonth,this.minDay,_.local.invalidYear),18},weekOfYear:function(f,l,t){return this._validate(f,l,t,_.local.invalidDate),0},daysInYear:function(f){return this._validate(f,this.minMonth,this.minDay,_.local.invalidYear),360},daysInMonth:function(f,l){return this._validate(f,l,this.minDay,_.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(f,l,t){return this._validate(f,l,t,_.local.invalidDate).day()},weekDay:function(f,l,t){return this._validate(f,l,t,_.local.invalidDate),!0},extraInfo:function(f,l,t){var a=this._validate(f,l,t,_.local.invalidDate).toJD(),r=this._toHaab(a),n=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[r[0]-1],haabMonth:r[0],haabDay:r[1],tzolkinDayName:this.local.tzolkinMonths[n[0]-1],tzolkinDay:n[0],tzolkinTrecena:n[1]}},_toHaab:function(f){var l=T(8+(f-=this.jdEpoch)+340,365);return[Math.floor(l/20)+1,T(l,20)]},_toTzolkin:function(f){return[m(20+(f-=this.jdEpoch),20),m(f+4,13)]},toJD:function(f,l,t){var a=this._validate(f,l,t,_.local.invalidDate);return a.day()+20*a.month()+360*a.year()+this.jdEpoch},fromJD:function(f){f=Math.floor(f)+.5-this.jdEpoch;var l=Math.floor(f/360);f%=360,f+=f<0?360:0;var t=Math.floor(f/20),a=f%20;return this.newDate(l,t,a)}}),_.calendars.mayan=s},29108:function(D,E,e){var _=e(63489),w=e(56131);function s(m){this.local=this.regionalOptions[m||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar;var T=_.instance("gregorian");w(s.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(m){var f=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear||_.regionalOptions[""].invalidYear);return T.leapYear(f.year()+(f.year()<1?1:0)+1469)},weekOfYear:function(m,f,l){var t=this.newDate(m,f,l);return t.add(1-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(m,f){var l=this._validate(m,f,this.minDay,_.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(m,f,l){return(this.dayOfWeek(m,f,l)||7)<6},toJD:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidMonth);(m=t.year())<0&&m++;for(var a=t.day(),r=1;r=this.toJD(f+1,1,1);)f++;for(var l=m-Math.floor(this.toJD(f,1,1)+.5)+1,t=1;l>this.daysInMonth(f,t);)l-=this.daysInMonth(f,t),t++;return this.newDate(f,t,l)}}),_.calendars.nanakshahi=s},55422:function(D,E,e){var _=e(63489),w=e(56131);function s(T){this.local=this.regionalOptions[T||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar,w(s.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(T){return this.daysInYear(T)!==this.daysPerYear},weekOfYear:function(T,m,f){var l=this.newDate(T,m,f);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(T){if(T=this._validate(T,this.minMonth,this.minDay,_.local.invalidYear).year(),this.NEPALI_CALENDAR_DATA[T]===void 0)return this.daysPerYear;for(var m=0,f=this.minMonth;f<=12;f++)m+=this.NEPALI_CALENDAR_DATA[T][f];return m},daysInMonth:function(T,m){return T.year&&(m=T.month(),T=T.year()),this._validate(T,m,this.minDay,_.local.invalidMonth),this.NEPALI_CALENDAR_DATA[T]===void 0?this.daysPerMonth[m-1]:this.NEPALI_CALENDAR_DATA[T][m]},weekDay:function(T,m,f){return this.dayOfWeek(T,m,f)!==6},toJD:function(T,m,f){var l=this._validate(T,m,f,_.local.invalidDate);T=l.year(),m=l.month(),f=l.day();var t=_.instance(),a=0,r=m,n=T;this._createMissingCalendarData(T);var o=T-(r>9||r===9&&f>=this.NEPALI_CALENDAR_DATA[n][0]?56:57);for(m!==9&&(a=f,r--);r!==9;)r<=0&&(r=12,n--),a+=this.NEPALI_CALENDAR_DATA[n][r],r--;return m===9?(a+=f-this.NEPALI_CALENDAR_DATA[n][0])<0&&(a+=t.daysInYear(o)):a+=this.NEPALI_CALENDAR_DATA[n][9]-this.NEPALI_CALENDAR_DATA[n][0],t.newDate(o,1,1).add(a,"d").toJD()},fromJD:function(T){var m=_.instance().fromJD(T),f=m.year(),l=m.dayOfYear(),t=f+56;this._createMissingCalendarData(t);for(var a=9,r=this.NEPALI_CALENDAR_DATA[t][0],n=this.NEPALI_CALENDAR_DATA[t][a]-r+1;l>n;)++a>12&&(a=1,t++),n+=this.NEPALI_CALENDAR_DATA[t][a];var o=this.NEPALI_CALENDAR_DATA[t][a]-(n-l);return this.newDate(t,a,o)},_createMissingCalendarData:function(T){var m=this.daysPerMonth.slice(0);m.unshift(17);for(var f=T-1;f0?474:473))%2820+474+38)%2816<682},weekOfYear:function(m,f,l){var t=this.newDate(m,f,l);return t.add(-(t.dayOfWeek()+1)%7,"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(m,f){var l=this._validate(m,f,this.minDay,_.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(m,f,l){return this.dayOfWeek(m,f,l)!==5},toJD:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate);m=t.year(),f=t.month(),l=t.day();var a=m-(m>=0?474:473),r=474+T(a,2820);return l+(f<=7?31*(f-1):30*(f-1)+6)+Math.floor((682*r-110)/2816)+365*(r-1)+1029983*Math.floor(a/2820)+this.jdEpoch-1},fromJD:function(m){var f=(m=Math.floor(m)+.5)-this.toJD(475,1,1),l=Math.floor(f/1029983),t=T(f,1029983),a=2820;if(t!==1029982){var r=Math.floor(t/366),n=T(t,366);a=Math.floor((2134*r+2816*n+2815)/1028522)+r+1}var o=a+2820*l+474;o=o<=0?o-1:o;var i=m-this.toJD(o,1,1)+1,u=i<=186?Math.ceil(i/31):Math.ceil((i-6)/30),p=m-this.toJD(o,u,1)+1;return this.newDate(o,u,p)}}),_.calendars.persian=s,_.calendars.jalali=s},31320:function(D,E,e){var _=e(63489),w=e(56131),s=_.instance();function T(m){this.local=this.regionalOptions[m||""]||this.regionalOptions[""]}T.prototype=new _.baseCalendar,w(T.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(m){var f=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear);return m=this._t2gYear(f.year()),s.leapYear(m)},weekOfYear:function(m,f,l){var t=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear);return m=this._t2gYear(t.year()),s.weekOfYear(m,t.month(),t.day())},daysInMonth:function(m,f){var l=this._validate(m,f,this.minDay,_.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(m,f,l){return(this.dayOfWeek(m,f,l)||7)<6},toJD:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate);return m=this._t2gYear(t.year()),s.toJD(m,t.month(),t.day())},fromJD:function(m){var f=s.fromJD(m),l=this._g2tYear(f.year());return this.newDate(l,f.month(),f.day())},_t2gYear:function(m){return m+this.yearsOffset+(m>=-this.yearsOffset&&m<=-1?1:0)},_g2tYear:function(m){return m-this.yearsOffset-(m>=1&&m<=this.yearsOffset?1:0)}}),_.calendars.taiwan=T},51367:function(D,E,e){var _=e(63489),w=e(56131),s=_.instance();function T(m){this.local=this.regionalOptions[m||""]||this.regionalOptions[""]}T.prototype=new _.baseCalendar,w(T.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(m){var f=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear);return m=this._t2gYear(f.year()),s.leapYear(m)},weekOfYear:function(m,f,l){var t=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear);return m=this._t2gYear(t.year()),s.weekOfYear(m,t.month(),t.day())},daysInMonth:function(m,f){var l=this._validate(m,f,this.minDay,_.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(m,f,l){return(this.dayOfWeek(m,f,l)||7)<6},toJD:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate);return m=this._t2gYear(t.year()),s.toJD(m,t.month(),t.day())},fromJD:function(m){var f=s.fromJD(m),l=this._g2tYear(f.year());return this.newDate(l,f.month(),f.day())},_t2gYear:function(m){return m-this.yearsOffset-(m>=1&&m<=this.yearsOffset?1:0)},_g2tYear:function(m){return m+this.yearsOffset+(m>=-this.yearsOffset&&m<=-1?1:0)}}),_.calendars.thai=T},21457:function(D,E,e){var _=e(63489),w=e(56131);function s(m){this.local=this.regionalOptions[m||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar,w(s.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(m){var f=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear);return this.daysInYear(f.year())===355},weekOfYear:function(m,f,l){var t=this.newDate(m,f,l);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(m){for(var f=0,l=1;l<=12;l++)f+=this.daysInMonth(m,l);return f},daysInMonth:function(m,f){for(var l=this._validate(m,f,this.minDay,_.local.invalidMonth).toJD()-24e5+.5,t=0,a=0;al)return T[t]-T[t-1];t++}return 30},weekDay:function(m,f,l){return this.dayOfWeek(m,f,l)!==5},toJD:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate),a=12*(t.year()-1)+t.month()-15292;return t.day()+T[a-1]-1+24e5-.5},fromJD:function(m){for(var f=m-24e5+.5,l=0,t=0;tf);t++)l++;var a=l+15292,r=Math.floor((a-1)/12),n=r+1,o=a-12*r,i=f-T[l-1]+1;return this.newDate(n,o,i)},isValid:function(m,f,l){var t=_.baseCalendar.prototype.isValid.apply(this,arguments);return t&&(t=(m=m.year!=null?m.year:m)>=1276&&m<=1500),t},_validate:function(m,f,l,t){var a=_.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw t.replace(/\{0\}/,this.local.name);return a}}),_.calendars.ummalqura=s;var T=[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(D,E,e){var _=e(56131);function w(){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={}}function s(t,a,r,n){if(this._calendar=t,this._year=a,this._month=r,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(l.local.invalidDate||l.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function T(t,a){return"000000".substring(0,a-(t=""+t).length)+t}function m(){this.shortYearCutoff="+10"}function f(t){this.local=this.regionalOptions[t]||this.regionalOptions[""]}_(w.prototype,{instance:function(t,a){t=(t||"gregorian").toLowerCase(),a=a||"";var r=this._localCals[t+"-"+a];if(!r&&this.calendars[t]&&(r=new this.calendars[t](a),this._localCals[t+"-"+a]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,t);return r},newDate:function(t,a,r,n,o){return(n=(t!=null&&t.year?t.calendar():typeof n=="string"?this.instance(n,o):n)||this.instance()).newDate(t,a,r)},substituteDigits:function(t){return function(a){return(a+"").replace(/[0-9]/g,function(r){return t[r]})}},substituteChineseDigits:function(t,a){return function(r){for(var n="",o=0;r>0;){var i=r%10;n=(i===0?"":t[i]+a[o])+n,o++,r=Math.floor(r/10)}return n.indexOf(t[1]+a[1])===0&&(n=n.substr(1)),n||t[0]}}}),_(s.prototype,{newDate:function(t,a,r){return this._calendar.newDate(t??this,a,r)},year:function(t){return arguments.length===0?this._year:this.set(t,"y")},month:function(t){return arguments.length===0?this._month:this.set(t,"m")},day:function(t){return arguments.length===0?this._day:this.set(t,"d")},date:function(t,a,r){if(!this._calendar.isValid(t,a,r))throw(l.local.invalidDate||l.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=t,this._month=a,this._day=r,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(t,a){return this._calendar.add(this,t,a)},set:function(t,a){return this._calendar.set(this,t,a)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(l.local.differentCalendars||l.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,t._calendar.local.name);var a=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return a===0?0:a<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(t){return this._calendar.fromJD(t)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(t){return this._calendar.fromJSDate(t)},toString:function(){return(this.year()<0?"-":"")+T(Math.abs(this.year()),4)+"-"+T(this.month(),2)+"-"+T(this.day(),2)}}),_(m.prototype,{_validateLevel:0,newDate:function(t,a,r){return t==null?this.today():(t.year&&(this._validate(t,a,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),r=t.day(),a=t.month(),t=t.year()),new s(this,t,a,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var a=this._validate(t,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear);return(a.year()<0?"-":"")+T(Math.abs(a.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear),12},monthOfYear:function(t,a){var r=this._validate(t,a,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,a){var r=(a+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth),r},daysInYear:function(t){var a=this._validate(t,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear);return this.leapYear(a)?366:365},dayOfYear:function(t,a,r){var n=this._validate(t,a,r,l.local.invalidDate||l.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(t,a,r){var n=this._validate(t,a,r,l.local.invalidDate||l.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,a,r){return this._validate(t,a,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),{}},add:function(t,a,r){return this._validate(t,this.minMonth,this.minDay,l.local.invalidDate||l.regionalOptions[""].invalidDate),this._correctAdd(t,this._add(t,a,r),a,r)},_add:function(t,a,r){if(this._validateLevel++,r==="d"||r==="w"){var n=t.toJD()+a*(r==="w"?this.daysInWeek():1),o=t.calendar().fromJD(n);return this._validateLevel--,[o.year(),o.month(),o.day()]}try{var i=t.year()+(r==="y"?a:0),u=t.monthOfYear()+(r==="m"?a:0);o=t.day(),r==="y"?(t.month()!==this.fromMonthOfYear(i,u)&&(u=this.newDate(i,t.month(),this.minDay).monthOfYear()),u=Math.min(u,this.monthsInYear(i)),o=Math.min(o,this.daysInMonth(i,this.fromMonthOfYear(i,u)))):r==="m"&&(function(c){for(;ub-1+c.minMonth;)i++,u-=b,b=c.monthsInYear(i)}(this),o=Math.min(o,this.daysInMonth(i,this.fromMonthOfYear(i,u))));var p=[i,this.fromMonthOfYear(i,u),o];return this._validateLevel--,p}catch(c){throw this._validateLevel--,c}},_correctAdd:function(t,a,r,n){if(!(this.hasYearZero||n!=="y"&&n!=="m"||a[0]!==0&&t.year()>0==a[0]>0)){var o={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],i=r<0?-1:1;a=this._add(t,r*o[0]+i*o[1],o[2])}return t.date(a[0],a[1],a[2])},set:function(t,a,r){this._validate(t,this.minMonth,this.minDay,l.local.invalidDate||l.regionalOptions[""].invalidDate);var n=r==="y"?a:t.year(),o=r==="m"?a:t.month(),i=r==="d"?a:t.day();return r!=="y"&&r!=="m"||(i=Math.min(i,this.daysInMonth(n,o))),t.date(n,o,i)},isValid:function(t,a,r){this._validateLevel++;var n=this.hasYearZero||t!==0;if(n){var o=this.newDate(t,a,this.minDay);n=a>=this.minMonth&&a-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),b=o-(c>2.5?4716:4715);return b<=0&&b--,this.newDate(b,c,p)},toJSDate:function(t,a,r){var n=this._validate(t,a,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),o=new Date(n.year(),n.month()-1,n.day());return o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0),o.setHours(o.getHours()>12?o.getHours()+2:0),o},fromJSDate:function(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var l=D.exports=new w;l.cdate=s,l.baseCalendar=m,l.calendars.gregorian=f},94338:function(D,E,e){var _=e(56131),w=e(63489);_(w.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"}),w.local=w.regionalOptions[""],_(w.cdate.prototype,{formatDate:function(s,T){return typeof s!="string"&&(T=s,s=""),this._calendar.formatDate(s||"",this,T)}}),_(w.baseCalendar.prototype,{UNIX_EPOCH:w.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:w.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(s,T,m){if(typeof s!="string"&&(m=T,T=s,s=""),!T)return"";if(T.calendar()!==this)throw w.local.invalidFormat||w.regionalOptions[""].invalidFormat;s=s||this.local.dateFormat;for(var f,l,t,a=(m=m||{}).dayNamesShort||this.local.dayNamesShort,r=m.dayNames||this.local.dayNames,n=m.monthNumbers||this.local.monthNumbers,o=m.monthNamesShort||this.local.monthNamesShort,i=m.monthNames||this.local.monthNames,u=(m.calculateWeek||this.local.calculateWeek,function(h,M){for(var A=1;k+A1}),p=function(h,M,A,C){var L=""+M;if(u(h,C))for(;L.length1},g=function(R,U){var B=x(R,U),G=[2,3,B?4:2,B?4:2,10,11,20]["oyYJ@!".indexOf(R)+1],N=new RegExp("^-?\\d{1,"+G+"}"),j=T.substring(C).match(N);if(!j)throw(w.local.missingNumberAt||w.regionalOptions[""].missingNumberAt).replace(/\{0\}/,C);return C+=j[0].length,parseInt(j[0],10)},y=this,k=function(){if(typeof r=="function"){x("m");var R=r.call(y,T.substring(C));return C+=R.length,R}return g("m")},h=function(R,U,B,G){for(var N=x(R,G)?B:U,j=0;j-1){p=1,c=b;for(var I=this.daysInMonth(u,p);c>I;I=this.daysInMonth(u,p))p++,c-=I}return i>-1?this.fromJD(i):this.newDate(u,p,c)},determineDate:function(s,T,m,f,l){m&&typeof m!="object"&&(l=f,f=m,m=null),typeof f!="string"&&(l=f,f="");var t=this;return T=T?T.newDate():null,s==null?T:typeof s=="string"?function(a){try{return t.parseDate(f,a,l)}catch{}for(var r=((a=a.toLowerCase()).match(/^c/)&&m?m.newDate():null)||t.today(),n=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,o=n.exec(a);o;)r.add(parseInt(o[1],10),o[2]||"d"),o=n.exec(a);return r}(s):typeof s=="number"?isNaN(s)||s===1/0||s===-1/0?T:t.today().add(s,"d"):t.newDate(s)}})},69862:function(){},40964:function(){},72077:function(D,E,e){var _=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],w=typeof globalThis>"u"?e.g:globalThis;D.exports=function(){for(var s=[],T=0;T<_.length;T++)typeof w[_[T]]=="function"&&(s[s.length]=_[T]);return s}},81684:function(D,E,e){function _(pe,de,he){pe.prototype=de.prototype=he,he.constructor=pe}function w(pe,de){var he=Object.create(pe.prototype);for(var ye in de)he[ye]=de[ye];return he}function s(){}e.d(E,{sX:function(){return xe},k4:function(){return X}});var T=.7,m=1/T,f="\\s*([+-]?\\d+)\\s*",l="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",t="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",a=/^#([0-9a-f]{3,8})$/,r=new RegExp("^rgb\\(".concat(f,",").concat(f,",").concat(f,"\\)$")),n=new RegExp("^rgb\\(".concat(t,",").concat(t,",").concat(t,"\\)$")),o=new RegExp("^rgba\\(".concat(f,",").concat(f,",").concat(f,",").concat(l,"\\)$")),i=new RegExp("^rgba\\(".concat(t,",").concat(t,",").concat(t,",").concat(l,"\\)$")),u=new RegExp("^hsl\\(".concat(l,",").concat(t,",").concat(t,"\\)$")),p=new RegExp("^hsla\\(".concat(l,",").concat(t,",").concat(t,",").concat(l,"\\)$")),c={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};function b(){return this.rgb().formatHex()}function d(){return this.rgb().formatRgb()}function v(pe){var de,he;return pe=(pe+"").trim().toLowerCase(),(de=a.exec(pe))?(he=de[1].length,de=parseInt(de[1],16),he===6?x(de):he===3?new h(de>>8&15|de>>4&240,de>>4&15|240&de,(15&de)<<4|15&de,1):he===8?g(de>>24&255,de>>16&255,de>>8&255,(255&de)/255):he===4?g(de>>12&15|de>>8&240,de>>8&15|de>>4&240,de>>4&15|240&de,((15&de)<<4|15&de)/255):null):(de=r.exec(pe))?new h(de[1],de[2],de[3],1):(de=n.exec(pe))?new h(255*de[1]/100,255*de[2]/100,255*de[3]/100,1):(de=o.exec(pe))?g(de[1],de[2],de[3],de[4]):(de=i.exec(pe))?g(255*de[1]/100,255*de[2]/100,255*de[3]/100,de[4]):(de=u.exec(pe))?I(de[1],de[2]/100,de[3]/100,1):(de=p.exec(pe))?I(de[1],de[2]/100,de[3]/100,de[4]):c.hasOwnProperty(pe)?x(c[pe]):pe==="transparent"?new h(NaN,NaN,NaN,0):null}function x(pe){return new h(pe>>16&255,pe>>8&255,255&pe,1)}function g(pe,de,he,ye){return ye<=0&&(pe=de=he=NaN),new h(pe,de,he,ye)}function y(pe){return pe instanceof s||(pe=v(pe)),pe?new h((pe=pe.rgb()).r,pe.g,pe.b,pe.opacity):new h}function k(pe,de,he,ye){return arguments.length===1?y(pe):new h(pe,de,he,ye??1)}function h(pe,de,he,ye){this.r=+pe,this.g=+de,this.b=+he,this.opacity=+ye}function M(){return"#".concat(P(this.r)).concat(P(this.g)).concat(P(this.b))}function A(){var pe=C(this.opacity);return"".concat(pe===1?"rgb(":"rgba(").concat(L(this.r),", ").concat(L(this.g),", ").concat(L(this.b)).concat(pe===1?")":", ".concat(pe,")"))}function C(pe){return isNaN(pe)?1:Math.max(0,Math.min(1,pe))}function L(pe){return Math.max(0,Math.min(255,Math.round(pe)||0))}function P(pe){return((pe=L(pe))<16?"0":"")+pe.toString(16)}function I(pe,de,he,ye){return ye<=0?pe=de=he=NaN:he<=0||he>=1?pe=de=NaN:de<=0&&(pe=NaN),new U(pe,de,he,ye)}function R(pe){if(pe instanceof U)return new U(pe.h,pe.s,pe.l,pe.opacity);if(pe instanceof s||(pe=v(pe)),!pe)return new U;if(pe instanceof U)return pe;var de=(pe=pe.rgb()).r/255,he=pe.g/255,ye=pe.b/255,ze=Math.min(de,he,ye),Te=Math.max(de,he,ye),Ae=NaN,Me=Te-ze,Ce=(Te+ze)/2;return Me?(Ae=de===Te?(he-ye)/Me+6*(he0&&Ce<1?0:Ae,new U(Ae,Me,Ce,pe.opacity)}function U(pe,de,he,ye){this.h=+pe,this.s=+de,this.l=+he,this.opacity=+ye}function B(pe){return(pe=(pe||0)%360)<0?pe+360:pe}function G(pe){return Math.max(0,Math.min(1,pe||0))}function N(pe,de,he){return 255*(pe<60?de+(he-de)*pe/60:pe<180?he:pe<240?de+(he-de)*(240-pe)/60:de)}_(s,v,{copy:function(pe){return Object.assign(new this.constructor,this,pe)},displayable:function(){return this.rgb().displayable()},hex:b,formatHex:b,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return R(this).formatHsl()},formatRgb:d,toString:d}),_(h,k,w(s,{brighter:function(pe){return pe=pe==null?m:Math.pow(m,pe),new h(this.r*pe,this.g*pe,this.b*pe,this.opacity)},darker:function(pe){return pe=pe==null?T:Math.pow(T,pe),new h(this.r*pe,this.g*pe,this.b*pe,this.opacity)},rgb:function(){return this},clamp:function(){return new h(L(this.r),L(this.g),L(this.b),C(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:M,formatHex:M,formatHex8:function(){return"#".concat(P(this.r)).concat(P(this.g)).concat(P(this.b)).concat(P(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:A,toString:A})),_(U,function(pe,de,he,ye){return arguments.length===1?R(pe):new U(pe,de,he,ye??1)},w(s,{brighter:function(pe){return pe=pe==null?m:Math.pow(m,pe),new U(this.h,this.s,this.l*pe,this.opacity)},darker:function(pe){return pe=pe==null?T:Math.pow(T,pe),new U(this.h,this.s,this.l*pe,this.opacity)},rgb:function(){var pe=this.h%360+360*(this.h<0),de=isNaN(pe)||isNaN(this.s)?0:this.s,he=this.l,ye=he+(he<.5?he:1-he)*de,ze=2*he-ye;return new h(N(pe>=240?pe-240:pe+120,ze,ye),N(pe,ze,ye),N(pe<120?pe+240:pe-120,ze,ye),this.opacity)},clamp:function(){return new U(B(this.h),G(this.s),G(this.l),C(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 pe=C(this.opacity);return"".concat(pe===1?"hsl(":"hsla(").concat(B(this.h),", ").concat(100*G(this.s),"%, ").concat(100*G(this.l),"%").concat(pe===1?")":", ".concat(pe,")"))}}));var j=function(pe){return function(){return pe}};function V(pe,de){var he=de-pe;return he?function(ye,ze){return function(Te){return ye+Te*ze}}(pe,he):j(isNaN(pe)?de:pe)}var H=function pe(de){var he=function(ze){return(ze=+ze)==1?V:function(Te,Ae){return Ae-Te?function(Me,Ce,ne){return Me=Math.pow(Me,ne),Ce=Math.pow(Ce,ne)-Me,ne=1/ne,function(ue){return Math.pow(Me+ue*Ce,ne)}}(Te,Ae,ze):j(isNaN(Te)?Ae:Te)}}(de);function ye(ze,Te){var Ae=he((ze=k(ze)).r,(Te=k(Te)).r),Me=he(ze.g,Te.g),Ce=he(ze.b,Te.b),ne=V(ze.opacity,Te.opacity);return function(ue){return ze.r=Ae(ue),ze.g=Me(ue),ze.b=Ce(ue),ze.opacity=ne(ue),ze+""}}return ye.gamma=pe,ye}(1);function ee(pe,de){var he,ye=de?de.length:0,ze=pe?Math.min(ye,pe.length):0,Te=new Array(ze),Ae=new Array(ye);for(he=0;heTe&&(ze=de.slice(Te,ze),Me[Ae]?Me[Ae]+=ze:Me[++Ae]=ze),(he=he[0])===(ye=ye[0])?Me[Ae]?Me[Ae]+=ye:Me[++Ae]=ye:(Me[++Ae]=null,Ce.push({i:Ae,x:X(he,ye)})),Te=re.lastIndex;return Te"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 a(u){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c)},a(u)}var r=["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"],n=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],o=typeof window<"u";function i(u){var p=function(c){s(d,c);var b=m(d);function d(v){var x;return e(this,d),x=b.call(this,v),x.p=Promise.resolve(),x.resizeHandler=null,x.handlers={},x.syncWindowResize=x.syncWindowResize.bind(l(x)),x.syncEventHandlers=x.syncEventHandlers.bind(l(x)),x.attachUpdateEvents=x.attachUpdateEvents.bind(l(x)),x.getRef=x.getRef.bind(l(x)),x.handleUpdate=x.handleUpdate.bind(l(x)),x.figureCallback=x.figureCallback.bind(l(x)),x.updatePlotly=x.updatePlotly.bind(l(x)),x}return w(d,[{key:"updatePlotly",value:function(x,g,y){var k=this;this.p=this.p.then(function(){if(!k.unmounting){if(!k.el)throw new Error("Missing element reference");return u.react(k.el,{data:k.props.data,layout:k.props.layout,config:k.props.config,frames:k.props.frames})}}).then(function(){k.unmounting||(k.syncWindowResize(x),k.syncEventHandlers(),k.figureCallback(g),y&&k.attachUpdateEvents())}).catch(function(h){k.props.onError&&k.props.onError(h)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(x){this.unmounting=!1;var g=x.frames&&x.frames.length?x.frames.length:0,y=this.props.frames&&this.props.frames.length?this.props.frames.length:0,k=!(x.layout===this.props.layout&&x.data===this.props.data&&x.config===this.props.config&&y===g),h=x.revision!==void 0,M=x.revision!==this.props.revision;!k&&(!h||h&&!M)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&o&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),u.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var x=this;!this.el||!this.el.removeListener||n.forEach(function(g){x.el.on(g,x.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var x=this;!this.el||!this.el.removeListener||n.forEach(function(g){x.el.removeListener(g,x.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(x){if(typeof x=="function"){var g=this.el,y=g.data,k=g.layout,h=this.el._transitionData?this.el._transitionData._frames:null,M={data:y,layout:k,frames:h};x(M,this.el)}}},{key:"syncWindowResize",value:function(x){var g=this;o&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return u.Plots.resize(g.el)},window.addEventListener("resize",this.resizeHandler),x&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(x){this.el=x,this.props.debug&&o&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var x=this;r.forEach(function(g){var y=x.props["on"+g],k=x.handlers[g],h=!!k;y&&!h?x.addEventHandler(g,y):!y&&h?x.removeEventHandler(g):y&&h&&y!==k&&(x.removeEventHandler(g),x.addEventHandler(g,y))})}},{key:"addEventHandler",value:function(x,g){this.handlers[x]=g,this.el.on(this.getPlotlyEventName(x),this.handlers[x])}},{key:"removeEventHandler",value:function(x){this.el.removeListener(this.getPlotlyEventName(x),this.handlers[x]),delete this.handlers[x]}},{key:"getPlotlyEventName",value:function(x){return"plotly_"+x.toLowerCase()}},{key:"render",value:function(){return J.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),d}(J.Component);return p.propTypes={data:fe.default.arrayOf(fe.default.object),config:fe.default.object,layout:fe.default.object,frames:fe.default.arrayOf(fe.default.object),revision:fe.default.number,onInitialized:fe.default.func,onPurge:fe.default.func,onError:fe.default.func,onUpdate:fe.default.func,debug:fe.default.bool,style:fe.default.object,className:fe.default.string,useResizeHandler:fe.default.bool,divId:fe.default.string},r.forEach(function(c){p.propTypes["on"+c]=fe.default.func}),p.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},p}})(pw);const KT=jp(pw),Pu={sunIcon:{viewBox:"0 0 16 16",width:16,height:16,path:"M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z"},moonIcon:{viewBox:"0 0 25 25",width:25,height:25,path:"M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z"},plotCsv:{width:900,height:900,path:"M170.666667 106.666667l0.192 736H906.666667v64H149.546667c-23.552 0-42.666667-19.093333-42.666667-42.666667L106.666667 106.666667h64z m686.506666 454.144l13.653334 16.362666a21.333333 21.333333 0 0 1-2.666667 30.058667l-171.157333 143.146667a21.333333 21.333333 0 0 1-21.546667 3.477333l-229.973333-91.285333-113.834667 94.997333a21.333333 21.333333 0 0 1-30.037333-2.709333l-13.653334-16.362667a21.333333 21.333333 0 0 1 2.688-30.058667l133.312-111.274666a21.333333 21.333333 0 0 1 21.546667-3.456l229.930667 91.264 151.68-126.826667a21.333333 21.333333 0 0 1 30.037333 2.666667z m-1.621333-417.962667l16.896 13.013333a21.333333 21.333333 0 0 1 3.925333 29.888L685.802667 433.706667a21.333333 21.333333 0 0 1-20.202667 8.085333l-226.794667-35.413333-150.186666 222.357333a21.333333 21.333333 0 0 1-27.477334 7.018667l-2.133333-1.28-17.685333-11.946667a21.333333 21.333333 0 0 1-5.738667-29.610667l165.354667-244.821333a21.333333 21.333333 0 0 1 20.992-9.130667L650.453333 374.613333l175.146667-227.882666a21.333333 21.333333 0 0 1 29.930667-3.904z"},addText:{path:"M896 928H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32z m-736-64h704v-704h-704z M704 352H320a32 32 0 0 1 0-64h384a32 32 0 0 1 0 64z M512 736a32 32 0 0 1-32-32V320a32 32 0 0 1 64 0v384a32 32 0 0 1-32 32z",width:950,height:950},changeTitle:{path:"M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z M244.736 656.896h534.016v62.464H244.736z M373.76 358.4H307.2v219.136h-45.568V358.4H192v-41.472H373.76V358.4zM403.968 316.928h44.032v50.176h-44.032v-50.176z m0 67.072h44.032v194.048h-44.032V384zM576.512 541.184l8.704 31.744c-13.312 5.12-26.624 8.192-38.912 8.704-32.768 1.024-48.64-15.36-48.128-48.128V422.912h-26.624V384h26.624v-46.592l44.032-21.504V384h36.352v38.912h-36.352V532.48c-1.024 10.24 3.072 14.848 11.264 13.824 5.12 0 12.8-1.536 23.04-5.12zM619.008 316.928h44.032v260.608h-44.032V316.928zM813.056 509.952l41.472 12.8c-11.776 40.96-37.888 61.44-78.336 60.416-52.736-1.536-80.384-34.304-81.92-98.304 2.56-67.072 29.696-102.4 81.92-105.984 52.224 1.536 78.336 36.864 79.36 105.984v13.824h-117.248c3.584 30.208 15.872 45.568 37.888 46.592 19.968 0.512 32.256-11.264 36.864-35.328z m-72.704-51.712h70.656c-1.024-25.088-12.288-38.4-33.792-38.912-21.504 0.512-33.792 13.824-36.864 38.912z",width:920,height:900},changeColor:{path:"M8 3C5.79 3 4 4.79 4 7V14C4 15.1 4.9 16 6 16H9V20C9 21.1 9.9 22 11 22H13C14.1 22 15 21.1 15 20V16H18C19.1 16 20 15.1 20 14V3H8M8 5H12V7H14V5H15V9H17V5H18V10H6V7C6 5.9 6.9 5 8 5M6 14V12H18V14H6Z",width:22,height:22},uploadImage:{path:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5",width:1024,height:1024},downloadCsv:{path:`M486.2,196.121h-13.164V132.59c0-0.399-0.064-0.795-0.116-1.2c-0.021-2.52-0.824-5-2.551-6.96L364.656,3.677 c-0.031-0.034-0.064-0.044-0.085-0.075c-0.629-0.707-1.364-1.292-2.141-1.796c-0.231-0.157-0.462-0.286-0.704-0.419 c-0.672-0.365-1.386-0.672-2.121-0.893c-0.199-0.052-0.377-0.134-0.576-0.188C358.229,0.118,357.4,0,356.562,0H96.757 C84.893,0,75.256,9.649,75.256,21.502v174.613H62.093c-16.972,0-30.733,13.756-30.733,30.73v159.81 @@ -3654,7 +3654,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho c0,32.158,19.051,52.4,51.456,52.4c10.947,0,23.097-2.378,30.241-5.238l5.483,28.346c-6.672,3.34-21.674,6.919-41.208,6.919 C98.06,382.976,69.474,348.424,69.474,302.692z M451.534,520.962H96.757v-103.57h354.777V520.962z M427.518,380.583h-42.399 l-51.45-160.536h39.787l19.526,67.894c5.479,19.046,10.479,37.386,14.299,57.397h0.709c4.048-19.298,9.045-38.352,14.526-56.693 - l20.487-68.598h38.599L427.518,380.583z`,width:550,height:550,transform:"translate(4, 0)"},downloadImage:{path:"M22.71,6.29a1,1,0,0,0-1.42,0L20,7.59V2a1,1,0,0,0-2,0V7.59l-1.29-1.3a1,1,0,0,0-1.42,1.42l3,3a1,1,0,0,0,.33.21.94.94,0,0,0,.76,0,1,1,0,0,0,.33-.21l3-3A1,1,0,0,0,22.71,6.29ZM19,13a1,1,0,0,0-1,1v.38L16.52,12.9a2.79,2.79,0,0,0-3.93,0l-.7.7L9.41,11.12a2.85,2.85,0,0,0-3.93,0L4,12.6V7A1,1,0,0,1,5,6h8a1,1,0,0,0,0-2H5A3,3,0,0,0,2,7V19a3,3,0,0,0,3,3H17a3,3,0,0,0,3-3V14A1,1,0,0,0,19,13ZM5,20a1,1,0,0,1-1-1V15.43l2.9-2.9a.79.79,0,0,1,1.09,0l3.17,3.17,0,0L15.46,20Zm13-1a.89.89,0,0,1-.18.53L13.31,15l.7-.7a.77.77,0,0,1,1.1,0L18,17.21Z",width:21,height:21,transform:"translate(-2, -2)"}},QT={data:{candlestick:[{decreasing:{fillcolor:"#e4003a",line:{color:"#e4003a"}},increasing:{fillcolor:"#00ACFF",line:{color:"#00ACFF"}},type:"candlestick"}]},layout:{annotationdefaults:{showarrow:!1},autotypenumbers:"strict",colorway:["#ffed00","#ef7d00","#e4003a","#c13246","#822661","#48277c","#005ca9","#00aaff","#9b30d9","#af005f","#5f00af","#af87ff"],dragmode:"pan",font:{family:"Fira Code",size:18},hoverlabel:{align:"left"},mapbox:{style:"dark"},hovermode:"x",legend:{bgcolor:"rgba(0, 0, 0, 0)",x:.01,xanchor:"left",y:.99,yanchor:"top",font:{size:15}},paper_bgcolor:"#000000",plot_bgcolor:"#000000",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"}}},ek={data:{barpolar:[{marker:{line:{color:"white",width:.5},pattern:{fillmode:"overlay",size:10,solidity:.2}},type:"barpolar"}],bar:[{error_x:{color:"#2a3f5f"},error_y:{color:"#2a3f5f"},marker:{line:{color:"white",width:.5},pattern:{fillmode:"overlay",size:10,solidity:.2}},type:"bar"}],carpet:[{aaxis:{endlinecolor:"#2a3f5f",gridcolor:"#C8D4E3",linecolor:"#C8D4E3",minorgridcolor:"#C8D4E3",startlinecolor:"#2a3f5f"},baxis:{endlinecolor:"#2a3f5f",gridcolor:"#C8D4E3",linecolor:"#C8D4E3",minorgridcolor:"#C8D4E3",startlinecolor:"#2a3f5f"},type:"carpet"}],choropleth:[{colorbar:{outlinewidth:0,ticks:""},type:"choropleth"}],contourcarpet:[{colorbar:{outlinewidth:0,ticks:""},type:"contourcarpet"}],contour:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"contour"}],heatmapgl:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"heatmapgl"}],heatmap:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"heatmap"}],histogram2dcontour:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"histogram2dcontour"}],histogram2d:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"histogram2d"}],histogram:[{marker:{pattern:{fillmode:"overlay",size:10,solidity:.2}},type:"histogram"}],mesh3d:[{colorbar:{outlinewidth:0,ticks:""},type:"mesh3d"}],parcoords:[{line:{colorbar:{outlinewidth:0,ticks:""}},type:"parcoords"}],pie:[{automargin:!0,type:"pie"}],scatter3d:[{line:{colorbar:{outlinewidth:0,ticks:""}},marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatter3d"}],scattercarpet:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattercarpet"}],scattergeo:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattergeo"}],scattergl:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattergl"}],scattermapbox:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattermapbox"}],scatterpolargl:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatterpolargl"}],scatterpolar:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatterpolar"}],scatter:[{fillpattern:{fillmode:"overlay",size:10,solidity:.2},type:"scatter"}],scatterternary:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatterternary"}],surface:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"surface"}],table:[{cells:{fill:{color:"#EBF0F8"},line:{color:"white"}},header:{fill:{color:"#C8D4E3"},line:{color:"white"}},type:"table"}],candlestick:[{decreasing:{fillcolor:"#c80000",line:{color:"#990000"}},increasing:{fillcolor:"#009600",line:{color:"#007500"}},type:"candlestick"}]},layout:{annotationdefaults:{arrowcolor:"#2a3f5f",arrowhead:0,arrowwidth:1,showarrow:!1},autotypenumbers:"strict",coloraxis:{colorbar:{outlinewidth:0,ticks:""}},colorscale:{diverging:[[0,"#8e0152"],[.1,"#c51b7d"],[.2,"#de77ae"],[.3,"#f1b6da"],[.4,"#fde0ef"],[.5,"#f7f7f7"],[.6,"#e6f5d0"],[.7,"#b8e186"],[.8,"#7fbc41"],[.9,"#4d9221"],[1,"#276419"]],sequential:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],sequentialminus:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]]},colorway:["#254495","#c13246","#48277c","#e4003a","#ef7d00","#822661","#ffed00","#00aaff","#9b30d9","#af005f","#5f00af","#af87ff"],font:{color:"#2a3f5f"},geo:{bgcolor:"white",lakecolor:"white",landcolor:"white",showlakes:!0,showland:!0,subunitcolor:"#C8D4E3"},hoverlabel:{align:"left"},hovermode:"x",mapbox:{style:"light"},paper_bgcolor:"white",plot_bgcolor:"white",polar:{angularaxis:{gridcolor:"#EBF0F8",linecolor:"#EBF0F8",ticks:""},bgcolor:"white",radialaxis:{gridcolor:"#EBF0F8",linecolor:"#EBF0F8",ticks:""}},scene:{xaxis:{backgroundcolor:"white",gridcolor:"#DFE8F3",gridwidth:2,linecolor:"#EBF0F8",showbackground:!0,ticks:"",zerolinecolor:"#EBF0F8"},yaxis:{backgroundcolor:"white",gridcolor:"#DFE8F3",gridwidth:2,linecolor:"#EBF0F8",showbackground:!0,ticks:"",zerolinecolor:"#EBF0F8"},zaxis:{backgroundcolor:"white",gridcolor:"#DFE8F3",gridwidth:2,linecolor:"#EBF0F8",showbackground:!0,ticks:"",zerolinecolor:"#EBF0F8"}},shapedefaults:{line:{color:"#2a3f5f"}},ternary:{aaxis:{gridcolor:"#DFE8F3",linecolor:"#A2B1C6",ticks:""},baxis:{gridcolor:"#DFE8F3",linecolor:"#A2B1C6",ticks:""},bgcolor:"white",caxis:{gridcolor:"#DFE8F3",linecolor:"#A2B1C6",ticks:""}},title:{x:.05},xaxis:{automargin:!0,ticks:"outside",zerolinewidth:2,rangeslider:{visible:!1},showgrid:!0,showline:!0,tickfont:{size:15},title:{standoff:20},mirror:!0,zeroline:!1},yaxis:{automargin:!0,ticks:"outside",tickfont:{size:15},zerolinewidth:2,fixedrange:!1,title:{standoff:20},nticks:8,showgrid:!0,showline:!0,side:"right",mirror:!0,zeroline:!1},dragmode:"pan",legend:{bgcolor:"rgba(0, 0, 0, 0)",x:1.03,xanchor:"left",y:.99,yanchor:"top"}}};function Io(){return Io=Object.assign?Object.assign.bind():function(O){for(var F=1;FO.forEach(J=>tk(J,F))}function Yp(...O){return Vn.useCallback(mw(...O),O)}function nk(O,F=[]){let J=[];function fe(D,E){const e=Vn.createContext(E),_=J.length;J=[...J,E];function w(T){const{scope:m,children:f,...l}=T,t=(m==null?void 0:m[O][_])||e,a=Vn.useMemo(()=>l,Object.values(l));return Vn.createElement(t.Provider,{value:a},f)}function s(T,m){const f=(m==null?void 0:m[O][_])||e,l=Vn.useContext(f);if(l)return l;if(E!==void 0)return E;throw new Error(`\`${T}\` must be used within \`${D}\``)}return w.displayName=D+"Provider",[w,s]}const Pe=()=>{const D=J.map(E=>Vn.createContext(E));return function(e){const _=(e==null?void 0:e[O])||D;return Vn.useMemo(()=>({[`__scope${O}`]:{...e,[O]:_}}),[e,_])}};return Pe.scopeName=O,[fe,rk(Pe,...F)]}function rk(...O){const F=O[0];if(O.length===1)return F;const J=()=>{const fe=O.map(Pe=>({useScope:Pe(),scopeName:Pe.scopeName}));return function(D){const E=fe.reduce((e,{useScope:_,scopeName:w})=>{const T=_(D)[`__scope${w}`];return{...e,...T}},{});return Vn.useMemo(()=>({[`__scope${F.scopeName}`]:E}),[E])}};return J.scopeName=F.scopeName,J}const jv=globalThis!=null&&globalThis.document?Vn.useLayoutEffect:()=>{},ik=R4["useId".toString()]||(()=>{});let ak=0;function Lg(O){const[F,J]=Vn.useState(ik());return jv(()=>{O||J(fe=>fe??String(ak++))},[O]),O||(F?`radix-${F}`:"")}function uf(O){const F=Vn.useRef(O);return Vn.useEffect(()=>{F.current=O}),Vn.useMemo(()=>(...J)=>{var fe;return(fe=F.current)===null||fe===void 0?void 0:fe.call(F,...J)},[])}function ok({prop:O,defaultProp:F,onChange:J=()=>{}}){const[fe,Pe]=sk({defaultProp:F,onChange:J}),D=O!==void 0,E=D?O:fe,e=uf(J),_=Vn.useCallback(w=>{if(D){const T=typeof w=="function"?w(O):w;T!==O&&e(T)}else Pe(w)},[D,O,Pe,e]);return[E,_]}function sk({defaultProp:O,onChange:F}){const J=Vn.useState(O),[fe]=J,Pe=Vn.useRef(fe),D=uf(F);return Vn.useEffect(()=>{Pe.current!==fe&&(D(fe),Pe.current=fe)},[fe,Pe,D]),J}const Km=Vn.forwardRef((O,F)=>{const{children:J,...fe}=O,Pe=Vn.Children.toArray(J),D=Pe.find(uk);if(D){const E=D.props.children,e=Pe.map(_=>_===D?Vn.Children.count(E)>1?Vn.Children.only(null):Vn.isValidElement(E)?E.props.children:null:_);return Vn.createElement(Uv,Io({},fe,{ref:F}),Vn.isValidElement(E)?Vn.cloneElement(E,void 0,e):null)}return Vn.createElement(Uv,Io({},fe,{ref:F}),J)});Km.displayName="Slot";const Uv=Vn.forwardRef((O,F)=>{const{children:J,...fe}=O;return Vn.isValidElement(J)?Vn.cloneElement(J,{...ck(fe,J.props),ref:mw(F,J.ref)}):Vn.Children.count(J)>1?Vn.Children.only(null):null});Uv.displayName="SlotClone";const lk=({children:O})=>Vn.createElement(Vn.Fragment,null,O);function uk(O){return Vn.isValidElement(O)&&O.type===lk}function ck(O,F){const J={...F};for(const fe in F){const Pe=O[fe],D=F[fe];/^on[A-Z]/.test(fe)?Pe&&D?J[fe]=(...e)=>{D(...e),Pe(...e)}:Pe&&(J[fe]=Pe):fe==="style"?J[fe]={...Pe,...D}:fe==="className"&&(J[fe]=[Pe,D].filter(Boolean).join(" "))}return{...O,...J}}const fk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],gh=fk.reduce((O,F)=>{const J=Vn.forwardRef((fe,Pe)=>{const{asChild:D,...E}=fe,e=D?Km:F;return Vn.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),Vn.createElement(e,Io({},E,{ref:Pe}))});return J.displayName=`Primitive.${F}`,{...O,[F]:J}},{});function hk(O,F){O&&Hm.flushSync(()=>O.dispatchEvent(F))}function pk(O,F=globalThis==null?void 0:globalThis.document){const J=uf(O);Vn.useEffect(()=>{const fe=Pe=>{Pe.key==="Escape"&&J(Pe)};return F.addEventListener("keydown",fe),()=>F.removeEventListener("keydown",fe)},[J,F])}const Vv="dismissableLayer.update",dk="dismissableLayer.pointerDownOutside",gk="dismissableLayer.focusOutside";let kb;const vk=Vn.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mk=Vn.forwardRef((O,F)=>{var J;const{disableOutsidePointerEvents:fe=!1,onEscapeKeyDown:Pe,onPointerDownOutside:D,onFocusOutside:E,onInteractOutside:e,onDismiss:_,...w}=O,s=Vn.useContext(vk),[T,m]=Vn.useState(null),f=(J=T==null?void 0:T.ownerDocument)!==null&&J!==void 0?J:globalThis==null?void 0:globalThis.document,[,l]=Vn.useState({}),t=Yp(F,b=>m(b)),a=Array.from(s.layers),[r]=[...s.layersWithOutsidePointerEventsDisabled].slice(-1),n=a.indexOf(r),o=T?a.indexOf(T):-1,i=s.layersWithOutsidePointerEventsDisabled.size>0,u=o>=n,p=yk(b=>{const d=b.target,v=[...s.branches].some(x=>x.contains(d));!u||v||(D==null||D(b),e==null||e(b),b.defaultPrevented||_==null||_())},f),c=xk(b=>{const d=b.target;[...s.branches].some(x=>x.contains(d))||(E==null||E(b),e==null||e(b),b.defaultPrevented||_==null||_())},f);return pk(b=>{o===s.layers.size-1&&(Pe==null||Pe(b),!b.defaultPrevented&&_&&(b.preventDefault(),_()))},f),Vn.useEffect(()=>{if(T)return fe&&(s.layersWithOutsidePointerEventsDisabled.size===0&&(kb=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),s.layersWithOutsidePointerEventsDisabled.add(T)),s.layers.add(T),Ab(),()=>{fe&&s.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=kb)}},[T,f,fe,s]),Vn.useEffect(()=>()=>{T&&(s.layers.delete(T),s.layersWithOutsidePointerEventsDisabled.delete(T),Ab())},[T,s]),Vn.useEffect(()=>{const b=()=>l({});return document.addEventListener(Vv,b),()=>document.removeEventListener(Vv,b)},[]),Vn.createElement(gh.div,Io({},w,{ref:t,style:{pointerEvents:i?u?"auto":"none":void 0,...O.style},onFocusCapture:rf(O.onFocusCapture,c.onFocusCapture),onBlurCapture:rf(O.onBlurCapture,c.onBlurCapture),onPointerDownCapture:rf(O.onPointerDownCapture,p.onPointerDownCapture)}))});function yk(O,F=globalThis==null?void 0:globalThis.document){const J=uf(O),fe=Vn.useRef(!1),Pe=Vn.useRef(()=>{});return Vn.useEffect(()=>{const D=e=>{if(e.target&&!fe.current){let s=function(){yw(dk,J,w,{discrete:!0})};var _=s;const w={originalEvent:e};e.pointerType==="touch"?(F.removeEventListener("click",Pe.current),Pe.current=s,F.addEventListener("click",Pe.current,{once:!0})):s()}fe.current=!1},E=window.setTimeout(()=>{F.addEventListener("pointerdown",D)},0);return()=>{window.clearTimeout(E),F.removeEventListener("pointerdown",D),F.removeEventListener("click",Pe.current)}},[F,J]),{onPointerDownCapture:()=>fe.current=!0}}function xk(O,F=globalThis==null?void 0:globalThis.document){const J=uf(O),fe=Vn.useRef(!1);return Vn.useEffect(()=>{const Pe=D=>{D.target&&!fe.current&&yw(gk,J,{originalEvent:D},{discrete:!1})};return F.addEventListener("focusin",Pe),()=>F.removeEventListener("focusin",Pe)},[F,J]),{onFocusCapture:()=>fe.current=!0,onBlurCapture:()=>fe.current=!1}}function Ab(){const O=new CustomEvent(Vv);document.dispatchEvent(O)}function yw(O,F,J,{discrete:fe}){const Pe=J.originalEvent.target,D=new CustomEvent(O,{bubbles:!1,cancelable:!0,detail:J});F&&Pe.addEventListener(O,F,{once:!0}),fe?hk(Pe,D):Pe.dispatchEvent(D)}const Pg="focusScope.autoFocusOnMount",Og="focusScope.autoFocusOnUnmount",Mb={bubbles:!1,cancelable:!0},bk=Vn.forwardRef((O,F)=>{const{loop:J=!1,trapped:fe=!1,onMountAutoFocus:Pe,onUnmountAutoFocus:D,...E}=O,[e,_]=Vn.useState(null),w=uf(Pe),s=uf(D),T=Vn.useRef(null),m=Yp(F,t=>_(t)),f=Vn.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Vn.useEffect(()=>{if(fe){let r=function(o){if(f.paused||!e)return;const i=o.target;e.contains(i)?T.current=i:Zc(T.current,{select:!0})},n=function(o){f.paused||!e||e.contains(o.relatedTarget)||Zc(T.current,{select:!0})};var t=r,a=n;return document.addEventListener("focusin",r),document.addEventListener("focusout",n),()=>{document.removeEventListener("focusin",r),document.removeEventListener("focusout",n)}}},[fe,e,f.paused]),Vn.useEffect(()=>{if(e){Eb.add(f);const t=document.activeElement;if(!e.contains(t)){const r=new CustomEvent(Pg,Mb);e.addEventListener(Pg,w),e.dispatchEvent(r),r.defaultPrevented||(_k(Mk(xw(e)),{select:!0}),document.activeElement===t&&Zc(e))}return()=>{e.removeEventListener(Pg,w),setTimeout(()=>{const r=new CustomEvent(Og,Mb);e.addEventListener(Og,s),e.dispatchEvent(r),r.defaultPrevented||Zc(t??document.body,{select:!0}),e.removeEventListener(Og,s),Eb.remove(f)},0)}}},[e,w,s,f]);const l=Vn.useCallback(t=>{if(!J&&!fe||f.paused)return;const a=t.key==="Tab"&&!t.altKey&&!t.ctrlKey&&!t.metaKey,r=document.activeElement;if(a&&r){const n=t.currentTarget,[o,i]=wk(n);o&&i?!t.shiftKey&&r===i?(t.preventDefault(),J&&Zc(o,{select:!0})):t.shiftKey&&r===o&&(t.preventDefault(),J&&Zc(i,{select:!0})):r===n&&t.preventDefault()}},[J,fe,f.paused]);return Vn.createElement(gh.div,Io({tabIndex:-1},E,{ref:m,onKeyDown:l}))});function _k(O,{select:F=!1}={}){const J=document.activeElement;for(const fe of O)if(Zc(fe,{select:F}),document.activeElement!==J)return}function wk(O){const F=xw(O),J=Sb(F,O),fe=Sb(F.reverse(),O);return[J,fe]}function xw(O){const F=[],J=document.createTreeWalker(O,NodeFilter.SHOW_ELEMENT,{acceptNode:fe=>{const Pe=fe.tagName==="INPUT"&&fe.type==="hidden";return fe.disabled||fe.hidden||Pe?NodeFilter.FILTER_SKIP:fe.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;J.nextNode();)F.push(J.currentNode);return F}function Sb(O,F){for(const J of O)if(!Tk(J,{upTo:F}))return J}function Tk(O,{upTo:F}){if(getComputedStyle(O).visibility==="hidden")return!0;for(;O;){if(F!==void 0&&O===F)return!1;if(getComputedStyle(O).display==="none")return!0;O=O.parentElement}return!1}function kk(O){return O instanceof HTMLInputElement&&"select"in O}function Zc(O,{select:F=!1}={}){if(O&&O.focus){const J=document.activeElement;O.focus({preventScroll:!0}),O!==J&&kk(O)&&F&&O.select()}}const Eb=Ak();function Ak(){let O=[];return{add(F){const J=O[0];F!==J&&(J==null||J.pause()),O=Cb(O,F),O.unshift(F)},remove(F){var J;O=Cb(O,F),(J=O[0])===null||J===void 0||J.resume()}}}function Cb(O,F){const J=[...O],fe=J.indexOf(F);return fe!==-1&&J.splice(fe,1),J}function Mk(O){return O.filter(F=>F.tagName!=="A")}function Sk(O,F){return Vn.useReducer((J,fe)=>{const Pe=F[J][fe];return Pe??J},O)}const Qm=O=>{const{present:F,children:J}=O,fe=Ek(F),Pe=typeof J=="function"?J({present:fe.isPresent}):Vn.Children.only(J),D=Yp(fe.ref,Pe.ref);return typeof J=="function"||fe.isPresent?Vn.cloneElement(Pe,{ref:D}):null};Qm.displayName="Presence";function Ek(O){const[F,J]=Vn.useState(),fe=Vn.useRef({}),Pe=Vn.useRef(O),D=Vn.useRef("none"),E=O?"mounted":"unmounted",[e,_]=Sk(E,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Vn.useEffect(()=>{const w=Jd(fe.current);D.current=e==="mounted"?w:"none"},[e]),jv(()=>{const w=fe.current,s=Pe.current;if(s!==O){const m=D.current,f=Jd(w);O?_("MOUNT"):f==="none"||(w==null?void 0:w.display)==="none"?_("UNMOUNT"):_(s&&m!==f?"ANIMATION_OUT":"UNMOUNT"),Pe.current=O}},[O,_]),jv(()=>{if(F){const w=T=>{const f=Jd(fe.current).includes(T.animationName);T.target===F&&f&&Hm.flushSync(()=>_("ANIMATION_END"))},s=T=>{T.target===F&&(D.current=Jd(fe.current))};return F.addEventListener("animationstart",s),F.addEventListener("animationcancel",w),F.addEventListener("animationend",w),()=>{F.removeEventListener("animationstart",s),F.removeEventListener("animationcancel",w),F.removeEventListener("animationend",w)}}else _("ANIMATION_END")},[F,_]),{isPresent:["mounted","unmountSuspended"].includes(e),ref:Vn.useCallback(w=>{w&&(fe.current=getComputedStyle(w)),J(w)},[])}}function Jd(O){return(O==null?void 0:O.animationName)||"none"}let Ig=0;function Ck(){Vn.useEffect(()=>{var O,F;const J=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(O=J[0])!==null&&O!==void 0?O:Lb()),document.body.insertAdjacentElement("beforeend",(F=J[1])!==null&&F!==void 0?F:Lb()),Ig++,()=>{Ig===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(fe=>fe.remove()),Ig--}},[])}function Lb(){const O=document.createElement("span");return O.setAttribute("data-radix-focus-guard",""),O.tabIndex=0,O.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",O}var iu=function(){return iu=Object.assign||function(F){for(var J,fe=1,Pe=arguments.length;fe"u")return Wk;var F=Zk(O),J=document.documentElement.clientWidth,fe=window.innerWidth;return{left:F[0],top:F[1],right:F[2],gap:Math.max(0,fe-J+F[2]-F[0])}},Xk=Tw(),$k=function(O,F,J,fe){var Pe=O.left,D=O.top,E=O.right,e=O.gap;return J===void 0&&(J="margin"),` + l20.487-68.598h38.599L427.518,380.583z`,width:550,height:550,transform:"translate(4, 0)"},downloadImage:{path:"M22.71,6.29a1,1,0,0,0-1.42,0L20,7.59V2a1,1,0,0,0-2,0V7.59l-1.29-1.3a1,1,0,0,0-1.42,1.42l3,3a1,1,0,0,0,.33.21.94.94,0,0,0,.76,0,1,1,0,0,0,.33-.21l3-3A1,1,0,0,0,22.71,6.29ZM19,13a1,1,0,0,0-1,1v.38L16.52,12.9a2.79,2.79,0,0,0-3.93,0l-.7.7L9.41,11.12a2.85,2.85,0,0,0-3.93,0L4,12.6V7A1,1,0,0,1,5,6h8a1,1,0,0,0,0-2H5A3,3,0,0,0,2,7V19a3,3,0,0,0,3,3H17a3,3,0,0,0,3-3V14A1,1,0,0,0,19,13ZM5,20a1,1,0,0,1-1-1V15.43l2.9-2.9a.79.79,0,0,1,1.09,0l3.17,3.17,0,0L15.46,20Zm13-1a.89.89,0,0,1-.18.53L13.31,15l.7-.7a.77.77,0,0,1,1.1,0L18,17.21Z",width:21,height:21,transform:"translate(-2, -2)"}},QT={data:{candlestick:[{decreasing:{fillcolor:"#e4003a",line:{color:"#e4003a"}},increasing:{fillcolor:"#00ACFF",line:{color:"#00ACFF"}},type:"candlestick"}]},layout:{annotationdefaults:{showarrow:!1},autotypenumbers:"strict",colorway:["#ffed00","#ef7d00","#e4003a","#c13246","#822661","#48277c","#005ca9","#00aaff","#9b30d9","#af005f","#5f00af","#af87ff"],dragmode:"pan",font:{family:"Fira Code",size:18},hoverlabel:{align:"left"},mapbox:{style:"dark"},hovermode:"x",legend:{bgcolor:"rgba(0, 0, 0, 0)",x:.01,xanchor:"left",y:.99,yanchor:"top",font:{size:15}},paper_bgcolor:"#000000",plot_bgcolor:"#000000",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"}}},ek={data:{barpolar:[{marker:{line:{color:"white",width:.5},pattern:{fillmode:"overlay",size:10,solidity:.2}},type:"barpolar"}],bar:[{error_x:{color:"#2a3f5f"},error_y:{color:"#2a3f5f"},marker:{line:{color:"white",width:.5},pattern:{fillmode:"overlay",size:10,solidity:.2}},type:"bar"}],carpet:[{aaxis:{endlinecolor:"#2a3f5f",gridcolor:"#C8D4E3",linecolor:"#C8D4E3",minorgridcolor:"#C8D4E3",startlinecolor:"#2a3f5f"},baxis:{endlinecolor:"#2a3f5f",gridcolor:"#C8D4E3",linecolor:"#C8D4E3",minorgridcolor:"#C8D4E3",startlinecolor:"#2a3f5f"},type:"carpet"}],choropleth:[{colorbar:{outlinewidth:0,ticks:""},type:"choropleth"}],contourcarpet:[{colorbar:{outlinewidth:0,ticks:""},type:"contourcarpet"}],contour:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"contour"}],heatmapgl:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"heatmapgl"}],heatmap:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"heatmap"}],histogram2dcontour:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"histogram2dcontour"}],histogram2d:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"histogram2d"}],histogram:[{marker:{pattern:{fillmode:"overlay",size:10,solidity:.2}},type:"histogram"}],mesh3d:[{colorbar:{outlinewidth:0,ticks:""},type:"mesh3d"}],parcoords:[{line:{colorbar:{outlinewidth:0,ticks:""}},type:"parcoords"}],pie:[{automargin:!0,type:"pie"}],scatter3d:[{line:{colorbar:{outlinewidth:0,ticks:""}},marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatter3d"}],scattercarpet:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattercarpet"}],scattergeo:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattergeo"}],scattergl:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattergl"}],scattermapbox:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattermapbox"}],scatterpolargl:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatterpolargl"}],scatterpolar:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatterpolar"}],scatter:[{fillpattern:{fillmode:"overlay",size:10,solidity:.2},type:"scatter"}],scatterternary:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatterternary"}],surface:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"surface"}],table:[{cells:{fill:{color:"#EBF0F8"},line:{color:"white"}},header:{fill:{color:"#C8D4E3"},line:{color:"white"}},type:"table"}],candlestick:[{decreasing:{fillcolor:"#c80000",line:{color:"#990000"}},increasing:{fillcolor:"#009600",line:{color:"#007500"}},type:"candlestick"}]},layout:{annotationdefaults:{arrowcolor:"#2a3f5f",arrowhead:0,arrowwidth:1,showarrow:!1},autotypenumbers:"strict",coloraxis:{colorbar:{outlinewidth:0,ticks:""}},colorscale:{diverging:[[0,"#8e0152"],[.1,"#c51b7d"],[.2,"#de77ae"],[.3,"#f1b6da"],[.4,"#fde0ef"],[.5,"#f7f7f7"],[.6,"#e6f5d0"],[.7,"#b8e186"],[.8,"#7fbc41"],[.9,"#4d9221"],[1,"#276419"]],sequential:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],sequentialminus:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]]},colorway:["#254495","#c13246","#48277c","#e4003a","#ef7d00","#822661","#ffed00","#00aaff","#9b30d9","#af005f","#5f00af","#af87ff"],font:{color:"#2a3f5f"},geo:{bgcolor:"white",lakecolor:"white",landcolor:"white",showlakes:!0,showland:!0,subunitcolor:"#C8D4E3"},hoverlabel:{align:"left"},hovermode:"x",mapbox:{style:"light"},paper_bgcolor:"white",plot_bgcolor:"white",polar:{angularaxis:{gridcolor:"#EBF0F8",linecolor:"#EBF0F8",ticks:""},bgcolor:"white",radialaxis:{gridcolor:"#EBF0F8",linecolor:"#EBF0F8",ticks:""}},scene:{xaxis:{backgroundcolor:"white",gridcolor:"#DFE8F3",gridwidth:2,linecolor:"#EBF0F8",showbackground:!0,ticks:"",zerolinecolor:"#EBF0F8"},yaxis:{backgroundcolor:"white",gridcolor:"#DFE8F3",gridwidth:2,linecolor:"#EBF0F8",showbackground:!0,ticks:"",zerolinecolor:"#EBF0F8"},zaxis:{backgroundcolor:"white",gridcolor:"#DFE8F3",gridwidth:2,linecolor:"#EBF0F8",showbackground:!0,ticks:"",zerolinecolor:"#EBF0F8"}},shapedefaults:{line:{color:"#2a3f5f"}},ternary:{aaxis:{gridcolor:"#DFE8F3",linecolor:"#A2B1C6",ticks:""},baxis:{gridcolor:"#DFE8F3",linecolor:"#A2B1C6",ticks:""},bgcolor:"white",caxis:{gridcolor:"#DFE8F3",linecolor:"#A2B1C6",ticks:""}},title:{x:.05},xaxis:{automargin:!0,ticks:"outside",zerolinewidth:2,rangeslider:{visible:!1},showgrid:!0,showline:!0,tickfont:{size:15},title:{standoff:20},mirror:!0,zeroline:!1},yaxis:{automargin:!0,ticks:"outside",tickfont:{size:15},zerolinewidth:2,fixedrange:!1,title:{standoff:20},nticks:8,showgrid:!0,showline:!0,side:"right",mirror:!0,zeroline:!1},dragmode:"pan",legend:{bgcolor:"rgba(0, 0, 0, 0)",x:1.03,xanchor:"left",y:.99,yanchor:"top"}}};function Io(){return Io=Object.assign?Object.assign.bind():function(O){for(var F=1;FO.forEach(J=>tk(J,F))}function Yp(...O){return Un.useCallback(mw(...O),O)}function nk(O,F=[]){let J=[];function fe(D,E){const e=Un.createContext(E),_=J.length;J=[...J,E];function w(T){const{scope:m,children:f,...l}=T,t=(m==null?void 0:m[O][_])||e,a=Un.useMemo(()=>l,Object.values(l));return Un.createElement(t.Provider,{value:a},f)}function s(T,m){const f=(m==null?void 0:m[O][_])||e,l=Un.useContext(f);if(l)return l;if(E!==void 0)return E;throw new Error(`\`${T}\` must be used within \`${D}\``)}return w.displayName=D+"Provider",[w,s]}const Pe=()=>{const D=J.map(E=>Un.createContext(E));return function(e){const _=(e==null?void 0:e[O])||D;return Un.useMemo(()=>({[`__scope${O}`]:{...e,[O]:_}}),[e,_])}};return Pe.scopeName=O,[fe,rk(Pe,...F)]}function rk(...O){const F=O[0];if(O.length===1)return F;const J=()=>{const fe=O.map(Pe=>({useScope:Pe(),scopeName:Pe.scopeName}));return function(D){const E=fe.reduce((e,{useScope:_,scopeName:w})=>{const T=_(D)[`__scope${w}`];return{...e,...T}},{});return Un.useMemo(()=>({[`__scope${F.scopeName}`]:E}),[E])}};return J.scopeName=F.scopeName,J}const jv=globalThis!=null&&globalThis.document?Un.useLayoutEffect:()=>{},ik=R4["useId".toString()]||(()=>{});let ak=0;function Lg(O){const[F,J]=Un.useState(ik());return jv(()=>{O||J(fe=>fe??String(ak++))},[O]),O||(F?`radix-${F}`:"")}function uf(O){const F=Un.useRef(O);return Un.useEffect(()=>{F.current=O}),Un.useMemo(()=>(...J)=>{var fe;return(fe=F.current)===null||fe===void 0?void 0:fe.call(F,...J)},[])}function ok({prop:O,defaultProp:F,onChange:J=()=>{}}){const[fe,Pe]=sk({defaultProp:F,onChange:J}),D=O!==void 0,E=D?O:fe,e=uf(J),_=Un.useCallback(w=>{if(D){const T=typeof w=="function"?w(O):w;T!==O&&e(T)}else Pe(w)},[D,O,Pe,e]);return[E,_]}function sk({defaultProp:O,onChange:F}){const J=Un.useState(O),[fe]=J,Pe=Un.useRef(fe),D=uf(F);return Un.useEffect(()=>{Pe.current!==fe&&(D(fe),Pe.current=fe)},[fe,Pe,D]),J}const Km=Un.forwardRef((O,F)=>{const{children:J,...fe}=O,Pe=Un.Children.toArray(J),D=Pe.find(uk);if(D){const E=D.props.children,e=Pe.map(_=>_===D?Un.Children.count(E)>1?Un.Children.only(null):Un.isValidElement(E)?E.props.children:null:_);return Un.createElement(Uv,Io({},fe,{ref:F}),Un.isValidElement(E)?Un.cloneElement(E,void 0,e):null)}return Un.createElement(Uv,Io({},fe,{ref:F}),J)});Km.displayName="Slot";const Uv=Un.forwardRef((O,F)=>{const{children:J,...fe}=O;return Un.isValidElement(J)?Un.cloneElement(J,{...ck(fe,J.props),ref:mw(F,J.ref)}):Un.Children.count(J)>1?Un.Children.only(null):null});Uv.displayName="SlotClone";const lk=({children:O})=>Un.createElement(Un.Fragment,null,O);function uk(O){return Un.isValidElement(O)&&O.type===lk}function ck(O,F){const J={...F};for(const fe in F){const Pe=O[fe],D=F[fe];/^on[A-Z]/.test(fe)?Pe&&D?J[fe]=(...e)=>{D(...e),Pe(...e)}:Pe&&(J[fe]=Pe):fe==="style"?J[fe]={...Pe,...D}:fe==="className"&&(J[fe]=[Pe,D].filter(Boolean).join(" "))}return{...O,...J}}const fk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],gh=fk.reduce((O,F)=>{const J=Un.forwardRef((fe,Pe)=>{const{asChild:D,...E}=fe,e=D?Km:F;return Un.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),Un.createElement(e,Io({},E,{ref:Pe}))});return J.displayName=`Primitive.${F}`,{...O,[F]:J}},{});function hk(O,F){O&&Hm.flushSync(()=>O.dispatchEvent(F))}function pk(O,F=globalThis==null?void 0:globalThis.document){const J=uf(O);Un.useEffect(()=>{const fe=Pe=>{Pe.key==="Escape"&&J(Pe)};return F.addEventListener("keydown",fe),()=>F.removeEventListener("keydown",fe)},[J,F])}const Vv="dismissableLayer.update",dk="dismissableLayer.pointerDownOutside",gk="dismissableLayer.focusOutside";let kb;const vk=Un.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mk=Un.forwardRef((O,F)=>{var J;const{disableOutsidePointerEvents:fe=!1,onEscapeKeyDown:Pe,onPointerDownOutside:D,onFocusOutside:E,onInteractOutside:e,onDismiss:_,...w}=O,s=Un.useContext(vk),[T,m]=Un.useState(null),f=(J=T==null?void 0:T.ownerDocument)!==null&&J!==void 0?J:globalThis==null?void 0:globalThis.document,[,l]=Un.useState({}),t=Yp(F,b=>m(b)),a=Array.from(s.layers),[r]=[...s.layersWithOutsidePointerEventsDisabled].slice(-1),n=a.indexOf(r),o=T?a.indexOf(T):-1,i=s.layersWithOutsidePointerEventsDisabled.size>0,u=o>=n,p=yk(b=>{const d=b.target,v=[...s.branches].some(x=>x.contains(d));!u||v||(D==null||D(b),e==null||e(b),b.defaultPrevented||_==null||_())},f),c=xk(b=>{const d=b.target;[...s.branches].some(x=>x.contains(d))||(E==null||E(b),e==null||e(b),b.defaultPrevented||_==null||_())},f);return pk(b=>{o===s.layers.size-1&&(Pe==null||Pe(b),!b.defaultPrevented&&_&&(b.preventDefault(),_()))},f),Un.useEffect(()=>{if(T)return fe&&(s.layersWithOutsidePointerEventsDisabled.size===0&&(kb=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),s.layersWithOutsidePointerEventsDisabled.add(T)),s.layers.add(T),Ab(),()=>{fe&&s.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=kb)}},[T,f,fe,s]),Un.useEffect(()=>()=>{T&&(s.layers.delete(T),s.layersWithOutsidePointerEventsDisabled.delete(T),Ab())},[T,s]),Un.useEffect(()=>{const b=()=>l({});return document.addEventListener(Vv,b),()=>document.removeEventListener(Vv,b)},[]),Un.createElement(gh.div,Io({},w,{ref:t,style:{pointerEvents:i?u?"auto":"none":void 0,...O.style},onFocusCapture:rf(O.onFocusCapture,c.onFocusCapture),onBlurCapture:rf(O.onBlurCapture,c.onBlurCapture),onPointerDownCapture:rf(O.onPointerDownCapture,p.onPointerDownCapture)}))});function yk(O,F=globalThis==null?void 0:globalThis.document){const J=uf(O),fe=Un.useRef(!1),Pe=Un.useRef(()=>{});return Un.useEffect(()=>{const D=e=>{if(e.target&&!fe.current){let s=function(){yw(dk,J,w,{discrete:!0})};var _=s;const w={originalEvent:e};e.pointerType==="touch"?(F.removeEventListener("click",Pe.current),Pe.current=s,F.addEventListener("click",Pe.current,{once:!0})):s()}fe.current=!1},E=window.setTimeout(()=>{F.addEventListener("pointerdown",D)},0);return()=>{window.clearTimeout(E),F.removeEventListener("pointerdown",D),F.removeEventListener("click",Pe.current)}},[F,J]),{onPointerDownCapture:()=>fe.current=!0}}function xk(O,F=globalThis==null?void 0:globalThis.document){const J=uf(O),fe=Un.useRef(!1);return Un.useEffect(()=>{const Pe=D=>{D.target&&!fe.current&&yw(gk,J,{originalEvent:D},{discrete:!1})};return F.addEventListener("focusin",Pe),()=>F.removeEventListener("focusin",Pe)},[F,J]),{onFocusCapture:()=>fe.current=!0,onBlurCapture:()=>fe.current=!1}}function Ab(){const O=new CustomEvent(Vv);document.dispatchEvent(O)}function yw(O,F,J,{discrete:fe}){const Pe=J.originalEvent.target,D=new CustomEvent(O,{bubbles:!1,cancelable:!0,detail:J});F&&Pe.addEventListener(O,F,{once:!0}),fe?hk(Pe,D):Pe.dispatchEvent(D)}const Pg="focusScope.autoFocusOnMount",Og="focusScope.autoFocusOnUnmount",Mb={bubbles:!1,cancelable:!0},bk=Un.forwardRef((O,F)=>{const{loop:J=!1,trapped:fe=!1,onMountAutoFocus:Pe,onUnmountAutoFocus:D,...E}=O,[e,_]=Un.useState(null),w=uf(Pe),s=uf(D),T=Un.useRef(null),m=Yp(F,t=>_(t)),f=Un.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Un.useEffect(()=>{if(fe){let r=function(o){if(f.paused||!e)return;const i=o.target;e.contains(i)?T.current=i:Zc(T.current,{select:!0})},n=function(o){f.paused||!e||e.contains(o.relatedTarget)||Zc(T.current,{select:!0})};var t=r,a=n;return document.addEventListener("focusin",r),document.addEventListener("focusout",n),()=>{document.removeEventListener("focusin",r),document.removeEventListener("focusout",n)}}},[fe,e,f.paused]),Un.useEffect(()=>{if(e){Eb.add(f);const t=document.activeElement;if(!e.contains(t)){const r=new CustomEvent(Pg,Mb);e.addEventListener(Pg,w),e.dispatchEvent(r),r.defaultPrevented||(_k(Mk(xw(e)),{select:!0}),document.activeElement===t&&Zc(e))}return()=>{e.removeEventListener(Pg,w),setTimeout(()=>{const r=new CustomEvent(Og,Mb);e.addEventListener(Og,s),e.dispatchEvent(r),r.defaultPrevented||Zc(t??document.body,{select:!0}),e.removeEventListener(Og,s),Eb.remove(f)},0)}}},[e,w,s,f]);const l=Un.useCallback(t=>{if(!J&&!fe||f.paused)return;const a=t.key==="Tab"&&!t.altKey&&!t.ctrlKey&&!t.metaKey,r=document.activeElement;if(a&&r){const n=t.currentTarget,[o,i]=wk(n);o&&i?!t.shiftKey&&r===i?(t.preventDefault(),J&&Zc(o,{select:!0})):t.shiftKey&&r===o&&(t.preventDefault(),J&&Zc(i,{select:!0})):r===n&&t.preventDefault()}},[J,fe,f.paused]);return Un.createElement(gh.div,Io({tabIndex:-1},E,{ref:m,onKeyDown:l}))});function _k(O,{select:F=!1}={}){const J=document.activeElement;for(const fe of O)if(Zc(fe,{select:F}),document.activeElement!==J)return}function wk(O){const F=xw(O),J=Sb(F,O),fe=Sb(F.reverse(),O);return[J,fe]}function xw(O){const F=[],J=document.createTreeWalker(O,NodeFilter.SHOW_ELEMENT,{acceptNode:fe=>{const Pe=fe.tagName==="INPUT"&&fe.type==="hidden";return fe.disabled||fe.hidden||Pe?NodeFilter.FILTER_SKIP:fe.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;J.nextNode();)F.push(J.currentNode);return F}function Sb(O,F){for(const J of O)if(!Tk(J,{upTo:F}))return J}function Tk(O,{upTo:F}){if(getComputedStyle(O).visibility==="hidden")return!0;for(;O;){if(F!==void 0&&O===F)return!1;if(getComputedStyle(O).display==="none")return!0;O=O.parentElement}return!1}function kk(O){return O instanceof HTMLInputElement&&"select"in O}function Zc(O,{select:F=!1}={}){if(O&&O.focus){const J=document.activeElement;O.focus({preventScroll:!0}),O!==J&&kk(O)&&F&&O.select()}}const Eb=Ak();function Ak(){let O=[];return{add(F){const J=O[0];F!==J&&(J==null||J.pause()),O=Cb(O,F),O.unshift(F)},remove(F){var J;O=Cb(O,F),(J=O[0])===null||J===void 0||J.resume()}}}function Cb(O,F){const J=[...O],fe=J.indexOf(F);return fe!==-1&&J.splice(fe,1),J}function Mk(O){return O.filter(F=>F.tagName!=="A")}function Sk(O,F){return Un.useReducer((J,fe)=>{const Pe=F[J][fe];return Pe??J},O)}const Qm=O=>{const{present:F,children:J}=O,fe=Ek(F),Pe=typeof J=="function"?J({present:fe.isPresent}):Un.Children.only(J),D=Yp(fe.ref,Pe.ref);return typeof J=="function"||fe.isPresent?Un.cloneElement(Pe,{ref:D}):null};Qm.displayName="Presence";function Ek(O){const[F,J]=Un.useState(),fe=Un.useRef({}),Pe=Un.useRef(O),D=Un.useRef("none"),E=O?"mounted":"unmounted",[e,_]=Sk(E,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Un.useEffect(()=>{const w=Jd(fe.current);D.current=e==="mounted"?w:"none"},[e]),jv(()=>{const w=fe.current,s=Pe.current;if(s!==O){const m=D.current,f=Jd(w);O?_("MOUNT"):f==="none"||(w==null?void 0:w.display)==="none"?_("UNMOUNT"):_(s&&m!==f?"ANIMATION_OUT":"UNMOUNT"),Pe.current=O}},[O,_]),jv(()=>{if(F){const w=T=>{const f=Jd(fe.current).includes(T.animationName);T.target===F&&f&&Hm.flushSync(()=>_("ANIMATION_END"))},s=T=>{T.target===F&&(D.current=Jd(fe.current))};return F.addEventListener("animationstart",s),F.addEventListener("animationcancel",w),F.addEventListener("animationend",w),()=>{F.removeEventListener("animationstart",s),F.removeEventListener("animationcancel",w),F.removeEventListener("animationend",w)}}else _("ANIMATION_END")},[F,_]),{isPresent:["mounted","unmountSuspended"].includes(e),ref:Un.useCallback(w=>{w&&(fe.current=getComputedStyle(w)),J(w)},[])}}function Jd(O){return(O==null?void 0:O.animationName)||"none"}let Ig=0;function Ck(){Un.useEffect(()=>{var O,F;const J=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(O=J[0])!==null&&O!==void 0?O:Lb()),document.body.insertAdjacentElement("beforeend",(F=J[1])!==null&&F!==void 0?F:Lb()),Ig++,()=>{Ig===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(fe=>fe.remove()),Ig--}},[])}function Lb(){const O=document.createElement("span");return O.setAttribute("data-radix-focus-guard",""),O.tabIndex=0,O.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",O}var iu=function(){return iu=Object.assign||function(F){for(var J,fe=1,Pe=arguments.length;fe"u")return Wk;var F=Zk(O),J=document.documentElement.clientWidth,fe=window.innerWidth;return{left:F[0],top:F[1],right:F[2],gap:Math.max(0,fe-J+F[2]-F[0])}},Xk=Tw(),$k=function(O,F,J,fe){var Pe=O.left,D=O.top,E=O.right,e=O.gap;return J===void 0&&(J="margin"),` .`.concat(Pk,` { overflow: hidden `).concat(fe,`; padding-right: `).concat(e,"px ").concat(fe,`; @@ -3691,14 +3691,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho body { `).concat(Ok,": ").concat(e,`px; } -`)},Jk=function(O){var F=O.noRelative,J=O.noImportant,fe=O.gapMode,Pe=fe===void 0?"margin":fe,D=Vn.useMemo(function(){return Yk(Pe)},[Pe]);return Vn.createElement(Xk,{styles:$k(D,!F,Pe,J?"":"!important")})},Hv=!1;if(typeof window<"u")try{var Kd=Object.defineProperty({},"passive",{get:function(){return Hv=!0,!0}});window.addEventListener("test",Kd,Kd),window.removeEventListener("test",Kd,Kd)}catch{Hv=!1}var zf=Hv?{passive:!1}:!1,Kk=function(O){return O.tagName==="TEXTAREA"},kw=function(O,F){var J=window.getComputedStyle(O);return J[F]!=="hidden"&&!(J.overflowY===J.overflowX&&!Kk(O)&&J[F]==="visible")},Qk=function(O){return kw(O,"overflowY")},e7=function(O){return kw(O,"overflowX")},Ob=function(O,F){var J=F;do{typeof ShadowRoot<"u"&&J instanceof ShadowRoot&&(J=J.host);var fe=Aw(O,J);if(fe){var Pe=Mw(O,J),D=Pe[1],E=Pe[2];if(D>E)return!0}J=J.parentNode}while(J&&J!==document.body);return!1},t7=function(O){var F=O.scrollTop,J=O.scrollHeight,fe=O.clientHeight;return[F,J,fe]},n7=function(O){var F=O.scrollLeft,J=O.scrollWidth,fe=O.clientWidth;return[F,J,fe]},Aw=function(O,F){return O==="v"?Qk(F):e7(F)},Mw=function(O,F){return O==="v"?t7(F):n7(F)},r7=function(O,F){return O==="h"&&F==="rtl"?-1:1},i7=function(O,F,J,fe,Pe){var D=r7(O,window.getComputedStyle(F).direction),E=D*fe,e=J.target,_=F.contains(e),w=!1,s=E>0,T=0,m=0;do{var f=Mw(O,e),l=f[0],t=f[1],a=f[2],r=t-a-D*l;(l||r)&&Aw(O,e)&&(T+=r,m+=l),e=e.parentNode}while(!_&&e!==document.body||_&&(F.contains(e)||F===e));return(s&&(Pe&&T===0||!Pe&&E>T)||!s&&(Pe&&m===0||!Pe&&-E>m))&&(w=!0),w},Qd=function(O){return"changedTouches"in O?[O.changedTouches[0].clientX,O.changedTouches[0].clientY]:[0,0]},Ib=function(O){return[O.deltaX,O.deltaY]},Rb=function(O){return O&&"current"in O?O.current:O},a7=function(O,F){return O[0]===F[0]&&O[1]===F[1]},o7=function(O){return` +`)},Jk=function(O){var F=O.noRelative,J=O.noImportant,fe=O.gapMode,Pe=fe===void 0?"margin":fe,D=Un.useMemo(function(){return Yk(Pe)},[Pe]);return Un.createElement(Xk,{styles:$k(D,!F,Pe,J?"":"!important")})},Hv=!1;if(typeof window<"u")try{var Kd=Object.defineProperty({},"passive",{get:function(){return Hv=!0,!0}});window.addEventListener("test",Kd,Kd),window.removeEventListener("test",Kd,Kd)}catch{Hv=!1}var zf=Hv?{passive:!1}:!1,Kk=function(O){return O.tagName==="TEXTAREA"},kw=function(O,F){var J=window.getComputedStyle(O);return J[F]!=="hidden"&&!(J.overflowY===J.overflowX&&!Kk(O)&&J[F]==="visible")},Qk=function(O){return kw(O,"overflowY")},e7=function(O){return kw(O,"overflowX")},Ob=function(O,F){var J=F;do{typeof ShadowRoot<"u"&&J instanceof ShadowRoot&&(J=J.host);var fe=Aw(O,J);if(fe){var Pe=Mw(O,J),D=Pe[1],E=Pe[2];if(D>E)return!0}J=J.parentNode}while(J&&J!==document.body);return!1},t7=function(O){var F=O.scrollTop,J=O.scrollHeight,fe=O.clientHeight;return[F,J,fe]},n7=function(O){var F=O.scrollLeft,J=O.scrollWidth,fe=O.clientWidth;return[F,J,fe]},Aw=function(O,F){return O==="v"?Qk(F):e7(F)},Mw=function(O,F){return O==="v"?t7(F):n7(F)},r7=function(O,F){return O==="h"&&F==="rtl"?-1:1},i7=function(O,F,J,fe,Pe){var D=r7(O,window.getComputedStyle(F).direction),E=D*fe,e=J.target,_=F.contains(e),w=!1,s=E>0,T=0,m=0;do{var f=Mw(O,e),l=f[0],t=f[1],a=f[2],r=t-a-D*l;(l||r)&&Aw(O,e)&&(T+=r,m+=l),e=e.parentNode}while(!_&&e!==document.body||_&&(F.contains(e)||F===e));return(s&&(Pe&&T===0||!Pe&&E>T)||!s&&(Pe&&m===0||!Pe&&-E>m))&&(w=!0),w},Qd=function(O){return"changedTouches"in O?[O.changedTouches[0].clientX,O.changedTouches[0].clientY]:[0,0]},Ib=function(O){return[O.deltaX,O.deltaY]},Rb=function(O){return O&&"current"in O?O.current:O},a7=function(O,F){return O[0]===F[0]&&O[1]===F[1]},o7=function(O){return` .block-interactivity-`.concat(O,` {pointer-events: none;} .allow-interactivity-`).concat(O,` {pointer-events: all;} -`)},s7=0,Df=[];function l7(O){var F=Vn.useRef([]),J=Vn.useRef([0,0]),fe=Vn.useRef(),Pe=Vn.useState(s7++)[0],D=Vn.useState(function(){return Tw()})[0],E=Vn.useRef(O);Vn.useEffect(function(){E.current=O},[O]),Vn.useEffect(function(){if(O.inert){document.body.classList.add("block-interactivity-".concat(Pe));var t=Lk([O.lockRef.current],(O.shards||[]).map(Rb),!0).filter(Boolean);return t.forEach(function(a){return a.classList.add("allow-interactivity-".concat(Pe))}),function(){document.body.classList.remove("block-interactivity-".concat(Pe)),t.forEach(function(a){return a.classList.remove("allow-interactivity-".concat(Pe))})}}},[O.inert,O.lockRef.current,O.shards]);var e=Vn.useCallback(function(t,a){if("touches"in t&&t.touches.length===2)return!E.current.allowPinchZoom;var r=Qd(t),n=J.current,o="deltaX"in t?t.deltaX:n[0]-r[0],i="deltaY"in t?t.deltaY:n[1]-r[1],u,p=t.target,c=Math.abs(o)>Math.abs(i)?"h":"v";if("touches"in t&&c==="h"&&p.type==="range")return!1;var b=Ob(c,p);if(!b)return!0;if(b?u=c:(u=c==="v"?"h":"v",b=Ob(c,p)),!b)return!1;if(!fe.current&&"changedTouches"in t&&(o||i)&&(fe.current=u),!u)return!0;var d=fe.current||u;return i7(d,a,t,d==="h"?o:i,!0)},[]),_=Vn.useCallback(function(t){var a=t;if(!(!Df.length||Df[Df.length-1]!==D)){var r="deltaY"in a?Ib(a):Qd(a),n=F.current.filter(function(u){return u.name===a.type&&u.target===a.target&&a7(u.delta,r)})[0];if(n&&n.should){a.cancelable&&a.preventDefault();return}if(!n){var o=(E.current.shards||[]).map(Rb).filter(Boolean).filter(function(u){return u.contains(a.target)}),i=o.length>0?e(a,o[0]):!E.current.noIsolation;i&&a.cancelable&&a.preventDefault()}}},[]),w=Vn.useCallback(function(t,a,r,n){var o={name:t,delta:a,target:r,should:n};F.current.push(o),setTimeout(function(){F.current=F.current.filter(function(i){return i!==o})},1)},[]),s=Vn.useCallback(function(t){J.current=Qd(t),fe.current=void 0},[]),T=Vn.useCallback(function(t){w(t.type,Ib(t),t.target,e(t,O.lockRef.current))},[]),m=Vn.useCallback(function(t){w(t.type,Qd(t),t.target,e(t,O.lockRef.current))},[]);Vn.useEffect(function(){return Df.push(D),O.setCallbacks({onScrollCapture:T,onWheelCapture:T,onTouchMoveCapture:m}),document.addEventListener("wheel",_,zf),document.addEventListener("touchmove",_,zf),document.addEventListener("touchstart",s,zf),function(){Df=Df.filter(function(t){return t!==D}),document.removeEventListener("wheel",_,zf),document.removeEventListener("touchmove",_,zf),document.removeEventListener("touchstart",s,zf)}},[]);var f=O.removeScrollBar,l=O.inert;return Vn.createElement(Vn.Fragment,null,l?Vn.createElement(D,{styles:o7(Pe)}):null,f?Vn.createElement(Jk,{gapMode:"margin"}):null)}const u7=Nk(ww,l7);var Sw=Vn.forwardRef(function(O,F){return Vn.createElement(f1,iu({},O,{ref:F,sideCar:u7}))});Sw.classNames=f1.classNames;const c7=Sw;var f7=function(O){if(typeof document>"u")return null;var F=Array.isArray(O)?O[0]:O;return F.ownerDocument.body},Ff=new WeakMap,e0=new WeakMap,t0={},Dg=0,Ew=function(O){return O&&(O.host||Ew(O.parentNode))},h7=function(O,F){return F.map(function(J){if(O.contains(J))return J;var fe=Ew(J);return fe&&O.contains(fe)?fe:(console.error("aria-hidden",J,"in not contained inside",O,". Doing nothing"),null)}).filter(function(J){return!!J})},p7=function(O,F,J,fe){var Pe=h7(F,Array.isArray(O)?O:[O]);t0[J]||(t0[J]=new WeakMap);var D=t0[J],E=[],e=new Set,_=new Set(Pe),w=function(T){!T||e.has(T)||(e.add(T),w(T.parentNode))};Pe.forEach(w);var s=function(T){!T||_.has(T)||Array.prototype.forEach.call(T.children,function(m){if(e.has(m))s(m);else{var f=m.getAttribute(fe),l=f!==null&&f!=="false",t=(Ff.get(m)||0)+1,a=(D.get(m)||0)+1;Ff.set(m,t),D.set(m,a),E.push(m),t===1&&l&&e0.set(m,!0),a===1&&m.setAttribute(J,"true"),l||m.setAttribute(fe,"true")}})};return s(F),e.clear(),Dg++,function(){E.forEach(function(T){var m=Ff.get(T)-1,f=D.get(T)-1;Ff.set(T,m),D.set(T,f),m||(e0.has(T)||T.removeAttribute(fe),e0.delete(T)),f||T.removeAttribute(J)}),Dg--,Dg||(Ff=new WeakMap,Ff=new WeakMap,e0=new WeakMap,t0={})}},d7=function(O,F,J){J===void 0&&(J="data-aria-hidden");var fe=Array.from(Array.isArray(O)?O:[O]),Pe=F||f7(O);return Pe?(fe.push.apply(fe,Array.from(Pe.querySelectorAll("[aria-live]"))),p7(fe,Pe,J,"aria-hidden")):function(){return null}};const Cw="Dialog",[Lw,d9]=nk(Cw),[g7,ju]=Lw(Cw),v7=O=>{const{__scopeDialog:F,children:J,open:fe,defaultOpen:Pe,onOpenChange:D,modal:E=!0}=O,e=Vn.useRef(null),_=Vn.useRef(null),[w=!1,s]=ok({prop:fe,defaultProp:Pe,onChange:D});return Vn.createElement(g7,{scope:F,triggerRef:e,contentRef:_,contentId:Lg(),titleId:Lg(),descriptionId:Lg(),open:w,onOpenChange:s,onOpenToggle:Vn.useCallback(()=>s(T=>!T),[s]),modal:E},J)},m7="DialogPortal",[g9,Pw]=Lw(m7,{forceMount:void 0}),qv="DialogOverlay",y7=Vn.forwardRef((O,F)=>{const J=Pw(qv,O.__scopeDialog),{forceMount:fe=J.forceMount,...Pe}=O,D=ju(qv,O.__scopeDialog);return D.modal?Vn.createElement(Qm,{present:fe||D.open},Vn.createElement(x7,Io({},Pe,{ref:F}))):null}),x7=Vn.forwardRef((O,F)=>{const{__scopeDialog:J,...fe}=O,Pe=ju(qv,J);return Vn.createElement(c7,{as:Km,allowPinchZoom:!0,shards:[Pe.contentRef]},Vn.createElement(gh.div,Io({"data-state":Iw(Pe.open)},fe,{ref:F,style:{pointerEvents:"auto",...fe.style}})))}),Fp="DialogContent",b7=Vn.forwardRef((O,F)=>{const J=Pw(Fp,O.__scopeDialog),{forceMount:fe=J.forceMount,...Pe}=O,D=ju(Fp,O.__scopeDialog);return Vn.createElement(Qm,{present:fe||D.open},D.modal?Vn.createElement(_7,Io({},Pe,{ref:F})):Vn.createElement(w7,Io({},Pe,{ref:F})))}),_7=Vn.forwardRef((O,F)=>{const J=ju(Fp,O.__scopeDialog),fe=Vn.useRef(null),Pe=Yp(F,J.contentRef,fe);return Vn.useEffect(()=>{const D=fe.current;if(D)return d7(D)},[]),Vn.createElement(Ow,Io({},O,{ref:Pe,trapFocus:J.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:rf(O.onCloseAutoFocus,D=>{var E;D.preventDefault(),(E=J.triggerRef.current)===null||E===void 0||E.focus()}),onPointerDownOutside:rf(O.onPointerDownOutside,D=>{const E=D.detail.originalEvent,e=E.button===0&&E.ctrlKey===!0;(E.button===2||e)&&D.preventDefault()}),onFocusOutside:rf(O.onFocusOutside,D=>D.preventDefault())}))}),w7=Vn.forwardRef((O,F)=>{const J=ju(Fp,O.__scopeDialog),fe=Vn.useRef(!1);return Vn.createElement(Ow,Io({},O,{ref:F,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:Pe=>{var D;if((D=O.onCloseAutoFocus)===null||D===void 0||D.call(O,Pe),!Pe.defaultPrevented){var E;fe.current||(E=J.triggerRef.current)===null||E===void 0||E.focus(),Pe.preventDefault()}fe.current=!1},onInteractOutside:Pe=>{var D,E;(D=O.onInteractOutside)===null||D===void 0||D.call(O,Pe),Pe.defaultPrevented||(fe.current=!0);const e=Pe.target;((E=J.triggerRef.current)===null||E===void 0?void 0:E.contains(e))&&Pe.preventDefault()}}))}),Ow=Vn.forwardRef((O,F)=>{const{__scopeDialog:J,trapFocus:fe,onOpenAutoFocus:Pe,onCloseAutoFocus:D,...E}=O,e=ju(Fp,J),_=Vn.useRef(null),w=Yp(F,_);return Ck(),Vn.createElement(Vn.Fragment,null,Vn.createElement(bk,{asChild:!0,loop:!0,trapped:fe,onMountAutoFocus:Pe,onUnmountAutoFocus:D},Vn.createElement(mk,Io({role:"dialog",id:e.contentId,"aria-describedby":e.descriptionId,"aria-labelledby":e.titleId,"data-state":Iw(e.open)},E,{ref:w,onDismiss:()=>e.onOpenChange(!1)}))),!1)}),T7="DialogTitle",k7=Vn.forwardRef((O,F)=>{const{__scopeDialog:J,...fe}=O,Pe=ju(T7,J);return Vn.createElement(gh.h2,Io({id:Pe.titleId},fe,{ref:F}))}),A7="DialogDescription",M7=Vn.forwardRef((O,F)=>{const{__scopeDialog:J,...fe}=O,Pe=ju(A7,J);return Vn.createElement(gh.p,Io({id:Pe.descriptionId},fe,{ref:F}))}),S7="DialogClose",E7=Vn.forwardRef((O,F)=>{const{__scopeDialog:J,...fe}=O,Pe=ju(S7,J);return Vn.createElement(gh.button,Io({type:"button"},fe,{ref:F,onClick:rf(O.onClick,()=>Pe.onOpenChange(!1))}))});function Iw(O){return O?"open":"closed"}const C7=v7,L7=y7,P7=b7,O7=k7,I7=M7,zb=E7,Db=({title:O,titleId:F,...J})=>Ar("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,...J,children:Ar("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),Rw={margin:"2px 0px 2px 10px",padding:"5px 2px 2px 5px"};function ey({open:O,close:F,title:J,description:fe,children:Pe}){return ti(C7,{open:O,onOpenChange:F,children:[ti("div",{id:"loading",className:"saving",children:[Ar("div",{id:"loading_text",className:"loading_text"}),Ar("div",{id:"loader",className:"loader"})]}),Ar(L7,{onClick:F,className:"_modal-overlay"}),ti(P7,{className:"_modal",children:[Ar(O7,{className:"_modal-title",children:J}),Ar(I7,{className:"_modal_description",children:fe}),Ar(zb,{children:Ar(Db,{})}),Pe,Ar(zb,{className:"_modal-close",onClick:F,children:Ar(Db,{className:"w-6 h-6"})})]})]})}const Fb=new FileReader,R7={overlaying:"y",side:"left",tickfont:{size:12},tickpadding:5,showgrid:!1,showline:!1,showticklabels:!0,showlegend:!0,zeroline:!1,anchor:"x",type:"linear",autorange:!0};function z7({open:O,close:F,setLoading:J,addOverlay:fe,plotlyData:Pe}){const[D,E]=Vn.useState("scatter"),[e,_]=Vn.useState("#FFDD00"),[w,s]=Vn.useState("#00ACFF"),[T,m]=Vn.useState("#FF0000"),[f,l]=Vn.useState(""),[t,a]=Vn.useState([]),[r,n]=Vn.useState([]),[o,i]=Vn.useState({}),[u,p]=Vn.useState({}),c=["x","open","high","low","close"];let b={scatter:"Scatter (Line)",candlestick:"Candlestick",bar:"Bar"};const[d,v]=Vn.useState({});function x(){F(),E("scatter"),l(""),a([]),n([]),i({}),v({})}function g(){var k,h;if(t.length==0){(k=document.getElementById("csv_file"))==null||k.focus(),(h=document.getElementById("csv_file"))==null||h.style.setProperty("border","1px solid red"),document.getElementById("csv_file_warning").style.display="block";return}const y=D7({csvData:t,plotlyData:Pe,yaxisOptions:u,traceType:D,traceColor:e,traceName:f,options:d,increasingColor:w,decreasingColor:T});fe(y),x()}return Ar(ey,{title:"Overlay Chart",description:"Upload a CSV file to overlay a chart on the main chart.",open:O,close:F,children:ti("div",{id:"popup_csv",className:"popup_content",children:[ti("div",{children:[ti("label",{htmlFor:"csv_file",children:[Ar("b",{children:"CSV file:"}),Ar("div",{id:"csv_file_warning",className:"popup_warning",style:{marginLeft:"80px",marginBottom:"10px"},children:"CSV file is required."})]}),Ar("input",{onChange:y=>{var k,h;if(y.target.files){if(y.target.files[0].type!=="text/csv"){(k=document.getElementById("csv_file"))==null||k.focus(),(h=document.getElementById("csv_file"))==null||h.style.setProperty("border","1px solid red"),document.getElementById("csv_file_warning").style.display="block";return}}else return;r.length>0&&(n([]),i({}),v({}),E("scatter")),Fb.onload=M=>{var G;if(!((G=M.target)!=null&&G.result)||typeof M.target.result!="string")return;let A=M.target.result.split(` -`).map(N=>N.replace(/\r/g,""));const C=A[0].split(","),L=C.map(N=>N.trim().toLowerCase());let P={};for(let N=0;NL.includes(N))&&E("candlestick"),L.includes("close")&&(v({...d,y:C[L.indexOf("close")]}),P.y=C[L.indexOf("close")]);let U=[];for(let N=1;N2&&(j.test(N[0])?N.splice(0,2):j.test(N[N.length-2])&&N.splice(N.length-2,2),B=N.join("_").replace(/openbb_/g,""))}}catch(N){console.log(N)}l(B),v(P),n(C),a(U)},Fb.readAsText(y.target.files[0])},type:"file",id:"csv_file",accept:".csv",style:{marginLeft:10}})]}),ti("div",{style:{marginTop:15},children:[Ar("label",{htmlFor:"csv_trace_type",children:Ar("b",{children:"Display data type:"})}),ti("select",{onChange:y=>{E(y.target.value)},id:"csv_trace_type",style:Rw,defaultValue:b[D],children:[D&&Ar("option",{value:D,children:b[D]},D),Object.keys(b).map(y=>D!==y&&Ar("option",{value:y,children:b[y]},y))]})]}),ti("div",{style:{marginTop:12},children:[Ar("label",{htmlFor:"csv_name",children:Ar("b",{children:"Trace Name:"})}),Ar("textarea",{id:"csv_name",value:f,onChange:y=>{l(y.target.value)},style:{padding:"5px 2px 2px 5px",width:"100%",maxWidth:"100%",maxHeight:200,marginTop:2},rows:2,cols:20,placeholder:"Enter a name to give this trace"})]}),r.length>0&&ti(eg,{children:[["scatter","bar"].includes(D)&&Ar("div",{style:{marginTop:15,marginBottom:10},id:"csv_columns",className:"csv_column_container",children:["x","y"].map(y=>ti("div",{style:{marginTop:10,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[ti("label",{htmlFor:`csv_${y}`,style:{width:"100px"},children:[y.toUpperCase()," Axis"]}),ti("select",{onChange:k=>{i({...o,[y]:k.target.value}),v({...d,[y]:k.target.value})},id:`csv_${y}`,style:{width:"100%"},defaultValue:d[y],children:[d[y]&&Ar("option",{value:d[y],children:d[y]},y),r.map(k=>Ar("option",{value:k,children:k},k))]})]},y))}),D==="candlestick"&&Ar("div",{id:"csv_columns",className:"csv_column_container",style:{marginTop:15},children:["x","open","high","low","close"].map(y=>ti("div",{style:{marginTop:10,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[Ar("label",{htmlFor:`csv_${y}`,style:{width:"100px"},children:y.charAt(0).toUpperCase()+y.slice(1)}),ti("select",{onChange:k=>{i({...o,[y]:k.target.value}),v({...d,[y]:k.target.value})},id:`csv_${y}`,style:{width:"100%"},children:[d[y]&&Ar("option",{value:d[y],children:d[y]},y),r.map(k=>k!=d[k]&&Ar("option",{value:k,children:k},k))]})]},y))}),ti("div",{style:{marginTop:20},id:"csv_colors",children:[["scatter","bar"].includes(D)&&ti("div",{children:[Ar("label",{htmlFor:"csv_color",children:`${D.charAt(0).toUpperCase()}${D.slice(1)} color`}),Ar("input",{type:"color",id:"csv_color",defaultValue:"#FFDD00",style:{margin:"2px 2px 2px 10px"},onChange:y=>{console.log(y.target.value),_(y.target.value)}})]}),D==="candlestick"&&ti(eg,{children:[Ar("label",{htmlFor:"csv_increasing",children:"Increasing color"}),Ar("input",{type:"color",id:"csv_increasing",defaultValue:"#00ACFF",style:{margin:"2px 0px 2px 10px"},onChange:y=>{s(y.target.value)}}),Ar("label",{htmlFor:"csv_decreasing",style:{marginLeft:15},children:"Decreasing color"}),Ar("input",{style:{margin:"2px 0px 2px 10px"},type:"color",id:"csv_decreasing",defaultValue:"#FF0000",onChange:y=>{m(y.target.value)}})]})]}),ti("div",{style:{marginTop:20},id:"csv_plot_yaxis_options",children:[D!=="candlestick"&&ti(eg,{children:[Ar("input",{type:"checkbox",id:"csv_percent_change",name:"csv_plot_yaxis_check",style:{marginBottom:2},onChange:y=>{p({...u,percentChange:y.target.checked,sameYaxis:!1})},checked:!u.sameYaxis&&u.percentChange}),Ar("label",{htmlFor:"csv_percent_change",style:{marginLeft:5},children:"Plot as percent change from first value"}),Ar("br",{})]}),Ar("input",{style:{marginTop:2},type:"checkbox",id:"csv_same_yaxis",name:"csv_plot_yaxis_check",onChange:y=>{p({...u,sameYaxis:y.target.checked,percentChange:!1})},checked:!u.percentChange&&u.sameYaxis}),Ar("label",{htmlFor:"csv_same_yaxis",style:{marginLeft:5},children:"Share Y-axis"}),D==="bar"&&ti("div",{style:{marginTop:2},id:"csv_bar_orientation",children:[Ar("input",{type:"checkbox",id:"csv_bar_horizontal",onChange:y=>{v({...d,orientation:y.target.checked?"h":"v"})}}),Ar("label",{htmlFor:"csv_bar_horizontal",style:{marginLeft:5},children:"Plot horizontally"})]})]})]}),Ar("br",{}),ti("div",{style:{float:"right",marginTop:20},children:[Ar("button",{className:"_btn-tertiary",id:"csv_cancel",onClick:x,children:"Cancel"}),Ar("button",{className:"_btn",id:"csv_submit",onClick:g,children:"Submit"})]})]})})}function D7({csvData:O,plotlyData:F,yaxisOptions:J,traceType:fe,traceColor:Pe,traceName:D,options:E,increasingColor:e,decreasingColor:_}){let w=F.data[0];w.xaxis==null&&(w.xaxis="x"),w.yaxis==null&&(w.yaxis="y");let s=w.yaxis,T,f=Object.keys(F.layout).filter(r=>r.startsWith("yaxis")).map(r=>F.layout[r]).filter(r=>r.side=="left"&&(r.overlaying=="y"||r.fixedrange!=null&&r.fixedrange==!0)).length>0?" ":"";if(J.sameYaxis!==!0){const r=Object.keys(F.layout).filter(n=>n.startsWith("yaxis")).map(n=>F.layout[n]);T=`y${r.length+1}`,s=`yaxis${r.length+1}`,console.log(`yaxis: ${T} ${s}`),F.layout[s]={...R7,title:{text:D,font:{size:14},standoff:0},ticksuffix:f,layer:"below traces"}}else T=w.yaxis.replace("yaxis","y");const l={type:fe,name:D,showlegend:!0,yaxis:T};let t={};if(["scatter","bar"].includes(fe)){const r=O.findIndex(n=>n[E.y]!=null&&n[E.y]!=0);t={...l,x:O.map(n=>n[E.x]),y:O.map(function(n){return J.percentChange&&fe==="scatter"?(n[E.y]-O[r][E.y])/O[r][E.y]:n[E.y]}),customdata:O.map(n=>n[E.y]),hovertemplate:"%{customdata:.2f}",connectgaps:!0,marker:{color:Pe}},fe==="bar"&&(t.orientation=E.orientation,t.marker.opacity=.7,delete t.connectgaps,delete t.hovertemplate,delete t.customdata)}else fe==="candlestick"&&(t={...l,x:O.map(r=>r[E.x]),open:O.map(r=>r[E.open]),high:O.map(r=>r[E.high]),low:O.map(r=>r[E.low]),close:O.map(r=>r[E.close]),increasing:{line:{color:e}},decreasing:{line:{color:_}}});return{...F,data:[...F.data,t]}}function F7({plotlyData:O,open:F,close:J,defaultTitle:fe,updateTitle:Pe,updateAxesTitles:D}){const[E,e]=Vn.useState(fe),_=Object.keys(O.layout||{}).filter(m=>m.startsWith("yaxis")&&O.layout[m].range!=null),w=Object.keys(O.layout||{}).filter(m=>{var f;return m.startsWith("xaxis")&&O.layout[m].showticklabels!=null&&((f=O.layout[m])==null?void 0:f.anchor)}),[s,T]=Vn.useState({});return Ar(ey,{title:"Chart Titles",description:"Change the titles on the chart.",open:F,close:J,children:ti("div",{id:"popup_title",className:"popup_content",children:[ti("div",{style:{display:"flex",flexDirection:"column",gap:0},children:[ti("div",{children:[Ar("label",{htmlFor:"title_text",children:Ar("b",{children:"Title:"})}),Ar("textarea",{id:"title_text",style:{...Rw,width:"100%",maxWidth:"100%",maxHeight:"200px",marginTop:"8px",marginLeft:"0px"},rows:2,cols:20,value:E,onChange:m=>e(m.target.value)})]}),Ar("div",{id:"xaxis_div",className:"csv_column_container",style:{marginTop:5,marginBottom:-5},children:w.map((m,f)=>{var l,t;return ti("div",{style:{marginTop:5,marginBottom:5},children:[Ar("label",{htmlFor:`title_${m}`,children:f===0?Ar("b",{children:"X axis:"}):ti("b",{children:["X axis ",f+1,":"]})}),Ar("input",{id:`title_${m}`,style:{marginLeft:"0px",padding:"5px 2px 2px 5px"},type:"text",defaultValue:((t=(l=O==null?void 0:O.layout[m])==null?void 0:l.title)==null?void 0:t.text)||"",onChange:a=>{T({...s,[m]:a.target.value})}})]},m)})}),Ar("div",{id:"yaxis_div",className:"csv_column_container",style:{marginTop:5,marginBottom:5},children:_.map((m,f)=>{var l,t;return ti("div",{style:{marginTop:10},children:[Ar("label",{htmlFor:`title_${m}`,children:f===0?Ar("b",{children:"Y axis:"}):ti("b",{children:["Y axis ",f+1,":"]})}),Ar("input",{id:`title_${m}`,style:{marginLeft:"0px",padding:"5px 2px 2px 5px"},type:"text",defaultValue:((t=(l=O==null?void 0:O.layout[m])==null?void 0:l.title)==null?void 0:t.text)||"",onChange:a=>{T({...s,[m]:a.target.value})}})]},m)})})]}),ti("div",{style:{float:"right",marginTop:20},children:[Ar("button",{className:"_btn-tertiary ph-capture",id:"title_cancel",onClick:J,children:"Cancel"}),Ar("button",{className:"_btn ph-capture",id:"title_submit",onClick:()=>{Pe(E),D(s),J()},children:"Submit"})]})]})})}const Bb={padding:"5px 2px 2px 5px",margin:"2px 0"};function B7({open:O,close:F,addAnnotation:J,deleteAnnotation:fe,popupData:Pe}){var l,t,a,r;const D={text:"",color:"#0088CC",size:18,bordercolor:"#822661",yanchor:"above"},[E,e]=Vn.useState(D),[_,w]=Vn.useState(D);Pe&&Pe!==E&&Pe.annotation&&(Pe.annotation=(Pe==null?void 0:Pe.annotation)||{},e(Pe),w(Pe));function s(){console.log("closing"),e(D),w(D),F()}function T(n){console.log(n.target.id.replace("addtext_",""),n.target.value);const o=n.target.id.replace("addtext_",""),i=n.target.type==="checkbox"?n.target.checked?1:0:n.target.value;w({..._,[o]:i})}function m(){if(console.log("submitting",_),_.text!==""){let n=["above",1].includes(_.yanchor);_.yanchor=n?"above":"below",E!=null&&E.annotation&&w({..._,annotation:E.annotation}),J(_),F()}else document.getElementById("popup_textarea_warning").style.display="block",document.getElementById("addtext_text").style.border="1px solid red"}function f(){fe(E),s()}return Ar(ey,{title:"Add Text to Chart",description:"Change the titles on the chart.",open:O,close:s,children:ti("div",{id:"popup_title",className:"popup_content",children:[ti("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[ti("div",{style:{marginBottom:20},children:[ti("label",{htmlFor:"popup_text",children:[Ar("b",{children:"Text:"}),Ar("div",{id:"popup_textarea_warning",className:"popup_warning",children:"Text is required"})]}),Ar("textarea",{id:"addtext_text",style:{...Bb,width:"100%",maxWidth:"100%",maxHeight:"200px",marginTop:"8px"},rows:4,cols:50,placeholder:"Enter text here",onChange:T,defaultValue:((l=E==null?void 0:E.annotation)==null?void 0:l.text)||(_==null?void 0:_.text)})]}),ti("div",{style:{display:"flex",justifyContent:"space-between"},children:[ti("div",{children:[Ar("label",{htmlFor:"addtext_color",children:Ar("b",{children:"Font color:"})}),Ar("input",{type:"color",id:"addtext_color",defaultValue:((t=E==null?void 0:E.annotation)==null?void 0:t.color)||(_==null?void 0:_.color),onChange:T})]}),ti("div",{children:[Ar("label",{htmlFor:"addtext_bordercolor",children:Ar("b",{children:"Border color:"})}),Ar("input",{type:"color",id:"addtext_bordercolor",defaultValue:((a=E==null?void 0:E.annotation)==null?void 0:a.bordercolor)||(_==null?void 0:_.bordercolor),onChange:T})]})]}),ti("div",{style:{display:"flex",justifyContent:"space-between"},children:[ti("div",{children:[Ar("label",{htmlFor:"addtext_size",children:Ar("b",{children:"Font size:"})}),Ar("input",{style:{...Bb,width:"45px"},type:"number",id:"addtext_size",onChange:T,defaultValue:((r=E==null?void 0:E.annotation)==null?void 0:r.size)||(_==null?void 0:_.size)})]}),ti("div",{children:[Ar("label",{htmlFor:"addtext_yanchor",children:Ar("b",{children:"Position (Above):"})}),Ar("input",{type:"checkbox",id:"addtext_yanchor",name:"check",defaultChecked:(_==null?void 0:_.yanchor)==="above",onChange:T})]})]})]}),ti("div",{style:{float:"right",marginTop:20},children:[Ar("button",{className:"_btn-tertiary ph-capture",id:"title_cancel",onClick:s,children:"Cancel"}),Ar("button",{className:"_btn ph-capture",id:"title_delete",onClick:f,children:"Delete"}),Ar("button",{className:"_btn ph-capture",id:"title_submit",onClick:m,children:"Submit"})]})]})})}function N7({plotData:O,popup_data:F,current_text:J}){var _;let fe=F.x,Pe=F.y,D=F.yref,E=((_=O==null?void 0:O.layout)==null?void 0:_.annotations)||[],e=-1;for(let w=0;wi!=null)),O.layout.dragmode="pan",J({...O,...t.update}),_.removeAllListeners("plotly_click")};F.text=F.text.replace(/\n/g,"
");let s;if(F.annotation){console.log("data",F),s={x:F.annotation.x,y:F.annotation.y,yref:F.annotation.yref,yanchor:F.annotation.ym!=null)),O.layout.dragmode="pan",J({...O,...T.update}),Pe({});return}_.on("plotly_clickannotation",T=>{console.log("plotly_clickannotation",T);let m=T.annotation;if(m.text==null){console.log("annotation.text is undefined");return}console.log("annotation.text",m.text),m.text=m.text.replace(/
/g,` -`);let f={x:m.x,y:m.y,yanchor:m.y'),!0):F?O.some(function(J){return F.includes(J)})||O.includes("*"):!0}var Y7=function(F,J,fe){fe===void 0&&(fe=!1);var Pe=J.alt,D=J.meta,E=J.mod,e=J.shift,_=J.ctrl,w=J.keys,s=F.key,T=F.code,m=F.ctrlKey,f=F.metaKey,l=F.shiftKey,t=F.altKey,a=sc(T),r=s.toLowerCase();if(!fe){if(Pe===!t&&r!=="alt"||e===!l&&r!=="shift")return!1;if(E){if(!f&&!m)return!1}else if(D===!f&&r!=="meta"&&r!=="os"||_===!m&&r!=="ctrl"&&r!=="control")return!1}return w&&w.length===1&&(w.includes(r)||w.includes(a))?!0:w?H7(w):!w},X7=Vn.createContext(void 0),$7=function(){return Vn.useContext(X7)};function Nw(O,F){return O&&F&&typeof O=="object"&&typeof F=="object"?Object.keys(O).length===Object.keys(F).length&&Object.keys(O).reduce(function(J,fe){return J&&Nw(O[fe],F[fe])},!0):O===F}var J7=Vn.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),K7=function(){return Vn.useContext(J7)};function Q7(O){var F=Vn.useRef(void 0);return Nw(F.current,O)||(F.current=O),F.current}var jb=function(F){F.stopPropagation(),F.preventDefault(),F.stopImmediatePropagation()},e9=typeof window<"u"?Vn.useLayoutEffect:Vn.useEffect;function Ku(O,F,J,fe){var Pe=Vn.useRef(null),D=Vn.useRef(!1),E=J instanceof Array?fe instanceof Array?void 0:fe:J,e=O instanceof Array?O.join(E==null?void 0:E.splitKey):O,_=J instanceof Array?J:fe instanceof Array?fe:void 0,w=Vn.useCallback(F,_??[]),s=Vn.useRef(w);_?s.current=w:s.current=F;var T=Q7(E),m=K7(),f=m.enabledScopes,l=$7();return e9(function(){if(!((T==null?void 0:T.enabled)===!1||!Z7(f,T==null?void 0:T.scopes))){var t=function(i,u){var p;if(u===void 0&&(u=!1),!(W7(i)&&!Bw(i,T==null?void 0:T.enableOnFormTags))&&!(T!=null&&T.ignoreEventWhen!=null&&T.ignoreEventWhen(i))){if(Pe.current!==null&&document.activeElement!==Pe.current&&!Pe.current.contains(document.activeElement)){jb(i);return}(p=i.target)!=null&&p.isContentEditable&&!(T!=null&&T.enableOnContentEditable)||Fg(e,T==null?void 0:T.splitKey).forEach(function(c){var b,d=Bg(c,T==null?void 0:T.combinationKey);if(Y7(i,d,T==null?void 0:T.ignoreModifiers)||(b=d.keys)!=null&&b.includes("*")){if(u&&D.current)return;if(q7(i,d,T==null?void 0:T.preventDefault),!G7(i,d,T==null?void 0:T.enabled)){jb(i);return}s.current(i,d),u||(D.current=!0)}})}},a=function(i){i.key!==void 0&&(Dw(sc(i.code)),((T==null?void 0:T.keydown)===void 0&&(T==null?void 0:T.keyup)!==!0||T!=null&&T.keydown)&&t(i))},r=function(i){i.key!==void 0&&(Fw(sc(i.code)),D.current=!1,T!=null&&T.keyup&&t(i,!0))},n=Pe.current||(E==null?void 0:E.document)||document;return n.addEventListener("keyup",r),n.addEventListener("keydown",a),l&&Fg(e,T==null?void 0:T.splitKey).forEach(function(o){return l.addHotkey(Bg(o,T==null?void 0:T.combinationKey,T==null?void 0:T.description))}),function(){n.removeEventListener("keyup",r),n.removeEventListener("keydown",a),l&&Fg(e,T==null?void 0:T.splitKey).forEach(function(o){return l.removeHotkey(Bg(o,T==null?void 0:T.combinationKey,T==null?void 0:T.description))})}}},[e,T,f]),Pe}var jw={exports:{}};(function(O){(function(F){var J=o(),fe=i(),Pe=u(),D=p(),E={imagePlaceholder:void 0,cacheBust:!1},e={toSvg:_,toPng:s,toJpeg:T,toBlob:m,toPixelData:w,impl:{fontFaces:Pe,images:D,util:J,inliner:fe,options:{}}};O.exports=e;function _(c,b){return b=b||{},f(b),Promise.resolve(c).then(function(v){return t(v,b.filter,!0)}).then(a).then(r).then(d).then(function(v){return n(v,b.width||J.width(c),b.height||J.height(c))});function d(v){return b.bgcolor&&(v.style.backgroundColor=b.bgcolor),b.width&&(v.style.width=b.width+"px"),b.height&&(v.style.height=b.height+"px"),b.style&&Object.keys(b.style).forEach(function(x){v.style[x]=b.style[x]}),v}}function w(c,b){return l(c,b||{}).then(function(d){return d.getContext("2d").getImageData(0,0,J.width(c),J.height(c)).data})}function s(c,b){return l(c,b||{}).then(function(d){return d.toDataURL()})}function T(c,b){return b=b||{},l(c,b).then(function(d){return d.toDataURL("image/jpeg",b.quality||1)})}function m(c,b){return l(c,b||{}).then(J.canvasToBlob)}function f(c){typeof c.imagePlaceholder>"u"?e.impl.options.imagePlaceholder=E.imagePlaceholder:e.impl.options.imagePlaceholder=c.imagePlaceholder,typeof c.cacheBust>"u"?e.impl.options.cacheBust=E.cacheBust:e.impl.options.cacheBust=c.cacheBust}function l(c,b){return _(c,b).then(J.makeImage).then(J.delay(100)).then(function(v){var x=d(c);return x.getContext("2d").drawImage(v,0,0),x});function d(v){var x=document.createElement("canvas");if(x.width=b.width||J.width(v),x.height=b.height||J.height(v),b.bgcolor){var g=x.getContext("2d");g.fillStyle=b.bgcolor,g.fillRect(0,0,x.width,x.height)}return x}}function t(c,b,d){if(!d&&b&&!b(c))return Promise.resolve();return Promise.resolve(c).then(v).then(function(y){return x(c,y,b)}).then(function(y){return g(c,y)});function v(y){return y instanceof HTMLCanvasElement?J.makeImage(y.toDataURL()):y.cloneNode(!1)}function x(y,k,h){var M=y.childNodes;if(M.length===0)return Promise.resolve(k);return A(k,J.asArray(M),h).then(function(){return k});function A(C,L,P){var I=Promise.resolve();return L.forEach(function(R){I=I.then(function(){return t(R,P)}).then(function(U){U&&C.appendChild(U)})}),I}}function g(y,k){if(!(k instanceof Element))return k;return Promise.resolve().then(h).then(M).then(A).then(C).then(function(){return k});function h(){L(window.getComputedStyle(y),k.style);function L(P,I){P.cssText?I.cssText=P.cssText:R(P,I);function R(U,B){J.asArray(U).forEach(function(G){B.setProperty(G,U.getPropertyValue(G),U.getPropertyPriority(G))})}}}function M(){[":before",":after"].forEach(function(P){L(P)});function L(P){var I=window.getComputedStyle(y,P),R=I.getPropertyValue("content");if(R===""||R==="none")return;var U=J.uid();k.className=k.className+" "+U;var B=document.createElement("style");B.appendChild(G(U,P,I)),k.appendChild(B);function G(N,j,V){var H="."+N+":"+j,ee=V.cssText?Q(V):X(V);return document.createTextNode(H+"{"+ee+"}");function Q(Y){var K=Y.getPropertyValue("content");return Y.cssText+" content: "+K+";"}function X(Y){return J.asArray(Y).map(K).join("; ")+";";function K(te){return te+": "+Y.getPropertyValue(te)+(Y.getPropertyPriority(te)?" !important":"")}}}}}function A(){y instanceof HTMLTextAreaElement&&(k.innerHTML=y.value),y instanceof HTMLInputElement&&k.setAttribute("value",y.value)}function C(){k instanceof SVGElement&&(k.setAttribute("xmlns","http://www.w3.org/2000/svg"),k instanceof SVGRectElement&&["width","height"].forEach(function(L){var P=k.getAttribute(L);P&&k.style.setProperty(L,P)}))}}}function a(c){return Pe.resolveAll().then(function(b){var d=document.createElement("style");return c.appendChild(d),d.appendChild(document.createTextNode(b)),c})}function r(c){return D.inlineAll(c).then(function(){return c})}function n(c,b,d){return Promise.resolve(c).then(function(v){return v.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(v)}).then(J.escapeXhtml).then(function(v){return''+v+""}).then(function(v){return''+v+""}).then(function(v){return"data:image/svg+xml;charset=utf-8,"+v})}function o(){return{escape:C,parseExtension:b,mimeType:d,dataAsUrl:A,isDataUrl:v,canvasToBlob:g,resolveUrl:y,getAndEncode:M,uid:k(),delay:L,asArray:P,escapeXhtml:I,makeImage:h,width:R,height:U};function c(){var G="application/font-woff",N="image/jpeg";return{woff:G,woff2:G,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:N,jpeg:N,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"}}function b(G){var N=/\.([^\.\/]*?)$/g.exec(G);return N?N[1]:""}function d(G){var N=b(G).toLowerCase();return c()[N]||""}function v(G){return G.search(/^(data:)/)!==-1}function x(G){return new Promise(function(N){for(var j=window.atob(G.toDataURL().split(",")[1]),V=j.length,H=new Uint8Array(V),ee=0;eeMath.abs(i)?"h":"v";if("touches"in t&&c==="h"&&p.type==="range")return!1;var b=Ob(c,p);if(!b)return!0;if(b?u=c:(u=c==="v"?"h":"v",b=Ob(c,p)),!b)return!1;if(!fe.current&&"changedTouches"in t&&(o||i)&&(fe.current=u),!u)return!0;var d=fe.current||u;return i7(d,a,t,d==="h"?o:i,!0)},[]),_=Un.useCallback(function(t){var a=t;if(!(!Df.length||Df[Df.length-1]!==D)){var r="deltaY"in a?Ib(a):Qd(a),n=F.current.filter(function(u){return u.name===a.type&&u.target===a.target&&a7(u.delta,r)})[0];if(n&&n.should){a.cancelable&&a.preventDefault();return}if(!n){var o=(E.current.shards||[]).map(Rb).filter(Boolean).filter(function(u){return u.contains(a.target)}),i=o.length>0?e(a,o[0]):!E.current.noIsolation;i&&a.cancelable&&a.preventDefault()}}},[]),w=Un.useCallback(function(t,a,r,n){var o={name:t,delta:a,target:r,should:n};F.current.push(o),setTimeout(function(){F.current=F.current.filter(function(i){return i!==o})},1)},[]),s=Un.useCallback(function(t){J.current=Qd(t),fe.current=void 0},[]),T=Un.useCallback(function(t){w(t.type,Ib(t),t.target,e(t,O.lockRef.current))},[]),m=Un.useCallback(function(t){w(t.type,Qd(t),t.target,e(t,O.lockRef.current))},[]);Un.useEffect(function(){return Df.push(D),O.setCallbacks({onScrollCapture:T,onWheelCapture:T,onTouchMoveCapture:m}),document.addEventListener("wheel",_,zf),document.addEventListener("touchmove",_,zf),document.addEventListener("touchstart",s,zf),function(){Df=Df.filter(function(t){return t!==D}),document.removeEventListener("wheel",_,zf),document.removeEventListener("touchmove",_,zf),document.removeEventListener("touchstart",s,zf)}},[]);var f=O.removeScrollBar,l=O.inert;return Un.createElement(Un.Fragment,null,l?Un.createElement(D,{styles:o7(Pe)}):null,f?Un.createElement(Jk,{gapMode:"margin"}):null)}const u7=Nk(ww,l7);var Sw=Un.forwardRef(function(O,F){return Un.createElement(f1,iu({},O,{ref:F,sideCar:u7}))});Sw.classNames=f1.classNames;const c7=Sw;var f7=function(O){if(typeof document>"u")return null;var F=Array.isArray(O)?O[0]:O;return F.ownerDocument.body},Ff=new WeakMap,e0=new WeakMap,t0={},Dg=0,Ew=function(O){return O&&(O.host||Ew(O.parentNode))},h7=function(O,F){return F.map(function(J){if(O.contains(J))return J;var fe=Ew(J);return fe&&O.contains(fe)?fe:(console.error("aria-hidden",J,"in not contained inside",O,". Doing nothing"),null)}).filter(function(J){return!!J})},p7=function(O,F,J,fe){var Pe=h7(F,Array.isArray(O)?O:[O]);t0[J]||(t0[J]=new WeakMap);var D=t0[J],E=[],e=new Set,_=new Set(Pe),w=function(T){!T||e.has(T)||(e.add(T),w(T.parentNode))};Pe.forEach(w);var s=function(T){!T||_.has(T)||Array.prototype.forEach.call(T.children,function(m){if(e.has(m))s(m);else{var f=m.getAttribute(fe),l=f!==null&&f!=="false",t=(Ff.get(m)||0)+1,a=(D.get(m)||0)+1;Ff.set(m,t),D.set(m,a),E.push(m),t===1&&l&&e0.set(m,!0),a===1&&m.setAttribute(J,"true"),l||m.setAttribute(fe,"true")}})};return s(F),e.clear(),Dg++,function(){E.forEach(function(T){var m=Ff.get(T)-1,f=D.get(T)-1;Ff.set(T,m),D.set(T,f),m||(e0.has(T)||T.removeAttribute(fe),e0.delete(T)),f||T.removeAttribute(J)}),Dg--,Dg||(Ff=new WeakMap,Ff=new WeakMap,e0=new WeakMap,t0={})}},d7=function(O,F,J){J===void 0&&(J="data-aria-hidden");var fe=Array.from(Array.isArray(O)?O:[O]),Pe=F||f7(O);return Pe?(fe.push.apply(fe,Array.from(Pe.querySelectorAll("[aria-live]"))),p7(fe,Pe,J,"aria-hidden")):function(){return null}};const Cw="Dialog",[Lw,d9]=nk(Cw),[g7,ju]=Lw(Cw),v7=O=>{const{__scopeDialog:F,children:J,open:fe,defaultOpen:Pe,onOpenChange:D,modal:E=!0}=O,e=Un.useRef(null),_=Un.useRef(null),[w=!1,s]=ok({prop:fe,defaultProp:Pe,onChange:D});return Un.createElement(g7,{scope:F,triggerRef:e,contentRef:_,contentId:Lg(),titleId:Lg(),descriptionId:Lg(),open:w,onOpenChange:s,onOpenToggle:Un.useCallback(()=>s(T=>!T),[s]),modal:E},J)},m7="DialogPortal",[g9,Pw]=Lw(m7,{forceMount:void 0}),qv="DialogOverlay",y7=Un.forwardRef((O,F)=>{const J=Pw(qv,O.__scopeDialog),{forceMount:fe=J.forceMount,...Pe}=O,D=ju(qv,O.__scopeDialog);return D.modal?Un.createElement(Qm,{present:fe||D.open},Un.createElement(x7,Io({},Pe,{ref:F}))):null}),x7=Un.forwardRef((O,F)=>{const{__scopeDialog:J,...fe}=O,Pe=ju(qv,J);return Un.createElement(c7,{as:Km,allowPinchZoom:!0,shards:[Pe.contentRef]},Un.createElement(gh.div,Io({"data-state":Iw(Pe.open)},fe,{ref:F,style:{pointerEvents:"auto",...fe.style}})))}),Fp="DialogContent",b7=Un.forwardRef((O,F)=>{const J=Pw(Fp,O.__scopeDialog),{forceMount:fe=J.forceMount,...Pe}=O,D=ju(Fp,O.__scopeDialog);return Un.createElement(Qm,{present:fe||D.open},D.modal?Un.createElement(_7,Io({},Pe,{ref:F})):Un.createElement(w7,Io({},Pe,{ref:F})))}),_7=Un.forwardRef((O,F)=>{const J=ju(Fp,O.__scopeDialog),fe=Un.useRef(null),Pe=Yp(F,J.contentRef,fe);return Un.useEffect(()=>{const D=fe.current;if(D)return d7(D)},[]),Un.createElement(Ow,Io({},O,{ref:Pe,trapFocus:J.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:rf(O.onCloseAutoFocus,D=>{var E;D.preventDefault(),(E=J.triggerRef.current)===null||E===void 0||E.focus()}),onPointerDownOutside:rf(O.onPointerDownOutside,D=>{const E=D.detail.originalEvent,e=E.button===0&&E.ctrlKey===!0;(E.button===2||e)&&D.preventDefault()}),onFocusOutside:rf(O.onFocusOutside,D=>D.preventDefault())}))}),w7=Un.forwardRef((O,F)=>{const J=ju(Fp,O.__scopeDialog),fe=Un.useRef(!1);return Un.createElement(Ow,Io({},O,{ref:F,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:Pe=>{var D;if((D=O.onCloseAutoFocus)===null||D===void 0||D.call(O,Pe),!Pe.defaultPrevented){var E;fe.current||(E=J.triggerRef.current)===null||E===void 0||E.focus(),Pe.preventDefault()}fe.current=!1},onInteractOutside:Pe=>{var D,E;(D=O.onInteractOutside)===null||D===void 0||D.call(O,Pe),Pe.defaultPrevented||(fe.current=!0);const e=Pe.target;((E=J.triggerRef.current)===null||E===void 0?void 0:E.contains(e))&&Pe.preventDefault()}}))}),Ow=Un.forwardRef((O,F)=>{const{__scopeDialog:J,trapFocus:fe,onOpenAutoFocus:Pe,onCloseAutoFocus:D,...E}=O,e=ju(Fp,J),_=Un.useRef(null),w=Yp(F,_);return Ck(),Un.createElement(Un.Fragment,null,Un.createElement(bk,{asChild:!0,loop:!0,trapped:fe,onMountAutoFocus:Pe,onUnmountAutoFocus:D},Un.createElement(mk,Io({role:"dialog",id:e.contentId,"aria-describedby":e.descriptionId,"aria-labelledby":e.titleId,"data-state":Iw(e.open)},E,{ref:w,onDismiss:()=>e.onOpenChange(!1)}))),!1)}),T7="DialogTitle",k7=Un.forwardRef((O,F)=>{const{__scopeDialog:J,...fe}=O,Pe=ju(T7,J);return Un.createElement(gh.h2,Io({id:Pe.titleId},fe,{ref:F}))}),A7="DialogDescription",M7=Un.forwardRef((O,F)=>{const{__scopeDialog:J,...fe}=O,Pe=ju(A7,J);return Un.createElement(gh.p,Io({id:Pe.descriptionId},fe,{ref:F}))}),S7="DialogClose",E7=Un.forwardRef((O,F)=>{const{__scopeDialog:J,...fe}=O,Pe=ju(S7,J);return Un.createElement(gh.button,Io({type:"button"},fe,{ref:F,onClick:rf(O.onClick,()=>Pe.onOpenChange(!1))}))});function Iw(O){return O?"open":"closed"}const C7=v7,L7=y7,P7=b7,O7=k7,I7=M7,zb=E7,Db=({title:O,titleId:F,...J})=>Ar("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,...J,children:Ar("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),Rw={margin:"2px 0px 2px 10px",padding:"5px 2px 2px 5px"};function ey({open:O,close:F,title:J,description:fe,children:Pe}){return ti(C7,{open:O,onOpenChange:F,children:[ti("div",{id:"loading",className:"saving",children:[Ar("div",{id:"loading_text",className:"loading_text"}),Ar("div",{id:"loader",className:"loader"})]}),Ar(L7,{onClick:F,className:"_modal-overlay"}),ti(P7,{className:"_modal",children:[Ar(O7,{className:"_modal-title",children:J}),Ar(I7,{className:"_modal_description",children:fe}),Ar(zb,{children:Ar(Db,{})}),Pe,Ar(zb,{className:"_modal-close",onClick:F,children:Ar(Db,{className:"w-6 h-6"})})]})]})}const Fb=new FileReader,R7={overlaying:"y",side:"left",tickfont:{size:12},tickpadding:5,showgrid:!1,showline:!1,showticklabels:!0,showlegend:!0,zeroline:!1,anchor:"x",type:"linear",autorange:!0};function z7({open:O,close:F,setLoading:J,addOverlay:fe,plotlyData:Pe}){const[D,E]=Un.useState("scatter"),[e,_]=Un.useState("#FFDD00"),[w,s]=Un.useState("#00ACFF"),[T,m]=Un.useState("#FF0000"),[f,l]=Un.useState(""),[t,a]=Un.useState([]),[r,n]=Un.useState([]),[o,i]=Un.useState({}),[u,p]=Un.useState({}),c=["x","open","high","low","close"];let b={scatter:"Scatter (Line)",candlestick:"Candlestick",bar:"Bar"};const[d,v]=Un.useState({});function x(){F(),E("scatter"),l(""),a([]),n([]),i({}),v({})}function g(){var k,h;if(t.length==0){(k=document.getElementById("csv_file"))==null||k.focus(),(h=document.getElementById("csv_file"))==null||h.style.setProperty("border","1px solid red"),document.getElementById("csv_file_warning").style.display="block";return}const y=D7({csvData:t,plotlyData:Pe,yaxisOptions:u,traceType:D,traceColor:e,traceName:f,options:d,increasingColor:w,decreasingColor:T});fe(y),x()}return Ar(ey,{title:"Overlay Chart",description:"Upload a CSV file to overlay a chart on the main chart.",open:O,close:F,children:ti("div",{id:"popup_csv",className:"popup_content",children:[ti("div",{children:[ti("label",{htmlFor:"csv_file",children:[Ar("b",{children:"CSV file:"}),Ar("div",{id:"csv_file_warning",className:"popup_warning",style:{marginLeft:"80px",marginBottom:"10px"},children:"CSV file is required."})]}),Ar("input",{onChange:y=>{var k,h;if(y.target.files){if(y.target.files[0].type!=="text/csv"){(k=document.getElementById("csv_file"))==null||k.focus(),(h=document.getElementById("csv_file"))==null||h.style.setProperty("border","1px solid red"),document.getElementById("csv_file_warning").style.display="block";return}}else return;r.length>0&&(n([]),i({}),v({}),E("scatter")),Fb.onload=M=>{var G;if(!((G=M.target)!=null&&G.result)||typeof M.target.result!="string")return;let A=M.target.result.split(` +`).map(N=>N.replace(/\r/g,""));const C=A[0].split(","),L=C.map(N=>N.trim().toLowerCase());let P={};for(let N=0;NL.includes(N))&&E("candlestick"),L.includes("close")&&(v({...d,y:C[L.indexOf("close")]}),P.y=C[L.indexOf("close")]);let U=[];for(let N=1;N2&&(j.test(N[0])?N.splice(0,2):j.test(N[N.length-2])&&N.splice(N.length-2,2),B=N.join("_").replace(/openbb_/g,""))}}catch(N){console.log(N)}l(B),v(P),n(C),a(U)},Fb.readAsText(y.target.files[0])},type:"file",id:"csv_file",accept:".csv",style:{marginLeft:10}})]}),ti("div",{style:{marginTop:15},children:[Ar("label",{htmlFor:"csv_trace_type",children:Ar("b",{children:"Display data type:"})}),ti("select",{onChange:y=>{E(y.target.value)},id:"csv_trace_type",style:Rw,defaultValue:b[D],children:[D&&Ar("option",{value:D,children:b[D]},D),Object.keys(b).map(y=>D!==y&&Ar("option",{value:y,children:b[y]},y))]})]}),ti("div",{style:{marginTop:12},children:[Ar("label",{htmlFor:"csv_name",children:Ar("b",{children:"Trace Name:"})}),Ar("textarea",{id:"csv_name",value:f,onChange:y=>{l(y.target.value)},style:{padding:"5px 2px 2px 5px",width:"100%",maxWidth:"100%",maxHeight:200,marginTop:2},rows:2,cols:20,placeholder:"Enter a name to give this trace"})]}),r.length>0&&ti(eg,{children:[["scatter","bar"].includes(D)&&Ar("div",{style:{marginTop:15,marginBottom:10},id:"csv_columns",className:"csv_column_container",children:["x","y"].map(y=>ti("div",{style:{marginTop:10,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[ti("label",{htmlFor:`csv_${y}`,style:{width:"100px"},children:[y.toUpperCase()," Axis"]}),ti("select",{onChange:k=>{i({...o,[y]:k.target.value}),v({...d,[y]:k.target.value})},id:`csv_${y}`,style:{width:"100%"},defaultValue:d[y],children:[d[y]&&Ar("option",{value:d[y],children:d[y]},y),r.map(k=>Ar("option",{value:k,children:k},k))]})]},y))}),D==="candlestick"&&Ar("div",{id:"csv_columns",className:"csv_column_container",style:{marginTop:15},children:["x","open","high","low","close"].map(y=>ti("div",{style:{marginTop:10,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[Ar("label",{htmlFor:`csv_${y}`,style:{width:"100px"},children:y.charAt(0).toUpperCase()+y.slice(1)}),ti("select",{onChange:k=>{i({...o,[y]:k.target.value}),v({...d,[y]:k.target.value})},id:`csv_${y}`,style:{width:"100%"},children:[d[y]&&Ar("option",{value:d[y],children:d[y]},y),r.map(k=>k!=d[k]&&Ar("option",{value:k,children:k},k))]})]},y))}),ti("div",{style:{marginTop:20},id:"csv_colors",children:[["scatter","bar"].includes(D)&&ti("div",{children:[Ar("label",{htmlFor:"csv_color",children:`${D.charAt(0).toUpperCase()}${D.slice(1)} color`}),Ar("input",{type:"color",id:"csv_color",defaultValue:"#FFDD00",style:{margin:"2px 2px 2px 10px"},onChange:y=>{console.log(y.target.value),_(y.target.value)}})]}),D==="candlestick"&&ti(eg,{children:[Ar("label",{htmlFor:"csv_increasing",children:"Increasing color"}),Ar("input",{type:"color",id:"csv_increasing",defaultValue:"#00ACFF",style:{margin:"2px 0px 2px 10px"},onChange:y=>{s(y.target.value)}}),Ar("label",{htmlFor:"csv_decreasing",style:{marginLeft:15},children:"Decreasing color"}),Ar("input",{style:{margin:"2px 0px 2px 10px"},type:"color",id:"csv_decreasing",defaultValue:"#FF0000",onChange:y=>{m(y.target.value)}})]})]}),ti("div",{style:{marginTop:20},id:"csv_plot_yaxis_options",children:[D!=="candlestick"&&ti(eg,{children:[Ar("input",{type:"checkbox",id:"csv_percent_change",name:"csv_plot_yaxis_check",style:{marginBottom:2},onChange:y=>{p({...u,percentChange:y.target.checked,sameYaxis:!1})},checked:!u.sameYaxis&&u.percentChange}),Ar("label",{htmlFor:"csv_percent_change",style:{marginLeft:5},children:"Plot as percent change from first value"}),Ar("br",{})]}),Ar("input",{style:{marginTop:2},type:"checkbox",id:"csv_same_yaxis",name:"csv_plot_yaxis_check",onChange:y=>{p({...u,sameYaxis:y.target.checked,percentChange:!1})},checked:!u.percentChange&&u.sameYaxis}),Ar("label",{htmlFor:"csv_same_yaxis",style:{marginLeft:5},children:"Share Y-axis"}),D==="bar"&&ti("div",{style:{marginTop:2},id:"csv_bar_orientation",children:[Ar("input",{type:"checkbox",id:"csv_bar_horizontal",onChange:y=>{v({...d,orientation:y.target.checked?"h":"v"})}}),Ar("label",{htmlFor:"csv_bar_horizontal",style:{marginLeft:5},children:"Plot horizontally"})]})]})]}),Ar("br",{}),ti("div",{style:{float:"right",marginTop:20},children:[Ar("button",{className:"_btn-tertiary",id:"csv_cancel",onClick:x,children:"Cancel"}),Ar("button",{className:"_btn",id:"csv_submit",onClick:g,children:"Submit"})]})]})})}function D7({csvData:O,plotlyData:F,yaxisOptions:J,traceType:fe,traceColor:Pe,traceName:D,options:E,increasingColor:e,decreasingColor:_}){let w=F.data[0];w.xaxis==null&&(w.xaxis="x"),w.yaxis==null&&(w.yaxis="y");let s=w.yaxis,T,f=Object.keys(F.layout).filter(r=>r.startsWith("yaxis")).map(r=>F.layout[r]).filter(r=>r.side=="left"&&(r.overlaying=="y"||r.fixedrange!=null&&r.fixedrange==!0)).length>0?" ":"";if(J.sameYaxis!==!0){const r=Object.keys(F.layout).filter(n=>n.startsWith("yaxis")).map(n=>F.layout[n]);T=`y${r.length+1}`,s=`yaxis${r.length+1}`,console.log(`yaxis: ${T} ${s}`),F.layout[s]={...R7,title:{text:D,font:{size:14},standoff:0},ticksuffix:f,layer:"below traces"}}else T=w.yaxis.replace("yaxis","y");const l={type:fe,name:D,showlegend:!0,yaxis:T};let t={};if(["scatter","bar"].includes(fe)){const r=O.findIndex(n=>n[E.y]!=null&&n[E.y]!=0);t={...l,x:O.map(n=>n[E.x]),y:O.map(function(n){return J.percentChange&&fe==="scatter"?(n[E.y]-O[r][E.y])/O[r][E.y]:n[E.y]}),customdata:O.map(n=>n[E.y]),hovertemplate:"%{customdata:.2f}",connectgaps:!0,marker:{color:Pe}},fe==="bar"&&(t.orientation=E.orientation,t.marker.opacity=.7,delete t.connectgaps,delete t.hovertemplate,delete t.customdata)}else fe==="candlestick"&&(t={...l,x:O.map(r=>r[E.x]),open:O.map(r=>r[E.open]),high:O.map(r=>r[E.high]),low:O.map(r=>r[E.low]),close:O.map(r=>r[E.close]),increasing:{line:{color:e}},decreasing:{line:{color:_}}});return{...F,data:[...F.data,t]}}function F7({plotlyData:O,open:F,close:J,defaultTitle:fe,updateTitle:Pe,updateAxesTitles:D}){const[E,e]=Un.useState(fe),_=Object.keys(O.layout||{}).filter(m=>m.startsWith("yaxis")&&O.layout[m].range!=null),w=Object.keys(O.layout||{}).filter(m=>{var f;return m.startsWith("xaxis")&&O.layout[m].showticklabels!=null&&((f=O.layout[m])==null?void 0:f.anchor)}),[s,T]=Un.useState({});return Ar(ey,{title:"Chart Titles",description:"Change the titles on the chart.",open:F,close:J,children:ti("div",{id:"popup_title",className:"popup_content",children:[ti("div",{style:{display:"flex",flexDirection:"column",gap:0},children:[ti("div",{children:[Ar("label",{htmlFor:"title_text",children:Ar("b",{children:"Title:"})}),Ar("textarea",{id:"title_text",style:{...Rw,width:"100%",maxWidth:"100%",maxHeight:"200px",marginTop:"8px",marginLeft:"0px"},rows:2,cols:20,value:E,onChange:m=>e(m.target.value)})]}),Ar("div",{id:"xaxis_div",className:"csv_column_container",style:{marginTop:5,marginBottom:-5},children:w.map((m,f)=>{var l,t;return ti("div",{style:{marginTop:5,marginBottom:5},children:[Ar("label",{htmlFor:`title_${m}`,children:f===0?Ar("b",{children:"X axis:"}):ti("b",{children:["X axis ",f+1,":"]})}),Ar("input",{id:`title_${m}`,style:{marginLeft:"0px",padding:"5px 2px 2px 5px"},type:"text",defaultValue:((t=(l=O==null?void 0:O.layout[m])==null?void 0:l.title)==null?void 0:t.text)||"",onChange:a=>{T({...s,[m]:a.target.value})}})]},m)})}),Ar("div",{id:"yaxis_div",className:"csv_column_container",style:{marginTop:5,marginBottom:5},children:_.map((m,f)=>{var l,t;return ti("div",{style:{marginTop:10},children:[Ar("label",{htmlFor:`title_${m}`,children:f===0?Ar("b",{children:"Y axis:"}):ti("b",{children:["Y axis ",f+1,":"]})}),Ar("input",{id:`title_${m}`,style:{marginLeft:"0px",padding:"5px 2px 2px 5px"},type:"text",defaultValue:((t=(l=O==null?void 0:O.layout[m])==null?void 0:l.title)==null?void 0:t.text)||"",onChange:a=>{T({...s,[m]:a.target.value})}})]},m)})})]}),ti("div",{style:{float:"right",marginTop:20},children:[Ar("button",{className:"_btn-tertiary ph-capture",id:"title_cancel",onClick:J,children:"Cancel"}),Ar("button",{className:"_btn ph-capture",id:"title_submit",onClick:()=>{Pe(E),D(s),J()},children:"Submit"})]})]})})}const Bb={padding:"5px 2px 2px 5px",margin:"2px 0"};function B7({open:O,close:F,addAnnotation:J,deleteAnnotation:fe,popupData:Pe}){var l,t,a,r;const D={text:"",color:"#0088CC",size:18,bordercolor:"#822661",yanchor:"above"},[E,e]=Un.useState(D),[_,w]=Un.useState(D);Pe&&Pe!==E&&Pe.annotation&&(Pe.annotation=(Pe==null?void 0:Pe.annotation)||{},e(Pe),w(Pe));function s(){console.log("closing"),e(D),w(D),F()}function T(n){console.log(n.target.id.replace("addtext_",""),n.target.value);const o=n.target.id.replace("addtext_",""),i=n.target.type==="checkbox"?n.target.checked?1:0:n.target.value;w({..._,[o]:i})}function m(){if(console.log("submitting",_),_.text!==""){let n=["above",1].includes(_.yanchor);_.yanchor=n?"above":"below",E!=null&&E.annotation&&w({..._,annotation:E.annotation}),J(_),F()}else document.getElementById("popup_textarea_warning").style.display="block",document.getElementById("addtext_text").style.border="1px solid red"}function f(){fe(E),s()}return Ar(ey,{title:"Add Text to Chart",description:"Change the titles on the chart.",open:O,close:s,children:ti("div",{id:"popup_title",className:"popup_content",children:[ti("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[ti("div",{style:{marginBottom:20},children:[ti("label",{htmlFor:"popup_text",children:[Ar("b",{children:"Text:"}),Ar("div",{id:"popup_textarea_warning",className:"popup_warning",children:"Text is required"})]}),Ar("textarea",{id:"addtext_text",style:{...Bb,width:"100%",maxWidth:"100%",maxHeight:"200px",marginTop:"8px"},rows:4,cols:50,placeholder:"Enter text here",onChange:T,defaultValue:((l=E==null?void 0:E.annotation)==null?void 0:l.text)||(_==null?void 0:_.text)})]}),ti("div",{style:{display:"flex",justifyContent:"space-between"},children:[ti("div",{children:[Ar("label",{htmlFor:"addtext_color",children:Ar("b",{children:"Font color:"})}),Ar("input",{type:"color",id:"addtext_color",defaultValue:((t=E==null?void 0:E.annotation)==null?void 0:t.color)||(_==null?void 0:_.color),onChange:T})]}),ti("div",{children:[Ar("label",{htmlFor:"addtext_bordercolor",children:Ar("b",{children:"Border color:"})}),Ar("input",{type:"color",id:"addtext_bordercolor",defaultValue:((a=E==null?void 0:E.annotation)==null?void 0:a.bordercolor)||(_==null?void 0:_.bordercolor),onChange:T})]})]}),ti("div",{style:{display:"flex",justifyContent:"space-between"},children:[ti("div",{children:[Ar("label",{htmlFor:"addtext_size",children:Ar("b",{children:"Font size:"})}),Ar("input",{style:{...Bb,width:"45px"},type:"number",id:"addtext_size",onChange:T,defaultValue:((r=E==null?void 0:E.annotation)==null?void 0:r.size)||(_==null?void 0:_.size)})]}),ti("div",{children:[Ar("label",{htmlFor:"addtext_yanchor",children:Ar("b",{children:"Position (Above):"})}),Ar("input",{type:"checkbox",id:"addtext_yanchor",name:"check",defaultChecked:(_==null?void 0:_.yanchor)==="above",onChange:T})]})]})]}),ti("div",{style:{float:"right",marginTop:20},children:[Ar("button",{className:"_btn-tertiary ph-capture",id:"title_cancel",onClick:s,children:"Cancel"}),Ar("button",{className:"_btn ph-capture",id:"title_delete",onClick:f,children:"Delete"}),Ar("button",{className:"_btn ph-capture",id:"title_submit",onClick:m,children:"Submit"})]})]})})}function N7({plotData:O,popup_data:F,current_text:J}){var _;let fe=F.x,Pe=F.y,D=F.yref,E=((_=O==null?void 0:O.layout)==null?void 0:_.annotations)||[],e=-1;for(let w=0;wi!=null)),O.layout.dragmode="pan",J({...O,...t.update}),_.removeAllListeners("plotly_click")};F.text=F.text.replace(/\n/g,"
");let s;if(F.annotation){console.log("data",F),s={x:F.annotation.x,y:F.annotation.y,yref:F.annotation.yref,yanchor:F.annotation.ym!=null)),O.layout.dragmode="pan",J({...O,...T.update}),Pe({});return}_.on("plotly_clickannotation",T=>{console.log("plotly_clickannotation",T);let m=T.annotation;if(m.text==null){console.log("annotation.text is undefined");return}console.log("annotation.text",m.text),m.text=m.text.replace(/
/g,` +`);let f={x:m.x,y:m.y,yanchor:m.y'),!0):F?O.some(function(J){return F.includes(J)})||O.includes("*"):!0}var Y7=function(F,J,fe){fe===void 0&&(fe=!1);var Pe=J.alt,D=J.meta,E=J.mod,e=J.shift,_=J.ctrl,w=J.keys,s=F.key,T=F.code,m=F.ctrlKey,f=F.metaKey,l=F.shiftKey,t=F.altKey,a=sc(T),r=s.toLowerCase();if(!fe){if(Pe===!t&&r!=="alt"||e===!l&&r!=="shift")return!1;if(E){if(!f&&!m)return!1}else if(D===!f&&r!=="meta"&&r!=="os"||_===!m&&r!=="ctrl"&&r!=="control")return!1}return w&&w.length===1&&(w.includes(r)||w.includes(a))?!0:w?H7(w):!w},X7=Un.createContext(void 0),$7=function(){return Un.useContext(X7)};function Nw(O,F){return O&&F&&typeof O=="object"&&typeof F=="object"?Object.keys(O).length===Object.keys(F).length&&Object.keys(O).reduce(function(J,fe){return J&&Nw(O[fe],F[fe])},!0):O===F}var J7=Un.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),K7=function(){return Un.useContext(J7)};function Q7(O){var F=Un.useRef(void 0);return Nw(F.current,O)||(F.current=O),F.current}var jb=function(F){F.stopPropagation(),F.preventDefault(),F.stopImmediatePropagation()},e9=typeof window<"u"?Un.useLayoutEffect:Un.useEffect;function Ku(O,F,J,fe){var Pe=Un.useRef(null),D=Un.useRef(!1),E=J instanceof Array?fe instanceof Array?void 0:fe:J,e=O instanceof Array?O.join(E==null?void 0:E.splitKey):O,_=J instanceof Array?J:fe instanceof Array?fe:void 0,w=Un.useCallback(F,_??[]),s=Un.useRef(w);_?s.current=w:s.current=F;var T=Q7(E),m=K7(),f=m.enabledScopes,l=$7();return e9(function(){if(!((T==null?void 0:T.enabled)===!1||!Z7(f,T==null?void 0:T.scopes))){var t=function(i,u){var p;if(u===void 0&&(u=!1),!(W7(i)&&!Bw(i,T==null?void 0:T.enableOnFormTags))&&!(T!=null&&T.ignoreEventWhen!=null&&T.ignoreEventWhen(i))){if(Pe.current!==null&&document.activeElement!==Pe.current&&!Pe.current.contains(document.activeElement)){jb(i);return}(p=i.target)!=null&&p.isContentEditable&&!(T!=null&&T.enableOnContentEditable)||Fg(e,T==null?void 0:T.splitKey).forEach(function(c){var b,d=Bg(c,T==null?void 0:T.combinationKey);if(Y7(i,d,T==null?void 0:T.ignoreModifiers)||(b=d.keys)!=null&&b.includes("*")){if(u&&D.current)return;if(q7(i,d,T==null?void 0:T.preventDefault),!G7(i,d,T==null?void 0:T.enabled)){jb(i);return}s.current(i,d),u||(D.current=!0)}})}},a=function(i){i.key!==void 0&&(Dw(sc(i.code)),((T==null?void 0:T.keydown)===void 0&&(T==null?void 0:T.keyup)!==!0||T!=null&&T.keydown)&&t(i))},r=function(i){i.key!==void 0&&(Fw(sc(i.code)),D.current=!1,T!=null&&T.keyup&&t(i,!0))},n=Pe.current||(E==null?void 0:E.document)||document;return n.addEventListener("keyup",r),n.addEventListener("keydown",a),l&&Fg(e,T==null?void 0:T.splitKey).forEach(function(o){return l.addHotkey(Bg(o,T==null?void 0:T.combinationKey,T==null?void 0:T.description))}),function(){n.removeEventListener("keyup",r),n.removeEventListener("keydown",a),l&&Fg(e,T==null?void 0:T.splitKey).forEach(function(o){return l.removeHotkey(Bg(o,T==null?void 0:T.combinationKey,T==null?void 0:T.description))})}}},[e,T,f]),Pe}var jw={exports:{}};(function(O){(function(F){var J=o(),fe=i(),Pe=u(),D=p(),E={imagePlaceholder:void 0,cacheBust:!1},e={toSvg:_,toPng:s,toJpeg:T,toBlob:m,toPixelData:w,impl:{fontFaces:Pe,images:D,util:J,inliner:fe,options:{}}};O.exports=e;function _(c,b){return b=b||{},f(b),Promise.resolve(c).then(function(v){return t(v,b.filter,!0)}).then(a).then(r).then(d).then(function(v){return n(v,b.width||J.width(c),b.height||J.height(c))});function d(v){return b.bgcolor&&(v.style.backgroundColor=b.bgcolor),b.width&&(v.style.width=b.width+"px"),b.height&&(v.style.height=b.height+"px"),b.style&&Object.keys(b.style).forEach(function(x){v.style[x]=b.style[x]}),v}}function w(c,b){return l(c,b||{}).then(function(d){return d.getContext("2d").getImageData(0,0,J.width(c),J.height(c)).data})}function s(c,b){return l(c,b||{}).then(function(d){return d.toDataURL()})}function T(c,b){return b=b||{},l(c,b).then(function(d){return d.toDataURL("image/jpeg",b.quality||1)})}function m(c,b){return l(c,b||{}).then(J.canvasToBlob)}function f(c){typeof c.imagePlaceholder>"u"?e.impl.options.imagePlaceholder=E.imagePlaceholder:e.impl.options.imagePlaceholder=c.imagePlaceholder,typeof c.cacheBust>"u"?e.impl.options.cacheBust=E.cacheBust:e.impl.options.cacheBust=c.cacheBust}function l(c,b){return _(c,b).then(J.makeImage).then(J.delay(100)).then(function(v){var x=d(c);return x.getContext("2d").drawImage(v,0,0),x});function d(v){var x=document.createElement("canvas");if(x.width=b.width||J.width(v),x.height=b.height||J.height(v),b.bgcolor){var g=x.getContext("2d");g.fillStyle=b.bgcolor,g.fillRect(0,0,x.width,x.height)}return x}}function t(c,b,d){if(!d&&b&&!b(c))return Promise.resolve();return Promise.resolve(c).then(v).then(function(y){return x(c,y,b)}).then(function(y){return g(c,y)});function v(y){return y instanceof HTMLCanvasElement?J.makeImage(y.toDataURL()):y.cloneNode(!1)}function x(y,k,h){var M=y.childNodes;if(M.length===0)return Promise.resolve(k);return A(k,J.asArray(M),h).then(function(){return k});function A(C,L,P){var I=Promise.resolve();return L.forEach(function(R){I=I.then(function(){return t(R,P)}).then(function(U){U&&C.appendChild(U)})}),I}}function g(y,k){if(!(k instanceof Element))return k;return Promise.resolve().then(h).then(M).then(A).then(C).then(function(){return k});function h(){L(window.getComputedStyle(y),k.style);function L(P,I){P.cssText?I.cssText=P.cssText:R(P,I);function R(U,B){J.asArray(U).forEach(function(G){B.setProperty(G,U.getPropertyValue(G),U.getPropertyPriority(G))})}}}function M(){[":before",":after"].forEach(function(P){L(P)});function L(P){var I=window.getComputedStyle(y,P),R=I.getPropertyValue("content");if(R===""||R==="none")return;var U=J.uid();k.className=k.className+" "+U;var B=document.createElement("style");B.appendChild(G(U,P,I)),k.appendChild(B);function G(N,j,V){var H="."+N+":"+j,ee=V.cssText?Q(V):X(V);return document.createTextNode(H+"{"+ee+"}");function Q(Y){var K=Y.getPropertyValue("content");return Y.cssText+" content: "+K+";"}function X(Y){return J.asArray(Y).map(K).join("; ")+";";function K(te){return te+": "+Y.getPropertyValue(te)+(Y.getPropertyPriority(te)?" !important":"")}}}}}function A(){y instanceof HTMLTextAreaElement&&(k.innerHTML=y.value),y instanceof HTMLInputElement&&k.setAttribute("value",y.value)}function C(){k instanceof SVGElement&&(k.setAttribute("xmlns","http://www.w3.org/2000/svg"),k instanceof SVGRectElement&&["width","height"].forEach(function(L){var P=k.getAttribute(L);P&&k.style.setProperty(L,P)}))}}}function a(c){return Pe.resolveAll().then(function(b){var d=document.createElement("style");return c.appendChild(d),d.appendChild(document.createTextNode(b)),c})}function r(c){return D.inlineAll(c).then(function(){return c})}function n(c,b,d){return Promise.resolve(c).then(function(v){return v.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(v)}).then(J.escapeXhtml).then(function(v){return''+v+""}).then(function(v){return''+v+""}).then(function(v){return"data:image/svg+xml;charset=utf-8,"+v})}function o(){return{escape:C,parseExtension:b,mimeType:d,dataAsUrl:A,isDataUrl:v,canvasToBlob:g,resolveUrl:y,getAndEncode:M,uid:k(),delay:L,asArray:P,escapeXhtml:I,makeImage:h,width:R,height:U};function c(){var G="application/font-woff",N="image/jpeg";return{woff:G,woff2:G,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:N,jpeg:N,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"}}function b(G){var N=/\.([^\.\/]*?)$/g.exec(G);return N?N[1]:""}function d(G){var N=b(G).toLowerCase();return c()[N]||""}function v(G){return G.search(/^(data:)/)!==-1}function x(G){return new Promise(function(N){for(var j=window.atob(G.toDataURL().split(",")[1]),V=j.length,H=new Uint8Array(V),ee=0;ee{if(O)return r9({fileHandle:O,blob:F})},r9=async({fileHandle:O,blob:F})=>{const J=await O.createWritable();await J.write(F),await J.close()},i9=[{description:"PNG Image",accept:{"image/png":[".png"]}},{description:"JPEG Image",accept:{"image/jpeg":[".jpeg"]}},{description:"SVG Image",accept:{"image/svg+xml":[".svg"]}}],Vw=({filename:O,is_image:F})=>{if("showSaveFilePicker"in window){const J={suggestedName:O,types:F?i9:[{description:"CSV File",accept:{"image/csv":[".csv"]}}],excludeAcceptAllOption:!0};return showSaveFilePicker(J)}return new Promise(J=>{J(null)})},ty=(O,F,J)=>{try{if(J===null)throw new Error("Cannot access filesystem");return n9({fileHandle:J,blob:O})}catch(fe){console.error("oops, something went wrong!",fe);const Pe=URL.createObjectURL(O),D=document.createElement("a");D.setAttribute("href",Pe),D.setAttribute("download",F),D.style.visibility="hidden",document.body.appendChild(D),D.click(),document.body.removeChild(D)}return new Promise(fe=>{fe(!0)})};async function Ub(O){let F=O.data,J=[],fe=[],Pe="title"in O.layout.xaxis&&O.layout.xaxis.title.text!=null?O.layout.xaxis.title.text:"x";return"title"in O.layout.yaxis&&O.layout.yaxis.title.text!=null&&O.layout.yaxis.title.text,F.forEach(function(D){D.type=="candlestick"&&(J.length==0&&(J=["Date","Open","High","Low","Close"]),D.x.forEach(function(E,e){fe.push([E,D.open[e],D.high[e],D.low[e],D.close[e]])})),D.type=="scatter"&&(J.length==0&&J.push(Pe),J.push(D.name),D.x.forEach(function(E,e){fe[e]==null&&(fe[e]=[E]),fe[e].push(D.y[e])}))}),await a9(J,fe)}async function a9(O,F){const J=O,fe=F.map(_=>_.map(w=>w==null?"":typeof w=="object"?JSON.stringify(w):w.toString().replace(/"/g,'""'))),D=[J,...fe].map(_=>_.join(",")).join(` -`),E=new Blob([D],{type:"text/csv;charset=utf-8;"}),e=`${window.title}.csv`;try{let _=await Vw({filename:e}),w="png";_!==null&&(w=_.name.split(".").pop()),await Bp(`Saving ${w.toUpperCase()}`),Np(async function(){ty(E,e,_).then(async function(){await Bp("",!0)})},2)()}catch(_){console.error(_)}}function Bp(O,F){const J=window.document.getElementById("loading"),fe=window.document.getElementById("loading_text");return new Promise(Pe=>{F?J.classList.remove("show"):(fe.innerHTML=O,J.classList.add("show"));let D=setInterval(function(){(F?!J.classList.contains("show"):J.classList.contains("show"))&&(clearInterval(D),Pe(!0))},.1)})}const Np=(O,F)=>{let J;return function(){const fe=this,Pe=arguments;clearTimeout(J),J=setTimeout(()=>O.apply(fe,Pe),F)}},o9={yref:"paper",xref:"paper",x:1,y:0,text:"OpenBB Terminal",font_size:17,font_color:"gray",opacity:.5,xanchor:"right",yanchor:"bottom",yshift:-80,xshift:40};async function Vb(O,F,J=!1){const fe=document.getElementById("plotlyChart");J&&(fe.layout.annotations.push(o9),fe.globals.cmd_idx!=null&&fe.globals.cmd_src!=null&&(fe.layout.annotations[fe.globals.cmd_idx].text=fe.globals.cmd_src),Gs.relayout(fe,{"title.text":fe.globals.title,margin:fe.globals.old_margin})),J||(fe.globals.cmd_idx!=null&&fe.globals.cmd_src!=null&&(fe.layout.annotations[fe.globals.cmd_idx].text=""),fe.layout.annotations.splice(F,1),Gs.relayout(fe,{"title.text":"",margin:O}))}async function Hw(O,F,J){const fe=document.getElementById(O);if(["svg","pdf"].includes(J)){const Pe=document.getElementById("plotlyChart"),D=Pe.layout.margin,E=Pe.layout.annotations.length;await Vb(D,E,!0),Gs.downloadImage(Pe,{format:"svg",height:Pe.clientHeight,width:Pe.clientWidth,filename:window.title}),await Vb(D,E,!1),await Bp("",!0);return}Np(async function(){Uw.toBlob(fe).then(function(Pe){ty(Pe,F,null)})},2)()}async function Hb(O,F,J){const fe=document.getElementById(O),Pe=`${window.title}.png`;try{let D=await Vw({filename:Pe,is_image:!0}),E="png";if(D!==null&&(E=D.name.split(".").pop()),J(!0),await Bp(`Saving ${E.toUpperCase()}`),["svg","pdf"].includes(E)){await Hw(O,Pe,E),F(!1),J(!1);return}Np(async function(){Uw.toBlob(fe).then(function(e){ty(e,Pe,D).then(async function(){await Bp("",!0),F(!1)})})},2)(),J(!1)}catch(D){console.error(D),F(!1)}}function rc(O=!0){return new Promise(F=>{window.MODEBAR||(window.MODEBAR=window.document.getElementsByClassName("modebar-container")[0],window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:flex;`),window.MODEBAR&&(window.MODEBAR.style.cssText.includes("display: none")&&!O?window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:flex;`:window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:none;`,F(!0))})}function s9({setModal:O,changeTheme:F,autoScaling:J,Loading:fe,changeColor:Pe}){return Ku("ctrl+shift+t",()=>{O({modal:"titleDialog"})},{preventDefault:!0}),Ku("ctrl+t",()=>{O({modal:"textDialog"})},{preventDefault:!0}),Ku("ctrl+o",()=>{O({modal:"overlayChart"})},{preventDefault:!0}),Ku("ctrl+shift+h",()=>{rc()},{preventDefault:!0}),Ku("ctrl+e",()=>{Pe(!0)},{preventDefault:!0}),Ku("ctrl+shift+s",async()=>{O({modal:"downloadCsv"}),await Ub(document.getElementById("plotlyChart"))},{preventDefault:!0}),Ku("ctrl+s",async()=>{rc(),Hb("MainChart",rc,fe)},{preventDefault:!0}),Ku("ctrl+w",()=>{window.close()},{preventDefault:!0}),{plotGlPixelRatio:1,scrollZoom:!0,responsive:!0,displaylogo:!1,displayModeBar:!0,modeBarButtonsToRemove:["lasso2d","select2d","downloadImage"],modeBarButtons:[[{name:"Download CSV (Ctrl+Shift+S)",icon:Pu.downloadCsv,click:async function(E){O({modal:"downloadCsv"}),await Ub(E)}},{name:"Download Chart as Image (Ctrl+S)",icon:Pu.downloadImage,click:async function(){rc(),await Hb("MainChart",rc,fe)}}],[{name:"Edit Color (Ctrl+E)",icon:Pu.changeColor,click:function(){Pe(!0)}},"drawline","drawopenpath","drawcircle","drawrect","eraseshape"],[{name:"Overlay chart from CSV (Ctrl+O)",icon:Pu.plotCsv,click:function(){O({modal:"overlayChart"})}},{name:"Add Text (Ctrl+T)",icon:Pu.addText,click:function(){O({modal:"textDialog",data:{text:""}})}},{name:"Change Titles (Ctrl+Shift+T)",icon:Pu.changeTitle,click:function(){O({modal:"titleDialog"})}},{name:"Change Theme",icon:Pu.sunIcon,click:function(){F(!0)}}],["hoverClosestCartesian","hoverCompareCartesian","toggleSpikelines"],[{name:"Auto Scale (Ctrl+Shift+A)",icon:Gs.Icons.autoscale,click:function(){J(!0)}},"zoomIn2d","zoomOut2d","autoScale2d","zoom2d","pan2d"]]}}async function l9(O,F){try{if(O["xaxis.range[0]"]!=null){const J=O["xaxis.range[0]"],fe=O["xaxis.range[1]"];let Pe={},D,E;const e=F.data.filter(s=>s.yaxis!=null),_=[...new Set(e.map(s=>s.yaxis||s.y!=null||s.type=="candlestick"))],w=s=>F.data.filter(T=>T.yaxis==s&&(T.y||T.type=="candlestick"));return _.forEach(s=>{if(typeof s!="string")return;let T="yaxis"+s.replace("y",""),m=[],f=[],l=F.layout[T].type=="log";w(s).forEach(r=>{let n=r.x;l=F.layout[T].type=="log";let o=r.y!=null?r.y:[],i=r.type=="candlestick"?r.low:[],u=r.type=="candlestick"?r.high:[];l&&(o=o.map(Math.log10),r.type=="candlestick"&&(i=r.low.map(Math.log10),u=r.high.map(Math.log10)));let p=n.map((c,b)=>{let d=null;return c>=J&&c<=fe&&(r.y!=null&&(console.log(r.name,r.type,r.yaxis),d=o[b]),r.type=="candlestick"&&(m.push(i[b]),m.push(u[b]))),d});f=f.concat(p)}),f=f.filter(r=>r!=null&&r!=null),D=Math.min(...f),E=Math.max(...f),m.length>0&&(m=m.filter(r=>r!=null&&r!=null),D=Math.min(...m),E=Math.max(...m));let t=E,a=F.layout[T].fixedrange!=null&&F.layout[T].fixedrange==!0;if(D!=null&&E!=null){let r=E-D,n=.15;if(m.length>0&&(n=.3),D-=r*n,E+=r*n,a){if(F.layout[T].tickvals!=null){let i=t,u=-3,p=Math.round(i*.2,u),c=[2,5,6,7,8,9,10],b=[1,4,5,6,7,8,9];for(let x=0;xc[x]&&(u=-b[x],p=Math.round(i*.2,u));let d=[Math.floor(p),Math.floor(p*2),Math.floor(p*3),Math.floor(p*4)],v=[0,Math.floor(i*7)];Pe[T+".tickvals"]=d,Pe[T+".range"]=v,Pe[T+".tickformat"]=".2s";return}D=0,E=F.layout[T].range[1]}Pe[T+".range"]=[D,E]}}),Pe}}catch(J){console.log(`Error in AutoScaling: ${J}`)}return{}}async function u9({plotData:O,Volume:F}){const J=Object.keys(O.layout).filter(w=>w.startsWith("xaxis")).filter(w=>O.layout[w].showticklabels),fe=O.data.filter(w=>{var s;return(s=w==null?void 0:w.name)==null?void 0:s.startsWith("Volume")});let Pe={},D=F||{old_nticks:{}};const E=window.innerWidth,e=window.innerHeight;let _=e>420&&E<920?9:e>420&&E<500?10:8;return E<750?(fe.forEach(w=>{w.type=="bar"&&(w.opacity=1,w.marker.line.width=.09,F.yaxis==null&&(D.yaxis="yaxis"+w.yaxis.replace("y",""),Pe[D.yaxis+".tickfont.size"]=_,D.tickfont=O.layout[D.yaxis].tickfont||{},O.layout.margin.l-=40))}),J.forEach(w=>{var s;((s=D.old_nticks)==null?void 0:s[w])==null&&(Pe[w+".nticks"]=6,D.old_nticks[w]=O.layout[w].nticks||10)}),await rc()):window.MODEBAR.style.cssText.includes("display: none")&&(await rc(!1),F.old_nticks!=null&&J.forEach(w=>{D.old_nticks[w]!=null&&(Pe[w+".nticks"]=D.old_nticks[w],D.old_nticks[w]=void 0)}),F.yaxis!=null&&fe.forEach(w=>{w.type=="bar"&&(w.opacity=.5,w.marker.line.width=.2,Pe[D.yaxis+".tickfont.size"]=D.tickfont.size+3,O.layout.margin.l+=40,D.yaxis=void 0)})),{volume_update:D,layout_update:Pe,plotData:O}}function c9({open:O,onColorChange:F}){const[J,fe]=Vn.useState(!1);function Pe(D){F(D)}return O&&!J&&fe(!0),!O&&J&&fe(!1),Vn.useEffect(()=>{if(J){let D=function(e){let _=0,w=0,s=0,T=0;document.getElementById(e.id+"_header")?document.getElementById(e.id+"_header").onmousedown=m:e.onmousedown=m;function m(t){t=t||window.event,t.preventDefault(),s=t.clientX,T=t.clientY,document.onmouseup=l,document.onmousemove=f}function f(t){t=t||window.event,t.preventDefault(),_=s-t.clientX,w=T-t.clientY,s=t.clientX,T=t.clientY,e.style.top=e.offsetTop-w+"px",e.style.left=e.offsetLeft-_+"px"}function l(){document.onmouseup=null,document.onmousemove=null}},E=document.getElementById("changecolor");E.style.display="block",E.style.width=null,D(E)}else document.getElementById("changecolor").style.display="none"},[J]),Ar("div",{id:"changecolor",children:Ar("div",{id:"changecolor_header",children:Ar("input",{type:"color",id:"picked_color",value:"#00ACFF",onChange:D=>{let E=D.target.value;Pe(E)}})})})}const f9=KT(WT);function h9({json:O,date:F,cmd:J,title:fe,global:Pe,info:D}){const E=qT();D&&Vn.useEffect(()=>{E&&E.capture("chart",D)},[E]),delete O.layout.width,delete O.layout.height,O.layout.title.text="";const[e,_]=Vn.useState(Pe),[w,s]=Vn.useState({}),[T,m]=Vn.useState(!1),[f,l]=Vn.useState(fe),[t,a]=Vn.useState({}),[r,n]=Vn.useState(!1),[o,i]=Vn.useState({modal:""}),[u,p]=Vn.useState(!1),[c,b]=Vn.useState(null),[d,v]=Vn.useState({old_nticks:{}}),[x,g]=Vn.useState(O),[y,k]=Vn.useState([]),[h,M]=Vn.useState(!1),[A,C]=Vn.useState(!0),[L,P]=Vn.useState(!1),[I,R]=Vn.useState(!1),[U,B]=Vn.useState(!1),[G,N]=Vn.useState({}),j=()=>i({modal:""});function V(K){var re,oe,se,ce,xe;console.log("onDeleteAnnotation",K);const te=(oe=(re=x==null?void 0:x.layout)==null?void 0:re.annotations)==null?void 0:oe.findIndex(pe=>pe.text===K.text);console.log("index",te),te>-1&&((ce=(se=x==null?void 0:x.layout)==null?void 0:se.annotations)==null||ce.splice(te,1),g({...x}),k((xe=x==null?void 0:x.layout)==null?void 0:xe.annotations))}function H(K){j7({plotData:x,popupData:K,setPlotData:g,setModal:i,setOnAnnotationClick:N,setAnnotations:k,onAnnotationClick:G,annotations:y,plotDiv:c})}t&&Object.keys(t).length>0&&(Object.keys(t).forEach(K=>{x.layout[K].title={...x.layout[K].title||{},text:t[K]},x.layout[K].showticklabels=!0}),a({}));function ee(K){let te=c.layout.shapes;if(!te||te.length==0)return;let re=te[te.length-1];re.line.color=K,Gs.update(c,{},{shapes:te})}function Q(K,te=!1){let re=w[K]||document.querySelector(`[data-title="${K}"]`);te?(re.style.border="transparent",re.style.boxShadow="none"):(re.style.border="1px solid rgba(0, 151, 222, 1.0)",re.style.borderRadius="5px",re.style.borderpadding="5px",re.style.boxShadow="0 0 5px rgba(0, 151, 222, 1.0)"),s({...w,[K]:re})}function X(){let K="Auto Scale (Ctrl+Shift+A)",te=w[K]||document.querySelector(`[data-title="${K}"]`),re=!0;te.style.border=="transparent"?(re=!1,c.on("plotly_relayout",Np(async function(oe){if(oe["xaxis.range[0]"]==null)return;let se=await l9(oe,c);Gs.update(c,{},se)},100))):c.removeAllListeners("plotly_relayout"),Q(K,re)}function Y(){let K="Edit Color (Ctrl+E)",te=w[K]||document.querySelector(`[data-title="${K}"]`),re=!0;te.style.border=="transparent"&&(re=!1),B(!re),Q(K,re)}return Vn.useEffect(()=>{L&&(console.log("activateAutoScale",!L),X(),P(!1))},[L]),Vn.useEffect(()=>{I&&(Y(),R(!1))},[I]),Vn.useEffect(()=>{if(h)try{console.log("changeTheme",h);const K=x==null?void 0:x.data.filter(se=>{var ce;return(ce=se==null?void 0:se.name)==null?void 0:ce.startsWith("Volume")});let te=!A;window.document.body.style.backgroundColor=te?"#000":"#fff",x.layout.font={...x.layout.font||{},color:te?"#fff":"#000"};const re=te?Pu.sunIcon:Pu.moonIcon;document.querySelector('[data-title="Change Theme"]').getElementsByTagName("path")[0].setAttribute("d",re.path),document.querySelector('[data-title="Change Theme"]').getElementsByTagName("svg")[0].setAttribute("viewBox",re.viewBox);const oe={"#e4003a":"#c80000","#00ACFF":"#009600","#009600":"#00ACFF","#c80000":"#e4003a"};K.forEach(se=>{se.type=="bar"&&(se.marker.color=se.marker.color.map(ce=>oe[ce]||ce))}),x.layout.template=te?QT:ek,g({...x}),Gs.react(c,x.data,x.layout),C(te),M(!1)}catch(K){console.log("error",K)}},[h]),Vn.useEffect(()=>{if(r){C(!0),P(!1);const K=["Download CSV","Download Chart as Image","Overlay chart from CSV","Add Text","Change Titles","Auto Scale (Ctrl+Shift+A)","Reset Axes"],te=document.querySelector('[data-title="Autoscale"]');te&&(te.getElementsByTagName("path")[0].setAttribute("d",Gs.Icons.home.path),te.setAttribute("data-title","Reset Axes")),window.MODEBAR=document.getElementsByClassName("modebar-container")[0];const re=window.MODEBAR.getElementsByClassName("modebar-btn");if(window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:flex;`,re){let oe={};for(let se=0;se0&&(g(ce),v(xe),Gs.relayout(c,se))})}},[r]),ti("div",{className:"relative h-full",children:[u&&Ar("div",{className:"absolute inset-0 flex items-center justify-center z-[100]",children:ti("svg",{className:"animate-spin h-20 w-20 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[Ar("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),Ar("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8z"})]})}),Ar(z7,{addOverlay:K=>{console.log(K),x.layout.showlegend=!0,g(K),n(!1)},plotlyData:x,setLoading:p,open:o.modal==="overlayChart",close:j}),Ar(F7,{updateTitle:K=>l(K),updateAxesTitles:K=>a(K),defaultTitle:f,plotlyData:x,open:o.modal==="titleDialog",close:j}),Ar(B7,{popupData:o.modal==="textDialog"?o==null?void 0:o.data:null,open:o.modal==="textDialog",close:j,addAnnotation:K=>H(K),deleteAnnotation:K=>V(K)}),Ar(c9,{open:U,onColorChange:ee}),ti("div",{className:"relative h-full",id:"MainChart",children:[ti("div",{className:"_header relative gap-4 py-2 text-center text-xs flex items-center justify-between px-4 text-white",children:[Ar("div",{className:"w-1/3",children:Ar("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"40",fill:"none",viewBox:"0 0 64 40",children:Ar("path",{fill:"#fff",d:"M61.283 3.965H33.608v27.757h25.699V19.826H37.561v-3.965H63.26V3.965h-1.977zM39.538 23.792h15.815v3.965H37.561v-3.965h1.977zM59.306 9.913v1.983H37.561V7.931h21.745v1.982zM33.606 0h-3.954v3.965H33.606V0zM25.7 3.966H0V15.86h25.7v3.965H3.953v11.896h25.7V3.966h-3.955zm0 21.808v1.983H7.907v-3.965h17.791v1.982zm0-15.86v1.982H3.953V7.931h21.745v1.982zM37.039 35.693v2.952l-.246-.246-.245-.245-.245-.247-.245-.246-.246-.246-.245-.245-.245-.247-.247-.246-.245-.246-.245-.246-.245-.246-.246-.246h-.49v3.936h.49v-3.198l.246.246.245.246.245.246.245.246.246.246.246.246.245.247.246.245.245.246.245.247.245.246.246.245.245.246h.245v-3.936h-.49zM44.938 37.17h-.491v-1.477h-2.944v3.937h3.93v-2.46h-.495zm-2.944-.246v-.739h1.962v.984h-1.962v-.245zm2.944.984v1.23h-2.944V37.66h2.944v.247zM52.835 37.17h-.49v-1.477h-2.946v3.937h3.925v-2.46h-.489zm-2.944-.246v-.739h1.963v.984h-1.965l.002-.245zm2.944.984v1.23H49.89V37.66h2.946v.247zM29.174 35.693H25.739v3.936H29.663v-.491H26.229v-.984h2.943v-.493H26.229v-1.476h3.434v-.492h-.489zM13.37 35.693H9.934v3.937h3.925v-3.937h-.49zm0 .738v2.709h-2.945v-2.955h2.943l.001.246zM21.276 35.693h-3.435v3.937h.491v-1.476h3.434v-2.461h-.49zm0 .738v1.23h-2.944v-1.476h2.944v.246z"})})}),Ar("p",{className:"font-bold w-1/3 flex flex-col gap-0.5 items-center",children:f}),ti("p",{className:"w-1/3 text-right text-xs",children:[new Intl.DateTimeFormat("en-GB",{dateStyle:"full",timeStyle:"long"}).format(F).replace(/:\d\d /," "),Ar("br",{}),Ar("span",{className:"text-grey-400",children:J})]})]}),Ar("div",{className:"w-full h-[calc(100%-50px)] sm:pb-12",children:Ar(f9,{onInitialized:()=>{if(!c){const K=document.getElementById("plotlyChart");console.log("plot",K),K&&b(K),K.globals=e}r||n(!0)},className:"w-full h-full",divId:"plotlyChart",data:x.data,layout:x.layout,config:s9({setModal:i,changeTheme:M,autoScaling:P,Loading:p,changeColor:R})})})]})]})}function p9(){const[O,F]=Vn.useState(null),[J,fe]=Vn.useState({});Vn.useEffect(()=>{{const E=setInterval(()=>{if(window.plotly_figure){const e=window.plotly_figure;console.log(e),F(e),clearInterval(E)}},100);return()=>clearInterval(E)}},[]);const D=(E=>{var m,f,l,t;if(!E)return null;let e={added_traces:[],csv_yaxis_id:null,cmd_src_idx:null,cmd_idx:null,cmd_src:"",old_margin:null,title:""},_=(f=(m=E.layout)==null?void 0:m.title)==null?void 0:f.text.replace(/|<\/b>/g,"").replace(/ /g,"_"),w=new Date().toISOString().slice(0,10).replace(/-/g,""),s=new Date().toISOString().slice(11,19).replace(/:/g,"");window.title=`openbb_${_}_${w}_${s}`,window.export_image!=null&&(_=window.export_image.split("/").pop(),_.split(".").pop().replace("jpg","jpeg")),E.layout.annotations!=null&&E.layout.annotations.forEach(function(a){if(a.text!=null&&a.text[0]=="/"){e.cmd_src=a.text,e.cmd_idx=E.layout.annotations.indexOf(a),a.text="";let r=E.layout.margin;e.old_margin={...r},r.t!=null&&r.t>40&&(r.t=40),r.l=70,E.cmd=="/stocks/candle"&&(r.r-=40)}});let T=(t=(l=E.layout)==null?void 0:l.title)==null?void 0:t.text;return e.title=T,{data:E,date:new Date,globals:e,cmd:E.command_location,posthog:E.posthog,python_version:E.python_version,pywry_version:E.pywry_version,terminal_version:E.terminal_version,title:T}})(O);if(D){D.posthog.collect_logs&&!J&&fe({api_host:"https://app.posthog.com",autocapture:{css_selector_allowlist:[".ph-capture"]},capture_pageview:!1,loaded:function(w){const s=(D==null?void 0:D.log_id)||"";s!=""&&s!="REPLACE_ME"&&w.identify(s),w.onFeatureFlags(function(){w.isFeatureEnabled("record-pywry",{send_event:!1})||w.stopSessionRecording(),w.isFeatureEnabled("collect-logs-pywry",{send_event:!1})?w.has_opted_out_capturing()&&w.opt_in_capturing():w.opt_out_capturing()})}});const E={INFO:{command:D.cmd,title:D.title,date:D.date,python_version:D.python_version,pywry_version:D.pywry_version,terminal_version:D.terminal_version}},e=Ar(h9,{json:D.data,date:D.date,cmd:D.cmd,title:D.title,global:D.globals,info:E});return D.posthog.collect_logs&&J?Ar(HT,{apiKey:"phc_vhssDAMod5qIplznQ75Kdgz4aB1qPFmeVmfEOZ4hkRw",options:J,children:e}):e}else return Ar("div",{className:"absolute inset-0 flex items-center justify-center z-[100]",children:ti("svg",{className:"animate-spin h-20 w-20 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[Ar("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),Ar("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8z"})]})})}R8.render(Ar(s_.StrictMode,{children:Ar(p9,{})}),document.getElementById("root")); +`),E=new Blob([D],{type:"text/csv;charset=utf-8;"}),e=`${window.title}.csv`;try{let _=await Vw({filename:e}),w="png";_!==null&&(w=_.name.split(".").pop()),await Bp(`Saving ${w.toUpperCase()}`),Np(async function(){ty(E,e,_).then(async function(){await Bp("",!0)})},2)()}catch(_){console.error(_)}}function Bp(O,F){const J=window.document.getElementById("loading"),fe=window.document.getElementById("loading_text");return new Promise(Pe=>{F?J.classList.remove("show"):(fe.innerHTML=O,J.classList.add("show"));let D=setInterval(function(){(F?!J.classList.contains("show"):J.classList.contains("show"))&&(clearInterval(D),Pe(!0))},.1)})}const Np=(O,F)=>{let J;return function(){const fe=this,Pe=arguments;clearTimeout(J),J=setTimeout(()=>O.apply(fe,Pe),F)}},o9={yref:"paper",xref:"paper",x:1,y:0,text:"OpenBB Terminal",font_size:17,font_color:"gray",opacity:.5,xanchor:"right",yanchor:"bottom",yshift:-80,xshift:40};async function Vb(O,F,J=!1){const fe=document.getElementById("plotlyChart");J&&(fe.layout.annotations.push(o9),fe.globals.cmd_idx!=null&&fe.globals.cmd_src!=null&&(fe.layout.annotations[fe.globals.cmd_idx].text=fe.globals.cmd_src),Gs.relayout(fe,{"title.text":fe.globals.title,margin:fe.globals.old_margin})),J||(fe.globals.cmd_idx!=null&&fe.globals.cmd_src!=null&&(fe.layout.annotations[fe.globals.cmd_idx].text=""),fe.layout.annotations.splice(F,1),Gs.relayout(fe,{"title.text":"",margin:O}))}async function Hw(O,F,J){const fe=document.getElementById(O);if(["svg","pdf"].includes(J)){const Pe=document.getElementById("plotlyChart"),D=Pe.layout.margin,E=Pe.layout.annotations.length;await Vb(D,E,!0),Gs.downloadImage(Pe,{format:"svg",height:Pe.clientHeight,width:Pe.clientWidth,filename:window.title}),await Vb(D,E,!1),await Bp("",!0);return}Np(async function(){Uw.toBlob(fe).then(function(Pe){ty(Pe,F,null)})},2)()}async function Hb(O,F,J){const fe=document.getElementById(O),Pe=`${window.title}.png`;try{let D=await Vw({filename:Pe,is_image:!0}),E="png";if(D!==null&&(E=D.name.split(".").pop()),J(!0),await Bp(`Saving ${E.toUpperCase()}`),["svg","pdf"].includes(E)){await Hw(O,Pe,E),F(!1),J(!1);return}Np(async function(){Uw.toBlob(fe).then(function(e){ty(e,Pe,D).then(async function(){await Bp("",!0),F(!1)})})},2)(),J(!1)}catch(D){console.error(D),F(!1)}}function rc(O=!0){return new Promise(F=>{window.MODEBAR||(window.MODEBAR=window.document.getElementsByClassName("modebar-container")[0],window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:flex;`),window.MODEBAR&&(window.MODEBAR.style.cssText.includes("display: none")&&!O?window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:flex;`:window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:none;`,F(!0))})}function s9({setModal:O,changeTheme:F,autoScaling:J,Loading:fe,changeColor:Pe}){return Ku("ctrl+shift+t",()=>{O({name:"titleDialog"})},{preventDefault:!0}),Ku("ctrl+t",()=>{O({name:"textDialog"})},{preventDefault:!0}),Ku("ctrl+o",()=>{O({name:"overlayChart"})},{preventDefault:!0}),Ku("ctrl+shift+h",()=>{rc()},{preventDefault:!0}),Ku("ctrl+e",()=>{Pe(!0)},{preventDefault:!0}),Ku("ctrl+shift+s",async()=>{O({name:"downloadCsv"}),await Ub(document.getElementById("plotlyChart"))},{preventDefault:!0}),Ku("ctrl+s",async()=>{rc(),Hb("MainChart",rc,fe)},{preventDefault:!0}),Ku("ctrl+w",()=>{window.close()},{preventDefault:!0}),{plotGlPixelRatio:1,scrollZoom:!0,responsive:!0,displaylogo:!1,displayModeBar:!0,modeBarButtonsToRemove:["lasso2d","select2d","downloadImage"],modeBarButtons:[[{name:"Download CSV (Ctrl+Shift+S)",icon:Pu.downloadCsv,click:async function(E){O({name:"downloadCsv"}),await Ub(E)}},{name:"Download Chart as Image (Ctrl+S)",icon:Pu.downloadImage,click:async function(){rc(),await Hb("MainChart",rc,fe)}}],[{name:"Edit Color (Ctrl+E)",icon:Pu.changeColor,click:function(){Pe(!0)}},"drawline","drawopenpath","drawcircle","drawrect","eraseshape"],[{name:"Overlay chart from CSV (Ctrl+O)",icon:Pu.plotCsv,click:function(){O({name:"overlayChart"})}},{name:"Add Text (Ctrl+T)",icon:Pu.addText,click:function(){O({name:"textDialog",data:{text:""}})}},{name:"Change Titles (Ctrl+Shift+T)",icon:Pu.changeTitle,click:function(){O({name:"titleDialog"})}},{name:"Change Theme",icon:Pu.sunIcon,click:function(){F(!0)}}],["hoverClosestCartesian","hoverCompareCartesian","toggleSpikelines"],[{name:"Auto Scale (Ctrl+Shift+A)",icon:Gs.Icons.autoscale,click:function(){J(!0)}},"zoomIn2d","zoomOut2d","autoScale2d","zoom2d","pan2d"]]}}async function l9(O,F){try{if(O["xaxis.range[0]"]!=null){const J=O["xaxis.range[0]"],fe=O["xaxis.range[1]"];let Pe={},D,E;const e=F.data.filter(s=>s.yaxis!=null),_=[...new Set(e.map(s=>s.yaxis||s.y!=null||s.type=="candlestick"))],w=s=>F.data.filter(T=>T.yaxis==s&&(T.y||T.type=="candlestick"));return _.forEach(s=>{if(typeof s!="string")return;let T="yaxis"+s.replace("y",""),m=[],f=[],l=F.layout[T].type=="log";w(s).forEach(r=>{let n=r.x;l=F.layout[T].type=="log";let o=r.y!=null?r.y:[],i=r.type=="candlestick"?r.low:[],u=r.type=="candlestick"?r.high:[];l&&(o=o.map(Math.log10),r.type=="candlestick"&&(i=r.low.map(Math.log10),u=r.high.map(Math.log10)));let p=n.map((c,b)=>{let d=null;return c>=J&&c<=fe&&(r.y!=null&&(console.log(r.name,r.type,r.yaxis),d=o[b]),r.type=="candlestick"&&(m.push(i[b]),m.push(u[b]))),d});f=f.concat(p)}),f=f.filter(r=>r!=null&&r!=null),D=Math.min(...f),E=Math.max(...f),m.length>0&&(m=m.filter(r=>r!=null&&r!=null),D=Math.min(...m),E=Math.max(...m));let t=E,a=F.layout[T].fixedrange!=null&&F.layout[T].fixedrange==!0;if(D!=null&&E!=null){let r=E-D,n=.15;if(m.length>0&&(n=.3),D-=r*n,E+=r*n,a){if(F.layout[T].tickvals!=null){let i=t,u=-3,p=Math.round(i*.2,u),c=[2,5,6,7,8,9,10],b=[1,4,5,6,7,8,9];for(let x=0;xc[x]&&(u=-b[x],p=Math.round(i*.2,u));let d=[Math.floor(p),Math.floor(p*2),Math.floor(p*3),Math.floor(p*4)],v=[0,Math.floor(i*7)];Pe[T+".tickvals"]=d,Pe[T+".range"]=v,Pe[T+".tickformat"]=".2s";return}D=0,E=F.layout[T].range[1]}Pe[T+".range"]=[D,E]}}),Pe}}catch(J){console.log(`Error in AutoScaling: ${J}`)}return{}}async function u9({plotData:O,Volume:F}){const J=Object.keys(O.layout).filter(w=>w.startsWith("xaxis")).filter(w=>O.layout[w].showticklabels),fe=O.data.filter(w=>{var s;return(s=w==null?void 0:w.name)==null?void 0:s.startsWith("Volume")});let Pe={},D=F||{old_nticks:{}};const E=window.innerWidth,e=window.innerHeight;let _=e>420&&E<920?9:e>420&&E<500?10:8;return E<750?(fe.forEach(w=>{w.type=="bar"&&(w.opacity=1,w.marker.line.width=.09,F.yaxis==null&&(D.yaxis="yaxis"+w.yaxis.replace("y",""),Pe[D.yaxis+".tickfont.size"]=_,D.tickfont=O.layout[D.yaxis].tickfont||{},O.layout.margin.l-=40))}),J.forEach(w=>{var s;((s=D.old_nticks)==null?void 0:s[w])==null&&(Pe[w+".nticks"]=6,D.old_nticks[w]=O.layout[w].nticks||10)}),await rc()):window.MODEBAR.style.cssText.includes("display: none")&&(await rc(!1),F.old_nticks!=null&&J.forEach(w=>{D.old_nticks[w]!=null&&(Pe[w+".nticks"]=D.old_nticks[w],D.old_nticks[w]=void 0)}),F.yaxis!=null&&fe.forEach(w=>{w.type=="bar"&&(w.opacity=.5,w.marker.line.width=.2,Pe[D.yaxis+".tickfont.size"]=D.tickfont.size+3,O.layout.margin.l+=40,D.yaxis=void 0)})),{volume_update:D,layout_update:Pe,plotData:O}}function c9({open:O,onColorChange:F}){const[J,fe]=Un.useState(!1);function Pe(D){F(D)}return O&&!J&&fe(!0),!O&&J&&fe(!1),Un.useEffect(()=>{if(J){let D=function(e){let _=0,w=0,s=0,T=0;document.getElementById(e.id+"_header")?document.getElementById(e.id+"_header").onmousedown=m:e.onmousedown=m;function m(t){t=t||window.event,t.preventDefault(),s=t.clientX,T=t.clientY,document.onmouseup=l,document.onmousemove=f}function f(t){t=t||window.event,t.preventDefault(),_=s-t.clientX,w=T-t.clientY,s=t.clientX,T=t.clientY,e.style.top=e.offsetTop-w+"px",e.style.left=e.offsetLeft-_+"px"}function l(){document.onmouseup=null,document.onmousemove=null}},E=document.getElementById("changecolor");E.style.display="block",E.style.width=null,D(E)}else document.getElementById("changecolor").style.display="none"},[J]),Ar("div",{id:"changecolor",children:Ar("div",{id:"changecolor_header",children:Ar("input",{type:"color",id:"picked_color",value:"#00ACFF",onChange:D=>{let E=D.target.value;Pe(E)}})})})}const f9=KT(WT);function h9({json:O,date:F,cmd:J,title:fe,global:Pe,info:D}){const E=qT();Un.useEffect(()=>{E&&E.capture("chart",D)},[D]),delete O.layout.width,delete O.layout.height,O.layout.title.text="";const[e,_]=Un.useState(Pe),[w,s]=Un.useState({}),[T,m]=Un.useState(!1),[f,l]=Un.useState(fe),[t,a]=Un.useState({}),[r,n]=Un.useState(!1),[o,i]=Un.useState({name:""}),[u,p]=Un.useState(!1),[c,b]=Un.useState(null),[d,v]=Un.useState({old_nticks:{}}),[x,g]=Un.useState(O),[y,k]=Un.useState([]),[h,M]=Un.useState(!1),[A,C]=Un.useState(!0),[L,P]=Un.useState(!1),[I,R]=Un.useState(!1),[U,B]=Un.useState(!1),[G,N]=Un.useState({}),j=()=>i({name:""});function V(K){var re,oe,se,ce,xe;console.log("onDeleteAnnotation",K);const te=(oe=(re=x==null?void 0:x.layout)==null?void 0:re.annotations)==null?void 0:oe.findIndex(pe=>pe.text===K.text);console.log("index",te),te>-1&&((ce=(se=x==null?void 0:x.layout)==null?void 0:se.annotations)==null||ce.splice(te,1),g({...x}),k((xe=x==null?void 0:x.layout)==null?void 0:xe.annotations))}function H(K){j7({plotData:x,popupData:K,setPlotData:g,setModal:i,setOnAnnotationClick:N,setAnnotations:k,onAnnotationClick:G,annotations:y,plotDiv:c})}Un.useEffect(()=>{t&&Object.keys(t).length>0&&(Object.keys(t).forEach(K=>{x.layout[K].title={...x.layout[K].title||{},text:t[K]},x.layout[K].showticklabels=!0}),a({}))},[t]);function ee(K){let te=c.layout.shapes;if(!te||te.length==0)return;let re=te[te.length-1];re.line.color=K,Gs.update(c,{},{shapes:te})}function Q(K,te=!1){let re=w[K]||document.querySelector(`[data-title="${K}"]`);te?(re.style.border="transparent",re.style.boxShadow="none"):(re.style.border="1px solid rgba(0, 151, 222, 1.0)",re.style.borderRadius="5px",re.style.borderpadding="5px",re.style.boxShadow="0 0 5px rgba(0, 151, 222, 1.0)"),s({...w,[K]:re})}function X(){let K="Auto Scale (Ctrl+Shift+A)",te=w[K]||document.querySelector(`[data-title="${K}"]`),re=!0;te.style.border=="transparent"?(re=!1,c.on("plotly_relayout",Np(async function(oe){if(oe["xaxis.range[0]"]==null)return;let se=await l9(oe,c);Gs.update(c,{},se)},100))):c.removeAllListeners("plotly_relayout"),Q(K,re)}function Y(){let K="Edit Color (Ctrl+E)",te=w[K]||document.querySelector(`[data-title="${K}"]`),re=!0;te.style.border=="transparent"&&(re=!1),B(!re),Q(K,re)}return Un.useEffect(()=>{L&&(console.log("activateAutoScale",!L),X(),P(!1))},[L]),Un.useEffect(()=>{I&&(Y(),R(!1))},[I]),Un.useEffect(()=>{if(h)try{console.log("changeTheme",h);const K=x==null?void 0:x.data.filter(se=>{var ce;return(ce=se==null?void 0:se.name)==null?void 0:ce.startsWith("Volume")});let te=!A;window.document.body.style.backgroundColor=te?"#000":"#fff",x.layout.font={...x.layout.font||{},color:te?"#fff":"#000"};const re=te?Pu.sunIcon:Pu.moonIcon;document.querySelector('[data-title="Change Theme"]').getElementsByTagName("path")[0].setAttribute("d",re.path),document.querySelector('[data-title="Change Theme"]').getElementsByTagName("svg")[0].setAttribute("viewBox",re.viewBox);const oe={"#e4003a":"#c80000","#00ACFF":"#009600","#009600":"#00ACFF","#c80000":"#e4003a"};K.forEach(se=>{se.type=="bar"&&(se.marker.color=se.marker.color.map(ce=>oe[ce]||ce))}),x.layout.template=te?QT:ek,g({...x}),Gs.react(c,x.data,x.layout),C(te),M(!1)}catch(K){console.log("error",K)}},[h]),Un.useEffect(()=>{if(r){C(!0),P(!1);const K=["Download CSV","Download Chart as Image","Overlay chart from CSV","Add Text","Change Titles","Auto Scale (Ctrl+Shift+A)","Reset Axes"],te=document.querySelector('[data-title="Autoscale"]');te&&(te.getElementsByTagName("path")[0].setAttribute("d",Gs.Icons.home.path),te.setAttribute("data-title","Reset Axes")),window.MODEBAR=document.getElementsByClassName("modebar-container")[0];const re=window.MODEBAR.getElementsByClassName("modebar-btn");if(window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:flex;`,re){let oe={};for(let se=0;se0&&(g(ce),v(xe),Gs.relayout(c,se))})}},[r]),ti("div",{className:"relative h-full",children:[u&&Ar("div",{className:"absolute inset-0 flex items-center justify-center z-[100]",children:ti("svg",{className:"animate-spin h-20 w-20 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[Ar("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),Ar("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8z"})]})}),Ar(z7,{addOverlay:K=>{console.log(K),x.layout.showlegend=!0,g(K),n(!1)},plotlyData:x,setLoading:p,open:o.name==="overlayChart",close:j}),Ar(F7,{updateTitle:K=>l(K),updateAxesTitles:K=>a(K),defaultTitle:f,plotlyData:x,open:o.name==="titleDialog",close:j}),Ar(B7,{popupData:o.name==="textDialog"?o==null?void 0:o.data:null,open:o.name==="textDialog",close:j,addAnnotation:K=>H(K),deleteAnnotation:K=>V(K)}),Ar(c9,{open:U,onColorChange:ee}),ti("div",{className:"relative h-full",id:"MainChart",children:[ti("div",{className:"_header relative gap-4 py-2 text-center text-xs flex items-center justify-between px-4 text-white",children:[Ar("div",{className:"w-1/3",children:Ar("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"40",fill:"none",viewBox:"0 0 64 40",children:Ar("path",{fill:"#fff",d:"M61.283 3.965H33.608v27.757h25.699V19.826H37.561v-3.965H63.26V3.965h-1.977zM39.538 23.792h15.815v3.965H37.561v-3.965h1.977zM59.306 9.913v1.983H37.561V7.931h21.745v1.982zM33.606 0h-3.954v3.965H33.606V0zM25.7 3.966H0V15.86h25.7v3.965H3.953v11.896h25.7V3.966h-3.955zm0 21.808v1.983H7.907v-3.965h17.791v1.982zm0-15.86v1.982H3.953V7.931h21.745v1.982zM37.039 35.693v2.952l-.246-.246-.245-.245-.245-.247-.245-.246-.246-.246-.245-.245-.245-.247-.247-.246-.245-.246-.245-.246-.245-.246-.246-.246h-.49v3.936h.49v-3.198l.246.246.245.246.245.246.245.246.246.246.246.246.245.247.246.245.245.246.245.247.245.246.246.245.245.246h.245v-3.936h-.49zM44.938 37.17h-.491v-1.477h-2.944v3.937h3.93v-2.46h-.495zm-2.944-.246v-.739h1.962v.984h-1.962v-.245zm2.944.984v1.23h-2.944V37.66h2.944v.247zM52.835 37.17h-.49v-1.477h-2.946v3.937h3.925v-2.46h-.489zm-2.944-.246v-.739h1.963v.984h-1.965l.002-.245zm2.944.984v1.23H49.89V37.66h2.946v.247zM29.174 35.693H25.739v3.936H29.663v-.491H26.229v-.984h2.943v-.493H26.229v-1.476h3.434v-.492h-.489zM13.37 35.693H9.934v3.937h3.925v-3.937h-.49zm0 .738v2.709h-2.945v-2.955h2.943l.001.246zM21.276 35.693h-3.435v3.937h.491v-1.476h3.434v-2.461h-.49zm0 .738v1.23h-2.944v-1.476h2.944v.246z"})})}),Ar("p",{className:"font-bold w-1/3 flex flex-col gap-0.5 items-center",children:f}),ti("p",{className:"w-1/3 text-right text-xs",children:[new Intl.DateTimeFormat("en-GB",{dateStyle:"full",timeStyle:"long"}).format(F).replace(/:\d\d /," "),Ar("br",{}),Ar("span",{className:"text-grey-400",children:J})]})]}),Ar("div",{className:"w-full h-[calc(100%-50px)] sm:pb-12",children:Ar(f9,{onInitialized:()=>{if(!c){const K=document.getElementById("plotlyChart");console.log("plot",K),K&&b(K),K.globals=e}r||n(!0)},className:"w-full h-full",divId:"plotlyChart",data:x.data,layout:x.layout,config:s9({setModal:i,changeTheme:M,autoScaling:P,Loading:p,changeColor:R})})})]})]})}function p9(){const[O,F]=Un.useState(null),[J,fe]=Un.useState({});Un.useEffect(()=>{{const E=setInterval(()=>{if(window.plotly_figure){const e=window.plotly_figure;console.log(e),F(e),clearInterval(E)}},100);return()=>clearInterval(E)}},[]);const D=(E=>{var m,f,l,t;if(!E)return null;let e={added_traces:[],csv_yaxis_id:null,cmd_src_idx:null,cmd_idx:null,cmd_src:"",old_margin:null,title:""},_=(f=(m=E.layout)==null?void 0:m.title)==null?void 0:f.text.replace(/|<\/b>/g,"").replace(/ /g,"_"),w=new Date().toISOString().slice(0,10).replace(/-/g,""),s=new Date().toISOString().slice(11,19).replace(/:/g,"");window.title=`openbb_${_}_${w}_${s}`,window.export_image!=null&&(_=window.export_image.split("/").pop(),_.split(".").pop().replace("jpg","jpeg")),E.layout.annotations!=null&&E.layout.annotations.forEach(function(a){if(a.text!=null&&a.text[0]=="/"){e.cmd_src=a.text,e.cmd_idx=E.layout.annotations.indexOf(a),a.text="";let r=E.layout.margin;e.old_margin={...r},r.t!=null&&r.t>40&&(r.t=40),r.l=70,E.cmd=="/stocks/candle"&&(r.r-=40)}});let T=(t=(l=E.layout)==null?void 0:l.title)==null?void 0:t.text;return e.title=T,{data:E,date:new Date,globals:e,cmd:E.command_location,posthog:E.posthog,python_version:E.python_version,pywry_version:E.pywry_version,terminal_version:E.terminal_version,title:T}})(O);if(D){D.posthog.collect_logs&&!J&&fe({api_host:"https://app.posthog.com",autocapture:{css_selector_allowlist:[".ph-capture"]},capture_pageview:!1,loaded:function(w){const s=(D==null?void 0:D.log_id)||"";s!=""&&s!="REPLACE_ME"&&w.identify(s),w.onFeatureFlags(function(){w.isFeatureEnabled("record-pywry",{send_event:!1})||w.stopSessionRecording(),w.isFeatureEnabled("collect-logs-pywry",{send_event:!1})?w.has_opted_out_capturing()&&w.opt_in_capturing():w.opt_out_capturing()})}});const E={INFO:{command:D.cmd,title:D.title,date:D.date,python_version:D.python_version,pywry_version:D.pywry_version,terminal_version:D.terminal_version}},e=Ar(h9,{json:D.data,date:D.date,cmd:D.cmd,title:D.title,global:D.globals,info:E});return D.posthog.collect_logs&&J?Ar(HT,{apiKey:"phc_vhssDAMod5qIplznQ75Kdgz4aB1qPFmeVmfEOZ4hkRw",options:J,children:e}):e}else return Ar("div",{className:"absolute inset-0 flex items-center justify-center z-[100]",children:ti("svg",{className:"animate-spin h-20 w-20 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[Ar("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),Ar("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8z"})]})})}R8.render(Ar(s_.StrictMode,{children:Ar(p9,{})}),document.getElementById("root"));